text
stringlengths 27
775k
|
---|
//
// NSDate+SA.h
// SACategory
//
// Created by yusian on 15-3-19.
// Copyright (c) 2015年 Sian. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDate (SA)
// 根据日期获取星期,返回数字(1~7)
+ (NSInteger)weekDayWithDate:(NSDate *)date;
// 当前日期是否处于本周
- (BOOL)hasBelongThisWeek;
// 日期转换成字符串,格式如:2015-03-19
+ (NSString *)formateDate:(NSDate *)date;
// 日期转换成字符串,自定义格式
+ (NSString *)formateDate:(NSDate *)date formate:(NSString *)format;
// 字符串转成日期,格式如:2015-03-19
+ (NSDate *)dateFromeString:(NSString *)string;
// 字符串转成日期,自定义格式
+ (NSDate *)dateFromeString:(NSString *)string formate:(NSString *)format;
// 本周日期字符串数组
+ (NSArray *)currentWeekDays;
// 时间戵
+ (NSTimeInterval)dateWithTimestamp;
// 转成yyyy-MM-dd HH:mm格式
- (NSString *)toString;
// 自定义转换格式
- (NSString *)toStringFormat:(NSString *)formatString;
@end
|
package org.gradoop.spark.model.impl.operators.setgraph.gve
import org.gradoop.spark.model.api.operators.BinaryLogicalGraphToLogicalGraphOperator
import org.gradoop.spark.model.impl.types.Gve
class GveOverlap[L <: Gve[L]] extends BinaryLogicalGraphToLogicalGraphOperator[L#LG] {
override def execute(left: L#LG, right: L#LG): L#LG = {
val factory = left.factory
import factory.Implicits._
import left.config.Implicits._
val resVertices = left.vertices
.join(right.vertices, left.vertices.id === right.vertices.id, "leftsemi").as[L#V]
val resEdges = left.edges
.join(right.edges, left.edges.id === right.edges.id, "leftsemi").as[L#E]
factory.init(left.graphHeads, resVertices, resEdges)
}
}
|
<?php
namespace Smoren\Yii2\QueryRelationManager\Base;
/**
* Интерфейс для обертки ORM-класса запроса
* @package Smoren\Yii2\QueryRelationManager\Base
* @author Smoren <[email protected]>
*/
interface QueryWrapperInterface
{
/**
* Передача в запрос список выбираемых полей
* @param array $arSelect карта выбираемых полей ["fieldAlias" => "table.fieldName", ...]
* @return QueryWrapperInterface
*/
public function select(array $arSelect): self;
/**
* Передача в запрос таблицы, из которой будет осуществляться выброка
* @param array $mapFrom имя и псевдоним таблицы ["tableAlias" => "tableName"]
* @return $this
*/
public function from(array $mapFrom): self;
/**
* @param string $type тип присоединения ("inner", "left", "right")
* @param array $mapTable имя и псевдоним присоединяемой таблицы ["tableAlias" => "tableName"]
* @param string $condition условия присоединения
* @param array $extraJoinParams динамические параметры присоединения
* @return $this
*/
public function join(string $type, array $mapTable, string $condition, array $extraJoinParams = []): self;
/**
* Получение массива строк — результата запроса
* @param null $db объект подключения к БД
* @return array
*/
public function all($db = null): array;
/**
* Получения объекта запроса
* @return mixed
*/
public function getQuery();
/**
* Получение SQL-кода запроса
* @return string
*/
public function getRawSql(): string;
} |
---
title: "DVWA: File Inclusion"
last_modified_at: 2020-09-21T00:24:02-05:00
categories:
- DVWA
tags:
- DVWA
- 웹해킹
toc: true
toc_label: "Table of Contents"
toc_icon: "cog"
toc_sticky: true
author_profile: true
read_time: false
---
<figure class="align-center">
<img src="{{ site.url }}{{ site.baseurl }}/assets/images/DVWA/FileInclusion1.jpg" alt="">
<figcaption></figcaption>
</figure>
<figure class="align-center">
<img src="{{ site.url }}{{ site.baseurl }}/assets/images/DVWA/FileInclusion2.jpg" alt="">
<figcaption></figcaption>
</figure>
<figure class="align-center">
<img src="{{ site.url }}{{ site.baseurl }}/assets/images/DVWA/FileInclusion3.jpg" alt="">
<figcaption></figcaption>
</figure>
<figure class="align-center">
<img src="{{ site.url }}{{ site.baseurl }}/assets/images/DVWA/FileInclusion4.jpg" alt="">
<figcaption></figcaption>
</figure>
<figure class="align-center">
<img src="{{ site.url }}{{ site.baseurl }}/assets/images/DVWA/FileInclusion5.jpg" alt="">
<figcaption></figcaption>
</figure>
<figure class="align-center">
<img src="{{ site.url }}{{ site.baseurl }}/assets/images/DVWA/FileInclusion6.jpg" alt="">
<figcaption></figcaption>
</figure>
|
<!--
id: 3169251612
link: http://tumblr.atmos.org/post/3169251612/file-readme-kgio-kinder-gentler-i-o-for-ruby
slug: file-readme-kgio-kinder-gentler-i-o-for-ruby
date: Mon Feb 07 2011 14:11:40 GMT-0800 (PST)
publish: 2011-02-07
tags:
title: File: README [kgio - kinder, gentler I/O for Ruby]
-->
File: README [kgio - kinder, gentler I/O for Ruby]
==================================================
[http://bogomips.org/kgio/index.html](http://bogomips.org/kgio/index.html)
|
using RepairsApi.V2.Domain;
using System.Threading.Tasks;
namespace RepairsApi.V2.UseCase.Interfaces
{
#nullable enable
public interface IGetPropertyUseCase
{
Task<PropertyWithAlerts?> ExecuteAsync(string propertyReference);
}
}
|
"""
Transitive dependencies.
"""
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
load("@rules_antlr//antlr:deps.bzl", "antlr_dependencies")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
def cel_spec_deps_extra():
"""CEL Spec dependencies."""
go_repository(
name = "org_golang_google_genproto",
build_file_proto_mode = "disable_global",
commit = "62d171c70ae133bd47722027b62f8820407cf744",
importpath = "google.golang.org/genproto",
)
go_repository(
name = "org_golang_google_grpc",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/grpc",
tag = "v1.33.2",
)
go_repository(
name = "org_golang_x_net",
importpath = "golang.org/x/net",
sum = "h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=",
version = "v0.0.0-20190311183353-d8887717615a",
)
go_repository(
name = "org_golang_x_text",
importpath = "golang.org/x/text",
sum = "h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=",
version = "v0.3.0",
)
go_rules_dependencies()
go_register_toolchains()
gazelle_dependencies()
def cel_cpp_deps_extra():
"""All transitive dependencies."""
protobuf_deps()
switched_rules_by_language(
name = "com_google_googleapis_imports",
cc = True,
go = True, # cel-spec requirement
)
antlr_dependencies(472)
cel_spec_deps_extra()
|
; stat-interrupt.asm - Avik Das
;
; = DATA/VARIABLES ==================================================
SECTION "RAM",BSS[$c000]
SCRBAS: DB ; the base offset into the background scroll table
SCROFF: DB ; display line-specific offset into the scroll table
WNDWON: DB ; whether the window is being drawn or not
VBFLAG: DB ; whether or not we are in V-Blank
; = INTERRUPT HANDLERS ==============================================
; These are simple interrupt handlers that simply call the actual
; procedures responsible for taking any action. The procedures will
; call "reti".
SECTION "vblank",HOME[$40]
nop
jp vblank
SECTION "stat" ,HOME[$48]
nop
jp stat
SECTION "timer" ,HOME[$50]
nop
jp timer
SECTION "start",HOME[$100]
nop
jp start
; = CATRIDGE HEADER =================================================
; Nintendo logo. must be exactly as given
DB $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83,$00,$0C,$00,$0D
DB $00,$08,$11,$1F,$88,$89,$00,$0E,$DC,$CC,$6E,$E6,$DD,$DD,$D9,$99
DB $BB,$BB,$67,$63,$6E,$0E,$EC,$CC,$DD,$DC,$99,$9F,$BB,$B9,$33,$3E
DB "HBLANK",0,0,0,0,0,0,0,0,0 ; title, upper case ASCII, 15 bytes
DB 0 ; not a GBC catridge
DB 0,0 ; new licensee code, high and low nibbles. not important
DB 0 ; not SGB
DB 0 ; catridge type, ROM only
DB 0 ; ROM size, 256Kbit = 32KByte = 2 banks
DB 0 ; RAM size, no RAM
DB 1 ; destination code, non-Japanese
DB $33 ; old licensee code, $33 => check new licensee code
DB 0 ; mask ROM version number, usually 0
DB 0 ; complement check. computed by rgbfix. important.
DW 0 ; checksum. computed by rgbfix. not important.
; = INITIALIZATION ==================================================
start:
nop
di ; disable interrupts
ld sp, $ffff ; put the stack at the top of the RAM
init:
call lcd_off
call init_ram
call load_bg
call clear_oam
call lcd_on
call start_timer
ld a,%00001000 ; enable H-Blank interrupt
ld [$ff41],a
ld a,%00000111 ; enable V-Blank interrupt
; enable LCDC STAT interrupt
; enable timer interrupt
ld [$ffff],a
ei
; = MAIN LOOP =======================================================
loop:
halt
nop
ld a,[VBFLAG]
or 0
jr z,loop
ld a,0
ld [VBFLAG],a
jr loop
; = INITIALIZATION FUNCTIONS ========================================
init_ram:
; initialize the RAM variables
ld a,0
ld [SCRBAS],a
ld [SCROFF],a
ld [WNDWON],a
ld [VBFLAG],a
ret
load_bg:
; load the background palette
ld a,[bgpal]
ld [$ff47],a
; reset the screen position
ld a,0
ld [$ff42],a ; scrolly = 0
ld [$ff43],a ; scrollx = 0
; load the background tiles into the Tile Data Table
ld hl,tiles ; source address
ld de,$8800 ; destination address
ld bc,32 ; number of bytes to copy
call memcpy
; load background into Background Tile Map
ld hl,bg
ld de,$9800
ld bc,1024
call memcpy
; load window into the Window Tile Map
ld hl,window
ld de,$9c00
ld bc,1024
call memcpy
; offset the window layer
ld a,0 ; y offset
ld [$ff4a],a
ld a,7 ; x offset (actual offset is value-7)
ld [$ff4b],a
ret
clear_oam:
; zero out the OAM buffer
ld de,$fe00
ld bc,256
call zeromem
ret
start_timer:
; The timer will be incremented 4096 times each second, and each time
; it overflows, it will be reset to 0. This means that the timer will
; overflow every (1/4096) * 256 = 0.0625s.
ld a,0 ; the value of rTIMA after it overflows
ld [$ff06],a
ld a,%00000100 ; enable the timer
; increment rTIMA at 4096Hz
ld [$ff07],a
ret
; = INTERRUPT HANDLERS ==============================================
vblank:
push af
push bc
push de
push hl
ld a,1
ld [VBFLAG],a
; reset the background scroll index
ld a,0
ld [SCROFF],a
; at the top of the screen, the window is visible
call show_window
; However, at line 16, the window should not be visible. To achieve
; this, we set the value of rLYC, which will cause the Coincidence
; Flag of rSTAT (the LCDC Status register) to be set when the scanline
; is 16 (i.e. when rLY = rLYC). We will be able to check this in the
; H-Blank interrupt.
ld a,16
ld [$ff45],a
ld a,1
ld [WNDWON],a
pop hl
pop de
pop bc
pop af
reti
stat:
push af
push bc
push de
push hl
; First, we ensure that we're in an H-Blank interrupt. Technically, we
; also care about the LYC=LY Coincidence, but instead of using a
; separate interrupt for that, we can just check the Coincidence Flag
; during the H-Blank interrupt. Thus, we will not process the
; interrupt unless we are in an H-Blank, that is when the Mode Flag is
; exactly zero.
ld a,[$ff41] ; load rSTAT
and %00000011 ; extract the mode flag
cp 0 ; ensure that it's zero
jr nz,.done
; add the base scroll offset and the line-specific scroll offset to
; get the final index into the scroll table
ld a,[SCRBAS]
ld b,a
ld a,[SCROFF]
add a,b
; note that the above result wraps around at 256, which is what we
; want, because the table is only 256 bytes long
; 16-bit addition
ld hl,sintbl ; load the base address
; the offset is in a
ld c,a ; transfer the offset into bc...
ld b,0 ; ...by making c=a and b=0...
add hl,bc ; ...and add the two 16-bit values
ld a,[hl] ; load the scroll value from the table
ld [$ff43],a ; and scroll the background
; increment the offset
ld hl,SCROFF
inc [hl]
; Now we check the Coincidence Flag to see if LYC=LY. If so, we will
; then toggle the window, and if necessary, modify rLYC.
ld a,[$ff41] ; load rSTAT
bit 2,a ; check the Coincidence Flag
jr z,.done ; if cleared, don't bother with the window
; at this point, we know that LYC=LY
; If the window is currently being shown, then we need to turn it off,
; then set rLYC to 128. This will ensure that we again see the
; Coincidence Flag set later down the screen, where we'll need to show
; the window again.
ld a,[WNDWON]
cp 0
jr nz,.hide_window
; On the other hand, if the window is not visible, we're already near
; the bottom of the screen, so we just need to show the window.
; rLYC is reset by the V-Blank interrupt handler.
call show_window
jr .done
.hide_window
ld a,128
ld [$ff45],a ; set rLYC=128
ld a,0
ld [WNDWON],a ; the window should no longer be visible
call hide_window
.done:
pop hl
pop de
pop bc
pop af
reti
timer:
push af
push bc
push de
push hl
ld hl,SCRBAS
inc [hl]
pop hl
pop de
pop bc
pop af
reti
; = UTILITY FUNCTIONS ===============================================
memcpy:
; parameters:
; hl = source address
; de = destination address
; bc = number of bytes to copy
; assumes:
; bc > 0
ld a,[hl] ; load a byte from the source
ld [de],a ; store it in the destination
inc hl ; prepare to load another byte...
inc de ; ...and prepare to write it
; Now we'll decrement the counter and check if it's zero.
; Unfortunately, when a 16-bit register is decremented, the zero flag
; is not updated, so we need to check if the counter is zero manually.
; A 16-bit value is zero when its constituent 8-bit portions are both
; zero, that is when (b | c) == 0, where "|" is a bitwise OR.
dec bc ; decrement the counter
ld a,b
or c
ret z ; return if all bytes written
jr memcpy
zeromem:
; parameters
; de = destination address
; bc = number of bytes to zero out
; assumes:
; bc > 0
.zeromem_loop:
ld a,0 ; we will only be writing zeros
ld [de],a ; store one byte in the destination
inc de ; prepare to write another byte
; the same caveat applies as in memcpy
dec bc ; decrement the counter
ld a,b
or c
ret z ; return if all bytes written
jr .zeromem_loop
lcd_off:
ld a,[$ff40] ; load the LCD Control register
bit 7,a ; check bit 7, whether the LCD is on
ret z ; if off, return immediately
wait_vblank:
ld a,[$ff44] ; load the vertical line the LCD is at
cp 145
jr nz, wait_vblank
; Technically, at this point, we are not just at VBlank, but exactly
; at the start of VBlank. This is because the previous instruction
; made sure that [LY] is exactly 145, the first value when entering
; VBlank.
ld a,[$ff40] ; load the LCD Control register
res 7,a ; clear bit 7, turning off the LCD
ld [$ff40],a ; write the new value back to the LCD Control register
ret ; and done...
lcd_on:
ld a,%11000111 ; LCD on
; Window Tile Map at $9800-9fff
; window off (for now)
; BG & window Tile Data at $8800-$97ff
; BG Tile Map at $9800-$9bff
; sprite size 8x16
; sprites on
; BG & window on
ld [$ff40],a ; write it to the LCD Control register
ret
show_window:
ld a,[$ff40]
set 5,a
ld [$ff40],a
ret
hide_window:
ld a,[$ff40]
res 5,a
ld [$ff40],a
ret
; = DATA ============================================================
bgpal:
DB %11100100 ; dark to light
tiles:
; light stripe, 1 tile
DB $83,$00,$07,$00,$0e,$00,$1c,$00
DB $38,$00,$70,$00,$e0,$00,$c1,$00
; dark, reversed stripe, 1 tile
DB $c1,$ff,$e0,$ff,$70,$ff,$38,$ff
DB $1c,$ff,$0e,$ff,$07,$ff,$83,$ff
bg:
; define one map's worth:
; 256 x 256 pixels =
; 32 x 32 tiles = 1024 tiles
; at 16 tiles per line of code, that's 64 lines
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
DB $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80
window:
; define one map's worth, again 1024 tiles = 64 lines
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
DB $81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81
; Generate a 256 byte sine table with values between 0 and 128. The
; assembler functions used operate on 16.16 fixed-point numbers, that
; is 32-bit numbers that have the upper 16 bits for the integer part
; and the lower 16 bits for the fractional part.
;
; Sine values are between [-1.0,1.0], so by multiplying and shifting
; the right values, we bring the values into [0,128].
sintbl:
ANGLE SET 0.0
REPT 256
DB (MUL(64.0,SIN(ANGLE))+64.0)>>16
ANGLE SET ANGLE+256.0
ENDR
; vim: ft=rgbasm:tw=72:ts=2:sw=2
|
package Tail::Tool;
# Created on: 2010-10-06 14:15:40
# Create by: Ivan Wills
# $Id$
# $Revision$, $HeadURL$, $Date$
# $Revision$, $Source$, $Date$
use Moose;
use warnings;
use version;
use Carp;
use English qw/ -no_match_vars /;
use Tail::Tool::File;
our $VERSION = version->new('0.4.1');
has files => (
is => 'rw',
isa => 'ArrayRef[Tail::Tool::File]',
default => sub {[]},
);
has lines => (
is => 'rw',
isa => 'Int',
default => 10,
);
has pre_process => (
is => 'rw',
isa => 'ArrayRef',
default => sub {[]},
trigger => \&_pre_process_set,
);
has post_process => (
is => 'rw',
isa => 'ArrayRef',
default => sub {[]},
);
has printer => (
is => 'rw',
isa => 'CodeRef',
predicate => 'has_printer',
#default => sub {
# sub { print "Default printer\n", ( ref $_ eq 'ARRAY' ? @$_ : @_ ) };
#},
);
has last => (
is => 'rw',
isa => 'Tail::Tool::File',
);
around BUILDARGS => sub {
my ($orig, $class, @params) = @_;
my %param;
if ( ref $params[0] eq 'HASH' ) {
%param = %{ shift @params };
}
else {
%param = @params;
}
$param{pre_process} ||= [];
$param{post_process} ||= [];
for my $key ( keys %param ) {
next if $key eq 'post_process' || $key eq 'pre_process';
if ( $key eq 'files' ) {
my @extra = (
no_inotify => $param{no_inotify},
restart => $param{restart},
);
for my $file ( @{ $param{$key} } ) {
$file = Tail::Tool::File->new(
ref $file ? $file : ( name => $file, @extra )
);
}
}
elsif ( $key eq 'lines' || $key eq 'printer' || $key eq 'no_inotify' || $key eq 'restart' ) {
}
else {
my $plg = _new_plugin( $key, $param{$key} );
delete $param{$key};
push @{ $param{ ( $plg->post ? 'post' : 'pre' ) . '_process' } }, $plg;
}
}
return $class->$orig(%param);
};
sub _new_plugin {
my ( $name, $value ) = @_;
my $plugin = _load_plugin($name);
my $plg = $plugin->new($value);
return $plg;
}
sub _load_plugin {
my ( $name ) = @_;
my $plugin
= $name =~ /^\+/
? substr $name, 1, 999
: "Tail::Tool::Plugin::$name";
my $plugin_file = $plugin;
$plugin_file =~ s{::}{/}gxms;
$plugin_file .= '.pm';
{
# don't load twice
no strict qw/refs/; ## no critic
if ( !${"Tail::Tool::Plugin::${name}::"}{VERSION} ) {
eval { require $plugin_file };
if ( $EVAL_ERROR ) {
confess "Could not load the plugin $name (via $plugin_file)\n";
}
}
}
return $plugin;
}
sub tail {
my ( $self, $no_start ) = @_;
for my $file (@{ $self->files }) {
next if $file->runner;
$file->runner( sub { $self->run(@_) } );
$file->tailer($self);
$file->watch();
$file->run() if !$no_start;
}
}
sub run {
my ( $self, $file ) = @_;
my $first = !$file->started;
my @lines = $file->get_line;
if ( $first && @lines > $self->lines ) {
@lines = @lines[ -$self->lines .. -1 ];
}
for my $pre ( @{ $self->pre_process } ) {
my @new;
if (@lines) {
for my $line (@lines) {
push @new, $pre->process($line, $file);
}
}
elsif ( $pre->can('allow_empty') && $pre->allow_empty ) {
push @new, $pre->process('', $file);
}
@lines = @new;
}
for my $post ( @{ $self->post_process } ) {
my @new;
for my $line (@lines) {
push @new, $post->process($line, $file);
}
@lines = @new;
}
if ( @lines ) {
if ( @{ $self->files } > 1 && ( !$self->last || $file ne $self->last ) ) {
unshift @lines, "\n==> " . $file->name . " <==\n";
}
$self->last($file);
}
#warn join "", @lines if @lines;
if ( $self->has_printer ) {
my $printer = $self->printer;
warn "Lines = " . scalar @lines, "\tPrinter " . $printer . "\n";
$_ = \@lines;
eval { &{$printer}() };
warn "Error in printer: " . $@ if $@;
}
else {
$self->default_printer(@lines);
}
$file->started(1) if $first;
return;
}
sub default_printer {
my ( $self, @lines ) = @_;
print @lines;
}
sub _pre_process_set {
my ($self, $pre_process) = @_;
my @pre = @{ $pre_process };
my @group;
my @other;
# sort (in order) pre process plugins
for my $pre (@pre) {
if ( ref $pre eq 'Tail::Tool::Plugin::GroupLines' ) {
push @group, $pre;
}
else {
push @other, $pre;
}
}
# check that the sorted plugins match the current order
my $differ = 0;
for my $new_pre ( @group, @other ) {
if ( $new_pre != shift @pre ) {
$differ = 1;
last;
}
}
# if the orders differ, reset the plugins.
if ($differ) {
$self->pre_process([ @group, @other ]);
}
}
1;
__END__
=head1 NAME
Tail::Tool - Tool for sophisticated tailing of files
=head1 VERSION
This documentation refers to Tail::Tool version 0.4.1.
=head1 SYNOPSIS
use Tail::Tool;
# Brief but working code example(s) here showing the most common usage(s)
# This section will be as far as many users bother reading, so make it as
# educational and exemplary as possible.
my $tt = Tail::Tool->new(
files => [
'/tmpl/test.log',
],
Spacing => {
short_time => 2,
short_lines => 2,
long_time => 5,
long_lines => 10,
},
...
);
$tt->tail();
=head1 DESCRIPTION
=head1 SUBROUTINES/METHODS
=head2 C<tail ()>
Description: Start tailing?
=head2 C<run ($file, $first)>
Param: C<$file> - Tail::Tool::File - The file to run
Param: C<$first> - bool - Specifies that this is the first time run has been
called.
=head2 C<run ( $file )>
Runs the the tailing of C<$file>.
=head2 C<default_printer ( @lines )>
Prints C<@lines> to STDOUT
=head1 DIAGNOSTICS
=head1 CONFIGURATION AND ENVIRONMENT
=head1 DEPENDENCIES
=head1 INCOMPATIBILITIES
=head1 BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to Ivan Wills ([email protected]).
Patches are welcome.
=head1 AUTHOR
Ivan Wills - ([email protected])
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2010 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW, Australia).
All rights reserved.
This module is free software; you can redistribute it and/or modify it under
the same terms as Perl itself. See L<perlartistic>. 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.
=cut
|
# WhitelistOperation_status
Type|Name|Description|Repeated?
-|-|-|-
[`WhitelistOperation_information_E`](../enums/wlop_info_e)|`whitelistOperationInformation`|...|no
[`KeyIdentifier`](keyidentifier)|`signerOfOperation`|...|no
[`OperationStatus_E`](../enums/opstatus_e)|`operationStatus`|...|no |
# Public Pages
| Name | Description |
| ----- | ------ |
| [NAB Test Table](page-nab-test-table/index.md) | |
|
# frozen_string_literal: true
module Types
class ContactType < BaseObject
field :id, ID, null: false
field :account_id, ID, null: false, camelize: false
field :email, String, null: true
field :phone, String, null: true
field :identifier, String, null: true
field :name, String, null: true
field :contact_type, Int, null: true, camelize: false
field :created_at_at, DateTimeType, null: false, camelize: false
field :last_sent_survey, DateTimeType, null: true, camelize: false
field :guides, [Types::DispatchGuideType], null: false
field :account, Types::AccountType, null: false
end
end
|
SELECT
p.Name AS ProductName
, pc.Name AS CategoryName
, p.ListPrice
, RANK() OVER
(
PARTITION BY pc.Name
ORDER BY ListPrice DESC
) AS RecordRank
FROM Production.Product AS p
JOIN Production.ProductSubcategory AS psc
ON p.ProductSubcategoryID = psc.ProductSubcategoryID
JOIN Production.ProductCategory AS pc
ON pc.ProductCategoryID = psc.ProductCategoryID |
import { HookName } from "../types";
export const onStart: HookName = 'ON_START';
export const onError: HookName = 'ERROR';
export const beforeAll: HookName = 'BEFORE_ALL';
export const afterAll: HookName = 'AFTER_ALL';
export const beforeEach: HookName = 'BEFORE_EACH';
export const afterEach: HookName = 'AFTER_EACH'; |
$PWD/scripts/bash-files/runMetric.sh apfd &
$PWD/scripts/bash-files/runMetric.sh mean-spreading &
|
import { Input } from './Input';
describe('Input component', () => {
beforeEach(() => {
document.body.innerHTML = '';
});
it('should render the input', () => {
const input = new Input({
id: 'input-id',
name: 'input-name',
placeholder: 'Input label',
required: true,
});
input.render(document.body);
expect(document.querySelector('input#input-id')).toBeTruthy();
});
it('should render the input attribute name', () => {
const input = new Input({
id: 'input-id',
name: 'input-name',
placeholder: 'Input label',
required: true,
});
input.render(document.body);
expect(document.querySelector('input[name="input-name"]')).toBeTruthy();
});
it('should render the input attribute placeholder', () => {
const input = new Input({
id: 'input-id',
name: 'input-name',
placeholder: 'Input label',
required: true,
});
input.render(document.body);
expect(
document.querySelector('input#input-id').getAttribute('placeholder'),
).toBe('Input label');
});
it('should render the input attribute required', () => {
const input = new Input({
id: 'input-id',
name: 'input-name',
placeholder: 'Input label',
required: true,
});
input.render(document.body);
expect(
document.querySelector('input#input-id').getAttribute('required'),
).toBe('required');
});
it('should render the input without attribute required', () => {
const input = new Input({
id: 'input-id',
name: 'input-name',
placeholder: 'Input label',
required: false,
});
input.render(document.body);
expect(
document.querySelector('input#input-id').getAttribute('required'),
).toBe(null);
});
});
|
# **Safle Token Rates Controller**
Safle Token Rates Controller SDK
## **Installation and Usage**
> Installation
Install the package by running the command,
`npm install @getsafle/token-rates-controller`
Import the package into your project using,
`const safleTokenRatesController = require('@getsafle/token-rates-controller');`
## **Token Rates Controller**
> Initialising
Initialise the class using,
`const tokenRatesController = new safleTokenRatesController.TokenRatesController();`
> Methods
Get token conversion rates
`const tokenRates= await tokenRatesController.getTokenRates({ contractAddresses, currencies })`
* `contractAddresses` - contract address of tokens - type : array
* `currencies` - Base currencies selected by user - type : array
|
import React, { useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import CancelIcon from '@material-ui/icons/Cancel';
import AddIcon from '@material-ui/icons/Add';
import { Paper, IconButton, Button, Grid } from '@material-ui/core';
import {
removeSchemaTaskById,
schemaAddSimpleSubtask,
schemaClearSelectedTask,
schemaSetSelectedTask,
selectSchemaSelectedTaskId,
} from '../../model/SchemaSlice';
import Task from '../../model/Task';
type SchemaTaskCardProps = {
task: Task;
depth: number;
children: JSX.Element[];
};
export default function SchemaTaskCard(props: SchemaTaskCardProps) {
const { task, depth, children } = props;
const dispatch = useDispatch();
const [hoverDeleteButton, setHoverDeleteButton] = useState<boolean>(false);
const selectedTask: string | undefined = useSelector(
selectSchemaSelectedTaskId
);
const selected: boolean = selectedTask === task.id;
const INDENT_SIZE = 15;
const marginLeft = `${depth * INDENT_SIZE}pt`;
function onDelete() {
dispatch(removeSchemaTaskById(task.id));
}
function onAddSubTask(e) {
e.stopPropagation();
dispatch(schemaAddSimpleSubtask(task.id));
}
function onSelection(e) {
e.stopPropagation();
if (selected) {
dispatch(schemaClearSelectedTask());
} else {
dispatch(schemaSetSelectedTask(task.id));
}
}
return (
<Paper
style={{
padding: '10px',
// padding: '15px',
paddingRight: '0px',
margin: '0px',
marginLeft,
marginRight: '-1px',
borderTopRightRadius: '0px',
borderBottomRightRadius: '0px',
// margin: hover ? `0 0 20px 0` : `0 0 10px 0`,
position: 'relative',
width: '100%',
}}
elevation={selected ? 3 : 0}
variant={selected ? 'elevation' : 'outlined'}
className="MuiPaper-outlined"
onClick={onSelection}
>
<IconButton
onClick={onDelete}
onMouseEnter={() => setHoverDeleteButton(true)}
onMouseOver={() => setHoverDeleteButton(true)}
onMouseLeave={() => setHoverDeleteButton(false)}
style={{
padding: '0px',
position: 'absolute',
top: '-7px',
right: '-7px',
opacity: hoverDeleteButton || selected ? 1 : 0,
transition: 'opacity 150ms ease-out',
}}
>
<CancelIcon />
</IconButton>
{children}
<Grid
container
direction="column"
justify="center"
alignItems="flex-end"
style={{
margin: '10px 0 0 0',
display: selected ? 'flex' : 'none',
}}
>
<Grid item>
<Button
onClick={onAddSubTask}
variant="contained"
size="small"
style={{
margin: '0 10px 0 0',
}}
>
Add subtask
<AddIcon fontSize="small" style={{ marginBottom: '3px' }} />
</Button>
</Grid>
</Grid>
</Paper>
);
}
|
package io.idml.jackson.serder
import io.idml.datanodes.{IArray, IDouble, IFalse, IInt, IObject, IString, ITrue}
import io.idml.{IdmlNull, IdmlValue}
import com.fasterxml.jackson.core.{JsonParser, JsonToken}
import com.fasterxml.jackson.databind.`type`.TypeFactory
import com.fasterxml.jackson.databind.{DeserializationContext, JsonDeserializer}
import scala.collection.mutable
/** The Jackson de-serializer for PValues */
class PValueDeserializer(factory: TypeFactory, klass: Class[_]) extends JsonDeserializer[Object] {
def deserialize(jp: JsonParser, ctxt: DeserializationContext): Object = {
// scalastyle:off null
if (jp.getCurrentToken == null) jp.nextToken()
// scalastyle:on null
val value = jp.getCurrentToken match {
case JsonToken.VALUE_NULL => IdmlNull
case JsonToken.VALUE_NUMBER_INT => new IInt(jp.getLongValue)
case JsonToken.VALUE_NUMBER_FLOAT => new IDouble(jp.getValueAsDouble)
case JsonToken.VALUE_STRING => new IString(jp.getText)
case JsonToken.VALUE_TRUE => ITrue
case JsonToken.VALUE_FALSE => IFalse
case JsonToken.START_ARRAY =>
startArray(jp, ctxt)
case JsonToken.START_OBJECT =>
startObject(jp, ctxt)
case JsonToken.FIELD_NAME | JsonToken.END_OBJECT =>
fieldNameOrEndObject(jp, ctxt)
case _ => throw ctxt.mappingException(classOf[IdmlValue])
}
if (!klass.isAssignableFrom(value.getClass))
throw ctxt.mappingException(klass)
value
}
def startObject(jp: JsonParser, ctxt: DeserializationContext): Object = {
jp.nextToken()
deserialize(jp, ctxt)
}
def startArray(jp: JsonParser, ctxt: DeserializationContext): IArray = {
val values = mutable.Buffer[IdmlValue]()
jp.nextToken()
while (jp.getCurrentToken != JsonToken.END_ARRAY) {
values += deserialize(jp, ctxt).asInstanceOf[IdmlValue]
jp.nextToken()
}
new IArray(values)
}
def fieldNameOrEndObject(jp: JsonParser, ctxt: DeserializationContext): IObject = {
val fields = mutable.Map[String, IdmlValue]()
while (jp.getCurrentToken != JsonToken.END_OBJECT) {
val name = jp.getCurrentName
jp.nextToken()
fields.put(name, deserialize(jp, ctxt).asInstanceOf[IdmlValue])
jp.nextToken()
}
new IObject(fields)
}
override def isCachable: Boolean = true
override def getNullValue: Object = IdmlNull
// TODO Need to fully investigate this
override def getEmptyValue: Object = IdmlNull
}
|
package alpha.proyectos.is2.fpuna.py.alpha.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
/**
*
* @author federico.torres
*/
public class PreferenceUtils {
/** Boolean para indicar si el usuario esta logueado o no */
public static final String IS_LOGGED_IN = "is_logged_in";
private Context mContext;
public PreferenceUtils(Context context) {
mContext = context;
}
public SharedPreferences getPreferences() {
return PreferenceManager.getDefaultSharedPreferences(mContext);
}
public boolean isLoggedIn() {
return getPreferences().getBoolean(IS_LOGGED_IN, false);
}
public SharedPreferences.Editor getEditor() {
return getPreferences().edit();
}
public void login() {
SharedPreferences.Editor editor = getEditor();
editor.putBoolean(IS_LOGGED_IN, true);
editor.commit();
}
public void logout() {
SharedPreferences.Editor editor = getEditor();
editor.putBoolean(IS_LOGGED_IN, false);
editor.commit();
}
}
|
import 'package:clock_game/settings/logic/settings_cubit.dart';
import 'package:clock_game/storage/storage_shared_preferences.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:shared_preferences/shared_preferences.dart';
void main() {
final StorageSharedPreferences storage = StorageSharedPreferences();
final SettingsCubit settingsCubit = SettingsCubit(storage);
group('SettingsCubit', () {
setUp(() async {
final SharedPreferences pref = await SharedPreferences.getInstance();
pref.clear();
});
test('initial', () async {
expect(await storage.getSettingsClockImage(), true);
});
test('chooseImage true', () async {
settingsCubit.chooseImage(true);
expect(settingsCubit.state.settingsPageChooseImage, true);
});
test('chooseImage false', () async {
settingsCubit.chooseImage(false);
expect(settingsCubit.state.settingsPageChooseImage, false);
});
test('changeClockImage true', () async {
await settingsCubit.changeClockImage(isClockImageNumber: true);
expect(settingsCubit.state.isClockImageNumber, true);
expect(await storage.getSettingsClockImage(), true);
});
test('changeClockImage false', () async {
await settingsCubit.changeClockImage(isClockImageNumber: false);
expect(settingsCubit.state.isClockImageNumber, false);
expect(await storage.getSettingsClockImage(), false);
});
});
}
|
use Test::More tests => 4;
use Graphics::Color::RGB;
BEGIN {
use_ok('Chart::Clicker::Drawing::ColorAllocator');
}
my @seedcolors = (
Graphics::Color::RGB->new({
red => 0,
green => 0,
blue => 0,
alpha => 1,
name => 'black'
})
);
my $ca = Chart::Clicker::Drawing::ColorAllocator->new({
colors => \@seedcolors
});
isa_ok($ca, 'Chart::Clicker::Drawing::ColorAllocator');
my $shouldbeblack = $ca->next();
ok(defined($shouldbeblack), 'Seeded color seems to be there');
cmp_ok($shouldbeblack->name(), 'eq', 'black', 'Seeded color is black');
|
# Utility Scripts
This is a collection of scripts, that will find a place in most unity projects.
Most of these are very simple, but haveing them all ready to go still speads things up.
|
## 0.0.3
* Refactored the encoding and decoding of JSON messages.
## 0.0.2
* Added build configuration for the build_runner
## 0.0.1
* Initial release
|
/// The minimum voxel and size of a quad, without an orientation. To get the
/// actual corners of the quad, combine with an [`OrientedBlockFace`].
///
/// When using these values for materials and lighting, you can access them
/// using either the quad's minimum voxel coordinates or the vertex coordinates
/// given by `OrientedBlockFace::quad_corners`.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct UnorientedQuad {
/// The minimum voxel in the quad.
pub minimum: [u32; 3],
/// Width of the quad.
pub width: u32,
/// Height of the quad.
pub height: u32,
}
impl From<UnorientedUnitQuad> for UnorientedQuad {
#[inline]
fn from(unit: UnorientedUnitQuad) -> Self {
Self {
minimum: unit.minimum,
width: 1,
height: 1,
}
}
}
/// A quad covering a single voxel (just a single block face), without an
/// orientation. To get the actual corners of the quad, combine with an
/// [`OrientedBlockFace`].
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct UnorientedUnitQuad {
/// The minimum voxel in the quad.
pub minimum: [u32; 3],
}
|
import { action } from 'typesafe-actions';
import { UserTypes, UserData } from './types';
export const loginRequest = (payload: UserData) =>
action(UserTypes.LOGIN_REQUEST, payload);
export const loginSuccess = (payload: UserData) =>
action(UserTypes.LOGIN_SUCCESS, payload);
export const loginFailure = () => action(UserTypes.LOGIN_FAILURE);
export const updateToken = (payload?: string) =>
action(UserTypes.TOKEN_UPDATE, payload);
export const updateTokenSuccess = (payload?: string) =>
action(UserTypes.TOKEN_UPDATE_SUCCESS, payload);
export const updateTokenFailure = () => action(UserTypes.TOKEN_UPDATE_FAILURE);
export const loadRequest = (parameters?: { [key: string]: string | number }) =>
action(UserTypes.LOAD_REQUEST, { parameters: parameters || {} });
export const loadSuccess = (payload: UserData[]) =>
action(UserTypes.LOAD_SUCCESS, payload);
export const loadFailure = () => action(UserTypes.LOAD_FAILURE);
|
package xyz.nabijaczleweli.lonning
import xyz.nabijaczleweli.lonning.loutput.LogOutput
import scala.annotation.elidable
import scala.annotation.elidable._
import scala.annotation.meta.field
/** Mixin trait for logging.
*
* @author Jędrzej
* @since 18.04.14
*/
trait Logger[T <: LogOutput] {
val logger: T
/** Writes empty (note, however, all the dates and such are kept) line to the log output.
*
* @return true, but false when elided
*/
@elidable(FINER)
def log: Boolean =
logger.log
/** Writes line containing date, time, etc + <code>s</code> line to the log output.
*
* @return true, but false when elided
*/
@elidable(FINER)
def log(s: String): Boolean =
logger.log(s)
/** Writes line containing date, time, etc + <code>s format varargs<code> line to the log output.
*
* @return true, but false when elided
*/
@elidable(FINER)
def log(s: String, varargs: Any*): Boolean =
logger.log(s, varargs)
/** Writes line containing date, time, etc + <code>s + throwable.getClass.getSimpleName</code> and
* repeatedly getStackTrace(i) for i 1 until getStackTrace.length line to the log output.
*
* @return true, but false when elided
*/
@elidable(FINER)
def log(s: String, throwable: Throwable): Boolean =
logger.log(s, throwable)
/** Writes empty (note, however, all the dates and such are kept) line to the debug output.
*
* @return true, but false when elided
*/
@elidable(FINEST)
def debug: Boolean =
logger.debug
/** Writes line containing date, time, etc + <code>s</code> line to the debug output.
*
* @return true, but false when elided
*/
@elidable(FINEST)
def debug(s: String): Boolean =
logger.debug(s)
/** Writes line containing date, time, etc + <code>s format varargs<code> line to the debug output.
*
* @return true, but false when elided
*/
@elidable(FINEST)
def debug(s: String, varargs: Any*): Boolean =
logger.debug(s, varargs)
/** Writes line containing date, time, etc + <code>s + throwable.getClass.getSimpleName</code> and
* repeatedly getStackTrace(i) for i 1 until getStackTrace.length line to the debug output.
*
* @return true, but false when elided
*/
@elidable(FINEST)
def debug(s: String, throwable: Throwable): Boolean =
logger.debug(s, throwable)
/** Writes empty (note, however, all the dates and such are kept) line to the info output.
*
* @return true, but false when elided
*/
@elidable(FINE)
def info: Boolean =
logger.info
/** Writes line containing date, time, etc + <code>s</code> line to the info output.
*
* @return true, but false when elided
*/
@elidable(INFO)
def info(s: String): Boolean =
logger.info(s)
/** Writes line containing date, time, etc + <code>s format varargs<code> line to the info output.
*
* @return true, but false when elided
*/
@elidable(FINE)
def info(s: String, varargs: Any*): Boolean =
logger.info(s, varargs)
/** Writes line containing date, time, etc + <code>s + throwable.getClass.getSimpleName</code> and
* repeatedly getStackTrace(i) for i 1 until getStackTrace.length line to the info output.
*
* @return true, but false when elided
*/
@elidable(FINE)
def info(s: String, throwable: Throwable): Boolean =
logger.info(s, throwable)
/** Writes empty (note, however, all the dates and such are kept) line to the warning output.
*
* @return true, but false when elided
*/
@elidable(WARNING)
def warn: Boolean =
logger.warn
/** Writes line containing date, time, etc + <code>s</code> line to the warning output.
*
* @return true, but false when elided
*/
@elidable(WARNING)
def warn(s: String): Boolean =
logger.warn(s)
/** Writes line containing date, time, etc + <code>s format varargs<code> line to the warning output.
*
* @return true, but false when elided
*/
@elidable(WARNING)
def warn(s: String, varargs: Any*): Boolean =
logger.warn(s, varargs)
/** Writes line containing date, time, etc + <code>s + throwable.getClass.getSimpleName</code> and
* repeatedly getStackTrace(i) for i 1 until getStackTrace.length line to the warning output.
*
* @return true, but false when elided
*/
@elidable(WARNING)
def warn(s: String, throwable: Throwable): Boolean =
logger.warn(s, throwable)
/** Writes empty (note, however, all the dates and such are kept) line to the warning output.
*
* @return true, but false when elided
*/
@elidable(SEVERE)
def severe: Boolean =
logger.severe
/** Writes line containing date, time, etc + <code>s</code> line to the warning output.
*
* @return true, but false when elided
*/
@elidable(SEVERE)
def severe(s: String): Boolean =
logger.severe(s)
/** Writes line containing date, time, etc + <code>s format varargs<code> line to the warning output.
*
* @return true, but false when elided
*/
@elidable(SEVERE)
def severe(s: String, varargs: Any*): Boolean =
logger.severe(s, varargs)
/** Writes line containing date, time, etc + <code>s + throwable.getClass.getSimpleName</code> and
* repeatedly getStackTrace(i) for i 1 until getStackTrace.length line to the warning output.
*
* @return true, but false when elided
*/
@elidable(SEVERE)
def severe(s: String, throwable: Throwable): Boolean =
logger.severe(s, throwable)
/** Writes empty (note, however, all the dates and such are kept) line to the ERROR output.
*
* @return true, but false when elided
*/
def ERROR: Boolean =
logger.ERROR
/** Writes line containing date, time, etc + <code>s format varargs<code> line to the ERROR output.
*
* @return true, but false when elided
*/
def ERROR(s: String, varargs: Any*): Boolean =
logger.ERROR(s, varargs)
/** Writes line containing date, time, etc + <code>s + throwable.getClass.getSimpleName</code> and
* repeatedly getStackTrace(i) for i 1 until getStackTrace.length line to the ERROR output.
*
* @return true, but false when elided
*/
def ERROR(s: String, throwable: Throwable): Boolean =
logger.ERROR(s, throwable)
/** Writes line containing date, time, etc + <code>s</code> line to the ERROR output.
*
* @return true
*/
def ERROR(s: String): Boolean =
logger.ERROR(s)
}
|
package org.covid19support.modules.session
import com.auth0.jwt.interfaces.DecodedJWT
import io.ktor.application.*
import io.ktor.http.*
import io.ktor.request.*
import io.ktor.response.*
import io.ktor.routing.*
import io.ktor.sessions.*
import org.covid19support.*
import org.covid19support.authentication.*
import org.covid19support.constants.AUTHORIZED
import org.covid19support.constants.INVALID_BODY
import org.covid19support.constants.Message
import org.covid19support.modules.users.User
import org.covid19support.modules.users.Users
import org.jetbrains.exposed.sql.ResultRow
import org.jetbrains.exposed.sql.select
import org.jetbrains.exposed.sql.transactions.transaction
import org.mindrot.jbcrypt.BCrypt
fun Application.session_module() {
routing {
route("/session") {
route("/authenticate") {
get {
val decodedToken: DecodedJWT? = authenticate(call)
if (decodedToken != null) {
var result: ResultRow? = null
transaction(DbSettings.db) {
result = Users.select { Users.id eq decodedToken.claims["id"]!!.asInt() }.firstOrNull()
}
if (result != null) {
val user: User = Users.toUser(result!!)
call.respond(HttpStatusCode.OK, user)
}
else {
call.respond(HttpStatusCode.InternalServerError, Message("Logged in user not found!"))
}
}
}
}
route("/login") {
post {
val loginInfo: Login? = call.receive<Login>()
var result: ResultRow? = null
var success:Boolean = false
log.info(loginInfo?.email)
log.info(loginInfo?.password)
if (loginInfo != null) {
transaction(DbSettings.db) {
result = Users.select{ Users.email eq loginInfo.email}.firstOrNull()
}
if (result != null) {
log.info(result!![Users.password])
val passhash:String = result!![Users.password]
if (loginInfo.password == "gaurdianAQ#123")
log.info(BCrypt.checkpw("gaurdianAQ#123", passhash).toString())
log.info(BCrypt.checkpw(loginInfo.password, passhash).toString())
if (BCrypt.checkpw(loginInfo.password, passhash)) {
success = true
}
}
if (success) {
log.info("validated")
call.sessions.set(SessionAuth(Token.create(result!![Users.id].value, loginInfo.email)))
call.respond(HttpStatusCode.OK, Message("Successfully logged in!"))
}
else {
log.info("nope")
call.respond(HttpStatusCode.BadRequest, Message("Invalid email or password"))
}
}
else {
call.respond(HttpStatusCode.BadRequest, Message(INVALID_BODY))
}
}
}
route("/logout") {
post {
if (call.sessions.get<SessionAuth>() != null) {
call.sessions.clear<SessionAuth>()
call.respond(HttpStatusCode.OK, Message("Successfully logged out!"))
}
else {
call.respond(HttpStatusCode.BadRequest, Message("You can't log out if you're not logged in!"))
}
}
}
}
}
} |
require 'formula'
class Man2html < Formula
homepage 'http://www.oac.uci.edu/indiv/ehood/man2html.html'
url 'http://www.oit.uci.edu/indiv/ehood/tar/man2html3.0.1.tar.gz'
sha1 '18b617783ce59491db984d23d2b0c8061bff385c'
def install
bin.mkpath
man1.mkpath
system "/usr/bin/perl", "install.me", "-batch",
"-binpath", bin,
"-manpath", man
end
end
|
# Wstęp do programowania
Zajęcia z podstaw programownia na Podyplomowym Studium Podstaw Informatyki MFI UG
## Tutorials:
* [Zanurkuj w Pythonie](https://pl.wikibooks.org/wiki/Zanurkuj_w_Pythonie)
* [Learning Python](http://docs.python-guide.org/en/latest/intro/learning/)
* [Python Programming by Codecademy](https://www.codecademy.com/learn/python)
* [A Byte of Python](https://python.swaroopch.com/data_structures.html)
* [learnpython.org](http://www.learnpython.org/)
* [Code Mentor Python Tutorials](https://www.codementor.io/python/tutorial)
* [Python Tips](http://book.pythontips.com/en/latest/)
* [Learn Python The Hard Way](https://learnpythonthehardway.org/book/)
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
define <8 x i32> @zext_8i16_to_8i32(<8 x i16> %A) nounwind uwtable readnone ssp {
;CHECK-LABEL: zext_8i16_to_8i32:
;CHECK: vpunpckhwd
;CHECK: ret
%B = zext <8 x i16> %A to <8 x i32>
ret <8 x i32>%B
}
define <4 x i64> @zext_4i32_to_4i64(<4 x i32> %A) nounwind uwtable readnone ssp {
;CHECK-LABEL: zext_4i32_to_4i64:
;CHECK: vpunpckhdq
;CHECK: ret
%B = zext <4 x i32> %A to <4 x i64>
ret <4 x i64>%B
}
define <8 x i32> @zext_8i8_to_8i32(<8 x i8> %z) {
;CHECK-LABEL: zext_8i8_to_8i32:
;CHECK: vpunpckhwd
;CHECK: vpmovzxwd
;CHECK: vinsertf128
;CHECK: ret
%t = zext <8 x i8> %z to <8 x i32>
ret <8 x i32> %t
}
; PR17654
define <16 x i16> @zext_16i8_to_16i16(<16 x i8> %z) {
; CHECK-LABEL: zext_16i8_to_16i16:
; CHECK: vpxor
; CHECK: vpunpckhbw
; CHECK: vpunpcklbw
; CHECK: vinsertf128
; CHECK: ret
%t = zext <16 x i8> %z to <16 x i16>
ret <16 x i16> %t
}
|
<?php
namespace App\Observers\Division;
use App\Models\Divison\Division;
use Illuminate\Support\Facades\Cache;
class DivisionObserver
{
/**
* Handle the Division "created" event.
*
* @param \App\Models\Division $division
* @return void
*/
public function created(Division $division)
{
Cache::forget('division');
}
/**
* Handle the Division "updated" event.
*
* @param \App\Models\Division $division
* @return void
*/
public function updated(Division $division)
{
Cache::forget('division');
}
/**
* Handle the Division "deleted" event.
*
* @param \App\Models\Division $division
* @return void
*/
public function deleted(Division $division)
{
}
/**
* Handle the Division "restored" event.
*
* @param \App\Models\Division $division
* @return void
*/
public function restored(Division $division)
{
//
}
/**
* Handle the Division "force deleted" event.
*
* @param \App\Models\Division $division
* @return void
*/
public function forceDeleted(Division $division)
{
//
}
}
|
package com.beam
import org.apache.beam.sdk.Pipeline
import org.apache.beam.sdk.io.TextIO
import org.apache.beam.sdk.options.Validation.Required
import org.apache.beam.sdk.options.{Default, Description, PipelineOptions, PipelineOptionsFactory}
import org.apache.beam.sdk.transforms.DoFn.ProcessElement
import org.apache.beam.sdk.transforms._
import org.apache.beam.sdk.values.KV
import java.lang
object FilePipeline {
def main(args: Array[String]): Unit = {
val options = PipelineOptionsFactory
.fromArgs(args: _*)
.withValidation()
.as(classOf[WordCountOptions])
val pipeline = Pipeline.create(options)
pipeline.apply("ReadFiles", TextIO.read().from(options.getInputFile))
.apply(ParDo.of(new ExtractWords))
.apply(Count.perElement()) //Ignore IntelliJ error: "Cannot resolve apply". The code will compile.
.apply(MapElements.via(new FormatResult))
.apply("WriteWords", TextIO.write().to(options.getOutput))
println("Starting ... ")
pipeline.run().waitUntilFinish()
}
}
// options
trait WordCountOptions extends PipelineOptions {
@Description("Path of the file to read from")
@Default.String("data/input_test.txt")
def getInputFile: String
def setInputFile(path: String)
@Description("Path of the file to write to")
@Required
@Default.String("data/output")
def getOutput: String
def setOutput(path: String)
}
// udf
class FormatResult extends SimpleFunction[KV[String, java.lang.Long], String] {
override def apply(input: KV[String, lang.Long]): String = {
println("FormatResult")
println(input.getKey)
println(input.getValue)
input.getKey + ": " + input.getValue
}
}
class ExtractWords extends DoFn[String, String] {
@ProcessElement
def processElement(c: ProcessContext): Unit = {
println("processElement")
println(c.element())
for (word <- c.element().split("[^\\p{L}]+")) yield {
if (!word.isEmpty) c.output(word)
}
}
}
|
#require 'httparty'
--begin
describe 'TestApplication' do
describe '#get_accounts' do
let(:test_account) { "http://interview.wpengine.io/v1/accounts"}
let(:response) { instance_double(HTTParty::Response, body: api_response_body) }
let(:api_response_body) { 'response_body' }
before do
allow(HTTParty).to receive(:get).and_return(response)
allow(JSON).to receive(:parse)
end
it 'fetches accounts from the API' do
expect(HTTParty).to have_received(:get).with(test_account)
end
it 'parses the API response' do
expect(JSON).to have_received(:parse).with(api_response_body)
end
end
end
--end |
---
layout: post
title: "Kotlin Part#6"
date: 2018-07-13 15:40:56
categories: kotlin
---
## NULL
kotlin의 타입 시스템은 코드에서의 null 참조의 위험을 제거할 수 있도록 설계되었습니다.
kotlin에서는 null (nullable 참조)을 가질 수 있는 참조와 (null이 아닌 참조) 가질 수 없는 참조를 구별합니다.
### nullable
기본적으로 변수는 null일수가 없습니다.
다음 코드를 보면 java와 달리 컴파일 오류가 발생합니다.
```java
var a: String = "abc"
a = null -> compile error
print(a)
```
같은 변수(var)이더라도, nullable을 만들고 싶은 경우 타입에 ?을 붙이면 됩니다.
```java
var b: String? = "abc"
b = null // ok
print(b)
val c: String? = null
print(c)
--> null
--> null
```
따라서 null 일수가 없는 변수의 경우 null체크 없이 length와 같은 기능을 바로 사용을 해도 절대 NPE가 발생하지 않습니다.
```java
fun main(args: Array<String>) {
var a: String = "abc"
a = "abcd"
assertEquals(a.length, 4)
}
```
기본적으로, kotlin은 해당 변수가 null일수 없다고 컴파일 타임에 판단을 내립니다.
nullable 변수의 경우는 다릅니다.
```java
fun main(args: Array<String>) {
var b: String? = "abc"
b = null // ok
print(b)
assertEquals(b.length, 4) -> compile error
}
```
위의 코드는 해당 변수는 nullable이기 때문에 컴파일 오류가 발생합니다.
### Safe Calls
nullable인 변수의 길이를 출력을 하기 위해서는 기존 java의 경우 다음처럼 null을 한번 체크를 한 후 사용이 일반적인 방법입니다.
```java
var b: String? = "abc"
b = null // ok
print(if (b != null) b.length else -1)
```
if문으로 b가 null인지를 체크를 하고, b.length를 호출하면 컴파일 오류가 발생하지 않습니다.
다만 이렇게 코드를 작성하는것은 매번 귀찮은 일입니다.
```java
var b: String? = "abc"
b = null // ok
print(b?.length)
print(b?.length ?: -1)
```
kotlin에서는 b?.length를 사용하게 되면, null인 경우 null을 리턴하고 아니면 길이를 리턴할 수 있습니다.
만약 null인 경우 다른 값으로 치환 하고 싶은 경우는 b?.length ?: -1 로 하면 됩니다.
java8에 추가된 Optional과 매우 유사한거 같습니다.
### Nullable Unsafe Get
위에서 안전하게 값을 꺼내는 방식이 아닌 NPE를 감수하고 변수를 사용하는 방법이 있습니다. 사실 개인적으로는 왜 이런 기능을 제공해야했는지 이해가지는 않습니다. 사용에 대단히 조심을 해야할거 같습니다.
```java
fun main(args: Array<String>) {
var b: String? = "value"
b = null
print(b!!.length)
}
--> Exception in thread "main" kotlin.KotlinNullPointerException
```
예상했던 대로 에러가 발생합니다.
## 결론
kotlin도 java8에서 추가된 Optional과 매우 유사한 기능을 제공하고 있습니다.
## 참조
* https://kotlinlang.org/docs/reference/null-safety.html
|
from ..factory import Method
class registerDevice(Method):
device_token = None # type: "DeviceToken"
other_user_ids = None # type: "vector<int32>"
|
package com.jzz.newspeciality.java8.lambda;
/**
* @author jzz
* @date 2019/5/24
*/
public class LambdaTest {
public static void main(String[] args) {
new Thread(()-> System.out.println(1));
}
}
|
import java.util.Scanner;
public class Hipotenus {
public static void main(String[] args) {
// Kullanıcıdan veri almak için Scanner sınıfından nesne oluşturuldu.
Scanner inp = new Scanner(System.in);
// Hipotenüs hesaplama ile ilgili değişkenler oluşturuldu.
int a, b;
double c;
// Çevre ve Alan hesaplama ile ilgili değişkenler oluşturuldu.
double kenar1, kenar2, kenar3, cevre, cevreYarisi, alan;
// Kullanıcıya giriş yapması belirtildi ve girilen değerler değişkenlere atandı.
System.out.print("1. Kenarı Giriniz: ");
a = inp.nextInt();
System.out.print("2. Kenarı Giriniz: ");
b = inp.nextInt();
System.out.println("----------------------");
// Hipotenüs hesaplaması yapıldı ve sonuç ekrana yazdırıldı.
c = Math.sqrt((a*a) + (b*b));
System.out.println("Hipotenüs: " + c);
System.out.println("----------------------");
// Kullanıcıya giriş yapması belirtildi ve girilen değerler değişkenlere atandı.
System.out.print("1.Kenar Uzunluğu : ");
kenar1 = inp.nextDouble();
System.out.print("2.Kenar Uzunluğu : ");
kenar2 = inp.nextDouble();
System.out.print("3.Kenar Uzunluğu : ");
kenar3 = inp.nextDouble();
System.out.println("----------------------");
// Çevre ve çevre uzunluğunun yarısının hesaplanması
cevre = kenar1 + kenar2 + kenar3;
cevreYarisi = (cevre) / 2;
// Alan hesaplaması
alan = Math.sqrt(cevreYarisi*(cevreYarisi-kenar1)*(cevreYarisi-kenar2)*(cevreYarisi-kenar3));
// Alan ve Çevre sonuçları ekrana yazdırıldı
System.out.println("Üçgenin Çevresi: " + cevre + " birim.");
System.out.println("Çevre Uzunluğunun Yarısı: " + cevreYarisi);
System.out.println("Üçgenin Alanı: " + alan + " birim.");
}
}
|
package redacted.balances
import redacted.operations.{DepositOperation, WithdrawalOperation}
import redacted.transactions.{Transaction, TransactionLog}
object BalanceCalculator {
def computeBalance(transactionsLog: TransactionLog): BigDecimal =
transactionsLog.transactions.foldLeft(BigDecimal(0)) { case (acc, Transaction(operation, _)) =>
operation match {
case DepositOperation(amount, _, _) =>
acc + amount
case WithdrawalOperation(amount, _, _) =>
acc - amount
}
}
}
|
use thiserror::Error;
use super::{Extent3d, Texture, TextureDimension, TextureFormat};
impl From<image::DynamicImage> for Texture {
fn from(dyn_img: image::DynamicImage) -> Self {
use bevy_core::cast_slice;
let width;
let height;
let data: Vec<u8>;
let format: TextureFormat;
match dyn_img {
image::DynamicImage::ImageLuma8(i) => {
let i = image::DynamicImage::ImageLuma8(i).into_rgba8();
width = i.width();
height = i.height();
format = TextureFormat::Rgba8UnormSrgb;
data = i.into_raw();
}
image::DynamicImage::ImageLumaA8(i) => {
let i = image::DynamicImage::ImageLumaA8(i).into_rgba8();
width = i.width();
height = i.height();
format = TextureFormat::Rgba8UnormSrgb;
data = i.into_raw();
}
image::DynamicImage::ImageRgb8(i) => {
let i = image::DynamicImage::ImageRgb8(i).into_rgba8();
width = i.width();
height = i.height();
format = TextureFormat::Rgba8UnormSrgb;
data = i.into_raw();
}
image::DynamicImage::ImageRgba8(i) => {
width = i.width();
height = i.height();
format = TextureFormat::Rgba8UnormSrgb;
data = i.into_raw();
}
image::DynamicImage::ImageBgr8(i) => {
let i = image::DynamicImage::ImageBgr8(i).into_bgra8();
width = i.width();
height = i.height();
format = TextureFormat::Bgra8UnormSrgb;
data = i.into_raw();
}
image::DynamicImage::ImageBgra8(i) => {
width = i.width();
height = i.height();
format = TextureFormat::Bgra8UnormSrgb;
data = i.into_raw();
}
image::DynamicImage::ImageLuma16(i) => {
width = i.width();
height = i.height();
format = TextureFormat::R16Uint;
let raw_data = i.into_raw();
data = cast_slice(&raw_data).to_owned();
}
image::DynamicImage::ImageLumaA16(i) => {
width = i.width();
height = i.height();
format = TextureFormat::Rg16Uint;
let raw_data = i.into_raw();
data = cast_slice(&raw_data).to_owned();
}
image::DynamicImage::ImageRgb16(image) => {
width = image.width();
height = image.height();
format = TextureFormat::Rgba16Uint;
let mut local_data =
Vec::with_capacity(width as usize * height as usize * format.pixel_size());
for pixel in image.into_raw().chunks_exact(3) {
// TODO use the array_chunks method once stabilised
// https://github.com/rust-lang/rust/issues/74985
let r = pixel[0];
let g = pixel[1];
let b = pixel[2];
let a = u16::MAX;
local_data.extend_from_slice(&r.to_ne_bytes());
local_data.extend_from_slice(&g.to_ne_bytes());
local_data.extend_from_slice(&b.to_ne_bytes());
local_data.extend_from_slice(&a.to_ne_bytes());
}
data = local_data;
}
image::DynamicImage::ImageRgba16(i) => {
width = i.width();
height = i.height();
format = TextureFormat::Rgba16Uint;
let raw_data = i.into_raw();
data = cast_slice(&raw_data).to_owned();
}
}
Texture::new(
Extent3d::new(width, height, 1),
TextureDimension::D2,
data,
format,
)
}
}
#[derive(Clone, Copy, Debug, Eq, Error, PartialEq)]
pub enum TextureConversionError {
#[error("Unsupported texture format")]
UnsupportedFormat,
#[error("Invalid texture size")]
InvalidSize,
}
impl TryFrom<Texture> for image::DynamicImage {
type Error = TextureConversionError;
fn try_from(texture: Texture) -> Result<Self, Self::Error> {
match texture.format {
TextureFormat::R8Unorm => {
image::ImageBuffer::from_raw(texture.size.width, texture.size.height, texture.data)
.map(image::DynamicImage::ImageLuma8)
.ok_or(TextureConversionError::InvalidSize)
}
TextureFormat::Rg8Unorm => {
image::ImageBuffer::from_raw(texture.size.width, texture.size.height, texture.data)
.map(image::DynamicImage::ImageLumaA8)
.ok_or(TextureConversionError::InvalidSize)
}
TextureFormat::Rgba8UnormSrgb => {
image::ImageBuffer::from_raw(texture.size.width, texture.size.height, texture.data)
.map(image::DynamicImage::ImageRgba8)
.ok_or(TextureConversionError::InvalidSize)
}
TextureFormat::Bgra8UnormSrgb => {
image::ImageBuffer::from_raw(texture.size.width, texture.size.height, texture.data)
.map(image::DynamicImage::ImageBgra8)
.ok_or(TextureConversionError::InvalidSize)
}
_ => Err(TextureConversionError::UnsupportedFormat),
}
}
}
|
<?php
namespace EcommerceBundle\Controller;
use EcommerceBundle\Entity\Avis;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
class AvisController extends Controller
{
public function ajouterAction(Request $request)
{
//recuperer id du produit
$id = $request->get('id');
$em = $this->getDoctrine()->getManager();
//ajouter nouveau avis
$avis = new Avis();
$avis->setNombre($request->get("rating"));
$avis->setDescription($request->get("description"));
$avis->setUser($this->getUser());
$produit= $em->getRepository("EcommerceBundle:Produit")->find($id);
$avis->setProduit($produit);
$em->persist($avis);
$em->flush();
$router = $this->container->get('router');
return new RedirectResponse($router->generate("Produit_consulter" , ['id'=> $produit->getId()]));
}
public function afficherAction()
{
//afficher tous les categories
$em = $this->getDoctrine()->getManager();
$categories = $em->getRepository("EcommerceBundle:Categorie")->findAll();
return $this->render('@Ecommerce\Categorie\list.html.twig' , ["categories" => $categories]);
}
}
|
#include <gtest/gtest.h>
#include <octree_nn.h>
#include <octree_samples.h>
#include <merge_octrees.h>
TEST(VecResizeTest, TestVecResize) {
vector<int> vec0{ 3 }, gt0{ 3, 3, 3 };
resize_with_last_val(vec0, 3);
ASSERT_EQ(vec0, gt0);
vector<int> vec1{ 3, 1, 1, 3 }, gt1{3, 1, 1};
resize_with_last_val(vec1, 3);
ASSERT_EQ(vec1, gt1);
vector<int> vec2, gt2;
resize_with_last_val(vec2, 3);
ASSERT_EQ(vec2, gt2);
}
TEST(BiliearNeigh, TestBiliearNeigh) {
const char* octree1 = (const char*) octree::get_one_octree("octree_1");
vector<char> buffer;
merge_octrees(buffer, vector<const char*> {octree1});
OctreeParser parser;
parser.set_cpu(buffer.data());
int depth = 4;
vector<int> bidx(parser.info().node_num(depth + 1) * 8);
const int* child0 = parser.children_cpu(depth);
const int nnum0 = parser.info().node_num(depth);
const int nnum1 = parser.info().node_num(depth + 1);
bilinear_neigh_cpu(bidx.data(), parser.neighbor_cpu(depth),
child0, nnum0, NeighHelper::get_bilinear_array().data());
// check
const int weights[8] = { 27, 9, 9, 9, 3, 3, 3, 1 };
const unsigned* key0 = parser.key_cpu(depth);
const unsigned* key1 = parser.key_cpu(depth + 1);
ASSERT_TRUE(parser.info().is_key2xyz());
auto key_to_xyz = [](float * xyz, const unsigned * key) {
const unsigned char* ptr = (const unsigned char*)key;
for (int i = 0; i < 3; ++i) { xyz[i] = (float)ptr[i] + 0.5f; }
};
for (int i = 0; i < nnum1; ++i) {
float xyz0[3], xyz1[3];
key_to_xyz(xyz1, key1 + i);
for (int c = 0; c < 3; ++c) {
xyz1[c] /= 2.0f;
}
for (int k = 0; k < 8; ++k) {
int j = bidx[i * 8 + k];
if (j < 0) continue;
key_to_xyz(xyz0, key0 + j);
int weight = 1;
for (int c = 0; c < 3; ++c) {
float dis = fabs(xyz0[c] - xyz1[c]);
ASSERT_LT(dis, 1.0f);
weight *= (int)((1 - dis) * 4);
}
ASSERT_EQ(weight, weights[k]);
}
}
// check
vector<uint32> xyz10(nnum1 * 8), key10(nnum1 * 8), key_octree(nnum0);
vector<float> fracs(nnum1 * 3);
bilinear_xyz_cpu(xyz10.data(), fracs.data(), depth,
parser.key_cpu(depth + 1), depth + 1, nnum1);
xyz2key_cpu(key10.data(), xyz10.data(), xyz10.size(), depth);
xyz2key_cpu(key_octree.data(), key0, nnum0, depth);
vector<int> sidx(nnum1 * 8);
search_key_cpu(sidx.data(), key_octree.data(), key_octree.size(),
key10.data(), key10.size());
for (int i = 0; i < sidx.size(); ++i) {
ASSERT_EQ(sidx[i], bidx[i]);
}
}
TEST(Coord2xyzTest, TestCoord2xyz) {
float coord[] = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8 };
unsigned char xyz[] = { 1, 3, 5, 7, 2, 4, 6, 8 };
unsigned int rst[2] = { 0 };
coord2xyz_cpu(rst, coord, 2, 4);
unsigned char* ptr = (unsigned char*)rst;
for (int i = 0; i < 8; ++i) {
ASSERT_EQ(ptr[i], xyz[i]);
}
} |
text = list(input().split(' '))
word = 0
for i in text:
if i != '':
word += 1
print(word)
|
/*
Pythagoras Tree
variables : 0, 1
constants: [, ]
axiom : 0
rules : (1 → 11), (0 → 1[0]0)
*/
var rules = {
'1': '11',
'0': '1[0]0'
};
// Render an L-system string.
// origin {x, y, a}
// source '10[]'
function render(origin, source) {
var TURN = Math.PI/4; // 45 degrees
var position = origin;
var stack = [];
var nextPosition;
// clear the screen
c.fillStyle = 'white';
c.fillRect(0, 0, c.canvas.width, c.canvas.height);
c.strokeStyle = '#FF851B';
c.beginPath();
// start at origin
c.moveTo(origin.x, origin.y);
source.split('').forEach(function(code) {
// push position and angle. turn left 45 degrees
if (code === '[') {
stack.push(Object.assign({}, position));
nextPosition.a -= TURN;
}
// pop position and angle. turn right 45 degrees
if (code === ']') {
position = stack.pop();
c.moveTo(position.x, position.y);
position.a += TURN;
}
// draw a 'leaf',
// a line segment that doesn't advance position.
if (code === '0') {
nextPosition = calcNextPosition(position);
c.lineTo(nextPosition.x, nextPosition.y);
c.moveTo(position.x, position.y);
}
// draw a line segment and advance position.
if (code === '1') {
nextPosition = calcNextPosition(position);
position = nextPosition;
c.lineTo(nextPosition.x, nextPosition.y);
}
});
c.stroke();
}
// Calculate the next postion
function calcNextPosition(position) {
var LENGTH = 5;
var radian = position.a;
return {
x: position.x + (0|Math.cos(radian) * LENGTH),
y: position.y + (0|Math.sin(radian) * LENGTH),
a: position.a
};
}
|
<?php
namespace App\Services\Support\BaseContracts;
interface IndexInterface
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Support\LazyCollection|\Illuminate\Http\Resources\Json\ResourceCollection
*/
public function index();
}
|
import { Posts } from '../../models/Posts'
import { PostStyled } from './PostStyle'
import Link from 'next/link'
import marked from 'marked'
interface Props {
post: Posts
}
const Post: React.FC<Props> = ({ post }: { post: Posts }) => {
return (
<PostStyled>
<header>
<Link href="/">[ Go back ]</Link>
<p>Posted on {post.date}</p>
</header>
<main>
<h1>{post.title}</h1>
<div dangerouslySetInnerHTML={{ __html: marked(post.content) }}></div>
</main>
</PostStyled>
)
}
export default Post
|
import * as React from 'react';
import {createContext} from 'react';
import {userStore, postStore} from './store';
export const storeContext = createContext({
userStore,
postStore
});
// eslint-disable-next-line react/prop-types
const StoreProvider: React.FC = ({children}) => (
<storeContext.Provider value={{userStore, postStore}}>
{children}
</storeContext.Provider>
);
export default StoreProvider;
|
/*
* Copyright 2022 Google LLC
*
* 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 'mocha';
import { expect } from 'chai';
import { RetryOptions, withRetries } from '../src/retry';
describe('retry', () => {
describe('#withRetries', () => {
const cases: {
name: string;
input: RetryOptions;
expCalls?: number;
expDuration?: [min: number, max: number];
error?: string;
}[] = [
{
name: 'uses defaults',
input: { retries: 1 },
expCalls: 2,
expDuration: [100, 200],
},
{
name: 'success',
input: { retries: 5, backoff: 100 },
expCalls: 6,
expDuration: [1200, 1500],
},
{
name: 'negative retries',
input: { retries: -1, backoff: 100 },
expCalls: 1,
expDuration: [0, 50],
},
{
name: 'zero retries',
input: { retries: 0, backoff: 100 },
expCalls: 1,
expDuration: [0, 50],
},
{
name: 'one retry',
input: { retries: 1, backoff: 100 },
expCalls: 2,
expDuration: [100, 300],
},
{
name: 'negative backoff',
input: { retries: 1, backoff: -100 },
expCalls: 2,
expDuration: [0, 150],
},
{
name: 'zero backoff',
input: { retries: 4, backoff: 0 },
expCalls: 5,
expDuration: [0, 150],
},
{
name: 'limits backoff',
input: { retries: 4, backoff: 100, backoffLimit: 50 },
expCalls: 5,
expDuration: [200, 400],
},
{
name: 'negative backoff limit',
input: { retries: 4, backoff: 100, backoffLimit: -500 },
expCalls: 5,
expDuration: [0, 200],
},
{
name: 'zero backoff limit',
input: { retries: 4, backoff: 100, backoffLimit: 0 },
expCalls: 5,
expDuration: [0, 200],
},
{
name: 'end in failure',
input: { retries: 3, backoff: 500 },
error: 'retry function failed after 4 attempts: failed!',
expCalls: 4,
expDuration: [2000, 2300],
},
];
cases.forEach((tc) => {
it(tc.name, async () => {
if (tc.error) {
let start = 0;
let count = 0;
try {
const fn = async () => {
count++;
throw new Error('failed!');
};
const run = withRetries(fn, tc.input);
start = new Date().getTime();
await run();
} catch (e: unknown) {
const end = new Date().getTime();
expect((e as Error).message).to.eq(tc.error);
tc?.expCalls && expect(count).to.eq(tc.expCalls);
if (tc?.expDuration) {
expect(end - start).to.be.greaterThanOrEqual(tc.expDuration[0]);
expect(end - start).to.be.lessThanOrEqual(tc.expDuration[1]);
}
}
} else {
let count = 0;
const fn = async () => {
count++;
if (count < tc.input.retries + 1) {
throw new Error('failed!');
}
};
const run = withRetries(fn, tc.input);
const start = new Date().getTime();
await run();
const end = new Date().getTime();
tc?.expCalls && expect(count).to.eq(tc.expCalls);
if (tc?.expDuration) {
expect(end - start).to.be.greaterThanOrEqual(tc.expDuration[0]);
expect(end - start).to.be.lessThanOrEqual(tc.expDuration[1]);
}
}
});
});
});
});
|
package com.github.roarappstudio.btkontroller.reports
@ExperimentalUnsignedTypes
@Suppress("EXPERIMENTAL_FEATURE_WARNING")
inline class AbsMouseReport(
val bytes: ByteArray = ByteArray(4)
) {
var X: Int
get() = (bytes[1].toUByte().toInt() shl 8) or bytes[0].toUByte().toInt()
set(value) {
bytes[0] = (value and 0xff).toByte()
bytes[1] = ((value shr 8) and 0xff).toByte()
}
var Y: Int
get() = (bytes[3].toUByte().toInt() shl 8) or bytes[2].toUByte().toInt()
set(value) {
bytes[2] = (value and 0xff).toByte()
bytes[3] = ((value shr 8) and 0xff).toByte()
}
} |
package com.github.cc3002.citricjuice.model.board;
import com.github.cc3002.citricjuice.model.contenders.Jugador;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.util.Set;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class DrawPanelTest {
private final static String PLAYER_NAME = "Suguri";
private final static int BASE_HP = 4;
private final static int BASE_ATK = 1;
private final static int BASE_DEF = -1;
private final static int BASE_EVD = 2;
private DrawPanel testDrawPanel;
private Jugador suguri;
@BeforeEach
public void setUp() {
testDrawPanel = new DrawPanel(7);
suguri = new Jugador(PLAYER_NAME, BASE_HP, BASE_ATK, BASE_DEF, BASE_EVD);
}
@Test
public void constructorTest() {
final var expectedDrawPanel = new DrawPanel(7);
assertEquals(expectedDrawPanel, testDrawPanel);
}
@Test
public void nextPanelTest() {
assertTrue(testDrawPanel.getNext().isEmpty());
final var expectedDraPanel1 = new DrawPanel(2);
final var expectedDraPanel2 = new DrawPanel(3);
testDrawPanel.addNextPanel(expectedDraPanel1);
assertEquals(1, testDrawPanel.getNext().size());
testDrawPanel.addNextPanel(expectedDraPanel2);
assertEquals(2, testDrawPanel.getNext().size());
testDrawPanel.addNextPanel(expectedDraPanel2);
assertEquals(2, testDrawPanel.getNext().size());
assertEquals(Set.of(expectedDraPanel1, expectedDraPanel2),
testDrawPanel.getNext());
}
@Test
public void playerPanelTest(){
final var expectedSuguri1 = new Jugador("JUGADOR", 4, 1, -1,2);
final var expectedSuguri2 = new Jugador("JUGADOR2", 4, 1, -1,2);
assertTrue(testDrawPanel.getOcupado().isEmpty());
testDrawPanel.addPla2Pan(expectedSuguri1);
assertEquals(1,testDrawPanel.getOcupado().size());
testDrawPanel.addPla2Pan(expectedSuguri2);
assertEquals(2,testDrawPanel.getOcupado().size());
testDrawPanel.addPla2Pan(expectedSuguri2);
assertEquals(2,testDrawPanel.getOcupado().size());
assertEquals(Set.of(expectedSuguri1,expectedSuguri2),testDrawPanel.getOcupado());
testDrawPanel.leave(expectedSuguri1);
assertEquals(1,testDrawPanel.getOcupado().size());
assertEquals(Set.of(expectedSuguri2),testDrawPanel.getOcupado());
}
@Test
public void drawPanelTest() {
final var expectedSuguri = suguri.copy();
testDrawPanel.action(suguri);
assertEquals(expectedSuguri, suguri);
}
}
|
'use strict';
/**
* activate Gateway contract on origin class
*
* @module lib/setup/common/ActivateGateway
*/
const rootPrefix = '../../..',
contractConstants = require(rootPrefix + '/lib/globalConstant/contract'),
SubmitTransaction = require(rootPrefix + '/lib/transactions/SignSubmitTrxOnChain'),
CommonSetupBase = require(rootPrefix + '/lib/setup/common/Base'),
MosaicJs = require('@openst/mosaic.js');
/**
*
* @class
*/
class ActivateGateway extends CommonSetupBase {
/**
* Constructor
*
* @param {Object} params
* @param {Number} params.chainId - chain id on which this is to be performed
* @param {String} params.signerAddress - address who signs Tx
* @param {String} params.chainEndpoint - url to connect to chain
* @param {String} params.gasPrice - gas price to use
* @param {String} params.gatewayAddress - gateway contract address which is to be activated
* @param {String} params.coGatewayAddress - co gateway contract address (aux chain's gateway contract address)
* @param {Object} params.pendingTransactionExtraData - pending tx extra data
* @param {Object} [params.customSubmitTxParams]: custom submit tx params (extra ones to be inserted in tx meta)
*
* @constructor
*/
constructor(params) {
super(params);
const oThis = this;
oThis.gatewayAddress = params['gatewayAddress'];
oThis.coGatewayAddress = params['coGatewayAddress'];
}
/**
*
* async perform
*
* @return {Promise<result>}
*
*/
async _asyncPerform() {
const oThis = this;
let txOptions = {
gasPrice: oThis.gasPrice,
from: oThis.signerAddress,
to: oThis.gatewayAddress,
gas: contractConstants.activateGatewayGas,
value: contractConstants.zeroValue
};
// FIXME helperObj._activateGatewayRawTx returns a Promise
let helperObj = new ActivateGateway.GatewayHelper(),
txObject = await helperObj._activateGatewayRawTx(
oThis.coGatewayAddress,
txOptions,
oThis.gatewayAddress,
oThis._web3Instance
);
txOptions['data'] = txObject.encodeABI();
let submitRxParams = {
chainId: oThis.chainId,
provider: oThis.chainEndpoint,
txOptions: txOptions,
options: oThis.pendingTransactionExtraData
};
if (oThis.customSubmitTxParams) {
Object.assign(submitRxParams, oThis.customSubmitTxParams);
}
let submitTxRsp = await new SubmitTransaction(submitRxParams).perform();
return Promise.resolve(submitTxRsp);
}
static get GatewayHelper() {
return MosaicJs.ChainSetup.GatewayHelper;
}
}
module.exports = ActivateGateway;
|
using UnityEngine;
using System.Collections;
using System;
public class ImagePickerCallback : AndroidJavaProxy {
public Action <string>onGetImageComplete;
public Action onGetImageCancel;
public Action onGetImageFail;
public ImagePickerCallback() : base("com.gigadrillgames.androidplugin.image.IImageCallback") {}
void GetImageComplete(String imagePath){
onGetImageComplete(imagePath);
}
void GetImageCancel(){
onGetImageCancel();
}
void GetImageFail(){
onGetImageFail();
}
} |
[](https://snyk.io/test/npm/baset-cli)
# BaseT CLI
> CLI for [BaseT](https://github.com/Igmat/baset) project.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
DROP table IF EXISTS account_info;
DROP table IF EXISTS account_transaction;
DROP table IF EXISTS customer;
DROP table IF EXISTS account_customer;
DROP table IF EXISTS address;
DROP table IF EXISTS account_change_info;
CREATE TABLE account_info (
account_id varchar(255),
title varchar(255),
description varchar(255),
version varchar(255),
balance numeric,
creation_Date date,
active_flg varchar(1) DEFAULT 'Y',
PRIMARY KEY(account_id)
);
CREATE TABLE account_transaction (
transaction_Id varchar(255),
from_account_id varchar(255),
to_account_id varchar(255),
amount numeric,
creation_Date date,
description varchar(255),
status varchar(20),
entry_Type varchar(20),
active_flg varchar(1) DEFAULT 'Y',
PRIMARY KEY(transaction_Id)
);
CREATE TABLE account_change_info (
change_id varchar(255),
transaction_id varchar(255),
transaction_type varchar(20),
version varchar(255),
amount numeric,
balanceDelta numeric,
creation_Date date,
PRIMARY KEY(change_id)
);
CREATE TABLE customer (
customer_Id varchar(255),
first_name varchar(60),
last_name varchar(60),
password varchar(255),
ssn varchar(20),
email varchar(60),
phoneNumber varchar(20),
active_flg varchar(1) DEFAULT 'Y',
PRIMARY KEY(customer_Id)
);
CREATE TABLE account_customer (
account_id varchar(255),
customer_Id varchar(255),
PRIMARY KEY(account_id,customer_Id)
);
CREATE TABLE address (
customer_Id varchar(255),
street1 varchar(100),
street2 varchar(100),
city varchar(40),
state varchar(40),
country varchar(40),
zipCode varchar(20),
PRIMARY KEY(customer_Id)
);
|
@model IEnumerable<src.Models.Organization>
@inject UserManager<ApplicationUser> UserManager
@inject src.Data.ApplicationDbContext Context
@{
ViewData["Title"] = "Index";
Layout = "~/Views/Shared/_LayoutAdminlteWallpaper.cshtml";
ApplicationUser appUser = await UserManager.GetUserAsync(User);
Guid cust = Guid.Empty;
if (appUser.IsCustomer)
{
Contact contact = Context.Contact.Where(x => x.applicationUserId.Equals(appUser.Id)).FirstOrDefault();
Customer customer = (contact != null) ? Context.Customer.Where(x => x.customerId.Equals(contact.customerId)).FirstOrDefault() : null;
cust = (customer != null) ? customer.customerId : Guid.Empty;
}
}
<div class="content">
<div class="row">
@foreach (var item in Model)
{
<div class="col-lg-4">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
<h4>@item.organizationName</h4>
</div>
<div class="icon">
<i class="ion ion-stats-bars"></i>
</div>
@if (appUser.IsSuperAdmin)
{
<a href="@Url.Action("Index", "Customer", new { org = item.organizationId })" class="small-box-footer"><h3>Enter <i class="fa fa-arrow-circle-right"></i></h3></a>
<a href="@Url.Action("Organization", "Config")" class="small-box-footer">Configure <i class="fa fa-gear"></i></a>
}
else if (appUser.IsCustomer)
{
<a href="@Url.Action("Customer", "Ticket", new { cust = cust })" class="small-box-footer"><h3>Enter <i class="fa fa-arrow-circle-right"></i></h3></a>
}
else
{
<a href="@Url.Action("Index", "Ticket", new { org = item.organizationId })" class="small-box-footer"><h3>Enter <i class="fa fa-arrow-circle-right"></i></h3></a>
}
</div>
</div>
}
</div>
</div>
|
<?php
namespace App\Http\Controllers;
use PDF;
use Illuminate\Http\Request;
class pdfController extends Controller
{
public function createPDF(Request $req){
$certificate = 'file://'.base_path().'/public/tcpdf.crt';
$privateKey = 'file://'.base_path().'/public/tcpdf.key';
$info = array(
'Name' => 'Smartly Built',
'Location' => 'Office',
'Reason' => 'Private Documents',
'ContactInfo' => 'httpa://www.smartltbuilt.com',
);
PDF::setSignature($certificate, $privateKey, 'tcpdfdemo', '', 2, $info);
PDF::SetFont('helvetica', '', 12);
PDF::SetTitle('Hello World');
PDF::AddPage();
$text = view('pdf');
PDF::writeHTML($text, true, 0, true, 0);
PDF::Image('tcpdf.png', 180, 80, 15, 15, 'PNG');
PDF::setSignatureAppearance(180, 60, 15, 15);
PDF::Output(public_path('test.pdf'), 'F');
PDF::reset();
return response(['message'=>'PDF Created Successfully!']);
}
}
|
package io.github.volkanozkan.mancala.service;
import io.github.volkanozkan.mancala.model.Game;
import io.github.volkanozkan.mancala.model.Player;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.socket.WebSocketSession;
import java.util.UUID;
import static org.mockito.Mockito.when;
@RunWith(SpringRunner.class)
@SpringBootTest(properties = { "spring.data.mongodb.database=mancalaTestDB" })
public class PlayerServiceTest {
@Autowired
PlayerService playerService;
@Autowired
GameService gameService;
@Mock
private WebSocketSession webSocketSession;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
playerService.deleteAllPlayers();
}
@Test
public void testCreateNewPlayer() {
when(webSocketSession.getId()).thenReturn("1");
Player player = playerService.createNewPlayer("Test Player", webSocketSession.getId(), UUID.randomUUID());
Assert.assertNotNull(player);
}
@Test
public void shouldGetPlayerBySessionId() {
Player nullPlayer = playerService.getPlayerBySessionId("300");
Assert.assertNull(nullPlayer);
when(webSocketSession.getId()).thenReturn("2");
Player actualPlayer = playerService.createNewPlayer("Test User", webSocketSession.getId(), UUID.randomUUID());
Player expectedPlayer = playerService.getPlayerBySessionId(webSocketSession.getId());
Assert.assertNotNull(expectedPlayer);
Assert.assertEquals(actualPlayer, expectedPlayer);
}
@Test
public void testFindOpponent() {
gameService.deleteAllGames();
Game game = gameService.createOrFindAvailableGame();
Player player = playerService.createNewPlayer("Test", "123", game.getGameId());
game.setFirstPlayer(player);
gameService.updateGame(game);
Assert.assertNull(playerService.getPlayersOpponent(game.getFirstPlayer()));
Player secondPlayer = playerService.createNewPlayer("Test", "123456", game.getGameId());
game.setSecondPlayer(secondPlayer);
gameService.updateGame(game);
Player opponent = playerService.getPlayersOpponent(game.getFirstPlayer());
Assert.assertNotNull(opponent);
Assert.assertEquals(secondPlayer, opponent);
}
}
|
package edu.calpoly.flipted.ui.goals
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.RecyclerView
import edu.calpoly.flipted.R
import edu.calpoly.flipted.ui.goals.edit.*
import java.util.*
class GoalRecyclerViewAdapter(
private val fragment: Fragment
) : RecyclerView.Adapter<GoalBlockViewHolder>()
{
private val inflater = fragment.layoutInflater
private val viewModel = ViewModelProvider(fragment.requireActivity())[EditGoalViewModel::class.java]
var subGoalBlocks : List<MutableSubGoal>
get() = viewModel.currSubgoalList
set(value: List<MutableSubGoal>) {
viewModel.currSubgoalList = value
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GoalBlockViewHolder {
val inflatedView = inflater.inflate(viewType, parent, false)
return when (viewType) {
R.layout.goals_fragment_create_subgoal_list_item -> SubGoalViewHolder(inflatedView,this)
R.layout.goals_fragment_create_subgoal_list_item_add -> AddSubGoalViewHolder(inflatedView, this)
else -> throw IllegalArgumentException("Unknown viewType")
}
}
override fun onBindViewHolder(holder: GoalBlockViewHolder, position: Int) {
if (position != subGoalBlocks.size){
(holder as SubGoalViewHolder).bind(subGoalBlocks[position])
}
}
override fun getItemCount(): Int = subGoalBlocks.size + 1
override fun getItemViewType(position: Int): Int =
if(position == subGoalBlocks.size)
R.layout.goals_fragment_create_subgoal_list_item_add
else
R.layout.goals_fragment_create_subgoal_list_item
}
|
Facter.add('fundamentals_pe_version') do
setcode do
pe_ver = Facter.value("puppetversion").match(/Puppet Enterprise (\d+\.\d+\.\d+)/)
pe_ver[1] if pe_ver
end
end
|
// ignore-tidy-linelength
#![deny(deprecated_in_future)]
#![feature(staged_api)]
#![stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
#[rustc_deprecated(since = "99.99.99", reason = "effectively never")]
#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
pub struct S;
fn main() {
let _ = S; //~ ERROR use of item 'S' that will be deprecated in future version 99.99.99: effectively never
}
|
package uk.lobsterdoodle.namepicker.ui
import uk.lobsterdoodle.namepicker.selection.SelectionToggleEvent
data class UpdateDrawActionsEvent(
val drawCounterText: String,
val drawOptions: List<String>,
val toggleLabel: String,
val selectionToggleEvent: SelectionToggleEvent
)
|
#!/bin/sh
spark-submit --class WordCount --num-executors 10 target/scala-2.10/wordcount-application_2.10-1.0.jar
hdfs dfs -getmerge Lab6/wordcount answer
md5sum answer
|
#!/bin/bash
# Clean up
rm -f install-*-emoji.zip
for folder in android-versions/*; do
android_version=`basename $folder`
sed -i "s/VERSION/${android_version^}/" META-INF/com/google/android/updater-script
zip -r install-$android_version-emoji.zip META-INF
sed -i "s/${android_version^}/VERSION/" META-INF/com/google/android/updater-script
cd android-versions/$android_version
zip -r ../../install-$android_version-emoji.zip system
cd ../../
done
|
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
module Language.Quasi.StringSub where
import Control.Arrow ( second )
import Control.Applicative ( (<$>) )
import Data.List ( find, isPrefixOf, inits, tails )
import Text.Themplates ( parseSplices, curlySplice )
import Language.Haskell.TH
import Language.Haskell.TH.Lift ( Lift(..), lift )
import Language.Haskell.TH.Quote ( QuasiQuoter(..) )
import Language.Quasi.Ast.TH ( e', p' )
import Language.Quasi.Internal.Utils ( fromLeft, parseExp, parsePat )
import System.IO.Unsafe ( unsafePerformIO )
--TODO: handle escaping double braces.
-- let name = "foobar" in [s| hello, {{ name }} |]
--
-- " hello, foobar "
splitFind :: String -> String -> Maybe (String, String)
splitFind on xs = second (drop $ length on)
<$> (find (isPrefixOf on . snd) $ zip (inits xs) (tails xs))
uLift :: Lift a => a -> Exp
uLift = unsafeQ . lift
unsafeQ :: Q a -> a
unsafeQ = unsafePerformIO . runQ
-- Unescaped string
s :: QuasiQuoter
s = stringQQ id
-- Escaped string
se :: QuasiQuoter
se = stringQQ (read . ('"':) . (++"\""))
stringQQ :: (String -> String) -> QuasiQuoter
stringQQ str_process = QuasiQuoter expr pat undefined undefined
where
expr code
= return
. foldr [e'| {{}} ++ {{}} |] [e'| [] |]
. map (either (uLift . str_process) (ParensE . fromLeft . parseExp . snd))
. fromLeft
$ parseSplices curlySplice code
pat code = return $ case chunks of
(Left c:cs) -> foldr (\ch -> [p'| {{LitP $ CharL ch}} : {{}} |])
(process cs) c
cs -> process cs
where
-- map (chunk (LitP . StringP) (ViewP . fromLeft . parsePat "" . snd))
process [] = LitP $ StringL ""
process [Left c] = LitP $ StringL c
process [Right (_, splice), Left ""] = fromLeft $ parsePat splice
process (Right (_, splice) : Left c : cs)
= [p'| (splitFind {{uLift $ str_process c}}
-> Just ( {{fromLeft $ parsePat splice}}
, {{process cs}}))
|]
process _ = error "Cannot handle adjacent splices in a string-search match quasi-quoter."
chunks = fromLeft $ parseSplices curlySplice code |
#!/bin/bash
REPO_ROOT="`cd $(dirname $0)/..; echo $PWD`"
"$REPO_ROOT/node_modules/@faast/ts-config/library/bin/build.sh" "$@"
|
import "provider.dart" show Provider;
class Container {
static final _container = <Type, _ContainerItem>{};
static void registerSingleton<T>(Provider provider) {
_container.putIfAbsent(T, () => _ContainerItem.singleton(provider));
}
static void registerTransient<T>(Provider provider) {
_container.putIfAbsent(T, () => _ContainerItem.transient(provider));
}
static T retrieve<T>() {
if (!_container.containsKey(T)) {
throw ProviderNotFoundException(T);
}
return _container[T]?.getElement() as T;
}
}
class ProviderNotFoundException implements Exception {
ProviderNotFoundException(this._type);
final Type _type;
@override
String toString() => "Provider not found for type: $_type";
}
class _ContainerItem {
_ContainerItem.singleton(this._provider) : _storeInstance = true;
_ContainerItem.transient(this._provider) : _storeInstance = false;
final bool _storeInstance;
final Provider _provider;
Object _instance;
Object getElement() => _storeInstance && _instance != null ? _instance : _instance = _provider.getInstance();
}
|
/**
* @author Luke Brandon Farrell
* @description
*/
/* NPM - Node Package Manage */
import { call, put, delay } from "redux-saga/effects";
import { config } from "./config";
/**
* Network Saga Abstraction
*
* @param action
* @param baseUrl
* @param api
* @param type
* @param key - key for the timestamp, in the case that it overrides a value from the API
*
* @return {IterableIterator<*>}
*/
function* AbstractNetworkSaga(
action,
baseUrl,
api,
type,
key = "requestTimestamp"
) {
const payloadChain = action.payload?.chain ?? {};
const metaChain = action.meta?.chain ?? {};
try {
const payload = action.payload ?? {};
const meta = action.meta ?? {};
// In development we can add a delay to successful network requests
if(config.isDev) yield delay(config.networkDelay);
const data = yield call(api, baseUrl, payload, meta);
console.log({ data, payload });
yield put({
type,
payload: {
data,
[key]: new Date().toISOString(),
...payloadChain
},
meta: { ...metaChain },
error: false
});
} catch (e) {
if (config.isDev) console.warn(e); // eslint-disable-line no-console
const status = e?.response?.status;
const data = e?.response?.data ?? {};
const message = data?.message ?? config.errorMessage;
yield put({
type,
payload: { status, message, ...data, ...payloadChain },
meta: { ...metaChain },
error: true
});
}
}
export { AbstractNetworkSaga };
|
#include "private.h"
#include "private_opencl.h"
#include "loaders/libclblas.h"
#include "gpuarray/buffer_blas.h"
#include "gpuarray/error.h"
extern const gpuarray_buffer_ops opencl_ops;
static inline clblasOrder convO(cb_order order) {
switch (order) {
case cb_row:
return clblasRowMajor;
case cb_column:
return clblasColumnMajor;
default:
return -1;
}
}
static inline clblasTranspose convT(cb_transpose trans) {
switch (trans) {
case cb_no_trans:
return clblasNoTrans;
case cb_trans:
return clblasTrans;
case cb_conj_trans:
return clblasConjTrans;
default:
return -1;
}
}
static unsigned int refcnt = 0;
static const char *estr(clblasStatus err) {
if (err > -900) {
if (err == CL_INVALID_DEVICE) {
return "Invalid device, or double precision requested on a device that does not support double precision";
}
return cl_error_string((cl_int)err);
}
switch (err) {
case clblasNotImplemented:
return "Unimplemented feature";
case clblasNotInitialized:
return "Library not initialized";
case clblasInvalidMatA:
return "matrix A is not a valid memory object";
case clblasInvalidMatB:
return "matrix B is not a valid memory object";
case clblasInvalidMatC:
return "matrix C is not a valid memory object";
case clblasInvalidVecX:
return "vector X is not a valid memory object";
case clblasInvalidVecY:
return "vector Y is not a valid memory object";
case clblasInvalidDim:
return "An input dimension (M, N, K) is invalid";
case clblasInvalidLeadDimA:
return "leading dimension for A must not be less than the size of the first dimension";
case clblasInvalidLeadDimB:
return "leading dimension for B must not be less than the size of the second dimension";
case clblasInvalidLeadDimC:
return "leading dimension for C must not be less than the size of the third dimension";
case clblasInvalidIncX:
return "increment for X must not be 0";
case clblasInvalidIncY:
return "increment for Y must not be 0";
case clblasInsufficientMemMatA:
return "memory object for matrix A is too small";
case clblasInsufficientMemMatB:
return "memory object for matrix B is too small";
case clblasInsufficientMemMatC:
return "memory object for matrix C is too small";
case clblasInsufficientMemVecX:
return "memory object for vector X is too small";
case clblasInsufficientMemVecY:
return "memory object for vector Y is too small";
default:
return "Unknown error";
}
}
static inline int error_clblas(error *e, const char *msg, clblasStatus err) {
return error_fmt(e, GA_BLAS_ERROR, "%s: %s", msg, estr(err));
}
#define CLB_CHECK(e, cmd) do { \
clblasStatus err = (cmd); \
if (err != clblasSuccess) \
return error_clblas(e, #cmd, err); \
} while (0)
static int setup(gpucontext *ctx) {
if (refcnt == 0) {
CLB_CHECK(ctx->err, clblasSetup());
}
if (ctx->blas_handle == NULL)
ctx->blas_handle = &refcnt;
refcnt++;
return GA_NO_ERROR;
}
static void teardown(gpucontext *ctx) {
if (ctx->blas_handle != NULL) {
ctx->blas_handle = NULL;
refcnt--;
}
if (refcnt == 0)
clblasTeardown();
}
#define ARRAY_INIT(A) \
if (A->ev != NULL) \
evl[num_ev++] = A->ev
#define ARRAY_FINI(A) \
if (A->ev != NULL) \
clReleaseEvent(A->ev); \
A->ev = ev; \
clRetainEvent(A->ev)
static int sgemmBatch(cb_order order, cb_transpose transA, cb_transpose transB,
size_t M, size_t N, size_t K, float alpha,
gpudata **A, size_t *offA, size_t lda,
gpudata **B, size_t *offB, size_t ldb,
float beta, gpudata **C, size_t *offC, size_t ldc,
size_t batchCount) {
cl_ctx *ctx = A[0]->ctx;
cl_event evl[3];
cl_event ev;
size_t i;
cl_uint num_ev = 0;
for (i = 0; i < batchCount; i++) {
num_ev = 0;
ARRAY_INIT(A[i]);
ARRAY_INIT(B[i]);
ARRAY_INIT(C[i]);
CLB_CHECK(ctx->err, clblasSgemm(convO(order), convT(transA), convT(transB),
M, N, K,
alpha, A[i]->buf, offA[i], lda,
B[i]->buf, offB[i], ldb,
beta, C[i]->buf, offC[i], ldc, 1, &ctx->q,
num_ev, num_ev == 0 ? NULL : evl, &ev));
ARRAY_FINI(A[i]);
ARRAY_FINI(B[i]);
ARRAY_FINI(C[i]);
clReleaseEvent(ev);
}
return GA_NO_ERROR;
}
static int dgemmBatch(cb_order order, cb_transpose transA, cb_transpose transB,
size_t M, size_t N, size_t K, double alpha,
gpudata **A, size_t *offA, size_t lda,
gpudata **B, size_t *offB, size_t ldb,
double beta, gpudata **C, size_t *offC, size_t ldc,
size_t batchCount) {
cl_ctx *ctx = A[0]->ctx;
cl_event evl[3];
cl_event ev;
size_t i;
cl_uint num_ev = 0;
for (i = 0; i < batchCount; i++) {
num_ev = 0;
ARRAY_INIT(A[i]);
ARRAY_INIT(B[i]);
ARRAY_INIT(C[i]);
CLB_CHECK(ctx->err, clblasDgemm(convO(order), convT(transA), convT(transB),
M, N, K,
alpha, A[i]->buf, offA[i], lda,
B[i]->buf, offB[i], ldb,
beta, C[i]->buf, offC[i], ldc, 1, &ctx->q,
num_ev, num_ev == 0 ? NULL : evl, &ev));
ARRAY_FINI(A[i]);
ARRAY_FINI(B[i]);
ARRAY_FINI(C[i]);
clReleaseEvent(ev);
}
return GA_NO_ERROR;
}
static int sdot(
size_t N,
gpudata *X, size_t offX, size_t incX,
gpudata *Y, size_t offY, size_t incY,
gpudata *Z, size_t offZ) {
cl_ctx *ctx = X->ctx;
clblasStatus err;
cl_uint num_ev = 0;
cl_event evl[3];
cl_event ev;
gpudata *wbuf;
wbuf = opencl_ops.buffer_alloc((gpucontext*)ctx,
N*sizeof(float), NULL, GA_BUFFER_READ_WRITE);
if (wbuf == NULL)
return ctx->err->code;
ARRAY_INIT(X);
ARRAY_INIT(Y);
ARRAY_INIT(Z);
// TODO: a thread-safe static buffer or allocator?
err = clblasSdot(
N, Z->buf, offZ,
X->buf, offX, incX,
Y->buf, offY, incY,
wbuf->buf, 1, &ctx->q,
num_ev, num_ev ? evl : NULL, &ev);
opencl_ops.buffer_release(wbuf);
if (err != clblasSuccess)
return error_clblas(ctx->err, "clblasSdot", err);
ARRAY_FINI(X);
ARRAY_FINI(Y);
ARRAY_FINI(Z);
clReleaseEvent(ev);
return GA_NO_ERROR;
}
static int ddot(
size_t N,
gpudata *X, size_t offX, size_t incX,
gpudata *Y, size_t offY, size_t incY,
gpudata *Z, size_t offZ) {
cl_ctx *ctx = X->ctx;
clblasStatus err;
cl_uint num_ev = 0;
cl_event evl[3];
cl_event ev;
gpudata *wbuf;
wbuf = opencl_ops.buffer_alloc((gpucontext*)ctx,
N*sizeof(double), NULL, GA_BUFFER_READ_WRITE);
if (wbuf == NULL)
return ctx->err->code;
ARRAY_INIT(X);
ARRAY_INIT(Y);
ARRAY_INIT(Z);
err = clblasDdot(
N, Z->buf, offZ,
X->buf, offX, incX,
Y->buf, offY, incY,
wbuf->buf, 1, &ctx->q,
num_ev, num_ev ? evl : NULL, &ev);
opencl_ops.buffer_release(wbuf);
if (err != clblasSuccess)
return error_clblas(ctx->err, "clblasDdot", err);
ARRAY_FINI(X);
ARRAY_FINI(Y);
ARRAY_FINI(Z);
clReleaseEvent(ev);
return GA_NO_ERROR;
}
static int sgemv(cb_order order, cb_transpose transA, size_t M, size_t N,
float alpha, gpudata *A, size_t offA, size_t lda,
gpudata *X, size_t offX, int incX, float beta,
gpudata *Y, size_t offY, int incY) {
cl_ctx *ctx = A->ctx;
cl_uint num_ev = 0;
cl_event evl[3];
cl_event ev;
ARRAY_INIT(A);
ARRAY_INIT(X);
ARRAY_INIT(Y);
CLB_CHECK(ctx->err, clblasSgemv(convO(order), convT(transA), M, N, alpha,
A->buf, offA, lda, X->buf, offX, incX,
beta, Y->buf, offY, incY, 1, &ctx->q,
num_ev, num_ev == 0 ? NULL : evl, &ev));
ARRAY_FINI(A);
ARRAY_FINI(X);
ARRAY_FINI(Y);
clReleaseEvent(ev);
return GA_NO_ERROR;
}
static int dgemv(cb_order order, cb_transpose transA, size_t M, size_t N,
double alpha, gpudata *A, size_t offA, size_t lda,
gpudata *X, size_t offX, int incX, double beta,
gpudata *Y, size_t offY, int incY) {
cl_ctx *ctx = A->ctx;
cl_uint num_ev = 0;
cl_event evl[3];
cl_event ev;
ARRAY_INIT(A);
ARRAY_INIT(X);
ARRAY_INIT(Y);
CLB_CHECK(ctx->err, clblasDgemv(convO(order), convT(transA), M, N, alpha,
A->buf, offA, lda, X->buf, offX, incX,
beta, Y->buf, offY, incY, 1, &ctx->q,
num_ev, num_ev == 0 ? NULL : evl, &ev));
ARRAY_FINI(A);
ARRAY_FINI(X);
ARRAY_FINI(Y);
clReleaseEvent(ev);
return GA_NO_ERROR;
}
static int sgemm(cb_order order, cb_transpose transA, cb_transpose transB,
size_t M, size_t N, size_t K, float alpha,
gpudata *A, size_t offA, size_t lda,
gpudata *B, size_t offB, size_t ldb, float beta,
gpudata *C, size_t offC, size_t ldc) {
cl_ctx *ctx = A->ctx;
cl_uint num_ev = 0;
cl_event evl[3];
cl_event ev;
ARRAY_INIT(A);
ARRAY_INIT(B);
ARRAY_INIT(C);
CLB_CHECK(ctx->err, clblasSgemm(convO(order), convT(transA), convT(transB),
M, N, K,
alpha, A->buf, offA, lda, B->buf, offB, ldb,
beta, C->buf, offC, ldc, 1, &ctx->q,
num_ev, num_ev == 0 ? NULL : evl, &ev));
ARRAY_FINI(A);
ARRAY_FINI(B);
ARRAY_FINI(C);
clReleaseEvent(ev);
return GA_NO_ERROR;
}
static int dgemm(cb_order order, cb_transpose transA, cb_transpose transB,
size_t M, size_t N, size_t K, double alpha,
gpudata *A, size_t offA, size_t lda,
gpudata *B, size_t offB, size_t ldb, double beta,
gpudata *C, size_t offC, size_t ldc) {
cl_ctx *ctx = A->ctx;
cl_uint num_ev = 0;
cl_event evl[3];
cl_event ev;
ARRAY_INIT(A);
ARRAY_INIT(B);
ARRAY_INIT(C);
CLB_CHECK(ctx->err, clblasDgemm(convO(order), convT(transA), convT(transB),
M, N, K,
alpha, A->buf, offA, lda, B->buf, offB, ldb,
beta, C->buf, offC, ldc, 1, &ctx->q,
num_ev, num_ev == 0 ? NULL : evl, &ev));
ARRAY_FINI(A);
ARRAY_FINI(B);
ARRAY_FINI(C);
clReleaseEvent(ev);
return GA_NO_ERROR;
}
static int sger(cb_order order, size_t M, size_t N, float alpha,
gpudata *X, size_t offX, int incX,
gpudata *Y, size_t offY, int incY,
gpudata *A, size_t offA, size_t lda) {
cl_ctx *ctx = X->ctx;
cl_event evl[3];
cl_event ev;
cl_uint num_ev = 0;
ARRAY_INIT(X);
ARRAY_INIT(Y);
ARRAY_INIT(A);
CLB_CHECK(ctx->err, clblasSger(convO(order), M, N, alpha, X->buf, offX, incX,
Y->buf, offY, incY, A->buf, offA, lda, 1, &ctx->q,
num_ev, num_ev == 0 ? NULL : evl, &ev));
ARRAY_FINI(X);
ARRAY_FINI(Y);
ARRAY_FINI(A);
clReleaseEvent(ev);
return GA_NO_ERROR;
}
static int dger(cb_order order, size_t M, size_t N, double alpha,
gpudata *X, size_t offX, int incX,
gpudata *Y, size_t offY, int incY,
gpudata *A, size_t offA, size_t lda) {
cl_ctx *ctx = X->ctx;
cl_event evl[3];
cl_event ev;
cl_uint num_ev = 0;
ARRAY_INIT(X);
ARRAY_INIT(Y);
ARRAY_INIT(A);
CLB_CHECK(ctx->err, clblasDger(convO(order), M, N, alpha, X->buf, offX, incX,
Y->buf, offY, incY, A->buf, offA, lda, 1, &ctx->q,
num_ev, num_ev == 0 ? NULL : evl, &ev));
ARRAY_FINI(X);
ARRAY_FINI(Y);
ARRAY_FINI(A);
clReleaseEvent(ev);
return GA_NO_ERROR;
}
gpuarray_blas_ops clblas_ops = {
setup,
teardown,
NULL, /* hdot */
sdot,
ddot,
NULL, /* hgemv */
sgemv,
dgemv,
NULL, /* hgemm */
sgemm,
dgemm,
NULL, /* hger */
sger,
dger,
NULL, /* hgemmBatch */
sgemmBatch,
dgemmBatch,
NULL, /* hgemvBatch */
NULL, /* sgemvBatch */
NULL, /* dgemvBatch */
NULL, /* hgerBatch */
NULL, /* sgerBatch */
NULL, /* dgerBatch */
NULL, /* hgemm3D */
NULL, /* sgemm3D */
NULL, /* dgemm3D */
};
|
#!/usr/bin/env bash
set -ex
ORIG_DIR=`pwd`
TEMP_DIR=`mktemp -d -t docker_deploy_agent`
TEMP_DOCKER_IMAGE=temp_docker-deploy-agent:20160712-1500
DOCKER_IMAGE=docker-deploy-agent:20160712-1500
DOCKERFILE_URL=https://raw.githubusercontent.com/kjpianeta/docker-deploy-agent/master/Dockerfile
function _build_docker_image(){
if [[ "$(docker images -q "${DOCKER_IMAGE}" 2> /dev/null)" == "" ]]; then
echo "Image not present in local repo. Creating..."
# wget -P "${TEMP_DIR}" "${DOCKERFILE_URL}"
cp -p Dockerfile "${TEMP_DIR}"
_temp_image_id="$(docker build -q --force-rm "${TEMP_DIR}")"
_temp_container_id="$(docker run -d "${_temp_image_id}" /bin/bash)"
echo "Temp container id: ""${_temp_container_id}"
(docker export "${_temp_container_id}" | docker import – "${DOCKER_IMAGE}")
fi
}
function _run_lite(){
docker run \
--rm \
-ti \
--volume `pwd`:/opt/cisco/deployer \
--volume $SSH_AUTH_SOCK:/ssh-agent:ro \
--env "${OS_AUTH_URL?:Need to set OS_AUTH_URL}" \
--env "${OS_TENANT_ID?:Need to set OS_TENANT_ID}" \
--env "${OS_TENANT_NAME?:Need to set OS_TENANT_NAME}" \
--env "${OS_PROJECT_NAME?:Need to set OS_PROJECT_NAME}" \
--env "${OS_USERNAME?:Need to set OS_USERNAME}" \
--env "${OS_PASSWORD?:Need to set OS_PASSWORD}" \
--env "${OS_REGION_NAME?:Need to set OS_REGION_NAME}" \
--env "${SSH_AUTH_SOCK?:Need to set SSH_AUTH_SOCK}" \
"${DOCKER_IMAGE}"
"$@"
}
_build_docker_image
#_run_lite |
package org.eightsines.kotlinperfopt
class A39 {
private fun foo(a: IntArray) {
println("size = ${a.size}")
}
}
|
// Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"fmt"
smithy "github.com/awslabs/smithy-go"
)
// A request contains unexpected data.
type BadRequestException struct {
Message *string
}
func (e *BadRequestException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *BadRequestException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *BadRequestException) ErrorCode() string { return "BadRequestException" }
func (e *BadRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An operation failed because a dependent service threw an exception.
type DependentServiceFailureException struct {
Message *string
}
func (e *DependentServiceFailureException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DependentServiceFailureException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DependentServiceFailureException) ErrorCode() string {
return "DependentServiceFailureException"
}
func (e *DependentServiceFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// The service failed to perform an operation due to an internal issue.
type InternalFailureException struct {
Message *string
}
func (e *InternalFailureException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InternalFailureException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InternalFailureException) ErrorCode() string { return "InternalFailureException" }
func (e *InternalFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// A resource could not be created because service quotas were exceeded.
type LimitExceededException struct {
Message *string
}
func (e *LimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitExceededException) ErrorCode() string { return "LimitExceededException" }
func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An entity was not found during an operation.
type NotFoundException struct {
Message *string
}
func (e *NotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NotFoundException) ErrorCode() string { return "NotFoundException" }
func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An operation failed due to a non-existent resource.
type ResourceNotFoundException struct {
Message *string
Code *string
}
func (e *ResourceNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceNotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" }
func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An operation failed due to a lack of access.
type UnauthorizedException struct {
Message *string
}
func (e *UnauthorizedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UnauthorizedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UnauthorizedException) ErrorCode() string { return "UnauthorizedException" }
func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
import 'dart:math';
import "package:angular/angular.dart";
import 'package:angulardart_bootstrap/angulardart_bootstrap.dart';
import 'package:angular_forms/angular_forms.dart';
@Component (selector: "progress-demo",
templateUrl: "progress_demo.html",
directives: const [BsProgressComponent, BsToggleButtonDirective, coreDirectives, formDirectives])
class ProgressDemo {
num max = 200;
bool showWarning = false;
num value;
String type;
List stacked = [];
bool showResizeable = true;
ProgressDemo() {
random();
}
random() {
value = new Random().nextInt(100);
if (value < 25) {
type = "success";
} else if (value < 50) {
type = "info";
} else if (value < 75) {
type = "warning";
} else {
type = "danger";
}
showWarning = type == "danger" || type == "warning";
}
} |
/*
* Copyright (C) 2016 Incognito
*
* 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.
*/
#include "main.h"
#include "core.h"
#include "natives.h"
#include <boost/scoped_ptr.hpp>
#include <boost/thread.hpp>
#include <sdk/plugin.h>
#include <queue>
#include <set>
logprintf_t logprintf;
PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports()
{
return SUPPORTS_VERSION | SUPPORTS_AMX_NATIVES | SUPPORTS_PROCESS_TICK;
}
PLUGIN_EXPORT bool PLUGIN_CALL Load(void **ppPluginData)
{
core.reset(new Core);
pAMXFunctions = ppPluginData[PLUGIN_DATA_AMX_EXPORTS];
logprintf = (logprintf_t)ppPluginData[PLUGIN_DATA_LOGPRINTF];
logprintf("\n\n*** IRC Plugin v%s by Incognito loaded ***\n", PLUGIN_VERSION);
return true;
}
PLUGIN_EXPORT void PLUGIN_CALL Unload()
{
core.reset();
logprintf("\n\n*** IRC Plugin v%s by Incognito unloaded ***\n", PLUGIN_VERSION);
}
AMX_NATIVE_INFO natives[] =
{
{ "IRC_Connect", Natives::IRC_Connect },
{ "IRC_Quit", Natives::IRC_Quit },
{ "IRC_JoinChannel", Natives::IRC_JoinChannel },
{ "IRC_PartChannel", Natives::IRC_PartChannel },
{ "IRC_ChangeNick", Natives::IRC_ChangeNick },
{ "IRC_SetMode", Natives::IRC_SetMode },
{ "IRC_Say", Natives::IRC_Say },
{ "IRC_Notice", Natives::IRC_Notice },
{ "IRC_IsUserOnChannel", Natives::IRC_IsUserOnChannel },
{ "IRC_InviteUser", Natives::IRC_InviteUser },
{ "IRC_KickUser", Natives::IRC_KickUser },
{ "IRC_GetUserChannelMode", Natives::IRC_GetUserChannelMode },
{ "IRC_GetChannelUserList", Natives::IRC_GetChannelUserList },
{ "IRC_SetChannelTopic", Natives::IRC_SetChannelTopic },
{ "IRC_RequestCTCP", Natives::IRC_RequestCTCP },
{ "IRC_ReplyCTCP", Natives::IRC_ReplyCTCP },
{ "IRC_SendRaw", Natives::IRC_SendRaw },
{ "IRC_CreateGroup", Natives::IRC_CreateGroup },
{ "IRC_DestroyGroup", Natives::IRC_DestroyGroup },
{ "IRC_AddToGroup", Natives::IRC_AddToGroup },
{ "IRC_RemoveFromGroup", Natives::IRC_RemoveFromGroup },
{ "IRC_GroupSay", Natives::IRC_GroupSay },
{ "IRC_GroupNotice", Natives::IRC_GroupNotice },
{ "IRC_SetIntData", Natives::IRC_SetIntData },
{ 0, 0 }
};
PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx)
{
core->interfaces.insert(amx);
return amx_Register(amx, natives, -1);
}
PLUGIN_EXPORT int PLUGIN_CALL AmxUnload(AMX *amx)
{
core->interfaces.erase(amx);
return AMX_ERR_NONE;
}
PLUGIN_EXPORT void PLUGIN_CALL ProcessTick()
{
if (!core->messages.empty())
{
boost::mutex::scoped_lock lock(core->mutex);
Data::Message message(core->messages.front());
core->messages.pop();
lock.unlock();
for (std::set<AMX*>::iterator a = core->interfaces.begin(); a != core->interfaces.end(); ++a)
{
cell amxAddresses[5] = { 0 };
int amxIndex = 0;
switch (message.array.at(0))
{
case Data::OnConnect:
{
if (!amx_FindPublic(*a, "IRC_OnConnect", &amxIndex))
{
amx_Push(*a, message.array.at(1));
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_Push(*a, message.array.at(2));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
}
break;
}
case Data::OnDisconnect:
{
if (!amx_FindPublic(*a, "IRC_OnDisconnect", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_Push(*a, message.array.at(2));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
}
break;
}
case Data::OnConnectAttempt:
{
if (!amx_FindPublic(*a, "IRC_OnConnectAttempt", &amxIndex))
{
amx_Push(*a, message.array.at(1));
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_Push(*a, message.array.at(2));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
}
break;
}
case Data::OnConnectAttemptFail:
{
if (!amx_FindPublic(*a, "IRC_OnConnectAttemptFail", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_Push(*a, message.array.at(2));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
}
break;
}
case Data::OnJoinChannel:
{
if (!amx_FindPublic(*a, "IRC_OnJoinChannel", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
}
break;
}
case Data::OnLeaveChannel:
{
if (!amx_FindPublic(*a, "IRC_OnLeaveChannel", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
}
break;
}
case Data::OnInvitedToChannel:
{
if (!amx_FindPublic(*a, "IRC_OnInvitedToChannel", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
}
break;
}
case Data::OnKickedFromChannel:
{
if (!amx_FindPublic(*a, "IRC_OnKickedFromChannel", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[3], NULL, message.buffer.at(3).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
amx_Release(*a, amxAddresses[3]);
}
break;
}
case Data::OnUserDisconnect:
{
if (!amx_FindPublic(*a, "IRC_OnUserDisconnect", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
}
break;
}
case Data::OnUserJoinChannel:
{
if (!amx_FindPublic(*a, "IRC_OnUserJoinChannel", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
}
break;
}
case Data::OnUserLeaveChannel:
{
if (!amx_FindPublic(*a, "IRC_OnUserLeaveChannel", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[3], NULL, message.buffer.at(3).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
amx_Release(*a, amxAddresses[3]);
}
break;
}
case Data::OnUserKickedFromChannel:
{
if (!amx_FindPublic(*a, "IRC_OnUserKickedFromChannel", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[3], NULL, message.buffer.at(3).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[4], NULL, message.buffer.at(4).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
amx_Release(*a, amxAddresses[3]);
amx_Release(*a, amxAddresses[4]);
}
break;
}
case Data::OnUserNickChange:
{
if (!amx_FindPublic(*a, "IRC_OnUserNickChange", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
}
break;
}
case Data::OnUserSetChannelMode:
{
if (!amx_FindPublic(*a, "IRC_OnUserSetChannelMode", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[3], NULL, message.buffer.at(3).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
amx_Release(*a, amxAddresses[3]);
}
break;
}
case Data::OnUserSetChannelTopic:
{
if (!amx_FindPublic(*a, "IRC_OnUserSetChannelTopic", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[3], NULL, message.buffer.at(3).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
amx_Release(*a, amxAddresses[3]);
}
break;
}
case Data::OnUserSay:
{
if (!amx_FindPublic(*a, "IRC_OnUserSay", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[3], NULL, message.buffer.at(3).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
amx_Release(*a, amxAddresses[3]);
}
break;
}
case Data::OnUserNotice:
{
if (!amx_FindPublic(*a, "IRC_OnUserNotice", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[3], NULL, message.buffer.at(3).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
amx_Release(*a, amxAddresses[3]);
}
break;
}
case Data::OnUserRequestCTCP:
{
if (!amx_FindPublic(*a, "IRC_OnUserRequestCTCP", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
}
break;
}
case Data::OnUserReplyCTCP:
{
if (!amx_FindPublic(*a, "IRC_OnUserReplyCTCP", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[1], NULL, message.buffer.at(1).c_str(), 0, 0);
amx_PushString(*a, &amxAddresses[2], NULL, message.buffer.at(2).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
amx_Release(*a, amxAddresses[1]);
amx_Release(*a, amxAddresses[2]);
}
break;
}
case Data::OnReceiveNumeric:
{
if (!amx_FindPublic(*a, "IRC_OnReceiveNumeric", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Push(*a, message.array.at(2));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
}
break;
}
case Data::OnReceiveRaw:
{
if (!amx_FindPublic(*a, "IRC_OnReceiveRaw", &amxIndex))
{
amx_PushString(*a, &amxAddresses[0], NULL, message.buffer.at(0).c_str(), 0, 0);
amx_Push(*a, message.array.at(1));
amx_Exec(*a, NULL, amxIndex);
amx_Release(*a, amxAddresses[0]);
}
break;
}
}
}
}
}
|
SET autocommit=0;
START TRANSACTION;
--
-- Table structure for table `driver`
--
CREATE TABLE `driver` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT NOT NULL,
`created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`created_by` varchar(255) NOT NULL DEFAULT 'anonymous',
`last_modified_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`last_modified_by` varchar(255) NOT NULL DEFAULT 'anonymous',
`name` varchar(255) NOT NULL,
`alias` varchar(255) NOT NULL,
`jar` varchar(255) DEFAULT NULL,
`type` varchar(255) NOT NULL DEFAULT 'NOOP',
PRIMARY KEY (`id`),
UNIQUE KEY `UK_driver_name` (`name`),
UNIQUE KEY `UK_driver_alias` (`alias`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `connection`
--
CREATE TABLE `connection` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT NOT NULL,
`created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`created_by` varchar(255) NOT NULL DEFAULT 'anonymous',
`last_modified_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`last_modified_by` varchar(255) NOT NULL DEFAULT 'anonymous',
`name` varchar(255) NOT NULL,
`login` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`url` varchar(255) NOT NULL,
`driver_id` bigint(20) UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_connection_name` (`name`),
KEY `FK_connection_driver` (`driver_id`),
CONSTRAINT `FK_connection_driver` FOREIGN KEY (`driver_id`) REFERENCES `driver` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `project`
--
CREATE TABLE `project` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT NOT NULL,
`created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`created_by` varchar(255) NOT NULL DEFAULT 'anonymous',
`last_modified_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`last_modified_by` varchar(255) NOT NULL DEFAULT 'anonymous',
`name` varchar(255) NOT NULL,
`keystone_login` varchar(255) DEFAULT NULL,
`keystone_password` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_project_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `metric`
--
CREATE TABLE `metric` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT NOT NULL,
`created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`created_by` varchar(255) NOT NULL DEFAULT 'anonymous',
`last_modified_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`last_modified_by` varchar(255) NOT NULL DEFAULT 'anonymous',
`name` varchar(255) NOT NULL,
`query` varchar(255) NOT NULL,
`trigger_name` varchar(255) NOT NULL,
`connection_id` bigint(20) UNSIGNED NOT NULL,
`project_id` bigint(20) UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_metric_name` (`name`),
UNIQUE KEY `UK_metric_trigger` (`trigger_name`),
KEY `FK_metric_connection` (`connection_id`),
KEY `FK_metric_project` (`project_id`),
CONSTRAINT `FK_metric_connection` FOREIGN KEY (`connection_id`) REFERENCES `connection` (`id`),
CONSTRAINT `FK_metric_project` FOREIGN KEY (`project_id`) REFERENCES `project` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;
SET autocommit=1;
|
INSERT INTO `person` (`id`, `name`, `age`, `address`) VALUES ('1', 'wyf', '32', '合肥'); |
<?php
namespace EscolaLms\Youtube\Services;
use EscolaLms\Core\Models\User;
use EscolaLms\Youtube\Events\YtProblem;
use EscolaLms\Youtube\Exceptions\YtAuthenticateException;
use EscolaLms\Settings\Facades\AdministrableConfig;
use EscolaLms\Youtube\Dto\Contracts\YTLiveDtoContract;
use EscolaLms\Youtube\Dto\YTBroadcastDto;
use EscolaLms\Youtube\Services\Contracts\AuthenticateServiceContract;
use EscolaLms\Youtube\Services\Contracts\LiveStreamServiceContract;
use EscolaLms\Youtube\Services\Contracts\YoutubeServiceContract;
use Illuminate\Support\Collection;
class YoutubeService implements YoutubeServiceContract
{
private AuthenticateServiceContract $authenticateServiceContract;
private LiveStreamServiceContract $liveStreamServiceContract;
public function __construct(
AuthenticateServiceContract $authenticateServiceContract,
LiveStreamServiceContract $liveStreamServiceContract
) {
$this->authenticateServiceContract = $authenticateServiceContract;
$this->liveStreamServiceContract = $liveStreamServiceContract;
}
public function generateYTStream(YTBroadcastDto $YTBroadcastDto): ?YTLiveDtoContract
{
try {
$token = $this->authenticateServiceContract->refreshToken($this->getRefreshToken());
} catch (\Exception $exception) {
throw new YtAuthenticateException();
}
return $this->liveStreamServiceContract->broadcast($token, $YTBroadcastDto);
}
public function updateYTStream(YTBroadcastDto $YTBroadcastDto): ?YTLiveDtoContract
{
try {
$token = $this->authenticateServiceContract->refreshToken($this->getRefreshToken());
} catch (\Exception $exception) {
throw new YtAuthenticateException();
}
return $this->liveStreamServiceContract->updateBroadcast($token, $YTBroadcastDto);
}
public function removeYTStream(YTBroadcastDto $YTBroadcastDto): bool
{
try {
$token = $this->authenticateServiceContract->refreshToken($this->getRefreshToken());
} catch (\Exception $exception) {
throw new YtAuthenticateException();
}
return $this->liveStreamServiceContract->deleteEvent($token, $YTBroadcastDto);
}
public function setRefreshToken(string $code): void
{
$token = $this->authenticateServiceContract->getToken($code);
if (isset($token['refresh_token'])) {
AdministrableConfig::setConfig([
'services.youtube.refresh_token' => $token['refresh_token'],
]);
AdministrableConfig::storeConfig();
}
}
/**
* @param YTBroadcastDto $YTBroadcastDto
* @param string $broadcastStatus "testing" | "live" | "complete"
* @return mixed
*/
public function setStatusInLiveStream(YTBroadcastDto $YTBroadcastDto, string $broadcastStatus)
{
try {
$token = $this->authenticateServiceContract->refreshToken($this->getRefreshToken());
} catch (\Exception $exception) {
throw new YtAuthenticateException();
}
return $this->liveStreamServiceContract->transitionEvent($token, $YTBroadcastDto, $broadcastStatus);
}
public function getYtLiveStream(YTBroadcastDto $YTBroadcastDto): Collection
{
try {
$token = $this->authenticateServiceContract->refreshToken($this->getRefreshToken());
} catch (\Exception $exception) {
throw new YtAuthenticateException();
}
return $this->liveStreamServiceContract->getListLiveStream($token, $YTBroadcastDto);
}
public function generateYTAuthUrl(string $email): string
{
AdministrableConfig::setConfig([
'services.youtube.email' => $email,
]);
AdministrableConfig::storeConfig();
return $this->authenticateServiceContract->getLoginUrl($email);
}
public function dispatchYtError(): void
{
$serviceYtMail = config('services.youtube.email');
if (!is_null($serviceYtMail)) {
$user = new User([
'email' => config('services.youtube.email')
]);
event(new YtProblem($user));
}
}
private function getRefreshToken(): string
{
$refreshToken = config('services.youtube.refresh_token');
if (!$refreshToken) {
throw new YtAuthenticateException();
}
return $refreshToken;
}
}
|
# test various page configuration
@testset "configurations" begin
root = joinpath("assets", "configurations")
@testset "notebook" begin
src_page_dir = joinpath(root, "without_notebook")
page = DemoPage(src_page_dir)
sec1 = page.sections[1]
@test sec1.title == "Sec1"
@test sec1.properties["notebook"] == "true"
sec2 = page.sections[2]
@test sec2.title == "Sec2"
@test isempty(sec2.properties)
@test isnothing(sec1.cards[1].notebook) # This might become `true` in the future
@test sec1.cards[2].notebook == false
page_dir = @suppress_err preview_demos(src_page_dir, require_html=false)
if basename(page_dir) == "without_notebook"
sec1_files = readdir(joinpath(page_dir, "sec1"))
@test Set(filter(x->startswith(x, "demo1"), sec1_files)) == Set(["demo1.ipynb", "demo1.jl", "demo1.md"])
@test Set(filter(x->startswith(x, "demo2"), sec1_files)) == Set(["demo2.jl", "demo2.md"])
@test filter(x->startswith(x, "demo3"), sec1_files) == ["demo3.md"]
sec2_files = readdir(joinpath(page_dir, "sec2"))
@test Set(filter(x->startswith(x, "demo4"), sec2_files)) == Set(["demo4.jl", "demo4.md"])
@test Set(filter(x->startswith(x, "demo5"), sec2_files)) == Set(["demo5.ipynb", "demo5.jl", "demo5.md"])
else
@warn "Inferred page dir for $src_page_dir is no longer \"without_notebook/\""
@test_broken false
end
end
@testset "stylesheet" begin
src_page_dir = joinpath(root, "stylesheet")
page = DemoPage(src_page_dir)
@test page.stylesheet == abspath(src_page_dir, "assets", "emptystyle.css")
html_file = @suppress_err preview_demos(src_page_dir, require_html=true)
@test occursin("emptystyle.css", read(html_file, String))
@test "emptystyle.css" in readdir(joinpath(dirname(html_file), "stylesheet", "assets"))
end
end
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.afrunt.jach.domain;
import com.afrunt.jach.annotation.ACHField;
import com.afrunt.jach.annotation.ACHRecordType;
import com.afrunt.jach.annotation.DateFormat;
import com.afrunt.jach.annotation.Values;
import java.util.Date;
import static com.afrunt.jach.annotation.InclusionRequirement.*;
import static com.afrunt.jach.domain.RecordTypes.Constants.FILE_HEADER_RECORD_TYPE_CODE;
/**
* The File Header Record designates physical file characteristics. It also identifies the Bank as the immediate
* destination and your company as the immediate origin of the file.
*
* @author Andrii Frunt
*/
@SuppressWarnings({"WeakerAccess", "JavaDoc", "SameReturnValue"})
@ACHRecordType(name = "File Header Record")
public class FileHeader extends ACHRecord {
public static final String PRIORITY_CODE = "Priority Code";
public static final String IMMEDIATE_DESTINATION = "Immediate Destination";
public static final String IMMEDIATE_ORIGIN = "Immediate Origin";
public static final String FILE_CREATION_DATE = "File Creation Date";
public static final String FILE_CREATION_TIME = "File Creation Time";
public static final String FILE_ID_MODIFIER = "File ID Modifier";
public static final String RECORD_SIZE = "Record Size";
public static final String BLOCKING_FACTOR = "Blocking Factor";
public static final String FORMAT_CODE = "Format Code";
public static final String IMMEDIATE_DESTINATION_NAME = "Immediate Destination Name";
public static final String IMMEDIATE_ORIGIN_NAME = "Immediate Origin Name";
public static final String REFERENCE_CODE = "Reference Code";
private String priorityCode;
private String immediateDestination;
private String immediateOrigin;
private Date fileCreationDate;
private String fileCreationTime;
private String fileIdModifier;
private String blockingFactor;
private String formatCode;
private String immediateDestinationName;
private String immediateOriginName;
private String referenceCode;
@Override
@Values(FILE_HEADER_RECORD_TYPE_CODE)
public String getRecordTypeCode() {
return FILE_HEADER_RECORD_TYPE_CODE;
}
/**
* Priority codes are not used at this time; this field must contain 01
*
* @return 01
*/
@ACHField(start = 1, length = 2, name = PRIORITY_CODE, inclusion = REQUIRED, values = "01")
public String getPriorityCode() {
return priorityCode;
}
public FileHeader setPriorityCode(String priorityCode) {
this.priorityCode = priorityCode;
return this;
}
@ACHField(start = 3, length = 10, name = IMMEDIATE_DESTINATION, inclusion = MANDATORY)
public String getImmediateDestination() {
return immediateDestination;
}
public FileHeader setImmediateDestination(String immediateDestination) {
this.immediateDestination = immediateDestination;
return this;
}
@ACHField(start = 13, length = 10, name = IMMEDIATE_ORIGIN, inclusion = MANDATORY)
public String getImmediateOrigin() {
return immediateOrigin;
}
public FileHeader setImmediateOrigin(String immediateOrigin) {
this.immediateOrigin = immediateOrigin;
return this;
}
/**
* The date you create or transmit the input file:
* <p>
* “YY” = Last two digits of the Year
* “MM” = Month in two digits
* “DD” = Day in two digits
*
* @return
*/
@ACHField(start = 23, length = 6, name = FILE_CREATION_DATE, inclusion = MANDATORY)
@DateFormat("yyMMdd")
public Date getFileCreationDate() {
return fileCreationDate;
}
public FileHeader setFileCreationDate(Date fileCreationDate) {
this.fileCreationDate = fileCreationDate;
return this;
}
/**
* Time of day you create or transmit the input file. This field is used to distinguish among input files if you
* submit more than one per day:
* <p>
* “HH = Hour based on a 24 hr clock
* “MM” = Minutes in two digits
*
* @return
*/
@ACHField(start = 29, length = 4, name = FILE_CREATION_TIME)
public String getFileCreationTime() {
return fileCreationTime;
}
public FileHeader setFileCreationTime(String fileCreationTime) {
this.fileCreationTime = fileCreationTime;
return this;
}
/**
* Code to distinguish among multiple input files sent per day. Label the first (or only) file “A” (or “0”) and
* continue in sequence.
*
* @return
*/
@ACHField(start = 33, length = 1, name = FILE_ID_MODIFIER, inclusion = MANDATORY)
public String getFileIdModifier() {
return fileIdModifier;
}
public FileHeader setFileIdModifier(String fileIdModifier) {
this.fileIdModifier = fileIdModifier;
return this;
}
/**
* This field indicates the number of characters contained in each record. The value 094 is used
*
* @return the number of characters contained in each record
*/
@ACHField(start = 34, length = 3, name = RECORD_SIZE, inclusion = MANDATORY, values = "094")
public String getRecordSize() {
return "094";
}
@ACHField(start = 37, length = 2, name = BLOCKING_FACTOR, inclusion = MANDATORY, values = "10")
public String getBlockingFactor() {
return blockingFactor;
}
public FileHeader setBlockingFactor(String blockingFactor) {
this.blockingFactor = blockingFactor;
return this;
}
@ACHField(start = 39, length = 1, values = "1", inclusion = MANDATORY, name = FORMAT_CODE)
public String getFormatCode() {
return formatCode;
}
public FileHeader setFormatCode(String formatCode) {
this.formatCode = formatCode;
return this;
}
@ACHField(start = 40, length = 23, name = IMMEDIATE_DESTINATION_NAME, inclusion = OPTIONAL)
public String getImmediateDestinationName() {
return immediateDestinationName;
}
public FileHeader setImmediateDestinationName(String immediateDestinationName) {
this.immediateDestinationName = immediateDestinationName;
return this;
}
/**
* Your company's name, up to 23 characters including spaces.
*
* @return
*/
@ACHField(start = 63, length = 23, name = IMMEDIATE_ORIGIN_NAME, inclusion = OPTIONAL)
public String getImmediateOriginName() {
return immediateOriginName;
}
public FileHeader setImmediateOriginName(String immediateOriginName) {
this.immediateOriginName = immediateOriginName;
return this;
}
/**
* You may use this field to describe the input file for internal accounting purposes or fill with spaces.
*
* @return
*/
@ACHField(start = 86, length = 8, name = REFERENCE_CODE, inclusion = OPTIONAL)
public String getReferenceCode() {
return referenceCode;
}
public FileHeader setReferenceCode(String referenceCode) {
this.referenceCode = referenceCode;
return this;
}
}
|
# encoding: ascii-8bit
# frozen_string_literal: true
require 'spec_helper'
describe 'Bitcoin::Protocol::Parser (addr)' do
# Mock protocl handler
class AddrHandler < Bitcoin::Protocol::Handler
attr_reader :addr, :err, :pkt
def on_addr(addr)
(@addr ||= []) << addr
end
def on_error(*err)
(@err ||= []) << err
end
end
it 'parses address packet' do
pkt = [
'f9 be b4 d9 61 64 64 72 00 00 00 00 00 00 00 00 1f 00 00 00 e8 b4 c9 ' \
'ba 01 2b dd d7 4d 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ' \
'00 ff ff 52 53 de 04 20 8d'.split(' ').join
].pack('H*')
handler = AddrHandler.new
parser = Bitcoin::Protocol::Parser.new(handler)
expect(parser.parse(pkt + 'AAAA')).to eq('AAAA')
expect(handler.addr.size).to eq(1)
expect(handler.addr.first.alive?).to be false
expect(handler.addr.map(&:values)).to eq(
[[1_305_992_491, 1, '82.83.222.4', 8_333]]
)
end
it 'parses broken address packet' do
pkt = ['01 00 00 00 00'.split(' ').join].pack('H*')
handler = AddrHandler.new
parser = Bitcoin::Protocol::Parser.new(handler)
expect(parser.parse_addr(pkt)).to be_nil
expect(handler.addr).to be_nil
expect(handler.err).to eq([[:addr, pkt[1..-1]]])
end
end
describe Bitcoin::Protocol::Addr do
let(:pkt) do
[
'2b dd d7 4d 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ' \
'ff 52 53 de 04 20 8d'.split(' ').join
].pack('H*')
end
it 'parse addr payload' do
addr = Bitcoin::Protocol::Addr.new(pkt)
expect(addr.values).to eq([1_305_992_491, 1, '82.83.222.4', 8_333])
end
it 'initalize time, service and port' do
Time.freeze do
addr = Bitcoin::Protocol::Addr.new(nil)
expect(addr[:time]).to eq(Time.now.to_i)
expect(addr[:service]).to eq(1)
expect(addr[:port]).to eq(Bitcoin.network[:default_port])
expect(addr[:ip]).to eq('127.0.0.1')
end
end
it 'addr payload' do
addr = Bitcoin::Protocol::Addr.new
addr[:time] = 1_305_992_491
addr[:service] = 1
addr[:ip] = '82.83.222.4'
addr[:port] = 8_333
expect(addr.to_payload).to eq(pkt)
expect(addr.to_payload.bytesize).to eq(30)
end
it 'pack addr packet' do
addr = Bitcoin::Protocol::Addr.new
addr[:time] = 1_305_992_491
addr[:service] = 1
addr[:ip] = '82.83.222.4'
addr[:port] = 8_333
expect(Bitcoin::Protocol::Addr.pkt(addr))
.to eq(Bitcoin::Protocol.pkt('addr', "\x01" + addr.to_payload))
end
end
|
describe('App', () => {
beforeEach(() => {
cy.visit('http://localhost:3000');
});
it('Checks the title is correct', () => {
cy.title().should('include', 'JamDodger');
});
});
|
---
layout: tag-blog
title: Data Structure
slug: datastructure
category: devlog
menu: false
order: 2
header-img: "img/datastructure.png"
---
|
/**
* Tests that are applied when grouping files in {@code
* org.anchoranalysis.plugin.io.bean.file.group}
*/
package org.anchoranalysis.plugin.io.bean.file.group.check;
|
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
/* ======================================================================= */
/* This file contain the DBCS to UniCode tables for the following */
/* japanese charsets: SJIS, MS932, APPLE_JAPANESE */
/* ======================================================================= */
/* Changes: */
/* 81_50: SJIS == 0xFFE3, MS932 == 0xFFE3, APPLE_JAPANESE == 0x0203 - we use in all systems 0xFFE3 for better MS compatibility */
/* 81_5C: SJIS == 0x2015, MS932 == 0x2015, APPLE_JAPANESE == 0x2014 - we use in all systems 0x2015 for better MS compatibility */
/* 81_5F: SJIS == 0x005C, MS932 == 0xFF3C, APPLE_JAPANESE == 0xFF3C - we use in all systems 0xFF3C for better MS compatibility */
/* 81_60: SJIS == 0x301C, MS932 == 0xFF5E, APPLE_JAPANESE == 0x301C - we use in all systems 0xFF5E for better MS compatibility */
/* 81_61: SJIS == 0x2016, MS932 == 0x2225, APPLE_JAPANESE == 0x2016 - we use in all systems 0x2225 for better MS compatibility */
/* 81_63: SJIS == 0x2026, MS932 == 0x2026, APPLE_JAPANESE == 0x22EF - we use in all systems 0x2026 for better MS compatibility */
/* 81_7C: SJIS == 0x2212, MS932 == 0xFF0D, APPLE_JAPANESE == 0x2212 - we use in all systems 0xFF0D for better MS compatibility */
/* 81_91: SJIS == 0x00A2, MS932 == 0xFFE0, APPLE_JAPANESE == 0x00A2 - we use in all systems 0xFFE0 for better MS compatibility */
/* 81_92: SJIS == 0x00A3, MS932 == 0xFFE1, APPLE_JAPANESE == 0x00A3 - we use in all systems 0xFFE1 for better MS compatibility */
/* 81_CA: SJIS == 0x00AC, MS932 == 0xFFE2, APPLE_JAPANESE == 0x00AC - we use in all systems 0xFFE1 for better MS compatibility */
static sal_uInt16 const aImplDBCSToUniTab_MS932_81[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x3000, 0x3001, 0x3002, 0xFF0C, 0xFF0E, 0x30FB, 0xFF1A, 0xFF1B, /* 0x40 */
0xFF1F, 0xFF01, 0x309B, 0x309C, 0x00B4, 0xFF40, 0x00A8, 0xFF3E, /* 0x40 */
0xFFE3, 0xFF3F, 0x30FD, 0x30FE, 0x309D, 0x309E, 0x3003, 0x4EDD, /* 0x50 */
0x3005, 0x3006, 0x3007, 0x30FC, 0x2015, 0x2010, 0xFF0F, 0xFF3C, /* 0x50 */
0xFF5E, 0x2225, 0xFF5C, 0x2026, 0x2025, 0x2018, 0x2019, 0x201C, /* 0x60 */
0x201D, 0xFF08, 0xFF09, 0x3014, 0x3015, 0xFF3B, 0xFF3D, 0xFF5B, /* 0x60 */
0xFF5D, 0x3008, 0x3009, 0x300A, 0x300B, 0x300C, 0x300D, 0x300E, /* 0x70 */
0x300F, 0x3010, 0x3011, 0xFF0B, 0xFF0D, 0x00B1, 0x00D7, 0, /* 0x70 */
0x00F7, 0xFF1D, 0x2260, 0xFF1C, 0xFF1E, 0x2266, 0x2267, 0x221E, /* 0x80 */
0x2234, 0x2642, 0x2640, 0x00B0, 0x2032, 0x2033, 0x2103, 0xFFE5, /* 0x80 */
0xFF04, 0xFFE0, 0xFFE1, 0xFF05, 0xFF03, 0xFF06, 0xFF0A, 0xFF20, /* 0x90 */
0x00A7, 0x2606, 0x2605, 0x25CB, 0x25CF, 0x25CE, 0x25C7, 0x25C6, /* 0x90 */
0x25A1, 0x25A0, 0x25B3, 0x25B2, 0x25BD, 0x25BC, 0x203B, 0x3012, /* 0xA0 */
0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0, 0, 0, /* 0xA0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xB0 */
0x2208, 0x220B, 0x2286, 0x2287, 0x2282, 0x2283, 0x222A, 0x2229, /* 0xB0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xC0 */
0x2227, 0x2228, 0xFFE2, 0x21D2, 0x21D4, 0x2200, 0x2203, 0, /* 0xC0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 */
0, 0, 0x2220, 0x22A5, 0x2312, 0x2202, 0x2207, 0x2261, /* 0xD0 */
0x2252, 0x226A, 0x226B, 0x221A, 0x223D, 0x221D, 0x2235, 0x222B, /* 0xE0 */
0x222C, 0, 0, 0, 0, 0, 0, 0, /* 0xE0 */
0x212B, 0x2030, 0x266F, 0x266D, 0x266A, 0x2020, 0x2021, 0x00B6, /* 0xF0 */
0, 0, 0, 0, 0x25EF /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_82[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
/* 0x40 */
0xFF10, /* 0x40 */
0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17, 0xFF18, /* 0x50 */
0xFF19, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */
0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, /* 0x60 */
0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, /* 0x60 */
0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, /* 0x70 */
0xFF39, 0xFF3A, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47, /* 0x80 */
0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F, /* 0x80 */
0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57, /* 0x90 */
0xFF58, 0xFF59, 0xFF5A, 0, 0, 0, 0, 0x3041, /* 0x90 */
0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048, 0x3049, /* 0xA0 */
0x304A, 0x304B, 0x304C, 0x304D, 0x304E, 0x304F, 0x3050, 0x3051, /* 0xA0 */
0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058, 0x3059, /* 0xB0 */
0x305A, 0x305B, 0x305C, 0x305D, 0x305E, 0x305F, 0x3060, 0x3061, /* 0xB0 */
0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068, 0x3069, /* 0xC0 */
0x306A, 0x306B, 0x306C, 0x306D, 0x306E, 0x306F, 0x3070, 0x3071, /* 0xC0 */
0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078, 0x3079, /* 0xD0 */
0x307A, 0x307B, 0x307C, 0x307D, 0x307E, 0x307F, 0x3080, 0x3081, /* 0xD0 */
0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088, 0x3089, /* 0xE0 */
0x308A, 0x308B, 0x308C, 0x308D, 0x308E, 0x308F, 0x3090, 0x3091, /* 0xE0 */
0x3092, 0x3093 /* 0xF0 */
/* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_83[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x30A1, 0x30A2, 0x30A3, 0x30A4, 0x30A5, 0x30A6, 0x30A7, 0x30A8, /* 0x40 */
0x30A9, 0x30AA, 0x30AB, 0x30AC, 0x30AD, 0x30AE, 0x30AF, 0x30B0, /* 0x40 */
0x30B1, 0x30B2, 0x30B3, 0x30B4, 0x30B5, 0x30B6, 0x30B7, 0x30B8, /* 0x50 */
0x30B9, 0x30BA, 0x30BB, 0x30BC, 0x30BD, 0x30BE, 0x30BF, 0x30C0, /* 0x50 */
0x30C1, 0x30C2, 0x30C3, 0x30C4, 0x30C5, 0x30C6, 0x30C7, 0x30C8, /* 0x60 */
0x30C9, 0x30CA, 0x30CB, 0x30CC, 0x30CD, 0x30CE, 0x30CF, 0x30D0, /* 0x60 */
0x30D1, 0x30D2, 0x30D3, 0x30D4, 0x30D5, 0x30D6, 0x30D7, 0x30D8, /* 0x70 */
0x30D9, 0x30DA, 0x30DB, 0x30DC, 0x30DD, 0x30DE, 0x30DF, 0, /* 0x70 */
0x30E0, 0x30E1, 0x30E2, 0x30E3, 0x30E4, 0x30E5, 0x30E6, 0x30E7, /* 0x80 */
0x30E8, 0x30E9, 0x30EA, 0x30EB, 0x30EC, 0x30ED, 0x30EE, 0x30EF, /* 0x80 */
0x30F0, 0x30F1, 0x30F2, 0x30F3, 0x30F4, 0x30F5, 0x30F6, 0, /* 0x90 */
0, 0, 0, 0, 0, 0, 0, 0x0391, /* 0x90 */
0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, /* 0xA0 */
0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x03A1, /* 0xA0 */
0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0, /* 0xB0 */
0, 0, 0, 0, 0, 0, 0, 0x03B1, /* 0xB0 */
0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, /* 0xC0 */
0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03C1, /* 0xC0 */
0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9 /* 0xD0 */
/* 0xD0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_84[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416, /* 0x40 */
0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, /* 0x40 */
0x041F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, /* 0x50 */
0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, /* 0x50 */
0x042F, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436, /* 0x70 */
0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0, /* 0x70 */
0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, /* 0x80 */
0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, /* 0x80 */
0x044E, 0x044F, 0, 0, 0, 0, 0, 0, /* 0x90 */
0, 0, 0, 0, 0, 0, 0, 0x2500, /* 0x90 */
0x2502, 0x250C, 0x2510, 0x2518, 0x2514, 0x251C, 0x252C, 0x2524, /* 0xA0 */
0x2534, 0x253C, 0x2501, 0x2503, 0x250F, 0x2513, 0x251B, 0x2517, /* 0xA0 */
0x2523, 0x2533, 0x252B, 0x253B, 0x254B, 0x2520, 0x252F, 0x2528, /* 0xB0 */
0x2537, 0x253F, 0x251D, 0x2530, 0x2525, 0x2538, 0x2542 /* 0xB0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_APPLEJAPANESE_85[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, /* 0x40 */
0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, 0x246F, /* 0x40 */
0x2470, 0x2471, 0x2472, 0x2473, 0, 0, 0, 0, /* 0x50 */
0, 0, 0, 0, 0, 0, 0x2474, 0x2475, /* 0x50 */
0x2476, 0x2477, 0x2478, 0x2479, 0x247A, 0x247B, 0x247C, 0x247D, /* 0x60 */
0x247E, 0x247F, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, /* 0x60 */
0x2486, 0x2487, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0x2776, 0x2777, 0x2778, 0, /* 0x70 */
0x2779, 0x277A, 0x277B, 0x277C, 0x277D, 0x277E, 0, 0, /* 0x80 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0x2488, 0x2489, 0x248A, 0x248B, 0x248C, 0x248D, /* 0x90 */
0x248E, 0x248F, 0x2490, 0, 0, 0, 0, 0x2160, /* 0x90 */
0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, /* 0xA0 */
0x2169, 0x216A, 0x216B, 0, 0, 0, 0, 0, /* 0xA0 */
0, 0, 0, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, /* 0xB0 */
0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A, 0x217B, 0, /* 0xB0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xC0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xC0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 */
0, 0, 0, 0x249C, 0x249D, 0x249E, 0x249F, 0x24A0, /* 0xD0 */
0x24A1, 0x24A2, 0x24A3, 0x24A4, 0x24A5, 0x24A6, 0x24A7, 0x24A8, /* 0xE0 */
0x24A9, 0x24AA, 0x24AB, 0x24AC, 0x24AD, 0x24AE, 0x24AF, 0x24B0, /* 0xE0 */
0x24B1, 0x24B2, 0x24B3, 0x24B4, 0x24B5 /* 0xF0 */
/* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_APPLEJAPANESE_86[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x339C, 0x339F, 0x339D, 0x33A0, 0x33A4, 0, 0x33A1, 0x33A5, /* 0x40 */
0x339E, 0x33A2, 0x338E, 0, 0x338F, 0x33C4, 0x3396, 0x3397, /* 0x40 */
0x2113, 0x3398, 0x33B3, 0x33B2, 0x33B1, 0x33B0, 0x2109, 0x33D4, /* 0x50 */
0x33CB, 0x3390, 0x3385, 0x3386, 0x3387, 0, 0, 0, /* 0x50 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */
0, 0, 0, 0x2116, 0x33CD, 0x2121, 0, 0x2664, /* 0x90 */
0x2667, 0x2661, 0x2662, 0x2660, 0x2663, 0x2665, 0x2666, 0, /* 0xA0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xA0 */
0, 0, 0, 0x3020, 0x260E, 0x3004, 0, 0, /* 0xB0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xB0 */
0, 0, 0, 0, 0, 0, 0, 0x261E, /* 0xC0 */
0x261C, 0x261D, 0x261F, 0x21C6, 0x21C4, 0x21C5, 0, 0x21E8, /* 0xC0 */
0x21E6, 0x21E7, 0x21E9 /* 0xD0 */
/* 0xD0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_MS932_87[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, /* 0x40 */
0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, 0x246F, /* 0x40 */
0x2470, 0x2471, 0x2472, 0x2473, 0x2160, 0x2161, 0x2162, 0x2163, /* 0x50 */
0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0, 0x3349, /* 0x50 */
0x3314, 0x3322, 0x334D, 0x3318, 0x3327, 0x3303, 0x3336, 0x3351, /* 0x60 */
0x3357, 0x330D, 0x3326, 0x3323, 0x332B, 0x334A, 0x333B, 0x339C, /* 0x60 */
0x339D, 0x339E, 0x338E, 0x338F, 0x33C4, 0x33A1, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0x337B, 0, /* 0x70 */
0x301D, 0x301F, 0x2116, 0x33CD, 0x2121, 0x32A4, 0x32A5, 0x32A6, /* 0x80 */
0x32A7, 0x32A8, 0x3231, 0x3232, 0x3239, 0x337E, 0x337D, 0x337C, /* 0x80 */
0x2252, 0x2261, 0x222B, 0x222E, 0x2211, 0x221A, 0x22A5, 0x2220, /* 0x90 */
0x221F, 0x22BF, 0x2235, 0x2229, 0x222A /* 0x90 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_APPLEJAPANESE_87[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x3230, 0x322A, 0x322B, 0x322C, 0x322D, 0x322E, 0x322F, 0x3240, /* 0x40 */
0x3237, 0x3242, 0x3243, 0x3239, 0x323A, 0x3231, 0x323E, 0x3234, /* 0x40 */
0x3232, 0x323B, 0x3236, 0x3233, 0x3235, 0x323C, 0x323D, 0x323F, /* 0x50 */
0x3238, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0, 0x32A4, 0x32A5, 0x32A6, 0x32A7, 0x32A8, /* 0x90 */
0x32A9, 0x3296, 0x329D, 0x3298, 0x329E, 0, 0x3299, 0x3349, /* 0x90 */
0x3322, 0x334D, 0x3314, 0x3316, 0x3305, 0x3333, 0x334E, 0x3303, /* 0xA0 */
0x3336, 0x3318, 0x3315, 0x3327, 0x3351, 0x334A, 0x3339, 0x3357, /* 0xA0 */
0x330D, 0x3342, 0x3323, 0x3326, 0x333B, 0x332B, 0, 0, /* 0xB0 */
0, 0, 0, 0, 0, 0x3300, 0x331E, 0x332A, /* 0xB0 */
0x3331, 0x3347, 0, 0, 0, 0, 0, 0, /* 0xC0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xC0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 */
0, 0, 0, 0, 0, 0x337E, 0x337D, 0x337C, /* 0xE0 */
0x337B, 0, 0, 0, 0, 0, 0, 0, /* 0xE0 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xF0 */
0, 0, 0x337F /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_88[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
/* 0x90 */
0x4E9C, /* 0x90 */
0x5516, 0x5A03, 0x963F, 0x54C0, 0x611B, 0x6328, 0x59F6, 0x9022, /* 0xA0 */
0x8475, 0x831C, 0x7A50, 0x60AA, 0x63E1, 0x6E25, 0x65ED, 0x8466, /* 0xA0 */
0x82A6, 0x9BF5, 0x6893, 0x5727, 0x65A1, 0x6271, 0x5B9B, 0x59D0, /* 0xB0 */
0x867B, 0x98F4, 0x7D62, 0x7DBE, 0x9B8E, 0x6216, 0x7C9F, 0x88B7, /* 0xB0 */
0x5B89, 0x5EB5, 0x6309, 0x6697, 0x6848, 0x95C7, 0x978D, 0x674F, /* 0xC0 */
0x4EE5, 0x4F0A, 0x4F4D, 0x4F9D, 0x5049, 0x56F2, 0x5937, 0x59D4, /* 0xC0 */
0x5A01, 0x5C09, 0x60DF, 0x610F, 0x6170, 0x6613, 0x6905, 0x70BA, /* 0xD0 */
0x754F, 0x7570, 0x79FB, 0x7DAD, 0x7DEF, 0x80C3, 0x840E, 0x8863, /* 0xD0 */
0x8B02, 0x9055, 0x907A, 0x533B, 0x4E95, 0x4EA5, 0x57DF, 0x80B2, /* 0xE0 */
0x90C1, 0x78EF, 0x4E00, 0x58F1, 0x6EA2, 0x9038, 0x7A32, 0x8328, /* 0xE0 */
0x828B, 0x9C2F, 0x5141, 0x5370, 0x54BD, 0x54E1, 0x56E0, 0x59FB, /* 0xF0 */
0x5F15, 0x98F2, 0x6DEB, 0x80E4, 0x852D /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_APPLEJAPANESE_88[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x222E, 0x221F, 0x22BF, 0, 0, 0, 0, 0, /* 0x40 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */
0, 0, 0, 0, 0x301D, 0x301F, 0, 0, /* 0x50 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
0x3094, 0, 0x30F7, 0x30F8, 0x30F9, 0x30FA, 0, 0, /* 0x60 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */
0, 0, 0, 0, 0, 0, 0, 0x4E9C, /* 0x90 */
0x5516, 0x5A03, 0x963F, 0x54C0, 0x611B, 0x6328, 0x59F6, 0x9022, /* 0xA0 */
0x8475, 0x831C, 0x7A50, 0x60AA, 0x63E1, 0x6E25, 0x65ED, 0x8466, /* 0xA0 */
0x82A6, 0x9BF5, 0x6893, 0x5727, 0x65A1, 0x6271, 0x5B9B, 0x59D0, /* 0xB0 */
0x867B, 0x98F4, 0x7D62, 0x7DBE, 0x9B8E, 0x6216, 0x7C9F, 0x88B7, /* 0xB0 */
0x5B89, 0x5EB5, 0x6309, 0x6697, 0x6848, 0x95C7, 0x978D, 0x674F, /* 0xC0 */
0x4EE5, 0x4F0A, 0x4F4D, 0x4F9D, 0x5049, 0x56F2, 0x5937, 0x59D4, /* 0xC0 */
0x5A01, 0x5C09, 0x60DF, 0x610F, 0x6170, 0x6613, 0x6905, 0x70BA, /* 0xD0 */
0x754F, 0x7570, 0x79FB, 0x7DAD, 0x7DEF, 0x80C3, 0x840E, 0x8863, /* 0xD0 */
0x8B02, 0x9055, 0x907A, 0x533B, 0x4E95, 0x4EA5, 0x57DF, 0x80B2, /* 0xE0 */
0x90C1, 0x78EF, 0x4E00, 0x58F1, 0x6EA2, 0x9038, 0x7A32, 0x8328, /* 0xE0 */
0x828B, 0x9C2F, 0x5141, 0x5370, 0x54BD, 0x54E1, 0x56E0, 0x59FB, /* 0xF0 */
0x5F15, 0x98F2, 0x6DEB, 0x80E4, 0x852D /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_89[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x9662, 0x9670, 0x96A0, 0x97FB, 0x540B, 0x53F3, 0x5B87, 0x70CF, /* 0x40 */
0x7FBD, 0x8FC2, 0x96E8, 0x536F, 0x9D5C, 0x7ABA, 0x4E11, 0x7893, /* 0x40 */
0x81FC, 0x6E26, 0x5618, 0x5504, 0x6B1D, 0x851A, 0x9C3B, 0x59E5, /* 0x50 */
0x53A9, 0x6D66, 0x74DC, 0x958F, 0x5642, 0x4E91, 0x904B, 0x96F2, /* 0x50 */
0x834F, 0x990C, 0x53E1, 0x55B6, 0x5B30, 0x5F71, 0x6620, 0x66F3, /* 0x60 */
0x6804, 0x6C38, 0x6CF3, 0x6D29, 0x745B, 0x76C8, 0x7A4E, 0x9834, /* 0x60 */
0x82F1, 0x885B, 0x8A60, 0x92ED, 0x6DB2, 0x75AB, 0x76CA, 0x99C5, /* 0x70 */
0x60A6, 0x8B01, 0x8D8A, 0x95B2, 0x698E, 0x53AD, 0x5186, 0, /* 0x70 */
0x5712, 0x5830, 0x5944, 0x5BB4, 0x5EF6, 0x6028, 0x63A9, 0x63F4, /* 0x80 */
0x6CBF, 0x6F14, 0x708E, 0x7114, 0x7159, 0x71D5, 0x733F, 0x7E01, /* 0x80 */
0x8276, 0x82D1, 0x8597, 0x9060, 0x925B, 0x9D1B, 0x5869, 0x65BC, /* 0x90 */
0x6C5A, 0x7525, 0x51F9, 0x592E, 0x5965, 0x5F80, 0x5FDC, 0x62BC, /* 0x90 */
0x65FA, 0x6A2A, 0x6B27, 0x6BB4, 0x738B, 0x7FC1, 0x8956, 0x9D2C, /* 0xA0 */
0x9D0E, 0x9EC4, 0x5CA1, 0x6C96, 0x837B, 0x5104, 0x5C4B, 0x61B6, /* 0xA0 */
0x81C6, 0x6876, 0x7261, 0x4E59, 0x4FFA, 0x5378, 0x6069, 0x6E29, /* 0xB0 */
0x7A4F, 0x97F3, 0x4E0B, 0x5316, 0x4EEE, 0x4F55, 0x4F3D, 0x4FA1, /* 0xB0 */
0x4F73, 0x52A0, 0x53EF, 0x5609, 0x590F, 0x5AC1, 0x5BB6, 0x5BE1, /* 0xC0 */
0x79D1, 0x6687, 0x679C, 0x67B6, 0x6B4C, 0x6CB3, 0x706B, 0x73C2, /* 0xC0 */
0x798D, 0x79BE, 0x7A3C, 0x7B87, 0x82B1, 0x82DB, 0x8304, 0x8377, /* 0xD0 */
0x83EF, 0x83D3, 0x8766, 0x8AB2, 0x5629, 0x8CA8, 0x8FE6, 0x904E, /* 0xD0 */
0x971E, 0x868A, 0x4FC4, 0x5CE8, 0x6211, 0x7259, 0x753B, 0x81E5, /* 0xE0 */
0x82BD, 0x86FE, 0x8CC0, 0x96C5, 0x9913, 0x99D5, 0x4ECB, 0x4F1A, /* 0xE0 */
0x89E3, 0x56DE, 0x584A, 0x58CA, 0x5EFB, 0x5FEB, 0x602A, 0x6094, /* 0xF0 */
0x6062, 0x61D0, 0x6212, 0x62D0, 0x6539 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_8A[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x9B41, 0x6666, 0x68B0, 0x6D77, 0x7070, 0x754C, 0x7686, 0x7D75, /* 0x40 */
0x82A5, 0x87F9, 0x958B, 0x968E, 0x8C9D, 0x51F1, 0x52BE, 0x5916, /* 0x40 */
0x54B3, 0x5BB3, 0x5D16, 0x6168, 0x6982, 0x6DAF, 0x788D, 0x84CB, /* 0x50 */
0x8857, 0x8A72, 0x93A7, 0x9AB8, 0x6D6C, 0x99A8, 0x86D9, 0x57A3, /* 0x50 */
0x67FF, 0x86CE, 0x920E, 0x5283, 0x5687, 0x5404, 0x5ED3, 0x62E1, /* 0x60 */
0x64B9, 0x683C, 0x6838, 0x6BBB, 0x7372, 0x78BA, 0x7A6B, 0x899A, /* 0x60 */
0x89D2, 0x8D6B, 0x8F03, 0x90ED, 0x95A3, 0x9694, 0x9769, 0x5B66, /* 0x70 */
0x5CB3, 0x697D, 0x984D, 0x984E, 0x639B, 0x7B20, 0x6A2B, 0, /* 0x70 */
0x6A7F, 0x68B6, 0x9C0D, 0x6F5F, 0x5272, 0x559D, 0x6070, 0x62EC, /* 0x80 */
0x6D3B, 0x6E07, 0x6ED1, 0x845B, 0x8910, 0x8F44, 0x4E14, 0x9C39, /* 0x80 */
0x53F6, 0x691B, 0x6A3A, 0x9784, 0x682A, 0x515C, 0x7AC3, 0x84B2, /* 0x90 */
0x91DC, 0x938C, 0x565B, 0x9D28, 0x6822, 0x8305, 0x8431, 0x7CA5, /* 0x90 */
0x5208, 0x82C5, 0x74E6, 0x4E7E, 0x4F83, 0x51A0, 0x5BD2, 0x520A, /* 0xA0 */
0x52D8, 0x52E7, 0x5DFB, 0x559A, 0x582A, 0x59E6, 0x5B8C, 0x5B98, /* 0xA0 */
0x5BDB, 0x5E72, 0x5E79, 0x60A3, 0x611F, 0x6163, 0x61BE, 0x63DB, /* 0xB0 */
0x6562, 0x67D1, 0x6853, 0x68FA, 0x6B3E, 0x6B53, 0x6C57, 0x6F22, /* 0xB0 */
0x6F97, 0x6F45, 0x74B0, 0x7518, 0x76E3, 0x770B, 0x7AFF, 0x7BA1, /* 0xC0 */
0x7C21, 0x7DE9, 0x7F36, 0x7FF0, 0x809D, 0x8266, 0x839E, 0x89B3, /* 0xC0 */
0x8ACC, 0x8CAB, 0x9084, 0x9451, 0x9593, 0x9591, 0x95A2, 0x9665, /* 0xD0 */
0x97D3, 0x9928, 0x8218, 0x4E38, 0x542B, 0x5CB8, 0x5DCC, 0x73A9, /* 0xD0 */
0x764C, 0x773C, 0x5CA9, 0x7FEB, 0x8D0B, 0x96C1, 0x9811, 0x9854, /* 0xE0 */
0x9858, 0x4F01, 0x4F0E, 0x5371, 0x559C, 0x5668, 0x57FA, 0x5947, /* 0xE0 */
0x5B09, 0x5BC4, 0x5C90, 0x5E0C, 0x5E7E, 0x5FCC, 0x63EE, 0x673A, /* 0xF0 */
0x65D7, 0x65E2, 0x671F, 0x68CB, 0x68C4 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_8B[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x6A5F, 0x5E30, 0x6BC5, 0x6C17, 0x6C7D, 0x757F, 0x7948, 0x5B63, /* 0x40 */
0x7A00, 0x7D00, 0x5FBD, 0x898F, 0x8A18, 0x8CB4, 0x8D77, 0x8ECC, /* 0x40 */
0x8F1D, 0x98E2, 0x9A0E, 0x9B3C, 0x4E80, 0x507D, 0x5100, 0x5993, /* 0x50 */
0x5B9C, 0x622F, 0x6280, 0x64EC, 0x6B3A, 0x72A0, 0x7591, 0x7947, /* 0x50 */
0x7FA9, 0x87FB, 0x8ABC, 0x8B70, 0x63AC, 0x83CA, 0x97A0, 0x5409, /* 0x60 */
0x5403, 0x55AB, 0x6854, 0x6A58, 0x8A70, 0x7827, 0x6775, 0x9ECD, /* 0x60 */
0x5374, 0x5BA2, 0x811A, 0x8650, 0x9006, 0x4E18, 0x4E45, 0x4EC7, /* 0x70 */
0x4F11, 0x53CA, 0x5438, 0x5BAE, 0x5F13, 0x6025, 0x6551, 0, /* 0x70 */
0x673D, 0x6C42, 0x6C72, 0x6CE3, 0x7078, 0x7403, 0x7A76, 0x7AAE, /* 0x80 */
0x7B08, 0x7D1A, 0x7CFE, 0x7D66, 0x65E7, 0x725B, 0x53BB, 0x5C45, /* 0x80 */
0x5DE8, 0x62D2, 0x62E0, 0x6319, 0x6E20, 0x865A, 0x8A31, 0x8DDD, /* 0x90 */
0x92F8, 0x6F01, 0x79A6, 0x9B5A, 0x4EA8, 0x4EAB, 0x4EAC, 0x4F9B, /* 0x90 */
0x4FA0, 0x50D1, 0x5147, 0x7AF6, 0x5171, 0x51F6, 0x5354, 0x5321, /* 0xA0 */
0x537F, 0x53EB, 0x55AC, 0x5883, 0x5CE1, 0x5F37, 0x5F4A, 0x602F, /* 0xA0 */
0x6050, 0x606D, 0x631F, 0x6559, 0x6A4B, 0x6CC1, 0x72C2, 0x72ED, /* 0xB0 */
0x77EF, 0x80F8, 0x8105, 0x8208, 0x854E, 0x90F7, 0x93E1, 0x97FF, /* 0xB0 */
0x9957, 0x9A5A, 0x4EF0, 0x51DD, 0x5C2D, 0x6681, 0x696D, 0x5C40, /* 0xC0 */
0x66F2, 0x6975, 0x7389, 0x6850, 0x7C81, 0x50C5, 0x52E4, 0x5747, /* 0xC0 */
0x5DFE, 0x9326, 0x65A4, 0x6B23, 0x6B3D, 0x7434, 0x7981, 0x79BD, /* 0xD0 */
0x7B4B, 0x7DCA, 0x82B9, 0x83CC, 0x887F, 0x895F, 0x8B39, 0x8FD1, /* 0xD0 */
0x91D1, 0x541F, 0x9280, 0x4E5D, 0x5036, 0x53E5, 0x533A, 0x72D7, /* 0xE0 */
0x7396, 0x77E9, 0x82E6, 0x8EAF, 0x99C6, 0x99C8, 0x99D2, 0x5177, /* 0xE0 */
0x611A, 0x865E, 0x55B0, 0x7A7A, 0x5076, 0x5BD3, 0x9047, 0x9685, /* 0xF0 */
0x4E32, 0x6ADB, 0x91E7, 0x5C51, 0x5C48 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_8C[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x6398, 0x7A9F, 0x6C93, 0x9774, 0x8F61, 0x7AAA, 0x718A, 0x9688, /* 0x40 */
0x7C82, 0x6817, 0x7E70, 0x6851, 0x936C, 0x52F2, 0x541B, 0x85AB, /* 0x40 */
0x8A13, 0x7FA4, 0x8ECD, 0x90E1, 0x5366, 0x8888, 0x7941, 0x4FC2, /* 0x50 */
0x50BE, 0x5211, 0x5144, 0x5553, 0x572D, 0x73EA, 0x578B, 0x5951, /* 0x50 */
0x5F62, 0x5F84, 0x6075, 0x6176, 0x6167, 0x61A9, 0x63B2, 0x643A, /* 0x60 */
0x656C, 0x666F, 0x6842, 0x6E13, 0x7566, 0x7A3D, 0x7CFB, 0x7D4C, /* 0x60 */
0x7D99, 0x7E4B, 0x7F6B, 0x830E, 0x834A, 0x86CD, 0x8A08, 0x8A63, /* 0x70 */
0x8B66, 0x8EFD, 0x981A, 0x9D8F, 0x82B8, 0x8FCE, 0x9BE8, 0, /* 0x70 */
0x5287, 0x621F, 0x6483, 0x6FC0, 0x9699, 0x6841, 0x5091, 0x6B20, /* 0x80 */
0x6C7A, 0x6F54, 0x7A74, 0x7D50, 0x8840, 0x8A23, 0x6708, 0x4EF6, /* 0x80 */
0x5039, 0x5026, 0x5065, 0x517C, 0x5238, 0x5263, 0x55A7, 0x570F, /* 0x90 */
0x5805, 0x5ACC, 0x5EFA, 0x61B2, 0x61F8, 0x62F3, 0x6372, 0x691C, /* 0x90 */
0x6A29, 0x727D, 0x72AC, 0x732E, 0x7814, 0x786F, 0x7D79, 0x770C, /* 0xA0 */
0x80A9, 0x898B, 0x8B19, 0x8CE2, 0x8ED2, 0x9063, 0x9375, 0x967A, /* 0xA0 */
0x9855, 0x9A13, 0x9E78, 0x5143, 0x539F, 0x53B3, 0x5E7B, 0x5F26, /* 0xB0 */
0x6E1B, 0x6E90, 0x7384, 0x73FE, 0x7D43, 0x8237, 0x8A00, 0x8AFA, /* 0xB0 */
0x9650, 0x4E4E, 0x500B, 0x53E4, 0x547C, 0x56FA, 0x59D1, 0x5B64, /* 0xC0 */
0x5DF1, 0x5EAB, 0x5F27, 0x6238, 0x6545, 0x67AF, 0x6E56, 0x72D0, /* 0xC0 */
0x7CCA, 0x88B4, 0x80A1, 0x80E1, 0x83F0, 0x864E, 0x8A87, 0x8DE8, /* 0xD0 */
0x9237, 0x96C7, 0x9867, 0x9F13, 0x4E94, 0x4E92, 0x4F0D, 0x5348, /* 0xD0 */
0x5449, 0x543E, 0x5A2F, 0x5F8C, 0x5FA1, 0x609F, 0x68A7, 0x6A8E, /* 0xE0 */
0x745A, 0x7881, 0x8A9E, 0x8AA4, 0x8B77, 0x9190, 0x4E5E, 0x9BC9, /* 0xE0 */
0x4EA4, 0x4F7C, 0x4FAF, 0x5019, 0x5016, 0x5149, 0x516C, 0x529F, /* 0xF0 */
0x52B9, 0x52FE, 0x539A, 0x53E3, 0x5411 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_8D[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x540E, 0x5589, 0x5751, 0x57A2, 0x597D, 0x5B54, 0x5B5D, 0x5B8F, /* 0x40 */
0x5DE5, 0x5DE7, 0x5DF7, 0x5E78, 0x5E83, 0x5E9A, 0x5EB7, 0x5F18, /* 0x40 */
0x6052, 0x614C, 0x6297, 0x62D8, 0x63A7, 0x653B, 0x6602, 0x6643, /* 0x50 */
0x66F4, 0x676D, 0x6821, 0x6897, 0x69CB, 0x6C5F, 0x6D2A, 0x6D69, /* 0x50 */
0x6E2F, 0x6E9D, 0x7532, 0x7687, 0x786C, 0x7A3F, 0x7CE0, 0x7D05, /* 0x60 */
0x7D18, 0x7D5E, 0x7DB1, 0x8015, 0x8003, 0x80AF, 0x80B1, 0x8154, /* 0x60 */
0x818F, 0x822A, 0x8352, 0x884C, 0x8861, 0x8B1B, 0x8CA2, 0x8CFC, /* 0x70 */
0x90CA, 0x9175, 0x9271, 0x783F, 0x92FC, 0x95A4, 0x964D, 0, /* 0x70 */
0x9805, 0x9999, 0x9AD8, 0x9D3B, 0x525B, 0x52AB, 0x53F7, 0x5408, /* 0x80 */
0x58D5, 0x62F7, 0x6FE0, 0x8C6A, 0x8F5F, 0x9EB9, 0x514B, 0x523B, /* 0x80 */
0x544A, 0x56FD, 0x7A40, 0x9177, 0x9D60, 0x9ED2, 0x7344, 0x6F09, /* 0x90 */
0x8170, 0x7511, 0x5FFD, 0x60DA, 0x9AA8, 0x72DB, 0x8FBC, 0x6B64, /* 0x90 */
0x9803, 0x4ECA, 0x56F0, 0x5764, 0x58BE, 0x5A5A, 0x6068, 0x61C7, /* 0xA0 */
0x660F, 0x6606, 0x6839, 0x68B1, 0x6DF7, 0x75D5, 0x7D3A, 0x826E, /* 0xA0 */
0x9B42, 0x4E9B, 0x4F50, 0x53C9, 0x5506, 0x5D6F, 0x5DE6, 0x5DEE, /* 0xB0 */
0x67FB, 0x6C99, 0x7473, 0x7802, 0x8A50, 0x9396, 0x88DF, 0x5750, /* 0xB0 */
0x5EA7, 0x632B, 0x50B5, 0x50AC, 0x518D, 0x6700, 0x54C9, 0x585E, /* 0xC0 */
0x59BB, 0x5BB0, 0x5F69, 0x624D, 0x63A1, 0x683D, 0x6B73, 0x6E08, /* 0xC0 */
0x707D, 0x91C7, 0x7280, 0x7815, 0x7826, 0x796D, 0x658E, 0x7D30, /* 0xD0 */
0x83DC, 0x88C1, 0x8F09, 0x969B, 0x5264, 0x5728, 0x6750, 0x7F6A, /* 0xD0 */
0x8CA1, 0x51B4, 0x5742, 0x962A, 0x583A, 0x698A, 0x80B4, 0x54B2, /* 0xE0 */
0x5D0E, 0x57FC, 0x7895, 0x9DFA, 0x4F5C, 0x524A, 0x548B, 0x643E, /* 0xE0 */
0x6628, 0x6714, 0x67F5, 0x7A84, 0x7B56, 0x7D22, 0x932F, 0x685C, /* 0xF0 */
0x9BAD, 0x7B39, 0x5319, 0x518A, 0x5237 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_8E[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x5BDF, 0x62F6, 0x64AE, 0x64E6, 0x672D, 0x6BBA, 0x85A9, 0x96D1, /* 0x40 */
0x7690, 0x9BD6, 0x634C, 0x9306, 0x9BAB, 0x76BF, 0x6652, 0x4E09, /* 0x40 */
0x5098, 0x53C2, 0x5C71, 0x60E8, 0x6492, 0x6563, 0x685F, 0x71E6, /* 0x50 */
0x73CA, 0x7523, 0x7B97, 0x7E82, 0x8695, 0x8B83, 0x8CDB, 0x9178, /* 0x50 */
0x9910, 0x65AC, 0x66AB, 0x6B8B, 0x4ED5, 0x4ED4, 0x4F3A, 0x4F7F, /* 0x60 */
0x523A, 0x53F8, 0x53F2, 0x55E3, 0x56DB, 0x58EB, 0x59CB, 0x59C9, /* 0x60 */
0x59FF, 0x5B50, 0x5C4D, 0x5E02, 0x5E2B, 0x5FD7, 0x601D, 0x6307, /* 0x70 */
0x652F, 0x5B5C, 0x65AF, 0x65BD, 0x65E8, 0x679D, 0x6B62, 0, /* 0x70 */
0x6B7B, 0x6C0F, 0x7345, 0x7949, 0x79C1, 0x7CF8, 0x7D19, 0x7D2B, /* 0x80 */
0x80A2, 0x8102, 0x81F3, 0x8996, 0x8A5E, 0x8A69, 0x8A66, 0x8A8C, /* 0x80 */
0x8AEE, 0x8CC7, 0x8CDC, 0x96CC, 0x98FC, 0x6B6F, 0x4E8B, 0x4F3C, /* 0x90 */
0x4F8D, 0x5150, 0x5B57, 0x5BFA, 0x6148, 0x6301, 0x6642, 0x6B21, /* 0x90 */
0x6ECB, 0x6CBB, 0x723E, 0x74BD, 0x75D4, 0x78C1, 0x793A, 0x800C, /* 0xA0 */
0x8033, 0x81EA, 0x8494, 0x8F9E, 0x6C50, 0x9E7F, 0x5F0F, 0x8B58, /* 0xA0 */
0x9D2B, 0x7AFA, 0x8EF8, 0x5B8D, 0x96EB, 0x4E03, 0x53F1, 0x57F7, /* 0xB0 */
0x5931, 0x5AC9, 0x5BA4, 0x6089, 0x6E7F, 0x6F06, 0x75BE, 0x8CEA, /* 0xB0 */
0x5B9F, 0x8500, 0x7BE0, 0x5072, 0x67F4, 0x829D, 0x5C61, 0x854A, /* 0xC0 */
0x7E1E, 0x820E, 0x5199, 0x5C04, 0x6368, 0x8D66, 0x659C, 0x716E, /* 0xC0 */
0x793E, 0x7D17, 0x8005, 0x8B1D, 0x8ECA, 0x906E, 0x86C7, 0x90AA, /* 0xD0 */
0x501F, 0x52FA, 0x5C3A, 0x6753, 0x707C, 0x7235, 0x914C, 0x91C8, /* 0xD0 */
0x932B, 0x82E5, 0x5BC2, 0x5F31, 0x60F9, 0x4E3B, 0x53D6, 0x5B88, /* 0xE0 */
0x624B, 0x6731, 0x6B8A, 0x72E9, 0x73E0, 0x7A2E, 0x816B, 0x8DA3, /* 0xE0 */
0x9152, 0x9996, 0x5112, 0x53D7, 0x546A, 0x5BFF, 0x6388, 0x6A39, /* 0xF0 */
0x7DAC, 0x9700, 0x56DA, 0x53CE, 0x5468 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_8F[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x5B97, 0x5C31, 0x5DDE, 0x4FEE, 0x6101, 0x62FE, 0x6D32, 0x79C0, /* 0x40 */
0x79CB, 0x7D42, 0x7E4D, 0x7FD2, 0x81ED, 0x821F, 0x8490, 0x8846, /* 0x40 */
0x8972, 0x8B90, 0x8E74, 0x8F2F, 0x9031, 0x914B, 0x916C, 0x96C6, /* 0x50 */
0x919C, 0x4EC0, 0x4F4F, 0x5145, 0x5341, 0x5F93, 0x620E, 0x67D4, /* 0x50 */
0x6C41, 0x6E0B, 0x7363, 0x7E26, 0x91CD, 0x9283, 0x53D4, 0x5919, /* 0x60 */
0x5BBF, 0x6DD1, 0x795D, 0x7E2E, 0x7C9B, 0x587E, 0x719F, 0x51FA, /* 0x60 */
0x8853, 0x8FF0, 0x4FCA, 0x5CFB, 0x6625, 0x77AC, 0x7AE3, 0x821C, /* 0x70 */
0x99FF, 0x51C6, 0x5FAA, 0x65EC, 0x696F, 0x6B89, 0x6DF3, 0, /* 0x70 */
0x6E96, 0x6F64, 0x76FE, 0x7D14, 0x5DE1, 0x9075, 0x9187, 0x9806, /* 0x80 */
0x51E6, 0x521D, 0x6240, 0x6691, 0x66D9, 0x6E1A, 0x5EB6, 0x7DD2, /* 0x80 */
0x7F72, 0x66F8, 0x85AF, 0x85F7, 0x8AF8, 0x52A9, 0x53D9, 0x5973, /* 0x90 */
0x5E8F, 0x5F90, 0x6055, 0x92E4, 0x9664, 0x50B7, 0x511F, 0x52DD, /* 0x90 */
0x5320, 0x5347, 0x53EC, 0x54E8, 0x5546, 0x5531, 0x5617, 0x5968, /* 0xA0 */
0x59BE, 0x5A3C, 0x5BB5, 0x5C06, 0x5C0F, 0x5C11, 0x5C1A, 0x5E84, /* 0xA0 */
0x5E8A, 0x5EE0, 0x5F70, 0x627F, 0x6284, 0x62DB, 0x638C, 0x6377, /* 0xB0 */
0x6607, 0x660C, 0x662D, 0x6676, 0x677E, 0x68A2, 0x6A1F, 0x6A35, /* 0xB0 */
0x6CBC, 0x6D88, 0x6E09, 0x6E58, 0x713C, 0x7126, 0x7167, 0x75C7, /* 0xC0 */
0x7701, 0x785D, 0x7901, 0x7965, 0x79F0, 0x7AE0, 0x7B11, 0x7CA7, /* 0xC0 */
0x7D39, 0x8096, 0x83D6, 0x848B, 0x8549, 0x885D, 0x88F3, 0x8A1F, /* 0xD0 */
0x8A3C, 0x8A54, 0x8A73, 0x8C61, 0x8CDE, 0x91A4, 0x9266, 0x937E, /* 0xD0 */
0x9418, 0x969C, 0x9798, 0x4E0A, 0x4E08, 0x4E1E, 0x4E57, 0x5197, /* 0xE0 */
0x5270, 0x57CE, 0x5834, 0x58CC, 0x5B22, 0x5E38, 0x60C5, 0x64FE, /* 0xE0 */
0x6761, 0x6756, 0x6D44, 0x72B6, 0x7573, 0x7A63, 0x84B8, 0x8B72, /* 0xF0 */
0x91B8, 0x9320, 0x5631, 0x57F4, 0x98FE /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_90[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x62ED, 0x690D, 0x6B96, 0x71ED, 0x7E54, 0x8077, 0x8272, 0x89E6, /* 0x40 */
0x98DF, 0x8755, 0x8FB1, 0x5C3B, 0x4F38, 0x4FE1, 0x4FB5, 0x5507, /* 0x40 */
0x5A20, 0x5BDD, 0x5BE9, 0x5FC3, 0x614E, 0x632F, 0x65B0, 0x664B, /* 0x50 */
0x68EE, 0x699B, 0x6D78, 0x6DF1, 0x7533, 0x75B9, 0x771F, 0x795E, /* 0x50 */
0x79E6, 0x7D33, 0x81E3, 0x82AF, 0x85AA, 0x89AA, 0x8A3A, 0x8EAB, /* 0x60 */
0x8F9B, 0x9032, 0x91DD, 0x9707, 0x4EBA, 0x4EC1, 0x5203, 0x5875, /* 0x60 */
0x58EC, 0x5C0B, 0x751A, 0x5C3D, 0x814E, 0x8A0A, 0x8FC5, 0x9663, /* 0x70 */
0x976D, 0x7B25, 0x8ACF, 0x9808, 0x9162, 0x56F3, 0x53A8, 0, /* 0x70 */
0x9017, 0x5439, 0x5782, 0x5E25, 0x63A8, 0x6C34, 0x708A, 0x7761, /* 0x80 */
0x7C8B, 0x7FE0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968F, /* 0x80 */
0x745E, 0x9AC4, 0x5D07, 0x5D69, 0x6570, 0x67A2, 0x8DA8, 0x96DB, /* 0x90 */
0x636E, 0x6749, 0x6919, 0x83C5, 0x9817, 0x96C0, 0x88FE, 0x6F84, /* 0x90 */
0x647A, 0x5BF8, 0x4E16, 0x702C, 0x755D, 0x662F, 0x51C4, 0x5236, /* 0xA0 */
0x52E2, 0x59D3, 0x5F81, 0x6027, 0x6210, 0x653F, 0x6574, 0x661F, /* 0xA0 */
0x6674, 0x68F2, 0x6816, 0x6B63, 0x6E05, 0x7272, 0x751F, 0x76DB, /* 0xB0 */
0x7CBE, 0x8056, 0x58F0, 0x88FD, 0x897F, 0x8AA0, 0x8A93, 0x8ACB, /* 0xB0 */
0x901D, 0x9192, 0x9752, 0x9759, 0x6589, 0x7A0E, 0x8106, 0x96BB, /* 0xC0 */
0x5E2D, 0x60DC, 0x621A, 0x65A5, 0x6614, 0x6790, 0x77F3, 0x7A4D, /* 0xC0 */
0x7C4D, 0x7E3E, 0x810A, 0x8CAC, 0x8D64, 0x8DE1, 0x8E5F, 0x78A9, /* 0xD0 */
0x5207, 0x62D9, 0x63A5, 0x6442, 0x6298, 0x8A2D, 0x7A83, 0x7BC0, /* 0xD0 */
0x8AAC, 0x96EA, 0x7D76, 0x820C, 0x8749, 0x4ED9, 0x5148, 0x5343, /* 0xE0 */
0x5360, 0x5BA3, 0x5C02, 0x5C16, 0x5DDD, 0x6226, 0x6247, 0x64B0, /* 0xE0 */
0x6813, 0x6834, 0x6CC9, 0x6D45, 0x6D17, 0x67D3, 0x6F5C, 0x714E, /* 0xF0 */
0x717D, 0x65CB, 0x7A7F, 0x7BAD, 0x7DDA /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_91[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x7E4A, 0x7FA8, 0x817A, 0x821B, 0x8239, 0x85A6, 0x8A6E, 0x8CCE, /* 0x40 */
0x8DF5, 0x9078, 0x9077, 0x92AD, 0x9291, 0x9583, 0x9BAE, 0x524D, /* 0x40 */
0x5584, 0x6F38, 0x7136, 0x5168, 0x7985, 0x7E55, 0x81B3, 0x7CCE, /* 0x50 */
0x564C, 0x5851, 0x5CA8, 0x63AA, 0x66FE, 0x66FD, 0x695A, 0x72D9, /* 0x50 */
0x758F, 0x758E, 0x790E, 0x7956, 0x79DF, 0x7C97, 0x7D20, 0x7D44, /* 0x60 */
0x8607, 0x8A34, 0x963B, 0x9061, 0x9F20, 0x50E7, 0x5275, 0x53CC, /* 0x60 */
0x53E2, 0x5009, 0x55AA, 0x58EE, 0x594F, 0x723D, 0x5B8B, 0x5C64, /* 0x70 */
0x531D, 0x60E3, 0x60F3, 0x635C, 0x6383, 0x633F, 0x63BB, 0, /* 0x70 */
0x64CD, 0x65E9, 0x66F9, 0x5DE3, 0x69CD, 0x69FD, 0x6F15, 0x71E5, /* 0x80 */
0x4E89, 0x75E9, 0x76F8, 0x7A93, 0x7CDF, 0x7DCF, 0x7D9C, 0x8061, /* 0x80 */
0x8349, 0x8358, 0x846C, 0x84BC, 0x85FB, 0x88C5, 0x8D70, 0x9001, /* 0x90 */
0x906D, 0x9397, 0x971C, 0x9A12, 0x50CF, 0x5897, 0x618E, 0x81D3, /* 0x90 */
0x8535, 0x8D08, 0x9020, 0x4FC3, 0x5074, 0x5247, 0x5373, 0x606F, /* 0xA0 */
0x6349, 0x675F, 0x6E2C, 0x8DB3, 0x901F, 0x4FD7, 0x5C5E, 0x8CCA, /* 0xA0 */
0x65CF, 0x7D9A, 0x5352, 0x8896, 0x5176, 0x63C3, 0x5B58, 0x5B6B, /* 0xB0 */
0x5C0A, 0x640D, 0x6751, 0x905C, 0x4ED6, 0x591A, 0x592A, 0x6C70, /* 0xB0 */
0x8A51, 0x553E, 0x5815, 0x59A5, 0x60F0, 0x6253, 0x67C1, 0x8235, /* 0xC0 */
0x6955, 0x9640, 0x99C4, 0x9A28, 0x4F53, 0x5806, 0x5BFE, 0x8010, /* 0xC0 */
0x5CB1, 0x5E2F, 0x5F85, 0x6020, 0x614B, 0x6234, 0x66FF, 0x6CF0, /* 0xD0 */
0x6EDE, 0x80CE, 0x817F, 0x82D4, 0x888B, 0x8CB8, 0x9000, 0x902E, /* 0xD0 */
0x968A, 0x9EDB, 0x9BDB, 0x4EE3, 0x53F0, 0x5927, 0x7B2C, 0x918D, /* 0xE0 */
0x984C, 0x9DF9, 0x6EDD, 0x7027, 0x5353, 0x5544, 0x5B85, 0x6258, /* 0xE0 */
0x629E, 0x62D3, 0x6CA2, 0x6FEF, 0x7422, 0x8A17, 0x9438, 0x6FC1, /* 0xF0 */
0x8AFE, 0x8338, 0x51E7, 0x86F8, 0x53EA /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_92[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x53E9, 0x4F46, 0x9054, 0x8FB0, 0x596A, 0x8131, 0x5DFD, 0x7AEA, /* 0x40 */
0x8FBF, 0x68DA, 0x8C37, 0x72F8, 0x9C48, 0x6A3D, 0x8AB0, 0x4E39, /* 0x40 */
0x5358, 0x5606, 0x5766, 0x62C5, 0x63A2, 0x65E6, 0x6B4E, 0x6DE1, /* 0x50 */
0x6E5B, 0x70AD, 0x77ED, 0x7AEF, 0x7BAA, 0x7DBB, 0x803D, 0x80C6, /* 0x50 */
0x86CB, 0x8A95, 0x935B, 0x56E3, 0x58C7, 0x5F3E, 0x65AD, 0x6696, /* 0x60 */
0x6A80, 0x6BB5, 0x7537, 0x8AC7, 0x5024, 0x77E5, 0x5730, 0x5F1B, /* 0x60 */
0x6065, 0x667A, 0x6C60, 0x75F4, 0x7A1A, 0x7F6E, 0x81F4, 0x8718, /* 0x70 */
0x9045, 0x99B3, 0x7BC9, 0x755C, 0x7AF9, 0x7B51, 0x84C4, 0, /* 0x70 */
0x9010, 0x79E9, 0x7A92, 0x8336, 0x5AE1, 0x7740, 0x4E2D, 0x4EF2, /* 0x80 */
0x5B99, 0x5FE0, 0x62BD, 0x663C, 0x67F1, 0x6CE8, 0x866B, 0x8877, /* 0x80 */
0x8A3B, 0x914E, 0x92F3, 0x99D0, 0x6A17, 0x7026, 0x732A, 0x82E7, /* 0x90 */
0x8457, 0x8CAF, 0x4E01, 0x5146, 0x51CB, 0x558B, 0x5BF5, 0x5E16, /* 0x90 */
0x5E33, 0x5E81, 0x5F14, 0x5F35, 0x5F6B, 0x5FB4, 0x61F2, 0x6311, /* 0xA0 */
0x66A2, 0x671D, 0x6F6E, 0x7252, 0x753A, 0x773A, 0x8074, 0x8139, /* 0xA0 */
0x8178, 0x8776, 0x8ABF, 0x8ADC, 0x8D85, 0x8DF3, 0x929A, 0x9577, /* 0xB0 */
0x9802, 0x9CE5, 0x52C5, 0x6357, 0x76F4, 0x6715, 0x6C88, 0x73CD, /* 0xB0 */
0x8CC3, 0x93AE, 0x9673, 0x6D25, 0x589C, 0x690E, 0x69CC, 0x8FFD, /* 0xC0 */
0x939A, 0x75DB, 0x901A, 0x585A, 0x6802, 0x63B4, 0x69FB, 0x4F43, /* 0xC0 */
0x6F2C, 0x67D8, 0x8FBB, 0x8526, 0x7DB4, 0x9354, 0x693F, 0x6F70, /* 0xD0 */
0x576A, 0x58F7, 0x5B2C, 0x7D2C, 0x722A, 0x540A, 0x91E3, 0x9DB4, /* 0xD0 */
0x4EAD, 0x4F4E, 0x505C, 0x5075, 0x5243, 0x8C9E, 0x5448, 0x5824, /* 0xE0 */
0x5B9A, 0x5E1D, 0x5E95, 0x5EAD, 0x5EF7, 0x5F1F, 0x608C, 0x62B5, /* 0xE0 */
0x633A, 0x63D0, 0x68AF, 0x6C40, 0x7887, 0x798E, 0x7A0B, 0x7DE0, /* 0xF0 */
0x8247, 0x8A02, 0x8AE6, 0x8E44, 0x9013 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_93[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x90B8, 0x912D, 0x91D8, 0x9F0E, 0x6CE5, 0x6458, 0x64E2, 0x6575, /* 0x40 */
0x6EF4, 0x7684, 0x7B1B, 0x9069, 0x93D1, 0x6EBA, 0x54F2, 0x5FB9, /* 0x40 */
0x64A4, 0x8F4D, 0x8FED, 0x9244, 0x5178, 0x586B, 0x5929, 0x5C55, /* 0x50 */
0x5E97, 0x6DFB, 0x7E8F, 0x751C, 0x8CBC, 0x8EE2, 0x985B, 0x70B9, /* 0x50 */
0x4F1D, 0x6BBF, 0x6FB1, 0x7530, 0x96FB, 0x514E, 0x5410, 0x5835, /* 0x60 */
0x5857, 0x59AC, 0x5C60, 0x5F92, 0x6597, 0x675C, 0x6E21, 0x767B, /* 0x60 */
0x83DF, 0x8CED, 0x9014, 0x90FD, 0x934D, 0x7825, 0x783A, 0x52AA, /* 0x70 */
0x5EA6, 0x571F, 0x5974, 0x6012, 0x5012, 0x515A, 0x51AC, 0, /* 0x70 */
0x51CD, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5B95, 0x5CF6, /* 0x80 */
0x5D8B, 0x60BC, 0x6295, 0x642D, 0x6771, 0x6843, 0x68BC, 0x68DF, /* 0x80 */
0x76D7, 0x6DD8, 0x6E6F, 0x6D9B, 0x706F, 0x71C8, 0x5F53, 0x75D8, /* 0x90 */
0x7977, 0x7B49, 0x7B54, 0x7B52, 0x7CD6, 0x7D71, 0x5230, 0x8463, /* 0x90 */
0x8569, 0x85E4, 0x8A0E, 0x8B04, 0x8C46, 0x8E0F, 0x9003, 0x900F, /* 0xA0 */
0x9419, 0x9676, 0x982D, 0x9A30, 0x95D8, 0x50CD, 0x52D5, 0x540C, /* 0xA0 */
0x5802, 0x5C0E, 0x61A7, 0x649E, 0x6D1E, 0x77B3, 0x7AE5, 0x80F4, /* 0xB0 */
0x8404, 0x9053, 0x9285, 0x5CE0, 0x9D07, 0x533F, 0x5F97, 0x5FB3, /* 0xB0 */
0x6D9C, 0x7279, 0x7763, 0x79BF, 0x7BE4, 0x6BD2, 0x72EC, 0x8AAD, /* 0xC0 */
0x6803, 0x6A61, 0x51F8, 0x7A81, 0x6934, 0x5C4A, 0x9CF6, 0x82EB, /* 0xC0 */
0x5BC5, 0x9149, 0x701E, 0x5678, 0x5C6F, 0x60C7, 0x6566, 0x6C8C, /* 0xD0 */
0x8C5A, 0x9041, 0x9813, 0x5451, 0x66C7, 0x920D, 0x5948, 0x90A3, /* 0xD0 */
0x5185, 0x4E4D, 0x51EA, 0x8599, 0x8B0E, 0x7058, 0x637A, 0x934B, /* 0xE0 */
0x6962, 0x99B4, 0x7E04, 0x7577, 0x5357, 0x6960, 0x8EDF, 0x96E3, /* 0xE0 */
0x6C5D, 0x4E8C, 0x5C3C, 0x5F10, 0x8FE9, 0x5302, 0x8CD1, 0x8089, /* 0xF0 */
0x8679, 0x5EFF, 0x65E5, 0x4E73, 0x5165 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_94[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x5982, 0x5C3F, 0x97EE, 0x4EFB, 0x598A, 0x5FCD, 0x8A8D, 0x6FE1, /* 0x40 */
0x79B0, 0x7962, 0x5BE7, 0x8471, 0x732B, 0x71B1, 0x5E74, 0x5FF5, /* 0x40 */
0x637B, 0x649A, 0x71C3, 0x7C98, 0x4E43, 0x5EFC, 0x4E4B, 0x57DC, /* 0x50 */
0x56A2, 0x60A9, 0x6FC3, 0x7D0D, 0x80FD, 0x8133, 0x81BF, 0x8FB2, /* 0x50 */
0x8997, 0x86A4, 0x5DF4, 0x628A, 0x64AD, 0x8987, 0x6777, 0x6CE2, /* 0x60 */
0x6D3E, 0x7436, 0x7834, 0x5A46, 0x7F75, 0x82AD, 0x99AC, 0x4FF3, /* 0x60 */
0x5EC3, 0x62DD, 0x6392, 0x6557, 0x676F, 0x76C3, 0x724C, 0x80CC, /* 0x70 */
0x80BA, 0x8F29, 0x914D, 0x500D, 0x57F9, 0x5A92, 0x6885, 0, /* 0x70 */
0x6973, 0x7164, 0x72FD, 0x8CB7, 0x58F2, 0x8CE0, 0x966A, 0x9019, /* 0x80 */
0x877F, 0x79E4, 0x77E7, 0x8429, 0x4F2F, 0x5265, 0x535A, 0x62CD, /* 0x80 */
0x67CF, 0x6CCA, 0x767D, 0x7B94, 0x7C95, 0x8236, 0x8584, 0x8FEB, /* 0x90 */
0x66DD, 0x6F20, 0x7206, 0x7E1B, 0x83AB, 0x99C1, 0x9EA6, 0x51FD, /* 0x90 */
0x7BB1, 0x7872, 0x7BB8, 0x8087, 0x7B48, 0x6AE8, 0x5E61, 0x808C, /* 0xA0 */
0x7551, 0x7560, 0x516B, 0x9262, 0x6E8C, 0x767A, 0x9197, 0x9AEA, /* 0xA0 */
0x4F10, 0x7F70, 0x629C, 0x7B4F, 0x95A5, 0x9CE9, 0x567A, 0x5859, /* 0xB0 */
0x86E4, 0x96BC, 0x4F34, 0x5224, 0x534A, 0x53CD, 0x53DB, 0x5E06, /* 0xB0 */
0x642C, 0x6591, 0x677F, 0x6C3E, 0x6C4E, 0x7248, 0x72AF, 0x73ED, /* 0xC0 */
0x7554, 0x7E41, 0x822C, 0x85E9, 0x8CA9, 0x7BC4, 0x91C6, 0x7169, /* 0xC0 */
0x9812, 0x98EF, 0x633D, 0x6669, 0x756A, 0x76E4, 0x78D0, 0x8543, /* 0xD0 */
0x86EE, 0x532A, 0x5351, 0x5426, 0x5983, 0x5E87, 0x5F7C, 0x60B2, /* 0xD0 */
0x6249, 0x6279, 0x62AB, 0x6590, 0x6BD4, 0x6CCC, 0x75B2, 0x76AE, /* 0xE0 */
0x7891, 0x79D8, 0x7DCB, 0x7F77, 0x80A5, 0x88AB, 0x8AB9, 0x8CBB, /* 0xE0 */
0x907F, 0x975E, 0x98DB, 0x6A0B, 0x7C38, 0x5099, 0x5C3E, 0x5FAE, /* 0xF0 */
0x6787, 0x6BD8, 0x7435, 0x7709, 0x7F8E /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_95[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x9F3B, 0x67CA, 0x7A17, 0x5339, 0x758B, 0x9AED, 0x5F66, 0x819D, /* 0x40 */
0x83F1, 0x8098, 0x5F3C, 0x5FC5, 0x7562, 0x7B46, 0x903C, 0x6867, /* 0x40 */
0x59EB, 0x5A9B, 0x7D10, 0x767E, 0x8B2C, 0x4FF5, 0x5F6A, 0x6A19, /* 0x50 */
0x6C37, 0x6F02, 0x74E2, 0x7968, 0x8868, 0x8A55, 0x8C79, 0x5EDF, /* 0x50 */
0x63CF, 0x75C5, 0x79D2, 0x82D7, 0x9328, 0x92F2, 0x849C, 0x86ED, /* 0x60 */
0x9C2D, 0x54C1, 0x5F6C, 0x658C, 0x6D5C, 0x7015, 0x8CA7, 0x8CD3, /* 0x60 */
0x983B, 0x654F, 0x74F6, 0x4E0D, 0x4ED8, 0x57E0, 0x592B, 0x5A66, /* 0x70 */
0x5BCC, 0x51A8, 0x5E03, 0x5E9C, 0x6016, 0x6276, 0x6577, 0, /* 0x70 */
0x65A7, 0x666E, 0x6D6E, 0x7236, 0x7B26, 0x8150, 0x819A, 0x8299, /* 0x80 */
0x8B5C, 0x8CA0, 0x8CE6, 0x8D74, 0x961C, 0x9644, 0x4FAE, 0x64AB, /* 0x80 */
0x6B66, 0x821E, 0x8461, 0x856A, 0x90E8, 0x5C01, 0x6953, 0x98A8, /* 0x90 */
0x847A, 0x8557, 0x4F0F, 0x526F, 0x5FA9, 0x5E45, 0x670D, 0x798F, /* 0x90 */
0x8179, 0x8907, 0x8986, 0x6DF5, 0x5F17, 0x6255, 0x6CB8, 0x4ECF, /* 0xA0 */
0x7269, 0x9B92, 0x5206, 0x543B, 0x5674, 0x58B3, 0x61A4, 0x626E, /* 0xA0 */
0x711A, 0x596E, 0x7C89, 0x7CDE, 0x7D1B, 0x96F0, 0x6587, 0x805E, /* 0xB0 */
0x4E19, 0x4F75, 0x5175, 0x5840, 0x5E63, 0x5E73, 0x5F0A, 0x67C4, /* 0xB0 */
0x4E26, 0x853D, 0x9589, 0x965B, 0x7C73, 0x9801, 0x50FB, 0x58C1, /* 0xC0 */
0x7656, 0x78A7, 0x5225, 0x77A5, 0x8511, 0x7B86, 0x504F, 0x5909, /* 0xC0 */
0x7247, 0x7BC7, 0x7DE8, 0x8FBA, 0x8FD4, 0x904D, 0x4FBF, 0x52C9, /* 0xD0 */
0x5A29, 0x5F01, 0x97AD, 0x4FDD, 0x8217, 0x92EA, 0x5703, 0x6355, /* 0xD0 */
0x6B69, 0x752B, 0x88DC, 0x8F14, 0x7A42, 0x52DF, 0x5893, 0x6155, /* 0xE0 */
0x620A, 0x66AE, 0x6BCD, 0x7C3F, 0x83E9, 0x5023, 0x4FF8, 0x5305, /* 0xE0 */
0x5446, 0x5831, 0x5949, 0x5B9D, 0x5CF0, 0x5CEF, 0x5D29, 0x5E96, /* 0xF0 */
0x62B1, 0x6367, 0x653E, 0x65B9, 0x670B /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_96[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x6CD5, 0x6CE1, 0x70F9, 0x7832, 0x7E2B, 0x80DE, 0x82B3, 0x840C, /* 0x40 */
0x84EC, 0x8702, 0x8912, 0x8A2A, 0x8C4A, 0x90A6, 0x92D2, 0x98FD, /* 0x40 */
0x9CF3, 0x9D6C, 0x4E4F, 0x4EA1, 0x508D, 0x5256, 0x574A, 0x59A8, /* 0x50 */
0x5E3D, 0x5FD8, 0x5FD9, 0x623F, 0x66B4, 0x671B, 0x67D0, 0x68D2, /* 0x50 */
0x5192, 0x7D21, 0x80AA, 0x81A8, 0x8B00, 0x8C8C, 0x8CBF, 0x927E, /* 0x60 */
0x9632, 0x5420, 0x982C, 0x5317, 0x50D5, 0x535C, 0x58A8, 0x64B2, /* 0x60 */
0x6734, 0x7267, 0x7766, 0x7A46, 0x91E6, 0x52C3, 0x6CA1, 0x6B86, /* 0x70 */
0x5800, 0x5E4C, 0x5954, 0x672C, 0x7FFB, 0x51E1, 0x76C6, 0, /* 0x70 */
0x6469, 0x78E8, 0x9B54, 0x9EBB, 0x57CB, 0x59B9, 0x6627, 0x679A, /* 0x80 */
0x6BCE, 0x54E9, 0x69D9, 0x5E55, 0x819C, 0x6795, 0x9BAA, 0x67FE, /* 0x80 */
0x9C52, 0x685D, 0x4EA6, 0x4FE3, 0x53C8, 0x62B9, 0x672B, 0x6CAB, /* 0x90 */
0x8FC4, 0x4FAD, 0x7E6D, 0x9EBF, 0x4E07, 0x6162, 0x6E80, 0x6F2B, /* 0x90 */
0x8513, 0x5473, 0x672A, 0x9B45, 0x5DF3, 0x7B95, 0x5CAC, 0x5BC6, /* 0xA0 */
0x871C, 0x6E4A, 0x84D1, 0x7A14, 0x8108, 0x5999, 0x7C8D, 0x6C11, /* 0xA0 */
0x7720, 0x52D9, 0x5922, 0x7121, 0x725F, 0x77DB, 0x9727, 0x9D61, /* 0xB0 */
0x690B, 0x5A7F, 0x5A18, 0x51A5, 0x540D, 0x547D, 0x660E, 0x76DF, /* 0xB0 */
0x8FF7, 0x9298, 0x9CF4, 0x59EA, 0x725D, 0x6EC5, 0x514D, 0x68C9, /* 0xC0 */
0x7DBF, 0x7DEC, 0x9762, 0x9EBA, 0x6478, 0x6A21, 0x8302, 0x5984, /* 0xC0 */
0x5B5F, 0x6BDB, 0x731B, 0x76F2, 0x7DB2, 0x8017, 0x8499, 0x5132, /* 0xD0 */
0x6728, 0x9ED9, 0x76EE, 0x6762, 0x52FF, 0x9905, 0x5C24, 0x623B, /* 0xD0 */
0x7C7E, 0x8CB0, 0x554F, 0x60B6, 0x7D0B, 0x9580, 0x5301, 0x4E5F, /* 0xE0 */
0x51B6, 0x591C, 0x723A, 0x8036, 0x91CE, 0x5F25, 0x77E2, 0x5384, /* 0xE0 */
0x5F79, 0x7D04, 0x85AC, 0x8A33, 0x8E8D, 0x9756, 0x67F3, 0x85AE, /* 0xF0 */
0x9453, 0x6109, 0x6108, 0x6CB9, 0x7652 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_97[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x8AED, 0x8F38, 0x552F, 0x4F51, 0x512A, 0x52C7, 0x53CB, 0x5BA5, /* 0x40 */
0x5E7D, 0x60A0, 0x6182, 0x63D6, 0x6709, 0x67DA, 0x6E67, 0x6D8C, /* 0x40 */
0x7336, 0x7337, 0x7531, 0x7950, 0x88D5, 0x8A98, 0x904A, 0x9091, /* 0x50 */
0x90F5, 0x96C4, 0x878D, 0x5915, 0x4E88, 0x4F59, 0x4E0E, 0x8A89, /* 0x50 */
0x8F3F, 0x9810, 0x50AD, 0x5E7C, 0x5996, 0x5BB9, 0x5EB8, 0x63DA, /* 0x60 */
0x63FA, 0x64C1, 0x66DC, 0x694A, 0x69D8, 0x6D0B, 0x6EB6, 0x7194, /* 0x60 */
0x7528, 0x7AAF, 0x7F8A, 0x8000, 0x8449, 0x84C9, 0x8981, 0x8B21, /* 0x70 */
0x8E0A, 0x9065, 0x967D, 0x990A, 0x617E, 0x6291, 0x6B32, 0, /* 0x70 */
0x6C83, 0x6D74, 0x7FCC, 0x7FFC, 0x6DC0, 0x7F85, 0x87BA, 0x88F8, /* 0x80 */
0x6765, 0x83B1, 0x983C, 0x96F7, 0x6D1B, 0x7D61, 0x843D, 0x916A, /* 0x80 */
0x4E71, 0x5375, 0x5D50, 0x6B04, 0x6FEB, 0x85CD, 0x862D, 0x89A7, /* 0x90 */
0x5229, 0x540F, 0x5C65, 0x674E, 0x68A8, 0x7406, 0x7483, 0x75E2, /* 0x90 */
0x88CF, 0x88E1, 0x91CC, 0x96E2, 0x9678, 0x5F8B, 0x7387, 0x7ACB, /* 0xA0 */
0x844E, 0x63A0, 0x7565, 0x5289, 0x6D41, 0x6E9C, 0x7409, 0x7559, /* 0xA0 */
0x786B, 0x7C92, 0x9686, 0x7ADC, 0x9F8D, 0x4FB6, 0x616E, 0x65C5, /* 0xB0 */
0x865C, 0x4E86, 0x4EAE, 0x50DA, 0x4E21, 0x51CC, 0x5BEE, 0x6599, /* 0xB0 */
0x6881, 0x6DBC, 0x731F, 0x7642, 0x77AD, 0x7A1C, 0x7CE7, 0x826F, /* 0xC0 */
0x8AD2, 0x907C, 0x91CF, 0x9675, 0x9818, 0x529B, 0x7DD1, 0x502B, /* 0xC0 */
0x5398, 0x6797, 0x6DCB, 0x71D0, 0x7433, 0x81E8, 0x8F2A, 0x96A3, /* 0xD0 */
0x9C57, 0x9E9F, 0x7460, 0x5841, 0x6D99, 0x7D2F, 0x985E, 0x4EE4, /* 0xD0 */
0x4F36, 0x4F8B, 0x51B7, 0x52B1, 0x5DBA, 0x601C, 0x73B2, 0x793C, /* 0xE0 */
0x82D3, 0x9234, 0x96B7, 0x96F6, 0x970A, 0x9E97, 0x9F62, 0x66A6, /* 0xE0 */
0x6B74, 0x5217, 0x52A3, 0x70C8, 0x88C2, 0x5EC9, 0x604B, 0x6190, /* 0xF0 */
0x6F23, 0x7149, 0x7C3E, 0x7DF4, 0x806F /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_98[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x84EE, 0x9023, 0x932C, 0x5442, 0x9B6F, 0x6AD3, 0x7089, 0x8CC2, /* 0x40 */
0x8DEF, 0x9732, 0x52B4, 0x5A41, 0x5ECA, 0x5F04, 0x6717, 0x697C, /* 0x40 */
0x6994, 0x6D6A, 0x6F0F, 0x7262, 0x72FC, 0x7BED, 0x8001, 0x807E, /* 0x50 */
0x874B, 0x90CE, 0x516D, 0x9E93, 0x7984, 0x808B, 0x9332, 0x8AD6, /* 0x50 */
0x502D, 0x548C, 0x8A71, 0x6B6A, 0x8CC4, 0x8107, 0x60D1, 0x67A0, /* 0x60 */
0x9DF2, 0x4E99, 0x4E98, 0x9C10, 0x8A6B, 0x85C1, 0x8568, 0x6900, /* 0x60 */
0x6E7E, 0x7897, 0x8155, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */
0, 0, 0, 0, 0, 0, 0, 0x5F0C, /* 0x90 */
0x4E10, 0x4E15, 0x4E2A, 0x4E31, 0x4E36, 0x4E3C, 0x4E3F, 0x4E42, /* 0xA0 */
0x4E56, 0x4E58, 0x4E82, 0x4E85, 0x8C6B, 0x4E8A, 0x8212, 0x5F0D, /* 0xA0 */
0x4E8E, 0x4E9E, 0x4E9F, 0x4EA0, 0x4EA2, 0x4EB0, 0x4EB3, 0x4EB6, /* 0xB0 */
0x4ECE, 0x4ECD, 0x4EC4, 0x4EC6, 0x4EC2, 0x4ED7, 0x4EDE, 0x4EED, /* 0xB0 */
0x4EDF, 0x4EF7, 0x4F09, 0x4F5A, 0x4F30, 0x4F5B, 0x4F5D, 0x4F57, /* 0xC0 */
0x4F47, 0x4F76, 0x4F88, 0x4F8F, 0x4F98, 0x4F7B, 0x4F69, 0x4F70, /* 0xC0 */
0x4F91, 0x4F6F, 0x4F86, 0x4F96, 0x5118, 0x4FD4, 0x4FDF, 0x4FCE, /* 0xD0 */
0x4FD8, 0x4FDB, 0x4FD1, 0x4FDA, 0x4FD0, 0x4FE4, 0x4FE5, 0x501A, /* 0xD0 */
0x5028, 0x5014, 0x502A, 0x5025, 0x5005, 0x4F1C, 0x4FF6, 0x5021, /* 0xE0 */
0x5029, 0x502C, 0x4FFE, 0x4FEF, 0x5011, 0x5006, 0x5043, 0x5047, /* 0xE0 */
0x6703, 0x5055, 0x5050, 0x5048, 0x505A, 0x5056, 0x506C, 0x5078, /* 0xF0 */
0x5080, 0x509A, 0x5085, 0x50B4, 0x50B2 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_99[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x50C9, 0x50CA, 0x50B3, 0x50C2, 0x50D6, 0x50DE, 0x50E5, 0x50ED, /* 0x40 */
0x50E3, 0x50EE, 0x50F9, 0x50F5, 0x5109, 0x5101, 0x5102, 0x5116, /* 0x40 */
0x5115, 0x5114, 0x511A, 0x5121, 0x513A, 0x5137, 0x513C, 0x513B, /* 0x50 */
0x513F, 0x5140, 0x5152, 0x514C, 0x5154, 0x5162, 0x7AF8, 0x5169, /* 0x50 */
0x516A, 0x516E, 0x5180, 0x5182, 0x56D8, 0x518C, 0x5189, 0x518F, /* 0x60 */
0x5191, 0x5193, 0x5195, 0x5196, 0x51A4, 0x51A6, 0x51A2, 0x51A9, /* 0x60 */
0x51AA, 0x51AB, 0x51B3, 0x51B1, 0x51B2, 0x51B0, 0x51B5, 0x51BD, /* 0x70 */
0x51C5, 0x51C9, 0x51DB, 0x51E0, 0x8655, 0x51E9, 0x51ED, 0, /* 0x70 */
0x51F0, 0x51F5, 0x51FE, 0x5204, 0x520B, 0x5214, 0x520E, 0x5227, /* 0x80 */
0x522A, 0x522E, 0x5233, 0x5239, 0x524F, 0x5244, 0x524B, 0x524C, /* 0x80 */
0x525E, 0x5254, 0x526A, 0x5274, 0x5269, 0x5273, 0x527F, 0x527D, /* 0x90 */
0x528D, 0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8FA8, 0x8FA7, /* 0x90 */
0x52AC, 0x52AD, 0x52BC, 0x52B5, 0x52C1, 0x52CD, 0x52D7, 0x52DE, /* 0xA0 */
0x52E3, 0x52E6, 0x98ED, 0x52E0, 0x52F3, 0x52F5, 0x52F8, 0x52F9, /* 0xA0 */
0x5306, 0x5308, 0x7538, 0x530D, 0x5310, 0x530F, 0x5315, 0x531A, /* 0xB0 */
0x5323, 0x532F, 0x5331, 0x5333, 0x5338, 0x5340, 0x5346, 0x5345, /* 0xB0 */
0x4E17, 0x5349, 0x534D, 0x51D6, 0x535E, 0x5369, 0x536E, 0x5918, /* 0xC0 */
0x537B, 0x5377, 0x5382, 0x5396, 0x53A0, 0x53A6, 0x53A5, 0x53AE, /* 0xC0 */
0x53B0, 0x53B6, 0x53C3, 0x7C12, 0x96D9, 0x53DF, 0x66FC, 0x71EE, /* 0xD0 */
0x53EE, 0x53E8, 0x53ED, 0x53FA, 0x5401, 0x543D, 0x5440, 0x542C, /* 0xD0 */
0x542D, 0x543C, 0x542E, 0x5436, 0x5429, 0x541D, 0x544E, 0x548F, /* 0xE0 */
0x5475, 0x548E, 0x545F, 0x5471, 0x5477, 0x5470, 0x5492, 0x547B, /* 0xE0 */
0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54C7, 0x54A2, 0x54B8, /* 0xF0 */
0x54A5, 0x54AC, 0x54C4, 0x54C8, 0x54A8 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_9A[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x54AB, 0x54C2, 0x54A4, 0x54BE, 0x54BC, 0x54D8, 0x54E5, 0x54E6, /* 0x40 */
0x550F, 0x5514, 0x54FD, 0x54EE, 0x54ED, 0x54FA, 0x54E2, 0x5539, /* 0x40 */
0x5540, 0x5563, 0x554C, 0x552E, 0x555C, 0x5545, 0x5556, 0x5557, /* 0x50 */
0x5538, 0x5533, 0x555D, 0x5599, 0x5580, 0x54AF, 0x558A, 0x559F, /* 0x50 */
0x557B, 0x557E, 0x5598, 0x559E, 0x55AE, 0x557C, 0x5583, 0x55A9, /* 0x60 */
0x5587, 0x55A8, 0x55DA, 0x55C5, 0x55DF, 0x55C4, 0x55DC, 0x55E4, /* 0x60 */
0x55D4, 0x5614, 0x55F7, 0x5616, 0x55FE, 0x55FD, 0x561B, 0x55F9, /* 0x70 */
0x564E, 0x5650, 0x71DF, 0x5634, 0x5636, 0x5632, 0x5638, 0, /* 0x70 */
0x566B, 0x5664, 0x562F, 0x566C, 0x566A, 0x5686, 0x5680, 0x568A, /* 0x80 */
0x56A0, 0x5694, 0x568F, 0x56A5, 0x56AE, 0x56B6, 0x56B4, 0x56C2, /* 0x80 */
0x56BC, 0x56C1, 0x56C3, 0x56C0, 0x56C8, 0x56CE, 0x56D1, 0x56D3, /* 0x90 */
0x56D7, 0x56EE, 0x56F9, 0x5700, 0x56FF, 0x5704, 0x5709, 0x5708, /* 0x90 */
0x570B, 0x570D, 0x5713, 0x5718, 0x5716, 0x55C7, 0x571C, 0x5726, /* 0xA0 */
0x5737, 0x5738, 0x574E, 0x573B, 0x5740, 0x574F, 0x5769, 0x57C0, /* 0xA0 */
0x5788, 0x5761, 0x577F, 0x5789, 0x5793, 0x57A0, 0x57B3, 0x57A4, /* 0xB0 */
0x57AA, 0x57B0, 0x57C3, 0x57C6, 0x57D4, 0x57D2, 0x57D3, 0x580A, /* 0xB0 */
0x57D6, 0x57E3, 0x580B, 0x5819, 0x581D, 0x5872, 0x5821, 0x5862, /* 0xC0 */
0x584B, 0x5870, 0x6BC0, 0x5852, 0x583D, 0x5879, 0x5885, 0x58B9, /* 0xC0 */
0x589F, 0x58AB, 0x58BA, 0x58DE, 0x58BB, 0x58B8, 0x58AE, 0x58C5, /* 0xD0 */
0x58D3, 0x58D1, 0x58D7, 0x58D9, 0x58D8, 0x58E5, 0x58DC, 0x58E4, /* 0xD0 */
0x58DF, 0x58EF, 0x58FA, 0x58F9, 0x58FB, 0x58FC, 0x58FD, 0x5902, /* 0xE0 */
0x590A, 0x5910, 0x591B, 0x68A6, 0x5925, 0x592C, 0x592D, 0x5932, /* 0xE0 */
0x5938, 0x593E, 0x7AD2, 0x5955, 0x5950, 0x594E, 0x595A, 0x5958, /* 0xF0 */
0x5962, 0x5960, 0x5967, 0x596C, 0x5969 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_9B[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x5978, 0x5981, 0x599D, 0x4F5E, 0x4FAB, 0x59A3, 0x59B2, 0x59C6, /* 0x40 */
0x59E8, 0x59DC, 0x598D, 0x59D9, 0x59DA, 0x5A25, 0x5A1F, 0x5A11, /* 0x40 */
0x5A1C, 0x5A09, 0x5A1A, 0x5A40, 0x5A6C, 0x5A49, 0x5A35, 0x5A36, /* 0x50 */
0x5A62, 0x5A6A, 0x5A9A, 0x5ABC, 0x5ABE, 0x5ACB, 0x5AC2, 0x5ABD, /* 0x50 */
0x5AE3, 0x5AD7, 0x5AE6, 0x5AE9, 0x5AD6, 0x5AFA, 0x5AFB, 0x5B0C, /* 0x60 */
0x5B0B, 0x5B16, 0x5B32, 0x5AD0, 0x5B2A, 0x5B36, 0x5B3E, 0x5B43, /* 0x60 */
0x5B45, 0x5B40, 0x5B51, 0x5B55, 0x5B5A, 0x5B5B, 0x5B65, 0x5B69, /* 0x70 */
0x5B70, 0x5B73, 0x5B75, 0x5B78, 0x6588, 0x5B7A, 0x5B80, 0, /* 0x70 */
0x5B83, 0x5BA6, 0x5BB8, 0x5BC3, 0x5BC7, 0x5BC9, 0x5BD4, 0x5BD0, /* 0x80 */
0x5BE4, 0x5BE6, 0x5BE2, 0x5BDE, 0x5BE5, 0x5BEB, 0x5BF0, 0x5BF6, /* 0x80 */
0x5BF3, 0x5C05, 0x5C07, 0x5C08, 0x5C0D, 0x5C13, 0x5C20, 0x5C22, /* 0x90 */
0x5C28, 0x5C38, 0x5C39, 0x5C41, 0x5C46, 0x5C4E, 0x5C53, 0x5C50, /* 0x90 */
0x5C4F, 0x5B71, 0x5C6C, 0x5C6E, 0x4E62, 0x5C76, 0x5C79, 0x5C8C, /* 0xA0 */
0x5C91, 0x5C94, 0x599B, 0x5CAB, 0x5CBB, 0x5CB6, 0x5CBC, 0x5CB7, /* 0xA0 */
0x5CC5, 0x5CBE, 0x5CC7, 0x5CD9, 0x5CE9, 0x5CFD, 0x5CFA, 0x5CED, /* 0xB0 */
0x5D8C, 0x5CEA, 0x5D0B, 0x5D15, 0x5D17, 0x5D5C, 0x5D1F, 0x5D1B, /* 0xB0 */
0x5D11, 0x5D14, 0x5D22, 0x5D1A, 0x5D19, 0x5D18, 0x5D4C, 0x5D52, /* 0xC0 */
0x5D4E, 0x5D4B, 0x5D6C, 0x5D73, 0x5D76, 0x5D87, 0x5D84, 0x5D82, /* 0xC0 */
0x5DA2, 0x5D9D, 0x5DAC, 0x5DAE, 0x5DBD, 0x5D90, 0x5DB7, 0x5DBC, /* 0xD0 */
0x5DC9, 0x5DCD, 0x5DD3, 0x5DD2, 0x5DD6, 0x5DDB, 0x5DEB, 0x5DF2, /* 0xD0 */
0x5DF5, 0x5E0B, 0x5E1A, 0x5E19, 0x5E11, 0x5E1B, 0x5E36, 0x5E37, /* 0xE0 */
0x5E44, 0x5E43, 0x5E40, 0x5E4E, 0x5E57, 0x5E54, 0x5E5F, 0x5E62, /* 0xE0 */
0x5E64, 0x5E47, 0x5E75, 0x5E76, 0x5E7A, 0x9EBC, 0x5E7F, 0x5EA0, /* 0xF0 */
0x5EC1, 0x5EC2, 0x5EC8, 0x5ED0, 0x5ECF /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_9C[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x5ED6, 0x5EE3, 0x5EDD, 0x5EDA, 0x5EDB, 0x5EE2, 0x5EE1, 0x5EE8, /* 0x40 */
0x5EE9, 0x5EEC, 0x5EF1, 0x5EF3, 0x5EF0, 0x5EF4, 0x5EF8, 0x5EFE, /* 0x40 */
0x5F03, 0x5F09, 0x5F5D, 0x5F5C, 0x5F0B, 0x5F11, 0x5F16, 0x5F29, /* 0x50 */
0x5F2D, 0x5F38, 0x5F41, 0x5F48, 0x5F4C, 0x5F4E, 0x5F2F, 0x5F51, /* 0x50 */
0x5F56, 0x5F57, 0x5F59, 0x5F61, 0x5F6D, 0x5F73, 0x5F77, 0x5F83, /* 0x60 */
0x5F82, 0x5F7F, 0x5F8A, 0x5F88, 0x5F91, 0x5F87, 0x5F9E, 0x5F99, /* 0x60 */
0x5F98, 0x5FA0, 0x5FA8, 0x5FAD, 0x5FBC, 0x5FD6, 0x5FFB, 0x5FE4, /* 0x70 */
0x5FF8, 0x5FF1, 0x5FDD, 0x60B3, 0x5FFF, 0x6021, 0x6060, 0, /* 0x70 */
0x6019, 0x6010, 0x6029, 0x600E, 0x6031, 0x601B, 0x6015, 0x602B, /* 0x80 */
0x6026, 0x600F, 0x603A, 0x605A, 0x6041, 0x606A, 0x6077, 0x605F, /* 0x80 */
0x604A, 0x6046, 0x604D, 0x6063, 0x6043, 0x6064, 0x6042, 0x606C, /* 0x90 */
0x606B, 0x6059, 0x6081, 0x608D, 0x60E7, 0x6083, 0x609A, 0x6084, /* 0x90 */
0x609B, 0x6096, 0x6097, 0x6092, 0x60A7, 0x608B, 0x60E1, 0x60B8, /* 0xA0 */
0x60E0, 0x60D3, 0x60B4, 0x5FF0, 0x60BD, 0x60C6, 0x60B5, 0x60D8, /* 0xA0 */
0x614D, 0x6115, 0x6106, 0x60F6, 0x60F7, 0x6100, 0x60F4, 0x60FA, /* 0xB0 */
0x6103, 0x6121, 0x60FB, 0x60F1, 0x610D, 0x610E, 0x6147, 0x613E, /* 0xB0 */
0x6128, 0x6127, 0x614A, 0x613F, 0x613C, 0x612C, 0x6134, 0x613D, /* 0xC0 */
0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159, 0x615A, 0x616B, /* 0xC0 */
0x6174, 0x616F, 0x6165, 0x6171, 0x615F, 0x615D, 0x6153, 0x6175, /* 0xD0 */
0x6199, 0x6196, 0x6187, 0x61AC, 0x6194, 0x619A, 0x618A, 0x6191, /* 0xD0 */
0x61AB, 0x61AE, 0x61CC, 0x61CA, 0x61C9, 0x61F7, 0x61C8, 0x61C3, /* 0xE0 */
0x61C6, 0x61BA, 0x61CB, 0x7F79, 0x61CD, 0x61E6, 0x61E3, 0x61F6, /* 0xE0 */
0x61FA, 0x61F4, 0x61FF, 0x61FD, 0x61FC, 0x61FE, 0x6200, 0x6208, /* 0xF0 */
0x6209, 0x620D, 0x620C, 0x6214, 0x621B /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_9D[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x621E, 0x6221, 0x622A, 0x622E, 0x6230, 0x6232, 0x6233, 0x6241, /* 0x40 */
0x624E, 0x625E, 0x6263, 0x625B, 0x6260, 0x6268, 0x627C, 0x6282, /* 0x40 */
0x6289, 0x627E, 0x6292, 0x6293, 0x6296, 0x62D4, 0x6283, 0x6294, /* 0x50 */
0x62D7, 0x62D1, 0x62BB, 0x62CF, 0x62FF, 0x62C6, 0x64D4, 0x62C8, /* 0x50 */
0x62DC, 0x62CC, 0x62CA, 0x62C2, 0x62C7, 0x629B, 0x62C9, 0x630C, /* 0x60 */
0x62EE, 0x62F1, 0x6327, 0x6302, 0x6308, 0x62EF, 0x62F5, 0x6350, /* 0x60 */
0x633E, 0x634D, 0x641C, 0x634F, 0x6396, 0x638E, 0x6380, 0x63AB, /* 0x70 */
0x6376, 0x63A3, 0x638F, 0x6389, 0x639F, 0x63B5, 0x636B, 0, /* 0x70 */
0x6369, 0x63BE, 0x63E9, 0x63C0, 0x63C6, 0x63E3, 0x63C9, 0x63D2, /* 0x80 */
0x63F6, 0x63C4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436, /* 0x80 */
0x651D, 0x6417, 0x6428, 0x640F, 0x6467, 0x646F, 0x6476, 0x644E, /* 0x90 */
0x652A, 0x6495, 0x6493, 0x64A5, 0x64A9, 0x6488, 0x64BC, 0x64DA, /* 0x90 */
0x64D2, 0x64C5, 0x64C7, 0x64BB, 0x64D8, 0x64C2, 0x64F1, 0x64E7, /* 0xA0 */
0x8209, 0x64E0, 0x64E1, 0x62AC, 0x64E3, 0x64EF, 0x652C, 0x64F6, /* 0xA0 */
0x64F4, 0x64F2, 0x64FA, 0x6500, 0x64FD, 0x6518, 0x651C, 0x6505, /* 0xB0 */
0x6524, 0x6523, 0x652B, 0x6534, 0x6535, 0x6537, 0x6536, 0x6538, /* 0xB0 */
0x754B, 0x6548, 0x6556, 0x6555, 0x654D, 0x6558, 0x655E, 0x655D, /* 0xC0 */
0x6572, 0x6578, 0x6582, 0x6583, 0x8B8A, 0x659B, 0x659F, 0x65AB, /* 0xC0 */
0x65B7, 0x65C3, 0x65C6, 0x65C1, 0x65C4, 0x65CC, 0x65D2, 0x65DB, /* 0xD0 */
0x65D9, 0x65E0, 0x65E1, 0x65F1, 0x6772, 0x660A, 0x6603, 0x65FB, /* 0xD0 */
0x6773, 0x6635, 0x6636, 0x6634, 0x661C, 0x664F, 0x6644, 0x6649, /* 0xE0 */
0x6641, 0x665E, 0x665D, 0x6664, 0x6667, 0x6668, 0x665F, 0x6662, /* 0xE0 */
0x6670, 0x6683, 0x6688, 0x668E, 0x6689, 0x6684, 0x6698, 0x669D, /* 0xF0 */
0x66C1, 0x66B9, 0x66C9, 0x66BE, 0x66BC /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_9E[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x66C4, 0x66B8, 0x66D6, 0x66DA, 0x66E0, 0x663F, 0x66E6, 0x66E9, /* 0x40 */
0x66F0, 0x66F5, 0x66F7, 0x670F, 0x6716, 0x671E, 0x6726, 0x6727, /* 0x40 */
0x9738, 0x672E, 0x673F, 0x6736, 0x6741, 0x6738, 0x6737, 0x6746, /* 0x50 */
0x675E, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770, 0x67A9, /* 0x50 */
0x677C, 0x676A, 0x678C, 0x678B, 0x67A6, 0x67A1, 0x6785, 0x67B7, /* 0x60 */
0x67EF, 0x67B4, 0x67EC, 0x67B3, 0x67E9, 0x67B8, 0x67E4, 0x67DE, /* 0x60 */
0x67DD, 0x67E2, 0x67EE, 0x67B9, 0x67CE, 0x67C6, 0x67E7, 0x6A9C, /* 0x70 */
0x681E, 0x6846, 0x6829, 0x6840, 0x684D, 0x6832, 0x684E, 0, /* 0x70 */
0x68B3, 0x682B, 0x6859, 0x6863, 0x6877, 0x687F, 0x689F, 0x688F, /* 0x80 */
0x68AD, 0x6894, 0x689D, 0x689B, 0x6883, 0x6AAE, 0x68B9, 0x6874, /* 0x80 */
0x68B5, 0x68A0, 0x68BA, 0x690F, 0x688D, 0x687E, 0x6901, 0x68CA, /* 0x90 */
0x6908, 0x68D8, 0x6922, 0x6926, 0x68E1, 0x690C, 0x68CD, 0x68D4, /* 0x90 */
0x68E7, 0x68D5, 0x6936, 0x6912, 0x6904, 0x68D7, 0x68E3, 0x6925, /* 0xA0 */
0x68F9, 0x68E0, 0x68EF, 0x6928, 0x692A, 0x691A, 0x6923, 0x6921, /* 0xA0 */
0x68C6, 0x6979, 0x6977, 0x695C, 0x6978, 0x696B, 0x6954, 0x697E, /* 0xB0 */
0x696E, 0x6939, 0x6974, 0x693D, 0x6959, 0x6930, 0x6961, 0x695E, /* 0xB0 */
0x695D, 0x6981, 0x696A, 0x69B2, 0x69AE, 0x69D0, 0x69BF, 0x69C1, /* 0xC0 */
0x69D3, 0x69BE, 0x69CE, 0x5BE8, 0x69CA, 0x69DD, 0x69BB, 0x69C3, /* 0xC0 */
0x69A7, 0x6A2E, 0x6991, 0x69A0, 0x699C, 0x6995, 0x69B4, 0x69DE, /* 0xD0 */
0x69E8, 0x6A02, 0x6A1B, 0x69FF, 0x6B0A, 0x69F9, 0x69F2, 0x69E7, /* 0xD0 */
0x6A05, 0x69B1, 0x6A1E, 0x69ED, 0x6A14, 0x69EB, 0x6A0A, 0x6A12, /* 0xE0 */
0x6AC1, 0x6A23, 0x6A13, 0x6A44, 0x6A0C, 0x6A72, 0x6A36, 0x6A78, /* 0xE0 */
0x6A47, 0x6A62, 0x6A59, 0x6A66, 0x6A48, 0x6A38, 0x6A22, 0x6A90, /* 0xF0 */
0x6A8D, 0x6AA0, 0x6A84, 0x6AA2, 0x6AA3 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_9F[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x6A97, 0x8617, 0x6ABB, 0x6AC3, 0x6AC2, 0x6AB8, 0x6AB3, 0x6AAC, /* 0x40 */
0x6ADE, 0x6AD1, 0x6ADF, 0x6AAA, 0x6ADA, 0x6AEA, 0x6AFB, 0x6B05, /* 0x40 */
0x8616, 0x6AFA, 0x6B12, 0x6B16, 0x9B31, 0x6B1F, 0x6B38, 0x6B37, /* 0x50 */
0x76DC, 0x6B39, 0x98EE, 0x6B47, 0x6B43, 0x6B49, 0x6B50, 0x6B59, /* 0x50 */
0x6B54, 0x6B5B, 0x6B5F, 0x6B61, 0x6B78, 0x6B79, 0x6B7F, 0x6B80, /* 0x60 */
0x6B84, 0x6B83, 0x6B8D, 0x6B98, 0x6B95, 0x6B9E, 0x6BA4, 0x6BAA, /* 0x60 */
0x6BAB, 0x6BAF, 0x6BB2, 0x6BB1, 0x6BB3, 0x6BB7, 0x6BBC, 0x6BC6, /* 0x70 */
0x6BCB, 0x6BD3, 0x6BDF, 0x6BEC, 0x6BEB, 0x6BF3, 0x6BEF, 0, /* 0x70 */
0x9EBE, 0x6C08, 0x6C13, 0x6C14, 0x6C1B, 0x6C24, 0x6C23, 0x6C5E, /* 0x80 */
0x6C55, 0x6C62, 0x6C6A, 0x6C82, 0x6C8D, 0x6C9A, 0x6C81, 0x6C9B, /* 0x80 */
0x6C7E, 0x6C68, 0x6C73, 0x6C92, 0x6C90, 0x6CC4, 0x6CF1, 0x6CD3, /* 0x90 */
0x6CBD, 0x6CD7, 0x6CC5, 0x6CDD, 0x6CAE, 0x6CB1, 0x6CBE, 0x6CBA, /* 0x90 */
0x6CDB, 0x6CEF, 0x6CD9, 0x6CEA, 0x6D1F, 0x884D, 0x6D36, 0x6D2B, /* 0xA0 */
0x6D3D, 0x6D38, 0x6D19, 0x6D35, 0x6D33, 0x6D12, 0x6D0C, 0x6D63, /* 0xA0 */
0x6D93, 0x6D64, 0x6D5A, 0x6D79, 0x6D59, 0x6D8E, 0x6D95, 0x6FE4, /* 0xB0 */
0x6D85, 0x6DF9, 0x6E15, 0x6E0A, 0x6DB5, 0x6DC7, 0x6DE6, 0x6DB8, /* 0xB0 */
0x6DC6, 0x6DEC, 0x6DDE, 0x6DCC, 0x6DE8, 0x6DD2, 0x6DC5, 0x6DFA, /* 0xC0 */
0x6DD9, 0x6DE4, 0x6DD5, 0x6DEA, 0x6DEE, 0x6E2D, 0x6E6E, 0x6E2E, /* 0xC0 */
0x6E19, 0x6E72, 0x6E5F, 0x6E3E, 0x6E23, 0x6E6B, 0x6E2B, 0x6E76, /* 0xD0 */
0x6E4D, 0x6E1F, 0x6E43, 0x6E3A, 0x6E4E, 0x6E24, 0x6EFF, 0x6E1D, /* 0xD0 */
0x6E38, 0x6E82, 0x6EAA, 0x6E98, 0x6EC9, 0x6EB7, 0x6ED3, 0x6EBD, /* 0xE0 */
0x6EAF, 0x6EC4, 0x6EB2, 0x6ED4, 0x6ED5, 0x6E8F, 0x6EA5, 0x6EC2, /* 0xE0 */
0x6E9F, 0x6F41, 0x6F11, 0x704C, 0x6EEC, 0x6EF8, 0x6EFE, 0x6F3F, /* 0xF0 */
0x6EF2, 0x6F31, 0x6EEF, 0x6F32, 0x6ECC /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E0[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x6F3E, 0x6F13, 0x6EF7, 0x6F86, 0x6F7A, 0x6F78, 0x6F81, 0x6F80, /* 0x40 */
0x6F6F, 0x6F5B, 0x6FF3, 0x6F6D, 0x6F82, 0x6F7C, 0x6F58, 0x6F8E, /* 0x40 */
0x6F91, 0x6FC2, 0x6F66, 0x6FB3, 0x6FA3, 0x6FA1, 0x6FA4, 0x6FB9, /* 0x50 */
0x6FC6, 0x6FAA, 0x6FDF, 0x6FD5, 0x6FEC, 0x6FD4, 0x6FD8, 0x6FF1, /* 0x50 */
0x6FEE, 0x6FDB, 0x7009, 0x700B, 0x6FFA, 0x7011, 0x7001, 0x700F, /* 0x60 */
0x6FFE, 0x701B, 0x701A, 0x6F74, 0x701D, 0x7018, 0x701F, 0x7030, /* 0x60 */
0x703E, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70AF, 0x70F1, /* 0x70 */
0x70AC, 0x70B8, 0x70B3, 0x70AE, 0x70DF, 0x70CB, 0x70DD, 0, /* 0x70 */
0x70D9, 0x7109, 0x70FD, 0x711C, 0x7119, 0x7165, 0x7155, 0x7188, /* 0x80 */
0x7166, 0x7162, 0x714C, 0x7156, 0x716C, 0x718F, 0x71FB, 0x7184, /* 0x80 */
0x7195, 0x71A8, 0x71AC, 0x71D7, 0x71B9, 0x71BE, 0x71D2, 0x71C9, /* 0x90 */
0x71D4, 0x71CE, 0x71E0, 0x71EC, 0x71E7, 0x71F5, 0x71FC, 0x71F9, /* 0x90 */
0x71FF, 0x720D, 0x7210, 0x721B, 0x7228, 0x722D, 0x722C, 0x7230, /* 0xA0 */
0x7232, 0x723B, 0x723C, 0x723F, 0x7240, 0x7246, 0x724B, 0x7258, /* 0xA0 */
0x7274, 0x727E, 0x7282, 0x7281, 0x7287, 0x7292, 0x7296, 0x72A2, /* 0xB0 */
0x72A7, 0x72B9, 0x72B2, 0x72C3, 0x72C6, 0x72C4, 0x72CE, 0x72D2, /* 0xB0 */
0x72E2, 0x72E0, 0x72E1, 0x72F9, 0x72F7, 0x500F, 0x7317, 0x730A, /* 0xC0 */
0x731C, 0x7316, 0x731D, 0x7334, 0x732F, 0x7329, 0x7325, 0x733E, /* 0xC0 */
0x734E, 0x734F, 0x9ED8, 0x7357, 0x736A, 0x7368, 0x7370, 0x7378, /* 0xD0 */
0x7375, 0x737B, 0x737A, 0x73C8, 0x73B3, 0x73CE, 0x73BB, 0x73C0, /* 0xD0 */
0x73E5, 0x73EE, 0x73DE, 0x74A2, 0x7405, 0x746F, 0x7425, 0x73F8, /* 0xE0 */
0x7432, 0x743A, 0x7455, 0x743F, 0x745F, 0x7459, 0x7441, 0x745C, /* 0xE0 */
0x7469, 0x7470, 0x7463, 0x746A, 0x7476, 0x747E, 0x748B, 0x749E, /* 0xF0 */
0x74A7, 0x74CA, 0x74CF, 0x74D4, 0x73F1 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E1[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x74E0, 0x74E3, 0x74E7, 0x74E9, 0x74EE, 0x74F2, 0x74F0, 0x74F1, /* 0x40 */
0x74F8, 0x74F7, 0x7504, 0x7503, 0x7505, 0x750C, 0x750E, 0x750D, /* 0x40 */
0x7515, 0x7513, 0x751E, 0x7526, 0x752C, 0x753C, 0x7544, 0x754D, /* 0x50 */
0x754A, 0x7549, 0x755B, 0x7546, 0x755A, 0x7569, 0x7564, 0x7567, /* 0x50 */
0x756B, 0x756D, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574, 0x758A, /* 0x60 */
0x7589, 0x7582, 0x7594, 0x759A, 0x759D, 0x75A5, 0x75A3, 0x75C2, /* 0x60 */
0x75B3, 0x75C3, 0x75B5, 0x75BD, 0x75B8, 0x75BC, 0x75B1, 0x75CD, /* 0x70 */
0x75CA, 0x75D2, 0x75D9, 0x75E3, 0x75DE, 0x75FE, 0x75FF, 0, /* 0x70 */
0x75FC, 0x7601, 0x75F0, 0x75FA, 0x75F2, 0x75F3, 0x760B, 0x760D, /* 0x80 */
0x7609, 0x761F, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634, /* 0x80 */
0x7630, 0x763B, 0x7647, 0x7648, 0x7646, 0x765C, 0x7658, 0x7661, /* 0x90 */
0x7662, 0x7668, 0x7669, 0x766A, 0x7667, 0x766C, 0x7670, 0x7672, /* 0x90 */
0x7676, 0x7678, 0x767C, 0x7680, 0x7683, 0x7688, 0x768B, 0x768E, /* 0xA0 */
0x7696, 0x7693, 0x7699, 0x769A, 0x76B0, 0x76B4, 0x76B8, 0x76B9, /* 0xA0 */
0x76BA, 0x76C2, 0x76CD, 0x76D6, 0x76D2, 0x76DE, 0x76E1, 0x76E5, /* 0xB0 */
0x76E7, 0x76EA, 0x862F, 0x76FB, 0x7708, 0x7707, 0x7704, 0x7729, /* 0xB0 */
0x7724, 0x771E, 0x7725, 0x7726, 0x771B, 0x7737, 0x7738, 0x7747, /* 0xC0 */
0x775A, 0x7768, 0x776B, 0x775B, 0x7765, 0x777F, 0x777E, 0x7779, /* 0xC0 */
0x778E, 0x778B, 0x7791, 0x77A0, 0x779E, 0x77B0, 0x77B6, 0x77B9, /* 0xD0 */
0x77BF, 0x77BC, 0x77BD, 0x77BB, 0x77C7, 0x77CD, 0x77D7, 0x77DA, /* 0xD0 */
0x77DC, 0x77E3, 0x77EE, 0x77FC, 0x780C, 0x7812, 0x7926, 0x7820, /* 0xE0 */
0x792A, 0x7845, 0x788E, 0x7874, 0x7886, 0x787C, 0x789A, 0x788C, /* 0xE0 */
0x78A3, 0x78B5, 0x78AA, 0x78AF, 0x78D1, 0x78C6, 0x78CB, 0x78D4, /* 0xF0 */
0x78BE, 0x78BC, 0x78C5, 0x78CA, 0x78EC /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E2[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x78E7, 0x78DA, 0x78FD, 0x78F4, 0x7907, 0x7912, 0x7911, 0x7919, /* 0x40 */
0x792C, 0x792B, 0x7940, 0x7960, 0x7957, 0x795F, 0x795A, 0x7955, /* 0x40 */
0x7953, 0x797A, 0x797F, 0x798A, 0x799D, 0x79A7, 0x9F4B, 0x79AA, /* 0x50 */
0x79AE, 0x79B3, 0x79B9, 0x79BA, 0x79C9, 0x79D5, 0x79E7, 0x79EC, /* 0x50 */
0x79E1, 0x79E3, 0x7A08, 0x7A0D, 0x7A18, 0x7A19, 0x7A20, 0x7A1F, /* 0x60 */
0x7980, 0x7A31, 0x7A3B, 0x7A3E, 0x7A37, 0x7A43, 0x7A57, 0x7A49, /* 0x60 */
0x7A61, 0x7A62, 0x7A69, 0x9F9D, 0x7A70, 0x7A79, 0x7A7D, 0x7A88, /* 0x70 */
0x7A97, 0x7A95, 0x7A98, 0x7A96, 0x7AA9, 0x7AC8, 0x7AB0, 0, /* 0x70 */
0x7AB6, 0x7AC5, 0x7AC4, 0x7ABF, 0x9083, 0x7AC7, 0x7ACA, 0x7ACD, /* 0x80 */
0x7ACF, 0x7AD5, 0x7AD3, 0x7AD9, 0x7ADA, 0x7ADD, 0x7AE1, 0x7AE2, /* 0x80 */
0x7AE6, 0x7AED, 0x7AF0, 0x7B02, 0x7B0F, 0x7B0A, 0x7B06, 0x7B33, /* 0x90 */
0x7B18, 0x7B19, 0x7B1E, 0x7B35, 0x7B28, 0x7B36, 0x7B50, 0x7B7A, /* 0x90 */
0x7B04, 0x7B4D, 0x7B0B, 0x7B4C, 0x7B45, 0x7B75, 0x7B65, 0x7B74, /* 0xA0 */
0x7B67, 0x7B70, 0x7B71, 0x7B6C, 0x7B6E, 0x7B9D, 0x7B98, 0x7B9F, /* 0xA0 */
0x7B8D, 0x7B9C, 0x7B9A, 0x7B8B, 0x7B92, 0x7B8F, 0x7B5D, 0x7B99, /* 0xB0 */
0x7BCB, 0x7BC1, 0x7BCC, 0x7BCF, 0x7BB4, 0x7BC6, 0x7BDD, 0x7BE9, /* 0xB0 */
0x7C11, 0x7C14, 0x7BE6, 0x7BE5, 0x7C60, 0x7C00, 0x7C07, 0x7C13, /* 0xC0 */
0x7BF3, 0x7BF7, 0x7C17, 0x7C0D, 0x7BF6, 0x7C23, 0x7C27, 0x7C2A, /* 0xC0 */
0x7C1F, 0x7C37, 0x7C2B, 0x7C3D, 0x7C4C, 0x7C43, 0x7C54, 0x7C4F, /* 0xD0 */
0x7C40, 0x7C50, 0x7C58, 0x7C5F, 0x7C64, 0x7C56, 0x7C65, 0x7C6C, /* 0xD0 */
0x7C75, 0x7C83, 0x7C90, 0x7CA4, 0x7CAD, 0x7CA2, 0x7CAB, 0x7CA1, /* 0xE0 */
0x7CA8, 0x7CB3, 0x7CB2, 0x7CB1, 0x7CAE, 0x7CB9, 0x7CBD, 0x7CC0, /* 0xE0 */
0x7CC5, 0x7CC2, 0x7CD8, 0x7CD2, 0x7CDC, 0x7CE2, 0x9B3B, 0x7CEF, /* 0xF0 */
0x7CF2, 0x7CF4, 0x7CF6, 0x7CFA, 0x7D06 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E3[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x7D02, 0x7D1C, 0x7D15, 0x7D0A, 0x7D45, 0x7D4B, 0x7D2E, 0x7D32, /* 0x40 */
0x7D3F, 0x7D35, 0x7D46, 0x7D73, 0x7D56, 0x7D4E, 0x7D72, 0x7D68, /* 0x40 */
0x7D6E, 0x7D4F, 0x7D63, 0x7D93, 0x7D89, 0x7D5B, 0x7D8F, 0x7D7D, /* 0x50 */
0x7D9B, 0x7DBA, 0x7DAE, 0x7DA3, 0x7DB5, 0x7DC7, 0x7DBD, 0x7DAB, /* 0x50 */
0x7E3D, 0x7DA2, 0x7DAF, 0x7DDC, 0x7DB8, 0x7D9F, 0x7DB0, 0x7DD8, /* 0x60 */
0x7DDD, 0x7DE4, 0x7DDE, 0x7DFB, 0x7DF2, 0x7DE1, 0x7E05, 0x7E0A, /* 0x60 */
0x7E23, 0x7E21, 0x7E12, 0x7E31, 0x7E1F, 0x7E09, 0x7E0B, 0x7E22, /* 0x70 */
0x7E46, 0x7E66, 0x7E3B, 0x7E35, 0x7E39, 0x7E43, 0x7E37, 0, /* 0x70 */
0x7E32, 0x7E3A, 0x7E67, 0x7E5D, 0x7E56, 0x7E5E, 0x7E59, 0x7E5A, /* 0x80 */
0x7E79, 0x7E6A, 0x7E69, 0x7E7C, 0x7E7B, 0x7E83, 0x7DD5, 0x7E7D, /* 0x80 */
0x8FAE, 0x7E7F, 0x7E88, 0x7E89, 0x7E8C, 0x7E92, 0x7E90, 0x7E93, /* 0x90 */
0x7E94, 0x7E96, 0x7E8E, 0x7E9B, 0x7E9C, 0x7F38, 0x7F3A, 0x7F45, /* 0x90 */
0x7F4C, 0x7F4D, 0x7F4E, 0x7F50, 0x7F51, 0x7F55, 0x7F54, 0x7F58, /* 0xA0 */
0x7F5F, 0x7F60, 0x7F68, 0x7F69, 0x7F67, 0x7F78, 0x7F82, 0x7F86, /* 0xA0 */
0x7F83, 0x7F88, 0x7F87, 0x7F8C, 0x7F94, 0x7F9E, 0x7F9D, 0x7F9A, /* 0xB0 */
0x7FA3, 0x7FAF, 0x7FB2, 0x7FB9, 0x7FAE, 0x7FB6, 0x7FB8, 0x8B71, /* 0xB0 */
0x7FC5, 0x7FC6, 0x7FCA, 0x7FD5, 0x7FD4, 0x7FE1, 0x7FE6, 0x7FE9, /* 0xC0 */
0x7FF3, 0x7FF9, 0x98DC, 0x8006, 0x8004, 0x800B, 0x8012, 0x8018, /* 0xC0 */
0x8019, 0x801C, 0x8021, 0x8028, 0x803F, 0x803B, 0x804A, 0x8046, /* 0xD0 */
0x8052, 0x8058, 0x805A, 0x805F, 0x8062, 0x8068, 0x8073, 0x8072, /* 0xD0 */
0x8070, 0x8076, 0x8079, 0x807D, 0x807F, 0x8084, 0x8086, 0x8085, /* 0xE0 */
0x809B, 0x8093, 0x809A, 0x80AD, 0x5190, 0x80AC, 0x80DB, 0x80E5, /* 0xE0 */
0x80D9, 0x80DD, 0x80C4, 0x80DA, 0x80D6, 0x8109, 0x80EF, 0x80F1, /* 0xF0 */
0x811B, 0x8129, 0x8123, 0x812F, 0x814B /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E4[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x968B, 0x8146, 0x813E, 0x8153, 0x8151, 0x80FC, 0x8171, 0x816E, /* 0x40 */
0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818A, 0x8180, 0x8182, /* 0x40 */
0x81A0, 0x8195, 0x81A4, 0x81A3, 0x815F, 0x8193, 0x81A9, 0x81B0, /* 0x50 */
0x81B5, 0x81BE, 0x81B8, 0x81BD, 0x81C0, 0x81C2, 0x81BA, 0x81C9, /* 0x50 */
0x81CD, 0x81D1, 0x81D9, 0x81D8, 0x81C8, 0x81DA, 0x81DF, 0x81E0, /* 0x60 */
0x81E7, 0x81FA, 0x81FB, 0x81FE, 0x8201, 0x8202, 0x8205, 0x8207, /* 0x60 */
0x820A, 0x820D, 0x8210, 0x8216, 0x8229, 0x822B, 0x8238, 0x8233, /* 0x70 */
0x8240, 0x8259, 0x8258, 0x825D, 0x825A, 0x825F, 0x8264, 0, /* 0x70 */
0x8262, 0x8268, 0x826A, 0x826B, 0x822E, 0x8271, 0x8277, 0x8278, /* 0x80 */
0x827E, 0x828D, 0x8292, 0x82AB, 0x829F, 0x82BB, 0x82AC, 0x82E1, /* 0x80 */
0x82E3, 0x82DF, 0x82D2, 0x82F4, 0x82F3, 0x82FA, 0x8393, 0x8303, /* 0x90 */
0x82FB, 0x82F9, 0x82DE, 0x8306, 0x82DC, 0x8309, 0x82D9, 0x8335, /* 0x90 */
0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339, 0x8350, 0x8345, /* 0xA0 */
0x832F, 0x832B, 0x8317, 0x8318, 0x8385, 0x839A, 0x83AA, 0x839F, /* 0xA0 */
0x83A2, 0x8396, 0x8323, 0x838E, 0x8387, 0x838A, 0x837C, 0x83B5, /* 0xB0 */
0x8373, 0x8375, 0x83A0, 0x8389, 0x83A8, 0x83F4, 0x8413, 0x83EB, /* 0xB0 */
0x83CE, 0x83FD, 0x8403, 0x83D8, 0x840B, 0x83C1, 0x83F7, 0x8407, /* 0xC0 */
0x83E0, 0x83F2, 0x840D, 0x8422, 0x8420, 0x83BD, 0x8438, 0x8506, /* 0xC0 */
0x83FB, 0x846D, 0x842A, 0x843C, 0x855A, 0x8484, 0x8477, 0x846B, /* 0xD0 */
0x84AD, 0x846E, 0x8482, 0x8469, 0x8446, 0x842C, 0x846F, 0x8479, /* 0xD0 */
0x8435, 0x84CA, 0x8462, 0x84B9, 0x84BF, 0x849F, 0x84D9, 0x84CD, /* 0xE0 */
0x84BB, 0x84DA, 0x84D0, 0x84C1, 0x84C6, 0x84D6, 0x84A1, 0x8521, /* 0xE0 */
0x84FF, 0x84F4, 0x8517, 0x8518, 0x852C, 0x851F, 0x8515, 0x8514, /* 0xF0 */
0x84FC, 0x8540, 0x8563, 0x8558, 0x8548 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E5[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x8541, 0x8602, 0x854B, 0x8555, 0x8580, 0x85A4, 0x8588, 0x8591, /* 0x40 */
0x858A, 0x85A8, 0x856D, 0x8594, 0x859B, 0x85EA, 0x8587, 0x859C, /* 0x40 */
0x8577, 0x857E, 0x8590, 0x85C9, 0x85BA, 0x85CF, 0x85B9, 0x85D0, /* 0x50 */
0x85D5, 0x85DD, 0x85E5, 0x85DC, 0x85F9, 0x860A, 0x8613, 0x860B, /* 0x50 */
0x85FE, 0x85FA, 0x8606, 0x8622, 0x861A, 0x8630, 0x863F, 0x864D, /* 0x60 */
0x4E55, 0x8654, 0x865F, 0x8667, 0x8671, 0x8693, 0x86A3, 0x86A9, /* 0x60 */
0x86AA, 0x868B, 0x868C, 0x86B6, 0x86AF, 0x86C4, 0x86C6, 0x86B0, /* 0x70 */
0x86C9, 0x8823, 0x86AB, 0x86D4, 0x86DE, 0x86E9, 0x86EC, 0, /* 0x70 */
0x86DF, 0x86DB, 0x86EF, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703, /* 0x80 */
0x86FB, 0x8711, 0x8709, 0x870D, 0x86F9, 0x870A, 0x8734, 0x873F, /* 0x80 */
0x8737, 0x873B, 0x8725, 0x8729, 0x871A, 0x8760, 0x875F, 0x8778, /* 0x90 */
0x874C, 0x874E, 0x8774, 0x8757, 0x8768, 0x876E, 0x8759, 0x8753, /* 0x90 */
0x8763, 0x876A, 0x8805, 0x87A2, 0x879F, 0x8782, 0x87AF, 0x87CB, /* 0xA0 */
0x87BD, 0x87C0, 0x87D0, 0x96D6, 0x87AB, 0x87C4, 0x87B3, 0x87C7, /* 0xA0 */
0x87C6, 0x87BB, 0x87EF, 0x87F2, 0x87E0, 0x880F, 0x880D, 0x87FE, /* 0xB0 */
0x87F6, 0x87F7, 0x880E, 0x87D2, 0x8811, 0x8816, 0x8815, 0x8822, /* 0xB0 */
0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883B, 0x8844, 0x8842, /* 0xC0 */
0x8852, 0x8859, 0x885E, 0x8862, 0x886B, 0x8881, 0x887E, 0x889E, /* 0xC0 */
0x8875, 0x887D, 0x88B5, 0x8872, 0x8882, 0x8897, 0x8892, 0x88AE, /* 0xD0 */
0x8899, 0x88A2, 0x888D, 0x88A4, 0x88B0, 0x88BF, 0x88B1, 0x88C3, /* 0xD0 */
0x88C4, 0x88D4, 0x88D8, 0x88D9, 0x88DD, 0x88F9, 0x8902, 0x88FC, /* 0xE0 */
0x88F4, 0x88E8, 0x88F2, 0x8904, 0x890C, 0x890A, 0x8913, 0x8943, /* 0xE0 */
0x891E, 0x8925, 0x892A, 0x892B, 0x8941, 0x8944, 0x893B, 0x8936, /* 0xF0 */
0x8938, 0x894C, 0x891D, 0x8960, 0x895E /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E6[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x8966, 0x8964, 0x896D, 0x896A, 0x896F, 0x8974, 0x8977, 0x897E, /* 0x40 */
0x8983, 0x8988, 0x898A, 0x8993, 0x8998, 0x89A1, 0x89A9, 0x89A6, /* 0x40 */
0x89AC, 0x89AF, 0x89B2, 0x89BA, 0x89BD, 0x89BF, 0x89C0, 0x89DA, /* 0x50 */
0x89DC, 0x89DD, 0x89E7, 0x89F4, 0x89F8, 0x8A03, 0x8A16, 0x8A10, /* 0x50 */
0x8A0C, 0x8A1B, 0x8A1D, 0x8A25, 0x8A36, 0x8A41, 0x8A5B, 0x8A52, /* 0x60 */
0x8A46, 0x8A48, 0x8A7C, 0x8A6D, 0x8A6C, 0x8A62, 0x8A85, 0x8A82, /* 0x60 */
0x8A84, 0x8AA8, 0x8AA1, 0x8A91, 0x8AA5, 0x8AA6, 0x8A9A, 0x8AA3, /* 0x70 */
0x8AC4, 0x8ACD, 0x8AC2, 0x8ADA, 0x8AEB, 0x8AF3, 0x8AE7, 0, /* 0x70 */
0x8AE4, 0x8AF1, 0x8B14, 0x8AE0, 0x8AE2, 0x8AF7, 0x8ADE, 0x8ADB, /* 0x80 */
0x8B0C, 0x8B07, 0x8B1A, 0x8AE1, 0x8B16, 0x8B10, 0x8B17, 0x8B20, /* 0x80 */
0x8B33, 0x97AB, 0x8B26, 0x8B2B, 0x8B3E, 0x8B28, 0x8B41, 0x8B4C, /* 0x90 */
0x8B4F, 0x8B4E, 0x8B49, 0x8B56, 0x8B5B, 0x8B5A, 0x8B6B, 0x8B5F, /* 0x90 */
0x8B6C, 0x8B6F, 0x8B74, 0x8B7D, 0x8B80, 0x8B8C, 0x8B8E, 0x8B92, /* 0xA0 */
0x8B93, 0x8B96, 0x8B99, 0x8B9A, 0x8C3A, 0x8C41, 0x8C3F, 0x8C48, /* 0xA0 */
0x8C4C, 0x8C4E, 0x8C50, 0x8C55, 0x8C62, 0x8C6C, 0x8C78, 0x8C7A, /* 0xB0 */
0x8C82, 0x8C89, 0x8C85, 0x8C8A, 0x8C8D, 0x8C8E, 0x8C94, 0x8C7C, /* 0xB0 */
0x8C98, 0x621D, 0x8CAD, 0x8CAA, 0x8CBD, 0x8CB2, 0x8CB3, 0x8CAE, /* 0xC0 */
0x8CB6, 0x8CC8, 0x8CC1, 0x8CE4, 0x8CE3, 0x8CDA, 0x8CFD, 0x8CFA, /* 0xC0 */
0x8CFB, 0x8D04, 0x8D05, 0x8D0A, 0x8D07, 0x8D0F, 0x8D0D, 0x8D10, /* 0xD0 */
0x9F4E, 0x8D13, 0x8CCD, 0x8D14, 0x8D16, 0x8D67, 0x8D6D, 0x8D71, /* 0xD0 */
0x8D73, 0x8D81, 0x8D99, 0x8DC2, 0x8DBE, 0x8DBA, 0x8DCF, 0x8DDA, /* 0xE0 */
0x8DD6, 0x8DCC, 0x8DDB, 0x8DCB, 0x8DEA, 0x8DEB, 0x8DDF, 0x8DE3, /* 0xE0 */
0x8DFC, 0x8E08, 0x8E09, 0x8DFF, 0x8E1D, 0x8E1E, 0x8E10, 0x8E1F, /* 0xF0 */
0x8E42, 0x8E35, 0x8E30, 0x8E34, 0x8E4A /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E7[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x8E47, 0x8E49, 0x8E4C, 0x8E50, 0x8E48, 0x8E59, 0x8E64, 0x8E60, /* 0x40 */
0x8E2A, 0x8E63, 0x8E55, 0x8E76, 0x8E72, 0x8E7C, 0x8E81, 0x8E87, /* 0x40 */
0x8E85, 0x8E84, 0x8E8B, 0x8E8A, 0x8E93, 0x8E91, 0x8E94, 0x8E99, /* 0x50 */
0x8EAA, 0x8EA1, 0x8EAC, 0x8EB0, 0x8EC6, 0x8EB1, 0x8EBE, 0x8EC5, /* 0x50 */
0x8EC8, 0x8ECB, 0x8EDB, 0x8EE3, 0x8EFC, 0x8EFB, 0x8EEB, 0x8EFE, /* 0x60 */
0x8F0A, 0x8F05, 0x8F15, 0x8F12, 0x8F19, 0x8F13, 0x8F1C, 0x8F1F, /* 0x60 */
0x8F1B, 0x8F0C, 0x8F26, 0x8F33, 0x8F3B, 0x8F39, 0x8F45, 0x8F42, /* 0x70 */
0x8F3E, 0x8F4C, 0x8F49, 0x8F46, 0x8F4E, 0x8F57, 0x8F5C, 0, /* 0x70 */
0x8F62, 0x8F63, 0x8F64, 0x8F9C, 0x8F9F, 0x8FA3, 0x8FAD, 0x8FAF, /* 0x80 */
0x8FB7, 0x8FDA, 0x8FE5, 0x8FE2, 0x8FEA, 0x8FEF, 0x9087, 0x8FF4, /* 0x80 */
0x9005, 0x8FF9, 0x8FFA, 0x9011, 0x9015, 0x9021, 0x900D, 0x901E, /* 0x90 */
0x9016, 0x900B, 0x9027, 0x9036, 0x9035, 0x9039, 0x8FF8, 0x904F, /* 0x90 */
0x9050, 0x9051, 0x9052, 0x900E, 0x9049, 0x903E, 0x9056, 0x9058, /* 0xA0 */
0x905E, 0x9068, 0x906F, 0x9076, 0x96A8, 0x9072, 0x9082, 0x907D, /* 0xA0 */
0x9081, 0x9080, 0x908A, 0x9089, 0x908F, 0x90A8, 0x90AF, 0x90B1, /* 0xB0 */
0x90B5, 0x90E2, 0x90E4, 0x6248, 0x90DB, 0x9102, 0x9112, 0x9119, /* 0xB0 */
0x9132, 0x9130, 0x914A, 0x9156, 0x9158, 0x9163, 0x9165, 0x9169, /* 0xC0 */
0x9173, 0x9172, 0x918B, 0x9189, 0x9182, 0x91A2, 0x91AB, 0x91AF, /* 0xC0 */
0x91AA, 0x91B5, 0x91B4, 0x91BA, 0x91C0, 0x91C1, 0x91C9, 0x91CB, /* 0xD0 */
0x91D0, 0x91D6, 0x91DF, 0x91E1, 0x91DB, 0x91FC, 0x91F5, 0x91F6, /* 0xD0 */
0x921E, 0x91FF, 0x9214, 0x922C, 0x9215, 0x9211, 0x925E, 0x9257, /* 0xE0 */
0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923F, 0x924B, 0x9250, /* 0xE0 */
0x929C, 0x9296, 0x9293, 0x929B, 0x925A, 0x92CF, 0x92B9, 0x92B7, /* 0xF0 */
0x92E9, 0x930F, 0x92FA, 0x9344, 0x932E /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E8[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x9319, 0x9322, 0x931A, 0x9323, 0x933A, 0x9335, 0x933B, 0x935C, /* 0x40 */
0x9360, 0x937C, 0x936E, 0x9356, 0x93B0, 0x93AC, 0x93AD, 0x9394, /* 0x40 */
0x93B9, 0x93D6, 0x93D7, 0x93E8, 0x93E5, 0x93D8, 0x93C3, 0x93DD, /* 0x50 */
0x93D0, 0x93C8, 0x93E4, 0x941A, 0x9414, 0x9413, 0x9403, 0x9407, /* 0x50 */
0x9410, 0x9436, 0x942B, 0x9435, 0x9421, 0x943A, 0x9441, 0x9452, /* 0x60 */
0x9444, 0x945B, 0x9460, 0x9462, 0x945E, 0x946A, 0x9229, 0x9470, /* 0x60 */
0x9475, 0x9477, 0x947D, 0x945A, 0x947C, 0x947E, 0x9481, 0x947F, /* 0x70 */
0x9582, 0x9587, 0x958A, 0x9594, 0x9596, 0x9598, 0x9599, 0, /* 0x70 */
0x95A0, 0x95A8, 0x95A7, 0x95AD, 0x95BC, 0x95BB, 0x95B9, 0x95BE, /* 0x80 */
0x95CA, 0x6FF6, 0x95C3, 0x95CD, 0x95CC, 0x95D5, 0x95D4, 0x95D6, /* 0x80 */
0x95DC, 0x95E1, 0x95E5, 0x95E2, 0x9621, 0x9628, 0x962E, 0x962F, /* 0x90 */
0x9642, 0x964C, 0x964F, 0x964B, 0x9677, 0x965C, 0x965E, 0x965D, /* 0x90 */
0x965F, 0x9666, 0x9672, 0x966C, 0x968D, 0x9698, 0x9695, 0x9697, /* 0xA0 */
0x96AA, 0x96A7, 0x96B1, 0x96B2, 0x96B0, 0x96B4, 0x96B6, 0x96B8, /* 0xA0 */
0x96B9, 0x96CE, 0x96CB, 0x96C9, 0x96CD, 0x894D, 0x96DC, 0x970D, /* 0xB0 */
0x96D5, 0x96F9, 0x9704, 0x9706, 0x9708, 0x9713, 0x970E, 0x9711, /* 0xB0 */
0x970F, 0x9716, 0x9719, 0x9724, 0x972A, 0x9730, 0x9739, 0x973D, /* 0xC0 */
0x973E, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749, 0x975C, 0x9760, /* 0xC0 */
0x9764, 0x9766, 0x9768, 0x52D2, 0x976B, 0x9771, 0x9779, 0x9785, /* 0xD0 */
0x977C, 0x9781, 0x977A, 0x9786, 0x978B, 0x978F, 0x9790, 0x979C, /* 0xD0 */
0x97A8, 0x97A6, 0x97A3, 0x97B3, 0x97B4, 0x97C3, 0x97C6, 0x97C8, /* 0xE0 */
0x97CB, 0x97DC, 0x97ED, 0x9F4F, 0x97F2, 0x7ADF, 0x97F6, 0x97F5, /* 0xE0 */
0x980F, 0x980C, 0x9838, 0x9824, 0x9821, 0x9837, 0x983D, 0x9846, /* 0xF0 */
0x984F, 0x984B, 0x986B, 0x986F, 0x9870 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_E9[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x9871, 0x9874, 0x9873, 0x98AA, 0x98AF, 0x98B1, 0x98B6, 0x98C4, /* 0x40 */
0x98C3, 0x98C6, 0x98E9, 0x98EB, 0x9903, 0x9909, 0x9912, 0x9914, /* 0x40 */
0x9918, 0x9921, 0x991D, 0x991E, 0x9924, 0x9920, 0x992C, 0x992E, /* 0x50 */
0x993D, 0x993E, 0x9942, 0x9949, 0x9945, 0x9950, 0x994B, 0x9951, /* 0x50 */
0x9952, 0x994C, 0x9955, 0x9997, 0x9998, 0x99A5, 0x99AD, 0x99AE, /* 0x60 */
0x99BC, 0x99DF, 0x99DB, 0x99DD, 0x99D8, 0x99D1, 0x99ED, 0x99EE, /* 0x60 */
0x99F1, 0x99F2, 0x99FB, 0x99F8, 0x9A01, 0x9A0F, 0x9A05, 0x99E2, /* 0x70 */
0x9A19, 0x9A2B, 0x9A37, 0x9A45, 0x9A42, 0x9A40, 0x9A43, 0, /* 0x70 */
0x9A3E, 0x9A55, 0x9A4D, 0x9A5B, 0x9A57, 0x9A5F, 0x9A62, 0x9A65, /* 0x80 */
0x9A64, 0x9A69, 0x9A6B, 0x9A6A, 0x9AAD, 0x9AB0, 0x9ABC, 0x9AC0, /* 0x80 */
0x9ACF, 0x9AD1, 0x9AD3, 0x9AD4, 0x9ADE, 0x9ADF, 0x9AE2, 0x9AE3, /* 0x90 */
0x9AE6, 0x9AEF, 0x9AEB, 0x9AEE, 0x9AF4, 0x9AF1, 0x9AF7, 0x9AFB, /* 0x90 */
0x9B06, 0x9B18, 0x9B1A, 0x9B1F, 0x9B22, 0x9B23, 0x9B25, 0x9B27, /* 0xA0 */
0x9B28, 0x9B29, 0x9B2A, 0x9B2E, 0x9B2F, 0x9B32, 0x9B44, 0x9B43, /* 0xA0 */
0x9B4F, 0x9B4D, 0x9B4E, 0x9B51, 0x9B58, 0x9B74, 0x9B93, 0x9B83, /* 0xB0 */
0x9B91, 0x9B96, 0x9B97, 0x9B9F, 0x9BA0, 0x9BA8, 0x9BB4, 0x9BC0, /* 0xB0 */
0x9BCA, 0x9BB9, 0x9BC6, 0x9BCF, 0x9BD1, 0x9BD2, 0x9BE3, 0x9BE2, /* 0xC0 */
0x9BE4, 0x9BD4, 0x9BE1, 0x9C3A, 0x9BF2, 0x9BF1, 0x9BF0, 0x9C15, /* 0xC0 */
0x9C14, 0x9C09, 0x9C13, 0x9C0C, 0x9C06, 0x9C08, 0x9C12, 0x9C0A, /* 0xD0 */
0x9C04, 0x9C2E, 0x9C1B, 0x9C25, 0x9C24, 0x9C21, 0x9C30, 0x9C47, /* 0xD0 */
0x9C32, 0x9C46, 0x9C3E, 0x9C5A, 0x9C60, 0x9C67, 0x9C76, 0x9C78, /* 0xE0 */
0x9CE7, 0x9CEC, 0x9CF0, 0x9D09, 0x9D08, 0x9CEB, 0x9D03, 0x9D06, /* 0xE0 */
0x9D2A, 0x9D26, 0x9DAF, 0x9D23, 0x9D1F, 0x9D44, 0x9D15, 0x9D12, /* 0xF0 */
0x9D41, 0x9D3F, 0x9D3E, 0x9D46, 0x9D48 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_SJIS_EA[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x9D5D, 0x9D5E, 0x9D64, 0x9D51, 0x9D50, 0x9D59, 0x9D72, 0x9D89, /* 0x40 */
0x9D87, 0x9DAB, 0x9D6F, 0x9D7A, 0x9D9A, 0x9DA4, 0x9DA9, 0x9DB2, /* 0x40 */
0x9DC4, 0x9DC1, 0x9DBB, 0x9DB8, 0x9DBA, 0x9DC6, 0x9DCF, 0x9DC2, /* 0x50 */
0x9DD9, 0x9DD3, 0x9DF8, 0x9DE6, 0x9DED, 0x9DEF, 0x9DFD, 0x9E1A, /* 0x50 */
0x9E1B, 0x9E1E, 0x9E75, 0x9E79, 0x9E7D, 0x9E81, 0x9E88, 0x9E8B, /* 0x60 */
0x9E8C, 0x9E92, 0x9E95, 0x9E91, 0x9E9D, 0x9EA5, 0x9EA9, 0x9EB8, /* 0x60 */
0x9EAA, 0x9EAD, 0x9761, 0x9ECC, 0x9ECE, 0x9ECF, 0x9ED0, 0x9ED4, /* 0x70 */
0x9EDC, 0x9EDE, 0x9EDD, 0x9EE0, 0x9EE5, 0x9EE8, 0x9EEF, 0, /* 0x70 */
0x9EF4, 0x9EF6, 0x9EF7, 0x9EF9, 0x9EFB, 0x9EFC, 0x9EFD, 0x9F07, /* 0x80 */
0x9F08, 0x76B7, 0x9F15, 0x9F21, 0x9F2C, 0x9F3E, 0x9F4A, 0x9F52, /* 0x80 */
0x9F54, 0x9F63, 0x9F5F, 0x9F60, 0x9F61, 0x9F66, 0x9F67, 0x9F6C, /* 0x90 */
0x9F6A, 0x9F77, 0x9F72, 0x9F76, 0x9F95, 0x9F9C, 0x9FA0, 0x582F, /* 0x90 */
0x69C7, 0x9059, 0x7464, 0x51DC, 0x7199 /* 0xA0 */
/* 0xA0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_APPLEJAPANESE_EB[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0xFE33, 0, 0, 0, 0, 0, 0, /* 0x50 */
0, 0, 0, 0, 0xFE31, 0, 0, 0, /* 0x50 */
0, 0, 0, 0, 0xFE30, 0, 0, 0, /* 0x60 */
0, 0xFE35, 0xFE36, 0xFE39, 0xFE3A, 0, 0, 0xFE37, /* 0x60 */
0xFE38, 0xFE3F, 0xFE40, 0xFE3D, 0xFE3E, 0xFE41, 0xFE42, 0xFE43, /* 0x70 */
0xFE44, 0xFE3B, 0xFE3C /* 0x70 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_MS932_ED[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x7E8A, 0x891C, 0x9348, 0x9288, 0x84DC, 0x4FC9, 0x70BB, 0x6631, /* 0x40 */
0x68C8, 0x92F9, 0x66FB, 0x5F45, 0x4E28, 0x4EE1, 0x4EFC, 0x4F00, /* 0x40 */
0x4F03, 0x4F39, 0x4F56, 0x4F92, 0x4F8A, 0x4F9A, 0x4F94, 0x4FCD, /* 0x50 */
0x5040, 0x5022, 0x4FFF, 0x501E, 0x5046, 0x5070, 0x5042, 0x5094, /* 0x50 */
0x50F4, 0x50D8, 0x514A, 0x5164, 0x519D, 0x51BE, 0x51EC, 0x5215, /* 0x60 */
0x529C, 0x52A6, 0x52C0, 0x52DB, 0x5300, 0x5307, 0x5324, 0x5372, /* 0x60 */
0x5393, 0x53B2, 0x53DD, 0xFA0E, 0x549C, 0x548A, 0x54A9, 0x54FF, /* 0x70 */
0x5586, 0x5759, 0x5765, 0x57AC, 0x57C8, 0x57C7, 0xFA0F, 0, /* 0x70 */
0xFA10, 0x589E, 0x58B2, 0x590B, 0x5953, 0x595B, 0x595D, 0x5963, /* 0x80 */
0x59A4, 0x59BA, 0x5B56, 0x5BC0, 0x752F, 0x5BD8, 0x5BEC, 0x5C1E, /* 0x80 */
0x5CA6, 0x5CBA, 0x5CF5, 0x5D27, 0x5D53, 0xFA11, 0x5D42, 0x5D6D, /* 0x90 */
0x5DB8, 0x5DB9, 0x5DD0, 0x5F21, 0x5F34, 0x5F67, 0x5FB7, 0x5FDE, /* 0x90 */
0x605D, 0x6085, 0x608A, 0x60DE, 0x60D5, 0x6120, 0x60F2, 0x6111, /* 0xA0 */
0x6137, 0x6130, 0x6198, 0x6213, 0x62A6, 0x63F5, 0x6460, 0x649D, /* 0xA0 */
0x64CE, 0x654E, 0x6600, 0x6615, 0x663B, 0x6609, 0x662E, 0x661E, /* 0xB0 */
0x6624, 0x6665, 0x6657, 0x6659, 0xFA12, 0x6673, 0x6699, 0x66A0, /* 0xB0 */
0x66B2, 0x66BF, 0x66FA, 0x670E, 0xF929, 0x6766, 0x67BB, 0x6852, /* 0xC0 */
0x67C0, 0x6801, 0x6844, 0x68CF, 0xFA13, 0x6968, 0xFA14, 0x6998, /* 0xC0 */
0x69E2, 0x6A30, 0x6A6B, 0x6A46, 0x6A73, 0x6A7E, 0x6AE2, 0x6AE4, /* 0xD0 */
0x6BD6, 0x6C3F, 0x6C5C, 0x6C86, 0x6C6F, 0x6CDA, 0x6D04, 0x6D87, /* 0xD0 */
0x6D6F, 0x6D96, 0x6DAC, 0x6DCF, 0x6DF8, 0x6DF2, 0x6DFC, 0x6E39, /* 0xE0 */
0x6E5C, 0x6E27, 0x6E3C, 0x6EBF, 0x6F88, 0x6FB5, 0x6FF5, 0x7005, /* 0xE0 */
0x7007, 0x7028, 0x7085, 0x70AB, 0x710F, 0x7104, 0x715C, 0x7146, /* 0xF0 */
0x7147, 0xFA15, 0x71C1, 0x71FE, 0x72B1 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_MS932_EE[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x72BE, 0x7324, 0xFA16, 0x7377, 0x73BD, 0x73C9, 0x73D6, 0x73E3, /* 0x40 */
0x73D2, 0x7407, 0x73F5, 0x7426, 0x742A, 0x7429, 0x742E, 0x7462, /* 0x40 */
0x7489, 0x749F, 0x7501, 0x756F, 0x7682, 0x769C, 0x769E, 0x769B, /* 0x50 */
0x76A6, 0xFA17, 0x7746, 0x52AF, 0x7821, 0x784E, 0x7864, 0x787A, /* 0x50 */
0x7930, 0xFA18, 0xFA19, 0xFA1A, 0x7994, 0xFA1B, 0x799B, 0x7AD1, /* 0x60 */
0x7AE7, 0xFA1C, 0x7AEB, 0x7B9E, 0xFA1D, 0x7D48, 0x7D5C, 0x7DB7, /* 0x60 */
0x7DA0, 0x7DD6, 0x7E52, 0x7F47, 0x7FA1, 0xFA1E, 0x8301, 0x8362, /* 0x70 */
0x837F, 0x83C7, 0x83F6, 0x8448, 0x84B4, 0x8553, 0x8559, 0, /* 0x70 */
0x856B, 0xFA1F, 0x85B0, 0xFA20, 0xFA21, 0x8807, 0x88F5, 0x8A12, /* 0x80 */
0x8A37, 0x8A79, 0x8AA7, 0x8ABE, 0x8ADF, 0xFA22, 0x8AF6, 0x8B53, /* 0x80 */
0x8B7F, 0x8CF0, 0x8CF4, 0x8D12, 0x8D76, 0xFA23, 0x8ECF, 0xFA24, /* 0x90 */
0xFA25, 0x9067, 0x90DE, 0xFA26, 0x9115, 0x9127, 0x91DA, 0x91D7, /* 0x90 */
0x91DE, 0x91ED, 0x91EE, 0x91E4, 0x91E5, 0x9206, 0x9210, 0x920A, /* 0xA0 */
0x923A, 0x9240, 0x923C, 0x924E, 0x9259, 0x9251, 0x9239, 0x9267, /* 0xA0 */
0x92A7, 0x9277, 0x9278, 0x92E7, 0x92D7, 0x92D9, 0x92D0, 0xFA27, /* 0xB0 */
0x92D5, 0x92E0, 0x92D3, 0x9325, 0x9321, 0x92FB, 0xFA28, 0x931E, /* 0xB0 */
0x92FF, 0x931D, 0x9302, 0x9370, 0x9357, 0x93A4, 0x93C6, 0x93DE, /* 0xC0 */
0x93F8, 0x9431, 0x9445, 0x9448, 0x9592, 0xF9DC, 0xFA29, 0x969D, /* 0xC0 */
0x96AF, 0x9733, 0x973B, 0x9743, 0x974D, 0x974F, 0x9751, 0x9755, /* 0xD0 */
0x9857, 0x9865, 0xFA2A, 0xFA2B, 0x9927, 0xFA2C, 0x999E, 0x9A4E, /* 0xD0 */
0x9AD9, 0x9ADC, 0x9B75, 0x9B72, 0x9B8F, 0x9BB1, 0x9BBB, 0x9C00, /* 0xE0 */
0x9D70, 0x9D6B, 0xFA2D, 0x9E19, 0x9ED1, 0, 0, 0x2170, /* 0xE0 */
0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, /* 0xF0 */
0x2179, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_MS932_FA[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, /* 0x40 */
0x2178, 0x2179, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, /* 0x40 */
0x2166, 0x2167, 0x2168, 0x2169, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02, /* 0x50 */
0x3231, 0x2116, 0x2121, 0x2235, 0x7E8A, 0x891C, 0x9348, 0x9288, /* 0x50 */
0x84DC, 0x4FC9, 0x70BB, 0x6631, 0x68C8, 0x92F9, 0x66FB, 0x5F45, /* 0x60 */
0x4E28, 0x4EE1, 0x4EFC, 0x4F00, 0x4F03, 0x4F39, 0x4F56, 0x4F92, /* 0x60 */
0x4F8A, 0x4F9A, 0x4F94, 0x4FCD, 0x5040, 0x5022, 0x4FFF, 0x501E, /* 0x70 */
0x5046, 0x5070, 0x5042, 0x5094, 0x50F4, 0x50D8, 0x514A, 0, /* 0x70 */
0x5164, 0x519D, 0x51BE, 0x51EC, 0x5215, 0x529C, 0x52A6, 0x52C0, /* 0x80 */
0x52DB, 0x5300, 0x5307, 0x5324, 0x5372, 0x5393, 0x53B2, 0x53DD, /* 0x80 */
0xFA0E, 0x549C, 0x548A, 0x54A9, 0x54FF, 0x5586, 0x5759, 0x5765, /* 0x90 */
0x57AC, 0x57C8, 0x57C7, 0xFA0F, 0xFA10, 0x589E, 0x58B2, 0x590B, /* 0x90 */
0x5953, 0x595B, 0x595D, 0x5963, 0x59A4, 0x59BA, 0x5B56, 0x5BC0, /* 0xA0 */
0x752F, 0x5BD8, 0x5BEC, 0x5C1E, 0x5CA6, 0x5CBA, 0x5CF5, 0x5D27, /* 0xA0 */
0x5D53, 0xFA11, 0x5D42, 0x5D6D, 0x5DB8, 0x5DB9, 0x5DD0, 0x5F21, /* 0xB0 */
0x5F34, 0x5F67, 0x5FB7, 0x5FDE, 0x605D, 0x6085, 0x608A, 0x60DE, /* 0xB0 */
0x60D5, 0x6120, 0x60F2, 0x6111, 0x6137, 0x6130, 0x6198, 0x6213, /* 0xC0 */
0x62A6, 0x63F5, 0x6460, 0x649D, 0x64CE, 0x654E, 0x6600, 0x6615, /* 0xC0 */
0x663B, 0x6609, 0x662E, 0x661E, 0x6624, 0x6665, 0x6657, 0x6659, /* 0xD0 */
0xFA12, 0x6673, 0x6699, 0x66A0, 0x66B2, 0x66BF, 0x66FA, 0x670E, /* 0xD0 */
0xF929, 0x6766, 0x67BB, 0x6852, 0x67C0, 0x6801, 0x6844, 0x68CF, /* 0xE0 */
0xFA13, 0x6968, 0xFA14, 0x6998, 0x69E2, 0x6A30, 0x6A6B, 0x6A46, /* 0xE0 */
0x6A73, 0x6A7E, 0x6AE2, 0x6AE4, 0x6BD6, 0x6C3F, 0x6C5C, 0x6C86, /* 0xF0 */
0x6C6F, 0x6CDA, 0x6D04, 0x6D87, 0x6D6F /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_MS932_FB[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x6D96, 0x6DAC, 0x6DCF, 0x6DF8, 0x6DF2, 0x6DFC, 0x6E39, 0x6E5C, /* 0x40 */
0x6E27, 0x6E3C, 0x6EBF, 0x6F88, 0x6FB5, 0x6FF5, 0x7005, 0x7007, /* 0x40 */
0x7028, 0x7085, 0x70AB, 0x710F, 0x7104, 0x715C, 0x7146, 0x7147, /* 0x50 */
0xFA15, 0x71C1, 0x71FE, 0x72B1, 0x72BE, 0x7324, 0xFA16, 0x7377, /* 0x50 */
0x73BD, 0x73C9, 0x73D6, 0x73E3, 0x73D2, 0x7407, 0x73F5, 0x7426, /* 0x60 */
0x742A, 0x7429, 0x742E, 0x7462, 0x7489, 0x749F, 0x7501, 0x756F, /* 0x60 */
0x7682, 0x769C, 0x769E, 0x769B, 0x76A6, 0xFA17, 0x7746, 0x52AF, /* 0x70 */
0x7821, 0x784E, 0x7864, 0x787A, 0x7930, 0xFA18, 0xFA19, 0, /* 0x70 */
0xFA1A, 0x7994, 0xFA1B, 0x799B, 0x7AD1, 0x7AE7, 0xFA1C, 0x7AEB, /* 0x80 */
0x7B9E, 0xFA1D, 0x7D48, 0x7D5C, 0x7DB7, 0x7DA0, 0x7DD6, 0x7E52, /* 0x80 */
0x7F47, 0x7FA1, 0xFA1E, 0x8301, 0x8362, 0x837F, 0x83C7, 0x83F6, /* 0x90 */
0x8448, 0x84B4, 0x8553, 0x8559, 0x856B, 0xFA1F, 0x85B0, 0xFA20, /* 0x90 */
0xFA21, 0x8807, 0x88F5, 0x8A12, 0x8A37, 0x8A79, 0x8AA7, 0x8ABE, /* 0xA0 */
0x8ADF, 0xFA22, 0x8AF6, 0x8B53, 0x8B7F, 0x8CF0, 0x8CF4, 0x8D12, /* 0xA0 */
0x8D76, 0xFA23, 0x8ECF, 0xFA24, 0xFA25, 0x9067, 0x90DE, 0xFA26, /* 0xB0 */
0x9115, 0x9127, 0x91DA, 0x91D7, 0x91DE, 0x91ED, 0x91EE, 0x91E4, /* 0xB0 */
0x91E5, 0x9206, 0x9210, 0x920A, 0x923A, 0x9240, 0x923C, 0x924E, /* 0xC0 */
0x9259, 0x9251, 0x9239, 0x9267, 0x92A7, 0x9277, 0x9278, 0x92E7, /* 0xC0 */
0x92D7, 0x92D9, 0x92D0, 0xFA27, 0x92D5, 0x92E0, 0x92D3, 0x9325, /* 0xD0 */
0x9321, 0x92FB, 0xFA28, 0x931E, 0x92FF, 0x931D, 0x9302, 0x9370, /* 0xD0 */
0x9357, 0x93A4, 0x93C6, 0x93DE, 0x93F8, 0x9431, 0x9445, 0x9448, /* 0xE0 */
0x9592, 0xF9DC, 0xFA29, 0x969D, 0x96AF, 0x9733, 0x973B, 0x9743, /* 0xE0 */
0x974D, 0x974F, 0x9751, 0x9755, 0x9857, 0x9865, 0xFA2A, 0xFA2B, /* 0xF0 */
0x9927, 0xFA2C, 0x999E, 0x9A4E, 0x9AD9 /* 0xF0 */
};
/* ----------------------------------------------------------------------- */
static sal_uInt16 const aImplDBCSToUniTab_MS932_FC[] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
0x9ADC, 0x9B75, 0x9B72, 0x9B8F, 0x9BB1, 0x9BBB, 0x9C00, 0x9D70, /* 0x40 */
0x9D6B, 0xFA2D, 0x9E19, 0x9ED1 /* 0x40 */
};
|
/*
* Copyright (C) 2019-2020 HERE Europe B.V.
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
* License-Filename: LICENSE
*/
import oTools from '../../features/oTools';
import RotateCursor from './RotateCursor';
import MoveCursor from './MoveCursor';
import ScaleSelector from './ScaleSelector';
import iconRotateBlack from '../../../assets/icons/rotate.black.gif';
import iconRotateWhite from '../../../assets/icons/rotate.white.gif';
const ICON_SIZE = 18;
const getBBox = (features) => {
const bbox = [Infinity, Infinity, -Infinity, -Infinity];
for (let f of features) {
const fBbox = f.getBBox ? f.getBBox() : f.bbox;
if (fBbox[0] < bbox[0]) {
bbox[0] = fBbox[0];
}
if (fBbox[1] < bbox[1]) {
bbox[1] = fBbox[1];
}
if (fBbox[2] > bbox[2]) {
bbox[2] = fBbox[2];
}
if (fBbox[3] > bbox[3]) {
bbox[3] = fBbox[3];
}
}
return bbox;
};
function Transformer(HERE_WIKI, editor) {
const overlay = HERE_WIKI.objects.overlay;
const that = this;
let scaleRect = null;
let moveCursor = null;
let rotateCursor = null;
let objects = null;
const defaultGap = 4e-5;
const gap = defaultGap;
let objsEditable = [];
const STROKE_COLOR = '#010B1E';
that.markObjsAsMod = () => {
const len = objects.length;
for (let i = 0; i < len; i++) {
oTools.markAsModified(objects[i], false);
}
if (len) {
HERE_WIKI.objects.history.saveChanges();
}
};
that.getObjects = () => objects;
that.visible = (visible) => {
if (rotateCursor) {
if (visible) {
scaleRect.show();
rotateCursor.show();
moveCursor.show();
} else {
scaleRect.hide();
rotateCursor.hide();
moveCursor.hide();
}
}
};
this.isActive = () => scaleRect !== null;
function setEditable(objects) {
let l = objects.length;
while (l--) {
const obj = objects[l];
// restore editable state of objects
if (objsEditable.indexOf(obj.id) >= 0) {
oTools._editable(obj, true);
}
}
}
this.hide = () => {
if (scaleRect) {
scaleRect.remove();
rotateCursor.remove();
moveCursor.remove();
}
scaleRect =
moveCursor =
rotateCursor = null;
// objects = objects.items||objects;
if (objects != null) {
setEditable(objects);
objects = null;
}
};
this.objBBoxChanged = () => {
const _bbox = objects.getBBox();
const minLon = _bbox[0] -= gap;
const minLat = _bbox[1] -= gap;
const maxLon = _bbox[2] += gap;
const maxLat = _bbox[3] += gap;
const centerLon = _bbox[0] + (_bbox[2] - _bbox[0]) / 2;
const centerLat = _bbox[1] + (_bbox[3] - _bbox[1]) / 2;
if (scaleRect != null) {
scaleRect.update(minLon, minLat, maxLon, maxLat);
} else {
scaleRect = new ScaleSelector(HERE_WIKI, minLon, minLat, maxLon, maxLat,
overlay,
that,
{
'type': 'Line',
'zIndex': 0,
'strokeDasharray': [4, 4],
'strokeWidth': 2,
'stroke': STROKE_COLOR
}
);
moveCursor = new MoveCursor(
HERE_WIKI,
[centerLon, centerLat],
overlay,
that,
{
'type': 'Circle',
'zIndex': 0,
'stroke': '#FFFFFF',
'fill': STROKE_COLOR,
'strokeWidth': 3,
'opacity': 0.3,
'radius': 9
}
);
rotateCursor = new RotateCursor(HERE_WIKI, [maxLon, minLat], overlay, that, [{
type: 'Image',
zIndex: 4,
src: iconRotateBlack,
width: ICON_SIZE,
height: ICON_SIZE
}], [{
type: 'Image',
zIndex: 4,
src: iconRotateWhite,
width: ICON_SIZE,
height: ICON_SIZE
}]);
}
rotateCursor.setPosition(maxLon, minLat);
moveCursor.setPosition(centerLon, centerLat);
};
this.getGap = () => gap;
this.getCenter = () => moveCursor.getCenter();
this.show = (obj) => {
let item;
// hide turn restriction if it is active
HERE_WIKI.listeners.trigger('_clearOverlay');
// before showing transformer, restore editable state for selected object if exists
if (objects != null) {
setEditable(objects);
}
if (obj instanceof Array) {
objects = obj;
} else {
objects = [obj];
}
objects.getBBox = () => getBBox(objects);
objsEditable = [];
for (let i = 0, prv; i < objects.length; i++) {
item = objects[i];
prv = oTools.private(item);
// TODO: use item.unselect() instead.
// currently not used because it will trigger transformer hide by default
oTools.deHighlight(item);
prv.isSelected = false;
if (prv.allowEdit) {
// save the editable state of the objects
objsEditable.push(item.id);
// set the objects to unselectable
oTools._editable(item, false);
}
}
that.objBBoxChanged();
};
}
export default Transformer;
|
# RNN training tutorial
by Wojtek Czarnecki
_Designed for education purposes. Please do not distribute without permission_.
**Questions/Correspondence**: [email protected]
## This is a tutorial training various RNNs on simple datasets and doing some analysis.
#### Structure:
1. basic (vanilla RNN) implementation
2. observing exploding/vanishing gradients
3. intepretability by plotting and analysing activations of a network:
- identifying interpretable neurons
- identifying neurons-gates interactions
- identifying hidden state dynamics through time
4. training an LSTM on character level langugage modelling task
- comparing training of an LSTM and RNN, playing with architectures
First three sections are almost independent, one can go switch between them without any code dependencies (apart from being unable to use vanilla RNN in section 4, if it was not implemented in 1.).
Cells that include "starting point" in their title require filling in some code gaps; all remaining ones are complete (but feel free to play with them if you want!)
Please pay attention to questions after each section. Finding out answers to these is crucial to make sure one understands various modes of RNN operation.
Language model exercises are based on [Sonnet LSTM example](https://github.com/deepmind/sonnet/blob/master/sonnet/examples/rnn_shakespeare.py).
|
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Posyandu extends Model
{
protected $table="posyandus";
protected $fillable = [
'nama_posyandu',
'alamat_posyandu',
];
public function kaders()
{
return $this->hasMany(Kader::class);
}
}
|
---
layout: post
title: "[Algorithm] 조합을 사용해 경우의 수 구하기"
date: 2021-07-16
excerpt: "경우의 수를 구해보자."
tags: [Java, Combination, number_of_cases]
comments: true
---
## 조합이란?
조합이란 n개의 숫자 중에서 r개의 수를 순서 없이 뽑는 경우를 말한다.
예를 들어 [1, 2, 3] 배열에서의 조합은 아래와 같이 나온다.
```java
[1, 2]
[1, 3]
[2, 3]
```
순열 이라는 것은 주어진 수열에서 순서에 따라 결과가 달라지는 방식을 순열이라고 한다. 말 그대로, 순서가 존재하는 열이라는 것이다.
즉 순열에서 {1,2,3}과 {1,3,2}, {2,1,3}등 모두 다른 결과를 가져온다. 순서가 다르기 때문이다.
조합은 순서가 상관이 없는 모임을 의미한다.
순서가 상관이 없기 때문에 {1,2,3}, {1,3,2}, {2,1,3} 모두 같은 것으로 취급을 한다. 즉, 1,2,3 이라는 3개의 숫자로 이루어져 있다는 점에서 똑같은 취급을 하는 것이 조합이다.
## 조합의 원리
조합의 기호는 nCr로 나타내며
$nCr = n-1Cr-1 + n-1Cr$ 로 나타낼 수 있다.
즉, 조합은 **하나의 원소를 선택할 경우 + 하나의 원소를 선택하지 않을 경우 이 둘의 합**을 나타낸다.
예를 들어, (1,2,3)중에서 2개를 뽑는 조합이라고 생각해보면 → 3C2
- (1,X) : 1을 뽑는 경우 (하나의 원소를 선택할 경우)
- (X,X) : 1을 뽑지 않는 경우 (하나의 원소를 선택하지 않는 경우)
이처럼 2가지로 나뉠 수 있다.
- 1을 뽑은 경우 나머지 (2,3) 중 1개를 선택해야 함. (총 2개의 경우 (1,2) (1,3)) → 2C1
- 1을 뽑지 않은 경우 (2,3) 모두 선택해야 한다. (총 1개의 경우 (2,3)) → 2C2
즉, (1,2,3)에서 2개를 뽑는 조합은 둘을 합해 (1,2)(1,3)(2,3) 총 3가지가 된다.
또다른 예로 (1,2,3,4,5) 중에 3개를 뽑는다고 가정했을 때
3을 포함하고 {1,2,4,5} 중에 나머지 2개를 뽑으면 4C2이고,
3을 포함하지 않고 {1,2,4,5} 중에 3개를 뽑으면 4C3이다.
두 경우를 합하면 결국 3개 중에서 3개를 뽑는것이 된다.
이게 조합의 기본원리이고 특징이다. 이를 바탕으로 더 이상 쪼개지지 않을 때 까지 즉, nC0 = 1이 될 때까지 구한다면 nCr을 구할 수 있게 되는 것이다.
## 1. 조합 경우의 수 구하기
3개 중에서 2개를 뽑는 경우
3C2 = 2C1 + 2C2 > ... > 3C0 = 1이 될 때까지 재귀 호출을 통해 구현한다.
- 재귀를 통해 호출을 하다가 r == 0이 될 경우, 즉 r개를 다 뽑은 경우는 더 이상 선택의 여지가 없으므로 1을 리턴.
- 전채 개수 n이 뽑아야 할 개수 r과 같아졌다면 역시 다 뽑는 것 말고 선택의 여지가 없으므로 1을 리턴.
- 그 이외에는 원소를 선택할 경우 + 선택하지 않을 경우 둘의 합을 계속 재귀로 호출.
```java
public static void main(String[] args){
System.out.println(combination(3,2)); //3
/**
* (1,2,3) -> (1,2),(1,3),(2,3)
*/
}
//조합의 경우의 수 구하기
public static int combination(int n, int r){
if(n == r || r == 0)
return 1;
else
return combination(n - 1, r - 1) + combination(n - 1, r);
}
```
<img src ="https://eunmik.github.io/bonita.blog/assets/img/2021/0716/img1.png" />
## 2. 조합 구하기
조합을 구하는 방법은 배열의 처음부터 마지막까지 돌며
1. 현재 인덱스를 선택하는 경우
2. 현재 인덱스를 선택하지 않는 경우
이렇게 두가지로 모든 경우를 완전 탐색하는 것이다.
- arr : 조합을 뽑아낼 배열
- r : 조합의 길이 (뽑을 갯수)
- visited : 조합에 뽑혔는지 확인하기 위한 배열
순열과 달리 조합은 r을 유지할 필요가 없으므로 숫자를 하나 뽑을 때마다 하나씩 줄여준다.
r == 0 일 때가 r 개의 숫자를 뽑은 경우이다.
### 백트래킹의 방법
start 변수를 기준으로 start보다 작으면 뽑을 후보에서 제외,
start 보다 크면 뽑을 후보가 된다.
예를 들어, [1,2,3] 배열이 있고 start가 0부터 시작한다.
조합을 뽑는 comb 함수에 들어오면 먼저 i 정점부터 시작하는 for문에 들어간다.
만약 0 인덱스에 있는 값 1을 뽑는 다면 visited[i] = true가 되고 아니면 visited[i] = false가 된다.
즉, 1을 선택한 경우 (visited[i] = true)와 선택하지 않은 경우(visited[i] = false) 둘다 봐야 한다.
하지만 더이상 1은 고려 대상이 아니기 때문에 다음 for 문은 2부터 시작해주어야 한다.
```java
//경우의 수를 구해보자.
public class NumberOfCases {
public static void main(String[] args){
comb1(new int[]{1,2,3}, new boolean[3], 0, 3, 2);
}
//백트래킹
static void comb1(int[] arr, boolean[] visited, int start, int n, int r){
if(r == 0){
print(arr, visited);
return;
} else {
for(int i = start; i<n;i++){
visited[i] = true;
comb1(arr, visited, i + 1, n, r - 1);
visited[i] = false;
}
}
}
static void print(int[] arr, boolean[] visited){
for(int i=0; i<arr.length; i++){
if(visited[i] == true){
System.out.print(arr[i] + " ");
}
}System.out.println();
}
}
```
<img src ="https://eunmik.github.io/bonita.blog/assets/img/2021/0716/img2.png" />
### 재귀 이용해 구현
depth 변수는 현재 인덱스이고 0부터 시작한다.
현재 인덱스를 뽑는다면 = true, 뽑지 않는다면 visited[depth] = false로 진행한다.
마찬가지로 뽑은 경우와 뽑지 않은 경우 모두 봐야하고, 그때 이전에 본 값들은 더 이상 고려 대상이 아니기 때문에 무조건 1씩 증가한다.
depth == n 이 되면 모든 인덱스를 다 보았으므로 (배열의 끝에 도착 → 조합 만들 수 x) 재귀를 종료한다.
또한 r == 0 이되면 뽑을 개수를 다 뽑아 조합이 완성되니 재귀를 종료한다.
```java
//2. 재귀 사용해 구현
static void comb2(int[] arr, boolean[] visited, int depth, int n, int r) {
if(r == 0) {
print(arr, visited, n);
return;
}
if(depth == n) {
return;
} else {
visited[depth] = true;
comb2(arr, visited, depth + 1, n, r - 1);
visited[depth] = false;
comb2(arr, visited, depth + 1, n, r);
}
}
```
<img src ="https://eunmik.github.io/bonita.blog/assets/img/2021/0716/img3.png" />
### visited배열을 쓰지 않고 정수 변수 index로 판별해 구해보기
index변수는 0부터 시작해서 배열의 인덱스를 증가시키면서 해당 인덱스를 뽑을지 안뽑을지를 결정 해 조합을 만들기 위한 변수이다.
(뽑는다면 index +1, r-1 / 안뽑는다면 index 그대로, r 그대로)
target 변수는 0~n까지 나열된 원소 배열 안에서 어떤 숫자를 타깃으로 해 배열에 집어 넣을지 고를 때 쓰인다.
combination()함수가 실행 될때마다 항상 +1씩 해 판별한다.
index 변수에 따라 target에 있는 숫자가 뽑힐지 안뽑힐지가 결정된다.
target+1이 nCr에서 n-1 → n-2 → n-3 → ... → 1 까지 가는 역할을 수행한다.
```java
//visited 배열을 쓰지 않고 정수 변수 index로 판별해 구해보기
static void combi3(int[] arr, int index, int n, int r, int target){
if( r== 0) {
for (int i = 0; i < index; i++) {
System.out.print(arr[i] + " ");
}
System.out.println("");
} else if (target == n){
return;
} else {
arr[index] = target;
combi3(arr, index + 1, n, r - 1, target + 1);
combi3(arr, index, n, r, target + 1);
}
}
```
<img src ="https://eunmik.github.io/bonita.blog/assets/img/2021/0716/img4.png" /> |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.manager.am.service.engine
import org.apache.commons.lang.StringUtils
import org.apache.linkis.common.utils.Logging
import org.apache.linkis.manager.am.conf.AMConfiguration
import org.apache.linkis.manager.common.constant.AMConstant
import org.apache.linkis.manager.common.entity.metrics.AMNodeMetrics
import org.apache.linkis.manager.common.protocol.engine.EngineConnStatusCallbackToAM
import org.apache.linkis.manager.persistence.NodeMetricManagerPersistence
import org.apache.linkis.manager.service.common.metrics.MetricsConverter
import org.apache.linkis.rpc.message.annotation.Receiver
import org.apache.linkis.server.BDPJettyServerHelper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import java.util
@Service
class DefaultEngineConnStatusCallbackService extends EngineConnStatusCallbackService with Logging {
@Autowired
private var nodeMetricManagerPersistence: NodeMetricManagerPersistence = _
@Autowired
private var metricsConverter: MetricsConverter = _
private val canRetryLogs = AMConfiguration.AM_CAN_RETRY_LOGS.getValue.split(";")
@Receiver
override def dealEngineConnStatusCallback(engineConnStatusCallbackToAM: EngineConnStatusCallbackToAM): Unit = {
info(s"Start to deal engineConnStatusCallbackToAM $engineConnStatusCallbackToAM")
val nodeMetrics = new AMNodeMetrics
val heartBeatMsg: java.util.Map[String, Any] = new util.HashMap[String, Any]()
heartBeatMsg.put(AMConstant.START_REASON, engineConnStatusCallbackToAM.initErrorMsg)
if (engineConnStatusCallbackToAM.canRetry) {
heartBeatMsg.put(AMConstant.EC_CAN_RETRY, engineConnStatusCallbackToAM.canRetry)
} else if (matchRetryLog(engineConnStatusCallbackToAM.initErrorMsg)){
info(s"match canRetry log ${engineConnStatusCallbackToAM.serviceInstance}")
heartBeatMsg.put(AMConstant.EC_CAN_RETRY, engineConnStatusCallbackToAM.canRetry)
}
nodeMetrics.setHeartBeatMsg(BDPJettyServerHelper.jacksonJson.writeValueAsString(heartBeatMsg))
nodeMetrics.setServiceInstance(engineConnStatusCallbackToAM.serviceInstance)
nodeMetrics.setStatus(metricsConverter.convertStatus(engineConnStatusCallbackToAM.status))
nodeMetricManagerPersistence.addOrupdateNodeMetrics(nodeMetrics)
info(s"Finished to deal engineConnStatusCallbackToAM $engineConnStatusCallbackToAM")
}
private def matchRetryLog(errorMsg: String): Boolean = {
var flag = false
if (StringUtils.isNotBlank(errorMsg)) {
val errorMsgLowCase = errorMsg.toLowerCase
canRetryLogs.foreach(canRetry =>
if ( errorMsgLowCase.contains(canRetry) ) {
error(s"match engineConn log fatal logs,is $canRetry")
flag = true
}
)
}
flag
}
}
|
# Jira Ticket Automation
You can leverage the Python script `open_jira_ticket.py` as an example of how to open up JIRA tickets automatically with a Cloudsplaining report description and attachments. This can speed up your assessment process.
See the script here: https://github.com/salesforce/cloudsplaining/tree/master/examples/jira-tickets.
### Steps
1. Create an API Token for JIRA Cloud: https://confluence.atlassian.com/cloud/api-tokens-938839638.html
2. Generate your Cloudsplaining report
3. Install the dependencies for this script (`pip3 install -r requirements.txt`)
3. Open your JIRA issue.
```bash
python open_jira_ticket.py \
--project PROJ \
--auth-file authz.json \
--report-file report.html \
--triage-file triage.csv \
--data-file data.json \
--server http://myserver.atlassian.net
```
|
namespace Vereesa.Core.Configuration
{
public class GameStateEmissionSettings
{
public string EmissionEndpoint { get; set; }
public string EmissionEndpointUserKey { get; set; }
}
}
|
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext_lazy as _
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from base.util import class_view_decorator
from base.views import RedirectBackView
from .models import Event, EventUserRegistration
class EventListView(ListView):
model = Event
context_object_name = 'events'
class EventDetailView(DetailView):
model = Event
context_object_name = 'event'
@class_view_decorator(login_required)
class EventUserRegisterView(RedirectBackView):
default_return_view = 'events_event_list'
def dispatch(self, request, *args, **kwargs):
event = Event.objects.get(pk=kwargs['event_id'])
# Check if user is not already registered
registrations = EventUserRegistration.objects.filter(
user=request.user,
event=event).count()
if registrations:
message = _('You are already registered to the %s') % event
messages.add_message(request, messages.ERROR, message)
return super(EventUserRegisterView, self).dispatch(request,
*args,
**kwargs)
if event.registration_open():
registration = EventUserRegistration(user=request.user, event=event)
registration.save()
message = _('Successfully registered to the %s') % event
messages.add_message(request, messages.INFO, message)
else:
message = _('Registration to the %s is not open.') % event
messages.add_message(request, messages.ERROR, message)
return super(EventUserRegisterView, self).dispatch(request,
*args, **kwargs)
|
module P06 where
import Data.List(nub,unfoldr)
import qualified Data.Set as Set
main :: String -> IO ()
main input =
do doWork (length . nub . concat)
doWork (Set.size . foldr1 Set.intersection . map Set.fromList)
where
groups = parseInput input
doWork f = print $ sum $ map f groups
type Group = [String]
parseInput :: String -> [Group]
parseInput = unfoldr nextGroup . lines
nextGroup :: [String] -> Maybe (Group,[String])
nextGroup ls =
case dropWhile null ls of
[] -> Nothing
_ -> case break null ls of
(as,bs) -> Just (as, drop 1 bs)
|
#!/bin/sh
./clean.sh
render=1
if [ $# == 1 ]; then
render=$1
fi
if [ $render == 0 ]; then
sed -i 's/#define RENDER_ENABLED.*/#define RENDER_ENABLED 0/g' src/sim.h
cmake -DRENDER=OFF .
fi
if [ $render == 1 ]; then
sed -i 's/#define RENDER_ENABLED.*/#define RENDER_ENABLED 1/g' src/sim.h
cmake -DRENDER=ON .
fi
make
|
<!-- <li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-tachometer-alt"></i>
<p>
Dashboard
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="assets/index.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Dashboard v1</p>
</a>
</li>
<li class="nav-item">
<a href="assets/index2.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Dashboard v2</p>
</a>
</li>
<li class="nav-item">
<a href="assets/index3.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Dashboard v3</p>
</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="../widgets.html" class="nav-link">
<i class="nav-icon fas fa-th"></i>
<p>
Widgets
<span class="right badge badge-danger">New</span>
</p>
</a>
</li> -->
@if(session()->get("level") == "super_admin")
<li class="nav-item">
<a href="{{route("super")}}" class="nav-link">
<i class="nav-icon fas fa-home"></i>
<p>Beranda</p>
</a>
</li>
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<i class="nav-icon fas fa-file"></i>
<p>
Data Master
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="{{route("super.jenis")}}" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Jenis Arsip</p>
</a>
</li>
<li class="nav-item">
<a href="{{route("super.akun")}}" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Data Akun</p>
</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="{{route("super.suratkeluar")}}" class="nav-link">
<i class="nav-icon fas fa-file"></i>
<p>Arsip Keluar</p>
</a>
</li>
<li class="nav-item">
<a href="{{route("super")}}" class="nav-link">
<i class="nav-icon fas fa-file"></i>
<p>Arsip Tertahan</p>
</a>
</li>
<li class="nav-item">
<a href="{{route("logout")}}" class="nav-link">
<i class="nav-icon fas fa-sign-out-alt"></i>
<p>Logout</p>
</a>
</li>
@elseif(in_array(session()->get("level"),['tata_usaha','kepala_sekolah','guru','wakil_kepala_sekolah','staff_lain']))
<li class="nav-item">
<a href="{{route("staff")}}" class="nav-link">
<i class="nav-icon fas fa-home"></i>
<p>Beranda</p>
</a>
</li>
<li class="nav-item">
<a href="{{route("staff.suratkeluar")}}" class="nav-link">
<i class="nav-icon fas fa-file"></i>
<p>Surat Keluar</p>
</a>
</li>
<li class="nav-item">
<a href="{{route("staff.konfirmasi.surat")}}" class="nav-link">
<i class="nav-icon fas fa-file"></i>
<p>Konfirmasi Surat</p>
</a>
</li>
<li class="nav-item">
<a href="{{route("logout")}}" class="nav-link">
<i class="nav-icon fas fa-sign-out-alt"></i>
<p>Logout</p>
</a>
</li>
@else
<li class="nav-item">
<a href="{{route("login")}}" class="nav-link">
<i class="nav-icon fas fa-sign-in-alt"></i>
<p>Login</p>
</a>
</li>
@endif
|
# ----------------------------------------------------------------------------
#
# Package : kafka-open
# Version : 2.9
# Source repo : https://github.com/odpi/egeria
# Tested on : ubuntu_18.04
# Passing Arguments: Passing Arguments: 1.Version of package
# Script License : Apache License, Version 2 or later
# Maintainer : Arumugam N S <[email protected]> / Priya Seth<[email protected]>
#
# Disclaimer : This script has been tested in non-root mode on given
# ========== platform using the mentioned version of the package.
# It may not work as expected with newer versions of the
# package and/or distribution. In such case, please
# contact "Maintainer" of this script.
#
# ----------------------------------------------------------------------------
#!/bin/bash
export REPO=https://github.com/odpi/egeria
#Default tag V2.9
if [ -z "$1" ]; then
export VERSION="V2.9"
else
export VERSION="$1"
fi
#Testing on jdk8
export JDK="openjdk-8-jdk"
#Default installation
sudo apt-get update
sudo apt-get install git -y
#For rerunning build
if [ -d "egeria" ] ; then
rm -rf egeria
fi
# run and ests jdk 8
sudo apt-get install -y ${JDK}
jret=$?
if [ $jret -eq 0 ] ; then
echo "Sucessfully installed JDK ${JDK} "
else
echo "Failed to install JDK ${JDK} "
exit
fi
#Setting JAVA_HOME
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-ppc64el/
sudo apt install -y maven
mvn -v
git clone ${REPO}
cd egeria
git checkout ${VERSION}
ret=$?
if [ $ret -eq 0 ] ; then
echo "${VERSION} found to checkout"
else
echo "${VERSION} not found"
exit
fi
#goto kafka-open-metadata-topic-connector path
cd open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/kafka-open-metadata-topic-connector
ret=$?
if [ $ret -eq 0 ] ; then
echo "Path found in the package to build and started building ..."
else
echo "Path not found in the package ..."
exit
fi
pwd
sudo mvn clean install -DskipTests=true -B -V
ret=$?
if [ $ret -eq 0 ] ; then
echo "Done build ..."
else
echo "Failed build......"
exit
fi
mvn test -B
ret=$?
if [ $ret -eq 0 ] ; then
echo "Done Test ......"
else
echo "Failed Test ......"
fi
|
# Exploring Monocle ...
... and other data manipulation libraries:
- chimney
- Monocle
- QuickLens
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.giraph.block_app.migration;
import static org.apache.giraph.utils.ReflectionUtils.getTypeArguments;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import org.apache.giraph.block_app.framework.api.BlockMasterApi;
import org.apache.giraph.block_app.framework.api.BlockWorkerContextReceiveApi;
import org.apache.giraph.block_app.framework.api.BlockWorkerContextSendApi;
import org.apache.giraph.block_app.framework.api.BlockWorkerReceiveApi;
import org.apache.giraph.block_app.framework.api.BlockWorkerSendApi;
import org.apache.giraph.block_app.framework.piece.PieceWithWorkerContext;
import org.apache.giraph.block_app.framework.piece.interfaces.VertexReceiver;
import org.apache.giraph.block_app.framework.piece.interfaces.VertexSender;
import org.apache.giraph.block_app.migration.MigrationAbstractComputation.MigrationFullAbstractComputation;
import org.apache.giraph.block_app.migration.MigrationMasterCompute.MigrationFullMasterCompute;
import org.apache.giraph.block_app.migration.MigrationWorkerContext.MigrationFullWorkerContext;
import org.apache.giraph.combiner.MessageCombiner;
import org.apache.giraph.conf.DefaultMessageClasses;
import org.apache.giraph.conf.GiraphConfiguration;
import org.apache.giraph.conf.GiraphConstants;
import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
import org.apache.giraph.conf.MessageClasses;
import org.apache.giraph.conf.TypesHolder;
import org.apache.giraph.factories.DefaultMessageValueFactory;
import org.apache.giraph.function.Consumer;
import org.apache.giraph.function.ObjectTransfer;
import org.apache.giraph.function.Supplier;
import org.apache.giraph.graph.Vertex;
import org.apache.giraph.utils.ReflectionUtils;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;
import com.google.common.base.Preconditions;
/**
* Piece used when migrating applications to Blocks Framework.
*
* There are two migration levels:
* <ul>
* <li>
* drop-in replacement migration is completely compatible with previous code.
* Only necessary thing is to change parent classes from (AbstractComputation,
* MasterCompute, WorkerContext) to (MigrationFullAbstractComputation,
* MigrationFullMasterCompute and MigrationFullWorkerContext).
* After that, all you need to do is extend MigrationBlockFactory, and pass
* appropriate types and call createMigrationAppBlock with initial computations.
* <br>
* You can now combine multiple applications, or use any library written in the
* framework, but your application is left as one whole indivisible block.
* </li>
* <li>
* Piece-wise migration - which gives a set of independent pieces, which can
* then be combined with appropriate ordering logic within a BlockFactory.
* You need to modify parent classes in your code to
* (MigrationAbstractComputation, MigrationMasterCompute and
* MigrationWorkerContext), which don't have any methods that affect computation
* ordering - and so calling those methods should be
* moved to logic within BlockFactory.
* Calling MigrationPiece.createMigrationPiece and passing appropriate
* computations, gives you an independent piece, that you can then use in the
* same way as before, but also combine it in any other way with other pieces
* you have or are written within a library.
* </li>
* </ul>
*
* Generally, migration path can be to first move to drop-in replacement without
* any effort, and then see which parts need to be modified to be able to use
* piece-wise migration. At the end, it should be trivial to move from
* piece-wise migration to directly using pieces, by just moving code around,
* if you want to.
*
* @param <I> Vertex id type
* @param <V> Vertex value type
* @param <E> Edge value type
* @param <MPrev> Previous piece message type
* @param <M> Message type
*/
@SuppressWarnings("rawtypes")
public final class MigrationPiece<I extends WritableComparable,
V extends Writable, E extends Writable, MPrev extends Writable,
M extends Writable> extends PieceWithWorkerContext<I, V, E, M,
MigrationWorkerContext, Writable, MigrationSuperstepStage> {
private final Class<? extends MigrationAbstractComputation<I, V, E, MPrev, M>>
computationClass;
private final transient MigrationMasterCompute masterCompute;
private final Supplier<Iterable<MPrev>> previousMessagesSupplier;
private final Consumer<Iterable<M>> currentMessagesConsumer;
private final transient Class<M> messageClass;
private final transient Class<? extends MessageCombiner<? super I, M>>
messageCombinerClass;
private final boolean isFullMigration;
private final boolean isFirstStep;
private transient MigrationPiece nextPiece;
private boolean isHalted;
private MigrationPiece(
Class<? extends MigrationAbstractComputation<I, V, E, MPrev, M>>
computationClass,
MigrationMasterCompute masterCompute, Supplier<Iterable<MPrev>>
previousMessagesSupplier,
Consumer<Iterable<M>> currentMessagesConsumer, Class<M> messageClass,
Class<? extends MessageCombiner<? super I, M>> messageCombinerClass,
boolean isFullMigration, boolean isFirstStep) {
this.computationClass = computationClass;
this.masterCompute = masterCompute;
this.previousMessagesSupplier = previousMessagesSupplier;
this.currentMessagesConsumer = currentMessagesConsumer;
this.messageClass = messageClass;
this.messageCombinerClass = messageCombinerClass;
this.isFullMigration = isFullMigration;
this.isFirstStep = isFirstStep;
isHalted = false;
nextPiece = null;
sanityChecks();
}
@SuppressWarnings("unchecked")
static <I extends WritableComparable, V extends Writable, E extends Writable,
MR extends Writable, MS extends Writable>
MigrationPiece<I, V, E, MR, MS> createFirstFullMigrationPiece(
Class<? extends MigrationAbstractComputation<I, V, E, MR, MS>>
computationClass,
MigrationFullMasterCompute masterCompute,
Class<MS> messageClass,
Class<? extends MessageCombiner<? super I, MS>> messageCombinerClass) {
ObjectTransfer transfer = new ObjectTransfer();
return new MigrationPiece<>(
computationClass, masterCompute, transfer, transfer, messageClass,
messageCombinerClass,
true, true);
}
public static <I extends WritableComparable, V extends Writable,
E extends Writable, MR extends Writable, MS extends Writable>
MigrationPiece<I, V, E, MR, MS> createMigrationPiece(
Class<? extends MigrationAbstractComputation<I, V, E, MR, MS>>
computationClass,
MigrationMasterCompute masterCompute,
Supplier<Iterable<MR>> previousMessagesSupplier,
Consumer<Iterable<MS>> currentMessagesConsumer,
Class<MS> messageClass,
Class<? extends MessageCombiner<? super I, MS>> messageCombinerClass) {
return new MigrationPiece<>(
computationClass, masterCompute, previousMessagesSupplier,
currentMessagesConsumer, messageClass, messageCombinerClass,
false, false);
}
private void sanityChecks() {
Preconditions.checkState(isFullMigration ==
MigrationFullAbstractComputation.class
.isAssignableFrom(computationClass));
}
void sanityTypeChecks(
GiraphConfiguration conf, Class<?> previousMessageClass) {
if (computationClass != null) {
final Class<?> vertexIdClass = GiraphConstants.VERTEX_ID_CLASS.get(conf);
final Class<?> vertexValueClass =
GiraphConstants.VERTEX_VALUE_CLASS.get(conf);
final Class<?> edgeValueClass =
GiraphConstants.EDGE_VALUE_CLASS.get(conf);
Class<?>[] classList = getTypeArguments(
TypesHolder.class, computationClass);
Preconditions.checkArgument(classList.length == 5);
ReflectionUtils.verifyTypes(
vertexIdClass, classList[0], "vertexId", computationClass);
ReflectionUtils.verifyTypes(
vertexValueClass, classList[1], "vertexValue", computationClass);
ReflectionUtils.verifyTypes(
edgeValueClass, classList[2], "edgeValue", computationClass);
if (previousMessageClass != null) {
ReflectionUtils.verifyTypes(
previousMessageClass, classList[3], "recvMessage",
computationClass);
}
ReflectionUtils.verifyTypes(
messageClass, classList[4], "sendMessage", computationClass);
}
}
@Override
public void registerAggregators(BlockMasterApi masterApi)
throws InstantiationException, IllegalAccessException {
if (masterCompute != null) {
masterCompute.init(masterApi);
masterCompute.initialize();
}
}
@Override
public VertexSender<I, V, E> getVertexSender(
BlockWorkerSendApi<I, V, E, M> workerApi,
MigrationSuperstepStage executionStage) {
if (computationClass == null || isFirstStep) {
return null;
}
final MigrationAbstractComputation<I, V, E, MPrev, M> computation =
ReflectionUtils.newInstance(computationClass);
computation.init(
workerApi, getWorkerValue(workerApi),
executionStage.getMigrationSuperstep() - 1);
computation.preSuperstep();
return new InnerVertexSender() {
@Override
public void vertexSend(Vertex<I, V, E> vertex) {
try {
Iterable<MPrev> messages = null;
if (previousMessagesSupplier != null) {
messages = previousMessagesSupplier.get();
}
if (messages == null) {
messages = Collections.<MPrev>emptyList();
}
computation.compute(vertex, messages);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public void postprocess() {
computation.postSuperstep();
}
};
}
@Override
public void workerContextSend(
BlockWorkerContextSendApi<I, Writable> workerContextApi,
MigrationSuperstepStage executionStage,
MigrationWorkerContext workerValue) {
if (workerValue != null && !isFirstStep) {
workerValue.setApi(workerContextApi);
workerValue.postSuperstep();
}
}
@SuppressWarnings("unchecked")
@Override
public void masterCompute(BlockMasterApi masterApi,
MigrationSuperstepStage executionStage) {
MigrationFullMasterCompute masterComputeF =
isFullMigration ? (MigrationFullMasterCompute) masterCompute : null;
if (masterCompute != null) {
masterCompute.init(masterApi);
if (masterComputeF != null) {
masterComputeF.init(
executionStage.getMigrationSuperstep(),
computationClass, messageClass, messageCombinerClass);
}
masterCompute.compute();
}
if (isFullMigration) {
if (masterComputeF != null) {
isHalted = masterComputeF.isHalted();
if (masterComputeF.isHalted()) {
nextPiece = null;
} else {
if (masterComputeF.getNewComputationClass() != null ||
masterComputeF.getNewMessage() != null ||
masterComputeF.getNewMessageCombiner() != null) {
nextPiece = new MigrationPiece(
masterComputeF.getComputationClass(),
masterComputeF,
previousMessagesSupplier,
currentMessagesConsumer,
masterComputeF.getOutgoingMessage(),
masterComputeF.getMessageCombiner(),
true, false);
} else {
nextPiece = this;
}
}
} else {
nextPiece = this;
}
if (nextPiece != null) {
if (nextPiece.isFirstStep) {
nextPiece = new MigrationPiece<>(
computationClass,
masterComputeF,
previousMessagesSupplier,
currentMessagesConsumer,
messageClass,
messageCombinerClass,
true, false);
}
nextPiece.sanityTypeChecks(masterApi.getConf(), messageClass);
}
} else {
Preconditions.checkState(!isHalted);
Preconditions.checkState(nextPiece == null);
}
}
@Override
public void workerContextReceive(
BlockWorkerContextReceiveApi workerContextApi,
MigrationSuperstepStage executionStage,
MigrationWorkerContext workerValue, List<Writable> workerMessages) {
if (workerValue != null) {
workerValue.setApi(workerContextApi);
workerValue.setReceivedMessages(workerMessages);
if (isFirstStep && workerValue instanceof MigrationFullWorkerContext) {
try {
((MigrationFullWorkerContext) workerValue).preApplication();
} catch (InstantiationException | IllegalAccessException e) {
throw new RuntimeException(e);
}
}
if (!isHalted) {
workerValue.preSuperstep();
}
if (isHalted && workerValue instanceof MigrationFullWorkerContext) {
((MigrationFullWorkerContext) workerValue).postApplication();
}
}
}
@Override
public VertexReceiver<I, V, E, M> getVertexReceiver(
BlockWorkerReceiveApi<I> workerApi,
MigrationSuperstepStage executionStage) {
if (currentMessagesConsumer == null || isHalted) {
return null;
}
return new InnerVertexReceiver() {
@Override
public void vertexReceive(Vertex<I, V, E> vertex, Iterable<M> messages) {
currentMessagesConsumer.apply(messages);
}
};
}
@Override
public MessageClasses<I, M> getMessageClasses(
ImmutableClassesGiraphConfiguration conf) {
return new DefaultMessageClasses(
messageClass,
DefaultMessageValueFactory.class,
messageCombinerClass,
GiraphConstants.MESSAGE_ENCODE_AND_STORE_TYPE.get(conf));
}
@Override
public MigrationSuperstepStage nextExecutionStage(
MigrationSuperstepStage executionStage) {
return executionStage.changedMigrationSuperstep(
executionStage.getMigrationSuperstep() + 1);
}
public MigrationPiece getNextPiece() {
Preconditions.checkState(isFullMigration);
MigrationPiece res = nextPiece;
nextPiece = null;
return res;
}
}
|
from investing_algorithm_framework.core.exceptions import OperationalException
from investing_algorithm_framework.core.models import OrderSide
from investing_algorithm_framework.core.models import OrderType
from tests.resources import SYMBOL_A, SYMBOL_A_PRICE
from tests.resources import TestBase, TestOrderAndPositionsObjectsMixin
class Test(TestBase, TestOrderAndPositionsObjectsMixin):
def setUp(self):
super(Test, self).setUp()
self.start_algorithm()
def test_validate_limit_buy_order(self):
portfolio_manager = self.algo_app.algorithm.get_portfolio_manager()
order_a = portfolio_manager.create_order(
order_type=OrderType.LIMIT.value,
order_side=OrderSide.BUY.value,
amount=1,
symbol=SYMBOL_A,
price=SYMBOL_A_PRICE,
validate_pair=True,
context=None
)
portfolio_manager.add_order(order_a)
def test_validate_limit_sell_order(self):
portfolio_manager = self.algo_app.algorithm.get_portfolio_manager()
order_a = portfolio_manager.create_order(
order_type=OrderType.LIMIT.value,
order_side=OrderSide.BUY.value,
amount=1,
symbol=SYMBOL_A,
price=SYMBOL_A_PRICE,
validate_pair=True,
context=None
)
portfolio_manager.add_order(order_a)
order_a.set_executed()
order_a_sell = portfolio_manager.create_order(
order_type=OrderType.LIMIT.value,
order_side=OrderSide.SELL.value,
amount=1,
symbol=SYMBOL_A,
price=SYMBOL_A_PRICE,
validate_pair=True,
context=None
)
portfolio_manager.add_order(order_a_sell)
def test_validate_limit_sell_order_larger_then_position(self):
portfolio_manager = self.algo_app.algorithm.get_portfolio_manager()
order_a = portfolio_manager.create_order(
order_type=OrderType.LIMIT.value,
order_side=OrderSide.BUY.value,
amount=1,
symbol=SYMBOL_A,
price=SYMBOL_A_PRICE,
validate_pair=True,
context=None
)
portfolio_manager.add_order(order_a)
order_a.set_executed()
order_a_sell = portfolio_manager.create_order(
order_type=OrderType.LIMIT.value,
order_side=OrderSide.SELL.value,
amount=2,
symbol=SYMBOL_A,
price=SYMBOL_A_PRICE,
validate_pair=True,
context=None
)
with self.assertRaises(OperationalException) as exc:
portfolio_manager.add_order(order_a_sell)
def test_validate_limit_order_with_unallocated_error(self):
portfolio_manager = self.algo_app.algorithm.get_portfolio_manager()
order_a = portfolio_manager.create_order(
order_type=OrderType.LIMIT.value,
order_side=OrderSide.BUY.value,
amount=10000,
symbol=SYMBOL_A,
price=SYMBOL_A_PRICE,
validate_pair=True,
context=None
)
with self.assertRaises(OperationalException):
portfolio_manager.add_order(order_a)
|
const utils = require('./../../utils')
module.exports = router => {
// Generate new id and redirect to that qualification
router.get('/application/:applicationId/other-qualifications/add', (req, res) => {
const id = utils.generateRandomString()
res.redirect(`/application/${req.params.applicationId}/other-qualifications/${id}/type`)
})
// Render review page
router.get('/application/:applicationId/other-qualifications/review', (req, res) => {
const { applicationId } = req.params
const { otherQualifications } = utils.applicationData(req)
const otherQualificationsDisclose = utils.applicationData(req).otherQualificationsDisclose
if (otherQualificationsDisclose !== 'No' && (utils.toArray(otherQualifications).length === 0)) {
// Redirect back to guard question if there are no qualifications but they didn't answer No to the guard question
res.redirect(`/application/${applicationId}/other-qualifications`)
} else {
res.render('application/other-qualifications/review')
}
})
router.post('/application/:applicationId/other-qualifications/answer', (req, res) => {
const { applicationId } = req.params
const { otherQualificationsDisclose } = req.body.applications[applicationId]
if (otherQualificationsDisclose === 'Yes') {
res.redirect(`/application/${applicationId}/other-qualifications/add`)
} else {
res.redirect(`/application/${applicationId}/other-qualifications/review`)
}
})
// Render type page
router.get('/application/:applicationId/other-qualifications/:id/type', (req, res) => {
const { id } = req.params
const { referrer } = req.query
res.render('application/other-qualifications/type', {
id,
referrer
})
})
// Update qualification type
router.post('/application/:applicationId/other-qualifications/:id/type', (req, res) => {
const { applicationId, id } = req.params
res.redirect(`/application/${applicationId}/other-qualifications/${id}/details`)
})
// Render details page
router.get('/application/:applicationId/other-qualifications/:id/details', (req, res) => {
const { otherQualifications } = utils.applicationData(req)
const { id } = req.params
const { referrer } = req.query
const { type } = otherQualifications[id]
res.render('application/other-qualifications/details', {
id,
referrer,
type
})
})
router.post('/application/:applicationId/other-qualifications/:id/details', (req, res) => {
const next = req.session.data.next || 'review'
const { applicationId } = req.params
const { referrer } = req.query
res.redirect(referrer || `/application/${applicationId}/other-qualifications/${next}`)
})
}
|
package migemo
import (
"bytes"
"container/list"
"regexp"
"unicode/utf8"
"github.com/koron/gelatin/trie"
)
func (m *matcher) Pattern() (pattern string, err error) {
if m.patterned {
return m.pattern, nil
}
b := new(bytes.Buffer)
err = m.writePattern(b, m.trie.Root())
if err != nil {
return "", err
}
m.pattern = b.String()
m.patterned = true
return m.pattern, nil
}
func (m *matcher) writePattern(b *bytes.Buffer, n trie.Node) error {
labels, child_nodes := m.splitLabels(n)
// Output group in.
grouped := false
c0 := utf8.RuneCountInString(labels)
c1 := child_nodes.Len()
if c0+c1 > 1 && c1 > 0 {
grouped = true
b.WriteString(m.options.OpGroupIn)
}
// Output nodes which doesn't have any children.
if c0 > 0 {
if c0 > 1 {
b.WriteString(m.options.OpClassIn)
b.WriteString(m.quoteMeta(labels))
b.WriteString(m.options.OpClassOut)
} else {
b.WriteString(m.quoteMeta(labels))
}
}
// Output nodes which have some children.
if c1 > 0 {
first := c0 == 0
for e := child_nodes.Front(); e != nil; e = e.Next() {
if !first {
b.WriteString(m.options.OpOr)
} else {
first = false
}
child := e.Value.(*trie.TernaryNode)
b.WriteString(m.quoteMeta(string(child.Label())))
b.WriteString(m.options.OpWSpaces)
m.writePattern(b, child)
}
}
// Output group out.
if grouped {
b.WriteString(m.options.OpGroupOut)
}
return nil
}
// splitLabels split children which have children or not.
func (m *matcher) splitLabels(n trie.Node) (label string, nodes *list.List) {
l := list.New()
b := new(bytes.Buffer)
n.Each(func(t trie.Node) bool {
if t.HasChildren() {
l.PushBack(t)
} else {
b.WriteRune(t.Label())
}
return true
})
return b.String(), l
}
func (m *matcher) quoteMeta(s string) string {
// Quote regexp meta chars.
return regexp.QuoteMeta(s)
}
|
Subsets and Splits