8 004685D8  7C 7E 1B 79 */	or. r30, r3, r3
/* 8046B69C 004685DC  40 82 00 18 */	bne .L_8046B6B4
/* 8046B6A0 004685E0  38 7F 00 0C */	addi r3, r31, 0xc
/* 8046B6A4 004685E4  38 BF 00 24 */	addi r5, r31, 0x24
/* 8046B6A8 004685E8  38 80 04 9D */	li r4, 0x49d
/* 8046B6AC 004685EC  4C C6 31 82 */	crclr 6
/* 8046B6B0 004685F0  4B BB EF 91 */	bl panic_f__12JUTExceptionFPCciPCce
.L_8046B6B4:
/* 8046B6B4 004685F4  7F C3 F3 78 */	mr r3, r30
/* 8046B6B8 004685F8  81 9E 00 10 */	lwz r12, 0x10(r30)
/* 8046B6BC 004685FC  81 8C 00 3C */	lwz r12, 0x3c(r12)
/* 8046B6C0 00468600  7D 89 03 A6 */	mtctr r12
/* 8046B6C4 00468604  4E 80 04 21 */	bctrl
/* 8046B6C8 00468608  80 63 00 00 */	lwz r3, 0(r3)
/* 8046B6CC 0046860C  28 03 00 00 */	cmplwi r3, 0
/* 8046B6D0 00468610  41 82 00 20 */	beq .L_8046B6F0
/* 8046B6D4 00468614  81 83 00 10 */	lwz r12, 0x10(r3)
/* 8046B6D8 00468618  38 80 00 00 */	li r4, 0
/* 8046B6DC 0046861C  C0 22 29 3C */	lfs f1, lbl_80520C9C@sda21(r2)
/* 8046B6E0 00468620  38 A0 00 01 */	li r5, 1
/* 8046B6E4 00468624  81 8C 00 1C */	lwz r12, 0x1c(r12)
/* 8046B6E8 00468628  7D 89 03 A6 */	mtctr r12
/* 8046B6EC 0046862C  4E 80 04 21 */	bctrl
.L_8046B6F0:
/* 8046B6F0 00468630  7F A3 EB 78 */	mr r3, r29
/* 8046B6F4 00468634  38 80 00 02 */	li r4, 2
/* 8046B6F8 00468638  4B EC 87 A5 */	bl getSeq__Q28PSSystem6SeqMgrFUl
/* 8046B6FC 0046863C  7C 7D 1B 79 */	or. r29, r3, r3
/* 8046B700 00468640  40 82 00 18 */	bne .L_8046B718
/* 8046B704 00468644  38 7F 00 0C */	addi r3, r31, 0xc
/* 8046B708 00468648  38 BF 00 24 */	addi r5, r31, 0x24
/* 8046B70C 0046864C  38 80 04 A6 */	li r4, 0x4a6
/* 8046B710 00468650  4C C6 31 82 */	crclr 6
/* 8046B714 00468654  4B BB EF 2D */	bl panic_f__12JUTExceptionFPCciPCce
.L_8046B718:
/* 8046B718 00468658  7F A3 EB 78 */	mr r3, r29
/* 8046B71C 0046865C  81 9D 00 10 */	lwz r12, 0x10(r29)
/* 8046B720 00468660


      if (_app is { } app)
        {
            await app.StartAsync();

            var server = app.Services.GetRequiredService<IServer>();
            var addresses = server.Features.Get<IServerAddressesFeature>();

            _baseAddress = addresses!.Addresses
                .Select((p) => new Uri(p))
                .Last();
        }
    }

    public async Task StopAsync()
    {
        if (_app is { } app)
        {
            await app.StopAsync();
            _app = null;
        }
    }

    public async ValueTask DisposeAsync()
    {
        GC.SuppressFinalize(this);

        if (!_disposed && _app is not null)
        {
            await _app.DisposeAsync();
        }

        _disposed = true;
    }

    private static string GetContentRoot()
    {
        string contentRoot = string.Empty;
        var directoryInfo = new DirectoryInfo(AppContext.BaseDirectory);

        do
        {
            string? solutionPath = Directory.EnumerateFiles(directoryInfo.FullName, "TodoApp.slnx").FirstOrDefault();

            if (solutionPath is not null)
            {
                contentRoot = Path.GetFullPath(Path.Combine(directoryInfo.FullName, "samples", "TodoApp"));
                break;
            }

            directoryInfo = directoryInfo.Parent;
        }
        while (directoryInfo is not null);

        return contentRoot;
    }
}


(namespace + '/:id', ...middleware, ...updateMiddleware, controller.update);
    }
    if (ignore.findIndex(i => i === 'delete') === -1) {
        router.delete(namespace + '/:id', ...middleware, ...deleteMiddleware, controller.delete);
    }
};

export { crudRouter as CrudRouter };
import { OutcomeNames } from "../models/outcome-names";
import { WorkflowPlugin } from "../models";
import { ActivityDefinition } from "../models";
import pluginStore from '../services/workflow-plugin-store';

export class TimerActivities implements WorkflowPlugin {
  private static readonly Category: string = "时间";

  getName = (): string => "TimerActivities";
  getActivityDefinitions = (): Array<ActivityDefinition> => ([this.setTimeout(),this.setInterval()]);

  private setTimeout = (): ActivityDefinition => ({
    type: "TimeOut",
    displayName: "setTimeout",
    description: "setTimeout",
    category: TimerActivities.Category,
    icon: 'fas fa-hourglass-start',
    properties: [
      {
        name: 'time',
        type: 'text',
        label: '毫秒',
        hint: ''
      }],
    runtimeDescription: 'x => !!x.state.time ? `Triggers after <strong>${ x.state.time }</strong>` : x.definition.description',
    outcomes: [OutcomeNames.Done]
  });

  private setInterval = (): ActivityDefinition => ({
    type: "TimeInterval",
    displayName: "setInterval",
    description: "setInterval",
    category: TimerActivities.Category,
    icon: 'fas fa-hourglass-start',
    properties: [
      {
        name: 'time',
        type: 'text',
        label: '毫秒',
        hint: ''
      }],
    runtimeDescription: 'x => !!x.state.time ? `Triggers after <strong>${ x.state.time }</strong>` : x.definition.description',
    outcomes: [OutcomeNames.Done]
  });

}

pluginStore.add(new TimerActivities());
import IImage from '../interfaces/IImage';

class Image implements IImage {
  name: string;
  image_id: string;
  url: string;

  constructor(name: string, url: string, image_id: string) {
    this.name = name;
    this.url = url;
    this.image_id = image_id;
  }
}

export default Image;

function rank(target: number, arr: Array<number>) {
    return rankSub(target, arr, 0, arr.length -1);
}

function rankSub(target: number, arr: Array<number>, leftIndex: number, rightIndex: number){
    if(leftIndex > rightIndex) {
        return -1;
    }
    const midIndex:number = leftIndex + (rightIndex - leftIndex) /2 ;
    if(target < arr[midIndex]) {
        return rankSub(target, arr, leftIndex, midIndex -1);
    }
    if(target > arr[midIndex]) {
        return rankSub(target, arr,  midIndex +1, rightIndex);
    }
    return midIndex;
}import { Department } from './department';

describe('Department', () => {
  it('should create an instance', () => {
    expect(new Department()).toBeTruthy();
  });

  it('should accept values in the constructor', () => {
    const dep = new Department({
      id: 1,
      name: 'IT',
      managerId: 2
    });
    expect(dep.id).toEqual(1);
    expect(dep.name).toEqual('IT');
    expect(dep.managerId).toEqual(2);
  });
});
class Obstacle{

	public minHeight: number = 20;
	public maxHeight: number = 200;
	public height: number    = 0 ;
	public minGap: number    = 200;
	public maxGap:number


2dba

/* Input:
r0: MainBattleData
r1: BattleData
*/
thumb_func_start BeSeq_Cmd3a
BeSeq_Cmd3a: @ 2242dbc :thumb
	push    {r3-r7,lr}
	add     sp, #-0x10
	mov     r4, r1
	mov     r7, r0

	mov     r0, r4
	mov     r1, #0x1
	bl      BeSeq_AddToPointer

	mov     r0, r4
	bl      BeSeq_LoadWord
	mov     r5, r0

	mov     r0, r4
	bl      BeSeq_LoadWord
	str     r0, [sp, #0x4]

	mov     r0, r4
	bl      BeSeq_LoadWord
	mov     r6, r0          @ PKMNBATTTLEDATA_r6

	mov     r0, r4
	bl      BeSeq_LoadWord
	str     r0, [sp, #0x8]

	ldr     r2, [sp, #0x4]
	mov     r0, r7
	mov     r1, r4
	bl      GetTargetNrOfPkmn
	str     r0, [sp, #0x0]

	ldr     r1, [sp, #0x0]
	mov     r0, r4
	mov     r2, r6
	mov     r3, #0x0
	bl      ReadPkmnBattleData1
	str     r0, [sp, #0xc]

	ldr     r2, [sp, #0x8]
	mov     r0, r7
	mov     r1, r4
	bl      BeSeq_GetVariableAdress
	mov     r1, r0

	cmp     r5, #0x14
	bhi     branch_2242ee2
	add     r0, r5, r5
	add     r0, pc
	ldrh    r0, [r0, #0x6]
	lsl     r0, r0, #16
	asr     r0, r0, #16
	add     pc, r0
@ 0x2242e22

Jumppoints_2242e22:
.hword branch_2242ee2 - Jumppoints_2242e22 - 2 @ 0x0
.hword branch_2242ee2 - Jumppoints_2242e22 - 2 @ 0x1
.hword branch_2242ee2 - Jumppoints_2242e22 - 2 @ 0x2
.hword branch_2242ee2 - Jumppoints_2242e22 - 2 @ 0x3
.hword branch_2242ee2 - Jumppoints_2242e22 - 2 @ 0x4
.hword branch_2242ee2 - Jumppoints_2242e22 - 2 @ 0x5
.hword branch_2242ee2 - Jumppoints_2242e22 - 2 @ 0x6
.hword branch_2242e4c - Jumppoints_2242e22 - 2 @ 0x7
.hword branch_2242e52 - Jumppoints_2242e22 - 2 @ 0x8
.hword branch_2242e5c - Jumppoints_2242e22 - 2 @ 0x9
.hword branch_2242e66 - Jumppoints_2242e22 - 2 @ 0xa
.hword branch_2242e70 - Jumppoints_2242e22 - 2 @ 0xb
.hword branch_2242e80 - Jumppoints_2242e22 - 2 @ 0xc
.hword branch_2242e8a - Jumppoints_2242e22 - 2 @ 0xd
.hword branch_2242e96 - Jumppoints_2242e22 - 2 @ 0xe
.hword branch_2242ea2 - Jum


454,0 0 0 1px #555}.ui.inverted.cards>.secondary.card:hover,.ui.inverted.secondary.card:hover,.ui.inverted.secondary.cards>.card:hover{-webkit-box-shadow:0 1px 3px 0 #555,0 2px 0 0 #6e6e6e,0 0 0 1px #555;box-shadow:0 1px 3px 0 #555,0 2px 0 0 #6e6e6e,0 0 0 1px #555}.ui.cards>.red.card,.ui.red.card,.ui.red.cards>.card{-webkit-box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #db2828,0 1px 3px 0 #d4d4d5;box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #db2828,0 1px 3px 0 #d4d4d5}.ui.cards>.red.card:hover,.ui.red.card:hover,.ui.red.cards>.card:hover{-webkit-box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #d01919,0 1px 3px 0 #bcbdbd;box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #d01919,0 1px 3px 0 #bcbdbd}.ui.inverted.cards>.red.card,.ui.inverted.red.card,.ui.inverted.red.cards>.card{-webkit-box-shadow:0 1px 3px 0 #555,0 2px 0 0 #ff695e,0 0 0 1px #555;box-shadow:0 1px 3px 0 #555,0 2px 0 0 #ff695e,0 0 0 1px #555}.ui.inverted.cards>.red.card:hover,.ui.inverted.red.card:hover,.ui.inverted.red.cards>.card:hover{-webkit-box-shadow:0 1px 3px 0 #555,0 2px 0 0 #ff392b,0 0 0 1px #555;box-shadow:0 1px 3px 0 #555,0 2px 0 0 #ff392b,0 0 0 1px #555}.ui.cards>.orange.card,.ui.orange.card,.ui.orange.cards>.card{-webkit-box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #f2711c,0 1px 3px 0 #d4d4d5;box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #f2711c,0 1px 3px 0 #d4d4d5}.ui.cards>.orange.card:hover,.ui.orange.card:hover,.ui.orange.cards>.card:hover{-webkit-box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #f26202,0 1px 3px 0 #bcbdbd;box-shadow:0 0 0 1px #d4d4d5,0 2px 0 0 #f26202,0 1px 3px 0 #bcbdbd}.ui.inverted.cards>.orange.card,.ui.inverted.orange.card,.ui.inverted.orange.cards>.card{-webkit-box-shadow:0 1px 3px 0 #555,0 2px 0 0 #ff851b,0 0 0 1px #555;box-shadow:0 1px 3px 0 #555,0 2px 0 0 #ff851b,0 0 0 1px #555}.ui.inverted.cards>.orange.card:hover,.ui.inverted.orange.card:hover,.ui.inverted.orange.cards>.card:hover{-webkit-box-shadow:0 1px 3px 0 #555,0 2px 0 0 #e76b00,0 0 0 1px #555;box-shadow:0 1px 3px 0 #555,0 2px 0 0 #e76b00,0 0 0 1px #555}.ui.cards>.yellow.card,.ui.yellow.card,.ui.yellow.cards>.card{-webkit-box-shadow:0 0 0 1px


 User>((builder) => {
    builder.apply((scopes) => scopes.country('India'))
  })
  public static country = scope((builder, _country: string) => {
    builder.whereIn('', [])
  })
}

User.query().apply((scopes) => scopes.active().country('India'))

User.create({ id: '1', username: 'a' })
User.fetchOrCreateMany('id', [{ id: '1', username: 'virk' }])
User.create({ id: '1', username: 'virk' })
User.create({ id: '1', username: 'virk' })
User.create({ id: '1' })
import Discord from 'discord.js';

import { threadList } from '@zougui/thread-list';
import { logger } from '@zougui/logger';

import { LoginTimeoutError } from './errors';
import { BotLoggedInLog } from './logs';

export const createClient = (token: string, options: CreateClientOptions): Promise<Discord.Client> => {
  const client = new Discord.Client();
  threadList.addCleanup(() => client.destroy());

  return new Promise<Discord.Client>((resolve, reject) => {
    const handleLoginTimeout = setTimeout(() => {
      rejectError(new LoginTimeoutError({ timeout: options.timeout }));
    }, options.timeout);

    const cleanup = () => {
      client.off('ready', handleReady);
      client.off('error', handleError);
      clearTimeout(handleLoginTimeout);
    }

    const rejectError = (error: Error) => {
      cleanup();
      reject(error);
    }

    const handleReady = () => {
      cleanup();
      logger.info(new BotLoggedInLog({ botName: client.user?.username }));
      resolve(client);
    }

    const handleError = (error: Error) => {
      rejectError(error);
    }

    client.once('error', handleError);
    client.once('ready', handleReady);
    client.login(token);
  });
}

export interface CreateClientOptions {
  timeout: number;
}
export class WebviewContainer {

    private _domNode: HTMLElement;

    constructor() {
        this._domNode = document.createElement('div');
        this._domNode.classList.add('container');
    }

    public getDomNode(): HTMLElement {
        return this._domNode;
    }
}import {Component, Input, OnInit} from '@angular/core';
import {Device} from "../model/device";
import {ControlUnit} from "../model/controlUnit";
import {DeviceService} from "../services/device.service";

@Component({
    moduleId: module.id,
    selector: 'boolean-details',
    templateUrl: '../views/boolean-device-details.component.html'
})
export class BooleanDeviceDetailsComponent implements OnInit {
    @Input()
    device: Device;

    @Input()
    controlUnit: ControlUnit;

    new_value: boolean;
    log_message: string = null;

    constructor(private deviceService: DeviceService) {
    }

    ngOnInit(): void {
        this.new_value = this.controlUnit.current == 1;
    }

    //TODO Überarbeiten Sie diese Klasse. Lesen Sie die Daten für das Diagramm aus dem SessionStorage aus und passen Sie die onSubmit Funktion an.

    /**
     * Liest den neuen Wert des Steuerungselements aus und leitet diesen an die REST-Schnittstelle weiter
     */
    onSubmit(): void {
        //TODO Lesen Sie die eingebenen Daten aus und verarbeiten Sie diese über die REST-Schnittstelle

        this.doughnutChartData[this.new_value ? 1 : 0]++;
        this.doughnutChartData = Object.assign({}, this.doughnutChartData);

        if (this.log_message != null) {
            this.log_message += "\n";
        } else {
            this.log_message = "";
        }
        this.log_message +=


.MRG_16H cs1, c1, RZ, cs1;
--:-:-:-:1  @P2 VABSDIFF.S16.S16.MRG_16H cs2, c2, RZ, cs2;
--:-:-:-:1  @P3 VABSDIFF.S16.S16.MRG_16H cs3, c3, RZ, cs3;

// max = max(c,d,max(a,b,max)) ...
--:-:-:-:1      VMNMX.UD.U16.U16.MX.MAX maxabs, cs0, cs0.H1, maxabs;
--:-:-:-:1      VMNMX.UD.U16.U16.MX.MAX maxabs, cs1, cs1.H1, maxabs;
--:-:-:-:1      VMNMX.UD.U16.U16.MX.MAX maxabs, cs2, cs2.H1, maxabs;
--:-:-:-:1      VMNMX.UD.U16.U16.MX.MAX maxabs, cs3, cs3.H1, maxabs;
</SCHEDULE_BLOCK>

    } : "";
}

sub butterfly {
    return $int16 ? q{
--:-:-:-:0      LOP.AND.Z P0, RZ, tid, 31;
--:-:1:-:2      SHFL.BFLY PT, warp_max, maxabs, 0x10, 0x1f;
01:-:-:-:4      IMNMX maxabs, warp_max, maxabs, !PT;
--:-:1:-:2      SHFL.BFLY PT, warp_max, maxabs, 0x8,  0x1f;
01:-:-:-:4      IMNMX maxabs, warp_max, maxabs, !PT;
--:-:1:-:2      SHFL.BFLY PT, warp_max, maxabs, 0x4,  0x1f;
01:-:-:-:4      IMNMX maxabs, warp_max, maxabs, !PT;
--:-:-:-:0      MOV Stats0, param_Stats[0];
--:-:1:-:2      SHFL.BFLY PT, warp_max, maxabs, 0x2,  0x1f;
01:-:-:-:4      IMNMX maxabs, warp_max, maxabs, !PT;
--:-:-:-:0      MOV Stats1, param_Stats[1];
--:-:1:-:2      SHFL.BFLY PT, warp_max, maxabs, 0x1,  0x1f;
01:-:-:-:2      IMNMX maxabs, warp_max, maxabs, !PT;
--:-:-:-:1  @P0 RED.E.MAX [Stats], maxabs;
    } : "";
}

-]

--:-:1:-:1      LDS.U.128 j0Ay0, [readAs + 4x<0*128 + 00>];
--:-:1:-:1      LDS.U.128 j0Bx0, [readBs + 4x<0*128 + 00>];
--:-:1:-:1      LDS.U.128 j0Ay4, [readAs + 4x<0*128 + 64>];
--:-:1:-:1      LDS.U.128 j0Bx4, [readBs + 4x<0*128 + 64>];

LOOP:

[+

    our @top;
    our %insert;

    my @cOrder;
    my @swirl = ([0,2],[1,2],[1,0],[0,0]);
    my @y = (0,1,4,5);
    foreach my $x (0,2,4,6)
    {
        foreach my $y (@y)
        {
            push @cOrder, [$x + $_->[0], $y + $_->[1]] foreach @swirl;
        }
        @y = reverse @y;
    }

    my $out = join '', @top;

    foreach my $j (0 .. 7)
    {
        my $odd      = $j & 1;
        my $nOdd     = !$odd + 0;
        my $rsOffset = ($j + 1) % 8;
        my $rsPred   = $j == 7 ? '@P0' : '   ';

        $insert{"j${j}c0"} = sprintf "--:-:1:-:1  %s LDS.U.128 j%dAy0, [readAs + 4x<%d*128 + 00>];\n", $rsPred, $nOdd


_STATE_RESTORE = 0x8BDC;
const int GL_QCOM_extended_get2 = 1;
const int GL_QCOM_framebuffer_foveated = 1;
const int GL_FOVEATION_ENABLE_BIT_QCOM = 0x00000001;
const int GL_FOVEATION_SCALED_BIN_METHOD_BIT_QCOM = 0x00000002;
const int GL_QCOM_perfmon_global_mode = 1;
const int GL_PERFMON_GLOBAL_MODE_QCOM = 0x8FA0;
const int GL_QCOM_shader_framebuffer_fetch_noncoherent = 1;
const int GL_FRAMEBUFFER_FETCH_NONCOHERENT_QCOM = 0x96A2;
const int GL_QCOM_tiled_rendering = 1;
const int GL_COLOR_BUFFER_BIT0_QCOM = 0x00000001;
const int GL_COLOR_BUFFER_BIT1_QCOM = 0x00000002;
const int GL_COLOR_BUFFER_BIT2_QCOM = 0x00000004;
const int GL_COLOR_BUFFER_BIT3_QCOM = 0x00000008;
const int GL_COLOR_BUFFER_BIT4_QCOM = 0x00000010;
const int GL_COLOR_BUFFER_BIT5_QCOM = 0x00000020;
const int GL_COLOR_BUFFER_BIT6_QCOM = 0x00000040;
const int GL_COLOR_BUFFER_BIT7_QCOM = 0x00000080;
const int GL_DEPTH_BUFFER_BIT0_QCOM = 0x00000100;
const int GL_DEPTH_BUFFER_BIT1_QCOM = 0x00000200;
const int GL_DEPTH_BUFFER_BIT2_QCOM = 0x00000400;
const int GL_DEPTH_BUFFER_BIT3_QCOM = 0x00000800;
const int GL_DEPTH_BUFFER_BIT4_QCOM = 0x00001000;
const int GL_DEPTH_BUFFER_BIT5_QCOM = 0x00002000;
const int GL_DEPTH_BUFFER_BIT6_QCOM = 0x00004000;
const int GL_DEPTH_BUFFER_BIT7_QCOM = 0x00008000;
const int GL_STENCIL_BUFFER_BIT0_QCOM = 0x00010000;
const int GL_STENCIL_BUFFER_BIT1_QCOM = 0x00020000;
const int GL_STENCIL_BUFFER_BIT2_QCOM = 0x00040000;
const int GL_STENCIL_BUFFER_BIT3_QCOM = 0x00080000;
const int GL_STENCIL_BUFFER_BIT4_QCOM = 0x00100000;
const int GL_STENCIL_BUFFER_BIT5_QCOM = 0x00200000;
const int GL_STENCIL_BUFFER_BIT6_QCOM = 0x00400000;
const int GL_STENCIL_BUFFER_BIT7_QCOM = 0x00800000;
const int GL_MULTISAMPLE_BUFFER_BIT0_QCOM = 0x01000000;
const int GL_MULTISAMPLE_BUFFER_BIT1_QCOM = 0x02000000;
const int GL_MULTISAMPLE_BUFFER_BIT2_QCOM = 0x04000000;
const int GL_MULTISAMPLE_BUFFER_BIT3_QCOM = 0x08000000;
const int GL_MULTISAMPLE_BUFFER_BIT4_QCOM = 0x10000000;
const int GL_MULTISAMPLE_BUFFER_BIT5_QCOM = 0x20000000;
const int GL_MULTISAMPLE_BUFFER_BIT6_QCOM = 0x40000000;
const int GL_MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000;
const int GL_QCOM_writeonly_rendering = 1;
const int GL_WRITEONLY_RENDERING_QCOM = 0x8823;
const int GL_VIV_shader_binary = 1;
const int GL_SHADER_BINARY_VIV = 0x8FC4;
// Copyright 2024 Google LLC
//


#!/usr/bin/env python

import argparse
import re
import sys

def read_file(filepath):
    with open(filepath) as f:
        lines = f.readlines()
        split_lines = [re.split(r'[ ,]+', l.strip().replace('$', '')) for l in lines]
        return split_lines

# jumps and branches with named targets
jumps = ['jal', 'j']
branches = ['beq', 'bgez', 'bgtz', 'blez', 'bltz', 'bne']
jump_branches = jumps + branches
# jumps and branches with delay slots
has_delay_slot = jump_branches + ['jr']

def decode_references(instructions):
    refs = []
    for ins in instructions:
        if ins[3] in jump_branches:
            target = int(ins[-1], 0)
            if target not in refs:
                refs.append(target)
    return refs

def reassemble(args, instructions, refs):
    print('.rsp')
    print('\n.create DATA_FILE, 0x%04X' % 0x0000)
    print('\n.close // DATA_FILE\n')
    print('.create CODE_FILE, 0x%08X\n' % args.base)
    delay_slot = False
    for ins in instructions:
        addr = int(ins[0], 0)
        if (addr & 0xFFFF) in refs:
            print('%s_%08x:' % (args.name, addr))
        sys.stdout.write(' ' * args.indent)
        if delay_slot:
            sys.stdout.write(' ')
            delay_slot = False
        if ins[3] in jumps:
            target = int(ins[-1], 0) | (args.base & 0xFFFF0000)
            ins[-1] = '%s_%08x' % (args.name, target)
        elif ins[3] in branches:
            if ins[3][-1] =='z' and ins[5] == 'zero':
                del ins[5] # remove 'zero' operand from branch
            target = (int(ins[-1], 0) & 0x1FFF) + (args.base & 0xFFFF0000)
            ins[-1] = '%s_%08x' % (args.name, target)
        elif ins[3] == 'vsar': # fixup last operand of vsar
            reg_map = {'ACC_H': 0, 'ACC_M': 1, 'ACC_L': 2}
            reg = ins[4].split(r'[')[0]
            num = reg_map[ins[-1]]
            ins[-1] = '%s[%d]' % (reg, num)
        if ins[3] in has_delay_slot:
            delay_slot = True
        if len(ins) > 4: # with args
            print('%-5s %s' % (ins[3], ', '.join(ins[4:])))
        else:
            print('%s' % ins[3])
    print('\n.close // CODE_FILE')

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('input_file', help="input assembly file generated from `rasm2 -D -e -a rsp -B -o 0x04001000 -f`")
    parser.add_argument('-b', type=int, help="base address of file", dest='base', default=0x04001000)
    parser.add_argument('-i', type=int, help="amount of indentation", dest='indent', default=4)
    parser.add_argument('-n', help="name to prefex labels with", dest='name', default='f3d')
    args = parser.parse_args()

    lines = read_file(args.input_file)
    refs = decode_references(lines)
    reassemble(args, lines, refs)

main()


 \note This is provided as a static function to allow it to be used in
  //!     situations where a CrashpadClient object is not otherwise available.
  //!     This may be useful when a child process inherits its parent’s Crashpad
  //!     handler, but wants to sever this tie.
  static void UseSystemDefaultHandler();
#endif

 private:
#if defined(OS_MACOSX)
  base::mac::ScopedMachSendRight exception_port_;
#elif defined(OS_WIN)
  std::wstring ipc_pipe_;
  ScopedKernelHANDLE handler_start_thread_;
#endif  // OS_MACOSX

  DISALLOW_COPY_AND_ASSIGN(CrashpadClient);
};

}  // namespace crashpad

#endif  // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_


 (registry.hasPlugin(key)) {
            return true
        }
        registry.registrarFor(key)
        return false
    }
}/*******************************************************************************
 * This file is part of RedReader.
 *
 * RedReader is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * RedReader is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with RedReader.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/

package org.quantumbadger.redreader.image

import androidx.compose.runtime.Immutable
import org.apache.commons.text.StringEscapeUtils
import org.quantumbadger.redreader.common.UriString
import org.quantumbadger.redreader.jsonwrap.JsonObject
import org.quantumbadger.redreader.reddit.kthings.ImageMetadata
import org.quantumbadger.redreader.reddit.kthings.MaybeParseError
import org.quantumbadger.redreader.reddit.kthings.RedditPost
import kotlin.math.min

@Immutable
class AlbumInfo(
	@JvmField val url: UriString,
	@JvmField val title: String?,
	val description: String?,
	images: List<ImageInfo>
) {
	@JvmField
	val images = ArrayList(images)

	companion object {
		@JvmStatic
		fun parseImgur(
			url: UriString,
			obj: JsonObject
		): AlbumInfo {
			var title = obj.getString("title")
			var description = obj.getString("description")

			if (title != null) {
				title = StringEscapeUtils.unescapeHtml4(title)
			}

			if (description != null) {
				description = StringEscapeUtils.unescapeHtml4(description)
			}

			val imagesJson = obj.getArray("images")
			val images = ArrayList<ImageInfo>()

			for (imageJson in imagesJson!!) {
				images.add(ImageInfo.parseImgur(imageJson.asObject()))
			}

			return AlbumInfo(url, title, description, images)
		}

		@JvmStatic
		fun parseImgurV3(
			url: UriString,
			obj: JsonObject
		): AlbumInfo {
			var title = obj.getString("title")
			var description = obj.getString("description")

			if (title != null) {
				title = StringEscapeUtils.unescapeHtml4(title)
			}

			if (description != null) {
				description = StringEscapeUtils.unescapeHtml4(description)
			}

			val imagesJson = obj.getArray("images")
			val images = ArrayList<ImageInfo>()

			for (imageJson in imagesJson!!) {
				images.add(ImageInfo.parseImgurV3(imageJson.asObject()))
			}

			return AlbumInfo(url, title, description, images)
		}

		private fun stringToMediaType(mediaTypeString: String?): ImageInfo.MediaType {
			return if (mediaTypeString == null) {
				ImageInfo.MediaType.IMAGE
			} else {
				when (mediaTypeString) {
					"AnimatedImage" -> ImageInfo.MediaType.GIF
					// This string doesn't seem to exist yet, but it might do in future
					"Video" -> ImageInfo.MediaType.VIDEO
					"Image" -> ImageInfo.MediaType.IMAGE
					else -> ImageInfo.MediaType.IMAGE
				}
			}
		}

		private fun getPreview(
			minSizePx: Int,
			images: List<ImageMetadata>
		): ImageUrlInfo? {

			var bestSizeMinAxis: Long? = null
			var bestUrl: String? = null
			var bestSize: ImageSize? = null

			for (image in images) {

				if


CK-NEXT: fmlalb z0.h, z1.h, z2.h[0]
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

fmlalb z0.h, z1.h, z2.h
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
// CHECK-NEXT: fmlalb  z0.h, z1.h, z2.h
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

fmlalt z0.s, z1.b, z2.b[0]
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
// CHECK-NEXT: fmlalt z0.s, z1.b, z2.b[0]
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

fmlalt z0.s, z1.b, z2.b
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
// CHECK-NEXT: fmlalt  z0.s, z1.b, z2.b
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

// --------------------------------------------------------------------------//
// Negative tests for instructions that are incompatible with movprfx

movprfx z0.b, p0/z, z0.b
fmlalb  z0.h, z1.b, z7.b[0]
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
// CHECK-NEXT: fmlalb  z0.h, z1.b, z7.b[0]
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

movprfx z29.b, p0/z, z7.b
fmlalt  z29.h, z30.b, z31.b
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
// CHECK-NEXT: fmlalt  z29.h, z30.b, z31.b
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:


#if IOS && !MACCATALYST
using PlatformView = NPicker.Platforms.iOS.MauiDatePicker;
#elif MACCATALYST
using PlatformView = UIKit.UIDatePicker;
#elif MONOANDROID || ANDROID
using PlatformView = NPicker.Platforms.Android.MauiDatePicker;
#elif WINDOWS
using PlatformView = Microsoft.UI.Xaml.Controls.CalendarDatePicker;
#elif TIZEN
using PlatformView = Tizen.UIExtensions.NUI.Entry;
#elif (NETSTANDARD || !PLATFORM) || (NET6_0_OR_GREATER && !IOS && !ANDROID && !TIZEN)
using PlatformView = System.Object;
#endif

namespace NPicker;
/// <summary>
/// Represents the view handler for the abstract <see cref="IDatePicker"/> view and its platform-specific implementation.
/// </summary>
/// <seealso href="https://learn.microsoft.com/dotnet/maui/user-interface/handlers/">Conceptual documentation on handlers</seealso>
public partial class DatePickerHandler : IDatePickerHandler
{
    public static IPropertyMapper<IDatePicker, IDatePickerHandler> Mapper = new PropertyMapper<IDatePicker, IDatePickerHandler>(Microsoft.Maui.Handlers.ViewHandler.ViewMapper)
    {
        [nameof(IDatePicker.Format)] = MapFormat,
        [nameof(IDatePicker.Value)] = MapValue,
        [nameof(IDatePicker.MaximumValue)] = MapMaximumValue,
        [nameof(IDatePicker.MinimumValue)] = MapMinimumValue,
        [nameof(IDatePicker.Placeholder)] = MapPlaceholder,
        [nameof(IDatePicker.PlaceholderColor)] = MapPlaceholderColor,
        [nameof(IDatePicker.FontSize)] = MapFontSize,
        [nameof(IDatePicker.FontFamily)] = MapFontFamily,
    };

    public static CommandMapper<IPicker, IDatePickerHandler> CommandMapper = new(ViewCommandMapper)
    {
    };

    public DatePickerHandler() : base(Mapper, CommandMapper)
    {
    }

    public DatePickerHandler(IPropertyMapper? mapper)
        : base(mapper ?? Mapper, CommandMapper)
    {
    }

    public DatePickerHandler(IPropertyMapper? mapper, CommandMapper? commandMapper)
        : base(mapper ?? Mapper, commandMapper ?? CommandMapper)
    {
    }

    IDatePicker IDatePickerHandler.VirtualView => VirtualView;

    PlatformView IDatePickerHandler.PlatformView => PlatformView;

    /// <summary>
    /// Maps the abstract <see cref="IDatePicker.Format"/> property to the platform-specific implementations.
    /// </summary>
    /// <param name="handler">The associated handler.</param>
    /// <param name="datePicker">The associated <see cref="IDatePicker"/> instance.</param>
    public static partial void MapFormat(IDatePickerHandler handler, IDatePicker datePicker);

    /// <summary>
    /// Maps the abstract <see cref="IDatePicker.Value"/> property to the platform-specific implementations.
    /// </summary>
    /// <


0, cursor_pos)
	local measure_pos = measures + (retval / cml)
	local floor = math.floor(measure_pos)
	local ceil = math.ceil(measure_pos)
	local floor_diff = measure_pos - floor
	local ceil_diff = ceil - measure_pos
	if ceil_diff <= floor_diff then
		rounded_measure = ceil
	else
		rounded_measure = floor
	end
	reaper.SNM_SetIntConfigVar("projmeasoffs", -rounded_measure)
end

local sws_exist = reaper.APIExists("SNM_SetIntConfigVar")
if sws_exist then
	Main()
	reaper.UpdateTimeline()
else
	reaper.ShowConsoleMsg("This script requires the SWS extension for REAPER. Please install it and try again.")
end


"坚持"不仅度过了危机，而且实现了某种转变或成长。

我想要超越常规的解读，不只是简单地说"要坚持"，而是探讨"坚持"的深层含义：它可能意味着主动迎向风暴，甚至成为风暴的一部分；它可能意味着在压力下找到平衡点；它可能意味着在看似不利的条件下发现新的可能性。

我构思了一个故事：主角是一位海洋学家，研究风暴与海洋的关系。她发现了一个关于风暴的惊人秘密：真正的风暴不是外部的，而是我们内心的恐惧和犹豫。而"坚持"不是固执地对抗风暴，而是学会与风暴共舞，在风暴中找到自己的节奏和力量。

标题我想到：《风暴之心》或《成为风暴》

让我详细构思一下：

《成为风暴》

主角：林风，一位研究海洋风暴的女科学家，名字本身就暗示了她与风暴的关系

背景：她在一个偏远的海岛气象站工作，这个气象站是专门用来研究超强台风的

冲突：她发现了一个关于风暴的惊人理论：风暴不是要被战胜的敌人，而是可以被理解和融入的力量。但她的理论不被主流科学界接受，认为是异端邪说。

高潮：当一场百年不遇的超级台风即将袭击海岛时，她决定用自己研发的特殊装备，不是躲避，而是主动进入风暴眼，验证她的理论。

结局：她不仅生存下来，还发现了一种与风暴"共舞"的方法，改变了人类对风暴的理解。

这个故事可以探讨"坚持"的深层含义：不是固执地对抗，而是理解、接纳、转化；不是被动承受，而是主动参与；不是消除风暴，而是成为风暴的一部分。

让我再思考一下如何让这个故事更有深度：

或许可以加入一个象征性的元素：主角的父亲是一位渔民，在一场风暴中失踪。她研究风暴既是出于科学兴趣，也是为了理解父亲的消失。最终她发现，父亲不是被风暴吞噬，而是学会了与风暴共处，成为了海洋的一部分。

这样，"面对风暴都要坚持"就不仅是关于如何度过危机，而是关于如何将危机转化为成长的契机


cvar] = nil
	end
end

function test:Teardown()
	if self.hasQueuedTests then
		perfyPause()
	else
		perfyStop()
	end
	self.testRunning = false
	self.modUnderTest = nil
	if self.reporter then self.reporter:UnsetErrorHandler() end
	-- Get rid of any lingering :Schedule calls, they are broken anyways due to time warping
	DBM:Disable()
	DBM:Enable()
	DBT:CancelAllBars()
	self:TeardownHooks()
	if self.restoreCVars then
		for cvar, value in pairs(self.restoreCVars) do
			SetCVar(cvar, value)
		end
		self.restoreCVars = nil
	end
end

function test:OnInjectCombatLog(_, subEvent, _, srcGuid, srcName, _, _, dstGuid, dstName, _, _, spellId, spellName, _, ...)
	if (subEvent == "SWING_DAMAGE" or subEvent == "SWING_MISSED") and (srcGuid:match("^Creature%-") or srcGuid:match("^Vehicle%-")) then
		self.Mocks:SetThreat(dstGuid, dstName, srcGuid, srcName)
	end
	if subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_BROKEN" or subEvent == "SPELL_AURA_BROKEN_SPELL" then
		self.Mocks:RemoveUnitAura(dstName, dstGuid, spellId, spellName)
	end
	if subEvent == "SPELL_AURA_APPLIED" or subEvent == "SPELL_AURA_APPLIED_DOSE" or subEvent == "SPELL_AURA_REMOVED_DOSE" or subEvent == "SPELL_AURA_REFRESH" then
		local auraType, amount = ...
		self.Mocks:ApplyUnitAura(dstName, dstGuid, spellId, spellName, auraType, amount)
	end
	if (subEvent == "SPELL_CAST_START" or subEvent == "SWING_DAMAGE" or subEvent == "SWING_MISSED") and srcGuid and srcName then
		self.Mocks:LearnGuidNameMapping(srcGuid, srcName)
	end
end

local fakeUnitEventFrame = CreateFrame("Frame")

-- Inject an extra event from somewhere in the event loop, will be triggered after the current event is done processing.
-- Doing it like this is important to not mess up event trigger tracing.
function test:InjectExtraEvent(event, ...)
	self.extraEvents = self.extraEvents or {}
	self.extraEvents[#self.extraEvents + 1] = {0, event, ...}
end

function test:InjectEvent(event, ...)
	if event == "IsEncounterInProgress()" then
		self.Mocks:SetEncounterInProgress(...)
		return
	end
	if event == "DBM_MOCK_UPDATE_INSTANCE_INFO" then
		self.Mocks:SetInstanceInfo(...)
	end
	if event == "PLAYER_REGEN_DISABLED" then
		self.Mocks:SetUnitAffectingCombat("player", UnitName("player"), UnitGUID("player"), true)
	elseif event == "PLAYER_REGEN_ENABLED" then
		self.Mocks:SetUnitAffectingCombat("player", UnitName("player"), UnitGUID("player"), false)
	end
	if event == "UNIT_TARGET" and select("#", ...) > 1 then
		local uId, unitName, target = ...
		target = target:match("Target: (.*)")
		if target == "??" then
			target = nil
		end
		if target == self.logPlayerName or self.allOnYou and self.players[target] then
			target = UnitName("player")
		end
		self.Mocks:UpdateTarget(uId, unitName, target)
		-- strip extra params to not provide the mod with more information than it would have in the real environment
		return self:InjectEvent(event, uId)
	e


			//  This addition will always result in a `usize` whose lowest
			//  `T::BITS` bits are the bit index in the destination element,
			//  and the rest of the high bits (shifted down) are the number of
			//  elements by which to advance.
			(
				(far >> T::BITS) as isize,
				((far & (T::MASK as usize)) as u8).into(),
			)
		}
	}

	/// Computes the size of a span from `self` for `len` bits.
	///
	/// # Parameters
	///
	/// - `self`
	/// - `len`: The number of bits to include in the span.
	///
	/// # Returns
	///
	/// - `usize`: The number of elements `T` included in the span. This will
	///   be in the domain `1 .. usize::max_value()`.
	/// - `BitIdx`: The index of the first bit *after* the span. This will be in
	///   the domain `1 ..= T::SIZE`.
	///
	/// # Type Parameters
	///
	/// - `T: Bits`: The type of the elements for which this span is computed.
	///
	/// # Examples
	///
	/// ```rust
	/// # #[cfg(feature = "testing")] {
	/// use bitvec::testing::{BitIdx, Bits};
	///
	/// let h: BitIdx = 0.into();
	/// assert_eq!(BitIdx::from(0).span::<u8>(8), (1, 8.into()))
	/// # }
	/// ```
	pub fn span<T: Bits>(self, len: usize) -> (usize, BitIdx) {
		//  Number of bits in the head *element*. Domain 32 .. 0.
		let bits_in_head = (T::SIZE - *self) as usize;
		//  If there are n bits live between the head cursor (which marks the
		//  address of the first live bit) and the back edge of the element,
		//  then when len is <= n, the span covers one element.
		//  When len == n, the tail will be T::SIZE, which is valid for a tail.
		//  TODO(myrrlyn): Separate BitIdx into Head and Tail types, which have
		//  their proper range enforcements.
		if len <= bits_in_head {
			(1, (*self + len as u8).into())
		}
		//  If there are more bits in the span than n, then subtract n from len
		//  and use the difference to count elements and bits.
		else {
			//  1 ..
			let bits_after_head = len - bits_in_head;
			//  Count the number of wholly filled elements
			let whole_elts = bits_after_head >> T::BITS;
			//  Count the number of bits in the *next* element. If this is zero,
			//  become T::SIZE; if it is nonzero, add one more to elts. elts
			//  must have one added to it by default to account for the head
			//  element.
			let tail_bits = bits_after_head as u8 & T::MASK;
			if tail_bits == 0 {
				(whole_elts + 1, T::SIZE.into())
			}
			else {
				(whole_elts + 2, tail_bits.into())
			}
		}
	}
}

/// Wraps a `u8` as a `BitIdx`.
impl From<u8> for BitIdx {
	fn from(src: u8) -> Self {
		BitIdx(src)
	}
}

/// Unwraps a `BitIdx` to a `u8`.
impl Into<u8> for BitIdx {
	fn into(self) -> u8 {
		self.0
	}
}

impl Display for BitIdx {
	fn fmt(&self, f: &mut Formatter) -> fmt::Result {
		write!(f, "BitIdx({})", self.0)
	}
}

impl Deref for BitIdx {
	type


/* Generated by RuntimeBrowser
   Image: /System/Library/PrivateFrameworks/iWorkImport.framework/iWorkImport
 */

@interface TSKTreeNode : TSPObject {
    NSMutableArray * mChildren;
    NSString * mDisplayName;
    id  mObject;
}

@property (nonatomic, retain) NSMutableArray *children;
@property (nonatomic, retain) id dataObject;
@property (nonatomic, retain) NSString *name;

- (void)addChildWithName:(id)arg1 object:(id)arg2;
- (void)addNode:(id)arg1 atIndex:(unsigned long long)arg2;
- (void)addObject:(id)arg1 atIndex:(unsigned long long)arg2;
- (id)childEnumerator;
- (id)children;
- (id)dataObject;
- (void)dealloc;
- (id)description;
- (void)enumerateAllChildrenWithBlock:(id /* block */)arg1;
- (bool)hasChildWithName:(id)arg1;
- (long long)indexOfNodeWithObject:(id)arg1;
- (id)initFromUnarchiver:(id)arg1;
- (id)initWithContext:(id)arg1;
- (id)name;
- (id)nodeAtIndex:(unsigned long long)arg1;
- (id)nodeWithObject:(id)arg1;
- (id)objectAtIndex:(unsigned long long)arg1;
- (void)removeAllChildren;
- (void)removeChildAtIndex:(unsigned long long)arg1;
- (void)removeChildWithDataObject:(id)arg1;
- (void)removeChildWithName:(id)arg1;
- (void)saveToArchiver:(id)arg1;
- (void)setChildren:(id)arg1;
- (void)setDataObject:(id)arg1;
- (void)setName:(id)arg1;
- (id)shallowCopy;

@end


/* termios.h: generic termios/termio user copying/translation
 */

#ifndef _ASM_GENERIC_TERMIOS_BASE_H
#define _ASM_GENERIC_TERMIOS_BASE_H

#include <linux/uaccess.h>

#ifndef __ARCH_TERMIO_GETPUT

/*
 * Translate a "termio" structure into a "termios". Ugh.
 */
static inline int user_termio_to_kernel_termios(struct ktermios *termios,
						struct termio __user *termio)
{
	unsigned short tmp;

	if (get_user(tmp, &termio->c_iflag) < 0)
		goto fault;
	termios->c_iflag = (0xffff0000 & termios->c_iflag) | tmp;

	if (get_user(tmp, &termio->c_oflag) < 0)
		goto fault;
	termios->c_oflag = (0xffff0000 & termios->c_oflag) | tmp;

	if (get_user(tmp, &termio->c_cflag) < 0)
		goto fault;
	termios->c_cflag = (0xffff0000 & termios->c_cflag) | tmp;

	if (get_user(tmp, &termio->c_lflag) < 0)
		goto fault;
	termios->c_lflag = (0xffff0000 & termios->c_lflag) | tmp;

	if (get_user(termios->c_line, &termio->c_line) < 0)
		goto fault;

	if (copy_from_user(termios->c_cc, termio->c_cc, NCC) != 0)
		goto fault;

	return 0;

 fault:
	return -EFAULT;
}

/*
 * Translate a "termios" structure into a "termio". Ugh.
 */
static inline int kernel_termios_to_user_termio(struct termio __user *termio,
						struct ktermios *termios)
{
	if (put_user(termios->c_iflag, &termio->c_iflag) < 0 ||
	    put_user(termios->c_oflag, &termio->c_oflag) < 0 ||
	    put_user(termios->c_cflag, &termio->c_cflag) < 0 ||
	    put_user(termios->c_lflag, &termio->c_lflag) < 0 ||
	    put_user(termios->c_line,  &termio->c_line) < 0 ||
	    copy_to_user(termio->c_cc, termios->c_cc, NCC) != 0)
		return -EFAULT;

	return 0;
}

#ifndef user_termios_to_kernel_termios
#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
#endif

#ifndef kernel_termios_to_user_termios
#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
#endif

#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))

#endif	/* __ARCH_TERMIO_GETPUT */

#endif /* _ASM_GENERIC_TERMIOS_BASE_H */


s.tsx'),
            context: {
              id: node.fields.id,
              seoTitle: getTitle(node.frontmatter, lang, db),
              seoDescription: getDesc(node.frontmatter, lang, db),
            },
          })
        })
      )
    } else if (langSwitcher && !dbSwitcher) {
      langSwitcher.forEach((lang: any) =>
        createPage({
          path: `${node.fields.modSlug.replace(/\d{2,}-/g, '')}-${lang}`,
          component: path.resolve('./src/templates/docs.tsx'),
          context: {
            id: node.fields.id,
            seoTitle: getTitle(node.frontmatter, lang, null),
            seoDescription: getDesc(node.frontmatter, lang, null),
          },
        })
      )
    } else if (!langSwitcher && dbSwitcher) {
      node.frontmatter.dbSwitcher.forEach((db: any) =>
        createPage({
          path: `${node.fields.modSlug.replace(/\d{2,}-/g, '')}-${db}`,
          component: path.resolve('./src/templates/docs.tsx'),
          context: {
            id: node.fields.id,
            seoTitle: getTitle(node.frontmatter, null, db),
            seoDescription: getDesc(node.frontmatter, null, db),
          },
        })
      )
    } else if (!langSwitcher && !dbSwitcher) {
      createPage({
        path: node.fields.modSlug ? node.fields.modSlug.replace(/\d{2,}-/g, '') : '/',
        component: path.resolve('./src/templates/docs.tsx'),
        context: {
          id: node.fields.id,
          seoTitle: getTitle(node.frontmatter),
          seoDescription: getDesc(node.frontmatter),
        },
      })
    }
  })

  redirects
    .filter((redirect: any) => !redirect.from.includes('#'))
    .map((redirect: any) =>
      createRedirect({
        fromPath: redirect.from,
        toPath: redirect.to,
        statusCode: 301,
      })
    )
}

