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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cdb753dcb80d3944ed5fc268afb6b7d497ac5ce1 | 3,816 | rs | Rust | src/window.rs | Jezza/tmux-interface-rs | af6b156088dba52163ee3909134fe1968b48f2b8 | [
"MIT"
] | null | null | null | src/window.rs | Jezza/tmux-interface-rs | af6b156088dba52163ee3909134fe1968b48f2b8 | [
"MIT"
] | null | null | null | src/window.rs | Jezza/tmux-interface-rs | af6b156088dba52163ee3909134fe1968b48f2b8 | [
"MIT"
] | null | null | null | use std::time::Duration;
use crate::TmuxInterfaceError;
pub const WINDOW_VARS_SEPARATOR: &str = "'";
// XXX: mb make all fields optional
// FIXME: regex name can be anything, and other keys should be checked better
pub const WINDOW_VARS_REGEX_VEC: [&str; 24] = [
"window_activity",
"window_activity_flag",
"window_active",
"window_bell_flag",
"window_bigger",
"window_end_flag",
"window_flags",
"window_format",
"window_height",
"window_id",
"window_index",
"window_last_flag",
"window_layout",
"window_linked",
"window_name",
"window_offset_x",
"window_offset_y",
"window_panes",
"window_silence_flag",
"window_stack_index",
"window_start_flag",
"window_visible_layout",
"window_width",
"window_zoomed_flag",
];
// accordingly to tmux.h: Formats
// XXX: check all types
#[derive(Default, Clone, Debug)]
pub struct Window {
pub activity: Option<Duration>,
pub activity_flag: Option<bool>,
pub active: Option<bool>,
pub bell_flag: Option<bool>,
pub bigger: Option<String>,
pub end_flag: Option<bool>,
pub flags: Option<String>,
pub format: Option<String>,
pub height: Option<usize>,
pub id: Option<usize>,
pub index: Option<usize>,
pub last_flag: Option<usize>,
pub layout: Option<String>,
pub linked: Option<usize>,
pub name: Option<String>,
pub offset_x: Option<String>,
pub offset_y: Option<String>,
pub panes: Option<usize>,
pub silence_flag: Option<usize>,
pub stack_index: Option<usize>,
pub start_flag: Option<usize>,
pub visible_layout: Option<String>,
pub width: Option<usize>,
pub zoomed_flag: Option<usize>
}
impl Window {
pub fn new() -> Self {
Default::default()
}
// XXX: mb deserialize like serde something?
pub fn parse(window_str: &str) -> Result<Window, TmuxInterfaceError> {
let wv: Vec<&str> = window_str.split(WINDOW_VARS_SEPARATOR).collect();
let mut w = Window::new();
// XXX: optimize?
if !wv[0].is_empty() { w.activity = wv[0].parse().ok().map(Duration::from_millis); }
if !wv[1].is_empty() { w.activity_flag = wv[1].parse::<usize>().map(|i| i == 0).ok(); }
if !wv[2].is_empty() { w.active = wv[2].parse::<usize>().map(|i| i == 1).ok(); }
if !wv[3].is_empty() { w.bell_flag = wv[3].parse::<usize>().map(|i| i == 1).ok(); }
if !wv[4].is_empty() { w.bigger = wv[4].parse().ok(); }
if !wv[5].is_empty() { w.end_flag = wv[5].parse::<usize>().map(|i| i == 1).ok(); }
if !wv[6].is_empty() { w.flags = wv[6].parse().ok(); }
if !wv[7].is_empty() { w.format = wv[7].parse().ok(); }
if !wv[8].is_empty() { w.height = wv[8].parse().ok(); }
if !wv[9].is_empty() { w.id = wv[9][1..].parse().ok(); }
if !wv[10].is_empty() { w.index = wv[10].parse().ok(); }
if !wv[11].is_empty() { w.last_flag = wv[11].parse().ok(); }
if !wv[12].is_empty() { w.layout = wv[12].parse().ok(); }
if !wv[13].is_empty() { w.linked = wv[13].parse().ok(); }
if !wv[14].is_empty() { w.name = wv[14].parse().ok(); }
if !wv[15].is_empty() { w.offset_x = wv[15].parse().ok(); }
if !wv[16].is_empty() { w.offset_y = wv[16].parse().ok(); }
if !wv[17].is_empty() { w.panes = wv[17].parse().ok(); }
if !wv[18].is_empty() { w.silence_flag = wv[18].parse().ok(); }
if !wv[19].is_empty() { w.stack_index = wv[19].parse().ok(); }
if !wv[20].is_empty() { w.start_flag = wv[20].parse().ok(); }
if !wv[21].is_empty() { w.visible_layout = wv[21].parse().ok(); }
if !wv[22].is_empty() { w.width = wv[22].parse().ok(); }
if !wv[23].is_empty() { w.zoomed_flag = wv[23].parse().ok(); }
Ok(w)
}
}
| 35.663551 | 95 | 0.579927 |
f42f0f7f2567693d022d056741d250295fda758c | 751 | asm | Assembly | hangout/byte-example.asm | netguy204/cmsc313_examples | 9c4806c5643b414d0bc7bc0e6cd175fd7342453f | [
"Unlicense"
] | 1 | 2021-07-08T01:34:43.000Z | 2021-07-08T01:34:43.000Z | hangout/byte-example.asm | netguy204/cmsc313_examples | 9c4806c5643b414d0bc7bc0e6cd175fd7342453f | [
"Unlicense"
] | null | null | null | hangout/byte-example.asm | netguy204/cmsc313_examples | 9c4806c5643b414d0bc7bc0e6cd175fd7342453f | [
"Unlicense"
] | 8 | 2016-07-25T14:30:46.000Z | 2021-12-04T07:54:27.000Z | [SECTION .data]
;;; Here we declare initialized data. For example: messages, prompts,
;;; and numbers that we know in advance
array: db 2, 3, 4, 5, 6
[SECTION .bss]
;;; Here we declare uninitialized data. We're reserving space (and
;;; potentially associating names with that space) that our code
;;; will use as it executes. Think of these as "global variables"
[SECTION .text]
;;; This is where our program lives.
global _start ; make start global so ld can find it
_start: ; the program actually starts here
;; call sys_exit to finish things off
mov eax, 1 ; sys_exit syscall
mov ebx, 0 ; no error
int 80H ; kernel interrupt
| 32.652174 | 69 | 0.61518 |
84df794770bc7aa3f4cfcfd3bc24d914d5af03fb | 2,196 | c | C | src/gs-entbase/server/env_shake.c | keilaoko/nuclide | d2e55dfa0f53546754e63e1dd65f7cce4d3144db | [
"ISC"
] | null | null | null | src/gs-entbase/server/env_shake.c | keilaoko/nuclide | d2e55dfa0f53546754e63e1dd65f7cce4d3144db | [
"ISC"
] | null | null | null | src/gs-entbase/server/env_shake.c | keilaoko/nuclide | d2e55dfa0f53546754e63e1dd65f7cce4d3144db | [
"ISC"
] | null | null | null | /*
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*QUAKED env_shake (1 0.5 0) (-8 -8 -8) (8 8 8) EVS_GLOBAL
Causes an earthquake/shaking effect when triggered.
-------- KEYS --------
"targetname" : Name
"target" : Target when triggered.
"killtarget" : Target to kill when triggered.
"radius" : Radius of the quake/shake effect.
"amplitude" : Amplitude of the effect.
"duration" : Duration of the effect in seconds.
"frequency" : The frequency of the shake.
-------- SPAWNFLAGS --------
EVS_GLOBAL : Affect all clients, ignoring "radius" entirely.
-------- TRIVIA --------
This entity was introduced in Half-Life (1998).
*/
#define EVS_GLOBAL 1
class env_shake:NSPointTrigger
{
float m_flRadius;
float m_flAmplitude;
float m_flDuration;
float m_flFrequency;
void(void) env_shake;
virtual void(entity act, int) Trigger;
virtual void(string, string) SpawnKey;
};
void
env_shake::Trigger(entity act, int state)
{
Client_ShakeOnce(origin, m_flRadius, m_flDuration, m_flFrequency, m_flAmplitude);
}
void
env_shake::SpawnKey(string strKey, string strValue)
{
switch (strKey) {
case "radius":
m_flRadius = stof(strValue);
break;
case "amplitude":
m_flAmplitude = stof(strValue);
break;
case "duration":
m_flDuration = stof(strValue);
break;
case "frequency":
m_flFrequency = stof(strValue);
break;
default:
super::SpawnKey(strKey, strValue);
}
}
void
env_shake::env_shake(void)
{
super::NSPointTrigger();
}
| 26.780488 | 82 | 0.729053 |
4c395db385a1586a317537fbb33084b943ba96ba | 20,105 | php | PHP | resources/views/common/template.blade.php | sanbangarh309/Ueibi | 1ae141fc12c368740108eda6b568e2a1cf5bde1d | [
"MIT"
] | null | null | null | resources/views/common/template.blade.php | sanbangarh309/Ueibi | 1ae141fc12c368740108eda6b568e2a1cf5bde1d | [
"MIT"
] | 1 | 2021-10-05T21:22:51.000Z | 2021-10-05T21:22:51.000Z | resources/views/common/template.blade.php | sanbangarh309/Ueibi | 1ae141fc12c368740108eda6b568e2a1cf5bde1d | [
"MIT"
] | null | null | null | @extends('app')
@section('css')
<link rel="stylesheet" href="/css/card.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.10/css/select2.min.css" />
<style>
.save_row i {
font-size: 30px;
color: black;
}
textarea {
width: 106px;
}
</style>
@stop
@section('content')
<div id="chartContainer" style="height: 370px;width:100%;margin: 0 0 25px;"></div>
<div class="row">
<div class="col-md-6">
<div class="colmn_1 white_bg boxside">
<div class="bg_box">
<ul>
<li class="heading_list"><div class="row"><div class="col-md-3 text-left">Activities</div><div class="col-md-6"></div><div class="col-md-3 text-right"><i class="fa fa-refresh" aria-hidden="true"></i><i class="fa fa-chevron-down"></i><i class="fa fa-times" aria-hidden="true"></i></div></div></li>
</ul>
<div class="position">
<div class="inactive">
<h2>12</h2>
<p class="inred">Inactive</p>
</div>
<div class="inactive">
<h2>12</h2>
<p class='oreassined'>Re-assigned</p>
</div>
<div class="inactive">
<h2>12</h2>
<p class="bposition">postpond</p>
</div>
</div>
<hr class="line">
<div class="actively">
<div class="usershow">
<div class="activeuserimg">
<img src="img/client.jpg" alt="#">
</div>
<div class="activeuserdata">
<h2>Jony Diss</h2>
<p><span class="greenuser"></span>Active (95 mins ago)</p>
</div>
</div>
<div class="usershow">
<div class="activeuserimg">
<img src="img/client.jpg" alt="#">
</div>
<div class="activeuserdata">
<h2>Jony Diss</h2>
<p><span class="greenuser"></span>Active (95 mins ago)</p>
</div>
</div>
</div>
<hr class="line">
<div class="actively">
<div class="usershow">
<div class="activeuserimg">
<img src="img/client.jpg" alt="#">
</div>
<div class="activeuserdata">
<h2>Jony Diss</h2>
<p><span class="greenuser"></span>Active (95 mins ago)</p>
</div>
</div>
<div class="usershow">
<div class="activeuserimg">
<img src="img/client.jpg" alt="#">
</div>
<div class="activeuserdata">
<h2>Jony Diss</h2>
<p><span class="greenuser"></span>Active (95 mins ago)</p>
</div>
</div>
</div>
<hr class="line">
<div class="actively">
<div class="usershow">
<div class="activeuserimg">
<img src="img/client.jpg" alt="#">
</div>
<div class="activeuserdata">
<h2>Jony Diss</h2>
<p><span class="greenuser"></span>Active (95 mins ago)</p>
</div>
</div>
<div class="usershow">
<div class="activeuserimg">
<img src="img/client.jpg" alt="#">
</div>
<div class="activeuserdata">
<h2>Jony Diss</h2>
<p><span class="greenuser"></span>Active (95 mins ago)</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="userbox">
<p>User <a href="javascript:void(0);"><i class="fa fa-sort" aria-hidden="true"></i></a></p>
<hr class="line">
<div class="clientname">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:70%">
</div>
</div>
</div>
<div class="clientname">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:20%">
</div>
</div>
</div>
<div class="clientname">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:75%">
</div>
</div>
</div>
<div class="clientname">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:30%">
</div>
</div>
</div>
<div class="clientname">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:40%">
</div>
</div>
</div>
<div class="clientname">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:40%">
</div>
</div>
</div>
<div class="clientname">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:40%">
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="userbox">
<p>User <a href="javascript:void(0);"><i class="fa fa-sort" aria-hidden="true"></i></a></p>
<hr class="line">
<div class="clientname seconduser">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:70%">
</div>
</div>
</div>
<div class="clientname seconduser">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:20%">
</div>
</div>
</div>
<div class="clientname seconduser">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:75%">
</div>
</div>
</div>
<div class="clientname seconduser">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:30%">
</div>
</div>
</div>
<div class="clientname seconduser">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:40%">
</div>
</div>
</div>
<div class="clientname seconduser">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:10%">
</div>
</div>
</div>
<div class="clientname seconduser">
<h2>sallu<span>6/7</span></h2>
<div class="progress bar">
<div class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:80%">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="rating">
<h2>Review,Rating & Re-assign</h2>
<div class="scrolltable">
<table class="table custom_table">
<thead class="thead-dark">
<tr>
<th scope="col">Ticket#</th>
<th scope="col">Company name</th>
<th scope="col">Area</th>
<th scope="col">Emp</th>
<th scope="col">Date & Time</th>
<th scope="col">Assigned by</th>
<th scope="col">Assigned To</th>
<th scope="col">Status</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody id="assigned_table_body" class="table_body">
@foreach($assigned_tickets as $asn_ticket)
<tr id ="{{$asn_ticket->id}}" data-status="assigned">
<td>{{$asn_ticket->ticketno}}</td>
<td>{{$asn_ticket->company}}</td>
<td>{{$asn_ticket->area}}</td>
<td>{{$asn_ticket->emp}}</td>
<td>{{$asn_ticket->created_at}}</td>
<td>{{\App\User::find($asn_ticket->assigned_by)->name}}</td>
<td id="select_{{$asn_ticket->id}}" data-id="{{$asn_ticket->id}}" style="display:none"><select class="form-control selectpicker" name="presale_employees"><option>Select Employee</option> @foreach($users as $user)<option value="{{$user->id}}">{{$user->name}}</option> @endforeach </select></td>
<td id="current_{{$asn_ticket->id}}" >{{\App\User::find($asn_ticket->assigned_to)->name}}<a href="javascript:void(0);" data-id="{{$asn_ticket->id}}" class="change_user"><i class="fa fa-pencil" aria-hidden="true" data-id="{{$asn_ticket->id}}"></i></a></td>
<td><span class="wait">{{$asn_ticket->status}}</span></td>
<td><a href="javascript:void(0);" data-id="{{$asn_ticket->id}}" class="save_row"><i class="fa fa-floppy-o" aria-hidden="true"></i></a>
<a data-toggle="collapse" href="#extrabox_{{$asn_ticket->id}}" class="save_row" data-id="{{$asn_ticket->id}}"><i class="fa fa-plus-circle" aria-hidden="true"></i></a>
</td>
</tr>
<tr class="panel-collapse collapse" id="extrabox_{{$asn_ticket->id}}">
<td>{{$asn_ticket->order->address}}</td>
<td>{{$asn_ticket->order->email}}<br>{{$asn_ticket->order->contact}}</td>
<td>Remarks: </td>
<td><input type="text" placeholder="Enter Remark" id="hr_remark_{{$asn_ticket->id}}"></td>
<td>Verification Remarks: </td>
<td><input type="text" placeholder="Enter Remark" id="ver_remark_{{$asn_ticket->id}}"></td>
<td>Remarks: </td>
<td><input type="text" placeholder="Enter Remark" id="remark_{{$asn_ticket->id}}"></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="rating">
<h2>Unassigned Tickets</h2>
<div class="scrolltable">
<table class="table custom_table">
<thead class="thead-dark">
<tr>
<th scope="col">Ticket#</th>
<th scope="col">Company name</th>
<th scope="col">Area</th>
<th scope="col">Emp</th>
<th scope="col">Assigned by</th>
<th scope="col">Assigned To</th>
<th scope="col">Status</th>
<th scope="col">Date & Time</th>
<th scope="col">Date received</th>
<th scope="col">Rating</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody id="table_body" class="table_body">
@foreach($tickets as $ticket)
<tr id ="{{$ticket->id}}" data-status="received">
{{-- {{\App\User::find($ticket->assigned_to)->name}} --}}
<td>{{$ticket->ticketno}}</td>
<td>{{$ticket->company}}</td>
<td>{{$ticket->area}}</td>
<td>{{$ticket->emp}}</td>
<td>{{\App\User::find($ticket->assigned_by)->name}}</td>
<td id="select_{{$ticket->id}}" data-id="{{$ticket->id}}" style="display:none"><select class="form-control selectpicker"><option>Select Employee</option> @foreach($users as $user)<option value="{{$user->id}}">{{$user->name}}</option> @endforeach </select></td>
<td id="current_{{$ticket->id}}" >{{\App\User::find($ticket->assigned_to)->name}}<a href="javascript:void(0);" data-id="{{$ticket->id}}" class="change_user"><i class="fa fa-pencil" aria-hidden="true" data-id="{{$ticket->id}}"></i></a></td>
<td><span class="wait">{{$ticket->status}}</span></td>
<td>{{$ticket->created_at}}</td>
<td>{{$ticket->received_at}}</td>
<td>{{$ticket->rating}}</td>
<td><a href="javascript:void(0);" data-id="{{$ticket->id}}" class="save_row"><i data-id="{{$ticket->id}}" class="fa fa-floppy-o" aria-hidden="true"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@stop
@section('javascript')
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.10/js/select2.min.js"></script>
<script src="/js/canvasjs.min.js"></script>
<script>
$(".selectpicker").select2({
tags: false
});
getOrders();
// let allCalls = San_Helpers.getCalls("{{route('calls.index')}}");
function getOrders(){
axios.get("{{route('orders.published')}}").then((res) => {
let orders = res.data.detail;
let minifyHtml = '';
$.each(orders, function( index, call ) {
minifyHtml = '<tr id="order_'+call.id+'"><td><input type="checkbox" name="check_order" class="check_all_boxes" id="'+call.id+'" id="select_all"></td><td>'+call.orderno+'</td><td>'+call.area+'</td><td>'+call.city+'</td><td>'+call.company+'</td><td>'+call.address+'</td><td>'+call.contact+'</td><td>'+call.email+'</td><td>'+call.industry+'</td><td>'+call.assigned_date+'</td><td>Published</td><td><button><i class="fa fa-pencil" aria-hidden="true"></i></button></td></tr>';
$('#order_body').append(minifyHtml);
});
});
}
$('.table_body').on('click','.change_user',function(e){
e.stopPropagation();
let id = $(e.target).attr('data-id');
let selectField = '<select class="form-control selectpicker" name="presale_employees"><option>Select Pre Sale Employees</option> @foreach($users as $user)<option value="{{$user->id}}">{{$user->name}}</option> @endforeach </select>'
// $(e.target).html(selectField);
$('#current_' + id).hide();
$('#select_' + id).show();
});
$('.table_body').on('click','.save_row',function(e){
let id = $(e.target).attr('data-id');
let remarks = $(e.target.parentElement.parentElement.parentElement).next().find('textarea');
let ticket_status = $(e.target.parentElement.parentElement.parentElement).attr('data-status');
remarks.each(function( index ) {
console.log($( this ).text());
});
return;
let submitData = {ticket_id:id, status:'assigned', employee_id: employee_id};
let employee_id = $('#select_' + id + ' select option:selected').val();
$('#table_body tr#' + id).remove();
console.log(id);console.log(employee_id);
axios.post("{{url('admin/saveRow')}}",submitData).then((response) => {
let rkt = response.data.detail;
let ticket = '<tr id ="'+rkt.id+'"><td>'+rkt.ticketno+'</td><td>'+rkt.company+'</td><td>'+rkt.area+'</td><td>'+rkt.emp+'</td><td>'+rkt.created_at+'</td><td>'+rkt.assigned_by.name+'</td><td id="select_'+rkt.id+'" data-id="'+rkt.id+'" style="display:none"><select class="form-control selectpicker" name="presale_employees"><option>Select Employee</option> @foreach($users as $user)<option value="{{$user->id}}">{{$user->name}}</option> @endforeach </select></td><td id="current_'+rkt.id+'" >'+rkt.assigned_to.name+'<a href="javascript:void(0);" data-id="'+rkt.id+'" class="change_user"><i class="fa fa-pencil" aria-hidden="true" data-id="'+rkt.id+'"></i></a></td><td><span class="wait">'+rkt.status+'</span></td><td><a href="javascript:void(0);" data-id="'+rkt.id+'" class="save_row"><i class="fa fa-floppy-o" aria-hidden="true"></i></a><a data-toggle="collapse" href="#extrabox_'+rkt.id+'" class="save_row" data-id="'+rkt.id+'"><i class="fa fa-plus-circle" aria-hidden="true"></i></a> </td></tr><tr class="panel-collapse collapse" id="extrabox_'+rkt.id+'"><td>'+rkt.id.order.address+'</td><td>'+rkt.id.order.email+'<br>'+rkt.id.order.contact+'</td><td>Remarks:</td><td><input type="text" placeholder="Enter Remark" id="hr_remark_{{$asn_ticket->id}}"></td><td>Verification Remarks:</td><td><input type="text" placeholder="Enter Remark" id="ver_remark_{{$asn_ticket->id}}" /></td><td>Remarks:</td><td><input type="text" placeholder="Enter Remark" id="remark_{{$asn_ticket->id}}" /></td></tr>';
if (ticket_status != 'assigned') {
$('#assigned_table_body').append(ticket);
}
toastr.success(response.data.msg);
});
});
var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
title:{
text: ""
},
axisY :{
includeZero: false,
prefix: "$"
},
toolTip: {
shared: true
},
legend: {
fontSize: 13
},
data: [{
type: "splineArea",
showInLegend: true,
name: "Total Assigned",
yValueFormatString: "$#,##0",
dataPoints: [
{ x: new Date(2016, 2), y: 30000 },
{ x: new Date(2016, 3), y: 35000 },
{ x: new Date(2016, 4), y: 30000 },
{ x: new Date(2016, 5), y: 30400 },
{ x: new Date(2016, 6), y: 20900 },
{ x: new Date(2016, 7), y: 31000 },
{ x: new Date(2016, 8), y: 30200 },
{ x: new Date(2016, 9), y: 30000 },
{ x: new Date(2016, 10), y: 33000 },
{ x: new Date(2016, 11), y: 38000 },
{ x: new Date(2017, 0), y: 38900 },
{ x: new Date(2017, 1), y: 39000 }
]
},
{
type: "splineArea",
showInLegend: true,
name: "Denied",
yValueFormatString: "$#,##0",
dataPoints: [
{ x: new Date(2016, 2), y: 20100 },
{ x: new Date(2016, 3), y: 16000 },
{ x: new Date(2016, 4), y: 14000 },
{ x: new Date(2016, 5), y: 18000 },
{ x: new Date(2016, 6), y: 18000 },
{ x: new Date(2016, 7), y: 21000 },
{ x: new Date(2016, 8), y: 22000 },
{ x: new Date(2016, 9), y: 25000 },
{ x: new Date(2016, 10), y: 23000 },
{ x: new Date(2016, 11), y: 25000 },
{ x: new Date(2017, 0), y: 26000 },
{ x: new Date(2017, 1), y: 25000 }
]
},
{
type: "splineArea",
showInLegend: true,
name: "Completed",
yValueFormatString: "$#,##0",
dataPoints: [
{ x: new Date(2016, 2), y: 10100 },
{ x: new Date(2016, 3), y: 6000 },
{ x: new Date(2016, 4), y: 3400 },
{ x: new Date(2016, 5), y: 4000 },
{ x: new Date(2016, 6), y: 9000 },
{ x: new Date(2016, 7), y: 3900 },
{ x: new Date(2016, 8), y: 4200 },
{ x: new Date(2016, 9), y: 5000 },
{ x: new Date(2016, 10), y: 14300 },
{ x: new Date(2016, 11), y: 12300 },
{ x: new Date(2017, 0), y: 8300 },
{ x: new Date(2017, 1), y: 6300 }
]
},
{
type: "splineArea",
showInLegend: true,
yValueFormatString: "$#,##0",
name: "Data N/A",
dataPoints: [
{ x: new Date(2016, 2), y: 1700 },
{ x: new Date(2016, 3), y: 2600 },
{ x: new Date(2016, 4), y: 1000 },
{ x: new Date(2016, 5), y: 1400 },
{ x: new Date(2016, 6), y: 900 },
{ x: new Date(2016, 7), y: 1000 },
{ x: new Date(2016, 8), y: 1200 },
{ x: new Date(2016, 9), y: 5000 },
{ x: new Date(2016, 10), y: 1300 },
{ x: new Date(2016, 11), y: 2300 },
{ x: new Date(2017, 0), y: 2800 },
{ x: new Date(2017, 1), y: 1300 }
]
}]
});
chart.render();
</script>
@stop
| 40.863821 | 1,496 | 0.524447 |
d919d4909418b6dc6deb7ece3629448485a8ad54 | 748 | asm | Assembly | oeis/073/A073706.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/073/A073706.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/073/A073706.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A073706: a(n) = Sum_{ d divides n } (n/d)^(3d).
; Submitted by Jamie Morken(s2)
; 1,9,28,129,126,1458,344,8705,20413,49394,1332,1104114,2198,2217546,16305408,33820673,4914,532253187,6860,2392632274,10500716072,8591716802,12168,422182489826,30517593751,549760658274,7625984925160,8809941860898,24390,245361397851308,29792,563018689708033,5559062924539152,2251799837862122,481584719755944,186225279896007219,50654,144115188122956626,4052555163623534960,2365483838425237410,68922,118665926553352310316,79508,147573955728218254738,2961763493077333071918,590295810358853784938,103824
add $0,1
mov $2,$0
lpb $0
mov $3,$2
dif $3,$0
mov $4,$3
cmp $3,$2
cmp $3,0
mul $3,$0
sub $0,1
mul $4,3
pow $3,$4
add $1,$3
lpe
add $1,1
mov $0,$1
| 35.619048 | 498 | 0.77139 |
b6fb746ad4a8753842447031ba47f530de6a3281 | 3,302 | kt | Kotlin | riskscorechecker/src/main/java/uk/nhs/riskscorechecker/RiskScoreChecker.kt | klinker41/riskscore-kt-public | 31e7235d807b5701fee138ff8ca38b2174edad59 | [
"MIT"
] | null | null | null | riskscorechecker/src/main/java/uk/nhs/riskscorechecker/RiskScoreChecker.kt | klinker41/riskscore-kt-public | 31e7235d807b5701fee138ff8ca38b2174edad59 | [
"MIT"
] | null | null | null | riskscorechecker/src/main/java/uk/nhs/riskscorechecker/RiskScoreChecker.kt | klinker41/riskscore-kt-public | 31e7235d807b5701fee138ff8ca38b2174edad59 | [
"MIT"
] | null | null | null | package uk.nhs.riskscorechecker
import com.google.protobuf.util.JsonFormat
import uk.nhs.riskscore.RiskScoreCalculator
import uk.nhs.riskscore.RiskScoreCalculatorConfiguration.Companion.exampleConfiguration
import uk.nhs.riskscore.ScanInstance
import uk.nhs.support.InstanceName
import uk.nhs.support.RiskScoreValue
import java.io.File
import com.google.en.riskscore.Experiment
fun main() {
computeScores(parseJsonFiles()).forEach { (instance, riskScore) ->
println("${instance.name}: ${riskScore.score}")
}
}
fun parseJsonFiles(): Sequence<Pair<InstanceName, List<ScanInstance>>> {
return getResourceFile("/test_results").walk()
.filter { file -> file.name.endsWith(".json") }
.flatMap { file -> parseScanInstances(file) }
}
fun getResourceFile(path: String): File {
return File(object {}.javaClass.getResource(path).file)
}
fun parseScanInstances(file: File): Sequence<Pair<InstanceName, List<ScanInstance>>> {
var experiment = parseExperiment(file)
return sequence {
experiment.getParticipantsList().forEach { participant ->
participant.getResultsList().forEach { result ->
result.getCounterpartsList().forEach { counterpart ->
if (counterpart.getExposureWindowsCount() > 0) {
// TODO(jklinker): Are we supposed to combine all scan instances from all
// exposure windows for a counterpart, or process some other way?
var scans = mutableListOf<ScanInstance>()
counterpart.getExposureWindowsList().forEach { exposureWindow ->
exposureWindow.getScanInstancesList().forEach { scanInstance ->
scans.add(
// TODO(jklinker): Do scan instances take typical attenuation
// or min attenuation?
ScanInstance(
scanInstance.getTypicalAttenuationDb(),
scanInstance.getSecondsSinceLastScan()
)
)
}
}
yield(
Pair(
InstanceName(
"${file.name.removeSuffix(".json")}: " +
"${participant.getDeviceName()} -> " +
"${counterpart.getDeviceName()}"),
scans.toList()
)
)
}
}
}
}
}
}
fun parseExperiment(file: File): Experiment {
var experiment = Experiment.newBuilder()
JsonFormat.parser().merge(file.readText(), experiment)
return experiment.build()
}
fun computeScores(
scans: Sequence<Pair<InstanceName, List<ScanInstance>>>
): Sequence<Pair<InstanceName, RiskScoreValue>> {
val calculator = RiskScoreCalculator(exampleConfiguration)
return scans.map { (name, scans) ->
val score = calculator.calculate(scans)
Pair(name, RiskScoreValue(score))
}
}
| 40.268293 | 97 | 0.547547 |
0a2e4749614be12b96839545127f8b7988b28dfa | 283 | ts | TypeScript | app/ui/src/app/common/openapi/openapi.module.spec.ts | dlabaj/syndesis-react-poc | 80a9d17c636b9be326ba694f0df17c02b84af342 | [
"Apache-2.0"
] | 4 | 2018-11-19T20:48:52.000Z | 2018-12-04T09:53:45.000Z | app/ui/src/app/common/openapi/openapi.module.spec.ts | dlabaj/syndesis-react-poc | 80a9d17c636b9be326ba694f0df17c02b84af342 | [
"Apache-2.0"
] | 359 | 2019-04-10T15:44:34.000Z | 2019-06-14T07:47:44.000Z | app/ui/src/app/common/openapi/openapi.module.spec.ts | dlabaj/syndesis-react-poc | 80a9d17c636b9be326ba694f0df17c02b84af342 | [
"Apache-2.0"
] | 14 | 2018-11-01T14:18:46.000Z | 2019-03-05T14:52:54.000Z | import { OpenApiModule } from './openapi.module';
describe('OpenApiModule', () => {
let openapiModule: OpenApiModule;
beforeEach(() => {
openapiModule = new OpenApiModule();
});
it('should create an instance', () => {
expect(openapiModule).toBeTruthy();
});
});
| 20.214286 | 49 | 0.628975 |
c364aee303001aa269c138e1334dea4eb498be2d | 1,971 | go | Go | wlnet/transport/transport.go | qrntz/common | 99a1d3b32a36af84e5365fe5a4fb9b02bb7654fd | [
"MIT"
] | null | null | null | wlnet/transport/transport.go | qrntz/common | 99a1d3b32a36af84e5365fe5a4fb9b02bb7654fd | [
"MIT"
] | null | null | null | wlnet/transport/transport.go | qrntz/common | 99a1d3b32a36af84e5365fe5a4fb9b02bb7654fd | [
"MIT"
] | null | null | null | // Copyright (c) 2021 Wireleap
package transport
import (
"crypto/tls"
"fmt"
"net"
"net/http"
"net/url"
"time"
"github.com/wireleap/common/wlnet/h2conn"
)
// T is a complete Wireleap network transport which can dial to other
// wireleap-relays via TLS or H/2 over TCP and targets via TCP or UDP.
type T struct{ *http.Transport }
// Options is a struct which contains options for initializing a T.
type Options struct {
// TLSVerify is the same as !InsecureSkipVerify in tls.Config
TLSVerify bool
// Certs is a list of TLS certificates to use
Certs []tls.Certificate
// Timeout is the maximum time for new connections
Timeout time.Duration
}
// New creates a default T with the supplied options.
func New(opts Options) *T {
var (
tc = &tls.Config{
Certificates: opts.Certs,
InsecureSkipVerify: !opts.TLSVerify,
MinVersion: tls.VersionTLS13,
NextProtos: []string{"h2"}, // H/2 only
}
nd = &net.Dialer{Timeout: opts.Timeout}
td = &tls.Dialer{NetDialer: nd, Config: tc}
t = &T{
Transport: &http.Transport{
Dial: nd.Dial,
DialContext: nd.DialContext,
DialTLS: td.Dial,
DialTLSContext: td.DialContext,
TLSClientConfig: tc,
ResponseHeaderTimeout: opts.Timeout,
ForceAttemptHTTP2: true,
MaxConnsPerHost: 0,
MaxIdleConnsPerHost: 0,
MaxIdleConns: 4096,
IdleConnTimeout: 5 * time.Minute,
},
}
)
return t
}
// DialWL creates a new connection to relay or target.
func (t *T) DialWL(protocol string, remote *url.URL) (c net.Conn, err error) {
switch remote.Scheme {
case "target":
c, err = t.Transport.Dial(protocol, remote.Host)
case "wireleap":
// convert to a stdlib-known scheme
u2 := *remote
u2.Scheme = "https"
c, err = h2conn.New(t.Transport, u2.String(), nil)
default:
err = fmt.Errorf("unsupported dial scheme '%s' in %s", remote.Scheme, remote)
}
return
}
| 26.28 | 79 | 0.65652 |
50b918c40443a7ab9d5ca2e284f2938bf25343a8 | 3,617 | go | Go | pkg/device/service/service.go | nayotta/metathings | 17a3a6d082d044083d8aeafdb93c933ac7a440c7 | [
"MIT"
] | 4 | 2019-01-14T14:57:52.000Z | 2021-01-15T14:56:44.000Z | pkg/device/service/service.go | nayotta/metathings | 17a3a6d082d044083d8aeafdb93c933ac7a440c7 | [
"MIT"
] | 184 | 2018-12-25T04:58:00.000Z | 2021-03-25T14:22:58.000Z | pkg/device/service/service.go | nayotta/metathings | 17a3a6d082d044083d8aeafdb93c933ac7a440c7 | [
"MIT"
] | 3 | 2018-10-15T05:57:42.000Z | 2019-08-21T10:36:35.000Z | package metathings_device_service
import (
"context"
"sync"
"time"
grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth"
log "github.com/sirupsen/logrus"
afo_helper "github.com/nayotta/metathings/pkg/common/auth_func_overrider"
"github.com/nayotta/metathings/pkg/common/binary_synchronizer"
bin_sync "github.com/nayotta/metathings/pkg/common/binary_synchronizer"
client_helper "github.com/nayotta/metathings/pkg/common/client"
fx_helper "github.com/nayotta/metathings/pkg/common/fx"
grpc_helper "github.com/nayotta/metathings/pkg/common/grpc"
session_helper "github.com/nayotta/metathings/pkg/common/session"
token_helper "github.com/nayotta/metathings/pkg/common/token"
version_helper "github.com/nayotta/metathings/pkg/common/version"
pb "github.com/nayotta/metathings/proto/device"
deviced_pb "github.com/nayotta/metathings/proto/deviced"
)
type MetathingsDeviceService interface {
version_helper.Versioner
pb.DeviceServiceServer
Start() error
Stop() error
}
type MetathingsDeviceServiceOption struct {
ModuleAliveTimeout time.Duration
HeartbeatInterval time.Duration
HeartbeatMaxRetry int
MaxReconnectInterval time.Duration
MinReconnectInterval time.Duration
PingInterval time.Duration
}
type MetathingsDeviceServiceImpl struct {
grpc_auth.ServiceAuthFuncOverride
version_helper.Versioner
*grpc_helper.ErrorParser
tknr token_helper.Tokener
cli_fty *client_helper.ClientFactory
logger log.FieldLogger
opt *MetathingsDeviceServiceOption
app_getter *fx_helper.FxAppGetter
bs bin_sync.BinarySynchronizer
info *deviced_pb.Device
mdl_db ModuleDatabase
conn_stm deviced_pb.DevicedService_ConnectClient
conn_stm_rwmtx sync.RWMutex
conn_stm_wg sync.WaitGroup
conn_stm_wg_once sync.Once
conn_cfn client_helper.DoneFn
startup_session int32
stats_heartbeat_fails int
synchronizing_firmware_mtx sync.Mutex
stats_synchronizing_firmware bool
}
var (
ignore_methods = []string{
"IssueModuleToken",
}
)
func (self *MetathingsDeviceServiceImpl) IsIgnoreMethod(md *grpc_helper.MethodDescription) bool {
for _, m := range ignore_methods {
if md.Method == m {
return true
}
}
return false
}
func (self *MetathingsDeviceServiceImpl) Stop() error {
return self.app_getter.Get().Stop(context.TODO())
}
func (self *MetathingsDeviceServiceImpl) connection_stream() deviced_pb.DevicedService_ConnectClient {
return self.conn_stm
}
func (self *MetathingsDeviceServiceImpl) get_module_info(id string) (*deviced_pb.Module, error) {
for _, m := range self.info.Modules {
if m.Id == id {
return m, nil
}
}
return nil, ErrModuleNotFound
}
func (self *MetathingsDeviceServiceImpl) get_logger() log.FieldLogger {
return self.logger
}
func NewMetathingsDeviceService(
ver version_helper.Versioner,
tknr token_helper.Tokener,
cli_fty *client_helper.ClientFactory,
logger log.FieldLogger,
tkvdr token_helper.TokenValidator,
opt *MetathingsDeviceServiceOption,
app_getter *fx_helper.FxAppGetter,
bs binary_synchronizer.BinarySynchronizer,
) (MetathingsDeviceService, error) {
srv := &MetathingsDeviceServiceImpl{
ErrorParser: grpc_helper.NewErrorParser(em),
Versioner: ver,
bs: bs,
tknr: tknr,
cli_fty: cli_fty,
logger: logger,
opt: opt,
startup_session: session_helper.GenerateStartupSession(),
app_getter: app_getter,
stats_synchronizing_firmware: false,
}
srv.ServiceAuthFuncOverride = afo_helper.NewAuthFuncOverrider(tkvdr, srv, logger)
return srv, nil
}
| 27.401515 | 102 | 0.769975 |
df7fdce43702434493a65af4827e0665bfa9329f | 143 | rb | Ruby | lib/rockpepescissors.rb | thecog19/rockpepescissors | f6390369629a6ebc347b487133f0ea9648ab8f70 | [
"MIT"
] | null | null | null | lib/rockpepescissors.rb | thecog19/rockpepescissors | f6390369629a6ebc347b487133f0ea9648ab8f70 | [
"MIT"
] | null | null | null | lib/rockpepescissors.rb | thecog19/rockpepescissors | f6390369629a6ebc347b487133f0ea9648ab8f70 | [
"MIT"
] | null | null | null | require "rockpepescissors/version"
require 'rockpepescissors/game'
module Rockpepescissors
def self.hello
puts "hey guys!!!!"
end
end
| 15.888889 | 34 | 0.755245 |
223debbc0708411651313c3676b71a6ccece7719 | 1,195 | sql | SQL | database_management/resource_management.sql | TNRIS/api.tnris.org | 46620a4edf0682c158907f110158110801e9c398 | [
"MIT"
] | 6 | 2019-05-22T20:01:45.000Z | 2020-08-18T12:05:12.000Z | database_management/resource_management.sql | TNRIS/api.tnris.org | 46620a4edf0682c158907f110158110801e9c398 | [
"MIT"
] | 73 | 2019-05-22T19:57:30.000Z | 2022-03-12T00:59:33.000Z | database_management/resource_management.sql | TNRIS/api.tnris.org | 46620a4edf0682c158907f110158110801e9c398 | [
"MIT"
] | null | null | null | -- Create resource_management view for API to hit. Aggregates unique list
-- of resources per collection with resource_type joins
-- Main collection api endpoint for LCD non-historical dataset resources/downloads (download map): api/v1/resources
DROP MATERIALIZED VIEW IF EXISTS "resource_management";
CREATE MATERIALIZED VIEW "resource_management" as
SELECT resource.resource_id,
resource.resource,
resource.filesize,
resource.area_type_id,
resource.collection_id,
resource_type.resource_type_name,
resource_type.resource_type_abbreviation,
area_type.area_type,
area_type.area_type_name
FROM resource
LEFT JOIN resource_type ON resource_type.resource_type_id=resource.resource_type_id
LEFT JOIN area_type ON area_type.area_type_id=resource.area_type_id
GROUP BY area_type.area_type_name,
resource.area_type_id, --group by area_type_id first? any objections?
resource_type.resource_type_name, --group by area_type_name, idea is like-with-like by default
resource.resource_id,
resource.resource,
resource.filesize,
resource.collection_id,
resource_type.resource_type_abbreviation,
area_type.area_type
WITH DATA;
| 36.212121 | 115 | 0.794979 |
151424ebf0db70ed0cd2a289cbebf3d7d3faf54a | 1,248 | kt | Kotlin | liquidators/aave-liquidator/src/main/java/io/defitrack/mev/EthereumCheapBlockProducer.kt | defitrack/mev-infrastructure | 975b929c95013fe9f999966002947d7987204466 | [
"MIT"
] | null | null | null | liquidators/aave-liquidator/src/main/java/io/defitrack/mev/EthereumCheapBlockProducer.kt | defitrack/mev-infrastructure | 975b929c95013fe9f999966002947d7987204466 | [
"MIT"
] | null | null | null | liquidators/aave-liquidator/src/main/java/io/defitrack/mev/EthereumCheapBlockProducer.kt | defitrack/mev-infrastructure | 975b929c95013fe9f999966002947d7987204466 | [
"MIT"
] | null | null | null | package io.defitrack.mev
import io.defitrack.mev.chains.polygon.config.PolygonContractAccessor
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.future.await
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Component
import java.math.BigInteger
@Component
class EthereumCheapBlockProducer(private val polygonContractAccessor: PolygonContractAccessor) {
suspend fun produceBlocks(action: (BigInteger) -> Unit) = coroutineScope {
var latestBlock: BigInteger = BigInteger.ZERO
while (true) {
this.ensureActive()
try {
val thisBlock =
polygonContractAccessor.getGateway().web3j().ethBlockNumber().sendAsync().await().blockNumber
if (latestBlock != thisBlock) {
latestBlock = thisBlock
action(thisBlock)
}
} catch (ex: Exception) {
logger.error("Error trying to produce blocks", ex)
}
delay(500)
}
}
companion object {
val logger: Logger = LoggerFactory.getLogger(this::class.java)
}
} | 33.72973 | 113 | 0.660256 |
53c3bad3631e0948f42cd7d95a2c6875774df4c5 | 433 | java | Java | zudamue-sqlite/src/main/java/st/zudamue/support/android/sql/annnotation/Column.java | costa-xdaniel/DBUtilAndroid | 6769cd6ede74b443abfd71e3a4169e467802b973 | [
"Apache-2.0"
] | 1 | 2017-06-23T13:12:12.000Z | 2017-06-23T13:12:12.000Z | zudamue-sqlite/src/main/java/st/zudamue/support/android/sql/annnotation/Column.java | costa-xdaniel/DBUtilAndroid | 6769cd6ede74b443abfd71e3a4169e467802b973 | [
"Apache-2.0"
] | null | null | null | zudamue-sqlite/src/main/java/st/zudamue/support/android/sql/annnotation/Column.java | costa-xdaniel/DBUtilAndroid | 6769cd6ede74b443abfd71e3a4169e467802b973 | [
"Apache-2.0"
] | null | null | null | package st.zudamue.support.android.sql.annnotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Created by xdaniel on 12/02/17.
*
* @author Daniel Costa <costa.xdaniel@gmail.com>
*/
@Retention( RetentionPolicy.RUNTIME )
@Target( { ElementType.FIELD } )
public @interface Column {
String value();
}
| 21.65 | 51 | 0.755196 |
b964ddaac1fb7c4e6f8b4d2e8bf4513f9ae611fd | 1,736 | h | C | Video/Dec/Core/IviCP/Main/CPServiceAtiMp2IDCT.h | goodspeed24e/2011Corel | 4efb585a589ea5587a877f4184493b758fa6f9b2 | [
"MIT"
] | 1 | 2019-07-24T07:59:07.000Z | 2019-07-24T07:59:07.000Z | Video/Dec/Core/IviCP/Main/CPServiceAtiMp2IDCT.h | goodspeed24e/2011Corel | 4efb585a589ea5587a877f4184493b758fa6f9b2 | [
"MIT"
] | null | null | null | Video/Dec/Core/IviCP/Main/CPServiceAtiMp2IDCT.h | goodspeed24e/2011Corel | 4efb585a589ea5587a877f4184493b758fa6f9b2 | [
"MIT"
] | 6 | 2015-03-17T12:11:38.000Z | 2022-01-29T01:15:52.000Z | #ifndef _CONTENT_PROTECTION_SERVIC_ATI_MPEG2_
#define _CONTENT_PROTECTION_SERVIC_ATI_MPEG2_
#include "CPService.h"
#include "d3d9.h"
#include "r128auth.h"
#include <dxva.h>
typedef struct
{
DXVA_EncryptProtocolHeader header;
DWORD dwCommand;
DWORD dwData;
} ATIEncryptionCommand;
class CoCPServiceAtiMp2IDCT : public CoCPService, public ICPServiceAtiMp2IDCT
{
public:
CoCPServiceAtiMp2IDCT();
~CoCPServiceAtiMp2IDCT();
//IUnknown
STDMETHODIMP QueryInterface(REFIID riid, void**ppInterface);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
//ICPService
STDMETHODIMP Open(CPOpenOptions *pOpenOptions);
STDMETHODIMP Close();
STDMETHODIMP_(BOOL) IsScramblingRequired(ECPFrameType eImgType=CP_I_TYPE);
STDMETHODIMP EnableScrambling();
STDMETHODIMP DisableScrambling();
STDMETHODIMP ScrambleData(BYTE *pDataOut, const BYTE *pDataIn, DWORD dwDataLen);
STDMETHODIMP_(BYTE) GetEncryptMode();
STDMETHODIMP ProtectedBlt(DWORD dwWidth, DWORD dwHeight, DWORD dwPitch, BYTE *pSrc);
STDMETHODIMP_(ECPObjID) GetObjID();
//ICPServiceAtiMp2
STDMETHODIMP SkipMBlock(DWORD dwDeviceID);
STDMETHODIMP RescrambleDXVACoeff(DWORD dwDeviceID, LPVOID pSrc, LPVOID pDest);
STDMETHODIMP RescrambleDXVABlock(DWORD dwDeviceID, LPVOID pSrc, LPVOID pDest, DWORD dwNumOfBytes);
private:
STDMETHODIMP SetDXEncryption(BOOL bOn);
HRESULT EnableGPUCPSCD(IUnknown* pD3D9);
DXVA_EncryptProtocolHeader m_DXVAEncryptProtocolHdr;
BOOL m_bMultiChannelEncrypt;
BOOL m_dwDeviceID;
BYTE m_byChannelNum;
HANDLE m_hEncrypt;
//Enable Screen Capture Defense.
IDirect3DAuthenticatedChannel9 *m_pD3D9AuthChannel;
HANDLE m_hD3D9AuthChannel;
};
#endif | 28.933333 | 102 | 0.778802 |
5c1eb0740290ac2ea5ece720f091abbae4071856 | 652 | lua | Lua | widgets/init.lua | eaufavor/AwesomeWM-powerarrow-dark | 13e45fb6c56cb1f0c35b08f860aa9b7cac1195a6 | [
"Apache-2.0"
] | 2 | 2015-12-03T13:23:26.000Z | 2019-07-23T14:56:58.000Z | widgets/init.lua | eaufavor/AwesomeWM-powerarrow-dark | 13e45fb6c56cb1f0c35b08f860aa9b7cac1195a6 | [
"Apache-2.0"
] | null | null | null | widgets/init.lua | eaufavor/AwesomeWM-powerarrow-dark | 13e45fb6c56cb1f0c35b08f860aa9b7cac1195a6 | [
"Apache-2.0"
] | null | null | null | return {
dock= require( "widgets.dock" ),
devices= require( "widgets.devices" ),
keyboardSwitcher= require( "widgets.keyboardSwitcher" ),
keyboard= require( "widgets.keyboard" ),
spacer= require( "widgets.spacer" ),
desktopIcon= require( "widgets.desktopIcon" ),
radialSelect= require( "widgets.radialSelect" ),
tooltip2= require( "radical.tooltip" ),
allinone= require( "widgets.allinone" ),
battery= require( "widgets.battery" ),
}
| 46.571429 | 63 | 0.489264 |
499930d66de09950fccd9b0ec06749530389981d | 6,000 | html | HTML | pipermail/antlr-interest/2006-November/018354.html | hpcc-systems/website-antlr3 | aa6181595356409f8dc624e54715f56bd10707a8 | [
"BSD-3-Clause"
] | null | null | null | pipermail/antlr-interest/2006-November/018354.html | hpcc-systems/website-antlr3 | aa6181595356409f8dc624e54715f56bd10707a8 | [
"BSD-3-Clause"
] | null | null | null | pipermail/antlr-interest/2006-November/018354.html | hpcc-systems/website-antlr3 | aa6181595356409f8dc624e54715f56bd10707a8 | [
"BSD-3-Clause"
] | null | null | null | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [antlr-interest] [BUG] 3.0b4 no complaint on parser reference to lexical fragment
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:antlr-interest%40antlr.org?Subject=%5Bantlr-interest%5D%20%5BBUG%5D%203.0b4%20no%20complaint%20on%20parser%20reference%0A%09to%20lexical%20fragment&In-Reply-To=E1GjdBO-0004vF-00%40gecko">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="018342.html">
<LINK REL="Next" HREF="018357.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[antlr-interest] [BUG] 3.0b4 no complaint on parser reference to lexical fragment</H1>
<B>Micheal J</B>
<A HREF="mailto:antlr-interest%40antlr.org?Subject=%5Bantlr-interest%5D%20%5BBUG%5D%203.0b4%20no%20complaint%20on%20parser%20reference%0A%09to%20lexical%20fragment&In-Reply-To=E1GjdBO-0004vF-00%40gecko"
TITLE="[antlr-interest] [BUG] 3.0b4 no complaint on parser reference to lexical fragment">open.zone at virgin.net
</A><BR>
<I>Mon Nov 13 17:43:19 PST 2006</I>
<P><UL>
<LI>Previous message: <A HREF="018342.html">[antlr-interest] [BUG] 3.0b4 no complaint on parser reference to lexical fragment
</A></li>
<LI>Next message: <A HREF="018357.html">[antlr-interest] [BUG] 3.0b4 no complaint on parser reference to lexical fragment
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#18354">[ date ]</a>
<a href="thread.html#18354">[ thread ]</a>
<a href="subject.html#18354">[ subject ]</a>
<a href="author.html#18354">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hi,
><i> >> There is an interface between a Parser and a Lexer. The Lexer
</I>><i> >> produces a
</I>><i> >> stream of Tokens which the Parser consumes.
</I>><i> >
</I>><i> >Exactly. The question now is, what is that interface? Is it
</I>><i> the set of
</I>><i> >lexer rules? Or is it the set of token types?
</I>><i>
</I>><i> Apparently the set of rules is the same as the set of token types.
</I>
No. Token types may be defined in a tokens{..} block without an associated
rule.
><i> >> And of what type should these lexer produced Tokens be?
</I>><i> >
</I>><i> >The set is defined by the terminal symbols of the language.
</I>><i>
</I>><i> Yes. and as we have both pointed out to each other, lexical
</I>><i> fragments do not represent terminal symbols of the language.
</I>
Not quite. They just do not [normally] emit tokens. I'd have to double-check
again if that can be overridded with action code.
><i> >To actually prevent a grammar author to use that token type is much
</I>><i> >more involved. It means you either have to change the way fragment
</I>><i> >rules are represented internally, or you have to check all
</I>><i> actions to
</I>><i> >catch any attempt to change a token's type to a forbidden
</I>><i> value. That
</I>><i> >sounds too difficult and I'd call that problematic. It'd be
</I>><i> >bound to be a fragile implementation.
</I>><i>
</I>><i> I envisioned that the code that handles token references in
</I>><i> parser rules would do the check. not any code in lexer rules
</I>><i> that sets the token type.
</I>
Parsers [quite rightly] know nothing about lexer rules or fragments. They
just expect a stream of tokens (with token types from their token type
vocabulary).
><i> The file produce by the lexer generation code containing the
</I>><i> assigned token types (is it the *.tokens file?) would need to
</I>><i> include an additional flag for each token type to indicate
</I>><i> whether or that token type was induced by a lexical fragment
</I>><i> (or maybe just not write fragment token types to that file in
</I>><i> the first place?) the parser generation code would then use
</I>><i> that flag to perform the error check.
</I>><i>
</I>><i> I am sure I have oversimplified this checking. Not sure how
</I>><i> the handling of a tokens{} section would impact this checking.
</I>
Interesting idea. While it certainly could be done, I can't help feeling
that this is really a training issue.
My reasoning?. Well:
- there are legitimate reasons for sending tokens types named after a
fragment rule to the parser as Kay pointed out.
- the option exists to name fragment rules (and their auto-generated token
type namesake) such that it is impossible to misuse unintentionally [e.g.
DIGIT_NotForParser, DoNotUseInParser_DIGIT, LexerInternal_DIGIT]
><i> >I have a hard time to believe that this is a real-world scenario.
</I>><i>
</I>><i> I have helped new users to resolve this on at least 2
</I>><i> occasions. Most recently just this past Sunday immediately
</I>><i> before I started this thread.
</I>
As I said, this sounds like a training issue.
Micheal
-----------------------
The best way to contact me is via the list/forum. My time is very limited.
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="018342.html">[antlr-interest] [BUG] 3.0b4 no complaint on parser reference to lexical fragment
</A></li>
<LI>Next message: <A HREF="018357.html">[antlr-interest] [BUG] 3.0b4 no complaint on parser reference to lexical fragment
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#18354">[ date ]</a>
<a href="thread.html#18354">[ thread ]</a>
<a href="subject.html#18354">[ subject ]</a>
<a href="author.html#18354">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://www.antlr.org/mailman/listinfo/antlr-interest">More information about the antlr-interest
mailing list</a><br>
</body></html>
| 44.117647 | 220 | 0.674 |
6494314ef64c1e5ab2de6a13d6472c592191044f | 1,150 | swift | Swift | one/Service/TimerManager.swift | weifengsmile/one | 8117336a51a7bf80d3c141b0c7885ae45b4a7783 | [
"MIT"
] | 2 | 2022-03-01T02:12:53.000Z | 2022-03-06T13:11:13.000Z | one/Service/TimerManager.swift | weifengsmile/one | 8117336a51a7bf80d3c141b0c7885ae45b4a7783 | [
"MIT"
] | null | null | null | one/Service/TimerManager.swift | weifengsmile/one | 8117336a51a7bf80d3c141b0c7885ae45b4a7783 | [
"MIT"
] | null | null | null | //
// TimerManager.swift
// one
//
// Created by sidney on 6/1/21.
//
import Foundation
class TimerManager {
static let shared = TimerManager()
private var timerDict: [TimerName: Timer?] = [:]
private init() {
}
enum TimerName: String {
case musicPosterLoop = "musicPosterLoop"
case musicCarouselLoop = "musicCarouselLoop"
case musicPlayProgress = "musicPlayProgress"
}
func setTimer(timerName: TimerName, timer: Timer) {
self.timerDict[timerName] = timer
}
func getTimer(timerName: TimerName) -> Timer? {
return self.timerDict[timerName] ?? nil
}
func deleteTimer(timerName: TimerName) {
self.timerDict.removeValue(forKey: timerName)
}
func invalidateTimer(timerName: TimerName) {
guard let timer = self.getTimer(timerName: timerName) else { return }
timer.invalidate()
// self.deleteTimer(timerName: timerName)
}
func validateTimer(timerName: TimerName) {
guard let timer = self.getTimer(timerName: timerName) else { return }
timer.fire()
}
}
| 23.958333 | 77 | 0.62087 |
5aa44f0c35311b873cdde1e000d36b5ea3a9adb0 | 221 | asm | Assembly | solutions/23 - Sorting Hall/size-6_speed-24.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 45 | 2018-09-05T04:56:59.000Z | 2021-11-22T08:57:26.000Z | solutions/23 - Sorting Hall/size-6_speed-24.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 36 | 2018-09-01T11:34:26.000Z | 2021-05-19T23:20:49.000Z | solutions/23 - Sorting Hall/size-6_speed-24.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 36 | 2018-09-01T07:44:19.000Z | 2021-09-10T19:07:35.000Z | -- 7 Billion Humans (2053) --
-- 23: Sorting Hall --
-- Author: soerface
-- Size: 6
-- Speed: 24
-- Speed Tests: 24, 25, 23, 24, 26, 24, 23
pickup s
a:
if myitem > e:
step e
endif
if myitem < w:
step w
endif
jump a
| 11.05 | 42 | 0.597285 |
925a3d0906c8ce3ea6c507f8a02370f54b3683e4 | 49,871 | asm | Assembly | reference_asm/battle_extra.asm | tashiww/maten_tools | efaf43958639edfdcd342615f4c23ccba35d80ce | [
"MIT"
] | 1 | 2021-05-14T19:14:38.000Z | 2021-05-14T19:14:38.000Z | reference_asm/battle_extra.asm | tashiww/maten_tools | efaf43958639edfdcd342615f4c23ccba35d80ce | [
"MIT"
] | null | null | null | reference_asm/battle_extra.asm | tashiww/maten_tools | efaf43958639edfdcd342615f4c23ccba35d80ce | [
"MIT"
] | null | null | null | ; ########################################################################################
; # Generated by the active disassembly feature of the Exodus emulation platform
; #
; # Creation Date: 2020-12-22 23:56:14
; # Analysis Region: 0x0000CEC8 - 0x0000F000
; ########################################################################################
org $0000CEC8
MOVE.l $16(A0), D0
BTST.l #$0C, D0
BEQ.b loc_0000CED6
MOVEQ #$00000010, D7 ;Predicted (Code-scan)
BRA.b loc_0000CEEC ;Predicted (Code-scan)
loc_0000CED6:
MOVE.w $1A(A6), D7
ORI.w #$0010, D7
BSR.w loc_0000D1D0
TST.w D7
BMI.w *+$FF00
ORI.w #$0010, D7
loc_0000CEEC:
MOVE.w D7, $1A(A6)
BRA.w loc_0000D150
dc.b $42, $42, $14, $2E, $00, $00, $61, $00, $DA, $B4, $61, $00, $02, $68, $61, $00, $02, $7E, $74, $0A, $76, $0E, $38, $3C, $00, $83, $4E, $B9, $00, $00, $32, $D6 ;0x0 (0x0000CEF4-0x0000D150, Entry count: 0x25C) [Unknown data]
dc.b $35, $40, $00, $02, $61, $00, $02, $4E, $61, $00, $02, $64, $52, $40, $54, $41, $36, $2E, $00, $1A, $61, $00, $DB, $70, $4E, $B9, $00, $00, $33, $0C, $4A, $47 ;0x20
dc.b $6A, $00, $00, $64, $0C, $47, $FF, $FF, $66, $16, $30, $2A, $00, $02, $4E, $B9, $00, $00, $31, $B4, $4E, $45, $00, $01, $61, $00, $DB, $1C, $60, $00, $FE, $94 ;0x40
dc.b $08, $07, $00, $0E, $67, $20, $02, $47, $00, $FF, $30, $2A, $00, $02, $4E, $B9, $00, $00, $31, $CC, $61, $00, $01, $FE, $61, $00, $02, $14, $52, $40, $54, $41 ;0x60
dc.b $61, $00, $DB, $0C, $60, $B2, $02, $47, $00, $FF, $30, $2A, $00, $02, $4E, $B9, $00, $00, $31, $CC, $61, $00, $01, $DE, $61, $00, $01, $F4, $52, $40, $54, $41 ;0x80
dc.b $61, $00, $DA, $F6, $60, $92, $30, $2A, $00, $02, $4E, $B9, $00, $00, $31, $B4, $4E, $45, $00, $01, $61, $00, $DB, $76, $3D, $43, $00, $1A, $61, $00, $D8, $74 ;0xA0
dc.b $20, $28, $00, $16, $08, $00, $00, $03, $67, $4E, $61, $00, $01, $A8, $61, $00, $01, $C8, $74, $08, $76, $0E, $38, $3C, $00, $83, $4E, $B9, $00, $00, $32, $D6 ;0xC0
dc.b $35, $40, $00, $02, $61, $00, $01, $8E, $61, $00, $01, $AE, $52, $40, $54, $41, $42, $42, $61, $00, $D2, $46, $42, $47, $4E, $B9, $00, $00, $33, $28, $30, $2A ;0xE0
dc.b $00, $02, $4E, $B9, $00, $00, $31, $B4, $4E, $45, $00, $01, $4A, $47, $6B, $00, $FE, $FA, $3D, $47, $00, $1C, $60, $30, $08, $00, $00, $02, $67, $16, $7E, $10 ;0x100
dc.b $61, $00, $01, $BA, $4A, $47, $6B, $00, $FE, $E2, $00, $47, $00, $10, $3D, $47, $00, $1C, $60, $14, $42, $6E, $00, $1C, $10, $28, $00, $3F, $02, $00, $00, $08 ;0x120
dc.b $67, $06, $3D, $7C, $00, $10, $00, $1C, $61, $00, $DA, $2C, $60, $00, $01, $0E, $61, $00, $01, $22, $3C, $12, $08, $06, $00, $00, $67, $04, $04, $40, $00, $0C ;0x140
dc.b $0C, $46, $00, $04, $65, $02, $55, $41, $74, $14, $76, $0E, $38, $3C, $00, $83, $4E, $B9, $00, $00, $32, $D6, $35, $40, $00, $02, $61, $00, $00, $F8, $3C, $12 ;0x160
dc.b $08, $06, $00, $00, $67, $04, $04, $40, $00, $0C, $0C, $46, $00, $04, $65, $02, $55, $41, $52, $40, $54, $41, $3E, $2E, $00, $1A, $42, $42, $14, $2E, $00, $00 ;0x180
dc.b $61, $00, $D4, $1E, $52, $40, $4E, $B9, $00, $00, $33, $28, $30, $2A, $00, $02, $4E, $B9, $00, $00, $31, $B4, $4E, $45, $00, $01, $4A, $47, $6B, $00, $FD, $34 ;0x1A0
dc.b $3D, $47, $00, $1A, $42, $42, $14, $2E, $00, $00, $30, $07, $61, $00, $D4, $58, $3D, $40, $00, $1C, $34, $00, $61, $00, $D3, $B2, $08, $00, $00, $01, $67, $00 ;0x1C0
dc.b $00, $50, $61, $00, $00, $90, $61, $00, $00, $B0, $74, $08, $76, $0E, $38, $3C, $00, $83, $4E, $B9, $00, $00, $32, $D6, $35, $40, $00, $02, $61, $00, $00, $76 ;0x1E0
dc.b $61, $00, $00, $96, $52, $40, $54, $41, $42, $42, $61, $00, $D1, $2E, $42, $47, $4E, $B9, $00, $00, $33, $28, $30, $2A, $00, $02, $4E, $B9, $00, $00, $31, $B4 ;0x200
dc.b $4E, $45, $00, $01, $4A, $47, $6B, $00, $FF, $28, $3D, $47, $00, $1E, $60, $2C, $08, $00, $00, $09, $67, $16, $7E, $10, $61, $00, $00, $A2, $4A, $47, $6B, $00 ;0x220
dc.b $FF, $10, $00, $47, $00, $10, $3D, $47, $00, $1E, $60, $10, $42, $6E, $00, $1E, $08, $00, $00, $0C, $67, $06, $3D, $7C, $00, $10, $00, $1E ;0x240
loc_0000D150:
MOVE.w (A2), D2
BSR.w loc_0000D8A4
MOVE.l A0, -(A7)
MOVEA.l A2, A0
JSR $00003B98
MOVEA.l (A7)+, A0
MOVEM.l (A7)+, D0/D1/D2/D3/D4/D5/D7/A0/A1/A2
RTS
dc.b $48, $E7, $01, $10, $3E, $12, $E5, $4F, $47, $FA, $00, $26, $30, $33, $70, $00, $32, $33, $70, $02, $4C, $DF, $08, $80, $4E, $75, $3C, $12, $08, $06, $00, $00 ;0x0 (0x0000D168-0x0000D1D0, Entry count: 0x68) [Unknown data]
dc.b $67, $02, $55, $40, $3C, $12, $0C, $46, $00, $04, $65, $02, $55, $41, $4E, $75, $00, $09, $00, $03, $00, $17, $00, $03, $00, $09, $00, $09, $00, $17, $00, $09 ;0x20
dc.b $00, $09, $00, $0F, $00, $17, $00, $0F, $01, $23, $0F, $25, $0D, $C2, $0F, $C3, $0D, $D4, $0F, $D5, $0D, $C0, $40, $C1, $00, $00, $01, $23, $0F, $25, $0D, $D4 ;0x40
dc.b $0F, $D5, $0D, $C0, $40, $C1, $00, $00 ;0x60
loc_0000D1D0:
MOVEM.l A2/A1/A0/D3/D2/D1/D0, -(A7)
loc_0000D1D4:
MOVE.w D7, D2
BSR.w loc_0000DB1E
MOVEA.l A0, A1
TST.w (A1)
BEQ.b loc_0000D1E6
TST.w $2(A1)
BNE.b loc_0000D1F2
loc_0000D1E6:
ADDQ.w #1, D7 ;Predicted (Code-scan)
CMPI.w #$0019, D7 ;Predicted (Code-scan)
BCS.b loc_0000D1D4 ;Predicted (Code-scan)
MOVEQ #$00000010, D7 ;Predicted (Code-scan)
BRA.b loc_0000D1D4 ;Predicted (Code-scan)
loc_0000D1F2:
MOVEA.w $2A(A1), A0
MOVEQ #1, D0
JSR $00002816
loc_0000D1FE:
TRAP #5
ORI.b #$40, D1 ;Predicted (Code-scan)
MOVE.b $00FF27DA, D0
BTST.l #6, D0
BNE.w loc_0000D32E
BTST.l #5, D0
BNE.w loc_0000D32E
BTST.l #4, D0
BNE.w loc_0000D33E
BTST.l #0, D0
BNE.b loc_0000D23C
BTST.l #1, D0
BNE.b loc_0000D256
BTST.l #2, D0
BNE.b loc_0000D270
BTST.l #3, D0
BNE.b loc_0000D284
BRA.b loc_0000D1FE
loc_0000D23C:
MOVE.w $28(A1), D0 ;Predicted (Code-scan)
MOVE.w $2E(A1), D1 ;Predicted (Code-scan)
loc_0000D244:
SUBI.w #$0018, D1 ;Predicted (Code-scan)
CMPI.w #$00E8, D1 ;Predicted (Code-scan)
BCS.b loc_0000D29C ;Predicted (Code-scan)
BSR.b loc_0000D2BC ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BMI.b loc_0000D244 ;Predicted (Code-scan)
BRA.b loc_0000D2A8 ;Predicted (Code-scan)
loc_0000D256:
MOVE.w $28(A1), D0 ;Predicted (Code-scan)
MOVE.w $2E(A1), D1 ;Predicted (Code-scan)
loc_0000D25E:
ADDI.w #$0018, D1 ;Predicted (Code-scan)
CMPI.w #$0119, D1 ;Predicted (Code-scan)
BCC.b loc_0000D29C ;Predicted (Code-scan)
BSR.b loc_0000D2BC ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BMI.b loc_0000D25E ;Predicted (Code-scan)
BRA.b loc_0000D2A8 ;Predicted (Code-scan)
loc_0000D270:
MOVE.w $28(A1), D0 ;Predicted (Code-scan)
MOVE.w $2E(A1), D1 ;Predicted (Code-scan)
loc_0000D278:
SUBQ.w #1, D0 ;Predicted (Code-scan)
BEQ.b loc_0000D29C ;Predicted (Code-scan)
BSR.b loc_0000D2F0 ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BMI.b loc_0000D278 ;Predicted (Code-scan)
BRA.b loc_0000D2A8 ;Predicted (Code-scan)
loc_0000D284:
MOVE.w $28(A1), D0 ;Predicted (Code-scan)
MOVE.w $2E(A1), D1 ;Predicted (Code-scan)
loc_0000D28C:
ADDQ.w #1, D0 ;Predicted (Code-scan)
CMPI.w #4, D0 ;Predicted (Code-scan)
BCC.b loc_0000D29C ;Predicted (Code-scan)
BSR.b loc_0000D2F0 ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BMI.b loc_0000D28C ;Predicted (Code-scan)
BRA.b loc_0000D2A8 ;Predicted (Code-scan)
loc_0000D29C:
MOVEQ #$00000069, D0 ;Predicted (Code-scan)
JSR $00002376 ;Predicted (Code-scan)
BRA.w loc_0000D1FE ;Predicted (Code-scan)
loc_0000D2A8:
JSR $0000284A ;Predicted (Code-scan)
MOVEQ #$00000067, D0 ;Predicted (Code-scan)
JSR $00002376 ;Predicted (Code-scan)
MOVE.w D2, D7 ;Predicted (Code-scan)
BRA.w loc_0000D1D4 ;Predicted (Code-scan)
loc_0000D2BC:
BSR.b loc_0000D2F0 ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BPL.b loc_0000D2EE ;Predicted (Code-scan)
CMPI.w #3, D0 ;Predicted (Code-scan)
BEQ.b loc_0000D2DC ;Predicted (Code-scan)
BSR.b loc_0000D31A ;Predicted (Code-scan)
BSR.b loc_0000D2F0 ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BPL.b loc_0000D2EE ;Predicted (Code-scan)
BSR.b loc_0000D31A ;Predicted (Code-scan)
BSR.b loc_0000D2F0 ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BPL.b loc_0000D2EE ;Predicted (Code-scan)
BSR.b loc_0000D31A ;Predicted (Code-scan)
BRA.b loc_0000D2EE ;Predicted (Code-scan)
loc_0000D2DC:
BSR.b loc_0000D326 ;Predicted (Code-scan)
BSR.b loc_0000D2F0 ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BPL.b loc_0000D2EE ;Predicted (Code-scan)
BSR.b loc_0000D326 ;Predicted (Code-scan)
BSR.b loc_0000D2F0 ;Predicted (Code-scan)
TST.w D2 ;Predicted (Code-scan)
BPL.b loc_0000D2EE ;Predicted (Code-scan)
BSR.b loc_0000D326 ;Predicted (Code-scan)
loc_0000D2EE:
RTS ;Predicted (Code-scan)
loc_0000D2F0:
MOVEA.l $00FFDAB4, A2 ;Predicted (Code-scan)
MOVEQ #$00000010, D2 ;Predicted (Code-scan)
loc_0000D2F8:
CMP.w $2E(A2), D1 ;Predicted (Code-scan)
BNE.b loc_0000D30A ;Predicted (Code-scan)
CMP.w $28(A2), D0 ;Predicted (Code-scan)
BNE.b loc_0000D30A ;Predicted (Code-scan)
TST.w $2(A2) ;Predicted (Code-scan)
BNE.b loc_0000D318 ;Predicted (Code-scan)
loc_0000D30A:
ADDA.w #$0030, A2 ;Predicted (Code-scan)
ADDQ.w #1, D2 ;Predicted (Code-scan)
CMPI.w #$0019, D2 ;Predicted (Code-scan)
BNE.b loc_0000D2F8 ;Predicted (Code-scan)
MOVEQ #-1, D2 ;Predicted (Code-scan)
loc_0000D318:
RTS ;Predicted (Code-scan)
loc_0000D31A:
ADDQ.w #1, D0 ;Predicted (Code-scan)
CMPI.w #4, D0 ;Predicted (Code-scan)
BCS.b loc_0000D324 ;Predicted (Code-scan)
MOVEQ #1, D0 ;Predicted (Code-scan)
loc_0000D324:
RTS ;Predicted (Code-scan)
loc_0000D326:
SUBQ.w #1, D0 ;Predicted (Code-scan)
BNE.b loc_0000D32C ;Predicted (Code-scan)
MOVEQ #3, D0 ;Predicted (Code-scan)
loc_0000D32C:
RTS ;Predicted (Code-scan)
loc_0000D32E:
JSR $0000284A
MOVEQ #$00000066, D0
JSR $00002376
BRA.b loc_0000D34E
loc_0000D33E:
JSR $0000284A ;Predicted (Code-scan)
MOVEQ #$00000068, D0 ;Predicted (Code-scan)
JSR $00002376 ;Predicted (Code-scan)
MOVEQ #-1, D7 ;Predicted (Code-scan)
loc_0000D34E:
MOVEM.l (A7)+, D0/D1/D2/D3/A0/A1/A2
RTS
dc.b $42, $40, $14, $34, $70, $00, $6B, $04, $67, $02, $52, $40, $14, $34, $70, $01, $6B, $04, $67, $02, $52, $40, $14, $34, $70, $02, $6B, $04, $67, $02, $52, $40 ;0x0 (0x0000D354-0x0000D8A4, Entry count: 0x550) [Unknown data]
dc.b $4A, $40, $66, $02, $4E, $75, $42, $83, $36, $04, $E2, $4B, $74, $14, $94, $43, $E7, $4A, $36, $42, $0C, $40, $00, $01, $66, $22, $42, $42, $14, $34, $70, $00 ;0x20
dc.b $3D, $BC, $00, $02, $60, $28, $3D, $BC, $01, $20, $60, $2C, $3D, $85, $60, $2E, $61, $00, $01, $48, $06, $46, $00, $30, $60, $00, $01, $3E, $0C, $40, $00, $02 ;0x40
dc.b $66, $00, $00, $84, $42, $42, $14, $34, $70, $00, $61, $00, $07, $88, $42, $40, $10, $10, $E7, $48, $14, $34, $70, $01, $61, $00, $07, $7A, $42, $41, $12, $10 ;0x60
dc.b $E7, $49, $E7, $4C, $36, $04, $96, $40, $96, $41, $86, $FC, $00, $03, $E2, $48, $D0, $43, $D0, $4B, $06, $40, $00, $80, $3D, $BC, $00, $01, $60, $28, $3D, $80 ;0x80
dc.b $60, $2C, $3D, $85, $60, $2E, $06, $46, $00, $30, $98, $43, $E2, $49, $98, $41, $D8, $4B, $06, $44, $00, $80, $3D, $BC, $00, $02, $60, $28, $3D, $84, $60, $2C ;0xA0
dc.b $3D, $85, $60, $2E, $04, $46, $00, $30, $42, $42, $14, $34, $70, $00, $61, $00, $00, $CA, $06, $46, $00, $30, $14, $34, $70, $01, $61, $00, $00, $BE, $06, $46 ;0xC0
dc.b $00, $30, $60, $00, $00, $B4, $42, $42, $14, $34, $70, $00, $61, $00, $07, $06, $42, $40, $10, $10, $E7, $48, $14, $34, $70, $01, $61, $00, $06, $F8, $42, $41 ;0xE0
dc.b $12, $10, $E7, $49, $14, $34, $70, $02, $61, $00, $06, $EA, $42, $42, $14, $10, $E7, $4A, $E7, $4C, $36, $04, $96, $40, $96, $41, $96, $42, $E2, $4B, $06, $46 ;0x100
dc.b $00, $60, $E2, $4A, $98, $42, $D8, $4B, $06, $44, $00, $80, $3D, $BC, $00, $03, $60, $28, $3D, $84, $60, $2C, $3D, $85, $60, $2E, $04, $46, $00, $30, $E2, $49 ;0x120
dc.b $D2, $43, $D2, $40, $D2, $4B, $06, $41, $00, $80, $3D, $BC, $00, $02, $60, $28, $3D, $81, $60, $2C, $3D, $85, $60, $2E, $04, $46, $00, $30, $E2, $48, $D0, $4B ;0x140
dc.b $06, $40, $00, $80, $3D, $BC, $00, $01, $60, $28, $3D, $80, $60, $2C, $3D, $85, $60, $2E, $42, $42, $14, $34, $70, $00, $61, $00, $00, $20, $06, $46, $00, $30 ;0x160
dc.b $14, $34, $70, $01, $61, $00, $00, $14, $06, $46, $00, $30, $14, $34, $70, $02, $61, $00, $00, $08, $06, $46, $00, $30, $4E, $75, $61, $00, $06, $58, $3D, $82 ;0x180
dc.b $60, $00, $0C, $42, $00, $6A, $66, $66, $48, $E7, $20, $80, $34, $39, $00, $FF, $DA, $B2, $4E, $B9, $00, $00, $A1, $F2, $30, $28, $00, $04, $3D, $80, $60, $02 ;0x1A0
dc.b $3D, $80, $60, $04, $30, $28, $00, $08, $3D, $80, $60, $06, $3D, $80, $60, $08, $3D, $A8, $00, $0A, $60, $0A, $3D, $A8, $00, $0C, $60, $0C, $42, $40, $10, $28 ;0x1C0
dc.b $00, $0F, $3D, $80, $60, $0E, $10, $28, $00, $10, $3D, $80, $60, $10, $10, $28, $00, $11, $3D, $80, $60, $12, $10, $28, $00, $0F, $3D, $80, $60, $14, $42, $76 ;0x1E0
dc.b $60, $16, $3D, $82, $60, $1A, $4C, $DF, $01, $04, $60, $00, $00, $46, $30, $28, $00, $14, $3D, $80, $60, $02, $3D, $80, $60, $04, $30, $28, $00, $16, $3D, $80 ;0x200
dc.b $60, $06, $3D, $80, $60, $08, $3D, $A8, $00, $18, $60, $0A, $3D, $A8, $00, $1A, $60, $0C, $3D, $A8, $00, $1C, $60, $0E, $3D, $A8, $00, $1E, $60, $10, $3D, $A8 ;0x220
dc.b $00, $20, $60, $12, $3D, $A8, $00, $22, $60, $14, $42, $76, $60, $16, $42, $76, $60, $1A, $3D, $BC, $FF, $FF, $60, $18, $2D, $88, $60, $20, $06, $B6, $00, $00 ;0x240
dc.b $00, $24, $60, $20, $0C, $42, $00, $07, $66, $0E, $74, $01, $4E, $B9, $00, $00, $A1, $DC, $2D, $88, $60, $20, $74, $07, $3D, $BC, $FF, $FF, $60, $24, $42, $40 ;0x260
dc.b $4A, $75, $00, $00, $67, $0A, $B4, $75, $00, $00, $67, $04, $58, $40, $60, $F0, $3B, $82, $00, $00, $52, $75, $00, $02, $3D, $B5, $00, $02, $60, $1E, $4E, $75 ;0x280
dc.b $48, $E7, $00, $90, $61, $00, $00, $D8, $47, $F9, $00, $FF, $CE, $D6, $3E, $39, $00, $FF, $DA, $C4, $08, $07, $00, $0B, $66, $18, $7E, $09, $7C, $03, $4A, $2B ;0x2A0
dc.b $00, $02, $66, $10, $7E, $06, $7C, $02, $4A, $2B, $00, $01, $66, $06, $7E, $03, $60, $02, $7E, $01, $4E, $B9, $00, $00, $1F, $9C, $C0, $C7, $48, $40, $52, $40 ;0x2C0
dc.b $3E, $00, $61, $00, $00, $7E, $4A, $68, $00, $34, $66, $48, $0C, $40, $00, $1D, $67, $06, $0C, $40, $00, $3B, $66, $0A, $0C, $47, $00, $03, $64, $02, $7E, $03 ;0x2E0
dc.b $7C, $02, $4E, $B9, $00, $00, $1F, $9C, $C0, $E8, $00, $02, $48, $40, $52, $40, $BE, $40, $64, $02, $30, $07, $9E, $40, $61, $00, $00, $86, $4A, $40, $66, $3C ;0x300
dc.b $4A, $47, $67, $38, $53, $46, $67, $34, $61, $00, $00, $38, $4A, $68, $00, $34, $66, $2A, $60, $CE, $4A, $28, $00, $34, $6B, $1C, $48, $E7, $20, $80, $42, $40 ;0x320
dc.b $42, $42, $14, $28, $00, $34, $10, $28, $00, $35, $61, $00, $04, $A8, $61, $00, $00, $50, $4C, $DF, $01, $04, $70, $01, $61, $00, $00, $46, $4C, $DF, $09, $00 ;0x340
dc.b $4E, $75, $42, $41, $12, $2E, $00, $01, $4E, $B9, $00, $00, $1F, $9C, $C0, $C1, $48, $40, $E3, $48, $34, $36, $00, $04, $61, $00, $04, $7A, $4E, $75, $42, $94 ;0x360
dc.b $42, $AC, $00, $04, $42, $AC, $00, $08, $42, $6C, $00, $18, $39, $7C, $00, $12, $00, $1A, $39, $7C, $00, $10, $00, $1C, $39, $7C, $00, $0E, $00, $1E, $4E, $75 ;0x380
dc.b $2F, $06, $32, $2C, $00, $18, $42, $43, $16, $10, $42, $44, $18, $28, $00, $01, $0C, $41, $00, $03, $65, $16, $0C, $44, $00, $0D, $64, $00, $00, $92, $0C, $41 ;0x3A0
dc.b $00, $06, $65, $08, $0C, $44, $00, $0B, $64, $00, $00, $84, $7A, $1A, $0C, $41, $00, $03, $65, $0A, $7A, $1C, $0C, $41, $00, $06, $65, $02, $7A, $1E, $B6, $74 ;0x3C0
dc.b $50, $00, $63, $08, $61, $00, $00, $70, $32, $06, $60, $46, $19, $82, $10, $00, $97, $74, $50, $00, $67, $04, $53, $74, $50, $00, $0C, $44, $00, $07, $65, $2E ;0x3E0
dc.b $61, $00, $00, $54, $19, $BC, $00, $FF, $60, $00, $19, $BC, $00, $FF, $60, $01, $19, $BC, $00, $FF, $60, $02, $0C, $44, $00, $0A, $65, $12, $19, $BC, $00, $FF ;0x400
dc.b $60, $03, $19, $BC, $00, $FF, $60, $04, $19, $BC, $00, $FF, $60, $05, $52, $41, $53, $40, $0C, $41, $00, $09, $64, $14, $4A, $34, $10, $00, $6A, $06, $61, $16 ;0x420
dc.b $32, $06, $60, $EE, $4A, $40, $66, $00, $FF, $68, $60, $02, $70, $FF, $39, $41, $00, $18, $2C, $1F, $4E, $75, $0C, $41, $00, $03, $64, $04, $7C, $03, $60, $0C ;0x440
dc.b $0C, $41, $00, $06, $67, $04, $7C, $06, $60, $02, $7C, $09, $4E, $75, $48, $E7, $80, $80, $41, $F9, $00, $FF, $DA, $DA, $70, $02, $42, $98, $42, $98, $42, $58 ;0x460
dc.b $51, $C8, $FF, $F8, $23, $FC, $00, $00, $44, $00, $00, $FF, $DA, $D4, $33, $FC, $00, $01, $00, $FF, $DA, $D8, $4C, $DF, $01, $01, $4E, $75, $48, $E7, $60, $C6 ;0x480
dc.b $43, $F9, $00, $FF, $DA, $DA, $74, $02, $4A, $51, $67, $10, $B0, $51, $67, $62, $D2, $FC, $00, $0A, $51, $CA, $FF, $F2, $70, $FF, $60, $58, $32, $80, $2A, $79 ;0x4A0
dc.b $00, $FF, $DA, $D4, $33, $4D, $00, $02, $34, $00, $61, $00, $03, $28, $32, $39, $00, $FF, $DA, $D8, $33, $41, $00, $04, $EB, $49, $2C, $68, $00, $04, $23, $68 ;0x4C0
dc.b $00, $0C, $00, $06, $20, $68, $00, $08, $70, $10, $0C, $41, $00, $20, $67, $02, $70, $08, $4E, $B9, $00, $00, $1F, $58, $4E, $B9, $00, $00, $23, $84, $30, $2E ;0x4E0
dc.b $00, $02, $E3, $48, $DA, $C0, $23, $CD, $00, $FF, $DA, $D4, $52, $79, $00, $FF, $DA, $D8, $42, $40, $4C, $DF, $63, $06, $4E, $75, $48, $E7, $02, $02, $4D, $F9 ;0x500
dc.b $00, $FF, $DA, $DA, $7C, $02, $B0, $5E, $67, $0A, $50, $4E, $51, $CE, $FF, $F8, $60, $00, $00, $08, $30, $1E, $34, $1E, $22, $5E, $4C, $DF, $40, $40, $4E, $75 ;0x520
dc.b $48, $E7, $F8, $00, $78, $02, $60, $0E, $48, $E7, $F8, $00, $78, $01, $60, $06 ;0x540
loc_0000D8A4:
MOVEM.l D4/D3/D2/D1/D0, -(A7)
CLR.w D4
LSL.w #2, D2
MOVE.w loc_0000D928(PC,D2.w), D0
MOVE.w loc_0000D92A(PC,D2.w), D1
MOVEQ #8, D2
MOVEQ #5, D3
JSR $00003252
MOVEM.l (A7)+, D0/D1/D2/D3/D4
RTS
dc.b $FF, $FF, $E2, $00, $E2, $01, $E2, $02, $E5, $2F, $00, $02, $E2, $07, $E2, $00, $E5, $2F, $E5, $2F, $00, $01, $E2, $05, $E2, $06, $E5, $2F, $E5, $2F, $00, $0C ;0x0 (0x0000D8C4-0x0000D928, Entry count: 0x64) [Unknown data]
dc.b $E2, $13, $E2, $14, $E2, $15, $E2, $03, $00, $0D, $E2, $13, $E2, $14, $E2, $15, $E2, $03, $00, $05, $E2, $0F, $E2, $10, $E2, $11, $E5, $2F, $00, $04, $E2, $0A ;0x20
dc.b $E2, $0B, $E2, $0C, $E2, $0B, $00, $06, $E2, $08, $E2, $0D, $E2, $02, $E2, $0E, $00, $03, $E2, $12, $E2, $02, $E2, $12, $E2, $04, $00, $00, $E2, $03, $E2, $04 ;0x40
dc.b $E5, $2F, $E5, $2F ;0x60
loc_0000D928:
dc.w $0001
loc_0000D92A:
dc.w $0003
dc.b $00, $1F, $00, $03, $00, $01, $00, $09, $00, $1F, $00, $09, $00, $01, $00, $0F, $00, $1F, $00, $0F, $3F, $3F, $3F, $3F, $3F, $3F, $3F, $00, $28, $30, $00, $00 ;0x0 (0x0000D92C-0x0000DB1E, Entry count: 0x1F2) [Unknown data]
dc.b $2D, $30, $00, $00, $48, $E7, $FF, $C2, $3E, $02, $CE, $FC, $00, $30, $2C, $79, $00, $FF, $DA, $B8, $DD, $C7, $4A, $16, $67, $00, $00, $D2, $3E, $02, $E5, $4F ;0x20
dc.b $3C, $3B, $70, $BA, $3E, $3B, $70, $B8, $30, $06, $32, $07, $08, $02, $00, $00, $67, $02, $52, $40, $41, $FA, $FF, $BE, $4E, $B9, $00, $00, $36, $28, $30, $06 ;0x40
dc.b $32, $07, $74, $08, $76, $05, $78, $03, $4E, $B9, $00, $00, $2F, $EC, $52, $46, $20, $6E, $00, $20, $4E, $B9, $00, $00, $35, $2A, $72, $06, $92, $40, $E2, $49 ;0x60
dc.b $30, $06, $D0, $41, $32, $07, $4E, $B9, $00, $00, $36, $28, $30, $06, $32, $07, $41, $FA, $FF, $8A, $54, $41, $4E, $B9, $00, $00, $36, $82, $41, $FA, $FF, $82 ;0x80
dc.b $52, $41, $4E, $B9, $00, $00, $36, $82, $30, $06, $52, $40, $32, $07, $52, $41, $43, $FA, $FE, $E6, $4A, $6E, $00, $02, $67, $16, $36, $2E, $00, $16, $78, $08 ;0xA0
dc.b $50, $89, $54, $89, $3A, $11, $0B, $03, $66, $06, $51, $CC, $FF, $F4, $60, $16, $54, $89, $76, $03, $30, $7C, $C0, $00, $34, $19, $4E, $B9, $00, $00, $1D, $EE ;0xC0
dc.b $52, $40, $51, $CB, $FF, $F4, $30, $06, $54, $40, $32, $07, $54, $41, $42, $82, $34, $2E, $00, $02, $76, $04, $4E, $B9, $00, $00, $37, $34, $52, $41, $42, $82 ;0xE0
dc.b $34, $2E, $00, $06, $76, $04, $4E, $B9, $00, $00, $37, $34, $4C, $DF, $43, $FF, $4E, $75, $48, $E7, $FF, $86, $2C, $79, $00, $FF, $DA, $B4, $2A, $4E, $DA, $FC ;0x100
dc.b $01, $B0, $42, $95, $42, $AD, $00, $04, $42, $AD, $00, $08, $7E, $08, $30, $16, $67, $22, $4A, $6E, $00, $02, $67, $1C, $7C, $02, $42, $45, $32, $35, $50, $00 ;0x120
dc.b $67, $0A, $B0, $41, $67, $06, $58, $45, $51, $CE, $FF, $F2, $3B, $80, $50, $00, $52, $75, $50, $02, $DC, $FC, $00, $30, $51, $CF, $FF, $D4, $7C, $02, $7E, $02 ;0x140
dc.b $42, $45, $4A, $75, $50, $00, $67, $46, $30, $07, $72, $14, $74, $0C, $76, $04, $78, $03, $4E, $B9, $00, $00, $2F, $EC, $34, $35, $50, $00, $0C, $42, $00, $07 ;0x160
dc.b $66, $0A, $74, $01, $4E, $B9, $00, $00, $A1, $DC, $60, $04, $61, $00, $00, $A2, $52, $40, $54, $41, $4E, $B9, $00, $00, $36, $28, $42, $82, $34, $35, $50, $02 ;0x180
dc.b $06, $40, $00, $09, $76, $01, $4E, $B9, $00, $00, $37, $34, $60, $10, $30, $07, $72, $14, $74, $0C, $76, $04, $42, $44, $4E, $B9, $00, $00, $1C, $FE, $06, $47 ;0x1A0
dc.b $00, $0C, $58, $45, $51, $CE, $FF, $9C, $4C, $DF, $61, $FF, $4E, $75, $48, $E7, $80, $80, $61, $00, $00, $48, $42, $80, $30, $28, $00, $36, $D1, $B9, $00, $FF ;0x1C0
dc.b $DA, $CA, $30, $28, $00, $38, $D1, $B9, $00, $FF, $DA, $CE, $4C, $DF, $01, $01, $4E, $75 ;0x1E0
loc_0000DB1E:
MOVE.l D2, -(A7)
CMPI.w #$0010, D2
BCC.b loc_0000DB34
MULU.w #$0030, D2 ;Predicted (Code-scan)
MOVEA.l $00FFDAB8, A0 ;Predicted (Code-scan)
ADDA.l D2, A0 ;Predicted (Code-scan)
BRA.b loc_0000DB44 ;Predicted (Code-scan)
loc_0000DB34:
ANDI.w #$000F, D2
MOVEA.l $00FFDAB4, A0
MULU.w #$0030, D2
ADDA.l D2, A0
loc_0000DB44:
MOVE.l (A7)+, D2
RTS
dc.b $2F, $02, $53, $42, $C4, $FC, $00, $40, $41, $F9, $00, $01, $51, $9A, $D1, $C2, $24, $1F, $4E, $75, $2F, $02, $53, $42, $C4, $FC, $00, $40, $41, $F9, $00, $01 ;0x0 (0x0000DB48-0x0000EDD4, Entry count: 0x128C) [Unknown data]
dc.b $51, $BE, $D1, $C2, $24, $1F, $4E, $75, $4E, $B9, $00, $00, $1F, $9C, $38, $00, $02, $40, $00, $03, $67, $00, $00, $AE, $0C, $40, $00, $01, $67, $00, $00, $4E ;0x20
dc.b $0C, $40, $00, $02, $67, $38, $42, $6E, $00, $18, $20, $4E, $61, $00, $12, $60, $4A, $40, $67, $1A, $34, $00, $61, $00, $C8, $B8, $20, $28, $00, $16, $08, $00 ;0x40
dc.b $00, $0C, $67, $0A, $3D, $7C, $00, $00, $00, $1A, $60, $00, $00, $B2, $61, $00, $06, $5C, $4A, $42, $6B, $08, $3D, $42, $00, $1A, $60, $00, $00, $A2, $3D, $7C ;0x60
dc.b $00, $02, $00, $18, $42, $6E, $00, $1A, $60, $00, $00, $94, $3D, $7C, $00, $01, $00, $18, $42, $42, $14, $16, $76, $13, $4E, $B9, $00, $00, $A8, $5E, $67, $14 ;0x80
dc.b $08, $04, $00, $04, $67, $0E, $3D, $43, $00, $1A, $3D, $7C, $00, $10, $00, $1C, $60, $00, $00, $6C, $76, $11, $4E, $B9, $00, $00, $A8, $5E, $67, $06, $08, $04 ;0xA0
dc.b $00, $05, $66, $0C, $76, $10, $4E, $B9, $00, $00, $A8, $5E, $67, $00, $FF, $78, $61, $00, $07, $56, $4A, $42, $6B, $A6, $3D, $43, $00, $1A, $3D, $42, $00, $1C ;0xC0
dc.b $60, $00, $00, $3C, $42, $6E, $00, $18, $20, $4E, $61, $00, $11, $C2, $4A, $40, $67, $1A, $34, $00, $61, $00, $C8, $1A, $20, $28, $00, $16, $08, $00, $00, $0C ;0xE0
dc.b $67, $0A, $3D, $7C, $00, $00, $00, $1A, $60, $00, $00, $14, $61, $00, $07, $1A, $4A, $42, $6B, $00, $FF, $32, $3D, $42, $00, $1A, $60, $00, $00, $02, $4E, $75 ;0x100
dc.b $48, $E7, $60, $02, $2C, $79, $00, $FF, $DA, $B4, $42, $40, $72, $08, $4A, $56, $67, $12, $4A, $6E, $00, $02, $67, $0C, $34, $2E, $00, $16, $02, $42, $00, $04 ;0x120
dc.b $66, $02, $52, $40, $DD, $FC, $00, $00, $00, $30, $51, $C9, $FF, $E2, $4C, $DF, $40, $06, $4E, $75, $48, $E7, $60, $04, $2A, $79, $00, $FF, $DA, $B8, $42, $40 ;0x140
dc.b $72, $05, $4A, $15, $67, $12, $4A, $6D, $00, $02, $67, $0C, $34, $2D, $00, $16, $02, $42, $00, $06, $66, $02, $52, $40, $DB, $FC, $00, $00, $00, $30, $51, $C9 ;0x160
dc.b $FF, $E2, $4C, $DF, $20, $06, $4E, $75, $48, $E7, $90, $80, $34, $2E, $00, $0A, $4A, $16, $67, $0C, $32, $2E, $00, $2C, $08, $01, $00, $06, $67, $02, $E3, $4A ;0x180
dc.b $72, $1A, $4E, $B9, $00, $00, $1F, $D8, $36, $00, $34, $2D, $00, $0C, $4A, $15, $67, $0C, $32, $2D, $00, $2C, $08, $01, $00, $06, $67, $02, $E3, $4A, $72, $1A ;0x1A0
dc.b $4E, $B9, $00, $00, $1F, $D8, $0C, $56, $00, $05, $66, $10, $32, $39, $00, $FF, $DA, $C4, $08, $01, $00, $03, $66, $18, $E3, $4B, $60, $14, $0C, $56, $00, $02 ;0x1C0
dc.b $66, $0E, $32, $39, $00, $FF, $DA, $C4, $08, $01, $00, $06, $66, $02, $E3, $4B, $96, $40, $6A, $18, $06, $43, $00, $C8, $6A, $04, $42, $43, $60, $0E, $4E, $B9 ;0x1E0
dc.b $00, $00, $1F, $9C, $02, $40, $00, $01, $52, $40, $36, $00, $34, $03, $0C, $56, $01, $00, $65, $0A, $30, $2E, $00, $2C, $08, $00, $00, $0C, $66, $3E, $36, $2E ;0x200
dc.b $00, $04, $E2, $4B, $30, $2E, $00, $02, $72, $07, $B6, $40, $65, $12, $72, $0C, $E2, $4B, $B6, $40, $65, $0A, $72, $19, $E2, $4B, $B6, $40, $65, $02, $72, $26 ;0x220
dc.b $20, $4E, $61, $00, $10, $48, $0C, $00, $00, $96, $66, $02, $E3, $49, $4E, $B9, $00, $00, $1F, $9C, $02, $40, $00, $FF, $B0, $41, $64, $0C, $32, $02, $E2, $49 ;0x240
dc.b $E3, $4A, $D4, $41, $72, $FF, $60, $02, $42, $41, $0C, $6D, $00, $02, $00, $18, $66, $02, $E2, $4A, $30, $39, $00, $FF, $DA, $C4, $08, $00, $00, $01, $67, $08 ;0x260
dc.b $0C, $55, $00, $08, $66, $02, $E4, $4A, $4C, $DF, $01, $09, $4E, $75, $48, $E7, $D0, $80, $4A, $15, $67, $10, $36, $2D, $00, $2C, $08, $03, $00, $0C, $67, $06 ;0x280
dc.b $42, $42, $60, $00, $00, $D2, $36, $2E, $00, $16, $08, $03, $00, $03, $67, $04, $76, $1A, $60, $76, $30, $2D, $00, $16, $02, $40, $30, $26, $67, $06, $36, $3C ;0x2A0
dc.b $01, $00, $60, $66, $30, $2E, $00, $14, $08, $03, $00, $0F, $67, $06, $36, $00, $E2, $4B, $D0, $43, $36, $00, $32, $2D, $00, $14, $20, $4D, $61, $00, $0F, $AE ;0x2C0
dc.b $0C, $00, $00, $9F, $66, $06, $34, $01, $E2, $4A, $D2, $42, $30, $03, $B2, $40, $65, $26, $36, $3C, $00, $CD, $34, $00, $E4, $4A, $D4, $40, $B2, $42, $65, $2A ;0x2E0
dc.b $36, $3C, $00, $99, $34, $00, $E3, $4A, $B2, $42, $65, $1E, $76, $66, $D4, $40, $B2, $42, $65, $16, $76, $1A, $60, $12, $36, $3C, $00, $E6, $34, $01, $E4, $4A ;0x300
dc.b $D4, $41, $B4, $40, $64, $04, $36, $3C, $01, $00, $30, $2E, $00, $16, $08, $00, $00, $06, $67, $06, $30, $03, $E4, $48, $96, $40, $0C, $55, $00, $03, $66, $10 ;0x320
dc.b $30, $39, $00, $FF, $DA, $C4, $08, $00, $00, $05, $66, $18, $E4, $4B, $60, $14, $0C, $56, $00, $03, $66, $0E, $30, $39, $00, $FF, $DA, $C4, $08, $00, $00, $05 ;0x340
dc.b $66, $02, $E3, $4B, $4E, $B9, $00, $00, $1F, $9C, $02, $40, $00, $FF, $74, $FF, $B0, $43, $65, $02, $42, $42, $4C, $DF, $01, $0B, $4E, $75, $48, $E7, $D0, $80 ;0x360
dc.b $36, $3C, $00, $80, $60, $00, $00, $2C, $48, $E7, $D0, $80, $4A, $16, $67, $0E, $0C, $6E, $00, $03, $00, $18, $66, $06, $36, $3C, $00, $80, $60, $14, $36, $2E ;0x380
dc.b $00, $10, $42, $41, $12, $2B, $00, $1A, $96, $41, $06, $43, $00, $80, $6A, $02, $42, $43, $C4, $C3, $EE, $8A, $72, $34, $4E, $B9, $00, $00, $1F, $D8, $32, $00 ;0x3A0
dc.b $34, $15, $0C, $42, $01, $00, $65, $12, $E0, $4A, $36, $2D, $00, $2C, $08, $03, $00, $0C, $67, $0A, $42, $41, $60, $00, $01, $1C, $06, $42, $00, $80, $42, $43 ;0x3C0
dc.b $16, $2B, $00, $3E, $4E, $B9, $00, $00, $A9, $0C, $4A, $40, $66, $04, $42, $41, $60, $16, $0C, $40, $00, $01, $66, $04, $E2, $49, $60, $0C, $0C, $40, $00, $02 ;0x3E0
dc.b $67, $06, $30, $01, $E2, $48, $D2, $40, $10, $2B, $00, $3F, $02, $00, $00, $07, $0C, $00, $00, $02, $67, $1A, $0C, $00, $00, $03, $67, $22, $0C, $00, $00, $01 ;0x400
dc.b $66, $28, $30, $2D, $00, $16, $08, $00, $00, $08, $67, $1E, $42, $41, $60, $1A, $30, $2D, $00, $16, $08, $00, $00, $09, $67, $10, $42, $41, $60, $0C, $30, $2D ;0x420
dc.b $00, $16, $08, $00, $00, $0A, $67, $02, $42, $41, $10, $2B, $00, $3F, $02, $00, $00, $08, $67, $0C, $30, $2D, $00, $16, $08, $00, $00, $0E, $67, $02, $E2, $49 ;0x440
dc.b $20, $4D, $61, $00, $0E, $28, $0C, $00, $00, $9D, $66, $02, $E2, $49, $0C, $55, $00, $07, $64, $02, $E2, $49, $0C, $56, $00, $04, $66, $14, $30, $39, $00, $FF ;0x460
dc.b $DA, $C4, $08, $00, $00, $04, $66, $00, $00, $6C, $E5, $49, $60, $00, $00, $66, $30, $39, $00, $FF, $DA, $C4, $0C, $55, $00, $04, $66, $0A, $08, $00, $00, $04 ;0x480
dc.b $66, $52, $E2, $49, $60, $4E, $0C, $56, $00, $03, $66, $0A, $08, $00, $00, $05, $66, $42, $E5, $49, $60, $3E, $0C, $55, $00, $03, $66, $0A, $08, $00, $00, $05 ;0x4A0
dc.b $66, $32, $E2, $49, $60, $2E, $0C, $56, $00, $02, $66, $0A, $08, $00, $00, $06, $66, $22, $E5, $49, $60, $1E, $0C, $55, $00, $02, $66, $0A, $08, $00, $00, $06 ;0x4C0
dc.b $66, $12, $E2, $49, $60, $0E, $0C, $55, $00, $06, $66, $08, $08, $00, $00, $02, $66, $02, $42, $41, $34, $01, $4C, $DF, $01, $0B, $4E, $75, $48, $E7, $D0, $00 ;0x4E0
dc.b $76, $40, $60, $2A, $48, $E7, $D0, $00, $4A, $16, $67, $0E, $0C, $6E, $00, $03, $00, $18, $66, $06, $36, $3C, $00, $80, $60, $14, $36, $2E, $00, $10, $42, $41 ;0x500
dc.b $12, $2B, $00, $1A, $96, $41, $06, $43, $00, $40, $6A, $02, $42, $43, $C4, $C3, $EC, $8A, $32, $02, $34, $15, $0C, $42, $01, $00, $65, $12, $E0, $4A, $36, $2D ;0x520
dc.b $00, $2C, $08, $03, $00, $0C, $67, $0A, $42, $42, $60, $00, $00, $F8, $06, $42, $00, $80, $42, $43, $16, $2B, $00, $3E, $4E, $B9, $00, $00, $A9, $0C, $4A, $40 ;0x540
dc.b $66, $06, $42, $42, $60, $00, $00, $DE, $0C, $40, $00, $01, $66, $04, $E2, $49, $60, $08, $0C, $40, $00, $02, $67, $02, $E3, $49, $10, $2B, $00, $3F, $02, $00 ;0x560
dc.b $00, $08, $67, $0C, $30, $2D, $00, $16, $08, $00, $00, $0E, $67, $02, $E2, $49, $0C, $56, $00, $07, $64, $02, $E2, $49, $30, $39, $00, $FF, $DA, $C4, $0C, $56 ;0x580
dc.b $00, $04, $66, $0E, $08, $00, $00, $04, $66, $00, $00, $88, $E5, $49, $60, $00, $00, $82, $0C, $55, $00, $04, $66, $0E, $08, $00, $00, $04, $66, $00, $00, $74 ;0x5A0
dc.b $E2, $49, $60, $00, $00, $6E, $0C, $56, $00, $03, $66, $0C, $08, $00, $00, $05, $66, $00, $00, $60, $E5, $49, $60, $5A, $0C, $55, $00, $03, $66, $0E, $08, $00 ;0x5C0
dc.b $00, $05, $66, $00, $00, $4E, $E2, $49, $60, $00, $00, $48, $0C, $56, $00, $02, $66, $0C, $08, $00, $00, $06, $66, $00, $00, $3A, $E5, $49, $60, $34, $0C, $55 ;0x5E0
dc.b $00, $02, $66, $0C, $08, $00, $00, $06, $66, $00, $00, $28, $E2, $49, $60, $22, $0C, $55, $00, $05, $66, $00, $00, $0C, $08, $00, $00, $03, $66, $14, $42, $42 ;0x600
dc.b $60, $22, $0C, $55, $00, $06, $66, $0A, $08, $00, $00, $02, $66, $04, $42, $42, $60, $12, $42, $42, $4E, $B9, $00, $00, $1F, $9C, $02, $40, $00, $FF, $B2, $40 ;0x620
dc.b $65, $02, $74, $FF, $4C, $DF, $00, $0B, $4E, $75, $48, $E7, $D0, $00, $36, $2E, $00, $10, $42, $41, $12, $2B, $00, $1A, $96, $41, $06, $43, $00, $40, $6A, $02 ;0x640
dc.b $42, $43, $C4, $C3, $EC, $8A, $32, $02, $42, $42, $4E, $B9, $00, $00, $1F, $9C, $02, $40, $00, $FF, $B2, $40, $65, $02, $74, $FF, $4C, $DF, $00, $0B, $4E, $75 ;0x660
dc.b $34, $2E, $00, $24, $6B, $00, $00, $46, $0C, $42, $00, $10, $64, $00, $00, $3E, $61, $00, $F9, $44, $4A, $68, $00, $00, $67, $00, $00, $32, $4A, $68, $00, $02 ;0x680
dc.b $67, $00, $00, $2A, $4E, $75, $34, $39, $00, $FF, $DA, $F8, $6B, $1E, $0C, $42, $00, $10, $64, $00, $00, $18, $61, $00, $F9, $1E, $4A, $68, $00, $00, $67, $00 ;0x6A0
dc.b $00, $0C, $4A, $68, $00, $02, $67, $00, $00, $04, $4E, $75, $61, $00, $00, $22, $4A, $42, $66, $04, $74, $FF, $60, $16, $4E, $B9, $00, $00, $1F, $9C, $C0, $C2 ;0x6C0
dc.b $48, $40, $E3, $48, $41, $F9, $00, $FF, $DB, $4E, $34, $30, $00, $00, $4E, $75, $48, $E7, $0C, $06, $2A, $79, $00, $FF, $DA, $B8, $4D, $F9, $00, $FF, $DB, $4E ;0x6E0
dc.b $7A, $05, $42, $44, $42, $42, $4A, $6D, $00, $00, $67, $0A, $4A, $6D, $00, $02, $67, $04, $3C, $C4, $52, $42, $52, $44, $DA, $FC, $00, $30, $51, $CD, $FF, $E8 ;0x700
dc.b $4C, $DF, $60, $30, $4E, $75, $48, $E7, $0C, $04, $2A, $79, $00, $FF, $DA, $B8, $7A, $05, $42, $44, $74, $FF, $30, $3C, $27, $0F, $4A, $6D, $00, $00, $67, $12 ;0x720
dc.b $4A, $6D, $00, $02, $67, $0C, $B0, $6D, $00, $02, $63, $06, $30, $2D, $00, $02, $34, $04, $52, $44, $DA, $FC, $00, $30, $51, $CD, $FF, $E0, $4A, $42, $6A, $04 ;0x740
dc.b $61, $00, $FF, $6A, $4C, $DF, $20, $30, $4E, $75, $48, $E7, $0C, $04, $2A, $79, $00, $FF, $DA, $B8, $7A, $05, $42, $44, $74, $FF, $42, $40, $4A, $6D, $00, $00 ;0x760
dc.b $67, $12, $4A, $6D, $00, $02, $67, $0C, $B0, $6D, $00, $02, $64, $06, $30, $2D, $00, $02, $34, $04, $52, $44, $DA, $FC, $00, $30, $51, $CD, $FF, $E0, $4A, $42 ;0x780
dc.b $6A, $04, $61, $00, $FF, $28, $4C, $DF, $20, $30, $4E, $75, $48, $E7, $0C, $04, $2A, $79, $00, $FF, $DA, $B8, $7A, $05, $42, $44, $74, $FF, $42, $40, $4A, $6D ;0x7A0
dc.b $00, $00, $67, $12, $4A, $6D, $00, $02, $67, $0C, $B0, $6D, $00, $06, $64, $06, $30, $2D, $00, $06, $34, $04, $52, $44, $DA, $FC, $00, $30, $51, $CD, $FF, $E0 ;0x7C0
dc.b $4A, $42, $6A, $04, $61, $00, $FE, $E6, $4C, $DF, $20, $30, $4E, $75, $48, $E7, $0C, $04, $2A, $79, $00, $FF, $DA, $B8, $7A, $05, $42, $40, $74, $FF, $4A, $6D ;0x7E0
dc.b $00, $00, $67, $14, $4A, $6D, $00, $02, $66, $0E, $38, $2D, $00, $2C, $08, $04, $00, $02, $66, $04, $34, $00, $60, $0A, $52, $40, $DA, $FC, $00, $30, $51, $CD ;0x800
dc.b $FF, $DE, $4C, $DF, $20, $30, $4E, $75, $61, $00, $00, $22, $4A, $42, $66, $04, $74, $FF, $60, $16, $4E, $B9, $00, $00, $1F, $9C, $C0, $C2, $48, $40, $E3, $48 ;0x820
dc.b $41, $F9, $00, $FF, $DB, $4E, $34, $30, $00, $00, $4E, $75, $48, $E7, $0C, $06, $2A, $79, $00, $FF, $DA, $B4, $4D, $F9, $00, $FF, $DB, $4E, $7A, $08, $78, $10 ;0x840
dc.b $42, $42, $4A, $6D, $00, $00, $67, $0A, $4A, $6D, $00, $02, $67, $04, $3C, $C4, $52, $42, $52, $44, $DA, $FC, $00, $30, $51, $CD, $FF, $E8, $4C, $DF, $60, $30 ;0x860
dc.b $4E, $75, $48, $E7, $0C, $04, $2A, $79, $00, $FF, $DA, $B4, $7A, $08, $78, $10, $74, $FF, $30, $3C, $27, $0F, $4A, $6D, $00, $00, $67, $12, $4A, $6D, $00, $02 ;0x880
dc.b $67, $0C, $B0, $6D, $00, $02, $63, $06, $30, $2D, $00, $02, $34, $04, $52, $44, $DA, $FC, $00, $30, $51, $CD, $FF, $E0, $4C, $DF, $20, $30, $4E, $75, $48, $E7 ;0x8A0
dc.b $04, $04, $2A, $79, $00, $FF, $DA, $B4, $7A, $08, $42, $42, $4A, $6D, $00, $00, $67, $10, $30, $2D, $00, $02, $67, $0A, $E5, $48, $B0, $6D, $00, $04, $64, $02 ;0x8C0
dc.b $52, $42, $DA, $FC, $00, $30, $51, $CD, $FF, $E4, $4C, $DF, $20, $20, $4E, $75, $48, $E7, $C0, $C0, $70, $08, $72, $10, $42, $42, $20, $79, $00, $FF, $DA, $B4 ;0x8E0
dc.b $43, $F9, $00, $FF, $DB, $4E, $4A, $68, $00, $00, $67, $12, $4A, $68, $00, $02, $66, $0C, $0C, $68, $00, $69, $00, $00, $67, $04, $32, $C1, $52, $42, $52, $41 ;0x900
dc.b $D0, $FC, $00, $30, $51, $C8, $FF, $E0, $32, $BC, $FF, $FF, $4A, $42, $66, $04, $74, $FF, $60, $16, $4E, $B9, $00, $00, $1F, $9C, $C0, $C2, $48, $40, $E3, $48 ;0x920
dc.b $43, $F9, $00, $FF, $DB, $4E, $34, $31, $00, $00, $4C, $DF, $03, $03, $4E, $75, $41, $F9, $00, $FF, $30, $98, $20, $EA, $00, $20, $42, $80, $0C, $6A, $01, $00 ;0x940
dc.b $00, $00, $64, $0E, $4A, $6A, $00, $1E, $67, $08, $30, $2A, $00, $1E, $20, $C0, $70, $01, $4E, $75, $48, $E7, $90, $A0, $61, $00, $F6, $5C, $24, $48, $61, $D0 ;0x960
dc.b $42, $83, $36, $01, $20, $C3, $0C, $42, $00, $10, $65, $14, $4A, $40, $66, $08, $41, $F9, $00, $01, $F2, $A2, $60, $0E, $41, $F9, $00, $01, $F2, $B4, $60, $06 ;0x980
dc.b $41, $F9, $00, $01, $F2, $F8, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $05, $09, $4E, $75, $48, $E7, $80, $A0, $61, $00, $F6, $1C, $24, $48, $61, $90 ;0x9A0
dc.b $0C, $42, $00, $10, $65, $08, $41, $F9, $00, $01, $F2, $DA, $60, $06, $41, $F9, $00, $01, $F2, $E8, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $05, $01 ;0x9C0
dc.b $4E, $75, $48, $E7, $80, $80, $41, $FA, $00, $10, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $01, $01, $4E, $75, $7E, $B9, $95, $72, $7A, $BA, $A1, $92 ;0x9E0
dc.b $97, $D8, $D8, $00, $48, $E7, $80, $A0, $61, $00, $F5, $CC, $24, $48, $61, $00, $FF, $40, $0C, $42, $00, $10, $65, $14, $4A, $40, $66, $08, $41, $F9, $00, $01 ;0xA00
dc.b $F2, $C8, $60, $0E, $41, $F9, $00, $01, $F2, $D0, $60, $06, $41, $F9, $00, $01, $F3, $08, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $05, $01, $4E, $75 ;0xA20
dc.b $48, $E7, $80, $A0, $61, $00, $F5, $90, $24, $48, $61, $00, $FF, $04, $4A, $40, $66, $08, $41, $F9, $00, $01, $F6, $6E, $60, $06, $41, $F9, $00, $01, $F6, $7A ;0xA40
dc.b $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $05, $01, $4E, $75, $48, $E7, $80, $80, $61, $00, $F5, $62, $30, $28, $00, $02, $90, $41, $6A, $02, $42, $40 ;0xA60
dc.b $31, $40, $00, $02, $0C, $42, $00, $10, $64, $04, $61, $00, $F3, $7C, $4C, $DF, $01, $01, $4E, $75, $48, $E7, $80, $80, $61, $00, $F5, $3C, $42, $68, $00, $02 ;0xA80
dc.b $42, $68, $00, $16, $0C, $42, $00, $10, $64, $08, $42, $68, $00, $2C, $61, $00, $F3, $58, $4C, $DF, $01, $01, $4E, $75, $48, $E7, $F1, $84, $3E, $02, $76, $03 ;0xAA0
dc.b $61, $00, $00, $98, $61, $00, $F5, $10, $2A, $48, $32, $2D, $00, $04, $EC, $49, $4E, $B9, $00, $00, $1F, $9C, $02, $40, $00, $03, $D2, $40, $58, $41, $61, $8E ;0xAC0
dc.b $24, $4D, $61, $00, $FE, $6C, $42, $82, $34, $01, $20, $C2, $4A, $40, $66, $06, $41, $FA, $00, $42, $60, $04, $41, $FA, $00, $4E, $70, $06, $4E, $B9, $00, $00 ;0xAE0
dc.b $38, $50, $4A, $6D, $00, $02, $66, $26, $34, $07, $0C, $42, $00, $10, $65, $06, $61, $00, $01, $48, $60, $04, $61, $00, $F2, $F0, $61, $00, $FE, $E8, $61, $00 ;0xB00
dc.b $01, $60, $0C, $47, $00, $10, $65, $06, $34, $15, $61, $00, $F4, $86, $4C, $DF, $21, $8F, $4E, $75, $06, $4E, $1A, $01, $0E, $46, $04, $00, $AC, $73, $BF, $97 ;0xB20
dc.b $01, $AE, $42, $3E, $1B, $00, $06, $04, $00, $4E, $1A, $01, $0E, $46, $04, $00, $AC, $73, $BF, $97, $01, $AE, $42, $3E, $1B, $00, $48, $E7, $E0, $84, $61, $00 ;0xB40
dc.b $F4, $76, $0C, $42, $00, $10, $65, $00, $00, $B4, $2A, $48, $0C, $43, $00, $01, $67, $38, $0C, $43, $00, $02, $67, $54, $0C, $43, $00, $03, $67, $7E, $30, $6D ;0xB60
dc.b $00, $2A, $42, $41, $74, $02, $30, $3C, $FF, $00, $4E, $B9, $00, $00, $27, $DE, $4E, $45, $00, $02, $30, $3C, $01, $00, $4E, $B9, $00, $00, $27, $DE, $4E, $45 ;0xB80
dc.b $00, $02, $51, $CA, $FF, $E2, $60, $00, $00, $AC, $30, $6D, $00, $2A, $74, $02, $4E, $B9, $00, $00, $2A, $82, $4E, $45, $00, $02, $4E, $B9, $00, $00, $2A, $9C ;0xBA0
dc.b $4E, $45, $00, $02, $51, $CA, $FF, $EA, $60, $00, $00, $8A, $30, $6D, $00, $2A, $42, $40, $32, $3C, $FF, $00, $74, $03, $4E, $B9, $00, $00, $27, $DE, $4E, $45 ;0xBC0
dc.b $00, $01, $51, $CA, $FF, $F4, $32, $3C, $01, $00, $74, $03, $4E, $B9, $00, $00, $27, $DE, $4E, $45, $00, $01, $51, $CA, $FF, $F4, $60, $58, $30, $6D, $00, $2A ;0xBE0
dc.b $74, $02, $4E, $B9, $00, $00, $2A, $82, $4E, $45, $00, $01, $4E, $B9, $00, $00, $2A, $9C, $4E, $45, $00, $01, $51, $CA, $FF, $EA, $60, $38, $61, $00, $F1, $36 ;0xC00
dc.b $0C, $43, $00, $03, $67, $16, $4E, $B9, $00, $00, $14, $16, $00, $00, $F9, $02, $4E, $45, $00, $0A, $4E, $46, $00, $00, $F9, $02, $60, $14, $4E, $B9, $00, $00 ;0xC20
dc.b $14, $16, $00, $00, $F9, $02, $4E, $45, $00, $03, $4E, $46, $00, $00, $F9, $02, $61, $00, $F1, $0A, $4C, $DF, $21, $07, $4E, $75, $48, $E7, $00, $84, $0C, $42 ;0xC40
dc.b $00, $10, $65, $16, $61, $00, $F3, $70, $2A, $48, $30, $6D, $00, $2A, $4E, $B9, $00, $00, $27, $C0, $3B, $7C, $FF, $FF, $00, $2A, $4C, $DF, $21, $00, $4E, $75 ;0xC60
dc.b $48, $E7, $E0, $84, $61, $00, $F3, $50, $2A, $48, $0C, $42, $00, $10, $64, $70, $42, $6D, $00, $16, $42, $6D, $00, $2C, $0C, $15, $00, $13, $66, $4A, $42, $42 ;0xC80
dc.b $72, $05, $61, $00, $F3, $32, $4A, $50, $67, $12, $30, $28, $00, $16, $08, $80, $00, $07, $67, $08, $02, $40, $CF, $FF, $31, $40, $00, $16, $52, $42, $51, $C9 ;0xCA0
dc.b $FF, $E2, $74, $10, $72, $08, $61, $00, $F3, $0E, $4A, $50, $67, $12, $30, $28, $00, $16, $08, $80, $00, $07, $67, $08, $02, $40, $CF, $FF, $31, $40, $00, $16 ;0xCC0
dc.b $52, $42, $51, $C9, $FF, $E2, $60, $2E, $0C, $15, $00, $0E, $66, $10, $30, $39, $00, $FF, $DA, $C4, $08, $80, $00, $0F, $33, $C0, $00, $FF, $DA, $C4, $60, $16 ;0xCE0
dc.b $42, $6D, $00, $16, $0C, $55, $00, $69, $66, $0C, $34, $2D, $00, $1A, $61, $00, $F2, $C6, $42, $68, $00, $2C, $4C, $DF, $21, $07, $4E, $75, $48, $E7, $E0, $C2 ;0xD00
dc.b $61, $00, $F2, $B4, $2C, $48, $4A, $6E, $00, $02, $66, $68, $0C, $42, $00, $10, $64, $0A, $30, $2E, $00, $2C, $08, $00, $00, $02, $66, $58, $0C, $41, $03, $E7 ;0xD20
dc.b $66, $08, $3D, $6E, $00, $04, $00, $02, $60, $08, $3D, $41, $00, $02, $42, $6E, $00, $16, $0C, $42, $00, $10, $64, $06, $61, $00, $F0, $AE, $60, $1C, $30, $16 ;0xD40
dc.b $61, $00, $EF, $C4, $20, $49, $32, $40, $30, $2E, $00, $2C, $32, $2E, $00, $2E, $4E, $B9, $00, $00, $27, $68, $3D, $48, $00, $2A, $24, $4E, $61, $00, $FB, $D2 ;0xD60
dc.b $4A, $40, $66, $08, $41, $F9, $00, $01, $F3, $AA, $60, $0E, $41, $F9, $00, $01, $F3, $B6, $60, $06, $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9, $00, $00 ;0xD80
dc.b $38, $50, $4C, $DF, $43, $07, $4E, $75, $48, $E7, $E0, $C2, $61, $00, $F2, $28, $2C, $48, $4A, $6E, $00, $02, $67, $32, $30, $2E, $00, $16, $08, $80, $00, $00 ;0xDA0
dc.b $67, $28, $3D, $40, $00, $16, $0C, $42, $00, $10, $64, $04, $61, $00, $F0, $3A, $24, $4E, $61, $00, $FB, $7C, $4A, $40, $66, $08, $41, $F9, $00, $01, $F3, $F4 ;0xDC0
dc.b $60, $0E, $41, $F9, $00, $01, $F4, $02, $60, $06, $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $43, $07, $4E, $75, $48, $E7 ;0xDE0
dc.b $E0, $C2, $61, $00, $F1, $D2, $2C, $48, $4A, $6E, $00, $02, $67, $32, $30, $2E, $00, $16, $08, $80, $00, $02, $67, $28, $3D, $40, $00, $16, $0C, $42, $00, $10 ;0xE00
dc.b $64, $04, $61, $00, $EF, $E4, $24, $4E, $61, $00, $FB, $26, $4A, $40, $66, $08, $41, $F9, $00, $01, $F5, $0C, $60, $0E, $41, $F9, $00, $01, $F5, $18, $60, $06 ;0xE20
dc.b $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $43, $07, $4E, $75, $48, $E7, $E0, $C2, $61, $00, $F1, $7C, $2C, $48, $4A, $6E ;0xE40
dc.b $00, $02, $67, $32, $30, $2E, $00, $16, $08, $80, $00, $01, $67, $28, $3D, $40, $00, $16, $0C, $42, $00, $10, $64, $04, $61, $00, $EF, $8E, $24, $4E, $61, $00 ;0xE60
dc.b $FA, $D0, $4A, $40, $66, $08, $41, $F9, $00, $01, $F7, $10, $60, $0E, $41, $F9, $00, $01, $F7, $1A, $60, $06, $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9 ;0xE80
dc.b $00, $00, $38, $50, $4C, $DF, $43, $07, $4E, $75, $48, $E7, $E0, $C2, $61, $00, $F1, $26, $2C, $48, $4A, $6E, $00, $02, $67, $00, $00, $66, $36, $2E, $00, $16 ;0xEA0
dc.b $02, $6E, $FF, $F9, $00, $16, $02, $43, $00, $06, $67, $54, $0C, $42, $00, $10, $64, $04, $61, $00, $EF, $34, $24, $4E, $61, $00, $FA, $76, $38, $00, $08, $83 ;0xEC0
dc.b $00, $01, $67, $1A, $4A, $44, $66, $08, $41, $F9, $00, $01, $F7, $10, $60, $06, $41, $F9, $00, $01, $F7, $1A, $70, $06, $4E, $B9, $00, $00, $38, $50, $08, $83 ;0xEE0
dc.b $00, $02, $67, $2A, $4A, $44, $66, $08, $41, $F9, $00, $01, $F5, $0C, $60, $06, $41, $F9, $00, $01, $F5, $18, $70, $06, $4E, $B9, $00, $00, $38, $50, $60, $0E ;0xF00
dc.b $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $43, $07, $4E, $75, $48, $E7, $E0, $C2, $61, $00, $F0, $9C, $2C, $48, $4A, $6E ;0xF20
dc.b $00, $02, $67, $00, $00, $8C, $36, $2E, $00, $16, $02, $6E, $FF, $87, $00, $16, $02, $43, $00, $78, $67, $7A, $0C, $42, $00, $10, $64, $04, $61, $00, $EE, $AA ;0xF40
dc.b $24, $4E, $61, $00, $F9, $EC, $38, $00, $08, $83, $00, $03, $67, $1A, $4A, $44, $66, $08, $41, $F9, $00, $01, $F5, $26, $60, $06, $41, $F9, $00, $01, $F5, $38 ;0xF60
dc.b $70, $06, $4E, $B9, $00, $00, $38, $50, $08, $83, $00, $05, $67, $1A, $4A, $44, $66, $08, $41, $F9, $00, $01, $F5, $6A, $60, $06, $41, $F9, $00, $01, $F5, $76 ;0xF80
dc.b $70, $06, $4E, $B9, $00, $00, $38, $50, $08, $83, $00, $04, $66, $06, $08, $83, $00, $06, $67, $2A, $4A, $44, $66, $08, $41, $F9, $00, $01, $F5, $4C, $60, $06 ;0xFA0
dc.b $41, $F9, $00, $01, $F5, $5A, $70, $06, $4E, $B9, $00, $00, $38, $50, $60, $0E, $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF ;0xFC0
dc.b $43, $07, $4E, $75, $48, $E7, $80, $A4, $61, $00, $EF, $EC, $2A, $48, $30, $2D, $00, $02, $67, $56, $D0, $41, $B0, $6D, $00, $04, $65, $04, $30, $2D, $00, $04 ;0xFE0
dc.b $32, $00, $92, $6D, $00, $02, $3B, $40, $00, $02, $4A, $41, $67, $30, $0C, $42, $00, $10, $64, $04, $61, $00, $ED, $F2, $70, $51, $4E, $B9, $00, $00, $23, $76 ;0x1000
dc.b $24, $4D, $61, $00, $F9, $2C, $48, $C1, $20, $81, $4A, $40, $66, $08, $41, $F9, $00, $01, $F3, $D2, $60, $1A, $41, $F9, $00, $01, $F3, $E2, $60, $12, $4A, $43 ;0x1020
dc.b $67, $16, $41, $F9, $00, $01, $F3, $9E, $60, $06, $41, $F9, $00, $01, $F2, $96, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $25, $01, $4E, $75, $48, $E7 ;0x1040
dc.b $80, $A4, $61, $00, $EF, $72, $2A, $48, $30, $2D, $00, $02, $67, $48, $30, $2D, $00, $06, $D0, $41, $B0, $6D, $00, $08, $65, $04, $30, $2D, $00, $08, $3B, $40 ;0x1060
dc.b $00, $06, $0C, $42, $00, $10, $64, $04, $61, $00, $ED, $7E, $70, $51, $4E, $B9, $00, $00, $23, $76, $24, $4D, $61, $00, $F8, $B8, $4A, $40, $66, $08, $41, $F9 ;0x1080
dc.b $00, $01, $F6, $A2, $60, $06, $41, $F9, $00, $01, $F6, $B0, $70, $06, $4E, $B9, $00, $00, $38, $50, $60, $0E, $41, $F9, $00, $01, $F2, $96, $70, $06, $4E, $B9 ;0x10A0
dc.b $00, $00, $38, $50, $4C, $DF, $25, $01, $4E, $75, $48, $E7, $E0, $C2, $61, $00, $EF, $06, $2C, $48, $4A, $6E, $00, $02, $67, $2C, $30, $2E, $00, $0A, $D2, $40 ;0x10C0
dc.b $3D, $41, $00, $0A, $92, $40, $67, $1E, $24, $4E, $61, $00, $F8, $64, $48, $C1, $20, $81, $4A, $40, $66, $08, $41, $F9, $00, $01, $F6, $20, $60, $0E, $41, $F9 ;0x10E0
dc.b $00, $01, $F6, $30, $60, $06, $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $43, $07, $4E, $75, $48, $E7, $E0, $C2, $61, $00 ;0x1100
dc.b $EE, $B6, $2C, $48, $4A, $6E, $00, $02, $67, $32, $30, $2E, $00, $0A, $34, $00, $90, $41, $6A, $02, $42, $40, $3D, $40, $00, $0A, $94, $40, $67, $1E, $24, $4E ;0x1120
dc.b $61, $00, $F8, $0E, $48, $C2, $20, $82, $4A, $40, $66, $08, $41, $F9, $00, $01, $F3, $7C, $60, $0E, $41, $F9, $00, $01, $F3, $8C, $60, $06, $41, $F9, $00, $01 ;0x1140
dc.b $F3, $9E, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $43, $07, $4E, $75, $48, $E7, $E0, $C2, $61, $00, $EE, $60, $2C, $48, $4A, $6E, $00, $02, $67, $32 ;0x1160
dc.b $30, $2E, $00, $0C, $34, $00, $90, $41, $6A, $02, $42, $40, $3D, $40, $00, $0C, $94, $40, $67, $1E, $24, $4E, $61, $00, $F7, $B8, $48, $C2, $20, $82, $4A, $40 ;0x1180
dc.b $66, $08, $41, $F9, $00, $01, $F3, $5A, $60, $0E, $41, $F9, $00, $01, $F3, $6A, $60, $06, $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9, $00, $00, $38, $50 ;0x11A0
dc.b $4C, $DF, $43, $07, $4E, $75, $48, $E7, $E0, $C2, $61, $00, $EE, $0A, $2C, $48, $4A, $6E, $00, $02, $67, $36, $30, $2E, $00, $14, $34, $00, $90, $41, $0C, $40 ;0x11C0
dc.b $00, $08, $64, $02, $70, $08, $3D, $40, $00, $14, $94, $40, $67, $1E, $24, $4E, $61, $00, $F7, $5E, $48, $C2, $20, $82, $4A, $40, $66, $08, $41, $F9, $00, $01 ;0x11E0
dc.b $F4, $5E, $60, $0E, $41, $F9, $00, $01, $F4, $70, $60, $06, $41, $F9, $00, $01, $F3, $9E, $70, $06, $4E, $B9, $00, $00, $38, $50, $4C, $DF, $43, $07, $4E, $75 ;0x1200
dc.b $48, $E7, $C0, $80, $20, $79, $00, $FF, $DA, $FA, $70, $10, $42, $41, $4E, $B9, $00, $00, $1F, $58, $4C, $DF, $01, $03, $4E, $75, $48, $E7, $E0, $00, $34, $3C ;0x1220
dc.b $00, $08, $60, $38, $48, $E7, $E0, $00, $34, $3C, $00, $0E, $60, $2E, $48, $E7, $E0, $00, $34, $3C, $00, $EC, $60, $24, $48, $E7, $E0, $00, $34, $3C, $00, $EE ;0x1240
dc.b $60, $1A, $48, $E7, $E0, $00, $34, $3C, $0E, $00, $60, $10, $48, $E7, $E0, $00, $34, $3C, $02, $22, $60, $06, $48, $E7, $E0, $00, $42, $42, $70, $0F, $72, $02 ;0x1260
dc.b $4E, $B9, $00, $00, $1F, $7A, $4C, $DF, $00, $07, $4E, $75 ;0x1280
CLR.w D0
CMPI.w #$0100, (A0)
BCS.b loc_0000EDF4
MOVEM.l A0/D2, -(A7)
CLR.w D2
MOVE.b (A0), D2
JSR $0000A1F2
CLR.w D0
MOVE.b $18(A0), D0
MOVEM.l (A7)+, D2/A0
loc_0000EDF4:
RTS
CLR.w D0
CMPI.w #$0100, (A0)
BCS.b loc_0000EE16
MOVEM.l A0/D2, -(A7)
CLR.w D2
MOVE.b (A0), D2
JSR $0000A1F2
CLR.w D0
MOVE.b $14(A0), D0
MOVEM.l (A7)+, D2/A0
loc_0000EE16:
RTS
dc.b $42, $40, $0C, $50, $01, $00, $65, $18, $48, $E7, $20, $80, $42, $42, $14, $10, $4E, $B9, $00, $00, $A1, $F2, $42, $40, $10, $28, $00, $15, $4C, $DF, $01, $04 ;0x0 (0x0000EE18-0x0000F000, Entry count: 0x1E8) [Unknown data]
dc.b $4E, $75, $42, $40, $0C, $50, $01, $00, $65, $18, $48, $E7, $20, $80, $42, $42, $14, $10, $4E, $B9, $00, $00, $A1, $F2, $42, $40, $10, $28, $00, $17, $4C, $DF ;0x20
dc.b $01, $04, $4E, $75, $48, $E7, $00, $0E, $48, $E7, $80, $80, $30, $3C, $01, $00, $4E, $B9, $00, $00, $3B, $24, $28, $48, $4C, $DF, $01, $01, $45, $EE, $00, $18 ;0x40
dc.b $42, $9A, $42, $9A, $42, $47, $42, $42, $14, $16, $36, $2E, $00, $16, $08, $03, $00, $0B, $66, $00, $00, $60, $38, $2E, $00, $06, $76, $13, $4E, $B9, $00, $00 ;0x60
dc.b $A8, $5E, $67, $08, $B8, $40, $65, $04, $08, $C7, $00, $01, $76, $14, $4E, $B9, $00, $00, $A8, $5E, $67, $08, $B8, $40, $65, $04, $08, $C7, $00, $00, $76, $12 ;0x80
dc.b $4E, $B9, $00, $00, $A8, $5E, $67, $08, $B8, $40, $65, $04, $08, $C7, $00, $04, $76, $11, $4E, $B9, $00, $00, $A8, $5E, $67, $08, $B8, $40, $65, $04, $08, $C7 ;0xA0
dc.b $00, $05, $76, $10, $4E, $B9, $00, $00, $A8, $5E, $67, $08, $B8, $40, $65, $04, $08, $C7, $00, $06, $30, $3C, $00, $9C, $4E, $B9, $00, $00, $A5, $50, $4A, $40 ;0xC0
dc.b $67, $04, $08, $C7, $00, $02, $30, $3C, $00, $56, $4E, $B9, $00, $00, $A5, $50, $4A, $40, $67, $04, $08, $C7, $00, $03, $30, $3C, $00, $29, $4E, $B9, $00, $00 ;0xE0
dc.b $A5, $50, $4A, $40, $67, $04, $08, $C7, $00, $07, $38, $87, $67, $00, $01, $A8, $2A, $79, $00, $FF, $DA, $B8, $7E, $05, $42, $46, $7A, $04, $42, $44, $42, $43 ;0x100
dc.b $39, $BC, $FF, $FF, $50, $00, $42, $B4, $50, $02, $4A, $75, $60, $00, $67, $34, $39, $84, $50, $00, $42, $80, $30, $35, $60, $02, $67, $1E, $32, $00, $E1, $88 ;0x120
dc.b $34, $35, $60, $04, $80, $C2, $39, $80, $50, $02, $94, $41, $39, $82, $50, $04, $0C, $40, $00, $41, $64, $02, $52, $43, $5C, $45, $06, $46, $00, $30, $52, $44 ;0x140
dc.b $51, $CF, $FF, $BE, $39, $43, $00, $02, $67, $00, $01, $4C, $0C, $43, $00, $01, $66, $20, $30, $14, $02, $40, $00, $70, $67, $00, $00, $8C, $7A, $04, $38, $34 ;0x160
dc.b $50, $00, $6B, $00, $05, $30, $0C, $74, $00, $41, $50, $02, $65, $36, $5C, $45, $60, $EC, $30, $14, $02, $40, $00, $8F, $66, $00, $00, $6C, $7E, $05, $7A, $04 ;0x180
dc.b $78, $FF, $42, $43, $34, $3C, $01, $00, $4A, $74, $50, $00, $6B, $16, $B4, $74, $50, $02, $63, $08, $34, $34, $50, $02, $38, $34, $50, $00, $5C, $45, $52, $43 ;0x1A0
dc.b $51, $CF, $FF, $E6, $7A, $06, $CA, $C4, $58, $45, $36, $34, $50, $04, $42, $42, $3E, $14, $08, $07, $00, $04, $67, $02, $74, $12, $08, $07, $00, $05, $67, $10 ;0x1C0
dc.b $0C, $43, $00, $78, $63, $08, $4A, $42 ;0x1E0
| 98.950397 | 229 | 0.459666 |
754f03fe2381e308a4ab9bfb972dd9d688035686 | 388 | kt | Kotlin | app/src/main/java/com/shevelev/wizard_camera/activity_gallery/fragment_gallery/view/external_actions/GalleryHelper.kt | AlShevelev/WizardCamera | ca008839fb157bac0f9b914243ef2a9d7c6a72fa | [
"Apache-2.0"
] | 42 | 2020-05-09T17:45:46.000Z | 2021-12-17T00:57:44.000Z | app/src/main/java/com/shevelev/wizard_camera/activity_gallery/fragment_gallery/view/external_actions/GalleryHelper.kt | OrenHg/WizardCamera | ca008839fb157bac0f9b914243ef2a9d7c6a72fa | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/shevelev/wizard_camera/activity_gallery/fragment_gallery/view/external_actions/GalleryHelper.kt | OrenHg/WizardCamera | ca008839fb157bac0f9b914243ef2a9d7c6a72fa | [
"Apache-2.0"
] | 4 | 2020-06-24T08:22:39.000Z | 2021-12-17T00:57:33.000Z | package com.shevelev.wizard_camera.activity_gallery.fragment_gallery.view.external_actions
import android.content.Intent
import android.net.Uri
import androidx.fragment.app.Fragment
interface GalleryHelper {
fun startTakingPhoto(fragment: Fragment): Boolean
fun processTakingPhotoResult(requestCode: Int, resultCode: Int, data: Intent?, successAction: (Uri) -> Unit): Boolean
} | 35.272727 | 121 | 0.814433 |
e77b3a359ad23e2479486b68486d1a7a825c74f7 | 620 | js | JavaScript | 801-900/(845)LongestMountainInArray.js | zhang1pr/LeetCode.js | b46a146fcd9577f412c3a343b02c045d422e491b | [
"MIT"
] | null | null | null | 801-900/(845)LongestMountainInArray.js | zhang1pr/LeetCode.js | b46a146fcd9577f412c3a343b02c045d422e491b | [
"MIT"
] | null | null | null | 801-900/(845)LongestMountainInArray.js | zhang1pr/LeetCode.js | b46a146fcd9577f412c3a343b02c045d422e491b | [
"MIT"
] | null | null | null | /**
* @param {number[]} A
* @return {number}
*/
var longestMountain = function(A) {
const N = A.length;
let ans = 0;
let base = 0;
while (base < N) {
let end = base;
if (end + 1 < N && A[end] < A[end + 1]) {
while (end + 1 < N && A[end] < A[end + 1]) {
end++;
}
if (end + 1 < N && A[end] > A[end + 1]) {
while (end + 1 < N && A[end] > A[end + 1]) {
end++;
}
ans = Math.max(ans, end - base + 1);
}
}
base = Math.max(end, base + 1);
}
return ans;
};
// time: O(n)
// space: O(1)
// [2, 2, 2]
// [2, 1, 4, 7, 3, 2, 5]
| 16.756757 | 52 | 0.398387 |
7645cf977fbac0aafe0c6a7c979f35745f8af3b8 | 1,986 | kt | Kotlin | SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/api/MoodStationFetcher.kt | KKBOX/OpenAPI-Android | 8dadc9493c20bdc6b0c87686b266452968318b6c | [
"Apache-2.0"
] | 20 | 2017-10-26T12:03:16.000Z | 2019-07-02T04:51:09.000Z | SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/api/MoodStationFetcher.kt | KKBOX/OpenAPI-Android | 8dadc9493c20bdc6b0c87686b266452968318b6c | [
"Apache-2.0"
] | 2 | 2018-02-02T04:17:43.000Z | 2021-01-21T06:24:10.000Z | SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/api/MoodStationFetcher.kt | KKBOX/OpenAPI-Android | 8dadc9493c20bdc6b0c87686b266452968318b6c | [
"Apache-2.0"
] | 4 | 2017-11-20T16:46:14.000Z | 2018-09-05T09:33:31.000Z | package com.kkbox.openapideveloper.api
import com.google.gson.JsonObject
import com.kkbox.openapideveloper.Endpoint
import com.koushikdutta.ion.future.ResponseFuture
/**
* Fetch mood stations and get tracks for a specific mood station.
*
* @property httpClient Get response from specific url.
* @property territory The current territory.
* @constructor Creates a mood station fetcher.
* @see `https://docs.kkbox.codes/docs/mood-stations-mood`
*/
class MoodStationFetcher(private val httpClient: HttpClient, private val territory: String = "TW") {
private val endpoint: String = Endpoint.API.MOOD_STATIONS.uri
lateinit var moodStationId: String
/**
* Fetch all mood stations.
*
* @param limit The size for one page.
* @param offset The offset index for first element.
* @return the API response.
* @sample MoodStationFetcher.fetchAllMoodStations()
* @see `https://docs.kkbox.codes/docs/mood-stations-mood`
*/
fun fetchAllMoodStations(limit: Int? = null, offset: Int? = null): ResponseFuture<JsonObject> {
return httpClient.get(endpoint,
mapOf("territory" to territory,
"limit" to limit?.toString(),
"offset" to offset?.toString()))
}
/**
* Set a mood station ID.
*
* @param moodStationId The station ID.
* @return the mood station ID.
* @see `https://docs.kkbox.codes/docs/mood-stations-station`
*/
fun setMoodStationId(moodStationId: String): MoodStationFetcher {
this.moodStationId = moodStationId
return this
}
/**
* Fetch metadata of a mood station by given ID.
*
* @return the object of mood station metadata.
* @sample MoodStationFetcher.setMoodStationId('-msVbZnpWLE4CpWBJo').fetchMetadata()
*/
fun fetchMetadata(): ResponseFuture<JsonObject> {
return httpClient.get(endpoint + "/$moodStationId", mapOf("territory" to territory))
}
} | 35.464286 | 100 | 0.671198 |
293ac25dd39cd2f47cb4f9a3dcfee7024160bc8d | 2,795 | swift | Swift | Buy/Client/Graph.QueryError.swift | RishabhTayal/mobile-buy-sdk-ios | 3825d7ed0e3deb327eb6019c008250b38b43fc62 | [
"MIT"
] | 419 | 2015-10-05T23:50:39.000Z | 2022-03-24T00:00:57.000Z | Buy/Client/Graph.QueryError.swift | RishabhTayal/mobile-buy-sdk-ios | 3825d7ed0e3deb327eb6019c008250b38b43fc62 | [
"MIT"
] | 871 | 2015-10-05T20:44:58.000Z | 2022-03-31T05:36:45.000Z | Buy/Client/Graph.QueryError.swift | RishabhTayal/mobile-buy-sdk-ios | 3825d7ed0e3deb327eb6019c008250b38b43fc62 | [
"MIT"
] | 232 | 2015-10-06T19:28:15.000Z | 2022-02-23T04:27:14.000Z | //
// Graph.QueryError.swift
// Buy
//
// Created by Shopify.
// Copyright (c) 2017 Shopify Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import Foundation
public extension Graph {
/// Represents an error that was encountered somewhere in the request pipeline.
enum QueryError: Error {
/// For invalid queries, a collection of `Reason`s is provided to indicate exactly where the problem occurred in the query.
public struct Reason {
/// The error message associated with the line and column number
public let message: String
/// Line on which the error occurred
public let line: Int?
/// The column at which the error occurred
public let column: Int?
internal init(json: JSON) {
self.message = (json["message"] as? String) ?? "Unknown error"
self.line = json["line"] as? Int
self.column = json["column"] as? Int
}
}
/// A non-HTTPURLResponse was received
case request(error: Error?)
/// A non-200 status code was received
case http(statusCode: Int)
/// The response contains no data
case noData
/// JSON deserialization failed, invalid syntax
case jsonDeserializationFailed(data: Data?)
/// JSON structure doesn't match expectation
case invalidJson(json: Any)
/// The provided query was partially or completely invalid
case invalidQuery(reasons: [Reason])
/// The response schema does not match expectation
case schemaViolation(violation: SchemaViolationError)
}
}
| 37.266667 | 131 | 0.660107 |
752beac150047a35ce44a3152052a8f861c17043 | 261 | h | C | Animations-master/Animations/LabelScaleViewController.h | 5nn/QuartzCore | f2e4390f224740f518723f73f425e1e30eeca4cf | [
"Apache-2.0"
] | null | null | null | Animations-master/Animations/LabelScaleViewController.h | 5nn/QuartzCore | f2e4390f224740f518723f73f425e1e30eeca4cf | [
"Apache-2.0"
] | null | null | null | Animations-master/Animations/LabelScaleViewController.h | 5nn/QuartzCore | f2e4390f224740f518723f73f425e1e30eeca4cf | [
"Apache-2.0"
] | null | null | null | //
// LabelScaleViewController.h
// Animations
//
// Created by YouXianMing on 15/12/17.
// Copyright © 2015年 YouXianMing. All rights reserved.
//
#import "NormalTitleViewController.h"
@interface LabelScaleViewController : NormalTitleViewController
@end
| 18.642857 | 63 | 0.758621 |
a4ef9a575854e6ab73e4f96531e7a4727ba48992 | 24,739 | swift | Swift | Sources/DTCollectionViewManager/DTCollectionViewManager.swift | DenTelezhkin/DTCollectionViewManager | 27f8d2fcaf2089a18ce987fed018dd6cbd99b575 | [
"MIT"
] | 65 | 2019-03-16T18:00:19.000Z | 2022-03-14T11:18:53.000Z | Sources/DTCollectionViewManager/DTCollectionViewManager.swift | DenTelezhkin/DTCollectionViewManager | 27f8d2fcaf2089a18ce987fed018dd6cbd99b575 | [
"MIT"
] | 8 | 2019-03-07T17:24:27.000Z | 2021-07-05T09:58:08.000Z | Sources/DTCollectionViewManager/DTCollectionViewManager.swift | DenTelezhkin/DTCollectionViewManager | 27f8d2fcaf2089a18ce987fed018dd6cbd99b575 | [
"MIT"
] | 9 | 2019-05-30T08:36:40.000Z | 2022-03-14T11:18:56.000Z | //
// DTCollectionViewManager.swift
// DTCollectionViewManager
//
// Created by Denys Telezhkin on 23.08.15.
// Copyright © 2015 Denys Telezhkin. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
import Foundation
import UIKit
import DTModelStorage
/// Adopting this protocol will automatically inject manager property to your object, that lazily instantiates DTCollectionViewManager object.
/// Target is not required to be UICollectionViewController, and can be a regular UIViewController with UICollectionView, or any other view, that contains UICollectionView.
public protocol DTCollectionViewManageable : AnyObject
{
/// Collection view, that will be managed by DTCollectionViewManager. This property or `optionalCollectionView` property must be implemented in order for `DTCollectionViewManager` to work.
var collectionView : UICollectionView! { get }
/// Collection view, that will be managed by DTCollectionViewManager. This property or `collectionView` property must be implemented in order for `DTCollectionViewManager` to work.
var optionalCollectionView: UICollectionView? { get }
}
/// Extension for `DTCollectionViewManageable` that provides default implementations for `collectionView` and `optionalCollectionView` properties. One of those properties must be implemented in `DTCollectionViewManageable` implementation.
public extension DTCollectionViewManageable {
var collectionView: UICollectionView! { return nil }
var optionalCollectionView: UICollectionView? { return nil }
}
private var DTCollectionViewManagerAssociatedKey = "DTCollectionView Manager Associated Key"
/// Default implementation for `DTCollectionViewManageable` protocol, that will inject `manager` property to any object, that declares itself `DTCollectionViewManageable`.
extension DTCollectionViewManageable
{
/// Lazily instantiated `DTCollectionViewManager` instance. When your collection view is loaded, call mapping registration methods and `DTCollectionViewManager` will take over UICollectionView datasource and delegate.
/// Any method, that is not implemented by `DTCollectionViewManager`, will be forwarded to delegate.
/// If this property is accessed when UICollectionView is loaded, and DTCollectionViewManager is not configured yet, startManaging(withDelegate:_) method will automatically be called once to initialize DTCollectionViewManager.
/// - SeeAlso: `startManaging(withDelegate:)`
public var manager : DTCollectionViewManager {
get {
if let manager = objc_getAssociatedObject(self, &DTCollectionViewManagerAssociatedKey) as? DTCollectionViewManager {
if !manager.isConfigured && (optionalCollectionView != nil || collectionView != nil) {
manager.startManaging(withDelegate: self)
}
return manager
}
let manager = DTCollectionViewManager()
if optionalCollectionView != nil || collectionView != nil {
manager.startManaging(withDelegate: self)
}
objc_setAssociatedObject(self, &DTCollectionViewManagerAssociatedKey, manager, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
return manager
}
set {
objc_setAssociatedObject(self, &DTCollectionViewManagerAssociatedKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
}
}
}
/// `DTCollectionViewManager` manages most of `UICollectionView` datasource and delegate methods and provides API for managing your data models in the collection view. Any method, that is not implemented by `DTCollectionViewManager`, will be forwarded to delegate.
/// - SeeAlso: `startManagingWithDelegate:`
open class DTCollectionViewManager {
var collectionView : UICollectionView? {
if let delegate = delegate as? DTCollectionViewManageable { return delegate.optionalCollectionView ?? delegate.collectionView }
return nil
}
weak var delegate : AnyObject?
/// Bool property, that will be true, after `startManagingWithDelegate` method is called on `DTCollectionViewManager`.
open var isManagingCollectionView : Bool { collectionView != nil }
/// Factory for creating cells and reusable views for UICollectionView
final lazy var viewFactory: CollectionViewFactory = {
precondition(self.isManagingCollectionView, "Please call manager.startManagingWithDelegate(self) before calling any other DTCollectionViewManager methods")
// swiftlint:disable:next force_unwrapping
let factory = CollectionViewFactory(collectionView: self.collectionView!)
factory.resetDelegates = { [weak self] in
self?.collectionDataSource?.delegateWasReset()
self?.collectionDelegate?.delegateWasReset()
#if os(iOS)
self?.collectionDropDelegate?.delegateWasReset()
self?.collectionDragDelegate?.delegateWasReset()
#endif
}
factory.anomalyHandler = anomalyHandler
return factory
}()
/// Implicitly unwrap storage property to `MemoryStorage`.
/// - Warning: if storage is not MemoryStorage, will throw an exception.
open var memoryStorage : MemoryStorage! {
precondition(storage is MemoryStorage, "DTCollectionViewManager memoryStorage method should be called only if you are using MemoryStorage")
return storage as? MemoryStorage
}
/// Anomaly handler, that handles reported by `DTCollectionViewManager` anomalies.
open var anomalyHandler : DTCollectionViewManagerAnomalyHandler = .init()
/// Storage, that holds your UICollectionView models. By default, it's `MemoryStorage` instance.
/// - Note: When setting custom storage for this property, it will be automatically configured for using with UICollectionViewFlowLayout and it's delegate will be set to `DTCollectionViewManager` instance.
/// - Note: Previous storage `delegate` property will be nilled out to avoid collisions.
/// - SeeAlso: `MemoryStorage`, `CoreDataStorage`.
open var storage : Storage {
willSet {
(storage as? BaseUpdateDeliveringStorage)?.delegate = nil
}
didSet {
if let headerFooterCompatibleStorage = storage as? SupplementaryStorage {
headerFooterCompatibleStorage.configureForCollectionViewFlowLayoutUsage()
}
(storage as? BaseUpdateDeliveringStorage)?.delegate = collectionViewUpdater
}
}
/// Current storage, conditionally casted to `SupplementaryStorage` protocol.
public var supplementaryStorage: SupplementaryStorage? {
return storage as? SupplementaryStorage
}
/// Object, that is responsible for updating `UICollectionView`, when received update from `Storage`
open var collectionViewUpdater : CollectionViewUpdater? {
didSet {
(storage as? BaseUpdateDeliveringStorage)?.delegate = collectionViewUpdater
collectionViewUpdater?.didUpdateContent?(nil)
}
}
/// Object, that is responsible for implementing `UICollectionViewDataSource` protocol
open var collectionDataSource: DTCollectionViewDataSource? {
didSet {
collectionView?.dataSource = collectionDataSource
}
}
/// Object, that is responsible for implementing `UICollectionViewDelegate` and `UICollectionViewDelegateFlowLayout` protocols
open var collectionDelegate : DTCollectionViewDelegate? {
didSet {
collectionView?.delegate = collectionDelegate
}
}
#if os(iOS)
// Yeah, @availability macros does not work on stored properties ¯\_(ツ)_/¯
private var _collectionDragDelegatePrivate : AnyObject?
/// Object, that is responsible for implementing `UICollectionViewDragDelegate` protocol
open var collectionDragDelegate : DTCollectionViewDragDelegate? {
get {
return _collectionDragDelegatePrivate as? DTCollectionViewDragDelegate
}
set {
_collectionDragDelegatePrivate = newValue
collectionView?.dragDelegate = newValue
}
}
// Yeah, @availability macros does not work on stored properties ¯\_(ツ)_/¯
private var _collectionDropDelegatePrivate : AnyObject?
/// Object, that is responsible for implementing `UICOllectionViewDropDelegate` protocol
open var collectionDropDelegate : DTCollectionViewDropDelegate? {
get {
return _collectionDropDelegatePrivate as? DTCollectionViewDropDelegate
}
set {
_collectionDropDelegatePrivate = newValue
collectionView?.dropDelegate = newValue
}
}
#endif
/// Storage construction block, used by `DTCollectionViewManager` when it's created. Returns `MemoryStorage` by default.
public static var defaultStorage: () -> Storage = { MemoryStorage() }
/// Creates `DTCollectionViewManager`. Usually you don't need to call this method directly, as `manager` property on `DTCollectionViewManageable` instance is filled automatically. `DTCollectionViewManager.defaultStorage` closure is used to determine which `Storage` would be used by default.
///
/// - Parameter storage: storage class to be used
public init(storage: Storage = DTCollectionViewManager.defaultStorage()) {
(storage as? SupplementaryStorage)?.configureForCollectionViewFlowLayoutUsage()
self.storage = storage
}
/// If you access `manager` property when managed `UICollectionView` is already created(for example: viewDidLoad method), calling this method is not necessary.
/// If for any reason, `UICollectionView` is created later, please call this method before modifying storage or registering cells/supplementary views.
/// - Precondition: UICollectionView instance on `delegate` should not be nil.
/// - Parameter delegate: Object, that has UICollectionView, that will be managed by `DTCollectionViewManager`.
open func startManaging(withDelegate delegate : DTCollectionViewManageable)
{
guard !isConfigured else { return }
guard let collectionView = delegate.collectionView ?? delegate.optionalCollectionView else {
preconditionFailure("Call startManagingWithDelegate: method only when UICollectionView has been created")
}
self.delegate = delegate
startManaging(with: collectionView)
}
#if compiler(>=5.1)
@available(iOS 13.0, tvOS 13.0, *)
/// Configures `UICollectionViewDiffableDataSource` to be used with `DTCollectionViewManager`.
/// Because `UICollectionViewDiffableDataSource` handles UICollectionView updates, `collectionViewUpdater` property on `DTCollectionViewManager` will be set to nil.
/// - Parameter modelProvider: closure that provides `DTCollectionViewManager` models.
/// This closure mirrors `cellProvider` property on `UICollectionViewDiffableDataSource`, but strips away collectionView, and asks for data model instead of a cell. Cell mapping is then executed in the same way as without diffable data sources.
open func configureDiffableDataSource<SectionIdentifier, ItemIdentifier>(modelProvider: @escaping (IndexPath, ItemIdentifier) -> Any)
-> UICollectionViewDiffableDataSource<SectionIdentifier, ItemIdentifier>
{
guard let collectionView = collectionView else {
fatalError("Attempt to configure diffable datasource before collectionView have been initialized")
}
// UICollectionViewDiffableDataSource will update UICollectionView instead of `CollectionViewUpdater` object.
collectionViewUpdater = nil
// Cell is provided by `DTCollectionViewDataSource` without actually calling closure that is passed to `UICollectionViewDiffableDataSource`.
let dataSource = DTCollectionViewDiffableDataSource<SectionIdentifier, ItemIdentifier>(
collectionView: collectionView,
viewFactory: viewFactory,
manager: self,
cellProvider: { _, _, _ in nil },
modelProvider: modelProvider)
storage = dataSource
collectionView.dataSource = dataSource
return dataSource
}
#endif
fileprivate var isConfigured = false
fileprivate func startManaging(with collectionView: UICollectionView) {
guard !isConfigured else { return }
defer { isConfigured = true }
collectionViewUpdater = CollectionViewUpdater(collectionView: collectionView)
collectionDataSource = DTCollectionViewDataSource(delegate: delegate, collectionViewManager: self)
collectionDelegate = DTCollectionViewDelegate(delegate: delegate, collectionViewManager: self)
#if os(iOS)
collectionDragDelegate = DTCollectionViewDragDelegate(delegate: delegate, collectionViewManager: self)
collectionDropDelegate = DTCollectionViewDropDelegate(delegate: delegate, collectionViewManager: self)
#endif
DispatchQueue.main.asyncAfter(deadline: .now() + Self.eventVerificationDelay) { [weak self] in
self?.verifyEventsCompatibility()
}
}
/// Returns closure, that updates cell at provided indexPath.
///
/// This is used by `coreDataUpdater` method and can be used to silently update a cell without animation.
open func updateCellClosure() -> (IndexPath, Any) -> Void {
return { [weak self] indexPath, model in
self?.viewFactory.updateCellAt(indexPath, with: model)
}
}
/// Updates visible cells, using `collectionView.indexPathsForVisibleItems`, and update block. This may be more efficient than running `reloadData`, if number of your data models does not change, and the change you want to reflect is completely within models state.
///
/// - Parameter closure: closure to run for each cell after update has been completed.
open func updateVisibleCells(_ closure: ((UICollectionViewCell) -> Void)? = nil) {
(collectionView?.indexPathsForVisibleItems ?? []).forEach { indexPath in
guard let model = storage.item(at: indexPath),
let visibleCell = collectionView?.cellForItem(at: indexPath)
else { return }
updateCellClosure()(indexPath, model)
closure?(visibleCell)
}
}
/// Returns `CollectionViewUpdater`, configured to work with `CoreDataStorage` and `NSFetchedResultsController` updates.
///
/// - Precondition: UICollectionView instance on `delegate` should not be nil.
open func coreDataUpdater() -> CollectionViewUpdater {
guard let collectionView = self.collectionView else {
preconditionFailure("Call coreDataUpdater() method only when UICollectionView is created and passed to `DTCollectionViewManager` via startManaging(with:) method.")
}
return CollectionViewUpdater(collectionView: collectionView,
reloadItem: updateCellClosure(),
animateMoveAsDeleteAndInsert: true)
}
static var eventVerificationDelay : TimeInterval = 1
func verifyItemEvent<Model>(for itemType: Model.Type, methodName: String) {
switch itemType {
case is UICollectionReusableView.Type:
anomalyHandler.reportAnomaly(.modelEventCalledWithCellClass(modelType: String(describing: Model.self), methodName: methodName, subclassOf: "UICollectionReusableView"))
case is UICollectionViewCell.Type:
anomalyHandler.reportAnomaly(.modelEventCalledWithCellClass(modelType: String(describing: Model.self), methodName: methodName, subclassOf: "UICollectionViewCell"))
default: ()
}
}
func verifyViewEvent<T:ModelTransfer>(for viewType: T.Type, methodName: String) {
DispatchQueue.main.asyncAfter(deadline: .now() + Self.eventVerificationDelay) { [weak self] in
if self?.viewFactory.mappings.filter({ $0.viewClass.isSubclass(of: viewType) }).count == 0 {
self?.anomalyHandler.reportAnomaly(DTCollectionViewManagerAnomaly.unusedEventDetected(viewType: String(describing: T.self), methodName: methodName))
}
}
}
func verifyEventsCompatibility() {
let flowLayoutMethodSignatures = [
EventMethodSignature.sizeForItemAtIndexPath,
.referenceSizeForHeaderInSection,
.referenceSizeForFooterInSection,
.insetForSectionAtIndex,
.minimumLineSpacingForSectionAtIndex,
.minimumInteritemSpacingForSectionAtIndex
].map { $0.rawValue }
let unmappedFlowDelegateEvents = collectionDelegate?.unmappedReactions.filter { flowLayoutMethodSignatures.contains($0.methodSignature) } ?? []
let mappedFlowDelegateEvents = viewFactory.mappings.reduce(into: []) { result, current in
result.append(contentsOf: current.reactions.filter { flowLayoutMethodSignatures.contains($0.methodSignature) })
}
guard let _ = collectionView?.collectionViewLayout as? UICollectionViewFlowLayout else {
(unmappedFlowDelegateEvents + mappedFlowDelegateEvents).forEach { reaction in
anomalyHandler.reportAnomaly(.flowDelegateLayoutMethodWithDifferentLayout(methodSignature: reaction.methodSignature))
}
return
}
}
}
/// All supported Objective-C method signatures.
///
/// Some of signatures are made up, so that we would be able to link them with event, however they don't stop "responds(to:)" method from returning true.
internal enum EventMethodSignature: String {
/// UICollectionViewDataSource
case configureCell = "collectionViewConfigureCell_imaginarySelector"
case configureSupplementary = "collectionViewConfigureSupplementary_imaginarySelector"
case canMoveItemAtIndexPath = "collectionView:canMoveItemAtIndexPath:"
case moveItemAtIndexPathToIndexPath = "collectionView:moveItemAtIndexPath:toIndexPath:"
case indexTitlesForCollectionView = "indexTitlesForCollectionView:"
case indexPathForIndexTitleAtIndex = "collectionView:indexPathForIndexTitle:atIndex:"
// UICollectionViewDelegate
case shouldSelectItemAtIndexPath = "collectionView:shouldSelectItemAtIndexPath:"
case didSelectItemAtIndexPath = "collectionView:didSelectItemAtIndexPath:"
case shouldDeselectItemAtIndexPath = "collectionView:shouldDeselectItemAtIndexPath:"
case didDeselectItemAtIndexPath = "collectionView:didDeselectItemAtIndexPath:"
case shouldHighlightItemAtIndexPath = "collectionView:shouldHighlightItemAtIndexPath:"
case didHighlightItemAtIndexPath = "collectionView:didHighlightItemAtIndexPath:"
case didUnhighlightItemAtIndexPath = "collectionView:didUnhighlightItemAtIndexPath:"
case willDisplayCellForItemAtIndexPath = "collectionView:willDisplayCell:forItemAtIndexPath:"
case willDisplaySupplementaryViewForElementKindAtIndexPath = "collectionView:willDisplaySupplementaryView:forElementKind:atIndexPath:"
case didEndDisplayingCellForItemAtIndexPath = "collectionView:didEndDisplayingCell:forItemAtIndexPath:"
case didEndDisplayingSupplementaryViewForElementKindAtIndexPath = "collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:"
case shouldShowMenuForItemAtIndexPath = "collectionView:shouldShowMenuForItemAtIndexPath:"
case canPerformActionForItemAtIndexPath = "collectionView:canPerformAction:forItemAtIndexPath:withSender:"
case performActionForItemAtIndexPath = "collectionView:performAction:forItemAtIndexPath:withSender:"
case transitionLayoutForOldLayoutNewLayout = "collectionView:transitionLayoutForOldLayout:newLayout:"
case canFocusItemAtIndexPath = "collectionView:canFocusItemAtIndexPath:"
case shouldUpdateFocusInContext = "collectionView:shouldUpdateFocusInContext:"
case didUpdateFocusInContext = "collectionView:didUpdateFocusInContext:withAnimationCoordinator:"
case indexPathForPreferredFocusedView = "indexPathForPreferredFocusedViewInCollectionView:"
case targetIndexPathForMoveFromItemAtTo = "collectionView:targetIndexPathForMoveFromItemAtIndexPath:toProposedIndexPath:"
case targetContentOffsetForProposedContentOffset = "collectionView:targetContentOffsetForProposedContentOffset:"
case shouldSpringLoadItem = "collectionView:shouldSpringLoadItemAtIndexPath:withContext:"
case shouldBeginMultipleSelectionInteractionAtIndexPath = "collectionView:shouldBeginMultipleSelectionInteractionAtIndexPath:"
case didBeginMultipleSelectionInteractionAtIndexPath = "collectionView:didBeginMultipleSelectionInteractionAtIndexPath:"
case didEndMultipleSelectionInteraction = "collectionViewDidEndMultipleSelectionInteraction:"
case contextMenuConfigurationForItemAtIndexPath = "collectionView:contextMenuConfigurationForItemAtIndexPath:point:"
case previewForHighlightingContextMenu = "collectionView:previewForHighlightingContextMenuWithConfiguration:"
case previewForDismissingContextMenu = "collectionView:previewForDismissingContextMenuWithConfiguration:"
case willCommitMenuWithAnimator = "collectionView:willCommitMenuWithAnimator:"
case canEditItemAtIndexPath = "collectionView:canEditItemAtIndexPath:"
// UICollectionViewDelegateFlowLayout
case sizeForItemAtIndexPath = "collectionView:layout:sizeForItemAtIndexPath:"
case referenceSizeForHeaderInSection = "collectionView:layout:referenceSizeForHeaderInSection:_imaginarySelector"
case referenceSizeForFooterInSection = "collectionView:layout:referenceSizeForFooterInSection:_imaginarySelector"
case insetForSectionAtIndex = "collectionView:layout:insetForSectionAtIndex:"
case minimumLineSpacingForSectionAtIndex = "collectionView:layout:minimumLineSpacingForSectionAtIndex:"
case minimumInteritemSpacingForSectionAtIndex = "collectionView:layout:minimumInteritemSpacingForSectionAtIndex:"
// UICollectionViewDragDelegate
case itemsForBeginningDragSessionAtIndexPath = "collectionView:itemsForBeginningDragSession:atIndexPath:"
case itemsForAddingToDragSessionAtIndexPath = "collectionView:itemsForAddingToDragSession:atIndexPath:point:"
case dragPreviewParametersForItemAtIndexPath = "collectionView:dragPreviewParametersForItemAtIndexPath:"
case dragSessionWillBegin = "collectionView:dragSessionWillBegin:"
case dragSessionDidEnd = "collectionView:dragSessionDidEnd:"
case dragSessionAllowsMoveOperation = "collectionView:dragSessionAllowsMoveOperation:"
case dragSessionIsRestrictedToDraggingApplication = "collectionView:dragSessionIsRestrictedToDraggingApplication:"
// UICollectionViewDropDelegate
case performDropWithCoordinator = "collectionView:performDropWithCoordinator:"
case canHandleDropSession = "collectionView:canHandleDropSession:"
case dropSessionDidEnter = "collectionView:dropSessionDidEnter:"
case dropSessionDidUpdate = "collectionView:dropSessionDidUpdate:withDestinationIndexPath:"
case dropSessionDidExit = "collectionView:dropSessionDidExit:"
case dropSessionDidEnd = "collectionView:dropSessionDidEnd:"
case dropPreviewParametersForItemAtIndexPath = "collectionView:dropPreviewParametersForItemAtIndexPath:"
// TVCollectionViewDelegateFullScreenLayout
case willCenterCellAtIndexPath = "collectionView:layout:willCenterCellAtIndexPath:"
case didCenterCellAtIndexPath = "collectionView:layout:didCenterCellAtIndexPath:"
}
| 58.07277 | 295 | 0.749869 |
2a16bd12537818ec1cea5b4d5cdf6f5ddf1fba2b | 479 | java | Java | src/main/Connect.java | yasheymateen/Woodbride_Pharmacy_System | 30c6984ac715f59fc81861bac87b3ae67a34306e | [
"Unlicense"
] | null | null | null | src/main/Connect.java | yasheymateen/Woodbride_Pharmacy_System | 30c6984ac715f59fc81861bac87b3ae67a34306e | [
"Unlicense"
] | null | null | null | src/main/Connect.java | yasheymateen/Woodbride_Pharmacy_System | 30c6984ac715f59fc81861bac87b3ae67a34306e | [
"Unlicense"
] | null | null | null |
package main;
import java.sql.Connection;
import java.sql.DriverManager;
import javax.swing.JOptionPane;
public class Connect {
public static Connection connect(){
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/pharmacy","root","");
if(con!=null)return con ;
}catch(Exception e){
JOptionPane.showMessageDialog(null, e.getMessage(),"Error",2);
}
return null ;
}
}
| 22.809524 | 94 | 0.68476 |
3ef4fc3504d723bdd2d8a5558ca21180fc73b4ba | 37,111 | asm | Assembly | tmp1/c55x-sim2/foo/Debug/sd_test.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | 1 | 2020-08-27T11:31:13.000Z | 2020-08-27T11:31:13.000Z | tmp1/c55x-sim2/foo/Debug/sd_test.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | null | null | null | tmp1/c55x-sim2/foo/Debug/sd_test.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | null | null | null | ;*******************************************************************************
;* TMS320C55x C/C++ Codegen PC v4.4.1 *
;* Date/Time created: Sat Sep 29 23:07:17 2018 *
;*******************************************************************************
.compiler_opts --hll_source=on --mem_model:code=flat --mem_model:data=large --object_format=coff --silicon_core_3_3 --symdebug:dwarf
.mmregs
.cpl_on
.arms_on
.c54cm_off
.asg AR6, FP
.asg XAR6, XFP
.asg DPH, MDP
.model call=c55_std
.model mem=large
.noremark 5002 ; code respects overwrite rules
;*******************************************************************************
;* GLOBAL FILE PARAMETERS *
;* *
;* Architecture : TMS320C55x *
;* Optimizing for : Speed *
;* Memory : Large Model (23-Bit Data Pointers) *
;* Calls : Normal Library ASM calls *
;* Debug Info : Standard TI Debug Information *
;*******************************************************************************
$C$DW$CU .dwtag DW_TAG_compile_unit
.dwattr $C$DW$CU, DW_AT_name("../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c")
.dwattr $C$DW$CU, DW_AT_producer("TMS320C55x C/C++ Codegen PC v4.4.1 Copyright (c) 1996-2012 Texas Instruments Incorporated")
.dwattr $C$DW$CU, DW_AT_TI_version(0x01)
.dwattr $C$DW$CU, DW_AT_comp_dir("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug")
$C$DW$1 .dwtag DW_TAG_subprogram, DW_AT_name("EZDSP5535_SDCARD_init")
.dwattr $C$DW$1, DW_AT_TI_symbol_name("_EZDSP5535_SDCARD_init")
.dwattr $C$DW$1, DW_AT_type(*$C$DW$T$19)
.dwattr $C$DW$1, DW_AT_declaration
.dwattr $C$DW$1, DW_AT_external
$C$DW$2 .dwtag DW_TAG_subprogram, DW_AT_name("EZDSP5535_SDCARD_write")
.dwattr $C$DW$2, DW_AT_TI_symbol_name("_EZDSP5535_SDCARD_write")
.dwattr $C$DW$2, DW_AT_type(*$C$DW$T$19)
.dwattr $C$DW$2, DW_AT_declaration
.dwattr $C$DW$2, DW_AT_external
$C$DW$3 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$3, DW_AT_type(*$C$DW$T$22)
$C$DW$4 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$4, DW_AT_type(*$C$DW$T$22)
$C$DW$5 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$5, DW_AT_type(*$C$DW$T$24)
.dwendtag $C$DW$2
$C$DW$6 .dwtag DW_TAG_subprogram, DW_AT_name("EZDSP5535_SDCARD_read")
.dwattr $C$DW$6, DW_AT_TI_symbol_name("_EZDSP5535_SDCARD_read")
.dwattr $C$DW$6, DW_AT_type(*$C$DW$T$19)
.dwattr $C$DW$6, DW_AT_declaration
.dwattr $C$DW$6, DW_AT_external
$C$DW$7 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$7, DW_AT_type(*$C$DW$T$22)
$C$DW$8 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$8, DW_AT_type(*$C$DW$T$22)
$C$DW$9 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$9, DW_AT_type(*$C$DW$T$24)
.dwendtag $C$DW$6
$C$DW$10 .dwtag DW_TAG_subprogram, DW_AT_name("EZDSP5535_SDCARD_close")
.dwattr $C$DW$10, DW_AT_TI_symbol_name("_EZDSP5535_SDCARD_close")
.dwattr $C$DW$10, DW_AT_type(*$C$DW$T$19)
.dwattr $C$DW$10, DW_AT_declaration
.dwattr $C$DW$10, DW_AT_external
$C$DW$11 .dwtag DW_TAG_subprogram, DW_AT_name("printf")
.dwattr $C$DW$11, DW_AT_TI_symbol_name("_printf")
.dwattr $C$DW$11, DW_AT_type(*$C$DW$T$10)
.dwattr $C$DW$11, DW_AT_declaration
.dwattr $C$DW$11, DW_AT_external
$C$DW$12 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$12, DW_AT_type(*$C$DW$T$31)
$C$DW$13 .dwtag DW_TAG_unspecified_parameters
.dwendtag $C$DW$11
$C$DW$14 .dwtag DW_TAG_subprogram, DW_AT_name("scanf")
.dwattr $C$DW$14, DW_AT_TI_symbol_name("_scanf")
.dwattr $C$DW$14, DW_AT_type(*$C$DW$T$10)
.dwattr $C$DW$14, DW_AT_declaration
.dwattr $C$DW$14, DW_AT_external
$C$DW$15 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$15, DW_AT_type(*$C$DW$T$31)
$C$DW$16 .dwtag DW_TAG_unspecified_parameters
.dwendtag $C$DW$14
.global _ReadBuff
.bss _ReadBuff,256,0,0
$C$DW$17 .dwtag DW_TAG_variable, DW_AT_name("ReadBuff")
.dwattr $C$DW$17, DW_AT_TI_symbol_name("_ReadBuff")
.dwattr $C$DW$17, DW_AT_location[DW_OP_addr _ReadBuff]
.dwattr $C$DW$17, DW_AT_type(*$C$DW$T$28)
.dwattr $C$DW$17, DW_AT_external
.global _WriteBuff
.bss _WriteBuff,256,0,0
$C$DW$18 .dwtag DW_TAG_variable, DW_AT_name("WriteBuff")
.dwattr $C$DW$18, DW_AT_TI_symbol_name("_WriteBuff")
.dwattr $C$DW$18, DW_AT_location[DW_OP_addr _WriteBuff]
.dwattr $C$DW$18, DW_AT_type(*$C$DW$T$28)
.dwattr $C$DW$18, DW_AT_external
; F:\t\cc5p5\ccsv5\tools\compiler\c5500_4.4.1\bin\acp55.exe -@f:\\AppData\\Local\\Temp\\1750812
.sect ".text"
.align 4
.global _sd_test
$C$DW$19 .dwtag DW_TAG_subprogram, DW_AT_name("sd_test")
.dwattr $C$DW$19, DW_AT_low_pc(_sd_test)
.dwattr $C$DW$19, DW_AT_high_pc(0x00)
.dwattr $C$DW$19, DW_AT_TI_symbol_name("_sd_test")
.dwattr $C$DW$19, DW_AT_external
.dwattr $C$DW$19, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$19, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c")
.dwattr $C$DW$19, DW_AT_TI_begin_line(0x3b)
.dwattr $C$DW$19, DW_AT_TI_begin_column(0x08)
.dwattr $C$DW$19, DW_AT_TI_max_frame_size(0x08)
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 60,column 1,is_stmt,address _sd_test
.dwfde $C$DW$CIE, _sd_test
;*******************************************************************************
;* FUNCTION NAME: sd_test *
;* *
;* Function Uses Regs : AC0,AC0,AC1,AC1,T0,AR0,XAR0,AR1,AR2,AR3,XAR3,SP, *
;* CARRY,TC1,M40,SATA,SATD,RDM,FRCT,SMUL *
;* Stack Frame : Compact (No Frame Pointer, w/ debug) *
;* Total Frame Size : 8 words *
;* (1 return address/alignment) *
;* (4 function parameters) *
;* (3 local values) *
;* Min System Stack : 1 word *
;*******************************************************************************
_sd_test:
.dwcfi cfa_offset, 1
.dwcfi save_reg_to_mem, 91, -1
AADD #-7, SP
.dwcfi cfa_offset, 8
$C$DW$20 .dwtag DW_TAG_variable, DW_AT_name("count")
.dwattr $C$DW$20, DW_AT_TI_symbol_name("_count")
.dwattr $C$DW$20, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$20, DW_AT_location[DW_OP_bregx 0x24 4]
$C$DW$21 .dwtag DW_TAG_variable, DW_AT_name("status")
.dwattr $C$DW$21, DW_AT_TI_symbol_name("_status")
.dwattr $C$DW$21, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$21, DW_AT_location[DW_OP_bregx 0x24 5]
$C$DW$22 .dwtag DW_TAG_variable, DW_AT_name("c")
.dwattr $C$DW$22, DW_AT_TI_symbol_name("_c")
.dwattr $C$DW$22, DW_AT_type(*$C$DW$T$29)
.dwattr $C$DW$22, DW_AT_location[DW_OP_bregx 0x24 6]
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 64,column 2,is_stmt
AMOV #$C$FSL1, XAR3 ; |64|
MOV XAR3, dbl(*SP(#0))
$C$DW$23 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$23, DW_AT_low_pc(0x00)
.dwattr $C$DW$23, DW_AT_name("_printf")
.dwattr $C$DW$23, DW_AT_TI_call
CALL #_printf ; |64|
; call occurs [#_printf] ; |64|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 65,column 2,is_stmt
AMOV #$C$FSL2, XAR3 ; |65|
MOV XAR3, dbl(*SP(#0))
$C$DW$24 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$24, DW_AT_low_pc(0x00)
.dwattr $C$DW$24, DW_AT_name("_printf")
.dwattr $C$DW$24, DW_AT_TI_call
CALL #_printf ; |65|
; call occurs [#_printf] ; |65|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 66,column 2,is_stmt
AMOV #$C$FSL3, XAR3 ; |66|
MOV XAR3, dbl(*SP(#0))
AMAR *SP(#6), XAR3
MOV XAR3, dbl(*SP(#2))
$C$DW$25 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$25, DW_AT_low_pc(0x00)
.dwattr $C$DW$25, DW_AT_name("_scanf")
.dwattr $C$DW$25, DW_AT_TI_call
CALL #_scanf ; |66|
; call occurs [#_scanf] ; |66|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 67,column 2,is_stmt
CMP *SP(#6) == #89, TC1 ; |67|
BCC $C$L1,TC1 ; |67|
; branchcc occurs ; |67|
CMP *SP(#6) == #121, TC1 ; |67|
BCC $C$L1,TC1 ; |67|
; branchcc occurs ; |67|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 69,column 3,is_stmt
AMOV #$C$FSL4, XAR3 ; |69|
MOV XAR3, dbl(*SP(#0))
$C$DW$26 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$26, DW_AT_low_pc(0x00)
.dwattr $C$DW$26, DW_AT_name("_printf")
.dwattr $C$DW$26, DW_AT_TI_call
CALL #_printf ; |69|
; call occurs [#_printf] ; |69|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 70,column 3,is_stmt
MOV #1, T0
B $C$L10 ; |70|
; branch occurs ; |70|
$C$L1:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 74,column 2,is_stmt
$C$DW$27 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$27, DW_AT_low_pc(0x00)
.dwattr $C$DW$27, DW_AT_name("_EZDSP5535_SDCARD_init")
.dwattr $C$DW$27, DW_AT_TI_call
CALL #_EZDSP5535_SDCARD_init ; |74|
; call occurs [#_EZDSP5535_SDCARD_init] ; |74|
MOV T0, *SP(#5) ; |74|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 75,column 2,is_stmt
MOV T0, AR1
BCC $C$L2,AR1 == #0 ; |75|
; branchcc occurs ; |75|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 76,column 9,is_stmt
AMOV #$C$FSL5, XAR3 ; |76|
MOV XAR3, dbl(*SP(#0))
$C$DW$28 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$28, DW_AT_low_pc(0x00)
.dwattr $C$DW$28, DW_AT_name("_printf")
.dwattr $C$DW$28, DW_AT_TI_call
CALL #_printf ; |76|
; call occurs [#_printf] ; |76|
$C$L2:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 79,column 6,is_stmt
MOV #0, *SP(#4) ; |79|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 79,column 17,is_stmt
MOV #256, AR2 ; |79|
MOV *SP(#4), AR1 ; |79|
CMPU AR1 >= AR2, TC1 ; |79|
BCC $C$L4,TC1 ; |79|
; branchcc occurs ; |79|
$C$L3:
$C$DW$L$_sd_test$7$B:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 81,column 6,is_stmt
MOV *SP(#4), T0 ; |81|
AMOV #_ReadBuff, XAR3 ; |81|
MOV #0, *AR3(T0) ; |81|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 82,column 3,is_stmt
MOV *SP(#4), T0 ; |82|
MOV *SP(#4), AR1 ; |82|
AMOV #_WriteBuff, XAR3 ; |82|
MOV AR1, *AR3(T0) ; |82|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 79,column 46,is_stmt
ADD #1, *SP(#4) ; |79|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 79,column 17,is_stmt
MOV *SP(#4), AR1 ; |79|
CMPU AR1 < AR2, TC1 ; |79|
BCC $C$L3,TC1 ; |79|
; branchcc occurs ; |79|
$C$DW$L$_sd_test$7$E:
$C$L4:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 86,column 5,is_stmt
AMOV #1024000, XAR3 ; |86|
AMOV #_WriteBuff, XAR0 ; |86|
MOV #512, AC1 ; |86|
MOV XAR3, AC0
$C$DW$29 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$29, DW_AT_low_pc(0x00)
.dwattr $C$DW$29, DW_AT_name("_EZDSP5535_SDCARD_write")
.dwattr $C$DW$29, DW_AT_TI_call
CALL #_EZDSP5535_SDCARD_write ; |86|
; call occurs [#_EZDSP5535_SDCARD_write] ; |86|
MOV T0, *SP(#5) ; |86|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 87,column 5,is_stmt
MOV T0, AR1
BCC $C$L5,AR1 == #0 ; |87|
; branchcc occurs ; |87|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 88,column 9,is_stmt
AMOV #$C$FSL6, XAR3 ; |88|
MOV XAR3, dbl(*SP(#0))
$C$DW$30 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$30, DW_AT_low_pc(0x00)
.dwattr $C$DW$30, DW_AT_name("_printf")
.dwattr $C$DW$30, DW_AT_TI_call
CALL #_printf ; |88|
; call occurs [#_printf] ; |88|
$C$L5:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 91,column 5,is_stmt
AMOV #1024000, XAR3 ; |91|
AMOV #_ReadBuff, XAR0 ; |91|
MOV #512, AC1 ; |91|
MOV XAR3, AC0
$C$DW$31 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$31, DW_AT_low_pc(0x00)
.dwattr $C$DW$31, DW_AT_name("_EZDSP5535_SDCARD_read")
.dwattr $C$DW$31, DW_AT_TI_call
CALL #_EZDSP5535_SDCARD_read ; |91|
; call occurs [#_EZDSP5535_SDCARD_read] ; |91|
MOV T0, *SP(#5) ; |91|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 92,column 5,is_stmt
MOV T0, AR1
BCC $C$L6,AR1 == #0 ; |92|
; branchcc occurs ; |92|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 93,column 9,is_stmt
AMOV #$C$FSL7, XAR3 ; |93|
MOV XAR3, dbl(*SP(#0))
$C$DW$32 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$32, DW_AT_low_pc(0x00)
.dwattr $C$DW$32, DW_AT_name("_printf")
.dwattr $C$DW$32, DW_AT_TI_call
CALL #_printf ; |93|
; call occurs [#_printf] ; |93|
$C$L6:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 96,column 6,is_stmt
MOV #0, *SP(#4) ; |96|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 96,column 17,is_stmt
MOV #256, AR2 ; |96|
MOV *SP(#4), AR1 ; |96|
CMPU AR1 >= AR2, TC1 ; |96|
BCC $C$L9,TC1 ; |96|
; branchcc occurs ; |96|
$C$L7:
$C$DW$L$_sd_test$13$B:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 98,column 3,is_stmt
MOV *SP(#4), T0 ; |98|
AMOV #_WriteBuff, XAR3 ; |98|
MOV *AR3(T0), AR1 ; |98|
AMOV #_ReadBuff, XAR3 ; |98|
MOV *AR3(T0), AR2 ; |98|
CMPU AR2 == AR1, TC1 ; |98|
BCC $C$L8,TC1 ; |98|
; branchcc occurs ; |98|
$C$DW$L$_sd_test$13$E:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 100,column 4,is_stmt
AMOV #$C$FSL8, XAR3 ; |100|
MOV XAR3, dbl(*SP(#0))
MOV *SP(#4), AR1 ; |100|
MOV AR1, *SP(#2) ; |100|
$C$DW$33 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$33, DW_AT_low_pc(0x00)
.dwattr $C$DW$33, DW_AT_name("_printf")
.dwattr $C$DW$33, DW_AT_TI_call
CALL #_printf ; |100|
; call occurs [#_printf] ; |100|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 101,column 4,is_stmt
MOV #1, T0
B $C$L10 ; |101|
; branch occurs ; |101|
$C$L8:
$C$DW$L$_sd_test$15$B:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 96,column 48,is_stmt
ADD #1, *SP(#4) ; |96|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 96,column 17,is_stmt
MOV #256, AR2 ; |96|
MOV *SP(#4), AR1 ; |96|
CMPU AR1 < AR2, TC1 ; |96|
BCC $C$L7,TC1 ; |96|
; branchcc occurs ; |96|
$C$DW$L$_sd_test$15$E:
$C$L9:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 105,column 2,is_stmt
AMOV #$C$FSL9, XAR3 ; |105|
MOV XAR3, dbl(*SP(#0))
$C$DW$34 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$34, DW_AT_low_pc(0x00)
.dwattr $C$DW$34, DW_AT_name("_printf")
.dwattr $C$DW$34, DW_AT_TI_call
CALL #_printf ; |105|
; call occurs [#_printf] ; |105|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 107,column 5,is_stmt
$C$DW$35 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$35, DW_AT_low_pc(0x00)
.dwattr $C$DW$35, DW_AT_name("_EZDSP5535_SDCARD_close")
.dwattr $C$DW$35, DW_AT_TI_call
CALL #_EZDSP5535_SDCARD_close ; |107|
; call occurs [#_EZDSP5535_SDCARD_close] ; |107|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 109,column 5,is_stmt
MOV #0, T0
$C$L10:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c",line 110,column 1,is_stmt
AADD #7, SP
.dwcfi cfa_offset, 1
$C$DW$36 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$36, DW_AT_low_pc(0x00)
.dwattr $C$DW$36, DW_AT_TI_return
RET
; return occurs
$C$DW$37 .dwtag DW_TAG_TI_loop
.dwattr $C$DW$37, DW_AT_name("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug\sd_test.asm:$C$L7:1:1538287637")
.dwattr $C$DW$37, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c")
.dwattr $C$DW$37, DW_AT_TI_begin_line(0x60)
.dwattr $C$DW$37, DW_AT_TI_end_line(0x67)
$C$DW$38 .dwtag DW_TAG_TI_loop_range
.dwattr $C$DW$38, DW_AT_low_pc($C$DW$L$_sd_test$13$B)
.dwattr $C$DW$38, DW_AT_high_pc($C$DW$L$_sd_test$13$E)
$C$DW$39 .dwtag DW_TAG_TI_loop_range
.dwattr $C$DW$39, DW_AT_low_pc($C$DW$L$_sd_test$15$B)
.dwattr $C$DW$39, DW_AT_high_pc($C$DW$L$_sd_test$15$E)
.dwendtag $C$DW$37
$C$DW$40 .dwtag DW_TAG_TI_loop
.dwattr $C$DW$40, DW_AT_name("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug\sd_test.asm:$C$L3:1:1538287637")
.dwattr $C$DW$40, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c")
.dwattr $C$DW$40, DW_AT_TI_begin_line(0x4f)
.dwattr $C$DW$40, DW_AT_TI_end_line(0x53)
$C$DW$41 .dwtag DW_TAG_TI_loop_range
.dwattr $C$DW$41, DW_AT_low_pc($C$DW$L$_sd_test$7$B)
.dwattr $C$DW$41, DW_AT_high_pc($C$DW$L$_sd_test$7$E)
.dwendtag $C$DW$40
.dwattr $C$DW$19, DW_AT_TI_end_file("../c5535_bsl_revc/ezdsp5535_v1/tests/sd/sd_test.c")
.dwattr $C$DW$19, DW_AT_TI_end_line(0x6e)
.dwattr $C$DW$19, DW_AT_TI_end_column(0x01)
.dwendentry
.dwendtag $C$DW$19
;*******************************************************************************
;* FAR STRINGS *
;*******************************************************************************
.sect ".const:.string"
.align 2
$C$FSL1: .string "Using the SD card provided with the board may erase the dem"
.string "o!!",10,0
.align 2
$C$FSL2: .string "Do you want to continue Y/N:",0
.align 2
$C$FSL3: .string "%c",0
.align 2
$C$FSL4: .string "Test Cancelled.",10,0
.align 2
$C$FSL5: .string "SD card Initialization failed.",10,0
.align 2
$C$FSL6: .string "SD card write fail.",10,0
.align 2
$C$FSL7: .string "SD card read fail.",10,0
.align 2
$C$FSL8: .string "Buffer miss matched at position %d",10,0
.align 2
$C$FSL9: .string " SD Card Read & Write Buffer Matched",10,0
;******************************************************************************
;* UNDEFINED EXTERNAL REFERENCES *
;******************************************************************************
.global _EZDSP5535_SDCARD_init
.global _EZDSP5535_SDCARD_write
.global _EZDSP5535_SDCARD_read
.global _EZDSP5535_SDCARD_close
.global _printf
.global _scanf
;*******************************************************************************
;* TYPE INFORMATION *
;*******************************************************************************
$C$DW$T$4 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$4, DW_AT_encoding(DW_ATE_boolean)
.dwattr $C$DW$T$4, DW_AT_name("bool")
.dwattr $C$DW$T$4, DW_AT_byte_size(0x01)
$C$DW$T$5 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$5, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$5, DW_AT_name("signed char")
.dwattr $C$DW$T$5, DW_AT_byte_size(0x01)
$C$DW$T$6 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$6, DW_AT_encoding(DW_ATE_unsigned_char)
.dwattr $C$DW$T$6, DW_AT_name("unsigned char")
.dwattr $C$DW$T$6, DW_AT_byte_size(0x01)
$C$DW$T$7 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$7, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$7, DW_AT_name("wchar_t")
.dwattr $C$DW$T$7, DW_AT_byte_size(0x01)
$C$DW$T$8 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$8, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$8, DW_AT_name("short")
.dwattr $C$DW$T$8, DW_AT_byte_size(0x01)
$C$DW$T$19 .dwtag DW_TAG_typedef, DW_AT_name("Int16")
.dwattr $C$DW$T$19, DW_AT_type(*$C$DW$T$8)
.dwattr $C$DW$T$19, DW_AT_language(DW_LANG_C)
$C$DW$T$9 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$9, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$9, DW_AT_name("unsigned short")
.dwattr $C$DW$T$9, DW_AT_byte_size(0x01)
$C$DW$T$23 .dwtag DW_TAG_typedef, DW_AT_name("Uint16")
.dwattr $C$DW$T$23, DW_AT_type(*$C$DW$T$9)
.dwattr $C$DW$T$23, DW_AT_language(DW_LANG_C)
$C$DW$T$24 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$24, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$T$24, DW_AT_address_class(0x17)
$C$DW$T$28 .dwtag DW_TAG_array_type
.dwattr $C$DW$T$28, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$T$28, DW_AT_language(DW_LANG_C)
.dwattr $C$DW$T$28, DW_AT_byte_size(0x100)
$C$DW$42 .dwtag DW_TAG_subrange_type
.dwattr $C$DW$42, DW_AT_upper_bound(0xff)
.dwendtag $C$DW$T$28
$C$DW$T$10 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$10, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$10, DW_AT_name("int")
.dwattr $C$DW$T$10, DW_AT_byte_size(0x01)
$C$DW$T$11 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$11, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$11, DW_AT_name("unsigned int")
.dwattr $C$DW$T$11, DW_AT_byte_size(0x01)
$C$DW$T$12 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$12, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$12, DW_AT_name("long")
.dwattr $C$DW$T$12, DW_AT_byte_size(0x02)
$C$DW$T$13 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$13, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$13, DW_AT_name("unsigned long")
.dwattr $C$DW$T$13, DW_AT_byte_size(0x02)
$C$DW$T$22 .dwtag DW_TAG_typedef, DW_AT_name("Uint32")
.dwattr $C$DW$T$22, DW_AT_type(*$C$DW$T$13)
.dwattr $C$DW$T$22, DW_AT_language(DW_LANG_C)
$C$DW$T$14 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$14, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$14, DW_AT_name("long long")
.dwattr $C$DW$T$14, DW_AT_byte_size(0x04)
.dwattr $C$DW$T$14, DW_AT_bit_size(0x28)
.dwattr $C$DW$T$14, DW_AT_bit_offset(0x18)
$C$DW$T$15 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$15, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$15, DW_AT_name("unsigned long long")
.dwattr $C$DW$T$15, DW_AT_byte_size(0x04)
.dwattr $C$DW$T$15, DW_AT_bit_size(0x28)
.dwattr $C$DW$T$15, DW_AT_bit_offset(0x18)
$C$DW$T$16 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$16, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$16, DW_AT_name("float")
.dwattr $C$DW$T$16, DW_AT_byte_size(0x02)
$C$DW$T$17 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$17, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$17, DW_AT_name("double")
.dwattr $C$DW$T$17, DW_AT_byte_size(0x02)
$C$DW$T$18 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$18, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$18, DW_AT_name("long double")
.dwattr $C$DW$T$18, DW_AT_byte_size(0x02)
$C$DW$T$29 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$29, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$29, DW_AT_name("signed char")
.dwattr $C$DW$T$29, DW_AT_byte_size(0x01)
$C$DW$43 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$43, DW_AT_type(*$C$DW$T$29)
$C$DW$T$30 .dwtag DW_TAG_const_type
.dwattr $C$DW$T$30, DW_AT_type(*$C$DW$43)
$C$DW$T$31 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$31, DW_AT_type(*$C$DW$T$30)
.dwattr $C$DW$T$31, DW_AT_address_class(0x17)
.dwattr $C$DW$CU, DW_AT_language(DW_LANG_C)
;***************************************************************
;* DWARF CIE ENTRIES *
;***************************************************************
$C$DW$CIE .dwcie 91
.dwcfi cfa_register, 36
.dwcfi cfa_offset, 0
.dwcfi undefined, 0
.dwcfi undefined, 1
.dwcfi undefined, 2
.dwcfi undefined, 3
.dwcfi undefined, 4
.dwcfi undefined, 5
.dwcfi undefined, 6
.dwcfi undefined, 7
.dwcfi undefined, 8
.dwcfi undefined, 9
.dwcfi undefined, 10
.dwcfi undefined, 11
.dwcfi undefined, 12
.dwcfi undefined, 13
.dwcfi same_value, 14
.dwcfi same_value, 15
.dwcfi undefined, 16
.dwcfi undefined, 17
.dwcfi undefined, 18
.dwcfi undefined, 19
.dwcfi undefined, 20
.dwcfi undefined, 21
.dwcfi undefined, 22
.dwcfi undefined, 23
.dwcfi undefined, 24
.dwcfi undefined, 25
.dwcfi same_value, 26
.dwcfi same_value, 27
.dwcfi same_value, 28
.dwcfi same_value, 29
.dwcfi same_value, 30
.dwcfi same_value, 31
.dwcfi undefined, 32
.dwcfi undefined, 33
.dwcfi undefined, 34
.dwcfi undefined, 35
.dwcfi undefined, 36
.dwcfi undefined, 37
.dwcfi undefined, 38
.dwcfi undefined, 39
.dwcfi undefined, 40
.dwcfi undefined, 41
.dwcfi undefined, 42
.dwcfi undefined, 43
.dwcfi undefined, 44
.dwcfi undefined, 45
.dwcfi undefined, 46
.dwcfi undefined, 47
.dwcfi undefined, 48
.dwcfi undefined, 49
.dwcfi undefined, 50
.dwcfi undefined, 51
.dwcfi undefined, 52
.dwcfi undefined, 53
.dwcfi undefined, 54
.dwcfi undefined, 55
.dwcfi undefined, 56
.dwcfi undefined, 57
.dwcfi undefined, 58
.dwcfi undefined, 59
.dwcfi undefined, 60
.dwcfi undefined, 61
.dwcfi undefined, 62
.dwcfi undefined, 63
.dwcfi undefined, 64
.dwcfi undefined, 65
.dwcfi undefined, 66
.dwcfi undefined, 67
.dwcfi undefined, 68
.dwcfi undefined, 69
.dwcfi undefined, 70
.dwcfi undefined, 71
.dwcfi undefined, 72
.dwcfi undefined, 73
.dwcfi undefined, 74
.dwcfi undefined, 75
.dwcfi undefined, 76
.dwcfi undefined, 77
.dwcfi undefined, 78
.dwcfi undefined, 79
.dwcfi undefined, 80
.dwcfi undefined, 81
.dwcfi undefined, 82
.dwcfi undefined, 83
.dwcfi undefined, 84
.dwcfi undefined, 85
.dwcfi undefined, 86
.dwcfi undefined, 87
.dwcfi undefined, 88
.dwcfi undefined, 89
.dwcfi undefined, 90
.dwcfi undefined, 91
.dwendentry
;***************************************************************
;* DWARF REGISTER MAP *
;***************************************************************
$C$DW$44 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0")
.dwattr $C$DW$44, DW_AT_location[DW_OP_reg0]
$C$DW$45 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0")
.dwattr $C$DW$45, DW_AT_location[DW_OP_reg1]
$C$DW$46 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0_G")
.dwattr $C$DW$46, DW_AT_location[DW_OP_reg2]
$C$DW$47 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1")
.dwattr $C$DW$47, DW_AT_location[DW_OP_reg3]
$C$DW$48 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1")
.dwattr $C$DW$48, DW_AT_location[DW_OP_reg4]
$C$DW$49 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1_G")
.dwattr $C$DW$49, DW_AT_location[DW_OP_reg5]
$C$DW$50 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2")
.dwattr $C$DW$50, DW_AT_location[DW_OP_reg6]
$C$DW$51 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2")
.dwattr $C$DW$51, DW_AT_location[DW_OP_reg7]
$C$DW$52 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2_G")
.dwattr $C$DW$52, DW_AT_location[DW_OP_reg8]
$C$DW$53 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3")
.dwattr $C$DW$53, DW_AT_location[DW_OP_reg9]
$C$DW$54 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3")
.dwattr $C$DW$54, DW_AT_location[DW_OP_reg10]
$C$DW$55 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3_G")
.dwattr $C$DW$55, DW_AT_location[DW_OP_reg11]
$C$DW$56 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T0")
.dwattr $C$DW$56, DW_AT_location[DW_OP_reg12]
$C$DW$57 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T1")
.dwattr $C$DW$57, DW_AT_location[DW_OP_reg13]
$C$DW$58 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T2")
.dwattr $C$DW$58, DW_AT_location[DW_OP_reg14]
$C$DW$59 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T3")
.dwattr $C$DW$59, DW_AT_location[DW_OP_reg15]
$C$DW$60 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR0")
.dwattr $C$DW$60, DW_AT_location[DW_OP_reg16]
$C$DW$61 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR0")
.dwattr $C$DW$61, DW_AT_location[DW_OP_reg17]
$C$DW$62 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR1")
.dwattr $C$DW$62, DW_AT_location[DW_OP_reg18]
$C$DW$63 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR1")
.dwattr $C$DW$63, DW_AT_location[DW_OP_reg19]
$C$DW$64 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR2")
.dwattr $C$DW$64, DW_AT_location[DW_OP_reg20]
$C$DW$65 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR2")
.dwattr $C$DW$65, DW_AT_location[DW_OP_reg21]
$C$DW$66 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR3")
.dwattr $C$DW$66, DW_AT_location[DW_OP_reg22]
$C$DW$67 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR3")
.dwattr $C$DW$67, DW_AT_location[DW_OP_reg23]
$C$DW$68 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR4")
.dwattr $C$DW$68, DW_AT_location[DW_OP_reg24]
$C$DW$69 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR4")
.dwattr $C$DW$69, DW_AT_location[DW_OP_reg25]
$C$DW$70 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR5")
.dwattr $C$DW$70, DW_AT_location[DW_OP_reg26]
$C$DW$71 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR5")
.dwattr $C$DW$71, DW_AT_location[DW_OP_reg27]
$C$DW$72 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR6")
.dwattr $C$DW$72, DW_AT_location[DW_OP_reg28]
$C$DW$73 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR6")
.dwattr $C$DW$73, DW_AT_location[DW_OP_reg29]
$C$DW$74 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR7")
.dwattr $C$DW$74, DW_AT_location[DW_OP_reg30]
$C$DW$75 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR7")
.dwattr $C$DW$75, DW_AT_location[DW_OP_reg31]
$C$DW$76 .dwtag DW_TAG_TI_assign_register, DW_AT_name("FP")
.dwattr $C$DW$76, DW_AT_location[DW_OP_regx 0x20]
$C$DW$77 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XFP")
.dwattr $C$DW$77, DW_AT_location[DW_OP_regx 0x21]
$C$DW$78 .dwtag DW_TAG_TI_assign_register, DW_AT_name("PC")
.dwattr $C$DW$78, DW_AT_location[DW_OP_regx 0x22]
$C$DW$79 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SP")
.dwattr $C$DW$79, DW_AT_location[DW_OP_regx 0x23]
$C$DW$80 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XSP")
.dwattr $C$DW$80, DW_AT_location[DW_OP_regx 0x24]
$C$DW$81 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BKC")
.dwattr $C$DW$81, DW_AT_location[DW_OP_regx 0x25]
$C$DW$82 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BK03")
.dwattr $C$DW$82, DW_AT_location[DW_OP_regx 0x26]
$C$DW$83 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BK47")
.dwattr $C$DW$83, DW_AT_location[DW_OP_regx 0x27]
$C$DW$84 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST0")
.dwattr $C$DW$84, DW_AT_location[DW_OP_regx 0x28]
$C$DW$85 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST1")
.dwattr $C$DW$85, DW_AT_location[DW_OP_regx 0x29]
$C$DW$86 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST2")
.dwattr $C$DW$86, DW_AT_location[DW_OP_regx 0x2a]
$C$DW$87 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST3")
.dwattr $C$DW$87, DW_AT_location[DW_OP_regx 0x2b]
$C$DW$88 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP")
.dwattr $C$DW$88, DW_AT_location[DW_OP_regx 0x2c]
$C$DW$89 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP05")
.dwattr $C$DW$89, DW_AT_location[DW_OP_regx 0x2d]
$C$DW$90 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP67")
.dwattr $C$DW$90, DW_AT_location[DW_OP_regx 0x2e]
$C$DW$91 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRC0")
.dwattr $C$DW$91, DW_AT_location[DW_OP_regx 0x2f]
$C$DW$92 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA0")
.dwattr $C$DW$92, DW_AT_location[DW_OP_regx 0x30]
$C$DW$93 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA0_H")
.dwattr $C$DW$93, DW_AT_location[DW_OP_regx 0x31]
$C$DW$94 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA0")
.dwattr $C$DW$94, DW_AT_location[DW_OP_regx 0x32]
$C$DW$95 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA0_H")
.dwattr $C$DW$95, DW_AT_location[DW_OP_regx 0x33]
$C$DW$96 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRS1")
.dwattr $C$DW$96, DW_AT_location[DW_OP_regx 0x34]
$C$DW$97 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRC1")
.dwattr $C$DW$97, DW_AT_location[DW_OP_regx 0x35]
$C$DW$98 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA1")
.dwattr $C$DW$98, DW_AT_location[DW_OP_regx 0x36]
$C$DW$99 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA1_H")
.dwattr $C$DW$99, DW_AT_location[DW_OP_regx 0x37]
$C$DW$100 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA1")
.dwattr $C$DW$100, DW_AT_location[DW_OP_regx 0x38]
$C$DW$101 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA1_H")
.dwattr $C$DW$101, DW_AT_location[DW_OP_regx 0x39]
$C$DW$102 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CSR")
.dwattr $C$DW$102, DW_AT_location[DW_OP_regx 0x3a]
$C$DW$103 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RPTC")
.dwattr $C$DW$103, DW_AT_location[DW_OP_regx 0x3b]
$C$DW$104 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CDP")
.dwattr $C$DW$104, DW_AT_location[DW_OP_regx 0x3c]
$C$DW$105 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XCDP")
.dwattr $C$DW$105, DW_AT_location[DW_OP_regx 0x3d]
$C$DW$106 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TRN0")
.dwattr $C$DW$106, DW_AT_location[DW_OP_regx 0x3e]
$C$DW$107 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TRN1")
.dwattr $C$DW$107, DW_AT_location[DW_OP_regx 0x3f]
$C$DW$108 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA01")
.dwattr $C$DW$108, DW_AT_location[DW_OP_regx 0x40]
$C$DW$109 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA23")
.dwattr $C$DW$109, DW_AT_location[DW_OP_regx 0x41]
$C$DW$110 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA45")
.dwattr $C$DW$110, DW_AT_location[DW_OP_regx 0x42]
$C$DW$111 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA67")
.dwattr $C$DW$111, DW_AT_location[DW_OP_regx 0x43]
$C$DW$112 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSAC")
.dwattr $C$DW$112, DW_AT_location[DW_OP_regx 0x44]
$C$DW$113 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CARRY")
.dwattr $C$DW$113, DW_AT_location[DW_OP_regx 0x45]
$C$DW$114 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TC1")
.dwattr $C$DW$114, DW_AT_location[DW_OP_regx 0x46]
$C$DW$115 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TC2")
.dwattr $C$DW$115, DW_AT_location[DW_OP_regx 0x47]
$C$DW$116 .dwtag DW_TAG_TI_assign_register, DW_AT_name("M40")
.dwattr $C$DW$116, DW_AT_location[DW_OP_regx 0x48]
$C$DW$117 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SXMD")
.dwattr $C$DW$117, DW_AT_location[DW_OP_regx 0x49]
$C$DW$118 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ARMS")
.dwattr $C$DW$118, DW_AT_location[DW_OP_regx 0x4a]
$C$DW$119 .dwtag DW_TAG_TI_assign_register, DW_AT_name("C54CM")
.dwattr $C$DW$119, DW_AT_location[DW_OP_regx 0x4b]
$C$DW$120 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SATA")
.dwattr $C$DW$120, DW_AT_location[DW_OP_regx 0x4c]
$C$DW$121 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SATD")
.dwattr $C$DW$121, DW_AT_location[DW_OP_regx 0x4d]
$C$DW$122 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RDM")
.dwattr $C$DW$122, DW_AT_location[DW_OP_regx 0x4e]
$C$DW$123 .dwtag DW_TAG_TI_assign_register, DW_AT_name("FRCT")
.dwattr $C$DW$123, DW_AT_location[DW_OP_regx 0x4f]
$C$DW$124 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SMUL")
.dwattr $C$DW$124, DW_AT_location[DW_OP_regx 0x50]
$C$DW$125 .dwtag DW_TAG_TI_assign_register, DW_AT_name("INTM")
.dwattr $C$DW$125, DW_AT_location[DW_OP_regx 0x51]
$C$DW$126 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR0LC")
.dwattr $C$DW$126, DW_AT_location[DW_OP_regx 0x52]
$C$DW$127 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR1LC")
.dwattr $C$DW$127, DW_AT_location[DW_OP_regx 0x53]
$C$DW$128 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR2LC")
.dwattr $C$DW$128, DW_AT_location[DW_OP_regx 0x54]
$C$DW$129 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR3LC")
.dwattr $C$DW$129, DW_AT_location[DW_OP_regx 0x55]
$C$DW$130 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR4LC")
.dwattr $C$DW$130, DW_AT_location[DW_OP_regx 0x56]
$C$DW$131 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR5LC")
.dwattr $C$DW$131, DW_AT_location[DW_OP_regx 0x57]
$C$DW$132 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR6LC")
.dwattr $C$DW$132, DW_AT_location[DW_OP_regx 0x58]
$C$DW$133 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR7LC")
.dwattr $C$DW$133, DW_AT_location[DW_OP_regx 0x59]
$C$DW$134 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CDPLC")
.dwattr $C$DW$134, DW_AT_location[DW_OP_regx 0x5a]
$C$DW$135 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CIE_RETA")
.dwattr $C$DW$135, DW_AT_location[DW_OP_regx 0x5b]
.dwendtag $C$DW$CU
| 44.391148 | 134 | 0.645307 |
831f85e6d43e8b7b207bae488cd1341f516d1dc6 | 140 | rs | Rust | lun/src/vm/prelude.rs | aslilac/lun | 3fce66432a8a0110b3bc1cc44b048c107d3cd318 | [
"MIT"
] | 2 | 2022-01-15T04:45:47.000Z | 2022-02-20T18:40:45.000Z | lun/src/vm/prelude.rs | aslilac/lun | 3fce66432a8a0110b3bc1cc44b048c107d3cd318 | [
"MIT"
] | 2 | 2022-01-15T06:10:27.000Z | 2022-01-15T10:07:08.000Z | lun/src/vm/prelude.rs | aslilac/lun | 3fce66432a8a0110b3bc1cc44b048c107d3cd318 | [
"MIT"
] | null | null | null | pub use super::{
Vm, VmByteRegister, VmError, VmHwordRegister, VmNativeRegister, VmNativeRegister::*,
VmQwordRegister, VmResult,
};
| 28 | 88 | 0.742857 |
5830124b65a43ab2519b0bcab9b7a85eab5d68c7 | 361 | h | C | Hammer/HMRConcatenation.h | robrix/Hammer | 1967926601b686d5f4242d4f1a5a682703885a42 | [
"BSD-3-Clause"
] | 6 | 2015-11-06T08:11:54.000Z | 2021-08-15T10:21:34.000Z | Hammer/HMRConcatenation.h | robrix/Hammer | 1967926601b686d5f4242d4f1a5a682703885a42 | [
"BSD-3-Clause"
] | null | null | null | Hammer/HMRConcatenation.h | robrix/Hammer | 1967926601b686d5f4242d4f1a5a682703885a42 | [
"BSD-3-Clause"
] | null | null | null | // Copyright (c) 2014 Rob Rix. All rights reserved.
#import <Hammer/HMRNonterminal.h>
@interface HMRConcatenation : HMRNonterminal
+(instancetype)concatenateFirst:(HMRCombinator *)first second:(HMRCombinator *)second;
@property (readonly) HMRCombinator *first;
@property (readonly) HMRCombinator *second;
-(instancetype)init UNAVAILABLE_ATTRIBUTE;
@end
| 22.5625 | 86 | 0.783934 |
2f17cd9d07e2881857cdb2a77418893832d3f834 | 226 | php | PHP | src/Components/XmlReader/XmlReaderInterface.php | aragon999/packages | decf93f576b5520216f3d1137c72269e5a6cfd51 | [
"MIT"
] | null | null | null | src/Components/XmlReader/XmlReaderInterface.php | aragon999/packages | decf93f576b5520216f3d1137c72269e5a6cfd51 | [
"MIT"
] | null | null | null | src/Components/XmlReader/XmlReaderInterface.php | aragon999/packages | decf93f576b5520216f3d1137c72269e5a6cfd51 | [
"MIT"
] | null | null | null | <?php declare(strict_types=1);
namespace App\Components\XmlReader;
interface XmlReaderInterface
{
/**
* @param string $xmlFile
*
* @return array
*/
public function read(string $xmlFile): array;
}
| 16.142857 | 49 | 0.646018 |
c7c7bcce362abfd23dacb2df3138b235937fc234 | 646 | kt | Kotlin | app/src/main/java/com/github/ferum_bot/bookreuse/ui/fragment/messages/MessagesScreenFragment.kt | Ferum-bot/BookReuse | cd3344d5f4d971595f99eb519ed3859df0325f6a | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/github/ferum_bot/bookreuse/ui/fragment/messages/MessagesScreenFragment.kt | Ferum-bot/BookReuse | cd3344d5f4d971595f99eb519ed3859df0325f6a | [
"Apache-2.0"
] | null | null | null | app/src/main/java/com/github/ferum_bot/bookreuse/ui/fragment/messages/MessagesScreenFragment.kt | Ferum-bot/BookReuse | cd3344d5f4d971595f99eb519ed3859df0325f6a | [
"Apache-2.0"
] | null | null | null | package com.github.ferum_bot.bookreuse.ui.fragment.messages
import androidx.fragment.app.Fragment
import com.github.ferum_bot.bookreuse.R
import com.github.ferum_bot.bookreuse.databinding.FragmentMessagesScreenContainerBinding
import com.github.ferum_bot.bookreuse.ui.fragment.base.BaseFragment
import com.github.ferum_bot.bookreuse.ui.fragment.delegates.viewBinding
/**
* Created by Matvey Popov.
* Date: 19.02.2021
* Time: 23:04
* Project: BookReuse
*/
class MessagesScreenFragment: BaseFragment(R.layout.fragment_messages_screen_container) {
private val binding by viewBinding { FragmentMessagesScreenContainerBinding.bind(it) }
} | 34 | 90 | 0.825077 |
1bf87aadf6a96f3ce6656671246e15ac1ff472ee | 9,333 | py | Python | 1.Data-exploration/Profiles_level4/L1000/scripts/nbconverted/L1000_calculate_SS_TAS.py | AdeboyeML/lincs-profiling-comparison | 9c927947f4d6cec1a39cf655281afe90e797bf6f | [
"BSD-3-Clause"
] | null | null | null | 1.Data-exploration/Profiles_level4/L1000/scripts/nbconverted/L1000_calculate_SS_TAS.py | AdeboyeML/lincs-profiling-comparison | 9c927947f4d6cec1a39cf655281afe90e797bf6f | [
"BSD-3-Clause"
] | null | null | null | 1.Data-exploration/Profiles_level4/L1000/scripts/nbconverted/L1000_calculate_SS_TAS.py | AdeboyeML/lincs-profiling-comparison | 9c927947f4d6cec1a39cf655281afe90e797bf6f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# ### - Calculate the signature strength and Transcriptional Activity Score for each compound based on its replicates for Cell painting Level-4 profiles
#
#
# #### Definitions from [clue.io](https://clue.io/connectopedia/signature_quality_metrics)
#
# - **Signature strength -** Signature strength is a measure of the magnitude of the response elicited by a given treatment and is computed as the number of landmark genes (out of 978) with absolute z-score greater than or equal to 2. SS helps to further discriminate signatures that were consistent (high CC) from those that did or did not impact many genes.
#
# - **Transcriptional Activity Score (TAS) -** is an aggregate measure of signature strength (SS) and median replicate correlation (CC) that is intended to represent a perturbagen's transcriptional activity. The more transcriptionally active a perturbagen, the higher its TAS.
#
# In[1]:
import os
import argparse
import pandas as pd
import numpy as np
import re
from os import walk
from collections import Counter
import random
import shutil
from statistics import median
import math
from math import sqrt
from functools import reduce
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')
import seaborn as sns
sns.set_style("darkgrid")
import pickle
from statistics import median
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning)
# In[2]:
L1000_level4_path = "L1000_lvl4_cpd_replicate_datasets"
# In[3]:
df_level4 = pd.read_csv(os.path.join(L1000_level4_path, 'L1000_level4_cpd_replicates.csv.gz'),
compression='gzip',low_memory = False)
df_cpd_med_scores = pd.read_csv(os.path.join(L1000_level4_path, 'cpd_replicate_median_scores.csv'))
# In[4]:
##cpds_replicates_dict = dict(zip(df_cpd_med_scores['cpd'], df_cpd_med_scores['no_of_replicates']))
# In[5]:
metadata_cols = ['replicate_id', 'Metadata_broad_sample', 'pert_id', 'dose', 'pert_idose',
'pert_iname', 'moa', 'det_plate', 'det_well', 'sig_id']
# In[6]:
n_L1000_feats = df_level4.drop(metadata_cols, axis=1).shape[1]
# In[7]:
def compute_signature_strength(cpds_list, df, metadata_cols = metadata_cols):
"""Computes signature strength per compound based on its replicates"""
cpds_SS = {}
for cpd in cpds_list:
cpd_replicates = df[df['pert_iname'] == cpd].copy()
cpd_replicates.drop(metadata_cols, axis = 1, inplace = True)
cpd_replicates = cpd_replicates * sqrt(cpd_replicates.shape[0])
df_cpd_reps = abs(cpd_replicates.T)
ldmk_genes_gtr_2 = df_cpd_reps[df_cpd_reps >= 2.0].stack().count()
ss_norm = ldmk_genes_gtr_2/len(df_cpd_reps.columns)
cpds_SS[cpd] = ss_norm
return cpds_SS
# In[8]:
def compute_tas(cpds_SS, cpds_median_score, dose, num_feats):
"""Computes Transcriptional activity score (TAS) per compound based on its replicates"""
cpds_TAS = {}
for cpd in cpds_SS:
cpds_TAS[cpd] = sqrt((max(cpds_median_score[cpd][dose-1],0) * cpds_SS[cpd])/num_feats)
return cpds_TAS
# In[9]:
def compute_SS_TAS(df, cpds_median_score, num_L1000_feats = n_L1000_feats):
"""
Computes both Transcriptional activity score (TAS) and
signature strength per compound based on its replicates across all doses"""
dose_list = list(set(df['dose'].unique().tolist()))[1:7]
for dose in dose_list:
df_dose = df[df['dose'] == dose].copy()
cpds_ss = compute_signature_strength(list(cpds_median_score.keys()), df_dose)
cpds_tas = compute_tas(cpds_ss, cpds_median_score, dose, num_L1000_feats)
sorted_ss = {key:value for key, value in sorted(cpds_ss.items(), key=lambda item: item[0])}
sorted_tas = {key:value for key, value in sorted(cpds_tas.items(), key=lambda item: item[0])}
if dose == 1:
df_cpd_ss = pd.DataFrame.from_dict(sorted_ss, orient='index', columns = ['dose_1'])
df_cpd_tas = pd.DataFrame.from_dict(sorted_tas, orient='index', columns = ['dose_1'])
else:
df_cpd_ss['dose_' + str(dose)] = sorted_ss.values()
df_cpd_tas['dose_' + str(dose)] = sorted_tas.values()
return df_cpd_ss, df_cpd_tas
# In[10]:
df_med_scores = df_cpd_med_scores.set_index('cpd').rename_axis(None, axis=0).drop(['no_of_replicates'], axis = 1)
cpd_med_scores = df_med_scores.T.to_dict('list')
# In[11]:
df_ss_score, df_tas_score = compute_SS_TAS(df_level4, cpd_med_scores)
# In[12]:
df_cpd_med_scores.drop(['no_of_replicates'],axis = 1, inplace = True)
# In[13]:
df_ss_score = df_ss_score.reset_index().rename({'index':'cpd'}, axis = 1)
df_tas_score = df_tas_score.reset_index().rename({'index':'cpd'}, axis = 1)
# In[14]:
def rename_cols(df):
'Rename columns from dose number to actual doses'
df.rename(columns= {'dose_1' : '0.04 uM', 'dose_2':'0.12 uM', 'dose_3':'0.37 uM',
'dose_4': '1.11 uM', 'dose_5':'3.33 uM', 'dose_6':'10 uM'}, inplace = True)
return df
# In[15]:
df_cpd_med_scores = rename_cols(df_cpd_med_scores)
df_ss_score = rename_cols(df_ss_score)
df_tas_score = rename_cols(df_tas_score)
# In[16]:
def melt_df(df, col_name):
"""
This function returns a reformatted dataframe with
3 columns: cpd, dose number and dose_values(median score or p-value)
"""
df = df.melt(id_vars=['cpd'], var_name="dose", value_name=col_name)
return df
# In[17]:
def merge_ss_tas_med_scores(df_med_scores, df_ss_scores, df_tas_scores):
"""
This function merge median_scores (replication correlation),
signature strength (SS) and MAS (transcriptional activity score)
dataframes for each compound for all doses(1-6)
"""
df_med_vals = melt_df(df_med_scores, 'replicate_correlation')
df_ss_vals = melt_df(df_ss_scores, 'signature_strength')
df_tas_vals = melt_df(df_tas_scores, 'TAS')
metrics_df = [df_med_vals, df_ss_vals, df_tas_vals]
df_merged = reduce(lambda left,right: pd.merge(left,right,on=['cpd', 'dose'], how='inner'), metrics_df)
return df_merged
# In[18]:
df_all_vals = merge_ss_tas_med_scores(df_cpd_med_scores, df_ss_score, df_tas_score)
# In[19]:
df_all_vals.head(10)
# In[20]:
def save_to_csv(df, path, file_name, compress=None):
"""saves dataframes to csv"""
if not os.path.exists(path):
os.mkdir(path)
df.to_csv(os.path.join(path, file_name), index=False, compression=compress)
# In[21]:
save_to_csv(df_all_vals, L1000_level4_path, 'L1000_all_scores.csv')
# ### - DMSO MAS and replicate correlation
#
# - Calculate 95th percentile of DMSO MAS score
# In[22]:
df_dmso = df_level4[df_level4['pert_iname'] == 'DMSO'].copy()
# In[23]:
df_dmso['det_plate'].unique()
# In[24]:
len(df_dmso['det_plate'].unique())
# In[25]:
def compute_dmso_SS_median_score(df):
"""
This function computes the signature strength (SS) and
median correlation replicate score for DMSO per plate
"""
dmso_median_scores = {}
dmso_ss_scores = {}
for plate in df['det_plate'].unique():
plt_replicates = df[df['det_plate'] == plate].copy()
if plt_replicates.shape[0] > 1:
plt_replicates.drop(['replicate_id', 'Metadata_broad_sample', 'pert_id', 'dose', 'pert_idose',
'pert_iname', 'moa', 'det_plate', 'det_well', 'sig_id'], axis = 1, inplace = True)
plt_rep_corr = plt_replicates.astype('float64').T.corr(method = 'spearman').values
median_score = median(list(plt_rep_corr[np.triu_indices(len(plt_rep_corr), k = 1)]))
dmso_median_scores[plate] = median_score
##signature strength --ss
plt_replicates = plt_replicates * sqrt(plt_replicates.shape[0])
df_plt_reps = abs(plt_replicates.T)
ldk_genes_gtr_2 = df_plt_reps[df_plt_reps >= 2.0].stack().count()
ss_norm = ldk_genes_gtr_2/len(df_plt_reps.columns)
dmso_ss_scores[plate] = ss_norm
return dmso_median_scores, dmso_ss_scores
# In[26]:
dmso_median_scores, dmso_ss_scores = compute_dmso_SS_median_score(df_dmso)
# In[27]:
def compute_dmso_TAS(dmso_median, dmso_ss, num_feats = n_L1000_feats):
"""
This function computes Transcriptional Activity Score (TAS)
per plate for only DMSO replicates
"""
dmso_tas_scores = {}
for plate in dmso_median:
dmso_tas_scores[plate] = sqrt((abs(dmso_median[plate]) * dmso_ss[plate])/num_feats)
return dmso_tas_scores
# In[28]:
dmso_tas_scores = compute_dmso_TAS(dmso_median_scores, dmso_ss_scores)
# In[29]:
dmso_95pct = np.percentile(list(dmso_tas_scores.values()),95)
# In[30]:
print(dmso_95pct)
# In[31]:
def save_to_pickle(value, path, file_name):
"""saves a value into a pickle file"""
if not os.path.exists(path):
os.mkdir(path)
with open(os.path.join(path, file_name), 'wb') as handle:
pickle.dump(value, handle, protocol=pickle.HIGHEST_PROTOCOL)
# In[32]:
save_to_pickle(dmso_95pct, L1000_level4_path, 'L1000_dmso_95_percentile_TAS.pickle')
# In[ ]:
| 26.665714 | 359 | 0.687775 |
9bdb82720f63d8e8d1c9f5bafd80b5e09f997a9c | 2,638 | js | JavaScript | __mocks__/contentMock.js | andreybejarano/rakuten-technical-test | 0e198e30bd99bdc17eee78d9fd7267eef5692881 | [
"MIT"
] | null | null | null | __mocks__/contentMock.js | andreybejarano/rakuten-technical-test | 0e198e30bd99bdc17eee78d9fd7267eef5692881 | [
"MIT"
] | null | null | null | __mocks__/contentMock.js | andreybejarano/rakuten-technical-test | 0e198e30bd99bdc17eee78d9fd7267eef5692881 | [
"MIT"
] | null | null | null | module.exports = {
type: 'movies',
id: 'sobrevive-esta-noche',
numerical_id: 127099,
title: 'Sobrevive esta noche',
year: 2020,
duration: 86,
label: '3,99 €',
classification: {
type: 'classifications',
id: '5',
numerical_id: 5,
name: '18',
age: 18,
adult:
false,
description: 'Mostrar todos los contenidos, excluyendo los clasificados para adultos',
default: true
},
images: {
artwork: 'https://images-2.wuaki.tv/system/artworks/127099/master/sobrevive-esta-noche-1594366830.png',
snapshot: 'https://images-0.wuaki.tv/system/shots/224078/original/survive-the-night-1594046326.jpeg',
ribbons: []
},
highlighted_score: {
score: 4.2,
amount_of_votes: 50,
formatted_amount_of_votes: '50',
site: {
type: 'sites',
id: '1',
numerical_id: 1,
name: 'IMDb',
show_image: false,
scale: 10,
image: 'https://images-0.wuaki.tv/system/images/1/original/imdb-1594119387.png'
}
},
rating: {
average: 3,
scale: 5
},
labels: {
audio_qualities: [
{
type: 'audio_qualities',
id: '2.0',
numerical_id: 2,
name: '2.0 (Stereo)',
abbr: '2.0',
image: 'https://images-1.wuaki.tv/system/logos/2/original/2-0-stereo-1456155689.png'
}
],
hdr_types: [
{
type: 'hdr_types',
id: 'NONE',
numerical_id: 1,
name: 'SDR',
abbr: 'NONE',
image: null
}
],
purchase_types: [
{
type: 'purchase_types',
id: '1',
numerical_id: 1,
is_recurring: false,
name: 'Alquiler 48H',
label: 'ALQUILER 48H',
kind: 'rental',
expires_after_in_seconds: 172800,
available_time_in_seconds: 172800
},
{
type: 'purchase_types',
id: '2',
numerical_id: 2,
is_recurring: false,
name: 'Venta (Digital Locker)',
label: 'VENTA (DIGITAL LOCKER)',
kind: 'purchase',
expires_after_in_seconds: null,
available_time_in_seconds: null
}
],
video_qualities: [
{
type: 'video_qualities',
id: 'SD',
numerical_id: 2,
name: 'SD',
abbr: 'SD',
position: 0,
image: 'https://images-1.wuaki.tv/system/logos/2/original/sd-1456155688.png'
},
{
type: 'video_qualities',
id: 'HD',
numerical_id: 1,
name: 'HD',
abbr: 'HD',
position: 1,
image: 'https://images-0.wuaki.tv/system/logos/1/original/hd-1456155687.png'
}
]
}
};
| 23.981818 | 107 | 0.543215 |
3bd1f7120112b27bfea8092f6f9ce1320d4aa253 | 274 | h | C | src/minion/sleep.h | Kerrigan29a/pilf | 004f6b102601aa896a59ec2387bfac8724e06d3a | [
"BSD-3-Clause"
] | 1 | 2016-01-24T17:54:49.000Z | 2016-01-24T17:54:49.000Z | src/minion/sleep.h | Kerrigan29a/pilf | 004f6b102601aa896a59ec2387bfac8724e06d3a | [
"BSD-3-Clause"
] | null | null | null | src/minion/sleep.h | Kerrigan29a/pilf | 004f6b102601aa896a59ec2387bfac8724e06d3a | [
"BSD-3-Clause"
] | null | null | null | #ifndef __PILF_MINION__SLEEP_H__
#define __PILF_MINION__SLEEP_H__
#ifdef WIN32
#include <windows.h>
#define minion_sleep(seconds) Sleep(seconds * 1000)
#else
#include <unistd.h>
#define minion_sleep(seconds) sleep(seconds)
#endif
#endif /* __PILF_MINION__SLEEP_H__ */ | 16.117647 | 51 | 0.784672 |
7013a139ae49815f899bd76cbd44d79214caaef0 | 4,411 | kt | Kotlin | whetstone/compiler/src/main/kotlin/com/freeletics/mad/whetstone/codegen/renderer/RendererFragmentGenerator.kt | ychescale9/mad | 28c56be1f24b6aaf7bfbdbcc059606b7efdfb9d2 | [
"Apache-2.0"
] | 27 | 2021-09-05T17:18:09.000Z | 2022-03-21T03:19:44.000Z | whetstone/compiler/src/main/kotlin/com/freeletics/mad/whetstone/codegen/renderer/RendererFragmentGenerator.kt | ychescale9/mad | 28c56be1f24b6aaf7bfbdbcc059606b7efdfb9d2 | [
"Apache-2.0"
] | 11 | 2021-09-02T14:40:21.000Z | 2022-03-11T13:43:41.000Z | whetstone/compiler/src/main/kotlin/com/freeletics/mad/whetstone/codegen/renderer/RendererFragmentGenerator.kt | ychescale9/mad | 28c56be1f24b6aaf7bfbdbcc059606b7efdfb9d2 | [
"Apache-2.0"
] | 5 | 2021-07-27T14:43:16.000Z | 2022-03-11T07:50:47.000Z | package com.freeletics.mad.whetstone.codegen.renderer
import com.freeletics.mad.whetstone.RendererFragmentData
import com.freeletics.mad.whetstone.codegen.common.viewModelClassName
import com.freeletics.mad.whetstone.codegen.common.viewModelComponentName
import com.freeletics.mad.whetstone.codegen.util.Generator
import com.freeletics.mad.whetstone.codegen.util.propertyName
import com.freeletics.mad.whetstone.codegen.util.bundle
import com.freeletics.mad.whetstone.codegen.util.fragment
import com.freeletics.mad.whetstone.codegen.util.lateinitPropertySpec
import com.freeletics.mad.whetstone.codegen.util.layoutInflater
import com.freeletics.mad.whetstone.codegen.util.navigationHandlerHandle
import com.freeletics.mad.whetstone.codegen.util.optInAnnotation
import com.freeletics.mad.whetstone.codegen.util.rendererConnect
import com.freeletics.mad.whetstone.codegen.util.view
import com.freeletics.mad.whetstone.codegen.util.viewGroup
import com.freeletics.mad.whetstone.codegen.util.viewModelProvider
import com.squareup.kotlinpoet.CodeBlock
import com.squareup.kotlinpoet.FunSpec
import com.squareup.kotlinpoet.KModifier.OVERRIDE
import com.squareup.kotlinpoet.KModifier.PRIVATE
import com.squareup.kotlinpoet.TypeSpec
internal class RendererFragmentGenerator(
override val data: RendererFragmentData,
) : Generator<RendererFragmentData>() {
private val rendererFragmentClassName = ClassName("${data.baseName}Fragment")
internal fun generate(): TypeSpec {
return TypeSpec.classBuilder(rendererFragmentClassName)
.addAnnotation(optInAnnotation())
.superclass(data.fragmentBaseClass)
.addProperty(lateinitPropertySpec(data.factory))
.addProperty(lateinitPropertySpec(data.stateMachine))
.addFunction(rendererOnCreateViewFun())
.addFunction(rendererInjectFun())
.build()
}
private fun rendererOnCreateViewFun(): FunSpec {
return FunSpec.builder("onCreateView")
.addModifiers(OVERRIDE)
.addParameter("inflater", layoutInflater)
.addParameter("container", viewGroup.copy(nullable = true))
.addParameter("savedInstanceState", bundle.copy(nullable = true))
.returns(view)
.beginControlFlow("if (!::%L.isInitialized)", data.stateMachine.propertyName)
.addStatement("%L()", rendererFragmentInjectName)
.endControlFlow()
.addCode("\n")
// inflate: external method
.addStatement("val renderer = %L.inflate(inflater, container)", data.factory.propertyName)
// connect: external method
.addStatement("%M(renderer, %L)", rendererConnect, data.stateMachine.propertyName)
.addStatement("return renderer.rootView")
.build()
}
private val rendererFragmentInjectName = "inject"
private fun rendererInjectFun(): FunSpec {
return FunSpec.builder(rendererFragmentInjectName)
.addModifiers(PRIVATE)
.beginControlFlow("val viewModelProvider = %M<%T>(this, %T::class) { dependencies, handle -> ", viewModelProvider, data.dependencies, data.parentScope)
// arguments: external method
.addStatement("val arguments = arguments ?: %T.EMPTY", bundle)
.addStatement("%T(dependencies, handle, arguments)", viewModelClassName)
.endControlFlow()
.addStatement("val viewModel = viewModelProvider[%T::class.java]", viewModelClassName)
.addStatement("val component = viewModel.%L", viewModelComponentName)
.addCode("\n")
.addStatement("%1L = component.%1L", data.factory.propertyName)
.addStatement("%1L = component.%1L", data.stateMachine.propertyName)
.addCode(rendererNavigationCode())
.build()
}
private fun rendererNavigationCode(): CodeBlock {
if (data.navigation == null) {
return CodeBlock.of("")
}
return CodeBlock.builder()
.add("\n")
.addStatement("val handler = component.%L", data.navigation.navigationHandler.propertyName)
.addStatement("val navigator = component.%L", data.navigation.navigator.propertyName)
// lifecycle: external method
.addStatement("handler.%N(this, navigator)", navigationHandlerHandle)
.build()
}
}
| 47.430108 | 163 | 0.703015 |
916d3b3633ea773f563b57eae328b2ae7b6bfe4b | 1,448 | html | HTML | web/apps/web_copo/templates/copo/import_ena_accession.html | rpatil524/COPO | cc54a6cfac61584cc97a17073d3837a5820a8b95 | [
"MIT"
] | null | null | null | web/apps/web_copo/templates/copo/import_ena_accession.html | rpatil524/COPO | cc54a6cfac61584cc97a17073d3837a5820a8b95 | [
"MIT"
] | null | null | null | web/apps/web_copo/templates/copo/import_ena_accession.html | rpatil524/COPO | cc54a6cfac61584cc97a17073d3837a5820a8b95 | [
"MIT"
] | null | null | null | {% extends 'copo/base_1col.html' %}
{% load staticfiles %}
{% load web_tags %}
{% load html_tags %}
{% block stylesheet_block %}
{% endblock %}
{% block title_block %} COPO People {% endblock %}
{% block tagline_block %}
{% endblock %}
{% block browse_header_block %}
{% csrf_token %}
<div hidden id="hidden_attrs">
<!-- hidden attributes -->
<input type="hidden" id="nav_component_name" value="person"/>
</div>
{% endblock %}
{% block page_tile %}
{% include "component_navbar.html" %}
{% endblock page_tile %}
{% block content %}
<p>
<h3>Import submissions from ENA</h3>
Add an ENA accession of list of ena accessions here, to have their metadata imported into your COPO profile. You
will then be able to reference them for example by using their samples in your own submissions.
</p>
<div class="form-group">
<label for="accessions">Accessions (separate accessions with commas):</label>
<textarea class="form-control" rows="5" id="accessions-text-area"></textarea>
</div>
<button type="button" class="btn btn-primary pull-right" id="import-button" name="Import">Import</button>
{% endblock %}
{% block js_block %}
<script src="{% static 'copo/js/generic_handlers.js' %}"></script>
<script src="{% static 'copo/js/copo_form_handlers.js' %}"></script>
<script src="{% static 'copo/js/import_ena_accession.js' %}"></script>
{% endblock %}
| 27.320755 | 116 | 0.648481 |
6e0bee7db0b9a1dbd7f6b61af8337a3e83ce9270 | 106 | sql | SQL | CCIA.SQL/dbo/Tables/ecoregions.sql | ucdavis/CCIA | 24cc0f940148e6f5cd3b594e06c169da03264468 | [
"MIT"
] | 1 | 2019-02-01T20:32:21.000Z | 2019-02-01T20:32:21.000Z | CCIA.SQL/dbo/Tables/ecoregions.sql | ucdavis/CCIA | 24cc0f940148e6f5cd3b594e06c169da03264468 | [
"MIT"
] | 11 | 2019-04-19T19:24:31.000Z | 2021-11-20T03:58:38.000Z | CCIA.SQL/dbo/Tables/ecoregions.sql | ucdavis/CCIA | 24cc0f940148e6f5cd3b594e06c169da03264468 | [
"MIT"
] | null | null | null | CREATE TABLE [dbo].[ecoregions] (
[id] INT NOT NULL,
[name] VARCHAR (50) NOT NULL
);
| 17.666667 | 34 | 0.528302 |
93a71c4db134ea0a84943d9ec4e61bb7e7cb2ddf | 238 | sql | SQL | database/mssql/scripts/dbscripts/PSP_PIMS_S25_01/Alter Up/89_DML_PIMS_PROPERTY_ID_SEQ.sql | FuriousLlama/PSP | dd5d6156980235957498b458c7ba8003c398d53e | [
"Apache-2.0"
] | null | null | null | database/mssql/scripts/dbscripts/PSP_PIMS_S25_01/Alter Up/89_DML_PIMS_PROPERTY_ID_SEQ.sql | FuriousLlama/PSP | dd5d6156980235957498b458c7ba8003c398d53e | [
"Apache-2.0"
] | null | null | null | database/mssql/scripts/dbscripts/PSP_PIMS_S25_01/Alter Up/89_DML_PIMS_PROPERTY_ID_SEQ.sql | FuriousLlama/PSP | dd5d6156980235957498b458c7ba8003c398d53e | [
"Apache-2.0"
] | null | null | null | DECLARE @PIMS_PROPERTY_ID VARCHAR(MAX);
DECLARE @sql VARCHAR(MAX);
SET @PIMS_PROPERTY_ID = (SELECT max(PROPERTY_ID) from PIMS_PROPERTY) + 1;
SET @sql = 'ALTER SEQUENCE PIMS_PROPERTY_ID_SEQ RESTART WITH ' + @PIMS_PROPERTY_ID
EXEC (@sql)
GO | 39.666667 | 82 | 0.777311 |
11f0f5d41a9b1208039356473f078f8c5f6f57c4 | 1,318 | html | HTML | java2ts-demo-client/src/pages/home/home.html | bsorrentino/java2typescript-demo | 45039576f90484456ecb65453bdc23f869eaa3ad | [
"MIT"
] | 1 | 2020-07-15T21:10:21.000Z | 2020-07-15T21:10:21.000Z | java2ts-demo-client/src/pages/home/home.html | bsorrentino/java2typescript-demo | 45039576f90484456ecb65453bdc23f869eaa3ad | [
"MIT"
] | null | null | null | java2ts-demo-client/src/pages/home/home.html | bsorrentino/java2typescript-demo | 45039576f90484456ecb65453bdc23f869eaa3ad | [
"MIT"
] | null | null | null |
<ion-header>
<ion-navbar>
<ion-title>
Java to Typescript - Playground
</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-split-pane>
<!-- our side menu -->
<ion-menu [content]="content">
<ion-header>
<ion-toolbar>
<ion-title>Classes</ion-title>
<ion-buttons end>
<button ion-button color="danger" outline (click)="generate()">
generate
</button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-item-group *ngFor="let package of packages">
<ion-item-divider class="package">
<ion-row>
<ion-col col-10>{{package.name}}</ion-col>
<ion-col col-2 class="feature">export</ion-col>
</ion-row>
</ion-item-divider>
<ion-item *ngFor="let class of package.types">
<ion-checkbox [(ngModel)]="class.enabled"></ion-checkbox>
<ion-label>{{class.name}}</ion-label>
<ion-toggle [(ngModel)]="class.export"></ion-toggle>
</ion-item>
</ion-item-group>
</ion-content>
</ion-menu>
<!-- the main content -->
<ion-nav [root]="contentArea" main #content>
</ion-nav>
</ion-split-pane>
</ion-content> | 26.897959 | 75 | 0.518209 |
eb626aba3283a128243ba38d9614daf4eadc6af9 | 1,515 | sql | SQL | database/s_category.sql | vibolyoeung/psarnetwork | 8e0a9c4969db1c27131c41b824a4dbaf8602ba7a | [
"MIT"
] | 4 | 2015-06-11T17:22:25.000Z | 2020-06-02T02:17:08.000Z | database/s_category.sql | vibolyoeung/psarnetwork | 8e0a9c4969db1c27131c41b824a4dbaf8602ba7a | [
"MIT"
] | null | null | null | database/s_category.sql | vibolyoeung/psarnetwork | 8e0a9c4969db1c27131c41b824a4dbaf8602ba7a | [
"MIT"
] | null | null | null | /*
SQLyog Ultimate v10.00 Beta1
MySQL - 5.6.12-log : Database - psarnetwork_db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!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 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`psarnetwork_db` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `psarnetwork_db`;
/*Table structure for table `s_category` */
DROP TABLE IF EXISTS `s_category`;
CREATE TABLE `s_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`m_cat_id` int(11) DEFAULT NULL,
`m_title` varchar(255) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`order` int(11) DEFAULT NULL,
`is_publish` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*Data for the table `s_category` */
insert into `s_category`(`id`,`m_cat_id`,`m_title`,`user_id`,`parent_id`,`order`,`is_publish`) values (1,1,'category',1,0,0,1),(2,2,'category-01',1,1,0,1),(3,3,'category-02',1,1,0,1);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
| 36.071429 | 185 | 0.658086 |
fb8c5536c79b22171a8a2383f42ef4446a0a5cf2 | 2,481 | kt | Kotlin | src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github114.kt | k163377/jackson-module-kotlin | a49aa3a86f5d3e6e0ace82630bf5458d57b4aaee | [
"Apache-2.0"
] | null | null | null | src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github114.kt | k163377/jackson-module-kotlin | a49aa3a86f5d3e6e0ace82630bf5458d57b4aaee | [
"Apache-2.0"
] | null | null | null | src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github114.kt | k163377/jackson-module-kotlin | a49aa3a86f5d3e6e0ace82630bf5458d57b4aaee | [
"Apache-2.0"
] | null | null | null | package com.fasterxml.jackson.module.kotlin.test.github
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import org.junit.Test
import kotlin.reflect.jvm.javaMethod
import kotlin.reflect.jvm.kotlinFunction
import kotlin.test.assertEquals
class TestGithub114 {
data class Foo(val bar: String = "default", val baz: String = "default")
data class FooWithStaticCreator(val bar: String, val baz: String) {
companion object {
val someValue = "someDefaultValue"
@JvmStatic
@JsonCreator
fun createFromJson(bar: String = someValue, baz: String = someValue): FooWithStaticCreator = FooWithStaticCreator(bar, baz)
}
}
@Test
fun testCompanionObjectCreatorWithDefaultParameters() {
val mapper = jacksonObjectMapper()
val foo = mapper.readValue<Foo>("""{"baz": "bazValue"}""")
println(foo)
val fooWithStaticCreator = mapper.readValue<FooWithStaticCreator>("""{"baz": "bazValue"}""")
println(fooWithStaticCreator) // Expect FooWithStaticCreator(bar=default, baz=bazValue), result == MismatchedInputException: Missing required creator property 'bar' (index 0)
assertEquals(FooWithStaticCreator(FooWithStaticCreator.someValue, "bazValue"), fooWithStaticCreator)
}
@Test
fun otherTestVariation() {
val mapper = jacksonObjectMapper()
val testObj = mapper.readValue<Obj>("""{"id":1}""")
assertEquals("yes", testObj.prop)
}
data class Obj(val id: String, val prop: String) {
companion object {
@JsonCreator
@JvmStatic
fun parse(@JsonProperty("id") id: String,
@JsonProperty("name") name: String? = null) = Obj(id, name
?: "yes")
}
}
@Test
fun testCallByFunctionalityWithCompanionObjects() {
val v = Nada.Companion::foo
assertEquals("OK 42", v.callBy(mapOf()))
val v2 = FooWithStaticCreator.Companion::createFromJson.javaMethod!!.kotlinFunction!!
// println(v2.callBy(mapOf(v2.parameters.first() to FooWithStaticCreator, v2.parameters.drop(1).first() to "asdf")))
}
private class Nada {
companion object {
@JvmStatic
fun foo(x: Int = 42) = "OK $x"
}
}
}
| 34.943662 | 182 | 0.658202 |
aeb48346edb604e43437636c138f87e5a34d95c4 | 1,614 | lua | Lua | Lua/Buildings/DustGenerator.lua | startrail/SurvivingMars | b58abe8393497bb07210ce974baa7ea70dbb5a88 | [
"BSD-Source-Code"
] | 1 | 2019-05-21T03:01:00.000Z | 2019-05-21T03:01:00.000Z | Lua/Buildings/DustGenerator.lua | startrail/SurvivingMars | b58abe8393497bb07210ce974baa7ea70dbb5a88 | [
"BSD-Source-Code"
] | null | null | null | Lua/Buildings/DustGenerator.lua | startrail/SurvivingMars | b58abe8393497bb07210ce974baa7ea70dbb5a88 | [
"BSD-Source-Code"
] | null | null | null | DefineClass.DustGenerator =
{
__parents = { "Building" },
properties =
{
{id = "dust_per_sol", name = T{653, "Dust per Sol"}, editor = "number", default = 6000, category = "Dust Generator" },
{id = "dust_range", name = T{654, "Dust Range"}, editor = "number", default = 70 * guim, category = "Dust Generator" },
},
last_dust_throw_time = false,
}
function DustGenerator:GameInit()
self.last_dust_throw_time = GameTime()
end
local hour_duration = const.HourDuration
local sol_duration = const.DayDuration
local dust_generator_query =
{
class = "Building",
area = false,
arearadius = false,
exec = function(bld, dust)
if bld.accumulate_dust then
bld:AddDust(dust)
end
end,
}
local dust_generator_elements_query =
{
class = "DustGridElement",
area = false,
arearadius = false,
exec = function (obj, dust)
obj:AddDust(dust)
end,
}
function DustGenerator:ThrowDust()
if not self.working then
return
end
local time = GameTime() - self.last_dust_throw_time
if time > hour_duration then
local dust = MulDivTrunc(self.dust_per_sol, time, sol_duration)
if dust > 0 then -- allow dust to accumulate if update time is small and always leads to 0 dust
dust_generator_query.area = self
dust_generator_query.arearadius = self.dust_range
ForEach(dust_generator_query, dust)
dust_generator_query.area = false
dust_generator_elements_query.area = self
dust_generator_elements_query.arearadius = self.dust_range
ForEach(dust_generator_elements_query, dust)
dust_generator_elements_query.area = false
self.last_dust_throw_time = GameTime()
end
end
end | 26.032258 | 123 | 0.73482 |
1347d96eb341936c313009356de67a6c41eddf7f | 1,523 | h | C | src/gui/picking/color_picking.h | lii-enac/djnn-cpp | f27c5ba3186186ee22c93ae91c16063556e929b6 | [
"BSD-2-Clause"
] | 4 | 2018-09-11T14:27:57.000Z | 2019-12-16T21:06:26.000Z | src/gui/picking/color_picking.h | lii-enac/djnn-cpp | f27c5ba3186186ee22c93ae91c16063556e929b6 | [
"BSD-2-Clause"
] | null | null | null | src/gui/picking/color_picking.h | lii-enac/djnn-cpp | f27c5ba3186186ee22c93ae91c16063556e929b6 | [
"BSD-2-Clause"
] | 2 | 2018-06-11T14:15:30.000Z | 2019-01-09T12:23:35.000Z | /*
* djnn v2
*
* The copyright holders for the contents of this file are:
* Ecole Nationale de l'Aviation Civile, France (2014-2018)
* See file "license.terms" for the rights and conditions
* defined by copyright holders.
*
*
* Contributors:
* Mathieu Poirier <mathieu.poirier@enac.fr>
* Stéphane Chatty <chatty@enac.fr>
* Mathieu Magnaudet <mathieu.magnaudet@enac.fr>
* Stephane Conversy <stephane.conversy@enac.fr>
*/
#pragma once
#include "picking.h"
#include "display/window.h"
namespace djnn {
class AbstractGShape;
class PickShape
{
public:
PickShape (AbstractGShape* s, bool cache) : _s (s), _cache (cache) {}
AbstractGShape* get_shape () const { return _s; }
bool cache () const { return _cache; }
private:
AbstractGShape *_s;
bool _cache;
};
class ColorPickingView : public Picking
{
public:
ColorPickingView (Window *win);
virtual ~ColorPickingView ();
// Picking
virtual void init ();
AbstractGShape* pick (double x, double y);
void add_gobj (AbstractGShape* gobj, bool cache = false);
void remove_gobj (AbstractGShape* gobj);
virtual int get_pixel(unsigned int x, unsigned int y) = 0;
virtual void object_deactivated (AbstractGShape* gobj);
// ColorPicking
unsigned int pick_color () { return _pick_color; }
protected:
unsigned int _pick_color;
map<unsigned int, PickShape> _color_map;
int seed;
double myrandom();
void next_color();
};
}
| 24.564516 | 75 | 0.665135 |
96665d0e7aee37127719e812fe7bb2922114b8bb | 406 | php | PHP | app/Models/Order_summary.php | anikweb/laravel-e-commerce | 3f0af774938e9c65b5c4df0ca963abad5d2cbae4 | [
"MIT"
] | null | null | null | app/Models/Order_summary.php | anikweb/laravel-e-commerce | 3f0af774938e9c65b5c4df0ca963abad5d2cbae4 | [
"MIT"
] | null | null | null | app/Models/Order_summary.php | anikweb/laravel-e-commerce | 3f0af774938e9c65b5c4df0ca963abad5d2cbae4 | [
"MIT"
] | null | null | null | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Order_summary extends Model
{
use HasFactory;
public function checkout(){
return $this->belongsTo(checkoutDetail::class,'checkout_id');
}
public function order_details(){
return $this->hasMany(Order_detail::class,'order_summary_id');
}
}
| 22.555556 | 70 | 0.724138 |
50c93c9e689a0f1c000ae6bb6089ab6d94234f14 | 2,666 | go | Go | extraction/processor.go | jimmidyson/prometheus-client_golang | bd0bf27ade6aa1c18991b24687021e1f1a25386d | [
"Apache-2.0"
] | 6 | 2021-05-01T14:35:57.000Z | 2022-03-09T13:31:26.000Z | extraction/processor.go | jimmidyson/prometheus-client_golang | bd0bf27ade6aa1c18991b24687021e1f1a25386d | [
"Apache-2.0"
] | null | null | null | extraction/processor.go | jimmidyson/prometheus-client_golang | bd0bf27ade6aa1c18991b24687021e1f1a25386d | [
"Apache-2.0"
] | 3 | 2021-05-01T14:36:03.000Z | 2022-03-09T13:30:54.000Z | // Copyright 2013 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package extraction
import (
"io"
"time"
"github.com/prometheus/client_golang/model"
)
// ProcessOptions dictates how the interpreted stream should be rendered for
// consumption.
type ProcessOptions struct {
// Timestamp is added to each value from the stream that has no explicit
// timestamp set.
Timestamp model.Timestamp
}
// Ingester consumes result streams in whatever way is desired by the user.
type Ingester interface {
Ingest(model.Samples) error
}
// Processor is responsible for decoding the actual message responses from
// stream into a format that can be consumed with the end result written
// to the results channel.
type Processor interface {
// ProcessSingle treats the input as a single self-contained message body and
// transforms it accordingly. It has no support for streaming.
ProcessSingle(in io.Reader, out Ingester, o *ProcessOptions) error
}
// Helper function to convert map[string]string into LabelSet.
//
// NOTE: This should be deleted when support for go 1.0.3 is removed; 1.1 is
// smart enough to unmarshal JSON objects into LabelSet directly.
func labelSet(labels map[string]string) model.LabelSet {
labelset := make(model.LabelSet, len(labels))
for k, v := range labels {
labelset[model.LabelName(k)] = model.LabelValue(v)
}
return labelset
}
// A basic interface only useful in testing contexts for dispensing the time
// in a controlled manner.
type instantProvider interface {
// The current instant.
Now() time.Time
}
// Clock is a simple means for fluently wrapping around standard Go timekeeping
// mechanisms to enhance testability without compromising code readability.
//
// It is sufficient for use on bare initialization. A provider should be
// set only for test contexts. When not provided, it emits the current
// system time.
type clock struct {
// The underlying means through which time is provided, if supplied.
Provider instantProvider
}
// Emit the current instant.
func (t *clock) Now() time.Time {
if t.Provider == nil {
return time.Now()
}
return t.Provider.Now()
}
| 31.364706 | 79 | 0.753563 |
38b5026fa606d545f4b1434afbea3f6082355dd7 | 5,330 | h | C | os/drivers/wireless/realtek/rtk/include/hal_com_phycfg.h | drashti304/TizenRT | 096501f38e16cbbfc369df6b3f503ea1f14b1b79 | [
"Apache-2.0"
] | null | null | null | os/drivers/wireless/realtek/rtk/include/hal_com_phycfg.h | drashti304/TizenRT | 096501f38e16cbbfc369df6b3f503ea1f14b1b79 | [
"Apache-2.0"
] | null | null | null | os/drivers/wireless/realtek/rtk/include/hal_com_phycfg.h | drashti304/TizenRT | 096501f38e16cbbfc369df6b3f503ea1f14b1b79 | [
"Apache-2.0"
] | null | null | null | /******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#ifndef __HAL_COM_PHYCFG_H__
#define __HAL_COM_PHYCFG_H__
#define PathA 0x0 // Useless
#define PathB 0x1
#define PathC 0x2
#define PathD 0x3
typedef enum _RATE_SECTION {
CCK = 0,
OFDM,
HT_MCS0_MCS7,
HT_MCS8_MCS15,
HT_MCS16_MCS23,
HT_MCS24_MCS31,
VHT_1SSMCS0_1SSMCS9,
VHT_2SSMCS0_2SSMCS9,
VHT_3SSMCS0_3SSMCS9,
VHT_4SSMCS0_4SSMCS9,
} RATE_SECTION;
typedef enum _RF_TX_NUM {
RF_1TX = 0,
RF_2TX,
RF_3TX,
RF_4TX,
RF_MAX_TX_NUM,
RF_TX_NUM_NONIMPLEMENT,
} RF_TX_NUM;
#if (RTL8721D_SUPPORT == 1) || (RTL8710C_SUPPORT == 1)
#define MAX_POWER_INDEX 0x7F //8721d TXAGC power index extends 1 bit (6 bit->7bit), 0.25dB a step
#else
#define MAX_POWER_INDEX 0x3F
#endif
typedef enum _REGULATION_TXPWR_LMT {
TXPWR_LMT_FCC = 0,
TXPWR_LMT_MKK = 1,
TXPWR_LMT_ETSI = 2,
TXPWR_LMT_WW = 3, // WW13, The mininum of ETSI,MKK
TXPWR_LMT_GL = 4, // Global, The mininum of ETSI,MKK,FCC
TXPWR_LMT_MAX_REGULATION_NUM = 5
} REGULATION_TXPWR_LMT;
/*------------------------------Define structure----------------------------*/
typedef struct _BB_REGISTER_DEFINITION {
u32 rfintfs; // set software control:
// 0x870~0x877[8 bytes]
u32 rfintfo; // output data:
// 0x860~0x86f [16 bytes]
u32 rfintfe; // output enable:
// 0x860~0x86f [16 bytes]
u32 rf3wireOffset; // LSSI data:
// 0x840~0x84f [16 bytes]
u32 rfHSSIPara2; // wire parameter control2 :
// 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes]
u32 rfLSSIReadBack; //LSSI RF readback data SI mode
// 0x8a0~0x8af [16 bytes]
u32 rfLSSIReadBackPi; //LSSI RF readback data PI mode 0x8b8-8bc for Path A and B
} BB_REGISTER_DEFINITION_T, *PBB_REGISTER_DEFINITION_T;
//----------------------------------------------------------------------
s32 phy_TxPwrIdxToDbm(
IN PADAPTER Adapter,
IN WIRELESS_MODE WirelessMode,
IN u8 TxPwrIdx);
u8 PHY_GetTxPowerByRateBase(
IN PADAPTER Adapter,
IN u8 Band,
IN u8 RfPath,
IN u8 TxNum,
IN RATE_SECTION RateSection);
u8 PHY_GetRateSectionIndexOfTxPowerByRate(
IN PADAPTER pAdapter,
IN u32 RegAddr,
IN u32 BitMask);
VOID PHY_GetRateValuesOfTxPowerByRate(
IN PADAPTER pAdapter,
IN u32 RegAddr,
IN u32 BitMask,
IN u32 Value,
OUT u8 *RateIndex,
OUT s8 *PwrByRateVal,
OUT u8 *RateNum);
u8 PHY_GetRateIndexOfTxPowerByRate(
IN u8 Rate);
VOID PHY_SetTxPowerIndexByRateSection(
IN PADAPTER pAdapter,
IN u8 RFPath,
IN u8 Channel,
IN u8 RateSection);
s8 PHY_GetTxPowerByRate(
IN PADAPTER pAdapter,
IN u8 Band,
IN u8 RFPath,
IN u8 TxNum,
IN u8 RateIndex);
VOID PHY_SetTxPowerByRate(
IN PADAPTER pAdapter,
IN u8 Band,
IN u8 RFPath,
IN u8 TxNum,
IN u8 Rate,
IN s8 Value);
VOID PHY_SetTxPowerLevelByPath(
IN PADAPTER Adapter,
IN u8 channel,
IN u8 path);
VOID PHY_SetTxPowerIndexByRateArray(
IN PADAPTER pAdapter,
IN u8 RFPath,
IN enum channel_width BandWidth,
IN u8 Channel,
IN u8 *Rates,
IN u8 RateArraySize);
VOID PHY_InitTxPowerByRate(
IN PADAPTER pAdapter);
VOID PHY_StoreTxPowerByRate(
IN PADAPTER pAdapter,
IN u32 Band,
IN u32 RfPath,
IN u32 TxNum,
IN u32 RegAddr,
IN u32 BitMask,
IN u32 Data);
VOID PHY_TxPowerByRateConfiguration(
IN PADAPTER pAdapter);
u8 PHY_GetTxPowerIndexBase(
IN PADAPTER pAdapter,
IN u8 RFPath,
IN u8 Rate,
IN enum channel_width BandWidth,
IN u8 Channel,
OUT PBOOLEAN bIn24G);
s8 PHY_GetTxPowerLimit(
IN PADAPTER Adapter,
IN u32 RegPwrTblSel,
IN BAND_TYPE Band,
IN enum channel_width Bandwidth,
IN u8 RfPath,
IN u8 DataRate,
IN u8 Channel);
VOID PHY_SetTxPowerLimit(
IN PADAPTER Adapter,
IN u8 Regulation,
IN u8 Band,
IN u8 Bandwidth,
IN u8 RateSection,
IN u8 RfPath,
IN u8 Channel,
IN u8 PowerLimit);
VOID PHY_ConvertTxPowerLimitToPowerIndex(
IN PADAPTER Adapter);
VOID PHY_InitTxPowerLimit(
IN PADAPTER Adapter);
s8 PHY_GetTxPowerTrackingOffset(
PADAPTER pAdapter,
u8 Rate,
u8 RFPath);
u8 PHY_GetTxPowerIndex(
IN PADAPTER pAdapter,
IN u8 RFPath,
IN u8 Rate,
IN enum channel_width BandWidth,
IN u8 Channel);
VOID PHY_SetTxPowerIndex(
IN PADAPTER pAdapter,
IN u32 PowerIndex,
IN u8 RFPath,
IN u8 Rate);
VOID Hal_ChannelPlanToRegulation(
IN PADAPTER Adapter,
IN u16 ChannelPlan);
#endif //__HAL_COMMON_H__
| 23.794643 | 98 | 0.674296 |
a5af3aac577cba3b4d654e0035237d06b89619c6 | 1,060 | asm | Assembly | libsrc/target/mikro80/input/in_KeyPressed.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/target/mikro80/input/in_KeyPressed.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/target/mikro80/input/in_KeyPressed.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; uint in_KeyPressed(uint scancode)
SECTION code_clib
PUBLIC in_KeyPressed
PUBLIC _in_KeyPressed
EXTERN CLIB_KEYBOARD_ADDRESS
; Determines if a key is pressed using the scan code
; returned by in_LookupKey.
; enter : l = scan row
; h = key mask
; exit : carry = key is pressed & HL = 1
; no carry = key not pressed & HL = 0
; used : AF,BC,HL
; write to ppi0 porta with key row (port 0xf4)
; Read from ppi0 portb with value (including shift/ctrl keys) (port 0xf5)
; Bit 5 = shift, Bit 6 = ctrl
.in_KeyPressed
._in_KeyPressed
ld a,l
and 15
ld b,a
inc b
ld a,@11111110
row_find:
dec b
jr z,rotate_done
rlca
jr row_find
rotate_done:
out ($07),a ;Select row
in a,($06) ;So we have the key
cpl
and $7f
ld c,a ;Save it for a minute
and h
jr z,fail
ld b,0
ld a,l ;7 = shift, 6 = control
rlca ;Rotate to match the hardware
rlca
rlca
and @00000110
ld b,a
; Now we need to read the shift row
in a,($05)
cpl
and @00000110
cp b ;Is it what we want?
jr nz,fail
ld hl,1
scf
ret
fail:
ld hl,0
and a
ret
| 16.825397 | 73 | 0.667925 |
44d3239987375ecae0d44e9eb447069c3832ff1d | 6,806 | swift | Swift | BTrain/Elements/Transition.swift | jean-bovet/BTrain | d1956a73bc709c42ba9ee89e380c354060b27a9c | [
"MIT"
] | 2 | 2022-01-01T22:31:42.000Z | 2022-01-11T22:00:59.000Z | BTrain/Elements/Transition.swift | jean-bovet/BTrain | d1956a73bc709c42ba9ee89e380c354060b27a9c | [
"MIT"
] | 14 | 2022-01-01T19:56:23.000Z | 2022-03-31T09:20:49.000Z | BTrain/Elements/Transition.swift | jean-bovet/BTrain | d1956a73bc709c42ba9ee89e380c354060b27a9c | [
"MIT"
] | null | null | null | // Copyright 2021-22 Jean Bovet
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import Foundation
// A transition is a virtual link between two elements (turnouts or blocks).
// Note that the transition does not have any particular direction, it simply
// identify the connection between two element "a" and "b".
//
//
// Socket A Socket B
// │ │
// │ │
// ▼ Transition ▼
// ○─────────────────────────────○
protocol ITransition: AnyObject, GraphEdge {
var id: Identifier<Transition> { get }
// Socket to the first element
var a: Socket { get set }
// Socket to the second element
var b: Socket { get set }
// Contains the train that has reserved this transition,
// or nil if no train has reserved it.
var reserved: Identifier<Train>? { get set }
// The identifier of the train located inside this transition
var train: Identifier<Train>? { get set }
// Returns the inverse of this transition
var reverse: ITransition { get }
}
// The concrete implementation of a transition
final class Transition: Element, ITransition, CustomStringConvertible {
let id: Identifier<Transition>
// Socket to the first element
var a: Socket
// Socket to the second element
var b: Socket
// Contains the train that has reserved this transition,
// or nil if no train has reserved it.
var reserved: Identifier<Train>?
var train: Identifier<Train>?
// Returns the inverse of this transition
var reverse: ITransition {
return TransitionInverse(transition: self)
}
var description: String {
"\(a) -> \(b)"
}
required init(id: Identifier<Transition>, a: Socket, b: Socket) {
self.id = id
self.a = a
self.b = b
}
convenience init(id: String, a: Socket, b: Socket) {
self.init(id: Identifier(uuid: id), a: a, b: b)
}
// Returns true if a transition is the same as another one.
// A transition is considered the same if it links the same two elements.
func same(as t: Transition) -> Bool {
a.contains(other: t.a) && b.contains(other: t.b) ||
a.contains(other: t.b) && b.contains(other: t.a)
}
}
// Because a transition is represented by two sockets, `a` and `b`, the code must
// always check both ordering to make sure a transition exists between two elements.
// For example, a transition between "Block 1" and "Block 2" can be represented in two ways:
// 1)
// Socket A Socket B
// │ │
// │ │
//┌─────────┐▼ ▼┌─────────┐
//│ Block 1 │○───────────────○│ Block 2 │
//└─────────┘ └─────────┘
//
//
// 2)
// Socket B Socket A
// │ │
// │ │
//┌─────────┐▼ ▼┌─────────┐
//│ Block 1 │○───────────────○│ Block 2 │
//└─────────┘ └─────────┘
//
// In practice, this means testing both ordering in this way:
// if transition.a == block1.nextSocket && transition.b = block2.previousSocket
// || transition.b == block1.nextSocket && transition.a == block2.previousSocket
//
// To simplify the code, we always return a transition and its "inverse", which is
// the same transition but with socket `a` and `b` swapped. That way, the code can
// be simplified to only use one set of sockets:
// if transition.a == block1.nextSocket && transition.b = block2.previousSocket
final class TransitionInverse: ITransition, CustomStringConvertible {
let transition: ITransition
var description: String {
"\(a) -> \(b)"
}
var id: Identifier<Transition> {
return transition.id
}
init(transition: ITransition) {
self.transition = transition
}
var a: Socket {
get {
transition.b
}
set {
transition.b = newValue
}
}
var b: Socket {
get {
transition.a
}
set {
transition.a = newValue
}
}
var reserved: Identifier<Train>? {
get {
transition.reserved
}
set {
transition.reserved = newValue
}
}
var train: Identifier<Train>? {
get {
transition.train
}
set {
transition.train = newValue
}
}
var reverse: ITransition {
return TransitionInverse(transition: self)
}
}
extension Transition: Codable {
enum CodingKeys: CodingKey {
case id, from, to, reserved, train
}
convenience init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
let id = try container.decode(Identifier<Transition>.self, forKey: CodingKeys.id)
let a = try container.decode(Socket.self, forKey: CodingKeys.from)
let b = try container.decode(Socket.self, forKey: CodingKeys.to)
self.init(id: id, a: a, b: b)
self.reserved = try container.decodeIfPresent(Identifier<Train>.self, forKey: CodingKeys.reserved)
self.train = try container.decodeIfPresent(Identifier<Train>.self, forKey: CodingKeys.train)
}
func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(id, forKey: CodingKeys.id)
try container.encode(a, forKey: CodingKeys.from)
try container.encode(b, forKey: CodingKeys.to)
try container.encode(reserved, forKey: CodingKeys.reserved)
try container.encode(train, forKey: CodingKeys.train)
}
}
| 33.527094 | 160 | 0.603438 |
6086e84734b76febb67f53f54307be495be017d8 | 11,221 | sql | SQL | thitracnghiem1.sql | thonghuynhit/thitracnghiem_laravel | c41189722c107fa40aa6aa5787e42352a1c307eb | [
"MIT"
] | 1 | 2019-08-27T21:57:06.000Z | 2019-08-27T21:57:06.000Z | thitracnghiem1.sql | thonghuynhit/thitracnghiem_laravel | c41189722c107fa40aa6aa5787e42352a1c307eb | [
"MIT"
] | null | null | null | thitracnghiem1.sql | thonghuynhit/thitracnghiem_laravel | c41189722c107fa40aa6aa5787e42352a1c307eb | [
"MIT"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 14, 2019 at 03:05 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.2.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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: `thitracnghiem1`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE `admin` (
`id` int(11) NOT NULL,
`hoten` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`password` text COLLATE utf8_unicode_ci NOT NULL,
`diachi` varchar(150) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`id`, `hoten`, `email`, `password`, `diachi`) VALUES
(1, 'Huỳnh Minh Thông', 'thonghuynh@gmail.com', '$2y$10$3W4g4dMD2dGlQUzd8sb5UOy23SFmI3A/d5eTd1HvsqzAuwuRxuhCC', 'vinh long'),
(3, 'thonghuynh', 'thonghuynhit@gmail.com', '$2y$10$iPf5zuWs6wbfDAR7/pgp6uKD.P.ZLiPSnarBUTdxB7SH8AfE2qo.e', 'viet nam'),
(4, 'Huỳnh Minh Thông', 'thongt@gmail.com', '$2y$10$PPnKG9RO/WiIgY3mWcECUOKowvcP0fItAh.y.DD3vJC1blK3TVGYy', 'Vĩnh Long');
-- --------------------------------------------------------
--
-- Table structure for table `cauhoi`
--
CREATE TABLE `cauhoi` (
`id` int(11) NOT NULL,
`noidung` text COLLATE utf8_unicode_ci NOT NULL,
`mucdo` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`id_dethi` int(11) NOT NULL,
`id_dapan` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `cauhoi`
--
INSERT INTO `cauhoi` (`id`, `noidung`, `mucdo`, `id_dethi`, `id_dapan`) VALUES
(2, '<p>thiết bị nào sau đây dùng để kết nối mạng ?</p>', '0', 2, 4),
(12, 'câu 1 : thiết bị nào sau đây dùng để kết nối mạng ? 1', '0', 17, 3),
(13, 'câu 1 : thiết bị nào sau đây dùng để kết nối mạng ?', '0', 18, 3),
(14, 'câu 1 : thiết bị nào sau đây dùng để kết nối mạng ?', '0', 18, 3),
(35, '<p>lap tring ios</p>', '1', 3, 4),
(36, '<p>hoc lap trinh php mvc</p>', '1', 9, 3),
(37, '<p><img alt=\"\" src=\"/ckfinder/userfiles/images/Screen%20Shot%202019-08-07%20at%2023_45_37.png\" style=\"height:54px; width:90px\" /> day la loi gi</p>', '1', 9, 1);
-- --------------------------------------------------------
--
-- Table structure for table `cautraloi`
--
CREATE TABLE `cautraloi` (
`id` int(11) NOT NULL,
`noidung` text COLLATE utf8_unicode_ci NOT NULL,
`id_cauhoi` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `cautraloi`
--
INSERT INTO `cautraloi` (`id`, `noidung`, `id_cauhoi`) VALUES
(1, '1Router', 2),
(4, 'Bộ nhớ trong, Bộ nhớ ngoài', 2),
(5, 'Chia sẻ tài nguyên', 2),
(6, 'Primary memory', 2),
(43, '3', 12),
(44, '4', 12),
(45, '1', 12),
(46, '2', 12),
(47, '1', 13),
(48, '2', 13),
(49, '3', 13),
(50, '4', 13),
(51, '1', 14),
(52, '2', 14),
(53, '3', 14),
(54, '4', 14),
(135, '1', 35),
(136, '2', 35),
(137, '3', 35),
(138, '4', 35),
(139, 'no qua de', 36),
(140, 'o muc trung binh', 36),
(141, 'hoi kho', 36),
(142, 'qua kho', 36),
(143, 'xuong hang', 37),
(144, '4', 37),
(145, 'Chia sẻ tài nguyên 1', 37),
(146, 'Primary memory 1', 37);
-- --------------------------------------------------------
--
-- Table structure for table `dapan`
--
CREATE TABLE `dapan` (
`id` int(11) NOT NULL,
`traloi` varchar(10) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `dapan`
--
INSERT INTO `dapan` (`id`, `traloi`) VALUES
(1, 'A'),
(2, 'B'),
(3, 'C'),
(4, 'D');
-- --------------------------------------------------------
--
-- Table structure for table `dethi`
--
CREATE TABLE `dethi` (
`id` int(11) NOT NULL,
`tendethi` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`thoigianbatdau` datetime NOT NULL,
`thoigianketthuc` datetime NOT NULL,
`thoigianlambai` time NOT NULL,
`id_nguoirade` int(11) NOT NULL,
`trangthai` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `dethi`
--
INSERT INTO `dethi` (`id`, `tendethi`, `thoigianbatdau`, `thoigianketthuc`, `thoigianlambai`, `id_nguoirade`, `trangthai`) VALUES
(2, 'ứng dụng công nghệ thông tin cơ bản', '2019-09-01 09:00:00', '2019-09-01 10:30:00', '01:30:00', 1, 1),
(3, 'Lâp Trình Laravel Framework', '2019-08-20 00:00:00', '2019-08-09 00:00:00', '03:00:00', 2, 0),
(9, 'Lập Trình ExpressJS', '2019-08-11 00:00:00', '2019-11-28 00:00:00', '01:00:00', 2, 0),
(22, 'Lập Trình ExpressJS', '2019-08-15 00:00:00', '2019-08-16 00:00:00', '00:00:00', 2, 1);
-- --------------------------------------------------------
--
-- Table structure for table `ketqua`
--
CREATE TABLE `ketqua` (
`id` int(11) NOT NULL,
`id_thisinh` int(11) NOT NULL,
`socaudung` int(11) NOT NULL,
`socausai` int(11) NOT NULL,
`diem` float NOT NULL,
`id_dethi` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `ketqua`
--
INSERT INTO `ketqua` (`id`, `id_thisinh`, `socaudung`, `socausai`, `diem`, `id_dethi`) VALUES
(1, 2, 15, 15, 10, 2),
(7, 11, 22, 12, 8, 2);
-- --------------------------------------------------------
--
-- Table structure for table `migrations`
--
CREATE TABLE `migrations` (
`id` int(10) UNSIGNED NOT NULL,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `nguoirade`
--
CREATE TABLE `nguoirade` (
`id` int(11) NOT NULL,
`hoten` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`ngaysinh` date NOT NULL,
`gioitinh` int(11) NOT NULL,
`email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`password` text COLLATE utf8_unicode_ci NOT NULL,
`diachi` varchar(150) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `nguoirade`
--
INSERT INTO `nguoirade` (`id`, `hoten`, `ngaysinh`, `gioitinh`, `email`, `password`, `diachi`) VALUES
(1, 'Huỳnh Minh Thông', '2019-08-18', 1, 'thonghuynhit@gmail.com', '$2y$10$EypGcK.Fd4aqqFHH5eKKkOwLgCTG5wWjgZ8J.gR4BpRnmvY9YknIi', 'Vĩnh Long'),
(2, 'Lionel Messi', '2019-08-17', 1, 'thonghuynh@gmail.com', '$2y$10$taFHDmtp1Y5xQxc5mEJ0leCcSVqig/IkpNFoGnukO9lKb3jZj3QU2', 'Vĩnh Long');
-- --------------------------------------------------------
--
-- Table structure for table `thisinh`
--
CREATE TABLE `thisinh` (
`id` int(11) NOT NULL,
`hoten` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`ngaysinh` date NOT NULL,
`gioitinh` int(11) NOT NULL,
`email` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`diachi` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`password` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `thisinh`
--
INSERT INTO `thisinh` (`id`, `hoten`, `ngaysinh`, `gioitinh`, `email`, `diachi`, `password`) VALUES
(1, 'thonghuynh', '2019-07-01', 1, 'thonghuynhi123t@gmail.com', 'vinh long', '$2y$10$rI1z7x6k7YMBgs7iUso2XuIhmMd1F8yNh5guj8n4OuJgukMhlxvf6'),
(2, 'huynh minh thong 123', '1999-12-21', 1, 'abc12@gmail.com', 'viet nam', '$2y$10$9WKmLCniTk2kzho4Asj/JO..KnGp2lJ8bRnmAaU8CHN23L0CPwbZK'),
(4, 'acb', '1993-06-18', 0, 'acb@gmail.com', 'viet nam', '$2y$10$DQ9Dus5WrcKLJ1DZ8XlYk.7F7YmX/mYH4hY7EIXyZCaBPJ4MF6NGG'),
(6, 'thonghuynhit', '1999-12-21', 1, 'thonghuynhit@gmail.com', 'nguyen hue', '123'),
(8, 'nguyen phuoc hao', '1999-12-21', 1, 'hao123@gmail.com', 'vinh long', '123'),
(11, 'Lionel Messi', '1987-07-17', 1, 'messi@gmail.com', 'Barcelona', '$2y$10$SrNRC5UPUAor4rOOBPKH4OqdowaF2K0EEPC9PSuXfxjaQLWQ1Nfcy');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `cauhoi`
--
ALTER TABLE `cauhoi`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `cautraloi`
--
ALTER TABLE `cautraloi`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `dapan`
--
ALTER TABLE `dapan`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `dethi`
--
ALTER TABLE `dethi`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `ketqua`
--
ALTER TABLE `ketqua`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `nguoirade`
--
ALTER TABLE `nguoirade`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `thisinh`
--
ALTER TABLE `thisinh`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `cauhoi`
--
ALTER TABLE `cauhoi`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
--
-- AUTO_INCREMENT for table `cautraloi`
--
ALTER TABLE `cautraloi`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=147;
--
-- AUTO_INCREMENT for table `dapan`
--
ALTER TABLE `dapan`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `dethi`
--
ALTER TABLE `dethi`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
--
-- AUTO_INCREMENT for table `ketqua`
--
ALTER TABLE `ketqua`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `nguoirade`
--
ALTER TABLE `nguoirade`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `thisinh`
--
ALTER TABLE `thisinh`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
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 */;
| 27.774752 | 178 | 0.645664 |
e374e442771d32da9bfb1d49e8556743ea8fd1b4 | 156 | asm | Assembly | base.asm | danielzy95/x86-funz | 67763837b7ed236379359f51ab87d8200d141bd6 | [
"MIT"
] | null | null | null | base.asm | danielzy95/x86-funz | 67763837b7ed236379359f51ab87d8200d141bd6 | [
"MIT"
] | null | null | null | base.asm | danielzy95/x86-funz | 67763837b7ed236379359f51ab87d8200d141bd6 | [
"MIT"
] | null | null | null | main:
push ebp
mov ebp, esp
call funct
jmp end
funct:
push ebp
mov ebp, esp
mov esp, ebp
pop ebp
ret
end:
; Cleanup
mov esp, ebp
pop ebp | 6.782609 | 13 | 0.634615 |
02d33b9c57678ddad07843fecfa2fb302e0dd973 | 1,181 | kt | Kotlin | library/src/main/java/com/slim/adapter/SlimPagerAdapter.kt | lvtanxi/SlimAdapter | 7544d924c521e2ed0534171335b8c3174f8b67c3 | [
"Apache-2.0"
] | null | null | null | library/src/main/java/com/slim/adapter/SlimPagerAdapter.kt | lvtanxi/SlimAdapter | 7544d924c521e2ed0534171335b8c3174f8b67c3 | [
"Apache-2.0"
] | null | null | null | library/src/main/java/com/slim/adapter/SlimPagerAdapter.kt | lvtanxi/SlimAdapter | 7544d924c521e2ed0534171335b8c3174f8b67c3 | [
"Apache-2.0"
] | null | null | null | package com.slim.adapter
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager.widget.ViewPager
/**
* Date: 2018-04-18
* Time: 13:26
* Description: FragmentStatePagerAdapter
*/
class SlimPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) {
private val pagerItems = ArrayList<Fragment>()
private val titleItems = ArrayList<CharSequence>()
fun add(fragment: Fragment, title: CharSequence = "") = apply {
pagerItems.add(fragment)
titleItems.add(title)
}
fun add(fragments: List<Fragment>, titles: List<CharSequence>) = apply {
pagerItems.addAll(fragments)
titleItems.addAll(titles)
}
fun remove(position: Int) {
pagerItems.removeAt(position)
titleItems.removeAt(position)
}
fun into(viewPager: ViewPager?) = apply {
viewPager?.adapter = this@SlimPagerAdapter
}
override fun getCount(): Int = pagerItems.size
override fun getItem(position: Int) = pagerItems[position]
override fun getPageTitle(position: Int) = titleItems[position]
}
| 25.12766 | 77 | 0.709568 |
d2aff91231e768d7e6d5c2e7724f308eb8fe5f0f | 1,601 | php | PHP | resources/views/reserva/cria.blade.php | summer-school-ime-usp-2017/final-project-projeto-livre-Ezequias-Silva | 771054427c0a9e0ec8b83a5db5befebc19416986 | [
"MIT"
] | null | null | null | resources/views/reserva/cria.blade.php | summer-school-ime-usp-2017/final-project-projeto-livre-Ezequias-Silva | 771054427c0a9e0ec8b83a5db5befebc19416986 | [
"MIT"
] | null | null | null | resources/views/reserva/cria.blade.php | summer-school-ime-usp-2017/final-project-projeto-livre-Ezequias-Silva | 771054427c0a9e0ec8b83a5db5befebc19416986 | [
"MIT"
] | null | null | null | @extends('layouts.master')
@section('title','Cadastro de reserva')
@section('pager-haeder-content','Cadastro de reserva')
@section('content')
<div class="row">
<div class="col-md-3">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Cadastro de reservas</h3>
</div>
<div class="panel-body">
<a href="/reservas"><span class="glyphicon glyphicon-th-list"></span>Lista de reservas
</a>
</div>
</div>
</div>
<div class="col-md-6">
<form action="/reservas" method="post">
{{ csrf_field() }}
<div class="form-group">
<label for="res_data">Data </label>
<input type="text" name="res_data" id="res_data" placeholder="Digite a data" class="form-control">
</div>
<div class="form-group">
<select name="cliente_id" id="cliente_id" class="form-control">
<option></option>
@foreach ($clientes as $cliente)
<option value="{{ $cliente->id }}">{{ $cliente->cli_nome }}</option>
@endforeach
</select>
</div>
<div class="form-group">
<select name="imovel_id" id="imovel_id" class="form-control">
<option></option>
@foreach ($imovels as $imovel)
<option value="{{ $imovel->id }}">{{ $imovel->imo_titulo }}</option>
@endforeach
</select>
</div>
<button name="submit" class="btn btn-primary">Salvar</button>
</form>
</div>
</div>
@endsection
| 27.135593 | 108 | 0.537789 |
15dd8cff8ff8b39600a3210eee94a0a192168300 | 119 | rb | Ruby | db/migrate/20170929154639_update_brand_price.rb | langlk/shoe_store | e407f3f3f1158816e80a7a4f0443c851d20e37a4 | [
"MIT"
] | null | null | null | db/migrate/20170929154639_update_brand_price.rb | langlk/shoe_store | e407f3f3f1158816e80a7a4f0443c851d20e37a4 | [
"MIT"
] | null | null | null | db/migrate/20170929154639_update_brand_price.rb | langlk/shoe_store | e407f3f3f1158816e80a7a4f0443c851d20e37a4 | [
"MIT"
] | null | null | null | class UpdateBrandPrice < ActiveRecord::Migration[5.1]
def change
change_column :brands, :price, :float
end
end
| 19.833333 | 53 | 0.739496 |
e77b3f427bc8f3f261d9e791936896606aa3a736 | 289 | js | JavaScript | index.js | aslilac/slate | 0d9fc8e395f681a95619488ddf1b063ec0f064eb | [
"MIT"
] | 2 | 2022-02-17T01:26:49.000Z | 2022-02-17T13:10:48.000Z | index.js | aslilac/slate | 0d9fc8e395f681a95619488ddf1b063ec0f064eb | [
"MIT"
] | 1 | 2022-03-11T04:00:41.000Z | 2022-03-11T04:00:41.000Z | index.js | aslilac/slate | 0d9fc8e395f681a95619488ddf1b063ec0f064eb | [
"MIT"
] | null | null | null | import { Elm } from "./src/Main.elm";
const DAY = 1000 * 60 * 60 * 24;
const timezoneOffset = new Date().getTimezoneOffset() * 60 * 1000;
const dayOfGame = Math.floor((Date.now() - timezoneOffset) / DAY);
Elm.Main.init({
node: document.querySelector("#app"),
flags: { dayOfGame },
});
| 26.272727 | 66 | 0.657439 |
51b6389a3f60da76588bc0ce1b99d7dd6ca646fa | 1,377 | swift | Swift | Routine/PresentationLayer/Modules/AuthorizeGroup/RestorePassword/RestorePasswordRouter.swift | cmuphobk/routine | 9c029a16fc1356936c2bfbf73939e088af0bda19 | [
"MIT"
] | null | null | null | Routine/PresentationLayer/Modules/AuthorizeGroup/RestorePassword/RestorePasswordRouter.swift | cmuphobk/routine | 9c029a16fc1356936c2bfbf73939e088af0bda19 | [
"MIT"
] | null | null | null | Routine/PresentationLayer/Modules/AuthorizeGroup/RestorePassword/RestorePasswordRouter.swift | cmuphobk/routine | 9c029a16fc1356936c2bfbf73939e088af0bda19 | [
"MIT"
] | null | null | null | import UIKit
final class RestorePasswordRouter: RestorePasswordModuleRouting {
weak var viewController: UIViewController?
var moduleService: ModuleServiceInterface!
func openPinCodeModule(login: String) {
self.moduleService.moduleFactory.makePinCodeModule { [unowned self] (_, moduleInput) in
guard let module = moduleInput as? Module else { return }
self.moduleService.navigation?.pushModule(module)
moduleInput?.configureWithLogin(login, password: nil, pinCodeInitiator: .restorePassword)
}
}
func showErrorMessageWithText(_ string: String) {
self.moduleService.navigation?.showMessageWithText(string, andType: .error)
}
func closeModule() {
self.moduleService.moduleFactory.makeAuthModule { (_, moduleInput) in
guard let module = moduleInput as? Module else { return }
self.moduleService.navigation?.openModule(module)
}
}
func showLoader() {
guard let window = UIApplication.shared.delegate?.window else { return }
window?.showLoaderView()
}
func hideLoader() {
guard let window = UIApplication.shared.delegate?.window else { return }
window?.hideLoaderView()
}
}
| 29.297872 | 101 | 0.622367 |
12ef604f269ddc39105a808b9344d9274e49c98d | 2,729 | html | HTML | select.html | Thenight22/St_Dominic_primary | 7c8b03081940be84ce275dc894e260bb9f8eefab | [
"MIT"
] | null | null | null | select.html | Thenight22/St_Dominic_primary | 7c8b03081940be84ce275dc894e260bb9f8eefab | [
"MIT"
] | null | null | null | select.html | Thenight22/St_Dominic_primary | 7c8b03081940be84ce275dc894e260bb9f8eefab | [
"MIT"
] | null | null | null | select
post_id as order_id,
p.post_date,
max( CASE WHEN pm.meta_key = '_billing_email' and post_id = pm.post_id THEN pm.meta_value END ) as billing_email,
max( CASE WHEN pm.meta_key = '_billing_first_name' and post_id = pm.post_id THEN pm.meta_value END ) as _billing_first_name,
max( CASE WHEN pm.meta_key = '_billing_last_name' and post_id = pm.post_id THEN pm.meta_value END ) as _billing_last_name,
max( CASE WHEN pm.meta_key = '_billing_address_1' and post_id = pm.post_id THEN pm.meta_value END ) as _billing_address_1,
max( CASE WHEN pm.meta_key = '_billing_address_2' and post_id = pm.post_id THEN pm.meta_value END ) as _billing_address_2,
max( CASE WHEN pm.meta_key = '_billing_city' and post_id = pm.post_id THEN pm.meta_value END ) as _billing_city,
max( CASE WHEN pm.meta_key = '_billing_state' and post_id = pm.post_id THEN pm.meta_value END ) as _billing_state,
max( CASE WHEN pm.meta_key = '_billing_postcode' and post_id = pm.post_id THEN pm.meta_value END ) as _billing_postcode,
max( CASE WHEN pm.meta_key = '_shipping_first_name' and post_id = pm.post_id THEN pm.meta_value END ) as _shipping_first_name,
max( CASE WHEN pm.meta_key = '_shipping_last_name' and post_id = pm.post_id THEN pm.meta_value END ) as _shipping_last_name,
max( CASE WHEN pm.meta_key = '_shipping_address_1' and post_id = pm.post_id THEN pm.meta_value END ) as _shipping_address_1,
max( CASE WHEN pm.meta_key = '_shipping_address_2' and post_id = pm.post_id THEN pm.meta_value END ) as _shipping_address_2,
max( CASE WHEN pm.meta_key = '_shipping_city' and post_id = pm.post_id THEN pm.meta_value END ) as _shipping_city,
max( CASE WHEN pm.meta_key = '_shipping_state' and post_id = pm.post_id THEN pm.meta_value END ) as _shipping_state,
max( CASE WHEN pm.meta_key = '_shipping_postcode' and post_id = pm.post_id THEN pm.meta_value END ) as _shipping_postcode,
max( CASE WHEN pm.meta_key = '_order_total' and post_id = pm.post_id THEN pm.meta_value END ) as order_total,
max( CASE WHEN pm.meta_key = '_order_tax' and post_id = pm.post_id THEN pm.meta_value END ) as order_tax,
max( CASE WHEN pm.meta_key = '_paid_date' and post_id = pm.post_id THEN pm.meta_value END ) as paid_date,
( select group_concat( order_item_name separator '|' ) from woocom_postmeta where order_id = post_id ) as order_items
from
wp_posts p
join woocom_postmeta pm on post_id = pm.post_id
join woocom_postmeta oi on post_id = oi.order_id
where
post_type = 'shop_order' and
post_date BETWEEN '2015-01-01' AND '2015-07-08' and
post_status = 'wc-completed' and
oi.order_item_name = 'Product Name'
group by
post_id | 82.69697 | 131 | 0.739831 |
c69b0205db843716705ba12457ff18aa15188dd2 | 402 | rb | Ruby | spec/web_app_rails/config/boot.rb | kares/trinidad | 8a8b6b62d3458b8ecc48c2672d5eff93a72c0374 | [
"Apache-2.0"
] | 96 | 2015-01-13T11:03:18.000Z | 2021-01-14T23:14:37.000Z | spec/web_app_rails/config/boot.rb | kares/trinidad | 8a8b6b62d3458b8ecc48c2672d5eff93a72c0374 | [
"Apache-2.0"
] | 9 | 2015-04-29T07:01:38.000Z | 2021-11-10T05:06:36.000Z | spec/web_app_rails/config/boot.rb | kares/trinidad | 8a8b6b62d3458b8ecc48c2672d5eff93a72c0374 | [
"Apache-2.0"
] | 12 | 2015-01-13T11:03:20.000Z | 2017-10-31T15:48:38.000Z | require 'rubygems'
# Set up gems listed in the Gemfile.
# ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
# NOTE: use Trinidad's Gemfile - we'll require the integration group
# @see #application.rb Bundler.require(:integration, Rails.env)
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
| 40.2 | 75 | 0.711443 |
4262925f8abee0454cf8de761069e7d97db1d786 | 223 | swift | Swift | Example/TipJarViewController/ViewController.swift | pclemente/TipJarViewController | effa6e4ded37d964052bdaf3d369744abe7e7305 | [
"Apache-2.0"
] | 80 | 2018-05-07T02:43:00.000Z | 2022-03-07T11:24:51.000Z | Example/TipJarViewController/ViewController.swift | mohsinalimat/TipJarViewController | 43572c313270308cfed1a05936c187e55151571f | [
"Apache-2.0"
] | 14 | 2018-05-08T15:01:54.000Z | 2020-10-06T13:12:54.000Z | Example/TipJarViewController/ViewController.swift | mohsinalimat/TipJarViewController | 43572c313270308cfed1a05936c187e55151571f | [
"Apache-2.0"
] | 18 | 2018-05-07T22:00:53.000Z | 2022-03-07T11:23:54.000Z | //
// ViewController.swift
// TipJarViewController
//
// Created by Dan Loewenherz on 05/06/2018.
// Copyright (c) 2018 Dan Loewenherz. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
}
| 15.928571 | 59 | 0.721973 |
f03ac5d7659f10dfb37b2809abf402ff19dbec0f | 338 | py | Python | Algorithms/Problems/MaximumSubarray/tests/maximum_substring_naive_test.py | Nalhin/AlgorithmsAndDataStructures | 2d2c87d0572e107c993c3c8866b8beefd4d22082 | [
"MIT"
] | 1 | 2021-11-16T13:02:25.000Z | 2021-11-16T13:02:25.000Z | Algorithms/Problems/MaximumSubarray/tests/maximum_substring_naive_test.py | Nalhin/AlgorithmsAndDataStructures | 2d2c87d0572e107c993c3c8866b8beefd4d22082 | [
"MIT"
] | null | null | null | Algorithms/Problems/MaximumSubarray/tests/maximum_substring_naive_test.py | Nalhin/AlgorithmsAndDataStructures | 2d2c87d0572e107c993c3c8866b8beefd4d22082 | [
"MIT"
] | null | null | null | from Algorithms.Problems.MaximumSubarray.maximum_substring_naive import (
maximum_subarray_naive,
)
class TestMaximumSubarrayNaive:
def test_returns_maximum_subarray(self):
data = [1, -2, 3, 10, -5, 14]
expected = [3, 10, -5, 14]
result = maximum_subarray_naive(data)
assert result == expected
| 24.142857 | 73 | 0.683432 |
bb134d5c0d6d71b1e58746e023bae1eb6a422c79 | 1,317 | html | HTML | resources/corpora/entity_recognition/jnlpba/anndoc/99008372.html | ashishbaghudana/mthesis-ashish | 55f969266ca3df1aa1e28b9078c0c21f7e0ea002 | [
"MIT"
] | null | null | null | resources/corpora/entity_recognition/jnlpba/anndoc/99008372.html | ashishbaghudana/mthesis-ashish | 55f969266ca3df1aa1e28b9078c0c21f7e0ea002 | [
"MIT"
] | 10 | 2015-09-18T11:45:40.000Z | 2015-10-29T18:16:41.000Z | resources/corpora/entity_recognition/jnlpba/anndoc/99008372.html | ashishbaghudana/mthesis-ashish | 55f969266ca3df1aa1e28b9078c0c21f7e0ea002 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html id="1aed580700ac417789f10cb3262512fa:99008372" data-origid="99008372" class="anndoc" data-anndoc-version="2.0" lang="" xml:lang="" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8"/>
<meta name="generator" content="org.rostlab.relna"/>
<title>1aed580700ac417789f10cb3262512fa:99008372</title>
</head>
<body>
<article>
<section data-type="title">
<h2 id="s1h1">Signalling into the T-cell nucleus: NFAT regulation.</h2>
</section>
<section data-type="abstract">
<h3 id="s2h1">Abstract</h3>
<div class="content">
<p id = "s2p1">The nuclear factor of activated T cells (NFAT) plays an important role in T-cell biology. Activation of T cells results in the rapid calcineurin -dependent translocation of NFAT transcription factors from the cytoplasm to the nucleus. This translocation process coupled to the subsequent active maintenance of NFAT in the nucleus compartment is critical for the induction of expression of several genes encoding cytokines and membrane proteins that modulate immune responses. The molecular cloning of the NFAT family of transcription factors has facilitated rapid progress in the understanding of the signalling mechanisms that control the activity of NFAT.</p>
</div>
</section>
</article>
</body>
</html> | 62.714286 | 681 | 0.749431 |
906feb82835bdc71bdbce222f2f41bba6cf41123 | 1,904 | py | Python | venv-skin/lib/python3.6/site-packages/hashes/ops/sha512_crypt.py | nobi1007/flask-apis | 9ae5d676be5fe7d0669415089bd032f43abda2d8 | [
"MIT"
] | null | null | null | venv-skin/lib/python3.6/site-packages/hashes/ops/sha512_crypt.py | nobi1007/flask-apis | 9ae5d676be5fe7d0669415089bd032f43abda2d8 | [
"MIT"
] | 3 | 2020-06-03T08:09:39.000Z | 2021-04-30T21:17:43.000Z | venv-skin/lib/python3.6/site-packages/hashes/ops/sha512_crypt.py | nobi1007/flask-apis | 9ae5d676be5fe7d0669415089bd032f43abda2d8 | [
"MIT"
] | null | null | null | '''
This module generates sha512_crypt hashes
'''
from hashes.common import helpers
from passlib.hash import sha512_crypt
class Algorithm:
def __init__(self):
self.hash_type = "sha512_crypt"
self.description = "This module generates sha512_crypt hashes"
def generate(self, cli_object):
if cli_object.salt is not False:
if cli_object.rounds is not False:
try:
generatedhash = sha512_crypt.encrypt(cli_object.plaintext, rounds=int(cli_object.rounds), salt=cli_object.salt)
return generatedhash
except ValueError:
print helpers.color("sha512_crypt and sha512_crypt require at least 1000 rounds.", warning=True)
print helpers.color("[*] Running with default of 60000 rounds.", warning=True)
generatedhash = sha512_crypt.encrypt(cli_object.plaintext, salt=cli_object.salt)
return generatedhash
else:
generatedhash = sha512_crypt.encrypt(cli_object.plaintext, salt=cli_object.salt)
return generatedhash
else:
if cli_object.rounds is not False:
try:
generatedhash = sha512_crypt.encrypt(cli_object.plaintext, rounds=int(cli_object.rounds))
return generatedhash
except ValueError:
print helpers.color("[*] Warning: sha512_crypt and sha512_crypt require at least 1000 rounds.", warning=True)
print helpers.color("[*] Running with default of 60000 rounds.", warning=True)
generatedhash = sha512_crypt.encrypt(cli_object.plaintext)
return generatedhash
else:
generatedhash = sha512_crypt.encrypt(cli_object.plaintext)
return generatedhash
return
| 44.27907 | 131 | 0.617122 |
2db0cd025cb140c276ab7db29ebcdb77d282ca5f | 8,696 | rs | Rust | src/lib.rs | p0lunin/dptree | cf41f052a864e145ef600faf79a1dff186b5a905 | [
"MIT"
] | 10 | 2022-02-06T22:30:33.000Z | 2022-03-23T14:15:57.000Z | src/lib.rs | p0lunin/dptree | cf41f052a864e145ef600faf79a1dff186b5a905 | [
"MIT"
] | 1 | 2022-02-04T17:16:42.000Z | 2022-02-04T17:16:42.000Z | src/lib.rs | p0lunin/dptree | cf41f052a864e145ef600faf79a1dff186b5a905 | [
"MIT"
] | 1 | 2022-02-04T08:26:44.000Z | 2022-02-04T08:26:44.000Z | //! An implementation of the [chain (tree) of responsibility] pattern.
//!
//! ```
//! use dptree::prelude::*;
//!
//! type WebHandler = Endpoint<'static, DependencyMap, String>;
//!
//! #[rustfmt::skip]
//! #[tokio::main]
//! async fn main() {
//! let web_server = dptree::entry()
//! .branch(smiles_handler())
//! .branch(sqrt_handler())
//! .branch(not_found_handler());
//!
//! assert_eq!(
//! web_server.dispatch(dptree::deps!["/smile"]).await,
//! ControlFlow::Break("🙃".to_owned())
//! );
//! assert_eq!(
//! web_server.dispatch(dptree::deps!["/sqrt 16"]).await,
//! ControlFlow::Break("4".to_owned())
//! );
//! assert_eq!(
//! web_server.dispatch(dptree::deps!["/lol"]).await,
//! ControlFlow::Break("404 Not Found".to_owned())
//! );
//! }
//!
//! fn smiles_handler() -> WebHandler {
//! dptree::filter(|req: &'static str| req.starts_with("/smile"))
//! .endpoint(|| async { "🙃".to_owned() })
//! }
//!
//! fn sqrt_handler() -> WebHandler {
//! dptree::filter_map(|req: &'static str| {
//! if req.starts_with("/sqrt") {
//! let (_, n) = req.split_once(' ')?;
//! n.parse::<f64>().ok()
//! } else {
//! None
//! }
//! })
//! .endpoint(|n: f64| async move { format!("{}", n.sqrt()) })
//! }
//!
//! fn not_found_handler() -> WebHandler {
//! dptree::endpoint(|| async { "404 Not Found".to_owned() })
//! }
//! ```
//!
//! For a high-level overview, please see [`README.md`](https://github.com/p0lunin/dptree).
//!
//! [chain (tree) of responsibility]: https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern
mod handler;
pub mod di;
pub mod prelude;
pub use handler::*;
/// Filters an enumeration, passing its payload forwards.
///
/// This macro expands to a [`crate::Handler`] that acts on your enumeration
/// type: if the enumeration is of a certain variant, the execution continues;
/// otherwise, `dptree` will try the next branch. This is very useful for
/// dialogue FSM transitions and incoming command filtering; for a real-world
/// example, please see teloxide's [`examples/purchase.rs`].
///
/// Variants can take the following forms:
///
/// - `Enum::MyVariant` for empty variants;
/// - `Enum::MyVariant(param1, ..., paramN)` for function-like variants;
/// - `Enum::MyVariant { param1, ..., paramN }` for `struct`-like variants.
///
/// In the first case, this macro results in a simple [`crate::filter`]; in the
/// second and third cases, this macro results in [`crate::filter_map`] that
/// passes the payload of `MyVariant` to the next handler if the match occurs.
/// (This next handler can be an endpoint or a more complex one.) The payload
/// format depend on the form of `MyVariant`:
///
/// - For `Enum::MyVariant(param)` and `Enum::MyVariant { param }`, the payload
/// is `param`.
/// - For `Enum::MyVariant(param,)` and `Enum::MyVariant { param, }`, the
/// payload is `(param,)`.
/// - For `Enum::MyVariant(param1, ..., paramN)` and `Enum::MyVariant { param1,
/// ..., paramN }`, the payload is `(param1, ..., paramN)` (where `N`>1).
///
/// ## Dependency requirements
///
/// - Your enumeration `Enum`.
///
/// ## Examples
///
/// ```
/// use dptree::prelude::*;
///
/// # #[tokio::main]
/// # async fn main() {
/// #[derive(Clone)]
/// enum Command {
/// Meow,
/// Add(i32, i32),
/// }
///
/// let h: crate::Handler<_, _> = dptree::entry()
/// .branch(dptree::case![Command::Meow].endpoint(|| async move { format!("Meow!") }))
/// .branch(
/// dptree::case![Command::Add(x, y)]
/// .endpoint(|(x, y): (i32, i32)| async move { format!("{}", x + y) }),
/// );
///
/// assert_eq!(
/// h.dispatch(dptree::deps![Command::Meow]).await,
/// ControlFlow::Break("Meow!".to_owned())
/// );
/// assert_eq!(
/// h.dispatch(dptree::deps![Command::Add(1, 2)]).await,
/// ControlFlow::Break("3".to_owned())
/// );
/// # }
/// ```
///
/// [`examples/purchase.rs`]: https://github.com/teloxide/teloxide/blob/master/examples/purchase.rs
#[macro_export]
macro_rules! case {
($($variant:ident)::+) => {
$crate::filter(|x| matches!(x, $($variant)::+))
};
($($variant:ident)::+ ($param:ident)) => {
$crate::filter_map(|x| match x {
$($variant)::+($param) => Some($param),
_ => None,
})
};
($($variant:ident)::+ ($($param:ident),+ $(,)?)) => {
$crate::filter_map(|x| match x {
$($variant)::+($($param),+) => Some(($($param),+ ,)),
_ => None,
})
};
($($variant:ident)::+ {$param:ident}) => {
$crate::filter_map(|x| match x {
$($variant)::+{$param} => Some($param),
_ => None,
})
};
($($variant:ident)::+ {$($param:ident),+ $(,)?}) => {
$crate::filter_map(|x| match x {
$($variant)::+ { $($param),+ } => Some(($($param),+ ,)),
_ => None,
})
};
}
#[cfg(test)]
mod tests {
use std::ops::ControlFlow;
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
enum State {
A,
B(i32),
C(i32, &'static str),
D { foo: i32 },
E { foo: i32, bar: &'static str },
Other,
}
#[tokio::test]
async fn handler_empty_variant() {
let input = State::A;
let h: crate::Handler<_, _> = case![State::A].endpoint(|| async move { 123 });
assert_eq!(h.dispatch(crate::deps![input]).await, ControlFlow::Break(123));
assert!(matches!(h.dispatch(crate::deps![State::Other]).await, ControlFlow::Continue(_)));
}
#[tokio::test]
async fn handler_single_fn_variant() {
let input = State::B(42);
let h: crate::Handler<_, _> = case![State::B(x)].endpoint(|x: i32| async move {
assert_eq!(x, 42);
123
});
assert_eq!(h.dispatch(crate::deps![input]).await, ControlFlow::Break(123));
assert!(matches!(h.dispatch(crate::deps![State::Other]).await, ControlFlow::Continue(_)));
}
#[tokio::test]
async fn handler_single_fn_variant_trailing_comma() {
let input = State::B(42);
let h: crate::Handler<_, _> = case![State::B(x,)].endpoint(|(x,): (i32,)| async move {
assert_eq!(x, 42);
123
});
assert_eq!(h.dispatch(crate::deps![input]).await, ControlFlow::Break(123));
assert!(matches!(h.dispatch(crate::deps![State::Other]).await, ControlFlow::Continue(_)));
}
#[tokio::test]
async fn handler_fn_variant() {
let input = State::C(42, "abc");
let h: crate::Handler<_, _> =
case![State::C(x, y)].endpoint(|(x, str): (i32, &'static str)| async move {
assert_eq!(x, 42);
assert_eq!(str, "abc");
123
});
assert_eq!(h.dispatch(crate::deps![input]).await, ControlFlow::Break(123));
assert!(matches!(h.dispatch(crate::deps![State::Other]).await, ControlFlow::Continue(_)));
}
#[tokio::test]
async fn handler_single_struct_variant() {
let input = State::D { foo: 42 };
let h: crate::Handler<_, _> = case![State::D { foo }].endpoint(|x: i32| async move {
assert_eq!(x, 42);
123
});
assert_eq!(h.dispatch(crate::deps![input]).await, ControlFlow::Break(123));
assert!(matches!(h.dispatch(crate::deps![State::Other]).await, ControlFlow::Continue(_)));
}
#[tokio::test]
async fn handler_single_struct_variant_trailing_comma() {
let input = State::D { foo: 42 };
#[rustfmt::skip] // rustfmt removes the trailing comma from `State::D { foo, }`, but it plays a vital role in this test.
let h: crate::Handler<_, _> = case![State::D { foo, }].endpoint(|(x,): (i32,)| async move {
assert_eq!(x, 42);
123
});
assert_eq!(h.dispatch(crate::deps![input]).await, ControlFlow::Break(123));
assert!(matches!(h.dispatch(crate::deps![State::Other]).await, ControlFlow::Continue(_)));
}
#[tokio::test]
async fn handler_struct_variant() {
let input = State::E { foo: 42, bar: "abc" };
let h: crate::Handler<_, _> =
case![State::E { foo, bar }].endpoint(|(x, str): (i32, &'static str)| async move {
assert_eq!(x, 42);
assert_eq!(str, "abc");
123
});
assert_eq!(h.dispatch(crate::deps![input]).await, ControlFlow::Break(123));
assert!(matches!(h.dispatch(crate::deps![State::Other]).await, ControlFlow::Continue(_)));
}
}
| 33.836576 | 128 | 0.541628 |
59689355867f07aa66340c8a5603df28abd504ee | 72 | h | C | DLToolDemo/DLToolDemo/DLTool/Classes/DLObject/NSMutableData+Add.h | DeIouch/DLTool | 95c4e92a05ad5c036a5c811be6887f94864c1ea0 | [
"MIT"
] | null | null | null | DLToolDemo/DLToolDemo/DLTool/Classes/DLObject/NSMutableData+Add.h | DeIouch/DLTool | 95c4e92a05ad5c036a5c811be6887f94864c1ea0 | [
"MIT"
] | null | null | null | DLToolDemo/DLToolDemo/DLTool/Classes/DLObject/NSMutableData+Add.h | DeIouch/DLTool | 95c4e92a05ad5c036a5c811be6887f94864c1ea0 | [
"MIT"
] | null | null | null | #import <Foundation/Foundation.h>
@interface NSMutableData (Add)
@end
| 12 | 33 | 0.763889 |
a1ce4e8eeee9c3c4c9d6785aaf60fa553e9fff22 | 3,046 | h | C | robot/install/include/intera_core_msgs/SolvePositionIK.h | satvu/TeachBot | 5888aea544fea952afa36c097a597c5d575c8d6d | [
"BSD-3-Clause"
] | null | null | null | robot/install/include/intera_core_msgs/SolvePositionIK.h | satvu/TeachBot | 5888aea544fea952afa36c097a597c5d575c8d6d | [
"BSD-3-Clause"
] | null | null | null | robot/install/include/intera_core_msgs/SolvePositionIK.h | satvu/TeachBot | 5888aea544fea952afa36c097a597c5d575c8d6d | [
"BSD-3-Clause"
] | null | null | null | // Generated by gencpp from file intera_core_msgs/SolvePositionIK.msg
// DO NOT EDIT!
#ifndef INTERA_CORE_MSGS_MESSAGE_SOLVEPOSITIONIK_H
#define INTERA_CORE_MSGS_MESSAGE_SOLVEPOSITIONIK_H
#include <ros/service_traits.h>
#include <intera_core_msgs/SolvePositionIKRequest.h>
#include <intera_core_msgs/SolvePositionIKResponse.h>
namespace intera_core_msgs
{
struct SolvePositionIK
{
typedef SolvePositionIKRequest Request;
typedef SolvePositionIKResponse Response;
Request request;
Response response;
typedef Request RequestType;
typedef Response ResponseType;
}; // struct SolvePositionIK
} // namespace intera_core_msgs
namespace ros
{
namespace service_traits
{
template<>
struct MD5Sum< ::intera_core_msgs::SolvePositionIK > {
static const char* value()
{
return "7ae4607244c30c6c631f3693cd280e45";
}
static const char* value(const ::intera_core_msgs::SolvePositionIK&) { return value(); }
};
template<>
struct DataType< ::intera_core_msgs::SolvePositionIK > {
static const char* value()
{
return "intera_core_msgs/SolvePositionIK";
}
static const char* value(const ::intera_core_msgs::SolvePositionIK&) { return value(); }
};
// service_traits::MD5Sum< ::intera_core_msgs::SolvePositionIKRequest> should match
// service_traits::MD5Sum< ::intera_core_msgs::SolvePositionIK >
template<>
struct MD5Sum< ::intera_core_msgs::SolvePositionIKRequest>
{
static const char* value()
{
return MD5Sum< ::intera_core_msgs::SolvePositionIK >::value();
}
static const char* value(const ::intera_core_msgs::SolvePositionIKRequest&)
{
return value();
}
};
// service_traits::DataType< ::intera_core_msgs::SolvePositionIKRequest> should match
// service_traits::DataType< ::intera_core_msgs::SolvePositionIK >
template<>
struct DataType< ::intera_core_msgs::SolvePositionIKRequest>
{
static const char* value()
{
return DataType< ::intera_core_msgs::SolvePositionIK >::value();
}
static const char* value(const ::intera_core_msgs::SolvePositionIKRequest&)
{
return value();
}
};
// service_traits::MD5Sum< ::intera_core_msgs::SolvePositionIKResponse> should match
// service_traits::MD5Sum< ::intera_core_msgs::SolvePositionIK >
template<>
struct MD5Sum< ::intera_core_msgs::SolvePositionIKResponse>
{
static const char* value()
{
return MD5Sum< ::intera_core_msgs::SolvePositionIK >::value();
}
static const char* value(const ::intera_core_msgs::SolvePositionIKResponse&)
{
return value();
}
};
// service_traits::DataType< ::intera_core_msgs::SolvePositionIKResponse> should match
// service_traits::DataType< ::intera_core_msgs::SolvePositionIK >
template<>
struct DataType< ::intera_core_msgs::SolvePositionIKResponse>
{
static const char* value()
{
return DataType< ::intera_core_msgs::SolvePositionIK >::value();
}
static const char* value(const ::intera_core_msgs::SolvePositionIKResponse&)
{
return value();
}
};
} // namespace service_traits
} // namespace ros
#endif // INTERA_CORE_MSGS_MESSAGE_SOLVEPOSITIONIK_H
| 24.564516 | 90 | 0.755745 |
14388bcc2e416f66481c52b02c9a951b0fabab6e | 1,050 | kt | Kotlin | src/main/kotlin/io/github/nickacpt/lightcraft/gradle/LightCraftGradleExtension.kt | NickAcPT/LightClientGradle | ef0539964bdb29f3d98463fccb1f723672e54936 | [
"MIT"
] | null | null | null | src/main/kotlin/io/github/nickacpt/lightcraft/gradle/LightCraftGradleExtension.kt | NickAcPT/LightClientGradle | ef0539964bdb29f3d98463fccb1f723672e54936 | [
"MIT"
] | 1 | 2021-09-13T19:27:57.000Z | 2021-09-13T19:27:57.000Z | src/main/kotlin/io/github/nickacpt/lightcraft/gradle/LightCraftGradleExtension.kt | NickAcPT/LightClientGradle | ef0539964bdb29f3d98463fccb1f723672e54936 | [
"MIT"
] | 1 | 2021-09-13T17:16:43.000Z | 2021-09-13T17:16:43.000Z | package io.github.nickacpt.lightcraft.gradle
import io.github.nickacpt.lightcraft.gradle.minecraft.ClientVersion
import java.io.File
open class LightCraftGradleExtension {
internal val launchSettings = LightCraftLaunchSettings()
var clientVersion = ClientVersion.V1_5_2
fun computeVersionName() =
customMinecraftVersionName ?: clientVersion.friendlyName
var customMinecraftVersionName: String? = null
var customMinecraftJarUrl: String? = null
//#region Pre Mappings
var extraPreMappingUrls: MutableList<String> = mutableListOf()
var extraPreMappingFiles: MutableList<File> = mutableListOf()
//#endregion
//#region Post Mappings
var extraPostMappingUrls: MutableList<String> = mutableListOf()
var extraPostMappingFiles: MutableList<File> = mutableListOf()
//#endregion
var defaultMappingsSourceNamespace = MAPPING_SOURCE_NS
var provideOptifineJarMod: Boolean = false
fun launch(handler: LightCraftLaunchSettings.() -> Unit) {
launchSettings.handler()
}
}
| 28.378378 | 67 | 0.752381 |
3a065d1119891be93d835fea7ad2277b9c610a56 | 1,152 | swift | Swift | Devote/Devote/Styles/CheckboxStyle.swift | KasRoid/SwiftUI-Masterclass | 39afe097a96cfb7fb90aef5cd7f535a81356f57b | [
"MIT"
] | null | null | null | Devote/Devote/Styles/CheckboxStyle.swift | KasRoid/SwiftUI-Masterclass | 39afe097a96cfb7fb90aef5cd7f535a81356f57b | [
"MIT"
] | null | null | null | Devote/Devote/Styles/CheckboxStyle.swift | KasRoid/SwiftUI-Masterclass | 39afe097a96cfb7fb90aef5cd7f535a81356f57b | [
"MIT"
] | null | null | null | //
// CheckboxStyle.swift
// Devote
//
// Created by Kas Song on 2021/04/16.
//
import SwiftUI
struct CheckboxStyle: ToggleStyle {
// MARK: - Body
func makeBody(configuration: Configuration) -> some View {
HStack {
Image(systemName: configuration.isOn ? "checkmark.circle.fill" : "circle")
.foregroundColor(configuration.isOn ? .pink : .primary)
.font(.system(size: 30, weight: .semibold, design: .rounded))
.onTapGesture {
configuration.isOn.toggle()
configuration.isOn
? playSound(sound: "sound-rise", type: "mp3")
: playSound(sound: "sound-tap", type: "mp3")
feedback.notificationOccurred(.success)
}
configuration.label
}
}
}
// MARK: - PreviewProvider
struct CheckboxStyle_Previews: PreviewProvider {
static var previews: some View {
Toggle("Placeholder label", isOn: .constant(true))
.toggleStyle(CheckboxStyle())
.padding()
.previewLayout(.sizeThatFits)
}
}
| 29.538462 | 86 | 0.556424 |
2d9424dd7abfe4a933ab453a7a28b70657d24c7b | 3,198 | html | HTML | exercicios/ex021/caixa02.html | amauri007/html-css | 2e5a3866aba55d85137004dcf0f042bf525462a5 | [
"MIT"
] | null | null | null | exercicios/ex021/caixa02.html | amauri007/html-css | 2e5a3866aba55d85137004dcf0f042bf525462a5 | [
"MIT"
] | null | null | null | exercicios/ex021/caixa02.html | amauri007/html-css | 2e5a3866aba55d85137004dcf0f042bf525462a5 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html lang="pt-br">
<!--Cabeça são cinfigurações do seu site -->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--Grouping Tags Semanticas -->
<title>Grouping Tags</title>
<!-- No nav Primeiro 1px deslocamento horizontal O segundo 1px deslocamento vertical O terceiro 1px espalhamento cor é a sombra exemplo 1px 1px 1px black-->
<style>
body {
font-family: Arial, Helvetica, sans-serif;
background-color: dimgray;
margin: 0px;
}
header {
background-color: white;
padding: 10px;
margin: 10px;
}
h1 {
box-shadow: 2px 1px 14px 6px rgba(0, 0, 0, 0.185);
}
nav {
background-color:rgb(99, 99, 99) ;
padding: 3px;
box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.315);
}
nav > a {
text-decoration: none;
color: white;
font-weight: bold;
margin: 30px;
}
nav > a {
text-decoration: none;
}
main {
background-color: white;
padding: 10px;
margin: 10px;
border-radius: 10px 0px;
box-shadow:4px 4px 9px 0px rgba(0, 0, 0, 0.315);
}
article {
background-color: lightgray;
padding: 5px;
}
article > aside {
background-color: rgb(104, 104, 104);
}
footer {
background-color: black;
color:white;
text-align: center;
padding: 4px;
margin: 0px;
}
footer > p {
margin: 0px;
}
div#bola {
height: 100px;
width: 100px;
margin:10px;
background-color: white;
border-radius: 50%;
}
</style>
</head>
<body>
<!--Cabeçalho faz parte do conteudo dele -->
<header>
<h1>Meu site</h1>
<nav>
<a href="#">Link</a>
<a href="#">Link</a>
<a href="#">Link</a>
<a href="#">Link</a>
<a href="#">Link</a>
</nav>
</header>
<!--Conteudo Principal -->
<main>
<section id="assuntos">
<p>Esportes Politicas Tecnologia </p>
</section>
<section id="noticias">
<article>
<h2>Notícia sobre o brasil</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi voluptates blanditiis mollitia facere quod unde repellendus ipsum id, sunt quos a fugit veniam explicabo quaerat omnis repellat natus odio minus!</p>
<aside>
<p>Artigo escrito por José da Silva</p>
</aside>
</article>
<article>
</article>
</section>
</main>
<!--Roda pé do seu site-->
<footer>
<p>Desenvolvido pelo Maury Show</p>
</footer>
<div id="bola"></div>
</body>
</html> | 26.429752 | 231 | 0.480613 |
a7fa1e77a9f36e0cc83c282bb9643c1b3e670077 | 10,070 | lua | Lua | bin/src/cocos_ext/ui_system/_convert_ani_data.lua | CarlZhongZ/cocos_editor | e7ed85e42f5eb100d73b59ad70ab75cfd47dd186 | [
"MIT"
] | 20 | 2018-06-14T14:15:24.000Z | 2021-01-07T18:24:47.000Z | tools/project_template/src/cocos_ext/ui_system/_convert_ani_data.lua | StevenCoober/cocos_editor | e7ed85e42f5eb100d73b59ad70ab75cfd47dd186 | [
"MIT"
] | null | null | null | tools/project_template/src/cocos_ext/ui_system/_convert_ani_data.lua | StevenCoober/cocos_editor | e7ed85e42f5eb100d73b59ad70ab75cfd47dd186 | [
"MIT"
] | 7 | 2018-09-24T09:05:00.000Z | 2022-01-16T15:06:56.000Z | local id2name = {
[201] = 'ProgressTo',
[202] = 'FrameAnimation',
}
local decorActions = {
'Repeat',
'EaseIn',
'EaseOut',
'EaseInOut',
'EaseSineIn',
'EaseSineOut',
'EaseSineInOut',
'EaseQuadraticActionIn',
'EaseQuadraticActionOut',
'EaseQuadraticActionInOut',
'EaseCubicActionIn',
'EaseCubicActionOut',
'EaseCubicActionInOut',
'EaseQuarticActionIn',
'EaseQuarticActionOut',
'EaseQuarticActionInOut',
'EaseQuinticActionIn',
'EaseQuinticActionOut',
'EaseQuinticActionInOut',
'EaseExponentialIn',
'EaseExponentialOut',
'EaseExponentialInOut',
'EaseCircleActionIn',
'EaseCircleActionOut',
'EaseCircleActionInOut',
'EaseElasticIn',
'EaseElasticOut',
'EaseElasticInOut',
'EaseBackIn',
'EaseBackOut',
'EaseBackInOut',
'EaseBounceIn',
'EaseBounceOut',
'EaseBounceInOut',
}
for i, v in ipairs(decorActions) do
id2name[100 + i] = v
end
local normActions = {
'DelayTime',
'MoveTo',
'MoveBy',
'BezierTo',
'BezierBy',
'ScaleTo',
'ScaleBy',
'RotateTo',
'RotateBy',
'SkewTo',
'SkewBy',
'JumpTo',
'JumpBy',
'Blink',
'FadeTo',
'FadeIn',
'FadeOut',
'Show',
'Hide',
'ToggleVisibility',
'RemoveSelf',
'Place',
'CallFunc',
'Sequence',
}
for i, v in ipairs(normActions) do
id2name[i] = v
end
local function _tryParseParm(tp, cfg, p, child_list)
-- print('_tryParseParm', tp)
if tp == 'DelayTime' then
cfg['t'] = p
elseif tp == 'FadeIn' then
cfg['t'] = p
elseif tp == 'FadeOut' then
cfg['t'] = p
elseif tp == 'Repeat' then
cfg['n'] = p
elseif tp == 'EaseIn' then
cfg['p'] = p
elseif tp == 'EaseOut' then
cfg['p'] = p
elseif tp == 'EaseInOut' then
cfg['p'] = p
elseif tp == 'Sequence' then
local sqcl = cfg['child_list']
if sqcl == nil then
sqcl = {}
cfg['child_list'] = sqcl
end
local removeIdx = #child_list - p + 1
for i = 1, p do
local subCfg = table.remove(child_list, removeIdx)
if subCfg then
table.insert(sqcl, subCfg)
else
printf('child_list [%d] not exists', i)
end
end
else
if p ~= nil then
for k, v in pairs(p) do
assert(cfg[k] == nil)
cfg[k] = v
end
end
end
end
local function _parseDecorInfo(decorInfo)
local type_name = id2name[decorInfo[1]]
local decorConf = {['type_name'] = type_name}
_tryParseParm(type_name, decorConf, decorInfo[2])
decorConf['p'] = decorInfo[2]
return decorConf
end
local function _convertPosConf(vecData, node)
if #vecData == 0 then
return
end
local startIndex
if vecData[1][1] == 0 then
local data = vecData[1][2]
node:SetPosition(data.x, data.y)
startIndex = 2
if #vecData == 1 then
return
end
else
startIndex = 1
end
local child_list = {}
local ret = {
['type_name'] = 'Sequence',
['child_list'] = child_list,
}
local pre = 0
for i = startIndex, #vecData do
local time = vecData[i][1]
local cfg = {}
cfg['type_name'] = 'MoveTo'
cfg['p'] = vecData[i][2]
cfg['t'] = time - pre
pre = time
local decorInfo = vecData[i][3]
if decorInfo then
cfg['child_list'] = {
_parseDecorInfo(decorInfo),
}
end
table.insert(child_list, cfg)
end
return ret
end
local function _convertScaleConf(vecData, node)
if #vecData == 0 then
return
end
local startIndex
if vecData[1][1] == 0 then
local data = vecData[1][2]
node:setScaleX(ccext_get_scale(data.x))
node:setScaleY(ccext_get_scale(data.y))
startIndex = 2
if #vecData == 1 then
return
end
else
startIndex = 1
end
local child_list = {}
local ret = {
['type_name'] = 'Sequence',
['child_list'] = child_list,
}
local pre = 0
for i = startIndex, #vecData do
local time = vecData[i][1]
local cfg = {}
cfg['type_name'] = 'ScaleTo'
cfg['s'] = vecData[i][2]
cfg['t'] = time - pre
pre = time
local decorInfo = vecData[i][3]
if decorInfo then
cfg['child_list'] = {
_parseDecorInfo(decorInfo),
}
end
table.insert(child_list, cfg)
end
return ret
end
local function _convertRotationConf(vecData, node)
if #vecData == 0 then
return
end
local startIndex
if vecData[1][1] == 0 then
local data = vecData[1][2]
node:setRotation(data)
startIndex = 2
if #vecData == 1 then
return
end
else
startIndex = 1
end
local child_list = {}
local ret = {
['type_name'] = 'Sequence',
['child_list'] = child_list,
}
local pre = 0
for i = startIndex, #vecData do
local time = vecData[i][1]
local cfg = {}
cfg['type_name'] = 'RotateTo'
cfg['r'] = vecData[i][2]
cfg['t'] = time - pre
pre = time
local decorInfo = vecData[i][3]
if decorInfo then
cfg['child_list'] = {
_parseDecorInfo(decorInfo),
}
end
table.insert(child_list, cfg)
end
return ret
end
local function _convertOpacityConf(vecData, node)
if #vecData == 0 then
return
end
local startIndex
if vecData[1][1] == 0 then
local data = vecData[1][2]
node:setOpacity(data)
startIndex = 2
if #vecData == 1 then
return
end
else
startIndex = 1
end
local child_list = {}
local ret = {
['type_name'] = 'Sequence',
['child_list'] = child_list,
}
local pre = 0
for i = startIndex, #vecData do
local time = vecData[i][1]
local cfg = {}
cfg['type_name'] = 'FadeTo'
cfg['o'] = vecData[i][2]
cfg['t'] = time - pre
pre = time
local decorInfo = vecData[i][3]
if decorInfo then
cfg['child_list'] = {
_parseDecorInfo(decorInfo),
}
end
table.insert(child_list, cfg)
end
return ret
end
local function _convertCustomizeConf(vecData)
local listConf = {}
for _, v in ipairs(vecData) do
local tp = id2name[v[2][1]]
local p = v[2][2]
local decorInfo = v[3]
local cfg = {}
cfg['type_name'] = tp
xpcall(function()
_tryParseParm(tp, cfg, p, listConf)
end, function(msg)
print(msg)
print(tp, v)
end)
if decorInfo then
local decorConf = _parseDecorInfo(decorInfo)
local child_list = cfg['child_list']
if child_list then
table.insert(child_list, decorConf)
else
cfg['child_list'] = {decorConf}
end
end
table.insert(listConf, cfg)
end
if table.count(listConf) == 1 then
return listConf[1]
else
return {
['type_name'] = 'Sequence',
['child_list'] = listConf,
}
end
end
local function _parseOldAniConf(conf, node)
local listConf = {}
for aniID, vecData in pairs(conf) do
aniID = tonumber(aniID)
local cfg
if aniID == 1 then
cfg = _convertPosConf(vecData, node)
elseif aniID == 2 then
cfg = _convertScaleConf(vecData, node)
elseif aniID == 3 then
cfg = _convertRotationConf(vecData, node)
elseif aniID == 4 then
cfg = _convertOpacityConf(vecData, node)
else
cfg = _convertCustomizeConf(vecData, node)
end
if cfg then
table.insert(listConf, cfg)
else
-- print('parse old data failed', aniID, vecData)
end
end
return listConf
end
-- 将旧版的动画数据转换成新版
function try_convert_ani_conf(conf, node, customizeInfo)
-- print('try_convert_ani_conf', conf)
if is_array(conf) then
local listAniConf = {}
for _, ani_path in ipairs(conf) do
local aniConf, aniInfo = g_uisystem.load_ani_template(ani_path, customizeInfo ~= nil)
if aniConf then
for _, v in ipairs(aniConf) do
table.insert(listAniConf, v)
end
if aniInfo and customizeInfo then
for action_name, action_conf in pairs(customizeInfo) do
if aniInfo[action_name] then
for k, v in pairs(action_conf) do
aniInfo[action_name][k] = v
end
end
end
end
end
end
local len = #listAniConf
-- print('listAniConf', len, listAniConf)
if len == 1 then
return listAniConf[1]
elseif len > 1 then
return {
['type_name'] = 'Spawn',
['child_list'] = table.from_arr_trans_fun(listAniConf, function(_, v)
return v
end)
}
else
printf('try_convert_ani_conf not valid:%s', str(conf))
return
end
end
local parseListConf = _parseOldAniConf(conf, node)
local ret
if table.count(parseListConf) == 1 then
return parseListConf[1]
else
return {
['type_name'] = 'Spawn',
['child_list'] = parseListConf,
}
end
return ret
end | 22.578475 | 97 | 0.519861 |
415da313873445fb1ab8f61d873d40e91855885b | 590 | h | C | base/ntos/verifier/vffilter.h | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/ntos/verifier/vffilter.h | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/ntos/verifier/vffilter.h | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | /*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
vffilter.h
Abstract:
This header contains prototypes for using the verifier driver filter.
Author:
Adrian J. Oney (adriao) 12-June-2000
Environment:
Kernel mode
Revision History:
AdriaO 06/12/2000 - Authored
--*/
VOID
VfFilterInit(
VOID
);
VOID
VfFilterAttach(
IN PDEVICE_OBJECT PhysicalDeviceObject,
IN VF_DEVOBJ_TYPE DeviceObjectType
);
BOOLEAN
VfFilterIsVerifierFilterObject(
IN PDEVICE_OBJECT DeviceObject
);
| 13.72093 | 74 | 0.647458 |
388e14a556b8d8c372002cbc89f54669ae7e569e | 3,234 | swift | Swift | ios/ios/Feature/Discover/DiscoverView.swift | c0de-wizard/tv-maniac | d1f9432b58155a1f1e2deadc569aac122fcdbe83 | [
"Apache-2.0"
] | 32 | 2021-08-10T15:18:15.000Z | 2022-03-15T04:31:37.000Z | ios/ios/Feature/Discover/DiscoverView.swift | c0de-wizard/tv-maniac | d1f9432b58155a1f1e2deadc569aac122fcdbe83 | [
"Apache-2.0"
] | 6 | 2021-12-18T17:32:12.000Z | 2022-03-18T13:36:24.000Z | ios/ios/Feature/Discover/DiscoverView.swift | c0de-wizard/tv-maniac | d1f9432b58155a1f1e2deadc569aac122fcdbe83 | [
"Apache-2.0"
] | 4 | 2021-12-18T18:06:55.000Z | 2022-01-29T15:41:09.000Z | import SwiftUI
import TvManiac
struct DiscoverView: View {
@ObservedObject var observable = ObservableViewModel<DiscoverShowsViewModel, DiscoverShowsState>(
viewModel: DiscoverShowsViewModel()
)
var body: some View {
ZStack {
Color("Background")
.edgesIgnoringSafeArea(.all)
if observable.state is DiscoverShowsState.InProgress {
LoadingIndicatorView()
} else if observable.state is DiscoverShowsState.Error {
//TODO:: Show Error
EmptyView()
} else if observable.state is DiscoverShowsState.Success {
VStack {
ScrollView {
if let result = observable.state as? DiscoverShowsState.Success{
FeaturedShowsView(shows: result.data.featuredShows.showUiModels)
HorizontalShowsView(showData: result.data.trendingShows)
HorizontalShowsView(showData: result.data.popularShows)
HorizontalShowsView(showData: result.data.topRatedShows)
}
Spacer()
}
}
}
}.onAppear {
observable.viewModel.attach()
}
.onDisappear {
observable.viewModel.detach()
}
}
}
struct FeaturedShowsView: View {
@SwiftUI.State var numberOfPages: Int = 0
@SwiftUI.State var selectedIndex = 0
let shows: [ShowUiModel]
var body: some View {
VStack {
if shows.count != 0 {
TabView {
ForEach(shows, id: \.self) { item in
let url = URL(string: item.posterImageUrl)!
AsyncImage(
url: url,
placeholder: { Text("Loading ...") },
image: { Image(uiImage: $0).resizable() }
)
.frame(height: 500)
.clipShape(RoundedRectangle(cornerRadius: 10))
.padding()
}
}
.indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always))
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
.onAppear {
UIPageControl.appearance().currentPageIndicatorTintColor = .white
UIPageControl.appearance().pageIndicatorTintColor = UIColor.black.withAlphaComponent(0.2)
}
}
}
.frame(height: 600)
.padding(.bottom, 20)
}
}
struct HorizontalShowsView: View {
let showData: DiscoverShowResult.DiscoverShowsData
var body: some View {
VStack {
LabelView(title: showData.category.title)
HorizontalShowsGridView(shows: showData.showUiModels)
}
}
}
struct LabelView: View {
let title: String
var body: some View {
HStack {
LabelTitleText(text: title)
Spacer()
Button(action: {}) {
LabelText(text: "More")
}
}
.padding(.leading)
}
}
struct HorizontalShowsGridView: View {
let shows: [ShowUiModel]
var body: some View {
ScrollView(.horizontal) {
LazyHStack {
ForEach(shows, id: \.self) { item in
let url = URL(string: item.posterImageUrl)!
AsyncImage(
url: url,
placeholder: { Text("Loading ...") },
image: { Image(uiImage: $0).resizable() }
)
.frame(width: 140, height: 180)
.clipShape(RoundedRectangle(cornerRadius: 5))
}
}
}
.padding(.leading)
}
}
struct DiscoverView_Previews: PreviewProvider {
static var previews: some View {
DiscoverView()
DiscoverView()
.preferredColorScheme(.dark)
}
}
| 19.6 | 98 | 0.643785 |
3961585046f4f94233182fe9f8d9bf230d1fd060 | 1,248 | html | HTML | index.html | fivagod/videojs-dvr | bf1c46201879a58ab2f78ef21f203c728d7523e7 | [
"MIT"
] | null | null | null | index.html | fivagod/videojs-dvr | bf1c46201879a58ab2f78ef21f203c728d7523e7 | [
"MIT"
] | null | null | null | index.html | fivagod/videojs-dvr | bf1c46201879a58ab2f78ef21f203c728d7523e7 | [
"MIT"
] | null | null | null | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>videojs-dvr Demo</title>
<link href="https://vjs.zencdn.net/6.8.0/video-js.css" rel="stylesheet">
<link href="dist/videojs-dvr.css" rel="stylesheet">
<style>
body{
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#videojs-dvr-player{
width: 700px;
height: 400px;
}
</style>
</head>
<body>
<video id="videojs-dvr-player" class="video-js vjs-default-skin" controls autoplay>
<source src="https://b028.wpc.azureedge.net/80B028/Samples/a38e6323-95e9-4f1f-9b38-75eba91704e4/5f2ce531-d508-49fb-8152-647eba422aec.ism/Manifest(format=m3u8-aapl)"
type='application/x-mpegURL'>
</video>
<script src="https://vjs.zencdn.net/6.8.0/video.js"></script>
<script src="node_modules/videojs-contrib-hls/dist/videojs-contrib-hls.min.js"></script>
<script src="node_modules/videojs-social-media/dist/videojs-social-media.min.js"></script>
<script src="dist/videojs-dvr.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-dvr-player');
player.dvr();
player.play();
}(window, window.videojs));
</script>
</body>
</html>
| 27.130435 | 166 | 0.665064 |
965f39f4ec00af263f9e0b731ca64fbc662bfabb | 1,384 | php | PHP | resources/views/Frontend/inc/navbar.blade.php | ian97jr/insurance | 7d9ddc90be6f4917c46767c56774da5e9ce988cf | [
"MIT"
] | null | null | null | resources/views/Frontend/inc/navbar.blade.php | ian97jr/insurance | 7d9ddc90be6f4917c46767c56774da5e9ce988cf | [
"MIT"
] | null | null | null | resources/views/Frontend/inc/navbar.blade.php | ian97jr/insurance | 7d9ddc90be6f4917c46767c56774da5e9ce988cf | [
"MIT"
] | null | null | null | <div class="header-area ">
<div id="sticky-header" class="main-header-area">
<div class="container-fluid ">
<div class="header_bottom_border">
<div class="row align-items-center">
<div class="col col-xl-3 col-lg-2">
<div>
<a href="/">
<img src="{{asset('img/header_logo.png')}}" alt="">
</a>
</div>
</div>
<div class="col-xl-5 col-lg-6">
<div class="main-menu d-none d-lg-block">
<nav>
<ul id="navigation">
<li><a href="/">home</a></li>
<li><a href="{{route('two-wheeler')}}">Two-Wheeler</a></li>
<li><a href="{{route('car')}}">Car</a></li>
<li><a href="{{route('about-us')}}">about</a></li>
<li><a href="{{route('contact-us')}}">Contact</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<!-- header-end -->
| 41.939394 | 95 | 0.314306 |
fecfd699a6a711514e05b3af3c03f157f30a3077 | 502 | html | HTML | es.212.237/inspectionDescriptions/MapReplaceableByEnumMap.html | macastro/SpanishLanguagePack-JetBrains | 70e8a884e19d282f398f31a4ce2db41ca1cbea82 | [
"MIT"
] | 7 | 2021-07-05T23:32:54.000Z | 2022-01-09T14:08:16.000Z | es.212.237/inspectionDescriptions/MapReplaceableByEnumMap.html | macastro/SpanishLanguagePack-JetBrains | 70e8a884e19d282f398f31a4ce2db41ca1cbea82 | [
"MIT"
] | 2 | 2021-05-17T23:08:56.000Z | 2021-08-09T10:17:11.000Z | es.212.237/inspectionDescriptions/MapReplaceableByEnumMap.html | macastro/SpanishLanguagePack-JetBrains | 70e8a884e19d282f398f31a4ce2db41ca1cbea82 | [
"MIT"
] | 3 | 2020-12-06T18:34:10.000Z | 2021-08-18T23:08:35.000Z | <html>
<body>
키 타입이 열거형 클래스인 <code>java.util.Map</code> 객체의 인스턴스화를 보고합니다. 이러한 <code>java.util.Map</code> 객체는
<code>java.util.EnumMap</code> 객체로 대체될 수 있습니다.
<p>
기본 데이터 구조가 단순한 배열이기 때문에 <code>java.util.EnumMap</code> 구현이 훨씬 더 효율적일 수 있습니다.
</p>
<p><b>예:</b></p>
<pre><code>
Map<MyEnum, String> myEnums = new HashMap<>();
</code></pre>
<p>빠른 수정 적용 후:</p>
<pre><code>
Map<MyEnum, String> myEnums = new EnumMap<>(MyEnum.class);
</code></pre>
<!-- tooltip end -->
</body>
</html> | 27.888889 | 94 | 0.63745 |
48c91bb4a5af61521a18166b499cff13b066568b | 1,277 | h | C | LastHope Engine/ModuleEditor.h | rohomedesrius/LastHopeEngine | 5a73a0a3cf00fbcd2fa48f0ec1ce2c9bc1057bc0 | [
"MIT"
] | 1 | 2018-10-03T14:01:40.000Z | 2018-10-03T14:01:40.000Z | LastHope Engine/ModuleEditor.h | rohomedesrius/LastHopeEngine | 5a73a0a3cf00fbcd2fa48f0ec1ce2c9bc1057bc0 | [
"MIT"
] | null | null | null | LastHope Engine/ModuleEditor.h | rohomedesrius/LastHopeEngine | 5a73a0a3cf00fbcd2fa48f0ec1ce2c9bc1057bc0 | [
"MIT"
] | null | null | null | #ifndef __EDITOR_H__
#define __EDITOR_H__
#include "Module.h"
#include "Console.h"
struct Style
{
bool active = false;
// c stands for Color
ImVec4 c_text = {};
ImVec4 c_head = {};
ImVec4 c_area = {};
ImVec4 c_body = {};
ImVec4 c_pop = {};
};
class ModuleEditor : public Module
{
public:
ModuleEditor(Application* app, bool start_enabled = true);
~ModuleEditor();
bool Start();
update_status PreUpdate(float dt);
update_status Update(float dt);
bool CleanUp();
void DrawUI();
void LoadConfig(JSONFile * file);
void SaveConfig(JSONFile * file);
private:
EngineConsole console;
Style style_classic;
Style style_blue;
Style style_forest;
Style style_dark;
int current_style = 0;
bool show_ui = true;
bool show_properties = false;
bool show_hierachy = false;
bool show_application = false;
bool show_random = false;
bool show_console = false;
void SetStyle(Style style);
void InitStyles();
bool want_to_save = false;
public:
void Draw() const;
void RegisterLog(const char* log);
void ManageUI();
void HandleStyle();
private:
void ShowEngineConsole(bool* show);
void ApplicationWindow();
void PropertiesWindow();
void HierachyWindow();
void RandomWindow();
void SaveLoadWindow(bool is_saving);
};
#endif //__EDITOR_H__ | 16.164557 | 59 | 0.721222 |
1a29bd53944795d0dbf32c62043e2da4d7bad397 | 2,969 | swift | Swift | Sources/TuistKit/Services/FocusService.swift | bhuemer/tuist | 1cbacae2b19bce19c0ada0eb3fa81fa9e189b5ef | [
"MIT"
] | null | null | null | Sources/TuistKit/Services/FocusService.swift | bhuemer/tuist | 1cbacae2b19bce19c0ada0eb3fa81fa9e189b5ef | [
"MIT"
] | 285 | 2020-07-05T10:15:49.000Z | 2022-03-28T11:33:43.000Z | Sources/TuistKit/Services/FocusService.swift | bhuemer/tuist | 1cbacae2b19bce19c0ada0eb3fa81fa9e189b5ef | [
"MIT"
] | null | null | null | import Foundation
import RxBlocking
import RxSwift
import TSCBasic
import TuistCache
import TuistCore
import TuistGenerator
import TuistLoader
import TuistSupport
protocol FocusServiceProjectGeneratorFactorying {
func generator(sources: Set<String>, xcframeworks: Bool, ignoreCache: Bool) -> ProjectGenerating
}
final class FocusServiceProjectGeneratorFactory: FocusServiceProjectGeneratorFactorying {
func generator(sources: Set<String>, xcframeworks: Bool, ignoreCache: Bool) -> ProjectGenerating {
let cacheOutputType: CacheOutputType = xcframeworks ? .xcframework : .framework
let cacheConfig: CacheConfig = ignoreCache
? .withoutCaching()
: .withCaching(cacheOutputType: cacheOutputType)
return ProjectGenerator(graphMapperProvider: GraphMapperProvider(cacheConfig: cacheConfig, sources: sources))
}
}
enum FocusServiceError: FatalError {
case cacheWorkspaceNonSupported
var description: String {
switch self {
case .cacheWorkspaceNonSupported:
return "Caching is only supported when focusing on a project. Please, run the command in a directory that contains a Project.swift file."
}
}
var type: ErrorType {
switch self {
case .cacheWorkspaceNonSupported:
return .abort
}
}
}
final class FocusService {
private let opener: Opening
private let projectGeneratorFactory: FocusServiceProjectGeneratorFactorying
private let manifestLoader: ManifestLoading
init(manifestLoader: ManifestLoading = ManifestLoader(),
opener: Opening = Opener(),
projectGeneratorFactory: FocusServiceProjectGeneratorFactorying = FocusServiceProjectGeneratorFactory())
{
self.manifestLoader = manifestLoader
self.opener = opener
self.projectGeneratorFactory = projectGeneratorFactory
}
func run(path: String?, sources: Set<String>, noOpen: Bool, xcframeworks: Bool, ignoreCache: Bool) throws {
let path = self.path(path)
if isWorkspace(path: path) {
throw FocusServiceError.cacheWorkspaceNonSupported
}
let generator = projectGeneratorFactory.generator(sources: sources,
xcframeworks: xcframeworks,
ignoreCache: ignoreCache)
let workspacePath = try generator.generate(path: path, projectOnly: false)
if !noOpen {
try opener.open(path: workspacePath)
}
}
// MARK: - Helpers
private func path(_ path: String?) -> AbsolutePath {
if let path = path {
return AbsolutePath(path, relativeTo: FileHandler.shared.currentPath)
} else {
return FileHandler.shared.currentPath
}
}
private func isWorkspace(path: AbsolutePath) -> Bool {
manifestLoader.manifests(at: path).contains(.workspace)
}
}
| 35.345238 | 149 | 0.677332 |
810a31d8df780b7fa3fbf0e28abc435c3e4c5541 | 1,217 | rs | Rust | storage-proto/src/lib.rs | Blockdaemon/solana | e4d0d4bfaec32f86988963e1be026881b7b49489 | [
"Apache-2.0"
] | 5 | 2020-12-08T13:52:26.000Z | 2022-01-19T02:34:15.000Z | storage-proto/src/lib.rs | Blockdaemon/solana | e4d0d4bfaec32f86988963e1be026881b7b49489 | [
"Apache-2.0"
] | 201 | 2020-10-09T06:43:21.000Z | 2022-03-25T08:40:20.000Z | storage-proto/src/lib.rs | Blockdaemon/solana | e4d0d4bfaec32f86988963e1be026881b7b49489 | [
"Apache-2.0"
] | 2 | 2021-08-30T10:00:15.000Z | 2021-12-23T16:10:27.000Z | use serde::{Deserialize, Serialize};
use solana_sdk::deserialize_utils::default_on_eof;
use solana_transaction_status::{Reward, RewardType};
pub mod convert;
pub type StoredExtendedRewards = Vec<StoredExtendedReward>;
#[derive(Serialize, Deserialize)]
pub struct StoredExtendedReward {
pubkey: String,
lamports: i64,
#[serde(deserialize_with = "default_on_eof")]
post_balance: u64,
#[serde(deserialize_with = "default_on_eof")]
reward_type: Option<RewardType>,
}
impl From<StoredExtendedReward> for Reward {
fn from(value: StoredExtendedReward) -> Self {
let StoredExtendedReward {
pubkey,
lamports,
post_balance,
reward_type,
} = value;
Self {
pubkey,
lamports,
post_balance,
reward_type,
}
}
}
impl From<Reward> for StoredExtendedReward {
fn from(value: Reward) -> Self {
let Reward {
pubkey,
lamports,
post_balance,
reward_type,
..
} = value;
Self {
pubkey,
lamports,
post_balance,
reward_type,
}
}
}
| 22.962264 | 59 | 0.573541 |
b6b99b73feabda4231a7cd657e1a7c27cc81d326 | 720 | rb | Ruby | solns/ruby/27.rb | retiman/project-euler | 402dc1e6dca91cb52140f74465661595de96d7b7 | [
"CC0-1.0"
] | 7 | 2015-06-15T08:18:40.000Z | 2021-05-02T03:57:09.000Z | solns/ruby/27.rb | retiman/project-euler | 402dc1e6dca91cb52140f74465661595de96d7b7 | [
"CC0-1.0"
] | 3 | 2015-01-29T20:56:41.000Z | 2021-03-28T22:56:12.000Z | solns/ruby/27.rb | retiman/project-euler | 402dc1e6dca91cb52140f74465661595de96d7b7 | [
"CC0-1.0"
] | 1 | 2015-01-29T06:29:29.000Z | 2015-01-29T06:29:29.000Z | require "set"
# A simple quadratic
def f(n, a, b)
n*n + a*n + b
end
# For how many values is a quadratic prime?
def count(ps, a, b)
(0..b).take_while { |n| ps.include? f(n, a, b) }.count
end
# A list of the primes under 2 million will be fine
def primes
file = File.new("../data/primes.txt")
set = Set.new
while (p = file.gets)
set.add(p.to_i)
end
file.close
set
end
b_max = 1000
ps = primes
bs = ps.select { |b| b <= b_max }
bs = bs + bs.map { |b| -b }
a, b, c = 0, 0, 0
bs.each do |b_i|
(-b_max..b_max).each do |a_i|
c_i = count(ps, a_i, b_i)
if c_i > c
a, b, c = a_i, b_i, c_i
end
end
end
result = a*b
puts result
raise Error unless result == -59231
| 16.363636 | 56 | 0.573611 |
3fae6e2e72c1fcf15fd143cd39b027805fa42de3 | 3,013 | h | C | inc/rlbot/statesetting.h | samuelpmish/RLBotCPP | 5b1d27f5279061859a80156a70750adc0ba3d475 | [
"MIT"
] | 4 | 2019-06-08T21:25:14.000Z | 2019-09-06T17:20:22.000Z | RLBotCPP/inc/rlbot/statesetting.h | steinraf/badbotcpp | 6b517bd0c9ce1f1b717dbfdd790e627434259219 | [
"MIT"
] | 2 | 2019-06-18T19:24:32.000Z | 2021-12-08T06:38:37.000Z | RLBotCPP/inc/rlbot/statesetting.h | steinraf/badbotcpp | 6b517bd0c9ce1f1b717dbfdd790e627434259219 | [
"MIT"
] | 13 | 2019-05-04T19:08:25.000Z | 2022-02-07T20:13:09.000Z | #pragma once
#include <flatbuffers/flatbuffers.h>
#include "rlbot/rlbot_generated.h"
#include <array>
#include <optional>
namespace rlbot {
/** @brief Helper class for PhysicsState. */
struct DesiredVector3 {
float x, y, z;
};
/** @brief Helper class for PhysicsState. */
struct DesiredRotator {
float pitch, yaw, roll;
};
/** @brief Describes the desired state of an physics object for use in state setting. */
class PhysicsState {
public:
/** Location of the physics object. If no value is assigned it will not modify the location when applying this physics object. */
std::optional<DesiredVector3> location;
/** Velocity of the physics object. If no value is assigned it will not modify the velocity when applying this physics object. */
std::optional<DesiredVector3> velocity;
/** Rotation of the physics object. If no value is assigned it will not modify the rotation when applying this physics object. */
std::optional<DesiredRotator> rotation;
/** Angular velocity of the physics object. If no value is assigned it will not modify the angular velocity when applying this physics object. */
std::optional<DesiredVector3> angularVelocity;
PhysicsState();
/**
* Creates a flatbuffers representation of this instance. This is used internally,
* it is recommended to use Interface::SetGameState instead.
*/
flatbuffers::Offset<rlbot::flat::DesiredPhysics>
BuildFlatBuffer(flatbuffers::FlatBufferBuilder &builder);
};
/** @brief Describes the desired state of the ball for use in state setting. */
class BallState {
public:
PhysicsState physicsState;
BallState();
/**
* Creates a flatbuffers representation of this instance. This is used internally,
* it is recommended to use Interface::SetGameState instead.
*/
flatbuffers::Offset<rlbot::flat::DesiredBallState>
BuildFlatBuffer(flatbuffers::FlatBufferBuilder &builder);
};
/** @brief Describes the desired state of a car for use in state setting. */
class CarState {
public:
PhysicsState physicsState;
/** The amount of boost that the car should have after setting the state. Keeps the current boost amount if no value is assignent. */
std::optional<float> boostAmount;
/**
* Creates a flatbuffers representation of this instance. This is used internally,
* it is recommended to use Interface::SetGameState instead.
*/
flatbuffers::Offset<rlbot::flat::DesiredCarState>
BuildFlatBuffer(flatbuffers::FlatBufferBuilder &builder);
};
/** @brief Describes the desired state of the game. */
class GameState {
public:
BallState ballState;
std::array<std::optional<CarState>, 10> carStates;
std::optional<float> gameSpeed;
std::optional<float> gravity;
GameState();
/**
* Creates a flatbuffers representation of this instance. This is used internally,
* it is recommended to use Interface::SetGameState instead.
*/
flatbuffers::Offset<rlbot::flat::DesiredGameState>
BuildFlatBuffer(flatbuffers::FlatBufferBuilder &builder);
};
} // namespace rlbot
| 32.75 | 147 | 0.742781 |
71692a7aa2ada244535b11074d36572e8d57a390 | 188 | ts | TypeScript | src/modules/quiz/repositories/IQuizRepository.ts | rafasnarf/cenopFarm-backend | aded4e1818b474bb1516b2cdeb856076681cf904 | [
"MIT"
] | null | null | null | src/modules/quiz/repositories/IQuizRepository.ts | rafasnarf/cenopFarm-backend | aded4e1818b474bb1516b2cdeb856076681cf904 | [
"MIT"
] | null | null | null | src/modules/quiz/repositories/IQuizRepository.ts | rafasnarf/cenopFarm-backend | aded4e1818b474bb1516b2cdeb856076681cf904 | [
"MIT"
] | null | null | null | import { QuizDTO } from '../dtos/QuizDTO';
import { Quiz } from '../infra/typeorm/entities/Quiz';
export interface IQuizRepository {
saveQuestion(data: QuizDTO): Promise<Quiz>;
}
| 26.857143 | 55 | 0.691489 |
f0578852a5ff5c3e1606f3ad4ada58e4f74be6e6 | 19,862 | js | JavaScript | node_modules/@coreui/icons/js/flag/cif-kh.js | yashn007/nodejs | d15b0a52a043172321b9abc6761fabf235832cca | [
"MIT"
] | 1,950 | 2018-05-09T13:26:46.000Z | 2022-03-31T00:32:37.000Z | node_modules/@coreui/icons/js/flag/cif-kh.js | yashn007/nodejs | d15b0a52a043172321b9abc6761fabf235832cca | [
"MIT"
] | 41 | 2020-07-21T23:11:07.000Z | 2022-01-30T23:58:12.000Z | node_modules/@coreui/icons/js/flag/cif-kh.js | yashn007/nodejs | d15b0a52a043172321b9abc6761fabf235832cca | [
"MIT"
] | 175 | 2018-05-11T22:01:22.000Z | 2022-03-27T16:49:12.000Z | export const cifKh = ["301 193","<g fill='none' fill-rule='evenodd'><path fill='#E00025' fill-rule='nonzero' d='M.5 48.5h300v96H.5z'/><path fill='#032EA1' fill-rule='nonzero' d='M.5.5h300v48H.5zM.5 144.5h300v48H.5z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M149.37 58.994s-.07-1.974 1.08-1.995c1.15.021 1.08 1.995 1.08 1.995h-2.16zM196.875 110.6v-9.849c.322-1.249 1.382-2.354 2.179-2.576v-9.237c-1.206 0-1.796 1.571-1.796 1.571l-2.05 9.03v10.985l1.667.076z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.485' d='M178.98 90.993h-2.957v6.266h2.957z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.45' d='M123.46 90.993h54.625v21.018H123.46V90.993z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M104.218 110.561v-9.81c-.322-1.25-1.382-2.355-2.18-2.577v-8.637l1.796.971 2.05 9.03v11.022h-1.666v.001z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M104.218 110.6v-9.849c-.322-1.249-1.382-2.354-2.18-2.576v-9.237c1.206 0 1.796 1.571 1.796 1.571l2.05 9.03v10.985l-1.666.076z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M102.094 113.115c.845-.43 1.809-1.432 2.124-2.553h92.676c.315 1.121 1.279 2.123 2.124 2.553h-96.924z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M175.262 102.596h1.722v7.918h-1.722z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.45' d='M123.461 98.686h54.624v2.443h-54.624zM123.461 95.374h54.624v2.155h-54.624z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.443' d='M123.461 92.066h54.624v2.09h-54.624z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.485' d='M178.98 90.993h-2.957v6.266h2.957z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M198.072 113.115c-.831-.375-2.04-1.4-2.04-2.433V98.42l.57-1.012H175.71l.815 1.012v12.263c0 1.032-.83 2.058-1.661 2.433h23.207z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M137.838 102.596h1.722v7.918h-1.722zM161.355 102.596h1.721v7.918h-1.721z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M164.234 113.115c-.973-.375-2.39-1.4-2.39-2.433V99.02l1.267-1.612h-25.332l1.214 1.612v11.663c0 1.032-.973 2.058-1.945 2.433h27.186z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M142.284 102.596h1.722v7.918h-1.722zM156.835 102.596h1.721v7.918h-1.721z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M137.326 84.134V97.408h25.93V94.55l.038-10.415c-1.061.417-1.247 1.378-1.247 1.378v5.653h-23.4v-5.653s-.261-.96-1.321-1.378z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M159.738 113.115c-.848-.375-2.694-1.4-2.694-2.433V97.63c.18-.729 1.169-1.159 1.805-1.612h-17.195c.818.433 1.73.793 2.057 1.612v13.052c0 1.032-1.46 2.058-2.307 2.433h18.334z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M162.045 96.157v-9.402h-2.357v-.916h-18.643v.916h-2.357v9.402z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M123.892 102.596h1.722v7.918h-1.722z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M102.94 113.115c.832-.375 2.04-1.4 2.04-2.433V98.42l-.57-1.012h20.89l-.814 1.012v12.263c0 1.032.83 2.058 1.66 2.433h-23.205z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M105.179 89.246h1.928v7.152h-1.928zM105.167 87.716h1.928v1.507h-1.928z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M121.93 113.115c-.831-.375-2.04-1.4-2.04-2.433V99.02l1.738-1.612h-14.202l1.737 1.612v11.663c0 1.032-1.21 2.058-2.04 2.433h14.807z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M119.94 113.115c-.83-.375-2.038-1.4-2.038-2.433V100.14l1.137-1.612h-9.023l1.137 1.612v10.543c0 1.032-1.21 2.058-2.04 2.433h10.828zM193.823 113.115c-.83-.375-2.04-1.4-2.04-2.433V99.02l1.738-1.612h-14.202l1.737 1.612v11.663c0 1.032-1.21 2.058-2.04 2.433h14.807z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M191.834 113.115c-.83-.375-2.04-1.4-2.04-2.433V100.14l1.138-1.612h-9.023l1.137 1.612v10.543c0 1.032-1.21 2.058-2.04 2.433h10.828zM112.37 98.526h4.312v14.59h-4.311v-14.59zM156.023 113.115c-.83-.375-2.04-1.4-2.04-2.433V99.54l.683-1.012h-8.491l.682 1.012v11.143c0 1.032-1.21 2.058-2.04 2.433h11.206z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.46' d='M148.268 98.53h4.303v14.581h-4.303z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M184.265 98.526h4.31v14.59h-4.31z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.45' d='M146.101 92.985h8.637v3.182h-8.637z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.45' d='M154.832 95.321c.01-.96 2.802-1.004 4.239-1.822h-17.257c1.437.818 4.164.885 4.164 1.822l.584 1.863 7.144.287 1.126-2.15z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M158.206 85.175c0-2.35.098-3.257.82-3.257v7.48c-1.771.642-3.035 2.903-3.035 2.903h-11.142s-1.264-2.26-3.036-2.903V81.92c.89 0 .896.947.896 3.257h15.497z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M145.015 86.567c1.435 1.723 1.302 4.646 1.286 6.37h8.325c-.016-1.723-.15-4.646 1.285-6.37h-10.896z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M106.506 102.596h1.722v7.918h-1.722zM193.962 89.246h1.929v7.152h-1.929z'/><path stroke='#000' stroke-width='.45' d='M102.094 113.115c.845-.43 1.809-1.432 2.124-2.553h92.676c.315 1.121 1.279 2.123 2.124 2.553h-96.924z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M121.265 102.596h1.722v7.918h-1.722z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M103.829 86.808v10.598h1.205V86.781c-.434-.219-.842-.252-1.205.027z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M103.866 93.666c1.494.764 2.974 1.648 3.348 3.74h-3.348v-3.74z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.485' d='M122.09 90.993h2.956v6.266h-2.956z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M124.587 90.491v6.915h.977v-6.932c-.305-.143-.722-.166-.977.017zM143.374 85.174v-2.657c-.038-1.329-1.324-1.425-1.362-2.394 0 0-.166-1.453.217-2.116.52 1.943 1.467 1.586 1.467.787 0-.697-.536-1.346-1.636-3.039-.352-.54-.134-2.236.359-2.843.19 1.474.409 2.18 1.043 2.18.386 0 .7-.253.7-.99 0-.94-.635-1.414-.948-2.269-.365-.997-.114-2.014.493-2.582.26 1.454.183 2.034.828 2.034 1.302-.412 0-2.298-.278-2.773-.32-.555.43-1.66.43-1.66.414 1.29.547 1.395.994 1.276.564-.15.49-.987-.197-1.663-.434-.426-.388-1.06.078-1.57.468.914 1.067.858 1.125.315l-.376-2.109h8.282l-.411 2.04c-.118.583.67.71 1.16-.248.466.51.512 1.145.078 1.571-.687.676-.76 1.512-.197 1.663.447.12.58.014.994-1.277 0 0 .673.754.43 1.661-.277.475-1.58 2.361-.277 2.773.646 0 .568-.58.828-2.034.606.568.857 1.585.493 2.582-.313.855-.95 1.33-.95 2.268 0 .738.316.99.702.99.633 0 .85-.705 1.042-2.179.493.606.71 2.302.359 2.843-1.1 1.693-1.636 2.342-1.636 3.04 0 .798.947 1.154 1.467-.788.383.663.217 2.116.217 2.116-.038.97-1.324 1.065-1.362 2.394v2.657h-14.156v.001z'/><path stroke='#000' stroke-width='.375' d='M146.41 65.631h8.222'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M149.694 66.826l-1.141-.587V64.56c.467.14.99.197 1.04.94.163-1.06.456-1.009.916-1.422.46.413.753.362.915 1.422.05-.743.575-.8 1.04-.94v1.68l-1.14.586h-1.63z'/><path stroke='#000' stroke-width='.375' d='M145.436 68.197h10.042'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M149.619 69.581l-1.894-1.302v-1.547c.664.153 1.41.216 1.482 1.031.23-1.163.648-1.764 1.303-2.217.655.453 1.072 1.054 1.303 2.217.073-.815.818-.878 1.482-1.03v1.546l-1.894 1.302h-1.782z'/><path stroke='#000' stroke-width='.375' d='M144.464 71.312h11.953'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M149.485 73.874l-2.178-1.913v-2.273c.764.226 1.62.318 1.705 1.515.266-1.709.745-2.592 1.499-3.258.753.666 1.232 1.55 1.499 3.258.083-1.197.94-1.289 1.704-1.515v2.273l-2.178 1.913h-2.051zM153.5 76.415l-1.97 2.725h-2.23l-1.97-2.725zM146.197 80.988c.985.54 1.349 1.611 1.454 3.625h5.544c.105-2.014.469-3.087 1.454-3.625h-8.452z'/><path stroke='#000' stroke-width='.375' d='M143.443 75.12h14.177M143.118 79.456h14.604'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.45' d='M154.732 76.415v-2.737c-.936.257-1.542.812-1.812 1.564 0-.909-1.196-3.004-2.5-4.046-1.307 1.167-2.523 3.062-2.498 4.046-.223-.716-.877-1.306-1.812-1.564v2.737h8.622z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.45' d='M155.146 80.988v-2.737c-1.026.258-1.69.812-1.987 1.564 0-.909-1.31-3.004-2.74-4.046-1.433 1.167-2.766 3.063-2.74 4.046-.244-.716-.961-1.306-1.987-1.564v2.737h9.454z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.45' d='M156.3 86.604v-3.157c-1.277.33-2.07 1.273-2.472 1.824 0-1.709-1.93-4.315-3.41-5.169-1.516.876-3.407 3.57-3.407 5.17-.412-.548-1.195-1.495-2.472-1.825v3.157h11.76z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linejoin='bevel' stroke-width='.45' d='M155.609 93.612v-3.246c-1.126.441-1.463 1.527-1.817 2.264.139-3.292-1.854-6.83-3.372-7.728-1.518.898-3.548 4.512-3.371 7.728-.364-.733-.691-1.823-1.818-2.264v3.246h10.378z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M193.974 87.716h1.928v1.507h-1.928zM178.052 102.596h1.721v7.918h-1.721zM192.81 102.596h1.722v7.918h-1.722z'/><path stroke='#000' stroke-width='.45' d='M138.688 93.612h23.357M146.102 93.615h8.657v3.182h-8.657z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M154.819 98.526V95.28c-1.18.281-1.253.716-1.628 1.443.139-1.966-1.254-4.209-2.771-5.107-1.518.898-2.911 3.141-2.772 5.107-.375-.727-.421-1.162-1.628-1.443v3.246h8.799zM125.564 93.666c-1.494.764-2.974 1.648-3.348 3.74h3.348v-3.74z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M105.034 89.246h2.073v8.116h-2.073zM105.034 87.716h2.06v1.507h-2.06v-1.507z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.485' d='M122.09 90.993h2.956v6.266h-2.956z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M107.078 97.3V83.406c.59 0 .683 2.036 2.039 2.036.706 0 .63-.843.235-1.53-.351-.608-.786-1.448-.196-3.014.405 1.198 1.494 1.578 1.293.827-.346-1.29-1.341-1.502-.594-3.505.259 1.671 1.33 1.597 1.07.626-.292-1.094-.898-1.543-.151-3.085.419 1.752.985 1.65.985.562 0-1.607-.062-3.339 2.017-3.982 0 0 .12-1.473.87-1.473s.87 1.473.87 1.473c2.079.643 2.017 2.376 2.017 3.982 0 1.087.567 1.19.985-.562.747 1.542.14 1.991-.152 3.085-.26.972.81 1.045 1.07-.626.748 2.003-.248 2.214-.593 3.505-.201.751.888.371 1.292-.827.59 1.565.156 2.405-.195 3.014-.397.687-.472 1.53.234 1.53 1.357 0 1.448-2.036 2.04-2.036V97.3h-15.136z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M115.687 77.46l.87-.732v-.937c-.318.031-.492.14-.727.45-.2-.622-.64-1.108-1.23-1.409-.59.301-1.03.764-1.23 1.385-.235-.308-.41-.396-.728-.427v.937l.87.732h2.175v.001z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M116.153 79.81l.405-.876v-1.218c-.32.031-.493.142-.728.455-.2-.63-.64-1.122-1.23-1.427-.59.305-1.03.775-1.23 1.405-.235-.313-.41-.4-.728-.433v1.218l.405.876h3.106z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M116.214 82.988l1.293-1.578v-1.556c-.473.053-.731.241-1.081.771-.297-1.067-.951-1.3-1.827-1.818-.876.517-1.53.713-1.827 1.78-.35-.53-.608-.68-1.081-.734v1.556l1.293 1.578h3.23v.001z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M116.593 86.115s1.507-1.315 1.597-2.037v-1.664c-.584.068-1.137.22-1.568.904-.367-1.378-.94-1.762-2.022-2.43-1.081.668-1.655 1.052-2.021 2.43-.431-.684-.984-.835-1.568-.904v1.664c.19.722 1.597 2.037 1.597 2.037h3.985z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M117.236 91.885s2.065-2.285 2.112-3.176v-2.595c-.773.107-1.503.638-2.074 1.704-.485-2.148-1.243-3.645-2.674-4.687-1.43 1.042-2.188 2.54-2.673 4.687-.571-1.066-1.302-1.597-2.074-1.704v2.595c.148.891 2.112 3.176 2.112 3.176h5.27z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M117.236 95.296S119 93.5 119.348 92.72v-2.595c-.773.107-1.503.638-2.074 1.705-.485-2.148-1.243-3.378-2.674-4.419-1.43 1.042-2.188 2.271-2.673 4.42-.571-1.067-1.302-1.599-2.074-1.706v2.595c.448.78 2.112 2.576 2.112 2.576h5.27z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M117.948 97.282c-.515-2.24-.958-3.902-3.438-5.588-2.48 1.685-2.923 3.347-3.438 5.588h6.876z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M119.225 98.526V95.28c-1.126.441-2.144 1.095-2.52 1.822-.42-1.802-1.227-2.596-2.234-3.686-1.006 1.09-1.68 1.884-2.1 3.686-.375-.727-1.393-1.38-2.52-1.822v3.246h9.374zM103.829 86.808v10.598h1.205V86.781c-.434-.219-.842-.252-1.205.027z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M103.866 93.666c1.494.764 2.974 1.648 3.348 3.74h-3.348v-3.74zM124.587 90.491v6.915h.977v-6.932c-.305-.143-.722-.166-.977.017z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M125.564 93.612c-1.494.764-2.974 1.648-3.348 3.74h3.348v-3.74zM197.24 86.808v10.598h-1.204V86.781c.434-.219.842-.252 1.205.027zM178.926 97.3V83.406c.59 0 .683 2.036 2.039 2.036.706 0 .63-.843.235-1.53-.351-.608-.786-1.448-.196-3.014.405 1.198 1.494 1.578 1.293.827-.346-1.29-1.341-1.502-.594-3.505.259 1.671 1.33 1.597 1.07.626-.292-1.094-.898-1.543-.151-3.085.419 1.752.985 1.65.985.562 0-1.607-.062-3.339 2.017-3.982 0 0 .12-1.473.87-1.473s.87 1.473.87 1.473c2.079.643 2.017 2.376 2.017 3.982 0 1.087.567 1.19.985-.562.747 1.542.142 1.991-.152 3.085-.26.972.81 1.045 1.07-.626.748 2.003-.248 2.214-.593 3.505-.201.751.888.371 1.292-.827.59 1.565.156 2.405-.195 3.014-.397.687-.472 1.53.235 1.53 1.357 0 1.448-2.036 2.039-2.036V97.3h-15.136z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M187.535 77.46l.87-.732v-.937c-.318.031-.491.14-.727.45-.2-.622-.64-1.108-1.23-1.409-.59.301-1.03.764-1.23 1.385-.235-.308-.41-.396-.728-.427v.937l.87.732h2.175v.001z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M188 79.81l.406-.876v-1.218c-.32.031-.492.142-.728.455-.2-.63-.64-1.122-1.23-1.427-.59.305-1.03.775-1.23 1.405-.235-.313-.41-.4-.728-.433v1.218l.405.876H188z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M188.063 82.988l1.293-1.578v-1.556c-.473.053-.731.241-1.081.771-.297-1.067-.951-1.3-1.827-1.818-.876.517-1.53.713-1.827 1.78-.35-.53-.608-.68-1.081-.734v1.556l1.293 1.578h3.23v.001z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M188.44 86.115s1.508-1.315 1.598-2.037v-1.664c-.584.068-1.137.22-1.568.904-.367-1.378-.94-1.762-2.022-2.43-1.082.668-1.655 1.052-2.022 2.43-.431-.684-.984-.835-1.568-.904v1.664c.19.722 1.597 2.037 1.597 2.037h3.986z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M189.084 91.885s2.065-2.285 2.112-3.176v-2.595c-.773.107-1.503.638-2.074 1.704-.486-2.148-1.244-3.645-2.674-4.687-1.43 1.042-2.188 2.54-2.674 4.687-.571-1.066-1.302-1.597-2.074-1.704v2.595c.148.891 2.112 3.176 2.112 3.176h5.272z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M189.084 95.296s1.765-1.796 2.112-2.576v-2.595c-.773.107-1.503.638-2.074 1.705-.486-2.148-1.244-3.378-2.674-4.419-1.43 1.042-2.188 2.271-2.674 4.42-.571-1.067-1.302-1.599-2.074-1.706v2.595c.448.78 2.112 2.576 2.112 2.576h5.272z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M189.796 97.282c-.515-2.24-.958-3.902-3.438-5.588-2.48 1.685-2.923 3.347-3.438 5.588h6.876zM197.203 93.666c-1.494.764-2.813 1.648-3.188 3.74h3.188v-3.74zM176.483 90.491v6.915h-.977v-6.932c.305-.143.72-.166.977.017z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M175.506 93.666c1.494.764 2.974 1.648 3.348 3.74h-3.348v-3.74z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M176.483 90.491v6.915h-.977v-6.932c.305-.143.72-.166.977.017z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M175.506 93.666c1.494.764 2.974 1.648 3.348 3.74h-3.348v-3.74zM159.027 84.211c0-2.697 2.328-3 2.328-3v2.4c-.886-.038-1.314.757-1.314 1.941 0 1.184.714 1.203.714 1.203v6.812h-1.73v-9.356h.002zM141.823 84.211c0-2.697-2.33-3-2.33-3v2.4c.887-.038 1.315.757 1.315 1.941 0 1.184-.714 1.203-.714 1.203v6.812h1.729v-9.356h0zM191.11 98.488v-3.246c-1.125.441-2.143 1.095-2.518 1.822-.42-1.802-1.228-2.596-2.234-3.686-1.006 1.09-1.68 1.884-2.1 3.686-.375-.727-1.393-1.38-2.52-1.822v3.246h9.373zM91.622 124.973h117.757v6.015H91.622z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M88.518 130.978h123.964v6.006H88.518zM97.806 115.976h105.389v3.892H97.805z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M94.724 119.842h111.552v5.098H94.724zM99.647 112.984h101.707v2.963H99.647z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.49' d='M110.686 113h7.682v23.968h-7.682z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.489' d='M112.387 113h4.28v23.968h-4.28z'/><path stroke='#000' stroke-width='.45' d='M112.309 115.957h4.437M112.309 118.957h4.437M112.309 121.957h4.437M112.309 124.957h4.437M112.309 127.957h4.437M112.309 130.957h4.437M112.309 133.957h4.437'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.49' d='M146.525 113h7.683v23.968h-7.682z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.489' d='M148.28 113h4.28v23.968h-4.28z'/><path stroke='#000' stroke-width='.45' d='M148.3 115.952h4.133M148.3 118.953h4.133M148.3 121.955h4.133M148.3 124.957h4.133M148.3 127.958h4.133M148.3 130.96h4.133M148.3 133.961h4.133'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.49' d='M182.579 113h7.683v23.968h-7.683z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.489' d='M184.28 113h4.28v23.968h-4.28z'/><path stroke='#000' stroke-width='.45' d='M184.202 115.957h4.437M184.202 118.957h4.437M184.202 121.957h4.437M184.202 124.957h4.437M184.202 127.957h4.437M184.202 130.957h4.437M184.202 133.957h4.437'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-linecap='square' stroke-linejoin='bevel' stroke-width='.45' d='M127.265 102.596h1.722v7.918h-1.722zM130.865 102.596h1.722v7.918h-1.722zM134.465 102.596h1.722v7.918h-1.722zM164.616 102.596h1.722v7.918h-1.722zM168.216 102.596h1.722v7.918h-1.722zM171.816 102.596h1.722v7.918h-1.722z'/><path fill='#FFF' fill-rule='nonzero' stroke='#000' stroke-width='.45' d='M146.84 63.084l-.191-1.5h7.602l-.19 1.5zM147.349 61.554l-.164-1.233h6.53l-.164 1.233zM148.386 60.275l-.11-1.233h4.349l-.11 1.233z'/></g>"] | 19,862 | 19,862 | 0.691673 |
c7ac3ec280a316a794bc094b316cee5bdaefdafc | 12,896 | py | Python | model-optimizer/mo/front/kaldi/loader/utils.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | null | null | null | model-optimizer/mo/front/kaldi/loader/utils.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | null | null | null | model-optimizer/mo/front/kaldi/loader/utils.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2018-2019 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import io
import numpy as np
import os
import struct
from mo.utils.error import Error
from mo.utils.utils import refer_to_faq_msg
end_of_nnet_tag = '</Nnet>'
end_of_component_tag = '<!EndOfComponent>'
supported_components = [
'addshift',
'affinecomponent',
'affinetransform',
'convolutional1dcomponent',
'convolutionalcomponent',
'copy',
'fixedaffinecomponent',
'lstmprojected',
'lstmprojectedstreams',
'maxpoolingcomponent',
'parallelcomponent',
'rescale',
'sigmoid',
'softmax',
'softmaxcomponent',
'splicecomponent',
'tanhcomponent',
'normalizecomponent',
'affinecomponentpreconditionedonline',
'rectifiedlinearcomponent',
'batchnormcomponent',
'naturalgradientaffinecomponent',
'logsoftmaxcomponent',
'naturalgradientperelementscalecomponent',
'sigmoidcomponent',
'tanhcomponent',
'elementwiseproductcomponent',
'clipgradientcomponent',
'noopcomponent',
'lstmnonlinearitycomponent',
'backproptruncationcomponent',
]
def get_bool(s: bytes) -> bool:
"""
Get bool value from bytes
:param s: bytes array contains bool value
:return: bool value from bytes array
"""
if str(s) == "b\'F\'":
return False
elif str(s) == "b\'T\'":
return True
else:
return struct.unpack('?', s)[0]
def get_uint16(s: bytes) -> int:
"""
Get unsigned int16 value from bytes
:param s: bytes array contains unsigned int16 value
:return: unsigned int16 value from bytes array
"""
return struct.unpack('H', s)[0]
def get_uint32(s: bytes) -> int:
"""
Get unsigned int32 value from bytes
:param s: bytes array contains unsigned int32 value
:return: unsigned int32 value from bytes array
"""
return struct.unpack('I', s)[0]
def get_uint64(s: bytes) -> int:
"""
Get unsigned int64 value from bytes
:param s: bytes array contains unsigned int64 value
:return: unsigned int64 value from bytes array
"""
return struct.unpack('q', s)[0]
def read_binary_bool_token(file_desc: io.BufferedReader) -> bool:
"""
Get next bool value from file
The carriage moves forward to 1 position.
:param file_desc: file descriptor
:return: next boolean value in file
"""
return get_bool(file_desc.read(1))
def read_binary_integer32_token(file_desc: io.BufferedReader) -> int:
"""
Get next int32 value from file
The carriage moves forward to 5 position.
:param file_desc: file descriptor
:return: next uint32 value in file
"""
buffer_size = file_desc.read(1)
return get_uint32(file_desc.read(buffer_size[0]))
def read_binary_integer64_token(file_desc: io.BufferedReader) -> int:
"""
Get next int64 value from file
The carriage moves forward to 9 position.
:param file_desc: file descriptor
:return: next uint64 value in file
"""
buffer_size = file_desc.read(1)
return get_uint64(file_desc.read(buffer_size[0]))
def read_binary_float_token(file_desc: io.BufferedReader) -> float:
"""
Get next float32 value from file
The carriage moves forward to 5 position.
:param file_desc: file descriptor
:return: next float32 value in file
"""
buffer_size = file_desc.read(1)
s = file_desc.read(buffer_size[0])
return np.fromstring(s, dtype=np.float32)[0]
def read_string(file_desc: io.BufferedReader) -> int:
return collect_until_whitespace(file_desc)
def find_next_tag(file_desc: io.BufferedReader) -> str:
"""
Get next tag in the file
:param file_desc:file descriptor
:return: string like '<sometag>'
"""
tag = b''
while True:
symbol = file_desc.read(1)
if symbol == b'':
raise Error('Unexpected end of Kaldi model')
if tag == b'' and symbol != b'<':
continue
elif symbol == b'<':
tag = b''
tag += symbol
if symbol != b'>':
continue
try:
return tag.decode('ascii')
except UnicodeDecodeError:
# Tag in Kaldi model always in ascii encoding
tag = b''
def read_placeholder(file_desc: io.BufferedReader, size=3) -> bytes:
"""
Read size bytes from file
:param file_desc:file descriptor
:param size:number of reading bytes
:return: bytes
"""
return file_desc.read(size)
def find_next_component(file_desc: io.BufferedReader) -> str:
"""
Read next component in the file.
All components are contained in supported_components
:param file_desc:file descriptor
:return: string like '<component>'
"""
while True:
tag = find_next_tag(file_desc)
# Tag is <NameOfTheLayer>. But we want get without '<' and '>'
component_name = tag[1:-1].lower()
if component_name in supported_components or tag == end_of_nnet_tag:
# There is whitespace after component's name
read_placeholder(file_desc, 1)
return component_name
elif tag == '<ComponentName>':
raise Error('Component has unsupported or not specified type')
def get_name_from_path(path: str) -> str:
"""
Get name from path to the file
:param path: path to the file
:return: name of the file
"""
return os.path.splitext(os.path.basename(path))[0]
def find_end_of_component(file_desc: io.BufferedReader, component: str, end_tags: tuple = ()):
"""
Find an index and a tag of the ent of the component
:param file_desc: file descriptor
:param component: component from supported_components
:param end_tags: specific end tags
:return: the index and the tag of the end of the component
"""
end_tags_of_component = ['</{}>'.format(component),
end_of_component_tag.lower(),
end_of_nnet_tag.lower(),
*end_tags,
*['<{}>'.format(component) for component in supported_components]]
next_tag = find_next_tag(file_desc)
while next_tag.lower() not in end_tags_of_component:
next_tag = find_next_tag(file_desc)
return next_tag, file_desc.tell()
def get_parameters(file_desc: io.BufferedReader, start_index: int, end_index: int):
"""
Get part of file
:param file_desc: file descriptor
:param start_index: Index of the start reading
:param end_index: Index of the end reading
:return: part of the file
"""
file_desc.seek(start_index)
buffer = file_desc.read(end_index - start_index)
return io.BytesIO(buffer)
def read_token_value(file_desc: io.BufferedReader, token: bytes = b'', value_type: type = np.uint32):
"""
Get value of the token.
Read next token (until whitespace) and check if next teg equals token
:param file_desc: file descriptor
:param token: token
:param value_type: type of the reading value
:return: value of the token
"""
getters = {
np.uint32: read_binary_integer32_token,
np.uint64: read_binary_integer64_token,
np.bool: read_binary_bool_token
}
current_token = collect_until_whitespace(file_desc)
if token != b'' and token != current_token:
raise Error('Can not load token {} from Kaldi model'.format(token) +
refer_to_faq_msg(94))
return getters[value_type](file_desc)
def collect_until_whitespace(file_desc: io.BufferedReader):
"""
Read from file until whitespace
:param file_desc: file descriptor
:return:
"""
res = b''
while True:
new_sym = file_desc.read(1)
if new_sym == b' ' or new_sym == b'':
break
res += new_sym
return res
def collect_until_token(file_desc: io.BufferedReader, token):
"""
Read from file until the token
:param file_desc: file descriptor
:param token: token that we find
:return:
"""
while True:
# usually there is the following structure <CellDim> DIM<ClipGradient> VALUEFM
res = collect_until_whitespace(file_desc)
if res == token or res[-len(token):] == token:
return
size = 0
if isinstance(file_desc, io.BytesIO):
size = len(file_desc.getbuffer())
elif isinstance(file_desc, io.BufferedReader):
size = os.fstat(file_desc.fileno()).st_size
if file_desc.tell() == size:
raise Error('End of the file. Token {} not found. {}'.format(token, file_desc.tell()))
def collect_until_token_and_read(file_desc: io.BufferedReader, token, value_type: type = np.uint32):
"""
Read from file until the token
:param file_desc: file descriptor
:param token: token to find and read
:param value_type: type of value to read
:return:
"""
getters = {
np.uint32: read_binary_integer32_token,
np.uint64: read_binary_integer64_token,
np.bool: read_binary_bool_token,
np.string_: read_string
}
collect_until_token(file_desc, token)
return getters[value_type](file_desc)
def create_edge_attrs(prev_layer_id: str, next_layer_id: str, in_port=0, out_port=0) -> dict:
"""
Create common edge's attributes
:param prev_layer_id: id of previous layer
:param next_layer_id: id of next layer
:param in_port: 'in' port
:param out_port: 'out' port
:return: dictionary contains common attributes for edge
"""
return {
'out': out_port,
'in': in_port,
'name': next_layer_id,
'fw_tensor_debug_info': [(prev_layer_id, next_layer_id)],
'in_attrs': ['in', 'name'],
'out_attrs': ['out', 'name'],
'data_attrs': ['fw_tensor_debug_info']
}
def read_blob(file_desc: io.BufferedReader, size: int, dtype=np.float32):
"""
Read blob from the file
:param file_desc: file descriptor
:param size: size of the blob
:param dtype: type of values of the blob
:return: np array contains blob
"""
dsizes = {
np.float32: 4,
np.int32: 4
}
data = file_desc.read(size * dsizes[dtype])
return np.fromstring(data, dtype=dtype)
def get_args_for_specifier(string):
"""
Parse arguments in brackets and return list of arguments
:param string: string in format (<arg1>, <arg2>, .., <argn>)
:return: list with arguments
"""
open_bracket = 1
pos = 1
args = []
prev_arg_pos = 1
while pos < len(string):
pos_open = string.find(b'(', pos)
pos_close = string.find(b')', pos)
pos_sep = string.find(b',', pos)
if pos_open == -1:
if open_bracket == 1:
args = args + string[prev_arg_pos:pos_close].replace(b' ', b'').split(b',')
pos = len(string)
else:
open_bracket = open_bracket - 1
while open_bracket > 1:
pos_close = string.find(b')', pos_close+1)
if pos_close != -1:
open_bracket = open_bracket - 1
else:
raise Error("Syntax error in model: incorrect number of brackets")
args.append(string[prev_arg_pos:pos_close+1].strip())
prev_arg_pos = string.find(b',', pos_close+1) + 1
if prev_arg_pos != 0 and string[prev_arg_pos:-2].replace(b' ', b'').split(b',') != [b'']:
args = args + string[prev_arg_pos:-2].replace(b' ', b'').split(b',')
pos = len(string)
else:
if pos_sep < pos_open and open_bracket == 1:
pos_sep = string[pos_sep:pos_open].rfind(b',') + pos_sep
args = args + string[prev_arg_pos:pos_sep].replace(b' ', b'').split(b',')
prev_arg_pos = pos_sep + 1
if pos_open < pos_close:
open_bracket = open_bracket + 1
pos = pos_open + 1
else:
open_bracket = open_bracket - 1
if open_bracket == 1:
args.append(string[prev_arg_pos:pos_close + 1].strip())
prev_arg_pos = string.find(b',', pos_close+1) + 1
pos = prev_arg_pos
else:
pos = pos_close + 1
return args
| 31.530562 | 105 | 0.629498 |
21de125317e660792cab16e45b4d029d46f3929b | 36,490 | html | HTML | datafiles/CaseAnalysis/2014/2014_S_480.html | athityakumar/harvey | 3102656e4adeb939217e9eb5b85e002a2fc84136 | [
"MIT"
] | 2 | 2019-02-08T22:24:41.000Z | 2022-02-16T11:59:52.000Z | datafiles/CaseAnalysis/2014/2014_S_480.html | athityakumar/harvey | 3102656e4adeb939217e9eb5b85e002a2fc84136 | [
"MIT"
] | 11 | 2019-02-05T11:53:05.000Z | 2019-03-05T15:57:19.000Z | datafiles/CaseAnalysis/2014/2014_S_480.html | athityakumar/harvey | 3102656e4adeb939217e9eb5b85e002a2fc84136 | [
"MIT"
] | 3 | 2019-03-02T15:09:35.000Z | 2022-01-25T07:01:03.000Z | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" class="pinned"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Bal Kishan Giri v State of Uttar Pradesh | Westlaw India</title><!--
Copyright 2010 Thomson Reuters Global Resources AG. All Rights Reserved.
Proprietary and Confidential information of TRGR.
Disclosure, Use or Reproduction without the written authorization of TRGR is prohibited.
--><meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /><meta content="en-gb" http-equiv="Content-Language" /><link type="image/x-icon" rel="shortcut icon" href="/wlin/favicon.ico" /><link type="text/css" rel="stylesheet" href="/wlin/css/base.css?14-3-11" /><link type="text/css" rel="stylesheet" href="/wlin/css/token-input-india.css?14-3-11" /><link type="text/css" rel="stylesheet" href="/wlin/css/minimal.css?14-3-11" /><link type="text/css" rel="stylesheet" href="/wlin/css/jquery.selectBox.css?14-3-11" /><link type="text/css" rel="stylesheet" href="/wlin/css/jquery-ui.css?14-3-11" /><style media="screen, print" type="text/css">
@import "/wlin/css/advanced.css?14-3-11";
</style>
<!--[if lte IE 6]>
<link href="/wlin/css/ie.css?14-3-11" type="text/css" rel="stylesheet"><script type="text/javascript">
try {document.execCommand("BackgroundImageCache", false, true);}
catch(e) {}
</script>
<![endif]-->
<!--[if IE 7]>
<link href="/wlin/css/ie7.css?14-3-11" type="text/css" rel="stylesheet">
<![endif]-->
<!--[if IE 8]>
<link href="/wlin/css/ie8.css?14-3-11" type="text/css" rel="stylesheet">
<![endif]-->
<script type="text/javascript" src="/wlin/js/jquery.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jquery.dimensions.pack.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jquery.cookie.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jquery.dimensions.pack.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/rspace/jqueryui.js">//</script><script type="text/javascript" src="/wlin/js/jsTree/jquery.jstree.js">//</script><script type="text/javascript" src="/wlin/js/jqueryforms/jquery.forms.js">//</script><script type="text/javascript" src="/wlin/js/blockUI/jquery.blockUI.js">//</script><script type="text/javascript" src="/wlin/js/jquerycookie/jquery.cookie.js">//</script><script type="text/javascript" src="/wlin/js/jquery.scrollTo/jquery.scrollTo-min.1.4.2.js">//</script><link type="text/css" rel="stylesheet" href="/wlin/css/jqueryui/jquery-ui.css" /><link href="/wlin/css/rspace/rspace.css" type="text/css" rel="stylesheet" /><link href="/wlin/css/rspace/rspace.growl.css" type="text/css" rel="stylesheet" /><script type="text/javascript" src="/wlin/js/jquery-ui.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jquery.icheck.min.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jquery.selectBox.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jqmodal.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/classes/UpdateNoteProcessor-bk.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/classes/InlineImageProcessor.js?14-3-11">//</script><script type="text/javascript">
var brand="wlin";
var iip = new InlineImageProcessor("TABULAR OR GRAPHIC MATERIAL SET FORTH AT THIS POINT IS NOT DISPLAYABLE");
$(window).load(iip.init);
jQuery.curCSS = jQuery.css;
</script>
<!--[if IE 7]>
<script type="text/javascript" src="/wlin/js/ie7.js?14-3-11">//</script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="/wlin/css/document.css?14-3-11" /><link type="text/css" rel="stylesheet" href="/wlin/css/document-plus.css?14-3-11" /><script type="text/javascript" src="/wlin/js/general.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jquery.icheck.min.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/timeout.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jquery.timers-1.2.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/jquery.selectBox.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/classes/FootnoteViewer.js?14-3-11">//</script><script type="text/javascript" src="/wlin/js/classes/InlineDocLoader.js?14-3-11">//</script><link type="text/css" rel="stylesheet" href="/wlin/css/jqueryui/jquery-ui.css" /><!--[if lte IE 7]><link type="text/css" rel="stylesheet" href="/wlin/css/rspace/ie67.css"><![endif]--><script type="text/javascript" src="/wlin/js/maf.js">//</script><script type="text/javascript" src="/maf/wlin/app/folders/scripts/rspace_params_constants.js?no-context=true">//</script><script type="text/javascript" src="/wlin/js/rspace/btree.js">//</script><script type="text/javascript" src="/wlin/js/rspace/rspace.growl.js">//</script><script type="text/javascript" src="/wlin/js/rspace/rspace.js">//</script><script type="text/javascript" src="/wlin/js/rspace/rspace_init.js">//</script><script type="text/javascript" src="/wlin/js/rspace/search_results.js">//</script><script type="text/javascript" src="/wlin/js/lazyload-min.js">//</script><script type="text/javascript" src="/wlin/js/rspace/doc_view.js">//</script><script type="text/javascript">
var isRSActions = true;
</script><script type="text/javascript" src="/wlin/js/rspace/doc_view_init.js">//</script><script type="text/javascript" src="/wlin/js/document.js?14-3-11">//</script>
<!--[if IE 7]>
<script type="text/javascript" src="/wlin/js/ie7.js?14-3-11">//</script>
<![endif]-->
<style type="text/css">.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } .jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; } .jstree-rtl li { margin-left:0; margin-right:18px; } .jstree > ul > li { margin-left:0px; } .jstree-rtl > ul > li { margin-right:0px; } .jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } .jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } .jstree a:focus { outline: none; } .jstree a > ins { height:16px; width:16px; } .jstree a > .jstree-icon { margin-right:3px; } .jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } li.jstree-open > ul { display:block; } li.jstree-closed > ul { display:none; } </style><style type="text/css">#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } </style><style type="text/css">#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; } #vakata-dragged .jstree-ok { background:green; } #vakata-dragged .jstree-invalid { background:red; } #jstree-marker { padding:0; margin:0; line-height:12px; font-size:1px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:silver; } </style><style type="text/css">#vakata-contextmenu { display:none; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } #vakata-contextmenu ul { min-width:180px; *width:180px; } #vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } #vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } #vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } #vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } #vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } #vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } #vakata-contextmenu .right { right:100%; left:auto; } #vakata-contextmenu .bottom { bottom:-1px; top:auto; } #vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } </style><style type="text/css">.jstree .ui-icon { overflow:visible; } .jstree a { padding:0 2px; }</style></head><body class="pinned"><script type="text/javascript">
if(wluk.doc!=null){
wluk.doc.setPinState();
}
</script><div class="hide"><a accesskey="s" href="#container" title="Skip Navigation">Skip Navigation</a></div><div id="mainNav"><p class="bold">Let us know what you think about the new Westlaw India. <a href="mailto:feedback@westlawindia.com">Site Feedback</a></p><div id="globNav"><ul id="navLinksAthens"><li id="navWli"><a href="/maf/wlin/api/sourceLink/signon" class="externalLink" title="International Materials - This link will open in a new window">International Materials</a></li><li id="navTools"><a class="navMenuLink" id="toolsLink" href="/maf/wlin/app/preferences?crumb-action=reset&crumb-label=Services,%20Settings%20%26%20Tools">Settings & Tools</a><ul class="navMenu" id="toolsMenu" style="display: none;"><li><a href="/maf/wlin/app/authentication/clientid/change?crumb-action=reset&crumb-label=Change%20Client%20ID&linktype=menuitem&context=11067">Change Client ID</a></li><li><a href="/maf/wlin/app/preferences/change?crumb-action=reset&crumb-label=Options%20%26%20Preferences&linktype=menuitem&context=11067">Options</a></li></ul></li><li id="navHelp"><a href="/maf/wlin/app/help?docguid=I0ade985e000001259243de65c2f671e0&crumb-label=Westlaw%20India%20Help&crumb-action=reset&linktype=menuitem&context=11067" accesskey="h" title="Help | access key: h">Help</a></li><li class="lastLink" id="navSignoff"><a id="signoffLink" href="/maf/wlin/app/authentication/signoff?" accesskey="l" title="Log Out | access key: l">Log Out</a></li></ul></div><ul class="wlin" id="serviceTabs"><li><a href="/maf/wlin/app/tocectory?sttype=stdtemplate&stnew=true" accesskey="1" title="Home | access key: 1" id="tabHome">Home</a></li><li><a href="/maf/wlin/app/tocectory?sttype=stdtemplate&stnew=true&ao=o.IC0236E00251211DE8352005056C00008&ndd=1&linktype=tab&context=11067" accesskey="2" title="Cases | access key: 2" id="tabCases" class="selected">Cases</a></li><li><a href="/maf/wlin/app/tocectory?sttype=stdtemplate&stnew=true&ao=o.IC057C470251211DE80C6005056C00008&ndd=2&linktype=tab&context=11067" accesskey="3" title="Legislation | access key: 3" id="tabLegislation">Legislation</a></li><li><a href="/maf/wlin/app/tocectory?sttype=stdtemplate&stnew=true&ao=o.IF5851F70BC5111E0BDDCF06BF48BF15F&ndd=2&linktype=tab&context=11067" accesskey="4" title="Journals | access key: 4" id="tabJournals">Journals</a></li><li><a href="/maf/wlin/app/tocectory?sttype=stdtemplate&stnew=true&ao=o.I6E0509FF62C94CA89C4072C7C69A53E0&ndd=2&linktype=tab&context=11067" accesskey="5" title="Forms & Reports | access key: 5" id="tabFR">Forms & Reports</a></li><li><a href="/maf/wlin/app/tocectory?sttype=stdtemplate&stnew=true&ao=o.IC0E35E01251211DE8352005056C00008&ndd=2&linktype=tab&context=11067" accesskey="6" title="Current Awareness | access key: 6" id="tabCA">Current Awareness</a></li><li><a href="/maf/wlin/app/tocectory?sttype=stdtemplate&stnew=true&ao=o.I591A72C0609611DEB19400123FC97614&ndd=2&linktype=tab&context=11067" accesskey="7" title="UK Materials | access key: 7" id="tabUKMaterials">UK Materials</a></li><li><a href="/maf/wlin/app/tocectory?sttype=stdtemplate&stnew=true&ao=o.ICBD2DB1CD4F04329BB3D6FED02A00000&ndd=2&linktype=tab&context=11067" accesskey="8" title="EU Materials | access key: 8" id="tabEUMaterials">EU Materials</a></li></ul></div><div id="container"><div id="sectionTitleSplit"><h1>Cases</h1><ul id="docDeliveryLinks"><li></li><li><a rel="print" class="deliveryLink" href="/maf/wlin/app/delivery/document?docguid=I3C8AFD10EAEC11E399308D816F613A1D&srguid=&crumb-action=append&crumb-label=Delivery Options&context=11067&altview=&title=&title=&deliveryTarget=print"><img title="Print" alt="print icon" src="/wlin/images/iconPrint.gif" /></a> <a title="Print" rel="print" class="deliveryLink" href="/maf/wlin/app/delivery/document?docguid=I3C8AFD10EAEC11E399308D816F613A1D&srguid=&crumb-action=append&crumb-label=Delivery Options&context=11067&altview=&title=&deliveryTarget=print">Print</a></li><li><a rel="save" class="deliveryLink" href="/maf/wlin/app/delivery/document?docguid=I3C8AFD10EAEC11E399308D816F613A1D&srguid=&crumb-action=append&crumb-label=Delivery Options&context=11067&altview=&deliveryTarget=save&deliveryFormat="><img title="Save" alt="save icon" src="/wlin/images/iconSave.gif" /></a> <a title="Save" rel="save" class="deliveryLink" href="/maf/wlin/app/delivery/document?docguid=I3C8AFD10EAEC11E399308D816F613A1D&srguid=&crumb-action=append&crumb-label=Delivery Options&context=11067&altview=&deliveryTarget=save&deliveryFormat=">Save</a></li><li><a rel="email" class="deliveryLink" href="/maf/wlin/app/delivery/document?docguid=I3C8AFD10EAEC11E399308D816F613A1D&srguid=&crumb-action=append&crumb-label=Delivery Options&context=11067&altview=&deliveryTarget=email&deliveryFormat="><img title="E-mail" alt="email icon" src="/wlin/images/iconEmail.gif" /></a> <a title="E-mail" rel="email" class="deliveryLink" href="/maf/wlin/app/delivery/document?docguid=I3C8AFD10EAEC11E399308D816F613A1D&srguid=&crumb-action=append&crumb-label=Delivery Options&context=11067&altview=&deliveryTarget=email&deliveryFormat=">E-mail</a></li></ul></div><script type="text/javascript">
var facetsCrumbPost = {};
</script><p id="crumbNav"><a href="/maf/wlin/api/tocectory?tocguid=IBFFAD760251211DEB932005056C00008&ndd=2&stnew=true&context=1">Home</a>
>
<a href="/maf/wlin/api/tocectory?tocguid=IC0236E00251211DE8352005056C00008&ndd=1&sttype=stdtemplate&stnew=true&context=2">Cases</a>
>
<a href="/maf/wlin/api/tocectory?tocguid=I6FDFDCD04A2D11DF96C1A49DA6EE4E28&ndd=2&sttype=stdtemplate&context=3">Supreme Court Judgments</a>
>
<a href="/maf/wlin/api/tocectory?tocguid=IBCEA94E04A3011DF96C1A49DA6EE4E28&ndd=2&sttype=stdtemplate&context=4">Full Text Judgments</a>
>
<a href="/maf/wlin/api/tocectory?tocguid=I682A4690789811E3981EBF2E1B4F2360&ndd=1&sttype=stdtemplate&context=7157">By Year: 2014</a>
>
<a href="/maf/wlin/api/tocectory?tocguid=IE3FCBB41789811E3981EBF2E1B4F2360&ndd=1&sttype=stdtemplate&context=11066">S</a>
>
<span class="currentCrumb">Document</span></p></div><div id="docContainer"><div class="growlContainer" style="display: none;"><div class="growl success"><span class="growlContent">Success!</span></div></div><div id="relInfoWrapper"><div id="docRelatedInfo" style="height: 525px;"><h1>Documents on Westlaw India</h1><p><a href="/maf/wlin/app/document?&src=ri&docguid=I3C8AFD11EAEC11E399308D816F613A1D&refer=%2Fmaf%2Fwlin%2Fapp%2Fdocument%3Fcrumb-action%3Dappend%26docguid%3DI3C8AFD10EAEC11E399308D816F613A1D%26src%3Dtoce%26context%3D11066&crumb-action=append&context=11067" class="">2014 Indlaw SC 372</a></p><p title="Document Currently Selected" class="selected">Case Analysis</p><p class="subSelected"><a href="#bench">Bench</a></p><p class="subSelected"><a href="#wherereported">Where Reported</a></p><p class="subSelected"><a href="#casedigest">Case Digest</a></p><p class="subSelected"><a href="#history">Appellate History</a></p><p class="subSelected"><a href="#casescited">All Cases Cited</a></p><p class="subSelected"><a href="#casesciting">Cases Citing this Case</a></p><p class="subSelected"><a href="#legiscited">Legislation Cited</a></p></div><div id="recDoc" style="left: 270px; top: 215px; display: none;"><h2>Recent Documents</h2><ol><li class="recDocCases">Anil Kumar v State of Uttar Pradesh - <a href="/maf/wlin/app/document?src=toce&docguid=I3C8B4B31EAEC11E399308D816F613A1D&crumb-action=append&context=11061">2014 Indlaw SC 373</a></li><li class="recDocCases">Anil Kumar v State of Uttar Pradesh - <a href="/maf/wlin/app/document?src=toce&docguid=I3C8B4B30EAEC11E399308D816F613A1D&crumb-action=append&context=11056">Case Analysis</a></li><li class="recDocCases">Amar Singh Yadav v State of Uttar Pradesh - <a href="/maf/wlin/app/document?src=toce&docguid=I1FA0706101C911E49AE8AB19021BECC8&crumb-action=append&context=11051">2014 Indlaw SC 400</a></li><li class="recDocCases">Amar Singh Yadav v State of Uttar Pradesh - <a href="/maf/wlin/app/document?src=toce&docguid=I1FA0706001C911E49AE8AB19021BECC8&crumb-action=append&context=11046">Case Analysis</a></li><li class="recDocCases">State of Uttar Pradesh v Narendra and others - <a href="/maf/wlin/app/document?src=toce&docguid=I75D06D50433C11E480F0FAAFD38AA980&crumb-action=append&context=11041">2014 Indlaw SC 639</a></li><li class="recDocCases">State of Uttar Pradesh v Narendra and others - <a href="/maf/wlin/app/document?src=toce&docguid=I75CE9890433C11E480F0FAAFD38AA980&crumb-action=append&context=11036">Case Analysis</a></li><li class="recDocCases">State of Uttar Pradesh v Arvind Kumar Srivastava and others - <a href="/maf/wlin/app/document?src=toce&docguid=I74069CF1583C11E4B22AEAF8B0B81063&crumb-action=append&context=11031">2014 Indlaw SC 721</a></li><li class="recDocCases">State of Uttar Pradesh v Arvind Kumar Srivastava and others - <a href="/maf/wlin/app/document?src=toce&docguid=I74069CF0583C11E4B22AEAF8B0B81063&crumb-action=append&context=11026">Case Analysis</a></li><li class="recDocCases">Usha Bharti v State of Uttar Pradesh and others - <a href="/maf/wlin/app/document?src=toce&docguid=I4139C730BA5C11E399C0FB4367AA6621&crumb-action=append&context=11021">2014 Indlaw SC 198</a></li><li class="recDocCases">Usha Bharti v State of Uttar Pradesh and others - <a href="/maf/wlin/app/document?src=toce&docguid=I413867A0BA5C11E399C0FB4367AA6621&crumb-action=append&context=11016">Case Analysis</a></li><li class="recDocCases">Sobran Singh v State of Uttar Pradesh and others - <a href="/maf/wlin/app/document?src=toce&docguid=I85BAFB209A3711E4B04BBACB73F3D30D&crumb-action=append&context=11011">2014 Indlaw SC 911</a></li></ol></div></div><div id="docHeader"><p id="docNavigation"><span title="Pin" class="on rspaceBarWrap" id="viewLinks"> <span id="fontSizeControls"><span id="fontUp"><img src="/maf/static/images/document/fontUp.png" title="Increase Font Size" /></span><span id="fontDown"><img src="/maf/static/images/document/fontDown.png" title="Reduce Font Size" /></span></span><span class="groupInner"><strong id="pinType">Scroll: </strong><span id="docPin" title="Scroll document text only (fixed navigation)">Document</span><span id="pinSeperator"><span class="inner"> | </span></span><span id="pagePin" title="Scroll entire page" class="active">Page</span></span></span><span id="recDocLink"><!----><a href="#"><img id="recDocIcon" src="/wlin/images/document/recDocOpen.gif" alt="recent documents icon" title="Recent Documents" /></a></span> </p></div><div id="docBody" style="height: 505px;"><p><strong>FOR EDUCATIONAL USE ONLY</strong></p><div class="docContent" style="font-size: 12.8px;"><h1 class="center">Bal Kishan Giri v State of Uttar Pradesh</h1><p class="center">Supreme Court of India</p><p class="center">28 May 2014</p><h2 class="center">Case Analysis</h2><div class="locatorSection"><h3 id="bench">Bench</h3><p>Balbir Singh Chauhan, A.K. Sikri</p></div><div class="locatorSection"><h3 id="wherereported">Where Reported</h3><p>2014 Indlaw SC 372; (2014) 7 SCC 280; 2014 ALL MR (Cri) 2595; 2014 (105) ALR 689; 2014 CRLJ 3072; JT 2014 (8) SC 199; 2014 (3) RCR(Criminal) 224; 2014 (125) RD 109; 2014(7) SCALE 489B; [2014] 6 S.C.R. 545</p></div><div class="locatorSection"><h3 id="casedigest">Case Digest</h3><p><strong>Subject:</strong> Criminal; Practice & Procedure</p><p><strong>Keywords:</strong> Allahabad High Court Rules, 1952</p><p><strong>Summary:</strong> Criminal - Practice & Procedure - Contempt of Courts Act, 1971 - Contempt of Court - Conviction - Sustainability - During the pendency of applications in a criminal case appellant submitted an application to the Chief Justice of HC alleging that accused in the criminal case were gangsters and had accumulated assets worth crores of rupees by their criminal activities - Appellant alleged and expressed his apprehension that Mr. Justice S.K. Jain would favour accused persons to get bail - HC issued a show cause notice to appellant - After trial HC convicted appellant - Hence instant appeal - Whether HC erred in convicting appellant under the provisions of the Act -</p><p>Held, allegations made by appellant against the 3 judges of the HC were too serious, scandalous and, admittedly, sufficient to undermine the majesty of law and dignity of court and that was too without any basis - Appellant was a practicing advocate - Plea taken by him that he had been misguided by other advocates was an afterthought - Appellant should have been fully aware of the consequences of what he has written - Appellant tendered an absolute and unconditional apology which was not accepted by HC - Apology means a regretful acknowledge or excuse for failure - An explanation offered to a person affected by one's action that no offence was intended, coupled with the expression of regret for any that may have been given - Apology should be unquestionable in sincerity - It should be tempered with a sense of genuine remorse and repentance, and not a calculated strategy to avoid punishment - Judicial process was based on probity, fairness and impartiality which was unimpeachable - Such an act especially by members of Bar who are another cog in the wheel of justice was highly reprehensible and deeply regretted - Absence of motivation was no excuse - HC has not committed any error in not accepting appellant's apology since the same was not bona fide - There might have been an inner impulse of outburst as appellant alleged that his nephew was murdered, but that was no excuse for a practicing lawyer to raise fingers against the court - Appeal dismissed.</p></div><div class="locatorSection"><h3 id="history">Appellate History</h3><p>Allahabad High Court<br /><strong>Anil Kumar S/o Rajpal Singh and another</strong><br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I8E928EB074E011DF8CA89C2775A563E6">2010 Indlaw ALL 908</a></p><p>Supreme Court of India<br /><strong>Bal Kishan Giri v State of Uttar Pradesh</strong><br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I3C8AFD10EAEC11E399308D816F613A1D">2014 Indlaw SC 372, (2014) 7 SCC 280, 2014 ALL MR (Cri) 2595, 2014 (105) ALR 689, 2014 CRLJ 3072, JT 2014 (8) SC 199, 2014 (3) RCR(Criminal) 224, 2014 (125) RD 109, 2014(7) SCALE 489B, [2014] 6 S.C.R. 545</a></p></div><div class="locatorSection"><h3 id="casescited">All Cases Cited</h3><p><strong>Referred</strong></p><p>T. C. Gupta and another v Hari Om Prakash and others<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I273D16E0317011E38BFCC4EE5A73101C">2013 Indlaw SC 677, (2013) 10 SCC 658, 2013 (101) ALR 730, 2013 (6) AWC 5613, 2013 (4) CLT(SC) 206, 2013 (4) Law Herald (P&H) 3470, 2013 (7) MLJ 402, 2014 (1) RCR(Criminal) 164, 2014 (122) RD 470, 2013(12) SCALE 616, [2013] 10 S.C.R. 247</a></p><p>Arun Kumar Yadav v State of Uttar Pradesh Through District Judge<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=IAD4C1DC0D1C711E2B008CBE4E91BAD8A">2013 Indlaw SCO 1130, (2013) 14 SCC 127, 2013 ALL MR (Cri) 2969, 2013 (99) ALR 517, 2013 (3) CTC 907, JT 2013 (9) SC 556, 2013 (3) RCR(Civil) 390, 2013(7) SCALE 542, [2013] 6 S.C.R. 263</a></p><p>H.G. Rangangoud v M/S.State Trading Corporation Of India Limited & Ors.<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I469A7600474C11E1AE58BF9AD4A7266D">2011 Indlaw SC 772, (2012) 1 SCC 297, AIR 2012 SC 490, 2011 ALL MR (Cri) 3927, 2012 CRLJ 828, 2012 (1) JCC 308, 2012 (5) KarLJ 160, 2011 (4) RCR(Criminal) 862, [2011] 13 S.C.R. 97, 2012 (1) UPLBEC 24</a></p><p>Maninderjit Singh Bitta v Union Of India & Ors<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I67622FE00C5F11E1B10DDB0F66F0F9D8">2011 Indlaw SCO 764, (2012) 1 SCC 273, 2012 (3) ALD(SC) 11, 2011 (4) CLT(SC) 156, 2012 (3) MahLJ 23, 2012 (2) MPLJ 298, 2011 (4) WLN(SC) 70</a></p><p>Vishram Singh Raghubanshi v State Of U.P.<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I36EC862298E811E0A38FE8FBD173D359">2011 Indlaw SC 386, (2011) 7 SCC 776, AIR 2011 SC 2275, 2011 ALL MR (Cri) 2328, JT 2011 (6) SC 629, 2012 (1) MLJ(Crl) 419, 2011 (3) RCR(Criminal) 716, 2011(6) SCALE 534, [2011] 8 S.C.R. 105</a></p><p>Ranveer Yadav v State of Bihar<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I8BE932005FD611DF83849778A0ECC020">2010 Indlaw SC 381, (2010) 11 SCC 493, 2010 (4) ADJ 741, 2010 ALL MR (Cri) 1957, 2010 CRLJ 3431, 2010 (4) CTC 103, 2010 (3) JhrCR(SC) 133, JT 2010 (5) SC 335, 2010 (4) MLJ(Crl) 661, 2010 (3) RCR(Criminal) 213, 2010(5) SCALE 765, [2010] 6 S.C.R. 1073</a></p><p>C. Elumalai & Ors. v A.G.L. Irudayaraj & Anr.<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I33D2F4B2006E11DFBEF1C9F02835E615">2009 Indlaw SC 351, (2009) 4 SCC 213, AIR 2009 SC 2214, 2009 (3) ALD(SC) 40, 2009 (2) CTC 650, JT 2009 (4) SC 241, 2009 (4) MLJ(SC) 292, 2009 (2) RCR(Criminal) 586, [2009] 4 S.C.R. 774</a></p><p>Patel Rajnikant Dhulabhai and Another v Patel Chandrakant Dhulabhai and Others<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I07B8D341006E11DFBEF1C9F02835E615">2008 Indlaw SC 1168, (2008) 14 SCC 561, AIR 2008 SC 3016, 2008(5) ALL MR 409, 2008 (5) AWC 5116, 2008 CRLJ 3891, 2009 (1) G.L.R. 454, JT 2008 (8) SC 364, 2008 (7) MLJ(SC) 376, 2008 (3) RCR(Civil) 819, 2008 (3) RCR(Criminal) 808, 2008(10) SCALE 349, [2008] 10 S.C.R. 1169</a></p><p>T. N. Godavarman Thirumulpad v Ashok Khot and Another<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I7DCB9220006E11DFBEF1C9F02835E615">2006 Indlaw SC 209, (2006) 5 SCC 1, AIR 2006 SC 2007, 2006 (6) Bom.C.R. 877, 2006 CRLJ 2773, 2006 (4) JhrCR(SC) 57, JT 2006 (5) SC 492, 2006 (3) MLJ(SC) 170, 2006 (3) RCR(Civil) 34, 2006 (3) RCR(Criminal) 110, 2006(5) SCALE 361, 2006 (5) SCJ 662, 2006 (5) SCJ 677, [2006] Supp2 S.C.R. 215</a></p><p>The Secretary,Hailakandi Bar Association v State Of Assam And Another<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I2A87A721006E11DFBEF1C9F02835E615">1996 Indlaw SC 2962, (1996) 9 SCC 74, (1996) SCC (Cr) 921, 1996 (4) AD(SC) 322, AIR 1996 SC 1925, 1996 (2) CCR 185, 1996 CRLJ 2518, JT 1996 (5) SC 88, 1996(4) SCALE 290, 1996 (3) SCJ 153, [1996] Supp2 S.C.R. 573, 1996 (4) Supreme 130</a></p><p>Sanjiv Datta, Deputy Secretary, Ministry of Information and Broadcasting, New Delhi and Others(In Re) v Na<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I11800791006E11DFBEF1C9F02835E615">1995 Indlaw SC 1029, (1995) 3 SCC 619, AIR 1995 SCW 2203, 1995 CRLJ 2910, JT 1995 (3) SC 538, 1995(2) SCALE 704, 1995 (2) SCJ 707, [1995] 3 S.C.R. 450, 1995 (2) UJ 786</a></p><p>Mohd. Zahir Khan v Vijai Singh and Others<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I6C9682D1006E11DFBEF1C9F02835E615">1991 Indlaw SC 73, (1992) Supp2 SCC 72, (1992) SCC (Cr) 526, AIR 1992 SC 642, 1992 CRLJ 610</a></p><p>M. B. Sanghi, Advocate v High Court of Punjab and Haryana and Others<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I07B94871006E11DFBEF1C9F02835E615">1991 Indlaw SC 53, (1991) 3 SCC 600, (1991) SCC (Cr) 897, AIR 1991 SC 1834, 1992 (1) CCR 394, 1991 CRLJ 2648, 1991 CrLR(SC) 635, JT 1991 (3) SC 318, 1991(2) SCALE 228, [1991] 3 S.C.R. 312</a></p><p>L.D. Jaikwal v State Of U.P.<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I07B94872006E11DFBEF1C9F02835E615">1984 Indlaw SC 155, (1984) 3 SCC 405, (1984) SCC (Cr) 421, AIR 1984 SC 1374, 1984 CRLJ 993, 1984 CrLR(SC) 277, 1984(1) SCALE 862, [1984] 3 S.C.R. 833</a></p><p>Asharam M. Jain v A. T. Gupta And Others<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I3E10DFA2006E11DFBEF1C9F02835E615">1983 Indlaw SC 129, (1983) 4 SCC 125, (1983) SCC (Cr) 771, AIR 1983 SC 1151, 1984 (1) Crimes 143, 1983 CRLJ 1499, 1983 CrLR(SC) 659, 1983(2) SCALE 138, [1983] 3 S.C.R. 719, 1983 UJ 830</a></p><p>In Re: Shri S. Mulgaokar v Na<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I01C8BEA1006E11DFBEF1C9F02835E615">1978 Indlaw SC 323, (1978) 3 SCC 339, (1978) SCC (Cr) 402, AIR 1978 SC 727, 1978 MLJ 593, [1978] 3 S.C.R. 162</a></p><p>Bar Council Of Maharashtra v M. V. Dabholkar Etc. Etc.<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I14D32A32006E11DFBEF1C9F02835E615">1975 Indlaw SC 152, (1976) 2 SCC 291, AIR 1976 SC 242, [1976] 2 S.C.R. 48</a></p><p>Shri Baradakanta Mishra and another v Registrar of Orissa High Court and Another<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I01C8E5B0006E11DFBEF1C9F02835E615">1973 Indlaw SC 484, (1974) SCC (Cr) 128, (1974) 1 SCC 374, AIR 1974 SC 710, 1974 CRLJ 631, 1974 CrLR(SC) 124, [1974] 2 S.C.R. 282</a></p><p>Mulk Raj v State of Punjab<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I0E6E81D1006E11DFBEF1C9F02835E615">1972 Indlaw SC 621, (1972) 3 SCC 839, (1973) SCC (Cr) 24, AIR 1972 SC 1197, 1972 CRLJ 754</a></p><p>Debabrata Bandopadhyay v State of West Bengal and Another<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I2441D161006E11DFBEF1C9F02835E615">1968 Indlaw SC 92, AIR 1969 SC 189, 1969 CRLJ 401, [1969] 1 S.C.R. 304</a></p><p>Jennison v Baker<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=ICD049CE0E42711DA8FC2A0F0355337E9">[1972] 1 All E.R. 997</a></p></div><div class="locatorSection"><h3 id="casesciting">Cases Citing this Case</h3><p>Kamini Jaiswal v Union of India and another<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I56A3DE10C93C11E7ABD48A2CD15FDB50">2017 Indlaw SCO 256</a></p><p>Commercial Tax Officer, Vijayawada and another v Naveen Kumar<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=IF1309480DA6E11E784E5CA5F6FDB072D">2017 Indlaw HYD 378, 2017 (4) ALT 719</a></p><p>Het Ram Beniwal and another v Raghuveer Singh and others<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I273ED6A0AFE511E69940820C4426EDC1">2016 Indlaw SC 810, (2017) 4 SCC 340, AIR 2016 SC 4940, 2017 CRLJ 175, JT 2016 (10) SC 383, 2016 (4) RCR(Civil) 884, 2016 (4) RCR(Criminal) 728, 2016(10) SCALE 313</a></p><p>K. Mallaiah and others v Sandeep Kumar Sultania and others<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I3F2F4A00863211E782DF8048369D7954">2015 Indlaw HYD 555</a></p><p>Registrar General, High Court of Meghalaya, Shillong v Sordar, East Khasi Hills District<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I3C55A9D0AFD511E593BBB0F786C11A07">2015 Indlaw MEG 137</a></p><p>Ram Niwas Jain v Ministry of Home Affairs and others<br /><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I709EEE10A5F211E49D55A6814FB1B404">2015 Indlaw DEL 81, 2015 (217) DLT 129</a></p></div><div class="locatorSection"><h3 id="legiscited">Legislation Cited</h3><p><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=I013C8430006E11DFA9B79C2097992CEB">Contempt of Courts Act, 1971</a></p><p><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=ID54892F0006E11DFA4EBE2B05DA89DDC">Contempt of Courts Act, 1971 s. 12(1)</a></p><p><a href="/maf/wlin/app/document?src=doc&linktype=ref&&context=11067&crumb-action=replace&docguid=ID54892F0006E11DFA4EBE2B05DA89DDC">Contempt of Courts Act, 1971 s. 12(2)</a></p><p>Allahabad High Court Rules, 1952</p><p>Allahabad High Court Rules, 1952 r. 6</p></div><p class="small center">© 2015 Thomson Reuters South Asia Private Limited</p><p id="disclaimer" class="small center">This database contains editorial enhancements that are not a part of the original material. The database may also have mistakes or omissions. Users are requested to verify the contents with the relevant original text(s) such as, the certified copy of the judgment, Government Gazettes, etc. Thomson Reuters bears no liability whatsoever for the adequacy, accuracy, satisfactory quality or suitability of the content.</p></div><div id="docFooter"><div id="docBottomLeft"><div id="docBottomRight"><!----></div></div><div id="footer"><a title="Thomson Reuters - This link will open in a new window" class="externalLink" href="http://www.thomsonreuters.com/">Thomson Reuters homepage</a><p class="bold">Customer support 1800 266 0288</p><p class="small">© 2018 Thomson Reuters South Asia Private Limited</p></div></div></div></div><div id="researchSpaceHiddenForm"><form id="docValues"><input id="document_title" name="document_title" value="Bal Kishan Giri v State of Uttar Pradesh - Supreme Court of India, 28 May 2014 | Case Analysis" type="hidden" /><input id="novus_document_id" name="novus_document_id" value="I3C8AFD10EAEC11E399308D816F613A1D" type="hidden" /><input id="document_court" name="document_court" value="Supreme Court of India" type="hidden" /><input name="citation" value="Case Analysis" type="hidden" /><input id="date_of_hearing" name="date_of_hearing" value="28 May 2014 " type="hidden" /><input id="currentFolderInput" name="destinationFolderId" value="" type="hidden" /><input id="document_content_type" name="document_content_type" value="Cases" type="hidden" /></form></div><script type="text/javascript">
if(wluk.doc!=null){
wluk.doc.loadFontSizeFromPref('12.8px');
};
</script><div id="jstree-marker" style="display: none;"></div><div id="vakata-contextmenu"></div></body></html> | 598.196721 | 20,964 | 0.739052 |
e5097f2a0f0189dcffc9e0797f96170ba843026f | 15,027 | html | HTML | MATLAB/slprj/ert/_sharedutils/html/MWDSP_EPH_R_B_c.html | meltinglab/lqrhil-dcmotor | 7181a181ef7b66de68751cb5c2cb08f1eeb9d9a9 | [
"MIT"
] | 2 | 2019-01-24T08:47:42.000Z | 2019-02-13T15:32:10.000Z | MATLAB/slprj/ert/_sharedutils/html/MWDSP_EPH_R_B_c.html | filipposerafini/motor-control | f49f4bcce91acce8cd34de2c2b5f7856f414fa54 | [
"MIT"
] | null | null | null | MATLAB/slprj/ert/_sharedutils/html/MWDSP_EPH_R_B_c.html | filipposerafini/motor-control | f49f4bcce91acce8cd34de2c2b5f7856f414fa54 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="./js/coder_app.js"></script>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="./rtwreport_utils.js"></script>
<script type="text/javascript" src="./rtwannotate.js"></script>
<link rel="stylesheet" type="text/css" href="./css/coder_app.css"/>
</head>
<body onload="srcFileOnload();">
<pre id="code">
<table class="code" id="codeTbl">
<tr name="1" id="1">
<td><a id="l1" class='ln'>1</a></td><td><span class="ct">/*</span></td></tr>
<tr name="2" id="2">
<td><a id="l2" class='ln'>2</a></td><td><span class="ct"> * Academic License - for use in teaching, academic research, and meeting</span></td></tr>
<tr name="3" id="3">
<td><a id="l3" class='ln'>3</a></td><td><span class="ct"> * course requirements at degree granting institutions only. Not for</span></td></tr>
<tr name="4" id="4">
<td><a id="l4" class='ln'>4</a></td><td><span class="ct"> * government, commercial, or other organizational use.</span></td></tr>
<tr name="5" id="5">
<td><a id="l5" class='ln'>5</a></td><td><span class="ct"> *</span></td></tr>
<tr name="6" id="6">
<td><a id="l6" class='ln'>6</a></td><td><span class="ct"> * File: MWDSP_EPH_R_B.c</span></td></tr>
<tr name="7" id="7">
<td><a id="l7" class='ln'>7</a></td><td><span class="ct"> *</span></td></tr>
<tr name="8" id="8">
<td><a id="l8" class='ln'>8</a></td><td><span class="ct"> * Code generated for Simulink model 'uC_code'.</span></td></tr>
<tr name="9" id="9">
<td><a id="l9" class='ln'>9</a></td><td><span class="ct"> *</span></td></tr>
<tr name="10" id="10">
<td><a id="l10" class='ln'>10</a></td><td><span class="ct"> * Model version : 1.4</span></td></tr>
<tr name="11" id="11">
<td><a id="l11" class='ln'>11</a></td><td><span class="ct"> * Simulink Coder version : 9.0 (R2018b) 24-May-2018</span></td></tr>
<tr name="12" id="12">
<td><a id="l12" class='ln'>12</a></td><td><span class="ct"> * C/C++ source code generated on : Sat Jan 26 17:42:54 2019</span></td></tr>
<tr name="13" id="13">
<td><a id="l13" class='ln'>13</a></td><td><span class="ct"> */</span></td></tr>
<tr name="14" id="14">
<td><a id="l14" class='ln'>14</a></td><td></td></tr>
<tr name="15" id="15">
<td><a id="l15" class='ln'>15</a></td><td><span class="pp">#include "rtwtypes.h"</span></td></tr>
<tr name="16" id="16">
<td><a id="l16" class='ln'>16</a></td><td><span class="pp">#include "MWDSP_EPH_R_B.h"</span></td></tr>
<tr name="17" id="17">
<td><a id="l17" class='ln'>17</a></td><td></td></tr>
<tr name="18" id="18">
<td><a id="l18" class='ln'>18</a></td><td><a id="18c1" class="tk">uint32_T</a> <a id="18c10" class="tk">MWDSP_EPH_R_B</a>(<a id="18c24" class="tk">boolean_T</a> <a id="18c34" class="tk">evt</a>, <a id="18c39" class="tk">uint32_T</a> <a id="18c48" class="tk">*</a><a id="18c49" class="tk">sta</a>)</td></tr>
<tr name="19" id="19">
<td><a id="l19" class='ln'>19</a></td><td><span class="br">{</span></td></tr>
<tr name="20" id="20">
<td><a id="l20" class='ln'>20</a></td><td> <a id="20c3" class="tk">uint32_T</a> <a id="20c12" class="tk">retVal</a>;</td></tr>
<tr name="21" id="21">
<td><a id="l21" class='ln'>21</a></td><td> <a id="21c3" class="tk">int32_T</a> <a id="21c11" class="tk">curState</a>;</td></tr>
<tr name="22" id="22">
<td><a id="l22" class='ln'>22</a></td><td> <a id="22c3" class="tk">int32_T</a> <a id="22c11" class="tk">newState</a>;</td></tr>
<tr name="23" id="23">
<td><a id="l23" class='ln'>23</a></td><td> <a id="23c3" class="tk">int32_T</a> <a id="23c11" class="tk">newStateR</a>;</td></tr>
<tr name="24" id="24">
<td><a id="l24" class='ln'>24</a></td><td> <a id="24c3" class="tk">int32_T</a> <a id="24c11" class="tk">lastzcevent</a>;</td></tr>
<tr name="25" id="25">
<td><a id="l25" class='ln'>25</a></td><td> <a id="25c3" class="tk">uint32_T</a> <a id="25c12" class="tk">previousState</a>;</td></tr>
<tr name="26" id="26">
<td><a id="l26" class='ln'>26</a></td><td></td></tr>
<tr name="27" id="27">
<td><a id="l27" class='ln'>27</a></td><td> <span class="ct">/* S-Function (sdspcount2): '<a class="ct blk" blk_line="27"><S5>/Counter</a>' */</span></td></tr>
<tr name="28" id="28">
<td><a id="l28" class='ln'>28</a></td><td> <span class="ct">/* Detect rising edge events */</span></td></tr>
<tr name="29" id="29">
<td><a id="l29" class='ln'>29</a></td><td> <a id="29c3" class="tk">previousState</a> = <a id="29c19" class="tk">*</a><a id="29c20" class="tk">sta</a>;</td></tr>
<tr name="30" id="30">
<td><a id="l30" class='ln'>30</a></td><td> <a id="30c3" class="tk">retVal</a> = 0U;</td></tr>
<tr name="31" id="31">
<td><a id="l31" class='ln'>31</a></td><td> <a id="31c3" class="tk">lastzcevent</a> = 0;</td></tr>
<tr name="32" id="32">
<td><a id="l32" class='ln'>32</a></td><td> <a id="32c3" class="tk">newState</a> = 5;</td></tr>
<tr name="33" id="33">
<td><a id="l33" class='ln'>33</a></td><td> <a id="33c3" class="tk">newStateR</a> = 5;</td></tr>
<tr name="34" id="34">
<td><a id="l34" class='ln'>34</a></td><td> <span class="kw">if</span> (<a id="34c7" class="tk">evt</a>) <span class="br">{</span></td></tr>
<tr name="35" id="35">
<td><a id="l35" class='ln'>35</a></td><td> <a id="35c5" class="tk">curState</a> = 2;</td></tr>
<tr name="36" id="36">
<td><a id="l36" class='ln'>36</a></td><td> <span class="br">}</span> <span class="kw">else</span> <span class="br">{</span></td></tr>
<tr name="37" id="37">
<td><a id="l37" class='ln'>37</a></td><td> <a id="37c5" class="tk">curState</a> = 1;</td></tr>
<tr name="38" id="38">
<td><a id="l38" class='ln'>38</a></td><td> <span class="br">}</span></td></tr>
<tr name="39" id="39">
<td><a id="l39" class='ln'>39</a></td><td></td></tr>
<tr name="40" id="40">
<td><a id="l40" class='ln'>40</a></td><td> <span class="kw">if</span> ((<a id="40c8" class="tk">*</a><a id="40c9" class="tk">sta</a>) <a id="40c14" class="tk">==</a> 5U) <span class="br">{</span></td></tr>
<tr name="41" id="41">
<td><a id="l41" class='ln'>41</a></td><td> <a id="41c5" class="tk">newStateR</a> = <a id="41c17" class="tk">curState</a>;</td></tr>
<tr name="42" id="42">
<td><a id="l42" class='ln'>42</a></td><td> <span class="br">}</span> <span class="kw">else</span> <span class="br">{</span></td></tr>
<tr name="43" id="43">
<td><a id="l43" class='ln'>43</a></td><td> <span class="kw">if</span> (((<a id="43c11" class="tk">uint32_T</a>)<a id="43c20" class="tk">curState</a>) <a id="43c30" class="tk">!=</a> (<a id="43c34" class="tk">*</a><a id="43c35" class="tk">sta</a>)) <span class="br">{</span></td></tr>
<tr name="44" id="44">
<td><a id="l44" class='ln'>44</a></td><td> <span class="kw">if</span> ((<a id="44c12" class="tk">*</a><a id="44c13" class="tk">sta</a>) <a id="44c18" class="tk">==</a> 3U) <span class="br">{</span></td></tr>
<tr name="45" id="45">
<td><a id="l45" class='ln'>45</a></td><td> <span class="kw">if</span> (((<a id="45c15" class="tk">uint32_T</a>)<a id="45c24" class="tk">curState</a>) <a id="45c34" class="tk">==</a> 1U) <span class="br">{</span></td></tr>
<tr name="46" id="46">
<td><a id="l46" class='ln'>46</a></td><td> <a id="46c11" class="tk">newStateR</a> = 1;</td></tr>
<tr name="47" id="47">
<td><a id="l47" class='ln'>47</a></td><td> <span class="br">}</span> <span class="kw">else</span> <span class="br">{</span></td></tr>
<tr name="48" id="48">
<td><a id="l48" class='ln'>48</a></td><td> <a id="48c11" class="tk">lastzcevent</a> = 2;</td></tr>
<tr name="49" id="49">
<td><a id="l49" class='ln'>49</a></td><td> <a id="49c11" class="tk">previousState</a> = 1U;</td></tr>
<tr name="50" id="50">
<td><a id="l50" class='ln'>50</a></td><td> <span class="br">}</span></td></tr>
<tr name="51" id="51">
<td><a id="l51" class='ln'>51</a></td><td> <span class="br">}</span></td></tr>
<tr name="52" id="52">
<td><a id="l52" class='ln'>52</a></td><td></td></tr>
<tr name="53" id="53">
<td><a id="l53" class='ln'>53</a></td><td> <span class="kw">if</span> (<a id="53c11" class="tk">previousState</a> <a id="53c25" class="tk">==</a> 4U) <span class="br">{</span></td></tr>
<tr name="54" id="54">
<td><a id="l54" class='ln'>54</a></td><td> <span class="kw">if</span> (((<a id="54c15" class="tk">uint32_T</a>)<a id="54c24" class="tk">curState</a>) <a id="54c34" class="tk">==</a> 1U) <span class="br">{</span></td></tr>
<tr name="55" id="55">
<td><a id="l55" class='ln'>55</a></td><td> <a id="55c11" class="tk">newStateR</a> = 1;</td></tr>
<tr name="56" id="56">
<td><a id="l56" class='ln'>56</a></td><td> <span class="br">}</span> <span class="kw">else</span> <span class="br">{</span></td></tr>
<tr name="57" id="57">
<td><a id="l57" class='ln'>57</a></td><td> <a id="57c11" class="tk">lastzcevent</a> = 3;</td></tr>
<tr name="58" id="58">
<td><a id="l58" class='ln'>58</a></td><td> <a id="58c11" class="tk">previousState</a> = 1U;</td></tr>
<tr name="59" id="59">
<td><a id="l59" class='ln'>59</a></td><td> <span class="br">}</span></td></tr>
<tr name="60" id="60">
<td><a id="l60" class='ln'>60</a></td><td> <span class="br">}</span></td></tr>
<tr name="61" id="61">
<td><a id="l61" class='ln'>61</a></td><td></td></tr>
<tr name="62" id="62">
<td><a id="l62" class='ln'>62</a></td><td> <span class="kw">if</span> ((<a id="62c12" class="tk">previousState</a> <a id="62c26" class="tk">==</a> 1U) <a id="62c33" class="tk">&&</a> (((<a id="62c39" class="tk">uint32_T</a>)<a id="62c48" class="tk">curState</a>) <a id="62c58" class="tk">==</a> 2U)) <span class="br">{</span></td></tr>
<tr name="63" id="63">
<td><a id="l63" class='ln'>63</a></td><td> <a id="63c9" class="tk">retVal</a> = 2U;</td></tr>
<tr name="64" id="64">
<td><a id="l64" class='ln'>64</a></td><td> <span class="br">}</span></td></tr>
<tr name="65" id="65">
<td><a id="l65" class='ln'>65</a></td><td></td></tr>
<tr name="66" id="66">
<td><a id="l66" class='ln'>66</a></td><td> <span class="kw">if</span> (<a id="66c11" class="tk">previousState</a> <a id="66c25" class="tk">==</a> 0U) <span class="br">{</span></td></tr>
<tr name="67" id="67">
<td><a id="l67" class='ln'>67</a></td><td> <a id="67c9" class="tk">retVal</a> = 2U;</td></tr>
<tr name="68" id="68">
<td><a id="l68" class='ln'>68</a></td><td> <span class="br">}</span></td></tr>
<tr name="69" id="69">
<td><a id="l69" class='ln'>69</a></td><td></td></tr>
<tr name="70" id="70">
<td><a id="l70" class='ln'>70</a></td><td> <span class="kw">if</span> (<a id="70c11" class="tk">retVal</a> <a id="70c18" class="tk">==</a> ((<a id="70c23" class="tk">uint32_T</a>)<a id="70c32" class="tk">lastzcevent</a>)) <span class="br">{</span></td></tr>
<tr name="71" id="71">
<td><a id="l71" class='ln'>71</a></td><td> <a id="71c9" class="tk">retVal</a> = 0U;</td></tr>
<tr name="72" id="72">
<td><a id="l72" class='ln'>72</a></td><td> <span class="br">}</span></td></tr>
<tr name="73" id="73">
<td><a id="l73" class='ln'>73</a></td><td></td></tr>
<tr name="74" id="74">
<td><a id="l74" class='ln'>74</a></td><td> <span class="kw">if</span> ((((<a id="74c14" class="tk">uint32_T</a>)<a id="74c23" class="tk">curState</a>) <a id="74c33" class="tk">==</a> 1U) <a id="74c40" class="tk">&&</a> (<a id="74c44" class="tk">retVal</a> <a id="74c51" class="tk">==</a> 2U)) <span class="br">{</span></td></tr>
<tr name="75" id="75">
<td><a id="l75" class='ln'>75</a></td><td> <a id="75c9" class="tk">newState</a> = 3;</td></tr>
<tr name="76" id="76">
<td><a id="l76" class='ln'>76</a></td><td> <span class="br">}</span> <span class="kw">else</span> <span class="br">{</span></td></tr>
<tr name="77" id="77">
<td><a id="l77" class='ln'>77</a></td><td> <a id="77c9" class="tk">newState</a> = <a id="77c20" class="tk">curState</a>;</td></tr>
<tr name="78" id="78">
<td><a id="l78" class='ln'>78</a></td><td> <span class="br">}</span></td></tr>
<tr name="79" id="79">
<td><a id="l79" class='ln'>79</a></td><td> <span class="br">}</span></td></tr>
<tr name="80" id="80">
<td><a id="l80" class='ln'>80</a></td><td> <span class="br">}</span></td></tr>
<tr name="81" id="81">
<td><a id="l81" class='ln'>81</a></td><td></td></tr>
<tr name="82" id="82">
<td><a id="l82" class='ln'>82</a></td><td> <span class="kw">if</span> (((<a id="82c9" class="tk">uint32_T</a>)<a id="82c18" class="tk">newStateR</a>) <a id="82c29" class="tk">!=</a> 5U) <span class="br">{</span></td></tr>
<tr name="83" id="83">
<td><a id="l83" class='ln'>83</a></td><td> <a id="83c5" class="tk">*</a><a id="83c6" class="tk">sta</a> = (<a id="83c13" class="tk">uint32_T</a>)<a id="83c22" class="tk">newStateR</a>;</td></tr>
<tr name="84" id="84">
<td><a id="l84" class='ln'>84</a></td><td> <a id="84c5" class="tk">retVal</a> = 0U;</td></tr>
<tr name="85" id="85">
<td><a id="l85" class='ln'>85</a></td><td> <span class="br">}</span></td></tr>
<tr name="86" id="86">
<td><a id="l86" class='ln'>86</a></td><td></td></tr>
<tr name="87" id="87">
<td><a id="l87" class='ln'>87</a></td><td> <span class="kw">if</span> (((<a id="87c9" class="tk">uint32_T</a>)<a id="87c18" class="tk">newState</a>) <a id="87c28" class="tk">!=</a> 5U) <span class="br">{</span></td></tr>
<tr name="88" id="88">
<td><a id="l88" class='ln'>88</a></td><td> <a id="88c5" class="tk">*</a><a id="88c6" class="tk">sta</a> = (<a id="88c13" class="tk">uint32_T</a>)<a id="88c22" class="tk">newState</a>;</td></tr>
<tr name="89" id="89">
<td><a id="l89" class='ln'>89</a></td><td> <span class="br">}</span></td></tr>
<tr name="90" id="90">
<td><a id="l90" class='ln'>90</a></td><td></td></tr>
<tr name="91" id="91">
<td><a id="l91" class='ln'>91</a></td><td> <span class="ct">/* End of S-Function (sdspcount2): '<a class="ct blk" blk_line="91"><S5>/Counter</a>' */</span></td></tr>
<tr name="92" id="92">
<td><a id="l92" class='ln'>92</a></td><td> <span class="kw">return</span> <a id="92c10" class="tk">retVal</a>;</td></tr>
<tr name="93" id="93">
<td><a id="l93" class='ln'>93</a></td><td><span class="br">}</span></td></tr>
<tr name="94" id="94">
<td><a id="l94" class='ln'>94</a></td><td></td></tr>
<tr name="95" id="95">
<td><a id="l95" class='ln'>95</a></td><td><span class="ct">/*</span></td></tr>
<tr name="96" id="96">
<td><a id="l96" class='ln'>96</a></td><td><span class="ct"> * File trailer for generated code.</span></td></tr>
<tr name="97" id="97">
<td><a id="l97" class='ln'>97</a></td><td><span class="ct"> *</span></td></tr>
<tr name="98" id="98">
<td><a id="l98" class='ln'>98</a></td><td><span class="ct"> * [EOF]</span></td></tr>
<tr name="99" id="99">
<td><a id="l99" class='ln'>99</a></td><td><span class="ct"> */</span></td></tr>
<tr name="100" id="100">
<td><a id="l100" class='ln'>100</a></td><td></td></tr>
</table>
</pre>
</body>
</html>
| 69.248848 | 349 | 0.532641 |
40f93f40324e7e852988c89fa38ec5e8b93d1e11 | 14,442 | py | Python | mapclientplugins/pelvislandmarkshjcpredictionstep/hjcpredictionviewerwidget.py | tsalemink/pelvislandmarkshjcpredictionstep | 8c26e42a07320cef379d70a9ac5fad1c04c29c44 | [
"Apache-2.0"
] | null | null | null | mapclientplugins/pelvislandmarkshjcpredictionstep/hjcpredictionviewerwidget.py | tsalemink/pelvislandmarkshjcpredictionstep | 8c26e42a07320cef379d70a9ac5fad1c04c29c44 | [
"Apache-2.0"
] | 1 | 2020-01-28T23:25:48.000Z | 2020-01-28T23:25:48.000Z | mapclientplugins/pelvislandmarkshjcpredictionstep/hjcpredictionviewerwidget.py | tsalemink/pelvislandmarkshjcpredictionstep | 8c26e42a07320cef379d70a9ac5fad1c04c29c44 | [
"Apache-2.0"
] | 1 | 2021-06-03T20:39:27.000Z | 2021-06-03T20:39:27.000Z | '''
MAP Client, a program to generate detailed musculoskeletal models for OpenSim.
Copyright (C) 2012 University of Auckland
This file is part of MAP Client. (http://launchpad.net/mapclient)
MAP Client 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.
MAP Client 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 MAP Client. If not, see <http://www.gnu.org/licenses/>..
'''
import os
os.environ['ETS_TOOLKIT'] = 'qt5'
from PySide2.QtWidgets import QDialog, QAbstractItemView, QTableWidgetItem
from PySide2.QtGui import QIntValidator
from PySide2.QtCore import Qt
from mapclientplugins.pelvislandmarkshjcpredictionstep.ui_hjcpredictionviewerwidget import Ui_Dialog
from traits.api import HasTraits, Instance, on_trait_change, \
Int, Dict
from gias2.mappluginutils.mayaviviewer import MayaviViewerObjectsContainer, MayaviViewerLandmark, colours
import numpy as np
class MayaviHJCPredictionViewerWidget(QDialog):
'''
Configure dialog to present the user with the options to configure this step.
'''
defaultColor = colours['bone']
objectTableHeaderColumns = {'landmarks': 0}
backgroundColour = (0.0, 0.0, 0.0)
_landmarkRenderArgs = {'mode': 'sphere', 'scale_factor': 5.0, 'color': (0, 1, 0)}
_hjcRenderArgs = {'mode': 'sphere', 'scale_factor': 10.0, 'color': (1, 0, 0)}
def __init__(self, landmarks, config, predictFunc, predMethods, popClasses, parent=None):
'''
Constructor
'''
QDialog.__init__(self, parent)
self._ui = Ui_Dialog()
self._ui.setupUi(self)
self._scene = self._ui.MayaviScene.visualisation.scene
self._scene.background = self.backgroundColour
self.selectedObjectName = None
self._landmarks = landmarks
self._landmarkNames = sorted(self._landmarks.keys())
self._predictFunc = predictFunc
self._predMethods = predMethods
self._popClasses = popClasses
self._config = config
# print 'init...', self._config
### FIX FROM HERE ###
# create self._objects
self._initViewerObjects()
self._setupGui()
self._makeConnections()
self._initialiseObjectTable()
self._initialiseSettings()
self._refresh()
# self.testPlot()
# self.drawObjects()
print('finished init...', self._config)
def _initViewerObjects(self):
self._objects = MayaviViewerObjectsContainer()
for ln in self._landmarkNames:
self._objects.addObject(ln, MayaviViewerLandmark(ln, self._landmarks[ln],
renderArgs=self._landmarkRenderArgs)
)
hjcl = self._objects.getObject('HJC_left')
hjcl.setRenderArgs(self._hjcRenderArgs)
hjcr = self._objects.getObject('HJC_right')
hjcr.setRenderArgs(self._hjcRenderArgs)
# self._objects.addObject('HJC_left', MayaviViewerLandmark('HJC_left', [0,0,0], renderArgs=self._hjcRenderArgs))
# self._objects.addObject('HJC_right', MayaviViewerLandmark('HJC_right', [0,0,0], renderArgs=self._hjcRenderArgs))
def _setupGui(self):
self._ui.screenshotPixelXLineEdit.setValidator(QIntValidator())
self._ui.screenshotPixelYLineEdit.setValidator(QIntValidator())
for l in self._landmarkNames:
self._ui.comboBoxLASIS.addItem(l)
self._ui.comboBoxRASIS.addItem(l)
self._ui.comboBoxLPSIS.addItem(l)
self._ui.comboBoxRPSIS.addItem(l)
self._ui.comboBoxPS.addItem(l)
for m in self._predMethods:
self._ui.comboBoxPredMethod.addItem(m)
for p in self._popClasses:
self._ui.comboBoxPopClass.addItem(p)
def _makeConnections(self):
self._ui.tableWidget.itemClicked.connect(self._tableItemClicked)
self._ui.tableWidget.itemChanged.connect(self._visibleBoxChanged)
self._ui.screenshotSaveButton.clicked.connect(self._saveScreenShot)
self._ui.predictButton.clicked.connect(self._predict)
self._ui.resetButton.clicked.connect(self._reset)
self._ui.abortButton.clicked.connect(self._abort)
self._ui.acceptButton.clicked.connect(self._accept)
self._ui.comboBoxPredMethod.activated.connect(self._updateConfigPredMethod)
self._ui.comboBoxPopClass.activated.connect(self._updateConfigPopClass)
self._ui.comboBoxLASIS.activated.connect(self._updateConfigLASIS)
self._ui.comboBoxRASIS.activated.connect(self._updateConfigRASIS)
self._ui.comboBoxLPSIS.activated.connect(self._updateConfigLPSIS)
self._ui.comboBoxRPSIS.activated.connect(self._updateConfigRPSIS)
self._ui.comboBoxPS.activated.connect(self._updateConfigPS)
def _initialiseSettings(self):
self._ui.comboBoxPredMethod.setCurrentIndex(self._predMethods.index(self._config['Prediction Method']))
self._ui.comboBoxPopClass.setCurrentIndex(self._popClasses.index(self._config['Population Class']))
if self._config['LASIS'] in self._landmarkNames:
self._ui.comboBoxLASIS.setCurrentIndex(self._landmarkNames.index(self._config['LASIS']))
else:
self._ui.comboBoxLASIS.setCurrentIndex(0)
if self._config['RASIS'] in self._landmarkNames:
self._ui.comboBoxRASIS.setCurrentIndex(self._landmarkNames.index(self._config['RASIS']))
else:
self._ui.comboBoxRASIS.setCurrentIndex(0)
if self._config['LPSIS'] in self._landmarkNames:
self._ui.comboBoxLPSIS.setCurrentIndex(self._landmarkNames.index(self._config['LPSIS']))
else:
self._ui.comboBoxLPSIS.setCurrentIndex(0)
if self._config['RPSIS'] in self._landmarkNames:
self._ui.comboBoxRPSIS.setCurrentIndex(self._landmarkNames.index(self._config['RPSIS']))
else:
self._ui.comboBoxRPSIS.setCurrentIndex(0)
if self._config['PS'] in self._landmarkNames:
self._ui.comboBoxPS.setCurrentIndex(self._landmarkNames.index(self._config['PS']))
else:
self._ui.comboBoxPS.setCurrentIndex(0)
def _initialiseObjectTable(self):
self._ui.tableWidget.setRowCount(self._objects.getNumberOfObjects())
self._ui.tableWidget.verticalHeader().setVisible(False)
self._ui.tableWidget.setEditTriggers(QAbstractItemView.NoEditTriggers)
self._ui.tableWidget.setSelectionBehavior(QAbstractItemView.SelectRows)
self._ui.tableWidget.setSelectionMode(QAbstractItemView.SingleSelection)
r = 0
for ln in self._landmarkNames:
self._addObjectToTable(r, ln, self._objects.getObject(ln))
r += 1
hjclTableItem = self._ui.tableWidget.item(self._landmarkNames.index('HJC_left'),
self.objectTableHeaderColumns['landmarks'])
hjclTableItem.setCheckState(Qt.Unchecked)
hjcrTableItem = self._ui.tableWidget.item(self._landmarkNames.index('HJC_right'),
self.objectTableHeaderColumns['landmarks'])
hjcrTableItem.setCheckState(Qt.Unchecked)
self._ui.tableWidget.resizeColumnToContents(self.objectTableHeaderColumns['landmarks'])
def _addObjectToTable(self, row, name, obj, checked=True):
typeName = obj.typeName
print('adding to table: %s (%s)' % (name, typeName))
tableItem = QTableWidgetItem(name)
if checked:
tableItem.setCheckState(Qt.Checked)
else:
tableItem.setCheckState(Qt.Unchecked)
self._ui.tableWidget.setItem(row, self.objectTableHeaderColumns['landmarks'], tableItem)
# self._ui.tableWidget.setItem(row, self.objectTableHeaderColumns['type'], QTableWidgetItem(typeName))
def _tableItemClicked(self):
selectedRow = self._ui.tableWidget.currentRow()
self.selectedObjectName = self._ui.tableWidget.item(
selectedRow,
self.objectTableHeaderColumns['landmarks']
).text()
print(selectedRow)
print(self.selectedObjectName)
def _visibleBoxChanged(self, tableItem):
# get name of object selected
# name = self._getSelectedObjectName()
# checked changed item is actually the checkbox
if tableItem.column() == self.objectTableHeaderColumns['landmarks']:
# get visible status
name = tableItem.text()
visible = tableItem.checkState().name == 'Checked'
print('visibleboxchanged name', name)
print('visibleboxchanged visible', visible)
# toggle visibility
obj = self._objects.getObject(name)
print(obj.name)
if obj.sceneObject:
print('changing existing visibility')
obj.setVisibility(visible)
else:
print('drawing new')
obj.draw(self._scene)
def _getSelectedObjectName(self):
return self.selectedObjectName
def _getSelectedScalarName(self):
return 'none'
def drawObjects(self):
for name in self._objects.getObjectNames():
self._objects.getObject(name).draw(self._scene)
def _updateConfigPredMethod(self):
self._config['Prediction Method'] = self._ui.comboBoxPredMethod.currentText()
def _updateConfigPopClass(self):
self._config['Population Class'] = self._ui.comboBoxPopClass.currentText()
def _updateConfigLASIS(self):
self._config['LASIS'] = self._ui.comboBoxLASIS.currentText()
def _updateConfigRASIS(self):
self._config['RASIS'] = self._ui.comboBoxRASIS.currentText()
def _updateConfigLPSIS(self):
self._config['LPSIS'] = self._ui.comboBoxLPSIS.currentText()
def _updateConfigRPSIS(self):
self._config['RPSIS'] = self._ui.comboBoxRPSIS.currentText()
def _updateConfigPS(self):
self._config['PS'] = self._ui.comboBoxPS.currentText()
def _predict(self):
self._predictFunc()
# update predicted HJCs
hjclObj = self._objects.getObject('HJC_left')
hjclObj.updateGeometry(self._landmarks['HJC_left'], self._scene)
hjclTableItem = self._ui.tableWidget.item(self._landmarkNames.index('HJC_left'),
self.objectTableHeaderColumns['landmarks'])
hjclTableItem.setCheckState(Qt.Checked)
hjcrObj = self._objects.getObject('HJC_right')
hjcrObj.updateGeometry(self._landmarks['HJC_right'], self._scene)
hjcrTableItem = self._ui.tableWidget.item(self._landmarkNames.index('HJC_right'),
self.objectTableHeaderColumns['landmarks'])
hjcrTableItem.setCheckState(Qt.Checked)
def _reset(self):
# delete viewer table row
# self._ui.tableWidget.removeRow(2)
# reset registered datacloud
hjclObj = self._objects.getObject('HJC_left')
hjclObj.updateGeometry(np.array([0, 0, 0]), self._scene)
hjclTableItem = self._ui.tableWidget.item(self._landmarkNames.index('HJC_left'),
self.objectTableHeaderColumns['landmarks'])
hjclTableItem.setCheckState(Qt.Unchecked)
hjcrObj = self._objects.getObject('HJC_right')
hjcrObj.updateGeometry(np.array([0, 0, 0]), self._scene)
hjcrTableItem = self._ui.tableWidget.item(self._landmarkNames.index('HJC_right'),
self.objectTableHeaderColumns['landmarks'])
hjcrTableItem.setCheckState(Qt.Unchecked)
def _accept(self):
self._close()
def _abort(self):
self._reset()
del self._landmarks['HJC_left']
del self._landmarks['HJC_right']
self._close()
def _close(self):
for name in self._objects.getObjectNames():
self._objects.getObject(name).remove()
self._objects._objects = {}
self._objects == None
# for r in xrange(self._ui.tableWidget.rowCount()):
# self._ui.tableWidget.removeRow(r)
def _refresh(self):
for r in range(self._ui.tableWidget.rowCount()):
tableItem = self._ui.tableWidget.item(r, self.objectTableHeaderColumns['landmarks'])
name = tableItem.text()
visible = tableItem.checkState().name == 'Checked'
obj = self._objects.getObject(name)
print(obj.name)
if obj.sceneObject:
print('changing existing visibility')
obj.setVisibility(visible)
else:
print('drawing new')
obj.draw(self._scene)
def _saveScreenShot(self):
filename = self._ui.screenshotFilenameLineEdit.text()
width = int(self._ui.screenshotPixelXLineEdit.text())
height = int(self._ui.screenshotPixelYLineEdit.text())
self._scene.mlab.savefig(filename, size=(width, height))
# ================================================================#
@on_trait_change('scene.activated')
def testPlot(self):
# This function is called when the view is opened. We don't
# populate the scene when the view is not yet open, as some
# VTK features require a GLContext.
print('trait_changed')
# We can do normal mlab calls on the embedded scene.
self._scene.mlab.test_points3d()
# def _saveImage_fired( self ):
# self.scene.mlab.savefig( str(self.saveImageFilename), size=( int(self.saveImageWidth), int(self.saveImageLength) ) )
| 43.110448 | 127 | 0.64534 |
3ccdb2117c5d94b0635aafbe4914c1e09e7280f7 | 11,389 | swift | Swift | SendBird-iOS/GroupChannel/CreateGroupChannel/CreateGroupChannelViewControllerA.swift | sendbird/quickstart-calls-chat-integration-ios | 5e226fce2f87aa368c38e5949d93100dbf538e75 | [
"MIT"
] | 15 | 2019-07-26T22:09:52.000Z | 2022-03-30T21:35:32.000Z | SendBird-iOS/GroupChannel/CreateGroupChannel/CreateGroupChannelViewControllerA.swift | sendbird/quickstart-calls-chat-integration-ios | 5e226fce2f87aa368c38e5949d93100dbf538e75 | [
"MIT"
] | 3 | 2019-12-16T11:23:09.000Z | 2020-03-25T06:24:04.000Z | SendBird-iOS/GroupChannel/CreateGroupChannel/CreateGroupChannelViewControllerA.swift | sendbird/quickstart-calls-chat-integration-ios | 5e226fce2f87aa368c38e5949d93100dbf538e75 | [
"MIT"
] | 20 | 2019-06-25T20:24:10.000Z | 2021-08-17T21:25:05.000Z | //
// CreateGroupChannelViewControllerA.swift
// SendBird-iOS
//
// Created by Jed Gyeong on 10/15/18.
// Copyright © 2018 SendBird. All rights reserved.
//
import UIKit
import SendBirdSDK
class CreateGroupChannelViewControllerA: UIViewController, UITableViewDelegate, UITableViewDataSource, UICollectionViewDataSource, UICollectionViewDelegate, UISearchBarDelegate, NotificationDelegate {
var selectedUsers: [SBDUser] = []
@IBOutlet weak var selectedUserListView: UICollectionView!
@IBOutlet weak var selectedUserListHeight: NSLayoutConstraint!
@IBOutlet weak var tableView: UITableView!
var users: [SBDUser] = []
var userListQuery: SBDApplicationUserListQuery?
var refreshControl: UIRefreshControl?
var searchController: UISearchController?
var okButtonItem: UIBarButtonItem?
var cancelButtonItem: UIBarButtonItem?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
self.title = "Choose Member"
self.navigationItem.largeTitleDisplayMode = .never
self.okButtonItem = UIBarButtonItem(title: "OK(0)", style: .plain, target: self, action: #selector(CreateGroupChannelViewControllerA.clickOkButton(_:)))
self.navigationItem.rightBarButtonItem = self.okButtonItem
self.cancelButtonItem = UIBarButtonItem(title: "Cancel", style: .plain, target: self, action: #selector(CreateGroupChannelViewControllerA.clickCancelCreateGroupChannel(_:)))
self.navigationItem.leftBarButtonItem = self.cancelButtonItem
self.searchController = UISearchController(searchResultsController: nil)
self.searchController?.searchBar.delegate = self
self.searchController?.searchBar.placeholder = "User ID"
self.searchController?.obscuresBackgroundDuringPresentation = false
self.navigationItem.searchController = self.searchController
self.navigationItem.hidesSearchBarWhenScrolling = false
self.searchController?.searchBar.tintColor = UIColor(named: "color_bar_item")
self.tableView.delegate = self
self.tableView.dataSource = self
self.tableView.register(SelectableUserTableViewCell.nib(), forCellReuseIdentifier: "SelectableUserTableViewCell")
self.setupScrollView()
self.refreshControl = UIRefreshControl()
self.refreshControl?.addTarget(self, action: #selector(CreateGroupChannelViewControllerA.refreshUserList), for: .valueChanged)
self.tableView.refreshControl = self.refreshControl
self.userListQuery = nil
if self.selectedUsers.count == 0 {
self.okButtonItem?.isEnabled = false
}
else {
self.okButtonItem?.isEnabled = true
}
self.okButtonItem?.title = "OK(\(Int(self.selectedUsers.count)))"
self.refreshUserList()
}
func setupScrollView() {
self.selectedUserListView.contentInset = UIEdgeInsets.init(top: 0, left: 14, bottom: 0, right: 14)
self.selectedUserListView.delegate = self
self.selectedUserListView.dataSource = self
self.selectedUserListView.register(SelectedUserCollectionViewCell.nib(), forCellWithReuseIdentifier: SelectedUserCollectionViewCell.cellReuseIdentifier())
self.selectedUserListHeight.constant = 0
self.selectedUserListView.isHidden = true
self.selectedUserListView.showsHorizontalScrollIndicator = false
self.selectedUserListView.showsVerticalScrollIndicator = false
if let layout = self.selectedUserListView.collectionViewLayout as? UICollectionViewFlowLayout {
layout.scrollDirection = .horizontal
}
}
@objc func clickCancelCreateGroupChannel(_ sender: AnyObject) {
self.dismiss(animated: true, completion: nil)
}
@objc func clickOkButton(_ sender: AnyObject) {
performSegue(withIdentifier: "ConfigureGroupChannel", sender: self)
}
// MARK: - NotificationDelegate
func openChat(_ channelUrl: String) {
self.dismiss(animated: false) {
if let cvc = UIViewController.currentViewController() as? NotificationDelegate {
cvc.openChat(channelUrl)
}
}
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "ConfigureGroupChannel", let destination = segue.destination as? CreateGroupChannelViewControllerB{
destination.members = self.selectedUsers
}
}
// MARK: - Load users
@objc func refreshUserList() {
self.loadUserListNextPage(true)
}
func loadUserListNextPage(_ refresh: Bool) {
if refresh {
self.userListQuery = nil
}
if self.userListQuery == nil {
self.userListQuery = SBDMain.createApplicationUserListQuery()
self.userListQuery?.limit = 20
}
if self.userListQuery?.hasNext == false {
return
}
self.userListQuery?.loadNextPage(completionHandler: { (users, error) in
if error != nil {
DispatchQueue.main.async {
self.refreshControl?.endRefreshing()
}
return
}
DispatchQueue.main.async {
if refresh {
self.users.removeAll()
}
for user in users! {
if user.userId == SBDMain.getCurrentUser()!.userId {
continue
}
self.users.append(user)
}
self.tableView.reloadData()
self.refreshControl?.endRefreshing()
}
})
}
// MARK: UICollectionViewDataSource
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.selectedUsers.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = (collectionView.dequeueReusableCell(withReuseIdentifier: SelectedUserCollectionViewCell.cellReuseIdentifier(), for: indexPath)) as! SelectedUserCollectionViewCell
cell.profileImageView.setProfileImageView(for: selectedUsers[indexPath.row])
cell.nicknameLabel.text = selectedUsers[indexPath.row].nickname
return cell
}
// MARK: UICollectionViewDelegate
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
self.selectedUsers.remove(at: indexPath.row)
self.okButtonItem?.title = "OK(\(Int(self.selectedUsers.count)))"
if self.selectedUsers.count == 0 {
self.okButtonItem?.isEnabled = false
}
else {
self.okButtonItem?.isEnabled = true
}
DispatchQueue.main.async {
if self.selectedUsers.count == 0 {
self.selectedUserListHeight.constant = 0
self.selectedUserListView.isHidden = true
}
collectionView.reloadData()
self.tableView.reloadData()
}
}
// MARK: - UITableViewDataSource
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "SelectableUserTableViewCell") as! SelectableUserTableViewCell
cell.user = self.users[indexPath.row]
DispatchQueue.main.async {
if let updateCell = tableView.cellForRow(at: indexPath) as? SelectableUserTableViewCell {
updateCell.nicknameLabel.text = self.users[indexPath.row].nickname
updateCell.profileImageView.setProfileImageView(for: self.users[indexPath.row])
if let user = self.users[exists: indexPath.row] {
if self.selectedUsers.contains(user) {
updateCell.selectedUser = true
} else {
updateCell.selectedUser = false
}
}
}
}
if self.users.count > 0 && indexPath.row == self.users.count - 1 {
self.loadUserListNextPage(false)
}
return cell
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.users.count
}
// MARK: - UITableViewDelegate
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 64
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
if let user = self.users[exists: indexPath.row] {
if self.selectedUsers.contains(user) {
self.selectedUsers.removeObject(user)
} else {
self.selectedUsers.append(user)
}
}
self.okButtonItem?.title = "OK(\(Int(self.selectedUsers.count)))"
if self.selectedUsers.count == 0 {
self.okButtonItem?.isEnabled = false
}
else {
self.okButtonItem?.isEnabled = true
}
DispatchQueue.main.async {
if self.selectedUsers.count > 0 {
self.selectedUserListHeight.constant = 70
self.selectedUserListView.isHidden = false
}
else {
self.selectedUserListHeight.constant = 0
self.selectedUserListView.isHidden = true
}
self.tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
self.selectedUserListView.reloadData()
}
}
// MARK: - UISearchBarDelegate
func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
self.refreshUserList()
}
func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
if searchText.count > 0 {
self.userListQuery = SBDMain.createApplicationUserListQuery()
self.userListQuery?.userIdsFilter = [searchText]
self.userListQuery?.loadNextPage(completionHandler: { (users, error) in
if error != nil {
DispatchQueue.main.async {
self.refreshControl?.endRefreshing()
}
return
}
DispatchQueue.main.async {
self.users.removeAll()
for user in users ?? [] {
if user.userId == SBDMain.getCurrentUser()!.userId {
continue
}
self.users.append(user)
}
self.tableView.reloadData()
self.refreshControl?.endRefreshing()
}
})
}
}
}
| 37.587459 | 200 | 0.606111 |
cfa883180f464a1ef994ee94534c18cec3833578 | 23,250 | swift | Swift | ViteBusiness/Classes/Business/Market/MarketInfoService.swift | vitelabs/vite-business-ios | 76f10d45b32f12f0d1b7a14129585e1b05b8667d | [
"MIT"
] | 12 | 2019-03-22T00:37:04.000Z | 2022-03-08T01:02:28.000Z | ViteBusiness/Classes/Business/Market/MarketInfoService.swift | vitelabs/vite-business-ios | 76f10d45b32f12f0d1b7a14129585e1b05b8667d | [
"MIT"
] | null | null | null | ViteBusiness/Classes/Business/Market/MarketInfoService.swift | vitelabs/vite-business-ios | 76f10d45b32f12f0d1b7a14129585e1b05b8667d | [
"MIT"
] | 5 | 2019-06-13T02:43:01.000Z | 2022-01-08T19:05:27.000Z | //
// MarketInfoVM.swift
// Action
//
// Created by haoshenyang on 2019/10/10.
//
import UIKit
import SwiftyJSON
import RxSwift
import RxCocoa
import Alamofire
import PromiseKit
import ViteWallet
enum SortType {
case `default`
case name(mode: SortMode)
case price(mode: SortMode)
case percent(mode: SortMode)
}
enum SortMode {
case ascending
case descending
}
class MarketInfoService: NSObject {
static let shared = MarketInfoService()
let marketSocket = MarketWebSocket()
fileprivate(set) var marketLimit = MarketLimit(json: nil)
fileprivate(set) var closedSymbols = [String]()
fileprivate(set) var hiddenSymbols = [String]()
var operatorValue: [String: Any]?
private var rateMap = [String: Double]()
lazy var sortedMarketDataBehaviorRelay = { () -> BehaviorRelay<[MarketData]> in
var orignialMarketData = [
MarketData.init(categary: R.string.localizable.marketFavourite(), infos: []),
MarketData.init(categary: "BTC", infos: []),
MarketData.init(categary: "ETH", infos: []),
MarketData.init(categary: "VITE", infos: []),
MarketData.init(categary: "USDT", infos: []),
]
return BehaviorRelay<[MarketData]>(value: orignialMarketData)
}()
func marketInfo(symbol: String) -> MarketInfo? {
let infos = sortedMarketDataBehaviorRelay.value.flatMap { $0.infos }
for info in infos where info.statistic.symbol == symbol {
return info
}
return nil
}
var sortTypes: [SortType] = Array<SortType>(repeating: .default, count: 5)
override init() {
self.favouriteBehaviorRelay = BehaviorRelay(value: MarketCache.readFavourite())
super.init()
marketSocket.onNewTickerStatistics = { statistic in
let relay = self.sortedMarketDataBehaviorRelay.value
for data in relay {
for info in data.infos {
if info.statistic.symbol == statistic.symbol {
info.statistic = statistic
}
}
}
self.updateSortedMarketData(marketDatas: relay)
}
NotificationCenter.default.rx.notification(.languageChanged).asObservable()
.bind {[unowned self] _ in
let values = self.sortedMarketDataBehaviorRelay.value
values.first?.categary = R.string.localizable.marketFavourite()
self.updateSortedMarketData(marketDatas: values)
}.disposed(by: rx.disposeBag)
readCaches()
requestPageList()
marketSocket.start()
fetchLimit()
fetchMarketClosed()
fetchMarketHidden()
}
func fetchLimit() {
UnifyProvider.vitex.getLimit().done { [weak self] in
self?.marketLimit = $0
}.catch { [weak self] (e) in
guard let `self` = self else { return }
plog(level: .debug, log: e.localizedDescription, tag: .market)
GCD.delay(1) {[weak self] in
guard let `self` = self else { return }
self.fetchLimit()
}
}
}
func fetchMarketClosed() {
UnifyProvider.vitex.getMarketsClosedSymbols().done { [weak self] in
self?.closedSymbols = $0
}.catch { [weak self] (e) in
guard let `self` = self else { return }
plog(level: .debug, log: e.localizedDescription, tag: .market)
GCD.delay(1) {[weak self] in
guard let `self` = self else { return }
self.fetchMarketClosed()
}
}
}
func fetchMarketHidden() {
Alamofire
.request("https://static.vite.net/web-wallet-1257137467/uiController/main.json")
.responseJSON()
.map(on: .main) { data, response -> [String] in
return JSON(response.data)["hideSymbols"].arrayObject as? [String] ?? []
}
.done { [weak self] in
guard let `self` = self else { return }
self.hiddenSymbols = $0
self.updateSortedMarketData(marketDatas: self.sortedMarketDataBehaviorRelay.value)
}
.catch { [weak self] (e) in
guard let `self` = self else { return }
plog(level: .debug, log: e.localizedDescription, tag: .market)
GCD.delay(1) { [weak self] in
guard let `self` = self else { return }
self.fetchMarketHidden()
}
}
}
func updateSortedMarketData(marketDatas: [MarketData]) {
var ret = marketDatas
ret.forEach { marketData in
marketData.infos = marketData.infos.filter { !hiddenSymbols.contains($0.statistic.symbol) }
}
self.sortedMarketDataBehaviorRelay.accept(ret)
}
//MARK: favourite
let favouriteBehaviorRelay: BehaviorRelay<[String]>
func isFavourite(symbol: String) -> Bool {
favouriteBehaviorRelay.value.contains(symbol)
}
func addFavourite(symbol: String) {
guard !isFavourite(symbol: symbol) else { return }
var array = favouriteBehaviorRelay.value
array.append(symbol)
favouriteBehaviorRelay.accept(array)
MarketCache.saveFavourites(favourites: array)
}
func removeFavourite(symbol: String) {
guard isFavourite(symbol: symbol) else { return }
var array = favouriteBehaviorRelay.value
for (index, s) in array.enumerated() where s == symbol {
array.remove(at: index)
break
}
favouriteBehaviorRelay.accept(array)
MarketCache.saveFavourites(favourites: array)
}
var isFavouriteEmpty: Bool {
favouriteBehaviorRelay.value.isEmpty
}
}
extension MarketInfoService {
func sortByName(index: Int) {
let old = sortTypes[index]
let new: SortType
switch old {
case .default, .price, .percent:
new = .name(mode: .descending)
case .name(let mode):
switch mode {
case .ascending:
new = .default
case .descending:
new = .name(mode: .ascending)
}
}
sortTypes[index] = new
let sorted = self.sortedMarketDatas(sortedMarketDataBehaviorRelay.value)
self.updateSortedMarketData(marketDatas: sorted)
}
func sortByPrice(index: Int) {
let old = sortTypes[index]
let new: SortType
switch old {
case .default, .name, .percent:
new = .price(mode: .ascending)
case .price(let mode):
switch mode {
case .ascending:
new = .price(mode: .descending)
case .descending:
new = .default
}
}
sortTypes[index] = new
let sorted = self.sortedMarketDatas(sortedMarketDataBehaviorRelay.value)
self.updateSortedMarketData(marketDatas: sorted)
}
func sortByPercent(index: Int) {
let old = sortTypes[index]
let new: SortType
switch old {
case .default, .name, .price:
new = .percent(mode: .ascending)
case .percent(let mode):
switch mode {
case .ascending:
new = .percent(mode: .descending)
case .descending:
new = .default
}
}
sortTypes[index] = new
let sorted = self.sortedMarketDatas(sortedMarketDataBehaviorRelay.value)
self.updateSortedMarketData(marketDatas: sorted)
}
func sortedMarketDatas(_ datas:[MarketData]) -> [MarketData] {
for (index, data) in datas.enumerated() {
let config = sortTypes[index]
data.sortType = config
switch config {
case .default:
if index == 0 {
datas[index].infos = datas[index].infos.sorted(by: { (info0, info1) -> Bool in
let p0 = self.favouriteBehaviorRelay.value.index(of: info0.statistic.symbol) ?? 0
let p1 = self.favouriteBehaviorRelay.value.index(of: info1.statistic.symbol) ?? 0
return p0 < p1
})
} else {
datas[index].infos = datas[index].infos.sorted(by: { (info0, info1) -> Bool in
let p0 = Double(info0.statistic.amount ?? "") ?? 0
let p1 = Double(info1.statistic.amount ?? "") ?? 0
return p0 > p1
})
}
case .name(let mode):
datas[index].infos = datas[index].infos.sorted(by: { (info0, info1) -> Bool in
let p0 = info0.statistic.symbol
let p1 = info1.statistic.symbol
if mode == .ascending {
return p0 > p1
} else {
return p0 < p1
}
})
case .price(let mode):
datas[index].infos = datas[index].infos.sorted(by: { (info0, info1) -> Bool in
let p0 = Double(info0.statistic.closePrice) ?? 0
let p1 = Double(info1.statistic.closePrice) ?? 0
if mode == .ascending {
return p0 > p1
} else {
return p0 < p1
}
})
case .percent(let mode):
datas[index].infos = datas[index].infos.sorted(by: { (info0, info1) -> Bool in
let p0 = Double(info0.statistic.priceChangePercent) ?? 0
let p1 = Double(info1.statistic.priceChangePercent) ?? 0
if mode == .ascending {
return p0 > p1
} else {
return p0 < p1
}
})
}
}
return datas
}
}
extension MarketInfoService {
func requestPageList() {
let ticker = Alamofire
.request( ViteConst.instance.vite.x + "/api/v2/ticker/24hr",
parameters: ["quoteTokenCategory":"VITE,ETH,BTC,USDT"])
.responseJSON()
.map(on: .main) { data, response -> [[String: Any]] in
return JSON(response.data)["data"].arrayObject as? [[String: Any]] ?? []
}
var tokenIDs = "tti_b90c9baffffc9dae58d1f33f,tti_687d8a93915393b219212c73,tti_5649544520544f4b454e6e40,tti_80f3751485e4e83456059473"
#if DEBUG || TEST
switch DebugService.instance.config.appEnvironment {
case .test, .custom:
tokenIDs = "tti_322862b3f8edae3b02b110b1,tti_06822f8d096ecdf9356b666c,tti_5649544520544f4b454e6e40,tti_973afc9ffd18c4679de42e93"
case .stage, .online:
break
}
#endif
let rate = Alamofire
.request(ViteConst.instance.vite.x + "/api/v2/exchange-rate",
parameters: ["tokenIds":tokenIDs])
.responseJSON()
.map(on: .main) { data, response -> [[String: Any]] in
return JSON(response.data)["data"].arrayObject as? [[String: Any]] ?? []
}
let mining = Promise<[String: Any]> { seal in
Alamofire
.request(ViteConst.instance.vite.x + "/api/v1/mining/setting")
.responseJSON()
.map(on: .main) { (arg) -> [String: Any] in
let (_, response) = arg
return JSON(response.data)["data"].dictionaryObject as? [String: Any] ?? MarketCache.readMiningCache()
}
.done { (dict) in
seal.fulfill(dict)
}
.catch { (e) in
seal.fulfill(MarketCache.readMiningCache())
}
}
when(fulfilled: ticker, rate, mining)
.done { [weak self] t, r, m in
MarketCache.saveTickerCache(data: t)
MarketCache.saveRateCache(data: r)
MarketCache.saveMiningCache(data: m)
self?.loadOperatorIfNeeded()
self?.handleData(t,r,m)
}
.catch { (e) in
}
}
func readCaches() {
let t = MarketCache.readTickerCache()
let r = MarketCache.readRateCache()
let m = MarketCache.readMiningCache()
handleData(t, r, m)
}
func legalPrice(quoteTokenSymbol: String, price: String) -> String {
guard let rate = rateMap[quoteTokenSymbol] else { return "--" }
return rateString(price: price, rate: rate, currency: AppSettingsService.instance.appSettings.currency)
}
func handleData(_ t: [[String: Any]], _ r: [[String: Any]], _ m: [String: Any]) {
let tradeMiningSymbols = Set(m["tradeSymbols"] as? [String] ?? [])
let orderMiningSymbols = Set(m["orderSymbols"] as? [String] ?? [])
let bothMiningSymbols = tradeMiningSymbols.intersection(orderMiningSymbols)
let miningMultiplesMap = m["orderMiningMultiples"] as? [String: String] ?? [:]
let orderMiningSettings = m["orderMiningSettings"] as? [String: [String: String]] ?? [:]
let zeroFeePairs = Set(m["zeroFeePairs"] as? [String] ?? [])
let marketDatas = [
MarketData.init(categary: R.string.localizable.marketFavourite(), infos: []),
MarketData.init(categary: "BTC", infos: []),
MarketData.init(categary: "ETH", infos: []),
MarketData.init(categary: "VITE", infos: []),
MarketData.init(categary: "USDT", infos: []),
]
let currency = AppSettingsService.instance.appSettings.currency
var rateMap = [String: Double]()
for i in r {
guard let key = JSON(i)["tokenSymbol"].string else { return }
switch currency {
case .USD:
rateMap[key] = JSON(i)["usdRate"].double
case .CNY:
rateMap[key] = JSON(i)["cnyRate"].double
case .RUB:
rateMap[key] = Double(JSON(i)["rubRate"].string ?? "0")
case .KRW:
rateMap[key] = Double(JSON(i)["krwRate"].string ?? "0")
case .TRY:
rateMap[key] = Double(JSON(i)["tryRate"].string ?? "0")
case .VND:
rateMap[key] = Double(JSON(i)["vndRate"].string ?? "0")
case .EUR:
rateMap[key] = Double(JSON(i)["eurRate"].string ?? "0")
case .GBP:
rateMap[key] = Double(JSON(i)["gbpRate"].string ?? "0")
}
}
self.rateMap = rateMap
let favourite = MarketCache.readFavourite()
for item in t {
var i = item
let json = JSON(i)["priceChangePercent"]
i["priceChangePercent"] = json.string ?? String(json.double ?? 0)
guard let statistic = TickerStatisticsProto(dict: i) else {
continue
}
let info = MarketInfo()
info.statistic = statistic
if bothMiningSymbols.contains(statistic.symbol) {
info.miningType = .both
} else if tradeMiningSymbols.contains(statistic.symbol) {
info.miningType = .trade
} else if orderMiningSymbols.contains(statistic.symbol) {
info.miningType = .order
} else {
info.miningType = .none
}
info.miningMultiples = miningMultiplesMap[statistic.symbol] ?? ""
info.isZeroFee = zeroFeePairs.contains(statistic.symbol)
if let rate = rateMap[info.statistic.quoteTokenSymbol] {
info.rate = rateString(price: info.statistic.closePrice, rate: rate, currency: currency)
}
info.operatorName = self.operatorValue?[info.statistic.symbol] as? String ?? "--"
if let string = orderMiningSettings[info.statistic.symbol]?["buyRangeMax"], let max = Double(string) {
info.buyRangeMax = max
} else {
info.buyRangeMax = nil
}
if let string = orderMiningSettings[info.statistic.symbol]?["sellRangeMax"], let max = Double(string) {
info.sellRangeMax = max
} else {
info.sellRangeMax = nil
}
let indexs = ["BTC-000": 1, "ETH-000": 2, "VITE":3, "USDT-000":4]
if let index = indexs[statistic.quoteTokenSymbol] {
marketDatas[index].infos.append(info)
}
if favourite.contains(statistic.symbol) {
marketDatas[0].infos.append(info)
}
}
let sorted = sortedMarketDatas(marketDatas)
self.updateSortedMarketData(marketDatas: sorted)
}
func rateString(price: String?, rate:Double?, currency: CurrencyCode?) -> String {
guard let price = Double(price ?? "0"),
let rate = rate else { return "" }
let currencySymble = currency?.symbol ?? ""
let money = price * rate
return String(format: "\(currencySymble)%.6f", money)
}
func loadOperatorIfNeeded() {
if self.operatorValue != nil { return }
let pairs = self.sortedMarketDataBehaviorRelay.value.dropFirst().reduce([]) { (result, marekData) -> [String] in
let arr = marekData.infos.map { $0.statistic.symbol ?? "" }
return result + arr
}
var request = URLRequest(url: URL.init(string: ViteConst.instance.vite.x + "/api/v1/operator/tradepair")!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let values = pairs
request.httpBody = try! JSONSerialization.data(withJSONObject: values)
let operate = Alamofire
.request(request)
.responseJSON()
.map(on: .main) { (arg) -> [String: Any] in
let (_, response) = arg
return JSON(response.data)["data"].dictionaryObject as? [String: Any] ?? [:]
}
.done {
self.operatorValue = $0.mapValues({ (json) -> String in
return JSON(json)["name"].string ?? "--"
})
var relayValue = self.sortedMarketDataBehaviorRelay.value
relayValue = relayValue.map { (data) -> MarketData in
data.infos = data.infos.map { info -> MarketInfo in
info.operatorName = self.operatorValue?[info.statistic.symbol] as? String ?? "--"
return info
}
return data
}
self.updateSortedMarketData(marketDatas: relayValue)
}
}
}
public class MarketInfo {
enum MiningType {
case none
case trade
case order
case both
}
public var statistic: TickerStatisticsProto!
var miningType: MiningType = .none
var rate = ""
var operatorName = "--"
var miningMultiples: String = ""
var buyRangeMax: Double? = nil
var sellRangeMax: Double? = nil
var isClosed: Bool { MarketInfoService.shared.closedSymbols.contains(statistic.symbol) }
var isZeroFee: Bool = false
private(set) lazy var vitexURL: URL = {
let tickerStatistics = self.statistic!
var url = ViteConst.instance.market.baseWebUrl + "#/index"
url = url + "?address=" + (HDWalletManager.instance.account?.address ?? "")
url = url + "¤cy=" + AppSettingsService.instance.appSettings.currency.rawValue
url = url + "&lang=" + LocalizationService.sharedInstance.currentLanguage.rawValue
url = url + "&category=" + (tickerStatistics.quoteTokenSymbol.components(separatedBy: "-").first ?? "")
url = url + "&symbol=" + tickerStatistics.symbol
url = url + "&tradeTokenId=" + tickerStatistics.tradeToken
url = url + ""eTokenId=" + tickerStatistics.quoteToken
return URL.init(string: url)!
}()
}
extension MarketInfo {
var miningImage: UIImage? {
switch miningType {
case .trade:
return R.image.market_mining_trade()
case .order:
return R.image.market_mining_order()
case .both:
return R.image.market_mining_both()
case .none:
return nil
}
}
var persentString: String {
let priceChangePercent = Double(statistic.priceChangePercent)! * 100
return (priceChangePercent >= 0.0 ? "+" : "-") + String(format: "%.2f", abs(priceChangePercent)) + "%"
}
var persentColor: UIColor {
return Double(statistic.priceChangePercent)! >= 0.0 ? UIColor.init(netHex: 0x01D764) : UIColor.init(netHex: 0xE5494D)
}
}
class MarketData {
init(categary: String,infos: [MarketInfo]) {
self.categary = categary
self.infos = infos
}
var categary = ""
var infos = [MarketInfo]()
var sortType = SortType.default
}
extension TickerStatisticsProto {
init?(dict: [String: Any]) {
self.init()
guard let symbol = dict["symbol"] as? String,
let tradeTokenSymbol = dict["tradeTokenSymbol"] as? String,
let quoteTokenSymbol = dict["quoteTokenSymbol"] as? String,
let tradeToken = dict["tradeToken"] as? String,
let quoteToken = dict["quoteToken"] as? String,
let openPrice = dict["openPrice"] as? String,
let prevClosePrice = dict["prevClosePrice"] as? String,
let closePrice = dict["closePrice"] as? String,
let priceChange = dict["priceChange"] as? String,
let priceChangePercent = dict["priceChangePercent"] as? String,
let highPrice = dict["highPrice"] as? String,
let lowPrice = dict["lowPrice"] as? String,
let quantity = dict["quantity"] as? String,
let amount = dict["amount"] as? String,
let pricePrecision = dict["pricePrecision"] as? Int32,
let quantityPrecision = dict["quantityPrecision"] as? Int32 else {
return nil
}
self.symbol = symbol
self.tradeTokenSymbol = tradeTokenSymbol
self.quoteTokenSymbol = quoteTokenSymbol
self.tradeToken = tradeToken
self.quoteToken = quoteToken
self.openPrice = openPrice
self.prevClosePrice = prevClosePrice
self.closePrice = closePrice
self.priceChange = priceChange
self.priceChangePercent = priceChangePercent
self.highPrice = highPrice
self.lowPrice = lowPrice
self.quantity = quantity
self.amount = amount
self.pricePrecision = pricePrecision
self.quantityPrecision = quantityPrecision
}
var tradeTokenSymbolWithoutIndex : String {
tradeTokenSymbol.components(separatedBy: "-").first ?? tradeTokenSymbol
}
var quoteTokenSymbolWithoutIndex : String {
quoteTokenSymbol.components(separatedBy: "-").first ?? quoteTokenSymbol
}
}
| 37.140575 | 143 | 0.560086 |
7f71cbe433c036979c34a5b4ae61e08bb7506853 | 19,087 | rs | Rust | src/decompress.rs | lengyijun/rust-snappy | bec32a9cd6cbd7476e30de67bcde49a5c091341a | [
"BSD-3-Clause"
] | null | null | null | src/decompress.rs | lengyijun/rust-snappy | bec32a9cd6cbd7476e30de67bcde49a5c091341a | [
"BSD-3-Clause"
] | null | null | null | src/decompress.rs | lengyijun/rust-snappy | bec32a9cd6cbd7476e30de67bcde49a5c091341a | [
"BSD-3-Clause"
] | null | null | null | use std::prelude::v1::*;
use std::ptr;
use crate::bytes;
use crate::error::{Error, Result};
use crate::tag;
use crate::MAX_INPUT_SIZE;
/// A lookup table for quickly computing the various attributes derived from a
/// tag byte.
const TAG_LOOKUP_TABLE: TagLookupTable = TagLookupTable(tag::TAG_LOOKUP_TABLE);
/// `WORD_MASK` is a map from the size of an integer in bytes to its
/// corresponding on a 32 bit integer. This is used when we need to read an
/// integer and we know there are at least 4 bytes to read from a buffer. In
/// this case, we can read a 32 bit little endian integer and mask out only the
/// bits we need. This in particular saves a branch.
const WORD_MASK: [usize; 5] = [0, 0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF];
/// Returns the decompressed size (in bytes) of the compressed bytes given.
///
/// `input` must be a sequence of bytes returned by a conforming Snappy
/// compressor.
///
/// # Errors
///
/// This function returns an error in the following circumstances:
///
/// * An invalid Snappy header was seen.
/// * The total space required for decompression exceeds `2^32 - 1`.
pub fn decompress_len(input: &[u8]) -> Result<usize> {
if input.is_empty() {
return Ok(0);
}
Ok(Header::read(input)?.decompress_len)
}
/// Decoder is a raw decoder for decompressing bytes in the Snappy format.
///
/// This decoder does not use the Snappy frame format and simply decompresses
/// the given bytes as if it were returned from `Encoder`.
///
/// Unless you explicitly need the low-level control, you should use
/// [`read::FrameDecoder`](../read/struct.FrameDecoder.html)
/// instead, which decompresses the Snappy frame format.
#[derive(Clone, Debug, Default)]
pub struct Decoder {
// Place holder for potential future fields.
_dummy: (),
}
impl Decoder {
/// Return a new decoder that can be used for decompressing bytes.
pub fn new() -> Decoder {
Decoder { _dummy: () }
}
/// Decompresses all bytes in `input` into `output`.
///
/// `input` must be a sequence of bytes returned by a conforming Snappy
/// compressor.
///
/// The size of `output` must be large enough to hold all decompressed
/// bytes from the `input`. The size required can be queried with the
/// `decompress_len` function.
///
/// On success, this returns the number of bytes written to `output`.
///
/// # Errors
///
/// This method returns an error in the following circumstances:
///
/// * Invalid compressed Snappy data was seen.
/// * The total space required for decompression exceeds `2^32 - 1`.
/// * `output` has length less than `decompress_len(input)`.
pub fn decompress(
&mut self,
input: &[u8],
output: &mut [u8],
) -> Result<usize> {
if input.is_empty() {
return Err(Error::Empty);
}
let hdr = Header::read(input)?;
if hdr.decompress_len > output.len() {
return Err(Error::BufferTooSmall {
given: output.len() as u64,
min: hdr.decompress_len as u64,
});
}
let dst = &mut output[..hdr.decompress_len];
let mut dec =
Decompress { src: &input[hdr.len..], s: 0, dst: dst, d: 0 };
dec.decompress()?;
Ok(dec.dst.len())
}
/// Decompresses all bytes in `input` into a freshly allocated `Vec`.
///
/// This is just like the `decompress` method, except it allocates a `Vec`
/// with the right size for you. (This is intended to be a convenience
/// method.)
///
/// This method returns an error under the same circumstances that
/// `decompress` does.
pub fn decompress_vec(&mut self, input: &[u8]) -> Result<Vec<u8>> {
let mut buf = vec![0; decompress_len(input)?];
let n = self.decompress(input, &mut buf)?;
buf.truncate(n);
Ok(buf)
}
}
/// Decompress is the state of the Snappy compressor.
struct Decompress<'s, 'd> {
/// The original compressed bytes not including the header.
src: &'s [u8],
/// The current position in the compressed bytes.
s: usize,
/// The output buffer to write the decompressed bytes.
dst: &'d mut [u8],
/// The current position in the decompressed buffer.
d: usize,
}
impl<'s, 'd> Decompress<'s, 'd> {
/// Decompresses snappy compressed bytes in `src` to `dst`.
///
/// This assumes that the header has already been read and that `dst` is
/// big enough to store all decompressed bytes.
fn decompress(&mut self) -> Result<()> {
while self.s < self.src.len() {
let byte = self.src[self.s];
self.s += 1;
if byte & 0b000000_11 == 0 {
let len = (byte >> 2) as usize + 1;
self.read_literal(len)?;
} else {
self.read_copy(byte)?;
}
}
if self.d != self.dst.len() {
return Err(Error::HeaderMismatch {
expected_len: self.dst.len() as u64,
got_len: self.d as u64,
});
}
Ok(())
}
/// Decompresses a literal from `src` starting at `s` to `dst` starting at
/// `d` and returns the updated values of `s` and `d`. `s` should point to
/// the byte immediately proceding the literal tag byte.
///
/// `len` is the length of the literal if it's <=60. Otherwise, it's the
/// length tag, indicating the number of bytes needed to read a little
/// endian integer at `src[s..]`. i.e., `61 => 1 byte`, `62 => 2 bytes`,
/// `63 => 3 bytes` and `64 => 4 bytes`.
///
/// `len` must be <=64.
#[inline(always)]
fn read_literal(&mut self, len: usize) -> Result<()> {
debug_assert!(len <= 64);
let mut len = len as u64;
// As an optimization for the common case, if the literal length is
// <=16 and we have enough room in both `src` and `dst`, copy the
// literal using unaligned loads and stores.
//
// We pick 16 bytes with the hope that it optimizes down to a 128 bit
// load/store.
if len <= 16
&& self.s + 16 <= self.src.len()
&& self.d + 16 <= self.dst.len()
{
unsafe {
// SAFETY: We know both src and dst have at least 16 bytes of
// wiggle room after s/d, even if `len` is <16, so the copy is
// safe.
let srcp = self.src.as_ptr().add(self.s);
let dstp = self.dst.as_mut_ptr().add(self.d);
// Hopefully uses SIMD registers for 128 bit load/store.
ptr::copy_nonoverlapping(srcp, dstp, 16);
}
self.d += len as usize;
self.s += len as usize;
return Ok(());
}
// When the length is bigger than 60, it indicates that we need to read
// an additional 1-4 bytes to get the real length of the literal.
if len >= 61 {
// If there aren't at least 4 bytes left to read then we know this
// is corrupt because the literal must have length >=61.
if self.s as u64 + 4 > self.src.len() as u64 {
return Err(Error::Literal {
len: 4,
src_len: (self.src.len() - self.s) as u64,
dst_len: (self.dst.len() - self.d) as u64,
});
}
// Since we know there are 4 bytes left to read, read a 32 bit LE
// integer and mask away the bits we don't need.
let byte_count = len as usize - 60;
len = bytes::read_u32_le(&self.src[self.s..]) as u64;
len = (len & (WORD_MASK[byte_count] as u64)) + 1;
self.s += byte_count;
}
// If there's not enough buffer left to load or store this literal,
// then the input is corrupt.
// if self.s + len > self.src.len() || self.d + len > self.dst.len() {
if ((self.src.len() - self.s) as u64) < len
|| ((self.dst.len() - self.d) as u64) < len
{
return Err(Error::Literal {
len: len,
src_len: (self.src.len() - self.s) as u64,
dst_len: (self.dst.len() - self.d) as u64,
});
}
unsafe {
// SAFETY: We've already checked the bounds, so we know this copy
// is correct.
let srcp = self.src.as_ptr().add(self.s);
let dstp = self.dst.as_mut_ptr().add(self.d);
ptr::copy_nonoverlapping(srcp, dstp, len as usize);
}
self.s += len as usize;
self.d += len as usize;
Ok(())
}
/// Reads a copy from `src` and writes the decompressed bytes to `dst`. `s`
/// should point to the byte immediately proceding the copy tag byte.
#[inline(always)]
fn read_copy(&mut self, tag_byte: u8) -> Result<()> {
// Find the copy offset and len, then advance the input past the copy.
// The rest of this function deals with reading/writing to output only.
let entry = TAG_LOOKUP_TABLE.entry(tag_byte);
let offset = entry.offset(self.src, self.s)?;
let len = entry.len();
self.s += entry.num_tag_bytes();
// What we really care about here is whether `d == 0` or `d < offset`.
// To save an extra branch, use `d < offset - 1` instead. If `d` is
// `0`, then `offset.wrapping_sub(1)` will be usize::MAX which is also
// the max value of `d`.
if self.d <= offset.wrapping_sub(1) {
return Err(Error::Offset {
offset: offset as u64,
dst_pos: self.d as u64,
});
}
// When all is said and done, dst is advanced to end.
let end = self.d + len;
// When the copy is small and the offset is at least 8 bytes away from
// `d`, then we can decompress the copy with two 64 bit unaligned
// loads/stores.
if offset >= 8 && len <= 16 && self.d + 16 <= self.dst.len() {
unsafe {
// SAFETY: We know dstp points to at least 16 bytes of memory
// from the condition above, and we also know that dstp is
// preceded by at least `offset` bytes from the `d <= offset`
// check above.
//
// We also know that dstp and dstp-8 do not overlap from the
// check above, justifying the use of copy_nonoverlapping.
let dstp = self.dst.as_mut_ptr().add(self.d);
let srcp = dstp.sub(offset);
// We can't do a single 16 byte load/store because src/dst may
// overlap with each other. Namely, the second copy here may
// copy bytes written in the first copy!
ptr::copy_nonoverlapping(srcp, dstp, 8);
ptr::copy_nonoverlapping(srcp.add(8), dstp.add(8), 8);
}
// If we have some wiggle room, try to decompress the copy 16 bytes
// at a time with 128 bit unaligned loads/stores. Remember, we can't
// just do a memcpy because decompressing copies may require copying
// overlapping memory.
//
// We need the extra wiggle room to make effective use of 128 bit
// loads/stores. Even if the store ends up copying more data than we
// need, we're careful to advance `d` by the correct amount at the end.
} else if end + 24 <= self.dst.len() {
unsafe {
// SAFETY: We know that dstp is preceded by at least `offset`
// bytes from the `d <= offset` check above.
//
// We don't know whether dstp overlaps with srcp, so we start
// by copying from srcp to dstp until they no longer overlap.
// The worst case is when dstp-src = 3 and copy length = 1. The
// first loop will issue these copy operations before stopping:
//
// [-1, 14] -> [0, 15]
// [-1, 14] -> [3, 18]
// [-1, 14] -> [9, 24]
//
// But the copy had length 1, so it was only supposed to write
// to [0, 0]. But the last copy wrote to [9, 24], which is 24
// extra bytes in dst *beyond* the end of the copy, which is
// guaranteed by the conditional above.
let mut dstp = self.dst.as_mut_ptr().add(self.d);
let mut srcp = dstp.sub(offset);
loop {
debug_assert!(dstp >= srcp);
let diff = (dstp as usize) - (srcp as usize);
if diff >= 16 {
break;
}
// srcp and dstp can overlap, so use ptr::copy.
debug_assert!(self.d + 16 <= self.dst.len());
ptr::copy(srcp, dstp, 16);
self.d += diff as usize;
dstp = dstp.add(diff);
}
while self.d < end {
ptr::copy_nonoverlapping(srcp, dstp, 16);
srcp = srcp.add(16);
dstp = dstp.add(16);
self.d += 16;
}
// At this point, `d` is likely wrong. We correct it before
// returning. It's correct value is `end`.
}
} else {
if end > self.dst.len() {
return Err(Error::CopyWrite {
len: len as u64,
dst_len: (self.dst.len() - self.d) as u64,
});
}
// Finally, the slow byte-by-byte case, which should only be used
// for the last few bytes of decompression.
while self.d != end {
self.dst[self.d] = self.dst[self.d - offset];
self.d += 1;
}
}
self.d = end;
Ok(())
}
}
/// Header represents the single varint that starts every Snappy compressed
/// block.
#[derive(Debug)]
struct Header {
/// The length of the header in bytes (i.e., the varint).
len: usize,
/// The length of the original decompressed input in bytes.
decompress_len: usize,
}
impl Header {
/// Reads the varint header from the given input.
///
/// If there was a problem reading the header then an error is returned.
/// If a header is returned then it is guaranteed to be valid.
#[inline(always)]
fn read(input: &[u8]) -> Result<Header> {
let (decompress_len, header_len) = bytes::read_varu64(input);
if header_len == 0 {
return Err(Error::Header);
}
if decompress_len > MAX_INPUT_SIZE {
return Err(Error::TooBig {
given: decompress_len as u64,
max: MAX_INPUT_SIZE,
});
}
Ok(Header { len: header_len, decompress_len: decompress_len as usize })
}
}
/// A lookup table for quickly computing the various attributes derived from
/// a tag byte. The attributes are most useful for the three "copy" tags
/// and include the length of the copy, part of the offset (for copy 1-byte
/// only) and the total number of bytes proceding the tag byte that encode
/// the other part of the offset (1 for copy 1, 2 for copy 2 and 4 for copy 4).
///
/// More specifically, the keys of the table are u8s and the values are u16s.
/// The bits of the values are laid out as follows:
///
/// xxaa abbb xxcc cccc
///
/// Where `a` is the number of bytes, `b` are the three bits of the offset
/// for copy 1 (the other 8 bits are in the byte proceding the tag byte; for
/// copy 2 and copy 4, `b = 0`), and `c` is the length of the copy (max of 64).
///
/// We could pack this in fewer bits, but the position of the three `b` bits
/// lines up with the most significant three bits in the total offset for copy
/// 1, which avoids an extra shift instruction.
///
/// In sum, this table is useful because it reduces branches and various
/// arithmetic operations.
struct TagLookupTable([u16; 256]);
impl TagLookupTable {
/// Look up the tag entry given the tag `byte`.
#[inline(always)]
fn entry(&self, byte: u8) -> TagEntry {
TagEntry(self.0[byte as usize] as usize)
}
}
/// Represents a single entry in the tag lookup table.
///
/// See the documentation in `TagLookupTable` for the bit layout.
///
/// The type is a `usize` for convenience.
struct TagEntry(usize);
impl TagEntry {
/// Return the total number of bytes proceding this tag byte required to
/// encode the offset.
fn num_tag_bytes(&self) -> usize {
self.0 >> 11
}
/// Return the total copy length, capped at 64.
fn len(&self) -> usize {
self.0 & 0xFF
}
/// Return the copy offset corresponding to this copy operation. `s` should
/// point to the position just after the tag byte that this entry was read
/// from.
///
/// This requires reading from the compressed input since the offset is
/// encoded in bytes proceding the tag byte.
fn offset(&self, src: &[u8], s: usize) -> Result<usize> {
let num_tag_bytes = self.num_tag_bytes();
let trailer =
// It is critical for this case to come first, since it is the
// fast path. We really hope that this case gets branch
// predicted.
if s + 4 <= src.len() {
unsafe {
// SAFETY: The conditional above guarantees that
// src[s..s+4] is valid to read from.
let p = src.as_ptr().add(s);
// We use WORD_MASK here to mask out the bits we don't
// need. While we're guaranteed to read 4 valid bytes,
// not all of those bytes are necessarily part of the
// offset. This is the key optimization: we don't need to
// branch on num_tag_bytes.
bytes::loadu_u32_le(p) as usize & WORD_MASK[num_tag_bytes]
}
} else if num_tag_bytes == 1 {
if s >= src.len() {
return Err(Error::CopyRead {
len: 1,
src_len: (src.len() - s) as u64,
});
}
src[s] as usize
} else if num_tag_bytes == 2 {
if s + 1 >= src.len() {
return Err(Error::CopyRead {
len: 2,
src_len: (src.len() - s) as u64,
});
}
bytes::read_u16_le(&src[s..]) as usize
} else {
return Err(Error::CopyRead {
len: num_tag_bytes as u64,
src_len: (src.len() - s) as u64,
});
};
Ok((self.0 & 0b0000_0111_0000_0000) | trailer)
}
}
| 40.438559 | 79 | 0.54765 |
9d1a5c00314781deed17e0734fa70f64d29ec595 | 3,131 | html | HTML | ukpsummarizer-be/cplex/cplex/matlab/x86-64_linux/help/topics/gs_integrate.html | UKPLab/vldb2018-sherlock | 74f34ca074e72ad9137b60f921588585256e0eac | [
"Apache-2.0"
] | 2 | 2018-11-26T01:49:30.000Z | 2019-01-31T10:04:00.000Z | ukpsummarizer-be/cplex/cplex/matlab/x86-64_linux/help/topics/gs_integrate.html | AIPHES/vldb2018-sherlock | 3746efa35c4c1769cc4aaeb15aeb9453564e1226 | [
"Apache-2.0"
] | null | null | null | ukpsummarizer-be/cplex/cplex/matlab/x86-64_linux/help/topics/gs_integrate.html | AIPHES/vldb2018-sherlock | 3746efa35c4c1769cc4aaeb15aeb9453564e1226 | [
"Apache-2.0"
] | 4 | 2018-11-06T16:12:55.000Z | 2019-08-21T13:22:32.000Z | <?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en-us" lang="en-us">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="copyright" content="© Copyright IBM Corporation 2017" />
<meta name="DC.Rights.Owner" content="© Copyright IBM Corporation 2017" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta name="DC.Type" content="topic" />
<meta name="DC.Title" content="Integration with MATLAB" />
<meta name="abstract" content="The menu items and windows used to solve optimization models are described." />
<meta name="Description" content="The menu items and windows used to solve optimization models are described." />
<meta name="DC.Relation" scheme="URI" content="../topics/gs.html" />
<meta name="DC.Date" scheme="iso8601" content="2017-08-29" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="uV5TkuTY" />
<meta name="DC.Language" content="en-us" />
<meta name="IBM.Country" content="ZZ" />
<!-- Licensed Materials - Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href=".././ibmdita.css" />
<link rel="stylesheet" type="text/css" href=".././swg_info_common_opti.css" />
<link rel="Start" href="../topics/gs.html" />
<title>Integration with MATLAB</title>
</head>
<body id="uV5TkuTY"><div role="main">
<h1 class="title topictitle1">Integration with MATLAB</h1>
<div class="body"><p class="shortdesc">The menu items and windows used to solve optimization
models are described.</p>
<p class="p">CPLEX® for
MATLAB should be integrated into your MATLAB environment in order
for you to take full advantage of its features.</p>
<p class="p">When you have installed CPLEX for MATLAB and set the paths as described in the <samp class="ph codeph">readme.html</samp> file, a new item is added to the Toolboxes
section of the MATLAB <strong class="ph b">Start Button</strong>. You can use the
items on this menu to find more help about using CPLEX.</p>
<p class="p">In addition, the online manuals for CPLEX for MATLAB have been added to
the MATLAB Product Help, available from the drop down menu <strong class="ph b">Help >
Product Help</strong>.</p>
<p class="p">Within the MATLAB Command Window, inline help is available
for the CPLEX classes
and functions. For example typing 'help cplexlp' will display information
about the function <samp class="ph codeph">cplexlp</samp>.</p>
</div>
<div class="related-links">
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/gs.html" title="As you install and get started using CPLEX for MATLAB, you can refer to this guide for more information on installation, licensing, and integration with MATLAB.">Getting started with CPLEX for MATLAB</a></div>
</div>
</div></div></body>
</html> | 59.075472 | 312 | 0.724689 |
d0e78e63f1bc677606dc7466449e7e652f4229a5 | 5,623 | css | CSS | data/train/css/d0e78e63f1bc677606dc7466449e7e652f4229a5ApiDoc.css | aliostad/deep-learning-lang-detection | d6b031f3ebc690cf2ffd0ae1b08ffa8fb3b38a62 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/css/d0e78e63f1bc677606dc7466449e7e652f4229a5ApiDoc.css | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/css/d0e78e63f1bc677606dc7466449e7e652f4229a5ApiDoc.css | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | /*Start: Help Content Layout*/
.main {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row;
flex-flow: row;
height: 100%;
top: 70px;
}
.main .apiNav {
background: #dddddd;
/*border-right: 1px solid #dddddd;*/
-webkit-flex: 1 6 11%;
flex: 1 6 11%;
-webkit-order: 1;
order: 1;
}
.main .apiList {
padding: 5px;
background: #F9F9F9;
-webkit-flex: 3 1 30%;
flex: 3 1 30%;
-webkit-order: 2;
order: 2;
overflow-y: scroll;
}
.main .apiDetails {
padding: 5px;
background: #4e575e;/*#54585a;*/
-webkit-flex: 1 6 50%;
flex: 1 6 50%;
-webkit-order: 3;
order: 3;
overflow-y: scroll;
}
/* Too narrow to support three columns */
@media all and (max-width: 640px) {
.main {
-webkit-flex-flow: column;
flex-direction: column;
}
.main .apiNav, .main .apiList, .main .apiDetails {
/* Return them to document order */
-webkit-order: 0;
order: 0;
}
.main .apiNav, .main .apiList, .main .apiDetails {
min-height: 50px;
max-height: 50px;
}
}
/*End: Help Content Layout*/
/*Start: Left Navigation*/
.apiNav ul {
line-height: 26px;
}
.apiNav ul li {
width: 100%;
clear:left; /* clear contents of inner span, which will be floated left */
overflow: hidden; /* clear contents of inner span, which will be floated left */
padding-left: 2px;
font-size: 14px;
}
.apiNav ul li:first-child {
margin: 0px 0px 5px 0px;
font-size: 18px;
background: #0096d6;
border-left: 10px solid #ffa400;
width: 95%;
}
.apiNav ul li span{
display: block;
float: left; /* cause width of each span to take up only as much space as needed */
min-width: 0px; /* animated property. Explicit min-width defined so animation works. */
margin-bottom: 5px;
padding: 8px;
color: #054c70;
}
.apiNav ul li:hover span{
background: #ffa400;
border-left: 8px solid #0096d6;
min-width: 80%; /* animated property. Set to desired final length of background */
-webkit-box-shadow: 0 0 5px #54585a;
-moz-box-shadow: 0 0 5px #54585a;
box-shadow: 0 0 5px #54585a;
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
color: #FFFFFF;
}
/*End: Left Navigation*/
/*Start: API List*/
/*Start: HTTP Method Styling*/
.apiList .help-page-table {
width: 100%;
border-collapse: collapse;
text-align: left;
margin: 0px 0px 20px 0px;
/*border-top: 2px solid #D4D4D4;*/
color: #000000;
font-size: 14px;
}
.apiList .help-page-table th {
text-align: left;
font-weight: bold;
/*border-bottom: 2px solid #D4D4D4;*/
padding: 8px 6px 8px 6px;
}
.apiList .help-page-table td {
/*border-bottom: 2px solid #D4D4D4;*/
padding: 15px 8px 15px 8px;
vertical-align: top;
}
.apiList .help-page-table pre, .apiList .help-page-table p {
margin: 0px;
padding: 0px;
font-family: inherit;
font-size: 100%;
}
.apiList .httpMethod {
border-radius: 20px;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
padding: 3px 10px;
text-transform: uppercase;
color: #fff;
font-size: 12px;
}
.apiList .httpMethod.get {
background-color: #4cc6f3;
margin-right: 21px;
}
.apiList .httpMethod.post {
background: #69a842;
margin-right: 13px;
}
.apiList .httpMethod.delete {
background: #c82027;
margin-right: 3px;
}
.apiList .httpMethod.patch {
background: #e35639;
margin-right: 13px;
}
.apiList .httpMethod.put {
background: #ffa400;
margin-right: 20px;
}
.apiList .apiPath {
font-size: 13px;
}
/*End: HTTP Method Styling*/
/*End: API List*/
/*Start: API Details*/
.apiDetails h2 {
font-size: 18px;
color: inherit;
padding-bottom: 2px;
border-bottom: 2px #4cc6f3 ridge;
margin-bottom: 15px;
font-weight: normal;
}
.apiDetails h3 {
font-size: 16px;
font-weight: normal;
color: inherit;
padding-bottom: 2px;
border-bottom: 1px #4cc6f3 solid;
margin-bottom: 10px;
}
.apiDetails h4 {
font-size: 12px;
font-weight: normal;
padding-bottom: 1px;
color: inherit;
margin-bottom: 5px;
}
.apiDetails table {
color: inherit;
font-size: 12px;
/*border: 1px solid #B8B9BB;*/
}
.apiDetails table th {
text-align: left;
padding: 5px 6px 5px 6px;
}
.apiDetails table td{
color: inherit;
font-size: 12px;
padding-bottom: 0;
padding: 5px 10px 5px 10px;
vertical-align: top;
}
.apiDetails p {
padding: 5px 0 10px 0;
font-size: 12px;
}
/*End: API Details*/
pre.wrapped {
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
white-space: pre-wrap;
color: #f8e815;
}
.warning-message-container {
margin-top: 20px;
padding: 0 10px;
color: #e35639;/*C13100*/
background: #E8D0A9;
border: 1px solid #B7AFA3;
font-size: 12px;
}
.sample-header {
/*border: 2px solid #D4D4D4;*/
background: #f9f9f9;
color: #54585a;
padding: 3px 8px;
border-bottom: none;
display: inline-block;
margin: 5px 0px 0px 0px;
font-size: 12px;
}
.sample-content {
display: block;
border-width: 0;
padding: 15px 20px;
border: 1px solid #f9f9f9;
margin: 0px 0px 5px 0px;
font-size: 12px;
}
.api-name {
width: 10%;
}
.api-path {
width: 45%;
}
.api-documentation {
width: 45%;
}
.parameter-name {
width: 20%;
}
.parameter-documentation {
width: 50%;
}
.parameter-source {
width: 30%;
}
| 19.256849 | 88 | 0.615686 |
54d346a6bd4793082b8f921cd8ac5d8625c201b7 | 36,945 | asm | Assembly | data/battle_anims/subanimations.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | data/battle_anims/subanimations.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | data/battle_anims/subanimations.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | SubanimationPointers:
table_width 2, SubanimationPointers
dw Subanimation00
dw Subanimation01
dw Subanimation02
dw Subanimation03
dw Subanimation04
dw Subanimation05
dw Subanimation06
dw Subanimation07
dw Subanimation08
dw Subanimation09
dw Subanimation0a
dw Subanimation0b
dw Subanimation0c
dw Subanimation0d
dw Subanimation0e
dw Subanimation0f
dw Subanimation10
dw Subanimation11
dw Subanimation12
dw Subanimation13
dw Subanimation14
dw Subanimation15
dw Subanimation16
dw Subanimation17
dw Subanimation18
dw Subanimation19
dw Subanimation1a
dw Subanimation1b
dw Subanimation1c
dw Subanimation1d
dw Subanimation1e
dw Subanimation1f
dw Subanimation20
dw Subanimation21
dw Subanimation22
dw Subanimation23
dw Subanimation24
dw Subanimation25
dw Subanimation26
dw Subanimation27
dw Subanimation28
dw Subanimation29
dw Subanimation2a
dw Subanimation2b
dw Subanimation2c
dw Subanimation2d
dw Subanimation2e
dw Subanimation2f
dw Subanimation30
dw Subanimation31
dw Subanimation32
dw Subanimation33
dw Subanimation34
dw Subanimation35
dw Subanimation36
dw Subanimation37
dw Subanimation38
dw Subanimation39
dw Subanimation3a
dw Subanimation3b
dw Subanimation3c
dw Subanimation3d
dw Subanimation3e
dw Subanimation3f
dw Subanimation40
dw Subanimation41
dw Subanimation42
dw Subanimation43
dw Subanimation44
dw Subanimation45
dw Subanimation46
dw Subanimation47
dw Subanimation48
dw Subanimation49
dw Subanimation4a
dw Subanimation4b
dw Subanimation4c
dw Subanimation4d
dw Subanimation4e
dw Subanimation4f
dw Subanimation50
dw Subanimation51
dw Subanimation52
dw Subanimation53
dw Subanimation54
dw Subanimation55
assert_table_length NUM_SUBANIMS
; format:
; subanim type, count
; REPT count
; db frame block id, base coordinate id, frame block mode
; ENDR
subanim: MACRO
db (\1 << 5) | \2
ENDM
Subanimation04:
subanim SUBANIMTYPE_HFLIP, 3
db FRAMEBLOCK_02, BASECOORD_1A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_10, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_03, FRAMEBLOCKMODE_00
Subanimation05:
subanim SUBANIMTYPE_HFLIP, 1
db FRAMEBLOCK_02, BASECOORD_10, FRAMEBLOCKMODE_00
Subanimation08:
subanim SUBANIMTYPE_NORMAL, 11
db FRAMEBLOCK_03, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_44, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_94, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_60, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_9F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_8D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A0, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_1A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A1, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_34, FRAMEBLOCKMODE_00
Subanimation07:
subanim SUBANIMTYPE_NORMAL, 11
db FRAMEBLOCK_03, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A2, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A3, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A4, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A5, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_15, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A6, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_34, FRAMEBLOCKMODE_00
Subanimation06:
subanim SUBANIMTYPE_NORMAL, 11
db FRAMEBLOCK_03, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A2, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_93, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_61, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_73, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A7, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_33, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A8, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_A9, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_34, FRAMEBLOCKMODE_00
Subanimation09:
subanim SUBANIMTYPE_NORMAL, 4
db FRAMEBLOCK_03, BASECOORD_21, FRAMEBLOCKMODE_04
db FRAMEBLOCK_04, BASECOORD_21, FRAMEBLOCKMODE_04
db FRAMEBLOCK_03, BASECOORD_21, FRAMEBLOCKMODE_04
db FRAMEBLOCK_05, BASECOORD_21, FRAMEBLOCKMODE_04
Subanimation0a:
subanim SUBANIMTYPE_HFLIP, 6
db FRAMEBLOCK_06, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_07, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_08, BASECOORD_36, FRAMEBLOCKMODE_00
db FRAMEBLOCK_09, BASECOORD_36, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0A, BASECOORD_15, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0A, BASECOORD_15, FRAMEBLOCKMODE_00
Subanimation0b:
subanim SUBANIMTYPE_NORMAL, 4
db FRAMEBLOCK_01, BASECOORD_2D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_2F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_35, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_4D, FRAMEBLOCKMODE_00
Subanimation55:
subanim SUBANIMTYPE_HFLIP, 1
db FRAMEBLOCK_01, BASECOORD_9D, FRAMEBLOCKMODE_00
Subanimation11:
subanim SUBANIMTYPE_HFLIP, 12
db FRAMEBLOCK_0B, BASECOORD_26, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_26, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0B, BASECOORD_26, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_26, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0B, BASECOORD_28, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_28, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0B, BASECOORD_28, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_28, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0B, BASECOORD_27, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_27, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0B, BASECOORD_27, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_27, FRAMEBLOCKMODE_00
Subanimation2b:
subanim SUBANIMTYPE_HFLIP, 11
db FRAMEBLOCK_0D, BASECOORD_03, FRAMEBLOCKMODE_03
db FRAMEBLOCK_0E, BASECOORD_03, FRAMEBLOCKMODE_03
db FRAMEBLOCK_0F, BASECOORD_03, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0D, BASECOORD_11, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0D, BASECOORD_11, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0D, BASECOORD_37, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0D, BASECOORD_37, FRAMEBLOCKMODE_00
db FRAMEBLOCK_10, BASECOORD_21, FRAMEBLOCKMODE_00
db FRAMEBLOCK_10, BASECOORD_21, FRAMEBLOCKMODE_00
db FRAMEBLOCK_11, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_11, BASECOORD_1B, FRAMEBLOCKMODE_00
Subanimation2c:
subanim SUBANIMTYPE_HFLIP, 12
db FRAMEBLOCK_12, BASECOORD_01, FRAMEBLOCKMODE_00
db FRAMEBLOCK_12, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_12, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_12, BASECOORD_25, FRAMEBLOCKMODE_00
db FRAMEBLOCK_13, BASECOORD_38, FRAMEBLOCKMODE_00
db FRAMEBLOCK_13, BASECOORD_38, FRAMEBLOCKMODE_02
db FRAMEBLOCK_14, BASECOORD_38, FRAMEBLOCKMODE_00
db FRAMEBLOCK_14, BASECOORD_38, FRAMEBLOCKMODE_02
db FRAMEBLOCK_15, BASECOORD_38, FRAMEBLOCKMODE_00
db FRAMEBLOCK_15, BASECOORD_38, FRAMEBLOCKMODE_00
db FRAMEBLOCK_16, BASECOORD_38, FRAMEBLOCKMODE_00
db FRAMEBLOCK_16, BASECOORD_38, FRAMEBLOCKMODE_00
Subanimation12:
subanim SUBANIMTYPE_COORDFLIP, 9
db FRAMEBLOCK_17, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_39, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_3A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_3B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_3C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_3D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_3E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_3F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_1F, FRAMEBLOCKMODE_00
Subanimation00:
subanim SUBANIMTYPE_HFLIP, 1
db FRAMEBLOCK_01, BASECOORD_17, FRAMEBLOCKMODE_00
Subanimation01:
subanim SUBANIMTYPE_HFLIP, 2
db FRAMEBLOCK_01, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_01, BASECOORD_1D, FRAMEBLOCKMODE_00
Subanimation02:
subanim SUBANIMTYPE_HFLIP, 3
db FRAMEBLOCK_01, BASECOORD_12, FRAMEBLOCKMODE_00
db FRAMEBLOCK_01, BASECOORD_15, FRAMEBLOCKMODE_00
db FRAMEBLOCK_01, BASECOORD_1C, FRAMEBLOCKMODE_00
Subanimation03:
subanim SUBANIMTYPE_HFLIP, 4
db FRAMEBLOCK_01, BASECOORD_0B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_01, BASECOORD_11, FRAMEBLOCKMODE_00
db FRAMEBLOCK_01, BASECOORD_18, FRAMEBLOCKMODE_00
db FRAMEBLOCK_01, BASECOORD_1D, FRAMEBLOCKMODE_00
Subanimation0c:
subanim SUBANIMTYPE_HFLIP, 3
db FRAMEBLOCK_0C, BASECOORD_20, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_21, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_23, FRAMEBLOCKMODE_00
Subanimation0d:
subanim SUBANIMTYPE_HFLIP, 6
db FRAMEBLOCK_0C, BASECOORD_20, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_15, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_21, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_17, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_23, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_19, FRAMEBLOCKMODE_00
Subanimation0e:
subanim SUBANIMTYPE_HFLIP, 9
db FRAMEBLOCK_0C, BASECOORD_20, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_15, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_07, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_21, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_17, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_09, FRAMEBLOCKMODE_00
db FRAMEBLOCK_0C, BASECOORD_23, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_19, FRAMEBLOCKMODE_02
db FRAMEBLOCK_0C, BASECOORD_0C, FRAMEBLOCKMODE_00
Subanimation1f:
subanim SUBANIMTYPE_REVERSE, 5
db FRAMEBLOCK_0C, BASECOORD_30, FRAMEBLOCKMODE_03
db FRAMEBLOCK_0C, BASECOORD_40, FRAMEBLOCKMODE_03
db FRAMEBLOCK_0C, BASECOORD_41, FRAMEBLOCKMODE_03
db FRAMEBLOCK_0C, BASECOORD_42, FRAMEBLOCKMODE_03
db FRAMEBLOCK_0C, BASECOORD_21, FRAMEBLOCKMODE_00
Subanimation2e:
subanim SUBANIMTYPE_HVFLIP, 14
db FRAMEBLOCK_18, BASECOORD_43, FRAMEBLOCKMODE_02
db FRAMEBLOCK_75, BASECOORD_52, FRAMEBLOCKMODE_04
db FRAMEBLOCK_19, BASECOORD_43, FRAMEBLOCKMODE_02
db FRAMEBLOCK_75, BASECOORD_63, FRAMEBLOCKMODE_04
db FRAMEBLOCK_1A, BASECOORD_43, FRAMEBLOCKMODE_02
db FRAMEBLOCK_75, BASECOORD_4D, FRAMEBLOCKMODE_04
db FRAMEBLOCK_1B, BASECOORD_43, FRAMEBLOCKMODE_02
db FRAMEBLOCK_75, BASECOORD_97, FRAMEBLOCKMODE_04
db FRAMEBLOCK_1C, BASECOORD_43, FRAMEBLOCKMODE_02
db FRAMEBLOCK_75, BASECOORD_98, FRAMEBLOCKMODE_04
db FRAMEBLOCK_1D, BASECOORD_43, FRAMEBLOCKMODE_02
db FRAMEBLOCK_75, BASECOORD_58, FRAMEBLOCKMODE_04
db FRAMEBLOCK_1E, BASECOORD_43, FRAMEBLOCKMODE_02
db FRAMEBLOCK_75, BASECOORD_1B, FRAMEBLOCKMODE_00
Subanimation2f:
subanim SUBANIMTYPE_HFLIP, 4
db FRAMEBLOCK_1F, BASECOORD_24, FRAMEBLOCKMODE_00
db FRAMEBLOCK_20, BASECOORD_20, FRAMEBLOCKMODE_00
db FRAMEBLOCK_21, BASECOORD_1A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_22, BASECOORD_15, FRAMEBLOCKMODE_00
Subanimation30:
subanim SUBANIMTYPE_HFLIP, 18
db FRAMEBLOCK_23, BASECOORD_00, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_02, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_04, FRAMEBLOCKMODE_00
db FRAMEBLOCK_23, BASECOORD_07, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_02, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_04, FRAMEBLOCKMODE_00
db FRAMEBLOCK_23, BASECOORD_0E, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_02, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_0C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_25, BASECOORD_07, FRAMEBLOCKMODE_00
db FRAMEBLOCK_25, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_25, BASECOORD_15, FRAMEBLOCKMODE_00
db FRAMEBLOCK_24, BASECOORD_24, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_1C, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_23, FRAMEBLOCKMODE_00
db FRAMEBLOCK_23, BASECOORD_21, FRAMEBLOCKMODE_02
db FRAMEBLOCK_24, BASECOORD_28, FRAMEBLOCKMODE_00
db FRAMEBLOCK_24, BASECOORD_28, FRAMEBLOCKMODE_00
Subanimation0f:
subanim SUBANIMTYPE_HFLIP, 12
db FRAMEBLOCK_26, BASECOORD_0E, FRAMEBLOCKMODE_02
db FRAMEBLOCK_26, BASECOORD_16, FRAMEBLOCKMODE_02
db FRAMEBLOCK_26, BASECOORD_1C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_27, BASECOORD_0E, FRAMEBLOCKMODE_02
db FRAMEBLOCK_27, BASECOORD_16, FRAMEBLOCKMODE_02
db FRAMEBLOCK_27, BASECOORD_1C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_28, BASECOORD_0E, FRAMEBLOCKMODE_02
db FRAMEBLOCK_28, BASECOORD_16, FRAMEBLOCKMODE_02
db FRAMEBLOCK_28, BASECOORD_1C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_29, BASECOORD_0E, FRAMEBLOCKMODE_02
db FRAMEBLOCK_29, BASECOORD_16, FRAMEBLOCKMODE_02
db FRAMEBLOCK_29, BASECOORD_1C, FRAMEBLOCKMODE_00
Subanimation16:
subanim SUBANIMTYPE_HFLIP, 12
db FRAMEBLOCK_2A, BASECOORD_05, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2B, BASECOORD_05, FRAMEBLOCKMODE_02
db FRAMEBLOCK_2B, BASECOORD_0C, FRAMEBLOCKMODE_02
db FRAMEBLOCK_2A, BASECOORD_11, FRAMEBLOCKMODE_04
db FRAMEBLOCK_2B, BASECOORD_11, FRAMEBLOCKMODE_02
db FRAMEBLOCK_2B, BASECOORD_17, FRAMEBLOCKMODE_02
db FRAMEBLOCK_2A, BASECOORD_1B, FRAMEBLOCKMODE_04
db FRAMEBLOCK_2B, BASECOORD_1B, FRAMEBLOCKMODE_02
db FRAMEBLOCK_2B, BASECOORD_20, FRAMEBLOCKMODE_02
db FRAMEBLOCK_2A, BASECOORD_2F, FRAMEBLOCKMODE_04
db FRAMEBLOCK_2C, BASECOORD_00, FRAMEBLOCKMODE_02
db FRAMEBLOCK_2C, BASECOORD_00, FRAMEBLOCKMODE_00
Subanimation10:
subanim SUBANIMTYPE_REVERSE, 8
db FRAMEBLOCK_2D, BASECOORD_44, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2E, BASECOORD_45, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2D, BASECOORD_46, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2E, BASECOORD_47, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2D, BASECOORD_48, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2E, BASECOORD_49, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2D, BASECOORD_2F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2E, BASECOORD_1A, FRAMEBLOCKMODE_00
Subanimation31:
subanim SUBANIMTYPE_HVFLIP, 10
db FRAMEBLOCK_2F, BASECOORD_46, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_4A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_4B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_4C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_4D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_4E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_4F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_50, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_2E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_2F, BASECOORD_51, FRAMEBLOCKMODE_00
Subanimation13:
subanim SUBANIMTYPE_REVERSE, 6
db FRAMEBLOCK_30, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_30, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_30, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_30, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_30, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_30, BASECOORD_10, FRAMEBLOCKMODE_00
Subanimation14:
subanim SUBANIMTYPE_HFLIP, 9
db FRAMEBLOCK_30, BASECOORD_10, FRAMEBLOCKMODE_00
db FRAMEBLOCK_30, BASECOORD_10, FRAMEBLOCKMODE_03
db FRAMEBLOCK_31, BASECOORD_1C, FRAMEBLOCKMODE_04
db FRAMEBLOCK_31, BASECOORD_21, FRAMEBLOCKMODE_04
db FRAMEBLOCK_31, BASECOORD_26, FRAMEBLOCKMODE_00
db FRAMEBLOCK_30, BASECOORD_10, FRAMEBLOCKMODE_02
db FRAMEBLOCK_31, BASECOORD_1D, FRAMEBLOCKMODE_04
db FRAMEBLOCK_31, BASECOORD_22, FRAMEBLOCKMODE_04
db FRAMEBLOCK_31, BASECOORD_27, FRAMEBLOCKMODE_00
Subanimation41:
subanim SUBANIMTYPE_REVERSE, 5
db FRAMEBLOCK_03, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_03, BASECOORD_10, FRAMEBLOCKMODE_00
Subanimation42:
subanim SUBANIMTYPE_HFLIP, 3
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5A, BASECOORD_08, FRAMEBLOCKMODE_00
Subanimation15:
subanim SUBANIMTYPE_HVFLIP, 2
db FRAMEBLOCK_35, BASECOORD_52, FRAMEBLOCKMODE_00
db FRAMEBLOCK_35, BASECOORD_53, FRAMEBLOCKMODE_00
Subanimation17:
subanim SUBANIMTYPE_HFLIP, 4
db FRAMEBLOCK_36, BASECOORD_54, FRAMEBLOCKMODE_00
db FRAMEBLOCK_36, BASECOORD_55, FRAMEBLOCKMODE_00
db FRAMEBLOCK_37, BASECOORD_56, FRAMEBLOCKMODE_00
db FRAMEBLOCK_37, BASECOORD_57, FRAMEBLOCKMODE_00
Subanimation18:
subanim SUBANIMTYPE_ENEMY, 4
db FRAMEBLOCK_36, BASECOORD_54, FRAMEBLOCKMODE_00
db FRAMEBLOCK_36, BASECOORD_55, FRAMEBLOCKMODE_00
db FRAMEBLOCK_37, BASECOORD_56, FRAMEBLOCKMODE_00
db FRAMEBLOCK_37, BASECOORD_57, FRAMEBLOCKMODE_00
Subanimation40:
subanim SUBANIMTYPE_HFLIP, 6
db FRAMEBLOCK_17, BASECOORD_54, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_55, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_56, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_57, FRAMEBLOCKMODE_00
db FRAMEBLOCK_17, BASECOORD_13, FRAMEBLOCKMODE_00
Subanimation19:
subanim SUBANIMTYPE_REVERSE, 12
db FRAMEBLOCK_38, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_39, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_38, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_39, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_38, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_39, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_38, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_39, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_38, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_39, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_38, BASECOORD_10, FRAMEBLOCKMODE_00
db FRAMEBLOCK_39, BASECOORD_10, FRAMEBLOCKMODE_00
Subanimation1a:
subanim SUBANIMTYPE_HFLIP, 16
db FRAMEBLOCK_3A, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3B, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3C, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3D, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3E, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3F, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3E, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3F, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3A, BASECOORD_0B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3B, BASECOORD_0B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3C, BASECOORD_0B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3D, BASECOORD_0B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3E, BASECOORD_0B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3F, BASECOORD_0B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3E, BASECOORD_0B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3F, BASECOORD_0B, FRAMEBLOCKMODE_00
Subanimation1b:
subanim SUBANIMTYPE_REVERSE, 4
db FRAMEBLOCK_40, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_40, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_40, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_40, BASECOORD_15, FRAMEBLOCKMODE_00
Subanimation1c:
subanim SUBANIMTYPE_HFLIP, 3
db FRAMEBLOCK_41, BASECOORD_58, FRAMEBLOCKMODE_00
db FRAMEBLOCK_41, BASECOORD_59, FRAMEBLOCKMODE_00
db FRAMEBLOCK_41, BASECOORD_21, FRAMEBLOCKMODE_00
Subanimation1d:
subanim SUBANIMTYPE_ENEMY, 15
db FRAMEBLOCK_24, BASECOORD_9A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_23, BASECOORD_1B, FRAMEBLOCKMODE_02
db FRAMEBLOCK_24, BASECOORD_22, FRAMEBLOCKMODE_00
db FRAMEBLOCK_23, BASECOORD_16, FRAMEBLOCKMODE_02
db FRAMEBLOCK_23, BASECOORD_1D, FRAMEBLOCKMODE_02
db FRAMEBLOCK_24, BASECOORD_98, FRAMEBLOCKMODE_00
db FRAMEBLOCK_25, BASECOORD_2C, FRAMEBLOCKMODE_04
db FRAMEBLOCK_25, BASECOORD_2A, FRAMEBLOCKMODE_04
db FRAMEBLOCK_25, BASECOORD_99, FRAMEBLOCKMODE_04
db FRAMEBLOCK_25, BASECOORD_62, FRAMEBLOCKMODE_04
db FRAMEBLOCK_25, BASECOORD_99, FRAMEBLOCKMODE_04
db FRAMEBLOCK_25, BASECOORD_62, FRAMEBLOCKMODE_04
db FRAMEBLOCK_25, BASECOORD_99, FRAMEBLOCKMODE_04
db FRAMEBLOCK_25, BASECOORD_62, FRAMEBLOCKMODE_04
db FRAMEBLOCK_25, BASECOORD_99, FRAMEBLOCKMODE_03
Subanimation1e:
subanim SUBANIMTYPE_NORMAL, 1
db FRAMEBLOCK_25, BASECOORD_75, FRAMEBLOCKMODE_00
Subanimation20:
subanim SUBANIMTYPE_HFLIP, 2
db FRAMEBLOCK_42, BASECOORD_07, FRAMEBLOCKMODE_00
db FRAMEBLOCK_43, BASECOORD_07, FRAMEBLOCKMODE_00
Subanimation21:
subanim SUBANIMTYPE_HFLIP, 3
db FRAMEBLOCK_44, BASECOORD_00, FRAMEBLOCKMODE_00
db FRAMEBLOCK_45, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_46, BASECOORD_10, FRAMEBLOCKMODE_02
Subanimation22:
subanim SUBANIMTYPE_REVERSE, 11
db FRAMEBLOCK_47, BASECOORD_10, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_56, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_07, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_AA, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_AB, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_AC, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_AD, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_AE, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_AF, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_89, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_B0, FRAMEBLOCKMODE_00
Subanimation2d:
subanim SUBANIMTYPE_COORDFLIP, 6
db FRAMEBLOCK_44, BASECOORD_64, FRAMEBLOCKMODE_00
db FRAMEBLOCK_45, BASECOORD_65, FRAMEBLOCKMODE_00
db FRAMEBLOCK_46, BASECOORD_66, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_66, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_66, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_66, FRAMEBLOCKMODE_00
Subanimation39:
subanim SUBANIMTYPE_COORDFLIP, 1
db FRAMEBLOCK_47, BASECOORD_67, FRAMEBLOCKMODE_00
Subanimation4e:
subanim SUBANIMTYPE_HFLIP, 1
db FRAMEBLOCK_71, BASECOORD_0F, FRAMEBLOCKMODE_03
Subanimation4f:
subanim SUBANIMTYPE_HFLIP, 7
db FRAMEBLOCK_71, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_71, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_71, BASECOORD_01, FRAMEBLOCKMODE_00
db FRAMEBLOCK_71, BASECOORD_95, FRAMEBLOCKMODE_00
db FRAMEBLOCK_72, BASECOORD_95, FRAMEBLOCKMODE_00
db FRAMEBLOCK_73, BASECOORD_95, FRAMEBLOCKMODE_00
db FRAMEBLOCK_74, BASECOORD_95, FRAMEBLOCKMODE_00
Subanimation50:
subanim SUBANIMTYPE_HFLIP, 8
db FRAMEBLOCK_74, BASECOORD_95, FRAMEBLOCKMODE_00
db FRAMEBLOCK_73, BASECOORD_95, FRAMEBLOCKMODE_00
db FRAMEBLOCK_72, BASECOORD_95, FRAMEBLOCKMODE_00
db FRAMEBLOCK_71, BASECOORD_95, FRAMEBLOCKMODE_00
db FRAMEBLOCK_71, BASECOORD_01, FRAMEBLOCKMODE_00
db FRAMEBLOCK_71, BASECOORD_08, FRAMEBLOCKMODE_00
db FRAMEBLOCK_71, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_71, BASECOORD_16, FRAMEBLOCKMODE_00
Subanimation29:
subanim SUBANIMTYPE_HFLIP, 29
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4D, BASECOORD_69, FRAMEBLOCKMODE_03
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_6B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4D, BASECOORD_69, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_6C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4D, BASECOORD_69, FRAMEBLOCKMODE_03
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_6D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4D, BASECOORD_2A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4A, BASECOORD_68, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4B, BASECOORD_2A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4C, BASECOORD_6A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_4D, BASECOORD_2A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_6B, FRAMEBLOCKMODE_00
Subanimation2a:
subanim SUBANIMTYPE_HFLIP, 4
db FRAMEBLOCK_4E, BASECOORD_2B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_4F, BASECOORD_2B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_50, BASECOORD_2B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_50, BASECOORD_2B, FRAMEBLOCKMODE_00
Subanimation23:
subanim SUBANIMTYPE_HFLIP, 2
db FRAMEBLOCK_51, BASECOORD_2D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_51, BASECOORD_6E, FRAMEBLOCKMODE_00
Subanimation24:
subanim SUBANIMTYPE_ENEMY, 2
db FRAMEBLOCK_51, BASECOORD_2D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_51, BASECOORD_6E, FRAMEBLOCKMODE_00
Subanimation25:
subanim SUBANIMTYPE_COORDFLIP, 2
db FRAMEBLOCK_52, BASECOORD_71, FRAMEBLOCKMODE_00
db FRAMEBLOCK_52, BASECOORD_72, FRAMEBLOCKMODE_00
Subanimation26:
subanim SUBANIMTYPE_NORMAL, 2
db FRAMEBLOCK_52, BASECOORD_01, FRAMEBLOCKMODE_00
db FRAMEBLOCK_52, BASECOORD_2C, FRAMEBLOCKMODE_00
Subanimation3a:
subanim SUBANIMTYPE_COORDFLIP, 3
db FRAMEBLOCK_53, BASECOORD_71, FRAMEBLOCKMODE_00
db FRAMEBLOCK_53, BASECOORD_7F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_53, BASECOORD_81, FRAMEBLOCKMODE_00
Subanimation3b:
subanim SUBANIMTYPE_NORMAL, 3
db FRAMEBLOCK_53, BASECOORD_01, FRAMEBLOCKMODE_00
db FRAMEBLOCK_53, BASECOORD_15, FRAMEBLOCKMODE_00
db FRAMEBLOCK_53, BASECOORD_2C, FRAMEBLOCKMODE_00
Subanimation27:
subanim SUBANIMTYPE_ENEMY, 2
db FRAMEBLOCK_54, BASECOORD_01, FRAMEBLOCKMODE_00
db FRAMEBLOCK_54, BASECOORD_2C, FRAMEBLOCKMODE_00
Subanimation28:
subanim SUBANIMTYPE_HVFLIP, 3
db FRAMEBLOCK_55, BASECOORD_73, FRAMEBLOCKMODE_03
db FRAMEBLOCK_56, BASECOORD_73, FRAMEBLOCKMODE_03
db FRAMEBLOCK_57, BASECOORD_73, FRAMEBLOCKMODE_00
Subanimation32:
subanim SUBANIMTYPE_COORDFLIP, 3
db FRAMEBLOCK_47, BASECOORD_74, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_43, FRAMEBLOCKMODE_00
db FRAMEBLOCK_47, BASECOORD_75, FRAMEBLOCKMODE_00
Subanimation33:
subanim SUBANIMTYPE_HVFLIP, 6
db FRAMEBLOCK_58, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_58, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_58, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_76, FRAMEBLOCKMODE_00
Subanimation3c:
subanim SUBANIMTYPE_COORDFLIP, 7
db FRAMEBLOCK_59, BASECOORD_79, FRAMEBLOCKMODE_03
db FRAMEBLOCK_59, BASECOORD_7B, FRAMEBLOCKMODE_03
db FRAMEBLOCK_59, BASECOORD_77, FRAMEBLOCKMODE_03
db FRAMEBLOCK_59, BASECOORD_7A, FRAMEBLOCKMODE_03
db FRAMEBLOCK_59, BASECOORD_78, FRAMEBLOCKMODE_03
db FRAMEBLOCK_59, BASECOORD_7C, FRAMEBLOCKMODE_03
db FRAMEBLOCK_59, BASECOORD_76, FRAMEBLOCKMODE_00
Subanimation3d:
subanim SUBANIMTYPE_NORMAL, 8
db FRAMEBLOCK_3A, BASECOORD_4D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3B, BASECOORD_4D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3C, BASECOORD_4D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3D, BASECOORD_4D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3E, BASECOORD_4D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3F, BASECOORD_4D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3E, BASECOORD_4D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_3F, BASECOORD_4D, FRAMEBLOCKMODE_00
Subanimation34:
subanim SUBANIMTYPE_HVFLIP, 21
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_7D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_7D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5A, BASECOORD_7D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5A, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_7E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_7E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5A, BASECOORD_7E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_7F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_7F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5A, BASECOORD_7F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_80, FRAMEBLOCKMODE_00
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_80, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5A, BASECOORD_80, FRAMEBLOCKMODE_00
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_81, FRAMEBLOCKMODE_00
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_81, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5A, BASECOORD_81, FRAMEBLOCKMODE_00
db FRAMEBLOCK_SMALL_BLACK_CIRCLE, BASECOORD_82, FRAMEBLOCKMODE_00
db FRAMEBLOCK_LARGE_BLACK_CIRCLE, BASECOORD_82, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5A, BASECOORD_82, FRAMEBLOCKMODE_00
Subanimation35:
subanim SUBANIMTYPE_HVFLIP, 4
db FRAMEBLOCK_5B, BASECOORD_83, FRAMEBLOCKMODE_03
db FRAMEBLOCK_5C, BASECOORD_84, FRAMEBLOCKMODE_03
db FRAMEBLOCK_5D, BASECOORD_85, FRAMEBLOCKMODE_03
db FRAMEBLOCK_5E, BASECOORD_09, FRAMEBLOCKMODE_00
Subanimation36:
subanim SUBANIMTYPE_HFLIP, 8
db FRAMEBLOCK_5F, BASECOORD_2A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_5F, BASECOORD_00, FRAMEBLOCKMODE_00
db FRAMEBLOCK_60, BASECOORD_2A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_60, BASECOORD_00, FRAMEBLOCKMODE_00
db FRAMEBLOCK_61, BASECOORD_2A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_61, BASECOORD_00, FRAMEBLOCKMODE_00
db FRAMEBLOCK_62, BASECOORD_2A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_62, BASECOORD_00, FRAMEBLOCKMODE_00
Subanimation37:
subanim SUBANIMTYPE_HVFLIP, 10
db FRAMEBLOCK_63, BASECOORD_89, FRAMEBLOCKMODE_00
db FRAMEBLOCK_64, BASECOORD_75, FRAMEBLOCKMODE_00
db FRAMEBLOCK_63, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_65, BASECOORD_0D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_65, BASECOORD_86, FRAMEBLOCKMODE_00
db FRAMEBLOCK_65, BASECOORD_12, FRAMEBLOCKMODE_00
db FRAMEBLOCK_65, BASECOORD_87, FRAMEBLOCKMODE_00
db FRAMEBLOCK_65, BASECOORD_17, FRAMEBLOCKMODE_00
db FRAMEBLOCK_65, BASECOORD_88, FRAMEBLOCKMODE_00
db FRAMEBLOCK_65, BASECOORD_1A, FRAMEBLOCKMODE_00
Subanimation38:
subanim SUBANIMTYPE_HFLIP, 16
db FRAMEBLOCK_66, BASECOORD_8A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_66, BASECOORD_33, FRAMEBLOCKMODE_00
db FRAMEBLOCK_66, BASECOORD_2E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_67, BASECOORD_24, FRAMEBLOCKMODE_03
db FRAMEBLOCK_66, BASECOORD_01, FRAMEBLOCKMODE_04
db FRAMEBLOCK_66, BASECOORD_10, FRAMEBLOCKMODE_04
db FRAMEBLOCK_66, BASECOORD_1D, FRAMEBLOCKMODE_04
db FRAMEBLOCK_67, BASECOORD_28, FRAMEBLOCKMODE_03
db FRAMEBLOCK_66, BASECOORD_2A, FRAMEBLOCKMODE_04
db FRAMEBLOCK_66, BASECOORD_0E, FRAMEBLOCKMODE_04
db FRAMEBLOCK_66, BASECOORD_1B, FRAMEBLOCKMODE_04
db FRAMEBLOCK_67, BASECOORD_26, FRAMEBLOCKMODE_03
db FRAMEBLOCK_66, BASECOORD_03, FRAMEBLOCKMODE_04
db FRAMEBLOCK_66, BASECOORD_12, FRAMEBLOCKMODE_04
db FRAMEBLOCK_66, BASECOORD_1E, FRAMEBLOCKMODE_04
db FRAMEBLOCK_67, BASECOORD_29, FRAMEBLOCKMODE_00
Subanimation3e:
subanim SUBANIMTYPE_REVERSE, 18
db FRAMEBLOCK_02, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_31, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_32, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_92, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_10, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_10, FRAMEBLOCKMODE_00
db FRAMEBLOCK_02, BASECOORD_10, FRAMEBLOCKMODE_00
Subanimation3f:
subanim SUBANIMTYPE_COORDFLIP, 18
db FRAMEBLOCK_68, BASECOORD_4B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_8C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_20, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_1C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_19, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_14, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_8D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_15, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_10, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_0C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_06, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_8E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_8F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_90, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_26, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_23, FRAMEBLOCKMODE_00
db FRAMEBLOCK_68, BASECOORD_1F, FRAMEBLOCKMODE_00
Subanimation44:
subanim SUBANIMTYPE_HVFLIP, 12
db FRAMEBLOCK_69, BASECOORD_4B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_8C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_20, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_1C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_19, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_14, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_76, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_8D, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_15, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_10, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_0C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_69, BASECOORD_06, FRAMEBLOCKMODE_00
Subanimation43:
subanim SUBANIMTYPE_ENEMY, 3
db FRAMEBLOCK_6A, BASECOORD_07, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6B, BASECOORD_0F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6C, BASECOORD_17, FRAMEBLOCKMODE_00
Subanimation45:
subanim SUBANIMTYPE_HVFLIP, 4
db FRAMEBLOCK_6D, BASECOORD_8B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6D, BASECOORD_84, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6D, BASECOORD_63, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6D, BASECOORD_8C, FRAMEBLOCKMODE_00
Subanimation46:
subanim SUBANIMTYPE_HVFLIP, 6
db FRAMEBLOCK_6D, BASECOORD_8B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6D, BASECOORD_84, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6D, BASECOORD_63, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6D, BASECOORD_8C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6D, BASECOORD_0A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6D, BASECOORD_89, FRAMEBLOCKMODE_00
Subanimation47:
subanim SUBANIMTYPE_HVFLIP, 3
db FRAMEBLOCK_06, BASECOORD_82, FRAMEBLOCKMODE_00
db FRAMEBLOCK_07, BASECOORD_82, FRAMEBLOCKMODE_00
db FRAMEBLOCK_08, BASECOORD_96, FRAMEBLOCKMODE_00
Subanimation48:
subanim SUBANIMTYPE_NORMAL, 6
db FRAMEBLOCK_03, BASECOORD_41, FRAMEBLOCKMODE_04
db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_04
db FRAMEBLOCK_04, BASECOORD_48, FRAMEBLOCKMODE_04
db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_04
db FRAMEBLOCK_05, BASECOORD_48, FRAMEBLOCKMODE_04
db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_03
Subanimation49:
subanim SUBANIMTYPE_NORMAL, 4
db FRAMEBLOCK_04, BASECOORD_48, FRAMEBLOCKMODE_04
db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_04
db FRAMEBLOCK_05, BASECOORD_48, FRAMEBLOCKMODE_04
db FRAMEBLOCK_03, BASECOORD_48, FRAMEBLOCKMODE_03
Subanimation4a:
subanim SUBANIMTYPE_NORMAL, 1
db FRAMEBLOCK_04, BASECOORD_84, FRAMEBLOCKMODE_03
Subanimation4b:
subanim SUBANIMTYPE_NORMAL, 3
db FRAMEBLOCK_06, BASECOORD_72, FRAMEBLOCKMODE_00
db FRAMEBLOCK_07, BASECOORD_72, FRAMEBLOCKMODE_00
db FRAMEBLOCK_08, BASECOORD_72, FRAMEBLOCKMODE_00
Subanimation4c:
subanim SUBANIMTYPE_COORDFLIP, 8
db FRAMEBLOCK_6F, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6E, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_70, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6E, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6F, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6E, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_70, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_6E, BASECOORD_30, FRAMEBLOCKMODE_00
Subanimation4d:
subanim SUBANIMTYPE_HVFLIP, 6
db FRAMEBLOCK_32, BASECOORD_4B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_33, BASECOORD_4F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_32, BASECOORD_20, FRAMEBLOCKMODE_00
db FRAMEBLOCK_33, BASECOORD_16, FRAMEBLOCKMODE_00
db FRAMEBLOCK_32, BASECOORD_19, FRAMEBLOCKMODE_00
db FRAMEBLOCK_33, BASECOORD_0D, FRAMEBLOCKMODE_00
Subanimation51:
subanim SUBANIMTYPE_ENEMY, 6
db FRAMEBLOCK_76, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_76, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_76, BASECOORD_1B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_34, BASECOORD_1B, FRAMEBLOCKMODE_00
Subanimation52:
subanim SUBANIMTYPE_HFLIP, 7
db FRAMEBLOCK_77, BASECOORD_25, FRAMEBLOCKMODE_00
db FRAMEBLOCK_77, BASECOORD_9B, FRAMEBLOCKMODE_00
db FRAMEBLOCK_77, BASECOORD_1A, FRAMEBLOCKMODE_00
db FRAMEBLOCK_77, BASECOORD_9C, FRAMEBLOCKMODE_00
db FRAMEBLOCK_77, BASECOORD_2F, FRAMEBLOCKMODE_00
db FRAMEBLOCK_77, BASECOORD_50, FRAMEBLOCKMODE_00
db FRAMEBLOCK_77, BASECOORD_8C, FRAMEBLOCKMODE_00
Subanimation53:
subanim SUBANIMTYPE_NORMAL, 12
db FRAMEBLOCK_78, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_A2, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_93, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_61, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_73, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_A7, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_33, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_A8, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_A9, FRAMEBLOCKMODE_00
db FRAMEBLOCK_78, BASECOORD_34, FRAMEBLOCKMODE_00
db FRAMEBLOCK_01, BASECOORD_9E, FRAMEBLOCKMODE_00
Subanimation54:
subanim SUBANIMTYPE_NORMAL, 11
db FRAMEBLOCK_79, BASECOORD_30, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_A2, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_93, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_61, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_73, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_A7, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_33, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_A8, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_0E, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_A9, FRAMEBLOCKMODE_00
db FRAMEBLOCK_79, BASECOORD_34, FRAMEBLOCKMODE_00
| 38.605016 | 66 | 0.859142 |
5e7bc684aa1e8e839f547856d9eca19e7a4c66da | 4,970 | kt | Kotlin | xbinder/src/main/java/com/luqinx/xbinder/XBinder.kt | luqinx/XBinder | 3d47b9aca87a91235debdf172907a3b5ba6f6464 | [
"Apache-2.0"
] | 2 | 2022-03-27T06:25:59.000Z | 2022-03-27T14:53:07.000Z | xbinder/src/main/java/com/luqinx/xbinder/XBinder.kt | luqinx/XBinder | 3d47b9aca87a91235debdf172907a3b5ba6f6464 | [
"Apache-2.0"
] | null | null | null | xbinder/src/main/java/com/luqinx/xbinder/XBinder.kt | luqinx/XBinder | 3d47b9aca87a91235debdf172907a3b5ba6f6464 | [
"Apache-2.0"
] | null | null | null | package com.luqinx.xbinder
import com.luqinx.xbinder.annotation.InvokeType
import com.luqinx.xbinder.serialize.AdapterManager
import com.luqinx.xbinder.serialize.ParcelAdapter
import java.lang.reflect.Type
/**
* @author qinchao
*
* @since 2022/1/2
*/
object XBinder {
var xbinderReady = false
@JvmStatic
@JvmOverloads
fun <T> getService(
serviceClass: Class<T>,
processName: String = "",
constructorTypes: Array<Class<*>>? = null,
constructorArgs: Array<*>? = null,
defService: T? = null,
@InvokeType invokeType_: Int = InvokeType.REMOTE_ONLY
): T {
return getServiceInner(
serviceClass,
processName,
constructorTypes as Array<*>?,
constructorArgs,
defService,
invokeType_
)
}
/**
* @see getServiceInner
*/
@JvmStatic
@JvmOverloads
fun <T : ILightBinder> getParameterizedService(
serviceClass: Class<T>,
processName: String = "",
constructorTypes: Array<Type>? = null,
constructorArgs: Array<*>? = null,
defService: T? = null,
@InvokeType invokeType_: Int = InvokeType.REMOTE_ONLY
): T {
// not complete
return getServiceInner(
serviceClass,
processName,
constructorTypes as Array<*>?,
constructorArgs,
defService,
invokeType_
)
}
/**
* this method will return a dynamic proxy of the given service class who will calling the remote methods
*
* @param serviceClass the remote service's class
* @param processName remote process name
* @param constructorTypes the remote service constructors' types
* @param constructorArgs the remote service constructors' values, it must be null if the constructorTypes is null
* and it's array size must be equals with constructorTypes
* @param defService default service will be called if the remote service not exists
* @param invokeType_
*/
private fun <T> getServiceInner(
serviceClass: Class<T>,
processName: String = "",
constructorTypes: Array<*>? = null,
constructorArgs: Array<*>? = null,
defService: T? = null,
@InvokeType invokeType_: Int = InvokeType.REMOTE_ONLY
): T {
if (constructorArgs != null && constructorTypes != null && constructorArgs.size != constructorTypes.size) {
throw IllegalArgumentException("constructor arguments' size not match: args{${constructorArgs}}, types{${constructorTypes}}")
}
if ((constructorArgs == null && constructorTypes != null) || (constructorArgs != null && constructorTypes == null)) {
throw IllegalArgumentException("constructor arguments not match: arguments and it's types should be null or not null at the same time")
}
if (!xbinderReady) {
throw IllegalStateException("xbinder config error: please refer to the readme.md file for xbinder's initialization.")
}
// realProcessName spent 0.2ms in xiaomi-9A
val realProcessName: String = when {
processName.isEmpty() -> {
currentProcessName()
}
processName.startsWith(":") -> {
currentProcessName() + processName.replaceFirst(":", ".")
}
else -> {
processName.replaceFirst(":", ".")
}
}
val invokeType = if (realProcessName == currentProcessName()) {
if (invokeType_ == InvokeType.REMOTE_ONLY) {
throw java.lang.IllegalArgumentException("check your process name please")
}
InvokeType.LOCAL_ONLY
} else {
invokeType_
}
return ServiceProxyFactory.newServiceProxy(
NewServiceOptions(serviceClass, realProcessName)
.constructorTypes(constructorTypes)
.constructorArgs(constructorArgs)
.invokeType(invokeType)
.defaultService(defService)
)
}
@JvmStatic
fun registerTypeAdapter(type: Class<*>, adapter: ParcelAdapter<*>) {
if (!AdapterManager.isInWhitList(type)) {
AdapterManager.register(type, adapter)
}
}
/**
* notify the processes who communication with this process has been ready
*
* it's useful for telling the relative processes when they can communication with me,
* if not, they don't known when my initialization finish.
*/
fun notifyProcessReady() {
//todo
}
@JvmStatic
fun addServiceFinder(serviceFinder: IServiceFinder) {
serviceFinders.add(serviceFinder)
}
@JvmStatic
fun currentProcessName(): String {
return XBinderProvider.processName
}
internal fun hasGradlePlugin(): Boolean {
return false
}
} | 33.133333 | 147 | 0.61006 |
745759d692a85e9c03927b57d42137e2ef6ed0d4 | 3,263 | c | C | samples/soldering/ScreenConfig.c | control-flow-attestation/c-flat | 83bb9f14bf65db9accef957fa538a276662fd017 | [
"Apache-2.0"
] | 33 | 2016-08-12T10:08:35.000Z | 2022-02-24T08:03:21.000Z | samples/soldering/ScreenConfig.c | control-flow-attestation/c-flat | 83bb9f14bf65db9accef957fa538a276662fd017 | [
"Apache-2.0"
] | 3 | 2016-08-21T01:37:45.000Z | 2018-03-22T14:03:44.000Z | samples/soldering/ScreenConfig.c | control-flow-attestation/c-flat | 83bb9f14bf65db9accef957fa538a276662fd017 | [
"Apache-2.0"
] | 12 | 2016-10-25T11:00:14.000Z | 2022-01-27T10:46:02.000Z | #include "ScreenConfig.h"
#include "string.h"
const char MSG_CELSIUS[4] = {' ', ' ', ' ', 'c' };
const char MSG_FARENHEIT[4] = {' ', ' ', ' ', 'F' };
void createScreenConfig(ScreenConfig *const self, Iron* iron, Display* display, Encoder* enc, Config* cfg) {
self->pIron = iron;
self->pD = display;
self->pEnc = enc;
self->pCfg = cfg;
memcpy(self->msg_celsius, MSG_CELSIUS, 4);
memcpy(self->msg_farenheit, MSG_FARENHEIT, 4);
// overrides
self->parent.init = initScreenConfig;
self->parent.showScreen = showScreenConfig;
self->parent.rotaryValue = rotaryValueScreenConfig;
self->parent.menu = menuScreenConfig;
self->parent.menu_long = menu_longScreenConfig;
}
void initScreenConfig(VOID_SELF) {
CAST_SELF(ScreenConfig);
self->mode = 0;
initEncoder(self->pEnc, self->mode, 0, 2, 1, 0, true);
self->tune = false;
self->changed = false;
self->brigh = getBrightness(self->pCfg);
self->cels = Config_getTempUnits(self->pCfg);
clear(self->pD);
setSCRtimeout(&self->parent, 30);
}
void showScreenConfig(VOID_SELF) {
CAST_SELF(ScreenConfig);
Display *pD = self->pD;
if ((!self->parent.force_redraw) && (millis() < self->update_screen)) {
return;
}
self->parent.force_redraw = false;
self->update_screen = millis() + 10000;
if ((self->mode == 1) && self->tune) {
if (self->cels) {
message(pD, self->msg_celsius);
} else {
message(pD, self->msg_farenheit);
}
return;
}
setupMode(pD, self->mode);
}
void rotaryValueScreenConfig(VOID_SELF, int16_t value) {
CAST_SELF(ScreenConfig);
Display *pD = self->pD;
self->update_screen = millis() + 10000;
if (self->tune) {
self->changed = true;
if (self->mode == 0) {
self->brigh = value;
brightness(pD, self->brigh);
} else { // mode == 1, C/F
self->cels = !value;
}
} else {
self->mode = value;
}
self->parent.force_redraw = true;
}
void* menuScreenConfig(VOID_SELF) {
CAST_SELF(ScreenConfig);
Encoder *pEnc = self->pEnc;
if (self->tune) {
self->tune = false;
initEncoder(pEnc, self->mode, 0, 2, 1, 0, true);
} else {
switch (self->mode) {
case 0: // brightness
initEncoder(pEnc, self->brigh, 0, 15, 1, 0, false);
break;
case 1: // C/F
initEncoder(pEnc, self->cels, 0, 1, 1, 0, true );
break;
case 2: // Calibration
if (self->parent.next) {
return self->parent.next;
}
break;
}
self->tune = true;
}
self->parent.force_redraw = true;
return self;
}
void* menu_longScreenConfig(VOID_SELF) {
CAST_SELF(ScreenConfig);
if (self->parent.nextL) {
if (self->changed) {
saveConfig(self->pCfg, self->brigh, self->cels);
setTempUnits(self->pIron, self->cels);
}
return self->parent.nextL;
}
return (Screen*)self;
}
| 27.652542 | 108 | 0.537849 |
749720f70be7a2bf6089951e96b602af5f1914ec | 5,214 | rs | Rust | flussab/src/byte_writer.rs | NieDzejkob/flussab | 3e0716358b38ac3199509a25c13bc7c8cfcfd2e0 | [
"0BSD"
] | 5 | 2021-05-02T15:47:39.000Z | 2022-01-30T18:21:37.000Z | flussab/src/byte_writer.rs | NieDzejkob/flussab | 3e0716358b38ac3199509a25c13bc7c8cfcfd2e0 | [
"0BSD"
] | 1 | 2021-06-03T13:29:06.000Z | 2021-06-03T13:29:06.000Z | flussab/src/byte_writer.rs | NieDzejkob/flussab | 3e0716358b38ac3199509a25c13bc7c8cfcfd2e0 | [
"0BSD"
] | 1 | 2021-05-27T00:30:43.000Z | 2021-05-27T00:30:43.000Z | use std::io::{self, Write};
/// A buffered writer with deferred error checking.
///
/// This can be used like [`std::io::BufWriter`], but like [`ByteReader`][crate::ByteReader] this
/// performs deferred error checking. This means that any call to [`write`][Write::write], will
/// always succeed. IO errors that occur during writing will be reported during the next call to
/// [`flush`][Write::flush] or [`check_io_error`][Self::check_io_error]. Any data written after an
/// IO error occured, before it is eventually reported, will be discarded.
///
/// Deferring error checks like this can result in a significant speed up for some usage patterns.
pub struct ByteWriter<'a> {
write: Box<dyn Write + 'a>,
buf: Vec<u8>,
io_error: Option<io::Error>,
panicked: bool,
}
impl<'a> ByteWriter<'a> {
const DEFAULT_CHUNK_SIZE: usize = 16 << 10;
/// Creates a [`ByteWriter`] writing data to a [`Write`] instance.
pub fn from_write(write: impl Write + 'a) -> Self {
Self::from_boxed_dyn_write(Box::new(write))
}
/// Creates a [`ByteWriter`] writing data to a boxed [`Write`] instance.
#[inline(never)]
pub fn from_boxed_dyn_write(write: Box<dyn Write + 'a>) -> Self {
ByteWriter {
write,
buf: Vec::with_capacity(Self::DEFAULT_CHUNK_SIZE),
io_error: None,
panicked: false,
}
}
/// Flush the buffered data to the underlying [`Write`] instance, deferring IO errors.
pub fn flush_defer_err(&mut self) {
// Silently discard data if we errored before but haven't reported it yet
if self.io_error.is_none() {
self.panicked = true;
if let Err(err) = self.write.write_all(&self.buf) {
self.io_error = Some(err);
}
self.panicked = false;
}
self.buf.clear();
}
/// Write a slice of bytes, deferring IO errors.
///
/// Both, [`write`][Write::write] and [`write_all`][Write::write_all] directly call this method.
/// Unlike them, this does not return a `#[must_use]` value, making it clear that this cannot
/// return an error.
#[inline]
pub fn write_all_defer_err(&mut self, buf: &[u8]) {
let old_len = self.buf.len();
// SAFETY add cannot overflow as both are at most `isize::MAX`.
let new_len = old_len + buf.len();
if new_len <= self.buf.capacity() {
unsafe {
// SAFETY this writes to `old_len..new_len` which we just checked to be within the
// capacity of `self.buf`
self.buf
.as_mut_ptr()
.add(old_len)
.copy_from_nonoverlapping(buf.as_ptr(), buf.len());
self.buf.set_len(new_len)
}
} else {
self.write_all_defer_err_cold(buf);
}
}
#[inline(never)]
#[cold]
fn write_all_defer_err_cold(&mut self, mut buf: &[u8]) {
// If the passed `buf` is small enough that we don't need an individual write for it alone,
// fill our internal `buf` up to capacity.
if buf.len() < self.buf.capacity() {
// This assumes that we bailed out of the fast path in `write_all_defer_err`, otherwise
// the index passed to split_at could be out of bounds and this would panic.
let (buf_first, buf_second) = buf.split_at(self.buf.capacity() - self.buf.len());
self.buf.extend_from_slice(buf_first);
buf = buf_second;
}
// This will leaves us an empty buffer, even if an IO error occured.
self.flush_defer_err();
if buf.len() < self.buf.capacity() {
self.buf.extend_from_slice(buf);
} else {
// If the passed `buf` does not fit into our internal `buf`, we directly write it, again
// deferring any IO errors.
// Silently discard data if we errored before but haven't reported it yet
if self.io_error.is_none() {
self.panicked = true;
if let Err(err) = self.write.write_all(&buf) {
self.io_error = Some(err);
}
self.panicked = false;
}
}
}
/// Returns an encountered IO errors as `Err(io_err)`.
///
/// This resets the stored IO error and returns `Ok(())` if no IO error is stored.
#[inline]
pub fn check_io_error(&mut self) -> io::Result<()> {
if let Some(err) = self.io_error.take() {
Err(err)
} else {
Ok(())
}
}
}
impl<'a> Write for ByteWriter<'a> {
#[inline]
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.write_all_defer_err(buf);
Ok(buf.len())
}
#[inline]
fn flush(&mut self) -> io::Result<()> {
self.flush_defer_err();
self.check_io_error()
}
#[inline]
fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {
self.write_all_defer_err(buf);
Ok(())
}
}
impl<'a> Drop for ByteWriter<'a> {
fn drop(&mut self) {
if !self.panicked {
self.flush_defer_err();
}
}
}
| 34.993289 | 100 | 0.569812 |
858949aafcd6819a9a2b9811ccb6e5adfb99e3f1 | 4,474 | js | JavaScript | G2/Class13/Workshop/Code/script/app.js | sedc-codecademy/skwd9-04-ajs | bbbcab6260f64fbee2a9e070100183d5ac361c57 | [
"MIT"
] | 6 | 2021-02-16T08:07:57.000Z | 2021-03-03T14:41:20.000Z | G2/Class13/Workshop/Code/script/app.js | sedc-codecademy/skwd9-04-ajs | bbbcab6260f64fbee2a9e070100183d5ac361c57 | [
"MIT"
] | null | null | null | G2/Class13/Workshop/Code/script/app.js | sedc-codecademy/skwd9-04-ajs | bbbcab6260f64fbee2a9e070100183d5ac361c57 | [
"MIT"
] | 15 | 2021-02-06T09:04:22.000Z | 2021-03-19T18:59:28.000Z | import {data as dataFromFile} from './data.js';
let promise = new Promise(function(resolve, reject){
resolve(dataFromFile);
})
const html = {
searchInput: document.getElementById("searchInput"),
searchBtn: document.getElementById("searchBtn"),
resetBtn: document.getElementById("resetBtn"),
spiner: document.getElementById("spiner"),
cardContainer: document.getElementById("cardContainer"),
notification: document.getElementById("notification"),
btnCurrency: document.getElementById("btnCurrency"),
btnEnglish: document.getElementById("btnEnglish"),
btnMacedonia: document.getElementById("btnMacedonia")
}
function createCard(country){
return `
<div class="col mb-4">
<div class="card">
<img src="${country.flag}" alt="${country.name} Flag">
<div class="card-body">
<h5 class="card-title">${country.name}</h5>
<p class="card-text">${country.name} is country with population of ${country.population} with the capital city ${country.capital}. Official language is: ${country.languages[0].name}</p>
</div>
<div class="card-footer">
<small class="text-muted">Open on <a href="https://en.wikipedia.org/wiki/${createWikiLink(country.name)}" target="_blank">Wikipedia</a></small>
</div>
</div>
</div>`
}
function createWikiLink(name){
return name.split(" ").join("_");
}
function spinerLoader(state){
if(state){
html.spiner.style.display = "block";
} else {
html.spiner.style.display = "none";
}
}
html.searchBtn.addEventListener("click", function(){
spinerLoader(true);
fetch(`https://restcountries.eu/rest/v2/name/${html.searchInput.value}`)
.then(data => data.json())
.then(function(result){
spinerLoader(false);
html.notification.innerHTML = "";
html.cardContainer.innerHTML = "";
try{
for(let country of result){
html.cardContainer.innerHTML += createCard(country);
}
} catch(error){
html.notification.innerHTML = `
<div class="alert alert-danger" role="alert">
You have entered a wrong country name, please try again!
</div>
`
}
})
})
html.searchInput.addEventListener("keydown", function(event){
if(event.key === "Enter"){
spinerLoader(true);
fetch(`https://restcountries.eu/rest/v2/name/${html.searchInput.value}`)
.then(data => data.json())
.then(function(result){
spinerLoader(false);
html.cardContainer.innerHTML = "";
html.notification.innerHTML = "";
try{
for(let country of result){
html.cardContainer.innerHTML += createCard(country);
}
} catch(error){
html.notification.innerHTML = `
<div class="alert alert-danger" role="alert">
You have entered a wrong country name, please try again!
</div>`
}
})
}
})
html.resetBtn.addEventListener("click", function(){
html.cardContainer.innerHTML = "";
html.searchInput.innerHTML = "";
html.searchInput.value = "";
html.notification.innerHTML = "";
})
html.btnCurrency.addEventListener("click", function(){
html.cardContainer.innerHTML = "";
html.notification.innerHTML = "";
promise.then(function(dataFromFile){
let result = dataFromFile.filter(x => x.currencies[0].code === "EUR");
result.forEach(country => {
html.cardContainer.innerHTML += createCard(country);
})
})
})
html.btnEnglish.addEventListener("click", function(){
html.cardContainer.innerHTML = "";
html.notification.innerHTML = "";
promise.then(function(dataFromFile){
let results = dataFromFile.filter(x => x.languages[0].name === "English");
results.forEach(country => {
html.cardContainer.innerHTML += createCard(country);
})
})
})
html.btnMacedonia.addEventListener("click", function(){
html.cardContainer.innerHTML = "";
html.notification.innerHTML = "";
promise.then(function(dataFromFile){
let result = dataFromFile.filter(x => x.name.includes("Macedonia"));
result.forEach(country => {
html.cardContainer.innerHTML += createCard(country);
})
})
}) | 33.639098 | 201 | 0.604157 |
9074dde93de61b347b1589f348318f0c88a51381 | 1,673 | py | Python | tests/components/homekit_controller/specific_devices/test_simpleconnect_fan.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | tests/components/homekit_controller/specific_devices/test_simpleconnect_fan.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | tests/components/homekit_controller/specific_devices/test_simpleconnect_fan.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """
Test against characteristics captured from a SIMPLEconnect Fan.
https://github.com/openpeerpower/core/issues/26180
"""
from openpeerpower.components.fan import SUPPORT_DIRECTION, SUPPORT_SET_SPEED
from openpeerpower.helpers import device_registry as dr, entity_registry as er
from tests.components.homekit_controller.common import (
Helper,
setup_accessories_from_file,
setup_test_accessories,
)
async def test_simpleconnect_fan_setup(opp):
"""Test that a SIMPLEconnect fan can be correctly setup in HA."""
accessories = await setup_accessories_from_file(opp, "simpleconnect_fan.json")
config_entry, pairing = await setup_test_accessories(opp, accessories)
entity_registry = er.async_get(opp)
# Check that the fan is correctly found and set up
fan_id = "fan.simpleconnect_fan_06f674"
fan = entity_registry.async_get(fan_id)
assert fan.unique_id == "homekit-1234567890abcd-8"
fan_helper = Helper(
opp,
"fan.simpleconnect_fan_06f674",
pairing,
accessories[0],
config_entry,
)
fan_state = await fan_helper.poll_and_get_state()
assert fan_state.attributes["friendly_name"] == "SIMPLEconnect Fan-06F674"
assert fan_state.state == "off"
assert fan_state.attributes["supported_features"] == (
SUPPORT_DIRECTION | SUPPORT_SET_SPEED
)
device_registry = dr.async_get(opp)
device = device_registry.async_get(fan.device_id)
assert device.manufacturer == "Hunter Fan"
assert device.name == "SIMPLEconnect Fan-06F674"
assert device.model == "SIMPLEconnect"
assert device.sw_version == ""
assert device.via_device_id is None
| 32.173077 | 82 | 0.735804 |
468b410bb6bbff13ef1ad257d1ccd8dfec0e605f | 3,017 | swift | Swift | Surf/iTunesFileTableViewController.swift | jobpassion/Surf | 42109301ed01b9fa333cd7ebd4d68bfe870fe0e0 | [
"BSD-3-Clause"
] | 1 | 2021-04-30T05:36:24.000Z | 2021-04-30T05:36:24.000Z | Surf/iTunesFileTableViewController.swift | jobpassion/Surf | 42109301ed01b9fa333cd7ebd4d68bfe870fe0e0 | [
"BSD-3-Clause"
] | null | null | null | Surf/iTunesFileTableViewController.swift | jobpassion/Surf | 42109301ed01b9fa333cd7ebd4d68bfe870fe0e0 | [
"BSD-3-Clause"
] | 1 | 2021-09-09T08:09:06.000Z | 2021-09-09T08:09:06.000Z | //
// iTunesFileTableViewController.swift
// Surf
//
// Created by yarshure on 16/1/18.
// Copyright © 2016年 yarshure. All rights reserved.
//
import UIKit
@objc protocol AddFileDelegate:class {
func importFileConfig(controller: iTunesFileTableViewController, config:String)// file name
func cancelSelect(controller: iTunesFileTableViewController)// file name
}
class iTunesFileTableViewController: UITableViewController {
var delegate:AddFileDelegate?
var iTunesFiles:[String] = []
@objc func scanJsonsFile() {
if iTunesFiles.count > 0 {
iTunesFiles.removeAll()
}
let files = try! fm.contentsOfDirectory(atPath: applicationDocumentsDirectory.path)
for f in files {
if let x = f.components(separatedBy: ".").last {
if x == ".conf" {
iTunesFiles.append(f)
}
}
}
if iTunesFiles.count > 0 {
tableView.reloadData()
}
}
override func viewDidLoad() {
super.viewDidLoad()
self.title = "Please Select config file"
self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(barButtonSystemItem: .cancel, target: self, action: #selector(iTunesFileTableViewController.cancelAction(_:)))
self.navigationItem.leftBarButtonItem = UIBarButtonItem.init(title: "Refresh", style: .plain, target: self, action: #selector(iTunesFileTableViewController.scanJsonsFile))
scanJsonsFile()
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
var v:UIAlertController
if iTunesFiles.count == 0 {
//don't found config
v = UIAlertController(title: "Alert", message: "Please use iTunes add Config File(\(configExt)) and Retry", preferredStyle: .alert)
let action = UIAlertAction(title: "OK", style: .default) { (action:UIAlertAction) -> Void in
}
v.addAction(action)
self.present(v, animated: true) { () -> Void in
}
}
}
@objc func cancelAction(_ sender:AnyObject?){
delegate?.cancelSelect(controller: self)
}
override func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return iTunesFiles.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "fileSharing")
cell?.textLabel?.text = iTunesFiles[indexPath.row]
return cell!
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: false)
delegate?.importFileConfig(controller: self, config: iTunesFiles[indexPath.row])
}
}
| 37.246914 | 181 | 0.641366 |
4364414f7d657c2c36ffe47eb905c1b0110b23e0 | 843 | asm | Assembly | programs/oeis/010/A010892.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/010/A010892.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/010/A010892.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A010892: Inverse of 6th cyclotomic polynomial. A period 6 sequence.
; 1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1
mov $3,8
lpb $3,1
add $0,1
add $5,1
mul $5,2
mov $6,$5
gcd $6,$0
mul $0,$6
mul $0,2
mov $3,$1
lpe
lpb $4,3
lpb $0,1
sub $0,6
lpe
mov $5,1
lpe
mov $1,$0
div $1,2
| 36.652174 | 584 | 0.467378 |
8580c2ac392e5ef589832d27d4f667df7ed96e84 | 6,239 | js | JavaScript | client/src/components/navbar.component.js | r951236958/todo-application | ee91dac72f01464767b9a36975b258dd0bc2441e | [
"MIT"
] | null | null | null | client/src/components/navbar.component.js | r951236958/todo-application | ee91dac72f01464767b9a36975b258dd0bc2441e | [
"MIT"
] | null | null | null | client/src/components/navbar.component.js | r951236958/todo-application | ee91dac72f01464767b9a36975b258dd0bc2441e | [
"MIT"
] | null | null | null | import React, { useEffect, useState } from 'react';
import { IconButton, Tooltip } from '@material-ui/core';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faAdjust, faSignOutAlt, faUser, faListUl, faSignInAlt, faUsers, faChartLine } from '@fortawesome/free-solid-svg-icons/';
import { Logout } from '../libraries/validation';
const Navbar = ({ userData }) => {
const {email, id, authenticated, isLoading} = userData;
const theme = localStorage.getItem('__theme')
const [value_a, setValue_a] = useState([]);
const [value_b, setValue_b] = useState([]);
const [value_c, setValue_c] = useState();
useEffect(() => {
if(theme === "dark") document.body.classList.add("dark");
if(!isLoading && authenticated){
setValue_a([`Dashboard`,'/', <FontAwesomeIcon icon={faListUl} style={{ fontSize: "1.5em" }} />]);
setValue_b([`Sign Out`,'#!', <FontAwesomeIcon icon={faSignOutAlt} style={{ fontSize: "1.5em" }} />, () => Logout(id, email)]);
setValue_c([`Account Settings`,'/account', <FontAwesomeIcon icon={faUser} style={{ fontSize: "1.4em" }} />]);
}else {
setValue_a(['Login','/login', <FontAwesomeIcon icon={faSignInAlt} style={{ fontSize: "1.5em" }} />]);
setValue_b(['Get Started','/get-started', <FontAwesomeIcon icon={faUsers} style={{ fontSize: "1.5em" }} />]);
}
},[userData, theme]);
const toggleNavbar = (e) => {
e.preventDefault();
var menu = document.getElementById("navbar__menu");
var icon = document.getElementById("navbar-icon");
icon.classList.toggle("closeIcon");
if(menu.style.display === "block") menu.style.display = "none";
else menu.style.display = "block";
}
const changeMode = (e) => {
e.preventDefault();
let theme = "light";
document.body.classList.toggle("dark");
if(document.body.classList.contains("dark")) theme = "dark";
localStorage.setItem("__theme", theme);
}
return (
<div>
<div className="navbar">
<a className="navbar__logo" href={ authenticated ? '/' : '/welcome' }>TodoApp</a>
<div className="navbar__menu" id="navbar__menu">
<a className="animation__underline" href={value_a[1]}>
<span className="icons">
<Tooltip title={value_a[0] ? value_a[0]:""}><span>{value_a[2]}</span></Tooltip>
</span>
<span className="description">{value_a[0]}</span>
</a>
{value_c ? (
<a className="animation__underline" id={value_c[0]} href={value_c[1]}>
<span className="icons">
<Tooltip title={value_c[0] ? value_c[0]:""}><span>{value_c[2]}</span></Tooltip>
</span>
<span className="description">{value_c[0]}</span>
</a>) : null}
<a className="animation__underline" href="https://todoapp.freshstatus.io/" target="_blank" rel="noopener noreferrer">
<span className="icons">
<Tooltip title="Status">
<span><FontAwesomeIcon icon={faChartLine} style={{ fontSize: "1.5em" }} /></span>
</Tooltip>
</span>
<span className="description">Status</span>
</a>
<a className="animation__underline" id={value_b[0]} href={value_b[1]} onClick={value_b[3]}>
<span className="icons"><Tooltip title={value_b[0] ? value_b[0]:""}><span>{value_b[2]}</span></Tooltip></span>
<span className="description">{value_b[0]}</span>
</a>
</div>
<div className="toggleNavbar">
<Tooltip title="Menu">
<IconButton onClick={toggleNavbar}>
<div className="container-bar" id="navbar-icon">
<div className="bar1"></div>
<div className="bar2"></div>
<div className="bar3"></div>
</div>
</IconButton>
</Tooltip>
</div>
</div>
<Tooltip title="Change Mode">
<button className="btn__changeMode" aria-label="Change Mode" onClick={changeMode}>
<FontAwesomeIcon icon={faAdjust} size="2x"/>
</button>
</Tooltip>
<a href="https://github.com/stanleyowen/todo-application" target="_blank" rel="noreferrer noopener" className="github-corner" aria-label="View Source Code on GitHub">
<svg width="80" height="80" viewBox="0 0 250 250" style={{ fill: '#64CEAA', color: '#fff', position: 'fixed', bottom: '0', border: '0', left: '0', transform: 'scale(-1, -1)' }} aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style={{ transformOrigin: '130px 106px' }} className="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" className="octo-body"></path>
</svg>
</a>
</div>
);
}
export default Navbar; | 60.572816 | 611 | 0.534701 |
2696414c24fd6b2fba2055c0b4fb767e7eefd63d | 17,783 | java | Java | topics/api-migration/benchmark/src/org/planet_sl/apimigration/benchmark/jdom/test_as_xom/ParentNodeTest.java | grammarware/slps | a39bb0f8454de8508269d4467f2501badbb2cc4a | [
"BSD-3-Clause"
] | 19 | 2015-01-18T13:50:02.000Z | 2021-11-08T11:23:22.000Z | topics/api-migration/benchmark/src/org/planet_sl/apimigration/benchmark/jdom/test_as_xom/ParentNodeTest.java | grammarware/slps | a39bb0f8454de8508269d4467f2501badbb2cc4a | [
"BSD-3-Clause"
] | null | null | null | topics/api-migration/benchmark/src/org/planet_sl/apimigration/benchmark/jdom/test_as_xom/ParentNodeTest.java | grammarware/slps | a39bb0f8454de8508269d4467f2501badbb2cc4a | [
"BSD-3-Clause"
] | 13 | 2015-01-18T13:50:07.000Z | 2020-05-26T10:10:18.000Z | package org.planet_sl.apimigration.benchmark.jdom.test_as_xom;
import org.planet_sl.apimigration.benchmark.anno.Progress;
import org.planet_sl.apimigration.benchmark.anno.Progress.Status;
import org.planet_sl.apimigration.benchmark.anno.Solution;
import org.planet_sl.apimigration.benchmark.anno.Solution.Strategy;
import org.planet_sl.apimigration.benchmark.anno.Issue;
import org.planet_sl.apimigration.benchmark.jdom.wrapped_as_xom.*;
/**
* <p>
* Tests adding, removing, and counting children from parent nodes.
* </p>
*
* @author Elliotte Rusty Harold
* @version 1.2d1
*
*/
public class ParentNodeTest extends XOMTestCase {
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public ParentNodeTest(String name) {
super(name);
}
private Element empty;
private Element notEmpty;
private Text child;
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
protected void setUp() {
empty = new Element("Empty");
notEmpty = new Element("NotEmpty");
child = new Text("Hello");
notEmpty.appendChild(child);
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testDetach() {
Text text = new Text("This will be attached then detached");
empty.appendChild(text);
assertEquals(empty, text.getParent());
text.detach();
assertNull(text.getParent());
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testAppendChild() {
Element child = new Element("test");
empty.appendChild(child);
assertEquals(1, empty.getChildCount());
assertEquals(empty.getChild(0), child);
child.detach();
notEmpty.appendChild(child);
assertFalse(notEmpty.getChild(0).equals(child));
assertTrue(notEmpty.getChild(1).equals(child));
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testAppendChildToItself() {
Element child = new Element("test");
try {
child.appendChild(child);
fail("Appended node to itself");
}
catch (CycleException success) {
assertNotNull(success.getMessage());
}
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testCycle() {
Element a = new Element("test");
Element b = new Element("test");
try {
a.appendChild(b);
b.appendChild(a);
fail("Allowed cycle");
}
catch (CycleException success) {
assertNotNull(success.getMessage());
}
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testInsertChild() {
Element parent = new Element("parent");
// Test insert into empty element
Element child1 = new Element("child");
parent.insertChild(child1, 0);
assertTrue(parent.getChildCount() > 0);
assertEquals(0, parent.indexOf(child1));
// Test insert at beginning
Element child2 = new Element("child2");
parent.insertChild(child2, 0);
assertEquals(0, parent.indexOf(child2));
assertEquals(1, parent.indexOf(child1));
// Test insert in middle
Element child3 = new Element("child3");
parent.insertChild(child3, 1);
assertEquals(0, parent.indexOf(child2));
assertEquals(1, parent.indexOf(child3));
assertEquals(2, parent.indexOf(child1));
// Test insert at beginning with children
Element child4 = new Element("child4");
parent.insertChild(child4, 0);
assertEquals(0, parent.indexOf(child4));
assertEquals(1, parent.indexOf(child2));
assertEquals(2, parent.indexOf(child3));
assertEquals(3, parent.indexOf(child1));
// Test insert at end with children
Element child5 = new Element("child5");
parent.insertChild(child5, 4);
assertEquals(0, parent.indexOf(child4));
assertEquals(1, parent.indexOf(child2));
assertEquals(2, parent.indexOf(child3));
assertEquals(3, parent.indexOf(child1));
assertEquals(4, parent.indexOf(child5));
try {
parent.insertChild((Element) null, 0);
fail("Inserted null");
}
catch (NullPointerException success) {
assertNotNull(success.getMessage());
}
try {
parent.insertChild((Text) null, 0);
fail("Inserted null");
}
catch (NullPointerException success) {
assertNotNull(success.getMessage());
}
try {
parent.insertChild((Comment) null, 0);
fail("Inserted null");
}
catch (NullPointerException success) {
assertNotNull(success.getMessage());
}
try {
parent.insertChild((ProcessingInstruction) null, 0);
fail("Inserted null");
}
catch (NullPointerException success) {
assertNotNull(success.getMessage());
}
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testAppendChild2() {
try {
empty.appendChild(new Document(notEmpty));
fail("appended a document to an element");
}
catch (IllegalAddException success) {
assertNotNull(success.getMessage());
}
try {
empty.appendChild(child);
fail("appended a child twice");
}
catch (MultipleParentException success) {
assertNotNull(success.getMessage());
}
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testReplaceChild() {
Element old1 = new Element("old1");
Element old2 = new Element("old2");
Element old3 = new Element("old3");
Element new1 = new Element("new1");
Element new2 = new Element("new2");
Element new3 = new Element("new3");
empty.appendChild(old1);
empty.appendChild(old2);
empty.appendChild(old3);
empty.replaceChild(old1, new1);
empty.replaceChild(old3, new3);
empty.replaceChild(old2, new2);
Node current1 = empty.getChild(0);
Node current2 = empty.getChild(1);
Node current3 = empty.getChild(2);
assertEquals(new1, current1);
assertEquals(new2, current2);
assertEquals(new3, current3);
try {
empty.replaceChild(new1, null);
}
catch (NullPointerException success) {
assertNotNull(success.getMessage());
}
try {
empty.replaceChild(null, old1);
}
catch (NullPointerException success) {
assertNotNull(success.getMessage());
}
Element new4 = new Element("new4");
try {
empty.replaceChild(new4, new Element("test"));
fail("Replaced Nonexistent element");
}
catch (NoSuchChildException success) {
assertNotNull(success.getMessage());
}
// Test replacing node with itself
empty.replaceChild(new1, new1);
assertEquals(new1, empty.getChild(0));
assertEquals(empty, new1.getParent());
// Test replacing node with a sibling
try {
empty.replaceChild(new1, new2);
fail("replaced a node with its sibling");
}
catch (MultipleParentException success) {
assertNotNull(success.getMessage());
}
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testIndexOf() {
Element child1 = new Element("old1");
Text child2 = new Text("old2");
Comment child3 = new Comment("old3");
assertEquals(-1, empty.indexOf(child1));
empty.appendChild(child1);
empty.appendChild(child2);
empty.appendChild(child3);
assertEquals(0, empty.indexOf(child1));
assertEquals(1, empty.indexOf(child2));
assertEquals(2, empty.indexOf(child3));
assertEquals(-1, empty.indexOf(empty));
assertEquals(-1, empty.indexOf(new Text("test")));
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testGetChild() {
Element old1 = new Element("old1");
Element old2 = new Element("old2");
Element old3 = new Element("old3");
try {
empty.getChild(0);
fail("No index exception");
}
catch (IndexOutOfBoundsException success) {
// success
assertNotNull(success.getMessage());
}
empty.appendChild(old1);
empty.appendChild(old2);
empty.appendChild(old3);
assertEquals(old1, empty.getChild(0));
assertEquals(old3, empty.getChild(2));
assertEquals(old2, empty.getChild(1));
try {
empty.getChild(5);
fail("No index exception");
}
catch (IndexOutOfBoundsException success) {
// success
assertNotNull(success.getMessage());
}
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testRemoveChild() {
try {
empty.removeChild(0);
fail("Removed child from empty element");
}
catch (IndexOutOfBoundsException success) {
assertNotNull(success.getMessage());
}
Element old1 = new Element("old1");
Element old2 = new Element("old2");
Element old3 = new Element("old3");
try {
empty.removeChild(old1);
fail("Removed non-existent child from empty element");
}
catch (NoSuchChildException success) {
assertNotNull(success.getMessage());
}
empty.appendChild(old1);
empty.appendChild(old2);
empty.appendChild(old3);
empty.removeChild(1);
assertEquals(old1, empty.getChild(0));
assertEquals(old3, empty.getChild(1));
try {
empty.removeChild(5);
fail("No IndexOutOfBoundsException");
}
catch (IndexOutOfBoundsException success) {
assertNotNull(success.getMessage());
}
empty.removeChild(1);
empty.removeChild(0);
assertNull(old2.getParent());
assertEquals(0, empty.getChildCount());
empty.appendChild(old1);
empty.appendChild(old2);
empty.appendChild(old3);
assertEquals(3, empty.getChildCount());
empty.removeChild(old3);
empty.removeChild(old1);
empty.removeChild(old2);
assertEquals(0, empty.getChildCount());
assertNull(old1.getParent());
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testReplaceChildFailures() {
Element old1 = new Element("old1");
Element old2 = new Element("old2");
Element old3 = new Element("old3");
Element new1 = new Element("new1");
Element new3 = new Element("new3");
empty.appendChild(old1);
empty.appendChild(old2);
try {
empty.replaceChild(old3, new3);
fail("Replaced non-existent child");
}
catch (NoSuchChildException success) {
assertNotNull(success.getMessage());
}
try {
empty.replaceChild(old1, null);
fail("Replaced child with null");
}
catch (NullPointerException success) {
assertNotNull(success.getMessage());
}
try {
empty.replaceChild(null, new1);
fail("Replaced null");
}
catch (NullPointerException success) {
assertNotNull(success.getMessage());
}
}
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testReplaceChildInEmptyParent() {
Element test1 = new Element("test");
Element test2 = new Element("test");
try {
empty.replaceChild(test1, test2);
fail("Replaced element in empty parent");
}
catch (NoSuchChildException success) {
assertNotNull(success.getMessage());
}
}
// Document that this behavior is intentional
// An element cannot be replaced by its sibling unless
// the sibling is first detached.
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testReplaceSibling() {
Element parent = new Element("parent");
Element test1 = new Element("test");
Element test2 = new Element("test");
parent.appendChild(test1);
parent.appendChild(test2);
try {
parent.replaceChild(test1, test2);
fail("Replaced element without detaching first");
}
catch (IllegalAddException success) {
assertNotNull(success.getMessage());
}
assertEquals(2, parent.getChildCount());
assertEquals(parent, test1.getParent());
assertEquals(parent, test2.getParent());
}
// Similarly, this test documents the conscious decision
// that you cannot insert an existing child into its own parent,
// even at the same position
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testCantInsertExisitngChild() {
Element parent = new Element("parent");
Element test1 = new Element("test");
Element test2 = new Element("test");
parent.appendChild(test1);
parent.appendChild(test2);
try {
parent.insertChild(test2, 0);
fail("Inserted element without detaching first");
}
catch (MultipleParentException success) {
assertNotNull(success.getMessage());
}
try {
parent.insertChild(test2, 1);
fail("Inserted element without detaching first");
}
catch (MultipleParentException success) {
assertNotNull(success.getMessage());
}
assertEquals(2, parent.getChildCount());
assertEquals(parent, test1.getParent());
assertEquals(parent, test2.getParent());
}
// can't remove when insertion is legal;
// succeeed or fail as unit
@Progress(
value = Status.TODO,
comment = ""
)
@Solution(
value = Strategy.OTHER,
comment = ""
)
@Issue.Pre("")
@Issue.Post("")
@Issue.Throws("")
public void testReplaceChildAtomicity() {
Element parent = new Element("parent");
Text child = new Text("child");
parent.appendChild(child);
try {
parent.replaceChild(child, new DocType("root"));
fail("allowed doctype child of element");
}
catch (IllegalAddException success) {
assertEquals(parent, child.getParent());
assertEquals(1, parent.getChildCount());
}
Element e = new Element("e");
Text child2 = new Text("child2");
e.appendChild(child2);
try {
parent.replaceChild(child, child2);
fail("allowed replacement with existing parent");
}
catch (MultipleParentException success) {
assertEquals(e, child2.getParent());
assertEquals(parent, child.getParent());
assertEquals(1, parent.getChildCount());
assertEquals(1, e.getChildCount());
}
}
} | 25.152758 | 69 | 0.557667 |
0bc10ee1d8cb8fa794fa00533f0e4782089ee855 | 107 | py | Python | app/search/urlmap.py | Hanaasagi/Ushio | 007f8e50e68bf71a1822b09291b1236a1a37c515 | [
"MIT"
] | 5 | 2016-10-24T14:01:48.000Z | 2017-09-26T07:33:20.000Z | app/search/urlmap.py | Hanaasagi/Ushio | 007f8e50e68bf71a1822b09291b1236a1a37c515 | [
"MIT"
] | null | null | null | app/search/urlmap.py | Hanaasagi/Ushio | 007f8e50e68bf71a1822b09291b1236a1a37c515 | [
"MIT"
] | null | null | null | # -*-coding:UTF-8-*-
from handler import SearchHandler
urlpattern = (
(r'/search', SearchHandler),
)
| 13.375 | 33 | 0.654206 |