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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3428a34c2b12568ac1130c4c9f7d2dd74c369585 | 169 | kt | Kotlin | app/src/main/java/com/pet/chat/network/data/base/FilePreview.kt | ViktorMorgachev/ChatBest | 14065fa300ece434f4605b56938e7c80a4dde4f4 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/pet/chat/network/data/base/FilePreview.kt | ViktorMorgachev/ChatBest | 14065fa300ece434f4605b56938e7c80a4dde4f4 | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/pet/chat/network/data/base/FilePreview.kt | ViktorMorgachev/ChatBest | 14065fa300ece434f4605b56938e7c80a4dde4f4 | [
"Apache-2.0"
] | null | null | null | package com.pet.chat.network.data.base
import android.net.Uri
data class FilePreview(val fileUri: Uri?,
val filePath: String?,
val openDialog: Boolean = true)
| 21.125 | 41 | 0.739645 |
40abc5b6a6a68749fceab594232980973dc7f81a | 2,572 | py | Python | tests/cli/test_cookiecutter_invocation.py | insight-infrastructure/cookiecutter | 5e77a6f59786759cf1b469e7bd827b6d340a31c6 | [
"BSD-3-Clause"
] | 8 | 2020-06-15T18:49:24.000Z | 2021-04-15T10:34:24.000Z | tests/cli/test_cookiecutter_invocation.py | insight-infrastructure/cookiecutter | 5e77a6f59786759cf1b469e7bd827b6d340a31c6 | [
"BSD-3-Clause"
] | 19 | 2020-06-28T16:03:56.000Z | 2020-10-07T15:52:06.000Z | tests/cli/test_cookiecutter_invocation.py | insight-infrastructure/nukikata | 5e77a6f59786759cf1b469e7bd827b6d340a31c6 | [
"BSD-3-Clause"
] | null | null | null | """
test_cookiecutter_invocation.
Tests to make sure that cookiecutter can be called from the cli without
using the entry point set up for the package.
"""
import os
import subprocess
import sys
import shutil
import pytest
import cookiecutter.utils.paths
@pytest.fixture
def project_dir():
"""Return test project folder name and remove it after the test."""
yield 'fake-project-templated'
if os.path.isdir('fake-project-templated'):
cookiecutter.utils.paths.rmtree('fake-project-templated')
@pytest.mark.usefixtures('clean_system')
def test_should_invoke_main(monkeypatch, project_dir):
"""Should create a project and exit with 0 code on cli invocation."""
monkeypatch.setenv('PYTHONPATH', '.')
test_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
monkeypatch.chdir(test_dir)
exit_code = subprocess.check_call(
[
sys.executable,
'-m',
'cookiecutter.cli.cli_parser',
'fixtures/fake-repo-tmpl',
'--no-input',
]
)
assert exit_code == 0
assert os.path.isdir(project_dir)
@pytest.mark.usefixtures('clean_system')
def test_should_invoke_main_nuki(monkeypatch, project_dir):
"""Should create a project and exit with 0 code on cli invocation."""
monkeypatch.setenv('PYTHONPATH', '.')
test_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
monkeypatch.chdir(test_dir)
exit_code = subprocess.check_call(
[
sys.executable,
'-m',
'cookiecutter.cli.cli_parser',
'fixtures/fake-repo-tmpl-nuki',
'--no-input',
]
)
assert exit_code == 0
assert os.path.isdir(project_dir)
@pytest.mark.usefixtures('clean_system')
def test_should_invoke_main_nuki_nukis(monkeypatch, project_dir):
"""Should create a project and exit with 0 code on cli invocation."""
monkeypatch.setenv('PYTHONPATH', '.')
test_dir = os.path.join(
os.path.abspath(os.path.dirname(__file__)),
'..',
'fixtures/fake-repo-tmpl-nukis',
)
monkeypatch.chdir(test_dir)
output_dirs = ['fake-nuki-templated', 'fake-nuki2-templated']
for o in output_dirs:
if os.path.isdir(o):
shutil.rmtree(o)
exit_code = subprocess.check_call(
[sys.executable, '-m', 'cookiecutter.cli.cli_parser', '.', '--no-input']
)
assert exit_code == 0
assert os.path.isdir(project_dir)
for o in output_dirs:
if os.path.isdir(o):
shutil.rmtree(o)
| 27.361702 | 80 | 0.650078 |
a99d3b53ebab76aef40d3aa34b48107f79735fab | 6,906 | html | HTML | authors/nicola_molinari/author_details/deletions_by_date.html | cdnjs/cdnjs-git_stats | b2a5b0f58eed926bddfae87f15412c35696aecb6 | [
"MIT"
] | 5 | 2016-01-30T16:49:46.000Z | 2022-02-08T04:28:04.000Z | authors/nicola_molinari/author_details/deletions_by_date.html | cdnjs/cdnjs-git_stats | b2a5b0f58eed926bddfae87f15412c35696aecb6 | [
"MIT"
] | 1 | 2018-08-17T08:54:54.000Z | 2018-08-17T08:54:54.000Z | authors/nicola_molinari/author_details/deletions_by_date.html | cdnjs/cdnjs-git_stats | b2a5b0f58eed926bddfae87f15412c35696aecb6 | [
"MIT"
] | 1 | 2021-11-04T12:14:53.000Z | 2021-11-04T12:14:53.000Z | <!DOCTYPE html><html><head><title>GitStats - cdnjs</title><meta charset="utf-8"/><link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.1/css/bootstrap.min.css" rel="stylesheet" type="text/css"/><style>body{padding-top:60px}</style><link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.1/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.1/bootstrap.min.js" type="text/javascript"></script><script src="../../../assets/highstock.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/highstock/5.0.10/js/modules/exporting.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts-export-csv/1.4.7/export-csv.min.js" type="text/javascript"></script></head><body><div class="navbar navbar-fixed-top"><div class="navbar-inner"><div class="container"><a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse"><span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span></a> <a class="brand" href="../../../index.html">GitStats - cdnjs</a><div class="nav-collapse collapse"><ul class="nav"><li class=""><a href="../../../general.html">General</a></li><li class=""><a href="../../../activity/by_date.html">Activity</a></li><li class="active"><a href="../../best_authors.html">Authors</a></li><li class=""><a href="../../../files/by_date.html">Files</a></li><li class=""><a href="../../../lines/by_date.html">Lines</a></li><li class=""><a href="../../../comments/by_date.html">Comments</a></li></ul></div></div></div></div><div class="container"><div class="tabbable tabs-left"><ul class="nav nav-tabs"><li class=""><a href="commits_by_date.html">Commits by date</a></li><li class=""><a href="changed_lines_by_date.html">Changed lines by date</a></li><li class=""><a href="insertions_by_date.html">Lines added by date</a></li><li class="active"><a href="deletions_by_date.html">Lines deleted by date</a></li></ul><div class="tab-content"><div class="tab-pane active"><div class="page-header"><h1 class="pagination-centered">Lines deleted by date</h1></div><script type="text/javascript">!function(){var e=window.onload;window.onload=function(){"function"==typeof e&&e();var t={title:{text:""},legend:{enabled:!0,layout:"vertical",backgroundColor:"#FFFFFF",align:"left",verticalAlign:"top",x:100,y:70,floating:!0,shadow:!0},xAxis:{title:{text:null}},yAxis:{title:{text:"Lines"},labels:{}},tooltip:{enabled:!0},credits:{enabled:!1},plotOptions:{areaspline:{}},chart:{defaultSeriesType:"line",renderTo:"charts.deletions_by_author_by_date"},subtitle:{},series:[{name:"Nicola Molinari",type:"spline",data:[[1370253792e3,0],[1370304e6,0],[13703904e5,0],[13704768e5,0],[13705632e5,0],[13706496e5,0],[1370736e6,0],[1370864955e3,29],[13709088e5,29],[13709952e5,29],[13710816e5,29],[1371168e6,29],[13712544e5,29],[13713408e5,29],[13714272e5,29],[13715136e5,29],[13716e8,29],[13716864e5,29],[13717728e5,29],[13718592e5,29],[13719456e5,29],[1372032e6,29],[13721184e5,29],[13722048e5,29],[13722912e5,29],[13723776e5,29],[1372464e6,29],[13725504e5,29],[13726368e5,29],[13727232e5,29],[13728096e5,29],[1372896e6,29],[13729824e5,29],[13730688e5,29],[13731552e5,29],[13732416e5,29],[1373328e6,29],[13734144e5,29],[13735008e5,29],[13735872e5,29],[13736736e5,29],[137376e7,29],[13738464e5,29],[13739328e5,29],[13740192e5,29],[13741056e5,29],[1374192e6,29],[13742784e5,29],[13743648e5,29],[13744512e5,29],[13745376e5,29],[1374624e6,29],[13747104e5,29],[13747968e5,29],[13748832e5,29],[13749696e5,29],[1375056e6,29],[13751424e5,29],[13752288e5,29],[13753152e5,29],[13754016e5,29],[1375488e6,29],[13755744e5,29],[13756608e5,29],[13757472e5,29],[13758336e5,29],[137592e7,29],[13760064e5,29],[13760928e5,29],[137624981e4,30],[1376313776e3,31],[1376352e6,31],[13764384e5,31],[13765248e5,31],[13766112e5,31],[13766976e5,31],[1376784e6,31],[13768704e5,31],[13769568e5,31],[13770432e5,31],[13771296e5,31],[1377216e6,31],[13773024e5,31],[13773888e5,31],[13774752e5,31],[13775616e5,31],[1377648e6,31],[13777344e5,31],[13778208e5,31],[13779072e5,31],[13779936e5,31],[137808e7,31],[13781664e5,31],[13782528e5,31],[13783392e5,31],[13784256e5,31],[1378512e6,31],[13785984e5,31],[13786848e5,31],[13787712e5,31],[13788576e5,31],[1378944e6,31],[13790304e5,31],[13791168e5,31],[1379273379e3,32],[13792896e5,32],[1379376e6,32],[13794624e5,32],[13795488e5,32],[13796352e5,32],[13797216e5,32],[1379808e6,32],[13798944e5,32],[13799808e5,32],[13800672e5,32],[13801536e5,32],[138024e7,32],[13803264e5,32],[1380452638e3,33],[13804992e5,33],[13805856e5,33],[1380672e6,33],[13807584e5,33],[13808448e5,33],[13809312e5,33],[13810176e5,33],[1381104e6,33],[13811904e5,33],[13812768e5,33],[13813632e5,33],[13814496e5,33],[1381536e6,33],[13816224e5,33],[13817088e5,33],[13817952e5,33],[13818816e5,33],[1381968e6,33],[13820544e5,33],[13821408e5,33],[13822272e5,33],[13823136e5,33],[13824e8,33],[13824864e5,33],[13825728e5,33],[1382692835e3,34],[13827456e5,34],[1382832e6,34],[13829184e5,34],[13830048e5,34],[13830912e5,34],[13831776e5,34],[1383264e6,34],[13833504e5,34],[13834368e5,34],[13835232e5,34],[13836096e5,34],[1383696e6,34],[13837824e5,34],[13838688e5,34],[13839552e5,34],[13840416e5,34],[1384128e6,34],[13842144e5,34],[13843008e5,34],[13843872e5,34],[13844736e5,34],[138456e7,34],[13846464e5,34],[13847328e5,34],[13848192e5,34],[13849056e5,34],[1384992e6,34],[1385120939e3,35],[13851648e5,35],[13852512e5,35],[13853376e5,35],[1385424e6,35],[13855104e5,35],[13855968e5,35],[13856832e5,35],[1385813155e3,35],[1385856e6,35],[13859424e5,35],[13860288e5,35],[13861152e5,35],[13862016e5,35],[1386288e6,35],[13863744e5,35],[13864608e5,35],[13865472e5,35],[13866336e5,35],[138672e7,35],[13868064e5,35],[13868928e5,35],[13869792e5,35],[13870656e5,35],[1387152e6,35],[13872384e5,35],[13873248e5,35],[13874112e5,35],[13874976e5,35],[1387584e6,35],[13876704e5,35],[13877568e5,35],[13878432e5,35],[13879296e5,35],[1388016e6,35],[13881024e5,35],[13881888e5,35],[13882752e5,35],[13883616e5,35],[1388448e6,35],[13885344e5,35],[13886208e5,35],[13887072e5,35],[13887936e5,35],[138888e7,35],[13889664e5,35],[13890528e5,35],[13891392e5,35],[13892256e5,35],[1389312e6,35],[13893984e5,35],[13894848e5,35],[13895712e5,35],[13896576e5,35],[1389744e6,35],[13898304e5,35],[13899168e5,35],[13900032e5,35],[13900896e5,35],[1390176e6,35],[13902624e5,35],[13903488e5,35],[13904352e5,35],[13905216e5,35],[1390608e6,35],[1390730351e3,36],[13907808e5,36],[13908672e5,36],[1390987318e3,62]]}]};window.chart_charts.deletions_by_author_by_date=new Highcharts.StockChart(t)}}();</script><div id="charts.deletions_by_author_by_date"></div><small><center>5 best authors shown</center></small></div></div></div></div></body></html> | 6,906 | 6,906 | 0.729945 |
7d7a3f8e8e61329ed21fdf258bc7c2bfba354f16 | 309 | lua | Lua | Media/Scripts/UserSorts/TypeAndName.lua | Swizzy/AuroraScripts | 27f2b229c8acc77544cc31c5d15caa6dff375538 | [
"Unlicense"
] | 3 | 2016-09-07T08:12:10.000Z | 2017-04-13T20:59:02.000Z | Media/Scripts/UserSorts/TypeAndName.lua | Swizzy/AuroraScripts | 27f2b229c8acc77544cc31c5d15caa6dff375538 | [
"Unlicense"
] | 1 | 2021-05-11T17:23:58.000Z | 2021-05-11T20:05:28.000Z | Media/Scripts/UserSorts/TypeAndName.lua | Swizzy/AuroraScripts | 27f2b229c8acc77544cc31c5d15caa6dff375538 | [
"Unlicense"
] | 3 | 2017-04-13T20:59:03.000Z | 2020-10-29T11:03:05.000Z | GameListSorters["Name Grouped by Type"] = function(Item1, Item2, Type)
if Item1.Type ~= Item2.Type then
return Item1.Type > Item2.Type
end
if Type == SortType.Descending then
return string.lower(Item1.Name) > string.lower(Item2.Name)
end
return string.lower(Item1.Name) < string.lower(Item2.Name)
end | 34.333333 | 70 | 0.747573 |
0efd539fdd07243f65fc1d64adefc0d90361e25f | 654 | ts | TypeScript | src/app/repo/repo.component.ts | DerrickOdhiambo/Github-IP2 | 24a575d2cae6f06e72be30165b0369cef7e745b0 | [
"Unlicense"
] | null | null | null | src/app/repo/repo.component.ts | DerrickOdhiambo/Github-IP2 | 24a575d2cae6f06e72be30165b0369cef7e745b0 | [
"Unlicense"
] | null | null | null | src/app/repo/repo.component.ts | DerrickOdhiambo/Github-IP2 | 24a575d2cae6f06e72be30165b0369cef7e745b0 | [
"Unlicense"
] | null | null | null | import { Component, OnInit } from '@angular/core';
import { RepoService } from '../repo.service';
import { Repo } from '../classes/repo';
@Component({
selector: 'app-repo',
templateUrl: './repo.component.html',
styleUrls: ['./repo.component.css'],
})
export class RepoComponent implements OnInit {
constructor(private repoService: RepoService) {}
repositories: Repo[];
repoName: any;
error: String;
searchRepo(repoName: any) {
console.log(this.repoName);
this.repoService.getRepo(repoName).subscribe((data: any) => {
console.log(data['items']);
this.repositories = data['items'];
});
}
ngOnInit(): void {}
}
| 26.16 | 65 | 0.66208 |
e8ec71dfe68f78e0bbd64c46510e470c4242fa2e | 1,228 | py | Python | aiphysim/models/spacetime.py | perovai/deepkoopman | eb6de915f5ea1f20b47cb3a22a384f55c30f0558 | [
"MIT"
] | null | null | null | aiphysim/models/spacetime.py | perovai/deepkoopman | eb6de915f5ea1f20b47cb3a22a384f55c30f0558 | [
"MIT"
] | 10 | 2021-07-07T09:24:33.000Z | 2021-09-27T14:32:59.000Z | aiphysim/models/spacetime.py | perovai/deepkoopman | eb6de915f5ea1f20b47cb3a22a384f55c30f0558 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class SpaceTime(nn.Module):
def __init__(self, opts):
# TODO: Add things like no. of hidden layers to opts
pass
class LSTM(nn.Module):
# This class is largely derived from
# https://stackabuse.com/time-series-prediction-using-lstm-with-pytorch-in-python on 20210701.
def __init__(self, input_size=2, hidden_layer_size=100, output_size=2):
# param input_size: number of components in input vector
# param output_size: number of components in output vector
# param hidden_layer_size: number of components in hidden layer
super().__init__()
self.hidden_layer_size = hidden_layer_size
self.lstm = nn.LSTM(input_size, hidden_layer_size)
self.linear = nn.Linear(hidden_layer_size, output_size)
self.hidden_cell = (
torch.zeros(1, 1, self.hidden_layer_size),
torch.zeros(1, 1, self.hidden_layer_size),
)
def forward(self, input_seq):
lstm_out, self.hidden_cell = self.lstm(
input_seq.view(len(input_seq), 1, -1), self.hidden_cell
)
predictions = self.linear(lstm_out.view(len(input_seq), -1))
return predictions[-1]
| 34.111111 | 98 | 0.666124 |
c1b9fe79b930cf89fb54101614eef2a6a6f38882 | 1,030 | rs | Rust | crates/rslint_rowan/src/lib.rs | antleblanc/rslint | bb92a25f1b88dd3e36202b0557098ae3dc4624eb | [
"MIT"
] | 1,225 | 2020-07-17T04:39:33.000Z | 2020-11-10T20:01:51.000Z | crates/rslint_rowan/src/lib.rs | antleblanc/rslint | bb92a25f1b88dd3e36202b0557098ae3dc4624eb | [
"MIT"
] | 62 | 2020-09-22T13:35:10.000Z | 2020-11-08T02:13:00.000Z | crates/rslint_rowan/src/lib.rs | antleblanc/rslint | bb92a25f1b88dd3e36202b0557098ae3dc4624eb | [
"MIT"
] | 38 | 2020-09-23T14:02:54.000Z | 2020-11-04T05:09:56.000Z | #![forbid(
// missing_debug_implementations,
unconditional_recursion,
future_incompatible,
// missing_docs,
)]
#![deny(unsafe_code)]
// this is ~~stolen~~ borrowed from servo_arc so a lot of this is just legacy code
#![allow(clippy::all, warnings, unsafe_code)]
mod arc;
#[allow(unsafe_code)]
pub mod cursor;
#[allow(unsafe_code)]
mod green;
pub mod api;
#[cfg(feature = "serde1")]
mod serde_impls;
mod syntax_text;
mod utility_types;
// Reexport types for working with strings. We might be too opinionated about
// these, as a custom interner might work better, but `SmolStr` is a pretty good
// default.
pub use smol_str::SmolStr;
pub use text_size::{TextLen, TextRange, TextSize};
pub use crate::{
api::{
Language, SyntaxElement, SyntaxElementChildren, SyntaxNode, SyntaxNodeChildren, SyntaxToken,
},
green::{Checkpoint, Children, GreenNode, GreenNodeBuilder, GreenToken, SyntaxKind},
syntax_text::SyntaxText,
utility_types::{Direction, NodeOrToken, TokenAtOffset, WalkEvent},
};
| 28.611111 | 100 | 0.731068 |
74ac573ebdfae9edd795bfe45eb433d0e8b26a7a | 6,710 | js | JavaScript | component---src-templates-project-js-5b5cfa01eb3e7f289936.js | ShirinStar/mjf-deploy | 7c3b10174144198c2bf5b450f9102c326eeb249c | [
"MIT"
] | null | null | null | component---src-templates-project-js-5b5cfa01eb3e7f289936.js | ShirinStar/mjf-deploy | 7c3b10174144198c2bf5b450f9102c326eeb249c | [
"MIT"
] | null | null | null | component---src-templates-project-js-5b5cfa01eb3e7f289936.js | ShirinStar/mjf-deploy | 7c3b10174144198c2bf5b450f9102c326eeb249c | [
"MIT"
] | null | null | null | (window.webpackJsonp=window.webpackJsonp||[]).push([[15],{b6WY:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var a=r("q1tI"),n=r.n(a);function i(e){return e.indexOf("?")>-1?e.split("?")[0]:e.indexOf("/")>-1?e.split("/")[0]:e.indexOf("&")>-1?e.split("&")[0]:e}function l(e){var t=e;t=t.replace(/#t=.*$/,"");var r=/youtube:\/\/|https?:\/\/youtu\.be\/|http:\/\/y2u\.be\//g;if(r.test(t))return i(t.split(r)[1]);var a=/\/v\/|\/vi\//g;if(a.test(t))return i(t.split(a)[1]);var n=/v=|vi=/g;if(n.test(t))return i(t.split(n)[1].split("&")[0]);var l=/\/an_webp\//g;if(l.test(t))return i(t.split(l)[1]);var s=/\/embed\//g;if(s.test(t))return i(t.split(s)[1]);if(!/\/user\/([a-zA-Z0-9]*)$/g.test(t)){if(/\/user\/(?!.*videos)/g.test(t))return i(t.split("/").pop());var c=/\/attribution_link\?.*v%3D([^%&]*)(%26|&|$)/;return c.test(t)?i(t.match(c)[1]):void 0}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],a=!0,n=!1,i=void 0;try{for(var l,s=e[Symbol.iterator]();!(a=(l=s.next()).done)&&(r.push(l.value),!t||r.length!==t);a=!0);}catch(c){n=!0,i=c}finally{try{a||null==s.return||s.return()}finally{if(n)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function o(e){var t,r,a=e;if(a.indexOf("#")>-1){var n=a.split("#");a=s(n,1)[0]}if(a.indexOf("?")>-1&&-1===a.indexOf("clip_id=")){var i=a.split("?");a=s(i,1)[0]}var l=/https?:\/\/vimeo\.com\/([0-9]+)/.exec(a);if(l&&l[1])return l[1];var c=["https?://player.vimeo.com/video/[0-9]+$","https?://vimeo.com/channels","groups","album"].join("|");if(new RegExp(c,"gim").test(a))(r=a.split("/"))&&r.length&&(t=r.pop());else if(/clip_id=/gim.test(a)){if((r=a.split("clip_id="))&&r.length)t=s(r[1].split("&"),1)[0]}return t}function m(e){var t=/https:\/\/vine\.co\/v\/([a-zA-Z0-9]*)\/?/.exec(e);return t&&t[1]}function u(e){var t;if(e.indexOf("embed")>-1)return t=/embed\/(\w{8})/,e.match(t)[1];t=/\/v\/(\w{8})/;var r=e.match(t);return r&&r.length>0?e.match(t)[1]:void 0}function f(e){var t=(e.indexOf("embed")>-1?/https:\/\/web\.microsoftstream\.com\/embed\/video\/([a-zA-Z0-9-]*)\/?/:/https:\/\/web\.microsoftstream\.com\/video\/([a-zA-Z0-9-]*)\/?/).exec(e);return t&&t[1]}var v=function(e){if("string"!=typeof e)throw new TypeError("get-video-id expects a string");var t=e;/<iframe/gi.test(t)&&(t=function(e){if("string"!=typeof e)throw new TypeError("get-src expected a string");var t=/src="(.*?)"/gm.exec(e);if(t&&t.length>=2)return t[1]}(t)),t=(t=(t=t.trim()).replace("-nocookie","")).replace("/www.","/");var r={id:null,service:null};if(/\/\/google/.test(t)){var a=t.match(/url=([^&]+)&/);a&&(t=decodeURIComponent(a[1]))}return/youtube|youtu\.be|y2u\.be|i.ytimg\./.test(t)?r={id:l(t),service:"youtube"}:/vimeo/.test(t)?r={id:o(t),service:"vimeo"}:/vine/.test(t)?r={id:m(t),service:"vine"}:/videopress/.test(t)?r={id:u(t),service:"videopress"}:/microsoftstream/.test(t)&&(r={id:f(t),service:"microsoftstream"}),r};function p(e){var t=e.link,r=v(t).id,a=v(t).service,i="https://player.vimeo.com/video/"+r,l="https://www.youtube.com/embed/"+r,s={padding:"56.25% 0 0 0",position:"relative"},c={position:"absolute",top:0,left:0,width:"100%",height:"100%"};return n.a.createElement(n.a.Fragment,null,"vimeo"===a?n.a.createElement("div",{style:s},n.a.createElement("iframe",{src:i,style:c,frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0})):"","youtube"===a?n.a.createElement("div",{style:s},n.a.createElement("iframe",{src:l,style:c,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})):"")}},vsJa:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return u}));var a=r("q1tI"),n=r.n(a),i=r("Wbzz"),l=r("osSN"),s=r.n(l),c=r("b6WY"),o=r("xuSx"),m={marks:{link:function(e){var t=e.children,r=e.mark;return r.blank?n.a.createElement("a",{className:"bodyTextLinks",href:r.href,target:"_blank",rel:"noopener noreferrer"},t):n.a.createElement("a",{className:"bodyTextLinks",href:r.href},t)}}};function u(e){var t=e.data,r=e.setEventTrigger,l=e.eventTrigger,u=t.project;return Object(a.useEffect)((function(){r(l+1)}),[]),n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"container"},n.a.createElement("div",{className:"wrapper"},n.a.createElement("div",{className:"backToProjects"},n.a.createElement(i.a,{className:"backText",to:"/projects"},"Back")),n.a.createElement("div",{className:"projectHead"},n.a.createElement("h2",{className:"pageTitle singleProject"},u.name),n.a.createElement("p",{className:"projectYear"},u.year)),null===u.videoLink?"":n.a.createElement("div",{className:"videoDiv singleProject"},n.a.createElement(c.a,{link:u.videoLink})),n.a.createElement("div",{className:"descriptionDiv"},n.a.createElement(s.a,{blocks:u._rawBodyPortableText,serializers:m})),null!==u._rawFeaturePortableText?n.a.createElement("div",{className:"featureDiv"},n.a.createElement("p",{className:"featureP"},"Featured: "),n.a.createElement(s.a,{blocks:u._rawFeaturePortableText,serializers:m})):"",n.a.createElement("div",{className:"imagesContainer"},null==u.BHSimage1&&null==u.BHSimage2&&null==u.BHSimage3&&null==u.BHSimage4?"":n.a.createElement(n.a.Fragment,null,n.a.createElement("h2",{className:"BHSTitle"},"Behind The Scene"),n.a.createElement("div",{className:"imageBHSGallery"},null==u.BHSimage1?"":n.a.createElement("img",{className:"BHSimage",src:u.BHSimage1.asset.url,alt:"BHS1"}),null==u.BHSimage2?" ":n.a.createElement("img",{className:"BHSimage",src:u.BHSimage2.asset.url,alt:"BHS2"}),null==u.BHSimage3?"":n.a.createElement("img",{className:"BHSimage",src:u.BHSimage3.asset.url,alt:"BHS3"}),null==u.BHSimage4?" ":n.a.createElement("img",{className:"BHSimage",src:u.BHSimage4.asset.url,alt:"BHS4"})))))),n.a.createElement(o.a,null))}},xuSx:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var a=r("q1tI"),n=r.n(a);function i(){return n.a.createElement("div",{className:"footer footerNot"},n.a.createElement("p",{className:"footerText"},"© MJF ",(new Date).getFullYear()))}}}]);
//# sourceMappingURL=component---src-templates-project-js-5b5cfa01eb3e7f289936.js.map | 3,355 | 6,624 | 0.661699 |
e97fe592c08e13846e4679da462d233d4f843305 | 1,357 | rb | Ruby | lib/simple_map_reduce.rb | serihiro/simple_map_reduce | 14c66254aa51ef4d8fbe7991b55569243c7db80c | [
"MIT"
] | 3 | 2018-04-23T23:05:14.000Z | 2021-11-09T09:29:56.000Z | lib/simple_map_reduce.rb | serihiro/simple_map_reduce | 14c66254aa51ef4d8fbe7991b55569243c7db80c | [
"MIT"
] | 16 | 2018-01-09T00:09:20.000Z | 2022-02-04T00:22:15.000Z | lib/simple_map_reduce.rb | serihiro/simple_map_reduce | 14c66254aa51ef4d8fbe7991b55569243c7db80c | [
"MIT"
] | null | null | null | # frozen_string_literal: true
require 'rasteira'
require 'faraday'
module SimpleMapReduce
class << self
# see https://github.com/aws/aws-sdk-ruby/blob/v2.10.100/aws-sdk-resources/lib/aws-sdk-resources/services/s3/encryption/client.rb#L182-L219
# for detail of s3_config
attr_accessor :s3_config
attr_accessor :job_tracker_url
attr_accessor :job_worker_url
attr_accessor :s3_input_bucket_name
attr_accessor :s3_output_bucket_name
attr_accessor :s3_intermediate_bucket_name
attr_accessor :logger
end
end
require 'simple_map_reduce/version'
require 'simple_map_reduce/s3_client'
require 'simple_map_reduce/data_stores/default_data_store'
require 'simple_map_reduce/data_stores/remote_data_store'
require 'simple_map_reduce/data_store_factory'
require 'simple_map_reduce/driver/config'
require 'simple_map_reduce/driver/job'
require 'simple_map_reduce/server/confg'
require 'simple_map_reduce/server/job'
require 'simple_map_reduce/server/task'
require 'simple_map_reduce/server/worker'
require 'simple_map_reduce/server/job_tracker'
require 'simple_map_reduce/server/job_worker'
require 'simple_map_reduce/worker/register_map_task_worker'
require 'simple_map_reduce/worker/run_map_task_worker'
require 'simple_map_reduce/worker/run_reduce_task_worker'
require 'simple_map_reduce/worker/polling_workers_status_worker'
| 36.675676 | 143 | 0.837141 |
1608d0a358770dda5d583c4664dca92e8bb1da53 | 5,275 | ts | TypeScript | src/app.ts | jchartrand/sign-and-verify | 42af43312b861a8654479386cdb1177b1c69a7f6 | [
"MIT"
] | null | null | null | src/app.ts | jchartrand/sign-and-verify | 42af43312b861a8654479386cdb1177b1c69a7f6 | [
"MIT"
] | null | null | null | src/app.ts | jchartrand/sign-and-verify | 42af43312b861a8654479386cdb1177b1c69a7f6 | [
"MIT"
] | null | null | null | import fastify from 'fastify';
import fastifyRawBody from 'fastify-raw-body';
import fastifySensible from "fastify-sensible"
import { createIssuer } from '@digitalcredentials/sign-and-verify-core'
import { getConfig } from "./config";
import { verifyRequestDigest, verifyRequestSignature } from './hooks';
export function build(opts = {}) {
const { unlockedDid } = getConfig();
const { sign, verify, createAndSignPresentation, signPresentation, verifyPresentation, requestDemoCredential } = createIssuer(unlockedDid);
const server = fastify({
logger: true
});
server.register(require('fastify-cors'), {});
server.register(require('fastify-swagger'), {
routePrefix: '/docs',
mode: 'static',
specification: {
path: __dirname + '/vc-http-api-0.0.0.yaml'
},
exposeRoute: true
});
server.register(fastifySensible);
server.register(fastifyRawBody, {
global: false, // don't add the rawBody to every request.
runFirst: true // get the body before any preParsing hook change/uncompress it.
});
server.setErrorHandler(function (error, request, reply) {
//request.log.error(error);
reply
.code(500)
.header('Content-Type', 'application/json; charset=utf-8')
.send(error);
});
server.get('/status', async (request, reply) => {
reply
.code(200)
.header('Content-Type', 'application/json; charset=utf-8')
.send({ status: 'OK' });
});
server.post(
'/issue/credentials',
{
config: {
rawBody: true,
},
preValidation: [
verifyRequestDigest,
verifyRequestSignature
]
},
async (request, reply) => {
const req: any = request.body;
const credential = req.credential;
const options = req.options;
const result = await sign(credential, options);
reply
.code(201)
.header('Content-Type', 'application/json; charset=utf-8')
.send(result);
}
)
server.post(
'/prove/presentations', async (request, reply) => {
const req: any = request.body;
const credential = req.presentation;
const options = req.options;
const result = await signPresentation(credential, options);
reply
.code(201)
.header('Content-Type', 'application/json; charset=utf-8')
.send(result);
}
)
server.post(
'/verify/credentials', async (request, reply) => {
const req: any = request.body;
const verifiableCredential = req.verifiableCredential;
const options = req.options;
const result = await verify(verifiableCredential, options);
reply
.code(200)
.header('Content-Type', 'application/json; charset=utf-8')
.send(result);
}
)
server.post(
'/request/democredential/nodidproof', async (request, reply) => {
const requestInfo = request.body;
const result = await requestDemoCredential(requestInfo, true);
reply
.code(201)
.header('Content-Type', 'application/json; charset=utf-8')
.send(result);
}
)
server.post(
'/request/democredential', async (request, reply) => {
const requestInfo = request.body;
const result = await requestDemoCredential(requestInfo);
reply
.code(201)
.header('Content-Type', 'application/json; charset=utf-8')
.send(result);
}
)
server.post(
'/verify/presentations', async (request, reply) => {
const requestInfo: any = request.body;
const verifiablePresentation = requestInfo.verifiablePresentation;
const options = requestInfo.options;
const verificationResult = await verifyPresentation(verifiablePresentation, options);
if (verificationResult.verified) {
reply
.code(200)
.header('Content-Type', 'application/json; charset=utf-8')
.send({
// note: holder is not part of the vc-http-api standard
holder: verifiablePresentation.holder
});
} else {
reply
.code(500)
.send({ message: 'Could not validate DID', error: verificationResult });
}
}
)
server.post(
'/generate/controlproof', async (request, reply) => {
const req: any = request.body;
const { presentationId, holder, ...options } = req;
const result = await createAndSignPresentation(null, presentationId, holder, options);
reply
.code(201)
.header('Content-Type', 'application/json; charset=utf-8')
.send(result);
}
)
return server
} | 32.164634 | 143 | 0.54218 |
74ce503eeb60a35ffea5fec41e77ee96c0898c47 | 908 | js | JavaScript | frontend/utils/view.js | Deguang/qsd | 19cf3f9d06129441be7881b2046b25a646ef75c6 | [
"MIT"
] | null | null | null | frontend/utils/view.js | Deguang/qsd | 19cf3f9d06129441be7881b2046b25a646ef75c6 | [
"MIT"
] | null | null | null | frontend/utils/view.js | Deguang/qsd | 19cf3f9d06129441be7881b2046b25a646ef75c6 | [
"MIT"
] | null | null | null | const nunjucks = require('nunjucks');
const path = require('path');
const createEnv = (path, opts) => {
var autoescape = opts.autoescape && true,
noCache = opts.noCache || false,
watch = opts.watch || false,
throwOnUndefined = opts.throwOnUndefined || false,
env = new nunjucks.Environment(
new nunjucks.FileSystemLoader(path, {
noCache,
watch
}), {
autoescape,
throwOnUndefined
}
);
if(opts.filters) {
for(var f in opts.filters) {
env.addFilter(f, opts.filters[f]);
}
}
return env;
}
console.log(path.join(__dirname , '../'))
var env = createEnv(path.join(__dirname, '../'), {
watch: true,
filters: {
hex: function (n) {
return '0x' + n.toString(16);
}
}
});
module.exports = env; | 25.222222 | 58 | 0.514317 |
9068110b871ef78d44b76a99ad3e628595b08ece | 394 | py | Python | tools/tools.py | zhengyangb/NLU2019 | 690ad35e8028d6547ca1d5f71641fb02c377369c | [
"BSD-3-Clause"
] | null | null | null | tools/tools.py | zhengyangb/NLU2019 | 690ad35e8028d6547ca1d5f71641fb02c377369c | [
"BSD-3-Clause"
] | null | null | null | tools/tools.py | zhengyangb/NLU2019 | 690ad35e8028d6547ca1d5f71641fb02c377369c | [
"BSD-3-Clause"
] | null | null | null | import datetime as dt
import logging
import time
import os
def date_hash():
return dt.datetime.now().strftime('%y%m%d%H%M') + str(hash(time.time()))[:4]
def print_log(fname, content):
logging.basicConfig(filename=os.path.join(fname + '.log'), level=logging.ERROR)
logger = logging.getLogger('model')
logger.setLevel(logging.INFO)
print(content)
logger.info(content)
| 23.176471 | 83 | 0.69797 |
c39f5c02e70b0f41faf27de89166baf19d6bc731 | 1,970 | swift | Swift | test/SourceKit/DocSupport/Inputs/main.swift | ghostbar/swift-lang.deb | b1a887edd9178a0049a0ef839c4419142781f7a0 | [
"Apache-2.0"
] | 10 | 2015-12-25T02:19:46.000Z | 2021-11-14T15:37:57.000Z | test/SourceKit/DocSupport/Inputs/main.swift | ghostbar/swift-lang.deb | b1a887edd9178a0049a0ef839c4419142781f7a0 | [
"Apache-2.0"
] | 2 | 2016-02-01T08:51:00.000Z | 2017-04-07T09:04:30.000Z | test/SourceKit/DocSupport/Inputs/main.swift | ghostbar/swift-lang.deb | b1a887edd9178a0049a0ef839c4419142781f7a0 | [
"Apache-2.0"
] | 3 | 2016-04-02T15:05:27.000Z | 2019-08-19T15:25:02.000Z | var globV: Int
class CC0 {
var x: Int = 0
}
class CC {
var instV: CC0
func meth() {}
func instanceFunc0(a: Int, b: Float) -> Int {
return 0
}
func instanceFunc1(a x: Int, b y: Float) -> Int {
return 0
}
class func smeth() {}
init() {
instV = CC0()
}
}
func +(a : CC, b: CC0) -> CC {
return a
}
struct S {
func meth() {}
static func smeth() {}
}
enum E {
case EElem
}
protocol Prot {
func protMeth(a: Prot)
}
func foo(a: CC, b: E) {
var b = b
_ = b
globV = 0
a + a.instV
a.meth()
CC.smeth()
b = E.EElem
var _: CC
class LocalCC {}
var _: LocalCC
}
typealias CCAlias = CC
extension CC : Prot {
func meth2(x: CCAlias) {}
func protMeth(a: Prot) {}
var extV : Int { return 0 }
}
class SubCC : CC {}
var globV2: SubCC
class ComputedProperty {
var value : Int {
get {
let result = 0
return result
}
set(newVal) {
// completely ignore it!
}
}
var readOnly : Int { return 0 }
}
class BC2 {
func protMeth(a: Prot) {}
}
class SubC2 : BC2, Prot {
override func protMeth(a: Prot) {}
}
class CC2 {
subscript (i : Int) -> Int {
get {
return i
}
set(vvv) {
vvv+1
}
}
}
func test1(cp: ComputedProperty, sub: CC2) {
var x = cp.value
x = cp.readOnly
cp.value = x
cp.value += 1
x = sub[0]
sub[0] = x
sub[0] += 1
}
struct S2 {
func sfoo() {}
}
var globReadOnly : S2 {
get {
return S2();
}
}
func test2() {
globReadOnly.sfoo()
}
class B1 {
func foo() {}
}
class SB1 : B1 {
override func foo() {
foo()
self.foo()
super.foo()
}
}
func test3(c: SB1, s: S2) {
test2()
c.foo()
s.sfoo()
}
func test4(inout a: Int) {}
protocol Prot2 {
associatedtype Element
var p : Int { get }
func foo()
}
struct S1 : Prot2 {
typealias Element = Int
var p : Int = 0
func foo() {}
}
func genfoo<T : Prot2 where T.Element == Int>(x: T) {}
protocol Prot3 {
func +(x: Self, y: Self)
}
| 12.628205 | 54 | 0.54467 |
985171101d702ed847358bfa60bb085b4e3d3bdf | 426 | kt | Kotlin | app/src/main/java/com/mysugr/android/testing/example/net/Exceptions.kt | sweetest-framework/sweetest | 534c74fdd6e3fc452ca87a5b287dbcd319caf28e | [
"Apache-2.0"
] | 13 | 2018-09-21T14:51:54.000Z | 2020-02-21T12:47:50.000Z | app/src/main/java/com/mysugr/android/testing/example/net/Exceptions.kt | mysugr/sweetest | 534c74fdd6e3fc452ca87a5b287dbcd319caf28e | [
"Apache-2.0"
] | 16 | 2018-09-15T15:40:56.000Z | 2020-05-18T12:40:01.000Z | app/src/main/java/com/mysugr/android/testing/example/net/Exceptions.kt | mysugr/sweetest | 534c74fdd6e3fc452ca87a5b287dbcd319caf28e | [
"Apache-2.0"
] | null | null | null | package com.mysugr.android.testing.example.net
class UsernameOrPasswordWrongException : Exception()
class NotLoggedInException : Exception("User is not logged in (any more) on the backend")
class UserDoesNotExistException : Exception("User does not exist on the backend")
class UserAlreadyExistsException : Exception("User already exists on the backend")
class UnknownAuthTokenException : Exception("Unknown auth token")
| 35.5 | 89 | 0.814554 |
75a4e3798d16a09549a718e5bf62db6cb353c690 | 333 | h | C | HQLTableViewDemo/HQLTableViewDemo/HQLMeHeaderView.h | lcf15980849273/CYLTaBarDemo | 09e189139c54ff2680ed18ea5c8588716cd7e528 | [
"MIT"
] | 1 | 2021-06-17T10:29:04.000Z | 2021-06-17T10:29:04.000Z | HQLTableViewDemo/HQLTableViewDemo/HQLMeHeaderView.h | lcf15980849273/CYLTaBarDemo | 09e189139c54ff2680ed18ea5c8588716cd7e528 | [
"MIT"
] | null | null | null | HQLTableViewDemo/HQLTableViewDemo/HQLMeHeaderView.h | lcf15980849273/CYLTaBarDemo | 09e189139c54ff2680ed18ea5c8588716cd7e528 | [
"MIT"
] | null | null | null | //
// HQLMeHeaderView.h
// HQLTableViewDemo
//
// Created by Qilin Hu on 2019/10/24.
// Copyright © 2019 ToninTech. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface HQLMeHeaderView : UIView
// 更新约束
- (void)updateHeaderImageViewFrameWithOffsetY:(CGFloat)offsetY;
@end
NS_ASSUME_NONNULL_END
| 15.857143 | 63 | 0.750751 |
6b893ecee1c08edf91ac22b8653d5143e219cc04 | 6,853 | c | C | Source/cct.c | Acknex/TUST | d6f24d89b5a58492c0c032856f1ff6b00c0a4371 | [
"Zlib"
] | null | null | null | Source/cct.c | Acknex/TUST | d6f24d89b5a58492c0c032856f1ff6b00c0a4371 | [
"Zlib"
] | null | null | null | Source/cct.c | Acknex/TUST | d6f24d89b5a58492c0c032856f1ff6b00c0a4371 | [
"Zlib"
] | 1 | 2021-02-21T23:24:16.000Z | 2021-02-21T23:24:16.000Z | // include cct template:
#include "cct.h"
// check for the collisions of the cct (f.e. if we are trying to stand up from crawling):
function cct_check_collision(ENTITY* actor, var cct_max_x, var cct_min_x, var cct_max_z, var cct_min_z)
{
// vectors:
VECTOR vStart, vEnd;
// free vectors:
vec_fill(vStart.x, 0);
vec_fill(vEnd.x, 0);
// get the radius:
var vRadius = (cct_max_x + cct_min_x) * 0.5;
// defile start position to check:
vec_set(vStart, vector(0, 0, cct_max_z));
vec_add(vStart, actor.x);
// defile end position to check:
vec_set(vEnd, vector(0, 0, cct_min_z));
vec_add(vEnd, actor.x);
// check for collusion:
if(pX3_capsulecheckany(vStart, vEnd, vRadius, 0, 0, NULL, PX_IGNORE_ME))
{
// return 1:
return 1;
}
// return 0:
return 0;
}
// linear friction of movement (should be below 1):
var cctGroundFriction = 0.8;
// gravity force:
var cctGravity = -5.5;
// jumping switch:
void cct_go_crawl(CCT *cct)
{
// if we press ctrl:
if(cct->input[CCT_CRAWL])
{
// if we need to change the size:
if(cct->physBody->scale_z > cct->crawlSize.z)
{
// change the visual capsule size:
vec_set(&cct->physBody->scale_x, &cct->crawlSize);
// change the size of the cct to crawl:
pX3ent_resizechar(cct->physBody, 0);
// update bbox:
c_setminmax(cct->physBody);
}
// we are crawling:
cct->crawlOn = 1;
}
else
{
if(cct->crawlOn)
{
// and there is no celling above the head (20 - are min/max_x and 40 - are min/max_z values):
if(cct_check_collision(cct->physBody, 20, 20, 40, 40) == 0)
{
cct->crawlOn = 0;
}
}
if(!cct->crawlOn)
{
// if we need to change the size:
if(cct->physBody->scale_z < cct->standSize.z)
{
// change the visual capsule size:
vec_set(&cct->physBody->scale_x, &cct->standSize);
// change the size of the cct to crawl:
pX3ent_resizechar(cct->physBody, 40);
// update bbox:
c_setminmax(cct->physBody);
// we are not crawling:
cct->crawlOn = 0;
}
}
}
}
void cct_set_input(CCT *cct, int inputID, var value)
{
if(cct == NULL) return;
if(inputID < 0 || inputID > 4) return;
cct->input[inputID] = value;
}
void cct_enable_physbody(CCT *cct)
{
// wait one frame:
wait(1);
// set both collision flags:
cct->physBody->eflags |= FAT | NARROW;
// set bounding box to individual values:
vec_set(cct->physBody->min_x, vector(-cct->boundingBox.x, -cct->boundingBox.y, -cct->boundingBox.z * 0.5));
vec_set(cct->physBody->max_x, vector(cct->boundingBox.x, cct->boundingBox.y, cct->boundingBox.z * 0.5));
// register the cct:
pX3ent_settype(cct->physBody, PH_CHAR, PH_CAPSULE);
// set group id:
pX3ent_setgroup(cct->physBody, 3);
cct->physBody->group = 3;
}
CCT *cct_create(VECTOR *spawnPoint, VECTOR *boundingBox)
{
CCT *cct = sys_nxalloc(sizeof(CCT));
cct->crawlSpeed = 0.3;
cct->walkSpeed = 0.6;
cct->runSpeed = 1.0;
cct->baseSpeed = 15;
cct->jumpForce = 25;
vec_set(&cct->boundingBox, boundingBox);
cct->physBody = ent_create(CUBE_MDL, spawnPoint, NULL);
cct->physBody->flags = INVISIBLE | PASSABLE;
// standing and crouching size's of cct:
var cct_radius = cct->boundingBox.x;
// setup scale vectors:
vec_set(&cct->standSize, vector(cct_radius / cct->physBody->max_x, cct_radius / cct->physBody->max_x, 0.5 * cct->boundingBox.z / cct->physBody->max_z));
vec_set(&cct->crawlSize, vector(cct_radius / cct->physBody->max_x, cct_radius / cct->physBody->max_x, 0.5 * 0.6 * cct->boundingBox.z / cct->physBody->max_z));
// scale the bbox:
vec_set(cct->physBody->scale_x, &cct->standSize);
cct_enable_physbody(cct);
return cct;
}
void cct_update(CCT *cct)
{
// handle crawling:
cct_go_crawl(cct);
// get input:
cct->force.x = cct->baseSpeed * cct->input[CCT_FORWARD];
cct->force.y = cct->baseSpeed * cct->input[CCT_SIDEWARD];
// if pressed space key (and switch is set to - zero):
if(cct->input[CCT_JUMP] && cct->jump_time == 0)
{
// and if we are on the ground:
if(pX3ent_ischargrounded(cct->physBody))
{
// then jump:
cct->force.z = cct->jumpForce;
// jumping switch on:
cct->jump_time = 1;
cct->state = CCT_JUMPING; // Enter jumping state
}
}
// if we release the space key:
if(!cct->input[CCT_JUMP])
{
// if we need to reset the jump switch:
if(cct->jump_time)
{
// reset it:
cct->jump_time = 0;
}
}
// If we are jumping and standing on the ground and don't go upwards,
if(cct->state == CCT_JUMPING && pX3ent_ischargrounded(cct->physBody) && cct->force.z <= 0)
{
// then reset to standing, because we landed.
cct->state = CCT_STANDING;
}
// if movement speed is more that allowed movement speed:
if(vec_length(vector(cct->force.x, cct->force.y, 0)) > 15)
{
// lower it till defined movement speed (depending on state machine):
var len = sqrt(cct->force.x * cct->force.x + cct->force.y * cct->force.y);
cct->force.x *= 15 / len;
cct->force.y *= 15 / len;
}
// if we are crawling:
if(cct->crawlOn)
{
// then crawl:
cct->force.x *= cct->crawlSpeed;
cct->force.y *= cct->crawlSpeed;
}
else
{
// if we press the shift key:
if(cct->input[CCT_SPRINT])
{
// walk, if not pressing shift key:
cct->force.x *= cct->runSpeed;
cct->force.y *= cct->runSpeed;
}
else
{
// then run:
cct->force.x *= cct->walkSpeed;
cct->force.y *= cct->walkSpeed;
}
}
vec_rotate(&cct->force, vector(cct->rotation, 0, 0));
// accelerate forces:
accelerate(&cct->dist.x, cct->force.x * time_step, cctGroundFriction);
accelerate(&cct->dist.y, cct->force.y * time_step, cctGroundFriction);
// reset relative Z movement:
&cct->dist.z = 0;
// move cct:
int moveFlag = pX3ent_move(cct->physBody, &cct->dist, vector(0, 0, cct->force.z * time_step));
// gravity (if we are in air):
if(!pX3ent_ischargrounded(cct->physBody))
{
// accelerate downwards:
cct->force.z += cctGravity * time_step;
// limit acceleration:
cct->force.z = maxv(cct->force.z, -100);
// if cct collided with celling:
if(moveFlag & PX_CCT_COLLISION_UP)
{
// reset jumping:
cct->force.z = cctGravity;
}
}
else
{
// we are on ground:
cct->force.z = cctGravity;
}
// Switch state if we are NOT jumping
if(cct->state != CCT_JUMPING)
{
if(vec_length(&cct->dist) < 0.5)
{
if(cct->crawlOn)
cct->state = CCT_CROUCHING;
else
cct->state = CCT_STANDING;
}
else
{
if(cct->crawlOn)
cct->state = CCT_CRAWLING;
else if(cct->input[CCT_SPRINT])
cct->state = CCT_RUNNING;
else
cct->state = CCT_WALKING;
}
}
}
void cct_get_position(CCT *cct, VECTOR *position)
{
if(cct == NULL || position == NULL) return;
vec_set(position, &cct->physBody->x);
}
void cct_set_rotation(CCT *cct, var rotation)
{
if(cct == NULL) return;
cct->rotation = rotation;
}
int cct_get_state(CCT *cct)
{
if(cct == NULL) return -1;
return cct->state;
} | 25.010949 | 159 | 0.651248 |
00fff28bb8554680a5525c44e387e25046fc39c3 | 3,901 | swift | Swift | Sources/Wallet/EtherWallet+Account.swift | impul/EtherWalletKit | 5bf5206e96b38c4966ab2b17751833facaa42149 | [
"MIT"
] | null | null | null | Sources/Wallet/EtherWallet+Account.swift | impul/EtherWalletKit | 5bf5206e96b38c4966ab2b17751833facaa42149 | [
"MIT"
] | null | null | null | Sources/Wallet/EtherWallet+Account.swift | impul/EtherWalletKit | 5bf5206e96b38c4966ab2b17751833facaa42149 | [
"MIT"
] | null | null | null | import web3swift
public protocol AccountService {
var hasAccount: Bool { get }
var address: String? { get }
func privateKey(password: String) throws -> String
func verifyPassword(_ password: String) -> Bool
func generateAccount(password: String) throws
func importAccount(privateKey: String, password: String) throws
}
extension EtherWallet: AccountService {
public var hasAccount: Bool {
return (try? loadKeystore()) != nil
}
public var address: String? {
guard let keystore = try? loadKeystore() else { return nil }
return keystore.getAddress()?.address
}
public func privateKey(password: String) throws -> String {
let keystore = try loadKeystore()
guard let address = keystore.getAddress()?.address else {
throw WalletError.malformedKeystore
}
guard let ethereumAddress = EthereumAddress(address) else {
throw WalletError.invalidAddress
}
let privateKeyData = try keystore.UNSAFE_getPrivateKeyData(password: password, account: ethereumAddress)
return privateKeyData.toHexString()
}
public func verifyPassword(_ password: String) -> Bool {
return (try? privateKey(password: password)) != nil
}
public func generateAccount(password: String) throws {
guard let keystore = try EthereumKeystoreV3(password: password) else {
throw WalletError.malformedKeystore
}
try saveKeystore(keystore)
}
public func importAccount(privateKey: String, password: String) throws {
guard let privateKeyData = Data.fromHex(privateKey) else {
throw WalletError.invalidKey
}
guard let keystore = try EthereumKeystoreV3(privateKey: privateKeyData, password: password) else {
throw WalletError.malformedKeystore
}
try saveKeystore(keystore)
}
private func saveKeystore(_ keystore: EthereumKeystoreV3) throws {
keystoreCache = keystore
guard let userDir = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first else {
throw WalletError.invalidPath
}
guard let keystoreParams = keystore.keystoreParams else {
throw WalletError.malformedKeystore
}
guard let keystoreData = try? JSONEncoder().encode(keystoreParams) else {
throw WalletError.malformedKeystore
}
if !FileManager.default.fileExists(atPath: userDir + keystoreDirectoryName) {
do {
try FileManager.default.createDirectory(atPath: userDir + keystoreDirectoryName, withIntermediateDirectories: true, attributes: nil)
} catch {
throw WalletError.invalidPath
}
}
FileManager.default.createFile(atPath: userDir + keystoreDirectoryName + keystoreFileName, contents: keystoreData, attributes: nil)
setupOptionsFrom()
}
func loadKeystore() throws -> EthereumKeystoreV3 {
if let keystore = keystoreCache {
return keystore
}
guard let userDir = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first else {
throw WalletError.invalidPath
}
guard let keystoreManager = KeystoreManager.managerForPath(userDir + keystoreDirectoryName) else {
throw WalletError.malformedKeystore
}
guard let address = keystoreManager.addresses?.first else {
throw WalletError.malformedKeystore
}
guard let keystore = keystoreManager.walletForAddress(address) as? EthereumKeystoreV3 else {
throw WalletError.malformedKeystore
}
keystoreCache = keystore
return keystore
}
}
| 36.801887 | 148 | 0.651115 |
95b480916f5546bb6937dd41c17ec4d075ce9140 | 99,757 | html | HTML | html/PKPDDataAnalysisBook/PK/pk52.html | PumasAI/PumasTutorials.jl | 81b17ca90e5f5e308035332f96427ab511468f05 | [
"MIT"
] | 42 | 2019-07-20T01:15:20.000Z | 2022-03-04T08:20:19.000Z | html/PKPDDataAnalysisBook/PK/pk52.html | noilreed/PumasTutorials.jl | 52dc68dc5d303310a79cd24f3bf7dfd66f57053a | [
"MIT"
] | 53 | 2019-07-20T01:29:50.000Z | 2022-03-08T12:08:22.000Z | html/PKPDDataAnalysisBook/PK/pk52.html | noilreed/PumasTutorials.jl | 52dc68dc5d303310a79cd24f3bf7dfd66f57053a | [
"MIT"
] | 20 | 2019-07-22T18:56:52.000Z | 2022-02-23T00:38:37.000Z | <!DOCTYPE html>
<HTML lang = "en">
<HEAD>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Exercise PK52 - Simulated impact of disease on r-hSOD kinetics</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
</script>
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<style>
pre.hljl {
border: 1px solid #ccc;
margin: 5px;
padding: 5px;
overflow-x: auto;
color: rgb(68,68,68); background-color: rgb(251,251,251); }
pre.hljl > span.hljl-t { }
pre.hljl > span.hljl-w { }
pre.hljl > span.hljl-e { }
pre.hljl > span.hljl-eB { }
pre.hljl > span.hljl-o { }
pre.hljl > span.hljl-k { color: rgb(148,91,176); font-weight: bold; }
pre.hljl > span.hljl-kc { color: rgb(59,151,46); font-style: italic; }
pre.hljl > span.hljl-kd { color: rgb(214,102,97); font-style: italic; }
pre.hljl > span.hljl-kn { color: rgb(148,91,176); font-weight: bold; }
pre.hljl > span.hljl-kp { color: rgb(148,91,176); font-weight: bold; }
pre.hljl > span.hljl-kr { color: rgb(148,91,176); font-weight: bold; }
pre.hljl > span.hljl-kt { color: rgb(148,91,176); font-weight: bold; }
pre.hljl > span.hljl-n { }
pre.hljl > span.hljl-na { }
pre.hljl > span.hljl-nb { }
pre.hljl > span.hljl-nbp { }
pre.hljl > span.hljl-nc { }
pre.hljl > span.hljl-ncB { }
pre.hljl > span.hljl-nd { color: rgb(214,102,97); }
pre.hljl > span.hljl-ne { }
pre.hljl > span.hljl-neB { }
pre.hljl > span.hljl-nf { color: rgb(66,102,213); }
pre.hljl > span.hljl-nfm { color: rgb(66,102,213); }
pre.hljl > span.hljl-np { }
pre.hljl > span.hljl-nl { }
pre.hljl > span.hljl-nn { }
pre.hljl > span.hljl-no { }
pre.hljl > span.hljl-nt { }
pre.hljl > span.hljl-nv { }
pre.hljl > span.hljl-nvc { }
pre.hljl > span.hljl-nvg { }
pre.hljl > span.hljl-nvi { }
pre.hljl > span.hljl-nvm { }
pre.hljl > span.hljl-l { }
pre.hljl > span.hljl-ld { color: rgb(148,91,176); font-style: italic; }
pre.hljl > span.hljl-s { color: rgb(201,61,57); }
pre.hljl > span.hljl-sa { color: rgb(201,61,57); }
pre.hljl > span.hljl-sb { color: rgb(201,61,57); }
pre.hljl > span.hljl-sc { color: rgb(201,61,57); }
pre.hljl > span.hljl-sd { color: rgb(201,61,57); }
pre.hljl > span.hljl-sdB { color: rgb(201,61,57); }
pre.hljl > span.hljl-sdC { color: rgb(201,61,57); }
pre.hljl > span.hljl-se { color: rgb(59,151,46); }
pre.hljl > span.hljl-sh { color: rgb(201,61,57); }
pre.hljl > span.hljl-si { }
pre.hljl > span.hljl-so { color: rgb(201,61,57); }
pre.hljl > span.hljl-sr { color: rgb(201,61,57); }
pre.hljl > span.hljl-ss { color: rgb(201,61,57); }
pre.hljl > span.hljl-ssB { color: rgb(201,61,57); }
pre.hljl > span.hljl-nB { color: rgb(59,151,46); }
pre.hljl > span.hljl-nbB { color: rgb(59,151,46); }
pre.hljl > span.hljl-nfB { color: rgb(59,151,46); }
pre.hljl > span.hljl-nh { color: rgb(59,151,46); }
pre.hljl > span.hljl-ni { color: rgb(59,151,46); }
pre.hljl > span.hljl-nil { color: rgb(59,151,46); }
pre.hljl > span.hljl-noB { color: rgb(59,151,46); }
pre.hljl > span.hljl-oB { color: rgb(102,102,102); font-weight: bold; }
pre.hljl > span.hljl-ow { color: rgb(102,102,102); font-weight: bold; }
pre.hljl > span.hljl-p { }
pre.hljl > span.hljl-c { color: rgb(153,153,119); font-style: italic; }
pre.hljl > span.hljl-ch { color: rgb(153,153,119); font-style: italic; }
pre.hljl > span.hljl-cm { color: rgb(153,153,119); font-style: italic; }
pre.hljl > span.hljl-cp { color: rgb(153,153,119); font-style: italic; }
pre.hljl > span.hljl-cpB { color: rgb(153,153,119); font-style: italic; }
pre.hljl > span.hljl-cs { color: rgb(153,153,119); font-style: italic; }
pre.hljl > span.hljl-csB { color: rgb(153,153,119); font-style: italic; }
pre.hljl > span.hljl-g { }
pre.hljl > span.hljl-gd { }
pre.hljl > span.hljl-ge { }
pre.hljl > span.hljl-geB { }
pre.hljl > span.hljl-gh { }
pre.hljl > span.hljl-gi { }
pre.hljl > span.hljl-go { }
pre.hljl > span.hljl-gp { }
pre.hljl > span.hljl-gs { }
pre.hljl > span.hljl-gsB { }
pre.hljl > span.hljl-gt { }
</style>
<style type="text/css">
@font-face {
font-style: normal;
font-weight: 300;
}
@font-face {
font-style: normal;
font-weight: 400;
}
@font-face {
font-style: normal;
font-weight: 600;
}
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
font-family: monospace, monospace;
font-size : 0.8em;
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
thead th {
border-bottom: 1px solid black;
background-color: white;
}
tr:nth-child(odd){
background-color: rgb(248,248,248);
}
/*
* Skeleton V2.0.4
* Copyright 2014, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 12/29/2014
*/
.container {
position: relative;
width: 100%;
max-width: 960px;
margin: 0 auto;
padding: 0 20px;
box-sizing: border-box; }
.column,
.columns {
width: 100%;
float: left;
box-sizing: border-box; }
@media (min-width: 400px) {
.container {
width: 85%;
padding: 0; }
}
@media (min-width: 550px) {
.container {
width: 80%; }
.column,
.columns {
margin-left: 4%; }
.column:first-child,
.columns:first-child {
margin-left: 0; }
.one.column,
.one.columns { width: 4.66666666667%; }
.two.columns { width: 13.3333333333%; }
.three.columns { width: 22%; }
.four.columns { width: 30.6666666667%; }
.five.columns { width: 39.3333333333%; }
.six.columns { width: 48%; }
.seven.columns { width: 56.6666666667%; }
.eight.columns { width: 65.3333333333%; }
.nine.columns { width: 74.0%; }
.ten.columns { width: 82.6666666667%; }
.eleven.columns { width: 91.3333333333%; }
.twelve.columns { width: 100%; margin-left: 0; }
.one-third.column { width: 30.6666666667%; }
.two-thirds.column { width: 65.3333333333%; }
.one-half.column { width: 48%; }
/* Offsets */
.offset-by-one.column,
.offset-by-one.columns { margin-left: 8.66666666667%; }
.offset-by-two.column,
.offset-by-two.columns { margin-left: 17.3333333333%; }
.offset-by-three.column,
.offset-by-three.columns { margin-left: 26%; }
.offset-by-four.column,
.offset-by-four.columns { margin-left: 34.6666666667%; }
.offset-by-five.column,
.offset-by-five.columns { margin-left: 43.3333333333%; }
.offset-by-six.column,
.offset-by-six.columns { margin-left: 52%; }
.offset-by-seven.column,
.offset-by-seven.columns { margin-left: 60.6666666667%; }
.offset-by-eight.column,
.offset-by-eight.columns { margin-left: 69.3333333333%; }
.offset-by-nine.column,
.offset-by-nine.columns { margin-left: 78.0%; }
.offset-by-ten.column,
.offset-by-ten.columns { margin-left: 86.6666666667%; }
.offset-by-eleven.column,
.offset-by-eleven.columns { margin-left: 95.3333333333%; }
.offset-by-one-third.column,
.offset-by-one-third.columns { margin-left: 34.6666666667%; }
.offset-by-two-thirds.column,
.offset-by-two-thirds.columns { margin-left: 69.3333333333%; }
.offset-by-one-half.column,
.offset-by-one-half.columns { margin-left: 52%; }
}
html {
font-size: 62.5%; }
body {
font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */
line-height: 1.6;
font-weight: 400;
font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #222; }
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 2rem;
font-weight: 300; }
h1 { font-size: 3.6rem; line-height: 1.2; letter-spacing: -.1rem;}
h2 { font-size: 3.4rem; line-height: 1.25; letter-spacing: -.1rem; }
h3 { font-size: 3.2rem; line-height: 1.3; letter-spacing: -.1rem; }
h4 { font-size: 2.8rem; line-height: 1.35; letter-spacing: -.08rem; }
h5 { font-size: 2.4rem; line-height: 1.5; letter-spacing: -.05rem; }
h6 { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0; }
p {
margin-top: 0; }
a {
color: #1EAEDB; }
a:hover {
color: #0FA0CE; }
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
display: inline-block;
height: 38px;
padding: 0 30px;
color: #555;
text-align: center;
font-size: 11px;
font-weight: 600;
line-height: 38px;
letter-spacing: .1rem;
text-transform: uppercase;
text-decoration: none;
white-space: nowrap;
background-color: transparent;
border-radius: 4px;
border: 1px solid #bbb;
cursor: pointer;
box-sizing: border-box; }
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
.button:focus,
button:focus,
input[type="submit"]:focus,
input[type="reset"]:focus,
input[type="button"]:focus {
color: #333;
border-color: #888;
outline: 0; }
.button.button-primary,
button.button-primary,
input[type="submit"].button-primary,
input[type="reset"].button-primary,
input[type="button"].button-primary {
color: #FFF;
background-color: #33C3F0;
border-color: #33C3F0; }
.button.button-primary:hover,
button.button-primary:hover,
input[type="submit"].button-primary:hover,
input[type="reset"].button-primary:hover,
input[type="button"].button-primary:hover,
.button.button-primary:focus,
button.button-primary:focus,
input[type="submit"].button-primary:focus,
input[type="reset"].button-primary:focus,
input[type="button"].button-primary:focus {
color: #FFF;
background-color: #1EAEDB;
border-color: #1EAEDB; }
input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
height: 38px;
padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
background-color: #fff;
border: 1px solid #D1D1D1;
border-radius: 4px;
box-shadow: none;
box-sizing: border-box; }
/* Removes awkward default styles on some inputs for iOS */
input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
textarea {
min-height: 65px;
padding-top: 6px;
padding-bottom: 6px; }
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
border: 1px solid #33C3F0;
outline: 0; }
label,
legend {
display: block;
margin-bottom: .5rem;
font-weight: 600; }
fieldset {
padding: 0;
border-width: 0; }
input[type="checkbox"],
input[type="radio"] {
display: inline; }
label > .label-body {
display: inline-block;
margin-left: .5rem;
font-weight: normal; }
ul {
list-style: circle; }
ol {
list-style: decimal; }
ul ul,
ul ol,
ol ol,
ol ul {
margin: 1.5rem 0 1.5rem 3rem;
font-size: 90%; }
li > p {margin : 0;}
th,
td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #E1E1E1; }
th:first-child,
td:first-child {
padding-left: 0; }
th:last-child,
td:last-child {
padding-right: 0; }
button,
.button {
margin-bottom: 1rem; }
input,
textarea,
select,
fieldset {
margin-bottom: 1.5rem; }
pre,
blockquote,
dl,
figure,
table,
p,
ul,
ol,
form {
margin-bottom: 1.0rem; }
.u-full-width {
width: 100%;
box-sizing: border-box; }
.u-max-full-width {
max-width: 100%;
box-sizing: border-box; }
.u-pull-right {
float: right; }
.u-pull-left {
float: left; }
hr {
margin-top: 3rem;
margin-bottom: 3.5rem;
border-width: 0;
border-top: 1px solid #E1E1E1; }
.container:after,
.row:after,
.u-cf {
content: "";
display: table;
clear: both; }
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.42857143;
word-break: break-all;
word-wrap: break-word;
border: 1px solid #ccc;
border-radius: 4px;
}
pre.hljl {
margin: 0 0 10px;
display: block;
background: #f5f5f5;
border-radius: 4px;
padding : 5px;
}
pre.output {
background: #ffffff;
}
pre.code {
background: #ffffff;
}
pre.julia-error {
color : red
}
code,
kbd,
pre,
samp {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
font-size: 0.9em;
}
@media (min-width: 400px) {}
@media (min-width: 550px) {}
@media (min-width: 750px) {}
@media (min-width: 1000px) {}
@media (min-width: 1200px) {}
h1.title {margin-top : 20px}
img {max-width : 100%}
div.title {text-align: center;}
</style>
</HEAD>
<BODY>
<div class ="container">
<div class = "row">
<div class = "col-md-12 twelve columns">
<div class="title">
<h1 class="title">Exercise PK52 - Simulated impact of disease on r-hSOD kinetics</h1>
<h5>2021-09-06</h5>
</div>
<h3>Background</h3>
<ul>
<li><p>Structural model - IV infusion - Two compartment Model</p>
</li>
<li><p>Route of administration - Rapid intravenous infusion of recombinant human superoxide dismutase (r-hSOD)</p>
</li>
<li><p>Dosage Regimen - 20mg/kg IV rapid infusion for 15 seconds in two categories of rats</p>
</li>
<li><p>Number of Subjects - 1 normal rat, 1 clamped (nephrectomized) rat</p>
</li>
</ul>
<p><img src="https://user-images.githubusercontent.com/62236054/81700776-c5021d00-9486-11ea-8287-ef2203e7998b.jpg" alt="Slide1 png" /></p>
<p>In this model, collection of plasma concentration data of parent drug and concentration of parent and metabolite in urine, will help you to derive/ the parameters: Clearance, Volume of Distribution, Km, Vmax.</p>
<h3>Learning Outcome</h3>
<ol>
<li><p>To note that clearance and volume of central compartment are reduced in clamped rats, as removal of the kidneys increased the effective half life from 10mins in normal rats to 90mins in nephrectomized rats.</p>
</li>
<li><p>The time to steady state might differ 9-fold between the two groups.</p>
</li>
<li><p>Importance of kidneys in the elimination of r-hSOD and the impact of kidney disease/nephrectomy in the overall kinetics of the drug.</p>
</li>
</ol>
<h3>Objectives</h3>
<p>In this tutorial, you will learn how to construct a simple two compartment model with 2 set of parameters corresponding to normal and clamped rats.</p>
<h3>Libraries</h3>
<p>Call the "necessary" libraries to get started</p>
<pre class='hljl'>
<span class='hljl-k'>using</span><span class='hljl-t'> </span><span class='hljl-n'>Random</span><span class='hljl-t'>
</span><span class='hljl-k'>using</span><span class='hljl-t'> </span><span class='hljl-n'>Pumas</span><span class='hljl-t'>
</span><span class='hljl-k'>using</span><span class='hljl-t'> </span><span class='hljl-n'>PumasUtilities</span><span class='hljl-t'>
</span><span class='hljl-k'>using</span><span class='hljl-t'> </span><span class='hljl-n'>CairoMakie</span>
</pre>
<h3>Model</h3>
<pre class='hljl'>
<span class='hljl-n'>pk_52</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nd'>@model</span><span class='hljl-t'> </span><span class='hljl-k'>begin</span><span class='hljl-t'>
</span><span class='hljl-nd'>@metadata</span><span class='hljl-t'> </span><span class='hljl-k'>begin</span><span class='hljl-t'>
</span><span class='hljl-n'>desc</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-s'>"Two Compartment Model"</span><span class='hljl-t'>
</span><span class='hljl-n'>timeu</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-so'>u"minute"</span><span class='hljl-t'>
</span><span class='hljl-k'>end</span><span class='hljl-t'>
</span><span class='hljl-nd'>@param</span><span class='hljl-t'> </span><span class='hljl-k'>begin</span><span class='hljl-t'>
</span><span class='hljl-s'>"Clearance (mL/min/kg)"</span><span class='hljl-t'>
</span><span class='hljl-n'>tvcl</span><span class='hljl-t'> </span><span class='hljl-oB'>∈</span><span class='hljl-t'> </span><span class='hljl-nf'>RealDomain</span><span class='hljl-p'>(</span><span class='hljl-n'>lower</span><span class='hljl-oB'>=</span><span class='hljl-ni'>0</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-s'>"Volume of Central Compartment (ml/min/kg)"</span><span class='hljl-t'>
</span><span class='hljl-n'>tvvc</span><span class='hljl-t'> </span><span class='hljl-oB'>∈</span><span class='hljl-t'> </span><span class='hljl-nf'>RealDomain</span><span class='hljl-p'>(</span><span class='hljl-n'>lower</span><span class='hljl-oB'>=</span><span class='hljl-ni'>0</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-s'>"Volume of Peripheral Compartment (ml/min/kg)"</span><span class='hljl-t'>
</span><span class='hljl-n'>tvvp</span><span class='hljl-t'> </span><span class='hljl-oB'>∈</span><span class='hljl-t'> </span><span class='hljl-nf'>RealDomain</span><span class='hljl-p'>(</span><span class='hljl-n'>lower</span><span class='hljl-oB'>=</span><span class='hljl-ni'>0</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-s'>"Intercompartmental Clearance (ml/min/kg)"</span><span class='hljl-t'>
</span><span class='hljl-n'>tvcld</span><span class='hljl-t'> </span><span class='hljl-oB'>∈</span><span class='hljl-t'> </span><span class='hljl-nf'>RealDomain</span><span class='hljl-p'>(</span><span class='hljl-n'>lower</span><span class='hljl-oB'>=</span><span class='hljl-ni'>0</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-n'>Ω</span><span class='hljl-t'> </span><span class='hljl-oB'>∈</span><span class='hljl-t'> </span><span class='hljl-nf'>PDiagDomain</span><span class='hljl-p'>(</span><span class='hljl-ni'>4</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-n'>σ²_prop</span><span class='hljl-t'> </span><span class='hljl-oB'>∈</span><span class='hljl-t'> </span><span class='hljl-nf'>RealDomain</span><span class='hljl-p'>(</span><span class='hljl-n'>lower</span><span class='hljl-oB'>=</span><span class='hljl-ni'>0</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-k'>end</span><span class='hljl-t'>
</span><span class='hljl-nd'>@random</span><span class='hljl-t'> </span><span class='hljl-k'>begin</span><span class='hljl-t'>
</span><span class='hljl-n'>η</span><span class='hljl-t'> </span><span class='hljl-oB'>~</span><span class='hljl-t'> </span><span class='hljl-nf'>MvNormal</span><span class='hljl-p'>(</span><span class='hljl-n'>Ω</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-k'>end</span><span class='hljl-t'>
</span><span class='hljl-nd'>@pre</span><span class='hljl-t'> </span><span class='hljl-k'>begin</span><span class='hljl-t'>
</span><span class='hljl-n'>Cl</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-n'>tvcl</span><span class='hljl-t'> </span><span class='hljl-oB'>*</span><span class='hljl-t'> </span><span class='hljl-nf'>exp</span><span class='hljl-p'>(</span><span class='hljl-n'>η</span><span class='hljl-p'>[</span><span class='hljl-ni'>1</span><span class='hljl-p'>])</span><span class='hljl-t'>
</span><span class='hljl-n'>Vc</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-n'>tvvc</span><span class='hljl-t'> </span><span class='hljl-oB'>*</span><span class='hljl-t'> </span><span class='hljl-nf'>exp</span><span class='hljl-p'>(</span><span class='hljl-n'>η</span><span class='hljl-p'>[</span><span class='hljl-ni'>2</span><span class='hljl-p'>])</span><span class='hljl-t'>
</span><span class='hljl-n'>Vp</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-n'>tvvp</span><span class='hljl-t'> </span><span class='hljl-oB'>*</span><span class='hljl-t'> </span><span class='hljl-nf'>exp</span><span class='hljl-p'>(</span><span class='hljl-n'>η</span><span class='hljl-p'>[</span><span class='hljl-ni'>3</span><span class='hljl-p'>])</span><span class='hljl-t'>
</span><span class='hljl-n'>Cld</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-n'>tvcld</span><span class='hljl-t'> </span><span class='hljl-oB'>*</span><span class='hljl-t'> </span><span class='hljl-nf'>exp</span><span class='hljl-p'>(</span><span class='hljl-n'>η</span><span class='hljl-p'>[</span><span class='hljl-ni'>4</span><span class='hljl-p'>])</span><span class='hljl-t'>
</span><span class='hljl-k'>end</span><span class='hljl-t'>
</span><span class='hljl-nd'>@dynamics</span><span class='hljl-t'> </span><span class='hljl-k'>begin</span><span class='hljl-t'>
</span><span class='hljl-n'>Central</span><span class='hljl-oB'>'</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-oB'>-</span><span class='hljl-p'>(</span><span class='hljl-n'>Cl</span><span class='hljl-oB'>/</span><span class='hljl-n'>Vc</span><span class='hljl-p'>)</span><span class='hljl-oB'>*</span><span class='hljl-n'>Central</span><span class='hljl-t'> </span><span class='hljl-oB'>-</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>Cld</span><span class='hljl-oB'>/</span><span class='hljl-n'>Vc</span><span class='hljl-p'>)</span><span class='hljl-oB'>*</span><span class='hljl-n'>Central</span><span class='hljl-t'> </span><span class='hljl-oB'>+</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>Cld</span><span class='hljl-oB'>/</span><span class='hljl-n'>Vp</span><span class='hljl-p'>)</span><span class='hljl-t'> </span><span class='hljl-oB'>*</span><span class='hljl-t'> </span><span class='hljl-n'>Peripheral</span><span class='hljl-t'>
</span><span class='hljl-n'>Peripheral</span><span class='hljl-oB'>'</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>Cld</span><span class='hljl-oB'>/</span><span class='hljl-n'>Vc</span><span class='hljl-p'>)</span><span class='hljl-oB'>*</span><span class='hljl-n'>Central</span><span class='hljl-t'> </span><span class='hljl-oB'>-</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>Cld</span><span class='hljl-oB'>/</span><span class='hljl-n'>Vp</span><span class='hljl-p'>)</span><span class='hljl-oB'>*</span><span class='hljl-n'>Peripheral</span><span class='hljl-t'>
</span><span class='hljl-k'>end</span><span class='hljl-t'>
</span><span class='hljl-nd'>@derived</span><span class='hljl-t'> </span><span class='hljl-k'>begin</span><span class='hljl-t'>
</span><span class='hljl-n'>cp</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> @</span><span class='hljl-oB'>.</span><span class='hljl-t'> </span><span class='hljl-n'>Central</span><span class='hljl-oB'>/</span><span class='hljl-n'>Vc</span><span class='hljl-t'>
</span><span class='hljl-s'>"""
Observed Concentration (ug/mL)
"""</span><span class='hljl-t'>
</span><span class='hljl-n'>dv</span><span class='hljl-t'> </span><span class='hljl-oB'>~</span><span class='hljl-t'> @</span><span class='hljl-oB'>.</span><span class='hljl-t'> </span><span class='hljl-nf'>Normal</span><span class='hljl-p'>(</span><span class='hljl-n'>cp</span><span class='hljl-p'>,</span><span class='hljl-nf'>sqrt</span><span class='hljl-p'>(</span><span class='hljl-n'>cp</span><span class='hljl-oB'>^</span><span class='hljl-ni'>2</span><span class='hljl-oB'>*</span><span class='hljl-n'>σ²_prop</span><span class='hljl-p'>))</span><span class='hljl-t'>
</span><span class='hljl-k'>end</span><span class='hljl-t'>
</span><span class='hljl-k'>end</span>
</pre>
<pre class="output">
PumasModel
Parameters: tvcl, tvvc, tvvp, tvcld, Ω, σ²_prop
Random effects: η
Covariates:
Dynamical variables: Central, Peripheral
Derived: cp, dv
Observed: cp, dv
</pre>
<h3>Parameters</h3>
<p>Parameters are provided for the simulation as below. <code>tv</code> represents the typical value for parameters.</p>
<ul>
<li><p><span class="math">$tvcl$</span> - Clearance (mL/min/kg)</p>
</li>
<li><p><span class="math">$tvvc$</span> - Volume of Central Compartment (ml/min/kg)</p>
</li>
<li><p><span class="math">$tvvp$</span> - Volume of Peripheral CompartmentRenal (ml/min/kg)</p>
</li>
<li><p><span class="math">$tq$</span> - Intercompartmental Clearance (ml/min/kg)</p>
</li>
<li><p><span class="math">$Ω$</span> - Between Subject Variability</p>
</li>
<li><p><span class="math">$σ$</span> - Residual errors</p>
</li>
</ul>
<pre class='hljl'>
<span class='hljl-n'>param1</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>tvcl</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nfB'>3.0</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>tvvc</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-ni'>31</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>tvvp</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-ni'>15</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>tvcld</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nfB'>0.12</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>Ω</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nf'>Diagonal</span><span class='hljl-p'>([</span><span class='hljl-nfB'>0.0</span><span class='hljl-p'>,</span><span class='hljl-nfB'>0.0</span><span class='hljl-p'>,</span><span class='hljl-nfB'>0.0</span><span class='hljl-p'>,</span><span class='hljl-nfB'>0.0</span><span class='hljl-p'>]),</span><span class='hljl-t'>
</span><span class='hljl-n'>σ²_prop</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nfB'>0.04</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-n'>param2</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>tvcl</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nfB'>0.22</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>tvvc</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-ni'>16</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>tvvp</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-ni'>13</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>tvcld</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nfB'>0.09</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>Ω</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nf'>Diagonal</span><span class='hljl-p'>([</span><span class='hljl-nfB'>0.0</span><span class='hljl-p'>,</span><span class='hljl-nfB'>0.0</span><span class='hljl-p'>,</span><span class='hljl-nfB'>0.0</span><span class='hljl-p'>,</span><span class='hljl-nfB'>0.0</span><span class='hljl-p'>]),</span><span class='hljl-t'>
</span><span class='hljl-n'>σ²_prop</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nfB'>0.04</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-n'>param</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nf'>vcat</span><span class='hljl-p'>(</span><span class='hljl-n'>param1</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>param2</span><span class='hljl-p'>)</span>
</pre>
<h3>Dosage Regimen</h3>
<p>A dose of <strong>20 mg/kg</strong> to a single rat of <code>2 categories</code> (normal and clamped)</p>
<pre class='hljl'>
<span class='hljl-n'>ev1</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nf'>DosageRegimen</span><span class='hljl-p'>(</span><span class='hljl-ni'>20000</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>cmt</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-ni'>1</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-n'>sub1</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nf'>Subject</span><span class='hljl-p'>(</span><span class='hljl-n'>id</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-s'>"Normal_Rat"</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>events</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-n'>ev1</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>covariates</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>Rat</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-s'>"Normal_Rat"</span><span class='hljl-p'>,))</span><span class='hljl-t'>
</span><span class='hljl-n'>sub2</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nf'>Subject</span><span class='hljl-p'>(</span><span class='hljl-n'>id</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-s'>"Clamped_Rat"</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>events</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-n'>ev1</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>covariates</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>Rat</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-s'>"Clamped_Rat"</span><span class='hljl-p'>,))</span><span class='hljl-t'>
</span><span class='hljl-n'>pop2_sub</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-p'>[</span><span class='hljl-n'>sub1</span><span class='hljl-p'>,</span><span class='hljl-n'>sub2</span><span class='hljl-p'>]</span>
</pre>
<pre class="output">
Population
Subjects: 2
Covariates: Rat
Observations:
</pre>
<h3>Simulation</h3>
<p>Simulate the plasma concentration after IV infusion</p>
<pre class='hljl'>
<span class='hljl-n'>Random</span><span class='hljl-oB'>.</span><span class='hljl-nf'>seed!</span><span class='hljl-p'>(</span><span class='hljl-ni'>123</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-n'>sim_pop2_sub</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nf'>map</span><span class='hljl-p'>(((</span><span class='hljl-n'>subject</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>param</span><span class='hljl-p'>),)</span><span class='hljl-t'> </span><span class='hljl-oB'>-></span><span class='hljl-t'> </span><span class='hljl-nf'>simobs</span><span class='hljl-p'>(</span><span class='hljl-n'>pk_52</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>subject</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>param</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>obstimes</span><span class='hljl-oB'>=</span><span class='hljl-ni'>0</span><span class='hljl-oB'>:</span><span class='hljl-nfB'>0.1</span><span class='hljl-oB'>:</span><span class='hljl-ni'>500</span><span class='hljl-p'>),</span><span class='hljl-t'> </span><span class='hljl-nf'>zip</span><span class='hljl-p'>(</span><span class='hljl-n'>pop2_sub</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>param</span><span class='hljl-p'>))</span>
</pre>
<h3>Visualization</h3>
<pre class='hljl'>
<span class='hljl-n'>f</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>a</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>p</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-nf'>sim_plot</span><span class='hljl-p'>(</span><span class='hljl-n'>pk_52</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>sim_pop2_sub</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>observations</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-sc'>:cp</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>color</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-sc'>:redsblues</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>linewidth</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-ni'>4</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>axis</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-p'>(</span><span class='hljl-n'>xlabel</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-s'>"Time (hrs)"</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>ylabel</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-s'>"PK52 Concentrations (μg/L)"</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>xticks</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-ni'>0</span><span class='hljl-oB'>:</span><span class='hljl-ni'>50</span><span class='hljl-oB'>:</span><span class='hljl-ni'>500</span><span class='hljl-p'>,</span><span class='hljl-t'> </span><span class='hljl-n'>yscale</span><span class='hljl-t'> </span><span class='hljl-oB'>=</span><span class='hljl-t'> </span><span class='hljl-n'>log10</span><span class='hljl-p'>,</span><span class='hljl-t'>
</span><span class='hljl-n'>title</span><span class='hljl-oB'>=</span><span class='hljl-s'>"Simulated impact of disease on r-hSOD kinetics"</span><span class='hljl-p'>))</span><span class='hljl-t'>
</span><span class='hljl-nf'>axislegend</span><span class='hljl-p'>(</span><span class='hljl-n'>a</span><span class='hljl-p'>)</span><span class='hljl-t'>
</span><span class='hljl-n'>f</span>
</pre>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAIAAAAVFBUnAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzdd1wT5/8A8OcIAcIKEDaIgAoyRBmyRBEURKDiqFK1asVRrVtxtFpHXVVcte4qjlpF5etPVBBUhgIVUJQpoIjIJgwJI5AEcr8/rk0jI6xAGJ/3y5ev3HPPPfe5Efhw99xzGI7jCAAAAAAACI+YqAMAAAAAABhoIMECAAAAABAySLAAAAAAAIQMEiwAAAAAACGDBAsAAAAAQMggwQIAAAAAEDJIsAAAAAAAhAwSLAAAAAAAIYMECwAAAABAyCDBAgAAAAAQMkiwAAAAAACEDBIsAAAAAAAhgwQLAAAAAEDIIMECAAAAABAySLAAAAAAAIQMEiwAAAAAACGDBAsAAAAAQMggwQIAAAAAEDJIsMCA9ejRIycnJzU1NSqVam1tfeTIkc+fP/Pm7tu3T1ZWtifW23MttzR58mRPT0+Rh9Frrl69amBgICEhoaCg0JH6/PtnQO6Q7vP19VVXVxdQQfD3iBAVFeXp6amsrCwpKTls2LD169fT6XTe3FOnTmH/kpGR0dPTmzlzZmBgII7jXQusRw8lnCdAWCDBAgOTv7+/u7u7lZVVYmJiUVHR1q1bT5w4sWfPHlHH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QoWAAAAAMtQsAAAAABYhoIFAAAAwDIULAAAAACWoWABAAAAsAwFCwAAAIBlKFgAAAAALEPBAgAAAGAZChYAAAAAy1CwAAAAAFiGggUAAADAMhQsAAAAAJahYAEAAACwDAULAAAAgGX/B2xsvIktC2YlAAAAAElFTkSuQmCC" />
<HR/>
<div class="footer">
<p>
Published from <a href="pk52.jmd">pk52.jmd</a>
using <a href="http://github.com/JunoLab/Weave.jl">Weave.jl</a> v0.10.8 on 2021-09-06.
</p>
</div>
</div>
</div>
</div>
</BODY>
</HTML>
| 115.593279 | 60,021 | 0.832022 |
3d88f50bea32a2a011797b920c99704bcfd7251a | 450 | sql | SQL | update_1.1.0.sql | rob1121/deelz | b69dca6217865413a3296272aeaa7fd3c0ab5ec7 | [
"MIT"
] | null | null | null | update_1.1.0.sql | rob1121/deelz | b69dca6217865413a3296272aeaa7fd3c0ab5ec7 | [
"MIT"
] | null | null | null | update_1.1.0.sql | rob1121/deelz | b69dca6217865413a3296272aeaa7fd3c0ab5ec7 | [
"MIT"
] | null | null | null | /**
** BANK INFORMATIONS FOR PROs
**/
ALTER TABLE `users_pro` ADD `bank_company` VARCHAR( 255 ) NOT NULL AFTER `informations` ,
ADD `bank_name` VARCHAR( 255 ) NOT NULL AFTER `bank_company` ,
ADD `bank_address` VARCHAR( 400 ) NOT NULL AFTER `bank_name` ,
ADD `bank_iban` VARCHAR( 255 ) NOT NULL AFTER `bank_address` ,
ADD `bank_bic` VARCHAR( 255 ) NOT NULL AFTER `bank_iban` ,
ADD `paypal_account` VARCHAR( 255 ) NOT NULL AFTER `bank_bic` | 50 | 92 | 0.706667 |
95651ce2556c66eebb5b20d8a28ca289bca073a8 | 2,461 | css | CSS | app/static/css/index.css | Roney-juma/NoteBook-Flask | 4fc86cdc753bd785c2edd9f3dc5e8a296e63a520 | [
"MIT"
] | null | null | null | app/static/css/index.css | Roney-juma/NoteBook-Flask | 4fc86cdc753bd785c2edd9f3dc5e8a296e63a520 | [
"MIT"
] | null | null | null | app/static/css/index.css | Roney-juma/NoteBook-Flask | 4fc86cdc753bd785c2edd9f3dc5e8a296e63a520 | [
"MIT"
] | null | null | null | body {
font-size: 18px;
}
h2 {
text-align: center;
}
#login,#rejister,.updateprofile, .pict, .details, .create,.error-col {
background-color: #D4CECE;
padding: 15px;
height: 100vh;
}
h3 {
color: #16425B;
}.col-md-10 {
padding-top: 15px;
}
.profile-col {
display: flex;
flex-direction: column;
height: 100vh;
background-color: #16425B;
}
.notes-col,.categories-col {
height: 100vh;
background-color: white
}
.notes-header, .categories-header {
padding-top: 2vh;
height: 10vh;
border-bottom: 2px solid white;
}
.notes, .categories {
height: 90vh;
overflow-y: auto;
}
.notes-container {
height: 87vh;
}
.notes-col {
background-color: #D4CECE;
}
.categories-col {
background-color: #E5E5E5;
}
.note {
background-color: #D4CECE;
height: auto;
padding: 1.5rem;
border-bottom: 2px solid white;
}
.notes-header {
background-color: #CECDCD;
}
.categories-header {
background-color: #DCE2E1;
}
.category_list {
background-color: #E5E5E5;
border-bottom: 2px solid white;
padding: 1.5rem;
}
table {
border: 1.5px solid #584b53 !important;
}
#userTable {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#deleteForm {
display: inline !important;
}
#comment {
width: 100% !important;
display: block;
}
#userTable td, #userTable th {
border: 1px solid #ddd;
padding: 8px;
}
#userTable tr:nth-child(even){background-color: #f2f2f2;}
#userTable tr:hover {background-color: #ddd;}
#userTable th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #04AA6D;
color: white;
}
.category-item{
background-color: #E5E5E5;
height: 100px;
font-size: medium;
}
.text-centre, .testimonial-card {
text-align: center;
margin-top: 4rem !important;
}
.card-img img {
border-radius: 50% !important;
}
ul li{
width: 100% !important;
color: white !important;
}
ul li a{
color: white !important;
}
ul li a:hover{
color: white !important;
color: #16425B !important;
}
@media (max-width: 1000px) {
.profile-col {
display: flex;
flex-direction: column;
height: auto;
}
.notes-col,.categories-col {
height: auto;
background-color: white
}
.notes-header, .categories-header {
padding-top: 2vh;
height: 10vh;
border-bottom: 2px solid white;
}
.notes, .categories {
height: auto;
}
.notes-container {
height: auto;
}
.fas, .fa {
font-size: 20px !important;
}
} | 17.453901 | 70 | 0.658675 |
3301f92fef2ea95eab5a3e90a808b11c54276e49 | 273 | py | Python | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_light__hyper_bg_noise.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | 1 | 2020-04-06T20:07:56.000Z | 2020-04-06T20:07:56.000Z | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_light__hyper_bg_noise.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_light__hyper_bg_noise.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | from test_autolens.integration.tests.imaging.lens_only import lens_light__hyper_bg_noise
from test_autolens.integration.tests.imaging.runner import run_a_mock
class TestCase:
def _test__lens_light__hyper_bg_noise(self):
run_a_mock(lens_light__hyper_bg_noise)
| 34.125 | 88 | 0.849817 |
b755bb80ff89ec9672e8e99933f3fbd2a6693466 | 228 | sql | SQL | 06. Databases/2018/2018.11.02/11.sql | dimitarminchev/ITCareer | 0e36aa85e5f1c12de186bbe402f8c66042ce84a2 | [
"MIT"
] | 50 | 2018-09-22T07:18:13.000Z | 2022-03-04T12:31:04.000Z | 06. Databases/2018/2018.11.02/11.sql | dimitarminchev/ITCareer | 0e36aa85e5f1c12de186bbe402f8c66042ce84a2 | [
"MIT"
] | null | null | null | 06. Databases/2018/2018.11.02/11.sql | dimitarminchev/ITCareer | 0e36aa85e5f1c12de186bbe402f8c66042ce84a2 | [
"MIT"
] | 30 | 2019-03-22T21:48:16.000Z | 2022-02-14T08:48:52.000Z | /* 11. Всички мениджъри */
USE soft_uni;
SELECT e.first_name, e.last_name, e.job_title
FROM employees e
WHERE e.employee_id in
(
SELECT DISTINCT manager_id
FROM employees
)
ORDER BY e.first_name, e.last_name | 20.727273 | 46 | 0.714912 |
6edc9290aa69307343f8a2e6e1bde13bbba5e0f4 | 7,667 | kts | Kotlin | build.gradle.kts | Software-Analysis-Team/UTBotCpp-CLion-plugin | 5a240652ad9afdf2841d565cba5c2bf5f31af691 | [
"MIT"
] | null | null | null | build.gradle.kts | Software-Analysis-Team/UTBotCpp-CLion-plugin | 5a240652ad9afdf2841d565cba5c2bf5f31af691 | [
"MIT"
] | 17 | 2021-12-05T02:36:38.000Z | 2021-12-07T21:10:15.000Z | build.gradle.kts | Software-Analysis-Team/UTBotCpp-CLion-plugin | 5a240652ad9afdf2841d565cba5c2bf5f31af691 | [
"MIT"
] | 1 | 2021-12-05T04:35:20.000Z | 2021-12-05T04:35:20.000Z | import com.google.protobuf.gradle.generateProtoTasks
import com.google.protobuf.gradle.protobuf
import com.google.protobuf.gradle.protoc
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.plugins
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun properties(key: String) = project.findProperty(key).toString()
val coroutinesVersion by extra("1.5.2")
val protobufVersion by extra("3.18.0")
val grpcVersion by extra("1.40.1")
val grpcKotlinVersion by extra("1.1.0")
val platformType: String by project
val platformVersion: String by project
buildscript {
val protobufPlugInVersion by extra("0.8.17")
val kotlinVersion by extra("1.5.30")
repositories {
mavenCentral()
}
dependencies {
classpath("com.google.protobuf:protobuf-gradle-plugin:$protobufPlugInVersion")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.6.10"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.3.1"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "1.3.0"
// Gradle Qodana Plugin
id("org.jetbrains.qodana") version "0.1.12"
// serialization
kotlin("plugin.serialization") version "1.6.10"
id("com.google.protobuf") version "0.8.15"
idea
application
}
java.sourceCompatibility = JavaVersion.VERSION_11
dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:$coroutinesVersion")
// grpc and protobuf
implementation("com.google.protobuf:protobuf-java:$protobufVersion")
implementation("com.google.protobuf:protobuf-java-util:$protobufVersion")
implementation("io.grpc:grpc-netty-shaded:$grpcVersion")
implementation("io.grpc:grpc-protobuf:$grpcVersion")
implementation("io.grpc:grpc-stub:$grpcVersion")
implementation("io.grpc:grpc-kotlin-stub:$grpcKotlinVersion")
compileOnly("javax.annotation:javax.annotation-api:1.3.2")
implementation("com.google.protobuf:protobuf-kotlin:$protobufVersion")
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("ch.qos.logback:logback-core:1.2.3")
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("io.github.microutils:kotlin-logging-jvm:2.1.20")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.3.2")
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.10.1"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.33.1"
}
id("grpckt") {
artifact = "io.grpc:protoc-gen-grpc-kotlin:0.1.5"
}
}
generateProtoTasks {
all().forEach {
it.plugins {
id("grpc")
id("grpckt")
}
}
}
}
idea {
module {
sourceDirs.add(File("$projectDir/src/generated/main/java"))
sourceDirs.add(File("$projectDir/src/generated/main/grpc"))
sourceDirs.add(File("$projectDir/src/generated/main/grpckt"))
}
}
group = properties("pluginGroup")
version = properties("pluginVersion")
// Configure project's dependencies
repositories {
mavenCentral()
}
// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
intellij {
pluginName.set(properties("pluginName"))
// use CLion version 2021.2.2
version.set(platformVersion)
type.set(platformType)
updateSinceUntilBuild.set(true)
// to use auto-reload for ide instance
tasks.buildSearchableOptions.get().enabled = false
tasks.runIde.get().autoReloadPlugins.set(true)
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
}
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
version.set(properties("pluginVersion"))
groups.set(emptyList())
}
// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
qodana {
cachePath.set(projectDir.resolve(".qodana").canonicalPath)
reportPath.set(projectDir.resolve("build/reports/inspections").canonicalPath)
saveReport.set(true)
showReport.set(System.getenv("QODANA_SHOW_REPORT").toBoolean())
}
tasks {
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = it
kotlinOptions.freeCompilerArgs = listOf("-Xjsr305=strict", "-Xopt-in=kotlin.RequiresOptIn")
kotlinOptions.jvmTarget = "11"
}
}
wrapper {
gradleVersion = properties("gradleVersion")
}
patchPluginXml {
version.set(properties("pluginVersion"))
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription.set(
projectDir.resolve("README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"
if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
)
// Get the latest available change notes from the changelog file
changeNotes.set(provider {
changelog.run {
getOrNull(properties("pluginVersion")) ?: getLatest()
}.toHTML()
})
}
runPluginVerifier {
ideVersions.set(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty))
}
// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
}
signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
publishPlugin {
dependsOn("patchChangelog")
token.set(System.getenv("PUBLISH_TOKEN"))
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()))
}
}
| 35.169725 | 120 | 0.675101 |
fed91872a0e35363075aa184cb634f0c09216375 | 1,046 | html | HTML | manuscript/page-504/body.html | marvindanig/english-literature | 5f9dcbfdd63ede766219354678514fe862c72471 | [
"BlueOak-1.0.0",
"CC-BY-4.0",
"Unlicense"
] | 1 | 2019-08-20T13:31:32.000Z | 2019-08-20T13:31:32.000Z | manuscript/page-504/body.html | marvindanig/english-literature | 5f9dcbfdd63ede766219354678514fe862c72471 | [
"BlueOak-1.0.0",
"CC-BY-4.0",
"Unlicense"
] | 1 | 2020-09-07T00:12:34.000Z | 2020-09-07T00:12:34.000Z | manuscript/page-504/body.html | marvindanig/english-literature | 5f9dcbfdd63ede766219354678514fe862c72471 | [
"BlueOak-1.0.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | <div class="leaf flex"><div class="inner justify"><p class="no-indent ">fantastic verse forms in Herbert's poetry, will find them in abundance; but it will better repay the reader to look for the deep thought and fine feeling that are hidden in these wonderful religious lyrics, even in those that appear most artificial. The fact that Herbert's reputation was greater, at times, than Milton's, and that his poems when published after his death had a large sale and influence, shows certainly that he appealed to the men of his age; and his poems will probably be read and appreciated, if only by the few, just so long as men are strong enough to understand the Puritan's spiritual convictions.</p><li class=" stretch-last-line">Life. Herbert's life is so quiet and uneventful that to relate a few biographical facts can be of little advantage. Only as one reads the whole story by Izaak Walton can he share the gentle spirit of Herbert's poetry. He was born at Montgomery Castle, Wales, 1593, of a noble Welsh family. His</li></ul></div> </div> | 1,046 | 1,046 | 0.779159 |
402113e5f8d7897d327be889bbb6e7b473c6d790 | 14,265 | py | Python | python/paddle/fluid/contrib/slim/tests/test_imperative_ptq.py | SmirnovKol/Paddle | a3730dc87bc61593514b830727e36e5d19e753cd | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/slim/tests/test_imperative_ptq.py | SmirnovKol/Paddle | a3730dc87bc61593514b830727e36e5d19e753cd | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/slim/tests/test_imperative_ptq.py | SmirnovKol/Paddle | a3730dc87bc61593514b830727e36e5d19e753cd | [
"Apache-2.0"
] | null | null | null | # copyright (c) 2018 paddlepaddle authors. all rights reserved.
#
# licensed under the apache license, version 2.0 (the "license");
# you may not use this file except in compliance with the license.
# you may obtain a copy of the license at
#
# http://www.apache.org/licenses/license-2.0
#
# unless required by applicable law or agreed to in writing, software
# distributed under the license is distributed on an "as is" basis,
# without warranties or conditions of any kind, either express or implied.
# see the license for the specific language governing permissions and
# limitations under the license.
from __future__ import print_function
import os
import numpy as np
import random
import shutil
import time
import unittest
import copy
import logging
import paddle.nn as nn
import paddle
import paddle.fluid as fluid
from paddle.fluid.contrib.slim.quantization import *
from paddle.fluid.log_helper import get_logger
from paddle.dataset.common import download
from paddle.fluid.framework import _test_eager_guard
from imperative_test_utils import fix_model_dict, ImperativeLenet, ImperativeLinearBn
from imperative_test_utils import ImperativeLinearBn_hook
_logger = get_logger(__name__,
logging.INFO,
fmt='%(asctime)s-%(levelname)s: %(message)s')
class TestFuseLinearBn(unittest.TestCase):
"""
Fuse the linear and bn layers, and then quantize the model.
"""
def test_fuse(self):
model = ImperativeLinearBn()
model_h = ImperativeLinearBn_hook()
inputs = paddle.randn((3, 10), dtype="float32")
config = PTQConfig(AbsmaxQuantizer(), AbsmaxQuantizer())
ptq = ImperativePTQ(config)
f_l = [['linear', 'bn']]
quant_model = ptq.quantize(model, fuse=True, fuse_list=f_l)
quant_h = ptq.quantize(model_h, fuse=True, fuse_list=f_l)
for name, layer in quant_model.named_sublayers():
if name in f_l:
assert not (isinstance(layer, nn.BatchNorm1D)
or isinstance(layer, nn.BatchNorm2D))
out = model(inputs)
out_h = model_h(inputs)
out_quant = quant_model(inputs)
out_quant_h = quant_h(inputs)
cos_sim_func = nn.CosineSimilarity(axis=0)
print('fuse linear+bn', cos_sim_func(out.flatten(),
out_quant.flatten()))
print(cos_sim_func(out_h.flatten(), out_quant_h.flatten()))
class TestImperativePTQ(unittest.TestCase):
"""
"""
@classmethod
def setUpClass(cls):
timestamp = time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime())
cls.root_path = os.path.join(os.getcwd(), "imperative_ptq_" + timestamp)
cls.save_path = os.path.join(cls.root_path, "model")
cls.download_path = 'dygraph_int8/download'
cls.cache_folder = os.path.expanduser('~/.cache/paddle/dataset/' +
cls.download_path)
cls.lenet_url = "https://paddle-inference-dist.cdn.bcebos.com/int8/unittest_model_data/lenet_pretrained.tar.gz"
cls.lenet_md5 = "953b802fb73b52fae42896e3c24f0afb"
seed = 1
np.random.seed(seed)
paddle.static.default_main_program().random_seed = seed
paddle.static.default_startup_program().random_seed = seed
@classmethod
def tearDownClass(cls):
try:
pass
# shutil.rmtree(cls.root_path)
except Exception as e:
print("Failed to delete {} due to {}".format(cls.root_path, str(e)))
def cache_unzipping(self, target_folder, zip_path):
if not os.path.exists(target_folder):
cmd = 'mkdir {0} && tar xf {1} -C {0}'.format(
target_folder, zip_path)
os.system(cmd)
def download_model(self, data_url, data_md5, folder_name):
download(data_url, self.download_path, data_md5)
file_name = data_url.split('/')[-1]
zip_path = os.path.join(self.cache_folder, file_name)
print('Data is downloaded at {0}'.format(zip_path))
data_cache_folder = os.path.join(self.cache_folder, folder_name)
self.cache_unzipping(data_cache_folder, zip_path)
return data_cache_folder
def set_vars(self):
config = PTQConfig(AbsmaxQuantizer(), AbsmaxQuantizer())
self.ptq = ImperativePTQ(config)
self.batch_num = 10
self.batch_size = 10
self.eval_acc_top1 = 0.95
# the input, output and weight thresholds of quantized op
self.gt_thresholds = {
'conv2d_0': [[1.0], [0.37673383951187134], [0.10933732241392136]],
'batch_norm2d_0': [[0.37673383951187134], [0.44249194860458374]],
're_lu_0': [[0.44249194860458374], [0.25804123282432556]],
'max_pool2d_0': [[0.25804123282432556], [0.25804123282432556]],
'linear_0': [[1.7058950662612915], [14.405526161193848],
[0.4373355209827423]],
'add_0': [[1.7058950662612915, 0.0], [1.7058950662612915]],
}
def model_test(self, model, batch_num=-1, batch_size=8):
model.eval()
test_reader = paddle.batch(paddle.dataset.mnist.test(),
batch_size=batch_size)
eval_acc_top1_list = []
for batch_id, data in enumerate(test_reader()):
x_data = np.array([x[0].reshape(1, 28, 28)
for x in data]).astype('float32')
y_data = np.array([x[1]
for x in data]).astype('int64').reshape(-1, 1)
img = paddle.to_tensor(x_data)
label = paddle.to_tensor(y_data)
out = model(img)
acc_top1 = fluid.layers.accuracy(input=out, label=label, k=1)
acc_top5 = fluid.layers.accuracy(input=out, label=label, k=5)
eval_acc_top1_list.append(float(acc_top1.numpy()))
if batch_id % 50 == 0:
_logger.info("Test | At step {}: acc1 = {:}, acc5 = {:}".format(
batch_id, acc_top1.numpy(), acc_top5.numpy()))
if batch_num > 0 and batch_id + 1 >= batch_num:
break
eval_acc_top1 = sum(eval_acc_top1_list) / len(eval_acc_top1_list)
return eval_acc_top1
def program_test(self, program_path, batch_num=-1, batch_size=8):
exe = paddle.static.Executor(paddle.CPUPlace())
[inference_program, feed_target_names, fetch_targets
] = (paddle.static.load_inference_model(program_path, exe))
test_reader = paddle.batch(paddle.dataset.mnist.test(),
batch_size=batch_size)
top1_correct_num = 0.
total_num = 0.
for batch_id, data in enumerate(test_reader()):
img = np.array([x[0].reshape(1, 28, 28)
for x in data]).astype('float32')
label = np.array([x[1] for x in data]).astype('int64')
feed = {feed_target_names[0]: img}
results = exe.run(inference_program,
feed=feed,
fetch_list=fetch_targets)
pred = np.argmax(results[0], axis=1)
top1_correct_num += np.sum(np.equal(pred, label))
total_num += len(img)
if total_num % 50 == 49:
_logger.info("Test | Test num {}: acc1 = {:}".format(
total_num, top1_correct_num / total_num))
if batch_num > 0 and batch_id + 1 >= batch_num:
break
return top1_correct_num / total_num
def func_ptq(self):
start_time = time.time()
self.set_vars()
# Load model
params_path = self.download_model(self.lenet_url, self.lenet_md5,
"lenet")
params_path += "/lenet_pretrained/lenet.pdparams"
model = ImperativeLenet()
model_state_dict = paddle.load(params_path)
model.set_state_dict(model_state_dict)
# Quantize, calibrate and save
quant_model = self.ptq.quantize(model)
before_acc_top1 = self.model_test(quant_model, self.batch_num,
self.batch_size)
input_spec = [
paddle.static.InputSpec(shape=[None, 1, 28, 28], dtype='float32')
]
self.ptq.save_quantized_model(model=quant_model,
path=self.save_path,
input_spec=input_spec)
print('Quantized model saved in {%s}' % self.save_path)
after_acc_top1 = self.model_test(quant_model, self.batch_num,
self.batch_size)
paddle.enable_static()
infer_acc_top1 = self.program_test(self.save_path, self.batch_num,
self.batch_size)
paddle.disable_static()
# Check
print('Before converted acc_top1: %s' % before_acc_top1)
print('After converted acc_top1: %s' % after_acc_top1)
print('Infer acc_top1: %s' % infer_acc_top1)
self.assertTrue(after_acc_top1 >= self.eval_acc_top1,
msg="The test acc {%f} is less than {%f}." %
(after_acc_top1, self.eval_acc_top1))
self.assertTrue(infer_acc_top1 >= after_acc_top1,
msg='The acc is lower after converting model.')
end_time = time.time()
print("total time: %ss \n" % (end_time - start_time))
def test_ptq(self):
with _test_eager_guard():
self.func_ptq()
self.func_ptq()
class TestImperativePTQfuse(TestImperativePTQ):
def func_ptq(self):
start_time = time.time()
self.set_vars()
# Load model
params_path = self.download_model(self.lenet_url, self.lenet_md5,
"lenet")
params_path += "/lenet_pretrained/lenet.pdparams"
model = ImperativeLenet()
model_state_dict = paddle.load(params_path)
model.set_state_dict(model_state_dict)
# Quantize, calibrate and save
f_l = [['features.0', 'features.1'], ['features.4', 'features.5']]
quant_model = self.ptq.quantize(model, fuse=True, fuse_list=f_l)
for name, layer in quant_model.named_sublayers():
if name in f_l:
assert not (isinstance(layer, nn.BatchNorm1D)
or isinstance(layer, nn.BatchNorm2D))
before_acc_top1 = self.model_test(quant_model, self.batch_num,
self.batch_size)
input_spec = [
paddle.static.InputSpec(shape=[None, 1, 28, 28], dtype='float32')
]
self.ptq.save_quantized_model(model=quant_model,
path=self.save_path,
input_spec=input_spec)
print('Quantized model saved in {%s}' % self.save_path)
after_acc_top1 = self.model_test(quant_model, self.batch_num,
self.batch_size)
paddle.enable_static()
infer_acc_top1 = self.program_test(self.save_path, self.batch_num,
self.batch_size)
paddle.disable_static()
# Check
print('Before converted acc_top1: %s' % before_acc_top1)
print('After converted acc_top1: %s' % after_acc_top1)
print('Infer acc_top1: %s' % infer_acc_top1)
#Check whether the quant_model is correct after converting.
#The acc of quantized model should be higher than 0.95.
self.assertTrue(after_acc_top1 >= self.eval_acc_top1,
msg="The test acc {%f} is less than {%f}." %
(after_acc_top1, self.eval_acc_top1))
#Check the saved infer_model.The acc of infer model
#should not be lower than the one of dygraph model.
self.assertTrue(infer_acc_top1 >= after_acc_top1,
msg='The acc is lower after converting model.')
end_time = time.time()
print("total time: %ss \n" % (end_time - start_time))
def test_ptq(self):
with _test_eager_guard():
self.func_ptq()
self.func_ptq()
class TestImperativePTQHist(TestImperativePTQ):
def set_vars(self):
config = PTQConfig(HistQuantizer(), AbsmaxQuantizer())
self.ptq = ImperativePTQ(config)
self.batch_num = 10
self.batch_size = 10
self.eval_acc_top1 = 0.98
self.gt_thresholds = {
'conv2d_0': [[0.99853515625], [0.35732391771364225],
[0.10933732241392136]],
'batch_norm2d_0': [[0.35732391771364225], [0.4291427868761275]],
're_lu_0': [[0.4291427868761275], [0.2359918110742001]],
'max_pool2d_0': [[0.2359918110742001], [0.25665526917146053]],
'linear_0': [[1.7037603475152991], [14.395224522473026],
[0.4373355209827423]],
'add_0': [[1.7037603475152991, 0.0], [1.7037603475152991]],
}
class TestImperativePTQKL(TestImperativePTQ):
def set_vars(self):
config = PTQConfig(KLQuantizer(), PerChannelAbsmaxQuantizer())
self.ptq = ImperativePTQ(config)
self.batch_num = 10
self.batch_size = 10
self.eval_acc_top1 = 1.0
conv2d_1_wt_thresholds = [
0.18116560578346252, 0.17079241573810577, 0.1702047884464264,
0.179476797580719, 0.1454375684261322, 0.22981858253479004
]
self.gt_thresholds = {
'conv2d_0': [[0.99267578125], [0.37695913558696836]],
'conv2d_1': [[0.19189296757394914], [0.24514256547263358],
[conv2d_1_wt_thresholds]],
'batch_norm2d_0': [[0.37695913558696836], [0.27462541429440535]],
're_lu_0': [[0.27462541429440535], [0.19189296757394914]],
'max_pool2d_0': [[0.19189296757394914], [0.19189296757394914]],
'linear_0': [[1.2839322163611087], [8.957185942414352]],
'add_0': [[1.2839322163611087, 0.0], [1.2839322163611087]],
}
if __name__ == '__main__':
unittest.main()
| 38.763587 | 119 | 0.596565 |
d0a1df088d030708da47d26fdaea38e68c22a96d | 635 | css | CSS | app/static/table.css | RamilKh/otus10_github | 87870d3109f0a745323a2eb6a605d51ae9a6b60d | [
"MIT"
] | null | null | null | app/static/table.css | RamilKh/otus10_github | 87870d3109f0a745323a2eb6a605d51ae9a6b60d | [
"MIT"
] | null | null | null | app/static/table.css | RamilKh/otus10_github | 87870d3109f0a745323a2eb6a605d51ae9a6b60d | [
"MIT"
] | null | null | null | .table {
width: 100%;
table-layout: fixed;
}
.table__thead {
background-color: #465675;
}
.table__th {
font-weight: normal;
color: #fff;
padding: 11px 10px;
text-transform: uppercase;
}
.table__tr {}
.table__tr_cycle {
background-color: #f3f3f3;
}
.table__td {
padding: 15px 10px;
color: #4c4c4c;
}
.table__th_id,
.table__td_id {
width: 50px;
}
.table__th_avatar,
.table__td_avatar {
width: 50px;
max-width: 50px;
min-width: 50px;
}
.table__td a {
color: #4c4c4c;
text-decoration: underline;
}
.table__td a:hover {
color: #4c4c4c;
text-decoration: none;
} | 13.510638 | 31 | 0.626772 |
ffea93c47e5162601a6073b305e414d8cbae6288 | 43 | html | HTML | example/fragments/fragment4.html | MrCull/fiber-fragments | eb7075e74af17dba79b2140a6e7b6c312cfbe3d0 | [
"MIT"
] | null | null | null | example/fragments/fragment4.html | MrCull/fiber-fragments | eb7075e74af17dba79b2140a6e7b6c312cfbe3d0 | [
"MIT"
] | null | null | null | example/fragments/fragment4.html | MrCull/fiber-fragments | eb7075e74af17dba79b2140a6e7b6c312cfbe3d0 | [
"MIT"
] | null | null | null | <div>
<fragment ref="content" />
</div> | 14.333333 | 30 | 0.55814 |
0bc0a0c5b56516ed3c7366dbc0aa3ccecc32fda3 | 623 | py | Python | src/posts/forms.py | trivvet/djangoAdvance | 28891893869c1c0c3cf67d7f496dda96322de18c | [
"MIT"
] | null | null | null | src/posts/forms.py | trivvet/djangoAdvance | 28891893869c1c0c3cf67d7f496dda96322de18c | [
"MIT"
] | null | null | null | src/posts/forms.py | trivvet/djangoAdvance | 28891893869c1c0c3cf67d7f496dda96322de18c | [
"MIT"
] | null | null | null | from django import forms
from crispy_forms.helper import FormHelper
from pagedown.widgets import PagedownWidget
from .models import Post
class PostForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(PostForm, self).__init__(*args, **kwargs)
self.helper = FormHelper(self)
content = forms.CharField(widget=PagedownWidget(show_preview=False))
publish = forms.DateField(widget=forms.SelectDateWidget())
class Meta:
model = Post
fields = [
"title",
"content",
"image",
"draft",
"publish",
] | 23.961538 | 72 | 0.622793 |
289e575b1e727aaa6b9e42898f5b6541685646ba | 3,796 | rb | Ruby | spec/unit/classes/selenium_node_spec.rb | theasci/puppet-selenium | 3509031a2888421281005df136e3e0a41e910a1a | [
"Apache-2.0"
] | 9 | 2015-02-22T05:46:23.000Z | 2016-10-31T19:49:07.000Z | spec/unit/classes/selenium_node_spec.rb | theasci/puppet-selenium | 3509031a2888421281005df136e3e0a41e910a1a | [
"Apache-2.0"
] | 44 | 2015-01-12T15:15:53.000Z | 2020-08-27T19:26:24.000Z | spec/unit/classes/selenium_node_spec.rb | theasci/puppet-selenium | 3509031a2888421281005df136e3e0a41e910a1a | [
"Apache-2.0"
] | 33 | 2015-01-02T11:58:10.000Z | 2019-05-14T19:25:26.000Z | require 'spec_helper'
describe 'selenium::node', :type => :class do
shared_examples 'node_with_initd' do |params|
p = {
:display => ':0',
:options => '-role node',
:jvm_args => '-Dwebdriver.enable.native.events=1',
:hub => 'http://localhost:4444/grid/register',
}
p.merge!(params) if params
p[:options] += " -hub #{p[:hub]} -log /opt/selenium/log/seleniumnode.log"
it do
should contain_class('selenium')
should contain_selenium__config('node').with({
'options' => "#{p[:options]}",
'initsystem' => "init.d",
'jvm_args' => p[:jvm_args],
})
should contain_class('selenium::node')
end
end
shared_examples 'node_with_systemd' do |params|
p = {
:display => ':0',
:options => '-Dwebdriver.enable.native.events=1 -role node',
:hub => 'http://localhost:4444/grid/register',
}
p.merge!(params) if params
p[:options] += " -hub #{p[:hub]} -log /opt/selenium/log/seleniumnode.log"
it do
should contain_class('selenium')
should contain_selenium__config('node').with({
'options' => "#{p[:options]}",
'initsystem' => "systemd",
})
should contain_class('selenium::node')
end
end
context 'for osfamily RedHat 6' do
let(:facts) {{ :osfamily => 'RedHat', :operatingsystemmajrelease => 6 }}
context 'no params' do
it_behaves_like 'node_with_initd', {}
end
context 'display => :42' do
p = { :display => ':42' }
let(:params) { p }
it_behaves_like 'node_with_initd', p
end
context 'display => :42' do
let(:params) {{ :display => [] }}
it 'should fail' do
expect {
should contain_class('selenium::node')
}.to raise_error
end
end
context 'options => -foo' do
p = { :options => '-foo' }
let(:params) { p }
it_behaves_like 'node_with_initd', p
end
context 'options => []' do
let(:params) {{ :options => [] }}
it 'should fail' do
expect {
should contain_class('selenium::node')
}.to raise_error
end
end
context 'hub => http://foo' do
p = { :hub => 'http://foo' }
let(:params) { p }
it_behaves_like 'node_with_initd', p
end
context 'hub => []' do
let(:params) {{ :hub => [] }}
it 'should fail' do
expect {
should contain_class('selenium::node')
}.to raise_error
end
end
end
context 'for osfamily RedHat 7' do
let(:facts) {{ :osfamily => 'RedHat', :operatingsystemmajrelease => 7 }}
context 'no params' do
it_behaves_like 'node_with_systemd', {}
end
context 'display => :42' do
p = { :display => ':42' }
let(:params) { p }
it_behaves_like 'node_with_systemd', p
end
context 'display => :42' do
let(:params) {{ :display => [] }}
it 'should fail' do
expect {
should contain_class('selenium::node')
}.to raise_error
end
end
context 'options => -foo' do
p = { :options => '-foo' }
let(:params) { p }
it_behaves_like 'node_with_systemd', p
end
context 'options => []' do
let(:params) {{ :options => [] }}
it 'should fail' do
expect {
should contain_class('selenium::node')
}.to raise_error
end
end
context 'hub => http://foo' do
p = { :hub => 'http://foo' }
let(:params) { p }
it_behaves_like 'node_with_systemd', p
end
context 'hub => []' do
let(:params) {{ :hub => [] }}
it 'should fail' do
expect {
should contain_class('selenium::node')
}.to raise_error
end
end
end
end
| 23.006061 | 77 | 0.536617 |
388d1f9a61e2e26d5c751de8b3a2ab328fa2f6b8 | 649 | h | C | Support/Modules/GSUtils/GSUtilsPrivExp.h | graphisoft-python/TextEngine | 20c2ff53877b20fdfe2cd51ce7abdab1ff676a70 | [
"Apache-2.0"
] | 3 | 2019-07-15T10:54:54.000Z | 2020-01-25T08:24:51.000Z | Support/Modules/GSUtils/GSUtilsPrivExp.h | graphisoft-python/GSRoot | 008fac2c6bf601ca96e7096705e25b10ba4d3e75 | [
"Apache-2.0"
] | null | null | null | Support/Modules/GSUtils/GSUtilsPrivExp.h | graphisoft-python/GSRoot | 008fac2c6bf601ca96e7096705e25b10ba4d3e75 | [
"Apache-2.0"
] | 1 | 2020-09-26T03:17:22.000Z | 2020-09-26T03:17:22.000Z | /*==========================================================================**
** GSUtilsPrivExp.h **
** **
** DEFINITIONS FOR PRIVATE EXPORTATION FROM THE GSUTILS MODULE **
**==========================================================================*/
#ifndef GSUTILSPRIVEXP_H
#define GSUTILSPRIVEXP_H
#pragma once
// from GSRoot
#include "PlatformDLLExport.hpp"
#if defined (GSUTILS_DLL_COMPILE)
#define GSUTILS_PRIVATE_EXPORT PLATFORM_DLL_EXPORT
#elif defined (GSUTILS_STATIC_COMPILE)
#define GSUTILS_PRIVATE_EXPORT
#else
#define GSUTILS_PRIVATE_EXPORT PLATFORM_DLL_IMPORT
#endif
#define GSU_PRIV
#endif
| 25.96 | 78 | 0.568567 |
bb3caaca73631a61c2c22fa214cf72e91301ec75 | 1,009 | html | HTML | manuscript/page-1674/body.html | marvindanig/daniel-deronda | ea970aca95b6276ca20c739c97dd1d20433b52e3 | [
"BlueOak-1.0.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | manuscript/page-1674/body.html | marvindanig/daniel-deronda | ea970aca95b6276ca20c739c97dd1d20433b52e3 | [
"BlueOak-1.0.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | manuscript/page-1674/body.html | marvindanig/daniel-deronda | ea970aca95b6276ca20c739c97dd1d20433b52e3 | [
"BlueOak-1.0.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | <div class="leaf "><div class="inner justify"><p class="no-indent ">pale, and calm, without a smile on their faces, moving like creatures who were fulfilling a supernatural destiny—it was a thing to go out and see, a thing to paint. The husband’s chest, back, and arms, showed very well in his close-fitting dress, and the wife was declared to be a statue.</p><p>Some suggestions were proffered concerning a possible change in the breeze, and the necessary care in putting about, but Grandcourt’s manner made the speakers understand that they were too officious, and that he knew better than they.</p><p class=" stretch-last-line ">Gwendolen, keeping her impassable air, as they moved away from the strand, felt her imagination obstinately at work. She was not afraid of any outward dangers—she was afraid of her own wishes which were taking shapes possible and impossible, like a cloud of demon-faces. She was afraid of her own hatred, which under the cold iron touch that had compelled her</p></div> </div> | 1,009 | 1,009 | 0.777007 |
0eddc3660e102bea4f750b06e15cc28a55a827a5 | 1,058 | h | C | src/types.h | Raiona-IT/ELFReader | 9f2450566d93e0f6878a793a7e07606c3f2ea99e | [
"MIT"
] | 1 | 2018-08-24T14:04:42.000Z | 2018-08-24T14:04:42.000Z | src/types.h | Raiona-IT/ELFReader | 9f2450566d93e0f6878a793a7e07606c3f2ea99e | [
"MIT"
] | null | null | null | src/types.h | Raiona-IT/ELFReader | 9f2450566d93e0f6878a793a7e07606c3f2ea99e | [
"MIT"
] | null | null | null | #ifndef TYPES_H
#define TYPES_H
#define unsigned char ubyte_t
#define unsigned int uint_t
#define unsigned short int uword_t
#define ELF_FORM 1
#define ELF_32 0
#define ELF_64 1
#define ELF_ORG 1
#define END_BIG 0
#define END_LTL 1
struct elf_header
{
ubyte_t elf_format : 1;
ubyte_t elf_format_bit : 1;
ubyte_t elf_endianess : 1;
ubyte_t elf_version : 1;
ubyte_t elf_os : 5;
ubyte_t elf_abi ;
ubyte_t elf_pad ;
ubyte_t elf_type : 2;
ubyte_t elf_arch ;
ubyte_t elf_ver : 1;
uint_t *elf_entry ;
uint_t *elf_hdr_off ;
uint_t *elf_sct_off ;
uint_t elf_flags ;
uword_t elf_hdr_size ;
uword_t elf_hdrt_entry_size ;
uword_t elf_hdrt_entries ;
uword_t elf_sct_entry_size ;
uword_t elf_sct_entries ;
uword_t elf_sct_index ;
};
typedef struct elf_header elf_hdr;
#endif
| 24.604651 | 39 | 0.570888 |
8561ba5680d44ba9d6e7281f53f703c4107e2e9e | 248 | rs | Rust | fusestore/store/src/configs/config_test.rs | july2993/datafuse | d4447709e730025edc3a23d97a30659da49c91a5 | [
"Apache-2.0"
] | null | null | null | fusestore/store/src/configs/config_test.rs | july2993/datafuse | d4447709e730025edc3a23d97a30659da49c91a5 | [
"Apache-2.0"
] | null | null | null | fusestore/store/src/configs/config_test.rs | july2993/datafuse | d4447709e730025edc3a23d97a30659da49c91a5 | [
"Apache-2.0"
] | 1 | 2022-02-24T00:26:36.000Z | 2022-02-24T00:26:36.000Z | // Copyright 2020-2021 The Datafuse Authors.
//
// SPDX-License-Identifier: Apache-2.0.
#[test]
fn test_fuse_commit_version() -> anyhow::Result<()> {
let v = &crate::configs::config::FUSE_COMMIT_VERSION;
assert!(v.len() > 0);
Ok(())
}
| 22.545455 | 57 | 0.645161 |
47efcb3517b05aa6ec269dfce9d44509f5abef57 | 66 | css | CSS | public/css/styles.css | ochoaap/lab-05 | d5e698d1fec1c63b9f144b3fa7ebf25358274432 | [
"MIT"
] | null | null | null | public/css/styles.css | ochoaap/lab-05 | d5e698d1fec1c63b9f144b3fa7ebf25358274432 | [
"MIT"
] | null | null | null | public/css/styles.css | ochoaap/lab-05 | d5e698d1fec1c63b9f144b3fa7ebf25358274432 | [
"MIT"
] | null | null | null | @import "bass.css";
@import "layouts.css";
@import "modules.css";
| 16.5 | 22 | 0.681818 |
9c28e39cd9937614555bb54ed8b2b634556d846a | 458 | asm | Assembly | oeis/113/A113850.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/113/A113850.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/113/A113850.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A113850: Numbers whose prime factors are raised to the fifth power.
; Submitted by Jamie Morken(m4)
; 32,243,3125,7776,16807,100000,161051,371293,537824,759375,1419857,2476099,4084101,5153632,6436343,11881376,20511149,24300000,28629151,39135393,45435424,52521875,69343957,79235168,90224199,115856201
add $0,1
seq $0,232893 ; Numbers whose sum of square divisors is a palindrome in base 10 having at least two digits.
pow $0,5
div $0,859442550649180389376
| 50.888889 | 199 | 0.80786 |
d3c4fc2ccc5bd4d3d1bab2a229b3bf4985c79a18 | 1,763 | swift | Swift | Sources/MapboxCoreNavigation/Feedback/FeedbackEvent.swift | VishnuNCS/mapbox-navigation-ios | 9e42a853023d9ff1c0ed5535fd693a1b8ceb8411 | [
"MIT"
] | 748 | 2017-04-07T13:16:34.000Z | 2022-03-30T13:29:44.000Z | Sources/MapboxCoreNavigation/Feedback/FeedbackEvent.swift | VishnuNCS/mapbox-navigation-ios | 9e42a853023d9ff1c0ed5535fd693a1b8ceb8411 | [
"MIT"
] | 2,534 | 2017-04-06T17:27:13.000Z | 2022-03-31T21:53:24.000Z | Sources/MapboxCoreNavigation/Feedback/FeedbackEvent.swift | VishnuNCS/mapbox-navigation-ios | 9e42a853023d9ff1c0ed5535fd693a1b8ceb8411 | [
"MIT"
] | 296 | 2017-04-07T10:52:29.000Z | 2022-03-17T12:49:18.000Z | import Foundation
/**
Feedback event that can be created using `NavigationEventsManager.createFeedback()`.
Use `NavigationEventsManager.sendActiveNavigationFeedback(_:type:description:)` to send it to the server.
Conforms to the `Codable` protocol, so the application can store the event persistently.
*/
public class FeedbackEvent: Codable {
let coreEvent: CoreFeedbackEvent
init(eventDetails: NavigationEventDetails) {
let dictionary = try? eventDetails.asDictionary()
if dictionary == nil { assertionFailure("NavigationEventDetails can not be serialized") }
coreEvent = CoreFeedbackEvent(timestamp: Date(), eventDictionary: dictionary ?? [:])
}
func update(with type: FeedbackType, source: FeedbackSource = .user, description: String?) {
let feedbackSubTypeKey = "feedbackSubType"
coreEvent.eventDictionary["feedbackType"] = type.typeKey
// if there is a subtype for this event then append the subtype description to our list for this type of feedback
if let subtypeDescription = type.subtypeKey {
var subtypeList = [String]()
if let existingSubtypeList = coreEvent.eventDictionary[feedbackSubTypeKey] as? [String] {
subtypeList.append(contentsOf: existingSubtypeList)
}
if !subtypeList.contains(subtypeDescription) {
subtypeList.append(subtypeDescription)
}
coreEvent.eventDictionary[feedbackSubTypeKey] = subtypeList
}
coreEvent.eventDictionary["source"] = source.description
coreEvent.eventDictionary["description"] = description
}
/// :nodoc:
public var contents: [String: Any] {
coreEvent.eventDictionary
}
}
| 41.97619 | 121 | 0.690301 |
9c520f9e738125e541466685ab311da5525d90ec | 613 | js | JavaScript | src/components/seo.js | st-jay/blog | 6c5d1e37aef0ecee941292642308c17faed37dbe | [
"0BSD"
] | 3 | 2022-03-01T11:29:15.000Z | 2022-03-03T07:13:46.000Z | src/components/seo.js | st-jay/blog | 6c5d1e37aef0ecee941292642308c17faed37dbe | [
"0BSD"
] | 48 | 2022-03-01T11:25:04.000Z | 2022-03-31T07:47:45.000Z | src/components/seo.js | st-jay/blog | 6c5d1e37aef0ecee941292642308c17faed37dbe | [
"0BSD"
] | 1 | 2022-03-02T06:21:04.000Z | 2022-03-02T06:21:04.000Z | /**
* SEO component that queries for data with
* Gatsby's useStaticQuery React hook
*
* See: https://www.gatsbyjs.com/docs/use-static-query/
*/
import * as React from "react"
import PropTypes from "prop-types"
import { Helmet } from "react-helmet"
const Seo = ({ lang, meta }) => {
return (
<Helmet
htmlAttributes={{
lang
}}
/>
)
}
Seo.defaultProps = {
lang: `en`,
meta: [],
description: ``,
}
Seo.propTypes = {
description: PropTypes.string,
lang: PropTypes.string,
meta: PropTypes.arrayOf(PropTypes.object),
title: PropTypes.string,
}
export default Seo
| 17.027778 | 55 | 0.637847 |
16fd39807550b61c233cec60e6a4c5e02ef4fd24 | 282 | ts | TypeScript | src/app/modules/bsnsmtch-module/Bsnsmtch.module.ts | haelaidi/bsns-mtch-app-api | 59d1bc71333502f053476658a54ca66f6e94ad77 | [
"MIT"
] | 1 | 2022-03-11T22:06:10.000Z | 2022-03-11T22:06:10.000Z | src/app/modules/bsnsmtch-module/Bsnsmtch.module.ts | haelaidi/bsns-mtch-app-api | 59d1bc71333502f053476658a54ca66f6e94ad77 | [
"MIT"
] | null | null | null | src/app/modules/bsnsmtch-module/Bsnsmtch.module.ts | haelaidi/bsns-mtch-app-api | 59d1bc71333502f053476658a54ca66f6e94ad77 | [
"MIT"
] | null | null | null | import {Module} from '@nestjs/common';
import importToArray from 'import-to-array';
import {CoreModule} from "../Core.module";
@Module({
imports: [CoreModule],
controllers: importToArray(require('../../controllers/bsnsmtch-controller')),
})
export class BsnsmtchModule {
}
| 25.636364 | 81 | 0.716312 |
995f4901a6f6f4977ae2e274cead7dcc63dc6a4f | 587 | sql | SQL | historical/sql/ODW_BTB_BILL_AUDIT_DIM.sql | Mahe1980/btb | 29f65acb0dc5fe0f6ae03140cff87126a78e4aae | [
"Apache-2.0"
] | null | null | null | historical/sql/ODW_BTB_BILL_AUDIT_DIM.sql | Mahe1980/btb | 29f65acb0dc5fe0f6ae03140cff87126a78e4aae | [
"Apache-2.0"
] | null | null | null | historical/sql/ODW_BTB_BILL_AUDIT_DIM.sql | Mahe1980/btb | 29f65acb0dc5fe0f6ae03140cff87126a78e4aae | [
"Apache-2.0"
] | null | null | null | SELECT
BTB_FILE_KEY,
LANDED_ADJ_RECORDS,
LANDED_ADJ_VALUE,
LANDED_EVENT_RECORDS,
LANDED_EVENT_VALUE,
LANDED_PRODUCT_RECORDS,
LANDED_PRODUCT_VALUE,
WAREHOUSE_ADJ_RECORDS,
WAREHOUSE_ADJ_VALUE,
WAREHOUSE_EVENT_RECORDS,
WAREHOUSE_EVENT_VALUE,
WAREHOUSE_PRODUCT_RECORDS,
WAREHOUSE_PRODUCT_VALUE,
TOTAL_RECORDS_LANDED,
TOTAL_LANDED_VALUE,
TOTAL_RECORDS_WAREHOUSED,
TOTAL_VALUE_WAREHOUSED,
PROCESSED_DATETIME,
MD_INS_TS
FROM ODW_BTB_BILL_AUDIT_DIM
WHERE (
MD_INS_TS >= '{from_ts}'
AND MD_INS_TS < '{to_ts}'
);
| 22.576923 | 30 | 0.747871 |
6ede5c82e0d04163eb9516914b5bf4ebb5fad380 | 2,707 | swift | Swift | YouPlayer/Features/VieoList/VideoListViewModel.swift | emasso/YouPlay | 90c29b6197bdc3bcb49fce45165bb60568464058 | [
"MIT"
] | null | null | null | YouPlayer/Features/VieoList/VideoListViewModel.swift | emasso/YouPlay | 90c29b6197bdc3bcb49fce45165bb60568464058 | [
"MIT"
] | null | null | null | YouPlayer/Features/VieoList/VideoListViewModel.swift | emasso/YouPlay | 90c29b6197bdc3bcb49fce45165bb60568464058 | [
"MIT"
] | null | null | null | //
// VideoListViewModel.swift
// YouPlayer
//
// Created by Elisabet Massó on 10/11/2020.
//
import Foundation
class VideoListViewModel {
// MARK: - Parameters
fileprivate(set) var videoList: [VideoModel]?
// MARK: - Init Method
/// The list is setted with `VideoModel` objects.
init() {
videoList = []
videoList?.append(VideoModel(source: "commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg", title: "Big Buck Bunny"))
videoList?.append(VideoModel(source: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ElephantsDream.jpg", title: "Elephant Dream"))
videoList?.append(VideoModel(source: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ForBiggerBlazes.jpg", title: "For Bigger Blazes"))
videoList?.append(VideoModel(source: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ForBiggerEscapes.jpg", title: "For Bigger Escape"))
videoList?.append(VideoModel(source: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ForBiggerFun.jpg", title: "For Bigger Fun"))
videoList?.append(VideoModel(source: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ForBiggerJoyrides.jpg", title: "For Bigger Joyrides"))
videoList?.append(VideoModel(source: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerMeltdowns.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ForBiggerMeltdowns.jpg", title: "For Bigger Meltdowns"))
videoList?.append(VideoModel(source: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/Sintel.jpg", title: "Sintel"))
videoList?.append(VideoModel(source: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4", thumb: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/TearsOfSteel.jpg", title: "Tears of Steel"))
}
}
| 84.59375 | 274 | 0.76099 |
977e5ac0e7c05592abc3ca3e11ebfeb26d9ca29b | 584 | kt | Kotlin | stethohelper-sample/src/main/java/com/nicaiya/stethohelper/demo/ExampleApplication.kt | nicai1900/StethoHelper | 7fac2e9769a02db81445fd2e5414c78dc8d7e3cb | [
"MIT"
] | null | null | null | stethohelper-sample/src/main/java/com/nicaiya/stethohelper/demo/ExampleApplication.kt | nicai1900/StethoHelper | 7fac2e9769a02db81445fd2e5414c78dc8d7e3cb | [
"MIT"
] | null | null | null | stethohelper-sample/src/main/java/com/nicaiya/stethohelper/demo/ExampleApplication.kt | nicai1900/StethoHelper | 7fac2e9769a02db81445fd2e5414c78dc8d7e3cb | [
"MIT"
] | null | null | null | package com.nicaiya.stethohelper.demo
import android.app.Application
import com.nicaiya.stethohelper.StethoHelper
import com.nicaiya.stethohelper.StethoInterceptorWrapper
import okhttp3.OkHttpClient
class ExampleApplication : Application() {
val httpClient = initOkhttpClient()
override fun onCreate() {
super.onCreate()
StethoHelper.install(this)
}
private fun initOkhttpClient(): OkHttpClient {
val builder = OkHttpClient.Builder()
builder.addNetworkInterceptor(StethoInterceptorWrapper())
return builder.build()
}
} | 25.391304 | 65 | 0.739726 |
3b1f9ca4f44d484e7015611b6f0f4bf81332491f | 346 | asm | Assembly | oeis/152/A152241.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/152/A152241.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/152/A152241.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A152241: Products of cubes of 2 successive primes.
; 216,3375,42875,456533,2924207,10793861,33698267,83453453,296740963,726572699,1509003523,3491055413,5479701947,8254655261,15456856771,30576209383,46617130799,68267486503,107646386093,139233463487,191800552663,281913290693,403092109603
seq $0,6094 ; Products of 2 successive primes.
pow $0,3
| 57.666667 | 235 | 0.843931 |
98a012e5a993f4c6ba5ea4031555b4b8e2ea9b60 | 145 | sql | SQL | src/main/resources/db/migration/V55__Schema_add_organization_long_lat.sql | zhufeilong/c4sg-services | 6a874753d16674bbf070f714a6bf91d7cb06b245 | [
"MIT"
] | 25 | 2017-03-16T23:38:46.000Z | 2020-12-10T02:03:57.000Z | src/main/resources/db/migration/V55__Schema_add_organization_long_lat.sql | zhufeilong/c4sg-services | 6a874753d16674bbf070f714a6bf91d7cb06b245 | [
"MIT"
] | 302 | 2017-03-14T20:06:30.000Z | 2018-05-24T18:13:50.000Z | src/main/resources/db/migration/V55__Schema_add_organization_long_lat.sql | zhufeilong/c4sg-services | 6a874753d16674bbf070f714a6bf91d7cb06b245 | [
"MIT"
] | 166 | 2017-03-12T19:32:54.000Z | 2019-05-21T17:58:57.000Z | --Add map fields: longitude and latitude
ALTER TABLE organization ADD latitude decimal(9,6);
ALTER TABLE organization ADD longitude decimal(9,6); | 48.333333 | 52 | 0.806897 |
ede37ff9a74074e5541e21b80ae9cfbe95cb245e | 26,612 | sql | SQL | server/document/dump.sql | cchao1024/sleep-server | 04f1ce554d7ca9c8520c00ef0f426424fc582d95 | [
"Apache-2.0"
] | null | null | null | server/document/dump.sql | cchao1024/sleep-server | 04f1ce554d7ca9c8520c00ef0f426424fc582d95 | [
"Apache-2.0"
] | 1 | 2022-02-09T22:18:08.000Z | 2022-02-09T22:18:08.000Z | server/document/dump.sql | cchao1024/insomnia | 04f1ce554d7ca9c8520c00ef0f426424fc582d95 | [
"Apache-2.0"
] | 1 | 2019-02-23T05:06:38.000Z | 2019-02-23T05:06:38.000Z | -- MySQL dump 10.13 Distrib 8.0.15, for osx10.14 (x86_64)
--
-- Host: 127.0.0.1 Database: insomnia
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8mb4 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- 创建数据库
DROP DATABASES `insomnia`;
create database `insomnia` default character set utf8mb4;
use insomnia;
--
-- Table structure for table `comment`
--
DROP TABLE IF EXISTS `comment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `comment` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`post_id` bigint(20) unsigned NOT NULL,
`post_user_id` bigint(20) unsigned NOT NULL,
`comment_user_id` bigint(20) unsigned NOT NULL,
`content` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`images` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '帖子图片列表',
`like_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '点赞数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`review_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '评论数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6600022 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `comment`
--
LOCK TABLES `comment` WRITE;
/*!40000 ALTER TABLE `comment` DISABLE KEYS */;
INSERT INTO `comment` VALUES (6000014,10,28,30,'可口可乐看',NULL,0,'2019-05-27 03:29:48','2019-05-29 09:41:56',0),(6000015,5000015,5,4,'图片不错哦',NULL,16,'2019-05-29 09:16:00','2019-06-21 08:55:25',3),(6000016,5000015,5,3,'看到图,我就想歪了,我有罪',NULL,1,'2019-05-29 09:26:28','2019-06-05 06:42:37',1),(6600019,5000015,5,4,'擦擦擦得得','',0,'2019-05-30 02:37:06','2019-05-30 02:37:06',0),(6600020,5500016,3,5,'最后就是我了,我叫 诺敏楚仑乌罕札雅孟赫额尔德尼恩赫特古勒德日,\n我敬你一杯,开始吧。','',0,'2019-06-05 06:17:44','2019-06-05 06:20:03',1),(6600021,5500016,3,29,'初次见面,也没带什么见面礼,就送你们个汉族名字吧。你叫张三……','',0,'2019-06-05 06:22:24','2019-06-05 06:23:14',0);
/*!40000 ALTER TABLE `comment` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `fall_image`
--
DROP TABLE IF EXISTS `fall_image`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `fall_image` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`src` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`width` int(11) DEFAULT NULL COMMENT '图片宽',
`height` int(11) DEFAULT NULL COMMENT '图片高',
`like_count` int(11) unsigned DEFAULT NULL COMMENT '点赞数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1000044 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `fall_image`
--
LOCK TABLES `fall_image` WRITE;
/*!40000 ALTER TABLE `fall_image` DISABLE KEYS */;
INSERT INTO `fall_image` VALUES (1000003,'image/2019-05/35.gif',220,220,0,'2019-05-07 03:44:40','2019-05-23 01:05:59'),(1000004,'image/2019-05/34.gif',800,450,0,'2019-05-07 03:44:40','2019-05-23 01:05:59'),(1000005,'image/2019-05/22.gif',500,500,0,'2019-05-07 03:44:40','2019-05-23 01:05:59'),(1000006,'image/2019-05/23.gif',500,500,0,'2019-05-07 03:44:40','2019-05-23 01:05:59'),(1000007,'image/2019-05/37.gif',500,500,0,'2019-05-07 03:44:40','2019-05-23 01:05:59'),(1000008,'image/2019-05/27.gif',1200,301,0,'2019-05-07 03:44:41','2019-05-23 01:05:59'),(1000009,'image/2019-05/26.gif',500,500,0,'2019-05-07 03:44:41','2019-05-23 01:05:59'),(1000010,'image/2019-05/32.gif',400,400,0,'2019-05-07 03:44:41','2019-05-23 01:05:59'),(1000011,'image/2019-05/24.gif',670,670,0,'2019-05-07 03:44:41','2019-05-23 01:05:59'),(1000012,'image/2019-05/30.gif',560,531,0,'2019-05-07 03:44:41','2019-05-23 01:05:59'),(1000013,'image/2019-05/31.gif',570,296,0,'2019-05-07 03:44:42','2019-05-23 01:05:59'),(1000014,'image/2019-05/25.gif',775,500,0,'2019-05-07 03:44:42','2019-05-23 01:05:59'),(1000015,'image/2019-05/56.gif',400,400,0,'2019-05-07 03:44:42','2019-05-23 01:05:59'),(1000016,'image/2019-05/43.gif',440,440,0,'2019-05-07 03:44:42','2019-05-23 01:05:59'),(1000017,'image/2019-05/7.gif',450,450,0,'2019-05-07 03:44:42','2019-05-23 01:05:59'),(1000018,'image/2019-05/41.gif',400,400,0,'2019-05-07 03:44:43','2019-05-23 01:05:59'),(1000019,'image/2019-05/40.gif',400,225,0,'2019-05-07 03:44:43','2019-05-23 01:05:59'),(1000020,'image/2019-05/6.gif',700,495,0,'2019-05-07 03:44:43','2019-05-23 01:05:59'),(1000021,'image/2019-05/50.gif',620,349,0,'2019-05-07 03:44:43','2019-05-23 01:05:59'),(1000022,'image/2019-05/44.gif',350,622,0,'2019-05-07 03:44:43','2019-05-23 01:05:59'),(1000023,'image/2019-05/45.gif',224,168,0,'2019-05-07 03:44:44','2019-05-23 01:05:59'),(1000024,'image/2019-05/51.gif',202,162,0,'2019-05-07 03:44:44','2019-05-23 01:05:59'),(1000025,'image/2019-05/47.gif',800,450,0,'2019-05-07 03:44:44','2019-05-23 01:05:59'),(1000026,'image/2019-05/53.gif',700,701,0,'2019-05-07 03:44:44','2019-05-23 01:05:59'),(1000027,'image/2019-05/52.gif',439,439,0,'2019-05-07 03:44:44','2019-05-23 01:05:59'),(1000028,'image/2019-05/46.gif',128,160,0,'2019-05-07 03:44:44','2019-05-23 01:05:59'),(1000029,'image/2019-05/48.gif',800,450,0,'2019-05-07 03:44:45','2019-05-23 01:05:59'),(1000030,'image/2019-05/49.gif',400,399,0,'2019-05-07 03:44:45','2019-05-23 01:05:59'),(1000031,'image/2019-05/59.gif',200,280,0,'2019-05-07 03:44:45','2019-05-23 01:05:59'),(1000032,'image/2019-05/58.gif',500,500,0,'2019-05-07 03:44:46','2019-05-23 01:05:59'),(1000033,'image/2019-05/8.gif',660,495,0,'2019-05-07 03:44:46','2019-05-23 01:05:59'),(1000034,'image/2019-05/9.gif',100,100,0,'2019-05-07 03:44:46','2019-05-23 01:05:59'),(1000035,'image/2019-05/14.gif',350,250,0,'2019-05-07 03:44:46','2019-05-23 01:05:59'),(1000036,'image/2019-05/28.gif',500,500,0,'2019-05-07 03:44:46','2019-05-23 01:05:59'),(1000037,'image/2019-05/29.gif',200,112,0,'2019-05-07 03:44:46','2019-05-23 01:05:59'),(1000038,'image/2019-05/15.gif',620,349,0,'2019-05-07 03:44:47','2019-05-23 01:05:59'),(1000039,'image/2019-05/17.gif',580,435,0,'2019-05-07 03:44:47','2019-05-23 01:05:59'),(1000040,'image/2019-05/16.gif',700,701,0,'2019-05-07 03:44:47','2019-05-23 01:05:59'),(1000041,'image/2019-05/13.gif',500,500,0,'2019-05-07 03:44:47','2019-05-23 01:05:59'),(1000042,'image/2019-05/39.gif',800,450,0,'2019-05-07 03:44:48','2019-05-23 01:05:59'),(1000043,'image/2019-05/38.gif',300,300,0,'2019-05-07 03:44:48','2019-05-23 01:05:59');
/*!40000 ALTER TABLE `fall_image` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `fall_music`
--
DROP TABLE IF EXISTS `fall_music`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `fall_music` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`singer` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`src` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`cover_img` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '专辑图',
`name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '帖子图片列表',
`like_count` int(11) DEFAULT NULL COMMENT '点赞数',
`play_count` int(11) DEFAULT NULL COMMENT '播放数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2000057 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `fall_music`
--
LOCK TABLES `fall_music` WRITE;
/*!40000 ALTER TABLE `fall_music` DISABLE KEYS */;
INSERT INTO `fall_music` VALUES (2000003,'Dan Gibson,John Herberman','music/2019-05/1838333.mp3','/album/2019-05/27801000.jpg','Along Peaceful Shores',0,0,'2019-05-07 03:13:11','2019-05-23 02:06:22'),(2000004,'植地雅哉','music/2019-05/9434944.mp3','/album/2019-05/5895232.jpg','流れ星',0,0,'2019-05-07 03:15:24','2019-05-23 02:06:22'),(2000005,'群星','music/2019-05/3580346.mp3','/album/2019-05/9813317.jpg','献给爱丽丝',0,0,'2019-05-07 03:19:52','2019-05-23 02:06:22'),(2000006,'Donawhale','music/2019-05/6694893.mp3','/album/2019-05/333256.jpg','비오는 밤',0,0,'2019-05-07 03:19:57','2019-05-23 02:06:22'),(2000007,'zmi','music/2019-05/3932124.mp3','/album/2019-05/4322943.jpg','Fade',0,0,'2019-05-07 03:20:08','2019-05-23 02:06:22'),(2000008,'Dan Gibson','music/2019-05/4551610.mp3','/album/2019-05/7388760.jpg','Morning Light',0,0,'2019-05-07 03:20:20','2019-05-23 02:06:22'),(2000009,'David Arkenstone','music/2019-05/7538989.mp3','/album/2019-05/2186761.jpg','Gentle Rain',0,0,'2019-05-07 03:20:30','2019-05-23 02:06:22'),(2000010,'ForeverLive','music/2019-05/7486788.mp3','/album/2019-05/6083103.jpg','Волны',0,0,'2019-05-07 03:20:38','2019-05-23 02:06:22'),(2000011,'Dan Gibson,John Herberman','music/2019-05/4215229.mp3','/album/2019-05/756745.jpg','Wishful Thinking',0,0,'2019-05-07 03:20:50','2019-05-23 02:06:22'),(2000012,'植地雅哉','music/2019-05/952663.mp3','/album/2019-05/8732868.jpg','静寂',0,0,'2019-05-07 03:21:06','2019-05-23 02:06:22'),(2000013,'Дальше От Света','music/2019-05/5865724.mp3','/album/2019-05/43750.jpg','Liveride',0,1,'2019-05-07 03:21:06','2019-05-23 02:06:22'),(2000014,'Gentle flow ジェントル·フロー','music/2019-05/3865542.mp3','/album/2019-05/175447.jpg','神山純一',0,0,'2019-05-07 03:21:11','2019-05-23 02:06:22'),(2000015,'いろのみ','music/2019-05/8111165.mp3','/album/2019-05/2927781.jpg','子守呗',0,1,'2019-05-07 03:21:28','2019-05-23 02:06:22'),(2000016,'re:plus','music/2019-05/9073257.mp3','/album/2019-05/4462197.jpg','Moonscape',0,0,'2019-05-07 03:21:30','2019-05-23 02:06:22'),(2000017,'Richard Evans','music/2019-05/4614140.mp3','/album/2019-05/5672117.jpg','Watching the Shorebirds',0,1,'2019-05-07 03:21:36','2019-05-23 02:06:22'),(2000018,'植地雅哉','music/2019-05/970738.mp3','/album/2019-05/7554958.jpg','海上の星たち',0,2,'2019-05-07 03:21:51','2019-05-23 02:06:22'),(2000019,'いろのみ','music/2019-05/61776.mp3','/album/2019-05/9009384.jpg','夕凪',0,1,'2019-05-07 03:21:55','2019-05-23 02:06:22'),(2000020,'Federico Durand','music/2019-05/4708456.mp3','/album/2019-05/361571.jpg','La casa de los abuelos',0,2,'2019-05-07 03:22:01','2019-05-23 02:06:22'),(2000021,'ChenDjoy','music/2019-05/52584.mp3','/album/2019-05/1617715.jpg','「3D雷雨助眠」Good Night Lullaby',0,1,'2019-05-07 03:22:03','2019-05-23 02:06:22'),(2000022,'群星','music/2019-05/3938659.mp3','/album/2019-05/3026213.jpg','小步舞曲',0,0,'2019-05-07 03:22:05','2019-05-23 02:06:22'),(2000023,'FJORDNE','music/2019-05/201346.mp3','/album/2019-05/427475.jpg','after you',0,1,'2019-05-07 03:22:08','2019-05-23 02:06:22'),(2000024,'hideyuki hashimoto','music/2019-05/40316.mp3','/common/default/album.jpg','kaze',0,0,'2019-05-07 03:22:13','2019-05-23 02:06:22'),(2000025,'菅野よう子','music/2019-05/1335198.mp3','/album/2019-05/6929495.jpg','northern light',0,1,'2019-05-07 03:22:17','2019-05-23 02:06:22'),(2000026,'hideyuki hashimoto','music/2019-05/6043334.mp3','/common/default/album.jpg','manabiya',0,0,'2019-05-07 03:22:19','2019-05-23 02:06:22'),(2000027,'hideyuki hashimoto','music/2019-05/4909590.mp3','/common/default/album.jpg','hajimari',0,1,'2019-05-07 03:22:21','2019-05-23 02:06:22'),(2000028,'Lights ','music/2019-05/9445119.mp3','/album/2019-05/965521.jpg','Northern Lights',0,0,'2019-05-07 03:22:23','2019-05-23 02:06:22'),(2000029,'Federico Durand','music/2019-05/3851980.mp3','/album/2019-05/2096165.jpg','El pequeño huésped sigue dormido',0,0,'2019-05-07 03:22:36','2019-05-23 02:06:22'),(2000030,'王鹏飞','music/2019-05/3834414.mp3','/album/2019-05/3244247.jpg','海边漫步(纯音乐) MIX',0,0,'2019-05-07 03:22:37','2019-05-23 02:06:22'),(2000031,'音乐治疗','music/2019-05/3749577.mp3','/album/2019-05/4424556.jpg','Rising of the Dream',0,0,'2019-05-07 03:22:39','2019-05-23 02:06:22'),(2000032,'hideyuki hashimoto','music/2019-05/154699.mp3','/common/default/album.jpg','taiwa',0,0,'2019-05-07 03:22:41','2019-05-23 02:06:22'),(2000033,'音乐治疗','music/2019-05/2616459.mp3','/album/2019-05/708356.jpg','Tender Passion',0,0,'2019-05-07 03:22:44','2019-05-23 02:06:22'),(2000034,'hideyuki hashimoto','music/2019-05/7592349.mp3','/common/default/album.jpg','ki',0,0,'2019-05-07 03:22:45','2019-05-23 02:06:22'),(2000035,'Dan Gibson,John Herberman','music/2019-05/4051619.mp3','/album/2019-05/9480109.jpg','Hymn to the Old Growth',0,0,'2019-05-07 03:22:49','2019-05-23 02:06:22'),(2000036,'hideyuki hashimoto','music/2019-05/8505162.mp3','/common/default/album.jpg','yura yura',0,0,'2019-05-07 03:22:50','2019-05-23 02:06:22'),(2000037,'hideyuki hashimoto','music/2019-05/2937190.mp3','/common/default/album.jpg','kara kara',0,0,'2019-05-07 03:22:52','2019-05-23 02:06:22'),(2000038,'Laura Sullivan','music/2019-05/7488712.mp3','/album/2019-05/3042511.jpg','Morning In The Meadow',0,0,'2019-05-07 03:22:57','2019-05-23 02:06:22'),(2000039,'Dan Gibson,John Herberman','music/2019-05/5464335.mp3','/album/2019-05/4404107.jpg','Waterline',0,0,'2019-05-07 03:23:02','2019-05-23 02:06:22'),(2000040,'Dan Gibson','music/2019-05/5721823.mp3','/album/2019-05/5556649.jpg','Across the Circular Horizon',0,0,'2019-05-07 03:23:10','2019-05-23 02:06:22'),(2000041,'Zak Gott','music/2019-05/3789874.mp3','/album/2019-05/7015196.jpg','Ocean (Pacific)',0,0,'2019-05-07 03:23:12','2019-05-23 02:06:22'),(2000042,'hideyuki hashimoto','music/2019-05/1894809.mp3','/common/default/album.jpg','tsuki',0,0,'2019-05-07 03:23:14','2019-05-23 02:06:22'),(2000043,'Della','music/2019-05/2938702.mp3','/album/2019-05/9729698.jpg','飞舞之叶',0,0,'2019-05-07 03:23:17','2019-05-23 02:06:22'),(2000044,'いろのみ','music/2019-05/875774.mp3','/album/2019-05/1125383.jpg','雫',0,0,'2019-05-07 03:23:23','2019-05-23 02:06:22'),(2000045,'Frédéric François Chopin','music/2019-05/1441195.mp3','/album/2019-05/2279388.jpg','夜曲',0,0,'2019-05-07 03:23:26','2019-05-23 02:06:22'),(2000046,'ST.FRANK','music/2019-05/9893970.mp3','/album/2019-05/3578152.jpg','Star Gaze',0,0,'2019-05-07 03:23:29','2019-05-23 02:06:22'),(2000047,'Musette','music/2019-05/1040759.mp3','/album/2019-05/4854908.jpg','24 Maj',0,0,'2019-05-07 03:23:32','2019-05-23 02:06:22'),(2000048,'Andrew Fitzgerald','music/2019-05/2074849.mp3','/album/2019-05/6182535.jpg','In the Distance',0,0,'2019-05-07 03:23:38','2019-05-23 02:06:22'),(2000049,'Roberto Cacciapaglia','music/2019-05/894645.mp3','/album/2019-05/784121.jpg','Michael',0,0,'2019-05-07 03:23:41','2019-05-23 02:06:22'),(2000050,'いろのみ','music/2019-05/748623.mp3','/album/2019-05/9115351.jpg','木陰',0,1,'2019-05-07 03:23:46','2019-05-23 02:06:22'),(2000051,'Ludy','music/2019-05/7663167.mp3','/album/2019-05/630107.jpg','피아노바다',0,0,'2019-05-07 03:23:49','2019-05-23 02:06:22'),(2000052,'Richard Evans','music/2019-05/3744925.mp3','/album/2019-05/2305822.jpg','Sea Breeze',0,0,'2019-05-07 03:23:54','2019-05-23 02:06:22'),(2000053,'植地雅哉','music/2019-05/243968.mp3','/album/2019-05/3689941.jpg','The Tide',0,0,'2019-05-07 03:23:59','2019-05-23 02:06:22'),(2000054,'hideyuki hashimoto','music/2019-05/7364100.mp3','/common/default/album.jpg','uta',0,0,'2019-05-07 03:24:00','2019-05-23 02:06:22'),(2000055,'Federico Durand','music/2019-05/4124565.mp3','/album/2019-05/6155605.jpg','Los niños escriben poemas en tiras de papel rojo',0,0,'2019-05-07 03:24:02','2019-05-23 02:06:22'),(2000056,'Dan Gibson,John Herberman','music/2019-05/8978251.mp3','/album/2019-05/7281836.jpg','Moody Afternoon',0,0,'2019-05-07 03:24:13','2019-05-23 02:06:22');
/*!40000 ALTER TABLE `fall_music` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `feed_back`
--
DROP TABLE IF EXISTS `feed_back`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `feed_back` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`content` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '反馈内容',
`email` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '联系邮箱',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `feed_back`
--
LOCK TABLES `feed_back` WRITE;
/*!40000 ALTER TABLE `feed_back` DISABLE KEYS */;
INSERT INTO `feed_back` VALUES (1,29,'hffhhchc','69598@qq.com','2019-05-09 06:34:43','2019-05-09 06:34:43');
/*!40000 ALTER TABLE `feed_back` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `post`
--
DROP TABLE IF EXISTS `post`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `post` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned NOT NULL,
`content` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`images` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '帖子图片列表',
`tags` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '帖子的Tag列表',
`like_count` int(11) unsigned DEFAULT '0' COMMENT '点赞数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`review_count` int(11) unsigned DEFAULT '0' COMMENT '评论数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5500017 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `post`
--
LOCK TABLES `post` WRITE;
/*!40000 ALTER TABLE `post` DISABLE KEYS */;
INSERT INTO `post` VALUES (5000015,5,'上午打LOL,正是激烈的时候,有一队友喊语音:“兄弟们对不起,我要回去上课了,再见。”\n然后我们各种喷!“上个毛课啊,逃课没事的啦,打完再走嘛!”\n\n然后那队友来了句:“我特么知道逃课没事,但是我特么的是老师啊!!”','/upload/image/2019_05_29/23818.jpg',NULL,22,'2019-05-29 09:13:58','2019-06-21 08:55:01',5),(5500016,3,'“哥们儿,我们内蒙喝酒有个规矩。我先介绍一下今天桌上的几个朋友,然后咱们先喝一圈。喝完之后你能说出来他们的名字,就是你认我们这些朋友,我们自己喝一杯。要是你说不出来名字,就是情谊还没到,你自己喝一杯。\n准备好没? 先从你旁边的噶拉仓巴拉丹扎木苏日丹开始,再往下是乌勒吉德勒格列日图愣巴猜…”','',NULL,7,'2019-06-05 06:15:21','2019-06-21 08:54:19',2);
/*!40000 ALTER TABLE `post` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `reply`
--
DROP TABLE IF EXISTS `reply`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `reply` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`post_id` bigint(20) NOT NULL,
`comment_id` bigint(20) NOT NULL,
`to_user_id` bigint(20) NOT NULL,
`reply_user_id` bigint(20) NOT NULL,
`content` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`images` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '帖子图片列表',
`like_count` int(11) DEFAULT '0' COMMENT '点赞数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`comment_user_id` bigint(20) NOT NULL,
`to_reply_id` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7600011 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `reply`
--
LOCK TABLES `reply` WRITE;
/*!40000 ALTER TABLE `reply` DISABLE KEYS */;
INSERT INTO `reply` VALUES (7000001,8,2,4,4,'回复 9999 的 content','imagesdf',0,'2019-05-07 08:38:43','2019-05-29 09:42:24',0,0),(7000002,8,2,4,4,'回复 9999 的 content','imagesdf',0,'2019-05-07 08:38:43','2019-05-29 09:42:24',0,0),(7000003,12,0,29,29,'dhhdjffuf',NULL,0,'2019-05-10 06:32:34','2019-05-29 09:42:24',0,0),(7000004,12,0,29,29,'oooooloo',NULL,0,'2019-05-10 07:38:09','2019-05-29 09:42:24',0,0),(7000005,12,8,29,29,'oooooloo',NULL,0,'2019-05-10 07:40:52','2019-05-29 09:42:24',0,0),(7000006,5000015,6000015,4,3,'我替我表弟问下,你这些图片是哪里下载的?',NULL,2,'2019-05-29 09:18:57','2019-06-05 06:44:05',0,0),(7000007,5000015,6000016,3,4,'你表弟我认识,他说他没问过',NULL,23,'2019-05-29 09:27:49','2019-06-05 06:44:07',0,0),(7600008,5000015,6000015,3,4,'。。。这图。。。','',4,'2019-05-30 02:08:05','2019-06-05 06:44:06',4,7000006),(7600009,5000015,6000015,4,5,'表弟: 。。。','',1,'2019-05-30 06:48:37','2019-06-21 08:55:21',4,7600008),(7600010,5500016,6600020,5,4,'我好像近视了,你的用户名倒过来怎么读来着?','',0,'2019-06-05 06:20:03','2019-06-05 06:21:34',5,0);
/*!40000 ALTER TABLE `reply` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`email` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`nick_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`avatar` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`gender` tinyint(3) DEFAULT '2' COMMENT '0女 1男 2未知',
`age` int(11) unsigned DEFAULT NULL,
`get_like` int(11) unsigned NOT NULL DEFAULT '0',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`visitor` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (1,'123456@yahoo.com','123456','123456','common/default/avatar.png',0,0,57,'2019-04-24 07:28:12','2019-05-30 05:53:12',0),(2,'666666@yahoo.com','666666','123456','common/default/avatar.png',0,0,3,'2019-04-24 07:28:12','2019-05-24 07:50:06',0),(3,'888888@qq.com','东山黄赌毒','123456','/avatar/2019_05_30/94115.jpg',1,45,10,'2019-04-24 07:28:12','2019-06-21 08:54:19',0),(4,'999999@qq.com','暗夜枫佑翼','123456','/avatar/2019_05_30/14472.jpg',0,25,45,'2019-04-24 07:28:12','2019-06-21 08:55:25',0),(5,'1000eee@qq.com','八级大狂风','123456','/avatar/2019_05_30/28881.jpg',1,23,24,'2019-04-24 07:28:12','2019-06-21 08:55:21',0),(19,'53929@qq.com','游客53929','123456','common/default/avatar.png',0,0,0,'2019-04-24 07:28:12','2019-05-07 10:11:59',1),(20,'75770@qq.com','游客75770','123456','common/default/avatar.png',0,0,0,'2019-04-24 07:28:12','2019-05-07 10:11:59',1),(21,'74357@qq.com','游客74357','123456','common/default/avatar.png',0,0,0,'2019-04-24 07:28:12','2019-05-07 10:11:59',1),(22,'67612@qq.com','游客67612','123456','common/default/avatar.png',0,0,0,'2019-04-24 07:28:12','2019-05-07 10:11:59',1),(23,'38286@qq.com','游客38286','123456','common/default/avatar.png',0,0,0,'2019-04-24 07:28:12','2019-05-07 10:11:59',1),(24,'71962@qq.com','游客71962','123456','common/default/avatar.png',0,0,0,'2019-05-07 09:42:52','2019-05-07 10:11:59',1),(25,'79419@qq.com','游客79419','123456','common/default/avatar.png',0,0,0,'2019-05-08 03:14:39','2019-05-08 03:14:39',1),(26,'19788@qq.com','游客19788','123456','common/default/avatar.png',0,0,0,'2019-05-08 06:40:20','2019-05-08 06:40:20',1),(28,'147852@163.com','陈成浩','123456','common/default/avatar.png',1,0,0,'2019-05-08 09:59:21','2019-05-09 03:50:44',0),(29,'360666@yahoo.com','360硬盘','123456','/avatar/2019_05_24/68336.jpg',1,0,48,'2019-05-09 03:42:50','2019-05-30 03:50:25',0),(30,'','游客71200','123456','common/default/avatar.png',0,0,0,'2019-05-27 03:27:51','2019-05-27 03:27:51',1),(31,'','游客56607','123456','common/default/avatar.png',0,0,0,'2019-06-21 03:55:57','2019-06-21 03:55:57',1),(32,'','游客36201','123456','common/default/avatar.png',0,0,0,'2019-06-21 08:30:36','2019-06-21 08:30:36',1);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `wish`
--
DROP TABLE IF EXISTS `wish`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `wish` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`wish_id` bigint(20) NOT NULL COMMENT '喜欢的图片id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`user_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `wish`
--
LOCK TABLES `wish` WRITE;
/*!40000 ALTER TABLE `wish` DISABLE KEYS */;
INSERT INTO `wish` VALUES (2,1000041,'2019-05-23 03:20:16','2019-05-23 03:20:16',29),(3,1000023,'2019-05-23 06:05:42','2019-05-23 06:05:42',29),(4,2000003,'2019-05-24 08:31:31','2019-05-24 08:31:31',29),(5,2000004,'2019-05-27 03:28:19','2019-05-27 03:28:19',30),(6,2000004,'2019-05-27 03:28:32','2019-05-27 03:28:32',30),(7,1000041,'2019-05-30 06:57:18','2019-05-30 06:57:18',3),(8,1000041,'2019-05-30 06:57:19','2019-05-30 06:57:19',3);
/*!40000 ALTER TABLE `wish` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-06-28 17:23:46
| 95.042857 | 7,779 | 0.706636 |
c7db73dcf3aa423ef740aface9876facd4721a97 | 980 | sql | SQL | medium/_02_xtests/cases/10011_10012_deficient_set.sql | Zhaojia2019/cubrid-testcases | 475a828e4d7cf74aaf2611fcf791a6028ddd107d | [
"BSD-3-Clause"
] | 9 | 2016-03-24T09:51:52.000Z | 2022-03-23T10:49:47.000Z | medium/_02_xtests/cases/10011_10012_deficient_set.sql | Zhaojia2019/cubrid-testcases | 475a828e4d7cf74aaf2611fcf791a6028ddd107d | [
"BSD-3-Clause"
] | 173 | 2016-04-13T01:16:54.000Z | 2022-03-16T07:50:58.000Z | medium/_02_xtests/cases/10011_10012_deficient_set.sql | Zhaojia2019/cubrid-testcases | 475a828e4d7cf74aaf2611fcf791a6028ddd107d | [
"BSD-3-Clause"
] | 38 | 2016-03-24T17:10:31.000Z | 2021-10-30T22:55:45.000Z | autocommit off;
set names utf8;
create table a ( c char(1)) charset euckr;
insert into a values('e');
select c,'a',set{c,'a'} from a;
select c,'a',set{c,'e'} from a;
select c,'w',set{c,'w'} from a;
create table e ( c char(2)) charset euckr;
insert into e values('하');
select c,'가',set{c,'가'} from e;
select c,'하',set{c,'하'} from e;
select c,'허',set{c,'허'} from e;
create table f ( c bit(8)) charset euckr;
insert into f values(B'00000010');
select c,'00000001',set{c,B'00000001'} from f;
select c,'00000010',set{c,B'00000010'} from f;
select c,'00000011',set{c,B'00000011'} from f;
create table b ( c char(1),v varchar(1)) charset euckr;
insert into b values('e','a');
select v,c,set{v,c} from b;
create table c (c char(2),v char varying(2)) charset euckr;
insert into c values('하','허');
select v,c,set{v,c} from c;
create table d ( c bit(8),v bit varying(8)) charset euckr;
insert into d values(B'00000001',B'00000000');
select v,c,set{v,c} from d;
set names iso88591;
rollback;
| 33.793103 | 59 | 0.670408 |
ac6aced382d0843fedb94e5d78c148a8ff2c697e | 896 | lua | Lua | src/ardoises/jsonhttp/socket.lua | ardoises/ardoises | 74f53bfb1d1286c81cbe8fcd6e55df6252789351 | [
"MIT"
] | null | null | null | src/ardoises/jsonhttp/socket.lua | ardoises/ardoises | 74f53bfb1d1286c81cbe8fcd6e55df6252789351 | [
"MIT"
] | null | null | null | src/ardoises/jsonhttp/socket.lua | ardoises/ardoises | 74f53bfb1d1286c81cbe8fcd6e55df6252789351 | [
"MIT"
] | null | null | null | local Common = require "ardoises.jsonhttp.common"
local Http = require "socket.http"
local Https = require "ssl.https"
local Ltn12 = require "ltn12"
local Lustache = require "lustache"
return Common (function (request)
assert (type (request) == "table")
local result = {}
request.sink = Ltn12.sink.table (result)
request.source = request.body and Ltn12.source.string (request.body)
local http = request.url:match "https://" and Https or Http
local _, status, headers = http.request (request)
print (Lustache:render ("{{{method}}} {{{status}}} {{{url}}}", {
method = request.method,
status = status,
url = request.url,
}))
result = table.concat (result)
local hs = {}
for key, value in pairs (headers) do
hs [key:lower ()] = value
end
headers = hs
return {
status = status,
headers = headers,
body = result,
}
end)
| 28.903226 | 70 | 0.640625 |
4a2cb571f9ad021391a3392e65817ca56cbc7674 | 465 | js | JavaScript | src/helpers/db.js | TulkasAstaldo/Chat-App | 9cf8171241df6cbb46136dd9ba09f732e79d6016 | [
"MIT"
] | 1 | 2020-09-02T09:39:22.000Z | 2020-09-02T09:39:22.000Z | src/helpers/db.js | TulkasAstaldo/Chat-App | 9cf8171241df6cbb46136dd9ba09f732e79d6016 | [
"MIT"
] | 1 | 2022-01-22T12:51:55.000Z | 2022-01-22T12:51:55.000Z | src/helpers/db.js | TulkasAstaldo/Chat-App | 9cf8171241df6cbb46136dd9ba09f732e79d6016 | [
"MIT"
] | null | null | null | import { firestore } from "../services/firebase";
export function readChats() {
let abc = [];
firestore
.collection("chats")
.get()
.on("value", (snapshot) => {
snapshot.forEach((snap) => {
abc.push(snap.val());
});
return abc;
});
}
export function writeChats(message) {
return firestore.collection("chats").doc().set({
content: message.content,
timestamp: message.timestamp,
uid: message.uid,
});
}
| 20.217391 | 50 | 0.589247 |
fb50a5f331e3a834999cbf6a1a0f4b6383fc7ce2 | 3,331 | h | C | Streaming Exploit/GetFieldFix.h | bditt/StreamSploit | b042a8ab728eb0cc6e4f45ae2a5b5a5980b3dbf4 | [
"Apache-2.0"
] | 2 | 2017-09-12T01:53:17.000Z | 2019-12-19T09:03:48.000Z | Streaming Exploit/GetFieldFix.h | bditt/StreamSploit | b042a8ab728eb0cc6e4f45ae2a5b5a5980b3dbf4 | [
"Apache-2.0"
] | null | null | null | Streaming Exploit/GetFieldFix.h | bditt/StreamSploit | b042a8ab728eb0cc6e4f45ae2a5b5a5980b3dbf4 | [
"Apache-2.0"
] | 2 | 2018-02-09T05:40:56.000Z | 2020-01-07T22:45:28.000Z | #pragma once
#include "stdafx.h"
#pragma once
/* Includes */
#include <windows.h>
#include <vector>
#include <sstream>
//#include "VMProtectSDK.h"
bool QuickCompare(const BYTE *pData, const BYTE *bMask, const char *szMask) {
for (; *szMask; ++szMask, ++pData, ++bMask)
if (*szMask == 'x' && *pData != *bMask) return 0;
return (*szMask) == NULL;
}
int QuickFindPattern(int dwAddress, int dwLen, BYTE *bMask, const char *szMask) {
for (std::size_t i = 0; i<(int)dwLen; i++)
if (QuickCompare((BYTE*)(dwAddress + (int)i), bMask, szMask)) return (int)(dwAddress + i);
return 0;
}
int Scan(DWORD mode, char* content, char* mask)
{
//VMProtectBeginUltra("Scan");
DWORD PageSize;
SYSTEM_INFO si;
GetSystemInfo(&si);
PageSize = si.dwPageSize;
MEMORY_BASIC_INFORMATION mi;
for (DWORD lpAddr = 0; lpAddr<0x7FFFFFFF; lpAddr += PageSize)
{
DWORD vq = VirtualQuery((void*)lpAddr, &mi, PageSize);
if (vq == ERROR_INVALID_PARAMETER || vq == 0) break;
if (mi.Type == MEM_MAPPED) continue;
if (mi.Protect == mode)
{
int addr = QuickFindPattern(lpAddr, PageSize, (PBYTE)content, mask);
if (addr != 0)
{
return addr;
}
}
}
//VMProtectEnd();
}
DWORD Unprotect(DWORD addr)
{
DWORD alloc = 0;
BYTE* tAddr = (BYTE*)addr;
do {
tAddr += 0x10;
} while (!(tAddr[0] == 0x55 && tAddr[1] == 0x8B && tAddr[2] == 0xEC));
DWORD funcSz = tAddr - (BYTE*)addr;
alloc += funcSz;
if (alloc > 0x100000)
return addr;
PVOID nFunc = VirtualAlloc(NULL, funcSz, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
if (nFunc == NULL)
return addr;
memcpy(nFunc, (BYTE*)addr, funcSz);
DWORD pos = (DWORD)nFunc;
BOOL valid = false;
do {
if (*(BYTE*)pos == 0x72 && *(BYTE*)(pos + 0x2) == 0xA1 && *(BYTE*)(pos + 0x7) == 0x8B) {
DWORD oProtect;
VirtualProtect((void*)pos, 5, PAGE_EXECUTE_READWRITE, &oProtect);
*(BYTE*)pos = 0xEB;
VirtualProtect((void*)pos, 5, oProtect, &oProtect);
DWORD cNFunc = (DWORD)nFunc;
do {
if (*(BYTE*)cNFunc == 0xE8)
{
DWORD tFunc = addr + (cNFunc - (DWORD)nFunc);
DWORD oFunc = (tFunc + *(DWORD*)(tFunc + 1)) + 5;
if (oFunc % 16 == 0)
{
DWORD rebFAddr = oFunc - cNFunc - 5;
memcpy((PVOID)(cNFunc + 1), &rebFAddr, 4);
}
}
cNFunc += 1;
} while (cNFunc - (DWORD)nFunc < funcSz);
valid = true;
}
pos += 1;
} while (pos < (DWORD)nFunc + funcSz);
if (!valid) {
VirtualFree(nFunc, funcSz, MEM_RELEASE);
return addr;
}
return (DWORD)nFunc;
}
namespace SignatureScanner {
int Scan(const char* arrayofbytes, const char* mask) {
for (int i = (int)GetModuleHandle(NULL); i <= 0xF000000; ++i) {
if (QuickCompare((BYTE*)i, (BYTE*)arrayofbytes, mask))
return i;
}
return NULL;
};
}
DWORD based = (DWORD)GetModuleHandle("RobloxPlayerBeta.exe");
DWORD getaddyz(int address) {
return (address - 0x400000 + based);
}
int GETFIELD_ADDRESS; //Unprotect(SignatureScanner::Scan("\x55\x8B\xEC\x83\xEC\x10\x53\x56\x8B\x75\x08\x57\xFF\x75\x0C\x56\xE8\x00\x00\x00\x00\x8B\x55\x10\x83\xC4\x08\x8B\xCA\x8B\xF8\x8D\x59\x01\x8A\x01\x41\x84\xC0\x75\xF9\x2B\xCB\x51\x52\x56\xE8\x00\x00\x00\x00\xFF\x76\x10", "xxxxxxxxxxxxxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxx????xxx")); | 26.436508 | 336 | 0.615431 |
05bae51aee99f968a0ae4e3d108b83a587b3110f | 2,616 | lua | Lua | dialogbox.lua | QwertymanO07/Mari0-SE-Bugfixes | b2961e2183eb53fc29a6f13278ce23b6996334df | [
"WTFPL"
] | null | null | null | dialogbox.lua | QwertymanO07/Mari0-SE-Bugfixes | b2961e2183eb53fc29a6f13278ce23b6996334df | [
"WTFPL"
] | 1 | 2018-10-08T00:58:16.000Z | 2018-10-08T00:58:16.000Z | dialogbox.lua | QwertymanO07/Mari0-SE-Bugfixes | b2961e2183eb53fc29a6f13278ce23b6996334df | [
"WTFPL"
] | null | null | null | dialogbox = class("dialogbox")
function dialogbox:init(text, speaker)
self.text = string.lower(text)
self.speaker = string.lower(speaker)
self.timer = 0
self.curchar = 0
self.chartimer = 0
self.lifetime = 5
self.chardelay = 0.05
--initialize colors
local curcolor = {255, 255, 255}
local i = 1
self.textcolors = {}
while i <= #self.text do
if string.sub(self.text, i, i) == "%" then
local j = i
repeat
j = j + 1
until string.sub(self.text, j, j) == "%" or j > #self.text
curcolor = string.sub(self.text, i+1, j-1):split(",")
--take out that string
self.text = string.sub(self.text, 1, i-1) .. string.sub(self.text, j+1)
else
self.textcolors[i] = {tonumber(curcolor[1]), tonumber(curcolor[2]), tonumber(curcolor[3])}
i = i + 1
end
end
end
function dialogbox:update(dt)
if self.curchar < #self.text then
self.chartimer = self.chartimer + dt
while self.chartimer > self.chardelay do
self.curchar = self.curchar + 1
self.chartimer = self.chartimer - self.chardelay
end
else
self.timer = self.timer + dt
if self.timer > self.lifetime then
return true
end
end
end
function dialogbox:draw()
local boxheight = 45
local margin = 4
local lineheight = 10
love.graphics.setColor(0, 0, 0, 127)
love.graphics.rectangle("fill", scale*margin, (height*16-boxheight-margin)*scale, (width*16-margin*2)*scale, boxheight*scale)
love.graphics.setColor(255, 255, 255)
drawrectangle(5, (height*16-margin-boxheight+1), (width*16-margin*2-2), boxheight-2)
local availablepixelsx = width*16-margin*2-6
local availablepixelsy = boxheight-5
local charsx = math.floor(availablepixelsx / 8)
local charsy = math.floor(availablepixelsy / lineheight)
for i = 1, self.curchar do
local x = math.mod(i-1, charsx)+1
local y = math.ceil(i/charsx)
if y <= charsy then
love.graphics.setColor(self.textcolors[i])
properprint(string.sub(self.text, i, i), (7+(x-1)*8)*scale, (height*16-boxheight-margin+4+(y-1)*lineheight)*scale)
else
--abort!
self.curchar = #self.text
end
end
if self.speaker then
love.graphics.setColor(0, 0, 0, 127)
love.graphics.rectangle("fill", scale*margin, (height*16-boxheight-margin-10)*scale, (5+#self.speaker*8)*scale, 10*scale)
--love.graphics.setColor(255, 255, 255)
--drawrectangle(5, (height*16-margin-boxheight+1-10), (3+#self.speaker*8), 11)
love.graphics.setColor(self.color or {232, 130, 30})
properprint(self.speaker, (margin+2)*scale, (height*16-margin-boxheight+1-9)*scale)
end
end | 29.727273 | 127 | 0.661315 |
861e4b08ca7a48e67d4f89e39fc2446297d9ab74 | 652 | rs | Rust | build.rs | nyurik/osmpbf | 43cdcc74c98eda9b6342e3526d9ef9d9ef686ac2 | [
"Apache-2.0",
"MIT"
] | null | null | null | build.rs | nyurik/osmpbf | 43cdcc74c98eda9b6342e3526d9ef9d9ef686ac2 | [
"Apache-2.0",
"MIT"
] | null | null | null | build.rs | nyurik/osmpbf | 43cdcc74c98eda9b6342e3526d9ef9d9ef686ac2 | [
"Apache-2.0",
"MIT"
] | null | null | null | use std::io::Write;
static MOD_RS: &[u8] = b"
/// Generated from protobuf.
pub mod fileformat;
/// Generated from protobuf.
pub mod osmformat;
";
fn main() -> Result<(), Box<dyn std::error::Error>> {
let proto_files = ["src/proto/fileformat.proto", "src/proto/osmformat.proto"];
for path in &proto_files {
println!("cargo:rerun-if-changed={}", path);
}
let out_dir = std::env::var("OUT_DIR")?;
protobuf_codegen_pure::Codegen::new()
.out_dir(&out_dir)
.inputs(&proto_files)
.include("src/proto")
.run()?;
std::fs::File::create(out_dir + "/mod.rs")?.write_all(MOD_RS)?;
Ok(())
}
| 22.482759 | 82 | 0.599693 |
b1497fdd137dfd94a4741f8b82fe5488348bca1c | 627 | css | CSS | assets/css/scrollbars.css | LA-DSI/justy | 331ec707d82c7bac8b233d8356e4d882835e4d5d | [
"MIT"
] | 2 | 2022-03-19T10:35:59.000Z | 2022-03-31T21:05:57.000Z | assets/css/scrollbars.css | LA-DSI/justy | 331ec707d82c7bac8b233d8356e4d882835e4d5d | [
"MIT"
] | null | null | null | assets/css/scrollbars.css | LA-DSI/justy | 331ec707d82c7bac8b233d8356e4d882835e4d5d | [
"MIT"
] | 2 | 2021-12-29T14:46:29.000Z | 2022-03-12T11:20:47.000Z | ::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-track {
background-color: #061b52;
}
::-webkit-scrollbar-thumb {
background-color: #fd5fec;
border-radius: 20px;
border: 5px solid #061b52;
}
textarea::-webkit-scrollbar,
.desc-text::-webkit-scrollbar,
#name::-webkit-scrollbar {
width: 2px;
height: 2px;
}
textarea::-webkit-scrollbar-thumb,
.desc-text::-webkit-scrollbar-thumb,
#name::-webkit-scrollbar-thumb {
background-color: #5ff5f7;
border: none;
}
textarea::-webkit-scrollbar-track,
.desc-text::-webkit-scrollbar-track,
#name::-webkit-scrollbar-track {
background: none;
}
| 17.914286 | 36 | 0.700159 |
5717808c2fc1bf9c784fcada5219b71ebce5b2ce | 162 | c | C | tools/scons/src/add.c | colin-zhou/mrfs | 12b8ed1f06bb1a8ed0637a3ee78231c5f8eec6d1 | [
"MIT"
] | 8 | 2017-12-23T10:40:57.000Z | 2021-05-04T06:56:03.000Z | tools/scons/src/add.c | colin-zhou/mrfs | 12b8ed1f06bb1a8ed0637a3ee78231c5f8eec6d1 | [
"MIT"
] | null | null | null | tools/scons/src/add.c | colin-zhou/mrfs | 12b8ed1f06bb1a8ed0637a3ee78231c5f8eec6d1 | [
"MIT"
] | 1 | 2019-01-29T06:39:04.000Z | 2019-01-29T06:39:04.000Z | #include <stdio.h>
#include "add.h"
static int add(int i1, int i2)
{
// return 0;
return i1 + i2;
}
int cacl(int i1, int i2)
{
return add(i1, i2);
}
| 11.571429 | 30 | 0.574074 |
b2cdb0c942905c9f4fb6dbf73dca96d1a9a5f768 | 415 | py | Python | dms/v2/meal/__init__.py | moreal/DMS-api | 9624e28764ec4535002677671e10a09d762d19a8 | [
"MIT"
] | null | null | null | dms/v2/meal/__init__.py | moreal/DMS-api | 9624e28764ec4535002677671e10a09d762d19a8 | [
"MIT"
] | null | null | null | dms/v2/meal/__init__.py | moreal/DMS-api | 9624e28764ec4535002677671e10a09d762d19a8 | [
"MIT"
] | 1 | 2018-09-29T14:35:20.000Z | 2018-09-29T14:35:20.000Z | import datetime
import requests
import json
from dms.v2.config import DMS_URL
class Meal():
@staticmethod
def get(date: datetime.date or str=datetime.date.today()):
if not isinstance(date, str):
date = str(date)
resp = requests.get(f"http://{DMS_URL}/v2/meal/{date}")
meals = json.loads(resp.text)
return meals['breakfast'], meals['lunch'], meals['dinner']
| 21.842105 | 66 | 0.636145 |
9bdd7b190a778d0af543ed1684bb380d3eabde6b | 567 | js | JavaScript | src/Services/firebaseConnection.js | JaksonJose/CallingWebSytems | 0454e4b6939033e229a5dadb4a22b2f5247d365f | [
"MIT"
] | null | null | null | src/Services/firebaseConnection.js | JaksonJose/CallingWebSytems | 0454e4b6939033e229a5dadb4a22b2f5247d365f | [
"MIT"
] | null | null | null | src/Services/firebaseConnection.js | JaksonJose/CallingWebSytems | 0454e4b6939033e229a5dadb4a22b2f5247d365f | [
"MIT"
] | null | null | null | import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';
import 'firebase/storage';
let firebaseConfig = {
apiKey: "AIzaSyB5EdTBrmsVE6IwcVN4QU-gOxgGTXoAM5s",
authDomain: "websytemsproject.firebaseapp.com",
projectId: "websytemsproject",
storageBucket: "websytemsproject.appspot.com",
messagingSenderId: "985324191884",
appId: "1:985324191884:web:062c86a2eec1f6c010bba9",
measurementId: "G-C9E5VP8GVD"
};
// Initialize Firebase
if (!firebase.apps.length) firebase.initializeApp(firebaseConfig);
export default firebase; | 31.5 | 66 | 0.786596 |
bf2f312781af47f8d84d7fc23641779d4fdf4280 | 3,373 | rs | Rust | src/lib.rs | caemor/aer | f92a21ef6b512a0bfc86af43208917f8bd8c8cb7 | [
"MIT"
] | 7 | 2020-04-06T18:41:19.000Z | 2020-10-21T12:25:54.000Z | src/lib.rs | caemor/aer | f92a21ef6b512a0bfc86af43208917f8bd8c8cb7 | [
"MIT"
] | 1 | 2020-05-13T14:04:15.000Z | 2020-05-13T14:04:15.000Z | src/lib.rs | caemor/aer | f92a21ef6b512a0bfc86af43208917f8bd8c8cb7 | [
"MIT"
] | 1 | 2020-04-06T18:41:25.000Z | 2020-04-06T18:41:25.000Z | use chrono::prelude::*;
use core::fmt::{self, Debug};
use embedded_graphics::pixelcolor::BinaryColor::{Off as White, On as Black};
use embedded_graphics::{
drawable::Drawable,
fonts::*,
geometry::Point,
pixelcolor::BinaryColor,
primitives::{Line, Primitive, Rectangle},
style::{PrimitiveStyle, Styled},
text_style, DrawTarget,
};
mod weather;
pub use weather::*;
#[cfg(feature = "epd4in2")]
mod forecast;
#[cfg(feature = "epd4in2")]
pub use forecast::*;
mod sensor;
pub use sensor::*;
mod time;
pub use time::*;
mod influx;
pub use influx::*;
mod static_vars;
pub use static_vars::*;
pub fn height() -> i32 {
#[cfg(feature = "epd2in9")]
return epd_waveshare::epd2in9::WIDTH as i32;
#[cfg(feature = "epd4in2")]
return epd_waveshare::epd4in2::HEIGHT as i32;
}
pub fn width() -> i32 {
#[cfg(feature = "epd2in9")]
return epd_waveshare::epd2in9::HEIGHT as i32;
#[cfg(feature = "epd4in2")]
return epd_waveshare::epd4in2::WIDTH as i32;
}
pub fn style_def() -> PrimitiveStyle<BinaryColor> {
PrimitiveStyle::with_stroke(Black, 1)
}
pub fn line(start: Point, end: Point) -> Styled<Line, PrimitiveStyle<BinaryColor>> {
Line::new(start, end).into_styled(style_def())
}
pub fn rectangle(start: Point, end: Point) -> Styled<Rectangle, PrimitiveStyle<BinaryColor>> {
Rectangle::new(start, end).into_styled(PrimitiveStyle::with_fill(White))
}
pub fn text_6x8<T: DrawTarget<BinaryColor>>(display: &mut T, text: &str, top_left: Point) {
draw_text(display, text, top_left, Font6x8);
}
/// Doesn't support as many different ascii chars
pub fn text_6x12<T: DrawTarget<BinaryColor>>(display: &mut T, text: &str, top_left: Point) {
draw_text(display, text, top_left, Font6x12);
}
pub fn text_8x16<T: DrawTarget<BinaryColor>>(display: &mut T, text: &str, top_left: Point) {
draw_text(display, text, top_left, Font8x16);
}
pub fn text_12x16<T: DrawTarget<BinaryColor>>(display: &mut T, text: &str, top_left: Point) {
draw_text(display, text, top_left, Font12x16);
}
pub fn text_24x32<T: DrawTarget<BinaryColor>>(display: &mut T, text: &str, top_left: Point) {
draw_text(display, text, top_left, Font24x32);
}
pub fn draw_text<T: DrawTarget<BinaryColor>, F: Copy + Font>(
display: &mut T,
text: &str,
top_left: Point,
font: F,
) {
// epd4in2 doesn't fail there
let _ = Text::new(text, top_left)
.into_styled(text_style!(
font = font,
text_color = Black,
background_color = White
))
.draw(display);
}
fn daystr(day: &Weekday) -> &str {
match day {
Weekday::Mon => "Mon",
Weekday::Tue => "Tue",
Weekday::Wed => "Wed",
Weekday::Thu => "Thu",
Weekday::Fri => "Fri",
Weekday::Sat => "Sat",
Weekday::Sun => "Sun",
}
}
pub fn error<T: core::fmt::Display>(desc: &str, error: T) {
let fmt = format!("Error in {}: {}", desc, error);
log::error!("{}", &fmt);
err_influx(fmt);
}
#[derive(Debug)]
pub enum Status {
STARTUP,
SHUTDOWN,
}
impl fmt::Display for Status {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
use Status::*;
write!(
f,
"{}",
match self {
STARTUP => "STARTUP",
SHUTDOWN => "SHUTDOWN",
}
)
}
}
| 26.351563 | 94 | 0.615476 |
576f4288f45fbe29d6b39e4b236860a3a29f5c7b | 787 | c | C | message.c | celestialphineas/myshell | 2cde9a77c9ad975cb8037fbccf27c955ce7beab3 | [
"MIT"
] | null | null | null | message.c | celestialphineas/myshell | 2cde9a77c9ad975cb8037fbccf27c955ce7beab3 | [
"MIT"
] | null | null | null | message.c | celestialphineas/myshell | 2cde9a77c9ad975cb8037fbccf27c955ce7beab3 | [
"MIT"
] | null | null | null | #include <wait.h>
#include "message.h"
#include "global.h"
void print_docs(const char *filename)
{
char path[MAX_PATH_LEN];
if(MYSHELL_PATH)
{
strcpy(path, MYSHELL_PATH);
strcat(path, "/");
}
strcat(path, DOC_PATH);
strcat(path, filename);
if(access(path, R_OK))
{
printf("myshell: Undocumented \"%s\"\n", filename);
}
else
{
int status;
pid_t forked = fork();
if(!forked) execl("/bin/cat", "cat", path, NULL);
else if(forked == -1) exit(1);
else wait(&status);
}
puts("");
return;
}
void print_myshell_err(const char *message)
{
write(2, "myshell: ", strlen("myshell: "));
write(2, message, strlen(message));
write(2, "\n", strlen("\n"));
return;
} | 21.27027 | 59 | 0.551461 |
d5b8b3996b87b381b6e96543cae652e1afb458cb | 7,922 | c | C | components/lvgl/gen/lv_widgets/luat_lv_table.c | pengxxxxx/LuatOS | dc163e7dc2d5230901b7ce57566d662d1954546e | [
"MIT"
] | 217 | 2019-12-29T15:52:46.000Z | 2022-03-29T05:44:29.000Z | components/lvgl/gen/lv_widgets/luat_lv_table.c | zhangyinpeng/LuatOS | 7543d59cbfe0fbb9c9ba1c3a0b506660c783367a | [
"MIT"
] | 64 | 2019-12-30T05:50:04.000Z | 2022-03-06T03:48:56.000Z | components/lvgl/gen/lv_widgets/luat_lv_table.c | zhangyinpeng/LuatOS | 7543d59cbfe0fbb9c9ba1c3a0b506660c783367a | [
"MIT"
] | 59 | 2020-01-09T03:46:01.000Z | 2022-03-27T03:17:36.000Z |
#include "luat_base.h"
#include "lvgl.h"
#include "luat_lvgl.h"
// lv_obj_t* lv_table_create(lv_obj_t* par, lv_obj_t* copy)
int luat_lv_table_create(lua_State *L) {
LV_DEBUG("CALL lv_table_create");
lv_obj_t* par = (lv_obj_t*)lua_touserdata(L, 1);
lv_obj_t* copy = (lv_obj_t*)lua_touserdata(L, 2);
lv_obj_t* ret = NULL;
ret = lv_table_create(par ,copy);
if (ret) lua_pushlightuserdata(L, ret); else lua_pushnil(L);
return 1;
}
// void lv_table_set_cell_value(lv_obj_t* table, uint16_t row, uint16_t col, char* txt)
int luat_lv_table_set_cell_value(lua_State *L) {
LV_DEBUG("CALL lv_table_set_cell_value");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
char* txt = (char*)luaL_checkstring(L, 4);
lv_table_set_cell_value(table ,row ,col ,txt);
return 0;
}
// void lv_table_set_row_cnt(lv_obj_t* table, uint16_t row_cnt)
int luat_lv_table_set_row_cnt(lua_State *L) {
LV_DEBUG("CALL lv_table_set_row_cnt");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row_cnt = (uint16_t)luaL_checkinteger(L, 2);
lv_table_set_row_cnt(table ,row_cnt);
return 0;
}
// void lv_table_set_col_cnt(lv_obj_t* table, uint16_t col_cnt)
int luat_lv_table_set_col_cnt(lua_State *L) {
LV_DEBUG("CALL lv_table_set_col_cnt");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t col_cnt = (uint16_t)luaL_checkinteger(L, 2);
lv_table_set_col_cnt(table ,col_cnt);
return 0;
}
// void lv_table_set_col_width(lv_obj_t* table, uint16_t col_id, lv_coord_t w)
int luat_lv_table_set_col_width(lua_State *L) {
LV_DEBUG("CALL lv_table_set_col_width");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t col_id = (uint16_t)luaL_checkinteger(L, 2);
lv_coord_t w = (lv_coord_t)luaL_checknumber(L, 3);
lv_table_set_col_width(table ,col_id ,w);
return 0;
}
// void lv_table_set_cell_align(lv_obj_t* table, uint16_t row, uint16_t col, lv_label_align_t align)
int luat_lv_table_set_cell_align(lua_State *L) {
LV_DEBUG("CALL lv_table_set_cell_align");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
lv_label_align_t align = (lv_label_align_t)luaL_checkinteger(L, 4);
lv_table_set_cell_align(table ,row ,col ,align);
return 0;
}
// void lv_table_set_cell_type(lv_obj_t* table, uint16_t row, uint16_t col, uint8_t type)
int luat_lv_table_set_cell_type(lua_State *L) {
LV_DEBUG("CALL lv_table_set_cell_type");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
uint8_t type = (uint8_t)luaL_checkinteger(L, 4);
lv_table_set_cell_type(table ,row ,col ,type);
return 0;
}
// void lv_table_set_cell_crop(lv_obj_t* table, uint16_t row, uint16_t col, bool crop)
int luat_lv_table_set_cell_crop(lua_State *L) {
LV_DEBUG("CALL lv_table_set_cell_crop");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
bool crop = (bool)lua_toboolean(L, 4);
lv_table_set_cell_crop(table ,row ,col ,crop);
return 0;
}
// void lv_table_set_cell_merge_right(lv_obj_t* table, uint16_t row, uint16_t col, bool en)
int luat_lv_table_set_cell_merge_right(lua_State *L) {
LV_DEBUG("CALL lv_table_set_cell_merge_right");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
bool en = (bool)lua_toboolean(L, 4);
lv_table_set_cell_merge_right(table ,row ,col ,en);
return 0;
}
// char* lv_table_get_cell_value(lv_obj_t* table, uint16_t row, uint16_t col)
int luat_lv_table_get_cell_value(lua_State *L) {
LV_DEBUG("CALL lv_table_get_cell_value");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
char* ret = NULL;
ret = lv_table_get_cell_value(table ,row ,col);
lua_pushstring(L, ret);
return 1;
}
// uint16_t lv_table_get_row_cnt(lv_obj_t* table)
int luat_lv_table_get_row_cnt(lua_State *L) {
LV_DEBUG("CALL lv_table_get_row_cnt");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t ret;
ret = lv_table_get_row_cnt(table);
lua_pushinteger(L, ret);
return 1;
}
// uint16_t lv_table_get_col_cnt(lv_obj_t* table)
int luat_lv_table_get_col_cnt(lua_State *L) {
LV_DEBUG("CALL lv_table_get_col_cnt");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t ret;
ret = lv_table_get_col_cnt(table);
lua_pushinteger(L, ret);
return 1;
}
// lv_coord_t lv_table_get_col_width(lv_obj_t* table, uint16_t col_id)
int luat_lv_table_get_col_width(lua_State *L) {
LV_DEBUG("CALL lv_table_get_col_width");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t col_id = (uint16_t)luaL_checkinteger(L, 2);
lv_coord_t ret;
ret = lv_table_get_col_width(table ,col_id);
lua_pushinteger(L, ret);
return 1;
}
// lv_label_align_t lv_table_get_cell_align(lv_obj_t* table, uint16_t row, uint16_t col)
int luat_lv_table_get_cell_align(lua_State *L) {
LV_DEBUG("CALL lv_table_get_cell_align");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
lv_label_align_t ret;
ret = lv_table_get_cell_align(table ,row ,col);
lua_pushinteger(L, ret);
return 1;
}
// lv_label_align_t lv_table_get_cell_type(lv_obj_t* table, uint16_t row, uint16_t col)
int luat_lv_table_get_cell_type(lua_State *L) {
LV_DEBUG("CALL lv_table_get_cell_type");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
lv_label_align_t ret;
ret = lv_table_get_cell_type(table ,row ,col);
lua_pushinteger(L, ret);
return 1;
}
// lv_label_align_t lv_table_get_cell_crop(lv_obj_t* table, uint16_t row, uint16_t col)
int luat_lv_table_get_cell_crop(lua_State *L) {
LV_DEBUG("CALL lv_table_get_cell_crop");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
lv_label_align_t ret;
ret = lv_table_get_cell_crop(table ,row ,col);
lua_pushinteger(L, ret);
return 1;
}
// bool lv_table_get_cell_merge_right(lv_obj_t* table, uint16_t row, uint16_t col)
int luat_lv_table_get_cell_merge_right(lua_State *L) {
LV_DEBUG("CALL lv_table_get_cell_merge_right");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t row = (uint16_t)luaL_checkinteger(L, 2);
uint16_t col = (uint16_t)luaL_checkinteger(L, 3);
bool ret;
ret = lv_table_get_cell_merge_right(table ,row ,col);
lua_pushboolean(L, ret);
return 1;
}
// lv_res_t lv_table_get_pressed_cell(lv_obj_t* table, uint16_t* row, uint16_t* col)
int luat_lv_table_get_pressed_cell(lua_State *L) {
LV_DEBUG("CALL lv_table_get_pressed_cell");
lv_obj_t* table = (lv_obj_t*)lua_touserdata(L, 1);
uint16_t* row = (uint16_t*)lua_touserdata(L, 2);
uint16_t* col = (uint16_t*)lua_touserdata(L, 3);
lv_res_t ret;
ret = lv_table_get_pressed_cell(table ,row ,col);
lua_pushboolean(L, ret == LV_RES_OK ? 1 : 0);
lua_pushinteger(L, ret);
return 2;
}
| 38.643902 | 102 | 0.70462 |
982e0548adf24040f6c6619387fd2f3b603cc83e | 2,396 | swift | Swift | dog tinder/dog tinder/Database/Dog.swift | MiguelAntonioMaciasMeza/bark | 9491bbf606a631be16359389d3e371c0c7ea4ec8 | [
"MIT"
] | 1 | 2020-10-29T02:36:09.000Z | 2020-10-29T02:36:09.000Z | dog tinder/dog tinder/Database/Dog.swift | MiguelAntonioMaciasMeza/bark | 9491bbf606a631be16359389d3e371c0c7ea4ec8 | [
"MIT"
] | null | null | null | dog tinder/dog tinder/Database/Dog.swift | MiguelAntonioMaciasMeza/bark | 9491bbf606a631be16359389d3e371c0c7ea4ec8 | [
"MIT"
] | 1 | 2020-12-18T11:38:50.000Z | 2020-12-18T11:38:50.000Z | //dog.swift
//
// Dog.swift
// dog tinder
//
// Created by Derrick Lee on 10/11/20.
// Edited by Miguel Macias on 10/29/20
// Comment: Created Dog into a class to be able to change data
//
import Foundation
import SwiftUI
enum Breed: String, CaseIterable, Identifiable{
case Pomeranian = "Pomeranian"
case Husky = "Husky"
case Pitbull = "Pitbull"
case Pug = "Pug"
case GermanShephard = "German Shephard"
case Poodle = "Poodle"
case EnglishBulldog = "English Bulldog"
case GoldenRetriever = "Golden Retriever"
var id: String {self.rawValue}
}
enum Size: String, CaseIterable, Identifiable{
case teacup = "Teacup"
case small = "Small"
case medium = "Medium"
case large = "Large"
case unit = "Absolute Unit"
var id: String {self.rawValue}
}
enum Gender: String, CaseIterable, Identifiable{
case male = "Male"
case female = "Female"
var id: String {self.rawValue}
}
class Dog : Identifiable, ObservableObject{
@Published var id = UUID()
@Published var image = UIImage()
@Published var name: String
@Published var breed: Breed
@Published var gender: Gender
@Published var temperament: String
@Published var size: Size
@Published var weight: String
@Published var description: String
init (image: UIImage, name: String, breed: Breed, gender: Gender, temperament: String, size: Size , weight: String , description: String){
self.image = image
self.name = name
self.breed = breed
self.gender = gender
self.temperament = temperament
self.size = size
self.weight = weight
self.description = description
}
func hasPrefix(_ prefix: String) ->Bool{
/*for(_, attribute) in Mirror(reflecting: self).children.enumerated(){
if (attribute.label as String?) != nil{
if attribute.label!.hasPrefix(prefix) || prefix == "" {
return true
}
}
}
return false
}
*/
if self.name.hasPrefix(prefix) || self.breed.rawValue.hasPrefix(prefix) || self.gender.rawValue.hasPrefix(prefix) || self.temperament.hasPrefix(prefix) || self.weight.hasPrefix(prefix) || self.description.hasPrefix(prefix){
return true
} else {
return false
}
}
}
| 28.188235 | 231 | 0.619366 |
9690fb4c5fad5dd5d5828bcd8ba163cae7775f28 | 4,985 | html | HTML | TDObserverObservable/incdecApplet/mvc.html | ISSAE/nfp121.ed3 | 14aa1fbe7dc5213753d0a189b5ff5ba377833892 | [
"MIT"
] | 1 | 2019-03-16T11:18:10.000Z | 2019-03-16T11:18:10.000Z | TDObserverObservable/incdecApplet/mvc.html | ISSAE/nfp121.ed3 | 14aa1fbe7dc5213753d0a189b5ff5ba377833892 | [
"MIT"
] | null | null | null | TDObserverObservable/incdecApplet/mvc.html | ISSAE/nfp121.ed3 | 14aa1fbe7dc5213753d0a189b5ff5ba377833892 | [
"MIT"
] | 7 | 2019-03-22T08:35:58.000Z | 2021-12-19T08:40:53.000Z | <HTML>
<HEAD>
<TITLE>Model-View-Controller</TITLE>
</HEAD>
<BODY>
<H1>
Model-View-Controller
</H1>
<P>
An importance advance in the design and implementation of interactive graphics
applications was the development of the Model - View - Controller (MVC) paradigm.
<P>
This is not a programming language or even a code library. It is a way of
thinking about and organizing the code in GUI-intensive systems. It is a
particular instance of the general concept of 'modular programming.'
<P>
Like most good ideas, the concept of MVC is simple. You organize your application
into two basic components:
<UL>
<LI>
The model: this is the internal code and data structures for your application.
It is totally interface independent.
<LI>
The views and controllers: these are the interface 'widgets' that the user
sees and manipulates. Each view and controller is logically connected to
one or more pieces of model data.
</UL>
<P>
A view is something that graphically displays one or more pieces of model
data to the user. A view can be a number or string printed on screen, a
thermometer, a gauge, a map, and so on.
<P>
A controller is something the user can manipulate to change model data. A
controller can be a field you type into, an icon you drag around, a button
you click, and so on.
<P>
Sometimes, the same graphical object is both a view and a controller. A scroll
bar, for example, is a view that tells you where you are in a document.
ItÕs also a controller that lets you change where you are in the document.
<P>
Although the model-view-controller paradigm was developed in the context
of graphical interfaces, it in fact applies to a text or text plus grpahics
interface, such as your game manager project. In non-graphical programs,
the views are whatever you print to indicate internal values. A view might
be a table of numbers, a list of field names and field values, a graphical
drawing of a game board, and so on. A controller would be anything your program
presents to the user that lets them do things. Most typically this would
be either a menu choice, e.g.,
<PRE>
Please pick a level:
1. Beginner
2. Avergae
3. Expert
Enter level [1 - 3]:
</PRE>
<P>
or a request for a value, e.g.,
<PRE>
What's your name:
How many bombs should I hide [2 - 10]:
</PRE>
<P>
</<h2>Examples
<P>
In a spreadsheet, the model is an array of numbers and formulas and formatting
codes. The view is a grid with lines and text and graphics and so on. Each
cell in the grid is a controller; clicking on a cell lets the user change
the number or formula or format of that cell.
<P>
In a chess game, the model is an array specifying what pieces are where on
the board, and some variables indicating what the score is, and whose turn
it is. The view is a grid with graphical icons representing the various pieces.
Each icon is a controller that the user can drag from one square to another.
<H2>
How an MVC program works
</H2>
<P>
An MVC-organized program works like this:
<P>
<IMG src="mvc.gif">
<UL>
<LI>
The user interacts with the views and controllers.
<LI>
When the user manipulates a controller, a message is sent to change the data
in the model controlled by that controller.
<LI>
When data in model change, either because of internal calculations, user
action, or some separate event such as a clock tick, messages are sent to
the associated views to show the new values to the user.
</UL>
<P>
Normally, a controller does not directly affect any view, except of course
itself, if itÕs a view controller, such as a slider. A controller
affects the model and the model updates the views. In this way, an important
property is maintained: there is nothing important on the screen that is
not represented in the model.
<H2>
Advantages of MVC
</H2>
<P>
The separation of code into model, views, and controllers has a number of
benefits:
<UL>
<LI>
Easier changes to interfaces: if we decide we want to put fancy borders on
a chessboard, use icons instead of letters for pieces, etc., all we change
is interface code. The model code remains untouched.
<LI>
Easier porting to other platforms: Interface code is highly platform-specific.
Every platform has different kinds of graphical objects, different models
of graphics, and so on. However, numbers and arrays are the same. When porting
to another platform, only the interface code has to change. The model code
usually ports without change.
<LI>
Easier debugging: Most serious bugs are in the model. Errors in logic show
up in bad calculations, unforeseen combinations of values, and so on. If
the model is a separate body of code, you can test it directly, using test
suites (files of example calls to model functions with expected return values).
In non-MVC designs, someone has to sit in front of the program and click
away all day, hoping to make the bug happen again.
</UL>
<P>
</BODY></HTML>
| 38.643411 | 83 | 0.751053 |
a68e0ecd78dd375d9b00898cba8b07518cd42d96 | 72,233 | kt | Kotlin | app/src/main/java/com/lagradost/quicknovel/ReadActivity.kt | AbdullahM0hamed/QuickNovel | ad70b272e1eeca75a28eb4449d471e1cdeb91c5b | [
"MIT"
] | null | null | null | app/src/main/java/com/lagradost/quicknovel/ReadActivity.kt | AbdullahM0hamed/QuickNovel | ad70b272e1eeca75a28eb4449d471e1cdeb91c5b | [
"MIT"
] | null | null | null | app/src/main/java/com/lagradost/quicknovel/ReadActivity.kt | AbdullahM0hamed/QuickNovel | ad70b272e1eeca75a28eb4449d471e1cdeb91c5b | [
"MIT"
] | null | null | null | package com.lagradost.quicknovel
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.content.*
import android.content.res.ColorStateList
import android.content.res.Configuration
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Color
import android.graphics.Typeface
import android.media.AudioAttributes
import android.media.AudioFocusRequest
import android.media.AudioManager
import android.media.MediaPlayer
import android.os.BatteryManager
import android.os.Build
import android.os.Bundle
import android.speech.tts.TextToSpeech
import android.speech.tts.UtteranceProgressListener
import android.support.v4.media.session.MediaSessionCompat
import android.text.Spannable
import android.text.SpannableString
import android.util.TypedValue
import android.view.KeyEvent
import android.view.MotionEvent
import android.view.View
import android.widget.*
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.core.animation.doOnEnd
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
import androidx.core.text.HtmlCompat
import androidx.core.text.getSpans
import androidx.media.session.MediaButtonReceiver
import androidx.preference.PreferenceManager
import com.fasterxml.jackson.module.kotlin.readValue
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.button.MaterialButton
import com.google.android.material.checkbox.MaterialCheckBox
import com.jaredrummler.android.colorpicker.ColorPickerDialog
import com.jaredrummler.android.colorpicker.ColorPickerDialogListener
import com.lagradost.quicknovel.BookDownloader.getQuickChapter
import com.lagradost.quicknovel.DataStore.getKey
import com.lagradost.quicknovel.DataStore.mapper
import com.lagradost.quicknovel.DataStore.removeKey
import com.lagradost.quicknovel.DataStore.setKey
import com.lagradost.quicknovel.receivers.BecomingNoisyReceiver
import com.lagradost.quicknovel.services.TTSPauseService
import com.lagradost.quicknovel.ui.OrientationType
import com.lagradost.quicknovel.util.Coroutines.main
import com.lagradost.quicknovel.util.UIHelper
import com.lagradost.quicknovel.util.UIHelper.colorFromAttribute
import com.lagradost.quicknovel.util.UIHelper.fixPaddingStatusbar
import com.lagradost.quicknovel.util.UIHelper.popupMenu
import com.lagradost.quicknovel.util.UIHelper.requestAudioFocus
import com.lagradost.quicknovel.util.toDp
import com.lagradost.quicknovel.util.toPx
import kotlinx.android.synthetic.main.read_main.*
import kotlinx.coroutines.*
import nl.siegmann.epublib.domain.Book
import nl.siegmann.epublib.epub.EpubReader
import org.jsoup.Jsoup
import java.io.File
import java.text.SimpleDateFormat
import java.util.*
import kotlin.collections.ArrayList
import kotlin.math.abs
import kotlin.math.ceil
import kotlin.math.max
import kotlin.math.sqrt
const val OVERFLOW_NEXT_CHAPTER_DELTA = 600
const val OVERFLOW_NEXT_CHAPTER_SHOW_PROCENTAGE = 10
const val OVERFLOW_NEXT_CHAPTER_NEXT = 90
const val OVERFLOW_NEXT_CHAPTER_SAFESPACE = 20
const val TOGGLE_DISTANCE = 20f
const val TTS_CHANNEL_ID = "QuickNovelTTS"
const val TTS_NOTIFICATION_ID = 133742
fun clearTextViewOfSpans(tv: TextView) {
val wordToSpan: Spannable = SpannableString(tv.text)
val spans = wordToSpan.getSpans<android.text.Annotation>(0, tv.text.length)
for (s in spans) {
wordToSpan.removeSpan(s)
}
tv.setText(wordToSpan, TextView.BufferType.SPANNABLE)
}
fun setHighLightedText(tv: TextView, start: Int, end: Int): Boolean {
try {
val wordToSpan: Spannable = SpannableString(tv.text)
val spans = wordToSpan.getSpans<android.text.Annotation>(0, tv.text.length)
for (s in spans) {
wordToSpan.removeSpan(s)
}
wordToSpan.setSpan(
android.text.Annotation("", "rounded"),
start,
end,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
tv.setText(wordToSpan, TextView.BufferType.SPANNABLE)
return true
} catch (e: Exception) {
return false
}
}
enum class TTSActionType {
Pause,
Resume,
Stop,
}
class ReadActivity : AppCompatActivity(), ColorPickerDialogListener {
companion object {
lateinit var readActivity: ReadActivity
lateinit var images: ArrayList<ImageView>
var defFont: Typeface? = null
fun getAllFonts(): Array<File>? {
val path = "/system/fonts"
val file = File(path)
return file.listFiles()
}
}
var isFromEpub = true
lateinit var book: Book
lateinit var quickdata: BookDownloader.QuickStreamData
private fun getBookSize(): Int {
return if (isFromEpub) book.tableOfContents.tocReferences.size else quickdata.data.size
}
private fun getBookTitle(): String {
return if (isFromEpub) book.title else quickdata.meta.name
}
private fun getBookBitmap(): Bitmap? {
if (bookCover == null) {
var byteArray: ByteArray? = null
if (isFromEpub) {
if (book.coverImage != null && book.coverImage.data != null)
byteArray = book.coverImage.data
} else {
val poster = quickdata.poster
if (poster != null) {
try {
byteArray = khttp.get(poster).content
} catch (e: Exception) {
println("BITMAP ERROR: $e")
}
}
}
if (byteArray != null)
bookCover = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.size)
}
return bookCover
}
private fun getChapterName(index: Int): String {
return if (isFromEpub) book.tableOfContents.tocReferences?.get(index)?.title
?: "Chapter ${index + 1}" else quickdata.data[index].name
}
private fun Context.getChapterData(index: Int): String? {
val text =
(if (isFromEpub) book.tableOfContents.tocReferences[index].resource.reader.readText() else getQuickChapter(
quickdata.meta,
quickdata.data[index],
index
)?.html ?: return null)
val document = Jsoup.parse(text)
// REMOVE USELESS STUFF THAT WONT BE USED IN A NORMAL TXT
document.select("style").remove()
document.select("script").remove()
for (a in document.allElements) {
if (a != null && a.hasText() &&
(a.text() == chapterName || (a.tagName() == "h3" && a.text().startsWith("Chapter ${index + 1}")))
) { // IDK, SOME MIGHT PREFER THIS SETTING??
a.remove() // THIS REMOVES THE TITLE
break
}
}
return document.html()
.replace("<tr>", "<div style=\"text-align: center\">")
.replace("</tr>", "</div>")
.replace("<td>", "")
.replace("</td>", " ")
//.replace("\n\n", "\n") // REMOVES EMPTY SPACE
.replace("...", "…") // MAKES EASIER TO WORK WITH
.replace("<p>.*<strong>Translator:.*?Editor:.*>".toRegex(), "") // FUCK THIS, LEGIT IN EVERY CHAPTER
.replace("<.*?Translator:.*?Editor:.*?>".toRegex(), "") // FUCK THIS, LEGIT IN EVERY CHAPTER
}
private fun TextView.setFont(file: File?) {
if (file == null) {
this.typeface = defFont
} else {
this.typeface = Typeface.createFromFile(file)
}
}
private fun setReadTextFont(file: File?, nameCallback: ((String) -> Unit)? = null) {
if (defFont == null) defFont = read_text?.typeface
setKey(EPUB_FONT, file?.name ?: "")
read_text?.setFont(file)
read_title_text?.setFont(file)
read_title_text?.setTypeface(read_title_text?.typeface, Typeface.BOLD)
nameCallback?.invoke(UIHelper.parseFontFileName(file?.name))
}
private fun showFonts(nameCallback: (String) -> Unit) {
val bottomSheetDialog = BottomSheetDialog(this)
bottomSheetDialog.setContentView(R.layout.font_bottom_sheet)
val res = bottomSheetDialog.findViewById<ListView>(R.id.sort_click)!!
val fonts = getAllFonts() ?: return
val items = fonts.toMutableList() as ArrayList<File?>
items.add(0, null)
val currentName = getKey(EPUB_FONT) ?: ""
val sotringIndex = items.indexOfFirst { it?.name ?: "" == currentName }
/* val arrayAdapter = ArrayAdapter<String>(this, R.layout.sort_bottom_single_choice)
arrayAdapter.addAll(sortingMethods.toMutableList())
res.choiceMode = AbsListView.CHOICE_MODE_SINGLE
res.adapter = arrayAdapter
res.setItemChecked(sotringIndex, true)*/
val adapter = FontAdapter(this, sotringIndex, items)
res.adapter = adapter
res.setOnItemClickListener { _, _, which, _ ->
setReadTextFont(items[which], nameCallback)
stopTTS()
loadTextLines()
globalTTSLines.clear()
bottomSheetDialog.dismiss()
}
bottomSheetDialog.show()
}
fun callOnPause(): Boolean {
if (!isTTSPaused) {
isTTSPaused = true
return true
}
return false
}
fun callOnPlay(): Boolean {
if (isTTSPaused) {
isTTSPaused = false
return true
}
return false
}
fun callOnStop(): Boolean {
if (isTTSRunning) {
stopTTS()
return true
}
return false
}
fun callOnNext(): Boolean {
if (isTTSRunning) {
nextTTSLine()
return true
} else if (isTTSPaused) {
isTTSRunning = true
nextTTSLine()
return true
}
return false
}
private val intentFilter = IntentFilter(AudioManager.ACTION_AUDIO_BECOMING_NOISY)
private val myNoisyAudioStreamReceiver = BecomingNoisyReceiver()
private var tts: TextToSpeech? = null
private var bookCover: Bitmap? = null
override fun onColorSelected(dialog: Int, color: Int) {
when (dialog) {
0 -> setBackgroundColor(color)
1 -> setTextColor(color)
}
}
override fun onDialogDismissed(dialog: Int) {
updateImages()
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
val wasRunningTTS = isTTSRunning
stopTTS()
globalTTSLines.clear()
if (isHidden) {
hideSystemUI()
} else {
showSystemUI()
}
read_text.post {
loadTextLines()
if (wasRunningTTS) {
startTTS(readFromIndex)
}
}
}
// USING Queue system because it is faster by about 0.2s
private var currentTTSQueue: String? = null
private fun speakOut(msg: String, msgQueue: String? = null) {
canSpeak = false
//println("GOT $msg | ${msgQueue ?: "NULL"}")
if (msg.isEmpty() || msg.isBlank()) {
showMessage("No data")
return
}
if (tts != null) {
if (currentTTSQueue != msg) {
speakId++
tts!!.speak(msg, TextToSpeech.QUEUE_FLUSH, null, speakId.toString())
//println("FLUSH $msg")
}
if (msgQueue != null) {
speakId++
tts!!.speak(msgQueue, TextToSpeech.QUEUE_ADD, null, speakId.toString())
currentTTSQueue = msgQueue
//println("ADD $msgQueue")
}
}
}
private fun getCurrentTTSLineScroll(): Int? {
if (ttsStatus == TTSStatus.IsRunning || ttsStatus == TTSStatus.IsPaused) {
try {
if (readFromIndex >= 0 && readFromIndex < globalTTSLines.size) {
val line = globalTTSLines[readFromIndex]
val textLine = getMinMax(line.startIndex, line.endIndex)
if (textLine != null) {
return textLine.max + (read_title_text?.height
?: 0) - (read_toolbar_holder?.height ?: 0)//dimensionFromAttribute(R.attr.actionBarSize))
}
}
} catch (e: Exception) {
//IDK SMTH HAPPEND
}
}
return null
}
public override fun onDestroy() {
val scroll = getCurrentTTSLineScroll()
if (scroll != null) {
setKey(
EPUB_CURRENT_POSITION_SCROLL,
getBookTitle(), scroll
)
}
with(NotificationManagerCompat.from(this)) {
// notificationId is a unique int for each notification that you must define
cancel(TTS_NOTIFICATION_ID)
}
if (tts != null) {
tts!!.stop()
tts!!.shutdown()
}
mMediaSessionCompat.release()
super.onDestroy()
}
private fun showMessage(msg: String) {
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show()
}
lateinit var path: String
var canSpeak = true
private var speakId = 0
enum class TTSStatus {
IsRunning,
IsPaused,
IsStopped,
}
private var _ttsStatus = TTSStatus.IsStopped
private val myAudioFocusListener =
AudioManager.OnAudioFocusChangeListener {
val pause =
when (it) {
AudioManager.AUDIOFOCUS_GAIN -> false
AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE -> false
AudioManager.AUDIOFOCUS_GAIN_TRANSIENT -> false
else -> true
}
if (pause && isTTSRunning) {
isTTSPaused = true
}
}
var focusRequest: AudioFocusRequest? = null
private fun initTTSSession() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
focusRequest = AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN).run {
setAudioAttributes(AudioAttributes.Builder().run {
setUsage(AudioAttributes.USAGE_MEDIA)
setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
build()
})
setAcceptsDelayedFocusGain(true)
setOnAudioFocusChangeListener(myAudioFocusListener)
build()
}
}
}
private fun createNotificationChannel() {
// Create the NotificationChannel, but only on API 26+ because
// the NotificationChannel class is new and not in the support library
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val name = "Text To Speech"//getString(R.string.channel_name)
val descriptionText = "The TTS notification channel" //getString(R.string.channel_description)
val importance = NotificationManager.IMPORTANCE_DEFAULT
val channel = NotificationChannel(TTS_CHANNEL_ID, name, importance).apply {
description = descriptionText
}
// Register the channel with the system
val notificationManager: NotificationManager =
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(channel)
}
}
var ttsStatus: TTSStatus
get() = _ttsStatus
set(value) {
_ttsStatus = value
if (value == TTSStatus.IsRunning) {
// mediaSession?.isActive = true
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
requestAudioFocus(focusRequest)
}
try {
registerReceiver(myNoisyAudioStreamReceiver, intentFilter)
} catch (e: Exception) {
println(e)
}
} else if (value == TTSStatus.IsStopped) {
// mediaSession?.isActive = false
try {
unregisterReceiver(myNoisyAudioStreamReceiver)
} catch (e: Exception) {
println(e)
}
}
if (value == TTSStatus.IsStopped) {
with(NotificationManagerCompat.from(this)) {
// notificationId is a unique int for each notification that you must define
cancel(TTS_NOTIFICATION_ID)
}
} else {
main {
val builder = NotificationCompat.Builder(this, TTS_CHANNEL_ID)
.setSmallIcon(R.drawable.ic_baseline_volume_up_24) //TODO NICE ICON
.setContentTitle(getBookTitle())
.setContentText(chapterName)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.setOnlyAlertOnce(true)
.setOngoing(true)
val icon = withContext(Dispatchers.IO) { getBookBitmap() }
if (icon != null) builder.setLargeIcon(icon)
builder.setStyle(androidx.media.app.NotificationCompat.MediaStyle())
// .setMediaSession(mediaSession?.sessionToken))
val actionTypes: MutableList<TTSActionType> = ArrayList()
if (value == TTSStatus.IsPaused) {
actionTypes.add(TTSActionType.Resume)
} else if (value == TTSStatus.IsRunning) {
actionTypes.add(TTSActionType.Pause)
}
actionTypes.add(TTSActionType.Stop)
for ((index, i) in actionTypes.withIndex()) {
val resultIntent = Intent(this, TTSPauseService::class.java)
resultIntent.putExtra("id", i.ordinal)
val pending: PendingIntent = PendingIntent.getService(
this, 3337 + index,
resultIntent,
PendingIntent.FLAG_UPDATE_CURRENT
)
builder.addAction(
NotificationCompat.Action(
when (i) {
TTSActionType.Resume -> R.drawable.ic_baseline_play_arrow_24
TTSActionType.Pause -> R.drawable.ic_baseline_pause_24
TTSActionType.Stop -> R.drawable.ic_baseline_stop_24
}, when (i) {
TTSActionType.Resume -> "Resume"
TTSActionType.Pause -> "Pause"
TTSActionType.Stop -> "Stop"
}, pending
)
)
}
with(NotificationManagerCompat.from(this)) {
// notificationId is a unique int for each notification that you must define
notify(TTS_NOTIFICATION_ID, builder.build())
}
}
}
reader_bottom_view_tts?.visibility = if (isTTSRunning && !isHidden) View.VISIBLE else View.GONE
reader_bottom_view?.visibility = if (!isTTSRunning && !isHidden) View.VISIBLE else View.GONE
tts_action_pause_play?.setImageResource(
when (value) {
TTSStatus.IsPaused -> R.drawable.ic_baseline_play_arrow_24
TTSStatus.IsRunning -> R.drawable.ic_baseline_pause_24
else -> { // IDK SHOULD BE AN INVALID STATE
R.drawable.ic_baseline_play_arrow_24
}
}
)
}
private var isTTSRunning: Boolean
get() = ttsStatus != TTSStatus.IsStopped
set(running) {
ttsStatus = if (running) TTSStatus.IsRunning else TTSStatus.IsStopped
}
var isTTSPaused: Boolean
get() = ttsStatus == TTSStatus.IsPaused
set(paused) {
ttsStatus = if (paused) TTSStatus.IsPaused else TTSStatus.IsRunning
if (paused) {
readFromIndex--
interruptTTS()
} else {
playDummySound() // FUCK ANDROID
}
}
private var lockTTS = true
private val lockTTSOnPaused = false
private var scrollWithVol = true
var minScroll: Int? = 0
var maxScroll: Int? = 0
var isHidden = true
private fun hideSystemUI() {
isHidden = true
// Enables regular immersive mode.
// For "lean back" mode, remove SYSTEM_UI_FLAG_IMMERSIVE.
// Or for "sticky immersive," replace it with SYSTEM_UI_FLAG_IMMERSIVE_STICKY
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
// Set the content to appear under the system bars so that the
// content doesn't resize when the system bars hide and show.
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// Hide the nav bar and status bar
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_FULLSCREEN)
fun lowerBottomNav(v: View) {
v.translationY = 0f
ObjectAnimator.ofFloat(v, "translationY", v.height.toFloat()).apply {
duration = 200
start()
}.doOnEnd {
v.visibility = View.GONE
}
}
lowerBottomNav(reader_bottom_view)
lowerBottomNav(reader_bottom_view_tts)
read_toolbar_holder.translationY = 0f
ObjectAnimator.ofFloat(read_toolbar_holder, "translationY", -read_toolbar_holder.height.toFloat()).apply {
duration = 200
start()
}.doOnEnd {
read_toolbar_holder.visibility = View.GONE
}
}
// Shows the system bars by removing all the flags
// except for the ones that make the content appear under the system bars.
private fun showSystemUI() {
isHidden = false
if (this.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
} else {
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
}
read_toolbar_holder.visibility = View.VISIBLE
reader_bottom_view.visibility = if (isTTSRunning) View.GONE else View.VISIBLE
reader_bottom_view_tts.visibility = if (isTTSRunning) View.VISIBLE else View.GONE
fun higherBottomNavView(v: View) {
v.translationY = v.height.toFloat()
ObjectAnimator.ofFloat(v, "translationY", 0f).apply {
duration = 200
start()
}
}
higherBottomNavView(reader_bottom_view)
higherBottomNavView(reader_bottom_view_tts)
read_toolbar_holder.translationY = -read_toolbar_holder.height.toFloat()
ObjectAnimator.ofFloat(read_toolbar_holder, "translationY", 0f).apply {
duration = 200
start()
}
}
private fun updateTimeText() {
val currentTime: String = SimpleDateFormat("HH:mm", Locale.getDefault()).format(Date())
if (read_time != null) {
read_time.text = currentTime
read_time.postDelayed({ -> updateTimeText() }, 1000)
}
}
private fun loadNextChapter(): Boolean {
return if (currentChapter >= maxChapter - 1) {
Toast.makeText(this, "No more chapters", Toast.LENGTH_SHORT).show()
false
} else {
loadChapter(currentChapter + 1, true)
read_scroll.smoothScrollTo(0, 0)
true
}
}
private fun loadPrevChapter(): Boolean {
return if (currentChapter <= 0) {
false
//Toast.makeText(this, "No more chapters", Toast.LENGTH_SHORT).show()
} else {
loadChapter(currentChapter - 1, false)
true
}
}
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
return if (scrollWithVol && isHidden && (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP)) {
if (textLines != null) {
val readHeight = read_scroll.height - read_overlay.height
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
if (isTTSRunning) {
nextTTSLine()
} else {
if (read_scroll.scrollY >= getScrollRange()) {
loadNextChapter()
} else {
return read_scroll.pageScroll(View.FOCUS_DOWN)
}
loadNextChapter()
}
}
} else {
if (isTTSRunning) {
prevTTSLine()
} else {
if (read_scroll.scrollY <= 0) {
loadPrevChapter()
} else {
return read_scroll.pageScroll(View.FOCUS_UP)
}
loadPrevChapter()
}
}
}
return true
}
super.onKeyDown(keyCode, event)
} else {
super.onKeyDown(keyCode, event)
}
}
data class TextLine(
val startIndex: Int,
val endIndex: Int,
val topPosition: Int,
val bottomPosition: Int,
)
lateinit var chapterTitles: ArrayList<String>
var maxChapter: Int = 0
var currentChapter = 0
var textLines: ArrayList<TextLine>? = null
var mainScrollY = 0
var scrollYOverflow = 0f
var startY: Float? = null
var scrollStartY: Float = 0f
var scrollStartX: Float = 0f
var scrollDistance: Float = 0f
var overflowDown: Boolean = true
var chapterName: String? = null
@SuppressLint("SetTextI18n")
fun updateChapterName(scrollX: Int) {
if (read_scroll.height == 0) {
read_chapter_name.text = chapterName!!
return
}
val height = maxOf(1, getScrollRange())
val chaptersTotal = ceil(height.toDouble() / read_scroll.height).toInt()
val currentChapter = read_scroll.scrollY * chaptersTotal / height
read_chapter_name.text = "${chapterName!!} (${currentChapter + 1}/${chaptersTotal + 1})"
}
private var currentText = ""
private fun Context.loadChapter(chapterIndex: Int, scrollToTop: Boolean, scrollToRemember: Boolean = false) {
main {
setKey(EPUB_CURRENT_POSITION, getBookTitle(), chapterIndex)
val txt = if (isFromEpub) {
getChapterData(chapterIndex)
} else {
read_loading?.visibility = View.VISIBLE
read_normal_layout?.alpha = 0f
withContext(Dispatchers.IO) {
getChapterData(chapterIndex)
}
}
if (!isFromEpub)
fadeInText()
if (txt == null) {
Toast.makeText(this, "Error loading chapter", Toast.LENGTH_SHORT).show()
return@main // TODO FIX REAL INTERACT BUTTON
}
fun scroll() {
if (scrollToRemember) {
val scrollToY = getKey<Int>(EPUB_CURRENT_POSITION_SCROLL, getBookTitle(), null)
if (scrollToY != null) {
read_scroll.scrollTo(0, scrollToY)
read_scroll.fling(0)
return
}
}
val scrollToY = if (scrollToTop) 0 else getScrollRange()
read_scroll.scrollTo(0, scrollToY)
read_scroll.fling(0)
updateChapterName(scrollToY)
}
read_text.alpha = 0f
chapterName = getChapterName(chapterIndex)
currentChapter = chapterIndex
read_toolbar.title = getBookTitle()
read_toolbar.subtitle = chapterName
read_title_text.text = chapterName
updateChapterName(0)
val spanned = HtmlCompat.fromHtml(
txt, HtmlCompat.FROM_HTML_MODE_LEGACY
)
//println("TEXT:" + document.html())
read_text.text = spanned
currentText = spanned.toString()
read_text.post {
loadTextLines()
scroll()
read_text.alpha = 1f
globalTTSLines.clear()
interruptTTS()
if (isTTSRunning || isTTSPaused) { // or Paused because it will fuck up otherwise
startTTS(true)
}
}
}
}
private fun loadTextLines() {
textLines = ArrayList()
val lay = read_text.layout ?: return
for (i in 0..lay.lineCount) {
try {
if (lay == null) return
textLines?.add(
TextLine(
lay.getLineStart(i),
lay.getLineEnd(i),
lay.getLineTop(i),
lay.getLineBottom(i)
)
)
} catch (e: Exception) {
println("EX: $e")
}
}
}
private fun interruptTTS() {
currentTTSQueue = null
if (tts != null) {
tts!!.stop()
}
canSpeak = true
}
private fun nextTTSLine() {
//readFromIndex++
interruptTTS()
}
private fun prevTTSLine() {
readFromIndex -= 2
interruptTTS()
}
fun stopTTS() {
runOnUiThread {
val scroll = getCurrentTTSLineScroll()
if (scroll != null) {
read_scroll?.scrollTo(0, scroll)
}
clearTextViewOfSpans(read_text)
interruptTTS()
ttsStatus = TTSStatus.IsStopped
}
}
data class TTSLine(
val speakOutMsg: String,
val startIndex: Int,
val endIndex: Int,
)
var globalTTSLines = ArrayList<TTSLine>()
private fun prepareTTS(text: String, callback: (Boolean) -> Unit) {
val job = Job()
val uiScope = CoroutineScope(Dispatchers.Main + job)
uiScope.launch {
// CLEAN TEXT IS JUST TO MAKE SURE THAT THE TTS SPEAKER DOES NOT SPEAK WRONG, MUST BE SAME LENGTH
val cleanText = text
.replace("\\.([A-z])".toRegex(), ",$1")//\.([A-z]) \.([^-\s])
.replace("([0-9])\\.([0-9])".toRegex(), "$1,$2") // GOOD FOR DECIMALS
.replace(" (Dr|Mr)\\. ([A-Z])".toRegex(), " $1, $2") // Doctor or Mister
val ttsLines = ArrayList<TTSLine>()
var index = 0
while (true) {
if (index >= text.length) {
globalTTSLines = ttsLines
callback.invoke(true)
return@launch
}
val invalidStartChars =
arrayOf(
' ', '.', ',', '\n', '\"',
'\'', '’', '‘', '“', '”', '«', '»', '「', '」', '…'
)
while (invalidStartChars.contains(text[index])) {
index++
if (index >= text.length) {
globalTTSLines = ttsLines
callback.invoke(true)
return@launch
}
}
var endIndex = Int.MAX_VALUE
for (a in arrayOf(".", "\n", ";", "?", ":")) {
val indexEnd = cleanText.indexOf(a, index)
if (indexEnd == -1) continue
if (indexEnd < endIndex) {
endIndex = indexEnd + 1
}
}
if (endIndex > text.length) {
endIndex = text.length
}
if (index >= text.length) {
globalTTSLines = ttsLines
callback.invoke(true)
return@launch
}
val invalidEndChars =
arrayOf('\n')
while (true) {
var containsInvalidEndChar = false
for (a in invalidEndChars) {
if (endIndex <= 0 || endIndex > text.length) break
if (text[endIndex - 1] == a) {
containsInvalidEndChar = true
endIndex--
}
}
if (!containsInvalidEndChar) {
break
}
}
try {
// THIS PART IF FOR THE SPEAK PART, REMOVING STUFF THAT IS WACK
val message = text.substring(index, endIndex)
var msg = message//Regex("\\p{L}").replace(message,"")
val invalidChars =
arrayOf(
"-",
"<",
">",
"_",
"^",
"«",
"»",
"「",
"」",
"—",
"–",
"¿",
"*",
"~"
) // "\'", //Don't ect
for (c in invalidChars) {
msg = msg.replace(c, " ")
}
msg = msg.replace("...", " ")
/*.replace("…", ",")*/
if (msg
.replace("\n", "")
.replace("\t", "")
.replace(".", "").isNotEmpty()
) {
if (isValidSpeakOutMsg(msg)) {
ttsLines.add(TTSLine(msg, index, endIndex))
}
if (textLines == null)
return@launch
}
} catch (e: Exception) {
println(e)
return@launch
}
index = endIndex + 1
}
}
}
data class ScrollLine(val min: Int, val max: Int)
private fun getMinMax(startIndex: Int, endIndex: Int): ScrollLine? {
if (textLines == null || textLines?.size == 0) {
loadTextLines()
}
if (textLines == null) return null
val text = textLines!!
var start: Int? = null
var end: Int? = null
for (t in text) {
if (t.startIndex > startIndex && start == null) {
start = t.topPosition
}
if (t.endIndex > endIndex && end == null) {
end = t.bottomPosition
}
if (start != null && end != null) return ScrollLine(end + (read_overlay?.height ?: 0), start)
}
return null
}
private fun isValidSpeakOutMsg(msg: String): Boolean {
if (msg.matches("\\?+".toRegex())) {
return false
}
return msg.isNotEmpty() && msg.isNotBlank() && msg.contains("[A-z0-9]".toRegex())
}
private var readFromIndex = 0
private var currentTTSRangeStartIndex = 0
private var currentTTSRangeEndIndex = 0
private fun runTTS(index: Int? = null) {
isTTSRunning = true
playDummySound() // FUCK ANDROID
val job = Job()
val uiScope = CoroutineScope(Dispatchers.Main + job)
uiScope.launch {
while (tts == null) {
if (!isTTSRunning) return@launch
delay(50)
}
if (index != null) {
readFromIndex = index
} else {
for ((startIndex, line) in globalTTSLines.withIndex()) {
if (read_scroll.scrollY <= getMinMax(line.startIndex, line.endIndex)?.max ?: 0) {
readFromIndex = startIndex
break
}
}
}
while (true) {
try {
if (!isTTSRunning) return@launch
while (isTTSPaused) {
delay(50)
}
if (!isTTSRunning) return@launch
if (globalTTSLines.size == 0) return@launch
if (readFromIndex < 0) {
if (!loadPrevChapter()) {
stopTTS()
}
return@launch
} else if (readFromIndex >= globalTTSLines.size) {
if (!loadNextChapter()) {
stopTTS()
}
return@launch
}
val line = globalTTSLines[readFromIndex]
val nextLine =
if (readFromIndex + 1 >= globalTTSLines.size) null else globalTTSLines[readFromIndex + 1]
currentTTSRangeStartIndex = line.startIndex
currentTTSRangeEndIndex = line.endIndex
if (read_scroll != null) {
val textLine = getMinMax(line.startIndex, line.endIndex)
minScroll = textLine?.min
maxScroll = textLine?.max
checkTTSRange(read_scroll.scrollY, true)
}
setHighLightedText(read_text, line.startIndex, line.endIndex)
val msg = line.speakOutMsg
if (isValidSpeakOutMsg(msg)) {
// println("SPEAKOUTMS " + System.currentTimeMillis())
speakOut(msg, nextLine?.speakOutMsg)
}
if (msg.isEmpty()) {
delay(500)
canSpeak = true
}
while (!canSpeak) {
delay(10)
if (!isTTSRunning) return@launch
}
//println("NEXTENDEDMS " + System.currentTimeMillis())
readFromIndex++
} catch (e: Exception) {
println(e)
return@launch
}
}
}
}
private fun startTTS(fromStart: Boolean = false) {
startTTS(if (fromStart) 0 else null)
}
private fun startTTS(fromIndex: Int?) {
if (globalTTSLines.size <= 0) {
prepareTTS(currentText) {
if (it) {
runTTS(fromIndex)
} else {
Toast.makeText(this, "Error parsing text", Toast.LENGTH_SHORT).show()
}
}
} else {
runTTS(fromIndex)
}
}
private fun checkTTSRange(scrollY: Int, scrollToTop: Boolean = false) {
try {
if (!lockTTSOnPaused && isTTSPaused) return
if (maxScroll == null || minScroll == null) return
val min = minScroll!!
val max = maxScroll!!
if (lockTTS && isTTSRunning) {
if (read_scroll.height + scrollY - read_title_text.height - 0.toPx <= min) { // FOR WHEN THE TEXT IS ON THE BOTTOM OF THE SCREEN
if (scrollToTop) {
read_scroll.scrollTo(0, max + read_title_text.height)
} else {
read_scroll.scrollTo(0, min - read_scroll.height + read_title_text.height + 0.toPx)
}
read_scroll.fling(0) // FIX WACK INCONSISTENCY, RESETS VELOCITY
} else if (scrollY - read_title_text.height >= max) { // WHEN TEXT IS ON TOP
read_scroll.scrollTo(0, max + read_title_text.height)
read_scroll.fling(0) // FIX WACK INCONSISTENCY, RESETS VELOCITY
}
}
} catch (e: Exception) {
println("WHAT THE FUCK HAPPENED HERE? : $e")
}
}
override fun onResume() {
super.onResume()
main {
if (read_scroll == null) return@main
if (!lockTTSOnPaused && isTTSPaused) return@main
if (!lockTTS || !isTTSRunning) return@main
val textLine = getMinMax(currentTTSRangeStartIndex, currentTTSRangeEndIndex)
minScroll = textLine?.min
maxScroll = textLine?.max
val scroll = read_scroll?.scrollY
if (scroll != null) { // JUST TO BE 100% SURE THAT ANDROID DOES NOT FUCK YOU OVER
checkTTSRange(scroll, true)
}
}
}
private fun selectChapter() {
val builderSingle: AlertDialog.Builder = AlertDialog.Builder(this)
//builderSingle.setIcon(R.drawable.ic_launcher)
builderSingle.setTitle(chapterTitles[currentChapter]) // "Select Chapter"
val arrayAdapter = ArrayAdapter<String>(this, R.layout.chapter_select_dialog)
arrayAdapter.addAll(chapterTitles)
builderSingle.setNegativeButton("Cancel") { dialog, _ -> dialog.dismiss() }
builderSingle.setAdapter(arrayAdapter) { _, which ->
loadChapter(which, true)
}
val dialog = builderSingle.create()
dialog.show()
dialog.listView.choiceMode = AbsListView.CHOICE_MODE_SINGLE
dialog.listView.setSelection(currentChapter)
dialog.listView.setItemChecked(currentChapter, true)
}
private fun getScrollRange(): Int {
var scrollRange = 0
if (read_scroll.childCount > 0) {
val child: View = read_scroll.getChildAt(0)
scrollRange = max(
0,
child.height - (read_scroll.height - read_scroll.paddingBottom - read_scroll.paddingTop)
)
}
return scrollRange
}
private var orientationType: Int = OrientationType.DEFAULT.prefValue
private lateinit var mMediaSessionCompat: MediaSessionCompat
private val mMediaSessionCallback: MediaSessionCompat.Callback = object : MediaSessionCompat.Callback() {
override fun onMediaButtonEvent(mediaButtonEvent: Intent): Boolean {
val keyEvent = mediaButtonEvent.getParcelableExtra(Intent.EXTRA_KEY_EVENT) as KeyEvent?
if (keyEvent != null) {
if (keyEvent.action == KeyEvent.ACTION_DOWN) { // NO DOUBLE SKIP
val consumed = when (keyEvent.keyCode) {
KeyEvent.KEYCODE_MEDIA_PAUSE -> callOnPause()
KeyEvent.KEYCODE_MEDIA_PLAY -> callOnPlay()
KeyEvent.KEYCODE_MEDIA_STOP -> callOnStop()
KeyEvent.KEYCODE_MEDIA_NEXT -> callOnNext()
else -> false
}
if (consumed) return true
}
}
return super.onMediaButtonEvent(mediaButtonEvent)
}
}
// FUCK ANDROID WITH ALL MY HEART
// SEE https://stackoverflow.com/questions/45960265/android-o-oreo-8-and-higher-media-buttons-issue WHY
private fun playDummySound() {
val mMediaPlayer: MediaPlayer = MediaPlayer.create(this, R.raw.dummy_sound_500ms)
mMediaPlayer.setOnCompletionListener { mMediaPlayer.release() }
mMediaPlayer.start()
}
private fun Context.initMediaSession() {
val mediaButtonReceiver = ComponentName(this, MediaButtonReceiver::class.java)
mMediaSessionCompat = MediaSessionCompat(this, "TTS", mediaButtonReceiver, null)
mMediaSessionCompat.setCallback(mMediaSessionCallback)
mMediaSessionCompat.setFlags(MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS or MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS)
}
fun Context.setTextFontSize(size: Int) {
setKey(EPUB_TEXT_SIZE, size)
read_text?.setTextSize(TypedValue.COMPLEX_UNIT_SP, size.toFloat())
read_title_text?.setTextSize(TypedValue.COMPLEX_UNIT_SP, size.toFloat() + 2f)
}
private fun Context.getTextFontSize(): Int {
return getKey(EPUB_TEXT_SIZE, 14)!!
}
private fun Context.getScrollWithVol(): Boolean {
scrollWithVol = getKey(EPUB_SCROLL_VOL, true)!!
return scrollWithVol
}
private fun Context.setScrollWithVol(scroll: Boolean) {
scrollWithVol = scroll
setKey(EPUB_SCROLL_VOL, scroll)
}
private fun Context.getLockTTS(): Boolean {
lockTTS = getKey(EPUB_SCROLL_VOL, true)!!
return lockTTS
}
private fun Context.setLockTTS(scroll: Boolean) {
lockTTS = scroll
setKey(EPUB_SCROLL_VOL, scroll)
}
private fun Context.setBackgroundColor(color: Int) {
reader_container?.setBackgroundColor(color)
setKey(EPUB_BG_COLOR, color)
}
private fun Context.setTextColor(color: Int) {
read_text?.setTextColor(color)
read_battery?.setTextColor(color)
read_time?.setTextColor(color)
read_title_text?.setTextColor(color)
setKey(EPUB_TEXT_COLOR, color)
}
private fun Context.updateHasBattery(status: Boolean? = null): Boolean {
val set = if (status != null) {
setKey(EPUB_HAS_BATTERY, status)
status
} else {
getKey(EPUB_HAS_BATTERY, true)!!
}
read_battery?.visibility = if (set) View.VISIBLE else View.GONE
return set
}
private fun Context.updateHasTime(status: Boolean? = null): Boolean {
val set = if (status != null) {
setKey(EPUB_HAS_TIME, status)
status
} else {
getKey(EPUB_HAS_TIME, true)!!
}
read_time?.visibility = if (set) View.VISIBLE else View.GONE
return set
}
private fun Context.getTextColor(): Int {
val color = getKey(EPUB_TEXT_COLOR, getColor(R.color.readerTextColor))!!
read_text?.setTextColor(color)
read_battery?.setTextColor(color)
read_time?.setTextColor(color)
read_title_text?.setTextColor(color)
return color
}
// In DP
private fun Context.getTextPadding(): Int {
return getKey(EPUB_TEXT_PADDING, 20)!!
}
// In DP
private fun Context.setTextPadding(padding: Int) {
setKey(EPUB_TEXT_PADDING, padding)
read_text?.setPadding(
padding.toPx,
read_text?.paddingTop ?: 25.toPx,
padding.toPx,
read_text?.paddingBottom ?: 25.toPx
)
}
private fun Context.getBackgroundColor(): Int {
val color = getKey(EPUB_BG_COLOR, getColor(R.color.readerBackground))!!
reader_container?.setBackgroundColor(color)
return color
}
private fun updateImages() {
val bgColors = resources.getIntArray(R.array.readerBgColors)
val textColors = resources.getIntArray(R.array.readerTextColors)
val color = getBackgroundColor()
val colorPrimary = colorFromAttribute(R.attr.colorPrimary)
val colorPrim = ColorStateList.valueOf(colorPrimary)
val colorTrans = ColorStateList.valueOf(Color.TRANSPARENT)
var foundCurrentColor = false
val fullAlpha = 200
val fadedAlpha = 50
for ((index, img) in images.withIndex()) {
if (index == bgColors.size) { // CUSTOM COLOR
img.foregroundTintList = colorPrim
img.imageAlpha = if (foundCurrentColor) fadedAlpha else fullAlpha
img.backgroundTintList =
ColorStateList.valueOf(if (foundCurrentColor) Color.parseColor("#161616") else color)
img.foreground = ContextCompat.getDrawable(
this,
if (foundCurrentColor) R.drawable.ic_baseline_add_24 else R.drawable.ic_baseline_check_24
)
continue
}
if ((color == bgColors[index] && getTextColor() == textColors[index])) {
foundCurrentColor = true
img.foregroundTintList = colorPrim
img.imageAlpha = fullAlpha
} else {
img.foregroundTintList = colorTrans
img.imageAlpha = fadedAlpha
}
}
}
private fun fadeInText() {
if (read_loading != null) { // IDK, android might be weird and kill before load, not tested tho
read_loading?.visibility = View.GONE
read_normal_layout?.alpha = 0.01f
ObjectAnimator.ofFloat(read_normal_layout, "alpha", 1f).apply {
duration = 300
start()
}
}
}
@SuppressLint("ClickableViewAccessibility")
override fun onCreate(savedInstanceState: Bundle?) {
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
val currentTheme = when (settingsManager.getString("theme", "Dark")) {
"Black" -> R.style.AppTheme
"Dark" -> R.style.DarkAlternative
"Light" -> R.style.LightMode
else -> R.style.AppTheme
}
val currentOverlayTheme = when (settingsManager.getString("color_theme", "Blue")) {
"Normal" -> R.style.OverlayPrimaryColorNormal
"Blue" -> R.style.OverlayPrimaryColorBlue
"Purple" -> R.style.OverlayPrimaryColorPurple
"Green" -> R.style.OverlayPrimaryColorGreen
"GreenApple" -> R.style.OverlayPrimaryColorGreenApple
"Red" -> R.style.OverlayPrimaryColorRed
else -> R.style.OverlayPrimaryColorNormal
}
//val isLightTheme = themeName == "Light"
theme.applyStyle(
currentTheme,
true
) // THEME IS SET BEFORE VIEW IS CREATED TO APPLY THE THEME TO THE MAIN VIEW
theme.applyStyle(currentOverlayTheme, true)
super.onCreate(savedInstanceState)
val mBatInfoReceiver: BroadcastReceiver = object : BroadcastReceiver() {
@SuppressLint("SetTextI18n")
override fun onReceive(ctxt: Context?, intent: Intent) {
val batteryPct: Float = intent.let { intent ->
val level: Int = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1)
val scale: Int = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1)
level * 100 / scale.toFloat()
}
read_battery?.text = "${batteryPct.toInt()}%"
}
}
IntentFilter(Intent.ACTION_BATTERY_CHANGED).let { ifilter ->
this.registerReceiver(mBatInfoReceiver, ifilter)
}
val data = intent.data
if (data == null) {
finish()
return
}
// THIS WAY YOU CAN OPEN FROM FILE OR FROM APP
val input = contentResolver.openInputStream(data)
if (input == null) {
finish()
return
}
isFromEpub = intent.type == "application/epub+zip"
initMediaSession()
setContentView(R.layout.read_main)
setTextFontSize(getTextFontSize())
setTextPadding(getTextPadding())
initTTSSession()
getLockTTS()
getScrollWithVol()
getBackgroundColor()
getTextColor()
updateHasTime()
updateHasBattery()
val fonts = getAllFonts()
if (fonts == null) {
setReadTextFont(null)
} else {
val index = fonts.map { it.name }.indexOf(getKey(EPUB_FONT) ?: "")
setReadTextFont(if (index > 0) fonts[index] else null, null)
}
createNotificationChannel()
read_title_text.minHeight = read_toolbar.height
fixPaddingStatusbar(read_toolbar)
//<editor-fold desc="Screen Rotation">
fun setRot(org: OrientationType) {
orientationType = org.prefValue
requestedOrientation = org.flag
read_action_rotate.setImageResource(org.iconRes)
}
read_action_rotate.setOnClickListener {
read_action_rotate.popupMenu(
items = OrientationType.values().map { it.prefValue to it.stringRes },
selectedItemId = orientationType
// ?: preferences.defaultOrientationType(),
) {
val org = OrientationType.fromSpinner(itemId)
setKey(EPUB_LOCK_ROTATION, itemId)
setRot(org)
}
}
val colorPrimary = colorFromAttribute(R.attr.colorPrimary)// getColor(R.color.colorPrimary)
read_action_settings.setOnClickListener {
val bottomSheetDialog = BottomSheetDialog(this)
bottomSheetDialog.setContentView(R.layout.read_bottom_settings)
val readSettingsTextSize = bottomSheetDialog.findViewById<SeekBar>(R.id.read_settings_text_size)!!
val readSettingsTextPadding = bottomSheetDialog.findViewById<SeekBar>(R.id.read_settings_text_padding)!!
val readSettingsScrollVol =
bottomSheetDialog.findViewById<MaterialCheckBox>(R.id.read_settings_scroll_vol)!!
val readSettingsLockTts = bottomSheetDialog.findViewById<MaterialCheckBox>(R.id.read_settings_lock_tts)!!
val showTime = bottomSheetDialog.findViewById<MaterialCheckBox>(R.id.read_settings_show_time)!!
val showBattery = bottomSheetDialog.findViewById<MaterialCheckBox>(R.id.read_settings_show_battery)!!
val readSettingsTextPaddingText =
bottomSheetDialog.findViewById<TextView>(R.id.read_settings_text_padding_text)!!
val readSettingsTextSizeText =
bottomSheetDialog.findViewById<TextView>(R.id.read_settings_text_size_text)!!
val readSettingsTextFontText = bottomSheetDialog.findViewById<TextView>(R.id.read_settings_text_font_text)!!
//val root = bottomSheetDialog.findViewById<LinearLayout>(R.id.read_settings_root)!!
val horizontalColors = bottomSheetDialog.findViewById<LinearLayout>(R.id.read_settings_colors)!!
val readShowFonts = bottomSheetDialog.findViewById<MaterialButton>(R.id.read_show_fonts)
readShowFonts?.text = UIHelper.parseFontFileName(getKey(EPUB_FONT))
readShowFonts?.setOnClickListener {
showFonts {
readShowFonts?.text = it
}
}
readSettingsScrollVol.isChecked = scrollWithVol
readSettingsScrollVol.setOnCheckedChangeListener { _, checked ->
setScrollWithVol(checked)
}
readSettingsLockTts.isChecked = lockTTS
readSettingsLockTts.setOnCheckedChangeListener { _, checked ->
setLockTTS(checked)
}
showTime.isChecked = updateHasTime()
showTime.setOnCheckedChangeListener { _, checked ->
updateHasTime(checked)
}
showBattery.isChecked = updateHasBattery()
showBattery.setOnCheckedChangeListener { _, checked ->
updateHasBattery(checked)
}
val bgColors = resources.getIntArray(R.array.readerBgColors)
val textColors = resources.getIntArray(R.array.readerTextColors)
images = ArrayList()
for ((index, backgroundColor) in bgColors.withIndex()) {
val textColor = textColors[index]
val imageHolder = layoutInflater.inflate(R.layout.color_round_checkmark, null) //color_round_checkmark
val image = imageHolder.findViewById<ImageView>(R.id.image1)
image.backgroundTintList = ColorStateList.valueOf(backgroundColor)
image.setOnClickListener {
setBackgroundColor(backgroundColor)
setTextColor(textColor)
updateImages()
}
images.add(image)
horizontalColors.addView(imageHolder)
// image.backgroundTintList = ColorStateList.valueOf(c)// ContextCompat.getColorStateList(this, c)
}
val imageHolder = layoutInflater.inflate(R.layout.color_round_checkmark, null)
val image = imageHolder.findViewById<ImageView>(R.id.image1)
image.foreground = ContextCompat.getDrawable(this, R.drawable.ic_baseline_add_24)
image.setOnClickListener {
val builder: AlertDialog.Builder = AlertDialog.Builder(this)
builder.setTitle(getString(R.string.reading_color))
val colorAdapter = ArrayAdapter<String>(this, R.layout.chapter_select_dialog)
val array = arrayListOf(
getString(R.string.background_color),
getString(R.string.text_color)
)
colorAdapter.addAll(array)
builder.setPositiveButton("OK") { dialog, _ ->
dialog.dismiss()
updateImages()
}
builder.setAdapter(colorAdapter) { _, which ->
ColorPickerDialog.newBuilder()
.setDialogId(which)
.setColor(
when (which) {
0 -> getBackgroundColor()
1 -> getTextColor()
else -> 0
}
)
.show(this)
}
builder.show()
updateImages()
}
images.add(image)
horizontalColors.addView(imageHolder)
updateImages()
readSettingsTextSize.max = 10
val offsetSize = 10
var updateAllTextOnDismiss = false
readSettingsTextSize.progress = getTextFontSize() - offsetSize
readSettingsTextSize.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
setTextFontSize(progress + offsetSize)
stopTTS()
updateAllTextOnDismiss = true
}
override fun onStartTrackingTouch(seekBar: SeekBar?) {}
override fun onStopTrackingTouch(seekBar: SeekBar?) {}
})
readSettingsTextPadding.max = 50
readSettingsTextPadding.progress = getTextPadding()
readSettingsTextPadding.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
setTextPadding(progress)
stopTTS()
updateAllTextOnDismiss = true
}
override fun onStartTrackingTouch(seekBar: SeekBar?) {}
override fun onStopTrackingTouch(seekBar: SeekBar?) {}
})
readSettingsTextPaddingText.setOnLongClickListener {
it.popupMenu(items = listOf(Pair(R.string.reset_value, 0)), selectedItemId = null) {
if (itemId == 0) {
it.context?.removeKey(EPUB_TEXT_PADDING)
readSettingsTextPadding.progress = getTextPadding()
}
}
return@setOnLongClickListener true
}
readSettingsTextPaddingText.setOnClickListener {
it.popupMenu(items = listOf(Pair(1, R.string.reset_value)), selectedItemId = null) {
if (itemId == 1) {
it.context?.removeKey(EPUB_TEXT_PADDING)
readSettingsTextPadding?.progress = getTextPadding()
}
}
}
readSettingsTextSizeText.setOnClickListener {
it.popupMenu(items = listOf(Pair(1, R.string.reset_value)), selectedItemId = null) {
if (itemId == 1) {
it.context?.removeKey(EPUB_TEXT_SIZE)
readSettingsTextSize?.progress = getTextFontSize() - offsetSize
}
}
}
readSettingsTextFontText.setOnClickListener {
it.popupMenu(items = listOf(Pair(1, R.string.reset_value)), selectedItemId = null) {
if (itemId == 1) {
setReadTextFont(null) { fileName ->
readShowFonts?.text = fileName
}
stopTTS()
updateAllTextOnDismiss = true
}
}
}
bottomSheetDialog.setOnDismissListener {
if (updateAllTextOnDismiss) {
loadTextLines()
globalTTSLines.clear()
}
}
bottomSheetDialog.show()
}
setRot(
OrientationType.fromSpinner(
getKey(
EPUB_LOCK_ROTATION,
OrientationType.DEFAULT.prefValue
)
)
)
//</editor-fold>
read_action_chapters.setOnClickListener {
selectChapter()
}
tts_action_stop.setOnClickListener {
stopTTS()
}
tts_action_pause_play.setOnClickListener {
when (ttsStatus) {
TTSStatus.IsRunning -> isTTSPaused = true
TTSStatus.IsPaused -> isTTSPaused = false
else -> {
// DO NOTHING
}
}
}
tts_action_forward.setOnClickListener {
nextTTSLine()
}
tts_action_back.setOnClickListener {
prevTTSLine()
}
read_action_tts.setOnClickListener {
/* fun readTTSClick() {
when (ttsStatus) {
TTSStatus.IsStopped -> startTTS()
TTSStatus.IsRunning -> stopTTS()
TTSStatus.IsPaused -> isTTSPaused = false
}
}*/
// DON'T INIT TTS UNTIL IT IS NECESSARY
if (tts == null) {
tts = TextToSpeech(this) { status ->
if (status == TextToSpeech.SUCCESS) {
val result = tts!!.setLanguage(Locale.US)
if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) {
showMessage("This Language is not supported")
} else {
tts!!.setOnUtteranceProgressListener(object : UtteranceProgressListener() {
//MIGHT BE INTERESTING https://stackoverflow.com/questions/44461533/android-o-new-texttospeech-onrangestart-callback
override fun onDone(utteranceId: String) {
canSpeak = true
// println("ENDMS: " + System.currentTimeMillis())
}
override fun onError(utteranceId: String) {
canSpeak = true
}
override fun onStart(utteranceId: String) {
// println("STARTMS: " + System.currentTimeMillis())
}
})
startTTS()
//readTTSClick()
}
} else {
val errorMSG = when (status) {
TextToSpeech.ERROR -> "ERROR"
TextToSpeech.ERROR_INVALID_REQUEST -> "ERROR_INVALID_REQUEST"
TextToSpeech.ERROR_NETWORK -> "ERROR_NETWORK"
TextToSpeech.ERROR_NETWORK_TIMEOUT -> "ERROR_NETWORK_TIMEOUT"
TextToSpeech.ERROR_NOT_INSTALLED_YET -> "ERROR_NOT_INSTALLED_YET"
TextToSpeech.ERROR_OUTPUT -> "ERROR_OUTPUT"
TextToSpeech.ERROR_SYNTHESIS -> "ERROR_SYNTHESIS"
TextToSpeech.ERROR_SERVICE -> "ERROR_SERVICE"
else -> status.toString()
}
showMessage("Initialization Failed! Error $errorMSG")
tts = null
}
}
} else {
startTTS()
// readTTSClick()
}
}
hideSystemUI()
read_toolbar.setNavigationIcon(R.drawable.ic_baseline_arrow_back_24)
read_toolbar.setNavigationOnClickListener {
with(NotificationManagerCompat.from(this)) { // KILLS NOTIFICATION
cancel(TTS_NOTIFICATION_ID)
}
finish() // KILLS ACTIVITY
}
read_overflow_progress.max = OVERFLOW_NEXT_CHAPTER_DELTA
readActivity = this
fixPaddingStatusbar(read_topmargin)
window.navigationBarColor =
colorFromAttribute(R.attr.grayBackground) //getColor(R.color.readerHightlightedMetaInfo)
read_scroll.setOnScrollChangeListener { _, _, scrollY, _, _ ->
checkTTSRange(scrollY)
setKey(EPUB_CURRENT_POSITION_SCROLL, getBookTitle(), scrollY)
mainScrollY = scrollY
updateChapterName(scrollY)
}
fun toggleShow() {
if (isHidden) {
showSystemUI()
} else {
hideSystemUI()
}
}
read_scroll.setOnTouchListener { _, event ->
val height = getScrollRange()
when (event.action) {
MotionEvent.ACTION_DOWN -> {
if (mainScrollY >= height) {
overflowDown = true
startY = event.y
} else if (mainScrollY == 0) {
overflowDown = false
startY = event.y
}
scrollStartY = event.y
scrollStartX = event.x
scrollDistance = 0f
}
MotionEvent.ACTION_MOVE -> {
val deltaX = scrollStartX - event.x
val deltaY = scrollStartY - event.y
scrollDistance += abs(deltaX) + abs(deltaY)
scrollStartY = event.y
scrollStartX = event.x
fun deltaShow() {
if (scrollYOverflow * 100 / OVERFLOW_NEXT_CHAPTER_DELTA > OVERFLOW_NEXT_CHAPTER_SHOW_PROCENTAGE) {
/*read_overflow_progress.visibility = View.VISIBLE
read_overflow_progress.progress =
minOf(scrollYOverflow.toInt(), OVERFLOW_NEXT_CHAPTER_DELTA)*/
read_text.translationY = (if (overflowDown) -1f else 1f) * sqrt(
minOf(
scrollYOverflow,
OVERFLOW_NEXT_CHAPTER_DELTA.toFloat()
)
) * 4 // *4 is the amount the page moves when you overload it
}
}
if (!overflowDown && (mainScrollY <= OVERFLOW_NEXT_CHAPTER_SAFESPACE.toDp || scrollYOverflow > OVERFLOW_NEXT_CHAPTER_SHOW_PROCENTAGE) && startY != null && currentChapter > 0) {
scrollYOverflow = maxOf(0f, event.y - startY!!)
deltaShow()
} else if (overflowDown && (mainScrollY >= height - OVERFLOW_NEXT_CHAPTER_SAFESPACE.toDp || scrollYOverflow > OVERFLOW_NEXT_CHAPTER_SHOW_PROCENTAGE) && startY != null) { // && currentChapter < maxChapter
scrollYOverflow = maxOf(0f, startY!! - event.y)
deltaShow()
} else {
read_overflow_progress.visibility = View.GONE
read_text.translationY = 0f
}
}
MotionEvent.ACTION_UP -> {
println("ACTION_UP")
if (scrollDistance < TOGGLE_DISTANCE) {
toggleShow()
}
read_overflow_progress.visibility = View.GONE
read_text.translationY = 0f
startY = null
if (100 * scrollYOverflow / OVERFLOW_NEXT_CHAPTER_DELTA >= OVERFLOW_NEXT_CHAPTER_NEXT) {
if (mainScrollY >= height && overflowDown) {
loadNextChapter()
} else if (mainScrollY == 0 && !overflowDown) {
loadPrevChapter()
}
}
scrollYOverflow = 0f
}
}
return@setOnTouchListener false
}
// read_overlay.setOnClickListener {
// selectChapter()
// }
main { // THIS IS USED FOR INSTANT LOAD
read_loading.postDelayed({
if (!this::chapterTitles.isInitialized) {
read_loading?.visibility = View.VISIBLE
}
}, 200) // I DON'T WANT TO SHOW THIS IN THE BEGINNING, IN CASE IF SMALL LOAD TIME
withContext(Dispatchers.IO) {
if (isFromEpub) {
val epubReader = EpubReader()
book = epubReader.readEpub(input)
} else {
quickdata = mapper.readValue(input.reader().readText())
}
}
if(!isFromEpub && quickdata.data.size <= 0) {
Toast.makeText(this, R.string.no_chapters_found,Toast.LENGTH_SHORT).show()
finish()
return@main
}
maxChapter = getBookSize()
loadChapter(
minOf(
getKey(EPUB_CURRENT_POSITION, getBookTitle()) ?: 0,
maxChapter - 1
), // CRASH FIX IF YOU SOMEHOW TRY TO LOAD ANOTHER EPUB WITH THE SAME NAME
scrollToTop = true,
scrollToRemember = true
)
updateTimeText()
chapterTitles = ArrayList()
for (i in 0 until maxChapter) {
chapterTitles.add(getChapterName(i))
}
fadeInText()
}
}
}
| 36.910066 | 223 | 0.540196 |
965dd55c6d591d5c1380cfad51a92e906e2b78e7 | 4,913 | php | PHP | resources/views/network/WilliamTool.blade.php | asjianghang123/demo | 40d3a589c9a399c4dd1716ab544fd650ce2dee9a | [
"MIT"
] | null | null | null | resources/views/network/WilliamTool.blade.php | asjianghang123/demo | 40d3a589c9a399c4dd1716ab544fd650ce2dee9a | [
"MIT"
] | null | null | null | resources/views/network/WilliamTool.blade.php | asjianghang123/demo | 40d3a589c9a399c4dd1716ab544fd650ce2dee9a | [
"MIT"
] | null | null | null | @extends('layouts.nav')
@section('content-header')
<section class="content-header">
<h1>
冗余站点清除
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-dashboard"></i> 网络规划</li>
{{-- <li>第二级菜单</li> --}}
<li class="active">WilliamTool对接 </li>
</ol>
</section>
@endsection
@section('content')
<section class="content">
<div class="row">
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">查询条件</h3>
</div>
<div class="box-body">
<div class="col-sm-3">
<div class="form-group">
<label for="kgetDate">日期</label>
<select id="kgetDate" class="js-example-basic-single js-states form-group col-xs-10">
</select>
</div>
</div>
<div class="col-sm-2">
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="box">
<div class="box-header with-border">
<div style="display:inline;">
<h3 class="box-title">LTE_Carrier信息</h3>
</div>
<div class="input-group" style="float: right;display: inline;">
<a id="queryCarrier" class="btn btn-primary ladda-button" data-color='red' data-style="expand-right" href="#" onClick="queryCarrierData()"><span class="ladda-label ">查询</span></a>
<a id="importCarrier" class="btn btn-primary ladda-button" data-style="expand-right" onClick="importCarrierData()" href="#"><span class="ladda-label">导出</span></a>
</div>
</div>
<div class="box-body">
<table id="CarrierTable">
</table>
</div>
</div>
<div class="box">
<div class="box-header with-border">
<div style="display:inline;">
<h3 class="box-title">LTE_Neighbor信息</h3>
</div>
<div class="input-group" style="float: right;display: inline;">
<a id="queryNeighbor" class="btn btn-primary ladda-button" data-color='red' data-style="expand-right" onClick="queryNeighborData()"><span class="ladda-label ">查询</span></a>
<a id="importNeighbor" class="btn btn-primary ladda-button" onClick="importNeighborData()" href="#" data-style="expand-right"><span class="ladda-label">导出</span></a>
</div>
</div>
<div class="box-body">
<table id="NeighborTable">
</table>
</div>
</div>
</div>
</div>
</section>
@endsection
@section('scripts')
<!-- grid -->
<script type="text/javascript" src="plugins/bootstrap-grid/js/grid.js"></script>
<!--select2-->
<script type="text/javascript" src="plugins/select2/select2.js"></script>
<link href="plugins/bootstrap-multiselect/bootstrap-multiselect.css" rel="stylesheet" />
<script src="plugins/bootstrap-multiselect/bootstrap-multiselect.js"></script>
<!--datatables-->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="plugins/datatables/grid.js"></script>
<link type="text/css" rel="stylesheet" href="plugins/datatables/grid.css" >
<!--loading-->
<link rel="stylesheet" href="plugins/loading/dist/ladda-themeless.min.css">
<script src="plugins/loading/js/spin.js"></script>
<script src="plugins/loading/js/ladda.js"></script>
<!--bootstrapvalidator-->
<link rel="stylesheet" href="plugins/bootstrapvalidator-master/css/bootstrapValidator.min.css">
<script src="plugins/bootstrapvalidator-master/js/bootstrapValidator.min.js"></script>
@endsection
<script type="text/javascript" src="plugins/jQuery/jquery.min.js"></script>
<script type="text/javascript" src="dist/js/genius/WilliamTool.js"></script>
<style>
#siteTable td div{
width:100%;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
a.btn {
display: inline-block;
padding: 4px 8px;
margin-bottom: 0;
font-size: 13px;
font-weight: normal;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
</style>
| 34.598592 | 202 | 0.55689 |
708178d4d5719f2c437b387c34081530e662b267 | 2,639 | h | C | protocol/zigbee/app/framework/plugin/ota-client/ota-client-signature-verify.h | lmnotran/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 82 | 2016-06-29T17:24:43.000Z | 2021-04-16T06:49:17.000Z | protocol/zigbee/app/framework/plugin/ota-client/ota-client-signature-verify.h | lmnotran/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 6 | 2022-01-12T18:22:08.000Z | 2022-03-25T10:19:27.000Z | protocol/zigbee/app/framework/plugin/ota-client/ota-client-signature-verify.h | lmnotran/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 56 | 2016-08-02T10:50:50.000Z | 2021-07-19T08:57:34.000Z | /***************************************************************************//**
* @file
* @brief Signature verification APIs for the OTA Client plugin.
*******************************************************************************
* # License
* <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
// Hashing a file can be expensive for small processors. The maxHashCalculations
// determines how many iterations are made before returning back to the caller.
// A value of 0 indicates to completely calculate the digest before returning.
// A value greater than 0 means that a number of hashes will be performed and
// then the routine will return EMBER_AF_IMAGE_VERIFY_IN_PROGRESS. In that
// case it is expected that this function must be called repeatedly until it
// returns another status code.
// When EMBER_AF_IMAGE_VERIFY_WAIT is returned then no further calls
// are necessary. The verify code will fire the callback
// emAfOtaVerifyStoredDataFinish() when it is has a result.
EmberAfImageVerifyStatus emAfOtaImageSignatureVerify(uint16_t maxHashCalculations,
const EmberAfOtaImageId* id,
bool newVerification);
// This is the maximum number of digest calculations we perform per call to
// emAfOtaImageSignatureVerify(). Arbitrary chosen value to limit
// time spent in this routine. A value of 0 means we will NOT return
// until we are completely done with our digest calculations.
// Empirically waiting until digest calculations are complete can
// take quite a while for EZSP hosts (~40 seconds for a UART connected host).
// So we want to make sure that other parts of the framework can run during
// this time. On SOC systems a similar problem occurs. If we set this to 0
// then emberTick() will not fire and therefore the watchdog timer will not be
// serviced.
#define MAX_DIGEST_CALCULATIONS_PER_CALL 5
void emAfOtaVerifyStoredDataFinish(EmberAfImageVerifyStatus status);
void emAfOtaClientSignatureVerifyPrintSigners(void);
| 56.148936 | 82 | 0.661993 |
0e6ad2650ae6376734e8a04aba428b893f8b55e6 | 3,698 | html | HTML | view/sdhltex/html/header.html | iyouhi/easyweb | 6dfe6dac2d047500cabf7ea21109e2001a0de8f6 | [
"Apache-2.0"
] | null | null | null | view/sdhltex/html/header.html | iyouhi/easyweb | 6dfe6dac2d047500cabf7ea21109e2001a0de8f6 | [
"Apache-2.0"
] | null | null | null | view/sdhltex/html/header.html | iyouhi/easyweb | 6dfe6dac2d047500cabf7ea21109e2001a0de8f6 | [
"Apache-2.0"
] | null | null | null | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$project.title}</title>
<link href="{$smarty.const.STATIC_PATH}css/style.css" type="text/css" rel="stylesheet">
<script src="{$smarty.const.STATIC_PATH}js/comm.js" type="text/javascript">
function MM_CheckFlashVersion(reqVerStr,msg){
with(navigator){
var isIE = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer = parseFloat(verMajor + "." + verMinor);
}
}
// WebTV has Flash Player 4 or lower -- too low for video
else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;
var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
if (flashVer < reqVer){
if (confirm(msg))
window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
</script>
<script src="{$smarty.const.STATIC_PATH}js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="{$smarty.const.STATIC_PATH}js/lrtk.js" type="text/javascript"></script>
</head>
<body onload="MM_CheckFlashVersion('7,0,0,0','本页内容需要使用较新的 Macromedia Flash Player 版本。是否现在下载它?');">
<div class="content">
<!--导航-->
<div class="top"><div class="lk"><a class="jpkc btl" href="/cn_index.asp" target="_blank">CHINESE</a><a href="/index.asp" class="xylj " target="_blank">ENGLISH</a></div><img src="{$project.logo}" width="548" height="110" style="float:left;" alt="枣庄市汇力纺织品有限公司">
</div>
<div class="flash">
<div class="f_cont">
<div class="flashBanner">
<a href="http://sdhltex.com/#"><img class="bigImg" width="1250" height="317" border="0" src="" style="display: inline;"></a>
<div class="mask" style="display: none; bottom: 0px;">
{foreach from=$slider_article item=item}
<img src="{$item.pic}" uri="{$item.pic}" link="#" width="60" height="22" class="show">
{/foreach}
</div>
</div>
</div>
</div>
<div class="nav">
<ul>
<li class="main_ bn"><a href="/"><img src="{$smarty.const.STATIC_PATH}images/home.gif" width="20" height="59" border="0"></a></li>
{foreach from=$topcategory_on_header item=item}
{if !empty($subcategory_on_header[$item.cid])}
<li class="main_" onmouseover="displaySubMenu(this)" onmouseout="hideSubMenu(this)">
{$item.cname}
{else}
<li class="main_">
<a class="nvali" href="/list.php?cid={$item.cid}">{$item.cname}</a>
{/if}
<ul style="display: none;">
{foreach from=$subcategory_on_header[$item.cid] item=i}
<li><a href="/list.php?cid={$i.cid}">{$i.cname}</a> </li>
{/foreach}
</ul>
</li>
{/foreach}
</ul>
</div>
| 44.02381 | 262 | 0.601136 |
65f5b92ece16b6163de76c429066332104b6500c | 1,170 | rs | Rust | src/sentry2/mod.rs | ArthurTh0mas/martinez | 256e7ca6d7410c9e5d5803474a4e6673a2789283 | [
"Apache-2.0"
] | 15 | 2022-03-04T08:55:46.000Z | 2022-03-13T07:59:57.000Z | src/sentry2/mod.rs | ArthurTh0mas/martinez | 256e7ca6d7410c9e5d5803474a4e6673a2789283 | [
"Apache-2.0"
] | null | null | null | src/sentry2/mod.rs | ArthurTh0mas/martinez | 256e7ca6d7410c9e5d5803474a4e6673a2789283 | [
"Apache-2.0"
] | 2 | 2022-02-12T18:04:58.000Z | 2022-02-13T02:42:46.000Z | mod coordinator;
mod sentry;
pub mod types;
// impl PartialEq for HeadData {
// fn eq(&self, other: &Self) -> bool {
// self.height == other.height && self.hash == other.hash && self.td == other.td
// }
// }
// impl Eq for HeadData {}
// pub struct AtomicHeadData(AtomicPtr<HeadData>);
// impl AtomicHeadData {
// pub fn new() -> Self {
// Self(AtomicPtr::new(Box::into_raw(Box::new(HeadData::default()))))
// }
// pub fn get(&self) -> HeadData {
// unsafe { *self.0.load(atomic::Ordering::Relaxed) }
// }
// pub fn store(&self, data: HeadData) {
// self.0
// .store(Box::into_raw(Box::new(data)), atomic::Ordering::SeqCst);
// }
// pub fn compare_exchange(&self, current: HeadData, new: HeadData) -> bool {
// let current_ptr = Box::into_raw(Box::new(current));
// let new_ptr = Box::into_raw(Box::new(new));
// self.0
// .compare_exchange(
// current_ptr,
// new_ptr,
// atomic::Ordering::SeqCst,
// atomic::Ordering::SeqCst,
// )
// .is_ok()
// }
// }
| 27.857143 | 88 | 0.517094 |
6b93688e251eb68469a0a7acaa9db7fdf4ea89a9 | 256 | swift | Swift | crashes-duplicates/05857-resolvetypedecl.swift | radex/swift-compiler-crashes | 41a18a98ae38e40384a38695805745d509b6979e | [
"MIT"
] | null | null | null | crashes-duplicates/05857-resolvetypedecl.swift | radex/swift-compiler-crashes | 41a18a98ae38e40384a38695805745d509b6979e | [
"MIT"
] | null | null | null | crashes-duplicates/05857-resolvetypedecl.swift | radex/swift-compiler-crashes | 41a18a98ae38e40384a38695805745d509b6979e | [
"MIT"
] | null | null | null | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
struct A {
init() {
class b<T where T : c : U : c : A"\()
struct c<d {
}
let start = b
| 23.272727 | 87 | 0.6875 |
cb5c309e210ec09410081fc25212cfc4c2857387 | 392 | html | HTML | ml/samples/index.html | byteshiva/es6-tuts | d8e611669bae1eb2283438832d9c4ad27b1874b9 | [
"Apache-2.0"
] | 5 | 2019-04-16T07:28:02.000Z | 2022-02-17T18:15:13.000Z | ml/samples/index.html | byteshiva/es6-tuts | d8e611669bae1eb2283438832d9c4ad27b1874b9 | [
"Apache-2.0"
] | 10 | 2018-06-27T20:28:45.000Z | 2021-08-04T00:53:49.000Z | ml/samples/index.html | byteshiva/es6-tuts | d8e611669bae1eb2283438832d9c4ad27b1874b9 | [
"Apache-2.0"
] | null | null | null | <html>
<head>
<!-- Load TensorFlow.js -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.12.0"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js"></script>
<script src="sketch.js"></script>
</head>
<body>
</body>
</html>
| 28 | 99 | 0.622449 |
95afb4787664313268e223aca96c3500fa1c63e5 | 8,470 | swift | Swift | RightNow/Module/Dropdown/ReminderInputView.swift | EdgarDegas/RightNow | 247c40cd58d60915651cce33036495884efb5ca5 | [
"MIT"
] | 5 | 2020-07-29T05:09:09.000Z | 2022-01-26T07:08:25.000Z | RightNow/Module/Dropdown/ReminderInputView.swift | EdgarDegas/RightNow | 247c40cd58d60915651cce33036495884efb5ca5 | [
"MIT"
] | null | null | null | RightNow/Module/Dropdown/ReminderInputView.swift | EdgarDegas/RightNow | 247c40cd58d60915651cce33036495884efb5ca5 | [
"MIT"
] | null | null | null | //
// ReminderInputView.swift
// RightNow
//
// Created by iMoe on 2020/1/16.
// Copyright © 2020 imoe. All rights reserved.
//
import Cocoa
protocol ReminderInputViewDelegate: AnyObject {
/// Invoked when the user pressed the return key.
func reminderInputView(
_ reminderInputView: ReminderInputView,
textFieldDidEnter textField: AutoExpandingTextField)
/// Invoked when the text inside the text field changed.
func reminderInputView(
_ reminderInputView: ReminderInputView,
textFieldTextDidChange textField: AutoExpandingTextField)
}
extension ReminderInputViewDelegate {
func reminderInputView(
_ reminderInputView: ReminderInputView,
textFieldDidEnter textField: AutoExpandingTextField
) { }
func reminderInputView(
_ reminderInputView: ReminderInputView,
textFieldTextDidChange textField: AutoExpandingTextField
) { }
}
final class ReminderInputView: NSView {
var viewModel = ViewModel() {
didSet {
renderViewModel()
}
}
override func updateLayer() {
super.updateLayer()
separator.layer?.backgroundColor = NSColor.separatorColor.cgColor
textField.backgroundColor = NSColor.textBackgroundColor
label.textColor = NSColor.secondaryLabelColor
indicator.appearance = NSAppearance.current
returnIndicationLabel.textColor = NSColor.labelColor.withAlphaComponent(0.2)
}
weak var delegate: ReminderInputViewDelegate?
override var intrinsicContentSize: NSSize {
contentStackView.intrinsicContentSize
}
weak var textField: AutoExpandingTextField!
weak var label: NSTextField!
weak var contentStackView: StackView!
weak var indicator: NSProgressIndicator!
weak var separator: NSView!
weak var returnIndicationLabel: NSTextField!
override init(frame frameRect: NSRect) {
super.init(frame: frameRect)
setupInterface()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
private extension ReminderInputView {
@objc func textFieldDidEnter(_ sender: AutoExpandingTextField) {
delegate?.reminderInputView(self, textFieldDidEnter: sender)
}
func setupInterface() {
setContentHuggingPriority(.required, for: .vertical)
let textField = createTextField()
self.textField = textField
let label = createLabel()
self.label = label
let separator = createSeparator()
self.separator = separator
let contentStackView = createContentStackView()
addSubview(contentStackView, insets: .init())
contentStackView.addArrangedSubview(label)
contentStackView.addArrangedSubview(textField)
contentStackView.addArrangedSubview(separator)
contentStackView.setCustomSpacing(12, after: label)
self.contentStackView = contentStackView
let returnIndicationLabel = createReturnIndicationLabel()
addSubview(returnIndicationLabel)
self.returnIndicationLabel = returnIndicationLabel
let indicator = createIndicator()
addSubview(indicator)
self.indicator = indicator
alignViewWithTextField(returnIndicationLabel)
alignViewWithTextField(indicator)
}
func createTextField() -> AutoExpandingTextField {
let textField = AutoExpandingTextField()
textField.cell?.sendsActionOnEndEditing = false
textField.target = self
textField.action = #selector(textFieldDidEnter(_:))
textField.isBordered = false
textField.font = .systemFont(ofSize: 16)
textField.focusRingType = .none
textField.lineBreakMode = .byWordWrapping
textField.usesSingleLineMode = false
textField.maximumNumberOfLines = 0
textField.cell?.wraps = true
textField.cell?.usesSingleLineMode = false
textField.delegate = self
return textField
}
func createLabel() -> NSTextField {
let label = NSTextField(labelWithString: "")
label.font = .systemFont(ofSize: 12, weight: .medium)
return label
}
func createSeparator() -> InstrinsicContentSizeView {
let separator = InstrinsicContentSizeView()
separator.wantsLayer = true
separator.translatesAutoresizingMaskIntoConstraints = false
separator.addConstraint(.init(
item: separator,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .notAnAttribute,
multiplier: 1,
constant: 1))
return separator
}
func createReturnIndicationLabel() -> NSTextField {
let label = NSTextField(labelWithString: "")
label.translatesAutoresizingMaskIntoConstraints = false
return label
}
func createIndicator() -> NSProgressIndicator {
let indicator = NSProgressIndicator()
indicator.layer?.backgroundColor = NSColor.clear.cgColor
indicator.translatesAutoresizingMaskIntoConstraints = false
indicator.isIndeterminate = true
indicator.isDisplayedWhenStopped = false
indicator.style = .spinning
let heightConstraint = NSLayoutConstraint(
item: indicator,
attribute: .height,
relatedBy: .equal,
toItem: nil,
attribute: .notAnAttribute,
multiplier: 1,
constant: 16)
let widthConstraint = NSLayoutConstraint(
item: indicator,
attribute: .width,
relatedBy: .equal,
toItem: nil,
attribute: .notAnAttribute,
multiplier: 1,
constant: 16)
indicator.addConstraints([heightConstraint, widthConstraint])
return indicator
}
func createContentStackView() -> StackView {
let contentStackView = StackView()
contentStackView.translatesAutoresizingMaskIntoConstraints = false
contentStackView.orientation = .vertical
contentStackView.spacing = 4
return contentStackView
}
func alignViewWithTextField(_ view: NSView) {
assert(
separator != nil && textField != nil,
"Constraint must not be applied before subviews are added.")
let trailingConstraint = NSLayoutConstraint(
item: separator!,
attribute: .trailing,
relatedBy: .equal,
toItem: view,
attribute: .trailing,
multiplier: 1,
constant: 0)
let baselineConstraint = NSLayoutConstraint(
item: textField!,
attribute: .lastBaseline,
relatedBy: .equal,
toItem: view,
attribute: .lastBaseline,
multiplier: 1,
constant: 0)
addConstraints([
trailingConstraint,
baselineConstraint])
}
func renderViewModel() {
if textField.stringValue != viewModel.textFieldText {
textField.stringValue = viewModel.textFieldText
}
if label.stringValue != viewModel.labelText {
label.stringValue = viewModel.labelText
}
if textField.placeholderString != viewModel.textFieldPlaceholder {
textField.placeholderString = viewModel.textFieldPlaceholder
}
textField.isEnabled = !viewModel.showIndicator
returnIndicationLabel.isHidden = viewModel.showIndicator
if viewModel.showIndicator {
indicator.startAnimation(nil)
} else {
indicator.stopAnimation(nil)
}
}
}
extension ReminderInputView {
struct ViewModel {
var labelText: String = ""
var textFieldText: String = ""
var textFieldPlaceholder: String = ""
var showIndicator: Bool = false
}
}
extension ReminderInputView: NSTextFieldDelegate {
func controlTextDidChange(_ obj: Notification) {
let textField = obj.object as! AutoExpandingTextField
textField.invalidateIntrinsicContentSize()
viewModel.textFieldText = textField.stringValue
delegate?.reminderInputView(
self,
textFieldTextDidChange: textField)
}
}
| 32.083333 | 84 | 0.642975 |
f5da55e36776e91ffe9d71888ce792bac7fd25a7 | 695 | swift | Swift | baby-shape-swipe/Utility/ModelDimensionInfo.swift | smycynek/baby-triangle | 95ff3bf2fd7f679e42c7c95ea4bda339facae32e | [
"MIT"
] | 1 | 2018-11-29T19:37:42.000Z | 2018-11-29T19:37:42.000Z | baby-shape-swipe/Utility/ModelDimensionInfo.swift | smycynek/baby-triangle | 95ff3bf2fd7f679e42c7c95ea4bda339facae32e | [
"MIT"
] | null | null | null | baby-shape-swipe/Utility/ModelDimensionInfo.swift | smycynek/baby-triangle | 95ff3bf2fd7f679e42c7c95ea4bda339facae32e | [
"MIT"
] | null | null | null | import Foundation
import UIKit
class ModelDimensionInfo {
init (xLength: Int, yLength: Int, remainderX: Int, remainderY: Int, safeMarginTop: Int, safeMarginBottom: Int) {
self.xLength = xLength
self.yLength = yLength
self.remainderX = remainderX
self.remainderY = remainderY
self.safeMarginTop = safeMarginTop
self.safeMarginBottom = safeMarginBottom
}
var description: String {return "xLength: \(xLength), yLength: \(yLength), remainderX: \(remainderX), remainderY: \(remainderY)"}
var xLength: Int
var yLength: Int
var remainderX: Int
var remainderY: Int
var safeMarginTop: Int
var safeMarginBottom: Int
}
| 30.217391 | 133 | 0.68777 |
97c109de96443d60dd2fc6f2dbb630bdef45884f | 1,954 | lua | Lua | scripts/mobs/ai/yeti.lua | RavenX8/osirosenew | b4ef1aade379e0eb4753b24c30ec43faca77aa37 | [
"Apache-2.0"
] | 49 | 2017-02-07T15:10:04.000Z | 2021-11-12T06:00:30.000Z | scripts/mobs/ai/yeti.lua | RavenX8/osirosenew | b4ef1aade379e0eb4753b24c30ec43faca77aa37 | [
"Apache-2.0"
] | 104 | 2016-10-31T01:42:59.000Z | 2021-08-28T13:29:09.000Z | scripts/mobs/ai/yeti.lua | RavenX8/osirosenew | b4ef1aade379e0eb4753b24c30ec43faca77aa37 | [
"Apache-2.0"
] | 36 | 2016-11-01T11:25:34.000Z | 2022-03-09T22:38:51.000Z | registerNpc(341, {
walk_speed = 220,
run_speed = 650,
scale = 150,
r_weapon = 1008,
l_weapon = 0,
level = 92,
hp = 33,
attack = 424,
hit = 207,
def = 385,
res = 202,
avoid = 138,
attack_spd = 95,
is_magic_damage = 0,
ai_type = 124,
give_exp = 90,
drop_type = 372,
drop_money = 0,
drop_item = 57,
union_number = 57,
need_summon_count = 0,
sell_tab0 = 0,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 250,
npc_type = 1,
hit_material_type = 1,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
registerNpc(933, {
walk_speed = 220,
run_speed = 550,
scale = 180,
r_weapon = 1008,
l_weapon = 0,
level = 91,
hp = 3932,
attack = 361,
hit = 238,
def = 328,
res = 153,
avoid = 122,
attack_spd = 100,
is_magic_damage = 0,
ai_type = 168,
give_exp = 0,
drop_type = 3,
drop_money = 0,
drop_item = 100,
union_number = 100,
need_summon_count = 35,
sell_tab0 = 35,
sell_tab1 = 0,
sell_tab2 = 0,
sell_tab3 = 0,
can_target = 0,
attack_range = 300,
npc_type = 0,
hit_material_type = 1,
face_icon = 0,
summon_mob_type = 0,
quest_type = 0,
height = 0
});
function OnInit(entity)
return true
end
function OnCreate(entity)
return true
end
function OnDelete(entity)
return true
end
function OnDead(entity)
end
function OnDamaged(entity)
end | 21.955056 | 27 | 0.453429 |
28bc56f47a6cc41da54aed52fdadc3c41c5f2971 | 309 | rb | Ruby | db/migrate/20150107181004_add_github_name_to_board.rb | agileseason/agileseason-v1 | ec35952d412eaee39da230ef6877bdb27794c299 | [
"MIT"
] | null | null | null | db/migrate/20150107181004_add_github_name_to_board.rb | agileseason/agileseason-v1 | ec35952d412eaee39da230ef6877bdb27794c299 | [
"MIT"
] | null | null | null | db/migrate/20150107181004_add_github_name_to_board.rb | agileseason/agileseason-v1 | ec35952d412eaee39da230ef6877bdb27794c299 | [
"MIT"
] | null | null | null | class AddGithubNameToBoard < ActiveRecord::Migration
def self.up
add_column :boards, :github_name, :string
Board.where(id: 1).update_all(github_name: 'agileseason')
Board.where('id != 1').update_all('github_name = name')
end
def self.down
remove_column :boards, :github_name
end
end
| 23.769231 | 61 | 0.71521 |
74bc98adf0cba6bd0b8df5c7271d793acd3c082b | 3,458 | js | JavaScript | source/views/menu/MenuFilterView.js | chris-morgan/overture | a8d31c89581df93732b33d59ea16c8b6dbd79bcd | [
"MIT"
] | null | null | null | source/views/menu/MenuFilterView.js | chris-morgan/overture | a8d31c89581df93732b33d59ea16c8b6dbd79bcd | [
"MIT"
] | null | null | null | source/views/menu/MenuFilterView.js | chris-morgan/overture | a8d31c89581df93732b33d59ea16c8b6dbd79bcd | [
"MIT"
] | null | null | null | import { Class } from '../../core/Core';
import Obj from '../../foundation/Object';
import '../../foundation/EventTarget'; // For Function#on
import { bind, bindTwoWay } from '../../foundation/Binding';
import { lookupKey } from '../../dom/DOMEvent';
import View from '../View';
import ViewEventsController from '../ViewEventsController';
import SearchTextView from '../controls/SearchTextView';
const MenuFilterView = Class({
Extends: View,
isFiltering: bind( 'controller*isFiltering' ),
ariaAttributes: {
hidden: 'true',
},
className: function () {
return 'v-MenuFilter' +
( this.get( 'isFiltering' ) ? ' is-filtering' : '' );
}.property( 'isFiltering' ),
draw (/* layer */) {
const controller = this.get( 'controller' );
const searchTextView = this._input = new SearchTextView({
shortcut: this.get( 'shortcut' ),
placeholder: this.get( 'placeholder' ),
tabIndex: -1,
blurOnKeys: {},
value: bindTwoWay( controller, 'search' ),
});
return searchTextView;
},
// ---
focus () {
this._input.focus();
return this;
},
blur () {
this._input.blur();
return this;
},
setup: function () {
const controller = this.get( 'controller' );
if ( this.get( 'isInDocument' ) ) {
controller.on( 'done', this, 'blur' );
} else {
controller.off( 'done', this, 'blur' );
controller.set( 'isFiltering', false );
}
}.observes( 'isInDocument' ),
// ---
didFocus: function () {
this.get( 'controller' ).set( 'isFiltering', true );
}.on( 'focus' ),
handler: function () {
return new Obj({
view: this._input,
controller: this.get( 'controller' ),
done: function () {
if ( !this.view.get( 'isFocused' ) ) {
this.controller.set( 'isFiltering', false );
}
}.on( 'click', 'keydown' ),
});
}.property(),
captureEvents: function ( _, __, ___, isFiltering ) {
const handler = this.get( 'handler' );
if ( isFiltering ) {
ViewEventsController.addEventTarget( handler, -5 );
} else {
ViewEventsController.removeEventTarget( handler );
}
}.observes( 'isFiltering' ),
// ---
keydown: function ( event ) {
const controller = this.get( 'controller' );
switch ( lookupKey( event ) ) {
case 'Escape':
if ( controller.get( 'search' ) ) {
controller.resetSearch();
} else {
controller.done();
}
break;
case 'Enter':
controller.selectFocused();
break;
case 'ArrowUp':
controller.focusPrevious();
break;
case 'ArrowDown':
controller.focusNext();
break;
case 'ArrowLeft':
if ( !controller.collapseFocused() ) {
return;
}
break;
case 'ArrowRight':
if ( !controller.expandFocused() ) {
return;
}
break;
default:
return;
}
event.stopPropagation();
event.preventDefault();
}.on( 'keydown' ),
});
export default MenuFilterView;
| 27.228346 | 65 | 0.502892 |
05754e4aebc8b4b6bff81c37581d3abf58246cd5 | 70 | rb | Ruby | lib/active_admin/translate/version.rb | zappistore/activeadmin-translate | b4044a92730f532fe0748a388ffa15249bc08da4 | [
"MIT"
] | null | null | null | lib/active_admin/translate/version.rb | zappistore/activeadmin-translate | b4044a92730f532fe0748a388ffa15249bc08da4 | [
"MIT"
] | 1 | 2018-03-13T12:45:34.000Z | 2018-03-13T12:45:34.000Z | lib/active_admin/translate/version.rb | zappistore/activeadmin-translate | b4044a92730f532fe0748a388ffa15249bc08da4 | [
"MIT"
] | 2 | 2015-11-07T08:05:37.000Z | 2015-11-07T13:26:19.000Z | module ActiveAdmin
module Translate
VERSION = '0.2.8'
end
end
| 11.666667 | 21 | 0.685714 |
3b4ac6194ebae7bcbe0f6f9e4c8158d3340085e5 | 236 | h | C | ZPCamera/Util/ZPKit/UI/AVCaptureAudioDataOutput+Additions.h | jiangxiaoxin/ZPCamera | 240c47569176fc2d9a2a835a424b7472ad21aaf8 | [
"MIT"
] | 590 | 2017-02-19T04:50:13.000Z | 2021-09-04T08:30:03.000Z | ZPCamera/Util/ZPKit/UI/AVCaptureAudioDataOutput+Additions.h | jiangxiaoxin/ZPCamera | 240c47569176fc2d9a2a835a424b7472ad21aaf8 | [
"MIT"
] | 14 | 2017-02-21T07:57:19.000Z | 2018-10-24T19:03:57.000Z | ZPCamera/Util/ZPKit/UI/AVCaptureAudioDataOutput+Additions.h | jiangxiaoxin/ZPCamera | 240c47569176fc2d9a2a835a424b7472ad21aaf8 | [
"MIT"
] | 143 | 2017-02-20T01:14:26.000Z | 2021-12-03T07:19:16.000Z | //
// AVCaptureAudioDataOutput+Additions.h
// ZPCamera
//
// Created by 陈浩 on 2017/1/25.
// Copyright © 2017年 陈浩. All rights reserved.
//
#import <AVFoundation/AVFoundation.h>
@interface AVCaptureAudioDataOutput (Additions)
@end
| 16.857143 | 47 | 0.724576 |
dd8cf8029cb25643ab3a29720129feda5c78a290 | 82 | php | PHP | venture_configs/ru.php | OlegMarko/multi-tenant-application | 89d0feeda49ebf5e3df88057d1a4a2d16fad9870 | [
"MIT"
] | null | null | null | venture_configs/ru.php | OlegMarko/multi-tenant-application | 89d0feeda49ebf5e3df88057d1a4a2d16fad9870 | [
"MIT"
] | null | null | null | venture_configs/ru.php | OlegMarko/multi-tenant-application | 89d0feeda49ebf5e3df88057d1a4a2d16fad9870 | [
"MIT"
] | null | null | null | <?php
return [
'app.timezone' => 'Europe/Moscow',
'app.locale' => 'ru'
]; | 13.666667 | 38 | 0.52439 |
c455cfdb158f8811ceb4048dba93dc7362e863e0 | 68 | c | C | test/macro.c | fekir/wine-cl | 50fdbe1f6c950f907859dd7e120549b7a2f6eb28 | [
"0BSD"
] | 2 | 2021-01-18T01:59:37.000Z | 2021-12-03T04:23:26.000Z | test/macro.c | fekir/wine-cl | 50fdbe1f6c950f907859dd7e120549b7a2f6eb28 | [
"0BSD"
] | null | null | null | test/macro.c | fekir/wine-cl | 50fdbe1f6c950f907859dd7e120549b7a2f6eb28 | [
"0BSD"
] | null | null | null | #if !defined CICCIA
#error "CICCIA not defined
#endif
int main(){}
| 11.333333 | 26 | 0.705882 |
6dca907946e831094c231b53f5a573690ebfa9f8 | 2,737 | swift | Swift | Source/Utils/Data+hex.swift | VirgilSecurity/VirgilKeysiOS | fccbe8de3af24e01ef03fc8616049a1995277f59 | [
"BSD-3-Clause"
] | 21 | 2016-08-07T18:49:57.000Z | 2021-03-10T19:25:30.000Z | Source/Utils/Data+hex.swift | VirgilSecurity/VirgilKeysiOS | fccbe8de3af24e01ef03fc8616049a1995277f59 | [
"BSD-3-Clause"
] | 11 | 2016-12-05T11:16:28.000Z | 2022-03-31T07:03:15.000Z | Source/Utils/Data+hex.swift | VirgilSecurity/VirgilKeysiOS | fccbe8de3af24e01ef03fc8616049a1995277f59 | [
"BSD-3-Clause"
] | 7 | 2017-06-08T00:11:17.000Z | 2022-01-24T15:55:25.000Z | //
// Copyright (C) 2015-2021 Virgil Security Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// (1) Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// (2) Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materials provided with the
// distribution.
//
// (3) Neither the name of the copyright holder nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
// IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
//
import Foundation
// MARK: - Data extension for hex encoding and decoding
public extension Data {
/// Encodes data in hex format
///
/// - Returns: Hex-encoded string
func hexEncodedString() -> String {
return self
.map { String(format: "%02hhx", $0) }
.joined()
}
/// Initializer
///
/// - Parameter hex: Hex-encoded string
init?(hexEncodedString hex: String) {
let length = hex.lengthOfBytes(using: .ascii)
guard length % 2 == 0 else {
return nil
}
var data = Data()
data.reserveCapacity(length / 2)
var lowerBound = hex.startIndex
while true {
guard let upperBound = hex.index(lowerBound, offsetBy: 2, limitedBy: hex.endIndex) else {
break
}
let substr = String(hex[Range(uncheckedBounds: (lowerBound, upperBound))])
let res = strtol(substr, nil, 16)
data.append(contentsOf: [UInt8(res)])
lowerBound = upperBound
}
self = data
}
}
| 34.2125 | 101 | 0.667154 |
402b08d8c144574c9aa681c681bc62392e5adb5e | 2,971 | py | Python | src/crawl/unicrawl/spiders/kyushu_courses.py | japonophile/Education4Climate | 7502af540d597ed4f47724df7adb6bc34a95d8ba | [
"MIT"
] | null | null | null | src/crawl/unicrawl/spiders/kyushu_courses.py | japonophile/Education4Climate | 7502af540d597ed4f47724df7adb6bc34a95d8ba | [
"MIT"
] | null | null | null | src/crawl/unicrawl/spiders/kyushu_courses.py | japonophile/Education4Climate | 7502af540d597ed4f47724df7adb6bc34a95d8ba | [
"MIT"
] | null | null | null | from abc import ABC
from pathlib import Path
import pandas as pd
import scrapy
from src.crawl.utils import cleanup
from settings import YEAR, CRAWLING_OUTPUT_FOLDER
BASE_URL = 'https://ku-portal.kyushu-u.ac.jp/campusweb/slbssbdr.do?value(risyunen)={}&value(semekikn)=1&value(kougicd)={}&value(crclumcd)=ZZ'
PROG_DATA_PATH = Path(__file__).parent.absolute().joinpath(
f'../../../../{CRAWLING_OUTPUT_FOLDER}kyushu_programs_{YEAR}.json')
class KyushuUnivCourseSpider(scrapy.Spider, ABC):
"""
Courses crawler for Kyushu University
"""
name = "kyushu-courses"
custom_settings = {
'FEED_URI': Path(__file__).parent.absolute().joinpath(
f'../../../../{CRAWLING_OUTPUT_FOLDER}kyushu_courses_{YEAR}.json').as_uri()
}
def start_requests(self):
courses_ids = pd.read_json(open(PROG_DATA_PATH, "r"))["courses"]
courses_ids_list = sorted(list(set(courses_ids.sum())))
for course_id in courses_ids_list:
yield scrapy.Request(BASE_URL.format(YEAR, course_id), self.parse_course,
cb_kwargs={"course_id": str(course_id)})
def parse_course(self, response, course_id):
def get_sections_text(sections_names):
texts = ["\n".join(cleanup(response.xpath(
"//table[@class='syllabus_detail']"
f"//td[contains(text(), '{section}')]"
"/following-sibling::td[2]//text()").getall()))
for section in sections_names]
return "\n".join(texts) \
.replace('.none_display {\r\n display:none;\r\n}', '') \
.strip("\n /")
course_name = get_sections_text(["科目名称", "講義科目名"])
LANG_MAP = {"日本語": "ja", "英語": "en"}
language = get_sections_text(["使用言語"])
if language:
language = language.replace('.', '').strip()
languages = [LANG_MAP.get(language, "other")]
else:
languages = ["ja"]
teachers = response.xpath(
"//table[@class='syllabus_detail']"
f"//td[@class='label_kougi' and contains(text(), '担当教員')]"
"/following-sibling::td[2]//p/text()").getall()
teachers = [t.replace('\u3000', ' ').strip() for t in teachers]
goal = get_sections_text(["授業科目の目的", "授業概要", "個別の教育目標"])
content = get_sections_text(["授業計画"])
content += cleanup('\n'.join(response.xpath(
"//table[@class='syllabus_detail']"
"//td[@colspan='3']//table//td/text()").getall()))
activity = ""
other = get_sections_text(["キーワード"])
yield {
"id": course_id,
"name": course_name,
"year": f"{YEAR}-{int(YEAR)+1}",
"languages": languages,
"teachers": teachers,
"url": response.url,
"content": content,
"goal": goal,
"activity": activity,
"other": other
}
| 35.369048 | 141 | 0.566813 |
96c0d42ceecba18ef79b504ac314afed472c2443 | 655 | asm | Assembly | oeis/319/A319007.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/319/A319007.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/319/A319007.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A319007: Sum of the next n nonnegative integers repeated (A004526).
; 0,1,5,14,29,51,82,124,178,245,327,426,543,679,836,1016,1220,1449,1705,1990,2305,2651,3030,3444,3894,4381,4907,5474,6083,6735,7432,8176,8968,9809,10701,11646,12645,13699,14810,15980,17210,18501,19855,21274,22759,24311,25932,27624,29388,31225,33137,35126,37193,39339,41566,43876,46270,48749,51315,53970,56715,59551,62480,65504,68624,71841,75157,78574,82093,85715,89442,93276,97218,101269,105431,109706,114095,118599,123220,127960,132820,137801,142905,148134,153489,158971,164582,170324,176198,182205
mov $3,$0
add $0,3
mov $2,1
pow $3,2
add $2,$3
mul $2,2
mul $0,$2
sub $0,5
div $0,8
| 50.384615 | 499 | 0.774046 |
2711850dc96292cbcd4b5add7a428b8570140c94 | 2,254 | h | C | ui/gfx/image/image_util.h | domenic/mojo | 53dda76fed90a47c35ed6e06baf833a0d44495b8 | [
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | ui/gfx/image/image_util.h | domenic/mojo | 53dda76fed90a47c35ed6e06baf833a0d44495b8 | [
"BSD-3-Clause"
] | 1 | 2018-02-10T21:00:08.000Z | 2018-03-20T05:09:50.000Z | ui/gfx/image/image_util.h | domenic/mojo | 53dda76fed90a47c35ed6e06baf833a0d44495b8 | [
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GFX_IMAGE_IMAGE_UTIL_H_
#define UI_GFX_IMAGE_IMAGE_UTIL_H_
#include <vector>
#include "base/basictypes.h"
#include "ui/gfx/gfx_export.h"
namespace gfx {
class Image;
class ImageSkia;
}
namespace gfx {
// Creates an image from the given JPEG-encoded input. If there was an error
// creating the image, returns an IsEmpty() Image.
GFX_EXPORT Image ImageFrom1xJPEGEncodedData(const unsigned char* input,
size_t input_size);
// Fills the |dst| vector with JPEG-encoded bytes of the 1x representation of
// the given image.
// Returns true if the image has a 1x representation and the 1x representation
// was encoded successfully.
// |quality| determines the compression level, 0 == lowest, 100 == highest.
// Returns true if the Image was encoded successfully.
GFX_EXPORT bool JPEG1xEncodedDataFromImage(const Image& image,
int quality,
std::vector<unsigned char>* dst);
// Returns the visible (non-transparent) width of the 1x rep of the given
// image. If the image has no transparency, the leading value will be 0 and
// the trailing will be the image width. Return values are in the 1x width
// pixel units. Margins are given in 0-based column format. So if the image
// has only transparent pixels in columns 0, 1, 2, 3, then the leading value
// will be 4. Similarly, if there are all transparent pixels in column
// width-2, width-1, then the trailing margin value will be width-3.
// Returns true if the value is computed from opacity, false if it is a
// default value because of null image, missing Rep, etc.
// This method is only suitable for fairly small images (i.e. 16x16).
// The margins for a completely transparent image will be w/2-1, w/2, but this
// will be an expensive operation: it isn't expected that it will be frequently
// calculated.
GFX_EXPORT bool VisibleMargins(const ImageSkia& image,
int* leading, int* trailing);
} // namespace gfx
#endif // UI_GFX_IMAGE_IMAGE_UTIL_H_
| 41.740741 | 79 | 0.705413 |
fa739fd3bee9fcb347fbba3ceebeb499c0694c83 | 475 | sql | SQL | apps/api/src/migration/deploy/task_order_insert_trigger.sql | mepler-labs/steps | 5c89d8506313656c8fdbc8839def9ab108d93db6 | [
"MIT"
] | null | null | null | apps/api/src/migration/deploy/task_order_insert_trigger.sql | mepler-labs/steps | 5c89d8506313656c8fdbc8839def9ab108d93db6 | [
"MIT"
] | null | null | null | apps/api/src/migration/deploy/task_order_insert_trigger.sql | mepler-labs/steps | 5c89d8506313656c8fdbc8839def9ab108d93db6 | [
"MIT"
] | null | null | null | -- Deploy steps:task_order_insert_trigger to pg
-- requires: task_ordering
BEGIN;
CREATE FUNCTION assign_task_order() RETURNS trigger AS $$
DECLARE
next_order INTEGER;
BEGIN
SELECT COALESCE(MAX("order"), -1) + 1 FROM task WHERE task.user_id = NEW.user_id INTO next_order;
NEW.order := next_order;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER task_insert
BEFORE INSERT ON task
FOR EACH ROW EXECUTE PROCEDURE assign_task_order();
COMMIT;
| 21.590909 | 101 | 0.736842 |
e99a44cfe0ebc690dfb212606b38a4b28104eb05 | 5,531 | kt | Kotlin | postdata/src/main/java/com/loukwn/gifsoundit/postdata/PostRepositoryImpl.kt | loukwn/GifSound-It | c8a32dc96dc61182378558b9aceef6ae6037c8f9 | [
"MIT"
] | 4 | 2018-09-19T09:53:29.000Z | 2020-04-29T13:36:15.000Z | postdata/src/main/java/com/loukwn/gifsoundit/postdata/PostRepositoryImpl.kt | loukwn/GifSound-It | c8a32dc96dc61182378558b9aceef6ae6037c8f9 | [
"MIT"
] | null | null | null | postdata/src/main/java/com/loukwn/gifsoundit/postdata/PostRepositoryImpl.kt | loukwn/GifSound-It | c8a32dc96dc61182378558b9aceef6ae6037c8f9 | [
"MIT"
] | null | null | null | package com.loukwn.gifsoundit.postdata
import com.loukwn.gifsoundit.common.disk.SharedPrefsHelper
import com.loukwn.gifsoundit.common.util.DataState
import com.loukwn.gifsoundit.postdata.model.api.RedditSubredditResponse
import com.loukwn.gifsoundit.postdata.model.api.RedditTokenResponse
import com.loukwn.gifsoundit.postdata.model.api.toDomainData
import com.loukwn.gifsoundit.postdata.model.domain.PostResponse
import com.loukwn.gifsoundit.postdata.network.AuthApi
import com.loukwn.gifsoundit.postdata.network.PostApi
import io.reactivex.Scheduler
import io.reactivex.Single
import io.reactivex.disposables.Disposable
import io.reactivex.rxkotlin.subscribeBy
import io.reactivex.subjects.PublishSubject
import timber.log.Timber
import java.util.Date
import java.util.UUID
import javax.inject.Inject
import javax.inject.Named
internal class PostRepositoryImpl @Inject constructor(
private val authApi: AuthApi,
private val postApi: PostApi,
private val sharedPrefsHelper: SharedPrefsHelper,
@Named("io") private val ioScheduler: Scheduler
) : PostRepository {
private var postFetchDisposable: Disposable? = null
private var authTokenDisposable: Disposable? = null
override val postDataObservable = PublishSubject.create<DataState<PostResponse>>()
override fun getPosts(sourceType: SourceTypeDTO, filterType: FilterTypeDTO, after: String) {
postFetchDisposable?.dispose()
postFetchDisposable = if (authTokenIsValid()) {
getPostsFromReddit(sourceType, filterType, after)
.subscribeOn(ioScheduler)
.subscribeBy(
onSuccess = {
Timber.i("Posts fetched! After=${it.data.after}")
},
onError = {
Timber.i("Posts not fetched! Error: ${it.message}. Stacktrace: ${it.stackTrace}")
postDataObservable.onNext(DataState.Error(it, it.message))
}
)
} else {
getNewAuthTokenObservable()
.subscribeOn(ioScheduler)
.doOnSuccess { saveTokenToPrefs(it) }
.flatMap {
getPostsFromReddit(sourceType, filterType, after)
.subscribeOn(ioScheduler)
}
.subscribeBy(
onSuccess = {
Timber.i("Posts fetched! After=${it.data.after}")
},
onError = {
Timber.i("Posts not fetched! Error: ${it.message}. Stacktrace: ${it.stackTrace}")
postDataObservable.onNext(DataState.Error(it, it.message))
}
)
}
}
override fun refreshAuthTokenIfNeeded() {
if (!authTokenIsValid()) {
authTokenDisposable?.dispose()
authTokenDisposable = getNewAuthTokenObservable().subscribeOn(ioScheduler).subscribe()
}
}
private fun authTokenIsValid(): Boolean {
val now = Date()
val accessToken: String =
sharedPrefsHelper[SharedPrefsHelper.PREF_KEY_ACCESS_TOKEN, ""] ?: ""
val expiresAtDate =
Date(sharedPrefsHelper[SharedPrefsHelper.PREF_KEY_EXPIRES_AT, now.time])
return !(expiresAtDate.before(now) || expiresAtDate == now || accessToken.isEmpty())
}
private fun getPostsFromReddit(
sourceType: SourceTypeDTO,
filterType: FilterTypeDTO,
after: String
): Single<RedditSubredditResponse> {
val token = sharedPrefsHelper[SharedPrefsHelper.PREF_KEY_ACCESS_TOKEN, ""]
val request = when (filterType) {
FilterTypeDTO.Hot -> postApi.getHotGifSounds(
subName = sourceType.apiLabel,
tokenData = "bearer $token",
userAgent = BuildConfig.RedditUserAgent,
after = after,
)
FilterTypeDTO.New -> postApi.getNewGifSounds(
subName = sourceType.apiLabel,
tokenData = "bearer $token",
userAgent = BuildConfig.RedditUserAgent,
after = after,
)
is FilterTypeDTO.Top -> postApi.getTopGifSounds(
subName = sourceType.apiLabel,
tokenData = "bearer $token",
userAgent = BuildConfig.RedditUserAgent,
after = after,
time = filterType.type.apiLabel,
)
}
return request
.subscribeOn(ioScheduler)
.doOnSuccess { postDataObservable.onNext(DataState.Data(it.toDomainData())) }
}
private fun getNewAuthTokenObservable(): Single<RedditTokenResponse> =
authApi.getAuthToken(
REDDIT_GRANT_TYPE,
UUID.randomUUID().toString()
)
private fun saveTokenToPrefs(r: RedditTokenResponse) {
val date = Date(Date().time + r.expires_in.toLong() * 1000)
sharedPrefsHelper.put(SharedPrefsHelper.PREF_KEY_ACCESS_TOKEN, r.access_token)
sharedPrefsHelper.put(SharedPrefsHelper.PREF_KEY_EXPIRES_AT, date.time)
}
override fun clear() {
authTokenDisposable?.dispose()
authTokenDisposable = null
postFetchDisposable?.dispose()
postFetchDisposable = null
}
companion object {
private const val REDDIT_GRANT_TYPE = "https://oauth.reddit.com/grants/installed_client"
internal const val NUM_OF_POSTS_PER_REQUEST = 25
}
}
| 37.371622 | 105 | 0.627192 |
9bfd6b53698fb1e49e84e2186a61d7d7581a0a24 | 2,051 | js | JavaScript | proyectociclo3/src/Productos/ProductosPage.js | callecristina/ProyectoCiclo3 | a91d1ad6665e5dcbbeda7324359f0cd638a5d564 | [
"CC0-1.0"
] | null | null | null | proyectociclo3/src/Productos/ProductosPage.js | callecristina/ProyectoCiclo3 | a91d1ad6665e5dcbbeda7324359f0cd638a5d564 | [
"CC0-1.0"
] | null | null | null | proyectociclo3/src/Productos/ProductosPage.js | callecristina/ProyectoCiclo3 | a91d1ad6665e5dcbbeda7324359f0cd638a5d564 | [
"CC0-1.0"
] | null | null | null | import React from "react";
import { Link } from "react-router-dom";
import { useState } from "react/cjs/react.development";
export default function ProductosPage() {
const [nombre, setNombre] = useState("");
const [stock, setStock] = useState("");
const [precio, setPrecio] = useState("");
return (
<div className="container">
<h1>Productos</h1>
<table class="table">
<thead>
<tr>
<th scope="col">Id producto</th>
<th scope="col">Nombre</th>
<th scope="col">Stock</th>
<th scope="col">Precio</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td colspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
<h1>Nuevo Producto</h1>
<input
class="form-control"
type="text"
placeholder="Nombre del Producto"
aria-label="default input example"
onChange={(nombre) => setNombre(nombre.target.value)}
></input>
<input
class="form-control"
type="text"
placeholder="Stock"
aria-label="default input example"
onChange={(stock) => setStock(stock.target.value)}
></input>
<input
class="form-control"
type="text"
placeholder="Precio"
aria-label="default input example"
onChange={(precio) => setPrecio(precio.target.value)}
></input>
<button type="button" class="btn btn-primary">
Agregar
</button>
<Link to="/editarproducto" className="nav-link active" aria-current="page" >Editar</Link>
<h1>{nombre}</h1>
<h1>{stock}</h1>
<h1>{precio}</h1>
</div>
);
}
| 28.09589 | 95 | 0.501706 |
3773ebbaade607dd16c7ebda38e801cfcc204862 | 9,498 | sql | SQL | pace_wisdom.sql | swapnilbaviskar1994/pace_wisdom_solutions | 3e3551ad99d427181c7f4b5740a2ebbfbc0ea96f | [
"BSD-3-Clause"
] | null | null | null | pace_wisdom.sql | swapnilbaviskar1994/pace_wisdom_solutions | 3e3551ad99d427181c7f4b5740a2ebbfbc0ea96f | [
"BSD-3-Clause"
] | null | null | null | pace_wisdom.sql | swapnilbaviskar1994/pace_wisdom_solutions | 3e3551ad99d427181c7f4b5740a2ebbfbc0ea96f | [
"BSD-3-Clause"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 25, 2019 at 04:52 PM
-- Server version: 5.7.26-0ubuntu0.16.04.1
-- PHP Version: 7.0.33-5+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `pace_wisdom`
--
-- --------------------------------------------------------
--
-- Table structure for table `auth_assignment`
--
CREATE TABLE `auth_assignment` (
`item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`user_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`created_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `auth_item`
--
CREATE TABLE `auth_item` (
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`type` smallint(6) NOT NULL,
`description` text COLLATE utf8_unicode_ci,
`rule_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`data` blob,
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `auth_item_child`
--
CREATE TABLE `auth_item_child` (
`parent` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`child` varchar(64) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `auth_rule`
--
CREATE TABLE `auth_rule` (
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`data` blob,
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `department`
--
CREATE TABLE `department` (
`department_id` int(11) NOT NULL,
`department_name` varchar(100) NOT NULL,
`commission_percentage` int(11) NOT NULL,
`allowance_payable` float NOT NULL,
`last_month_deduction` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `department`
--
INSERT INTO `department` (`department_id`, `department_name`, `commission_percentage`, `allowance_payable`, `last_month_deduction`) VALUES
(1, ' Department 1', 1, 1212.33, 1002),
(2, ' Department 2', 2, 3131.44, 333),
(3, 'Department 3', 12, 23334.9, 22),
(4, 'Department 4', 20, 6733.9, 213123),
(5, 'Department 5', 15, 331321, 123123),
(6, 'Department 6', 18, 21312300, 2122),
(7, 'Department 7', 12, 789992, 67732),
(8, 'Department 8', 25, 33222, 222),
(9, 'Department 9', 10, 213123, 589),
(10, 'Department 10', 30, 213123, 300);
-- --------------------------------------------------------
--
-- Table structure for table `migration`
--
CREATE TABLE `migration` (
`version` varchar(180) NOT NULL,
`apply_time` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `migration`
--
INSERT INTO `migration` (`version`, `apply_time`) VALUES
('m000000_000000_base', 1561365085),
('m140506_102106_rbac_init', 1561366067),
('m170907_052038_rbac_add_index_on_auth_assignment_user_id', 1561366067),
('m180523_151638_rbac_updates_indexes_without_prefix', 1561366068);
-- --------------------------------------------------------
--
-- Table structure for table `payable_salary_tax_charge`
--
CREATE TABLE `payable_salary_tax_charge` (
`payable_tax_charge_id` int(11) NOT NULL,
`payable_salary_upto` int(11) NOT NULL,
`tax_pecentage_value` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `payable_salary_tax_charge`
--
INSERT INTO `payable_salary_tax_charge` (`payable_tax_charge_id`, `payable_salary_upto`, `tax_pecentage_value`) VALUES
(1, 100, 1.5),
(2, 500, 2.5),
(3, 1000, 3.6),
(4, 1500, 3.9),
(5, 2000, 4),
(6, 8000, 8.3),
(7, 20000, 9.1),
(8, 50000, 11.9),
(9, 100000, 13.9),
(10, 1000000, 30.9);
-- --------------------------------------------------------
--
-- Table structure for table `tbl_user`
--
CREATE TABLE `tbl_user` (
`user_id` int(11) NOT NULL,
`first_name` varchar(50) NOT NULL,
`last_name` varchar(50) NOT NULL,
`email_id` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`user_type_id` int(11) NOT NULL,
`department_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `tbl_user`
--
INSERT INTO `tbl_user` (`user_id`, `first_name`, `last_name`, `email_id`, `password`, `user_type_id`, `department_id`) VALUES
(25, 'swapnil', 'baviskar', 'swap@gmail.com', '12345', 5, 10);
-- --------------------------------------------------------
--
-- Table structure for table `user_accounts`
--
CREATE TABLE `user_accounts` (
`user_id` int(11) NOT NULL,
`payable_salary` float NOT NULL,
`basic_salary` float NOT NULL,
`tax_value` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user_accounts`
--
INSERT INTO `user_accounts` (`user_id`, `payable_salary`, `basic_salary`, `tax_value`) VALUES
(25, 232323, 15000, 32292.9);
-- --------------------------------------------------------
--
-- Table structure for table `user_type`
--
CREATE TABLE `user_type` (
`user_type_id` int(11) NOT NULL,
`user_type_name` varchar(200) NOT NULL,
`basic_salary` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user_type`
--
INSERT INTO `user_type` (`user_type_id`, `user_type_name`, `basic_salary`) VALUES
(1, 'Worker 1', 2000),
(2, 'Worker 2', 5000),
(3, 'Worker 3', 10000),
(4, 'Worker 4', 13000),
(5, 'Worker 5', 15000);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `auth_assignment`
--
ALTER TABLE `auth_assignment`
ADD PRIMARY KEY (`item_name`,`user_id`),
ADD KEY `idx-auth_assignment-user_id` (`user_id`);
--
-- Indexes for table `auth_item`
--
ALTER TABLE `auth_item`
ADD PRIMARY KEY (`name`),
ADD KEY `rule_name` (`rule_name`),
ADD KEY `idx-auth_item-type` (`type`);
--
-- Indexes for table `auth_item_child`
--
ALTER TABLE `auth_item_child`
ADD PRIMARY KEY (`parent`,`child`),
ADD KEY `child` (`child`);
--
-- Indexes for table `auth_rule`
--
ALTER TABLE `auth_rule`
ADD PRIMARY KEY (`name`);
--
-- Indexes for table `department`
--
ALTER TABLE `department`
ADD PRIMARY KEY (`department_id`);
--
-- Indexes for table `migration`
--
ALTER TABLE `migration`
ADD PRIMARY KEY (`version`);
--
-- Indexes for table `payable_salary_tax_charge`
--
ALTER TABLE `payable_salary_tax_charge`
ADD PRIMARY KEY (`payable_tax_charge_id`);
--
-- Indexes for table `tbl_user`
--
ALTER TABLE `tbl_user`
ADD PRIMARY KEY (`user_id`),
ADD KEY `user_type_id` (`user_type_id`),
ADD KEY `department_id` (`department_id`);
--
-- Indexes for table `user_accounts`
--
ALTER TABLE `user_accounts`
ADD PRIMARY KEY (`user_id`),
ADD KEY `user_id` (`user_id`);
--
-- Indexes for table `user_type`
--
ALTER TABLE `user_type`
ADD PRIMARY KEY (`user_type_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `department`
--
ALTER TABLE `department`
MODIFY `department_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `payable_salary_tax_charge`
--
ALTER TABLE `payable_salary_tax_charge`
MODIFY `payable_tax_charge_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `tbl_user`
--
ALTER TABLE `tbl_user`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;
--
-- AUTO_INCREMENT for table `user_type`
--
ALTER TABLE `user_type`
MODIFY `user_type_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `auth_assignment`
--
ALTER TABLE `auth_assignment`
ADD CONSTRAINT `auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `auth_item`
--
ALTER TABLE `auth_item`
ADD CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- Constraints for table `auth_item_child`
--
ALTER TABLE `auth_item_child`
ADD CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `tbl_user`
--
ALTER TABLE `tbl_user`
ADD CONSTRAINT `fk_department_id` FOREIGN KEY (`department_id`) REFERENCES `department` (`department_id`),
ADD CONSTRAINT `fk_user_type_id` FOREIGN KEY (`user_type_id`) REFERENCES `user_type` (`user_type_id`);
--
-- Constraints for table `user_accounts`
--
ALTER TABLE `user_accounts`
ADD CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `tbl_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| 26.830508 | 138 | 0.673931 |
ff99c116ee07d7d5c2c046402d3eee7ca9170bfc | 292 | sql | SQL | mysql-demo/mysql-transaction-demo/sql/serialization-failure-concurrency-1.sql | huaminglin/docker-demo | 41f7c3839cab55ff8a8b72e130269f49ce3bbd8a | [
"MIT"
] | null | null | null | mysql-demo/mysql-transaction-demo/sql/serialization-failure-concurrency-1.sql | huaminglin/docker-demo | 41f7c3839cab55ff8a8b72e130269f49ce3bbd8a | [
"MIT"
] | 1 | 2022-03-22T22:30:41.000Z | 2022-03-22T22:30:41.000Z | mysql-demo/mysql-transaction-demo/sql/serialization-failure-concurrency-1.sql | huaminglin/docker-demo | 41f7c3839cab55ff8a8b72e130269f49ce3bbd8a | [
"MIT"
] | null | null | null | SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
start transaction;
select 'sql 1: sleep 1 second';
select 'sql 1', sleep(1);
update t_isolation set name='txn1' where id=0;
select 'sql1 updated';
select 'sql 1: sleep 5 seconds ...';
select 'sql 1', sleep(5);
select 'sql 1: commit';
commit;
| 24.333333 | 48 | 0.719178 |
17908b12d703a061a7ecd662137b1d6c7e8fa52b | 3,237 | sql | SQL | week2/day3/ExampleDB.sql | 1811-nov27-net/sy-practice-training | d7cd07effe872b63e7dd1f8734257bd1884b28f5 | [
"MIT"
] | null | null | null | week2/day3/ExampleDB.sql | 1811-nov27-net/sy-practice-training | d7cd07effe872b63e7dd1f8734257bd1884b28f5 | [
"MIT"
] | null | null | null | week2/day3/ExampleDB.sql | 1811-nov27-net/sy-practice-training | d7cd07effe872b63e7dd1f8734257bd1884b28f5 | [
"MIT"
] | null | null | null | CREATE SCHEMA di;
GO
CREATE TABLE di.Department (
Id int IDENTITY(10,10) NOT NULL PRIMARY KEY,
Name NVARCHAR(100) NOT NULL,
Location NVARCHAR(100) NOT NULL
);
GO
CREATE TABLE di.Employee (
Id int IDENTITY(1,1) NOT NULL PRIMARY KEY,
FirstName NVARCHAR(50) NOT NULL,
LastName NVARCHAR(50) NOT NULL,
Ssn NVARCHAR(11) NOT NULL, -- formatted as "xxx-xx-xxxx", so 11 characters
DeptID int NOT NULL FOREIGN KEY REFERENCES di.Department(Id)
);
GO
CREATE TABLE di.EmpDetails (
EmployeeId int NOT NULL PRIMARY KEY FOREIGN KEY REFERENCES di.Employee(Id),
Salary MONEY NOT NULL,
Address1 NVARCHAR(100) NOT NULL,
Address2 NVARCHAR(100) NOT NULL,
City NVARCHAR(100) NOT NULL,
State NVARCHAR(100) NOT NULL,
Country NVARCHAR(100) NOT NULL
);
GO
-- inserting data into Department
INSERT INTO di.Department (Name, Location) VALUES
('HR', '2nd Floor');
INSERT INTO di.Department (Name, Location) VALUES
('IT', '3rd Floor');
INSERT INTO di.Department (Name, Location) VALUES
('Sales', '4th Floor');
SELECT * FROM di.Department;
-- inserting data into Employee
INSERT INTO di.Employee (FirstName, LastName, Ssn, DeptID) VALUES
('John', 'Smith', '000-00-0000', 20);
INSERT INTO di.Employee (FirstName, LastName, Ssn, DeptID) VALUES
('Jane', 'Doe', '111-11-1111', 10);
INSERT INTO di.Employee (FirstName, LastName, Ssn, DeptID) VALUES
('Bob', 'Doet', '222-22-2222', 30);
SELECT * FROM di.Employee;
SELECT * FROM di.Department;
-- inserting data into EmpDetails
INSERT INTO di.EmpDetails (EmployeeId, Salary, Address1, Address2, City, State, Country) VALUES
(1, 80000, '123 Main Street', '', 'Stockton', 'California', 'United States');
INSERT INTO di.EmpDetails (EmployeeId, Salary, Address1, Address2, City, State, Country) VALUES
(2, 75000, '802 Lemmings Avenue', 'Suite 503', 'Topeka', 'Kansas', 'United States');
INSERT INTO di.EmpDetails (EmployeeId, Salary, Address1, Address2, City, State, Country) VALUES
(3, 95000, '666 Why Court', '', 'MiddleOfNowhere', 'Oklahoma', 'United States');
SELECT * FROM di.EmpDetails;
-- add Marketing department
INSERT INTO di.Department (Name, Location) VALUES
('Marketing', 'Main Office');
SELECT * FROM di.Department;
-- add Tina Smith Employee (marketing), adding base wage
INSERT INTO di.Employee (FirstName, LastName, Ssn, DeptID) VALUES
('Tina', 'Smith', '123-45-6789', 40);
INSERT INTO di.EmpDetails (EmployeeId, Salary, Address1, Address2, City, State, Country) VALUES
(4, 60000, '1562 Test Boulevard', '', 'Tampa', 'Florida', 'United States');
SELECT * FROM di.Employee;
SELECT * FROM di.EmpDetails;
-- list all employeees in marketing
SELECT *
FROM di.Employee AS e
INNER JOIN di.Department AS d ON d.Id = e.DeptID
WHERE d.Name = 'Marketing';
-- report total salary of marketing
SELECT SUM(ed.Salary) AS [Total Salary]
FROM di.Employee AS e
INNER JOIN di.Department AS d ON d.Id = e.DeptID
INNER JOIN di.EmpDetails AS ed ON ed.EmployeeId = e.Id
WHERE d.Name = 'Marketing';
-- report total employees by department
SELECT d.Name, COUNT(e.Id) AS [# Employees]
FROM di.Employee AS e
INNER JOIN di.Department AS d ON d.Id = e.DeptID
GROUP BY d.Name;
-- increase salary of Tina Smith to $90,000
UPDATE di.EmpDetails
SET Salary = 90000
WHERE EmployeeId = 4;
SELECT * FROM di.EmpDetails; | 39 | 95 | 0.730306 |
5451bef6ee139fd69754013b86598f82d519d645 | 567 | go | Go | coder/base64_test.go | bearchit/goboost | a2418c170479afa5601ca317628b86966e41a284 | [
"MIT"
] | null | null | null | coder/base64_test.go | bearchit/goboost | a2418c170479afa5601ca317628b86966e41a284 | [
"MIT"
] | null | null | null | coder/base64_test.go | bearchit/goboost | a2418c170479afa5601ca317628b86966e41a284 | [
"MIT"
] | null | null | null | package coder_test
import (
"bytes"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/bearchit/goboost/coder"
)
func TestNewBase64URL(t *testing.T) {
buf := new(bytes.Buffer)
buf.WriteString("hello,world")
value := buf.Bytes()
encoder := coder.NewBase64URLEncoder()
encoded, err := encoder.Encode(value)
require.NoError(t, err)
decoder := coder.NewBase64URLDecoder()
decoded, payload, err := decoder.Decode(encoded)
require.NoError(t, err)
assert.Equal(t, value, decoded)
assert.Nil(t, payload)
}
| 19.551724 | 49 | 0.726631 |
816f0893d04dcdfd2c4689b5a4d1bfb506eba80d | 434 | swift | Swift | Src/iOS/CFMTextView.swift | maximkhatskevich/CocoaFontMaster-iOS | d16aebd3c7eae51f05db9d7df6cef401eebc4a68 | [
"MIT"
] | null | null | null | Src/iOS/CFMTextView.swift | maximkhatskevich/CocoaFontMaster-iOS | d16aebd3c7eae51f05db9d7df6cef401eebc4a68 | [
"MIT"
] | null | null | null | Src/iOS/CFMTextView.swift | maximkhatskevich/CocoaFontMaster-iOS | d16aebd3c7eae51f05db9d7df6cef401eebc4a68 | [
"MIT"
] | null | null | null | //
// CFMTextView.swift
// CocoaFontMaster-iOS
//
// Created by Maxim Khatskevich on 1/22/16.
// Copyright © 2016 Maxim Khatskevich. All rights reserved.
//
import UIKit
//===
extension UITextView: CFMUIControlWithOptionalFont { }
//===
public class CFMMetaFontTextView: UITextView
{
@IBInspectable var metaFontId: String? = nil
{
didSet
{
cfm_updateFont(metaFontId)
}
}
}
| 16.074074 | 60 | 0.633641 |
86051347ab7a5a87d652de02030495e7a577562a | 2,019 | rs | Rust | jormungandr/src/start_up/error.rs | ssainball/Jormungandr | 6827f613879ff6b155df9ef374bd24f55d53c809 | [
"Apache-2.0",
"MIT"
] | 1 | 2019-10-27T06:58:01.000Z | 2019-10-27T06:58:01.000Z | jormungandr/src/start_up/error.rs | ssainball/jormungandr | 6827f613879ff6b155df9ef374bd24f55d53c809 | [
"Apache-2.0",
"MIT"
] | null | null | null | jormungandr/src/start_up/error.rs | ssainball/jormungandr | 6827f613879ff6b155df9ef374bd24f55d53c809 | [
"Apache-2.0",
"MIT"
] | null | null | null | use crate::{
blockcfg, blockchain, explorer, network, secure,
settings::{self, logging},
};
use chain_storage::error::Error as StorageError;
use std::io;
custom_error! {pub ErrorKind
SQLite = "SQLite file",
Block0 = "Block0"
}
custom_error! {pub Error
LoggingInitializationError { source: logging::Error } = "Unable to initialize the logger",
ConfigurationError{source: settings::Error} = "Error in the overall configuration of the node",
IO{source: io::Error, reason: ErrorKind} = "I/O Error with {reason}",
ParseError{ source: io::Error, reason: ErrorKind} = "Parsing error on {reason}",
StorageError { source: StorageError } = "Storage error",
Blockchain { source: blockchain::Error } = "Error while loading the legacy blockchain state",
Block0 { source: blockcfg::Block0Error } = "Error in the genesis-block",
FetchBlock0 { source: network::FetchBlockError } = "Error fetching the genesis block from the network",
NetworkBootstrapError { source: network::BootstrapError } = "Error while loading the blockchain from the network",
NodeSecrets { source: secure::NodeSecretFromFileError} = "Error while loading the node's secrets.",
Block0InFuture = "Block 0 is set to start in the future",
ExplorerBootstrapError { source: explorer::error::Error } = "Error while loading the explorer from storage",
}
impl Error {
#[inline]
pub fn code(&self) -> i32 {
match self {
Error::LoggingInitializationError { .. } => 1,
Error::ConfigurationError { .. } => 2,
Error::IO { .. } => 3,
Error::ParseError { .. } => 4,
Error::StorageError { .. } => 5,
Error::Blockchain { .. } => 6,
Error::Block0 { .. } => 7,
Error::Block0InFuture => 7,
Error::NodeSecrets { .. } => 8,
Error::FetchBlock0 { .. } => 9,
Error::NetworkBootstrapError { .. } => 10,
Error::ExplorerBootstrapError { .. } => 11,
}
}
}
| 42.957447 | 118 | 0.624567 |
40c5c98edaf9cf73d5b627f7259aa5f43858ce16 | 10,486 | xhtml | HTML | src/epub/text/chapter-21.xhtml | standardebooks/h-g-wells_the-invisible-man | 5653c3ea5a35041710a180d1007c5e5d9b3adb6a | [
"CC0-1.0"
] | null | null | null | src/epub/text/chapter-21.xhtml | standardebooks/h-g-wells_the-invisible-man | 5653c3ea5a35041710a180d1007c5e5d9b3adb6a | [
"CC0-1.0"
] | null | null | null | src/epub/text/chapter-21.xhtml | standardebooks/h-g-wells_the-invisible-man | 5653c3ea5a35041710a180d1007c5e5d9b3adb6a | [
"CC0-1.0"
] | 1 | 2018-05-02T16:43:48.000Z | 2018-05-02T16:43:48.000Z | <?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: https://standardebooks.org/vocab/1.0" xml:lang="en-GB">
<head>
<title>XXI: In Oxford Street</title>
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
<link href="../css/local.css" rel="stylesheet" type="text/css"/>
</head>
<body epub:type="bodymatter z3998:fiction">
<section id="chapter-21" epub:type="chapter">
<hgroup>
<h2 epub:type="ordinal z3998:roman">XXI</h2>
<h3 epub:type="title">In Oxford Street</h3>
</hgroup>
<p>“In going downstairs the first time I found an unexpected difficulty because I could not see my feet; indeed I stumbled twice, and there was an unaccustomed clumsiness in gripping the bolt. By not looking down, however, I managed to walk on the level passably well.</p>
<p>“My mood, I say, was one of exaltation. I felt as a seeing man might do, with padded feet and noiseless clothes, in a city of the blind. I experienced a wild impulse to jest, to startle people, to clap men on the back, fling people’s hats astray, and generally revel in my extraordinary advantage.</p>
<p>“But hardly had I emerged upon Great Portland Street, however (my lodging was close to the big draper’s shop there), when I heard a clashing concussion and was hit violently behind, and turning saw a man carrying a basket of soda-water syphons, and looking in amazement at his burden. Although the blow had really hurt me, I found something so irresistible in his astonishment that I laughed aloud. ‘The devil’s in the basket,’ I said, and suddenly twisted it out of his hand. He let go incontinently, and I swung the whole weight into the air.</p>
<p>“But a fool of a cabman, standing outside a public house, made a sudden rush for this, and his extending fingers took me with excruciating violence under the ear. I let the whole down with a smash on the cabman, and then, with shouts and the clatter of feet about me, people coming out of shops, vehicles pulling up, I realised what I had done for myself, and cursing my folly, backed against a shop window and prepared to dodge out of the confusion. In a moment I should be wedged into a crowd and inevitably discovered. I pushed by a butcher boy, who luckily did not turn to see the nothingness that shoved him aside, and dodged behind the cabman’s four-wheeler. I do not know how they settled the business. I hurried straight across the road, which was happily clear, and hardly heeding which way I went, in the fright of detection the incident had given me, plunged into the afternoon throng of Oxford Street.</p>
<p>“I tried to get into the stream of people, but they were too thick for me, and in a moment my heels were being trodden upon. I took to the gutter, the roughness of which I found painful to my feet, and forthwith the shaft of a crawling hansom dug me forcibly under the shoulder blade, reminding me that I was already bruised severely. I staggered out of the way of the cab, avoided a perambulator by a convulsive movement, and found myself behind the hansom. A happy thought saved me, and as this drove slowly along I followed in its immediate wake, trembling and astonished at the turn of my adventure. And not only trembling, but shivering. It was a bright day in January and I was stark naked and the thin slime of mud that covered the road was freezing. Foolish as it seems to me now, I had not reckoned that, transparent or not, I was still amenable to the weather and all its consequences.</p>
<p>“Then suddenly a bright idea came into my head. I ran round and got into the cab. And so, shivering, scared, and sniffing with the first intimations of a cold, and with the bruises in the small of my back growing upon my attention, I drove slowly along Oxford Street and past Tottenham Court Road. My mood was as different from that in which I had sallied forth ten minutes ago as it is possible to imagine. This invisibility indeed! The one thought that possessed me was—how was I to get out of the scrape I was in.</p>
<p>“We crawled past Mudie’s, and there a tall woman with five or six yellow-labelled books hailed my cab, and I sprang out just in time to escape her, shaving a railway van narrowly in my flight. I made off up the roadway to Bloomsbury Square, intending to strike north past the museum and so get into the quiet district. I was now cruelly chilled, and the strangeness of my situation so unnerved me that I whimpered as I ran. At the northward corner of the square a little white dog ran out of the Pharmaceutical Society’s offices, and incontinently made for me, nose down.</p>
<p>“I had never realised it before, but the nose is to the mind of a dog what the eye is to the mind of a seeing man. Dogs perceive the scent of a man moving as men perceive his vision. This brute began barking and leaping, showing, as it seemed to me, only too plainly that he was aware of me. I crossed Great Russell Street, glancing over my shoulder as I did so, and went some way along Montague Street before I realised what I was running towards.</p>
<p>“Then I became aware of a blare of music, and looking along the street saw a number of people advancing out of Russell Square, red shirts, and the banner of the Salvation Army to the fore. Such a crowd, chanting in the roadway and scoffing on the pavement, I could not hope to penetrate, and dreading to go back and farther from home again, and deciding on the spur of the moment, I ran up the white steps of a house facing the museum railings, and stood there until the crowd should have passed. Happily the dog stopped at the noise of the band too, hesitated, and turned tail, running back to Bloomsbury Square again.</p>
<p>“On came the band, bawling with unconscious irony some hymn about ‘When shall we see His face?’ and it seemed an interminable time to me before the tide of the crowd washed along the pavement by me. Thud, thud, thud, came the drum with a vibrating resonance, and for the moment I did not notice two urchins stopping at the railings by me. ‘See ’em,’ said one. ‘See what?’ said the other. ‘Why—them footmarks—bare. Like what you makes in mud.’</p>
<p>“I looked down and saw the youngsters had stopped and were gaping at the muddy footmarks I had left behind me up the newly whitened steps. The passing people elbowed and jostled them, but their confounded intelligence was arrested. ‘Thud, thud, thud, when, thud, shall we see, thud, his face, thud, thud.’ ‘There’s a barefoot man gone up them steps, or I don’t know nothing,’ said one. ‘And he ain’t never come down again. And his foot was a-bleeding.’</p>
<p>“The thick of the crowd had already passed. ‘Looky there, Ted,’ quoth the younger of the detectives, with the sharpness of surprise in his voice, and pointed straight to my feet. I looked down and saw at once the dim suggestion of their outline sketched in splashes of mud. For a moment I was paralysed.</p>
<p>“ ‘Why, that’s rum,’ said the elder. ‘Dashed rum! It’s just like the ghost of a foot, ain’t it?’ He hesitated and advanced with outstretched hand. A man pulled up short to see what he was catching, and then a girl. In another moment he would have touched me. Then I saw what to do. I made a step, the boy started back with an exclamation, and with a rapid movement I swung myself over into the portico of the next house. But the smaller boy was sharp-eyed enough to follow the movement, and before I was well down the steps and upon the pavement, he had recovered from his momentary astonishment and was shouting out that the feet had gone over the wall.</p>
<p>“They rushed round and saw my new footmarks flash into being on the lower step and upon the pavement. ‘What’s up?’ asked someone. ‘Feet! Look! Feet running!’</p>
<p>“Everybody in the road, except my three pursuers, was pouring along after the Salvation Army, and this blow not only impeded me but them. There was an eddy of surprise and interrogation. At the cost of bowling over one young fellow I got through, and in another moment I was rushing headlong round the circuit of Russell Square, with six or seven astonished people following my footmarks. There was no time for explanation, or else the whole host would have been after me.</p>
<p>“Twice I doubled round corners, thrice I crossed the road and came back upon my tracks, and then, as my feet grew hot and dry, the damp impressions began to fade. At last I had a breathing space and rubbed my feet clean with my hands, and so got away altogether. The last I saw of the chase was a little group of a dozen people perhaps, studying with infinite perplexity a slowly drying footprint that had resulted from a puddle in Tavistock Square, a footprint as isolated and incomprehensible to them as Crusoe’s solitary discovery.</p>
<p>“This running warmed me to a certain extent, and I went on with a better courage through the maze of less frequented roads that runs hereabouts. My back had now become very stiff and sore, my tonsils were painful from the cabman’s fingers, and the skin of my neck had been scratched by his nails; my feet hurt exceedingly and I was lame from a little cut on one foot. I saw in time a blind man approaching me, and fled limping, for I feared his subtle intuitions. Once or twice accidental collisions occurred and I left people amazed, with unaccountable curses ringing in their ears. Then came something silent and quiet against my face, and across the square fell a thin veil of slowly falling flakes of snow. I had caught a cold, and do as I would I could not avoid an occasional sneeze. And every dog that came in sight, with its pointing nose and curious sniffing, was a terror to me.</p>
<p>“Then came men and boys running, first one and then others, and shouting as they ran. It was a fire. They ran in the direction of my lodging, and looking back down a street I saw a mass of black smoke streaming up above the roofs and telephone wires. It was my lodging burning; my clothes, my apparatus, all my resources indeed, except my chequebook and the three volumes of memoranda that awaited me in Great Portland Street, were there. Burning! I had burnt my boats—if ever a man did! The place was blazing.”</p>
<p>The invisible man paused and thought. Kemp glanced nervously out of the window. “Yes?” he said. “Go on.”</p>
</section>
</body>
</html>
| 291.277778 | 923 | 0.765306 |
72e7ceca276f43e4d59c4625d4854f4e62c2782e | 1,602 | html | HTML | projects/common/src/lib/controls/npm-package-select/npm-package-select.component.html | napkin-ide/lcu-data-apps | 2213b321a72bb6d6619947cf33de7c31aba91034 | [
"Apache-2.0"
] | null | null | null | projects/common/src/lib/controls/npm-package-select/npm-package-select.component.html | napkin-ide/lcu-data-apps | 2213b321a72bb6d6619947cf33de7c31aba91034 | [
"Apache-2.0"
] | 12 | 2020-03-23T20:46:00.000Z | 2022-03-02T03:34:50.000Z | projects/common/src/lib/controls/npm-package-select/npm-package-select.component.html | napkin-ide/lcu-data-apps | 2213b321a72bb6d6619947cf33de7c31aba91034 | [
"Apache-2.0"
] | null | null | null | <div [formGroup]="FormGroup">
<mat-form-field class="mat-full-width">
<input
matInput
placeholder="NPM Package"
formControlName="npmPkg"
[matAutocomplete]="npmPkg"
required
/>
<mat-autocomplete
#npmPkg="matAutocomplete"
(optionSelected)="PackageSelected($event)"
>
<ng-container *ngFor="let pkg of NPMPackages">
<mat-option [value]="pkg.Name">
<span>{{ pkg.Name }}</span> |
<small>(latest: {{ pkg.Version }})</small>
</mat-option>
</ng-container>
</mat-autocomplete>
<mat-icon
matSuffix
mat-icon-button
matTooltip="Enter the name of your NPM node package."
>
info_outline
</mat-icon>
</mat-form-field>
<mat-form-field class="mat-full-width">
<input
matInput
placeholder="Package Version"
formControlName="pkgVer"
[matAutocomplete]="pkgVer"
required
/>
<mat-autocomplete #pkgVer="matAutocomplete">
<ng-container *ngFor="let pkgVer of NPMPackageVersions">
<mat-option [value]="pkgVer">
<span>{{ pkgVer }}</span>
</mat-option>
</ng-container>
</mat-autocomplete>
<a
mat-icon-button
matSuffix
matTooltip="Enter any current or previous version of your package. Click here to access the package version in NPM."
[href]="
'https://www.npmjs.com/package/' + FormGroup.controls.npmPkg.value
"
target="_blank"
id="npm-package-button"
>
<mat-icon>info_outline</mat-icon>
</a>
</mat-form-field>
</div>
| 25.03125 | 122 | 0.592385 |
9c18de0a960838f1de00d0a9e19bf9196be2f7d7 | 4,110 | ts | TypeScript | packages-premium/timeline/src/event-placement.ts | sportalliance/fullcalendar | a75066c3ea8e92b1f70969132d3ec953d943a897 | [
"MIT"
] | null | null | null | packages-premium/timeline/src/event-placement.ts | sportalliance/fullcalendar | a75066c3ea8e92b1f70969132d3ec953d943a897 | [
"MIT"
] | null | null | null | packages-premium/timeline/src/event-placement.ts | sportalliance/fullcalendar | a75066c3ea8e92b1f70969132d3ec953d943a897 | [
"MIT"
] | null | null | null | import {
SegSpan, SegHierarchy, groupIntersectingEntries, SegEntry, buildIsoString,
computeEarliestSegStart,
} from '@fullcalendar-ml/common'
import { TimelineCoords } from './TimelineCoords'
import { TimelineLaneSeg } from './TimelineLaneSlicer'
export interface TimelineSegPlacement {
seg: TimelineLaneSeg | TimelineLaneSeg[] // HACK: if array, then it's a more-link group
hcoords: SegSpan | null
top: number | null
}
export function computeSegHCoords(
segs: TimelineLaneSeg[],
minWidth: number,
timelineCoords: TimelineCoords | null,
): SegSpan[] {
let hcoords: SegSpan[] = []
if (timelineCoords) {
for (let seg of segs) {
let res = timelineCoords.rangeToCoords(seg)
let start = Math.round(res.start) // for barely-overlapping collisions
let end = Math.round(res.end) //
if (end - start < minWidth) {
end = start + minWidth
}
hcoords.push({ start, end })
}
}
return hcoords
}
export function computeFgSegPlacements(
segs: TimelineLaneSeg[],
segHCoords: SegSpan[], // might not have for every seg
eventInstanceHeights: { [instanceId: string]: number }, // might not have for every seg
moreLinkHeights: { [isoStr: string]: number }, // might not have for every more-link
strictOrder?: boolean,
maxStackCnt?: number,
): [TimelineSegPlacement[], number] { // [placements, totalHeight]
let segInputs: SegEntry[] = []
let crudePlacements: TimelineSegPlacement[] = [] // when we don't know dims
for (let i = 0; i < segs.length; i += 1) {
let seg = segs[i]
let instanceId = seg.eventRange.instance.instanceId
let height = eventInstanceHeights[instanceId]
let hcoords = segHCoords[i]
if (height && hcoords) {
segInputs.push({
index: i,
span: hcoords,
thickness: height,
})
} else {
crudePlacements.push({
seg,
hcoords, // might as well set hcoords if we have them. might be null
top: null,
})
}
}
let hierarchy = new SegHierarchy()
if (strictOrder != null) {
hierarchy.strictOrder = strictOrder
}
if (maxStackCnt != null) {
hierarchy.maxStackCnt = maxStackCnt
}
let hiddenEntries = hierarchy.addSegs(segInputs)
let hiddenPlacements = hiddenEntries.map((entry) => ({
seg: segs[entry.index],
hcoords: entry.span,
top: 0,
} as TimelineSegPlacement))
let hiddenGroups = groupIntersectingEntries(hiddenEntries)
let moreLinkInputs: SegEntry[] = []
let moreLinkCrudePlacements: TimelineSegPlacement[] = []
const extractSeg = (entry: SegEntry) => segs[entry.index]
for (let i = 0; i < hiddenGroups.length; i += 1) {
let hiddenGroup = hiddenGroups[i]
let sortedSegs = hiddenGroup.entries.map(extractSeg)
let height = moreLinkHeights[buildIsoString(computeEarliestSegStart(sortedSegs))] // not optimal :(
if (height != null) {
// NOTE: the hiddenGroup's spanStart/spanEnd are already computed by rangeToCoords. computed during input.
moreLinkInputs.push({
index: segs.length + i, // out-of-bounds indexes map to hiddenGroups
thickness: height,
span: hiddenGroup.span,
})
} else {
moreLinkCrudePlacements.push({
seg: sortedSegs, // a Seg array signals a more-link
hcoords: hiddenGroup.span,
top: null,
})
}
}
// add more-links into the hierarchy, but don't limit
hierarchy.maxStackCnt = -1
hierarchy.addSegs(moreLinkInputs)
let visibleRects = hierarchy.toRects()
let visiblePlacements: TimelineSegPlacement[] = []
let maxHeight = 0
for (let rect of visibleRects) {
let segIndex = rect.index
visiblePlacements.push({
seg: segIndex < segs.length
? segs[segIndex] // a real seg
: hiddenGroups[segIndex - segs.length].entries.map(extractSeg), // signals a more-link
hcoords: rect.span,
top: rect.levelCoord,
})
maxHeight = Math.max(maxHeight, rect.levelCoord + rect.thickness)
}
return [
visiblePlacements.concat(crudePlacements, hiddenPlacements, moreLinkCrudePlacements),
maxHeight,
]
}
| 30.220588 | 112 | 0.6691 |
8d14c4aae11d5557f976567ebba886173ea1d397 | 9,747 | swift | Swift | huff/controllers/MyProfileViewController.swift | rluftw/huff | 153dbbb4b8929ca2fbc590ca88804f189f8115d7 | [
"MIT"
] | 1 | 2021-02-23T21:08:30.000Z | 2021-02-23T21:08:30.000Z | huff/controllers/MyProfileViewController.swift | rluftw/huff | 153dbbb4b8929ca2fbc590ca88804f189f8115d7 | [
"MIT"
] | null | null | null | huff/controllers/MyProfileViewController.swift | rluftw/huff | 153dbbb4b8929ca2fbc590ca88804f189f8115d7 | [
"MIT"
] | null | null | null | //
// MyProfileViewController.swift
// huff
//
// Created by Xing Hui Lu on 12/5/16.
// Copyright © 2016 Xing Hui Lu. All rights reserved.
//
import UIKit
import FirebaseAuth
import GoogleSignIn
import Firebase
@objc class MyProfileViewController: UIViewController {
var profile: Profile?
var runAddHandle: DatabaseHandle?
var runRemoveHandle: DatabaseHandle?
var bestPaceHandle: DatabaseHandle?
var bestDistanceHandle: DatabaseHandle?
// MARK: - outlets
@IBOutlet weak var profileInfoHeader: ProfileHeaderView!
@IBOutlet weak var bestPaceLabel: UILabel!
@IBOutlet weak var bestDistanceLabel: UILabel!
@IBOutlet weak var favoritedActiveRuns: UITableView! {
didSet {
favoritedActiveRuns.delegate = self
favoritedActiveRuns.dataSource = self
favoritedActiveRuns.rowHeight = UITableView.automaticDimension
favoritedActiveRuns.estimatedRowHeight = 150
}
}
// MARK: - initialization
deinit {
FirebaseService.sharedInstance().removeObserver(handler: runAddHandle)
FirebaseService.sharedInstance().removeObserver(handler: runRemoveHandle)
FirebaseService.sharedInstance().removeObserver(handler: bestPaceHandle)
FirebaseService.sharedInstance().removeObserver(handler: bestDistanceHandle)
}
// MARK: - lifecycle
override func viewDidLoad() {
super.viewDidLoad()
let firebaseUser = FirebaseService.getCurrentUser()
profile = Profile(user: firebaseUser, photo: nil, status: nil, dateJoined: nil)
fetchProfileData {
self.fetchProfilePhoto(profilePhotoUrl: firebaseUser.photoURL) {
self.bestPaceHandle = FirebaseService.sharedInstance().fetchBestPace() { (localSnapshot)->Void in
guard let bestPaceRunDict = localSnapshot.value as? [String: Any] else {
print("Best pace not available")
return
}
let run = Run(dict: bestPaceRunDict)
let pace = run.determinePaceString()
self.bestPaceLabel.text = "\(pace) min/mile"
}
self.bestDistanceHandle = FirebaseService.sharedInstance().fetchBestDistance(completionHandler: { (localSnapshot) in
guard let bestDistance = localSnapshot.value as? Double else {
print("Best pace not available")
return
}
self.bestDistanceLabel.text = String(format: "%.2f", Run.distanceInMiles(meters: bestDistance)) + " miles"
})
}
}
fetchFavoritedRuns()
// set back button for upcoming vc
let backButton = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
navigationItem.backBarButtonItem = backButton
}
// MARK: - action
@IBAction func logout(_ sender: Any) {
giveWarning(title: "Logout", message: "Are you sure you'd like to log off?") { (action) -> Void in
FirebaseService.sharedInstance().logout(completion: { (error) in
FirebaseService.destroy()
// it seems that googles sdk remembers the users and logs in automatically with their oauth token
// revokes the current google login
GIDSignIn.sharedInstance().disconnect()
})
}
}
@objc func showOptions(gesture: UILongPressGestureRecognizer) {
switch gesture.state {
case .began:
// 1. extract the cell and object associated
guard let cell = gesture.view as? ActiveRunTableViewCell, let run = cell.run else {
return
}
// 2. create the alert controller
let alertVC = UIAlertController(title: "Event Options for \(run.name ?? run.organization.name ?? "N/A")", message: "", preferredStyle: .actionSheet)
// 3. create the actions
if let phone = run.organization.phone, UIDevice.current.model == "iPhone" {
alertVC.addAction(UIAlertAction(title: "Call Organizer", style: .default, handler: { (action) in
guard let phoneURL = URL(string: "telprompt://" + phone) else { return }
UIApplication.shared.open(phoneURL, options: [:], completionHandler: nil)
}))
}
// set option to delete the run
alertVC.addAction(UIAlertAction(title: "Delete", style: .destructive, handler: { (action) in
if let id = run.assetID {
FirebaseService.sharedInstance().removeRunWith(id: id, completionHandler: nil)
}
}))
alertVC.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
present(alertVC, animated: true)
default: break
}
}
// MARK: - data fetching
// step 1: grab information from the database
func fetchProfileData(completionHandler: (()->Void)?) {
FirebaseService.sharedInstance().fetchAccountNode { (localSnapshot) in
let snap = localSnapshot.value as? [String: Any]
self.profile?.status = snap?["status"] as? String
self.profile?.accountCreationDate = snap?["creation_date"] as? TimeInterval
completionHandler?()
}
}
// step 2: fetch the image
func fetchProfilePhoto(profilePhotoUrl: URL?, completionHandler: (()->Void)?) {
if let url = profilePhotoUrl {
let request = URLRequest(url: url)
_ = NetworkOperation.sharedInstance().request(request, completionHandler: { (data, error) in
if let data = data, let image = UIImage(data: data) {
self.profile?.photo = image
}
self.updateProfile()
})
} else {
self.updateProfile()
}
completionHandler?()
}
func fetchFavoritedRuns() {
runRemoveHandle = FirebaseService.sharedInstance().observeLikedRuns(eventType: .childAdded) { (localSnapshot) in
guard let snapshot = localSnapshot.value as? [String: Any] else {
return
}
if let run = ActiveRun(result: snapshot) {
self.profile?.favoriteActiveRuns.append(run)
self.favoritedActiveRuns.insertRows(at: [IndexPath(row: self.profile!.favoriteActiveRuns.count-1, section: 0)], with: .automatic)
}
}
runAddHandle = FirebaseService.sharedInstance().observeLikedRuns(eventType: .childRemoved) { (localSnapshot) in
guard let snapshot = localSnapshot.value as? [String: Any] else {
return
}
// the run must have a uid
guard let uid = snapshot[ActiveRun.Key.AssetUID] as? String else {
print("error - the run does not consist of any uid")
return
}
// find the index of the run with the same uid
if let index = self.profile?.favoriteActiveRuns.index(where: { (run) -> Bool in
return run.assetID == uid
}) {
self.profile?.favoriteActiveRuns.remove(at: index)
self.favoritedActiveRuns.deleteRows(at: [IndexPath(row: index, section: 0)], with: .automatic)
}
}
}
private func updateProfile() {
DispatchQueue.main.async(execute: {
// step 3: assign the profile header view a new profile object
self.profileInfoHeader.profile = self.profile
})
}
// MARK: - navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "showRunDetail" {
let cell = sender as? ActiveRunTableViewCell
let detailVC = segue.destination as! ActiveRunDetailViewController
detailVC.run = cell?.run
} else if segue.identifier == "ShowAttributions" {
let creditVC = segue.destination as! CreditViewController
creditVC.title = sender as? String
}
}
}
extension MyProfileViewController {
// MARK: - setting options
@IBAction func settings(_ sender: Any) {
let alertVC = UIAlertController(title: "Settings", message: "", preferredStyle: .actionSheet)
// add privacy policy option
alertVC.addAction(UIAlertAction(title: "Privacy Policy", style: .default, handler: { (action) in
let privacyPolicyVC = self.storyboard?.instantiateViewController(withIdentifier: "privacyPolicyVC") as! TextViewController
self.navigationController?.pushViewController(privacyPolicyVC, animated: true)
}))
alertVC.addAction(UIAlertAction(title: "Terms of Service", style: .default, handler: { (action) in
let privacyPolicyVC = self.storyboard?.instantiateViewController(withIdentifier: "TOS") as! TextViewController
self.navigationController?.pushViewController(privacyPolicyVC, animated: true)
}))
// add attribution option
alertVC.addAction(UIAlertAction(title: "Third Party Notices", style: .default, handler: { (action) in
self.performSegue(withIdentifier: "ShowAttributions", sender: "Third Party Notices")
}))
alertVC.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
present(alertVC, animated: true, completion: nil)
}
}
| 42.378261 | 160 | 0.602031 |
61c1c96299d4c2babed8283d671b72e6c6883827 | 14,270 | kt | Kotlin | app/src/main/java/me/hufman/androidautoidrive/carapp/evplanning/views/WaypointDetailsView.kt | ntruchsess/AndroidAutoIdrive | 195b57c5708a0968092fadf505dba6a4f6ca6f6f | [
"MIT"
] | null | null | null | app/src/main/java/me/hufman/androidautoidrive/carapp/evplanning/views/WaypointDetailsView.kt | ntruchsess/AndroidAutoIdrive | 195b57c5708a0968092fadf505dba6a4f6ca6f6f | [
"MIT"
] | null | null | null | app/src/main/java/me/hufman/androidautoidrive/carapp/evplanning/views/WaypointDetailsView.kt | ntruchsess/AndroidAutoIdrive | 195b57c5708a0968092fadf505dba6a4f6ca6f6f | [
"MIT"
] | null | null | null | /**********************************************************************************************
Copyright (C) 2021 Norbert Truchsess norbert.truchsess@t-online.de
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/>.
**********************************************************************************************/
package me.hufman.androidautoidrive.carapp.evplanning.views
import io.bimmergestalt.idriveconnectkit.rhmi.*
import io.sentry.Sentry
import me.hufman.androidautoidrive.PhoneAppResources
import me.hufman.androidautoidrive.carapp.FocusTriggerController
import me.hufman.androidautoidrive.carapp.L
import me.hufman.androidautoidrive.carapp.RHMIModelType
import me.hufman.androidautoidrive.carapp.evplanning.DisplayWaypoint
import me.hufman.androidautoidrive.carapp.evplanning.EVPlanningSettings
import me.hufman.androidautoidrive.carapp.evplanning.NavigationModel
import me.hufman.androidautoidrive.carapp.evplanning.NavigationModelUpdater.Companion.TIME_FMT
import me.hufman.androidautoidrive.carapp.evplanning.NavigationModelUpdater.Companion.formatDistance
import me.hufman.androidautoidrive.evplanning.NetworkPreference
import me.hufman.androidautoidrive.utils.GraphicsHelpers
import java.util.*
class WaypointDetailsView(
val state: RHMIState,
val phoneAppResources: PhoneAppResources,
val graphicsHelpers: GraphicsHelpers,
val settings: EVPlanningSettings,
val focusTriggerController: FocusTriggerController,
val navigationModel: NavigationModel,
carAppAssetsIcons: Map<String, ByteArray>,
) {
companion object {
fun fits(state: RHMIState): Boolean {
return state is RHMIState.ToolbarState &&
state.componentsList.filterIsInstance<RHMIComponent.List>().firstOrNull {
it.getModel()?.modelType?.let { type -> RHMIModelType.of(type) } == RHMIModelType.RICHTEXT
} != null
}
fun displayWpToText(wp: DisplayWaypoint): String {
val operator = when(wp.operator_preference) {
NetworkPreference.PREFER_EXCLUSIVE -> "${wp.operator} (${L.EVPLANNING_OPERATOR_PREFERRED_EXCLUSIVE})"
NetworkPreference.EXCLUSIVE -> "${wp.operator} (${L.EVPLANNING_OPERATOR_EXCLUSIVE})"
NetworkPreference.PREFER -> "${wp.operator} (${L.EVPLANNING_OPERATOR_PREFERRED})"
NetworkPreference.DONTCARE -> "${wp.operator}"
NetworkPreference.AVOID -> "${wp.operator} (${L.EVPLANNING_OPERATOR_AVOIDED})"
null -> null
}
val numChargers = wp.num_chargers?.let {
if (it > 0) {
"${it}(${wp.free_chargers?.let { free ->
if (free >= 0) {
free
} else null
} ?: "-"})"
} else {
null
}
}
val dist = when {
wp.step_dst == null && wp.trip_dst != null ->
formatDistance(wp.trip_dst)
wp.step_dst != null && (wp.trip_dst == null || wp.step_dst == wp.trip_dst) ->
formatDistance(wp.step_dst)
wp.step_dst != null && wp.trip_dst != null ->
"${formatDistance(wp.step_dst)} (${formatDistance(wp.trip_dst)})"
else -> null
}
val outlets = listOfNotNull(
numChargers,
wp.charger_type?.uppercase(Locale.ROOT),
).joinToString(" ").takeIf { it.isNotEmpty() }
val soc = if (wp.soc_ariv == null) {
when {
wp.soc_planned != null && wp.soc_dep == null ->
"%.0f%%".format(wp.soc_planned)
wp.soc_planned == null && wp.soc_dep != null ->
"%.0f%%".format(wp.soc_dep)
wp.soc_planned != null && wp.soc_dep != null ->
"%.0f%%-%.0f%%".format(wp.soc_planned,wp.soc_dep)
else -> null
}
} else {
when {
wp.soc_planned != null && wp.soc_dep == null ->
"%.1f%% (%.0f)%%".format(wp.soc_ariv,wp.soc_planned)
wp.soc_planned == null && wp.soc_dep != null ->
"%.1f%% (%.0f)%%".format(wp.soc_ariv,wp.soc_dep)
wp.soc_planned != null && wp.soc_dep != null ->
"%.1f%% (%.0f%%-%.0f%%)".format(wp.soc_ariv,wp.soc_planned,wp.soc_dep)
else -> null
}
}
val time = listOfNotNull(
wp.duration?.let { "${it}min" },
when {
wp.eta != null && wp.etd == null -> "${wp.eta.format(TIME_FMT)}Uhr"
wp.eta == null && wp.etd != null -> "${wp.etd.format(TIME_FMT)}Uhr"
wp.eta != null && wp.etd != null -> "${wp.eta.format(TIME_FMT)}-${wp.etd.format(TIME_FMT)}Uhr"
else -> null
}
).joinToString(" ").takeIf { it.isNotEmpty() }
return listOfNotNull(
if (wp.is_waypoint) L.EVPLANNING_WAYPOINT else null,
operator,
outlets,
dist,
soc,
time,
).joinToString("\n")
}
const val MAX_LENGTH = 10000
}
var listState: RHMIState =
state // where to set the focus when the active notification disappears, linked during initWidgets
val nameWidget: RHMIComponent.List // the widget to display the charging-points name and operator's icon
val addressWidget: RHMIComponent.List // the widget to display the title in
val descriptionWidget: RHMIComponent.List // the widget to display the text
val imageWidget: RHMIComponent.Image
var visible = false
var onAddressClicked: (() -> Unit)? = null
var onActionAvoidChargerClicked: ((avoid: Boolean) -> Unit)? = null
var onActionOperatorPreferenceClicked: ((preference: NetworkPreference) -> Unit)? = null
init {
nameWidget = state.componentsList.filterIsInstance<RHMIComponent.List>().first()
addressWidget = state.componentsList.filterIsInstance<RHMIComponent.List>()[1]
descriptionWidget = state.componentsList.filterIsInstance<RHMIComponent.List>().first {
RHMIModelType.of(it.getModel()?.modelType) == RHMIModelType.RICHTEXT
}
imageWidget = state.componentsList.filterIsInstance<RHMIComponent.Image>().first()
}
fun initWidgets(listView: WaypointsListView) { //, inputState: RHMIState) {
state as RHMIState.ToolbarState
state.focusCallback = FocusCallback { focused ->
visible = focused
if (focused) {
show()
}
}
state.visibleCallback = VisibleCallback { visible ->
if (!visible) {
hide()
}
}
state.setProperty(RHMIProperty.PropertyId.HMISTATE_TABLETYPE, 3)
state.componentsList.forEach { it.setVisible(false) }
// separator below the title
state.componentsList.filterIsInstance<RHMIComponent.Separator>()
.forEach { it.setVisible(true) }
nameWidget.apply {
// operator's icon and charging-stops name
setVisible(true)
setEnabled(true)
setSelectable(true)
setProperty(RHMIProperty.PropertyId.LIST_COLUMNWIDTH.id, "55,0,*")
}
addressWidget.apply {
// the title and any side icon
setVisible(true)
setEnabled(true)
setSelectable(true)
}
imageWidget.apply {
setProperty(RHMIProperty.PropertyId.WIDTH.id, 400)
setProperty(RHMIProperty.PropertyId.HEIGHT.id, 300)
}
descriptionWidget.apply {
// text
setVisible(true)
setEnabled(true)
setSelectable(true)
}
addressWidget.getAction()?.asRAAction()?.rhmiActionCallback =
object : RHMIActionListCallback {
override fun onAction(index: Int, invokedBy: Int?) {
onAddressClicked?.invoke()
}
}
state.toolbarComponentsList.forEach {
if (it.getAction() != null) {
it.setSelectable(false)
it.setEnabled(false)
it.setVisible(true)
}
}
this.listState = listView.state
}
fun hide() {
val emptyList = RHMIModel.RaListModel.RHMIListConcrete(1)
nameWidget.getModel()?.setValue(emptyList, 0, 0, 0)
addressWidget.getModel()?.setValue(emptyList, 0, 0, 0)
descriptionWidget.getModel()?.setValue(emptyList, 0, 0, 0)
imageWidget.setVisible(false)
}
fun show() {
// set the focus to the first button
state as RHMIState.ToolbarState
val buttons =
ArrayList(state.toolbarComponentsList).filterIsInstance<RHMIComponent.ToolbarButton>()
.filter { it.action > 0 }
focusTriggerController.focusComponent(buttons[0])
redraw()
}
fun redraw() {
state as RHMIState.ToolbarState
if (!visible) {
// not visible, skip the redraw
return
}
try {
// find the notification, or bail to the list
//TODO: implement retrieval of navigationEntry from list
//val notification = NotificationsState.getNotificationByKey(selectedNavigationEntry?.key)
val wp: DisplayWaypoint? = navigationModel.selectedWaypoint
if (wp == null) {
focusTriggerController.focusState(listState, false)
return
}
// prepare the app icon and title
val icon = wp.icon?.let { graphicsHelpers.compress(it, 48, 48) } ?: ""
val title = listOfNotNull(
L.EVPLANNING_TITLE_WAYPOINT,
when {
navigationModel.isPlanning -> "[${L.EVPLANNING_REPLANNING}...]"
navigationModel.isError -> "[${L.EVPLANNING_ERROR}]"
navigationModel.shouldReplan -> "[${L.EVPLANNING_SHOULD_REPLAN}]"
else -> null
},
).joinToString(" ")
val name = listOfNotNull(
wp.title ?: L.EVPLANNING_UNKNOWN_LOC,
if (wp.is_ignored_charger) {
"(${L.EVPLANNING_CHARGER_AVOIDED})"
} else null,
if (!navigationModel.selectedWaypointValid) {
"[${L.EVPLANNING_INVALID}]"
} else null,
).joinToString(" ")
val nameListData = RHMIModel.RaListModel.RHMIListConcrete(3)
nameListData.addRow(arrayOf(icon, "", name))
// prepare the title data
var sidePictureWidth = 0
val addressListData = RHMIModel.RaListModel.RHMIListConcrete(2)
// if (navigationEntry.sidePicture == null || navigationEntry.sidePicture.intrinsicHeight <= 0) {
addressListData.addRow(arrayOf("", wp.address))
// } else {
// val sidePictureHeight = 96 // force the side picture to be this tall
// sidePictureWidth = (sidePictureHeight.toFloat() / navigationEntry.sidePicture.intrinsicHeight * navigationEntry.sidePicture.intrinsicWidth).toInt()
// val sidePicture = graphicsHelpers.compress(navigationEntry.sidePicture, sidePictureWidth, sidePictureHeight)
// titleListData.addRow(arrayOf(BMWRemoting.RHMIResourceData(BMWRemoting.RHMIResourceType.IMAGEDATA, sidePicture), navigationEntry.title + "\n"))
// }
addressWidget.setProperty(
RHMIProperty.PropertyId.LIST_COLUMNWIDTH.id,
"$sidePictureWidth,*"
)
// prepare the notification text
val descriptionListData = RHMIModel.RaListModel.RHMIListConcrete(1).apply {
addRow(arrayOf(displayWpToText(wp)))
}
state.getTextModel()?.asRaDataModel()?.value = title
nameWidget.getModel()?.value = nameListData
addressWidget.getModel()?.value = addressListData
descriptionWidget.getModel()?.value = descriptionListData
// try to load a picture from the notification
var pictureWidth = 400
var pictureHeight = 300
val pictureDrawable = try {
// navigationEntry.picture ?: navigationEntry.pictureUri?.let { phoneAppResources.getUriDrawable(it) }
} catch (e: Exception) {
// Log.w(TAG, "Failed to open picture from ${navigationEntry.pictureUri}", e)
null
}
// val picture = if (pictureDrawable != null && pictureDrawable.intrinsicHeight > 0) {
// pictureHeight = min(300, pictureDrawable.intrinsicHeight)
// pictureWidth = (pictureHeight.toFloat() / pictureDrawable.intrinsicHeight * pictureDrawable.intrinsicWidth).toInt()
// graphicsHelpers.compress(pictureDrawable, pictureWidth, pictureHeight, quality = 65)
//} else { null }
val picture = null
// if we have a picture to display
if (picture != null) {
// set the dimensions, ID4 clips images to this rectangle
imageWidget.apply {
setProperty(RHMIProperty.PropertyId.HEIGHT, pictureHeight)
setProperty(RHMIProperty.PropertyId.WIDTH, pictureWidth)
setVisible(true)
getModel()?.asRaImageModel()?.value = picture
}
} else {
imageWidget.setVisible(false)
}
// find and enable the clear button
val buttons =
ArrayList(state.toolbarComponentsList).filterIsInstance<RHMIComponent.ToolbarButton>()
.filter { it.action > 0 }
var index = 0
buttons[index].apply {
setEnabled(true)
setSelectable(true)
getImageModel()?.asImageIdModel()?.imageId = 158
getTooltipModel()?.asRaDataModel()?.value = if (wp.is_ignored_charger) {
L.EVPLANNING_ACTION_ALLOW_CHARGER
} else {
L.EVPLANNING_ACTION_AVOID_CHARGER
}
getAction()?.asRAAction()?.rhmiActionCallback = RHMIActionButtonCallback {
onActionAvoidChargerClicked?.invoke(!wp.is_ignored_charger)
getAction()?.asHMIAction()?.getTargetModel()?.asRaIntModel()?.value = state.id
}
index++
}
NetworkPreference.values().forEach { preference ->
if (configurePreferenceAction(buttons[index], preference, wp)) {
index++
}
}
buttons.subList(index, 6).forEach {
it.apply {
setEnabled(false)
setSelectable(false)
getAction()?.asRAAction()?.rhmiActionCallback = null // don't leak memory
}
}
} catch (t: Throwable) {
Sentry.capture(t)
}
}
fun configurePreferenceAction(
button: RHMIComponent.ToolbarButton,
preference: NetworkPreference,
wp: DisplayWaypoint
): Boolean {
if (preference != wp.operator_preference) {
button.apply {
setEnabled(true)
setSelectable(true)
getImageModel()?.asImageIdModel()?.imageId = 152
getTooltipModel()?.asRaDataModel()?.value =
when (preference) {
NetworkPreference.PREFER_EXCLUSIVE -> L.EVPLANNING_OPERATOR_ACTION_PREFER_EXCLUSIVE
NetworkPreference.EXCLUSIVE -> L.EVPLANNING_OPERATOR_ACTION_EXCLUSIVE
NetworkPreference.PREFER -> L.EVPLANNING_OPERATOR_ACTION_PREFER
NetworkPreference.DONTCARE -> L.EVPLANNING_OPERATOR_ACTION_DONTCARE
NetworkPreference.AVOID -> L.EVPLANNING_OPERATOR_ACTION_AVOID
}.format(
wp.operator ?: L.EVPLANNING_OPERATOR
)
getAction()?.asRAAction()?.rhmiActionCallback = RHMIActionButtonCallback {
onActionOperatorPreferenceClicked?.invoke(preference)
getAction()?.asHMIAction()?.getTargetModel()?.asRaIntModel()?.value =
state.id
}
}
return true
} else {
return false
}
}
}
| 36.126582 | 155 | 0.698809 |
8f05426749e0e47ebc27932188592c1c7f1846b9 | 42,505 | sql | SQL | db/db_thuctap (1).sql | hghung/thuc-tap-2020 | a75bea634f70254eecaf550e844ddabf7d5285c2 | [
"MIT"
] | null | null | null | db/db_thuctap (1).sql | hghung/thuc-tap-2020 | a75bea634f70254eecaf550e844ddabf7d5285c2 | [
"MIT"
] | 2 | 2021-02-03T02:10:51.000Z | 2021-04-30T12:51:06.000Z | db/db_thuctap (1).sql | hghung/thuc-tap-2020 | a75bea634f70254eecaf550e844ddabf7d5285c2 | [
"MIT"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 11, 2020 at 10:21 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `db_thuctap`
--
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`id` bigint(20) UNSIGNED NOT NULL,
`commenter_id` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
`commenter_type` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
`guest_name` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
`guest_email` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
`commentable_type` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`commentable_id` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`comment` text COLLATE utf8_unicode_ci NOT NULL,
`approved` tinyint(1) NOT NULL DEFAULT 1,
`child_id` bigint(20) UNSIGNED DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`id`, `commenter_id`, `commenter_type`, `guest_name`, `guest_email`, `commentable_type`, `commentable_id`, `comment`, `approved`, `child_id`, `deleted_at`, `created_at`, `updated_at`) VALUES
(3, '1', 'App\\User', NULL, NULL, 'App\\Models\\db_tintuc', '2', '@@@', 1, NULL, NULL, '2020-08-11 19:04:55', '2020-08-11 19:04:55'),
(4, '11', 'App\\User', NULL, NULL, 'App\\Models\\db_tintuc', '2', 'Hjx', 1, 3, NULL, '2020-08-11 19:05:10', '2020-08-11 19:05:10'),
(5, '11', 'App\\User', NULL, NULL, 'App\\Models\\db_tintuc', '2', 'Hahahaha bài đánh giá hay quá', 1, NULL, NULL, '2020-08-11 19:06:34', '2020-08-11 19:06:34'),
(6, '1', 'App\\User', NULL, NULL, 'App\\Models\\db_tintuc', '2', '^^', 1, 5, NULL, '2020-08-11 19:10:50', '2020-08-11 19:10:50'),
(7, '11', 'App\\User', NULL, NULL, 'App\\Models\\db_tintuc', '2', '^^', 1, 6, NULL, '2020-08-11 19:11:56', '2020-08-11 19:11:56');
-- --------------------------------------------------------
--
-- Table structure for table `db_baotri`
--
CREATE TABLE `db_baotri` (
`id` int(10) UNSIGNED NOT NULL,
`tieude` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`noidung` text COLLATE utf8_unicode_ci NOT NULL,
`ngay` date NOT NULL,
`gio` time NOT NULL,
`id_trangthai` int(10) UNSIGNED NOT NULL,
`id_khachhang` int(10) UNSIGNED NOT NULL,
`id_nhanvien` int(10) UNSIGNED DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `db_baotri`
--
INSERT INTO `db_baotri` (`id`, `tieude`, `noidung`, `ngay`, `gio`, `id_trangthai`, `id_khachhang`, `id_nhanvien`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 'Lỗi modernt', 'ádasdasdasd', '2020-08-02', '08:50:00', 1, 9, 7, NULL, '2020-08-01 09:49:57', '2020-08-11 20:17:48'),
(2, 'Lỗi máy tính', 'hello', '2020-08-20', '09:00:00', 3, 8, 3, NULL, '2020-08-01 10:02:14', '2020-08-01 10:02:14'),
(3, 'Mất mạng 123', 'Lỗi ko lên nguồn', '2020-08-20', '08:30:00', 3, 10, 7, NULL, '2020-08-03 11:26:44', '2020-08-11 07:21:49'),
(4, 'Cáp đứt', 'Cáp đứt sưa sớm giúp tui', '2020-08-01', '18:15:00', 4, 10, 11, '2020-08-11 20:17:33', '2020-08-10 17:10:04', '2020-08-11 20:17:33'),
(5, 'Hello', 'adasdadasd', '2020-08-06', '10:20:00', 3, 10, 11, NULL, '2020-08-11 11:19:54', '2020-08-11 11:40:22');
-- --------------------------------------------------------
--
-- Table structure for table `db_diachi`
--
CREATE TABLE `db_diachi` (
`id` int(10) UNSIGNED NOT NULL,
`lat` double NOT NULL,
`lng` double NOT NULL,
`dia_chi` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`id_quanhuyen` int(10) UNSIGNED NOT NULL,
`id_phuongxa` int(10) UNSIGNED NOT NULL,
`id_user` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `db_diachi`
--
INSERT INTO `db_diachi` (`id`, `lat`, `lng`, `dia_chi`, `id_quanhuyen`, `id_phuongxa`, `id_user`) VALUES
(2, 10.0620577, 105.7633836, 'Trường Bùi Hữu Nghĩa, Đường Cách Mạng Tháng 8, Bùi Hữu Nghĩa, Bình Thủy, Cần Thơ, Vietnam', 163, 2339, 3),
(3, 10.0466602, 105.7678156, 'Trường Đại học Kỹ thuật - Công nghệ Cần Thơ, Đường Nguyễn Văn Cừ, An Hòa, Ninh Kiều, Cần Thơ, Vietnam', 166, 2375, 5),
(4, 10.0299337, 105.7706153, 'Đại học Cần Thơ - Can tho University, Đường 3/2, Xuân Khánh, Ninh Kiều, Cần Thơ, Vietnam', 166, 2362, 6),
(5, 10.0275085, 105.7704009, 'mỳ cay omega, Ba Tháng Hai, Xuân Khánh, Ninh Kiều, Cần Thơ, Vietnam', 166, 2375, 7),
(6, 10.0266048, 105.7767294, 'Chợ Xuân Khánh, 30 Tháng 4, Xuân Khánh, Ninh Kiều, Cần Thơ, Vietnam', 166, 2375, 8),
(7, 10.040917, 105.784591, 'Vascara, Nguyễn Trãi, An Hội, Ninh Kiều, Cần Thơ, Vietnam', 166, 2375, 9),
(8, 10.0178629, 105.7666836, 'Đài Phát thanh & Truyền hình TP. Cần Thơ, Đường 30 Tháng 4, Hưng Lợi, Ninh Kiều, Cần Thơ, Vietnam', 166, 2372, 10),
(9, 10.0280761, 105.7800532, 'Trà sữa Chin - Quang Trung, Quang Trung, Xuân Khánh, Ninh Kiều, Cần Thơ, Vietnam', 166, 2375, 11),
(11, 10.0335761, 105.7641934, 'Hẻm 51, Xuân Khánh, Ninh Kiều, Cần Thơ, Vietnam', 166, 2375, 12);
-- --------------------------------------------------------
--
-- Table structure for table `db_taikhoan`
--
CREATE TABLE `db_taikhoan` (
`id` int(10) UNSIGNED NOT NULL,
`username` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
`password` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`trang_thai` int(11) NOT NULL,
`id_user` int(10) UNSIGNED NOT NULL,
`id_vaitro` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `db_taikhoan`
--
INSERT INTO `db_taikhoan` (`id`, `username`, `password`, `trang_thai`, `id_user`, `id_vaitro`, `created_at`, `updated_at`) VALUES
(1, 'admin', '$2y$10$fJW0ODKueT5x3WPb6DYMgOJ6eJmzqI2/my3nYhU2BCvHR3/AYGFNK', 1, 1, 1, '2020-07-27 09:42:09', '2020-07-27 09:42:09'),
(3, 'db_kt_03', '$2y$10$ZrjqoGahdIe3rnya8YL4LeM9ceh6FkA3rrsp0qGg.j75OMX/brlLq', 1, 3, 3, '2020-07-26 10:42:34', '2020-07-27 10:42:34'),
(5, 'db_nv_05', '$2y$10$T5oi/GeMi.U8Brw4EeM97e6UhIX8Tn10ByvmpRuFUitBq28coaue.', 1, 5, 2, '2020-07-06 15:56:01', '2020-08-11 09:43:19'),
(6, 'db_nv_06', '$2y$10$occI8UC81OwXSUfSuvc1KO3CWm4t/8lYmmhGwz6rGbisaipdtKc6O', 1, 6, 2, '2020-08-01 08:26:00', '2020-08-01 08:26:00'),
(7, 'db_kt_07', '$2y$10$U0EMLYMSYqeaggUs270n5ehRCJ178IkN4IMSDPaODiTNvWPPleH86', 1, 7, 3, '2020-08-01 08:27:12', '2020-08-01 08:27:12'),
(8, 'db_user_08', '$2y$10$o2saAKVVPYxZhbQTpZ1ZjeI.NcBzKfaFdT.zINuP6roiMFMc2Z48e', 1, 8, 4, '2020-08-03 08:29:40', '2020-08-01 08:29:40'),
(9, 'db_user_09', '$2y$10$yqLvLqIOOH/4PUG5QzwBG.TGM1b2PxQb9f1/qXnGRHGAHSsTvDhi.', 1, 9, 4, '2020-08-03 08:32:38', '2020-08-01 08:32:38'),
(10, 'db_user_010', '$2y$10$oTkP/ktpB5TxhBsan5/Re.uY6ClNXi63oKFKxnG.NmHZsK8QWjkkW', 1, 10, 4, '2020-08-10 11:25:58', '2020-08-11 09:58:33'),
(11, 'db_kt_011', '$2y$10$uKtbD9a2qEt9lhZXmRQiHOnOE710kOotjeVK1DD/BuLOj1pX1CYZm', 1, 11, 3, '2020-08-09 19:35:56', '2020-08-11 09:53:07'),
(12, 'db_nv_012', '$2y$10$wNkSkMLqIML3TMoChT/92eMoFVakWYuhbrnI7zZI2eQKLnZb8jH8.', 1, 12, 2, '2020-08-11 05:58:55', '2020-08-11 05:58:55');
-- --------------------------------------------------------
--
-- Table structure for table `db_tintuc`
--
CREATE TABLE `db_tintuc` (
`id` int(10) UNSIGNED NOT NULL,
`tieude` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`noidung` text COLLATE utf8_unicode_ci NOT NULL,
`views` int(11) NOT NULL,
`hinhanh` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`id_trangthai` int(10) UNSIGNED NOT NULL,
`id_user` int(10) UNSIGNED NOT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `db_tintuc`
--
INSERT INTO `db_tintuc` (`id`, `tieude`, `noidung`, `views`, `hinhanh`, `id_trangthai`, `id_user`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 'Ngày mới', '<p>ádasdasd</p>', 0, 'UUdp5_117380721_695925797805381_5791776059468599180_n.jpg', 2, 1, '2020-08-11 20:08:01', '2020-08-11 17:10:36', '2020-08-11 20:08:01'),
(2, 'Xiaomi sản xuất chip riêng cho smartphone', '<p>CEO Xiaomi Lei Jun cho biết vẫn tiếp tục thiết kế chip riêng cho thiết bị di động kể từ sau khi ra mắt mẫu Surge S1 năm 2017.</p><p>\"Những fan của Mi có thể yên tâm rằng kế hoạch vẫn đang được tiến hành\", ông Jun viết trên Weibo hôm 9/8. \"Khi có diễn tiến mới, chúng tôi sẽ thông báo rộng rãi\".</p><p>Xiaomi từng thiết kế chip xử lý của riêng mình có tên Surge S1, tích hợp trong mẫu smartphone giá rẻ Mi 5C và ra mắt năm 2017. Nhưng kể từ đó đến nay, không có thêm sản phẩm tương tự nào xuất hiện trên thị trường.</p><figure class=\"image\"><img src=\"https://i1-sohoa.vnecdn.net/2020/08/11/f24a7e56-dac7-11ea-b1d3-42d340-2896-7438-1597115500.jpg?w=680&h=0&q=100&dpr=1&fit=crop&s=eyK-gUJ2NR7dLkCfxvQwtw\" alt=\"Xiaomi vẫn sản xuất chip riêng cho smartphone\"></figure><p> </p><p>Surge S1 là chip xử lý cho smartphone duy nhất của Xiaomi. Ảnh: <i>Handout</i>.</p><p>Việc tự thiết kế và sản xuất bộ xử lý đang trở nên cấp thiết hơn tại Trung Quốc, nhất là sau khi chính quyền Tổng thống Donald Trump mở rộng lệnh trừng phạt với Huawei từ tháng 5. Tuần trước, Richard Yu - Giám đốc mảng Kinh doanh Tiêu dùng của Huawei - thừa nhận sẽ \"<a href=\"https://vnexpress.net/huawei-khai-tu-mang-chip-di-dong-4143555.html\">khai tử</a>\" mảng chip di động HiSilicon kể từ ngày 15/9 do nguồn cung ứng gặp khó khăn vì áp lực từ Mỹ.</p><p>Những năm gần đây, Trung Quốc bắt đầu tự chủ mảng bán dẫn nhằm tránh phụ thuộc vào nước ngoài bằng các ưu đãi thuế với các nhà sản xuất chip trong nước. Tuy vậy, các chuyên gia đánh giá rằng các công ty nội địa Trung Quốc khó có thể tạo ra những vi xử lý tốt cho smartphone cao cấp, ngoại trừ mẫu Kirin của Huawei.</p><p>Xiaomi thành lập bộ phận thiết kế chip riêng có tên Pinecone vào 2014 - 10 năm sau khi Huawei cho ra đời HiSilicon. Tuy nhiên, trong khi Huawei liên tục cho ra các mẫu Kirin với hiệu năng được đánh giá không thua kém Snapdragon của Qualcomm hay A-series của Apple, Xiaomi vẫn chưa trình làng chip nào ngoài Surge S1.</p><p>Năm ngoái, Xiaomi công bố một chip AI riêng do Pinecone sản xuất có tên Dayu. Tuy nhiên, sản phẩm này chủ yếu tập trung cho các thiết bị thông minh trong hệ sinh thái của hãng, chưa có trên điện thoại di động.</p>', 30, 'DF5sF_f24a7e56-dac7-11ea-b1d3-42d340-2896-7438-1597115500.jpg', 2, 1, NULL, '2020-08-11 17:36:13', '2020-08-11 19:14:46'),
(3, 'Kết nối 6G sẽ thay đổi tương lai thế nào', '<p>Công nghệ 6G sẽ là nền tảng cho một kỷ nguyên thông minh, nơi AI và robot trở thành một phần thiết yếu của cuộc sống.</p><p>Kết nối 6G trong tương lai không chỉ giúp con người tương tác với nhau mà còn giúp kết nối giữa thiết bị với thiết bị. Xu thế phát triển của công nghệ này sẽ còn mở rộng, tạo điều kiện cho việc chia sẻ nội dung và ý tưởng theo một cách mới và thú vị hơn rất nhiều.</p><p>Sunghyun Choi, Giáo sư ngành Kỹ thuật Điện và Máy tính tại Đại học Quốc gia Seoul, hiện là Giám đốc Trung tâm nghiên cứu công nghệ truyền thông tiên tiến của tập đoàn Samsung, cho biết, \"so với các thế hệ trước, công nghệ kết nối hiện tại đã có khả năng xử lý nhiều dữ liệu hơn trong thời gian ngắn\". Ông lý giải, hạ tầng thiết bị mạng đã trải qua bước \"tiến hóa\" để bắt kịp yêu cầu của xu hướng công nghệ mới. Đến cuối cùng, nền sản xuất phải hướng tới tự động hóa để thích ứng với các công nghệ kết nối hiện đại, cũng như tăng chất lượng dịch vụ cung cấp.</p><p>Công nghệ 5G đang được áp dụng vào hạ tầng lõi của rất nhiều ngành công nghiệp khác nhau, từ dịch vụ truyền thông chất lượng cao tới nhà máy thông minh, liên lạc giữa xe với xe và còn nhiều dịch vụ mới khác. Từ tốc độ truyền dữ liệu 20 Gb/giây - siêu nhanh, với độ trễ chỉ 1 mili giây - siêu thấp, cũng như độ ổn định 99,999% - siêu ổn định, có vẻ mọi thứ trong kỷ nguyên 5G đều \"siêu\". Tuy nhiên, 5G mới chỉ là bước khởi đầu của một thế giới \"siêu trải nghiệm\".</p><figure class=\"image\"><img src=\"https://i1-sohoa.vnecdn.net/2020/08/10/6G-7972-1597028307.jpg?w=680&h=0&q=100&dpr=1&fit=crop&s=0k1588THd70r4S9S5-YXHQ\" alt=\"Kết nối 6G sẽ thay đổi tương lai thế nào\"></figure><p> </p><p>Để đưa công nghệ 5G lên một tầm cao mới, Giáo sư Choi nhận định, sẽ cần lượng lớn nghiên cứu và phát triển. Lời giải cho những thách thức công nghệ nằm ở khả năng cải thiện hiệu suất phần mềm và đẩy mạnh áp dụng AI. Hệ thống mạng trong tương lai sẽ cần có khả năng xử lý một lượng thông tin khổng lồ, đồng nghĩa với nhu cầu các thiết bị mạng và khả năng phần mềm hóa tăng nhanh. Không chỉ vậy, việc phát triển các công nghệ lõi cho 6G với tầm nhìn dài hạn và định hướng tiêu chuẩn toàn cầu cũng hết sức cần thiết.</p><p>Công nghệ kết nối đang phát triển nhanh hơn bất kỳ ngành công nghiệp nào khác và đang chứng kiến sự cạnh tranh khốc liệt để làm chủ tương lai. Tuy nhiên, Giáo sư Choi cho rằng, trọng tâm của các nhà nghiên cứu không phải là sự cạnh tranh mà là mục tiêu dài hạn. Một số công nghệ đã sẵn sàng thay đổi cuộc sống con người, nhưng phải mất hàng thập kỷ mới có thể thương mại hóa. Ông nói: \"Những nghiên cứu chúng tôi đang tiến hành có vẻ khó thành sự thật lúc này, nhưng hoàn toàn có tiềm năng trong tương lai. Chúng tôi luôn phải suy nghĩ về những loại hình dịch vụ mà người dùng trong tương lai sẽ cần\".</p><p>Gần đây, Samsung đã công bố sách trắng 6G, bao gồm các khía cạnh khác nhau của công nghệ mạng mới, như xu hướng về kỹ thuật và xã hội, các dịch vụ mới, yêu cầu về công nghệ và tiến trình tiêu chuẩn hóa dự kiến.</p><p>Giáo sư Sunghyun Choi là một chuyên gia trong lĩnh vực mạng và kết nối không dây. Năm 2013, ông được vinh danh là một thành viên cấp cao của Viện Kỹ sư Điện và Điện tử (IEEE), tổ chức chuyên về kỹ thuật lớn nhất thế giới. Từ tháng 9/2019, ông là Giám đốc Trung tâm nghiên cứu công nghệ truyền thông tiên tiến của tập đoàn Samsung. Ở đây, ông và các đồng sự nghiên cứu, phát triển cũng như tiêu chuẩn hóa những công nghệ truyền thông không dây cốt lõi, nhằm cải thiện chất lượng 5G và hiện thực hóa 6G.</p>', 1, 'YYzlA_6G-7972-1597028307.jpg', 2, 1, NULL, '2020-08-11 17:41:10', '2020-08-11 19:15:36'),
(4, 'iPhone 12 gặp lỗi khi thử nghiệm', '<p>Lớp phủ ống kính camera cho iPhone 12 bị nứt trong quá trình thử nghiệm, khiến Apple phải làm việc lại với nhà cung ứng.</p><p>Theo nhà phân tích Ming-Chi Kuo, sự cố này xảy ra với nhà cung ứng ống kính camera điện thoại tên Yujingguang. Ống kính do đơn vị này cung cấp gặp hiện tượng nứt vỡ lớp phủ bên ngoài, khi thử nghiệm ở điều kiện nhiệt độ và độ ẩm cao. Đây là bài thử nghiệm dành cho iPhone, để có thể đáp ứng được điều kiện khí hậu vùng nhiệt đới.</p><p>Yujingguang là đơn vị cung ứng linh kiện cho hai phiên bản iPhone 12 và iPhone 12 Max, nên sự cố này không ảnh hưởng đến quá trình sản xuất của bản Pro. Ngoài ra, Apple còn có một nhà cung ứng ống kính khác là Largan, có thể bù đắp được sự chậm trễ do Yujingguang gây ra.</p><figure class=\"image\"><img src=\"https://i1-sohoa.vnecdn.net/2020/08/09/36564-68130-iphone-12-dummies-3458-4489-1596912353.jpg?w=680&h=0&q=100&dpr=1&fit=crop&s=EACwMERc8_ifDgMqQee6Wg\" alt=\"Mô hình iPhone 12. Ảnh: MacRumors\"></figure><p> </p><p>Mô hình iPhone 12. Ảnh: <i>MacRumors</i></p><p>Theo Ming-Chi Kuo, Apple thậm chí có thể biến sự cố này thành lợi thế cho mình. Đơn hàng của Apple có giá trị khoảng 2 - 2,2 USD cho mỗi ống kính, nhưng Yujingguang có thể \"bị ép\" phải cung cấp chúng với giá 1,5 USD nếu họ muốn tiếp tục \"làm ăn\" với Apple khi sự cố được khắc phục.</p><p>Việc gặp lỗi trong quá trình thử nghiệm có thể xảy ra với bất kỳ sản phẩm và nhà cung ứng nào. Tuy nhiên, sự cố xảy ra gần ngày ra mắt sản phẩm khiến nhiều người lo lắng về tiến độ của iPhone 12.</p><p>Apple đã thừa nhận năm nay sẽ giới thiệu iPhone 12 chậm hơn mọi năm. Vì vậy, hãng hoàn toàn có thể kiểm soát được sự cố với các nhà cung ứng. Tuy nhiên, nguồn tin từ DigiTimes cho biết, Apple có thể phải chia việc ra mắt bộ bốn iPhone 12 thành hai đợt, do bo mạch cho iPhone 12 và iPhone 12 Max Pro vẫn chưa sẵn sàng.</p><p>Theo các thông tin rò rỉ, sẽ có ít nhất bốn phiên bản iPhone 12, gồm iPhone 12, 12 Max, 12 Pro và 12 Pro Max, với kích thước màn hình từ 5,4 đến 6,7 inch. Sản phẩm mới sử dụng màn hình OLED, chip Apple A14 Bionic, có kết nối 5G hỗ trợ cả băng tần sub-6 và mmWave.</p>', 1, 'x03Cd_36564-68130-iphone-12-dummies-3458-4489-1596912353.jpg', 2, 1, NULL, '2020-08-11 17:42:27', '2020-08-11 19:15:32');
-- --------------------------------------------------------
--
-- Table structure for table `db_trangthai`
--
CREATE TABLE `db_trangthai` (
`id` int(10) UNSIGNED NOT NULL,
`trangthai` varchar(191) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `db_trangthai`
--
INSERT INTO `db_trangthai` (`id`, `trangthai`) VALUES
(1, 'Chưa duyệt'),
(2, 'Đã duyệt'),
(3, 'Hoàn thành'),
(4, 'Hủy');
-- --------------------------------------------------------
--
-- Table structure for table `db_user`
--
CREATE TABLE `db_user` (
`id` int(10) UNSIGNED NOT NULL,
`ma_user` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
`ho_ten` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`sdt` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`cmnd` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`nam_sinh` date NOT NULL,
`avatar` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `db_user`
--
INSERT INTO `db_user` (`id`, `ma_user`, `ho_ten`, `sdt`, `cmnd`, `email`, `nam_sinh`, `avatar`) VALUES
(1, 'ADMIN-0001', 'Gia Hung', '0762999994', '331821579', 'admin@gmail.com', '1998-01-01', 'admin.png'),
(3, 'USER-03', 'Tuấn Long', '0762999994', '331821579', 'muhoalongvn@gmail.com', '2020-06-30', 'buSfj_112498473_956125371478128_4727617854906237490_n.jpg'),
(5, 'USER-05', 'Bánh Bao 1', '0762999994', '331821579', 'muhoalongvn@gmail.com', '2020-08-26', 'HMAfF_iPhone 11 Pro Max_iDevice Verification Report_000E1D203A22802E.png'),
(6, 'USER-06', 'Kiều Diễm', '0762999994', '123123123', 'muhoalongvn@gmail.com', '2020-08-12', '8KoIe_112498473_956125371478128_4727617854906237490_n.jpg'),
(7, 'USER-07', 'Thanh Phong', '0762999994', '123123123', 'muhoalongvn@gmail.com', '2020-08-19', '0nFHl_112498473_956125371478128_4727617854906237490_n.jpg'),
(8, 'USER-08', 'Nhăn Ốm Nhom', '0762999994', '123123123', 'muhoalongvn@gmail.com', '2020-08-12', '8CXBm_3.jpg'),
(9, 'USER-09', 'Mộng Tiền', '0762999994', '123123', 'muhoalongvn@gmail.com', '2020-08-18', 'KfgTZ_2.jpg'),
(10, 'USER-010', 'Ánh Nguyệt 2', '0762999994', '123123123', 'muhoalongvn@gmail.com', '2020-08-19', 'lDCn0_112498473_956125371478128_4727617854906237490_n.jpg'),
(11, 'USER-011', 'Phong Phú', '0913109273', '331825644', 'muhoalongvn@gmail.com', '2020-08-03', 'vwapA_3.jpg'),
(12, 'USER-012', 'Vi Cục', '0946012237', '330825789', 'muhoalongvn@gmail.com', '2020-08-03', 'cJvGL_117285602_974243839696573_5283924519128761928_n.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `db_vaitro`
--
CREATE TABLE `db_vaitro` (
`id` int(10) UNSIGNED NOT NULL,
`vt_ten` varchar(191) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `db_vaitro`
--
INSERT INTO `db_vaitro` (`id`, `vt_ten`) VALUES
(1, 'Admin'),
(2, 'Nhân viên'),
(3, 'Kỷ thuật'),
(4, 'Khách hàng');
-- --------------------------------------------------------
--
-- Table structure for table `district`
--
CREATE TABLE `district` (
`id` int(10) UNSIGNED NOT NULL,
`district_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`district_prefix` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'ngày tạo',
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'ngày cập nhật',
`deleted_at` timestamp NULL DEFAULT NULL COMMENT 'ngày xóa tạm'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Quận huyện';
--
-- Dumping data for table `district`
--
INSERT INTO `district` (`id`, `district_name`, `district_prefix`, `created_at`, `updated_at`, `deleted_at`) VALUES
(162, ' Thới Lai', 'Huyện', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL),
(163, 'Bình Thủy', 'Quận', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL),
(164, 'Cái Răng', 'Quận', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL),
(165, 'Cờ Đỏ', 'Huyện', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL),
(166, 'Ninh Kiều', 'Quận', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL),
(167, 'Ô Môn', 'Quận', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL),
(168, 'Phong Điền', 'Huyện', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL),
(169, 'Thốt Nốt', 'Quận', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL),
(170, 'Vĩnh Thạnh', 'Huyện', '0000-00-00 00:00:00', '2020-01-16 08:32:36', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(19, '2018_06_30_113500_create_comments_table', 1),
(20, '2020_06_10_083644_create_views_table', 1),
(21, '2020_07_13_214234_db_vaitro', 1),
(22, '2020_07_13_214656_db_user', 1),
(23, '2020_07_13_214657_db_taikhoan', 1),
(24, '2020_07_27_153914_db_diachi', 1),
(30, '2020_08_01_153804_db_trangthai', 2),
(31, '2020_08_01_153805_db_baotri', 2),
(33, '2020_08_11_231045_db_tintuc', 3);
-- --------------------------------------------------------
--
-- Table structure for table `views`
--
CREATE TABLE `views` (
`id` bigint(20) UNSIGNED NOT NULL,
`viewable_type` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
`viewable_id` bigint(20) UNSIGNED NOT NULL,
`visitor` text COLLATE utf8_unicode_ci DEFAULT NULL,
`collection` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
`viewed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `views`
--
INSERT INTO `views` (`id`, `viewable_type`, `viewable_id`, `visitor`, `collection`, `viewed_at`) VALUES
(1, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:30:28'),
(2, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:32:16'),
(3, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:33:49'),
(4, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:35:05'),
(5, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:36:28'),
(6, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:38:11'),
(7, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:39:41'),
(8, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:42:18'),
(9, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:43:25'),
(10, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:44:53'),
(11, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:47:26'),
(12, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:48:28'),
(13, 'App\\Models\\db_tintuc', 2, 'mvzePbScbpoyEGwUlaYiYHUeKI8uxW4ciaWgR5zDRRmJL4RNnfQ0X2NQAszfETEjptK0AxoFQtd5QH3r', NULL, '2020-08-11 18:48:58'),
(14, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:50:27'),
(15, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:54:29'),
(16, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:56:39'),
(17, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:58:10'),
(18, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 18:59:11'),
(19, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 19:00:38'),
(20, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 19:01:43'),
(21, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 19:03:04'),
(22, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 19:04:05'),
(23, 'App\\Models\\db_tintuc', 2, 'mvzePbScbpoyEGwUlaYiYHUeKI8uxW4ciaWgR5zDRRmJL4RNnfQ0X2NQAszfETEjptK0AxoFQtd5QH3r', NULL, '2020-08-11 19:05:03'),
(24, 'App\\Models\\db_tintuc', 2, 'mvzePbScbpoyEGwUlaYiYHUeKI8uxW4ciaWgR5zDRRmJL4RNnfQ0X2NQAszfETEjptK0AxoFQtd5QH3r', NULL, '2020-08-11 19:06:34'),
(25, 'App\\Models\\db_tintuc', 2, 'mvzePbScbpoyEGwUlaYiYHUeKI8uxW4ciaWgR5zDRRmJL4RNnfQ0X2NQAszfETEjptK0AxoFQtd5QH3r', NULL, '2020-08-11 19:07:48'),
(26, 'App\\Models\\db_tintuc', 2, 'mvzePbScbpoyEGwUlaYiYHUeKI8uxW4ciaWgR5zDRRmJL4RNnfQ0X2NQAszfETEjptK0AxoFQtd5QH3r', NULL, '2020-08-11 19:10:37'),
(27, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 19:10:45'),
(28, 'App\\Models\\db_tintuc', 2, 'mvzePbScbpoyEGwUlaYiYHUeKI8uxW4ciaWgR5zDRRmJL4RNnfQ0X2NQAszfETEjptK0AxoFQtd5QH3r', NULL, '2020-08-11 19:11:42'),
(29, 'App\\Models\\db_tintuc', 2, 'mvzePbScbpoyEGwUlaYiYHUeKI8uxW4ciaWgR5zDRRmJL4RNnfQ0X2NQAszfETEjptK0AxoFQtd5QH3r', NULL, '2020-08-11 19:13:15'),
(30, 'App\\Models\\db_tintuc', 2, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 19:14:46'),
(31, 'App\\Models\\db_tintuc', 4, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 19:15:32'),
(32, 'App\\Models\\db_tintuc', 3, 'mEysjBilbMSvmQTz5J8hXnk8cdICxzcZsky6QAzx9lSYQgRYQbIk67ZMmV5GRWMMv6UI3yyc6AGxUoIw', NULL, '2020-08-11 19:15:36');
-- --------------------------------------------------------
--
-- Table structure for table `ward`
--
CREATE TABLE `ward` (
`id` int(10) UNSIGNED NOT NULL,
`ward_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`ward_prefix` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`district_id` int(10) UNSIGNED NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'ngày tạo',
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'ngày cập nhật',
`deleted_at` timestamp NULL DEFAULT NULL COMMENT 'ngày xóa tạm'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Phường xã';
--
-- Dumping data for table `ward`
--
INSERT INTO `ward` (`id`, `ward_name`, `ward_prefix`, `district_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2322, 'Định Môn', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2323, 'Đông Bình', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2324, 'Đông Thuận', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2325, 'Tân Thạnh', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2326, 'Thới Lai', 'Thị trấn', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2327, 'Thới Tân', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2328, 'Thới Thạnh', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2329, 'Trường Thắng', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2330, 'Trường Thành', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2331, 'Trường Xuân', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2332, 'Trường Xuân A', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2333, 'Trường Xuân B', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2334, 'Xuân Thắng', 'Xã', 162, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2335, '8', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2336, 'An Thới', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2337, 'An Thới', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2338, 'Bình Thủy', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2339, 'Bùi Hữu Nghĩa', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2340, 'Long Hòa', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2341, 'Long Tuyền', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2342, 'Thới An Đông', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2343, 'Trà An', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2344, 'Trà Nóc', 'Phường', 163, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2345, 'Ba Láng', 'Phường', 164, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2346, 'Hưng Phú', 'Phường', 164, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2347, 'Hưng Thạnh', 'Phường', 164, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2348, 'Lê Bình', 'Phường', 164, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2349, 'Phú Thứ', 'Phường', 164, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2350, 'Tân Phú', 'Phường', 164, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2351, 'Thường Thạnh', 'Phường', 164, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2352, 'Cờ Đỏ', 'Thị trấn', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2353, 'Đông Hiệp', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2354, 'Đông Thắng', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2355, 'Thạnh Phú', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2356, 'Thới Đông', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2357, 'Thới Hưng', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2358, 'Thới Xuân', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2359, 'Trung An', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2360, 'Trung Hưng', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2361, 'Trung Thạnh', 'Xã', 165, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2362, 'An Bình', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2363, 'An Cư', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2364, 'An Hòa', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2365, 'An Hội', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2366, 'An Khánh', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2367, 'An Lạc', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2368, 'An Nghiệp', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2369, 'An Phú', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2370, 'An Thạnh', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2371, 'Cái Khế', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2372, 'Hưng Lợi', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2373, 'Tân An', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2374, 'Thới Bình', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2375, 'Xuân Khánh', 'Phường', 166, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2376, 'Châu Văn Liêm', 'Phường', 167, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2377, 'Long Hưng', 'Phường', 167, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2378, 'Phước Thới', 'Phường', 167, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2379, 'Thới An', 'Phường', 167, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2380, 'Thới Hòa', 'Phường', 167, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2381, 'Thới Long', 'Phường', 167, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2382, 'Trường Lạc', 'Phường', 167, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2383, 'Giai Xuân', 'Xã', 168, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2384, 'Mỹ Khánh', 'Xã', 168, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2385, 'Nhơn Ái', 'Xã', 168, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2386, 'Nhơn Nghĩa', 'Xã', 168, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2387, 'Phong Điền', 'Thị trấn', 168, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2388, 'Tân Thới', 'Xã', 168, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2389, 'Trường Long', 'Xã', 168, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2390, 'Tân Hưng', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2391, 'Tân Lộc', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2392, 'Thạnh Hòa', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2393, 'Thạnh Lộc', 'Xã', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2394, 'Thới Thuận', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2395, 'Thốt Nốt', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2396, 'Thuận An', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2397, 'Thuận Hưng', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2398, 'Trung Kiên', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2399, 'Trung Nhứt', 'Phường', 169, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2400, 'Thạnh An', 'Thị trấn', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2401, 'Thạnh An', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2402, 'Thạnh Lộc', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2403, 'Thạnh Lợi', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2404, 'Thạnh Mỹ', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2405, 'Thạnh Quới', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2406, 'Thạnh Thắng', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2407, 'Thạnh Tiến', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2408, 'Vĩnh Bình', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2409, 'Vĩnh Thạnh', 'Thị trấn', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL),
(2410, 'Vĩnh Trinh', 'Xã', 170, '2020-02-13 14:10:48', '2020-02-13 14:10:48', NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`id`),
ADD KEY `comments_commenter_id_commenter_type_index` (`commenter_id`,`commenter_type`),
ADD KEY `comments_commentable_type_commentable_id_index` (`commentable_type`,`commentable_id`),
ADD KEY `comments_child_id_foreign` (`child_id`);
--
-- Indexes for table `db_baotri`
--
ALTER TABLE `db_baotri`
ADD PRIMARY KEY (`id`),
ADD KEY `db_baotri_id_trangthai_foreign` (`id_trangthai`),
ADD KEY `db_baotri_id_khachhang_foreign` (`id_khachhang`),
ADD KEY `db_baotri_id_nhanvien_foreign` (`id_nhanvien`);
--
-- Indexes for table `db_diachi`
--
ALTER TABLE `db_diachi`
ADD PRIMARY KEY (`id`),
ADD KEY `db_diachi_id_quanhuyen_foreign` (`id_quanhuyen`),
ADD KEY `db_diachi_id_phuongxa_foreign` (`id_phuongxa`),
ADD KEY `db_diachi_id_user_foreign` (`id_user`);
--
-- Indexes for table `db_taikhoan`
--
ALTER TABLE `db_taikhoan`
ADD PRIMARY KEY (`id`),
ADD KEY `db_taikhoan_id_user_foreign` (`id_user`),
ADD KEY `db_taikhoan_id_vaitro_foreign` (`id_vaitro`);
--
-- Indexes for table `db_tintuc`
--
ALTER TABLE `db_tintuc`
ADD PRIMARY KEY (`id`),
ADD KEY `db_tintuc_id_trangthai_foreign` (`id_trangthai`),
ADD KEY `db_tintuc_id_user_foreign` (`id_user`);
--
-- Indexes for table `db_trangthai`
--
ALTER TABLE `db_trangthai`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `db_user`
--
ALTER TABLE `db_user`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `db_vaitro`
--
ALTER TABLE `db_vaitro`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `district`
--
ALTER TABLE `district`
ADD PRIMARY KEY (`id`),
ADD KEY `district_district_name_index` (`district_name`),
ADD KEY `district_district_prefix_index` (`district_prefix`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `views`
--
ALTER TABLE `views`
ADD PRIMARY KEY (`id`),
ADD KEY `views_viewable_type_viewable_id_index` (`viewable_type`,`viewable_id`);
--
-- Indexes for table `ward`
--
ALTER TABLE `ward`
ADD PRIMARY KEY (`id`),
ADD KEY `ward_ward_name_index` (`ward_name`),
ADD KEY `ward_ward_prefix_index` (`ward_prefix`),
ADD KEY `ward_district_id_index` (`district_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `db_baotri`
--
ALTER TABLE `db_baotri`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `db_diachi`
--
ALTER TABLE `db_diachi`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `db_taikhoan`
--
ALTER TABLE `db_taikhoan`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `db_tintuc`
--
ALTER TABLE `db_tintuc`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `db_trangthai`
--
ALTER TABLE `db_trangthai`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `db_user`
--
ALTER TABLE `db_user`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `db_vaitro`
--
ALTER TABLE `db_vaitro`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `district`
--
ALTER TABLE `district`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=710;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;
--
-- AUTO_INCREMENT for table `views`
--
ALTER TABLE `views`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
--
-- AUTO_INCREMENT for table `ward`
--
ALTER TABLE `ward`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11284;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
ADD CONSTRAINT `comments_child_id_foreign` FOREIGN KEY (`child_id`) REFERENCES `comments` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `db_baotri`
--
ALTER TABLE `db_baotri`
ADD CONSTRAINT `db_baotri_id_khachhang_foreign` FOREIGN KEY (`id_khachhang`) REFERENCES `db_user` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `db_baotri_id_nhanvien_foreign` FOREIGN KEY (`id_nhanvien`) REFERENCES `db_user` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `db_baotri_id_trangthai_foreign` FOREIGN KEY (`id_trangthai`) REFERENCES `db_trangthai` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `db_diachi`
--
ALTER TABLE `db_diachi`
ADD CONSTRAINT `db_diachi_id_phuongxa_foreign` FOREIGN KEY (`id_phuongxa`) REFERENCES `ward` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `db_diachi_id_quanhuyen_foreign` FOREIGN KEY (`id_quanhuyen`) REFERENCES `district` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `db_diachi_id_user_foreign` FOREIGN KEY (`id_user`) REFERENCES `db_user` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `db_taikhoan`
--
ALTER TABLE `db_taikhoan`
ADD CONSTRAINT `db_taikhoan_id_user_foreign` FOREIGN KEY (`id_user`) REFERENCES `db_user` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `db_taikhoan_id_vaitro_foreign` FOREIGN KEY (`id_vaitro`) REFERENCES `db_vaitro` (`id`) ON DELETE CASCADE;
--
-- Constraints for table `db_tintuc`
--
ALTER TABLE `db_tintuc`
ADD CONSTRAINT `db_tintuc_id_trangthai_foreign` FOREIGN KEY (`id_trangthai`) REFERENCES `db_trangthai` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `db_tintuc_id_user_foreign` FOREIGN KEY (`id_user`) REFERENCES `db_user` (`id`) ON DELETE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| 61.42341 | 3,682 | 0.69326 |
2f313b97fd2c269b35063a95afe0d7f71af7a887 | 8,440 | php | PHP | web/app/themes/shindig/widgets/social-widget.php | mattKendon/newgenjazz | 2ba2f3315ff0e6d50e75226a58d7862b1952eb2e | [
"MIT"
] | null | null | null | web/app/themes/shindig/widgets/social-widget.php | mattKendon/newgenjazz | 2ba2f3315ff0e6d50e75226a58d7862b1952eb2e | [
"MIT"
] | null | null | null | web/app/themes/shindig/widgets/social-widget.php | mattKendon/newgenjazz | 2ba2f3315ff0e6d50e75226a58d7862b1952eb2e | [
"MIT"
] | null | null | null | <?php
add_action('widgets_init', 'pro_social_Media__load_widgets');
function pro_social_Media__load_widgets()
{
register_widget('Pro_Social_Featured_Media_Widget');
}
class Pro_Social_Featured_Media_Widget extends WP_Widget {
function Pro_Social_Featured_Media_Widget()
{
$widget_ops = array('classname' => 'pyre_social_media-feat', 'description' => 'Add your social icons');
$control_ops = array('id_base' => 'pyre_social_media-widget-feat');
parent::__construct('pyre_social_media-widget-feat', 'Progression: Social Icons', $widget_ops, $control_ops);
}
function widget($args, $instance)
{
global $post;
extract($args);
$title = apply_filters('widget_title', $instance['title']);
$agent_name = $instance['agent_name'];
$link_text = $instance['link_text'];
$link_link = $instance['link_link'];
$office_text = $instance['office_text'];
$cell_text = $instance['cell_text'];
$extra_text = $instance['extra_text'];
$image_url_pro = $instance['image_url_pro'];
$fb_share_pro = $instance['fb_share_pro'];
$twttr_share_pro = $instance['twttr_share_pro'];
$goog_share_pro = $instance['goog_share_pro'];
$lnkedin_share_pro = $instance['lnkedin_share_pro'];
$pintrst_share_pro = $instance['pintrst_share_pro'];
$utube_share_pro = $instance['utube_share_pro'];
echo $before_widget;
if($title) {
echo $before_title.$title.$after_title;
}
?>
<div class="social-icons-widget-pro">
<?php if($agent_name): ?><div class="social-summary-pro"><?php echo force_balance_tags( $agent_name ); ?></div><?php endif; ?>
<ul class="social-ico">
<?php if($fb_share_pro): ?><li><a href="<?php echo esc_attr( $fb_share_pro ); ?>" target="_blank"><i class="fa fa-facebook"></i></a></li><?php endif; ?>
<?php if($twttr_share_pro): ?><li><a href="<?php echo esc_attr( $twttr_share_pro ); ?>" target="_blank"><i class="fa fa-twitter"></i></a></li><?php endif; ?>
<?php if($goog_share_pro): ?><li><a href="<?php echo esc_attr( $goog_share_pro ); ?>" target="_blank"><i class="fa fa-google-plus"></i></a></li><?php endif; ?>
<?php if($lnkedin_share_pro): ?><li><a href="<?php echo esc_attr( $lnkedin_share_pro ); ?>" target="_blank"><i class="fa fa-linkedin"></i></a></li><?php endif; ?>
<?php if($office_text): ?><li><a href="<?php echo esc_attr( $office_text ); ?>" target="_blank"><i class="fa fa-instagram"></i></a></li><?php endif; ?>
<?php if($cell_text): ?><li><a href="<?php echo esc_attr( $cell_text ); ?>" target="_blank"><i class="fa fa-tumblr"></i></a></li><?php endif; ?>
<?php if($pintrst_share_pro): ?><li><a href="<?php echo esc_attr( $pintrst_share_pro ); ?>" target="_blank"><i class="fa fa-pinterest"></i></a></li><?php endif; ?>
<?php if($utube_share_pro): ?><li><a href="<?php echo esc_attr( $utube_share_pro ); ?>" target="_blank"><i class="fa fa-youtube-play"></i></a></li><?php endif; ?>
<?php if($link_link): ?><li><a href="<?php echo esc_attr( $link_link ); ?>" target="_blank"><i class="fa fa-envelope"></i></a></li><?php endif; ?>
</ul><!-- close .social-ico -->
</div><!-- close .social-icons-widget-pro -->
<?php
echo $after_widget;
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['image_url_pro'] = $new_instance['image_url_pro'];
$instance['agent_name'] = $new_instance['agent_name'];
$instance['link_text'] = $new_instance['link_text'];
$instance['link_link'] = $new_instance['link_link'];
$instance['office_text'] = $new_instance['office_text'];
$instance['cell_text'] = $new_instance['cell_text'];
$instance['extra_text'] = $new_instance['extra_text'];
$instance['fb_share_pro'] = $new_instance['fb_share_pro'];
$instance['twttr_share_pro'] = $new_instance['twttr_share_pro'];
$instance['goog_share_pro'] = $new_instance['goog_share_pro'];
$instance['lnkedin_share_pro'] = $new_instance['lnkedin_share_pro'];
$instance['pintrst_share_pro'] = $new_instance['pintrst_share_pro'];
$instance['utube_share_pro'] = $new_instance['utube_share_pro'];
return $instance;
}
function form($instance)
{
$defaults = array('title' => 'Social Icons', 'agent_name' => '', 'fb_share_pro' => '', 'twttr_share_pro' => '', 'goog_share_pro' => '', 'lnkedin_share_pro' => '', 'office_text' => '', 'cell_text' => '', 'pintrst_share_pro' => '', 'utube_share_pro' => '', 'link_link' => '');
$instance = wp_parse_args((array) $instance, $defaults); ?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:', 'progression' ); ?></label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $instance['title']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('agent_name'); ?>"><?php _e( 'Text Field', 'progression' ); ?>:</label>
<textarea class="widefat" rows="10" cols="20" id="<?php echo $this->get_field_id('agent_name'); ?>" name="<?php echo $this->get_field_name('agent_name'); ?>"><?php echo $instance['agent_name']; ?></textarea>
</p>
<p>
<label for="<?php echo $this->get_field_id('fb_share_pro'); ?>">Facebook <?php _e( 'Link', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('fb_share_pro'); ?>" name="<?php echo $this->get_field_name('fb_share_pro'); ?>" value="<?php echo $instance['fb_share_pro']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('twttr_share_pro'); ?>">Twitter <?php _e( 'Link', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('twttr_share_pro'); ?>" name="<?php echo $this->get_field_name('twttr_share_pro'); ?>" value="<?php echo $instance['twttr_share_pro']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('goog_share_pro'); ?>">Google+ <?php _e( 'Link', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('goog_share_pro'); ?>" name="<?php echo $this->get_field_name('goog_share_pro'); ?>" value="<?php echo $instance['goog_share_pro']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('lnkedin_share_pro'); ?>">LinkedIn <?php _e( 'Link', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('lnkedin_share_pro'); ?>" name="<?php echo $this->get_field_name('lnkedin_share_pro'); ?>" value="<?php echo $instance['lnkedin_share_pro']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('office_text'); ?>">Instagram <?php _e( 'Link', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('office_text'); ?>" name="<?php echo $this->get_field_name('office_text'); ?>" value="<?php echo $instance['office_text']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('cell_text'); ?>">Tumblr <?php _e( 'Link', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('cell_text'); ?>" name="<?php echo $this->get_field_name('cell_text'); ?>" value="<?php echo $instance['cell_text']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('pintrst_share_pro'); ?>">Pinterest <?php _e( 'Link', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('pintrst_share_pro'); ?>" name="<?php echo $this->get_field_name('pintrst_share_pro'); ?>" value="<?php echo $instance['pintrst_share_pro']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('utube_share_pro'); ?>">Youtube <?php _e( 'Link', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('utube_share_pro'); ?>" name="<?php echo $this->get_field_name('utube_share_pro'); ?>" value="<?php echo $instance['utube_share_pro']; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('link_link'); ?>"><?php _e( 'E-mail Address', 'progression' ); ?>:</label>
<input class="widefat" style="width: 216px;" id="<?php echo $this->get_field_id('link_link'); ?>" name="<?php echo $this->get_field_name('link_link'); ?>" value="<?php echo $instance['link_link']; ?>" />
</p>
<?php }
}
?> | 51.779141 | 276 | 0.639218 |
1bed79b8052bb8fab5865735f7b81a646e0e2689 | 89 | py | Python | centers/apps.py | ChristianJStarr/sbs-website | db891f0a67f46cc9cdadc95714304b2ea91a162a | [
"MIT"
] | 1 | 2022-01-09T18:54:32.000Z | 2022-01-09T18:54:32.000Z | centers/apps.py | ChristianJStarr/sbs-website | db891f0a67f46cc9cdadc95714304b2ea91a162a | [
"MIT"
] | null | null | null | centers/apps.py | ChristianJStarr/sbs-website | db891f0a67f46cc9cdadc95714304b2ea91a162a | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CentersConfig(AppConfig):
name = 'centers'
| 14.833333 | 33 | 0.752809 |
610f108ecb525b937930b970361d7fe0febd0d09 | 2,107 | swift | Swift | Pebbles/Usecases/LandingPage/LandingPageView.swift | RaulSul/Pebbles | ba3c6d05a8a83d68f88056d75ac4c03d0b9dc13e | [
"MIT"
] | null | null | null | Pebbles/Usecases/LandingPage/LandingPageView.swift | RaulSul/Pebbles | ba3c6d05a8a83d68f88056d75ac4c03d0b9dc13e | [
"MIT"
] | null | null | null | Pebbles/Usecases/LandingPage/LandingPageView.swift | RaulSul/Pebbles | ba3c6d05a8a83d68f88056d75ac4c03d0b9dc13e | [
"MIT"
] | null | null | null | //
// LandingPageView.swift
// Pebbles
//
// Created by Raul Sulaimanov on 16.04.21.
//
import UIKit
import SnapKit
class LandingPageView: UIView {
lazy var headerView: LPHeaderView = {
return LPHeaderView()
}()
lazy var collectionView: UICollectionView = {
let flowLayout = UICollectionViewFlowLayout()
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectionView.backgroundColor = .clear
collectionView.alwaysBounceVertical = true
return collectionView
}()
lazy var gradientLayer: CAGradientLayer = {
let gradient = CAGradientLayer()
gradient.frame = AppDelegate.shared.window!.bounds
gradient.colors = [
UIColor(red: 0.85, green: 0.93, blue: 0.57, alpha: 1.00).cgColor,
UIColor(red: 0.60, green: 0.85, blue: 0.55, alpha: 1.00).cgColor,
UIColor(red: 0.32, green: 0.71, blue: 0.60, alpha: 1.00).cgColor,
UIColor(red: 0.10, green: 0.46, blue: 0.62, alpha: 1.00).cgColor,
UIColor(red: 0.09, green: 0.11, blue: 0.47, alpha: 1.00).cgColor
]
return gradient
}()
init() {
super.init(frame: .zero)
self.layer.insertSublayer(gradientLayer, at: 0)
self.addSubview(self.headerView)
self.addSubview(self.collectionView)
//MARK: - Layout
self.headerView.snp.remakeConstraints { make in
make.top.equalTo(self.snp.top)
make.centerX.equalTo(self.snp.centerX)
make.height.equalTo(200)
make.width.equalTo(self.snp.width)
}
self.collectionView.snp.remakeConstraints { make in
make.top.equalTo(self.headerView.snp.bottom)
make.trailing.equalTo(self.snp.trailing)
make.leading.equalTo(self.snp.leading)
make.bottom.equalTo(self.snp.bottom)
}
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
| 30.536232 | 93 | 0.596583 |
2da17e0772b1d5fa2eaf5157a65633d0e5083ad7 | 110,424 | html | HTML | tvtropes.org/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission.html | jwzimmer/tv-tropes | 44442b66286eaf2738fc5d863d175d4577da97f4 | [
"MIT"
] | 1 | 2021-01-02T00:19:20.000Z | 2021-01-02T00:19:20.000Z | tvtropes.org/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission.html | jwzimmer/tv-tropes | 44442b66286eaf2738fc5d863d175d4577da97f4 | [
"MIT"
] | 6 | 2020-11-17T00:44:19.000Z | 2021-01-22T18:56:28.000Z | tvtropes.org/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission.html | jwzimmer/tv-tropes | 44442b66286eaf2738fc5d863d175d4577da97f4 | [
"MIT"
] | 5 | 2021-01-02T00:19:15.000Z | 2021-08-05T16:02:08.000Z | <!DOCTYPE html>
<html>
<head lang="en">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Metroid: Zero Mission (Video Game) - TV Tropes</title>
<meta name="description" content="A description of tropes appearing in Metroid: Zero Mission. A Video Game Remake of the original Metroid, released for the Game Boy Advance in 2004, and the …" />
<link rel="canonical" href="https://tvtropes.org/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission" />
<link rel="shortcut icon" href="/img/icons/favicon.ico" type="image/x-icon" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@tvtropes" />
<meta name="twitter:owner" content="@tvtropes" />
<meta name="twitter:title" content="Metroid: Zero Mission (Video Game) - TV Tropes" />
<meta name="twitter:description" content="A description of tropes appearing in Metroid: Zero Mission. A Video Game Remake of the original Metroid, released for the Game Boy Advance in 2004, and the …" />
<meta name="twitter:image:src" content="https://static.tvtropes.org/pmwiki/pub/images/rsz_metroid_zero_mission_box.png" />
<meta property="og:site_name" content="TV Tropes" />
<meta property="og:locale" content="en_US" />
<meta property="article:publisher" content="https://www.facebook.com/tvtropes" />
<meta property="og:title" content="Metroid: Zero Mission (Video Game) - TV Tropes" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://tvtropes.org/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission" />
<meta property="og:image" content="https://static.tvtropes.org/pmwiki/pub/images/rsz_metroid_zero_mission_box.png" />
<meta property="og:description" content="A Video Game Remake of the original Metroid, released for the Game Boy Advance in 2004, and the sixth game released in the Metroid series. The plot is essentially the same as the original game: the Space Pirates have possession of a dangerous …" />
<link rel="apple-touch-icon" sizes="57x57" href="/img/icons/apple-icon-57x57.png" type="image/png">
<link rel="apple-touch-icon" sizes="60x60" href="/img/icons/apple-icon-60x60.png" type="image/png">
<link rel="apple-touch-icon" sizes="72x72" href="/img/icons/apple-icon-72x72.png" type="image/png">
<link rel="apple-touch-icon" sizes="76x76" href="/img/icons/apple-icon-76x76.png" type="image/png">
<link rel="apple-touch-icon" sizes="114x114" href="/img/icons/apple-icon-114x114.png" type="image/png">
<link rel="apple-touch-icon" sizes="120x120" href="/img/icons/apple-icon-120x120.png" type="image/png">
<link rel="apple-touch-icon" sizes="144x144" href="/img/icons/apple-icon-144x144.png" type="image/png">
<link rel="apple-touch-icon" sizes="152x152" href="/img/icons/apple-icon-152x152.png" type="image/png">
<link rel="apple-touch-icon" sizes="180x180" href="/img/icons/apple-icon-180x180.png" type="image/png">
<link rel="icon" sizes="16x16" href="/img/icons/favicon-16x16.png" type="image/png">
<link rel="icon" sizes="32x32" href="/img/icons/favicon-32x32.png" type="image/png">
<link rel="icon" sizes="96x96" href="/img/icons/favicon-96x96.png" type="image/png">
<link rel="icon" sizes="192x192" href="/img/icons/favicon-192x192.png" type="image/png">
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">
<script>
var propertag = {};
propertag.cmd = [];
</script>
<link rel="stylesheet" href="/design/assets/bundle.css?rev=af8ba6c84175c5d092329028e16c8941231c5eba" />
<script>
function object(objectId) {
if (document.getElementById && document.getElementById(objectId)) {
return document.getElementById(objectId);
} else if (document.all && document.all(objectId)) {
return document.all(objectId);
} else if (document.layers && document.layers[objectId]) {
return document.layers[objectId];
} else {
return false;
}
}
// JAVASCRIPT COOKIES CODE: for getting and setting user viewing preferences
var cookies = {
create: function (name, value, days2expire, path) {
var date = new Date();
date.setTime(date.getTime() + (days2expire * 24 * 60 * 60 * 1000));
var expires = date.toUTCString();
document.cookie = name + '=' + value + ';' + 'expires=' + expires + ';' + 'path=' + path + ';';
},
read: function (name) {
var cookie_value = "",
current_cookie = "",
name_expr = name + "=",
all_cookies = document.cookie.split(';'),
n = all_cookies.length;
for (var i = 0; i < n; i++) {
current_cookie = all_cookies[i].trim();
if (current_cookie.indexOf(name_expr) === 0) {
cookie_value = current_cookie.substring(name_expr.length, current_cookie.length);
break;
}
}
return cookie_value;
},
update: function (name, val) {
this.create(name, val, 300, "/");
},
remove: function (name) {
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
}
};
function updateUserPrefs() {
//GENERAL: detect and set browser, if not cookied (will be treated like a user-preference and added to the #user-pref element)
if( !cookies.read('user-browser') ){
var broswer = '';
if(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) ){
browser = 'iOS';
} else if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
browser = 'opera';
} else if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
browser = 'MSIE';
} else if (/Navigator[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
browser = 'netscape';
} else if (/Chrome[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
browser = 'chrome';
} else if (/Safari[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
browser = 'safari';
/Version[\/\s](\d+\.\d+)/.test(navigator.userAgent);
browserVersion = new Number(RegExp.$1);
} else if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {
browser = 'firefox';
} else {
browser = 'internet_explorer';
}
cookies.create('user-browser',browser,1,'/');
document.getElementById('user-prefs').classList.add('browser-' + browser);
} else {
document.getElementById('user-prefs').classList.add('browser-' + cookies.read('user-browser'));
}
//update user preference settings
if (cookies.read('wide-load') !== '') document.getElementById('user-prefs').classList.add('wide-load');
if (cookies.read('night-vision') !== '') document.getElementById('user-prefs').classList.add('night-vision');
if (cookies.read('sticky-header') !== '') document.getElementById('user-prefs').classList.add('sticky-header');
if (cookies.read('show-spoilers') !== '') document.getElementById('user-prefs').classList.add('show-spoilers');
if (cookies.read('folders-open') !== '') document.getElementById('user-prefs').classList.add('folders-open');
if (cookies.read('lefthand-sidebar') !== '') document.getElementById('user-prefs').classList.add('lefthand-sidebar');
if (cookies.read('highlight-links') !== '') document.getElementById('user-prefs').classList.add('highlight-links');
if (cookies.read('forum-gingerbread') !== '') document.getElementById('user-prefs').classList.add('forum-gingerbread');
if (cookies.read('shared-avatars') !== '') document.getElementById('user-prefs').classList.add('shared-avatars');
if (cookies.read('new-search') !== '') document.getElementById('user-prefs').classList.add('new-search');
if (cookies.read('stop-auto-play-video') !== '') document.getElementById('user-prefs').classList.add('stop-auto-play-video');
//desktop view on mobile
if (cookies.read('desktop-on-mobile') !== ''){
document.getElementById('user-prefs').classList.add('desktop-on-mobile');
var viewport = document.querySelector("meta[name=viewport]");
viewport.setAttribute('content', 'width=1000');
}
}
function updateDesktopPrefs() {
if (cookies.read('wide-load') !== '') document.getElementById('sidebar-toggle-wideload').classList.add('active');
if (cookies.read('night-vision') !== '') document.getElementById('sidebar-toggle-nightvision').classList.add('active');
if (cookies.read('sticky-header') !== '') document.getElementById('sidebar-toggle-stickyheader').classList.add('active');
if (cookies.read('show-spoilers') !== '') document.getElementById('sidebar-toggle-showspoilers').classList.add('active');
}
function updateMobilePrefs() {
if (cookies.read('show-spoilers') !== '') document.getElementById('mobile-toggle-showspoilers').classList.add('active');
if (cookies.read('night-vision') !== '') document.getElementById('mobile-toggle-nightvision').classList.add('active');
if (cookies.read('sticky-header') !== '') document.getElementById('mobile-toggle-stickyheader').classList.add('active');
if (cookies.read('highlight-links') !== '') document.getElementById('mobile-toggle-highlightlinks').classList.add('active');
}
if (document.cookie.indexOf("scroll0=") < 0) {
// do nothing
} else {
console.log('ads removed by scroll.com');
var adsRemovedWith = 'scroll';
var style = document.createElement('style');
style.innerHTML = '#header-ad, .proper-ad-unit, .square_ad, .sb-ad-unit { display: none !important; } ';
document.head.appendChild(style);
}
</script>
<script type="text/javascript">
var tvtropes_config = {
astri_stream_enabled : "",
is_logged_in : "",
handle : "",
get_astri_stream : "",
revnum : "af8ba6c84175c5d092329028e16c8941231c5eba",
img_domain : "https://static.tvtropes.org",
adblock : "1",
adblock_url : "propermessage.io",
pause_editing : "0",
pause_editing_msg : "",
pause_site_changes : ""
};
</script>
</head>
<body class="">
<i id="user-prefs"></i>
<script>updateUserPrefs();</script>
<div id="fb-root"></div>
<div id="modal-box"></div>
<header id="main-header-bar" class="headroom-element ">
<div id="main-header-bar-inner">
<span id="header-spacer-left" class="header-spacer"></span>
<a href="#mobile-menu" id="main-mobile-toggle" class="mobile-menu-toggle-button tablet-on"><span></span><span></span><span></span></a>
<a href="/" id="main-header-logoButton" class="no-dev"></a>
<span id="header-spacer-right" class="header-spacer"></span>
<nav id="main-header-nav" class="tablet-off">
<a href="/pmwiki/pmwiki.php/Main/Tropes">Tropes</a>
<a href="/pmwiki/pmwiki.php/Main/Media">Media</a>
<a href="/pmwiki/browse.php" class="nav-browse">Browse</a>
<a href="/pmwiki/index_report.php">Indexes</a>
<a href="/pmwiki/topics.php">Forums</a>
<a href="/pmwiki/recent_videos.php" class="nav-browse">Videos</a>
</nav>
<div id="main-header-bar-right">
<div id="signup-login-box" class="font-xs mobile-off">
<a href="/pmwiki/login.php" class="hover-underline bold" data-modal-target="signup">Join</a>
<a href="/pmwiki/login.php" class="hover-underline bold" data-modal-target="login">Login</a>
</div>
<div id="signup-login-mobileToggle" class="mobile-on inline">
<a href="/pmwiki/login.php" data-modal-target="login"><i class="fa fa-user"></i></a>
</div>
<div id="search-box">
<form class="search" action="/pmwiki/search_result.php">
<input type="text" name="q" class="search-box" placeholder="Search" value="" required>
<input type="submit" class="submit-button" value="" />
<input type="hidden" name="search_type" value="article">
<input type="hidden" name="page_type" value="all">
<input type="hidden" name="cx" value="partner-pub-6610802604051523:amzitfn8e7v">
<input type="hidden" name="cof" value="FORID:10">
<input type="hidden" name="ie" value="ISO-8859-1">
<input name="siteurl" type="hidden" value="">
<input name="ref" type="hidden" value="">
<input name="ss" type="hidden" value="">
</form>
<a href="#close-search" class="mobile-on mobile-search-toggle close-x"><i class="fa fa-close"></i></a>
</div>
<div id="random-box">
<a href="/pmwiki/pmwiki.php/Main/FridgeBrilliance" class="button-random-trope" rel="nofollow" onclick="ga('send', 'event', 'button', 'click', 'random trope');"></a>
<a href="/pmwiki/pmwiki.php/WebAnimation/TeenGirlSquad" class="button-random-media" rel="nofollow" onclick="ga('send', 'event', 'button', 'click', 'random media');"></a>
</div>
</div>
</div>
<div id="mobile-menu" class="tablet-on"><div class="mobile-menu-options">
<div class="nav-wrapper">
<a href="/pmwiki/pmwiki.php/Main/Tropes" class="xl">Tropes</a>
<a href="/pmwiki/pmwiki.php/Main/Media" class="xl">Media</a>
<a href="/pmwiki/browse.php" class="xl">Browse</a>
<a href="/pmwiki/index_report.php" class="xl">Indexes</a>
<a href="/pmwiki/topics.php" class="xl">Forums</a>
<a href="/pmwiki/recent_videos.php" class="xl">Videos</a>
<a href="/pmwiki/query.php?type=att">Ask The Tropers</a>
<a href="/pmwiki/query.php?type=tf">Trope Finder</a>
<a href="/pmwiki/query.php?type=ykts">You Know That Show...</a>
<a href="/pmwiki/tlp_activity.php">Trope Launch Pad</a>
<a href="#tools" data-click-toggle="active">Tools <i class="fa fa-chevron-down"></i></a>
<div class="tools-dropdown mobile-dropdown-linkList">
<a href="/pmwiki/cutlist.php">Cut List</a>
<a href="/pmwiki/changes.php">New Edits</a>
<a href="/pmwiki/recent_edit_reasons.php">Edit Reasons</a>
<a href="/pmwiki/launches.php">Launches</a>
<a href="/pmwiki/img_list.php">Images List</a>
<a href="/pmwiki/crown_activity.php">Crowner Activity</a>
<a href="/pmwiki/no_types.php">Un-typed Pages</a>
<a href="/pmwiki/page_type_audit.php">Recent Page Type Changes</a>
</div>
<a href="#hq" data-click-toggle="active">Tropes HQ <i class="fa fa-chevron-down"></i></a>
<div class="tools-dropdown mobile-dropdown-linkList">
<a href="/pmwiki/about.php">About Us</a>
<a href="/pmwiki/contact.php">Contact Us</a>
<a href="mailto:advertising@proper.io">Advertise</a>
<a href="/pmwiki/dmca.php">DMCA Notice</a>
<a href="/pmwiki/privacypolicy.php">Privacy Policy</a>
</div>
<a href="/pmwiki/ad-free-subscribe.php">Go Ad-Free</a>
<div class="toggle-switches">
<ul class="mobile-menu display-toggles">
<li>Show Spoilers <div id="mobile-toggle-showspoilers" class="display-toggle show-spoilers"></div></li>
<li>Night Vision <div id="mobile-toggle-nightvision" class="display-toggle night-vision"></div></li>
<li>Sticky Header <div id="mobile-toggle-stickyheader" class="display-toggle sticky-header"></div></li>
<li>Highlight Links <div id="mobile-toggle-highlightlinks" class="display-toggle highlight-links"></div></li>
</ul>
<script>updateMobilePrefs();</script>
</div>
</div>
</div>
</div>
</header>
<div id="homepage-introBox-mobile" class="mobile-on">
<a href="/"><img src="/images/logo-white-big.png" class="logo-small" /></a>
<form class="search" action="/pmwiki/search_result.php" style="margin:10px -5px -6px -5px;">
<input type="text" name="q" class="search-box" placeholder="Search" value="" required>
<input type="submit" class="submit-button" value="" />
<input type="hidden" name="search_type" value="article">
<input type="hidden" name="page_type" value="all">
<input type="hidden" name="cx" value="partner-pub-6610802604051523:amzitfn8e7v">
<input type="hidden" name="cof" value="FORID:10">
<input type="hidden" name="ie" value="ISO-8859-1">
<input name="siteurl" type="hidden" value="">
<input name="ref" type="hidden" value="">
<input name="ss" type="hidden" value="">
</form>
</div>
<div id="header-ad-wrapper" class="ad">
<div id="header-ad">
<div class="ad-size-970x90 atf_banner">
<div class='proper-ad-unit '>
<div id='proper-ad-tvtropes_ad_1'> <script>propertag.cmd.push(function() { proper_display('tvtropes_ad_1'); });</script> </div>
</div> </div>
</div>
</div>
<div id="main-container">
<div id="action-bar-top" class="action-bar mobile-off">
<div class="action-bar-right">
<p>Follow TV Tropes</p>
<a href="https://www.facebook.com/TVTropes" class="button-fb">
<i class="fa fa-facebook"></i></a>
<a href="https://www.twitter.com/TVTropes" class="button-tw">
<i class="fa fa-twitter"></i></a>
<a href="https://www.reddit.com/r/TVTropes" class="button-re">
<i class="fa fa-reddit-alien"></i></a>
</div>
<nav class="actions-wrapper" itemscope itemtype="http://schema.org/SiteNavigationElement">
<ul id="top_main_list" class="page-actions">
<li class="link-edit">
<a rel="nofollow" class="article-edit-button" data-modal-target="login" href="/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission?action=edit">
<i class="fa fa-pencil"></i> Edit Page</a></li><li class="link-related"><a href="/pmwiki/relatedsearch.php?term=VideoGame/MetroidZeroMission">
<i class="fa fa-share-alt"></i> Related</a></li><li class="link-history"><a href="/pmwiki/article_history.php?article=VideoGame.MetroidZeroMission">
<i class="fa fa-history"></i> History</a></li><li class="link-reviews"><a href="/pmwiki/reviews.php?target_group=VideoGame&target_title=MetroidZeroMission">
<i class="fa fa-star-half-o"></i> 1 Reviews</a></li> </ul>
<button id="top_more_button" onclick="toggle_more_menu('top');" type="button" class="nav__dropdown-toggle">More</button>
<ul id="top_more_list" class="more_menu hidden_more_list">
<li class="link-discussion more_list_item"><a href="/pmwiki/remarks.php?trope=VideoGame.MetroidZeroMission">
<i class="fa fa-comment"></i> Discussion</a></li><li class="link-todo tuck-always more_list_item"><a href="#todo" data-modal-target="login"><i class="fa fa-check-circle"></i> To Do</a></li><li class="link-pageSource tuck-always more_list_item"><a href="/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission?action=source" target="_blank" rel="nofollow" data-modal-target="login"><i class="fa fa-code"></i> Page Source</a></li> </ul>
</nav>
<div class="WikiWordModalStub"></div>
<div class="ImgUploadModalStub" data-page-type="Article"></div>
<div class="login-alert" style="display: none;">
You need to <a href="/pmwiki/login.php" style="color:#21A0E8">login</a> to do this. <a href="/pmwiki/login.php?tab=register_account" style="color:#21A0E8">Get Known</a> if you don't have an account
</div>
</div>
<div id="main-content" class="page-Article ">
<article id="main-entry" class="with-sidebar">
<input type="hidden" id="groupname-hidden" value="VideoGame" />
<input type="hidden" id="title-hidden" value="MetroidZeroMission" />
<input type="hidden" id="article_id" value="430813" />
<input type="hidden" id="logged_in" value="false" />
<p id="current_url" class="hidden">http://tvtropes.org/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission</p>
<meta itemprop="datePublished" content="" />
<meta itemprop="articleSection" content="" />
<meta itemprop="image" content="">
<a href="#watch" class="watch-button " data-modal-target="login">Follow<span>ing</span></a>
<h1 itemprop="headline" class="entry-title">
<strong>Video Game / </strong>
Metroid: Zero Mission
</h1>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "tvtropes.org",
"item": "https://tvtropes.org"
},{
"@type": "ListItem",
"position": 2,
"name": "VideoGame",
"item": "https://tvtropes.org/pmwiki/pmwiki.php/Main/VideoGame"
},{
"@type": "ListItem",
"position": 3,
"name": "Metroid: Zero Mission" }]
}
</script>
<a href="#mobile-actions-toggle" id="mobile-actionbar-toggle" class="mobile-actionbar-toggle mobile-on" data-click-toggle="active">
<p class="tiny-off">Go To</p><span></span><span></span><span></span><i class="fa fa-pencil"></i></a>
<nav id="mobile-actions-bar" class="mobile-actions-wrapper mobile-on"></nav>
<div id="editLockModal" class="modal fade hidden-until-active">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
<h4 class="modal-title">Edit Locked</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="body">
<div class="danger troper_locked_message"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<nav class="body-options" itemscope itemtype="http://schema.org/SiteNavigationElement">
<ul class="subpage-links">
<li>
<a href="/pmwiki/pmwiki.php/Awesome/MetroidZeroMission" class="subpage-link " title="The Awesome page">
<span class="wrapper"><span class="spi awesome"></span>Awesome</span></a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/Funny/MetroidZeroMission" class="subpage-link " title="The Funny page">
<span class="wrapper"><span class="spi funny"></span>Funny</span></a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/Heartwarming/MetroidZeroMission" class="subpage-link " title="The Heartwarming page">
<span class="wrapper"><span class="spi heartwarming"></span>Heartwarming</span></a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/Laconic/MetroidZeroMission" class="subpage-link " title="The Laconic page">
<span class="wrapper"><span class="spi laconic-icon"></span>Laconic</span></a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/NightmareFuel/MetroidZeroMission" class="subpage-link " title="The NightmareFuel page">
<span class="wrapper"><span class="spi nightmarefuel"></span>NightmareFuel</span></a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/Trivia/MetroidZeroMission" class="subpage-link " title="The Trivia page">
<span class="wrapper"><span class="spi trivia"></span>Trivia</span></a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MetroidZeroMission" class="subpage-link curr-subpage" title="The VideoGame page">
<span class="wrapper"><span class="spi videogame"></span>VideoGame</span></a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/YMMV/MetroidZeroMission" class="subpage-link " title="The YMMV page">
<span class="wrapper"><span class="spi ymmv"></span>YMMV</span></a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/VideoExamples/MetroidZeroMission" class="subpage-link video-examples-tab " title="Video Examples">
<img src="/images/play-button-logo.png" alt="play" class="">
<span class="wrapper">VideoExamples</span>
</a>
</li>
<li class="create-subpage dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="wrapper">Create New <i class="fa fa-plus-circle"></i></span>
</a>
<select onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
<option value="">- Create New -</option>
<option value="/pmwiki/pmwiki.php/Analysis/MetroidZeroMission?action=edit">Analysis</option>
<option value="/pmwiki/pmwiki.php/Characters/MetroidZeroMission?action=edit">Characters</option>
<option value="/pmwiki/pmwiki.php/FanficRecs/MetroidZeroMission?action=edit">FanficRecs</option>
<option value="/pmwiki/pmwiki.php/FanWorks/MetroidZeroMission?action=edit">FanWorks</option>
<option value="/pmwiki/pmwiki.php/Fridge/MetroidZeroMission?action=edit">Fridge</option>
<option value="/pmwiki/pmwiki.php/Haiku/MetroidZeroMission?action=edit">Haiku</option>
<option value="/pmwiki/pmwiki.php/Headscratchers/MetroidZeroMission?action=edit">Headscratchers</option>
<option value="/pmwiki/pmwiki.php/ImageLinks/MetroidZeroMission?action=edit">ImageLinks</option>
<option value="/pmwiki/pmwiki.php/PlayingWith/MetroidZeroMission?action=edit">PlayingWith</option>
<option value="/pmwiki/pmwiki.php/Quotes/MetroidZeroMission?action=edit">Quotes</option>
<option value="/pmwiki/pmwiki.php/Recap/MetroidZeroMission?action=edit">Recap</option>
<option value="/pmwiki/pmwiki.php/ReferencedBy/MetroidZeroMission?action=edit">ReferencedBy</option>
<option value="/pmwiki/pmwiki.php/Synopsis/MetroidZeroMission?action=edit">Synopsis</option>
<option value="/pmwiki/pmwiki.php/Timeline/MetroidZeroMission?action=edit">Timeline</option>
<option value="/pmwiki/pmwiki.php/WMG/MetroidZeroMission?action=edit">WMG</option>
</select>
</li>
</ul>
</nav>
<div id="main-article" class="article-content retro-folders">
<p></p><div class="quoteright" style="width:300px;"><div class="lazy_load_img_box" style="padding-top:100.67%"><img src="https://static.tvtropes.org/pmwiki/pub/images/rsz_metroid_zero_mission_box.png" class="embeddedimage" border="0" alt="https://static.tvtropes.org/pmwiki/pub/images/rsz_metroid_zero_mission_box.png" width="299" height="301"></div></div><p></p><div class="indent"><em>Planet Zebes... I called this place home <a class="twikilink" href="/pmwiki/pmwiki.php/Manga/MetroidManga" title="/pmwiki/pmwiki.php/Manga/MetroidManga">once</a>, in peaceful times, long before evil haunted the caverns below. Now, I shall finally tell the tale of my first battle here... My so-called Zero Mission.</em><div class="indent">—<strong>Samus Aran</strong></div></div><div class="proper-ad-unit mobile-ad square_ad"><h6 class="ad-caption">Advertisement:</h6><div id="proper-ad-tvtropes_mobile_ad_1"><script>propertag.cmd.push(function() { proper_display('tvtropes_mobile_ad_1'); })</script></div></div><p>A <a class="twikilink" href="/pmwiki/pmwiki.php/Main/VideoGameRemake" title="/pmwiki/pmwiki.php/Main/VideoGameRemake">Video Game Remake</a> of the original <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/Metroid1" title="/pmwiki/pmwiki.php/VideoGame/Metroid1">Metroid</a></em>, released for the <a class="twikilink" href="/pmwiki/pmwiki.php/UsefulNotes/GameBoyAdvance" title="/pmwiki/pmwiki.php/UsefulNotes/GameBoyAdvance">Game Boy Advance</a> in 2004, and the sixth game released in the <em><a class="twikilink" href="/pmwiki/pmwiki.php/Franchise/Metroid" title="/pmwiki/pmwiki.php/Franchise/Metroid">Metroid</a></em> series.</p><p>The plot is essentially the same as the original game: the Space Pirates have possession of a dangerous organism called a "Metroid", which they are cloning to create an army of them. Samus Aran must infiltrate their base on Zebes to destroy both the Metroids and the base's <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ArtificialIntelligence" title="/pmwiki/pmwiki.php/Main/ArtificialIntelligence">Artificial Intelligence</a> Mother Brain. The story has been expanded with extra bits touching on <a class="twikilink" href="/pmwiki/pmwiki.php/Manga/MetroidManga" title="/pmwiki/pmwiki.php/Manga/MetroidManga">Samus being raised on Zebes by the Chozo</a> and <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ArchEnemy" title="/pmwiki/pmwiki.php/Main/ArchEnemy">Ridley's</a> belated arrival on Zebes, while the gameplay builds on the control set-up refined in <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid" title="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a></em> and <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/MetroidFusion" title="/pmwiki/pmwiki.php/VideoGame/MetroidFusion">Metroid Fusion</a></em>. There is also an <a class="twikilink" href="/pmwiki/pmwiki.php/Main/UnexpectedGameplayChange" title="/pmwiki/pmwiki.php/Main/UnexpectedGameplayChange">Unexpected Gameplay Change</a> near the end, and beating the game unlocks the original NES game.</p><p>For the page on the original 1986 game, see <a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/Metroid1" title="/pmwiki/pmwiki.php/VideoGame/Metroid1">here</a>.</p><div class="proper-ad-unit mobile-ad square_ad"><h6 class="ad-caption">Advertisement:</h6><div id="proper-ad-tvtropes_mobile_ad_2"><script>propertag.cmd.push(function() { proper_display('tvtropes_mobile_ad_2'); })</script></div></div><p>The sequel to the original, <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/MetroidIIReturnOfSamus" title="/pmwiki/pmwiki.php/VideoGame/MetroidIIReturnOfSamus">Metroid II: Return of Samus</a></em> also got a remake in a similar vein for the 3DS, titled <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/MetroidSamusReturns" title="/pmwiki/pmwiki.php/VideoGame/MetroidSamusReturns">Metroid: Samus Returns</a></em>.</p><p></p><hr><h2>Tropes exclusive to <em>Zero Mission</em>:</h2><p></p><ul><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/OneHundredPercentCompletion" title="/pmwiki/pmwiki.php/Main/OneHundredPercentCompletion">100% Completion</a>: In addition to the Metroid standard of finding all collectables in a single playthrough, the game tracks how many endings you've unlocked in the Gallery section of the options menu. A copy of the game with all possible ending screens unlocked will show the Gallery option in yellow text.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EleventhHourSuperpower" title="/pmwiki/pmwiki.php/Main/EleventhHourSuperpower">11th-Hour Superpower</a>: After <span class="spoiler" title="you can set spoilers visible by default on your profile">the stealth section in the Zero Suit, you get your suit back, only it's the Legendary Suit now, so not only do you get all the items you got on Zebes, but you also get to use the three Unknown Items the game didn't let you use before. These are the Gravity Suit, Plasma Beam, and Space Jump. Not too long after this, you can get the optional Power Bombs, but they're mainly there to allow you to backtrack to the rest of Zebes and get the rest of the items. They still pack a punch though.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AdaptationalBadass" title="/pmwiki/pmwiki.php/Main/AdaptationalBadass">Adaptational Badass</a>: All three of the main bosses go through this.<ul><div class="proper-ad-unit mobile-ad square_ad"><h6 class="ad-caption">Advertisement:</h6><div id="proper-ad-tvtropes_mobile_ad_3"><script>propertag.cmd.push(function() { proper_display('tvtropes_mobile_ad_3'); })</script></div></div><li> Kraid is redesigned from an impish little lizard into a Godzilla sized monster ala <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid" title="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a></em>.</li><li> Ridley goes from a goofy looking purple alien into a massive badass space dragon.</li><li> Mother Brain's defense system is as nasty as ever, but she now has a laser attack to defend herself with, making the fight harder than it was in the original (especially on Hard Mode).</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AdaptationOriginConnection" title="/pmwiki/pmwiki.php/Main/AdaptationOriginConnection">Adaptation Origin Connection</a>: Sort of. The Space Pirates and Ridley are part of Samus' backstory</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AdaptationalEarlyAppearance" title="/pmwiki/pmwiki.php/Main/AdaptationalEarlyAppearance">Adaptational Early Appearance</a>: This game is a remake of <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/Metroid1" title="/pmwiki/pmwiki.php/VideoGame/Metroid1">Metroid</a></em>, yet it features items and abilites that didn't exist in the original, but debuted in later games. As well, Kraid and Ridley are based on their appearances in <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid" title="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a></em>, and Samus's distinctive Varia Suit design after the <a class="twikilink" href="/pmwiki/pmwiki.php/Main/WarringWithoutWeapons" title="/pmwiki/pmwiki.php/Main/WarringWithoutWeapons">Zero Suit</a> sequence originally appeared in <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/MetroidIIReturnOfSamus" title="/pmwiki/pmwiki.php/VideoGame/MetroidIIReturnOfSamus">Metroid II: Return of Samus</a></em>. Notably, the Power Grip is based on an ability from <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/MetroidFusion" title="/pmwiki/pmwiki.php/VideoGame/MetroidFusion">Metroid Fusion</a></em> that didn't require an item to use. Also, the Zebesians, first shown onscreen in <em>Super Metroid</em>, are portrayed in this game despite the Space Pirates being an offscreen presence in the original.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AdaptedOut" title="/pmwiki/pmwiki.php/Main/AdaptedOut">Adapted Out</a>: Fake Kraid, an optional side-fight in the NES game, is absent from this remake.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AfterBossRecovery" title="/pmwiki/pmwiki.php/Main/AfterBossRecovery">After Boss Recovery</a>: Played straight with most of the bosses, who are near save rooms or healing Chozo statues. Played with in Ridley's case; you actually pass through his empty boss room to find the Chozo statue and (currently unusable) power up behind it, <em>then</em> he attacks. Of course, nothing stops you from revisiting the same Chozo statue after you defeat him.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AllThereInTheManual" title="/pmwiki/pmwiki.php/Main/AllThereInTheManual">All There in the Manual</a>: Samus’ childhood with the Chozo and overall backstory before <em>Zero Mission</em> are only ever alluded to in the game with brief flashbacks composed of still shots. They can be seen in full in Zero Mission’s <a class="urllink" href="http://www.metroid-database.com/manga/listing.php?vid=19">two-volume<img src="https://static.tvtropes.org/pmwiki/pub/external_link.gif" height="12" width="12" style="border:none;"></a> <a class="urllink" href="http://www.metroid-database.com/manga/listing.php?vid=13">manga<img src="https://static.tvtropes.org/pmwiki/pub/external_link.gif" height="12" width="12" style="border:none;"></a>. In addition, the entire backstory behind the conquest of Zebes, the cloning of Metroids, and the failed Federation assault before Samus are left to the manual as well. It should be noted the events of the manga do eventually overlap with <em>Zero Mission</em> and things take a drastic turn from there, bringing into question if that part of the "manual" still counts.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AntiFrustrationFeatures" title="/pmwiki/pmwiki.php/Main/AntiFrustrationFeatures">Anti-Frustration Features</a>:<ul><li> Missile Doors only take one missile instead of five or occasionally ten to open now so you dont have to waste missiles. In Hard Mode, where you only get two missiles per expansion, this is a blessing.</li><li> The dev team knew just how <em>brutal</em> Tourian would be on Hard Mode, so there's a couple accommodations. There's <em>three</em> save stations, the second immediately following the hardest part of it, a spot near the second and third ones where you can safely farm for health and ammo, and when the Zebetites defending Mother Brain are destroyed, they <em>stay</em> destroyed—you can go back, restock and save your game so you don't have to waste precious missiles plowing through them again.</li><li> When you start the Zero Suit segment, it's impossible to die until you pass the Save Station, which (along with all the other Save Stations in the Mother Ship and Chozodia) automatically refills your health, and keeps you from having to refight Mother Brain all over again if you die.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ArtificialBrilliance" title="/pmwiki/pmwiki.php/Main/ArtificialBrilliance">Artificial Brilliance</a>: Space Pirates are the only enemies that will chase you from other rooms, rather than get left behind when you exit into one.<span class="notelabel" onclick="togglenote('note0rmne');"><sup>note </sup></span><span id="note0rmne" class="inlinefolder" isnote="true" onclick="togglenote('note0rmne');" style="cursor:pointer;font-size:smaller;display:none;">Technically, the game is spawning a new Space Pirate to chase you rather than the previous ones doing so, since it's always just one Pirate coming from the previous room even if an entire horde was chasing you before you went through the door.</span> They will also follow you through secret passages, unless the passages are shadowed so that they can't usually be seen.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ArtificialStupidity" title="/pmwiki/pmwiki.php/Main/ArtificialStupidity">Artificial Stupidity</a>: There are some amusing exploits of the enemies' idiocy.<ul><li> Mooks such as Zeros will just move in a single line of sight.</li><li> The alarm in the Space Pirate Mother Ship resets whenever a Space Pirate sees you, and ticks down when one doesn't. When the alarm shuts down the Pirates immediately forget about you <em>even</em> if you're right next to them, as long as they're not facing you.</li><li> Shooting a Space Pirate with the Stun Pistol apparently also freezes it in time because the Pirate acts completely unaware that it was frozen for a few moments, even if you walked through it. Skilled speedrunners have exploited this to make it through the entire Zero Suit segment completely undetected.</li><li> Where's the safest place when fighting Ridley? Right underneath him. His hitbox doesn't extend to his feet, so they won't cause any damage to you from touching your head. Underneath him the player can simply shoot upward into his body at point-blank range. The only danger is that he starts swinging his tail if he takes too much damage in a short amount of time, so as long as the player is methodical in their shooting, then Ridley is essentially harmless for the entire fight.</li><li> Metroids tend to take the shortest distance they can to reach you. They have some knowledge of the map, but if you leap to a higher balcony too quickly the Metroid will eternally ram into the underside of it trying to get to you, until you head below.</li><li> Black Pirates have a huge amount of health and do not take any knockback from your shots... except when climbing up a wall. If Samus stands on a ledge and shoots down at the Pirates as they climb up to her, the Black Pirates will stop climbing and shoot in the opposite direction until they die.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AwesomeButImpractical" title="/pmwiki/pmwiki.php/Main/AwesomeButImpractical">Awesome, but Impractical</a>: The Charge Beam unfortunately gets hit by this, at least in comparison to other games - while a fully charged shot from it does deal the same amount of damage as a missile without consuming ammo, that's the only real advantage it has over missiles - it can't open missile doors, it doesn't draw recovery items to the player like in the <em>Prime</em> games, and unlike in <em>Fusion</em> (where getting it is mandatory) or <em>Super</em> (where it's a bit out of the way, but is just lying out in the open), you have to fight the <a class="twikilink" href="/pmwiki/pmwiki.php/Main/CowardlyBoss" title="/pmwiki/pmwiki.php/Main/CowardlyBoss">Charge Beam Beast</a> to get it (and doing so is completely optional<span class="notelabel" onclick="togglenote('note1z2gc');"><sup>note </sup></span><span id="note1z2gc" class="inlinefolder" isnote="true" onclick="togglenote('note1z2gc');" style="cursor:pointer;font-size:smaller;display:none;">it only takes 3 hits to its eye to beat; however, if one just waits long enough, the Charge Beam Beast will leave</span>; in fact, it's entirely possible to go <em>the entire game</em> without beating said boss).<ul><li> The Power Bombs. As in previous games, they obliterate anything on screen. However, you get them so late in the game when you can already tear enemies to shreds with ease that they're only useful when backtracking to uncover marked blocks in an area to find the rest of the collectables. They're completely useless on the final boss.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AscendedGlitch" title="/pmwiki/pmwiki.php/Main/AscendedGlitch">Ascended Glitch</a>: In Super Metroid, it was possible to make the morph ball fly across the screen at Shinespark speeds, via a glitch that was popularly called the "mock ball". This game lets you Shinespark in morph ball mode.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AttackOfThe50FootWhatever" title="/pmwiki/pmwiki.php/Main/AttackOfThe50FootWhatever">Attack of the 50-Foot Whatever</a>: Kraid, just like in <em>Super Metroid</em> and unlike the original game, where he's the same height as Samus.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/BareYourMidriff" title="/pmwiki/pmwiki.php/Main/BareYourMidriff">Bare Your Midriff</a>: Samus in the unlockable artwork if the player beats the game with only 15% of the items.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/BreakOutTheMuseumPiece" title="/pmwiki/pmwiki.php/Main/BreakOutTheMuseumPiece">Break Out the Museum Piece</a>: The Fully Powered Suit that Samus finds in the Chozo Ruins is implied to be an earlier version compared to the Power Suit that was lost earlier.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/CallForward" title="/pmwiki/pmwiki.php/Main/CallForward">Call-Forward</a>: There are a lot of these to <a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid" title="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a> in this remake.<ul><li> Underneath Mother Brain's tank is a hidden room with a Power Bomb in it, alluding to <span class="spoiler" title="you can set spoilers visible by default on your profile">Mother Brain's cyborg body. In the escape tunnel, you can shinespark to reveal a hidden area to the left, which is where Samus emerges when you reenter that same room in the countdown of <em>Super Metroid</em>.</span></li><li> Players who remember the shortcut into Maridia from <em>Super Metroid</em> will be able to <span class="spoiler" title="you can set spoilers visible by default on your profile">return to Zebes by using a power bomb in the glass tube</span></li><li> Crateria makes an early appearance here, and the level layout is similar to its depiction in <em>Super Metroid</em>—it even links to both Tourian and Brinstar once you get all the power ups.</li><li> Not far from the Space Pirate Mother Ship, you can find a few rooms from the Wrecked Ship, which makes an appearance as a full level in <em>Super Metroid</em>. The Mother Ship also has robots similar to the ones on the Wrecked Ship. The Mother Ship's normal theme is a remix of the Wrecked Ship theme, and its more urgent theme is a remix of the underground Crateria theme.</li><li> The Ensnared Kiru Giru is one to Spore Spawn as both are plant-based boss fights, both attack by firing spores at Samus, and the music is a remix of Spore Spawn and Botwoon's boss theme. Furthermore, the boss fight has a Ripper flying around for Samus to both avoid and use to reach the vines. According to the wiki, Spore Spawn's boss fight was originally going to have a Ripper flying about as well, but didn't make it past the beta. One could even go so far as to say the Ensnared Kiru Giru's shape and silhouette match that of Spore Spawn's as well.</li><li> The Zero Suit that Samus wears under her Power Suit has a bright blue color scheme resembling the Fusion Suit from <em>Metroid Fusion</em>, the latter of which resulted from Federation doctors surgically removing most of the outer layers of her original Power Suit. If you compare the three suits, the Fusion Suit basically looks like a midway point between the Power Suit and the Zero Suit.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/CatastrophicCountdown" title="/pmwiki/pmwiki.php/Main/CatastrophicCountdown">Catastrophic Countdown</a>: While the NES original averts it entirely ("TIME BOMB SET GET OUT FAST!", plus a countdown, that's it), the remake retcons in a straight example (the "time bomb" causes explosions and flames well before going off) and an aversion (the Space Pirate Mother Ship).</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/Chiaroscuro" title="/pmwiki/pmwiki.php/Main/Chiaroscuro">Chiaroscuro</a>: Not the gameplay itself, but the artwork. Some of the cutscenes also use it. Particularly, the ones introducing the bosses.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ColossusClimb" title="/pmwiki/pmwiki.php/Main/ColossusClimb">Colossus Climb</a>: Kraid, sort of. When his belly spikes begin destroying the floor, Samus must jump on them to reach Kraid's head again. The number of spikes he uses depends on how much damage he has sustained: one for minor, two for moderate, and three for critical.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ContinuityNod" title="/pmwiki/pmwiki.php/Main/ContinuityNod">Continuity Nod</a>: The temple that you must sneak through at the end of the game is part of Maridia from <em>Super Metroid</em>, before presumably sinking into the lake. The Space Pirate Mother Ship, however, while in the same spot as <em>Super Metroid</em>'s Wrecked Ship, is a <img src="/images/article-hreficon-trivia.png" class="trivia1 rounded" title="This example contains a TRIVIA entry. It should be moved to the TRIVIA tab."><a class="twikilink" href="/pmwiki/pmwiki.php/Main/WordOfGod" title="/pmwiki/pmwiki.php/Main/WordOfGod">completely different craft.</a><ul><li> The Wrecked Ship from <em>Super</em> is in the game as well, although only as few rooms separating the Chozo Ruins area from Crateria. They have a different look and color palette from any other rooms in the area, contain the same robots and floating orb enemies as the Wrecked Ship (although in <em>Zero Mission</em> said enemies are also found aboard the Space Pirate Mother Ship) and the room in Crateria they connect to is an almost exact duplicate of the room just before the Wrecked Ship in <em>Super</em>.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/CrosshairAware" title="/pmwiki/pmwiki.php/Main/CrosshairAware">Crosshair Aware</a>: Space Pirates have an annoying tendency to twitch themselves just out of your firing path when aiming at them.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/DevelopersForesight" title="/pmwiki/pmwiki.php/Main/DevelopersForesight">Developers' Foresight</a>:<ul><li> It's possible to sequence break and acquire the Screw Attack before you go to fight Ridley. The Screw Attack lets you destroy Rippers, an otherwise mostly <a class="twikilink" href="/pmwiki/pmwiki.php/Main/InvincibleMinorMinion" title="/pmwiki/pmwiki.php/Main/InvincibleMinorMinion">Invincible Minor Minion</a>, but in the boss fight before you enter Ridley's Lair, you have to stand on a frozen Ripper to reach the vines you must shoot<span class="notelabel" onclick="togglenote('note0d4zo');"><sup>* </sup></span><span id="note0d4zo" class="inlinefolder" isnote="true" onclick="togglenote('note0d4zo');" style="cursor:pointer;font-size:smaller;display:none;"><a class="twikilink" href="/pmwiki/pmwiki.php/Main/GuideDangIt" title="/pmwiki/pmwiki.php/Main/GuideDangIt">Unless you can wall jump, that is.</a></span>. How does the game ensure you don't accidentally destroy the Ripper you need? Simple. This unique Ripper is invincible to the Screw Attack, and can only be frozen without being killed.</li><li> Sequence breaking will allow you to enter Ridley's lair and fight him before Kraid. Entering Ridley's lair will play the cutscene of him and the Space Pirate Mother Ship landing on Zebes like usual, but going to Kraid's lair, defeating Kraid, and exiting that area leads to the usual cutscene of Ridley and the Mother Ship plotting a course for Zebes being removed, as would be logical given that you've already triggered the chronologically subsequent cutscene.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/DiabolusExMachina" title="/pmwiki/pmwiki.php/Main/DiabolusExMachina">Diabolus ex Machina</a>: The extended story is kicked off by <span class="spoiler" title="you can set spoilers visible by default on your profile">Samus being shot down by Space Pirates while leaving the planet, destroying her ship and suit.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/DiscOneNuke" title="/pmwiki/pmwiki.php/Main/DiscOneNuke">Disc-One Nuke</a>:<ul><li> By sequence breaking, you can get the Screw Attack as soon as you get the Speed Booster (as opposed to getting it after you beat Ridley), which runs the second half of the game into a cakewalk. This is also extremely helpful on Hard Mode.</li><li> You can also exploit the Speed Booster to get early Super Missiles, which pack a wallop, allow you access to a few power ups ahead of time, and allows you to skip the Imago miniboss.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/DoWellButNotPerfect" title="/pmwiki/pmwiki.php/Main/DoWellButNotPerfect">Do Well, but Not Perfect</a>: The <a class="twikilink" href="/pmwiki/pmwiki.php/Main/FinalBoss" title="/pmwiki/pmwiki.php/Main/FinalBoss">Final Boss</a> <span class="spoiler" title="you can set spoilers visible by default on your profile">the Ridley Robot</span> is coded to be much harder to defeat if <a class="twikilink" href="/pmwiki/pmwiki.php/Main/HundredPercentCompletion" title="/pmwiki/pmwiki.php/Main/HundredPercentCompletion">all the upgrades have been collected</a>; if you can go without a few missiles or that last energy tank for the first playthrough, the battle will be remarkably brief.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/DummiedOut" title="/pmwiki/pmwiki.php/Main/DummiedOut">Dummied Out</a>: Two very interesting things were removed at some point. One was the ability to turn suit upgrades on and off from the pause menu, as in <em>Super Metroid</em>; fans are still wondering why this much-missed feature was taken out. (Cheat codes can turn it back on.) The second was... <a class="urllink" href="https://www.youtube.com/watch?v=iKvTYQSc_VA">Crocomire<img src="https://static.tvtropes.org/pmwiki/pub/external_link.gif" height="12" width="12" style="border:none;"></a>! This <em>Super Metroid</em> boss was found in the ROM, with a full set of sprites and some movement code, but nothing else. It's possible to hack him into various rooms.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EarlyGameHell" title="/pmwiki/pmwiki.php/Main/EarlyGameHell">Early Game Hell</a>: In Hard Mode, you get a nasty wake up call of how hard it'll be right from the first room. Every single enemy will kill you in just a couple hits, and item expansions and energy tanks only give you half of what the normal game gives you. You have to be much more careful and shrewd with your resources if you want to make it through in one piece.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EasyModeMockery" title="/pmwiki/pmwiki.php/Main/EasyModeMockery">Easy-Mode Mockery</a>: If you beat the game on Easy, you can only unlock the ending picture with a fully armoured Samus, regardless of how quick you were or your percentage of items collected.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EliteMooks" title="/pmwiki/pmwiki.php/Main/EliteMooks">Elite Mooks</a>: Black Space Pirates, who are dozens of times more powerful than standard red ones, are swift and leap high, can only be damaged by your beam weapons, and are immune to freezing and wave effects. Good thing there's only a few in the game, and you're only required to fight two.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EmbeddedPrecursor" title="/pmwiki/pmwiki.php/Main/EmbeddedPrecursor">Embedded Precursor</a>: Beating the game allows you to play the original NES <em>Metroid</em>.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EmergencyWeapon" title="/pmwiki/pmwiki.php/Main/EmergencyWeapon">Emergency Weapon</a>: The stun pistol <span class="spoiler" title="you can set spoilers visible by default on your profile">used when in the Zero Suit</span>. When fired, it temporarily stuns an enemy, but only when fully charged. Lower than full shots can only break blocks and are useless on enemies. Nobody would use this if they had <em>any</em> alternative... naturally, you acquire this at the beginning of a <a class="twikilink" href="/pmwiki/pmwiki.php/Main/NoGearLevel" title="/pmwiki/pmwiki.php/Main/NoGearLevel">No-Gear Level</a> and do not, in fact, have any alternatives. Samus' narration <a class="twikilink" href="/pmwiki/pmwiki.php/Main/LampshadeHanging" title="/pmwiki/pmwiki.php/Main/LampshadeHanging">brings attention to this</a>, outright calling it "rather useless".</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EndGameResultsScreen" title="/pmwiki/pmwiki.php/Main/EndGameResultsScreen">End Game Results Screen</a>: The game has a special note by having different pieces of artwork shown for completing the game with less than 15% of the power-ups collected.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EpisodeZeroTheBeginning" title="/pmwiki/pmwiki.php/Main/EpisodeZeroTheBeginning">Episode 0: The Beginning</a>: <em><a class="twikilink" href="/pmwiki/pmwiki.php/Main/ExactlyWhatItSaysOnTheTin" title="/pmwiki/pmwiki.php/Main/ExactlyWhatItSaysOnTheTin">Zero Mission</a></em>.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/EyeAwaken" title="/pmwiki/pmwiki.php/Main/EyeAwaken">Eye Awaken</a>:<ul><li> Mother Brain in a cutscene while Samus descends down the elevator to Norfair.</li><li> Surprisingly, <em>Samus herself</em> also does this at the beginning of the game.</li><li> Upon entering <span class="spoiler" title="you can set spoilers visible by default on your profile">the Space Pirate Mother Ship, a cutaway shows an aperture open to a green lens, an eye of the Ridley Robot.</span></li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/FatBastard" title="/pmwiki/pmwiki.php/Main/FatBastard">Fat Bastard</a>: This game's incarnation of Kraid, making the <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid" title="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a></em> one look <em><a class="twikilink" href="/pmwiki/pmwiki.php/Main/LeanAndMean" title="/pmwiki/pmwiki.php/Main/LeanAndMean">skinny</a></em> by comparison.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/FlyAtTheCameraEnding" title="/pmwiki/pmwiki.php/Main/FlyAtTheCameraEnding">Fly-at-the-Camera Ending</a>: As has been common with <em>Metroid</em> games since <em>Super</em>. What makes this one unique is that <span class="spoiler" title="you can set spoilers visible by default on your profile">you're flying a Space Pirate fighter craft, what with your original gunship being wrecked</span>.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/GameChanger" title="/pmwiki/pmwiki.php/Main/GameChanger">Game Changer</a>: Samus destroys Mother Brain and blows up the Space Pirate's base on Zebes, just as she did in the original game. <span class="spoiler" title="you can set spoilers visible by default on your profile">Then Pirate ships ambush her starship and send her crashing back down to the surface, now without a suit, weaponless, and with little hope of escape.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/GameplayAndStorySegregation" title="/pmwiki/pmwiki.php/Main/GameplayAndStorySegregation">Gameplay and Story Segregation</a>: Samus keeps her energy tanks <span class="spoiler" title="you can set spoilers visible by default on your profile">after losing her suit, despite the fact that the tanks connect to the suit and serve to power it. One could say the Zero Suit itself has rudimentary shielding, but really it's so that the player doesn't die the second a Pirate shoots them once.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/GlassCannon" title="/pmwiki/pmwiki.php/Main/GlassCannon">Glass Cannon</a>: Ridley. His attacks are very quick and powerful, but he can be shot basically anywhere on his body but his tail. Since he's fought halfway through the game, Samus is sure to be fairly powerful by then.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/GoForTheEye" title="/pmwiki/pmwiki.php/Main/GoForTheEye">Go for the Eye</a>:<ul><li> Mother Brain, of course, though this is a double subversion since in previous games you could shoot her anywhere on her brain.</li><li> The Charge Beam Beast must be shot in the eye, though this is harder than it sounds because he only opens his eye three times before fleeing and you must shoot it all three times to defeat him.</li><li> Downplayed with Kraid. You must missile him in the eye, yes, but only to get him to reveal his real weak spot: his mouth.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/HardLevelsEasyBosses" title="/pmwiki/pmwiki.php/Main/HardLevelsEasyBosses">Hard Levels, Easy Bosses</a>: The game has this on Normal. The final boss gets significantly more challenging if you've got 100% completion, though.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/HitboxDissonance" title="/pmwiki/pmwiki.php/Main/HitboxDissonance">Hitbox Dissonance</a>: Unlike in other games, Ridley's legs aren't part of his hitbox, meaning that the easiest way to take him down is to duck underneath him and spray him with missiles.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/HolyPipeOrgan" title="/pmwiki/pmwiki.php/Main/HolyPipeOrgan">Holy Pipe Organ</a>: <em>Zero Mission</em> has a boss fight against the Chozo God of War, encountered as a sacred test in the Chozodia temple. Its <a class="urllink" href="https://www.youtube.com/watch?v=q1pu05G_27w">battle theme<img src="https://static.tvtropes.org/pmwiki/pub/external_link.gif" height="12" width="12" style="border:none;"></a> is almost entirely an organ solo, an instrument rarely used in <em><a class="twikilink" href="/pmwiki/pmwiki.php/Franchise/Metroid" title="/pmwiki/pmwiki.php/Franchise/Metroid">Metroid</a></em> soundtracks. Overlaps with <a class="twikilink" href="/pmwiki/pmwiki.php/Main/OminousPipeOrgan" title="/pmwiki/pmwiki.php/Main/OminousPipeOrgan">Ominous Pipe Organ</a> due to being a boss theme, but the God of War isn't regarded as evil or villainous, simply <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ThresholdGuardians" title="/pmwiki/pmwiki.php/Main/ThresholdGuardians">a test for Samus to overcome and prove herself worthy</a>.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/InMediasRes" title="/pmwiki/pmwiki.php/Main/InMediasRes">In Medias Res</a>: Just like in the original game, the game begins with Samus already inside Brinstar's caverns, not on the surface of Zebes where her ship landed. A little exploring when you return to Crateria <span class="spoiler" title="you can set spoilers visible by default on your profile">after you destroy Mother Brain</span> lets you find a hidden path from her ship to the opening site, suggesting that's how Samus got to Brinstar from her ship.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/InsurmountableWaistHighFence" title="/pmwiki/pmwiki.php/Main/InsurmountableWaistHighFence">Insurmountable Waist-High Fence</a>: Throughout Brinstar, there are a series of indestructible plants that only parasites (also found in Brinstar - one instance of its normal usage is in the room prior to Varia) can clear. One of these indestructible plants exists in Norfair directly out of the room past the Save Point, and without the parasites that would clear it normally. Its only purpose is to ensure the player obtains the Power Grip, since the plant arbitrarily disappears as soon as it is collected.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/InterfaceSpoiler" title="/pmwiki/pmwiki.php/Main/InterfaceSpoiler">Interface Spoiler</a>: Upon collecting an Unknown Item, the game quite plainly informs you that it is incompatible with <em>your current suit</em>. Mind, by <a class="twikilink" href="/pmwiki/pmwiki.php/Main/TheLawOfConservationOfDetail" title="/pmwiki/pmwiki.php/Main/TheLawOfConservationOfDetail">The Law of Conservation of Detail</a>, anyone with two brain cells would know you're gonna find <em>some</em> way to use the things — the message only spoils what that method ends up being.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/LeeroyJenkins" title="/pmwiki/pmwiki.php/Main/LeeroyJenkins">Leeroy Jenkins</a>: At the very, very end, a lone Space Pirate encounters Samus trying to take off in a <span class="spoiler" title="you can set spoilers visible by default on your profile">stolen Pirate fighter</span> ship. He shoots at the ship, to no avail, then climbs up to it and throws himself at it. The result? The ship runs him over.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/LethalLavaLand" title="/pmwiki/pmwiki.php/Main/LethalLavaLand">Lethal Lava Land</a>: Norfair as per usual.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/LighterAndSofter" title="/pmwiki/pmwiki.php/Main/LighterAndSofter">Lighter and Softer</a>: Yes. Compared to the previous games including <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/MetroidPrime" title="/pmwiki/pmwiki.php/VideoGame/MetroidPrime">Metroid Prime</a></em>, this game, including the music, is more upbeat while maintaining the atmosphere while dark moments such as a Metroid draining a Space Pirate to death are minimum at best.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/LoadBearingBoss" title="/pmwiki/pmwiki.php/Main/LoadBearingBoss">Load-Bearing Boss</a>:<ul><li> Kill Mother Brain and she activates Tourian's self-destruct.</li><li> <span class="spoiler" title="you can set spoilers visible by default on your profile">Kill the Ridley Robot and it does the same for the Mother Ship.</span></li><li> Downplayed with Ridley and Kraid, whose defeat causes statues by their lairs' entrance to crumble.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/Mayincatec" title="/pmwiki/pmwiki.php/Main/Mayincatec">Mayincatec</a>: Chozo statues take a bit of a Meso-american influence in this game, including <a class="urllink" href="http://metroid.wikia.com/wiki/File:Chozo-chac-mool.jpeg">one statue directly based on<img src="https://static.tvtropes.org/pmwiki/pub/external_link.gif" height="12" width="12" style="border:none;"></a><small>◊</small> <a class="urllink" href="http://en.wikipedia.org/wiki/Chacmool">a chacmool<img src="https://static.tvtropes.org/pmwiki/pub/external_link.gif" height="12" width="12" style="border:none;"></a>. <a class="twikilink" href="/pmwiki/pmwiki.php/Main/BuildLikeAnEgyptian" title="/pmwiki/pmwiki.php/Main/BuildLikeAnEgyptian">Their architecture also resembles that of the Egyptians</a>, particularly the carvings surrounding <a class="urllink" href="http://cdn.wikimg.net/metroidwiki/images/a/a1/Ruins_Test.png">the Ruins Test<img src="https://static.tvtropes.org/pmwiki/pub/external_link.gif" height="12" width="12" style="border:none;"></a><small>◊</small>.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/Metamorphosis" title="/pmwiki/pmwiki.php/Main/Metamorphosis">Metamorphosis</a>: The Imago Larva Samus saves in Norfair metamorphosizes into a full grown Imago, which then you must fight after you break its eggs. One can encounter its cocoon being opened so it can exit, then later find it empty. Oddly, it seems it transformed from larva to adult in just a couple of minutes.</li><li> <img src="/images/article-hreficon-ymmv.png" class="ymmv1 rounded" title="This example contains a YMMV entry. It should be moved to the YMMV tab."><a class="twikilink" href="/pmwiki/pmwiki.php/Main/MinimalistRun" title="/pmwiki/pmwiki.php/Main/MinimalistRun">Minimalist Run</a>: Beating the game with no more than <strong>15%</strong> of items on both Normal and Hard rewards the player with bonus artwork of Samus. <a class="twikilink" href="/pmwiki/pmwiki.php/Main/SelfImposedChallenge" title="/pmwiki/pmwiki.php/Main/SelfImposedChallenge">It's actually possible to beat the game</a> with just <em><strong>9%</strong></em> (meaning you can only grab a single pack of missiles, the Ice Beam, Plasma Beam, Morph Ball and Bombs, Space Jump, Gravity Suit and Power Grip).</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/MoodWhiplash" title="/pmwiki/pmwiki.php/Main/MoodWhiplash">Mood Whiplash</a>: Despite being less foreboding than <em>Fusion</em> tended to be, you can get a cold chill up your spine whenever you collect an Unknown Item. The music that plays is a dark, mysterious theme and the whole "you don't know what you just collected" element can feel jarring.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/MookDebutCutscene" title="/pmwiki/pmwiki.php/Main/MookDebutCutscene">Mook Debut Cutscene</a>: For the titular Metroids. As you enter Tourian, you get the sight of them munching on a deceased Space Pirate.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/Nerf" title="/pmwiki/pmwiki.php/Main/Nerf">Nerf</a>: In <em>Fusion</em>, you are practically invincible when you use the Screw Attack, with the exceptions of the last two boss. Here, Space Pirates can hurt you while using it.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/NoGearLevel" title="/pmwiki/pmwiki.php/Main/NoGearLevel">No-Gear Level</a>: <span class="spoiler" title="you can set spoilers visible by default on your profile">The stealth mission after your Power Suit is destroyed. All you get to keep is your stun pistol and your energy tanks, though now you take more damage.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/NoEndorHolocaust" title="/pmwiki/pmwiki.php/Main/NoEndorHolocaust">No Endor Holocaust</a>: The destruction of Tourian is so powerful it can be seen <strong>from orbit</strong>. And yet, if Samus returns to the previous levels after killing Mother Brain, she'll find that the upper caverns of Zebes, i.e. Brinstar, Norfair, Crateria, etc., are all fine. Only Tourian, the deepest level, is damaged, and most of the destruction is confined to Mother Brain's chamber.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/NoSidepathsNoExplorationNoFreedom" title="/pmwiki/pmwiki.php/Main/NoSidepathsNoExplorationNoFreedom">No Sidepaths, No Exploration, No Freedom</a>:<ul><li> Like in the original game, Tourian is a very linear level with no items <span class="notelabel" onclick="togglenote('note2zxxi');"><sup>note </sup></span><span id="note2zxxi" class="inlinefolder" isnote="true" onclick="togglenote('note2zxxi');" style="cursor:pointer;font-size:smaller;display:none;">on your first visit, anyway—revisit it after you get the Power Bombs, and you can find a Power Bomb and Missile expansion there</span> or sidepaths—it's a straight line through the Metroids to Mother Brain from the elevator.</li><li> Chozodia starts like this due to the nature of its stealth-based gameplay, but it opens up once you get all your stuff back.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/NostalgiaLevel" title="/pmwiki/pmwiki.php/Main/NostalgiaLevel">Nostalgia Level</a>: More than just being a remake of the original game, there are areas that nod to <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid" title="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a></em> by taking advantage of the expanded map.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/OpeningMonologue" title="/pmwiki/pmwiki.php/Main/OpeningMonologue">Opening Monologue</a>: Samus has a few words to say (in text only, no voiced dialogue) to the player as the game opens.<div class="indent"><strong>Samus</strong>: Planet Zebes...I called this place home once, in peaceful times, long before evil haunted the caverns below. Now, I shall finally tell the tale of my first battle here.... My so-called Zero Mission.</div></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/PointOfNoReturn" title="/pmwiki/pmwiki.php/Main/PointOfNoReturn">Point of No Return</a>: You can destroy the Zebetites in Tourian, save, restock and return, but as soon as you get to the room with Mother Brain herself, the Morph Ball entrance seals, and it's do-or-die from there.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/PsychoactivePowers" title="/pmwiki/pmwiki.php/Main/PsychoactivePowers">Psychoactive Powers</a>: <img src="/images/article-hreficon-trivia.png" class="trivia1 rounded" title="This example contains a TRIVIA entry. It should be moved to the TRIVIA tab."><a class="twikilink" href="/pmwiki/pmwiki.php/Main/WordOfGod" title="/pmwiki/pmwiki.php/Main/WordOfGod">Word of God</a> on Samus's suit is that it's formed together from will and needs Samus's bravery to remain active. <span class="spoiler" title="you can set spoilers visible by default on your profile">When she crash-landed on Zebes, her confidence was lost and thus she couldn't resummon her suit. Returning to the Chozo ruins and completing the challenge of the Ruins Test restored her warrior's spirit and thus let her suit return.</span> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/FlipFlopOfGod" title="/pmwiki/pmwiki.php/Main/FlipFlopOfGod">Except the supplementary material</a> specifically state <span class="spoiler" title="you can set spoilers visible by default on your profile">that the suit acquired from Chozodia is a different suit, and the entirety of <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/MetroidFusion" title="/pmwiki/pmwiki.php/VideoGame/MetroidFusion">Metroid Fusion</a></em>'s plot depends on the fact that Samus's suit is a physical object that remains intact when she's out of commission, and can be removed and hijacked by an alien parasite.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/PupatingPeril" title="/pmwiki/pmwiki.php/Main/PupatingPeril">Pupating Peril</a>: In the lower areas of Norfair, Samus encounters giant grubs that can only be defeated by attacking their weak underbellies. She later finds a stationary one that is strung up in some vines that she must sever, which drops the grub through the ground and lets her continue to Ridley's lair. The grub can be seen starting to pupate. Samus must double back to the grub's location, only to see the grub has left its pupa. The nearby tunnel leads to a chamber where Samus must fight the imago.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/Railroading" title="/pmwiki/pmwiki.php/Main/Railroading">Railroading</a>:<ul><li> The game does encourage <a class="twikilink" href="/pmwiki/pmwiki.php/Main/SequenceBreaking" title="/pmwiki/pmwiki.php/Main/SequenceBreaking">Sequence Breaking</a> and is quite non-linear once you know it in and out, but there are some road blocks that weren't in the original game. For starters, you can't sequence break into Tourian anymore (Ridley and Kraid's new giant statues completely block your path) and whereas you could technically beat the original game without the ice beam (big emphasis on technically, as its extremely hard to pull off), you absolutely need the Ice Beam in order to beat Tourian here—unlike the original game, Metroids have to be killed in order to progress in it, and the Ice Beam is the only thing that lets you damage them.</li><li> In the original game, the only items needed to complete the game were the Morph Ball, Bombs and Missiles. In this game, even on a <img src="/images/article-hreficon-ymmv.png" class="ymmv1 rounded" title="This example contains a YMMV entry. It should be moved to the YMMV tab."><a class="twikilink" href="/pmwiki/pmwiki.php/Main/MinimalistRun" title="/pmwiki/pmwiki.php/Main/MinimalistRun">9% run</a>, you at least need a pack of missiles, the Ice Beam, Plasma Beam, Morph Ball and Bombs, Space Jump, Gravity Suit and Power Grip to finish it (the Varia Suit is also automatically given to you in Chozodia).</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ReformulatedGame" title="/pmwiki/pmwiki.php/Main/ReformulatedGame">Reformulated Game</a>: Or rather, Reformulated <em>Remake</em>. The game straddles the line between being an updated remake of the <a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/Metroid1" title="/pmwiki/pmwiki.php/VideoGame/Metroid1">original NES Metroid</a> by having similar level designs with modern gameplay, and being a completely new title with several newly-designed areas and overhauled sections of the original levels along with a heavily reworked game engine that feels like a souped up <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid" title="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a></em> while borrowing none of the physics of the original game.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/SamusIsAGirl" title="/pmwiki/pmwiki.php/Main/SamusIsAGirl">Samus Is a Girl</a>: In contrast to the original game, the remake doesn't even try to hide Samus's gender, <img src="/images/article-hreficon-ymmv.png" class="ymmv1 rounded" title="This example contains a YMMV entry. It should be moved to the YMMV tab."><a class="twikilink" href="/pmwiki/pmwiki.php/Main/ItWasHisSled" title="/pmwiki/pmwiki.php/Main/ItWasHisSled">since it's a well known secret now</a>. Thus, a glimpse of Samus's eyes occurs at the beginning, her unarmored body can be seen on the death screen, the back of the game's box refers to her as "her", and <span class="spoiler" title="you can set spoilers visible by default on your profile">a whole level is spent out of armor when Samus's suit is destroyed.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/SlidingScaleOfAdaptationModification" title="/pmwiki/pmwiki.php/Main/SlidingScaleOfAdaptationModification">Sliding Scale of Adaptation Modification</a>: Somewhere in between a 2 and a 3. Although it keeps the main story, it expands on it a lot, including Samus' dramatic back story and a new gameplay segment near the end, see <a class="twikilink" href="/pmwiki/pmwiki.php/Main/AdaptationExpansion" title="/pmwiki/pmwiki.php/Main/AdaptationExpansion">Adaptation Expansion</a></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/SequenceBreaking" title="/pmwiki/pmwiki.php/Main/SequenceBreaking">Sequence Breaking</a>: The game actually encourages it, including lots of hidden spots to do things out of order:<ul><li> Of note is that a tunnel in Norfair lets one defeat Ridley before Kraid, which also lets you get Super Missiles before fighting Kraid. What also helps is that the infinite bomb jumping and one wall jumping both return from <em>Super Metroid</em> after their absence in Fusion.</li><li> The Screw Attack can be acquired early. First, Samus must take a secret route in the main 'bubble shaft' of Norfair. A well-executed Bomb Jump or Wall Jumping and destruction of Missile Blocks will bring Samus to the Screw Attack.</li><li> The Varia Suit can be collected by freezing Wavers, or by using several Bomb Jumps to reach the Varia's room. This also means it can be collected without the Power Grip.</li><li> The secret Missile Tank in the first long shaft of Brinstar can be collected using Wall Jumps and Bombs.</li><li> The Super Missile Tank near the Brinstar shaft can be reached using several Ballsparks. Another in the Chozo Ruins portion of Crateria can also be reached with several Wall Jumps and Shinesparks as well.</li><li> The Long Beam can be skipped by taking an alternate route of Fake Blocks.</li><li> The Wave Beam can be collected early via skipping the Ice Beam.</li><li> The Imago can be skipped by taking an alternate route to Ridley's Lair, or by getting early Super Missiles.</li><li> It is possible to completely skip the Varia Suit, but when the Ruins Test is completed and Samus collects the fully powered suit, which activates the three Unknown Items revealed to be the Gravity Suit, Space Jump, and Plasma Beam, Samus gains the Varia Suit anyway as the new suit provides it.</li><li> It is possible to enter Tourian without obtaining the Ice Beam. If she goes into a room with Metroids in it, however, <a class="twikilink" href="/pmwiki/pmwiki.php/Main/UnwinnableByMistake" title="/pmwiki/pmwiki.php/Main/UnwinnableByMistake">she will be trapped with no way to kill them.</a></li><li> It is possible to defeat Mother Brain and exit Tourian without the Speed Booster, by wall jumping or bomb jumping up the wall near the west entrance to the ship.</li><li> It is possible to obtain early Super Missiles without the Ice Beam by entering a secret route to the lower areas of Norfair. However, this makes the fight with Kiru Giru much harder, as it now requires the use of Wall Jumps to attack the Tangle Vine.</li><li> Sequence Breaking is <em>essential</em> if you want to do the <img src="/images/article-hreficon-ymmv.png" class="ymmv1 rounded" title="This example contains a YMMV entry. It should be moved to the YMMV tab."><a class="twikilink" href="/pmwiki/pmwiki.php/Main/MinimalistRun" title="/pmwiki/pmwiki.php/Main/MinimalistRun">Minimalist Run</a> as you're lacking otherwise required power ups.</li></ul></li><li> <img src="/images/article-hreficon-ymmv.png" class="ymmv1 rounded" title="This example contains a YMMV entry. It should be moved to the YMMV tab."><a class="twikilink" href="/pmwiki/pmwiki.php/Main/SequelDifficultyDrop" title="/pmwiki/pmwiki.php/Main/SequelDifficultyDrop">Sequel Difficulty Drop</a>: Much easier than the original <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/Metroid1" title="/pmwiki/pmwiki.php/VideoGame/Metroid1">Metroid 1</a></em>, thanks to its in-game map and hint system, Samus' far greater maneuverability, save points, simpler and more telegraphed puzzle solutions, and more forgiving gameplay in general (e.g. no more starting from 30 energy when you die.)<ul><li> Also easier than its GBA predecessor, <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/MetroidFusion" title="/pmwiki/pmwiki.php/VideoGame/MetroidFusion">Metroid Fusion</a></em>, due to simpler and shorter boss fights and lower damage inflicted by enemies.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/HesBack" title="/pmwiki/pmwiki.php/Main/HesBack">She's Back</a>: <span class="spoiler" title="you can set spoilers visible by default on your profile">Getting shot down and losing your Power Suit</span>? Running and hiding from just about everything? <span class="spoiler" title="you can set spoilers visible by default on your profile">A Chozo Trial boss fight later</span>, then The Hunter, who strikes fear into the hearts of the Space Pirate legions, is reborn, more powerful than ever, and <a class="twikilink" href="/pmwiki/pmwiki.php/Main/RoaringRampageofRevenge" title="/pmwiki/pmwiki.php/Main/RoaringRampageofRevenge">slaughtering her way through the Pirates' ranks</a>, complete with <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ThemeMusicPowerUp" title="/pmwiki/pmwiki.php/Main/ThemeMusicPowerUp">Theme Music Power-Up</a>.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ShoutOut" title="/pmwiki/pmwiki.php/Main/ShoutOut">Shout-Out</a>: The three "unknown items" are a big shout-out to <em><a class="twikilink" href="/pmwiki/pmwiki.php/VideoGame/KidIcarus" title="/pmwiki/pmwiki.php/VideoGame/KidIcarus">Kid Icarus</a></em>, <em>Metroid</em>'s sibling. The game was developed by the same team that made the original <em>Metroid</em>, although it is a lot less well-known, especially outside of Japan. The items greatly resemble the Sacred Treasures of the latter game, and while cosmetically different, perform roughly the same function. The Gravity Suit - highest defense, free movement in liquid, blocks lava damage (Mirror Shield - blocks any attack), Plasma Beam (Light Arrows) - both allow attacks to pierce multiple enemies, and Space Jump (Wings of Pegasus) - both allow unlimited flight.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/SkippableBoss" title="/pmwiki/pmwiki.php/Main/SkippableBoss">Skippable Boss</a>:<ul><li> The Charge Beam Beast doesn't have to be fought, but if you don't kill it then you'll never get the Charge Beam.</li><li> Imago is completely skippable as well, unless you're going for <a class="twikilink" href="/pmwiki/pmwiki.php/Main/OneHundredPercentCompletion" title="/pmwiki/pmwiki.php/Main/OneHundredPercentCompletion">100% Completion</a>.</li><li> The Acid Worm is skippable by a horizontal bomb jump (which allows you to defeat Kraid before getting the Power Grip), but it's really hard, and <a class="twikilink" href="/pmwiki/pmwiki.php/Main/OneHundredPercentCompletion" title="/pmwiki/pmwiki.php/Main/OneHundredPercentCompletion">100% Completion</a> still requires its defeat.</li></ul></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/SoNearYetSoFar" title="/pmwiki/pmwiki.php/Main/SoNearYetSoFar">So Near, Yet So Far</a>: Much like in the original, the entrance to Tourian is very close to your starting position in Brinstar and can be visited soon after getting the first few upgrades (and unlike the original, <em>Zero Mission</em> subtly encourages you to visit it through the level design), but you can't pass the statues until you defeat Kraid and Ridley.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/StupidityIsTheOnlyOption" title="/pmwiki/pmwiki.php/Main/StupidityIsTheOnlyOption">Stupidity Is the Only Option</a>: When entering Ridley's Lair, you might notice a bunch of big pink eggs lying about. Those look conspicuous, better not touch them... oh dear, the room's locked. And the only way out is to break the eggs and <a class="twikilink" href="/pmwiki/pmwiki.php/Main/PapaWolf" title="/pmwiki/pmwiki.php/Main/PapaWolf">await their avenger</a>.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/SuicideMission" title="/pmwiki/pmwiki.php/Main/SuicideMission">Suicide Mission</a>: Samus regards <span class="spoiler" title="you can set spoilers visible by default on your profile">her infiltration of the Space Pirate Mother Ship</span> as one, but notes that she doesn't have another option.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/TempleOfDoom" title="/pmwiki/pmwiki.php/Main/TempleOfDoom">Temple of Doom</a>: Chozodia.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/UnexpectedGameplayChange" title="/pmwiki/pmwiki.php/Main/UnexpectedGameplayChange">Unexpected Gameplay Change</a>: <span class="spoiler" title="you can set spoilers visible by default on your profile">After beating Mother Brain, you're suddenly thrown into a <a class="twikilink" href="/pmwiki/pmwiki.php/Main/StealthBasedMission" title="/pmwiki/pmwiki.php/Main/StealthBasedMission">Stealth-Based Mission</a>.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/UnexpectedlyRealisticGameplay" title="/pmwiki/pmwiki.php/Main/UnexpectedlyRealisticGameplay">Unexpectedly Realistic Gameplay</a>: Because the player is so used to bombs and missiles only destroying specific blocks, plenty of players can miss discovering that <span class="spoiler" title="you can set spoilers visible by default on your profile">Power Bombs can also destroy the glass tunnel connecting the Space Pirate Mother Ship to Chozodia.</span></li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/UndergroundLevel" title="/pmwiki/pmwiki.php/Main/UndergroundLevel">Underground Level</a>: Most of the game, but it mixes it up by including the surface levels of Crateria and Chozodia.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ViolationOfCommonSense" title="/pmwiki/pmwiki.php/Main/ViolationOfCommonSense">Violation of Common Sense</a>: The safest spot to stand during the Ridley battle? Directly under Ridley. By doing so you avoid his <a class="twikilink" href="/pmwiki/pmwiki.php/Main/BewareMyStingerTail" title="/pmwiki/pmwiki.php/Main/BewareMyStingerTail">tail</a> behind him and the <a class="twikilink" href="/pmwiki/pmwiki.php/Main/Fireballs" title="/pmwiki/pmwiki.php/Main/Fireballs">fireballs</a> he spits in front of him.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/YankTheDogsChain" title="/pmwiki/pmwiki.php/Main/YankTheDogsChain">Yank the Dog's Chain</a>: After <span class="spoiler" title="you can set spoilers visible by default on your profile">losing her Power Suit</span>, Samus spots a Chozo Statue carrying Power Bombs in another room. Just before she reaches them, though, the Power Bombs are stolen by a Space Pirate, and you don't get to catch up to him and unlock them until a while later.</li><li> <a class="twikilink" href="/pmwiki/pmwiki.php/Main/YouHaveResearchedBreathing" title="/pmwiki/pmwiki.php/Main/YouHaveResearchedBreathing">You Have Researched Breathing</a>:<ul><li> Once again, Samus needs an upgrade just to shoot more than a few feet in front of her. The need for a Morph Ball to crawl through small spaces is simply because Samus' suit is too bulky, which wasn't clearly shown in the original NES games sprites. Here it is clearly shown, especially as Samus can crawl when out of armor.</li><li> The Power Grip is an upgrade, despite the fact in <em>Fusion</em> it's just something Samus can do (and in general seems to be something that would rely on the user's physical ability more than a component of their <a class="twikilink" href="/pmwiki/pmwiki.php/Main/PoweredArmor" title="/pmwiki/pmwiki.php/Main/PoweredArmor">Powered Armor</a>; of course, the item serves as a <a class="twikilink" href="/pmwiki/pmwiki.php/Main/HandWave" title="/pmwiki/pmwiki.php/Main/HandWave">Hand Wave</a> regarding how Samus can grab ledges despite doing it one-handed due to the <a class="twikilink" href="/pmwiki/pmwiki.php/Main/ArmCannon" title="/pmwiki/pmwiki.php/Main/ArmCannon">Arm Cannon</a>).</li></ul></li></ul><p></p><hr>
</div>
<div class="lazy-video-script">
<a id="VideoExamples"></a>
<div> </div>
<div class="video-examples has-thumbnails">
<div class="video-examples-header">
<a href="#feedback" class="font-s float-right text-blue" data-modal-target="login">Feedback</a>
<h3 class="bold">Video Example(s):</h3>
</div>
<div class="video-examples-featured">
<a href="#video-link" data-video-id="8ccxl2" data-video-descrip="Mother Brain's defeat causes the Space Pirates' hideout to detonate, forcing Samus to escape." data-video-title="Mother Brain" data-video-url="https://player.vimeo.com/external/459805046.sd.mp4?s=fb9a4458eedc3e2c70b2598d2c0984166cd1f1b4&profile_id=139&oauth2_token_id=1043337761" data-video-thumbnail="https://i.vimeocdn.com/video/960606111_640x360.jpg?r=pad" data-video-trope="Main/LoadBearingBoss" data-video-tropename="Load-Bearing Boss" data-video-approval="APPROVED" data-video-troper-rating="" data-video-average-rating="5.00" data-video-rating-count="1" data-video-media-sources="VideoGame/MetroidZeroMission" class="video-launch-link video-overlay-link featured-widget-vid">
<div class="featured-widget-vid-iframe">
<video id='featured-video-player' class='video-js vjs-default-skin vjs-16-9' controls data-setup='{"ga": {"eventsToTrack": ["error"]}}'>
</video>
</div>
</a>
<h2 class="bold font-l">Mother Brain</h2>
<p class="_pmvv-vidbox-descTxt">
Mother Brain's defeat causes the Space Pirates' hideout to detonate, forcing Samus to escape. </p>
<p class='example_row'>Example of:<br><a href="/pmwiki/pmwiki.php/Main/LoadBearingBoss" class='trope-example-link'>Load-Bearing Boss</a></p>
</div>
</div>
</div>
<div class="square_ad footer-article-ad main_2" data-isolated="0"></div>
<div class="section-links" itemscope itemtype="http://schema.org/SiteNavigationElement">
<div class="titles">
<div><h3 class="text-center text-uppercase">Previous</h3></div>
<div><h3 class="text-center text-uppercase">Index</h3></div>
<div><h3 class="text-center text-uppercase">Next</h3></div>
</div>
<div class="links">
<ul>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MetroidFusion">Metroid Fusion</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/UsefulNotes/TheSixthGenerationOfConsoleVideoGames">UsefulNotes/The Sixth Generation of Console Video Games</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MortalKombatDeadlyAlliance">Mortal Kombat: Deadly Alliance</a>
</li>
</ul>
<ul>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/Metroid1">Metroid</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/Franchise/Metroid">Franchise/Metroid</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MetroidIIReturnOfSamus">Metroid II: Return of Samus</a>
</li>
</ul>
<ul>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/Metroid1">Metroid</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/Main/ScienceFictionVideoGames">Science Fiction Video Games</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MetroidIIReturnOfSamus">Metroid II: Return of Samus</a>
</li>
</ul>
<ul>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MetroidFusion">Metroid Fusion</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/Main/EveryoneRating">Everyone Rating</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a>
</li>
</ul>
<ul>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MetroidSamusReturns">Metroid: Samus Returns</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/UsefulNotes/PanEuropeanGameInformation">UsefulNotes/Pan European Game Information</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/SuperMetroid">Super Metroid</a>
</li>
</ul>
<ul>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MetroidFusion">Metroid Fusion</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/UsefulNotes/GameBoyAdvance">UsefulNotes/Game Boy Advance</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/VideoGame/MonsterForce">Monster Force</a>
</li>
</ul>
<ul>
<li>
<a href="/pmwiki/pmwiki.php/Main/ToxicPhlebotinum">Toxic Phlebotinum</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/ImageSource/VideoGamesMToZ">ImageSource/Video Games (M to Z)</a>
</li>
<li>
<a href="/pmwiki/pmwiki.php/Heartwarming/VideoGames">Video Games</a>
</li>
</ul>
</div>
</div>
</article>
<div id="main-content-sidebar"><div class="sidebar-item display-options">
<ul class="sidebar display-toggles">
<li>Show Spoilers <div id="sidebar-toggle-showspoilers" class="display-toggle show-spoilers"></div></li>
<li>Night Vision <div id="sidebar-toggle-nightvision" class="display-toggle night-vision"></div></li>
<li>Sticky Header <div id="sidebar-toggle-stickyheader" class="display-toggle sticky-header"></div></li>
<li>Wide Load <div id="sidebar-toggle-wideload" class="display-toggle wide-load"></div></li>
</ul>
<script>updateDesktopPrefs();</script>
</div>
<div class="sidebar-item ad sb-ad-unit">
<div class='proper-ad-unit '>
<div id='proper-ad-tvtropes_ad_2'> <script>propertag.cmd.push(function() { proper_display('tvtropes_ad_2'); });</script> </div>
</div></div>
<div class="sidebar-item quick-links" itemtype="http://schema.org/SiteNavigationElement">
<p class="sidebar-item-title" data-title="Important Links">Important Links</p>
<div class="padded">
<a href="/pmwiki/query.php?type=att">Ask The Tropers</a>
<a href="/pmwiki/query.php?type=tf">Trope Finder</a>
<a href="/pmwiki/query.php?type=ykts">You Know That Show...</a>
<a href="/pmwiki/tlp_activity.php">Trope Launch Pad</a>
<a href="/pmwiki/review_activity.php">Reviews</a>
<a href="/pmwiki/lbs.php" data-modal-target="login">Live Blogs</a>
<a href="/pmwiki/ad-free-subscribe.php">Go Ad Free!</a> </div>
</div>
<div class="sidebar-item sb-ad-unit">
<div class="sidebar-section">
<div class="square_ad ad-size-300x600 ad-section text-center">
<div class='proper-ad-unit '>
<div id='proper-ad-tvtropes_ad_3'> <script>propertag.cmd.push(function() { proper_display('tvtropes_ad_3'); });</script> </div>
</div> </div>
</div>
</div>
<div class="sidebar-item">
<p class="sidebar-item-title" data-title="Crucial Browsing">Crucial Browsing</p>
<ul class="padded font-s" itemscope itemtype="http://schema.org/SiteNavigationElement">
<li><a href="javascript:void(0);" data-click-toggle="active">Genre</a>
<ul>
<li><a href='/pmwiki/pmwiki.php/Main/ActionAdventureTropes' title='Main/ActionAdventureTropes'>Action Adventure</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/ComedyTropes' title='Main/ComedyTropes'>Comedy</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/CommercialsTropes' title='Main/CommercialsTropes'>Commercials</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/CrimeAndPunishmentTropes' title='Main/CrimeAndPunishmentTropes'>Crime & Punishment</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/DramaTropes' title='Main/DramaTropes'>Drama</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/HorrorTropes' title='Main/HorrorTropes'>Horror</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/LoveTropes' title='Main/LoveTropes'>Love</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/NewsTropes' title='Main/NewsTropes'>News</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/ProfessionalWrestling' title='Main/ProfessionalWrestling'>Professional Wrestling</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/SpeculativeFictionTropes' title='Main/SpeculativeFictionTropes'>Speculative Fiction</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/SportsStoryTropes' title='Main/SportsStoryTropes'>Sports Story</a></li>
<li><a href='/pmwiki/pmwiki.php/Main/WarTropes' title='Main/WarTropes'>War</a></li>
</ul>
</li>
<li><a href="javascript:void(0);" data-click-toggle="active">Media</a>
<ul>
<li><a href="/pmwiki/pmwiki.php/Main/Media" title="Main/Media">All Media</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/AnimationTropes" title="Main/AnimationTropes">Animation (Western)</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Anime" title="Main/Anime">Anime</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/ComicBookTropes" title="Main/ComicBookTropes">Comic Book</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/FanFic" title="FanFic/FanFics">Fan Fics</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Film" title="Main/Film">Film</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/GameTropes" title="Main/GameTropes">Game</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Literature" title="Main/Literature">Literature</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/MusicAndSoundEffects" title="Main/MusicAndSoundEffects">Music And Sound Effects</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/NewMediaTropes" title="Main/NewMediaTropes">New Media</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/PrintMediaTropes" title="Main/PrintMediaTropes">Print Media</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Radio" title="Main/Radio">Radio</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/SequentialArt" title="Main/SequentialArt">Sequential Art</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/TabletopGames" title="Main/TabletopGames">Tabletop Games</a></li>
<li><a href="/pmwiki/pmwiki.php/UsefulNotes/Television" title="Main/Television">Television</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Theater" title="Main/Theater">Theater</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/VideogameTropes" title="Main/VideogameTropes">Videogame</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Webcomics" title="Main/Webcomics">Webcomics</a></li>
</ul>
</li>
<li><a href="javascript:void(0);" data-click-toggle="active">Narrative</a>
<ul>
<li><a href="/pmwiki/pmwiki.php/Main/UniversalTropes" title="Main/UniversalTropes">Universal</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/AppliedPhlebotinum" title="Main/AppliedPhlebotinum">Applied Phlebotinum</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/CharacterizationTropes" title="Main/CharacterizationTropes">Characterization</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Characters" title="Main/Characters">Characters</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/CharactersAsDevice" title="Main/CharactersAsDevice">Characters As Device</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Dialogue" title="Main/Dialogue">Dialogue</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Motifs" title="Main/Motifs">Motifs</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/NarrativeDevices" title="Main/NarrativeDevices">Narrative Devices</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Paratext" title="Main/Paratext">Paratext</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Plots" title="Main/Plots">Plots</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Settings" title="Main/Settings">Settings</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Spectacle" title="Main/Spectacle">Spectacle</a></li>
</ul>
</li>
<li><a href="javascript:void(0);" data-click-toggle="active">Other Categories</a>
<ul>
<li><a href="/pmwiki/pmwiki.php/Main/BritishTellyTropes" title="Main/BritishTellyTropes">British Telly</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/TheContributors" title="Main/TheContributors">The Contributors</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/CreatorSpeak" title="Main/CreatorSpeak">Creator Speak</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Creators" title="Main/Creators">Creators</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/DerivativeWorks" title="Main/DerivativeWorks">Derivative Works</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/LanguageTropes" title="Main/LanguageTropes">Language</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/LawsAndFormulas" title="Main/LawsAndFormulas">Laws And Formulas</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/ShowBusiness" title="Main/ShowBusiness">Show Business</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/SplitPersonalityTropes" title="Main/SplitPersonalityTropes">Split Personality</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/StockRoom" title="Main/StockRoom">Stock Room</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/TropeTropes" title="Main/TropeTropes">Trope</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/Tropes" title="Main/Tropes">Tropes</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/TruthAndLies" title="Main/TruthAndLies">Truth And Lies</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/TruthInTelevision" title="Main/TruthInTelevision">Truth In Television</a></li>
</ul>
</li>
<li><a href="javascript:void(0);" data-click-toggle="active">Topical Tropes</a>
<ul>
<li><a href="/pmwiki/pmwiki.php/Main/BetrayalTropes" title="Main/BetrayalTropes">Betrayal</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/CensorshipTropes" title="Main/CensorshipTropes">Censorship</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/CombatTropes" title="Main/CombatTropes">Combat</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/DeathTropes" title="Main/DeathTropes">Death</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/FamilyTropes" title="Main/FamilyTropes">Family</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/FateAndProphecyTropes" title="Main/FateAndProphecyTropes">Fate And Prophecy</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/FoodTropes" title="Main/FoodTropes">Food</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/HolidayTropes" title="Main/HolidayTropes">Holiday</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/MemoryTropes" title="Main/MemoryTropes">Memory</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/MoneyTropes" title="Main/MoneyTropes">Money</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/MoralityTropes" title="Main/MoralityTropes">Morality</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/PoliticsTropes" title="Main/PoliticsTropes">Politics</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/ReligionTropes" title="Main/ReligionTropes">Religion</a></li>
<li><a href="/pmwiki/pmwiki.php/Main/SchoolTropes" title="Main/SchoolTropes">School</a></li>
</ul>
</li>
</ul>
</div>
<div class="sidebar-item showcase">
<p class="sidebar-item-title" data-title="Community Showcase">Community Showcase <a href="/pmwiki/showcase.php" class="bubble float-right hover-blue">More</a></p>
<p class="community-showcase">
<a href="https://sharetv.com/shows/echo_chamber" target="_blank" onclick="trackOutboundLink('https://sharetv.com/shows/echo_chamber');">
<img data-src="/images/communityShowcase-echochamber.jpg" class="lazy-image" alt=""></a>
<a href="/pmwiki/pmwiki.php/Webcomic/TwistedTropes">
<img data-src="/img/howlandsc-side.jpg" class="lazy-image" alt=""></a>
</p>
</div>
<div id="stick-cont" class="sidebar-item sb-ad-unit">
<div id="stick-bar" class="sidebar-section">
<div class="square_ad ad-size-300x600 ad-section text-center">
<div class='proper-ad-unit '>
<div id='proper-ad-tvtropes_ad_4'> <script>propertag.cmd.push(function() { proper_display('tvtropes_ad_4'); });</script> </div>
</div> </div>
</div>
</div>
</div>
</div>
<div id="action-bar-bottom" class="action-bar tablet-off">
<a href="#top-of-page" class="scroll-to-top dead-button" onclick="$('html, body').animate({scrollTop : 0},500);">Top</a>
</div>
</div>
<div class='proper-ad-unit ad-sticky'>
<div id='proper-ad-tvtropes_sticky_ad'> <script>propertag.cmd.push(function() { proper_display('tvtropes_sticky_ad'); });</script> </div>
</div>
<footer id="main-footer">
<div id="main-footer-inner">
<div class="footer-left">
<a href="/" class="img-link"><img data-src="/img/tvtropes-footer-logo.png" alt="TV Tropes" class="lazy-image" title="TV Tropes" /></a>
<form action="index.html" id="cse-search-box-mobile" class="navbar-form newsletter-signup validate modal-replies" name="" role="" data-ajax-get="/ajax/subscribe_email.php">
<button class="btn-submit newsletter-signup-submit-button" type="submit" id="subscribe-btn"><i class="fa fa-paper-plane"></i></button>
<input id="subscription-email" type="text" class="form-control" name="q" size="31" placeholder="Subscribe" value="" validate-type="email">
</form>
<ul class="social-buttons">
<li><a class="btn fb" target="_blank" onclick="_gaq.push(['_trackEvent', 'btn-social-icon', 'click', 'btn-facebook']);" href="https://www.facebook.com/tvtropes"><i class="fa fa-facebook"></i></a></li>
<li><a class="btn tw" target="_blank" onclick="_gaq.push(['_trackEvent', 'btn-social-icon', 'click', 'btn-twitter']);" href="https://www.twitter.com/tvtropes"><i class="fa fa-twitter"></i></a> </li>
<li><a class="btn rd" target="_blank" onclick="_gaq.push(['_trackEvent', 'btn-social-icon', 'click', 'btn-reddit']);" href="https://www.reddit.com/r/tvtropes"><i class="fa fa-reddit-alien"></i></a></li>
</ul>
</div>
<hr />
<ul class="footer-menu" itemscope itemtype="http://schema.org/SiteNavigationElement">
<li><h4 class="footer-menu-header">TVTropes</h4></li>
<li><a href="/pmwiki/pmwiki.php/Main/Administrivia">About TVTropes</a></li>
<li><a href="/pmwiki/pmwiki.php/Administrivia/TheGoalsOfTVTropes">TVTropes Goals</a></li>
<li><a href="/pmwiki/pmwiki.php/Administrivia/TheTropingCode">Troping Code</a></li>
<li><a href="/pmwiki/pmwiki.php/Administrivia/TVTropesCustoms">TVTropes Customs</a></li>
<li><a href="/pmwiki/pmwiki.php/JustForFun/TropesOfLegend">Tropes of Legend</a></li>
<li><a href="/pmwiki/ad-free-subscribe.php">Go Ad-Free</a></li>
</ul>
<hr />
<ul class="footer-menu" itemscope itemtype="http://schema.org/SiteNavigationElement">
<li><h4 class="footer-menu-header">Community</h4></li>
<li><a href="/pmwiki/query.php?type=att">Ask The Tropers</a></li>
<li><a href="/pmwiki/tlp_activity.php">Trope Launch Pad</a></li>
<li><a href="/pmwiki/query.php?type=tf">Trope Finder</a></li>
<li><a href="/pmwiki/query.php?type=ykts">You Know That Show</a></li>
<li><a href="/pmwiki/lbs.php" data-modal-target="login">Live Blogs</a></li>
<li><a href="/pmwiki/review_activity.php">Reviews</a></li>
<li><a href="/pmwiki/topics.php">Forum</a></li>
</ul>
<hr />
<ul class="footer-menu" itemscope itemtype="http://schema.org/SiteNavigationElement">
<li><h4 class="footer-menu-header">Tropes HQ</h4></li>
<li><a href="/pmwiki/about.php">About Us</a></li>
<li><a href="/pmwiki/contact.php">Contact Us</a></li>
<li><a href="/pmwiki/dmca.php">DMCA Notice</a></li>
<li><a href="/pmwiki/privacypolicy.php">Privacy Policy</a></li>
</ul>
</div>
<div id="desktop-on-mobile-toggle" class="text-center gutter-top gutter-bottom tablet-on">
<a href="/pmwiki/switchDeviceCss.php?mobileVersion=1" rel="nofollow">Switch to <span class="txt-desktop">Desktop</span><span class="txt-mobile">Mobile</span> Version</a>
</div>
<div class="legal">
<p>TVTropes is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. <br>Permissions beyond the scope of this license may be available from <a xmlns:cc="http://creativecommons.org/ns#" href="mailto:thestaff@tvtropes.org" rel="cc:morePermissions"> thestaff@tvtropes.org</a>.</p>
<br>
<div class="privacy_wrapper">
</div>
</div>
</footer>
<style>
div.fc-ccpa-root {
position: absolute !important;
bottom: 93px !important;
margin: auto !important;
width: 100% !important;
z-index: 9999 !important;
}
.fc-ccpa-root .fc-dns-dialog .fc-dns-link p{
outline: none !important;
text-decoration: underline !important;
font-size: .7em !important;
font-family: sans-serif !important;
}
.fc-ccpa-root .fc-dns-dialog .fc-dns-link .fc-button-background {
background: none !important;
}
</style>
<div id="_pm_videoViewer" class="full-screen">
<a href="#close" class="close" id="_pm_videoViewer-close"></a>
<div class="_pmvv-body">
<div class="_pmvv-vidbox">
<video id='overlay-video-player-box' data-video-id="8ccxl2" class='video-js vjs-default-skin vjs-16-9'>
</video>
<div class="_pmvv-vidbox-desc">
<h1 id="overlay-title">Mother Brain</h1>
<p id="overlay-descrip" class="_pmvv-vidbox-descTxt">
Mother Brain's defeat causes the Space Pirates' hideout to detonate, forcing Samus to escape. </p>
<div class="rating-row" data-video-id="8ccxl2">
<input type="hidden" name="is_logged_in" value="0">
<p>How well does it match the trope?</p>
<div id="star-rating-group">
<div class="trope-rate">
<input type="radio" id="lamp5" name="rate" value="5" />
<label for="lamp5" title="Absolutely"></label>
<input type="radio" id="lamp4" name="rate" value="4" />
<label for="lamp4" title="Yes"></label>
<input type="radio" id="lamp3" name="rate" value="3" />
<label for="lamp3" title="Kind of"></label>
<input type="radio" id="lamp2" name="rate" value="2" />
<label for="lamp2" title="Not really"></label>
<input type="radio" id="lamp1" name="rate" value="1" />
<label for="lamp1" title="No"></label>
</div>
<div id="star-rating-total">
5 (1 votes)
</div>
</div>
</div>
<div class="example-media-row">
<div class="example-overlay">
<p>Example of:</p>
<div id="overlay-trope">Main / LoadBearingBoss</div>
</div>
<div class="media-sources-overlay example-overlay">
<p>Media sources:</p>
<div id="overlay-media">Main / LoadBearingBoss</div>
</div>
</div>
<p class="_pmvv-vidbox-stats text-right font-s" style="padding-top:8px; border-top: solid 1px rgba(255,255,255,0.2)">
<a href="#video-feedback" class="float-right" data-modal-target="login">Report</a>
</p>
</div>
</div>
</div>
</div>
<script type='text/javascript'>
window.special_ops = {
member : 'no',
isolated : 0,
tags : ['videogame']
};
</script>
<script type="text/javascript">
var cleanCreativeEnabled = "";
var donation = "";
var live_ads = "1";
var img_domain = "https://static.tvtropes.org";
var snoozed = cookies.read('snoozedabm');
var snoozable = "";
if (adsRemovedWith) {
live_ads = 0;
}
var elem = document.createElement('script');
elem.async = true;
elem.src = '/design/assets/bundle.js?rev=af8ba6c84175c5d092329028e16c8941231c5eba';
elem.onload = function() {
}
document.getElementsByTagName('head')[0].appendChild(elem);
</script>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3821842-1', 'auto');
ga('send', 'pageview');
</script>
<script type="text/javascript">
function send_analytics_event(user_type, donation){
// if(user_type == 'uncached' || user_type == 'cached'){
// ga('send', 'event', 'caching', 'load', user_type, {'nonInteraction': 1});
// return;
// }
var event_name = user_type;
if(donation == 'true'){
event_name += "_donation"
}else if(typeof(valid_user) == 'undefined'){
event_name += "_blocked"
}else if(valid_user == true){
event_name += "_unblocked";
}else{
event_name = "_unknown"
}
ga('send', 'event', 'ads', 'load', event_name, {'nonInteraction': 1});
}
send_analytics_event("guest", "false");
</script>
</body>
</html>
| 122.150442 | 61,430 | 0.726518 |
6a41595197e6e2bd9226a635b85862f07e90b38b | 753 | lua | Lua | Framework/Application.lua | alphafantomu/LoveEngineWorkspace | 8d63744bc1929f2deb072c81475311c603eb2681 | [
"MIT"
] | 3 | 2020-05-10T11:33:20.000Z | 2022-02-15T00:40:22.000Z | Framework/Application.lua | alphafantomu/LoveEngineWorkspace | 8d63744bc1929f2deb072c81475311c603eb2681 | [
"MIT"
] | null | null | null | Framework/Application.lua | alphafantomu/LoveEngineWorkspace | 8d63744bc1929f2deb072c81475311c603eb2681 | [
"MIT"
] | 1 | 2019-11-03T16:48:42.000Z | 2019-11-03T16:48:42.000Z |
local API = {
LoveVersion = love.getVersion();
};
local ImageCache = {};
--I'm not sure if Love2D automatically caches objects, but assuming that the wiki said loading an image continously can cause fps drops, I guess not.
API.loadImage = function(self, path) --if the image changes then it will not return the same image
if (ImageCache[path] == nil) then
local Image = love.graphics.newImage(path);
ImageCache[path] = Image;
return Image;
end;
return ImageCache[path];
end;
API.reloadImage = function(self, path)
local Image = love.graphics.newImage(path);
ImageCache[path] = Image;
return Image;
end;
API.getCacheImage = function(self, path)
return ImageCache[path];
end;
Application = API; | 27.888889 | 149 | 0.693227 |
b2c10ffac29f7bdf64553c51d96d725e726e49a1 | 3,114 | py | Python | rpesk/morse_code.py | LukeJVinton/pi-projects | 9dfa110bb027b0fb281e3dca831f1547bc15faa5 | [
"MIT"
] | null | null | null | rpesk/morse_code.py | LukeJVinton/pi-projects | 9dfa110bb027b0fb281e3dca831f1547bc15faa5 | [
"MIT"
] | null | null | null | rpesk/morse_code.py | LukeJVinton/pi-projects | 9dfa110bb027b0fb281e3dca831f1547bc15faa5 | [
"MIT"
] | null | null | null |
# 02_blink_twice.py
# From the code for the Electronics Starter Kit for the Raspberry Pi by MonkMakes.com
import RPi.GPIO as GPIO
import time
def word_separation(pin):
sleep_time = 7
GPIO.output(pin, False) # True means that LED turns on
time.sleep(sleep_time)
def pulse(pin, length = "dot"):
pulse_time = 0
sleep_time = 1
if length == "dash":
pulse_time = 3
elif length == "dot":
pulse_time = 1
elif length == "stop":
sleep_time = 3
if length != 'stop':
GPIO.output(pin, True) # True means that LED turns on
time.sleep(pulse_time) # delay 0.5 seconds
GPIO.output(pin, False) # True means that LED turns on
time.sleep(sleep_time)
def get_morse_dictionary(letter):
morse_dict = {'a':['dot','dash','stop'],
'b':['dash','dot','dot','dot','stop'],
'c':['dash','dot','dash','dot','stop'],
'd':['dash','dot','dot','stop'],
'e':['dot','stop'],
'f':['dot','dot','dash','dot','stop'],
'g':['dash','dash','dot','stop'],
'h':['dot','dot','dot','dot','stop'],
'i':['dot','dot','stop'],
'j':['dot','dash','dash','dash','stop'],
'k':['dash','dot','dash','stop'],
'l':['dot','dash','dot','dot','stop'],
'm':['dash','dash','stop'],
'n':['dash','dot','stop'],
'o':['dash','dash','dash','stop'],
'p':['dot','dash','dash','dot','stop'],
'q':['dash','dash','dot','dash','stop'],
'r':['dot','dash','dot','stop'],
's':['dot','dot','dot','stop'],
't':['dash','stop'],
'u':['dot','dot','dash','stop'],
'v':['dot','dot','dot','dash','stop'],
'w':['dot','dash','dash','stop'],
'x':['dash','dot','dot','dash','stop'],
'y':['dash','dot','dash','dash','stop'],
'z':['dash','dash','dot','dot','stop'],
}
return morse_dict[letter]
def pulse_letter(letter, pin):
if letter == ' ':
word_separation(pin)
else:
pulse_list = get_morse_dictionary(letter)
for beep in pulse_list:
print(beep)
pulse(pin, beep)
# Configure the Pi to use the BCM (Broadcom) pin names, rather than the pin positions
GPIO.setmode(GPIO.BCM)
red_pin1 = 18
GPIO.setup(red_pin1, GPIO.OUT)
try:
words = input('Enter a word: ')
for letter in words:
pulse_letter(letter, red_pin1)
finally:
print("Cleaning up")
GPIO.cleanup()
# You could get rid of the try: finally: code and just have the while loop
# and its contents. However, the try: finally: construct makes sure that
# when you CTRL-c the program to end it, all the pins are set back to
# being inputs. This helps protect your Pi from accidental shorts-circuits
# if something metal touches the GPIO pins.
| 33.483871 | 85 | 0.495825 |