exports.createSchemaCustomization = ({ actions }: any) => {
  const { createTypes } = actions
  const typeDefs = `
    type MarkdownRemark implements Node {
      frontmatter: Frontmatter
    }
    type Frontmatter {
      title: String!
      navTitle: String
      metaTitle: String
      metaDescription: String
      langSwitcher: [String!]
      dbSwitcher: [String!]
      staticLink: Boolean
      duration: String
      experimental: Boolean
      preview: Boolean
      earlyaccess: Boolean
      toc: Boolean
      hidePage: Boolean
      tocDepth: Int
      codeStyle: Boolean
    }
  `
  createTypes(typeDefs)
}

exports.onCreateWebpackConfig = ({ actions }: any) => {
  actions.setWebpackConfig({
    resolve: {
      modules: [path.resolve(__dirname, 'src'), 'node_modules'],
      alias: {
        $components: path.resolve(__dirname, 'src/components'),
        buble: '@philpl/buble', // to reduce bundle size
      },
    },
  })
}
import * as _ from "lodash";
import { Injectable } from "@angular/core";
import { ZipCode } from "../models/ZipCode";
import { ZipCodeInfo } from "../models/ZipCodeInfo";
import { from, Observable } from "rxjs";
import { map, mergeMap } from "rxjs/operators";
import { WeatherService } from "./weather.service";

@Injectable({
    providedIn: 'root'
})
export class ZipCodeService {
    private static readonly ZIP_CODE_ARRAY_KEY: string = "ZIP_CODE_ARRAY";
    private zipCodes: ZipCode[] = [];

    constructor(private weatherService: WeatherService) {
        const


 *
   * @attribute
   */
  public readonly endpointGroupName: string;
  /**
   * The array of the endpoints in this endpoint group
   */
  protected readonly endpoints = new Array<EndpointConfiguration>();

  constructor(scope: cdk.Construct, id: string, props: EndpointGroupProps) {
    super(scope, id);

    const resource = new ga.CfnEndpointGroup(this, 'Resource', {
      listenerArn: props.listener.listenerArn,
      endpointGroupRegion: props.region ?? cdk.Stack.of(this).region,
      endpointConfigurations: cdk.Lazy.anyValue({ produce: () => this.renderEndpoints() }, { omitEmptyArray: true }),
    });

    this.endpointGroupArn = resource.attrEndpointGroupArn;
    this.endpointGroupName = props.endpointGroupName ?? resource.logicalId;
  }

  /**
   * Add an endpoint
   */
  public addEndpoint(id: string, endpointId: string, props: EndpointConfigurationOptions =
  {}) {
    return new EndpointConfiguration(this, id, {
      endpointGroup: this,
      endpointId,
      ...props,
    });
  }

  /**
   * Add an Elastic Load Balancer as an endpoint in this endpoint group
   */
  public addLoadBalancer(id: string, lb: LoadBalancer, props: EndpointConfigurationOptions = {}) {
    return new EndpointConfiguration(this, id, {
      endpointId: lb.loadBalancerArn,
      endpointGroup: this,
      ...props,
    });
  }

  /**
   * Add an EIP as an endpoint in this endpoint group
   */
  public addElasticIpAddress(id: string, eip: ElasticIpAddress, props: EndpointConfigurationOptions = {}) {
    return new EndpointConfiguration(this, id, {
      endpointId: eip.attrAllocationId,
      endpointGroup: this,
      ...props,
    });
  }

  /**
   * Add an EC2 Instance as an endpoint in this endpoint group
   */
  public addEc2Instance(id: string, instance: Ec2Instance, props: EndpointConfigurationOptions = {}) {
    return new EndpointConfiguration(this, id, {
      endpointId: instance.instanceId,
      endpointGroup: this,
      ...props,
    });
  }

  /**
   * Links a endpoint to this endpoint group
   * @internal
   */
  public _linkEndpoint(endpoint: EndpointConfiguration) {
    this.endpoints.push(endpoint);
  }

  private renderEndpoints() {
    return this.endpoints.map(e => e.renderEndpointConfiguration());
  }
}
// 1. Crear una clase de Auto con los atributos (marca, modelo, potencia, max. velocidad)
// Crear 5 autos en un array
// Iterar el array y mostrar los autos por pantalla
// Iteramos los autos y calculamos con un método (calcular tiempo) cuanto tarda en forma óptima en recorrer x kms
// Hacer casos de prueba  (En archivo testPunto1.js)
class Auto{

    private _marca: string;
    private _modelo: string;
    private _potencia: string;
    private _velocidadMaxima: number;

    constructor(marca:string, modelo:string, potencia:string, velocidad_max:number){
        this._marca = marca;
        this._modelo = modelo;
        this._potencia = potencia;
        this._velocidadMaxima = velocidad_max
    }

    detalleAuto(){
        return`\nMarca: ${this._marca}\nModelo: ${this._modelo}\nPotencia: ${this._potencia}\nVelocidad Maxima: ${this._velocidadMaxima} km/h\n`
    }

    tiempoLlegada(km:number){
        function numToHora (num:number): string{
            let signo:any = (num >= 0) ? 1 : -1;
            num = num * signo;
            const HORA = Math.floor(num);
            let parteDecimal = num - HORA;
            const MIN = 1 / 60;
            parteDecimal = MIN * Math.round(parteDecimal / MIN);
            let minuto


      None,
            Some(prost_types::Timestamp {
                seconds: 253402329599,
                nanos: 0,
            }),
            &keypair,
        )
        .expect("Failed to generate PASETO");
        log::debug!(
            "{} --replid={} --pubkeys={{\"{}\":\"{}\"}}\n",
            token,
            &replid,
            &keyid,
            base64::encode(&pubkey)
        );

        // Acting as a server to avoid having to unmask the frames.
        let mut websocket_stream =
            tokio_test::block_on(tokio_tungstenite::WebSocketStream::from_raw_socket(
                Builder::new()
                    .write(b"\x82\x0cRFB 003.008\n")
                    .read(b"\x82\x0cRFB 003.008\n")
                    // Only the VeNCrypt security type is supported.
                    .write(b"\x82\x02\x01\x13")
                    .read(b"\x82\x01\x13")
                    // VeNCrypt version 0.2
                    .write(b"\x82\x02\x00\x02")
                    .read(b"\x82\x02\x00\x02")
                    // Only the Plain subtype is supported.
                    .write(b"\x82\x01\x00")
                    .write(b"\x82\x05\x01\x00\x00\x01\x00")
                    .read(b"\x82\x04\x00\x00\x01\x00")
                    // Username length
                    .read(b"\x82\x04\x00\x00\x00\x06")
                    // Password length
                    .read(b"\x82\x04\x00\x00\x00\x08")
                    // Username
                    .read(b"\x82\x06runner")
                    // Password
                    .read(b"\<PASSWORD>")
                    // Success!
                    .write(b"\x82\x04\x00\x00\x00\x00")
                    .build(),
                tokio_tungstenite::tungstenite::protocol::Role::Server,
                Some(tokio_tungstenite::tungstenite::protocol::WebSocketConfig {
                    max_send_queue: None,
                    max_message_size: None,
                    max_frame_size: None,
                    accept_unmasked_frames: true,
                }),
            ));
        let mut socket_mock = Builder::new()
            .read(b"RFB 003.008\n")
            .write(b"RFB 003.008\n")
            // Only the VncAuth(2) security type is supported.
            .read(b"\x01\x02")
            .write(b"\x02")
            // Challenge + Response. The password is, unsurprisingly, "password".
            .read(b"\x9e\xdd\x1d\xc2\xee\x5a\x5e\x78\x7f\x55\x21\xf2\x67\x9f\x71\xd6")
            .write(b"\x15\x6d\x69\xd7\x0f\x22\x21\xb5\x6f\x46\xe2\x92\xa3\xe2\x68\x37")
            // Success!
            .read(b"\x00\x00\x00\x00")
            .build();

        let mut pubkeys = HashMap::<String, Vec<u8>>::new();
        pubkeys.insert(keyid.to_string(), pubkey.as_ref().to_vec());

        tokio_test::block_on(authenticate_replit(
            &mut socket_mock,
            &mut websocket_stream,
            &replid.to_string(),
            &pubkeys,
        ))
        .expect("could not authenticate");
    }

    #[test]
    fn test_validate_token() {
        init();

        let replid = "repl";

        let sys_rand = ring::rand::SystemRandom::new();

        let keyid = "keyid";
        let keypair = ring


/**
 ******************************************************************************
 *
 * @file       treewidgetcolumnstretcher.h
 * @author     The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
 *             Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
 * @brief
 * @see        The GNU Public License (GPL) Version 3
 * @defgroup
 * @{
 *
 *****************************************************************************/
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, see <http://www.gnu.org/licenses/>
 */

#ifndef TREEWIDGETCOLUMNSTRETCHER_H
#define TREEWIDGETCOLUMNSTRETCHER_H

#include "utils_global.h"
#include <QObject>

QT_BEGIN_NAMESPACE
class QTreeWidget;
QT_END_NAMESPACE

namespace Utils {

/*

The class fixes QTreeWidget to resize all columns to contents, except one
stretching column. As opposed to standard QTreeWidget, all columns are
still interactively resizable.

*/

class QTCREATOR_UTILS_EXPORT TreeWidgetColumnStretcher : public QObject
{
    int m_columnToStretch;
public:
    TreeWidgetColumnStretcher(QTreeWidget *treeWidget, int columnToStretch);

    bool eventFilter(QObject *obj, QEvent *ev);
};

} // namespace Utils

#endif // TREEWIDGETCOLUMNSTRETCHER_H


bool SetRichPresence( string pchKey /*const char **/, string pchValue /*const char **/ )
		{
			return platform.ISteamFriends_SetRichPresence( pchKey, pchValue );
		}

	}
}


.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.dnovaes.stockcontrol.R
import com.dnovaes.stockcontrol.common.ui.components.StockButton
import com.dnovaes.stockcontrol.common.ui.components.StockNegativeButton
import com.dnovaes.stockcontrol.ui.theme.AnnePrimary

@Composable
fun FullScreenAlert(
    headerIcon: ImageVector,
    title: Int,
    subtitle: Int?,
    positiveButtonLabel: Int,
    negativeButtonLabel: Int,
    onPositiveButtonClick: () -> Unit,
    onNegativeButtonClick: () -> Unit,
) {
    Column(
        modifier = Modifier.fillMaxSize(),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Spacer(modifier = Modifier.height(140.dp))
        Icon(
            imageVector = headerIcon,
            contentDescription = "Header icon",
            modifier = Modifier
                .size(90.dp),
            tint = AnnePrimary,
        )
        Spacer(modifier = Modifier.height(16.dp))
        Text(
            text = stringResource(id = title),
            color = AnnePrimary,
            fontSize = 28.sp,
            lineHeight = 36.sp,
            maxLines = 2,
            textAlign = TextAlign.Center,
            modifier = Modifier.padding(
                vertical = 10.dp,
                horizontal = 60.dp
            ),
        )
        Spacer(modifier = Modifier.height(40.dp))
        Text(
            text = stringResource(id = R.string.empty),
            color = AnnePrimary,
            fontSize = 16.sp,
            lineHeight = 26.sp,
            maxLines = 2,
            textAlign = TextAlign.Center,
            modifier = Modifier.padding(20.dp),
        )
        Spacer(modifier = Modifier.height(40.dp))
        Column(
            modifier = Modifier
                .fillMaxSize()
                .padding(6.dp),
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalArrangement = Arrangement.Center,
        ) {

            StockButton(
                stringResource(positiveButtonLabel),
                Modifier.padding(vertical = 4.dp)
            ) {
                onPositiveButtonClick()
            }

            StockNegativeButton(
                stringResource(negativeButtonLabel),
                Modifier.padding(vertical = 4.dp)
            ) {
                onNegativeButtonClick()
            }
        }
    }
}
package com.carriez.flutter_hbb

/**
 * Handle events from flutter
 * Request MediaProjection permission
 *
 * Inspired by [droidVNC-NG] https://github.com/bk138/droidVNC-NG
 */

import ffi.FFI

import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.ServiceConnection
import android.content.ClipboardManager
import android.os.Bundle
import android.os.Build
import android.os.IBinder
import android.util.Log
import android.view.WindowManager
import android.media.MediaCodecInfo
import android.media.MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface
import android.media.MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420SemiPlanar
import android.media.MediaCodecList
import android.media.MediaFormat
import android.util.DisplayMetrics
import androidx.annotation.RequiresApi
import org.json.JSONArray
import org.json.JSONObject
import com.hjq.permissions.XXPermissions
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import kotlin.concurrent.thread

class MainActivity : FlutterActivity() {
    companion object {


ng and apply it again to the `data` (decrypt)
//! cipher.seek(0);
//! cipher.apply_keystream(&mut data);
//! assert_eq!(data, [1, 2, 3, 4, 5, 6, 7]);
//! ```
//!
//! [Hazmat!]: https://github.com/RustCrypto/meta/blob/master/HAZMAT.md

#![no_std]
#![doc(
    html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
    html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg"
)]
#![warn(missing_docs, rust_2018_idioms)]

mod ctr128;
mod ctr32;

pub use crate::{
    ctr128::Ctr128,
    ctr32::{Ctr32BE, Ctr32LE},
};
pub use cipher;
<filename>crates/nu-command/tests/main.rs
use nu_command::create_default_context;
use nu_protocol::engine::StateWorkingSet;
use quickcheck_macros::quickcheck;

mod commands;
mod format_conversions;

// use nu_engine::EvaluationContext;

#[quickcheck]
fn quickcheck_parse(data: String) -> bool {
    let (tokens, err) = nu_parser::lex(data.as_bytes(), 0, b"", b"", true);
    let (lite_block, err2) = nu_parser::lite_parse(&tokens);

    if err.is_none() && err2.is_none() {
        let cwd = std::env::current_dir().expect("Could not get current working directory.");
        let context = create_default_context(cwd);
        {
            let mut working_set = StateWorkingSet::new(&context);
            working_set.add_file("quickcheck".into(), data.as_bytes());

            let _ = nu_parser::parse_block(&mut working_set, &lite_block, false, &[]);
        }
    }
    true
}
<filename>bindings/wasm/src/did/wasm_verifier_options.rs
// Copyright 2020-2021 <NAME>
// SPDX-License-Identifier: Apache-2.0

use identity::did::verifiable::VerifierOptions;
use wasm_bindgen::prelude::*;

use crate::error::Result;
use crate::error::WasmResult;

/// Holds additional signature verification options.
/// See `IVerifierOptions`.
#[wasm_bindgen(js_name = VerifierOptions)]
#[derive(Clone, Debug)]
pub struct WasmVerifierOptions(pub(crate) VerifierOptions);

#[wasm_bindgen(js_class = VerifierOptions)]
impl WasmVerifierOptions {
  /// Creates a new `VerifierOptions` from the given fields.
  ///
  /// Throws an error if any of the options are invalid.
  #[wasm_bindgen(constructor)]
  pub fn new(options: IVerifierOptions) -> Result<WasmVerifierOptions> {
    let options: VerifierOptions = options.into_serde().wasm_result()?;
    Ok(WasmVerifierOptions(options))
  }

  /// Creates a new `VerifierOptions` with default options.
  #[wasm_bindgen]
  pub fn default() -> WasmVerifierOptions {
    WasmVerifierOptions(VerifierOptions::default())
  }

  /// Serializes a `VerifierOptions` as a JSON object.
  #[wasm_bindgen(js_name = toJSON)]
  pub fn to_json(&self) -> Result<JsValue> {
    JsValue::from_serde(&self.0).wasm_result()
  }

  /// Deserializes a `VerifierOptions` from a JSON object.
  #[wasm_bindgen(js_name = fromJSON)]
  pub fn from_json(json: &JsValue) -> Result<WasmVerifierOptions> {
    json.into_serde().map(Self).wasm_result()
  }
}

impl From<VerifierOptions> for WasmVerifierOptions {
  fn from(options


(ret > MpBuf_getByteLen(ib)) {
                    ret = MpBuf_getByteLen(ib);
                    if (MpBufferMsg::AUD_RTP_RECV == rtpOrRtcp) {
                        junk[0] &= ~0x20;
                    }
                }
                memcpy((char *) MpBuf_getStorage(ib), junk, ret);
                MpBuf_setNumSamples(ib, ret);
                MpBuf_setContentLen(ib, ret);
                fwdTo->pushPacket(ib, rtpOrRtcp, &fromIP, fromPort);
            } else {
                Zprintf(" *** get1Msg: read(0x%p) returned %d, errno=%d=0x%X)\n",
                    pRxpSkt, nRead, errno, errno, 0,0);
                MpBuf_delRef(ib);
                return OS_NO_MORE_DATA;
            }
        } else {
            nRead = pRxpSkt->read(junk, sizeof(junk));
            if (numFlushed++ < 10) {
                Zprintf("get1Msg: flushing a packet! (%d, %d, 0x%p)"
                    " (after %d DMA frames).\n",
                    nRead, errno, pRxpSkt, showFrameCount(1), 0,0);
            }
            if (nRead < 1) {
                return OS_NO_MORE_DATA;
            }
        }
        return OS_SUCCESS;
}
*/

int XXisFdPoison(int fd)
{
        fd_set fdset;
        fd_set *fds;
        int     numReady;
        struct  timeval tv, *ptv;

        if (0 > fd) {
            return TRUE;
        }

        tv.tv_sec = tv.tv_usec = 0;
        ptv = &tv;
        fds = &fdset;
        FD_ZERO(fds);
        FD_SET((UINT) fd, fds);
        numReady = select(fd+1, fds, NULL, NULL, ptv);
        return (0 > numReady) ? TRUE : FALSE;
}

int XXfindPoisonFds(int pipeFD)
{
        int i;
        int n = 0;
        VoiceEngineNetTaskMsgPtr ppr;

        if (XXisFdPoison(pipeFD)) {
            Os::Logger::instance().log(FAC_MP, PRI_ERR, " *** VoiceEngineNetTask: pipeFd socketDescriptor=%d busted!\n", pipeFD);
            return -1;
        }
        for (i=0, ppr=pairs; i<NET_TASK_MAX_FD_PAIRS; i++) {
            if (ppr->pSocket && // not NULL socket and
                XXisFdPoison(ppr->pSocket->getSocketDescriptor())) {
                Os::Logger::instance().log(FAC_MP, PRI_ERR, " *** VoiceEngineNetTask: Removing fdRtp[%d], socket=0x%p, socketDescriptor=%d\n", ppr-pairs,ppr->pSocket, (int)ppr->pSocket->getSocketDescriptor());
                n++;
                ppr->pSocket = NULL;
            }
            ppr++;
        }
        return n;
}

int VoiceEngineNetTask::processControlSocket(int last)
{
    VoiceEngineNetTaskMsg    msg;
    VoiceEngineNetTaskMsgPtr ppr;
    int i ;
    int newFd ;

    memset((void*)&msg, 0, sizeof(VoiceEngineNetTaskMsg));
    if (NET_TASK_MAX_MSG_LEN != mpReadSocket->read((char *) &msg, NET_TASK_MAX_MSG_LEN))
    {
        Os::Logger::instance().log(FAC_MP, PRI_ERR, "VoiceEngineNetTask::run: Invalid request!") ;
    }
    else if (-2 == (int) msg.pSocket)
    {
        // Request to exit

        Os::Logger::instance().log(FAC_MP, PRI_ERR, " *** VoiceEngineNetTask: closing pipeFd (%d)\n",
            mpReadSocket->getSocketDescriptor());

        sLock.acquireWrite();
        if (mpReadSocket


xef4]
	strb r0, [r1]
_02067398:
	cmp r4, #5
	bne _02067430
	bl sub_020469E8
	ldr r0, [r6, #0xee8]
	bl sub_02046D2C
	ldr r0, [r6, #0xeec]
	bl sub_020474A0
	mov r0, #0
	str r0, [r6, #0xee8]
	str r0, [r6, #0xeec]
	bl sub_02046BB4
	ldr r0, [r6, #8]
	add r0, r6, r0, lsl #1
	ldrsh r0, [r0, #0xc]
	mov r0, r0, lsl #0x18
	mov r0, r0, asr #0x18
	bl sub_0205F588
	bl sub_0205F5A8
	bl CountJobListMissions
	cmp r0, #0
	bne _0206740C
	bl sub_020692B4
	ldr r0, _020674A0 ; =_020B0B2C
	ldr r0, [r0, #0x14]
	add r0, r0, #0x2e4
	add r0, r0, #0xc00
	bl sub_02047150
	mvn r0, #0
	b _02067498
_0206740C:
	bl sub_020686F4
	bl sub_0206937C
	ldr r0, _020674A0 ; =_020B0B2C
	mov r2, #0
	ldr r1, [r0, #0x14]
	mov r0, #1
	str r2, [r1]
	strb r0, [r6, #0xd84]
	b _02067494
_02067430:
	sub r0, r4, #7
	cmp r0, #1
	bhi _02067494
	bl sub_020469E8
	ldr r0, [r6, #0xee8]
	bl sub_02046D2C
	ldr r0, [r6, #0xeec]
	bl sub_020474A0
	mov r0, #0
	str r0, [r6, #0xee8]
	str r0, [r6, #0xeec]
	bl sub_02046BB4
	ldr r0, _020674A0 ; =_020B0B2C
	mov r1, #0
	ldr r0, [r0, #0x14]
	str r1, [r0]
	b _02067494
_02067474:
	bl sub_02046C78
	cmp r0, #0
	beq _02067494
	bl sub_02046D20
	ldr r0, _020674A0 ; =_020B0B2C
	mov r1, #0
	ldr r0, [r0, #0x14]
	str r1, [r0]
_02067494:
	mov r0, #0
_02067498:
	add sp, sp, #0xc
	ldmia sp!, {r3, r4, r5, r6, pc}
	.align 2, 0
_020674A0: .word _020B0B2C
_020674A4: .word _020A92A8
_020674A8: .word sub_020696E8
_020674AC: .word sub_02069750
_020674B0: .word _020A937C
_020674B4: .word _020B0B39
_020674B8: .word JOB_MENU_ITEMS_11
#if defined(EUROPE)
_020674BC: .word 0x0000387A
#elif defined(JAPAN)
_020674BC: .word 0x


{opacity:.5475}100%{opacity:.04413}}@keyframes scanline{0%{bottom:100%}80%{bottom:100%}100%{bottom:0}}.hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#f8f8f8}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:700}.hljs-literal,.hljs-number,.hljs-tag .hljs-attr,.hljs-template-variable,.hljs-variable{color:teal}.hljs-doctag,.hljs-string{color:#d14}.hljs-section,.hljs-selector-id,.hljs-title{color:#900;font-weight:700}.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type{color:#458;font-weight:700}.hljs-attribute,.hljs-name,.hljs-tag{color:navy;font-weight:400}.hljs-link,.hljs-regexp{color:#009926}.hljs-bullet,.hljs-symbol{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}main{padding-top:3.5rem}html{position:relative;min-height:100%}main{margin-bottom:100px}.footer{position:absolute;bottom:1px;width:100%;height:60px;line-height:20px;z-index:10}.footer .container{font-family:'Press Start 2P',cursive;font-size:11px}
   /*!
    * Bootstrap v4.3.1 (https://getbootstrap.com/)
    * Copyright 2011-2019 The Bootstrap Authors
    * Copyright 2011-2019 Twitter, Inc.
    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
    */
  :root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem;font-weight:400;line-height:1.5;color:#c9c9c9;text-align:left;background:repeating-linear-gradient(to bottom,#0


在问自己：为了添加这个功能，我需要实现些什么？编写测试代码还能帮我把注意力集中于接口而非实现（这永远是一件好事）。预先写好的测试代码也为我的工作安上一个明确的结束标志：一旦测试代码正常运行，工作就可以结束了。

Kent Beck 将这种先写测试的习惯提炼成一门技艺，叫测试驱动开发（Test-Driven Development，TDD）[mf-tdd]。测试驱动开发的编程方式依赖于下面这个短循环：先编写一个（失败的）测试，编写代码使测试通过，然后进行重构以保证代码整洁。这个“测试、编码、重构”的循环应该在每个小时内都完成很多次。这种良好的节奏感可使编程工作以更加高效、有条不紊的方式开展。我就不在这里再做更深入的介绍，但我自己确实经常使用，也非常建议你试一试。

大道理先放在一边。尽管我相信每个人都可以从编写自测试代码中收益，但这并不是本书的重点。本书谈的是重构，而重构需要测试。如果你想重构，就必须编写测试。本章会带你入门，教你如何在 JavaScript 中编写简单的测试，但它不是一本专门讲测试的书，所以我不想讲得太细。但我发现，少许测试往往就足以带来惊人的收益。

和本书其他内容一样，我以示例来介绍测试手法。开发软件的时候，我一边写代码，一边写测试。但有时我也需要重构一些没有测试的代码。在重构之前，我得先改造这些代码，使其能够自测试才行。

## 4.2 待测试的示例代码

这里我展示了一份有待测试的代码。这份代码来自一个简单的应用，用于支持用户查看并调整生产计划。它的（略显粗糙的）界面长得像下面这张图所示的这样。

![](https://ngte-superbed.oss-cn-beijing.aliyuncs.com/book/refactoring2/image00283.jpeg)

每个行省（province）都有一份生产计划，计划中包含需求量（demand）和采购价格（price）。每个行省都有一些生产商（producer），他们各自以不同的成本价（cost）供应一定数量的产品。界面上还会显示，当商家售出所有的商品时，他们可以获得的


v.l	r13, @-r0
	mov.l	r12, @-r0
	mov.l	r11, @-r0
	mov.l	r10, @-r0
	mov.l	r9, @-r0
	mov.l	r8, @-r0

#ifdef __SH_FPU_ANY__
	mov	r4, r0
	/* We need 2 add instruction because oFPUL+4 > 127.  */
	add	#124,r0
	add	#(oFPUL+4-124),r0
	sts.l	fpul, @-r0
	sts.l	fpscr, @-r0
	frchg
	fmov.s	fr15, @-r0
	fmov.s	fr14, @-r0
	fmov.s	fr13, @-r0
	fmov.s	fr12, @-r0
	fmov.s	fr11, @-r0
	fmov.s	fr10, @-r0
	fmov.s	fr9, @-r0
	fmov.s	fr8, @-r0
	fmov.s	fr7, @-r0
	fmov.s	fr6, @-r0
	fmov.s	fr5, @-r0
	fmov.s	fr4, @-r0
	fmov.s	fr3, @-r0
	fmov.s	fr2, @-r0
	fmov.s	fr1, @-r0
	fmov.s	fr0, @-r0
	frchg
	fmov.s	fr15, @-r0
	fmov.s	fr14, @-r0
	fmov.s	fr13, @-r0
	fmov.s	fr12, @-r0
	fmov.s	fr11, @-r0
	fmov.s	fr10, @-r0
	fmov.s	fr9, @-r0
	fmov.s	fr8, @-r0
	fmov.s	fr7, @-r0
	fmov.s	fr6, @-r0
	fmov.s	fr5, @-r0
	fmov.s	fr4, @-r0
	fmov.s	fr3, @-r0
	fmov.s	fr2, @-r0
	fmov.s	fr1, @-r0
	fmov.s	fr0, @-r0
#endif /* __SH_FPU_ANY__ */

	/* sigprocmask (SIG_BLOCK, NULL, &uc->uc_sigmask).  */
	mov	r4, r6
	/* We need 2 add instruction because oSIGMASK > 127.  */
	add	#(oSIGMASK/2), r6
	add	#(oSIGMASK/2), r6
	mov	#SIG_BLOCK, r4
	mov	#0, r5
	mov	#+SYS_ify(sigprocmask), r3
	trapa	#0x13
	mov     r0, r1
	mov	#-12, r2
	shad	r2, r1
	not	r1, r1			// r1=0 means r0 = -1 to -4095
	tst	r1, r1			// i.e. error in linux
	bf	.Lgetcontext_end
.Lsyscall_error:
	SYSCALL_ERROR_HANDLER
.Lgetcontext_end:
	/* All done, return 0 for success.  */
	mov	#0, r0
.Lpseudo_end:
	rts
	 nop

PSEUDO_END(__getcontext)

weak_alias (__getcontext, getcontext)


}

const (
	EspionageMessagesTabID            ogame.MessagesTabID = 20
	CombatReportsMessagesTabID        ogame.MessagesTabID = 21
	ExpeditionsMessagesTabID          ogame.MessagesTabID = 22
	UnionsTransportMessagesTabID      ogame.MessagesTabID = 23
	OtherMessagesTabID                ogame.MessagesTabID = 24
	MarketplacePurchasesMessagesTabID ogame.MessagesTabID = 26
	MarketplaceSalesMessagesTabID     ogame.MessagesTabID = 27
)

func (b *OGame) deleteAllMessagesFromTab(tabID ogame.MessagesTabID) error {
	/*
		Request URL: https://$ogame/game/index.php?page=messages
		Request Method: POST

		tabid: 20 => Espionage
		tabid: 21 => Combat Reports
		tabid: 22 => Expeditions
		tabid: 23 => Unions/Transport
		tabid: 24 => Other

		E.g. :

		tabid=24&messageId=-1&action=103&ajax=1

		tabid: 24
		messageId: -1
		action: 103
		ajax: 1
	*/
	token, err := b.getDeleteMessagesToken()
	if err != nil {
		return err
	}
	payload := url.Values{
		"tabid":     {utils.FI64(tabID)},
		"messageId": {utils.FI64(-1)},
		"action":    {"103"},
		"ajax":      {"1"},
		"token":     {token},
	}
	pageHTML, err := b.postPageContent(url.Values{"page": {"messages"}}, payload)
	var res struct {
		Status       string `json:"status"`
		Message      string `json:"message"`
		NewAjaxToken string `json:"newAjaxToken"`
	}
	_ = json.Unmarshal(pageHTML, &res)
	return err
}

func energyProduced(temp ogame.Temperature, resourcesBuildings ogame.ResourcesBuildings, resSettings ogame.ResourceSettings, energyTechnology int64) int64 {
	energyProduced := int64(float64(ogame.SolarPlant.Production(resourcesBuildings.SolarPlant)) * (float64(resSettings.SolarPlant) / 100))
	energyProduced += int64(float64(ogame.FusionReactor.Production(energyTechnology, resourcesBuildings.FusionReactor)) * (float64(resSettings.FusionReactor) / 100))
	energyProduced += int64(float64(ogame.SolarSatellite.Production(temp, resourcesBuildings.SolarSatellite, false)) * (float64(resSettings.SolarSatellite) / 100))
	return energyProduced
}

func energyNeeded(resourcesBuildings ogame.ResourcesBuildings, resSettings ogame.ResourceSettings) int64 {
	energyNeeded := int64(float64(ogame.MetalMine.EnergyConsumption(resourcesBuildings.MetalMine)) * (float64(resSettings.MetalMine) / 100))
	energyNeeded += int64(float64(ogame.CrystalMine.EnergyConsumption(resourcesBuildings.CrystalMine)) * (float64(resSettings.CrystalMine) / 100))
	energyNeeded += int64(float64(ogame.DeuteriumSynthesizer.EnergyConsumption(resourcesBuildings.DeuteriumSynthesizer)) * (float64(resSettings.DeuteriumSynthesizer) / 100))
	return energyNeeded
}

func productionRatio(temp ogame.Temperature, resourcesBuildings ogame.ResourcesBuildings, resSettings ogame.ResourceSettings, energyTechnology int64) float64 {
	energyProduced := energyProduced(temp, resourcesBuildings, resSettings, energyTechnology)
	energyNeeded := energyNeeded(resourcesBuildings, resSettings)
	ratio := 1.0
	if energyNeeded > energyProduced {
		ratio = float64(energyProduced) / float64(energyNeeded)
	}
	return ratio
}

func getProductions(resB


# Part of Odoo. See LICENSE file for full copyright and licensing details.

from dateutil.relativedelta import relativedelta

from odoo import api, fields, models

class MessageTranslation(models.Model):
    _name = "mail.message.translation"
    _description = "Message Translation"

    message_id = fields.Many2one("mail.message", "Message", required=True, ondelete="cascade")
    source_lang = fields.Char(
        "Source Language", required=True, help="Result of the language detection based on its content."
    )
    target_lang = fields.Char(
        "Target Language", required=True, help="Shortened language code used as the target for the translation request."
    )
    body = fields.Html(
        "Translation Body", required=True, sanitize_style=True, help="String received from the translation request."
    )
    create_date = fields.Datetime(index=True)

    def init(self):
        self.env.cr.execute(
            f"CREATE UNIQUE INDEX IF NOT EXISTS mail_message_translation_unique ON {self._table} (message_id, target_lang)"
        )

    @api.autovacuum
    def _gc_translations(self):
        treshold = fields.Datetime().now() - relativedelta(weeks=2)
        self.search([("create_date", "<", treshold)]).unlink()


[32083] = "결단의 면갑",
[32084] = "굳센 용사의 투구",
[32085] = "차원의 추적자 투구",
[32086] = "폭풍술사의 투구",
[32087] = "책략가의 가면",
[32088] = "광포한 분노의 두건",
[32089] = "마나술사 두건",
[32090] = "나루의 축복 두건",
[32092] = "하라매드의 눈",
[32193] = "굵은 진홍빛 첨정석",
[32194] = "섬세한 진홍빛 첨정석",
[32195] = "눈물모양 진홍빛 첨정석",
[32196] = "룬이 새겨진 진홍빛 첨정석",
[32197] = "광채 나는 진홍빛 첨정석",
[32198] = "미묘한 진홍빛 첨정석",
[32199] = "번쩍이는 진홍빛 첨정석",
[32200] = "단단한 창공의 사파이어",
[32201] = "반짝거리는 창공의 사파이어",
[32202] = "빛나는 창공의 사파이어",
[32203] = "휘몰아치는 창공의 사파이어",
[32204] = "찬란한 사안석",
[32205] = "매끄러운 사안석",
[32206] = "강도 높은 사안석",
[32207] = "번뜩이는 사안석",
[32208] = "두꺼운 사안석",
[32209] = "신비로운 사안석",
[32210] = "커다란 사안석",
[32211] = "최상급 어둠노래 자수정",
[32212] = "아른거리는 어둠노래 자수정",
[32213] = "균형 잡힌 어둠노래 자수정",
[32214] = "마력 깃든 어둠노래 자수정",
[32215] = "작열하는 어둠노래 자수정",
[32216] = "호화로운 어둠노래 자수정",
[32217] = "문자가 새겨진 열화석",
[32218] = "마력이 담긴 열화석",
[32219] = "


RequiredVersion} or higher is required but {foundVersion} is installed" : "{componentName} {minRequiredVersion} oder neuer ist erforderlich, aber {foundVersion} ist installiert",
    "Unexpected error" : "Unerwarteter Fehler",
    "Login was successful but something went wrong." : "Anmeldung erfolgreich, aber etwas ist schief gelaufen.",
    "Authentication" : "Authentifizierung",
    "Log in to {applicationName}" : "Anmelden bei {applicationName}",
    "Nextcloud server address" : "Nextcloud Serveradresse",
    "Server address" : "Serveradresse",
    "Log in" : "Anmelden",
    "Logging in …" : "Melde an  …",
    "Incoming call" : "Eingehender Anruf",
    "Close" : "Schließen",
    "Dismiss" : "Ablehnen",
    "Join call" : "Anruf beitreten",
    "Security warning" : "Sicherheitswarnung",
    "Warning: potential security risk" : "Warnung: potenzielles Sicherheitsrisiko",
    "Connection to {url} is not private." : "Die Verbindung zu {url} ist nicht privat.",
    "Advanced" : "Erweitert",
    "This server could not prove that it is {url}." : "Dieser Server konnte nicht beweisen, dass es sich um {url} handelt.",
    "It has untrusted SSL certificate. This might be caused by an attacker intercepting your connection or server misconfiguration." : "Das SSL-Zertifikat ist nicht vertrauenswürdig. Die Ursache kann ein Angreifer sein, der Ihre Verbindung abfängt, oder eine falsche Serverkonfiguration.",
    "Proceed" : "Fortfahren",
    "View certificate" : "Zertifikat anzeigen",
    "Cancel" : "Abbrechen",
    "Certificate details" : "Zertifikatsdetails",
    "Issued by" : "Ausgestellt von",
    "Issued to" : "Ausgestellt für",
    "Validity period" : "Gültigkeitsdauer",
    "Valid from" : "Gültig ab",
    "Valid until" : "Gültig bis",
    "Fingerprint" : "Fingerabdruck",
    "Common name" : "Allgemeiner Name",
    "Organizations" : "Organisationen",
    "Organizational units" : "Organisationseinheit",
    "Locality" : "Ort",
    "Country" : "Land",
    "State or province" : "Bundesland oder Region",
    "Copy" : "Kopieren",
    "Copied" : "Kopiert",
    "About" : "Über",
    "Privacy and Legal Policy" : "Datenschutzerklärung und Geschäftsbedingungen",
    "License" : "Lizenz",
    "Issues" : "Probleme",
    "Copy report" : "Bericht kopieren",
    "Ok" : "Ok",
    "No" : "Nein",
    "Yes" : "Ja",
    "System default" : "Systemstandard",
    "Light" : "Hell",
    "Dark" : "Dunkel",
    "Zoom can be also changed by {key} or mouse wheel. Reset by {resetKey}" : "Der Zoom kann auch mit {key} oder mit dem Mausrad geändert werden. Zurücksetzen mit {resetKey}",
    "Always" : "Immer",
    "When not in \"Do not disturb\"" : "Wenn Sie nicht im \"Nicht stören\"-Modus sind",
    "Never" : "Niemals",
    "None" : "Keine",
    "Some changes require a relaunch to take effect" : "Einige Änderungen erfordern einen Neustart, um wirksam zu werden",
    "Restart" : "Neustart",
    "General" : "Allgemein",
    "Lau


    context.options.serde,
      context.options.topicSuffixes
    )
    grpcServer = startGrpcServer()
  }

  override suspend fun afterRun() = Unit

  @StoveDsl
  suspend fun publish(
    topic: String,
    message: Any,
    key: Option<String> = None,
    headers: Map<String, String> = mapOf(),
    partition: Int = 0,
    testCase: Option<String> = None
  ): KafkaSystem {
    val record = ProducerRecord<String, Any>(topic, partition, key.getOrNull(), message)
    headers.forEach { (k, v) -> record.headers().add(k, v.toByteArray()) }
    testCase.map { record.headers().add("testCase", it.toByteArray()) }
    kafkaPublisher.dispatch(record)
    return this
  }

  @StoveDsl
  suspend inline fun <reified T : Any> shouldBeConsumed(
    atLeastIn: Duration = 5.seconds,
    crossinline condition: ObservedMessage<T>.() -> Boolean
  ): KafkaSystem = shouldBeConsumedInternal(T::class, atLeastIn) { parsed ->
    parsed.message.isSome { o -> condition(ObservedMessage(o, parsed.metadata)) }
  }.let { this }

  @StoveDsl
  suspend inline fun <reified T : Any> shouldBePublished(
    atLeastIn: Duration = 5.seconds,
    crossinline condition: ObservedMessage<T>.() -> Boolean
  ): KafkaSystem = coroutineScope {
    shouldBePublishedInternal(T::class, atLeastIn) { parsed ->
      parsed.message.isSome { o -> condition(ObservedMessage(o, parsed.metadata)) }
    }
  }.let { this }

  @StoveDsl
  suspend inline fun <reified T : Any> shouldBeFailed(
    atLeastIn: Duration = 5.seconds,
    crossinline condition: ObservedMessage<T>.() -> Boolean
  ): KafkaSystem = coroutineScope {
    shouldBeFailedInternal(T::class, atLeastIn) { parsed ->
      parsed.message.isSome { o -> condition(ObservedMessage(o, parsed.metadata)) }
    }
  }.let { this }

  @StoveDsl
  suspend inline fun <reified T : Any> shouldBeRetried(
    atLeastIn: Duration = 5.seconds,
    times: Int = 1,
    crossinline condition: ObservedMessage<T>.() -> Boolean
  ): KafkaSystem = coroutineScope {
    shouldBeRetriedInternal(T::class, atLeastIn, times) { parsed ->
      parsed.message.isSome { o -> condition(ObservedMessage(o, parsed.metadata)) }
    }
  }.let { this }

  /**
   * Waits until the consumed message is seen. This does not mean committed.
   * @param atLeastIn Duration
   * @param topic String
   * @param condition Function1<ConsumedMessage, Boolean>
   */
  @StoveDsl
  @Suppress("MagicNumber")
  suspend inline fun peekConsumedMessages(
    atLeastIn: Duration = 5.seconds,
    topic: String,
    crossinline condition: (ConsumedRecord) -> Boolean
  ) = withTimeout(atLeastIn) {
    var offset = -1L
    var loop = true
    while (loop) {
      sink.store
        .consumedMessages()
        .filter { it.topic == topic && it.offset > offset }
        .onEach { offset = it.offset }
        .map { ConsumedRecord(it.topic, it.key, it.message.toByteArray(), it.headers, it.offset, it.partition) }
        .forEach {
          loop = !condition(it)
        }
      delay(100)
    }
  }

  /**
   * Waits until the committed message is seen with the given condition.
   * @param atLeastIn Duration
   * @param topic String
   * @param condition Function1<ConsumedMessage, Boolean>
   */
  @St


Build > Build jscript from the menu.

Visual Studio will compile SpiderMonkey and create a spidermonkey\make\VS2017\jscript\x64\Release (64-bit) folder with the compiled jscript.lib library file contained within. No further actions are necessary here, so you can close the SpiderMonkey VS Solution.

zlib

Navigate to the UOX3\zlib\make\VS2017 folder and open zlib.sln in VS2017.

Select Release and x64 (64-bit) in the Solution Configuration/Platform dropdown menus

Click Build > Build zlib-static from the menu.

Visual Studio will compile zlib and create a zlib\x64\Release (64-bit) folder with the compiled zlib-static.lib library file contained within. No further actions are necessary here, so you can close the zlib VS Solution.

UOX3

Navigate to the UOX3\make\VS2017 folder and open uox3.sln in VS2017.

Make sure you have UOX3 selected in the Solution Explorer, then select Release and x64 (64-bit) in the Solution Configuration/Platform dropdown menus, or via Build -> Configuration Manager.

Select Build -> Build UOX3 to start compiling UOX3. When done, you'll find UOX3.exe in UOX3\make\VS2017\Release\x64.

UOX3 Compiled! Now what?

Once done compiling, you can copy the compiled UOX3 binary/executable to the directory you intend to run your UOX3 shard from, along with all the files and folders contained in the UOX3/data subdirectory. Where you'll find the compiled UOX3 binary/executable depends on your platform and build method. Examples:

Windows - (VS2022) Compiled UOX3.exe can be found in UOX3/make/VS2022/x64/Release

Linux/FreeBSD - (automake.sh) Compiled uox3 binary can be found in root UOX3 repository

macOS - (XCode) Compiled uox3 binary can be found in UOX3\make\XCode\Build\Products\Release

Either Platform - (CMake, manual) Compiled uox3 binary can be found in UOX3\make\cmake\build

It is recommended to run your UOX3 shard from a separate, dedicated directory instead of the data directory in your local UOX3 git repository, to avoid potential git conflicts and accidental overwrites when pulling updates to UOX3 from GitHub in the future.

Once you have all the files in place, you can follow the regular steps listed under Installation and Setup > Configuring Your UOX3 Shard to finish your UOX3 setup!

				Contributing to UOX3

				  <div class="text-com


rationHttpMethod"`
	// Integration options, such as content handling, request/response mapping, etc.
	Options *IntegrationOptions `field:"optional" json:"options" yaml:"options"`
	// The path to use for path-base APIs.
	//
	// For example, for S3 GET, you can set path to `bucket/key`.
	// For lambda, you can set path to `2015-03-31/functions/${function-arn}/invocations`
	//
	// Mutually exclusive with the `action` options.
	Path *string `field:"optional" json:"path" yaml:"path"`
	// Use AWS_PROXY integration.
	// Default: false.
	//
	Proxy *bool `field:"optional" json:"proxy" yaml:"proxy"`
	// The region of the integrated AWS service.
	// Default: - same region as the stack.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
	// A designated subdomain supported by certain AWS service for fast host-name lookup.
	Subdomain *string `field:"optional" json:"subdomain" yaml:"subdomain"`
}

package awsapigateway

import (
	"github.com/aws/aws-cdk-go/awscdk/v2/awsec2"
)

// The endpoint configuration of a REST API, including VPCs and endpoint types.
//
// EndpointConfiguration is a property of the AWS::ApiGateway::RestApi resource.
//
// Example:
//   var someEndpoint iVpcEndpoint
//
//
//   api := apigateway.NewRestApi(this, jsii.String("api"), &RestApiProps{
//   	EndpointConfiguration: &EndpointConfiguration{
//   		Types: []endpointType{
//   			apigateway.*endpointType_PRIVATE,
//   		},
//   		VpcEndpoints: []*iVpcEndpoint{
//   			someEndpoint,
//   		},
//   	},
//   })
//
type EndpointConfiguration struct {
	// A list of endpoint types of an API or its custom domain name.
	// Default: EndpointType.EDGE
	//
	Types *[]EndpointType `field:"required" json:"types" yaml:"types"`
	// The IP address types that can invoke the API.
	// See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-ip-address-type.html
	//
	// Default: undefined - AWS default is DUAL_STACK for private API, IPV4 for all other APIs.
	//
	IpAddressType IpAddressType `field:"optional" json:"ipAddressType" yaml:"ipAddressType"`
	// A list of VPC Endpoints against which to create Route53 ALIASes.
	// Default: - no ALIASes are created for the endpoint.
	//
	VpcEndpoints *[]awsec2.IVpcEndpoint `field:"optional" json:"vpcEndpoints" yaml:"vpcEndpoints"`
}

//go:build no_runtime_type_checking

package awsapigateway

// Building without runtime type checking enabled, so all the below just return nil

func (d *jsiiProxy_DomainName) validateAddApiMappingParameters(targetStage IStage, options *ApiMappingOptions) error {
	return nil
}

func (d *jsiiProxy_DomainName) validateAddBasePathMappingParameters(targetApi IRestApi, options *BasePathMappingOptions) error {
	return nil
}

func (d *jsiiProxy_DomainName) validateApplyRemovalPolicyParameters(policy awscdk.RemovalPolicy) error {
	return nil
}

func (d *jsiiProxy_DomainName) validateGetResourceArnAttributeParameters(arnAttr *string, arnComponents *awscdk.ArnComponents) error {
	return nil
}

func (d *jsiiProxy_DomainName) validateGetResourceNameAttributeParameters(nameAttr *string) error {
	return nil
}

func validateDomainName_FromDomainNameAttributesParameters(scope constructs.Construct, id *string, attrs *DomainNameAttributes) error {
	return nil
}

func validateDomainName_IsConstructParameters(x interface{}) error {
	return nil
}

func validateDomainName_IsOwnedResourceParameters(construct constructs


t::build::AstBuilder;
use syntax::mut_visit::{self, ExpectOne, MutVisitor};
use syntax::parse::{new_parser_from_source_str, parse_stream_from_source_str, token, ParseSess};
use syntax::print::pprust;
use syntax::ptr::P;
use syntax::source_map::{FileLoader, FileName, RealFileLoader, Span, Spanned, DUMMY_SP};
use syntax::symbol::{keywords, Symbol};
use syntax::tokenstream::{TokenStream, TokenStreamBuilder, TokenTree};

mod default_config;

trait AstExtBuilder {
    fn expr_u64(&self, sp: Span, u: u64) -> P<ast::Expr>;

    fn expr_std_some(&self, sp: Span, expr: P<ast::Expr>) -> P<ast::Expr>;
    fn expr_std_none(&self, sp: Span) -> P<ast::Expr>;

    fn expr_mac(
        &self,
        sp: Span,
        path: ast::Path,
        delim: ast::MacDelimiter,
        tts: TokenStream,
    ) -> P<ast::Expr>;
    fn item_mac(
        &self,
        sp: Span,
        path: ast::Path,
        delim: ast::MacDelimiter,
        tts: TokenStream,
    ) -> P<ast::Item>;
    fn stmt_mac(
        &self,
        sp: Span,
        path: ast::Path,
        delim: ast::MacDelimiter,
        tts: TokenStream,
        style: ast::MacStmtStyle,
        attrs: Vec<ast::Attribute>,
    ) -> ast::Stmt;

    fn expr_mac_fn(&self, sp: Span, path: ast::Path, args: Vec<token::Nonterminal>)
        -> P<ast::Expr>;
    fn item_mac_fn(&self, sp: Span, path: ast::Path, args: Vec<token::Nonterminal>)
        -> P<ast::Item>;
    fn stmt_mac_fn(&self, sp: Span, path: ast::Path, args: Vec<token::Nonterminal>) -> ast::Stmt;

    fn args_to_tts(&self, sp: Span, args: Vec<token::Nonterminal>) -> TokenStream;
}

impl<'a> AstExtBuilder for ExtCtxt<'a> {
    fn expr_u64(&self, sp: Span, u: u64) -> P<ast::Expr> {
        self.expr_lit(
            sp,
            ast::LitKind::Int(u as u128, ast::LitIntType::Unsigned(ast::UintTy::U64)),
        )
    }

    fn expr_std_some(&self, sp: Span, expr: P<ast::Expr>) -> P<ast::Expr> {
        let idents = vec![
            self.ident_of("std"),
            self.ident_of("option"),
            self.ident_of("Option"),
            self.ident_of("Some"),
        ];
        self.expr_call_global(sp, idents, vec![expr])
    }

    fn expr_std_none(&self, sp: Span) -> P<ast::Expr> {
        let idents = vec![
            self.ident_of("std"),
            self.ident_of("option"),
            self.ident_of("Option"),
            self.ident_of("None"),
        ];
        self.expr_path(self.path_global(sp, idents))
    }

    fn expr_mac(
        &self,
        span: Span,
        path: ast::Path,
        delim: ast::MacDelimiter,
        tts: TokenStream,
    ) -> P<ast::Expr> {
        let node = ast::Mac_ { path, delim, tts };
        self.expr(span, ast::ExprKind::Mac(Spanned { node, span }))
    }

    fn item_mac(
        &self,
        span: Span,
        path: ast::Path,
        delim: ast::MacDelimiter


glabel EnVbBall_Draw
/* 00DE0 80B29D80 27BDFFA8 */  addiu   $sp, $sp, 0xFFA8           ## $sp = FFFFFFA8
/* 00DE4 80B29D84 AFBF001C */  sw      $ra, 0x001C($sp)
/* 00DE8 80B29D88 AFB00018 */  sw      $s0, 0x0018($sp)
/* 00DEC 80B29D8C AFA40058 */  sw      $a0, 0x0058($sp)
/* 00DF0 80B29D90 AFA5005C */  sw      $a1, 0x005C($sp)
/* 00DF4 80B29D94 8CA50000 */  lw      $a1, 0x0000($a1)           ## 00000000
/* 00DF8 80B29D98 3C0680B3 */  lui     $a2, %hi(D_80B2A090)       ## $a2 = 80B30000
/* 00DFC 80B29D9C 24C6A090 */  addiu   $a2, $a2, %lo(D_80B2A090)  ## $a2 = 80B2A090
/* 00E00 80B29DA0 27A4003C */  addiu   $a0, $sp, 0x003C           ## $a0 = FFFFFFE4
/* 00E04 80B29DA4 2407025C */  addiu   $a3, $zero, 0x025C         ## $a3 = 0000025C
/* 00E08 80B29DA8 0C031AB1 */  jal     func_800C6AC4
/* 00E0C 80B29DAC 00A08025 */  or      $s0, $a1, $zero            ## $s0 = 00000000
/* 00E10 80B29DB0 8FAF005C */  lw      $t7, 0x005C($sp)
/* 00E14 80B29DB4 0C024F46 */  jal     func_80093D18
/* 00E18 80B29DB8 8DE40000 */  lw      $a0, 0x0000($t7)           ## 00000000
/* 00E1C 80B29DBC 8E0202C0 */  lw      $v0, 0x02C0($s0)           ## 000002C0
/* 00E20 80B29DC0 3C19DA38 */  lui     $t9, 0xDA38                ## $t9 = DA380000
/* 00E24 80B29DC4 37390003 */  ori     $t9, $t9, 0x0003           ## $t9 = DA380003
/* 00E28 80B29DC8 24580008 */  addiu   $t8, $v0, 0x0008           ## $t8 = 00000008
/* 00E2C 80B29DCC AE1802C0 */  sw      $t8, 0x02C0($s0)           ## 000002C0
/* 00E30 80B29DD0 AC590000 */  sw      $t9, 0x0000($v0)           ## 00000000
/* 00E34 80B29DD4 8FA8005C */  lw      $t0, 0x005C($sp)
/* 00E38 80B29DD8 3C0580B3 */  lui     $a1, %hi(D_80B2A0A4)       ## $a1 = 80B30000
/* 00E3C 80B29DDC 24A5A0A4 */  addiu   $a1, $a1, %lo(D_80B2A0A4)  ## $a1 = 80B2A0A4
/* 00E40 80B29DE0 8D040000 */  lw      $a0, 0x0000($t0)           ## 00000000
/* 00E44 80B29DE4 2406025F */  addiu   $a2, $zero, 0x025F         ## $a2 = 0000025F
/* 00E48 80B29DE8 0C0346A2 */  jal     Matrix_NewMtx
/* 00E4C 80B29DEC AFA20038 */  sw      $v0, 0x0038


 out,
                 self.hash,
                 &self.master_secret,
                 label,
                 handshake_hash);
        out
    }

    pub fn client_verify_data(&self, handshake_hash: &[u8]) -> Vec<u8> {
        self.make_verify_data(handshake_hash, b"client finished")
    }

    pub fn server_verify_data(&self, handshake_hash: &[u8]) -> Vec<u8> {
        self.make_verify_data(handshake_hash, b"server finished")
    }
}

// --- Common (to client and server) session functions ---
static SEQ_SOFT_LIMIT: u64 = 0xffff_ffff_ffff_0000u64;
static SEQ_HARD_LIMIT: u64 = 0xffff_ffff_ffff_fffeu64;

enum Limit {
    Yes,
    No
}

pub struct SessionCommon {
    pub negotiated_version: Option<ProtocolVersion>,
    pub is_client: bool,
    message_encrypter: Box<MessageEncrypter>,
    message_decrypter: Box<MessageDecrypter>,
    key_schedule: Option<KeySchedule>,
    suite: Option<&'static SupportedCipherSuite>,
    write_seq: u64,
    read_seq: u64,
    peer_eof: bool,
    pub peer_encrypting: bool,
    pub we_encrypting: bool,
    pub traffic: bool,
    pub want_write_key_update: bool,
    pub message_deframer: MessageDeframer,
    pub handshake_joiner: HandshakeJoiner,
    pub message_fragmenter: MessageFragmenter,
    received_plaintext: ChunkVecBuffer,
    sendable_plaintext: ChunkVecBuffer,
    pub sendable_tls: ChunkVecBuffer,
}

impl SessionCommon {
    pub fn new(mtu: Option<usize>, client: bool) -> SessionCommon {
        SessionCommon {
            negotiated_version: None,
            is_client: client,
            suite: None,
            message_encrypter: MessageEncrypter::invalid(),
            message_decrypter: MessageDecrypter::invalid(),
            key_schedule: None,
            write_seq: 0,
            read_seq: 0,
            peer_eof: false,
            peer_encrypting: false,
            we_encrypting: false,
            traffic: false,
            want_write_key_update: false,
            message_deframer: MessageDeframer::new(),
            handshake_joiner: HandshakeJoiner::new(),
            message_fragmenter: MessageFragmenter::new(mtu.unwrap_or(MAX_FRAGMENT_LEN)),
            received_plaintext: ChunkVecBuffer::new(),
            sendable_plaintext: ChunkVecBuffer::new(),
            sendable_tls: ChunkVecBuffer::new(),
        }
    }

    pub fn is_tls13(&self) -> bool {
      match self.negotiated_version {
        Some(ProtocolVersion::TLSv1_3) => true,
        _ => false
      }
    }

    pub fn get_suite(&self) -> &'static SupportedCipherSuite {
        self.suite.as_ref().unwrap()
    }

    pub fn set_suite(&mut self, suite: &'static SupportedCipherSuite) {
        self.suite = Some(suite);
    }

    pub fn get_mut_key_schedule(&mut self) -> &mut KeySchedule {
        self.key_schedule.as_mut().unwrap()
    }

    pub fn get_key_schedule(&self) -> &KeySchedule {
        self.key_schedule.as_ref().unwrap()
    }

    pub fn set_key_schedule(&mut self, ks: KeySchedule) {
        self.key_schedule = Some(ks);
    }

    pub fn set_message_encrypter(&mut self,
                                 cipher: Box<MessageEncrypter>) {
        self.message_encrypter = cipher;
        self.write_seq = 0;
        self.we_encrypting = true;
    }

    pub fn set_message_decrypter(&mut self,
                                 cipher: Box<MessageDec


// Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/

#ifndef QN_CLICKABLE_WIDGETS_H
#define QN_CLICKABLE_WIDGETS_H

#include <qt_graphics_items/graphics_widget.h>

#include <ui/graphics/items/generic/framed_widget.h>
#include <ui/graphics/items/generic/proxy_label.h>
#include <ui/processors/clickable.h>

/**
 * Graphics widget that provides signals for mouse click and double click events.
 */
class QnClickableWidget: public Clickable<GraphicsWidget, QnClickableWidget> {
    Q_OBJECT
    typedef Clickable<GraphicsWidget, QnClickableWidget> base_type;

public:
    QnClickableWidget(QGraphicsItem* parent = nullptr, Qt::WindowFlags wFlags = {}):
        base_type(parent, wFlags)
    {
    }

signals:
    void clicked(Qt::MouseButton button);
    void doubleClicked(Qt::MouseButton button);
};

/**
 * Simple frame widget that provides signals for mouse click and double click events.
 */
class QnClickableFrameWidget: public Clickable<QnFramedWidget, QnClickableFrameWidget> {
    Q_OBJECT
    typedef Clickable<QnFramedWidget, QnClickableFrameWidget> base_type;

public:
    QnClickableFrameWidget(QGraphicsItem* parent = nullptr, Qt::WindowFlags wFlags = {}):
        base_type(parent, wFlags)
    {
    }

signals:
    void clicked(Qt::MouseButton button);
    void doubleClicked(Qt::MouseButton button);
};

/**
 * Proxy label widget that provides signals for mouse click and double click events.
 */
class QnClickableProxyLabel: public Clickable<QnProxyLabel, QnClickableProxyLabel> {
    Q_OBJECT
    typedef Clickable<QnProxyLabel, QnClickableProxyLabel> base_type;

public:
    QnClickableProxyLabel(QGraphicsItem* parent = nullptr, Qt::WindowFlags wFlags = {}):
        base_type(parent, wFlags)
    {
    }

signals:
    void clicked(Qt::MouseButton button);
    void doubleClicked(Qt::MouseButton button);
};

#endif // QN_CLICKABLE_WIDGETS_H


public VideoDecoder createDecoder(VideoCodecInfo codecType) {
    VideoCodecMimeType type = VideoCodecMimeType.valueOf(codecType.getName());
    MediaCodecInfo info = findCodecForType(type);

    if (info == null) {
      return null;
    }

    CodecCapabilities capabilities = info.getCapabilitiesForType(type.mimeType());
    return new AndroidVideoDecoder(new MediaCodecWrapperFactoryImpl(), info.getName(), type,
        MediaCodecUtils.selectColorFormat(MediaCodecUtils.DECODER_COLOR_FORMATS, capabilities),
        sharedContext);
  }

  @Override
  public VideoCodecInfo[] getSupportedCodecs() {
    List<VideoCodecInfo> supportedCodecInfos = new ArrayList<VideoCodecInfo>();
    // Generate a list of supported codecs in order of preference:
    // VP8, VP9, H264 (high profile), and H264 (baseline profile).
    for (VideoCodecMimeType type : new VideoCodecMimeType[] {VideoCodecMimeType.VP8,
             VideoCodecMimeType.VP9, VideoCodecMimeType.H264, VideoCodecMimeType.AV1}) {
      MediaCodecInfo codec = findCodecForType(type);
      if (codec != null) {
        String name = type.name();
        if (type == VideoCodecMimeType.H264 && isH264HighProfileSupported(codec)) {
          supportedCodecInfos.add(new VideoCodecInfo(
              name, MediaCodecUtils.getCodecProperties(type, /* highProfile= */ true)));
        }

        supportedCodecInfos.add(new VideoCodecInfo(
            name, MediaCodecUtils.getCodecProperties(type, /* highProfile= */ false)));
      }
    }

    return supportedCodecInfos.toArray(new VideoCodecInfo[supportedCodecInfos.size()]);
  }

  private @Nullable MediaCodecInfo findCodecForType(VideoCodecMimeType type) {
    for (int i = 0; i < MediaCodecList.getCodecCount(); ++i) {
      MediaCodecInfo info = null;
      try {
        info = MediaCodecList.getCodecInfoAt(i);
      } catch (IllegalArgumentException e) {
        Logging.e(TAG, "Cannot retrieve decoder codec info", e);
      }

      if (info == null || info.isEncoder()) {
        continue;
      }

      if (isSupportedCodec(info, type)) {
        return info;
      }
    }

    return null; // No support for this type.
  }

  // Returns true if the given MediaCodecInfo indicates a supported encoder for the given type.
  private boolean isSupportedCodec(MediaCodecInfo info, VideoCodecMimeType type) {
    if (!MediaCodecUtils.codecSupportsType(info, type)) {
      return false;
    }
    // Check for a supported color format.
    if (MediaCodecUtils.selectColorFormat(
            MediaCodecUtils.DECODER_COLOR_FORMATS, info.getCapabilitiesForType(type.mimeType()))
        == null) {
      return false;
    }
    return isCodecAllowed(info);
  }

  private boolean isCodecAllowed(MediaCodecInfo info) {
    if (codecAllowedPredicate == null) {
      return true;
    }
    return codecAllowedPredicate.test(info);
  }

  private boolean isH264HighProfileSupported(MediaCodecInfo info) {
    String name = info.getName();
    // Support H.264 HP decoding on QCOM chips.
    if (name.startsWith(QCOM_PREFIX)) {
      return true;
    }
    // Support H.264 HP decoding on Exynos chips for Android M and above.
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && name.startsWith(EXYNOS_PREFIX)) {
      return true;
    }
    return false;
  }
}
/*
 *  Copyright 2016 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.