repo_name
stringlengths 6
101
| path
stringlengths 4
300
| text
stringlengths 7
1.31M
|
|---|---|---|
SanskarSans/Semantic-UI-React
|
docs/app/Examples/views/Item/Variations/Divided.js
|
<reponame>SanskarSans/Semantic-UI-React<filename>docs/app/Examples/views/Item/Variations/Divided.js<gh_stars>0
import React from 'react'
import { Button, Icon, Image as ImageComponent, Item, Label } from 'semantic-ui-react'
const { Content, Description, Extra, Group, Header, Image, Meta } = Item
const paragraph = <ImageComponent src='http://semantic-ui.com/images/wireframe/short-paragraph.png' />
const Divided = () => (
<Group divided>
<Item>
<Image src='http://semantic-ui.com/images/wireframe/image.png' />
<Content>
<Header as='a'>12 Years a Slave</Header>
<Meta>
<span className='cinema'>Union Square 14</span>
</Meta>
<Description>{paragraph}</Description>
<Extra>
<Label>IMAX</Label>
<Label icon='globe' content='Additional Languages' />
</Extra>
</Content>
</Item>
<Item>
<Image src='http://semantic-ui.com/images/wireframe/image.png' />
<Content>
<Header as='a'>My Neighbor Totoro</Header>
<Meta>
<span className='cinema'>IFC Cinema</span>
</Meta>
<Description>{paragraph}</Description>
<Extra>
<Button primary floated='right'>
Buy tickets
<Icon name='right chevron' />
</Button>
<Label>Limited</Label>
</Extra>
</Content>
</Item>
<Item>
<Image src='http://semantic-ui.com/images/wireframe/image.png' />
<Content>
<Header as='a'>Watchmen</Header>
<Meta>
<span className='cinema'>IFC</span>
</Meta>
<Description>{paragraph}</Description>
<Extra>
<Button primary floated='right'>
Buy tickets
<Icon name='right chevron' />
</Button>
</Extra>
</Content>
</Item>
</Group>
)
export default Divided
|
danheath/temppykol
|
src/kol/request/StoreGetTransactionsRequest.py
|
import kol.Error as Error
from kol.util import Report
from kol.manager import PatternManager
from GenericRequest import GenericRequest
import time
class StoreGetTransactions(GenericRequest):
"""
Get the last 2 weeks of transactions from your store.
Fields:
timestamp: time of the sale
userId: userID of purchasee
userName: Username of purchasee
quantiy: Quantity sold
name: Name of item sold
meat: Meat earned by transaction
11/06/13 21:32:51
"""
def __init__(self, session):
super(StoreGetTransactions, self).__init__(session)
self.url = session.serverURL + 'backoffice.php'
self.requestData['which'] = 3
self.requestData['pwd'] = <PASSWORD>
def parseResponse(self):
sales = []
mallSalesPattern = PatternManager.getOrCompilePattern('mallTransactions')
for match in mallSalesPattern.finditer(self.responseText):
sale = {}
sale["timestamp"] = time.strptime(match.group(1), '%m/%d/%y %H:%M:%S')
sale["userid"] = int(match.group(2))
sale["userName"] = str(match.group(3))
sale["quantity"] = int(match.group(4))
sale["name"] = str(match.group(5))
sale["meat"] = int(match.group(6))
sales.append(sale)
self.responseData["mallSales"] = sales
|
madetech/mca-beacons-service
|
src/main/java/uk/gov/mca/beacons/api/dto/DeleteBeaconRequestDTO.java
|
<reponame>madetech/mca-beacons-service<filename>src/main/java/uk/gov/mca/beacons/api/dto/DeleteBeaconRequestDTO.java
package uk.gov.mca.beacons.api.dto;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeleteBeaconRequestDTO {
private UUID beaconId;
private UUID userId;
@NotNull(message = "Reason for deleting a beacon must be defined")
private String reason;
}
|
Seibaah/McGill-COMP
|
COMP202 WINTER 2018/A5/FileIO.java
|
import java.io.*;
import java.util.ArrayList;
public class FileIO {
public static Spaceship loadSpaceship(String filename) { //Method that reads the ships values from a file and calls a constructor to create a ship object
try { //Try and catch blocks to handle the file/IO exceptions
FileReader fr=new FileReader(filename); //Creating file and buffered readers
BufferedReader br=new BufferedReader(fr);
String name=br.readLine(); //Store a file's line under name
double maxHealth=Double.parseDouble(br.readLine()); //Read and store the ship's maxHealth in an integer
int wins=Integer.parseInt(br.readLine()); //We do the same for wins
Spaceship player_proto =new Spaceship(name, maxHealth, wins); //Call the spaceship constructor
br.close(); //Closing file and buffered readers
fr.close();
return player_proto; //Return the ship object
} catch (FileNotFoundException e) { //Catching exceptions
System.out.println("File not found");
} catch (IOException e) {
System.out.println("File error");
}
return null; //Return statement in case the try block fails
}
public static ArrayList<Planet> loadPlanets(String filename){ //Method that load Planets in an array list
ArrayList<Planet> planet_list_local= new ArrayList<Planet>(); //Creating a list
try { //Try and catch blocks to handle the file/IO exceptions
FileReader fr=new FileReader(filename); //Creating file and buffered readers
BufferedReader br=new BufferedReader(fr);
String currentLine=br.readLine();
do {
String line=currentLine; //Store a file's line under name
String[] data=line.split(" "); //Split the line at every blank space and store each part in an array
String name=data[0]; //The first index of the array stores the planet name
Double chance=Double.parseDouble(data[1]); //The second position stores the artifact spawn chance
Double damage=Double.parseDouble(data[2]); //The third contains the damage of the planet
planet_list_local.add(new Planet(name, chance, damage)); //Calling the planet constructor to create a planet
currentLine=br.readLine(); //We read the next line
} while(currentLine!=null); //do While that keeps reading and loading planets while the next file line isn't null
br.close(); //Closing file and buffered readers
fr.close();
return planet_list_local; //Returning the loaded array list
} catch (FileNotFoundException e) { //Catching exceptions
System.out.println("File not found");
} catch (IOException e) {
System.out.println("File error");
}
return null; //Return statement in case the try block fails
}
public static void saveSpaceship(Spaceship winner, String filename) { //Method that writes the winner's spaceship data into a file to record the wins
try { //Try and catch blocks to handle the file/IO exceptions
FileWriter fw=new FileWriter(filename); //Creating file and buffered writers
BufferedWriter bw=new BufferedWriter(fw);
String name=winner.getName(); //In the following 3 lines we store the winner's name, maxHealth and number of wins in variables
double maxHealth=winner.getMaxHealth();
int wins=winner.getWins();
bw.write(name+"\n"); //In the next 3 lines we write in a file those values
bw.write(maxHealth+"\n");
bw.write(wins+"\n");
bw.close(); //Closing file and buffered writers
fw.close();
} catch (FileNotFoundException e) { //Catching exceptions
System.out.println("File not found");
} catch (IOException e) {
System.out.println("File error");
}
}
}
|
PetteriAimonen/OWON-XDM1041
|
OWON firmware/decompiled/com/owon/uppersoft/patch/direct/util/ZipEncrypt.java
|
/*
* Decompiled with CFR 0.152.
*/
package com.owon.uppersoft.patch.direct.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.security.Key;
import java.security.SecureRandom;
import java.util.UUID;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
public class ZipEncrypt {
private void directoryZip(ZipOutputStream out, File f, String base) throws Exception {
if (f.isDirectory()) {
File[] fl = f.listFiles();
out.putNextEntry(new ZipEntry(String.valueOf(base) + "/"));
base = base.length() == 0 ? "" : String.valueOf(base) + "/";
int i = 0;
while (i < fl.length) {
this.directoryZip(out, fl[i], String.valueOf(base) + fl[i].getName());
++i;
}
} else {
out.putNextEntry(new ZipEntry(base));
FileInputStream in = new FileInputStream(f);
byte[] bb = new byte[2048];
int aa = 0;
while ((aa = in.read(bb)) != -1) {
out.write(bb, 0, aa);
}
in.close();
}
}
private void fileZip(ZipOutputStream zos, File file) throws Exception {
if (file.isFile()) {
zos.putNextEntry(new ZipEntry(file.getName()));
FileInputStream fis = new FileInputStream(file);
byte[] bb = new byte[2048];
int aa = 0;
while ((aa = fis.read(bb)) != -1) {
zos.write(bb, 0, aa);
}
fis.close();
System.out.println(file.getName());
} else {
this.directoryZip(zos, file, "");
}
}
private void fileUnZip(ZipInputStream zis, File file) throws Exception {
ZipEntry zip = zis.getNextEntry();
if (zip == null) {
return;
}
String name = zip.getName();
File f = new File(String.valueOf(file.getAbsolutePath()) + "/" + name);
if (zip.isDirectory()) {
f.mkdirs();
this.fileUnZip(zis, file);
} else {
f.createNewFile();
FileOutputStream fos = new FileOutputStream(f);
byte[] b = new byte[2048];
int aa = 0;
while ((aa = zis.read(b)) != -1) {
fos.write(b, 0, aa);
}
fos.close();
this.fileUnZip(zis, file);
}
}
private void zip(File directory, File zipFile) {
try {
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile));
this.fileZip(zos, directory);
zos.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void unZip(File directory, File zipFile) {
try {
ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile));
directory.mkdirs();
this.fileUnZip(zis, directory);
zis.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
public Key createKey(File f) throws Exception {
SecureRandom sr = new SecureRandom();
KeyGenerator kg = KeyGenerator.getInstance("AES");
kg.init(128, sr);
SecretKey key = kg.generateKey();
if (!f.getParentFile().exists()) {
f.getParentFile().mkdirs();
}
f.createNewFile();
FileOutputStream fos = new FileOutputStream(f);
fos.write(key.getEncoded());
fos.close();
return key;
}
public Key getKey(File keyPath) throws Exception {
FileInputStream fis = new FileInputStream(keyPath);
byte[] b = new byte[16];
fis.read(b);
SecretKeySpec dks = new SecretKeySpec(b, "AES");
fis.close();
return dks;
}
public Cipher createCipher(Key privateKey, int opmode) throws Exception {
SecureRandom sr = new SecureRandom();
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
IvParameterSpec spec = new IvParameterSpec(privateKey.getEncoded());
cipher.init(opmode, privateKey, spec, sr);
return cipher;
}
public void encrypt(File srcFile, File destFile, Cipher cipher) throws Exception {
FileInputStream fis = new FileInputStream(srcFile);
FileOutputStream fos = new FileOutputStream(destFile);
byte[] b = new byte[2048];
while (fis.read(b) != -1) {
byte[] bb = cipher.doFinal(b);
System.out.println(bb.length);
fos.write(bb);
}
fos.close();
fis.close();
}
public void decrypt(File srcFile, File destFile, Cipher ciphers) throws Exception {
FileInputStream fis = new FileInputStream(srcFile);
FileOutputStream fos = new FileOutputStream(destFile);
byte[] b = new byte[2064];
while (fis.read(b) != -1) {
byte[] bb = ciphers.doFinal(b);
System.out.println(bb.length);
fos.write(bb);
}
fos.close();
fis.close();
}
private void encryptZip(File srcFile, File destfile, Cipher cipher) throws Exception {
File temp = new File(String.valueOf(UUID.randomUUID().toString()) + ".zip");
temp.deleteOnExit();
this.zip(srcFile, temp);
this.encrypt(temp, destfile, cipher);
temp.delete();
}
private void decryptUnzip(File srcfile, File destfile, Cipher cipher) throws Exception {
File temp = new File(String.valueOf(UUID.randomUUID().toString()) + ".zip");
temp.deleteOnExit();
this.decrypt(srcfile, temp, cipher);
this.unZip(destfile, temp);
temp.delete();
}
public static void main(String[] args) throws Exception {
long a = System.currentTimeMillis();
ZipEncrypt ze = new ZipEncrypt();
Key key = ze.createKey(new File("i:/comXXX/public.key"));
Cipher ec = ze.createCipher(key, 1);
ze.encryptZip(new File("i:/com"), new File("i:/comXXX/page.zip"), ec);
System.out.println(System.currentTimeMillis() - a);
a = System.currentTimeMillis();
Cipher dc = ze.createCipher(key, 2);
ze.decryptUnzip(new File("i:/comXXX/page.zip"), new File("i:/comxxx"), dc);
System.out.println(System.currentTimeMillis() - a);
}
}
|
acazuc/42_ft_ssl
|
src/camellia/camellia_f.c
|
<filename>src/camellia/camellia_f.c<gh_stars>1-10
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* camellia_f.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: acazuc <<EMAIL>> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/08/12 17:10:21 by acazuc #+# #+# */
/* Updated: 2018/08/13 12:06:31 by acazuc ### ########.fr */
/* */
/* ************************************************************************** */
#include "cipher/camellia.h"
#include "libft.h"
static uint8_t g_sbox1[256] = {
0x70, 0x82, 0x2c, 0xec, 0xb3, 0x27, 0xc0, 0xe5,
0xe4, 0x85, 0x57, 0x35, 0xea, 0x0c, 0xae, 0x41,
0x23, 0xef, 0x6b, 0x93, 0x45, 0x19, 0xa5, 0x21,
0xed, 0x0e, 0x4f, 0x4e, 0x1d, 0x65, 0x92, 0xbd,
0x86, 0xb8, 0xaf, 0x8f, 0x7c, 0xeb, 0x1f, 0xce,
0x3e, 0x30, 0xdc, 0x5f, 0x5e, 0xc5, 0x0b, 0x1a,
0xa6, 0xe1, 0x39, 0xca, 0xd5, 0x47, 0x5d, 0x3d,
0xd9, 0x01, 0x5a, 0xd6, 0x51, 0x56, 0x6c, 0x4d,
0x8b, 0x0d, 0x9a, 0x66, 0xfb, 0xcc, 0xb0, 0x2d,
0x74, 0x12, 0x2b, 0x20, 0xf0, 0xb1, 0x84, 0x99,
0xdf, 0x4c, 0xcb, 0xc2, 0x34, 0x7e, 0x76, 0x05,
0x6d, 0xb7, 0xa9, 0x31, 0xd1, 0x17, 0x04, 0xd7,
0x14, 0x58, 0x3a, 0x61, 0xde, 0x1b, 0x11, 0x1c,
0x32, 0x0f, 0x9c, 0x16, 0x53, 0x18, 0xf2, 0x22,
0xfe, 0x44, 0xcf, 0xb2, 0xc3, 0xb5, 0x7a, 0x91,
0x24, 0x08, 0xe8, 0xa8, 0x60, 0xfc, 0x69, 0x50,
0xaa, 0xd0, 0xa0, 0x7d, 0xa1, 0x89, 0x62, 0x97,
0x54, 0x5b, 0x1e, 0x95, 0xe0, 0xff, 0x64, 0xd2,
0x10, 0xc4, 0x00, 0x48, 0xa3, 0xf7, 0x75, 0xdb,
0x8a, 0x03, 0xe6, 0xda, 0x09, 0x3f, 0xdd, 0x94,
0x87, 0x5c, 0x83, 0x02, 0xcd, 0x4a, 0x90, 0x33,
0x73, 0x67, 0xf6, 0xf3, 0x9d, 0x7f, 0xbf, 0xe2,
0x52, 0x9b, 0xd8, 0x26, 0xc8, 0x37, 0xc6, 0x3b,
0x81, 0x96, 0x6f, 0x4b, 0x13, 0xbe, 0x63, 0x2e,
0xe9, 0x79, 0xa7, 0x8c, 0x9f, 0x6e, 0xbc, 0x8e,
0x29, 0xf5, 0xf9, 0xb6, 0x2f, 0xfd, 0xb4, 0x59,
0x78, 0x98, 0x06, 0x6a, 0xe7, 0x46, 0x71, 0xba,
0xd4, 0x25, 0xab, 0x42, 0x88, 0xa2, 0x8d, 0xfa,
0x72, 0x07, 0xb9, 0x55, 0xf8, 0xee, 0xac, 0x0a,
0x36, 0x49, 0x2a, 0x68, 0x3c, 0x38, 0xf1, 0xa4,
0x40, 0x28, 0xd3, 0x7b, 0xbb, 0xc9, 0x43, 0xc1,
0x15, 0xe3, 0xad, 0xf4, 0x77, 0xc7, 0x80, 0x9e};
static uint8_t g_sbox2[256] = {
0xe0, 0x05, 0x58, 0xd9, 0x67, 0x4e, 0x81, 0xcb,
0xc9, 0x0b, 0xae, 0x6a, 0xd5, 0x18, 0x5d, 0x82,
0x46, 0xdf, 0xd6, 0x27, 0x8a, 0x32, 0x4b, 0x42,
0xdb, 0x1c, 0x9e, 0x9c, 0x3a, 0xca, 0x25, 0x7b,
0x0d, 0x71, 0x5f, 0x1f, 0xf8, 0xd7, 0x3e, 0x9d,
0x7c, 0x60, 0xb9, 0xbe, 0xbc, 0x8b, 0x16, 0x34,
0x4d, 0xc3, 0x72, 0x95, 0xab, 0x8e, 0xba, 0x7a,
0xb3, 0x02, 0xb4, 0xad, 0xa2, 0xac, 0xd8, 0x9a,
0x17, 0x1a, 0x35, 0xcc, 0xf7, 0x99, 0x61, 0x5a,
0xe8, 0x24, 0x56, 0x40, 0xe1, 0x63, 0x09, 0x33,
0xbf, 0x98, 0x97, 0x85, 0x68, 0xfc, 0xec, 0x0a,
0xda, 0x6f, 0x53, 0x62, 0xa3, 0x2e, 0x08, 0xaf,
0x28, 0xb0, 0x74, 0xc2, 0xbd, 0x36, 0x22, 0x38,
0x64, 0x1e, 0x39, 0x2c, 0xa6, 0x30, 0xe5, 0x44,
0xfd, 0x88, 0x9f, 0x65, 0x87, 0x6b, 0xf4, 0x23,
0x48, 0x10, 0xd1, 0x51, 0xc0, 0xf9, 0xd2, 0xa0,
0x55, 0xa1, 0x41, 0xfa, 0x43, 0x13, 0xc4, 0x2f,
0xa8, 0xb6, 0x3c, 0x2b, 0xc1, 0xff, 0xc8, 0xa5,
0x20, 0x89, 0x00, 0x90, 0x47, 0xef, 0xea, 0xb7,
0x15, 0x06, 0xcd, 0xb5, 0x12, 0x7e, 0xbb, 0x29,
0x0f, 0xb8, 0x07, 0x04, 0x9b, 0x94, 0x21, 0x66,
0xe6, 0xce, 0xed, 0xe7, 0x3b, 0xfe, 0x7f, 0xc5,
0xa4, 0x37, 0xb1, 0x4c, 0x91, 0x6e, 0x8d, 0x76,
0x03, 0x2d, 0xde, 0x96, 0x26, 0x7d, 0xc6, 0x5c,
0xd3, 0xf2, 0x4f, 0x19, 0x3f, 0xdc, 0x79, 0x1d,
0x52, 0xeb, 0xf3, 0x6d, 0x5e, 0xfb, 0x69, 0xb2,
0xf0, 0x31, 0x0c, 0xd4, 0xcf, 0x8c, 0xe2, 0x75,
0xa9, 0x4a, 0x57, 0x84, 0x11, 0x45, 0x1b, 0xf5,
0xe4, 0x0e, 0x73, 0xaa, 0xf1, 0xdd, 0x59, 0x14,
0x6c, 0x92, 0x54, 0xd0, 0x78, 0x70, 0xe3, 0x49,
0x80, 0x50, 0xa7, 0xf6, 0x77, 0x93, 0x86, 0x83,
0x2a, 0xc7, 0x5b, 0xe9, 0xee, 0x8f, 0x01, 0x3d};
static uint8_t g_sbox3[256] = {
0x38, 0x41, 0x16, 0x76, 0xd9, 0x93, 0x60, 0xf2,
0x72, 0xc2, 0xab, 0x9a, 0x75, 0x06, 0x57, 0xa0,
0x91, 0xf7, 0xb5, 0xc9, 0xa2, 0x8c, 0xd2, 0x90,
0xf6, 0x07, 0xa7, 0x27, 0x8e, 0xb2, 0x49, 0xde,
0x43, 0x5c, 0xd7, 0xc7, 0x3e, 0xf5, 0x8f, 0x67,
0x1f, 0x18, 0x6e, 0xaf, 0x2f, 0xe2, 0x85, 0x0d,
0x53, 0xf0, 0x9c, 0x65, 0xea, 0xa3, 0xae, 0x9e,
0xec, 0x80, 0x2d, 0x6b, 0xa8, 0x2b, 0x36, 0xa6,
0xc5, 0x86, 0x4d, 0x33, 0xfd, 0x66, 0x58, 0x96,
0x3a, 0x09, 0x95, 0x10, 0x78, 0xd8, 0x42, 0xcc,
0xef, 0x26, 0xe5, 0x61, 0x1a, 0x3f, 0x3b, 0x82,
0xb6, 0xdb, 0xd4, 0x98, 0xe8, 0x8b, 0x02, 0xeb,
0x0a, 0x2c, 0x1d, 0xb0, 0x6f, 0x8d, 0x88, 0x0e,
0x19, 0x87, 0x4e, 0x0b, 0xa9, 0x0c, 0x79, 0x11,
0x7f, 0x22, 0xe7, 0x59, 0xe1, 0xda, 0x3d, 0xc8,
0x12, 0x04, 0x74, 0x54, 0x30, 0x7e, 0xb4, 0x28,
0x55, 0x68, 0x50, 0xbe, 0xd0, 0xc4, 0x31, 0xcb,
0x2a, 0xad, 0x0f, 0xca, 0x70, 0xff, 0x32, 0x69,
0x08, 0x62, 0x00, 0x24, 0xd1, 0xfb, 0xba, 0xed,
0x45, 0x81, 0x73, 0x6d, 0x84, 0x9f, 0xee, 0x4a,
0xc3, 0x2e, 0xc1, 0x01, 0xe6, 0x25, 0x48, 0x99,
0xb9, 0xb3, 0x7b, 0xf9, 0xce, 0xbf, 0xdf, 0x71,
0x29, 0xcd, 0x6c, 0x13, 0x64, 0x9b, 0x63, 0x9d,
0xc0, 0x4b, 0xb7, 0xa5, 0x89, 0x5f, 0xb1, 0x17,
0xf4, 0xbc, 0xd3, 0x46, 0xcf, 0x37, 0x5e, 0x47,
0x94, 0xfa, 0xfc, 0x5b, 0x97, 0xfe, 0x5a, 0xac,
0x3c, 0x4c, 0x03, 0x35, 0xf3, 0x23, 0xb8, 0x5d,
0x6a, 0x92, 0xd5, 0x21, 0x44, 0x51, 0xc6, 0x7d,
0x39, 0x83, 0xdc, 0xaa, 0x7c, 0x77, 0x56, 0x05,
0x1b, 0xa4, 0x15, 0x34, 0x1e, 0x1c, 0xf8, 0x52,
0x20, 0x14, 0xe9, 0xbd, 0xdd, 0xe4, 0xa1, 0xe0,
0x8a, 0xf1, 0xd6, 0x7a, 0xbb, 0xe3, 0x40, 0x4f};
static uint8_t g_sbox4[256] = {
0x70, 0x2c, 0xb3, 0xc0, 0xe4, 0x57, 0xea, 0xae,
0x23, 0x6b, 0x45, 0xa5, 0xed, 0x4f, 0x1d, 0x92,
0x86, 0xaf, 0x7c, 0x1f, 0x3e, 0xdc, 0x5e, 0x0b,
0xa6, 0x39, 0xd5, 0x5d, 0xd9, 0x5a, 0x51, 0x6c,
0x8b, 0x9a, 0xfb, 0xb0, 0x74, 0x2b, 0xf0, 0x84,
0xdf, 0xcb, 0x34, 0x76, 0x6d, 0xa9, 0xd1, 0x04,
0x14, 0x3a, 0xde, 0x11, 0x32, 0x9c, 0x53, 0xf2,
0xfe, 0xcf, 0xc3, 0x7a, 0x24, 0xe8, 0x60, 0x69,
0xaa, 0xa0, 0xa1, 0x62, 0x54, 0x1e, 0xe0, 0x64,
0x10, 0x00, 0xa3, 0x75, 0x8a, 0xe6, 0x09, 0xdd,
0x87, 0x83, 0xcd, 0x90, 0x73, 0xf6, 0x9d, 0xbf,
0x52, 0xd8, 0xc8, 0xc6, 0x81, 0x6f, 0x13, 0x63,
0xe9, 0xa7, 0x9f, 0xbc, 0x29, 0xf9, 0x2f, 0xb4,
0x78, 0x06, 0xe7, 0x71, 0xd4, 0xab, 0x88, 0x8d,
0x72, 0xb9, 0xf8, 0xac, 0x36, 0x2a, 0x3c, 0xf1,
0x40, 0xd3, 0xbb, 0x43, 0x15, 0xad, 0x77, 0x80,
0x82, 0xec, 0x27, 0xe5, 0x85, 0x35, 0x0c, 0x41,
0xef, 0x93, 0x19, 0x21, 0x0e, 0x4e, 0x65, 0xbd,
0xb8, 0x8f, 0xeb, 0xce, 0x30, 0x5f, 0xc5, 0x1a,
0xe1, 0xca, 0x47, 0x3d, 0x01, 0xd6, 0x56, 0x4d,
0x0d, 0x66, 0xcc, 0x2d, 0x12, 0x20, 0xb1, 0x99,
0x4c, 0xc2, 0x7e, 0x05, 0xb7, 0x31, 0x17, 0xd7,
0x58, 0x61, 0x1b, 0x1c, 0x0f, 0x16, 0x18, 0x22,
0x44, 0xb2, 0xb5, 0x91, 0x08, 0xa8, 0xfc, 0x50,
0xd0, 0x7d, 0x89, 0x97, 0x5b, 0x95, 0xff, 0xd2,
0xc4, 0x48, 0xf7, 0xdb, 0x03, 0xda, 0x3f, 0x94,
0x5c, 0x02, 0x4a, 0x33, 0x67, 0xf3, 0x7f, 0xe2,
0x9b, 0x26, 0x37, 0x3b, 0x96, 0x4b, 0xbe, 0x2e,
0x79, 0x8c, 0x6e, 0x8e, 0xf5, 0xb6, 0xfd, 0x59,
0x98, 0x6a, 0x46, 0xba, 0x25, 0x42, 0xa2, 0xfa,
0x07, 0x55, 0xee, 0x0a, 0x49, 0x68, 0x38, 0xa4,
0x28, 0x7b, 0xc9, 0xc1, 0xe3, 0xf4, 0xc7, 0x9e};
uint64_t camellia_f(uint64_t in1, uint64_t in2)
{
uint64_t out;
uint8_t t[8];
t[0] = g_sbox1[((in1 >> 56) ^ (in2 >> 56)) & 0xff];
t[1] = g_sbox2[((in1 >> 48) ^ (in2 >> 48)) & 0xff];
t[2] = g_sbox3[((in1 >> 40) ^ (in2 >> 40)) & 0xff];
t[3] = g_sbox4[((in1 >> 32) ^ (in2 >> 32)) & 0xff];
t[4] = g_sbox2[((in1 >> 24) ^ (in2 >> 24)) & 0xff];
t[5] = g_sbox3[((in1 >> 16) ^ (in2 >> 16)) & 0xff];
t[6] = g_sbox4[((in1 >> 8) ^ (in2 >> 8)) & 0xff];
t[7] = g_sbox1[((in1 >> 0) ^ (in2 >> 0)) & 0xff];
out = 0;
out |= (uint64_t)(t[0] ^ t[2] ^ t[3] ^ t[5] ^ t[6] ^ t[7]) << 56;
out |= (uint64_t)(t[0] ^ t[1] ^ t[3] ^ t[4] ^ t[6] ^ t[7]) << 48;
out |= (uint64_t)(t[0] ^ t[1] ^ t[2] ^ t[4] ^ t[5] ^ t[7]) << 40;
out |= (uint64_t)(t[1] ^ t[2] ^ t[3] ^ t[4] ^ t[5] ^ t[6]) << 32;
out |= (uint64_t)(t[0] ^ t[1] ^ t[5] ^ t[6] ^ t[7]) << 24;
out |= (uint64_t)(t[1] ^ t[2] ^ t[4] ^ t[6] ^ t[7]) << 16;
out |= (uint64_t)(t[2] ^ t[3] ^ t[4] ^ t[5] ^ t[7]) << 8;
out |= (uint64_t)(t[0] ^ t[3] ^ t[4] ^ t[5] ^ t[6]) << 0;
return (out);
}
|
hangqiu/pixie
|
src/carnot/planner/compiler/analyzer/remove_group_by_rule_test.cc
|
/*
* Copyright 2018- The Pixie Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "src/carnot/planner/compiler/analyzer/merge_group_by_into_group_acceptor_rule.h"
#include "src/carnot/planner/compiler/analyzer/remove_group_by_rule.h"
#include "src/carnot/planner/compiler/test_utils.h"
namespace px {
namespace carnot {
namespace planner {
namespace compiler {
using ::testing::ElementsAre;
using ::testing::Not;
using ::testing::UnorderedElementsAreArray;
TEST_F(RulesTest, RemoveGroupByRule) {
MemorySourceIR* mem_source = MakeMemSource();
GroupByIR* group_by = MakeGroupBy(mem_source, {MakeColumn("col1", 0), MakeColumn("col2", 0)});
int64_t group_by_node_id = group_by->id();
// Note that the parent is mem_source not group by.
BlockingAggIR* agg = MakeBlockingAgg(mem_source, {MakeColumn("col1", 0), MakeColumn("col2", 0)},
{{"outcount", MakeMeanFunc(MakeColumn("count", 0))}});
MakeMemSink(agg, "");
// Do match groupbys() that no longer have children
RemoveGroupByRule rule;
auto result = rule.Execute(graph.get());
EXPECT_OK(result);
EXPECT_TRUE(result.ConsumeValueOrDie());
EXPECT_FALSE(graph->HasNode(group_by_node_id));
// Make sure no groupby sticks around either
for (int64_t i : graph->dag().TopologicalSort()) {
EXPECT_FALSE(Match(graph->Get(i), GroupBy())) << absl::Substitute("Node $0 is a groupby()", i);
}
}
TEST_F(RulesTest, RemoveGroupByRule_FailOnBadGroupBy) {
// Error on groupbys() that have sinks or follow up nodes.
MemorySourceIR* mem_source = MakeMemSource();
GroupByIR* group_by = MakeGroupBy(mem_source, {MakeColumn("col1", 0), MakeColumn("col2", 0)});
// Note that mem sink is conect to a groupby. Anything that has a group by as a parent should
// fail at this point.
MakeMemSink(group_by, "");
RemoveGroupByRule rule;
auto result = rule.Execute(graph.get());
ASSERT_NOT_OK(result);
EXPECT_THAT(result.status(), HasCompilerError("'groupby.*' should be followed by an 'agg.*'"));
}
TEST_F(RulesTest, MergeAndRemove) {
MemorySourceIR* mem_source = MakeMemSource();
GroupByIR* group_by = MakeGroupBy(mem_source, {MakeColumn("col1", 0), MakeColumn("col2", 0)});
BlockingAggIR* agg =
MakeBlockingAgg(group_by, {}, {{"outcount", MakeMeanFunc(MakeColumn("count", 0))}});
MakeMemSink(agg, "");
int64_t group_by_node_id = group_by->id();
std::vector<int64_t> groupby_ids;
for (ColumnIR* g : group_by->groups()) {
groupby_ids.push_back(g->id());
}
// Do remove groupby after running both
MergeGroupByIntoGroupAcceptorRule rule1(IRNodeType::kBlockingAgg);
RemoveGroupByRule rule2;
auto result1 = rule1.Execute(graph.get());
ASSERT_OK(result1);
ASSERT_TRUE(result1.ConsumeValueOrDie());
auto result2 = rule2.Execute(graph.get());
ASSERT_OK(result1);
ASSERT_TRUE(result2.ConsumeValueOrDie());
EXPECT_FALSE(graph->HasNode(group_by_node_id));
// Make sure no groupby sticks around either
for (int64_t i : graph->dag().TopologicalSort()) {
EXPECT_FALSE(Match(graph->Get(i), GroupBy())) << absl::Substitute("Node $0 is a groupby()", i);
}
EXPECT_THAT(agg->parents(), ElementsAre(mem_source));
std::vector<std::string> actual_group_names;
std::vector<int64_t> actual_group_ids;
for (ColumnIR* g : agg->groups()) {
actual_group_names.push_back(g->col_name());
actual_group_ids.push_back(g->id());
}
EXPECT_THAT(actual_group_names, ElementsAre("col1", "col2"));
EXPECT_THAT(actual_group_ids, Not(UnorderedElementsAreArray(groupby_ids)));
}
TEST_F(RulesTest, MergeAndRemove_MultipleAggs) {
MemorySourceIR* mem_source = MakeMemSource();
GroupByIR* group_by = MakeGroupBy(mem_source, {MakeColumn("col1", 0), MakeColumn("col2", 0)});
BlockingAggIR* agg1 =
MakeBlockingAgg(group_by, {}, {{"outcount", MakeMeanFunc(MakeColumn("count", 0))}});
MakeMemSink(agg1, "");
BlockingAggIR* agg2 =
MakeBlockingAgg(group_by, {}, {{"latency_mean", MakeMeanFunc(MakeColumn("latency", 0))}});
MakeMemSink(agg2, "");
int64_t group_by_node_id = group_by->id();
// Verification that everything is constructed correctly.
EXPECT_THAT(agg1->parents(), ElementsAre(group_by));
EXPECT_EQ(agg1->groups().size(), 0);
EXPECT_THAT(agg2->parents(), ElementsAre(group_by));
EXPECT_EQ(agg2->groups().size(), 0);
// Do remove groupby after running both
MergeGroupByIntoGroupAcceptorRule rule1(IRNodeType::kBlockingAgg);
RemoveGroupByRule rule2;
auto result1 = rule1.Execute(graph.get());
ASSERT_OK(result1);
ASSERT_TRUE(result1.ConsumeValueOrDie());
auto result2 = rule2.Execute(graph.get());
ASSERT_OK(result1);
ASSERT_TRUE(result2.ConsumeValueOrDie());
EXPECT_FALSE(graph->HasNode(group_by_node_id));
// Make sure no groupby sticks around either
for (int64_t i : graph->dag().TopologicalSort()) {
EXPECT_FALSE(Match(graph->Get(i), GroupBy())) << absl::Substitute("Node $0 is a groupby()", i);
}
EXPECT_THAT(agg1->parents(), ElementsAre(mem_source));
EXPECT_THAT(agg2->parents(), ElementsAre(mem_source));
std::vector<std::string> group_names1;
std::vector<std::string> group_names2;
std::vector<int64_t> group_ids1;
std::vector<int64_t> group_ids2;
for (ColumnIR* g : agg1->groups()) {
group_names1.push_back(g->col_name());
group_ids1.push_back(g->id());
}
for (ColumnIR* g : agg2->groups()) {
group_names2.push_back(g->col_name());
group_ids2.push_back(g->id());
}
EXPECT_THAT(group_names1, ElementsAre("col1", "col2"));
EXPECT_THAT(group_names2, ElementsAre("col1", "col2"));
// Ids must be different -> must be a deep copy not a pointer copy.
EXPECT_NE(group_ids1, group_ids2);
}
TEST_F(RulesTest, MergeAndRemove_GroupByOnMetadataColumns) {
MemorySourceIR* mem_source = MakeMemSource();
GroupByIR* group_by =
MakeGroupBy(mem_source, {MakeMetadataIR("service", 0), MakeColumn("col2", 0)});
BlockingAggIR* agg =
MakeBlockingAgg(group_by, {}, {{"outcount", MakeMeanFunc(MakeColumn("count", 0))}});
MakeMemSink(agg, "");
int64_t group_by_node_id = group_by->id();
std::vector<int64_t> groupby_ids;
for (ColumnIR* g : group_by->groups()) {
groupby_ids.push_back(g->id());
}
// Do remove groupby after running both
MergeGroupByIntoGroupAcceptorRule rule1(IRNodeType::kBlockingAgg);
RemoveGroupByRule rule2;
auto result1 = rule1.Execute(graph.get());
ASSERT_OK(result1);
ASSERT_TRUE(result1.ConsumeValueOrDie());
auto result2 = rule2.Execute(graph.get());
ASSERT_OK(result1);
ASSERT_TRUE(result2.ConsumeValueOrDie());
EXPECT_FALSE(graph->HasNode(group_by_node_id));
// Make sure no groupby sticks around either
for (int64_t i : graph->dag().TopologicalSort()) {
EXPECT_FALSE(Match(graph->Get(i), GroupBy())) << absl::Substitute("Node $0 is a groupby()", i);
}
EXPECT_THAT(agg->parents(), ElementsAre(mem_source));
std::vector<std::string> actual_group_names;
std::vector<int64_t> actual_group_ids;
for (ColumnIR* g : agg->groups()) {
actual_group_names.push_back(g->col_name());
actual_group_ids.push_back(g->id());
}
EXPECT_THAT(actual_group_ids, Not(UnorderedElementsAreArray(groupby_ids)));
EXPECT_MATCH(agg->groups()[0], Metadata());
EXPECT_TRUE(!Match(agg->groups()[1], Metadata()));
EXPECT_MATCH(agg->groups()[1], ColumnNode());
}
} // namespace compiler
} // namespace planner
} // namespace carnot
} // namespace px
|
finleyexp/georef_geocamutilweb
|
geocamUtil/pdf.py
|
#__BEGIN_LICENSE__
# Copyright (c) 2017, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All rights reserved.
#
# The GeoRef platform is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
#__END_LICENSE__
import tempfile
import os
class PdfConversionError(Exception):
pass
def convertPdf(data,
imageWidth=1000,
dstContentType='image/png',
fileName='dummyFileName',
pageNumber=None):
"""
Pass in the raw binary PDF data. Returns the raw binary image data
result after rasterization.
"""
#write to temporary pdf file
tempInputFile = tempfile.NamedTemporaryFile(suffix='.pdf', delete=False)
tempInputFile.seek(0)
tempInputFile.write(data)
tempInputFile.flush()
outputFileName = tempInputFile.name.replace('.pdf', '.png')
ret = os.system('convert -flatten %s %s > /dev/null' % (tempInputFile.name, outputFileName))
os.remove(tempInputFile.name)
if ret != 0 or os.path.isfile(outputFileName) is False:
raise PdfConversionError('Error found while converting pdf')
outputFile = open(outputFileName, 'r')
outputFileData = outputFile.read()
outputFile.close()
os.remove(outputFileName)
return outputFileData
|
AngeloStatescu/jsbb
|
packages/react-state-lens/src/index.js
|
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.
export * from './hooks'
export * from './lensProxy'
export { StateLens } from './stateLens'
|
anruky/Zeta
|
zds-server/src/main/java/com/ebay/dss/zds/message/endpoint/LivyMonitorEndpoint.java
|
<filename>zds-server/src/main/java/com/ebay/dss/zds/message/endpoint/LivyMonitorEndpoint.java
package com.ebay.dss.zds.message.endpoint;
import com.ebay.dss.zds.interpreter.ConfigurationManager;
import com.ebay.dss.zds.interpreter.InterpreterConfiguration;
import com.ebay.dss.zds.interpreter.interpreters.livy.LivyClient;
import com.ebay.dss.zds.interpreter.interpreters.livy.LivyClientBuilder;
import org.apache.zeppelin.livy.LivyException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
/**
* Created by tatian on 2019-07-22.
*/
@Component
public class LivyMonitorEndpoint {
private static final Logger logger = LoggerFactory.getLogger(PrometheusMetricRegistry.class);
final ConfigurationManager configurationManager;
private Environment env;
private Map<Integer, LivyClient> livyClients;
public LivyMonitorEndpoint(ConfigurationManager configurationManager, Environment env) {
this.configurationManager = configurationManager;
this.env = env;
}
@PostConstruct
public void init() {
livyClients = new HashMap<>();
InterpreterConfiguration conf = configurationManager.getDefaultConfiguration();
if (env.acceptsProfiles(Profiles.of("dev"))) {
return;
}
try {
// areslvs
livyClients.put(2, buildClient(2, conf));
// herculeslvs
livyClients.put(10, buildClient(10, conf));
// herculessublvs
livyClients.put(11, buildClient(11, conf));
// apollorno
livyClients.put(14, buildClient(14, conf));
} catch (Exception ex) {
logger.error(ex.getMessage());
}
}
private LivyClient buildClient(int clusterId, InterpreterConfiguration conf) {
return new LivyClientBuilder().withInterpreterConfiguration(conf).withClusterId(clusterId, false).build();
}
public Integer isLivyAlive(int clusterId) {
if (env.acceptsProfiles(Profiles.of("dev"))) {
return 1;
}
LivyClient livyClient = livyClients.get(clusterId);
if (livyClient != null) {
try {
livyClient.getLivyVersion();
return 1;
} catch (LivyException ex) {
return 0;
}
} else {
return 0;
}
}
}
|
missating/More-Recipes
|
client/src/__tests__/reducers/userFavourites.spec.js
|
<gh_stars>1-10
import userFavouritesReducer from '../../reducers/userFavourites';
import * as ActionTypes from '../../actions/actionTypes';
describe('User favourites reducer', () => {
describe('DEFAULT', () => {
it(
'Should set recipes to their initial values and return the initial state',
() => {
const action = {};
const newState = userFavouritesReducer(undefined, action);
expect(newState).toEqual({});
}
);
});
describe('CASE: GET_USER_FAVOURITE', () => {
it('Should get all favourites when action is called', () => {
const action = {
type: ActionTypes.GET_USER_FAVOURITE,
favourites: [
{
name: 'test',
ingredients: 'test, test, test',
description: 'mix it'
},
{
name: 'test2',
ingredients: 'test, test, test',
description: 'mix it'
}
]
};
const newState = userFavouritesReducer({}, action);
expect(newState.favourites).toEqual(action.favourites);
});
});
describe('CASE: GET_USER_FAVOURITE_ERROR', () => {
it('Should get error message for recipes when action is called', () => {
const action = {
type: ActionTypes.GET_USER_FAVOURITE_ERROR,
message: 'internal server error'
};
const newState = userFavouritesReducer({}, action);
expect(newState.errorMessage).toEqual(action.message);
});
});
});
|
pmpowers-usgs/opensha
|
src/main/java/org/opensha/nshmp2/calc/HazardResultWriterSites.java
|
<reponame>pmpowers-usgs/opensha<filename>src/main/java/org/opensha/nshmp2/calc/HazardResultWriterSites.java
package org.opensha.nshmp2.calc;
import static com.google.common.base.Charsets.US_ASCII;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import org.opensha.commons.data.function.DiscretizedFunc;
import org.opensha.commons.geo.Location;
import org.opensha.commons.geo.LocationUtils;
import org.opensha.nshmp2.util.Period;
import com.google.common.base.Functions;
import com.google.common.base.Joiner;
import com.google.common.collect.Collections2;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.io.Files;
/**
* Writer of hazard result for site specific analyses. Does not use close()
* method.
*
* @author <NAME>
* @version $Id:$
*/
public class HazardResultWriterSites implements HazardResultWriter {
private static final String N = System.getProperty("line.separator");
private static final String S = File.separator;
private static final Joiner JOIN = Joiner.on(',');
private String outDir;
private Map<String, Location> siteMap;
/**
* Creates anew local writer instance.
* @param outDir output location
* @param siteMap
* @throws IOException
*/
public HazardResultWriterSites(String outDir,
Map<String, Location> siteMap) throws IOException {
this.outDir = outDir;
this.siteMap = siteMap;
}
@Override
public void write(HazardResult result) throws IOException {
Period period = result.period();
DiscretizedFunc f = result.curve();
String siteName = siteNameForLoc(result.location());
Iterable<String> cityData = createResult(siteName, f);
String cityLine = JOIN.join(cityData) + N;
String outPath = outDir + S + period + S + "curves.csv";
File outFile = new File(outPath);
Files.createParentDirs(outFile);
Files.append(cityLine, outFile, US_ASCII);
}
@Override
public void close() {
// does nothing for this implementation; writers are created as needed
// by the guava Files utility class
}
private String siteNameForLoc(Location loc) {
for (String name : siteMap.keySet()) {
if (LocationUtils.areSimilar(siteMap.get(name), loc)) return name;
}
return "UnnamedSite";
}
private static Iterable<String> createResult(String name,
DiscretizedFunc curve) {
Iterable<String> intercepts = Lists.newArrayList(name);
Iterable<String> values = Collections2.transform(curve.yValues(),
Functions.toStringFunction());
return Iterables.concat(intercepts, values);
}
/**
* Writes the header for the supplied period.
* @param period
* @throws IOException
*/
public void writeHeader(Period period) throws IOException {
String outPath = outDir + S + period + S + "curves.csv";
File outFile = new File(outPath);
Files.createParentDirs(outFile);
Iterable<String> xValsIt = Collections2.transform(period.getIMLs(),
Functions.toStringFunction());
String header = "city," + JOIN.join(xValsIt) + N;
Files.write(header, outFile, US_ASCII);
}
}
|
mjrinker/wizcon-2021
|
src/components/Footer/Footer.js
|
<reponame>mjrinker/wizcon-2021
import React from 'react';
const Footer = () => (
<div className='bg-gray-200 dark:bg-gray-600 rounded-md mt-6 p-6 pt-12 pb-12'>
<b>WizCon 2021</b> is in Matamata, New Zealand. Join
us for our 14th annual weekend event <b>October 19-23, 2021</b>
</div>
);
export default Footer;
|
fridujo/ice-lang
|
glacio-parser/src/main/java/com/github/fridujo/glacio/parsing/model/StringSource.java
|
package com.github.fridujo.glacio.parsing.model;
import java.io.UncheckedIOException;
import java.net.URI;
public interface StringSource {
String getContent() throws UncheckedIOException;
URI getURI();
}
|
senagbe/stroke
|
src/com/isode/stroke/parser/payloadparsers/ReplaceParser.java
|
/*
* Copyright (c) 2014-2015, Isode Limited, London, England.
* All rights reserved.
*/
/*
* Copyright (c) 2011 <NAME>
* Licensed under the Simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
package com.isode.stroke.parser.payloadparsers;
import com.isode.stroke.elements.Replace;
import com.isode.stroke.parser.AttributeMap;
import com.isode.stroke.parser.GenericPayloadParser;
public class ReplaceParser extends GenericPayloadParser<Replace> {
public ReplaceParser() {
super(new Replace());
}
public void handleStartElement(String element, String ns, AttributeMap attributes) {
if (level_ == 0) {
String id = attributes.getAttribute("id");
getPayloadInternal().setID(id);
}
++level_;
}
public void handleEndElement(String element, String ns) {
--level_;
}
public void handleCharacterData(String data) {
}
private int level_;
}
|
Crossroads-Development/Essentials
|
src/main/java/com/Da_Technomancer/essentials/blocks/MultiPistonBase.java
|
<reponame>Crossroads-Development/Essentials
package com.Da_Technomancer.essentials.blocks;
import com.Da_Technomancer.essentials.ESConfig;
import com.Da_Technomancer.essentials.WorldBuffer;
import com.Da_Technomancer.essentials.blocks.redstone.RedstoneUtil;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.EntityBlock;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.piston.PistonBaseBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.PushReaction;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.ticks.TickPriority;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.Nullable;
import java.util.*;
/**
* Notable differences from a normal piston include:
* DIST_LIMIT blocks head range, distance controlled by signal strength,
* No quasi-connectivity,
* Piston extension takes 2-ticks per block extended, while retraction is instant. Block movement is not rendered
* Can move up to PUSH_LIMIT blocks at a time instead of 12
*/
public class MultiPistonBase extends Block{
private static final int DIST_LIMIT = 15;
private static final int PUSH_LIMIT = 64;
private static final int DELAY = RedstoneUtil.DELAY;
private static final VoxelShape[] BB = new VoxelShape[] {box(0, 5, 0, 16, 16, 16), box(0, 0, 0, 16, 11, 16), box(0, 0, 5, 16, 16, 16), box(0, 0, 0, 16, 16, 11), box(5, 0, 0, 16, 16, 16), box(0, 0, 0, 11, 16, 16)};
private final boolean sticky;
/**
* Dirty shared field to prevent infinite loops from block updates triggering more block updates
* While true, a multipiston is actively changing the world around it and should ignore incoming blocks updates
*/
protected static boolean changingWorld = false;
private static final BlockBehaviour.StatePredicate STATE_PREDICATE = (state, world, pos) -> !state.getValue(ESProperties.EXTENDED);
protected MultiPistonBase(boolean sticky){
super(Properties.of(Material.PISTON).isRedstoneConductor((state, world, pos) -> false).isSuffocating(STATE_PREDICATE).isViewBlocking(STATE_PREDICATE).strength(0.5F).sound(SoundType.METAL));
String name = "multi_piston" + (sticky ? "_sticky" : "");
setRegistryName(name);
this.sticky = sticky;
registerDefaultState(defaultBlockState().setValue(ESProperties.FACING, Direction.NORTH).setValue(ESProperties.EXTENDED, false).setValue(ESProperties.SHIFTING, false));
ESBlocks.toRegister.add(this);
ESBlocks.blockAddQue(this);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder){
builder.add(ESProperties.FACING, ESProperties.EXTENDED, ESProperties.SHIFTING);
}
@Nullable
@Override
public BlockState getStateForPlacement(BlockPlaceContext context){
//Place with player orientation
return defaultBlockState().setValue(ESProperties.FACING, context.getNearestLookingDirection().getOpposite());
}
@Override
public void appendHoverText(ItemStack stack, @Nullable BlockGetter worldIn, List<Component> tooltip, TooltipFlag flagIn){
tooltip.add(new TranslatableComponent("tt.essentials.multi_piston.desc", DIST_LIMIT, PUSH_LIMIT));
tooltip.add(new TranslatableComponent("tt.essentials.multi_piston.reds"));
}
@Override
public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context){
//Extended multipistons have a different shape
if(state.getValue(ESProperties.EXTENDED)){
return BB[state.getValue(ESProperties.FACING).get3DDataValue()];
}else{
return Shapes.block();
}
}
@Override
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving){
BlockState otherState;
//An internal change- due to this piston being in the process of extending/retracting (changing world) or due to this piston entering/leaving shifting state should not trigger the breaking of the extension
if(!changingWorld && (newState.getBlock() != this || state.setValue(ESProperties.SHIFTING, false)
!= newState.setValue(ESProperties.SHIFTING, false))){
//Sanity check included to make sure the adjacent blocks is actually an extension- unlike vanilla pistons, multi pistons are supposed to actually work and not break bedrock
if(state.getValue(ESProperties.EXTENDED) &&
(otherState = world.getBlockState(pos.relative(state.getValue(ESProperties.FACING)))).getBlock() ==
(sticky ? ESBlocks.multiPistonExtendSticky : ESBlocks.multiPistonExtend) &&
otherState.getValue(ESProperties.AXIS) == state.getValue(ESProperties.FACING).getAxis()){
//Break the multipiston head along this
world.destroyBlock(pos.relative(state.getValue(ESProperties.FACING)), false);
}
}
super.onRemove(state, world, pos, newState, isMoving);
}
@Override
public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player playerIn, InteractionHand hand, BlockHitResult hit){
//Rotate with a wrench
if(ESConfig.isWrench(playerIn.getItemInHand(hand)) && !state.getValue(ESProperties.EXTENDED) && !state.getValue(ESProperties.SHIFTING)){
if(!worldIn.isClientSide){
BlockState endState = state.cycle(ESProperties.FACING);//MCP note: cycle
worldIn.setBlockAndUpdate(pos, endState);
}
return InteractionResult.SUCCESS;
}
return InteractionResult.PASS;
}
@Override
public PushReaction getPistonPushReaction(BlockState state){
//If extended or currently extending, this can not be moved. Otherwise it can be moved
return state.getValue(ESProperties.EXTENDED) || state.getValue(ESProperties.SHIFTING) ? PushReaction.BLOCK : PushReaction.NORMAL;
}
@Override
public void animateTick(BlockState state, Level worldIn, BlockPos pos, Random rand){
if(state.getValue(ESProperties.SHIFTING)){
double particleRad = 0.75D;
for(int i = 0; i < 4; i++){
worldIn.addAlwaysVisibleParticle(ParticleTypes.SMOKE, pos.getX() + 0.5D + rand.nextGaussian() * particleRad, pos.getY() + 0.5D + rand.nextGaussian() * particleRad, pos.getZ() + 0.5D + rand.nextGaussian() * particleRad, 0, 0, 0);
}
}
}
@Override
public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack){
neighborChanged(world.getBlockState(pos), world, pos, this, pos, false);
}
@Override
public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean flag){
if(worldIn.isClientSide || changingWorld || state.getValue(ESProperties.SHIFTING)){
return;
}
//If incoming redstone signal would cause an extension different than current, schedule a change DELAY from now, and set shifting
Direction facing = state.getValue(ESProperties.FACING);
int redstone = getRedstoneInput(worldIn, pos, state, facing);
int currExtend = getCurrentExtension(worldIn, pos, state, facing);
if(redstone > currExtend){
//Extension has a delay of DELAY ticks
worldIn.setBlock(pos, state.setValue(ESProperties.SHIFTING, true), 2);
worldIn.scheduleTick(pos, this, DELAY, TickPriority.NORMAL);
playSound(worldIn, pos, false, true);
}else{
//Retraction happens instantly
tick(state, (ServerLevel) worldIn, pos, worldIn.random);
}
}
private int getRedstoneInput(Level world, BlockPos pos, BlockState state, Direction facing){
int target = 0;
for(Direction dir : Direction.values()){
//Don't measure redstone power from the front, as otherwise we end up in an infinite loop just by placing a redstone blocks there
if(dir != facing){
target = Math.max(target, RedstoneUtil.getRedstoneOnSide(world, pos, dir));
}
}
// This doesn't have any practical effect, as DIST_LIMIT is currently 15- but if it were changed, this line would be needed
// target = Math.min(target, DIST_LIMIT);
if(facing == Direction.UP){
//Account for world height limits when pointed up
target = Math.min(target, world.getMaxBuildHeight() - pos.getY() - 1);
}else if(facing == Direction.DOWN){
//Check for world floor
target = Math.min(target, pos.getY() - world.getMinBuildHeight());
}
return target;
}
/**
* Plays a sound effect
* @param moving Whether this is the sound of actually moving
* @param extension Whether this is part of an extension (vs a retraction)
*/
private void playSound(Level world, BlockPos pos, boolean moving, boolean extension){
if(moving){
world.playSound(null, pos, extension ? SoundEvents.PISTON_EXTEND : SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 1, 1);
}else{
world.playSound(null, pos, SoundEvents.METAL_PRESSURE_PLATE_CLICK_ON, SoundSource.BLOCKS, 1, 1);
}
}
private int getCurrentExtension(Level world, BlockPos pos, BlockState state, Direction facing){
int currentExtension = 0;
if(state.getValue(ESProperties.EXTENDED)){
BlockPos checkPos = pos.relative(facing);
BlockState curState = world.getBlockState(checkPos);
Block tarBlock = getExtensionBlock(sticky);
//Find the current extension
//The distance limit check is in case people mess around with setblock commands
Direction.AxisDirection dir;
while(curState.getBlock() == tarBlock && curState.getValue(ESProperties.AXIS) == facing.getAxis() && (dir = MultiPistonExtend.getDirFromHead(curState.getValue(ESProperties.HEAD))) != facing.getOpposite().getAxisDirection() && currentExtension != DIST_LIMIT){
currentExtension++;
checkPos = checkPos.relative(facing);
curState = world.getBlockState(checkPos);
if(dir != null){
//Sanity check to make sure we don't have an invalid extension line
break;
}
}
}
return currentExtension;
}
/**
* Gets the corresponding extension block
* @param sticky Whether this is the sticky variant
* @return The extension block type this block uses
*/
private Block getExtensionBlock(boolean sticky){
if(sticky){
return ESBlocks.multiPistonExtendSticky;
}else{
return ESBlocks.multiPistonExtend;
}
}
@Override
public void tick(BlockState state, ServerLevel world, BlockPos pos, Random rand){
//We re-check everything as the world could have changed in the previous 2 ticks
Direction facing = state.getValue(ESProperties.FACING);
int redstone = getRedstoneInput(world, pos, state, facing);
int currExtend = getCurrentExtension(world, pos, state, facing);
state = state.setValue(ESProperties.SHIFTING, false);
world.setBlock(pos, state, 2);//Reset shifting state
if(currExtend == redstone){
return;//No change needed
}
changingWorld = true;
WorldBuffer wBuf = new WorldBuffer(world);
if(currExtend < redstone){
//If we're extending, we do one block at a time, with a delay in between
boolean blocked = shiftExtension(wBuf, pos, facing, currExtend, true);
//If we are extending further, and we weren't blocked, queue another extension
if(!blocked && currExtend + 1 < redstone){
state = state.setValue(ESProperties.SHIFTING, true);
world.setBlock(pos, state, 2);
world.scheduleTick(pos, this, DELAY, TickPriority.NORMAL);
}
//Don't apply block updates until after all changes have been applied to avoid a variety of issues, including rail dupe bugs
Set<BlockPos> toUpdate = wBuf.changedPositions();
wBuf.applyChanges(1 | 2 | 64);//Flags used: 1: block update; 2: Send change to client; 64: isMoving
for(BlockPos posToUpdate : toUpdate){
world.updateNeighborsAt(posToUpdate, this);
}
if(!blocked){
playSound(world, pos, true, true);
state = state.setValue(ESProperties.EXTENDED, redstone != 0);
world.setBlockAndUpdate(pos, state);
}
}else{
//If we're retracting, we do it all at once, but calculate the result one block at a time
for(int i = currExtend; i > redstone; i--){
shiftExtension(wBuf, pos, facing, i, false);//Retraction is basically guaranteed
}
//Don't apply block updates until after all changes have been applied to avoid a variety of issues, including rail dupe bugs
Set<BlockPos> toUpdate = wBuf.changedPositions();
wBuf.applyChanges(1 | 2 | 64);//Flags used: 1: block update; 2: Send change to client; 64: isMoving
for(BlockPos posToUpdate : toUpdate){
world.updateNeighborsAt(posToUpdate, this);
}
playSound(world, pos, true, false);
state = state.setValue(ESProperties.EXTENDED, redstone != 0);
world.setBlockAndUpdate(pos, state);
}
changingWorld = false;
}
/**
* Adjusts the extension of the multipiston by one blocks in a WorldBuffer, and moves entities in the path
* @param world The WorldBuffer to read/write changes from
* @param pos The multipiston position
* @param facing The multipiston facing
* @param currentExtension The current extension of the multipiston (in the WorldBuffer)
* @param out Increase the extension if true, decrease otherwise
* @return true if this action was blocked
*/
private boolean shiftExtension(WorldBuffer world, BlockPos pos, Direction facing, int currentExtension, boolean out){
Direction moveDir = out ? facing : facing.getOpposite();
LinkedHashSet<BlockPos> movedBlocks = new LinkedHashSet<>(PUSH_LIMIT + 1);
BlockPos prevHeadPos = pos.relative(facing, currentExtension);
Block extendBlock = getExtensionBlock(sticky);
if(!out){
//Temporarily add the piston head to prevent it blocking movement paths
movedBlocks.add(prevHeadPos);
}
//Only build a moveset if we are moving out or we are retracting with a sticky head
if((out || sticky) && buildMoveset(pos, world, prevHeadPos.relative(facing), moveDir, movedBlocks, !out)){
//Something is in the way
if(!out){
//If retracting, leave attached blocks behind but finish retracting
movedBlocks.clear();
}else{
//If extending, stop here
return true;
}
}
if(!out){
movedBlocks.remove(prevHeadPos);
}
//Change the current head
if(currentExtension != 0){
world.addChange(prevHeadPos, out ? extendBlock.defaultBlockState().setValue(ESProperties.AXIS, facing.getAxis()) : Blocks.AIR.defaultBlockState());
}
for(BlockPos changePos : movedBlocks){
//Move blocks forward
BlockState prevState = world.getBlockState(changePos);
if(prevState.getPistonPushReaction() == PushReaction.DESTROY){
world.getWorld().destroyBlock(changePos, true);//Destroy the blocks in the actual world to drop items
}else{
world.addChange(changePos.relative(moveDir), prevState);
}
world.addChange(changePos, Blocks.AIR.defaultBlockState());
//Find and move entities
//We use isSlimeBlock over isSticky as honey blocks aren't bouncy
moveEnts(world.getWorld(), changePos, moveDir, prevState.isSlimeBlock());
}
//Find and move entities at the piston head itself
moveEnts(world.getWorld(), prevHeadPos, moveDir, false);
if(out){
//Add the extended head
world.addChange(pos.relative(facing, currentExtension + 1), extendBlock.defaultBlockState().setValue(ESProperties.AXIS, facing.getAxis()).setValue(ESProperties.HEAD, facing.getAxisDirection() == Direction.AxisDirection.POSITIVE ? 1 : 2));
}else if(currentExtension != 1){
//Add the retracted head
world.addChange(pos.relative(facing, currentExtension - 1), extendBlock.defaultBlockState().setValue(ESProperties.AXIS, facing.getAxis()).setValue(ESProperties.HEAD, facing.getAxisDirection() == Direction.AxisDirection.POSITIVE ? 1 : 2));
}
return false;
}
private void moveEnts(Level world, BlockPos activePos, Direction moveDir, boolean sticky){
AABB BB = new AABB(activePos.relative(moveDir));
ArrayList<Entity> movingEnts = new ArrayList<>(4);
getEntitiesMultiChunk(BB, world, movingEnts);
for(Entity ent : movingEnts){
if(ent.getPistonPushReaction() != PushReaction.IGNORE){
ent.teleportTo(ent.getX() + (double) moveDir.getStepX(), ent.getY() + (double) moveDir.getStepY(), ent.getZ() + (double) moveDir.getStepZ());
//If the entity is on a "sticky" blocks, bounce them
if(sticky){
ent.push(moveDir.getStepX(), moveDir.getStepY(), moveDir.getStepZ());
ent.hurtMarked = true;
}
}
}
movingEnts.clear();
}
/**
* This method recursively builds a list of all blocks to be moved by the piston, and returns true if there is an obstacle blocking movement
*
* @param pistonPos Position of the piston
* @param world The WorldBuffer to read from
* @param curPos The currently active checking position
* @param moveDir The direction the piston is trying to move
* @param movedBlocks The current (in progress) movement set
* @param dragging Whether this blocks would be "dragged" instead of pushed
* @return If the movement has to be aborted
*/
private boolean buildMoveset(BlockPos pistonPos, WorldBuffer world, BlockPos curPos, Direction moveDir, LinkedHashSet<BlockPos> movedBlocks, boolean dragging){
if(movedBlocks.contains(curPos)){
return false;
}
BlockState state = world.getBlockState(curPos);
//While vanilla has this very good and logical system for blocks exposing how they react to pistons, there is for no necessary reason a large number of exceptions
PushReaction reaction = state.getPistonPushReaction();
if(state.isAir()){
reaction = PushReaction.IGNORE;//Vanilla marks air as normal. This is an impressively stupid decision- it means we have to special case it
}else if(state.getBlock() == Blocks.OBSIDIAN || state.getBlock() instanceof EntityBlock || pistonPos.equals(curPos)){
reaction = PushReaction.BLOCK;//Guess what else is marked as normal? That's right, obsidian. You know, the quintessential unmovable blocks. It's special cased. whhhhyyyyyyyyyy?
}else if(state.getDestroySpeed(world, curPos) < 0){
reaction = PushReaction.BLOCK;//Mod makers adding indestructible blocks regularly forget to make them immovable
}else if(state.getBlock() instanceof PistonBaseBlock && state.hasProperty(PistonBaseBlock.EXTENDED)){
reaction = state.getValue(PistonBaseBlock.EXTENDED) ? PushReaction.BLOCK : PushReaction.NORMAL;//Vanilla pistons report BLOCK even when retracted and movable
}
boolean blocked = false;
switch(reaction){
case PUSH_ONLY:
if(dragging){
break;
}
//else treat push-only as normal
case NORMAL:
//Check for world height
if(moveDir == Direction.UP && curPos.getY() == world.getWorld().getMaxBuildHeight() || moveDir == Direction.DOWN && curPos.getY() == 0){
blocked = true;
break;
}
//The curPos needs to be added BEFORE recursively building a moveset to ensure it's counted in recursive push limit checks
movedBlocks.add(curPos);
blocked = movedBlocks.size() > PUSH_LIMIT || buildMoveset(pistonPos, world, curPos.relative(moveDir), moveDir, movedBlocks, false);
//Crazy as it seems, it is necessary to remove and then re-add this position. This moves the curPos to the end of the movedBlocks.
movedBlocks.remove(curPos);
movedBlocks.add(curPos);
//Do blocks behind this if sticky & can stick to (honey & slime don't stick together)
if(state.isStickyBlock() && state.canStickTo(world.getBlockState(curPos.relative(moveDir.getOpposite())))){
blocked = blocked || buildMoveset(pistonPos, world, curPos.relative(moveDir.getOpposite()), moveDir, movedBlocks, true);
}
//Do blocks son the sides if sticky
if(state.isStickyBlock()){
for(Direction side : Direction.values()){
//Check this is on the sides, and that it is something it can actually stick to
if(side.getAxis() != moveDir.getAxis() && state.canStickTo(world.getBlockState(curPos.relative(side)))){
blocked = blocked || buildMoveset(pistonPos, world, curPos.relative(side), moveDir, movedBlocks, true);
}
}
}
break;
case DESTROY:
if(!dragging){
movedBlocks.add(curPos);
}
break;
case BLOCK:
blocked = !dragging;
break;
case IGNORE:
break;
}
return blocked || movedBlocks.size() > PUSH_LIMIT;
}
/**
* An alternate version of World#getEntitiesWithinAABBExcludingEntity that checks a 3x3x3 cube of mini chunks (16x16x16 cubes within chunks) for entities.
* This is less efficient than the standard method, but necessary to fix a vanilla bug whereby repeated getEntity calls break if entities were moved between chunks in the same tick.
*/
private static void getEntitiesMultiChunk(AABB checkBox, Level worldIn, ArrayList<Entity> entList){
entList.addAll(worldIn.getEntities(null, checkBox));
//As of MC1.17, the way entities are fetched from the world has changed
//It seems to be that the underlying issue is fixed, and a simple method call is sufficient
// final double maxEntityRad = worldIn.getMaxEntityRadius();
// int i = Mth.floor((checkBox.minX - maxEntityRad) / 16.0D) - 1;
// int j = Mth.floor((checkBox.maxX + maxEntityRad) / 16.0D) + 1;
// int k = Mth.floor((checkBox.minZ - maxEntityRad) / 16.0D) - 1;
// int l = Mth.floor((checkBox.maxZ + maxEntityRad) / 16.0D) + 1;
//
// int yMin = Mth.clamp(Mth.floor((checkBox.minY - maxEntityRad) / 16.0D) - 1, 0, 15);
// int yMax = Mth.clamp(Mth.floor((checkBox.maxY + maxEntityRad) / 16.0D) + 1, 0, 15);
//
// for(int iLoop = i; iLoop <= j; iLoop++){
// for(int kLoop = k; kLoop <= l; kLoop++){
// if(worldIn.hasChunk(iLoop, kLoop)){
// LevelChunk chunk = worldIn.getChunkAt(new BlockPos(iLoop * 16, 100, kLoop * 16));
// for(int yLoop = yMin; yLoop <= yMax; yLoop++){
// if(!chunk.getEntitySections()[yLoop].isEmpty()){
// for(Entity entity : chunk.getEntitySections()[yLoop]){
// if(entity.getBoundingBox().intersects(checkBox)){
// entList.add(entity);
// }
// }
// }
// }
// }
// }
// }
}
}
|
zlemisie/jac_jenetics
|
org.jenetics/src/main/java/org/jenetics/engine/Engine.java
|
/*
* Java Genetic Algorithm Library (@__identifier__@).
* Copyright (c) @__year__@ <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Author:
* <NAME> (<EMAIL>)
*/
package org.jenetics.engine;
import static java.lang.Math.round;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
import static org.jenetics.Population.toPopulation;
import static org.jenetics.internal.util.require.probability;
import java.time.Clock;
import java.util.Iterator;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.concurrent.ForkJoinPool;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.jenetics.internal.util.Concurrency;
import org.jenetics.internal.util.require;
import org.jenetics.Alterer;
import org.jenetics.Chromosome;
import org.jenetics.Gene;
import org.jenetics.Genotype;
import org.jenetics.Mutator;
import org.jenetics.Optimize;
import org.jenetics.Phenotype;
import org.jenetics.Population;
import org.jenetics.Selector;
import org.jenetics.SinglePointCrossover;
import org.jenetics.TournamentSelector;
import org.jenetics.util.Copyable;
import org.jenetics.util.Factory;
import org.jenetics.util.NanoClock;
/**
* Genetic algorithm <em>engine</em> which is the main class. The following
* example shows the main steps in initializing and executing the GA.
*
* <pre>{@code
* public class RealFunction {
* // Definition of the fitness function.
* private static Double evaluate(final Genotype<DoubleGene> gt) {
* final double x = gt.getGene().doubleValue();
* return cos(0.5 + sin(x)) * cos(x);
* }
*
* public static void main(String[] args) {
* // Create/configuring the engine via its builder.
* final Engine<DoubleGene, Double> engine = Engine
* .builder(
* RealFunction::evaluate,
* DoubleChromosome.of(0.0, 2.0*PI))
* .populationSize(500)
* .optimize(Optimize.MINIMUM)
* .alterers(
* new Mutator<>(0.03),
* new MeanAlterer<>(0.6))
* .build();
*
* // Execute the GA (engine).
* final Phenotype<DoubleGene, Double> result = engine.stream()
* // Truncate the evolution stream if no better individual could
* // be found after 5 consecutive generations.
* .limit(bySteadyFitness(5))
* // Terminate the evolution after maximal 100 generations.
* .limit(100)
* .collect(toBestPhenotype());
* }
* }
* }</pre>
*
* The architecture allows to decouple the configuration of the engine from the
* execution. The {@code Engine} is configured via the {@code Engine.Builder}
* class and can't be changed after creation. The actual <i>evolution</i> is
* performed by the {@link EvolutionStream}, which is created by the
* {@code Engine}.
* <p>
* <em>
* <b>This class is thread safe:</b>
* No mutable state is maintained by the engine. Therefore it is save to
* create multiple evolution streams with one engine, which may be actually
* used in different threads.
* </em>
*
* @see Engine.Builder
* @see EvolutionStart
* @see EvolutionResult
* @see EvolutionStream
* @see EvolutionStatistics
*
* @author <a href="mailto:<EMAIL>"><NAME></a>
* @since 3.0
* @version 3.1
*/
public final class Engine<
G extends Gene<?, G>,
C extends Comparable<? super C>
>
implements Function<EvolutionStart<G, C>, EvolutionResult<G, C>>
{
// Needed context for population evolving.
private final Function<? super Genotype<G>, ? extends C> _fitnessFunction;
private final Function<? super C, ? extends C> _fitnessScaler;
private final Factory<Genotype<G>> _genotypeFactory;
private final Selector<G, C> _survivorsSelector;
private final Selector<G, C> _offspringSelector;
private final Alterer<G, C> _alterer;
private final Predicate<? super Phenotype<G, C>> _validator;
private final Optimize _optimize;
private final int _offspringCount;
private final int _survivorsCount;
private final long _maximalPhenotypeAge;
// Execution context for concurrent execution of evolving steps.
private final TimedExecutor _executor;
private final Clock _clock;
// Additional parameters.
private final int _individualCreationRetries;
/**
* Create a new GA engine with the given parameters.
*
* @param genotypeFactory the genotype factory this GA is working with.
* @param fitnessFunction the fitness function this GA is using.
* @param fitnessScaler the fitness scaler this GA is using.
* @param survivorsSelector the selector used for selecting the survivors
* @param offspringSelector the selector used for selecting the offspring
* @param alterer the alterer used for altering the offspring
* @param validator phenotype validator which can override the default
* implementation the {@link Phenotype#isValid()} method.
* @param optimize the kind of optimization (minimize or maximize)
* @param offspringCount the number of the offspring individuals
* @param survivorsCount the number of the survivor individuals
* @param maximalPhenotypeAge the maximal age of an individual
* @param executor the executor used for executing the single evolve steps
* @param clock the clock used for calculating the timing results
* @param individualCreationRetries the maximal number of attempts for
* creating a valid individual.
* @throws NullPointerException if one of the arguments is {@code null}
* @throws IllegalArgumentException if the given integer values are smaller
* than one.
*/
Engine(
final Function<? super Genotype<G>, ? extends C> fitnessFunction,
final Function<? super C, ? extends C> fitnessScaler,
final Factory<Genotype<G>> genotypeFactory,
final Selector<G, C> survivorsSelector,
final Selector<G, C> offspringSelector,
final Alterer<G, C> alterer,
final Predicate<? super Phenotype<G, C>> validator,
final Optimize optimize,
final int offspringCount,
final int survivorsCount,
final long maximalPhenotypeAge,
final Executor executor,
final Clock clock,
final int individualCreationRetries
) {
_fitnessFunction = requireNonNull(fitnessFunction);
_fitnessScaler = requireNonNull(fitnessScaler);
_genotypeFactory = requireNonNull(genotypeFactory);
_survivorsSelector = requireNonNull(survivorsSelector);
_offspringSelector = requireNonNull(offspringSelector);
_alterer = requireNonNull(alterer);
_validator = requireNonNull(validator);
_optimize = requireNonNull(optimize);
_offspringCount = require.positive(offspringCount);
_survivorsCount = require.positive(survivorsCount);
_maximalPhenotypeAge = require.positive(maximalPhenotypeAge);
_executor = new TimedExecutor(requireNonNull(executor));
_clock = requireNonNull(clock);
if (individualCreationRetries < 0) {
throw new IllegalArgumentException(format(
"Retry count must not be negative: %d",
individualCreationRetries
));
}
_individualCreationRetries = individualCreationRetries;
}
/**
* Perform one evolution step with the given {@code population} and
* {@code generation}. New phenotypes are created with the fitness function
* and fitness scaler defined by this <em>engine</em>
* <p>
* <em>This method is thread-safe.</em>
*
* @see #evolve(EvolutionStart)
*
* @param population the population to evolve
* @param generation the current generation; used for calculating the
* phenotype age.
* @return the evolution result
* @throws java.lang.NullPointerException if the given {@code population} is
* {@code null}
* @throws IllegalArgumentException if the given {@code generation} is
* smaller then one
*/
public EvolutionResult<G, C> evolve(
final Population<G, C> population,
final long generation
) {
return evolve(EvolutionStart.of(population, generation));
}
/**
* Perform one evolution step with the given evolution {@code start} object
* New phenotypes are created with the fitness function and fitness scaler
* defined by this <em>engine</em>
* <p>
* <em>This method is thread-safe.</em>
*
* @since 3.1
* @see #evolve(org.jenetics.Population, long)
*
* @param start the evolution start object
* @return the evolution result
* @throws java.lang.NullPointerException if the given evolution
* {@code start} is {@code null}
*/
public EvolutionResult<G, C> evolve(final EvolutionStart<G, C> start) {
final Timer timer = Timer.of().start();
// Select the offspring population.
final CompletableFuture<TimedResult<Population<G, C>>> offspring =
_executor.async(() ->
selectOffspring(start.getPopulation()),
_clock
);
// Select the survivor population.
final CompletableFuture<TimedResult<Population<G, C>>> survivors =
_executor.async(() ->
selectSurvivors(start.getPopulation()),
_clock
);
// Altering the offspring population.
final CompletableFuture<TimedResult<AlterResult<G, C>>> alteredOffspring =
_executor.thenApply(offspring, p ->
alter(p.result, start.getGeneration()),
_clock
);
// Filter and replace invalid and to old survivor individuals.
final CompletableFuture<TimedResult<FilterResult<G, C>>> filteredSurvivors =
_executor.thenApply(survivors, pop ->
filter(pop.result, start.getGeneration()),
_clock
);
// Filter and replace invalid and to old offspring individuals.
final CompletableFuture<TimedResult<FilterResult<G, C>>> filteredOffspring =
_executor.thenApply(alteredOffspring, pop ->
filter(pop.result.population, start.getGeneration()),
_clock
);
// Combining survivors and offspring to the new population.
final CompletableFuture<Population<G, C>> population =
filteredSurvivors.thenCombineAsync(filteredOffspring, (s, o) -> {
final Population<G, C> pop = s.result.population;
pop.addAll(o.result.population);
return pop;
},
_executor.get()
);
// Evaluate the fitness-function and wait for result.
final TimedResult<Population<G, C>> result = population
.thenApply(TimedResult.of(this::evaluate, _clock))
.join();
final EvolutionDurations durations = EvolutionDurations.of(
offspring.join().duration,
survivors.join().duration,
alteredOffspring.join().duration,
filteredOffspring.join().duration,
filteredSurvivors.join().duration,
result.duration,
timer.stop().getTime()
);
final int killCount =
filteredOffspring.join().result.killCount +
filteredSurvivors.join().result.killCount;
final int invalidCount =
filteredOffspring.join().result.invalidCount +
filteredSurvivors.join().result.invalidCount;
return EvolutionResult.of(
_optimize,
result.result,
start.getGeneration(),
durations,
killCount,
invalidCount,
alteredOffspring.join().result.alterCount
);
}
/**
* This method is an <i>alias</i> for the {@link #evolve(EvolutionStart)}
* method.
*
* @since 3.1
*/
@Override
public EvolutionResult<G, C> apply(final EvolutionStart<G, C> start) {
return evolve(start);
}
// Selects the survivors population. A new population object is returned.
private Population<G, C> selectSurvivors(final Population<G, C> population) {
return _survivorsSelector.select(population, _survivorsCount, _optimize);
}
// Selects the offspring population. A new population object is returned.
private Population<G, C> selectOffspring(final Population<G, C> population) {
return _offspringSelector.select(population, _offspringCount, _optimize);
}
// Filters out invalid and to old individuals. Filtering is done in place.
private FilterResult<G, C> filter(
final Population<G, C> population,
final long generation
) {
int killCount = 0;
int invalidCount = 0;
for (int i = 0, n = population.size(); i < n; ++i) {
final Phenotype<G, C> individual = population.get(i);
if (!_validator.test(individual)) {
population.set(i, newPhenotype(generation));
++invalidCount;
} else if (individual.getAge(generation) > _maximalPhenotypeAge) {
population.set(i, newPhenotype(generation));
++killCount;
}
}
return new FilterResult<>(population, killCount, invalidCount);
}
// Create a new and valid phenotype
private Phenotype<G, C> newPhenotype(final long generation) {
int count = 0;
Phenotype<G, C> phenotype;
do {
phenotype = Phenotype.of(
_genotypeFactory.newInstance(),
generation,
_fitnessFunction,
_fitnessScaler
);
} while (++count < _individualCreationRetries &&
!_validator.test(phenotype));
return phenotype;
}
// Alters the given population. The altering is done in place.
private AlterResult<G, C> alter(
final Population<G,C> population,
final long generation
) {
return new AlterResult<>(
population,
_alterer.alter(population, generation)
);
}
// Evaluates the fitness function of the give population concurrently.
private Population<G, C> evaluate(final Population<G, C> population) {
try (Concurrency c = Concurrency.with(_executor.get())) {
c.execute(population);
}
return population;
}
/**
* Create a new <b>infinite</b> evolution iterator with a newly created
* population. This is an alternative way for evolution. It lets the user
* start, stop and resume the evolution process whenever desired.
*
* @return a new <b>infinite</b> evolution iterator
*/
public Iterator<EvolutionResult<G, C>> iterator() {
return new EvolutionIterator<>(
this::evolve,
this::evolutionStart
);
}
/**
* Create a new <b>infinite</b> evolution stream with a newly created
* population.
*
* @return a new evolution stream.
*/
public EvolutionStream<G, C> stream() {
return EvolutionStream.of(this::evolutionStart, this::evolve);
}
private EvolutionStart<G, C> evolutionStart() {
final int generation = 1;
final int size = _offspringCount + _survivorsCount;
final Population<G, C> population = new Population<G, C>(size)
.fill(() -> newPhenotype(generation), size);
evaluate(population);
return EvolutionStart.of(population, generation);
}
/**
* Create a new <b>infinite</b> evolution stream with the given initial
* individuals. If an empty {@code Iterable} is given, the engines genotype
* factory is used for creating the population.
*
* @param genotypes the initial individuals used for the evolution stream.
* Missing individuals are created and individuals not needed are
* skipped.
* @return a new evolution stream.
* @throws java.lang.NullPointerException if the given {@code genotypes} is
* {@code null}.
*/
public EvolutionStream<G, C> stream(
final Iterable<Genotype<G>> genotypes
) {
requireNonNull(genotypes);
return EvolutionStream.of(
() -> evolutionStart(genotypes, 1),
this::evolve
);
}
/**
* Create a new <b>infinite</b> evolution iterator with the given initial
* individuals. If an empty {@code Iterable} is given, the engines genotype
* factory is used for creating the population.
*
* @param genotypes the initial individuals used for the evolution iterator.
* Missing individuals are created and individuals not needed are
* skipped.
* @return a new <b>infinite</b> evolution iterator
* @throws java.lang.NullPointerException if the given {@code genotypes} is
* {@code null}.
*/
public Iterator<EvolutionResult<G, C>> iterator(
final Iterable<Genotype<G>> genotypes
) {
requireNonNull(genotypes);
return new EvolutionIterator<>(
this::evolve,
() -> evolutionStart(genotypes, 1)
);
}
private EvolutionStart<G, C> evolutionStart(
final Iterable<Genotype<G>> genotypes,
final long generation
) {
final Stream<Phenotype<G, C>> stream = Stream.concat(
StreamSupport.stream(genotypes.spliterator(), false)
.map(gt -> Phenotype.of(
gt, generation, _fitnessFunction, _fitnessScaler)),
Stream.generate(() -> newPhenotype(generation))
);
final Population<G, C> population = stream
.limit(getPopulationSize())
.collect(toPopulation());
evaluate(population);
return EvolutionStart.of(population, generation);
}
/**
* Create a new <b>infinite</b> evolution stream with the given initial
* population. If an empty {@code Population} is given, the engines genotype
* factory is used for creating the population. The given population might
* be the result of an other engine and this method allows to start the
* evolution with the outcome of an different engine. The fitness function
* and the fitness scaler are replaced by the one defined for this engine.
*
* @param population the initial individuals used for the evolution stream.
* Missing individuals are created and individuals not needed are
* skipped.
* @param generation the generation the stream starts from; must be greater
* than zero.
* @return a new evolution stream.
* @throws java.lang.NullPointerException if the given {@code population} is
* {@code null}.
* @throws IllegalArgumentException if the given {@code generation} is smaller
* then one
*/
public EvolutionStream<G, C> stream(
final Population<G, C> population,
final long generation
) {
requireNonNull(population);
require.positive(generation);
return EvolutionStream.of(
() -> evolutionStart(population, generation),
this::evolve
);
}
/**
* Create a new <b>infinite</b> evolution iterator with the given initial
* population. If an empty {@code Population} is given, the engines genotype
* factory is used for creating the population. The given population might
* be the result of an other engine and this method allows to start the
* evolution with the outcome of an different engine. The fitness function
* and the fitness scaler are replaced by the one defined for this engine.
*
* @param population the initial individuals used for the evolution iterator.
* Missing individuals are created and individuals not needed are
* skipped.
* @param generation the generation the iterator starts from; must be greater
* than zero.
* @return a new <b>infinite</b> evolution iterator
* @throws java.lang.NullPointerException if the given {@code population} is
* {@code null}.
* @throws IllegalArgumentException if the given {@code generation} is smaller
* then one
*/
public Iterator<EvolutionResult<G, C>> iterator(
final Population<G, C> population,
final long generation
) {
requireNonNull(population);
require.positive(generation);
return new EvolutionIterator<>(
this::evolve,
() -> evolutionStart(population, generation)
);
}
private EvolutionStart<G, C> evolutionStart(
final Population<G, C> population,
final long generation
) {
final Stream<Phenotype<G, C>> stream = Stream.concat(
population.stream()
.map(p -> p.newInstance(
p.getGeneration(),
_fitnessFunction,
_fitnessScaler)),
Stream.generate(() -> newPhenotype(generation))
);
final Population<G, C> pop = stream
.limit(getPopulationSize())
.collect(toPopulation());
evaluate(pop);
return EvolutionStart.of(pop, generation);
}
/* *************************************************************************
* Property access methods.
**************************************************************************/
/**
* Return the fitness function of the GA engine.
*
* @return the fitness function
*/
public Function<? super Genotype<G>, ? extends C> getFitnessFunction() {
return _fitnessFunction;
}
/**
* Return the fitness scaler of the GA engine.
*
* @return the fitness scaler
*/
public Function<? super C, ? extends C> getFitnessScaler() {
return _fitnessScaler;
}
/**
* Return the used genotype {@link Factory} of the GA. The genotype factory
* is used for creating the initial population and new, random individuals
* when needed (as replacement for invalid and/or died genotypes).
*
* @return the used genotype {@link Factory} of the GA.
*/
public Factory<Genotype<G>> getGenotypeFactory() {
return _genotypeFactory;
}
/**
* Return the used survivor {@link Selector} of the GA.
*
* @return the used survivor {@link Selector} of the GA.
*/
public Selector<G, C> getSurvivorsSelector() {
return _survivorsSelector;
}
/**
* Return the used offspring {@link Selector} of the GA.
*
* @return the used offspring {@link Selector} of the GA.
*/
public Selector<G, C> getOffspringSelector() {
return _offspringSelector;
}
/**
* Return the used {@link Alterer} of the GA.
*
* @return the used {@link Alterer} of the GA.
*/
public Alterer<G, C> getAlterer() {
return _alterer;
}
/**
* Return the number of selected offsprings.
*
* @return the number of selected offsprings
*/
public int getOffspringCount() {
return _offspringCount;
}
/**
* The number of selected survivors.
*
* @return the number of selected survivors
*/
public int getSurvivorsCount() {
return _survivorsCount;
}
/**
* Return the number of individuals of a population.
*
* @return the number of individuals of a population
*/
public int getPopulationSize() {
return _offspringCount + _survivorsCount;
}
/**
* Return the maximal allowed phenotype age.
*
* @return the maximal allowed phenotype age
*/
public long getMaximalPhenotypeAge() {
return _maximalPhenotypeAge;
}
/**
* Return the optimization strategy.
*
* @return the optimization strategy
*/
public Optimize getOptimize() {
return _optimize;
}
/**
* Return the {@link Clock} the engine is using for measuring the execution
* time.
*
* @return the clock used for measuring the execution time
*/
public Clock getClock() {
return _clock;
}
/**
* Return the {@link Executor} the engine is using for executing the
* evolution steps.
*
* @return the executor used for performing the evolution steps
*/
public Executor getExecutor() {
return _executor.get();
}
/* *************************************************************************
* Builder methods.
**************************************************************************/
/**
* Create a new evolution {@code Engine.Builder} initialized with the values
* of the current evolution {@code Engine}. With this method, the evolution
* engine can serve as a template for an new one.
*
* @return a new engine builder
*/
public Builder<G, C> builder() {
return new Builder<>(_genotypeFactory, _fitnessFunction)
.alterers(_alterer)
.clock(_clock)
.executor(_executor.get())
.fitnessScaler(_fitnessScaler)
.maximalPhenotypeAge(_maximalPhenotypeAge)
.offspringFraction((double)_offspringCount/(double)getPopulationSize())
.offspringSelector(_offspringSelector)
.optimize(_optimize)
.phenotypeValidator(_validator)
.populationSize(getPopulationSize())
.survivorsSelector(_survivorsSelector)
.individualCreationRetries(_individualCreationRetries);
}
/**
* Create a new evolution {@code Engine.Builder} with the given fitness
* function and genotype factory.
*
* @param fitnessFunction the fitness function
* @param genotypeFactory the genotype factory
* @param <G> the gene type
* @param <C> the fitness function result type
* @return a new engine builder
* @throws java.lang.NullPointerException if one of the arguments is
* {@code null}.
*/
public static <G extends Gene<?, G>, C extends Comparable<? super C>>
Builder<G, C> builder(
final Function<? super Genotype<G>, ? extends C> fitnessFunction,
final Factory<Genotype<G>> genotypeFactory
) {
return new Builder<>(genotypeFactory, fitnessFunction);
}
/**
* Create a new evolution {@code Engine.Builder} with the given fitness
* function and chromosome templates.
*
* @param fitnessFunction the fitness function
* @param chromosome the first chromosome
* @param chromosomes the chromosome templates
* @param <G> the gene type
* @param <C> the fitness function result type
* @return a new engine builder
* @throws java.lang.NullPointerException if one of the arguments is
* {@code null}.
*/
@SafeVarargs
public static <G extends Gene<?, G>, C extends Comparable<? super C>>
Builder<G, C> builder(
final Function<? super Genotype<G>, ? extends C> fitnessFunction,
final Chromosome<G> chromosome,
final Chromosome<G>... chromosomes
) {
return new Builder<>(
Genotype.of(chromosome, chromosomes),
fitnessFunction
);
}
/* *************************************************************************
* Inner classes
**************************************************************************/
/**
* Builder class for building GA {@code Engine} instances.
*
* @see Engine
*
* @author <a href="mailto:<EMAIL>"><NAME></a>
* @since 3.0
* @version 3.0
*/
public static final class Builder<
G extends Gene<?, G>,
C extends Comparable<? super C>
>
implements Copyable<Builder<G, C>>
{
// No default values for this properties.
private Function<? super Genotype<G>, ? extends C> _fitnessFunction;
private Factory<Genotype<G>> _genotypeFactory;
// This are the properties which default values.
private Function<? super C, ? extends C> _fitnessScaler = a -> a;
private Selector<G, C> _survivorsSelector = new TournamentSelector<>(3);
private Selector<G, C> _offspringSelector = new TournamentSelector<>(3);
private Alterer<G, C> _alterer = Alterer.of(
new SinglePointCrossover<G, C>(0.2),
new Mutator<>(0.15)
);
private Predicate<? super Phenotype<G, C>> _validator = Phenotype::isValid;
private Optimize _optimize = Optimize.MAXIMUM;
private double _offspringFraction = 0.6;
private int _populationSize = 50;
private long _maximalPhenotypeAge = 70;
private Executor _executor = ForkJoinPool.commonPool();
private Clock _clock = NanoClock.systemUTC();
private int _individualCreationRetries = 10;
private Builder(
final Factory<Genotype<G>> genotypeFactory,
final Function<? super Genotype<G>, ? extends C> fitnessFunction
) {
_genotypeFactory = requireNonNull(genotypeFactory);
_fitnessFunction = requireNonNull(fitnessFunction);
}
/**
* Set the fitness function of the evolution {@code Engine}.
*
* @param function the fitness function to use in the GA {@code Engine}
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> fitnessFunction(
Function<? super Genotype<G>, ? extends C> function
) {
_fitnessFunction = requireNonNull(function);
return this;
}
/**
* Set the fitness scaler of the evolution {@code Engine}. <i>Default
* value is set to the identity function.</i>
*
* @param scaler the fitness scale to use in the GA {@code Engine}
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> fitnessScaler(
final Function<? super C, ? extends C> scaler
) {
_fitnessScaler = requireNonNull(scaler);
return this;
}
/**
* The genotype factory used for creating new individuals.
*
* @param genotypeFactory the genotype factory for creating new
* individuals.
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> genotypeFactory(
final Factory<Genotype<G>> genotypeFactory
) {
_genotypeFactory = requireNonNull(genotypeFactory);
return this;
}
/**
* The selector used for selecting the offspring population. <i>Default
* values is set to {@code TournamentSelector<>(3)}.</i>
*
* @param selector used for selecting the offspring population
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> offspringSelector(
final Selector<G, C> selector
) {
_offspringSelector = requireNonNull(selector);
return this;
}
/**
* The selector used for selecting the survivors population. <i>Default
* values is set to {@code TournamentSelector<>(3)}.</i>
*
* @param selector used for selecting survivors population
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> survivorsSelector(
final Selector<G, C> selector
) {
_survivorsSelector = requireNonNull(selector);
return this;
}
/**
* The selector used for selecting the survivors and offspring
* population. <i>Default values is set to
* {@code TournamentSelector<>(3)}.</i>
*
* @param selector used for selecting survivors and offspring population
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> selector(final Selector<G, C> selector) {
_offspringSelector = requireNonNull(selector);
_survivorsSelector = requireNonNull(selector);
return this;
}
/**
* The alterers used for alter the offspring population. <i>Default
* values is set to {@code new SinglePointCrossover<>(0.2)} followed by
* {@code new Mutator<>(0.15)}.</i>
*
* @param first the first alterer used for alter the offspring
* population
* @param rest the rest of the alterers used for alter the offspring
* population
* @return {@code this} builder, for command chaining
* @throws java.lang.NullPointerException if one of the alterers is
* {@code null}.
*/
@SafeVarargs
public final Builder<G, C> alterers(
final Alterer<G, C> first,
final Alterer<G, C>... rest
) {
requireNonNull(first);
Stream.of(rest).forEach(Objects::requireNonNull);
_alterer = rest.length == 0 ?
first :
Alterer.of(rest).compose(first);
return this;
}
/**
* The phenotype validator used for detecting invalid individuals.
* Alternatively it is also possible to set the genotype validator with
* {@link #genotypeFactory(Factory)}, which will replace any
* previously set phenotype validators.
*
* <p><i>Default value is set to {@code Phenotype::isValid}.</i></p>
*
* @since 3.1
*
* @see #genotypeValidator(Predicate)
*
* @param validator the {@code validator} used for validating the
* individuals (phenotypes).
* @return {@code this} builder, for command chaining
* @throws java.lang.NullPointerException if the {@code validator} is
* {@code null}.
*/
public Builder<G, C> phenotypeValidator(
final Predicate<? super Phenotype<G, C>> validator
) {
_validator = requireNonNull(validator);
return this;
}
/**
* The genotype validator used for detecting invalid individuals.
* Alternatively it is also possible to set the phenotype validator with
* {@link #phenotypeValidator(Predicate)}, which will replace any
* previously set genotype validators.
*
* <p><i>Default value is set to {@code Genotype::isValid}.</i></p>
*
* @since 3.1
*
* @see #phenotypeValidator(Predicate)
*
* @param validator the {@code validator} used for validating the
* individuals (genotypes).
* @return {@code this} builder, for command chaining
* @throws java.lang.NullPointerException if the {@code validator} is
* {@code null}.
*/
public Builder<G, C> genotypeValidator(
final Predicate<? super Genotype<G>> validator
) {
requireNonNull(validator);
_validator = pt -> validator.test(pt.getGenotype());
return this;
}
/**
* The optimization strategy used by the engine. <i>Default values is
* set to {@code Optimize.MAXIMUM}.</i>
*
* @param optimize the optimization strategy used by the engine
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> optimize(final Optimize optimize) {
_optimize = requireNonNull(optimize);
return this;
}
/**
* The offspring fraction. <i>Default values is set to {@code 0.6}.</i>
*
* @param fraction the offspring fraction
* @return {@code this} builder, for command chaining
* @throws java.lang.IllegalArgumentException if the fraction is not
* within the range [0, 1].
*/
public Builder<G, C> offspringFraction(final double fraction) {
_offspringFraction = probability(fraction);
return this;
}
/**
* The number of individuals which form the population. <i>Default
* values is set to {@code 50}.</i>
*
* @param size the number of individuals of a population
* @return {@code this} builder, for command chaining
* @throws java.lang.IllegalArgumentException if {@code size < 1}
*/
public Builder<G, C> populationSize(final int size) {
if (size < 1) {
throw new IllegalArgumentException(format(
"Population size must be greater than zero, but was %s.", size
));
}
_populationSize = size;
return this;
}
/**
* The maximal allowed age of a phenotype. <i>Default values is set to
* {@code 70}.</i>
*
* @param age the maximal phenotype age
* @return {@code this} builder, for command chaining
* @throws java.lang.IllegalArgumentException if {@code age < 1}
*/
public Builder<G, C> maximalPhenotypeAge(final long age) {
if (age < 1) {
throw new IllegalArgumentException(format(
"Phenotype age must be greater than one, but was %s.", age
));
}
_maximalPhenotypeAge = age;
return this;
}
/**
* The executor used by the engine.
*
* @param executor the executor used by the engine
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> executor(final Executor executor) {
_executor = requireNonNull(executor);
return this;
}
/**
* The clock used for calculating the execution durations.
*
* @param clock the clock used for calculating the execution durations
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> clock(final Clock clock) {
_clock = requireNonNull(clock);
return this;
}
/**
* The maximal number of attempt before the {@code Engine} gives up
* creating a valid individual ({@code Phenotype}). <i>Default values is
* set to {@code 10}.</i>
*
* @since 3.1
*
* @param retries the maximal retry count
* @throws IllegalArgumentException if the given retry {@code count} is
* smaller than zero.
* @return {@code this} builder, for command chaining
*/
public Builder<G, C> individualCreationRetries(final int retries) {
if (retries < 0) {
throw new IllegalArgumentException(format(
"Retry count must not be negative: %d",
retries
));
}
_individualCreationRetries = retries;
return this;
}
/**
* Builds an new {@code Engine} instance from the set properties.
*
* @return an new {@code Engine} instance from the set properties
*/
public Engine<G, C> build() {
return new Engine<>(
_fitnessFunction,
_fitnessScaler,
_genotypeFactory,
_survivorsSelector,
_offspringSelector,
_alterer,
_validator,
_optimize,
getOffspringCount(),
getSurvivorsCount(),
_maximalPhenotypeAge,
_executor,
_clock,
_individualCreationRetries
);
}
private int getSurvivorsCount() {
return _populationSize - getOffspringCount();
}
private int getOffspringCount() {
return (int)round(_offspringFraction*_populationSize);
}
/**
* Return the used {@link Alterer} of the GA.
*
* @return the used {@link Alterer} of the GA.
*/
public Alterer<G, C> getAlterers() {
return _alterer;
}
/**
* Return the {@link Clock} the engine is using for measuring the execution
* time.
*
* @since 3.1
*
* @return the clock used for measuring the execution time
*/
public Clock getClock() {
return _clock;
}
/**
* Return the {@link Executor} the engine is using for executing the
* evolution steps.
*
* @since 3.1
*
* @return the executor used for performing the evolution steps
*/
public Executor getExecutor() {
return _executor;
}
/**
* Return the fitness function of the GA engine.
*
* @since 3.1
*
* @return the fitness function
*/
public Function<? super Genotype<G>, ? extends C> getFitnessFunction() {
return _fitnessFunction;
}
/**
* Return the fitness scaler of the GA engine.
*
* @since 3.1
*
* @return the fitness scaler
*/
public Function<? super C, ? extends C> getFitnessScaler() {
return _fitnessScaler;
}
/**
* Return the used genotype {@link Factory} of the GA. The genotype factory
* is used for creating the initial population and new, random individuals
* when needed (as replacement for invalid and/or died genotypes).
*
* @since 3.1
*
* @return the used genotype {@link Factory} of the GA.
*/
public Factory<Genotype<G>> getGenotypeFactory() {
return _genotypeFactory;
}
/**
* Return the maximal allowed phenotype age.
*
* @since 3.1
*
* @return the maximal allowed phenotype age
*/
public long getMaximalPhenotypeAge() {
return _maximalPhenotypeAge;
}
/**
* Return the offspring fraction.
*
* @return the offspring fraction.
*/
public double getOffspringFraction() {
return _offspringFraction;
}
/**
* Return the used offspring {@link Selector} of the GA.
*
* @since 3.1
*
* @return the used offspring {@link Selector} of the GA.
*/
public Selector<G, C> getOffspringSelector() {
return _offspringSelector;
}
/**
* Return the used survivor {@link Selector} of the GA.
*
* @since 3.1
*
* @return the used survivor {@link Selector} of the GA.
*/
public Selector<G, C> getSurvivorsSelector() {
return _survivorsSelector;
}
/**
* Return the optimization strategy.
*
* @since 3.1
*
* @return the optimization strategy
*/
public Optimize getOptimize() {
return _optimize;
}
/**
* Return the number of individuals of a population.
*
* @since 3.1
*
* @return the number of individuals of a population
*/
public int getPopulationSize() {
return _populationSize;
}
/**
* Return the maximal number of attempt before the {@code Engine} gives
* up creating a valid individual ({@code Phenotype}).
*
* @since 3.1
*
* @return the maximal number of {@code Phenotype} creation attempts
*/
public int getIndividualCreationRetries() {
return _individualCreationRetries;
}
/**
* Create a new builder, with the current configuration.
*
* @since 3.1
*
* @return a new builder, with the current configuration
*/
@Override
public Builder<G, C> copy() {
return new Builder<>(_genotypeFactory, _fitnessFunction)
.alterers(_alterer)
.clock(_clock)
.executor(_executor)
.fitnessScaler(_fitnessScaler)
.maximalPhenotypeAge(_maximalPhenotypeAge)
.offspringFraction(_offspringFraction)
.offspringSelector(_offspringSelector)
.phenotypeValidator(_validator)
.optimize(_optimize)
.populationSize(_populationSize)
.survivorsSelector(_survivorsSelector)
.individualCreationRetries(_individualCreationRetries);
}
}
}
|
dongdiemthuy/nutrixs-ng-admin
|
src/javascripts/ng-admin/Crud/field/StringField.js
|
<reponame>dongdiemthuy/nutrixs-ng-admin
/*global define*/
define(function (require) {
'use strict';
var stringFieldView = require('text!./StringField.html');
function StringField() {
return {
restrict: 'E',
template: stringFieldView
};
}
StringField.$inject = [];
return StringField;
});
|
yetsun/hue
|
apps/oozie/src/oozie/views/api.py
|
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from builtins import str
from builtins import range
from past.builtins import basestring
import json
import logging
import re
import sys
from django.http import Http404
from desktop.lib.django_util import JsonResponse
from desktop.lib.exceptions import StructuredException
from desktop.lib.i18n import force_unicode
from desktop.models import Document
from oozie.forms import WorkflowForm, NodeForm, design_form_by_type
from oozie.models import Workflow, Node, Start, End, Kill,\
Link, Decision, Fork, DecisionEnd, Join,\
NODE_TYPES, ACTION_TYPES, _STD_PROPERTIES
from oozie.decorators import check_job_access_permission, check_job_edition_permission
from oozie.utils import model_to_dict, format_dict_field_values, format_field_value
if sys.version_info[0] > 2:
from django.utils.translation import gettext as _
else:
from django.utils.translation import ugettext as _
LOG = logging.getLogger(__name__)
try:
from jobbrowser.views import job_single_logs
from jobbrowser.models import LinkJobLogs
except:
LOG.warning('Oozie is not enabled')
def error_handler(view_fn):
def decorator(request, *args, **kwargs):
try:
return view_fn(request, *args, **kwargs)
except Http404 as e:
raise e
except StructuredException as e:
error_code = e.error_code
message = e.message
details = e.data or {}
except Exception as e:
LOG.exception('error in %s' % view_fn)
error_code = 500
details = {}
(type, value, tb) = sys.exc_info()
if not hasattr(e, 'message') or not e.message:
message = str(e)
else:
message = force_unicode(e.message, strings_only=True, errors='replace')
response = {
'status': 1,
'message': message,
'details': details
}
return JsonResponse(response, status=error_code)
return decorator
def get_or_create_node(workflow, node_data, save=True):
node = None
id = str(node_data['id'])
separator_index = id.find(':')
if separator_index == -1:
return Node.objects.get(id=id, workflow=workflow).get_full_node()
node_type = id[0:separator_index]
node_model = NODE_TYPES.get(node_type, None)
kwargs = {'workflow': workflow, 'node_type': node_data['node_type']}
if node_model:
node = node_model(**kwargs)
else:
raise StructuredException(code="INVALID_REQUEST_ERROR", message=_('Could not find node of type'), data=node_data, error_code=500)
if save:
node.save()
return node
def _validate_node_links_json(node_type, node_links, errors):
"""
Validate a single node's links.
node_type is the node type of the action information passed.
node_links is list of dictionaries describing the links.
errors is a dictionary that will be populated with any found errors.
"""
assert isinstance(errors, dict), "errors must be a dict."
if not isinstance(node_links, list):
errors['links'] = _("links must be a list")
return False
# Check link counts are accurate.
if node_type == Start.node_type:
if len(node_links) != 2:
errors['links'] = _("Start should have two children: 'related' to end, 'to' to any node but an end.")
return False
elif node_type == End.node_type:
if len(node_links) != 0:
errors['links'] = _("End should have no children.")
return False
elif node_type == Kill.node_type:
if len(node_links) != 0:
errors['links'] = _("Kill should have no children.")
return False
elif node_type in (Join.node_type, DecisionEnd.node_type):
if len(node_links) != 1:
errors['links'] = _("Join and Decision End should have one child: 'to' to any node.")
return False
elif node_type in (Fork.node_type, Decision.node_type):
if len(node_links) < 2:
errors['links'] = _("Fork and Decision should have at least two children: 'related' to their respective ends, 'start' to any node.")
return False
else:
if len(node_links) != 2:
errors['links'] = _("Actions should have two children: 'error' to kill, 'ok' to any node.")
return False
# Check if link types are okay.
link_names_by_node_type = {
'start': {'related': 1, 'to': 1},
'end': {},
'kill': {},
'fork': {'related': 1, 'start': 2},
'join': {'to': 1},
'decision': {'related': 1, 'start': 2},
'decisionend': {'to': 1},
None: {'ok': 1, 'error': 1},
}
link_types = link_names_by_node_type.get(node_type, link_names_by_node_type[None])
for link in node_links:
link_name = link.get('name', None)
if link_name in link_types:
link_types[link_name] -= 1
for link_type in link_types:
if link_types[link_type] > 0:
errors['links'] = _('%(node_type)s should have %(count)d more %(link_type)s link' % {
'node_type': node_type,
'count': link_types[link_type],
'link_type': link_type
})
return False
return True
def _validate_node_json(node_type, node_dict, errors, user, workflow):
"""
Validates a single node excluding links.
node_type is the node type of the action information passed.
node_dict is a dictionary describing the node.
errors is a dictionary that will be populated with any found errors.
user is a User object that is associated with the node_type. Only needed for Subworkflow node.
workflow is the Workflow object associated with the node. Only needed for Subworkflow node.
Returns Boolean.
"""
assert isinstance(errors, dict), "errors must be a dict."
if node_type in ACTION_TYPES:
form_class = design_form_by_type(node_type, user, workflow)
else:
form_class = NodeForm
form = form_class(data=node_dict)
if form.is_valid():
for field in form.fields:
errors[field] = []
return True
else:
for field in form.fields:
errors[field] = form[field].errors
return False
def _validate_nodes_json(json_nodes, errors, user, workflow):
"""
Validates every node and link in the workflow.
node_type is the node type of the action information passed.
node_dict is a dictionary describing the node.
errors is a dictionary that will be populated with any found errors.
user is a User object that is associated with the node_type. Only needed for Subworkflow node.
workflow is the Workflow object associated with the node. Only needed for Subworkflow node.
Returns Boolean.
"""
assert isinstance(errors, dict), "errors must be a dict."
result = True
for node in json_nodes:
_errors = {}
node_dict = format_dict_field_values(node)
if node['node_type'] in ACTION_TYPES:
node_result = _validate_node_json(node['node_type'], node_dict, _errors, user, workflow)
else:
node_result = True
link_result = _validate_node_links_json(node['node_type'], node_dict['child_links'], _errors)
result = result and node_result and link_result
if 'name' not in node and ( 'node_type' not in node or 'id' not in node ):
raise StructuredException(code="INVALID_REQUEST_ERROR", message=_('Error saving workflow'), data={'errors': 'Node is missing a name.'}, error_code=400)
errors[node.get('name', '%s-%s' % ( node.get('node_type'), node.get('id')))] = _errors
return result
def _update_workflow_nodes_json(workflow, json_nodes, id_map, user):
"""Ideally would get objects from form validation instead."""
nodes = []
for json_node in json_nodes:
node = get_or_create_node(workflow, json_node, save=False)
if node.node_type == 'subworkflow':
try:
node.sub_workflow = Workflow.objects.get(id=int(json_node['sub_workflow']))
except TypeError:
# sub_workflow is None
node.sub_workflow = None
except Workflow.DoesNotExist:
raise StructuredException(code="INVALID_REQUEST_ERROR", message=_('Error saving workflow'), data={'errors': 'Chosen subworkflow does not exist.'}, error_code=400)
elif node.node_type == 'fork' and json_node['node_type'] == 'decision':
node.save() # Need to save in case database throws error when performing delete.
node = node.convert_to_decision()
node.save()
id_map[str(json_node['id'])] = node.id
for key in json_node:
if key == 'data':
if isinstance(json_node[key], basestring):
node.data = json_node[key]
else:
node.data = json.dumps(json_node[key])
elif key not in ('node_ptr', 'child_nodes', 'workflow', 'id', 'sub_workflow'):
setattr(node, key, format_field_value(key, json_node[key]))
node.workflow = workflow
node.save()
# Keep track of nodes in order of received list
# so that we may iterate over them again in the same order
# when we handle links
nodes.append(node)
# Delete unused nodes from workflow
old_nodes = Node.objects.filter(workflow=workflow).exclude(id__in=[x.id for x in nodes])
for node in old_nodes:
node.get_full_node().delete()
return nodes
def _update_workflow_json(json_workflow):
workflow = Workflow.objects.get(id=json_workflow['id'])
for key in json_workflow:
if key == 'data':
if isinstance(json_workflow[key], basestring):
workflow.data = json_workflow[key]
else:
workflow.data = json.dumps(json_workflow[key])
elif key not in ('nodes', 'start', 'end', 'job_ptr', 'owner'):
setattr(workflow, key, json_workflow[key])
workflow.save()
workflow.doc.update(name=workflow.name, description=workflow.description)
return workflow
def _workflow(request, workflow):
response = {'status': -1, 'data': 'None'}
workflow_dict = model_to_dict(workflow)
node_list = [node.get_full_node() for node in workflow.node_list]
nodes = [model_to_dict(node) for node in node_list]
for index in range(0, len(node_list)):
nodes[index]['child_links'] = [model_to_dict(link) for link in node_list[index].get_all_children_links()]
workflow_dict['nodes'] = nodes
response['status'] = 0
response['data'] = workflow_dict
return JsonResponse(response)
@error_handler
@check_job_access_permission(exception_class=(lambda x: StructuredException(code="UNAUTHORIZED_REQUEST_ERROR", message=x, data=None, error_code=401)))
@check_job_edition_permission(exception_class=(lambda x: StructuredException(code="UNAUTHORIZED_REQUEST_ERROR", message=x, data=None, error_code=401)))
def workflow_validate_node(request, workflow, node_type):
response = {'status': -1, 'data': {}}
node_dict = format_dict_field_values(json.loads(request.POST.get('node')))
if _validate_node_json(node_type, node_dict, response['data'], request.user, workflow):
response['status'] = 0
else:
response['status'] = -1
return JsonResponse(response)
# Workflow and child links are SPECIAL.
@error_handler
@check_job_access_permission(exception_class=(lambda x: StructuredException(code="UNAUTHORIZED_REQUEST_ERROR", message=x, data=None, error_code=401)))
@check_job_edition_permission(exception_class=(lambda x: StructuredException(code="UNAUTHORIZED_REQUEST_ERROR", message=x, data=None, error_code=401)))
def workflow_save(request, workflow):
if request.method != 'POST':
raise StructuredException(code="METHOD_NOT_ALLOWED_ERROR", message=_('Must be POST request.'), error_code=405)
json_workflow = format_dict_field_values(json.loads(request.POST.get('workflow')))
json_workflow.setdefault('schema_version', workflow.schema_version)
form = WorkflowForm(data=json_workflow)
if not form.is_valid():
raise StructuredException(code="INVALID_REQUEST_ERROR", message=_('Error saving workflow'), data={'errors': form.errors}, error_code=400)
json_nodes = json_workflow['nodes']
id_map = {}
errors = {}
if not _validate_nodes_json(json_nodes, errors, request.user, workflow):
raise StructuredException(code="INVALID_REQUEST_ERROR", message=_('Error saving workflow'), data={'errors': errors}, error_code=400)
workflow = _update_workflow_json(json_workflow)
nodes = _update_workflow_nodes_json(workflow, json_nodes, id_map, request.user)
# Update links
index = 0
for json_node in json_nodes:
child_links = json_node['child_links']
Link.objects.filter(parent=nodes[index]).delete()
for child_link in child_links:
link = Link()
link.id = getattr(child_link, 'id', None)
link.name = child_link['name']
id = str(child_link['parent'])
link.parent = Node.objects.get(id=id_map[id])
id = str(child_link['child'])
link.child = Node.objects.get(id=id_map[id])
link.comment = child_link.get('comment', '')
link.save()
index += 1
# Make sure workflow HDFS permissions are correct
Workflow.objects.check_workspace(workflow, request.fs)
return _workflow(request, workflow=workflow)
@error_handler
@check_job_access_permission(exception_class=(lambda x: StructuredException(code="UNAUTHORIZED_REQUEST_ERROR", message=x, data=None, error_code=401)))
def workflow(request, workflow):
if request.method != 'GET':
raise StructuredException(code="METHOD_NOT_ALLOWED_ERROR", message=_('Must be GET request.'), error_code=405)
return _workflow(request, workflow)
@error_handler
@check_job_access_permission(exception_class=(lambda x: StructuredException(code="UNAUTHORIZED_REQUEST_ERROR", message=x, data=None, error_code=401)))
def workflow_actions(request, workflow):
if request.method != 'GET':
raise StructuredException(code="METHOD_NOT_ALLOWED_ERROR", message=_('Must be GET request.'), error_code=405)
action_list = [action.get_full_node() for action in workflow.actions]
response = {
'status': 0,
'data': {
'actions': [model_to_dict(action) for action in action_list]
}
}
return JsonResponse(response)
@error_handler
def workflows(request):
if request.method not in ['GET']:
raise StructuredException(code="METHOD_NOT_ALLOWED_ERROR", message=_('Must be GET request.'), error_code=405)
if request.GET.get('managed', 'false').lower() == 'false':
extra='jobsub'
else:
extra=''
workflow_docs = Document.objects.get_docs(request.user, Workflow, extra=extra)
response = {
'status': 0,
'data': {
'workflows': [model_to_dict(workflow.content_object) for workflow in workflow_docs]
}
}
return JsonResponse(response)
def autocomplete_properties(request):
return JsonResponse({ 'properties': _STD_PROPERTIES })
@error_handler
def get_log(request, oozie_workflow, make_links=True, log_start_pattern=None, log_end_pattern=None):
logs = {}
is_really_done = False
for action in oozie_workflow.get_working_actions():
try:
if action.externalId:
data = job_single_logs(request, **{'job': action.externalId})
if data and 'logs' in data:
action_logs = data['logs'][1]
if log_start_pattern:
re_log_start = re.compile(log_start_pattern, re.M | re.DOTALL)
if re_log_start.search(action_logs):
action_logs = re.search(re_log_start, action_logs).group(1).strip()
else:
LOG.debug('Failed to find given start log pattern in logs: %s' % log_start_pattern)
if log_end_pattern:
re_log_end = re.compile(log_end_pattern)
is_really_done = re_log_end.search(action_logs) is not None or oozie_workflow.status == 'KILLED'
if is_really_done and not action_logs:
LOG.warning('Unable to scrape full logs, try increasing the jobbrowser log_offset configuration value.')
if make_links:
action_logs = LinkJobLogs._make_links(action_logs)
logs[action.name] = action_logs
except Exception:
LOG.exception('An error occurred while watching the job running')
is_really_done = True
workflow_actions = _get_workflow_actions(oozie_workflow, logs, is_really_done)
return logs, workflow_actions, is_really_done
def _get_workflow_actions(oozie_workflow, logs, is_really_done=False):
workflow_actions = []
# Return metadata for workflow actions (required for Pig)
for action in oozie_workflow.get_working_actions():
progress = _get_progress(oozie_workflow, logs.get(action.name, ''))
appendable = {
'name': action.name,
'status': action.status,
'logs': logs.get(action.name, ''),
'isReallyDone': is_really_done,
'progress': progress,
'progressPercent': '%d%%' % progress,
'absoluteUrl': oozie_workflow.get_absolute_url(),
}
workflow_actions.append(appendable)
return workflow_actions
def _get_progress(job, log):
if job.status in ('SUCCEEDED', 'KILLED', 'FAILED'):
return 100
else:
try:
return int(re.findall("MapReduceLauncher - (1?\d?\d)% complete", log)[-1])
except:
return 0
|
BadWaka/waka-website
|
typescript-study/3-interface.js
|
<reponame>BadWaka/waka-website
// // // // /**
// // // // * 接口
// // // // */
// // // // // function printLabel(labelledObj: {
// // // // // label: string
// // // // // }) {
// // // // // console.log(labelledObj.label);
// // // // // }
// // // // //
// // // // // let myObj = {
// // // // // size: 10,
// // // // // label: 'Size 10 Object'
// // // // // };
// // // // // printLabel(myObj);
// // // //
// // // // interface LabelledValue {
// // // // label: string;
// // // // }
// // // //
// // // // function printLabel(labelledObj: LabelledValue) {
// // // // console.log(labelledObj.label);
// // // // }
// // // //
// // // // let myObj = {
// // // // size: 10,
// // // // label: 'Size 10 Object'
// // // // };
// // // // printLabel(myObj);
// // // //
// // // // // 可选属性
// // // // interface SquareConfig {
// // // // color?: string,
// // // // width?: number
// // // // }
// // // //
// // // // function createSquare(config: SquareConfig): { color: string; area: number } {
// // // // let newSquare = {color: 'white', area: 100};
// // // // if (config.color) {
// // // // newSquare.color = config.color;
// // // // }
// // // // if (config.width) {
// // // // newSquare.area = config.width * config.width;
// // // // }
// // // // return newSquare;
// // // // }
// // // //
// // // // let mySquare = createSquare({
// // // // color: 'black'
// // // // });
// // // //
// // // // // 只读属性
// // // // interface Point {
// // // // readonly x: number;
// // // // readonly y: number;
// // // // }
// // // //
// // // // let p1: Point = {
// // // // x: 10,
// // // // y: 20
// // // // };
// // // // // p1.x = 5;
// // // //
// // // // let a: number[] = [1, 2, 3, 4];
// // // // // let ro: ReadonlyArray<number> = a;
// // // // // ro[0] = 12;
// // // //
// // //
// // // interface SquareConfig {
// // // color?: string;
// // // width?: number;
// // // [propName: string]: any // 最佳修改方式是添加一个字符串索引签名
// // // }
// // //
// // // function createSquare(config: SquareConfig): { color: string; area: number } {
// // // let newSquare = {color: 'white', area: 100};
// // // if (config.color) {
// // // newSquare.color = config.color;
// // // }
// // // if (config.width) {
// // // newSquare.area = config.width * config.width;
// // // }
// // // return newSquare;
// // // }
// // //
// // // // 使用类型断言绕过额外属性检查
// // // let mySquare = createSquare({
// // // colour: 'red',
// // // width: 100
// // // } as SquareConfig);
// //
// // // 函数类型
// // interface SearchFunc {
// // (source: string, subString: string): boolean;
// // }
// //
// // let mySearch: SearchFunc;
// // // mySearch = function (source: string, subString: string) {
// // // let result = source.search(subString);
// // // if (result === -1) {
// // // return true;
// // // } else {
// // // return false;
// // // }
// // // };
// //
// // mySearch = function (src, sub) {
// // let result = src.search(sub);
// // if (result === -1) {
// // return false;
// // } else {
// // return true;
// // }
// // };
// //
//
// // 可索引的数据类型
// interface StringArray {
// [index: number]: string;
// }
//
// let myArray: StringArray;
// myArray = ['Bob', 'Fred'];
//
// let myStr: string = myArray[0];
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
// 索引类型的字符串和数字的返回值的类型必须一致
var Animal = (function () {
function Animal() {
}
return Animal;
}());
var Dog = (function (_super) {
__extends(Dog, _super);
function Dog() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Dog;
}(Animal));
|
alexhenrie/owltools
|
OWLTools-Core/src/main/java/owltools/frame/jsonld/NaryBooleanClassExpressionLD.java
|
<filename>OWLTools-Core/src/main/java/owltools/frame/jsonld/NaryBooleanClassExpressionLD.java
package owltools.frame.jsonld;
import owltools.frame.NaryBooleanClassExpression;
public class NaryBooleanClassExpressionLD extends ClassExpressionLD implements NaryBooleanClassExpression {
}
|
ankushptl22/pegasus
|
client/src/containers/LoginPage/Emailsend.js
|
<filename>client/src/containers/LoginPage/Emailsend.js
import React, { Component } from "react";
import { Grid ,Header,Icon,Button} from "semantic-ui-react";
import { Link } from 'react-router-dom';
import LoginLeft from "./LoginLeft";
import loginJson from "../../json/LoginLeft.json";
class Emailsend extends Component {
constructor(props) {
super(props);
/**
* Temporary state
* to check, UI is working or not
*/
this.state = {
// info:this.props.loginleftProp
// text:"For assistace"
};
}
render() {
return (
<Grid columns={2} divided>
<Grid.Column>
<LoginLeft loginleftProp={loginJson} />
</Grid.Column>
<Grid.Column textAlign="center" verticalAlign="middle">
<Header icon>
<Icon name='thumbs up' />Email Sent to the Given Address .
<p>Please Check your Inbox</p>
</Header>
<Grid.Row>
<Button basic as={Link} to="/login">Banck to Login </Button>
</Grid.Row>
</Grid.Column>
</Grid>
);
}
}
export default Emailsend;
|
LucidSigma/Daily-Coding-Problems
|
Days 081 - 090/Day 85/GetXOrYFromB.cpp
|
#include <iostream>
#include <type_traits>
template <int B, typename = std::enable_if_t<(B == 0) || (B == 1)>>
constexpr int GetXOrYFromB(int x, int y) noexcept
{
return x * B + y * (1 - B);
}
int main(int argc, char* argv[])
{
std::cout << GetXOrYFromB<0>(16, 32) << "\n";
std::cout << GetXOrYFromB<1>(16, 32) << "\n";
std::cout << GetXOrYFromB<0>(10, 40) << "\n";
std::cout << GetXOrYFromB<1>(10, 40) << "\n";
std::cout << GetXOrYFromB<0>(-27, 81) << "\n";
std::cout << GetXOrYFromB<1>(-27, 81) << "\n";
std::cin.get();
return 0;
}
|
shaojiankui/iOS10-Runtime-Headers
|
Frameworks/UserNotifications.framework/UNNotificationResponse.h
|
/* Generated by RuntimeBrowser
Image: /System/Library/Frameworks/UserNotifications.framework/UserNotifications
*/
@interface UNNotificationResponse : NSObject <NSCopying, NSSecureCoding> {
NSString * _actionIdentifier;
unsigned long long _actionOptions;
UNNotification * _notification;
}
@property (nonatomic, readonly, copy) NSString *actionIdentifier;
@property (nonatomic, readonly) unsigned long long actionOptions;
@property (nonatomic, readonly, copy) UNNotification *notification;
+ (id)responseWithNotification:(id)arg1 actionIdentifier:(id)arg2;
+ (id)responseWithNotification:(id)arg1 actionIdentifier:(id)arg2 actionOptions:(unsigned long long)arg3;
+ (bool)supportsSecureCoding;
- (void).cxx_destruct;
- (id)_initWithNotification:(id)arg1 actionIdentifier:(id)arg2 actionOptions:(unsigned long long)arg3;
- (id)actionIdentifier;
- (unsigned long long)actionOptions;
- (id)copyWithZone:(struct _NSZone { }*)arg1;
- (id)description;
- (void)encodeWithCoder:(id)arg1;
- (unsigned long long)hash;
- (id)initWithCoder:(id)arg1;
- (id)initWithNotification:(id)arg1 actionIdentifier:(id)arg2;
- (bool)isEqual:(id)arg1;
- (id)notification;
@end
|
PseudoCowboy/lose-love-algorithm
|
2021/04/11/66PlusOne/main.go
|
<reponame>PseudoCowboy/lose-love-algorithm<gh_stars>1-10
package main
import "fmt"
func main() {
a := []int{1, 2, 3, 4}
a = append([]int{0}, a...)
fmt.Println(a)
}
func plusOne(digits []int) []int {
extendFlag := false
index := 0
for len(digits)-1-index >= 0 {
if digits[len(digits)-1-index]+1 > 9 {
digits[len(digits)-1-index] = 0
} else {
digits[len(digits)-1-index] = digits[len(digits)-1-index] + 1
break
}
if len(digits)-1-index == 0 {
extendFlag = true
}
index++
}
if extendFlag == true {
digits = append([]int{1}, digits...)
}
return digits
}
|
mcgyver5/mngoat
|
src/pictures/PicturesServlet.java
|
package pictures;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.sanselan.Sanselan;
import org.apache.sanselan.common.IImageMetadata;
import org.apache.sanselan.formats.jpeg.JpegImageMetadata;
import org.apache.sanselan.formats.tiff.TiffField;
import org.apache.sanselan.formats.tiff.constants.ExifTagConstants;
@WebServlet("/PicturesServlet")
public class PicturesServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public PicturesServlet() {
super();
}
/**
* expects jpg file
* @param file
* @return String containing make of camera used to take jpg.
*/
private Map cameraMake(File file){
TiffField make = null;
HashMap<String,String> metaDataMap = new HashMap<>();
try {
IImageMetadata metadata = Sanselan.getMetadata(file);
if(metadata != null){
for(Object x : metadata.getItems()){
String xString = x.toString();
String[] arr = xString.split(": ");
// make, model, time, location, Software
if(arr[0].contains("Software") ||
arr[0].toUpperCase().equals("MODEL") ||
arr[0].toUpperCase().equals("MAKE") ||
arr[0].toUpperCase().contains("CREATE DATE")){
metaDataMap.put(arr[0], arr[1]);
}
}
if (metadata instanceof JpegImageMetadata) {
make = ((JpegImageMetadata) metadata).findEXIFValue(ExifTagConstants.EXIF_TAG_MAKE);
((JpegImageMetadata) metadata).dump();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return metaDataMap;
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
File filesDir = (File) getServletContext().getAttribute("FILES_DIR_FILE");
File[] files = filesDir.listFiles();
String fileName = "";
ArrayList<ImageDataObj> imageList = new ArrayList<>();
for (File f : files){
fileName = f.getName();
if(fileName.toUpperCase().endsWith(".JPG") || fileName.toUpperCase().endsWith(".PNG")){
Map metaDataMap = this.cameraMake(f);
ImageDataObj ido = new ImageDataObj(f,metaDataMap);
imageList.add(ido);
}
}
request.setAttribute("filesDir", filesDir.getAbsolutePath());
request.setAttribute("fileList",imageList);
RequestDispatcher dispatcher = request.getServletContext()
.getRequestDispatcher("/imageView.jsp");
dispatcher.forward(request, response);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
|
wrhb123/cloudpods
|
cmd/climc/promputils/option_arguments.go
|
<filename>cmd/climc/promputils/option_arguments.go<gh_stars>100-1000
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package promputils
import (
"io/ioutil"
"log"
"path/filepath"
"strings"
prompt "github.com/c-bata/go-prompt"
)
func init() {
fileListCache = map[string][]prompt.Suggest{}
}
func getPreviousOption(d prompt.Document) (cmd, option string, found bool) {
args := strings.Split(d.TextBeforeCursor(), " ")
l := len(args)
if l >= 2 {
option = args[l-2]
}
if strings.HasPrefix(option, "-") {
return args[0], option, true
}
return "", "", false
}
func completeOptionArguments(d prompt.Document) ([]prompt.Suggest, bool) {
cmd, option, found := getPreviousOption(d)
if !found {
return []prompt.Suggest{}, false
}
switch cmd {
case "server-attach-disk", "describe", "create", "delete", "replace", "patch",
"edit", "apply", "expose", "rolling-update", "rollout",
"label", "annotate", "scale", "convert", "autoscale":
switch option {
case "-f", "--filename":
return fileCompleter(d), true
}
}
return []prompt.Suggest{}, false
}
/* file list */
var fileListCache map[string][]prompt.Suggest
func fileCompleter(d prompt.Document) []prompt.Suggest {
path := d.GetWordBeforeCursor()
if strings.HasPrefix(path, "./") {
path = path[2:]
}
dir := filepath.Dir(path)
if cached, ok := fileListCache[dir]; ok {
return cached
}
files, err := ioutil.ReadDir(dir)
if err != nil {
log.Print("[ERROR] catch error " + err.Error())
return []prompt.Suggest{}
}
suggests := make([]prompt.Suggest, 0, len(files))
for _, f := range files {
if !f.IsDir() &&
!strings.HasSuffix(f.Name(), ".yml") &&
!strings.HasSuffix(f.Name(), ".yaml") {
continue
}
suggests = append(suggests, prompt.Suggest{Text: filepath.Join(dir, f.Name())})
}
return prompt.FilterHasPrefix(suggests, path, false)
}
|
LaudateCorpus1/hivemind-4
|
src/spawn-role.dismantler.js
|
'use strict';
/* global MOVE WORK */
const SpawnRole = require('./spawn-role');
module.exports = class DismantlerSpawnRole extends SpawnRole {
/**
* Adds dismantler spawn options for the given room.
*
* @param {Room} room
* The room to add spawn options for.
* @param {Object[]} options
* A list of spawn options to add to.
*/
getSpawnOptions(room, options) {
this.addManualDismantlers(room, options);
this.addRoomPlannerDismantlers(room, options);
this.addOperationDismantlers(room, options);
}
/**
* Adds dismantler spawn options for explicit orders.
*
* @param {Room} room
* The room to add spawn options for.
* @param {Object[]} options
* A list of spawn options to add to.
*/
addManualDismantlers(room, options) {
// @todo Move from flag based to something the AI can control.
const flags = _.filter(Game.flags, flag => flag.name.startsWith('Dismantle:' + room.name));
if (flags.length === 0) return;
// @todo Check if there is enough dismantlers per room with flags in it.
const flag = flags[0];
const numDismantlers = _.filter(Game.creepsByRole.dismantler || [], creep => creep.memory.targetRoom === flag.pos.roomName && creep.memory.sourceRoom === room.name).length;
if (numDismantlers < flags.length) {
options.push({
priority: 4,
weight: 0,
targetRoom: flag.pos.roomName,
});
}
}
/**
* Adds dismantler spawn options for room planner.
*
* @param {Room} room
* The room to add spawn options for.
* @param {Object[]} options
* A list of spawn options to add to.
*/
addRoomPlannerDismantlers(room, options) {
if (room.isEvacuating()) return;
if (!room.roomManager.needsDismantling()) return;
const numDismantlers = _.filter(room.creepsByRole.dismantler || [], creep => creep.memory.targetRoom === room.name && creep.memory.sourceRoom === room.name).length;
if (numDismantlers > 0) return;
options.push({
priority: 3,
weight: 0,
targetRoom: room.name,
});
}
/**
* Adds dismantler spawn options for (remote mine) operations.
*
* @param {Room} room
* The room to add spawn options for.
* @param {Object[]} options
* A list of spawn options to add to.
*/
addOperationDismantlers(room, options) {
const operations = _.filter(Game.operationsByType.mining, o => o.needsDismantler());
_.each(operations, operation => {
const locations = operation.getMiningLocationsByRoom()[room.name];
if (!locations || locations.length === 0) return;
for (const sourceLocation of locations) {
if (!operation.needsDismantler(sourceLocation)) continue;
const numDismantlers = _.filter(Game.creepsByRole.dismantler || [], creep => creep.memory.source === sourceLocation).length;
if (numDismantlers > 0) continue;
options.push({
priority: 3,
weight: 0,
operation: operation.name,
source: sourceLocation,
});
}
});
}
/**
* Gets the body of a creep to be spawned.
*
* @param {Room} room
* The room to add spawn options for.
* @param {Object} option
* The spawn option for which to generate the body.
*
* @return {string[]}
* A list of body parts the new creep should consist of.
*/
getCreepBody(room) {
return this.generateCreepBodyFromWeights(
{[MOVE]: 0.35, [WORK]: 0.65},
Math.max(room.energyCapacityAvailable * 0.9, room.energyAvailable)
);
}
/**
* Gets memory for a new creep.
*
* @param {Room} room
* The room to add spawn options for.
* @param {Object} option
* The spawn option for which to generate the body.
*
* @return {Object}
* The boost compound to use keyed by body part type.
*/
getCreepMemory(room, option) {
if (option.operation) {
return {
operation: option.operation,
source: option.source,
};
}
return {
sourceRoom: room.name,
targetRoom: option.targetRoom,
operation: 'room:' + room.name,
};
}
/**
* Gets which boosts to use on a new creep.
*
* @param {Room} room
* The room to add spawn options for.
* @param {Object} option
* The spawn option for which to generate the body.
* @param {string[]} body
* The body generated for this creep.
*
* @return {Object}
* The boost compound to use keyed by body part type.
*/
getCreepBoosts(room, option, body) {
return this.generateCreepBoosts(room, body, WORK, 'dismantle');
}
};
|
VerseApp/ssb
|
plugins/rawread/rxlog.go
|
// SPDX-FileCopyrightText: 2021 The Go-SSB Authors
//
// SPDX-License-Identifier: MIT
package rawread
import (
"context"
"encoding/json"
"fmt"
"os"
"go.cryptoscope.co/luigi"
"go.cryptoscope.co/margaret"
"go.cryptoscope.co/muxrpc/v2"
"go.cryptoscope.co/ssb"
"go.cryptoscope.co/ssb/internal/transform"
"go.cryptoscope.co/ssb/message"
)
// ~> sbot createLogStream --help
// (log) Fetch messages ordered by the time received.
// log [--live] [--gt index] [--gte index] [--lt index] [--lte index] [--reverse] [--keys] [--values] [--limit n]
type rxLogPlug struct {
h muxrpc.Handler
}
func NewRXLog(rootLog margaret.Log) ssb.Plugin {
plug := &rxLogPlug{}
plug.h = rxLogHandler{
root: rootLog,
}
return plug
}
func (lt rxLogPlug) Name() string { return "createLogStream" }
func (rxLogPlug) Method() muxrpc.Method {
return muxrpc.Method{"createLogStream"}
}
func (lt rxLogPlug) Handler() muxrpc.Handler {
return lt.h
}
type rxLogHandler struct {
root margaret.Log
}
func (rxLogHandler) Handled(m muxrpc.Method) bool { return m.String() == "createLogStream" }
func (g rxLogHandler) HandleConnect(ctx context.Context, e muxrpc.Endpoint) {}
func (g rxLogHandler) HandleCall(ctx context.Context, req *muxrpc.Request) {
// fmt.Fprintln(os.Stderr, "createLogStream args:", string(req.RawArgs))
var qry message.CreateLogArgs
var args []message.CreateLogArgs
err := json.Unmarshal(req.RawArgs, &args)
if err != nil {
fmt.Fprintln(os.Stderr, "createLogStream err:", err)
req.CloseWithError(fmt.Errorf("bad request data: %w", err))
return
}
if len(args) == 1 {
qry = args[0]
} else {
// Defaults for no arguments
qry.Keys = true
qry.Limit = -1
}
// empty query doesn't make much sense...
if qry.Limit == 0 {
qry.Limit = -1
}
// only return message keys
// qry.Values = true
if qry.Gt == -1 {
qry.Seq = int64(g.root.Seq()) - 1
}
// start := time.Now()
src, err := g.root.Query(
margaret.SeqWrap(false),
margaret.Gte(int64(qry.Seq)),
margaret.Limit(int(qry.Limit)),
margaret.Live(qry.Live),
margaret.Reverse(qry.Reverse),
)
if err != nil {
req.CloseWithError(fmt.Errorf("logStream: failed to qry tipe: %w", err))
return
}
snk, err := req.ResponseSink()
if err != nil {
req.CloseWithError(err)
return
}
err = luigi.Pump(ctx, transform.NewKeyValueWrapper(snk, qry.Keys), src)
if err != nil {
fmt.Fprintln(os.Stderr, "createLogStream err:", err)
req.CloseWithError(fmt.Errorf("logStream: failed to pump msgs: %w", err))
return
}
snk.Close()
// fmt.Fprintln(os.Stderr, "createLogStream closed:", err, "after:", time.Since(start))
}
|
HySynth/HySynth
|
hysynth/pwl/smt_encoding/pwl_to_smt.py
|
def positive_number_to_smt(number):
"""
Print a floating-point number in decimal notation (i.e., prevent scientific notation).
This code is taken from https://stackoverflow.com/a/45604186.
:param number: floating-point number
:return: string in decimal notation
"""
number_as_two_strings = str(number).split('e')
if len(number_as_two_strings) == 1:
# no scientific notation needed
return number_as_two_strings[0]
base = float(number_as_two_strings[0])
exponent = int(number_as_two_strings[1])
result = ''
if int(exponent) > 0:
result += str(base).replace('.', '')
result += ''.join(['0' for _ in range(0, abs(exponent - len(str(base).split('.')[1])))])
elif int(exponent) < 0:
result += '0.'
result += ''.join(['0' for _ in range(0, abs(exponent) - 1)])
result += str(base).replace('.', '')
return result
def number_to_smt(x):
if x >= 0:
return '{0}'.format(positive_number_to_smt(x))
else:
return '(- {0})'.format(positive_number_to_smt(abs(x)))
def declare_const(name):
return '(declare-const {0} Real)\n'.format(name)
def constraint_switch_definition(i, j, t, fi):
return '(assert (= x_f{2}_p{1}_d{0} (+ x_f{2}_p{3}_d{0} (* {4} b_f{2}_p{1}_d{0}))))\n'.format(i, j, fi, j-1, t)
def constraint_switch_epsilon_close(i, j, old_value, epsilon, fi):
return '(assert (<= {3} x_f{2}_p{1}_d{0} {4}))\n'.format(
i, j, fi, number_to_smt(old_value - epsilon), number_to_smt(old_value + epsilon))
def constraint_slope_choice(j, dimension, number_slopes, existing_slopes, fi):
string = '(assert (or '
for k in range(1, number_slopes + 1):
if k > 1:
string += ' '
string += '(and '
for i in range(1, dimension + 1):
string += '(= b_f{2}_p{1}_d{0} a_k{3}_d{0}) '.format(i, j, fi, k)
string += ')\n'
print_spaces = number_slopes > 0
for slope in existing_slopes:
if print_spaces:
string += ' '
else:
print_spaces = True
string += '(and '
for i in range(1, dimension + 1):
string += '(= b_f{2}_p{1}_d{0} {3}) '.format(i, j, fi, number_to_smt(slope[i - 1]))
string += ')\n'
string += '))\n'
return string
def pwl_function_to_smt(functions, epsilon, number_slopes, existing_slopes=[]):
"""
Create an SMT-LIB string that encodes the synthesis of a PWL function that
is 'epsilon'-close to 'f' and has at most 'number_slopes' many slopes (in
addition to those in 'existing_slopes')
:param functions: list of PWL functions
:param epsilon: error value
:param number_slopes: maximum number of slopes
:param existing_slopes: (optional) list of existing slopes (not included in the 'number_slopes' count)
:return: an SMT-LIB compliant string
"""
string = ''
# preliminaries
string += '(set-option :print-success false)\n'
string += '(set-option :produce-models true)\n'
string += '(set-logic QF_LRA)\n'
string += '\n'
dimension = len(functions[0][0]) - 1
# declare variables
for i in range(1, dimension + 1):
# declare target slopes
for j in range(1, number_slopes + 1):
string += declare_const('a_k{1}_d{0}'.format(i, j))
fi = 0
for f in functions:
m = len(f) - 1
fi += 1
# declare new switching points
for j in range(m + 1):
for i in range(1, dimension + 1):
string += declare_const('x_f{2}_p{1}_d{0}'.format(i, j, fi))
# declare new switching points
for j in range(1, m + 1):
for i in range(1, dimension + 1):
string += declare_const('b_f{2}_p{1}_d{0}'.format(i, j, fi))
string += '\n'
fi = 0
for f in functions:
m = len(f) - 1
fi += 1
# value constraints for new switching points
t0 = f[0][0]
for j in range(1, m + 1):
t1 = f[j][0]
t = t1 - t0
for i in range(1, dimension + 1):
string += constraint_switch_definition(i=i, j=j, t=t, fi=fi)
t0 = t1
# epsilon constraints for each switching point
for j in range(0, m + 1):
old_point = f[j]
for i in range(1, dimension + 1):
string += constraint_switch_epsilon_close(i=i, j=j, old_value=old_point[i], epsilon=epsilon, fi=fi)
# slope-choice constraints
for j in range(1, m + 1):
string += constraint_slope_choice(j=j, dimension=dimension, number_slopes=number_slopes,
existing_slopes=existing_slopes, fi=fi)
# check-sat command
string += '(check-sat)\n'
# get values of interesting variables (slopes and slope orders)
string += '(get-value ('
for j in range(1, number_slopes + 1):
for i in range(1, dimension + 1):
string += 'a_k{1}_d{0} '.format(i, j)
fi = 0
for f in functions:
m = len(f) - 1
fi += 1
for j in range(1, m + 1):
for i in range(1, dimension + 1):
string += 'b_f{2}_p{1}_d{0} '.format(i, j, fi)
fi = 0
for f in functions:
m = len(f) - 1
fi += 1
for j in range(0, m + 1):
for i in range(1, dimension + 1):
string += 'x_f{2}_p{1}_d{0} '.format(i, j, fi)
string += '))\n'
return string
|
BroadleafCommerce/ReactStarter
|
site/app/checkout/components/PaymentMethods/PaymentMethods.js
|
<gh_stars>10-100
/*
* #%L
* React Site Starter
* %%
* Copyright (C) 2009 - 2017 Broadleaf Commerce
* %%
* Broadleaf Commerce React Starter
*
* Written in 2017 by Broadleaf Commerce <EMAIL>
*
* To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
* You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*
* Please Note - The scope of CC0 Public Domain Dedication extends to Broadleaf Commerce React Starter demo application alone. Linked libraries (including all Broadleaf Commerce Framework libraries) are subject to their respective licenses, including the requirements and restrictions specified therein.
* #L%
*/
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { resolve } from 'core/decorator/reduxResolve'
import { fetchCustomerPayments } from 'account/actions'
import { clearPaymentData, removeExistingPayment, saveBillingAddressForNewPayment, saveNewCustomerPaymentForOrder, selectExistingCustomerPaymentForOrder, storePaymentData } from 'checkout/actions'
import { isAnonymous } from 'auth/selectors'
import SamplePaymentService from 'checkout/service/SamplePaymentService'
import { FormattedMessage } from 'react-intl'
import CreditCardMethodForm from './CreditCardMethodForm'
import SavedPaymentCards from './SavedPaymentCards'
import Button from 'material-kit/components/Button'
import classNames from 'classnames'
import find from 'lodash/find'
import isEmpty from 'lodash/isEmpty'
import './PaymentMethods.scss'
class PaymentMethods extends Component {
constructor(props) {
super(props)
this.state = {
paymentMethodType: SamplePaymentService.Type.CreditCard,
selectedPaymentId: undefined,
// we should show saved payments by default based on these conditions
showSavedPayments: false
}
}
_setStateFromProps = props => {
const { customerPayments, storedPayment } = props
const hasSavedPayments = !isEmpty(customerPayments)
const currentlyUsedPayment = find(customerPayments, { usedByCurrentCart: true })
this.setState({
selectedPaymentId: this.state.selectedPaymentId || currentlyUsedPayment && currentlyUsedPayment.id,
showSavedPayments: isEmpty(storedPayment) && (currentlyUsedPayment || hasSavedPayments)
})
}
componentWillReceiveProps(nextProps) {
this._setStateFromProps(nextProps)
}
_onSelectMethodType = paymentMethodType => this.setState({ paymentMethodType })
_toggleSavedPayments = showSavedPayments => {
this.setState({
showSavedPayments: showSavedPayments === undefined ? !this.state.showSavedPayments : showSavedPayments
})
}
_onSelectCustomerPayment = selectedPaymentId => {
this.setState({
selectedPaymentId
})
}
_onSubmitCreditCardForm = form => {
const { address, shouldSaveNewPayment } = form
const creditCardPaymentData = {
...form.creditCard,
creditCardName: `${address.firstName} ${address.lastName}`
}
if (shouldSaveNewPayment) {
SamplePaymentService.tokenizeCard(creditCardPaymentData)
.then(nonce => {
this.props.saveNewCustomerPaymentForOrder(address, nonce)
.then(action => {
if (!action.payload.error) {
return this.props.fetchCustomerPayments()
}
})
.then(action => {
if (!action.payload.error) {
this.props.clearPaymentData()
return this.props.afterSubmit(SamplePaymentService.Type.CreditCard)
}
})
})
} else {
this.props.storePaymentData(creditCardPaymentData)
// save the billing address only
this.props.saveBillingAddressForNewPayment(address)
.then(action => {
// if there wasn't an error and the user is non anonymous, fetch customer payments
if (!action.payload.error && !this.props.anonymous) {
return this.props.fetchCustomerPayments()
}
return action
})
.then(action => {
if (!action.payload.error) {
return this.props.afterSubmit(SamplePaymentService.Type.CreditCard)
}
})
}
}
_onSubmitSavedPayment = () => {
const { selectedPaymentId } = this.state
if (selectedPaymentId) {
this.props.selectExistingCustomerPaymentForOrder(selectedPaymentId)
.then(action => {
if (!action.payload.error) {
return this.props.fetchCustomerPayments()
}
})
.then(action => {
if (!action.payload.error) {
this.props.clearPaymentData()
return this.props.afterSubmit(SamplePaymentService.Type.CreditCard)
}
})
}
}
_onSubmitCollectOnDelivery = () => {
this.props.afterSubmit(SamplePaymentService.Type.CollectOnDelivery)
}
render() {
const { paymentMethodType, showSavedPayments } = this.state
return (
<div styleName='PaymentMethods' style={{ display: !this.props.active ? 'none' : 'block' }}>
<div styleName='PaymentMethods__selectors'>
<div className='nav-align-center'>
<ul className='nav nav-pills nav-pills-primary nav-pills-icons text-center'>
<PaymentMethods.TypePill
active={paymentMethodType === SamplePaymentService.Type.CreditCard}
defaultMessage='Credit Card'
icon='credit_card'
message='checkout.paymentMethod.creditCard'
onSelect={this._onSelectMethodType}
type={SamplePaymentService.Type.CreditCard}
/>
<PaymentMethods.TypePill
active={paymentMethodType === SamplePaymentService.Type.PayPal}
defaultMessage='PayPal'
message='checkout.paymentMethod.payPal'
onSelect={this._onSelectMethodType}
type={SamplePaymentService.Type.PayPal}
/>
<PaymentMethods.TypePill
active={paymentMethodType === SamplePaymentService.Type.CollectOnDelivery}
defaultMessage='Collect On Delivery'
icon='local_shipping'
message='checkout.paymentMethod.cod'
onSelect={this._onSelectMethodType}
type={SamplePaymentService.Type.CollectOnDelivery}
/>
</ul>
</div>
</div>
<div className='payment-method-content'>
<div className='payment_info js-paymentInfoForm'>
<div className='tab-content'>
<PaymentMethods.TypePane
active={paymentMethodType === SamplePaymentService.Type.CreditCard}
type={SamplePaymentService.Type.CreditCard}>
{showSavedPayments ? (
<SavedPaymentCards
customerPayments={this.props.customerPayments}
selectedPaymentId={this.state.selectedPaymentId}
onSelectCustomerPayment={this._onSelectCustomerPayment}
onSubmitSavedPayment={this._onSubmitSavedPayment}
toggleSavedPayments={this._toggleSavedPayments}
/>
) : (
<CreditCardMethodForm toggleSavedPayments={this._toggleSavedPayments} onSubmit={this._onSubmitCreditCardForm}/>
)}
</PaymentMethods.TypePane>
<PaymentMethods.TypePane
active={paymentMethodType === SamplePaymentService.Type.PayPal}
type={SamplePaymentService.Type.PayPal}>
</PaymentMethods.TypePane>
<PaymentMethods.TypePane
active={paymentMethodType === SamplePaymentService.Type.CollectOnDelivery}
type={SamplePaymentService.Type.CollectOnDelivery}>
<div>
<p>Payment will be collected upon item's delivery.</p>
<Button className='pull-right' primary type='submit' onClick={this._onSubmitCollectOnDelivery}>
Continue <i className='material-icons'>keyboard_arrow_right</i>
</Button>
</div>
</PaymentMethods.TypePane>
</div>
</div>
</div>
</div>
)
}
}
PaymentMethods.TypePill = ({
active,
defaultMessage,
icon,
message,
onSelect,
type,
}) => (
<li className={classNames({
'center-pill': true,
'active': active
})}
styleName='TypePill'
onClick={e => {
e.preventDefault()
onSelect(type)
}}>
<FormattedMessage defaultMessage={defaultMessage} id={message}>
{formattedMessage => (
<a href={`#${type}`}><i className='material-icons'>{icon}</i>{formattedMessage}</a>
)}
</FormattedMessage>
</li>
)
PaymentMethods.TypePane = ({
active,
children,
type
}) => (
<div
id={type}
className={classNames({
'tab-pane': true,
'active': active
})}>
{children}
</div>
)
const mapStateToProps = (state) => {
return {
anonymous: isAnonymous(state),
customerPayments: state.customerPayments.customerPayments,
storedPayment: state.storedPayment
}
}
const dispatchResolve = (resolver, props) => {
if (!props.anonymous) {
resolver.resolve(props.fetchCustomerPayments)
}
}
export default connect(mapStateToProps, { clearPaymentData, fetchCustomerPayments, removeExistingPayment, saveBillingAddressForNewPayment, saveNewCustomerPaymentForOrder, selectExistingCustomerPaymentForOrder, storePaymentData })(
resolve(dispatchResolve)(PaymentMethods)
)
export const ReadOnlyPaymentMethods = () => (
<div>
Read Only Payment Methods
</div>
)
|
auto1-oss/kapacitor
|
pipeline/tick/combine_test.go
|
package tick_test
import (
"testing"
"time"
"github.com/influxdata/kapacitor/tick/ast"
)
func TestCombine(t *testing.T) {
pipe, _, from := StreamFrom()
combine := from.Combine(&ast.LambdaNode{
Expression: &ast.BinaryNode{
Operator: ast.TokenAnd,
Left: &ast.BinaryNode{
Left: &ast.ReferenceNode{
Reference: "cpu",
},
Right: &ast.StringNode{
Literal: "cpu-total",
},
Operator: ast.TokenNotEqual,
},
Right: &ast.BinaryNode{
Left: &ast.ReferenceNode{
Reference: "host",
},
Right: &ast.RegexNode{
Literal: `logger\d+`,
},
Operator: ast.TokenRegexEqual,
},
},
})
combine.As("pumpkin")
combine.Delimiter = "cup"
combine.Tolerance = time.Hour + 10*time.Minute
combine.Max = 1
want := `stream
|from()
|combine(lambda: "cpu" != 'cpu-total' AND "host" =~ /logger\d+/)
.as('pumpkin')
.delimiter('cup')
.tolerance(70m)
.max(1)
`
PipelineTickTestHelper(t, pipe, want)
}
|
Nocturnals/SOAD-Project
|
Backend/routes/competitions/utils.js
|
<filename>Backend/routes/competitions/utils.js
const express = require("express");
const { verifyToken, verifyUserWithToken } = require("./../auth/helper");
const CompetitionsModel = require("./../../models/Competititons");
const { faqModel, resultsModel } = require("./../../models/Competititons");
const { OtheruserModel } = require("../../models/Otheruser");
const { ReplyModel, CommentsModel } = require("../../models/Comments");
const UserModel = require("./../../models/user");
const { UpdateCompetition } = require("./helper");
const {
CompRegisterValidation,
CompCreateValidation,
deleteValidation,
editValidation,
hostValidation,
resultValidation,
editcategoryValidation,
editendtimeValidation,
editfulldescriptionValidation,
editprizeValidation,
editrulesValidation,
editshortdescriptionValidation,
editstarttimeValidation,
edittitleValidation,
editfaqValidation,
editresultsValidation,
addcommentValidation,
editcommentValidation,
commentlikeValidation,
commentreplyValidation
} = require("./compValidation");
const router = express.Router();
router.get("/allcompetitions", async (req, res) => {
try {
const titles = await CompetitionsModel.find().select(
"title , shortdescription"
);
console.log(titles);
return res.status(200).json(titles);
} catch (error) {
console.log(error);
return res.status(500).json({ message: "internal server error" });
}
});
router.post(
"/register",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
const validatedData = CompRegisterValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
const comp = await CompetitionsModel.findById(req.body._id);
comp.participants[comp.noofparticipants] = {
_id: req.loggedUser._id,
username: req.loggedUser.name,
profileurl: req.loggedUser.profileurl
};
comp.noofparticipants = comp.noofparticipants + 1;
comp.save();
console.log(comp.noofparticipants);
return res.json({ message: "sucessfully registered" });
} catch (error) {
console.log(error);
return res.status(500).json({ message: "Competition not found" });
}
}
);
router.post(
"/createcompetition",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
const validatedData = CompCreateValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
user = req.loggedUser;
console.log(user);
const comp = new CompetitionsModel({
title: req.body.title,
shortdescription: req.body.shortdescription,
fulldescription: req.body.fulldescription,
starttime: req.body.starttime,
endtime: req.body.endtime,
hosts: [
{
_id: user._id,
username: user.name,
profileurl: user.profileurl || "random string"
}
],
category: req.body.category,
prize: req.body.prize,
rules: req.body.rules
});
try {
const savedcomp = await comp.save();
res.json(savedcomp);
} catch (err) {
res.status(500).json({ message: err });
}
}
);
// delete a competition
router.delete(
"/delete",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
const validatedData = deleteValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
var comp = await CompetitionsModel.findByIdAndRemove(req.body._id);
return res.json(comp);
} catch (error) {
return res.status(500).json({ message: "Competiiton not found" });
}
}
);
router.patch(
"/edit/:compid/title",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = edittitleValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.title = req.body.title;
comp.category = "Comedian";
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/shortdescription",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = editshortdescriptionValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.shortdescription = req.body.shortdescription;
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/fulldescription",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = editfulldescriptionValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.fulldescription = req.body.fulldescription;
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/starttime",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = editstarttimeValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.starttime = req.body.starttime;
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/endtime",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = editendtimeValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.endtime = req.body.endtime;
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/rules",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = editrulesValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.rules = req.body.rules;
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/prize",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = editprizeValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.prize = req.body.prize;
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/category",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = editcategoryValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.category = req.body.category;
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/faqs",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = editfaqValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
const faq = new faqModel({
question: req.body.question,
answer: req.body.answer
});
if (!comp.faqs) {
comp.faqs = [];
}
const faqlength = comp.faqs.length;
comp.faqs[faqlength] = faq;
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
router.patch(
"/edit/:compid/addcomment",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
const validatedData = addcommentValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
// console.log(comp);
const otheruser = new OtheruserModel({
_id: req.loggedUser._id,
username: req.loggedUser.name,
profileurl: req.loggedUser.profileurl
});
if (!comp.comments) {
comp.comments = [];
}
const comment = new CommentsModel({
owner: otheruser,
message: req.body.message,
likedby: []
});
// const commentslength = comp.comments.length;
console.log(comp.comments);
// comp.comments[commentslength] = comment;
comp.comments.push(comment);
// await comp.comments[0].save();
const updatedcomp = await comp.save();
return res.json(updatedcomp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update comment" });
}
}
);
router.patch(
"/edit/:compid/editcomment",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
const validatedData = editcommentValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
const comp = await CompetitionsModel.findById(req.params.compid);
if (!comp) {
return res
.status(400)
.json({ message: "competition not found" });
}
req.comp = comp;
// const comp = await CompetitionsModel.findById(req.body._id);
// const comp = req.comp;
var commentIndex;
comp.comments.forEach((i, index) => {
if (
JSON.stringify(req.body.commentid) ==
JSON.stringify(i._id) &&
JSON.stringify(req.loggedUser._id) ==
JSON.stringify(i.owner._id)
) {
commentIndex = index;
}
});
var flag = false;
comp.hosts.forEach(i => {
if (
JSON.stringify(i._id) ==
JSON.stringify(req.loggedUser._id) ||
JSON.stringify(comp.comments[commentIndex].owner._id) ==
JSON.stringify(req.loggedUser._id)
) {
flag = true;
} else {
return res
.status(401)
.json({ message: "You cannot edit the comment" });
}
});
if (flag) {
comp.comments[commentIndex].message = req.body.message;
} else {
return res
.status(401)
.json({ message: "You cannot edit the comment" });
}
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update comment" });
}
}
);
router.patch(
"/edit/:compid/deleteallcomments",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
comp.comments.splice(0, comp.comments.length);
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to delete all comments" });
}
}
);
router.patch(
"/edit/:compid/deletecomment",
verifyToken,
verifyUserWithToken,
UpdateCompetition,
async (req, res, next) => {
try {
// const comp = await CompetitionsModel.findById(req.body._id);
const comp = req.comp;
var commentIndex;
comp.comments.forEach((i, index) => {
if (
JSON.stringify(req.body.commentid) ==
JSON.stringify(i._id) &&
JSON.stringify(req.loggedUser._id) ==
JSON.stringify(i.owner._id)
) {
commentIndex = index;
}
});
var flag = false;
comp.hosts.forEach(i => {
if (
JSON.stringify(i._id) ==
JSON.stringify(req.loggedUser._id) ||
JSON.stringify(comp.comments[commentIndex].owner._id) ==
JSON.stringify(req.loggedUser._id)
) {
flag = true;
} else {
return res
.status(401)
.json({ message: "You cannot edit the comment" });
}
});
if (flag) {
// ***************************************************************************************
comp.comments.splice(commentIndex, 1);
} else {
return res
.status(401)
.json({ message: "You cannot delete the comment" });
}
await comp.save();
return res.json(comp);
} catch (error) {
console.log(error);
return res.json({ message: " failed to update competitiion" });
}
}
);
// ************************************** top10 ***********************************
// how to add a host
router.post(
"/addhost",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
const validatedData = hostValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
var ishost = false;
const comp = await CompetitionsModel.findById(req.body._id);
comp.hosts.forEach(i => {
if (
JSON.stringify(i._id) == JSON.stringify(req.loggedUser._id)
) {
ishost = true;
}
});
if (ishost) {
const user = await UserModel.findById(req.body.userid);
const noofhosts = comp.hosts.length;
comp.hosts[noofhosts] = {
_id: user._id,
username: user.name,
profileurl: user.profileurl
};
comp.save();
res.send(comp);
} else {
console.log(ishost);
console.log(comp);
res.json({ message: "You cannot add a host" });
}
} catch (error) {
console.log(error);
return res.json({ message: " Access denied" });
}
}
);
// get results
router.get(
"/results",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
const validatedData = resultValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
var ishost = false;
console.log("eaflihrewth");
const comp = await CompetitionsModel.findById(req.body._id);
comp.hosts.forEach(i => {
if (i._id == req.loggedUser._id) {
ishost = true;
}
});
console.log(comp);
if (ishost) {
const user = UserModel.findById(req.body.userid);
// *******************************************checkthis**************************************************
const results = new resultsModel({
_id: user._id,
name: user.name,
score: req.body.score
});
if (!comp.results) {
comp.results = [];
}
const resultslength = comp.results.length;
comp.results[resultslength] = results;
await comp.save();
return res.json(comp);
} else {
return res.json({ message: "Access denied" });
}
} catch (error) {
console.log(error);
return res.status(500).json({ message: "internal server error" });
}
}
);
router.post(
"/comment/like",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
const validatedData = commentlikeValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
const comp = await CompetitionsModel.findById(req.body._id);
req.comp = comp;
var commentIndex = -1;
comp.comments.forEach((i, index) => {
if (
JSON.stringify(req.body.commentid) == JSON.stringify(i._id)
) {
commentIndex = index;
}
});
const user = new OtheruserModel({
_id: req.loggedUser._id,
username: req.loggedUser.name,
profileurl: req.loggedUser.profileurl
});
comp.comments[commentIndex].likedby.push(user);
comp.comments[commentIndex].likes =
comp.comments[commentIndex].likes + 1;
await comp.save({ safe: false }, (err, doc) => {
console.log(doc);
return res.send(comp);
});
} catch (error) {
console.log(error);
return res.json({ message: " Access denied" });
}
}
);
router.post(
"/comment/reply",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
const validatedData = commentreplyValidation(req.body);
if (validatedData.error)
return res
.status(400)
.json({ message: validatedData.error.details[0].message });
try {
const comp = await CompetitionsModel.findById(req.body._id);
const user = new OtheruserModel({
_id: req.loggedUser._id,
username: req.loggedUser.name,
profileurl: req.loggedUser.profileurl
});
var commentIndex = -1;
comp.comments.forEach((i, index) => {
if (
JSON.stringify(req.body.commentid) == JSON.stringify(i._id)
) {
commentIndex = index;
}
});
const reply = new ReplyModel({
owner: user,
message: req.body.message,
likedby: []
});
comp.comments[commentIndex].replies.push(reply);
comp.save();
res.send(comp);
} catch (error) {
console.log(error);
return res.json({ message: " Access denied" });
}
}
);
router.get(
"/similarcompetetions",
verifyToken,
verifyUserWithToken,
async (req, res, next) => {
console.log("sdihgio");
try {
const comp = await CompetitionsModel.findById(req.body._id);
const compparticipants = [];
comp.participants.forEach(i => {
compparticipants.push(i._id);
});
const allcompetitions = await CompetitionsModel.find();
const similarcomps = [];
var participantsindex = 0;
const totalparticipants = compparticipants.length;
allcompetitions.forEach(i => {
participantsindex = 0;
for (j = i.participants; ; participantsindex++) {
console.log(j);
// console.log(compparticipants);
if (participantsindex >= totalparticipants) {
break;
}
if (
JSON.stringify(compparticipants[participantsindex]) ==
JSON.stringify(j)
) {
similarcomps.push(i);
}
}
});
return res.json(similarcomps);
} catch (error) {
console.log(error);
return res.json({ message: " Cannot Find Similar Competitions" });
}
}
);
// retrieve a comp
router.get("/:id", verifyToken, verifyUserWithToken, async (req, res, next) => {
try {
const comp = await CompetitionsModel.findById(req.params.id);
if (comp) {
return res.status(200).json(comp);
} else {
return res.status(400).json({ message: "Competition not found" });
}
} catch (error) {
return res.status(500).json({ message: "Internal Server Error" });
}
});
module.exports = router;
|
lechium/tvOS144Headers
|
System/Library/PrivateFrameworks/PhotosUICore.framework/PXCMMMomentShareInvitation.h
|
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 14, 2021 at 2:27:01 PM Mountain Standard Time
* Operating System: Version 14.4 (Build 18K802)
* Image Source: /System/Library/PrivateFrameworks/PhotosUICore.framework/PhotosUICore
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>. Updated by <NAME>.
*/
#import <PhotosUICore/PhotosUICore-Structs.h>
#import <libobjc.A.dylib/PXMediaTypeAggregating.h>
#import <libobjc.A.dylib/PXCMMInvitation.h>
#import <libobjc.A.dylib/NSCopying.h>
@protocol PXCMMInvitationParticipant, PXDisplayAsset, PXUIImageProvider;
@class NSString, PHMomentShare, PHFetchResult, NSDate, PXAssetCollectionActionManager;
@interface PXCMMMomentShareInvitation : NSObject <PXMediaTypeAggregating, PXCMMInvitation, NSCopying> {
long long _shareType;
NSString* _title;
NSString* _subtitle;
id<PXCMMInvitationParticipant> _owner;
id<PXDisplayAsset> _posterAsset;
id<PXUIImageProvider> _posterMediaProvider;
PHMomentShare* _momentShare;
PHFetchResult* _participantsFetchResult;
PHFetchResult* _previewAssetsFetchResult;
}
@property (nonatomic,readonly) long long aggregateMediaType;
@property (readonly) unsigned long long hash;
@property (readonly) Class superclass;
@property (copy,readonly) NSString * description;
@property (copy,readonly) NSString * debugDescription;
@property (nonatomic,readonly) PHMomentShare * momentShare; //@synthesize momentShare=_momentShare - In the implementation block
@property (nonatomic,readonly) PHFetchResult * participantsFetchResult; //@synthesize participantsFetchResult=_participantsFetchResult - In the implementation block
@property (nonatomic,readonly) PHFetchResult * previewAssetsFetchResult; //@synthesize previewAssetsFetchResult=_previewAssetsFetchResult - In the implementation block
@property (nonatomic,readonly) long long shareType; //@synthesize shareType=_shareType - In the implementation block
@property (nonatomic,readonly) NSString * identifier;
@property (nonatomic,readonly) NSString * title; //@synthesize title=_title - In the implementation block
@property (nonatomic,readonly) NSString * subtitle; //@synthesize subtitle=_subtitle - In the implementation block
@property (nonatomic,readonly) NSDate * creationDate;
@property (nonatomic,readonly) NSDate * expiryDate;
@property (nonatomic,readonly) unsigned long long count;
@property (nonatomic,readonly) id<PXCMMInvitationParticipant> owner; //@synthesize owner=_owner - In the implementation block
@property (nonatomic,readonly) id<PXDisplayAsset> posterAsset; //@synthesize posterAsset=_posterAsset - In the implementation block
@property (nonatomic,readonly) id<PXUIImageProvider> posterMediaProvider; //@synthesize posterMediaProvider=_posterMediaProvider - In the implementation block
@property (nonatomic,readonly) PXAssetCollectionActionManager * assetCollectionActionManager;
+(id)new;
+(id)invitationWithMomentShare:(id)arg1 ;
-(id)copyWithZone:(NSZone*)arg1 ;
-(NSString *)description;
-(id)init;
-(unsigned long long)count;
-(NSString *)identifier;
-(NSDate *)creationDate;
-(NSString *)title;
-(NSString *)subtitle;
-(NSDate *)expiryDate;
-(id<PXCMMInvitationParticipant>)owner;
-(PHMomentShare *)momentShare;
-(void)acceptWithCompletionHandler:(/*^block*/id)arg1 ;
-(PXAssetCollectionActionManager *)assetCollectionActionManager;
-(id<PXDisplayAsset>)posterAsset;
-(id<PXUIImageProvider>)posterMediaProvider;
-(id)contextForActivityType:(unsigned long long)arg1 ;
-(long long)shareType;
-(long long)aggregateMediaType;
-(id)invitationWithUpdatedPreviewAssetsFetchResult:(id)arg1 ;
-(PHFetchResult *)previewAssetsFetchResult;
-(id)momentShareStatus;
-(id)initWithMomentShare:(id)arg1 ;
-(id)invitationWithUpdatedParticipantsFetchResult:(id)arg1 ;
-(PHFetchResult *)participantsFetchResult;
@end
|
mbonaci/elastic.js
|
src/filter/GeoDistanceRangeFilter.js
|
<filename>src/filter/GeoDistanceRangeFilter.js
/**
@class
<p>A filter that restricts matched results/docs to a given distance range from the
point of origin. The format conforms with the GeoJSON specification.</p>
@name ejs.GeoDistanceRangeFilter
@ejs filter
@borrows ejs.FilterMixin.name as name
@borrows ejs.FilterMixin.cache as cache
@borrows ejs.FilterMixin.cacheKey as cacheKey
@borrows ejs.FilterMixin._type as _type
@borrows ejs.FilterMixin.toJSON as toJSON
@desc
Filter results to those which fall within the given distance range of the point of origin.
@param {String} fieldName the document property/field containing the Geo Point (lon/lat).
*/
ejs.GeoDistanceRangeFilter = function (fieldName) {
var
_common = ejs.FilterMixin('geo_distance_range'),
filter = _common.toJSON();
filter.geo_distance_range[fieldName] = [0, 0];
return extend(_common, {
/**
Sets the fields to filter against.
@member ejs.GeoDistanceRangeFilter
@param {String} f A valid field name.
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
field: function (f) {
var oldValue = filter.geo_distance_range[fieldName];
if (f == null) {
return fieldName;
}
delete filter.geo_distance_range[fieldName];
fieldName = f;
filter.geo_distance_range[f] = oldValue;
return this;
},
/**
* Sets the start point of the distance range
@member ejs.GeoDistanceRangeFilter
@param {Number} numericDistance the numeric distance
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
from: function (numericDistance) {
if (numericDistance == null) {
return filter.geo_distance_range.from;
}
if (!isNumber(numericDistance)) {
throw new TypeError('Argument must be a numeric value');
}
filter.geo_distance_range.from = numericDistance;
return this;
},
/**
* Sets the end point of the distance range
@member ejs.GeoDistanceRangeFilter
@param {Number} numericDistance the numeric distance
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
to: function (numericDistance) {
if (numericDistance == null) {
return filter.geo_distance_range.to;
}
if (!isNumber(numericDistance)) {
throw new TypeError('Argument must be a numeric value');
}
filter.geo_distance_range.to = numericDistance;
return this;
},
/**
Should the first from (if set) be inclusive or not.
Defaults to true
@member ejs.GeoDistanceRangeFilter
@param {Boolean} trueFalse true to include, false to exclude
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
includeLower: function (trueFalse) {
if (trueFalse == null) {
return filter.geo_distance_range.include_lower;
}
filter.geo_distance_range.include_lower = trueFalse;
return this;
},
/**
Should the last to (if set) be inclusive or not. Defaults to true.
@member ejs.GeoDistanceRangeFilter
@param {Boolean} trueFalse true to include, false to exclude
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
includeUpper: function (trueFalse) {
if (trueFalse == null) {
return filter.geo_distance_range.include_upper;
}
filter.geo_distance_range.include_upper = trueFalse;
return this;
},
/**
Greater than value. Same as setting from to the value, and
include_lower to false,
@member ejs.GeoDistanceRangeFilter
@param {Number} val the numeric distance
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
gt: function (val) {
if (val == null) {
return filter.geo_distance_range.gt;
}
if (!isNumber(val)) {
throw new TypeError('Argument must be a numeric value');
}
filter.geo_distance_range.gt = val;
return this;
},
/**
Greater than or equal to value. Same as setting from to the value,
and include_lower to true.
@member ejs.GeoDistanceRangeFilter
@param {Number} val the numeric distance
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
gte: function (val) {
if (val == null) {
return filter.geo_distance_range.gte;
}
if (!isNumber(val)) {
throw new TypeError('Argument must be a numeric value');
}
filter.geo_distance_range.gte = val;
return this;
},
/**
Less than value. Same as setting to to the value, and include_upper
to false.
@member ejs.GeoDistanceRangeFilter
@param {Number} val the numeric distance
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
lt: function (val) {
if (val == null) {
return filter.geo_distance_range.lt;
}
if (!isNumber(val)) {
throw new TypeError('Argument must be a numeric value');
}
filter.geo_distance_range.lt = val;
return this;
},
/**
Less than or equal to value. Same as setting to to the value,
and include_upper to true.
@member ejs.GeoDistanceRangeFilter
@param {Number} val the numeric distance
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
lte: function (val) {
if (val == null) {
return filter.geo_distance_range.lte;
}
if (!isNumber(val)) {
throw new TypeError('Argument must be a numeric value');
}
filter.geo_distance_range.lte = val;
return this;
},
/**
Sets the distance unit. Valid values are "mi" for miles or "km"
for kilometers. Defaults to "km".
@member ejs.GeoDistanceRangeFilter
@param {Number} unit the unit of distance measure.
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
unit: function (unit) {
if (unit == null) {
return filter.geo_distance_range.unit;
}
unit = unit.toLowerCase();
if (unit === 'mi' || unit === 'km') {
filter.geo_distance_range.unit = unit;
}
return this;
},
/**
Sets the point of origin in which distance will be measured from
@member ejs.GeoDistanceRangeFilter
@param {GeoPoint} p A valid GeoPoint object.
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
point: function (p) {
if (p == null) {
return filter.geo_distance_range[fieldName];
}
if (isGeoPoint(p)) {
filter.geo_distance_range[fieldName] = p.toJSON();
} else {
throw new TypeError('Argument must be a GeoPoint');
}
return this;
},
/**
How to compute the distance. Can either be arc (better precision)
or plane (faster). Defaults to arc.
@member ejs.GeoDistanceRangeFilter
@param {String} type The execution type as a string.
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
distanceType: function (type) {
if (type == null) {
return filter.geo_distance_range.distance_type;
}
type = type.toLowerCase();
if (type === 'arc' || type === 'plane') {
filter.geo_distance_range.distance_type = type;
}
return this;
},
/**
If the lat/long points should be normalized to lie within their
respective normalized ranges.
Normalized ranges are:
lon = -180 (exclusive) to 180 (inclusive) range
lat = -90 to 90 (both inclusive) range
@member ejs.GeoDistanceRangeFilter
@param {String} trueFalse True if the coordinates should be normalized. False otherwise.
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
normalize: function (trueFalse) {
if (trueFalse == null) {
return filter.geo_distance_range.normalize;
}
filter.geo_distance_range.normalize = trueFalse;
return this;
},
/**
Will an optimization of using first a bounding box check will be
used. Defaults to memory which will do in memory checks. Can also
have values of indexed to use indexed value check, or none which
disables bounding box optimization.
@member ejs.GeoDistanceRangeFilter
@param {String} t optimization type of memory, indexed, or none.
@returns {Object} returns <code>this</code> so that calls can be chained.
*/
optimizeBbox: function (t) {
if (t == null) {
return filter.geo_distance_range.optimize_bbox;
}
t = t.toLowerCase();
if (t === 'memory' || t === 'indexed' || t === 'none') {
filter.geo_distance_range.optimize_bbox = t;
}
return this;
}
});
};
|
axelcoezard/licence
|
Licence 2/I42/TP5/ex_5.c
|
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
void SIGUSR1_recu();
int signal_recu = 0;
int main() {
int p_pid = getpid();
if (fork() == 0 ) { // le programme se duplique.
int f_pid = getpid();
signal(SIGUSR1, SIGUSR1_recu);
while(!signal_recu) {
printf("(%i) En attente d'un signal SIGUSR1...\n", f_pid);
sleep(10);
kill(p_pid, SIGTERM);
printf("(%i) tue le père (%i)\n", f_pid, p_pid);
}
} else {
while(1); // le père exécute une boucle infinie.
}
}
void SIGUSR1_recu() {
signal_recu = 1;
}
|
bobmittmann/yard-ice
|
src/boot/monitor-i.h
|
<gh_stars>1-10
/*
* Copyright(C) 2015 <NAME>. All Rights Reserved.
*
* This file is part of the YARD-ICE.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You can receive a copy of the GNU Lesser General Public License from
* http://www.gnu.org/
*/
/**
* @file monitor-i.h
* @brief Bootloader monitor private header
* @author <NAME> <<EMAIL>>
*/
#ifndef __MONITOR_I_H__
#define __MONITOR_I_H__
#ifdef CONFIG_H
#include "config.h"
#endif
#define __THINKOS_MONITOR__
#include <thinkos/monitor.h>
#define __THINKOS_BOOTLDR__
#include <thinkos/bootldr.h>
#define __THINKOS_APP__
#include <thinkos/app.h>
#define __THINKOS_CONSOLE__
#include <thinkos/console.h>
#define __THINKOS_DEBUG__
#include <thinkos/debug.h>
#include <thinkos.h>
#include <stdlib.h>
#include <stdbool.h>
#define MONITOR_AUTOBOOT 1
#define MONITOR_SHELL 2
#define CTRL_C 0x03 /* ETX */
struct monitor {
uint32_t flags;
};
#define BOOTLOADER_BLOCK_OFFS 0x00000000
#define BOOTLOADER_BLOCK_SIZE (16 * 1024)
#define BOOTLOADER_START_ADDR (0x08000000 + BOOTLOADER_BLOCK_OFFS)
#define CONFIG_BLOCK_OFFS 0x00008000
#define CONFIG_BLOCK_SIZE (16 * 1024)
#define CONFIG_START_ADDR (0x08000000 + CONFIG_BLOCK_OFFS)
#define RBF_BLOCK_OFFS 0x00010000
#define RBF_BLOCK_SIZE (64 * 1024)
#define RBF_START_ADDR (0x08000000 + RBF_BLOCK_OFFS)
#define APPLICATION_BLOCK_OFFS 0x00020000
#define APPLICATION_BLOCK_SIZE (384 * 1024)
#define APPLICATION_START_ADDR (0x08000000 + APPLICATION_BLOCK_OFFS)
extern const struct magic_blk board_app_magic;
#ifdef __cplusplus
extern "C" {
#endif
void monitor_task(const struct monitor_comm * comm, void * param);
#ifdef __cplusplus
}
#endif
#endif /* __MONITOR_I_H__ */
|
yasuor/huaweicloud-sdk-java-v3
|
services/meeting/src/main/java/com/huaweicloud/sdk/meeting/v1/model/RecordResultDO.java
|
package com.huaweicloud.sdk.meeting.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.Objects;
/**
* 录制信息
*/
public class RecordResultDO {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="confUUID")
private String confUUID;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="confID")
private String confID;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="url")
private List<String> url = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="rcdTime")
private Integer rcdTime;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="rcdSize")
private Integer rcdSize;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="subject")
private String subject;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="scheduserName")
private String scheduserName;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="startTime")
private String startTime;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="isDecodeFinish")
private Boolean isDecodeFinish;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="decodeEndTime")
private Long decodeEndTime;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="available")
private Boolean available;
public RecordResultDO withConfUUID(String confUUID) {
this.confUUID = confUUID;
return this;
}
/**
* 会议UUID。
* @return confUUID
*/
public String getConfUUID() {
return confUUID;
}
public void setConfUUID(String confUUID) {
this.confUUID = confUUID;
}
public RecordResultDO withConfID(String confID) {
this.confID = confID;
return this;
}
/**
* 会议ID。
* @return confID
*/
public String getConfID() {
return confID;
}
public void setConfID(String confID) {
this.confID = confID;
}
public RecordResultDO withUrl(List<String> url) {
this.url = url;
return this;
}
public RecordResultDO addUrlItem(String urlItem) {
if (this.url == null) {
this.url = new ArrayList<>();
}
this.url.add(urlItem);
return this;
}
public RecordResultDO withUrl(Consumer<List<String>> urlSetter) {
if(this.url == null ){
this.url = new ArrayList<>();
}
urlSetter.accept(this.url);
return this;
}
/**
* 点播地址。
* @return url
*/
public List<String> getUrl() {
return url;
}
public void setUrl(List<String> url) {
this.url = url;
}
public RecordResultDO withRcdTime(Integer rcdTime) {
this.rcdTime = rcdTime;
return this;
}
/**
* 录制时长(单位秒)。
* @return rcdTime
*/
public Integer getRcdTime() {
return rcdTime;
}
public void setRcdTime(Integer rcdTime) {
this.rcdTime = rcdTime;
}
public RecordResultDO withRcdSize(Integer rcdSize) {
this.rcdSize = rcdSize;
return this;
}
/**
* 录制文件大小(MB)。
* @return rcdSize
*/
public Integer getRcdSize() {
return rcdSize;
}
public void setRcdSize(Integer rcdSize) {
this.rcdSize = rcdSize;
}
public RecordResultDO withSubject(String subject) {
this.subject = subject;
return this;
}
/**
* 会议主题。
* @return subject
*/
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public RecordResultDO withScheduserName(String scheduserName) {
this.scheduserName = scheduserName;
return this;
}
/**
* 会议预订者。
* @return scheduserName
*/
public String getScheduserName() {
return scheduserName;
}
public void setScheduserName(String scheduserName) {
this.scheduserName = scheduserName;
}
public RecordResultDO withStartTime(String startTime) {
this.startTime = startTime;
return this;
}
/**
* 会议开始时间。
* @return startTime
*/
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public RecordResultDO withIsDecodeFinish(Boolean isDecodeFinish) {
this.isDecodeFinish = isDecodeFinish;
return this;
}
/**
* 录制文件是否转码完成。
* @return isDecodeFinish
*/
public Boolean getIsDecodeFinish() {
return isDecodeFinish;
}
public void setIsDecodeFinish(Boolean isDecodeFinish) {
this.isDecodeFinish = isDecodeFinish;
}
public RecordResultDO withDecodeEndTime(Long decodeEndTime) {
this.decodeEndTime = decodeEndTime;
return this;
}
/**
* 录制文件预计转码完成时间。
* @return decodeEndTime
*/
public Long getDecodeEndTime() {
return decodeEndTime;
}
public void setDecodeEndTime(Long decodeEndTime) {
this.decodeEndTime = decodeEndTime;
}
public RecordResultDO withAvailable(Boolean available) {
this.available = available;
return this;
}
/**
* 录播文件是否可观看。
* @return available
*/
public Boolean getAvailable() {
return available;
}
public void setAvailable(Boolean available) {
this.available = available;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RecordResultDO recordResultDO = (RecordResultDO) o;
return Objects.equals(this.confUUID, recordResultDO.confUUID) &&
Objects.equals(this.confID, recordResultDO.confID) &&
Objects.equals(this.url, recordResultDO.url) &&
Objects.equals(this.rcdTime, recordResultDO.rcdTime) &&
Objects.equals(this.rcdSize, recordResultDO.rcdSize) &&
Objects.equals(this.subject, recordResultDO.subject) &&
Objects.equals(this.scheduserName, recordResultDO.scheduserName) &&
Objects.equals(this.startTime, recordResultDO.startTime) &&
Objects.equals(this.isDecodeFinish, recordResultDO.isDecodeFinish) &&
Objects.equals(this.decodeEndTime, recordResultDO.decodeEndTime) &&
Objects.equals(this.available, recordResultDO.available);
}
@Override
public int hashCode() {
return Objects.hash(confUUID, confID, url, rcdTime, rcdSize, subject, scheduserName, startTime, isDecodeFinish, decodeEndTime, available);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RecordResultDO {\n");
sb.append(" confUUID: ").append(toIndentedString(confUUID)).append("\n");
sb.append(" confID: ").append(toIndentedString(confID)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" rcdTime: ").append(toIndentedString(rcdTime)).append("\n");
sb.append(" rcdSize: ").append(toIndentedString(rcdSize)).append("\n");
sb.append(" subject: ").append(toIndentedString(subject)).append("\n");
sb.append(" scheduserName: ").append(toIndentedString(scheduserName)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" isDecodeFinish: ").append(toIndentedString(isDecodeFinish)).append("\n");
sb.append(" decodeEndTime: ").append(toIndentedString(decodeEndTime)).append("\n");
sb.append(" available: ").append(toIndentedString(available)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
zhangycjob/jdcloud-sdk-java
|
iotcloudgateway/src/main/java/com/jdcloud/sdk/service/iotcloudgateway/model/Instance.java
|
/*
* Copyright 2018 JDCLOUD.COM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:#www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*
*
*
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.iotcloudgateway.model;
/**
* instance
*/
public class Instance implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
* 实例ID
*/
private String instanceId;
/**
* 实例名称
*/
private String instanceName;
/**
* 实例版本
*/
private String instanceVersion;
/**
* 所在地域
*/
private String instanceRegion;
/**
* 实例状态,running:运行,error:错误,creating:创建中,changing:变配中
*/
private String instanceStatus;
/**
* 实例硬件配置规格 例如:2C4G20G
*/
private String instanceFlavor;
/**
* az信息
*/
private String azId;
/**
* 所属VPC的ID
*/
private String vpcId;
/**
* 所属子网的ID
*/
private String subnetId;
/**
* 下行控制管理域名和设备上行链接的外网域名
*/
private String exposedDomain;
/**
* 节点个数
*/
private Integer replica;
/**
* 云硬盘大小
*/
private Integer cloudstorage;
/**
* 实例服务配置
*/
private String serviceConfig;
/**
* 创建时间
*/
private String createTime;
/**
* 网关设备ID
*/
private String gw_dev_id;
/**
* 网关子设备数
*/
private Integer gw_dev_num;
/**
* 计费类型
*/
private Integer chargeType;
/**
* 计费过期时间
*/
private String chargeExpired;
/**
* get 实例ID
*
* @return
*/
public String getInstanceId() {
return instanceId;
}
/**
* set 实例ID
*
* @param instanceId
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
* get 实例名称
*
* @return
*/
public String getInstanceName() {
return instanceName;
}
/**
* set 实例名称
*
* @param instanceName
*/
public void setInstanceName(String instanceName) {
this.instanceName = instanceName;
}
/**
* get 实例版本
*
* @return
*/
public String getInstanceVersion() {
return instanceVersion;
}
/**
* set 实例版本
*
* @param instanceVersion
*/
public void setInstanceVersion(String instanceVersion) {
this.instanceVersion = instanceVersion;
}
/**
* get 所在地域
*
* @return
*/
public String getInstanceRegion() {
return instanceRegion;
}
/**
* set 所在地域
*
* @param instanceRegion
*/
public void setInstanceRegion(String instanceRegion) {
this.instanceRegion = instanceRegion;
}
/**
* get 实例状态,running:运行,error:错误,creating:创建中,changing:变配中
*
* @return
*/
public String getInstanceStatus() {
return instanceStatus;
}
/**
* set 实例状态,running:运行,error:错误,creating:创建中,changing:变配中
*
* @param instanceStatus
*/
public void setInstanceStatus(String instanceStatus) {
this.instanceStatus = instanceStatus;
}
/**
* get 实例硬件配置规格 例如:2C4G20G
*
* @return
*/
public String getInstanceFlavor() {
return instanceFlavor;
}
/**
* set 实例硬件配置规格 例如:2C4G20G
*
* @param instanceFlavor
*/
public void setInstanceFlavor(String instanceFlavor) {
this.instanceFlavor = instanceFlavor;
}
/**
* get az信息
*
* @return
*/
public String getAzId() {
return azId;
}
/**
* set az信息
*
* @param azId
*/
public void setAzId(String azId) {
this.azId = azId;
}
/**
* get 所属VPC的ID
*
* @return
*/
public String getVpcId() {
return vpcId;
}
/**
* set 所属VPC的ID
*
* @param vpcId
*/
public void setVpcId(String vpcId) {
this.vpcId = vpcId;
}
/**
* get 所属子网的ID
*
* @return
*/
public String getSubnetId() {
return subnetId;
}
/**
* set 所属子网的ID
*
* @param subnetId
*/
public void setSubnetId(String subnetId) {
this.subnetId = subnetId;
}
/**
* get 下行控制管理域名和设备上行链接的外网域名
*
* @return
*/
public String getExposedDomain() {
return exposedDomain;
}
/**
* set 下行控制管理域名和设备上行链接的外网域名
*
* @param exposedDomain
*/
public void setExposedDomain(String exposedDomain) {
this.exposedDomain = exposedDomain;
}
/**
* get 节点个数
*
* @return
*/
public Integer getReplica() {
return replica;
}
/**
* set 节点个数
*
* @param replica
*/
public void setReplica(Integer replica) {
this.replica = replica;
}
/**
* get 云硬盘大小
*
* @return
*/
public Integer getCloudstorage() {
return cloudstorage;
}
/**
* set 云硬盘大小
*
* @param cloudstorage
*/
public void setCloudstorage(Integer cloudstorage) {
this.cloudstorage = cloudstorage;
}
/**
* get 实例服务配置
*
* @return
*/
public String getServiceConfig() {
return serviceConfig;
}
/**
* set 实例服务配置
*
* @param serviceConfig
*/
public void setServiceConfig(String serviceConfig) {
this.serviceConfig = serviceConfig;
}
/**
* get 创建时间
*
* @return
*/
public String getCreateTime() {
return createTime;
}
/**
* set 创建时间
*
* @param createTime
*/
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
/**
* get 网关设备ID
*
* @return
*/
public String getGw_dev_id() {
return gw_dev_id;
}
/**
* set 网关设备ID
*
* @param gw_dev_id
*/
public void setGw_dev_id(String gw_dev_id) {
this.gw_dev_id = gw_dev_id;
}
/**
* get 网关子设备数
*
* @return
*/
public Integer getGw_dev_num() {
return gw_dev_num;
}
/**
* set 网关子设备数
*
* @param gw_dev_num
*/
public void setGw_dev_num(Integer gw_dev_num) {
this.gw_dev_num = gw_dev_num;
}
/**
* get 计费类型
*
* @return
*/
public Integer getChargeType() {
return chargeType;
}
/**
* set 计费类型
*
* @param chargeType
*/
public void setChargeType(Integer chargeType) {
this.chargeType = chargeType;
}
/**
* get 计费过期时间
*
* @return
*/
public String getChargeExpired() {
return chargeExpired;
}
/**
* set 计费过期时间
*
* @param chargeExpired
*/
public void setChargeExpired(String chargeExpired) {
this.chargeExpired = chargeExpired;
}
/**
* set 实例ID
*
* @param instanceId
*/
public Instance instanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
/**
* set 实例名称
*
* @param instanceName
*/
public Instance instanceName(String instanceName) {
this.instanceName = instanceName;
return this;
}
/**
* set 实例版本
*
* @param instanceVersion
*/
public Instance instanceVersion(String instanceVersion) {
this.instanceVersion = instanceVersion;
return this;
}
/**
* set 所在地域
*
* @param instanceRegion
*/
public Instance instanceRegion(String instanceRegion) {
this.instanceRegion = instanceRegion;
return this;
}
/**
* set 实例状态,running:运行,error:错误,creating:创建中,changing:变配中
*
* @param instanceStatus
*/
public Instance instanceStatus(String instanceStatus) {
this.instanceStatus = instanceStatus;
return this;
}
/**
* set 实例硬件配置规格 例如:2C4G20G
*
* @param instanceFlavor
*/
public Instance instanceFlavor(String instanceFlavor) {
this.instanceFlavor = instanceFlavor;
return this;
}
/**
* set az信息
*
* @param azId
*/
public Instance azId(String azId) {
this.azId = azId;
return this;
}
/**
* set 所属VPC的ID
*
* @param vpcId
*/
public Instance vpcId(String vpcId) {
this.vpcId = vpcId;
return this;
}
/**
* set 所属子网的ID
*
* @param subnetId
*/
public Instance subnetId(String subnetId) {
this.subnetId = subnetId;
return this;
}
/**
* set 下行控制管理域名和设备上行链接的外网域名
*
* @param exposedDomain
*/
public Instance exposedDomain(String exposedDomain) {
this.exposedDomain = exposedDomain;
return this;
}
/**
* set 节点个数
*
* @param replica
*/
public Instance replica(Integer replica) {
this.replica = replica;
return this;
}
/**
* set 云硬盘大小
*
* @param cloudstorage
*/
public Instance cloudstorage(Integer cloudstorage) {
this.cloudstorage = cloudstorage;
return this;
}
/**
* set 实例服务配置
*
* @param serviceConfig
*/
public Instance serviceConfig(String serviceConfig) {
this.serviceConfig = serviceConfig;
return this;
}
/**
* set 创建时间
*
* @param createTime
*/
public Instance createTime(String createTime) {
this.createTime = createTime;
return this;
}
/**
* set 网关设备ID
*
* @param gw_dev_id
*/
public Instance gw_dev_id(String gw_dev_id) {
this.gw_dev_id = gw_dev_id;
return this;
}
/**
* set 网关子设备数
*
* @param gw_dev_num
*/
public Instance gw_dev_num(Integer gw_dev_num) {
this.gw_dev_num = gw_dev_num;
return this;
}
/**
* set 计费类型
*
* @param chargeType
*/
public Instance chargeType(Integer chargeType) {
this.chargeType = chargeType;
return this;
}
/**
* set 计费过期时间
*
* @param chargeExpired
*/
public Instance chargeExpired(String chargeExpired) {
this.chargeExpired = chargeExpired;
return this;
}
}
|
sqr-gj/UestcBBS-MVP
|
app/src/main/java/com/scatl/uestcbbs/custom/GrayFrameLayout.java
|
<gh_stars>1-10
package com.scatl.uestcbbs.custom;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import com.scatl.uestcbbs.util.SharePrefUtil;
/**
* author: sca_tl
* description: 软件黑白化---BaseActivity
* date: 2020/4/4 22:55
*/
public class GrayFrameLayout extends FrameLayout {
private Paint mPaint = new Paint();
public GrayFrameLayout(Context context, AttributeSet attrs) {
super(context, attrs);
ColorMatrix cm = new ColorMatrix();
cm.setSaturation(SharePrefUtil.getGraySaturation(context));
mPaint.setColorFilter(new ColorMatrixColorFilter(cm));
}
@Override
protected void dispatchDraw(Canvas canvas) {
canvas.saveLayer(null, mPaint, Canvas.ALL_SAVE_FLAG);
super.dispatchDraw(canvas);
canvas.restore();
}
@Override
public void draw(Canvas canvas) {
canvas.saveLayer(null, mPaint, Canvas.ALL_SAVE_FLAG);
super.draw(canvas);
canvas.restore();
}
}
|
ghuntley/COVIDSafe_1.0.11.apk
|
src/sources/com/google/android/material/theme/MaterialComponentsViewInflater.java
|
<reponame>ghuntley/COVIDSafe_1.0.11.apk
package com.google.android.material.theme;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import androidx.appcompat.app.AppCompatViewInflater;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.AppCompatCheckBox;
import androidx.appcompat.widget.AppCompatRadioButton;
import androidx.appcompat.widget.AppCompatTextView;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.checkbox.MaterialCheckBox;
import com.google.android.material.radiobutton.MaterialRadioButton;
import com.google.android.material.textview.MaterialTextView;
public class MaterialComponentsViewInflater extends AppCompatViewInflater {
private static int floatingToolbarItemBackgroundResId = -1;
/* access modifiers changed from: protected */
public AppCompatButton createButton(Context context, AttributeSet attributeSet) {
if (shouldInflateAppCompatButton(context, attributeSet)) {
return new AppCompatButton(context, attributeSet);
}
return new MaterialButton(context, attributeSet);
}
/* access modifiers changed from: protected */
public boolean shouldInflateAppCompatButton(Context context, AttributeSet attributeSet) {
if (Build.VERSION.SDK_INT != 23 && Build.VERSION.SDK_INT != 24 && Build.VERSION.SDK_INT != 25) {
return false;
}
if (floatingToolbarItemBackgroundResId == -1) {
floatingToolbarItemBackgroundResId = context.getResources().getIdentifier("floatingToolbarItemBackgroundDrawable", "^attr-private", "android");
}
int i = floatingToolbarItemBackgroundResId;
if (!(i == 0 || i == -1)) {
for (int i2 = 0; i2 < attributeSet.getAttributeCount(); i2++) {
if (attributeSet.getAttributeNameResource(i2) == 16842964 && floatingToolbarItemBackgroundResId == attributeSet.getAttributeListValue(i2, (String[]) null, 0)) {
return true;
}
}
}
return false;
}
/* access modifiers changed from: protected */
public AppCompatCheckBox createCheckBox(Context context, AttributeSet attributeSet) {
return new MaterialCheckBox(context, attributeSet);
}
/* access modifiers changed from: protected */
public AppCompatRadioButton createRadioButton(Context context, AttributeSet attributeSet) {
return new MaterialRadioButton(context, attributeSet);
}
/* access modifiers changed from: protected */
public AppCompatTextView createTextView(Context context, AttributeSet attributeSet) {
return new MaterialTextView(context, attributeSet);
}
}
|
diamondq/dq-common-java
|
vertx/common-vertx.processor/src/test/java/com/diamondq/common/vertx/processor/model/TestProxyType.java
|
<reponame>diamondq/dq-common-java<gh_stars>0
package com.diamondq.common.vertx.processor.model;
import java.util.Collections;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.util.Elements;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
public class TestProxyType {
public @Rule ExtendedCompilationRule rule = new ExtendedCompilationRule();
private Elements elements;
private ProcessingEnvironment processingEnv;
@SuppressWarnings("null")
public TestProxyType() {
}
@Before
public void setup() {
elements = rule.getElements();
processingEnv = rule.getProcessingEnv();
}
@Test
public void validTypes() {
TypeElement typeElement = elements.getTypeElement(SampleWithDifferentReturnTypes.class.getCanonicalName());
Assert.assertNotNull(typeElement);
for (Element element : typeElement.getEnclosedElements()) {
if (element.getKind() == ElementKind.METHOD) {
ExecutableElement ee = (ExecutableElement) element;
ValueString valueString = ee.getAnnotation(ValueString.class);
Assert.assertNotNull("Missing valueString on " + ee.toString(), valueString);
try {
BaseType type = new BaseType(ee.getReturnType(), BaseType.constructor(), processingEnv, Collections.emptyMap());
Assert.assertNotNull(type);
String value = type.getTypeName().toString();
Assert.assertEquals("Return type does not match for " + ee.toString(), valueString.value(), value);
}
catch (Exception ex) {
Assert.fail("Unable to process return type for " + ee.toString());
if (ex instanceof RuntimeException)
throw (RuntimeException) ex;
throw new RuntimeException(ex);
}
}
}
}
}
|
Achterhoeker/XChange
|
xchange-cryptsy/src/main/java/com/xeiam/xchange/cryptsy/dto/marketdata/CryptsyOrderBook.java
|
package com.xeiam.xchange.cryptsy.dto.marketdata;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author ObsessiveOrange
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class CryptsyOrderBook {
private final int marketId;
private final List<CryptsyBuyOrder> buyOrders;
private final List<CryptsySellOrder> sellOrders;
/**
* Constructor
*/
@JsonCreator
public CryptsyOrderBook(@JsonProperty("marketid") int marketId, @JsonProperty("buyorders") List<CryptsyBuyOrder> buyOrders, @JsonProperty("sellorders") List<CryptsySellOrder> sellOrders) {
this.marketId = marketId;
this.buyOrders = buyOrders;
this.sellOrders = sellOrders;
}
public int marketId() {
return marketId;
}
public List<CryptsyBuyOrder> buyOrders() {
return buyOrders;
}
public List<CryptsySellOrder> sellOrders() {
return sellOrders;
}
@Override
public String toString() {
return "CryptsyOrderBook [Market ID='" + marketId + "',Buy Orders='" + buyOrders + "',Sell Orders=" + sellOrders + "]";
}
}
|
mailkiq/mailkiq
|
spec/features/billing_spec.rb
|
<reponame>mailkiq/mailkiq<gh_stars>10-100
require 'rails_helper'
RSpec.feature 'Billing' do
let(:account) { Fabricate.create :paid_account }
before do
FakeBilling.stub!
end
scenario 'suspends subscription' do
expect_any_instance_of(Iugu::Subscription).to receive(:suspend)
sign_in account
visit edit_account_registration_path
click_link 'Suspender'
expect(page.status_code).to eq 200
end
scenario 'activates subscription' do
FakeBilling.stub_subscription suspended: true
expect_any_instance_of(Iugu::Subscription).to receive(:activate)
sign_in account
visit edit_account_registration_path
click_link 'Ativar'
expect(page.status_code).to eq 200
end
end
|
Sigura/livecoding-mean
|
project/webapp/scripts/components/expenses.react.js
|
'use strict';
import React from 'react';
import objectAssign from 'object-assign'
import
{FormattedMessage} from 'react-intl'
import groupBy from '../constants/groupBy.react'
import AppDispatcher from '../dispatcher/dispatcher.react'
import extensions from '../utils/extensions.react'
import context from '../utils/context.react'
import Actions from '../actions/actions.react'
import UserStore from '../stores/user.react'
import ExpenseStore from '../stores/expenses.react'
/*eslint-disable no-unused-vars*/
import Alerts from './alerts.react'
import GroupBy from './groupByFilter.react'
import Filter from './filter.react'
import ExpenseGroup from './expenseGroup.react'
import NewExpense from './newExpense.react'
/*eslint-enable no-unused-vars*/
export default
//@context @extensions
class Expenses extends React.Component {
constructor(props, context) {
super(props, context);
this.state = this.getInitState();
}
getInitState() {
return {
groupBy: (this.props.params && this.props.params.groupBy) || groupBy.All,
newExpense: {},
items: {[groupBy.All]: []},
groups: [groupBy.All],
format: '',
loading: true
};
}
componentWillReceiveProps(obj){
let group = (obj.params && obj.params.groupBy) || groupBy.All;
this.setState({groupBy: group});
this.update(obj.list, group);
}
update(expenses, group) {
group = group || this.state.groupBy;
expenses = expenses || this.props.list;
let grouped = this.groupDictionary(expenses, group);
this.setState(grouped);
this.setState({loading: false, groupBy: group});
}
// simulateChange(ev){
// React.addons.TestUtils.simulateNativeEventOnNode('topInput', ev.target, {type:'input', target: ev.target});
// ev.stopImmediatePropagation();
// }
static filterChanged (filter) {
Actions.expensesLoad(filter);
}
static groupFormat(groupByLabel){
var groupFormat = null;
switch(groupByLabel){
case groupBy.Week:
groupFormat = 'YYYY-[W]ww';
break;
case groupBy.Month:
groupFormat = 'YYYY-MM';
break;
case groupBy.Year:
groupFormat = 'YYYY';
break;
}
return groupFormat;
}
groupDictionary(expenses, group) {
const state = this.state;
var groupDictionary, groups = [], groupFormat = Expenses.groupFormat(group || state.groupBy);
if(groupFormat) {
groupDictionary = {};
expenses.forEach((item) => {
var key = moment(item.date).format(groupFormat);
var groupExists = key in groupDictionary;
groupDictionary[key] = groupDictionary[key] || [];
groupDictionary[key].push(item);
!groupExists && groups.push(key);
});
}
return groupDictionary ? {items: groupDictionary, groups: groups, format: groupFormat} : {items: {'all': expenses}, groups: ['all'], format: ''};
}
static logOut(){
Actions.logOut();
}
render() {
const _ = this;
const cx = _.classSet;
const state = _.state;
const len = this.props.list && this.props.list.length || 0;
const maxDate = len && this.props.list[0].date;
const minDate = len && this.props.list[len - 1].date;
const sum = len && this.props.list.reduce((previousValue, currentValue, index, array) => previousValue + (Number(array[index].amount) || 0), 0);
const duration = (len && moment(maxDate).twix(minDate)) || (len && 1) || 0;
const days = (duration && duration.count('days')) || (len && 1) || 0;
const avg = (len && sum/len) || 0;
const dayAvg = (days && sum/days) || 0;
const weeks = (duration && duration.count('weeks')) || (len && 1) || 0;
const weekAvg = weeks && sum/weeks || dayAvg;
const months = (duration && duration.count('months')) || (len && 1) || 0;
const monthAvg = (months && sum/months) || weekAvg || dayAvg;
const years = (duration && duration.count('years')) || (len && 1) || 0;
const yearAvg = (years && sum/years) || monthAvg || weekAvg || dayAvg;
const width100P = {width: '100%'};
return (
<div className="expenses-list panel panel-default">
<div className="panel-heading">
<div className="btn-toolbar pull-right hidden-print"><a className="btn btn-default logout" href="javascript:void(0);" onClick={Expenses.logOut.bind(_)}>Logout</a></div>
<h2><FormattedMessage message={_.l10n('Expenses')}/></h2>
</div>
<div className={cx({'panel-body': true, 'hidden-print': true, 'hide-element': !state.loading})}>
<div className="progress">
<div className="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style={width100P}>
</div>
</div>
</div>
<div className={cx({'panel-body': true, 'hide-element': state.loading})}>
<Alerts />
<div className="col-sm-8">
<GroupBy />
<Filter onFilterChanged={Expenses.filterChanged} />
</div>
</div>
<table className={cx({'table': true, 'table-hover': true, 'table-condensed': true, 'hide-element': state.loading})}>
<thead>
<tr>
<th></th><th><FormattedMessage message={_.l10n('Date')}/></th><th>Time</th><th>Description</th><th>Amount</th><th>Comment</th>
</tr>
</thead>
<tfoot>
<tr className="info total">
<td>Total:</td>
<td colSpan="5"><FormattedMessage message={_.l10n('Total')} avg={avg} length={len} sum={sum} dayAvg={dayAvg} days={days} weekAvg={weekAvg} weeks={weeks} monthAvg={monthAvg} months={months} yearAvg={yearAvg} years={years} /></td>
</tr>
</tfoot>
<NewExpense />
{state.groups.map(function(name, i) {
return <ExpenseGroup key={state.groupBy + name + i} index={i} groupBy={state.groupBy} name={name} expenses={_.state.items[name]} format={state.format} />;
})}
</table>
</div>
);
}
}
Expenses.displayName = 'Expenses';
extensions(Expenses);
context(Expenses);
|
ild-games/Ancona
|
Engine/Src/Ancona/Framework/Resource/FontLoader.hpp
|
#ifndef Ancona_Engine_Resource_FontLoader_H_
#define Ancona_Engine_Resource_FontLoader_H_
#include <Ancona/Framework/Resource/SFMLResourceLoader.hpp>
#include <SFML/Graphics.hpp>
namespace ild
{
/**
* @brief Font loader is used to load an sf::Font
*
* @author <NAME>
*/
class FontLoader: public SFMLResourceLoader<sf::Font>
{
public:
/**
* @brief Initialize a font loader and register it with the ResourceLibrary
*
* @param resourceName Resource Type to be used (EX "FontTTF")
* @param fileExtension File extension to be used (EX "ttf")
*/
FontLoader(
const std::string & resourceName,
const std::string & fileExtension);
};
}
#endif
|
lpd6375/qlib
|
qlib/contrib/eva/alpha.py
|
"""
Here is a batch of evaluation functions.
The interface should be redesigned carefully in the future.
"""
import pandas as pd
from typing import Tuple
from qlib import get_module_logger
from qlib.utils.paral import complex_parallel, DelayedDict
from joblib import Parallel, delayed
def calc_long_short_prec(
pred: pd.Series, label: pd.Series, date_col="datetime", quantile: float = 0.2, dropna=False, is_alpha=False
) -> Tuple[pd.Series, pd.Series]:
"""
calculate the precision for long and short operation
:param pred/label: index is **pd.MultiIndex**, index name is **[datetime, instruments]**; columns names is **[score]**.
.. code-block:: python
score
datetime instrument
2020-12-01 09:30:00 SH600068 0.553634
SH600195 0.550017
SH600276 0.540321
SH600584 0.517297
SH600715 0.544674
label :
label
date_col :
date_col
Returns
-------
(pd.Series, pd.Series)
long precision and short precision in time level
"""
if is_alpha:
label = label - label.mean(level=date_col)
if int(1 / quantile) >= len(label.index.get_level_values(1).unique()):
raise ValueError("Need more instruments to calculate precision")
df = pd.DataFrame({"pred": pred, "label": label})
if dropna:
df.dropna(inplace=True)
group = df.groupby(level=date_col)
N = lambda x: int(len(x) * quantile)
# find the top/low quantile of prediction and treat them as long and short target
long = group.apply(lambda x: x.nlargest(N(x), columns="pred").label).reset_index(level=0, drop=True)
short = group.apply(lambda x: x.nsmallest(N(x), columns="pred").label).reset_index(level=0, drop=True)
groupll = long.groupby(date_col)
l_dom = groupll.apply(lambda x: x > 0)
l_c = groupll.count()
groups = short.groupby(date_col)
s_dom = groups.apply(lambda x: x < 0)
s_c = groups.count()
return (l_dom.groupby(date_col).sum() / l_c), (s_dom.groupby(date_col).sum() / s_c)
def calc_long_short_return(
pred: pd.Series,
label: pd.Series,
date_col: str = "datetime",
quantile: float = 0.2,
dropna: bool = False,
) -> Tuple[pd.Series, pd.Series]:
"""
calculate long-short return
Note:
`label` must be raw stock returns.
Parameters
----------
pred : pd.Series
stock predictions
label : pd.Series
stock returns
date_col : str
datetime index name
quantile : float
long-short quantile
Returns
----------
long_short_r : pd.Series
daily long-short returns
long_avg_r : pd.Series
daily long-average returns
"""
df = pd.DataFrame({"pred": pred, "label": label})
if dropna:
df.dropna(inplace=True)
group = df.groupby(level=date_col)
N = lambda x: int(len(x) * quantile)
r_long = group.apply(lambda x: x.nlargest(N(x), columns="pred").label.mean())
r_short = group.apply(lambda x: x.nsmallest(N(x), columns="pred").label.mean())
r_avg = group.label.mean()
return (r_long - r_short) / 2, r_avg
def pred_autocorr(pred: pd.Series, lag=1, inst_col="instrument", date_col="datetime"):
"""pred_autocorr.
Limitation:
- If the datetime is not sequential densely, the correlation will be calulated based on adjacent dates. (some users may expected NaN)
:param pred: pd.Series with following format
instrument datetime
SH600000 2016-01-04 -0.000403
2016-01-05 -0.000753
2016-01-06 -0.021801
2016-01-07 -0.065230
2016-01-08 -0.062465
:type pred: pd.Series
:param lag:
"""
if isinstance(pred, pd.DataFrame):
pred = pred.iloc[:, 0]
get_module_logger("pred_autocorr").warning("Only the first column in {pred.columns} of `pred` is kept")
pred_ustk = pred.sort_index().unstack(inst_col)
corr_s = {}
for (idx, cur), (_, prev) in zip(pred_ustk.iterrows(), pred_ustk.shift(lag).iterrows()):
corr_s[idx] = cur.corr(prev)
corr_s = pd.Series(corr_s).sort_index()
return corr_s
def pred_autocorr_all(pred_dict, n_jobs=-1, **kwargs):
"""
calculate auto correlation for pred_dict
Parameters
----------
pred_dict : dict
A dict like {<method_name>: <prediction>}
kwargs :
all these arguments will be passed into pred_autocorr
"""
ac_dict = {}
for k, pred in pred_dict.items():
ac_dict[k] = delayed(pred_autocorr)(pred, **kwargs)
return complex_parallel(Parallel(n_jobs=n_jobs, verbose=10), ac_dict)
def calc_ic(pred: pd.Series, label: pd.Series, date_col="datetime", dropna=False) -> (pd.Series, pd.Series):
"""calc_ic.
Parameters
----------
pred :
pred
label :
label
date_col :
date_col
Returns
-------
(pd.Series, pd.Series)
ic and rank ic
"""
df = pd.DataFrame({"pred": pred, "label": label})
ic = df.groupby(date_col).apply(lambda df: df["pred"].corr(df["label"]))
ric = df.groupby(date_col).apply(lambda df: df["pred"].corr(df["label"], method="spearman"))
if dropna:
return ic.dropna(), ric.dropna()
else:
return ic, ric
def calc_all_ic(pred_dict_all, label, date_col="datetime", dropna=False, n_jobs=-1):
"""calc_all_ic.
Parameters
----------
pred_dict_all :
A dict like {<method_name>: <prediction>}
label:
A pd.Series of label values
Returns
-------
{'Q2+IND_z': {'ic': <ic series like>
2016-01-04 -0.057407
...
2020-05-28 0.183470
2020-05-29 0.171393
'ric': <rank ic series like>
2016-01-04 -0.040888
...
2020-05-28 0.236665
2020-05-29 0.183886
}
...}
"""
pred_all_ics = {}
for k, pred in pred_dict_all.items():
pred_all_ics[k] = DelayedDict(["ic", "ric"], delayed(calc_ic)(pred, label, date_col=date_col, dropna=dropna))
pred_all_ics = complex_parallel(Parallel(n_jobs=n_jobs, verbose=10), pred_all_ics)
return pred_all_ics
|
kafkawize/kafkawize
|
src/main/java/com/kafkamgt/uiapi/model/TopicHistory.java
|
package com.kafkamgt.uiapi.model;
import lombok.Data;
import java.io.Serializable;
@Data
public class TopicHistory implements Serializable {
private String environmentName;
private String teamName;
private String requestedBy;
private String requestedTime;
private String approvedBy;
private String approvedTime;
private String remarks;
}
|
tkob/ermin
|
src/main/java/yokohama/lang/ermin/process/ErminDecl.java
|
<filename>src/main/java/yokohama/lang/ermin/process/ErminDecl.java
package yokohama.lang.ermin.process;
import lombok.Value;
import yokohama.lang.ermin.attribute.ErminName;
@Value
public class ErminDecl {
private final ErminName varName;
private final ErminName entityName;
}
|
robertPas/idmt
|
src/main/java/ibm/LoadReport.java
|
package ibm;
import java.util.*;
public class LoadReport
{
private Hashtable ht = new Hashtable();
private String outputDirectory, extension, baseName, logFileName;
public LoadReport(String outputDirectory, String extension, String baseName)
{
this.outputDirectory = outputDirectory;
this.extension = extension;
this.baseName = baseName;
if (Constants.win())
logFileName = baseName + "_OUTPUT.TXT";
else
logFileName = baseName + ".log";
}
public void reset()
{
ht.clear();
}
public class LoadReportItems
{
public String schemaName;
public String tableName;
public long rowsRead, rowsSkipped, rowsLoaded, rowsRejected, rowsDeleted, rowsCommitted;
}
}
|
ukis-yuhs/springmvc
|
Sample_common/src/main/java/com/yuhs/utils/secure/Base64Utils.java
|
package com.yuhs.utils.secure;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
/**
* Created by yuhaisheng on 2019/4/30.
*/
public class Base64Utils {
public static String getBase64(String str) {
byte[] b = null;
String s = null;
try {
b = str.getBytes("utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
}
if (b != null) {
s = new BASE64Encoder().encode(b);
}
return s;
}
public static String getBase64(byte[] b) {
String s = null;
if (b != null) {
s = new BASE64Encoder().encode(b);
}
return s;
}
public static byte[] base64ToByte(String s) {
byte[] b = null;
if (s != null) {
BASE64Decoder decoder = new BASE64Decoder();
try {
b = decoder.decodeBuffer(s);
} catch (Exception e) {
e.printStackTrace();
}
}
return b;
}
public static String getFromBase64(String s) throws IOException {
byte[] b = null;
String result = null;
if (s != null) {
BASE64Decoder decoder = new BASE64Decoder();
try {
b = decoder.decodeBuffer(s);
result = new String(b, "utf-8");
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
}
}
return result;
}
}
|
SimplisticCode/VDM_Toolkit
|
plugins/vdm2isa/java/src/main/java/vdm2isa/tr/definitions/TRProofScriptDefinition.java
|
<reponame>SimplisticCode/VDM_Toolkit
package vdm2isa.tr.definitions;
import com.fujitsu.vdmj.lex.LexLocation;
import com.fujitsu.vdmj.typechecker.NameScope;
import vdm2isa.lex.IsaToken;
import vdm2isa.lex.TRIsaVDMCommentList;
import vdm2isa.tr.TRNode;
import vdm2isa.tr.definitions.visitors.TRDefinitionVisitor;
public class TRProofScriptDefinition extends TRDefinition {
private static final long serialVersionUID = 1L;
private TRProofScriptStepDefinitionList poScript;
private static int poScriptName = 0;
public TRProofScriptDefinition(LexLocation location, TRIsaVDMCommentList comments,
TRProofScriptStepDefinitionList poScript)
{
super(null, location, comments, null, IsaToken.newNameToken(location, location.module, "PO_Script" + poScriptName++), NameScope.GLOBAL, true, false);
this.poScript = poScript;
}
@Override
public void setup()
{
super.setup();
TRNode.setup(poScript);
}
@Override
public IsaToken isaToken() {
return IsaToken.ISAR_PROOF;
}
@Override
public String translate() {
return poScript.translate();
}
@Override
public <R, S> R apply(TRDefinitionVisitor<R, S> visitor, S arg) {
return visitor.caseProofScriptDefinition(this, arg);
}
public static final TRProofScriptDefinition newProofScriptDefinition(LexLocation location, TRIsaVDMCommentList comments, TRProofScriptStepDefinitionList poScript)
{
TRProofScriptDefinition result = new TRProofScriptDefinition(location, comments, poScript);
TRNode.setup(result);
return result;
}
/**
* Creates an optimistic proof script delegating the proof to the try0 method then oopsing (done?) it
* @param location
* @return
*/
public static final TRProofScriptDefinition optimistic(LexLocation location)
{
return TRProofScriptDefinition.newProofScriptDefinition(location,
TRIsaVDMCommentList.newComment(location, "Expect the goal is trivial", false),
TRProofScriptStepDefinitionList.proofScript(
TRBasicProofScriptStepDefinition.isaTry0(location),
TRBasicProofScriptStepDefinition.oops(location))
);
}
/**
* Creates hopeful proof script delegating the proof to sledgehammer then oopsing (done?) it
* @param location
* @return
*/
public static final TRProofScriptDefinition hopeful(LexLocation location)
{
return TRProofScriptDefinition.newProofScriptDefinition(location,
TRIsaVDMCommentList.newComment(location, "Expect sldegehammer can find the proof", false),
TRProofScriptStepDefinitionList.proofScript(
TRBasicProofScriptStepDefinition.sledgehammer(location),
TRBasicProofScriptStepDefinition.oops(location))
);
}
/**
* Creates a pessimistic proof script expecting nitpick will find a counter example
* @param location
* @return
*/
public static final TRProofScriptDefinition pessimistic(LexLocation location)
{
return TRProofScriptDefinition.newProofScriptDefinition(location,
TRIsaVDMCommentList.newComment(location, "Expect Nitpick can find a counter example", false),
TRProofScriptStepDefinitionList.proofScript(
TRBasicProofScriptStepDefinition.nitpick(location),
TRBasicProofScriptStepDefinition.oops(location))
);
}
/**
* Creates a realistic proof script attempting all tools in the box (including try0, nitpick and sledgehammer)
* @param location
* @return
*/
public static final TRProofScriptDefinition realistic(LexLocation location)
{
return TRProofScriptDefinition.newProofScriptDefinition(location,
TRIsaVDMCommentList.newComment(location, "Try to be optimisstic, hopeful, then pessimistic", false),
TRProofScriptStepDefinitionList.proofScript(
TRBasicProofScriptStepDefinition.isaTry(location),
TRBasicProofScriptStepDefinition.oops(location))
);
}
/**
* Creates a proof script that accepts defeat against the PO
* @param location
* @return
*/
public static final TRProofScriptDefinition surrender(LexLocation location)
{
return TRProofScriptDefinition.newProofScriptDefinition(location,
TRIsaVDMCommentList.newComment(location, "Surrender", false),
TRProofScriptStepDefinitionList.proofScript(
TRBasicProofScriptStepDefinition.oops(location))
);
}
}
|
saymagic/dockerandroid
|
app/src/main/java/com/dockerandroid/domain/usecase/RefreshImageUseCase.java
|
/*
* Copyright (c) 2016 saymagic <<EMAIL>>
*
* This file is a part of project DockerAndroid
*
* Licensed under the Apache License, Version 2.0 (the "License”);
*/
package com.dockerandroid.domain.usecase;
import android.support.annotation.NonNull;
import com.dockerandroid.data.api.DockerApiService;
import com.dockerandroid.data.dbo.Image;
import com.dockerandroid.data.dbo.ServerInfo;
import com.fernandocejas.frodo.annotation.RxLogObservable;
import java.util.List;
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
/**
* Created by saymagic on 2016/2/17.
*/
public class RefreshImageUseCase extends UseCase<List<Image>, ServerInfo> {
DockerApiService mService;
public RefreshImageUseCase(@NonNull DockerApiService apiService) {
mService = apiService;
}
@Override
@RxLogObservable
protected Observable<List<Image>> execute(@NonNull ServerInfo params) {
return mService.getImages()
.flatMap(imageResponses -> Observable.from(imageResponses))
.map(imageResponse -> imageResponse.transformToDbo())
.toList()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
}
|
igorscosta/rest4mex
|
log4mex/src/main/java/org/aksw/mex/log4mex/core/HardwareConfigurationVO.java
|
<filename>log4mex/src/main/java/org/aksw/mex/log4mex/core/HardwareConfigurationVO.java<gh_stars>0
package org.aksw.mex.log4mex.core;
import org.aksw.mex.log4mex.InstanceObjects;
import org.aksw.mex.util.MEXEnum;
import org.apache.commons.lang3.StringUtils;
/**
* Created by esteves on 26.06.15.
*/
public class HardwareConfigurationVO extends InstanceObjects {
private String _os = "";
private String _cpu = "";
private String _memory = "";
private String _hd = "";
private String _cache = "";
private String _video = "";
public HardwareConfigurationVO(MEXEnum.EnumProcessors cpu, MEXEnum.EnumRAM memory, MEXEnum.EnumCaches cache){
this._cache =cache.toString();
this._memory = memory.toString();
this._cpu=cpu.toString();
this.setLabel("Hardware configuration");
}
public HardwareConfigurationVO(){
this.setLabel("Hardware configuration");
}
public void setOperationalSystem(String value){
this._os = value;
}
public void setMemory(MEXEnum.EnumRAM value){
this._memory = value.toString();
}
public void setCPU(MEXEnum.EnumProcessors value){
this._cpu = value.toString();
}
public void setHD(String value){
this._hd = value;
}
public void setCache(MEXEnum.EnumCaches value){
this._cache = value.toString();
}
public void setVideoGraph(String value){
this._video = value;
}
public String getOs() {return _os;}
public String getCPU() {return _cpu;}
public String getMemory() {return _memory;}
public String getHD() {return _hd;}
public String getCache() {return _cache;}
public String getVideo() {return _video;}
public boolean hasValue(){
if ((this._os != null && !this._os.isEmpty()) ||
(this._video != null && !this._video.isEmpty()) ||
(this._cpu != null && !this._cpu.isEmpty()) ||
(this._memory != null && !this._memory.isEmpty()) ||
(this._hd != null && !this._hd.isEmpty()) ||
(this._cache != null && !this._cache.isEmpty())){
return true;
}else{
return false;
}
}
@Override
public boolean equals(Object other) {
if (!(other instanceof HardwareConfigurationVO)) {
return false;
}
HardwareConfigurationVO that = (HardwareConfigurationVO) other;
return this._os.equals(that._os)
&& this._cpu.equals(that._cpu)
&& this._cache.equals(that._cache)
&& this._video.equals(that._video)
&& this._memory.equals(that._memory)
&& this._hd.equals(that._hd);
}
@Override
public int hashCode() {
int hashCode = 1;
if (StringUtils.isNotEmpty(this._os) && StringUtils.isNotBlank(this._os))
hashCode = hashCode * 37 + this._os.hashCode();
if (StringUtils.isNotEmpty(this._cpu) && StringUtils.isNotBlank(this._cpu))
hashCode = hashCode * 37 + this._cpu.hashCode();
if (StringUtils.isNotEmpty(this._cache) && StringUtils.isNotBlank(this._cache))
hashCode = hashCode * 37 + this._cache.hashCode();
if (StringUtils.isNotEmpty(this._video) && StringUtils.isNotBlank(this._video))
hashCode = hashCode * 37 + this._video.hashCode();
if (StringUtils.isNotEmpty(this._memory) && StringUtils.isNotBlank(this._memory))
hashCode = hashCode * 37 + this._memory.hashCode();
if (StringUtils.isNotEmpty(this._hd) && StringUtils.isNotBlank(this._hd))
hashCode = hashCode * 37 + this._hd.hashCode();
return hashCode;
}
}
|
CrackerCat/iWeChat
|
header6.6.1/QDataCacheSql.h
|
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <objc/NSObject.h>
@class NSString, QDBDatabase, QDataStoreSelectorTencent, QDataStoreSelectorWorldmap;
@interface QDataCacheSql : NSObject
{
QDataStoreSelectorTencent *_tencent;
QDataStoreSelectorWorldmap *_worldmap;
NSString *_dbpath;
QDBDatabase *_db;
}
+ (id)singlton;
@property(retain, nonatomic) QDBDatabase *db; // @synthesize db=_db;
@property(retain, nonatomic) NSString *dbpath; // @synthesize dbpath=_dbpath;
@property(retain, nonatomic) QDataStoreSelectorWorldmap *worldmap; // @synthesize worldmap=_worldmap;
@property(retain, nonatomic) QDataStoreSelectorTencent *tencent; // @synthesize tencent=_tencent;
- (void).cxx_destruct;
- (_Bool)executeInsert:(id)arg1;
- (_Bool)executeUpdate:(id)arg1;
- (_Bool)executeQuery:(id)arg1;
- (void)resetDataWith:(id)arg1;
- (id)encryptItem:(id)arg1;
- (id)decryptItem:(id)arg1;
- (id)selector:(id)arg1;
- (void)close;
- (void)open;
- (void)initData;
- (void)dealloc;
- (id)initWithPath:(id)arg1;
@end
|
gapra-msft/azure-storage-fuse
|
cpplite/include/compare.h
|
<filename>cpplite/include/compare.h
#pragma once
#ifdef __linux__
#include <string.h>
#else
#include <cstring>
#include <string>
#endif
#ifdef _MSC_VER
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#endif
namespace azure { namespace storage_lite {
// Case insensitive comparator for std::map comparator
struct case_insensitive_compare
{
bool operator()(const std::string &lhs, const std::string &rhs) const
{
return strcasecmp(lhs.c_str(), rhs.c_str()) < 0;
}
};
}} // azure::storage_lite
|
pelican/pelican
|
pelican/examples/reference/DataBlobExample.h
|
#ifndef DATABLOBEXAMPLE_H
#define DATABLOBEXAMPLE_H
/**
* @file DataBlobExample.h
*/
#include "data/DataBlob.h"
#include <vector>
using namespace pelican;
/**
* @ingroup c_examples
*
* @class DataBlobExample
*
* @brief
* Data blob to hold an array of floating-point data.
*
* @details
* This data blob holds an array of floating-point data.
*/
/*
* This data blob holds an array of floating-point data.
*/
class DataBlobExample : public DataBlob
{
public:
// Constructs an example data blob.
DataBlobExample() : DataBlob("DataBlobExample") {}
/// Returns a const pointer to the start of the data.
const float* data() const { return (_data.size() > 0 ? &_data[0] : 0); }
/// Returns a pointer to the start of the data.
float* data() { return (_data.size() > 0 ? &_data[0] : 0); }
// Resizes the data store provided by the data blob.
void resize(unsigned length) { _data.resize(length); }
// Returns the size of the data.
unsigned size() const { return _data.size(); }
private:
std::vector<float> _data; // The actual data array.
};
PELICAN_DECLARE_DATABLOB(DataBlobExample)
// Other example data blobs used by the example pipeline.
typedef DataBlobExample DataBlobExample1;
typedef DataBlobExample DataBlobExample2;
PELICAN_DECLARE_DATABLOB(DataBlobExample1)
PELICAN_DECLARE_DATABLOB(DataBlobExample2)
#endif // DATABLOBEXAMPLE_H
|
Dr-Turtle/DRG_ModPresetManager
|
Source/FSD/Public/EShoutType.h
|
#pragma once
#include "CoreMinimal.h"
#include "EShoutType.generated.h"
UENUM()
enum class EShoutType : uint8 {
Attention,
Follow,
StandingDown,
Downed,
RequestRevive,
Revived,
Resupply,
FriendlyFire,
KillCry,
Dead,
Cheating,
ResourceFull,
ResourceFullNoDonkey,
CallDonkey,
CallDonkey_NotInMission,
Depositing,
DepositingNoDonkey,
OutOfAmmo,
Reloading,
CharacterSelected,
UpgradeBought,
WaitingInDropPod,
Carrying,
};
|
vinayakpokharkar/aws-sdk-java
|
aws-java-sdk-lookoutmetrics/src/main/java/com/amazonaws/services/lookoutmetrics/package-info.java
|
/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
/**
* <p>
* This is the <i>Amazon Lookout for Metrics API Reference</i>. For an introduction to the service with tutorials for
* getting started, visit <a href="https://docs.aws.amazon.com/lookoutmetrics/latest/dev">Amazon Lookout for Metrics
* Developer Guide</a>.
* </p>
*/
package com.amazonaws.services.lookoutmetrics;
|
CarysT/medusa
|
Standard/Test.h
|
<filename>Standard/Test.h
/*
Test.h
All component tests use this component
(c)2005 Palestar, <NAME>
*/
#ifndef TEST_H
#define TEST_H
//-------------------------------------------------------------------------------
// On test failure, this exception is thrown
class TestException {};
// Behaves like "assert"
inline void Test( bool result )
{
if ( !result )
throw TestException();
}
#endif
//-------------------------------------------------------------------------------
// EOF
|
rohankumardubey/empire-db
|
empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java
|
<reponame>rohankumardubey/empire-db<filename>empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.empire.db;
import org.apache.empire.commons.StringUtils;
import org.apache.empire.data.DataType;
import org.apache.empire.db.DBIndex.DBIndexType;
import org.apache.empire.dbms.DBMSHandler;
import org.apache.empire.exceptions.InvalidArgumentException;
import org.apache.empire.exceptions.NotImplementedException;
import org.apache.empire.exceptions.NotSupportedException;
import org.apache.empire.exceptions.UnspecifiedErrorException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class DBDDLGenerator<T extends DBMSHandler>
{
private static final Logger log = LoggerFactory.getLogger(DBDDLGenerator.class);
/**
* DDLActionType for DDLScript generation
*/
public enum DDLActionType
{
CREATE,
DROP,
ALTER,
}
protected final T dbms;
// Data types
protected String DATATYPE_INT_SMALL = "SMALLINT"; // Integer with small size (usually 16-bit)
protected String DATATYPE_INTEGER = "INT"; // Integer with default size (usually 32-bit)
protected String DATATYPE_INT_BIG = "BIGINT"; // Integer with long size (usually 64-bit)
protected String DATATYPE_CHAR = "CHAR"; // Fixed length characters (unicode)
protected String DATATYPE_VARCHAR = "VARCHAR"; // variable length characters (unicode)
protected String DATATYPE_DATE = "DATE";
protected String DATATYPE_TIME = "TIME";
protected String DATATYPE_TIMESTAMP = "TIMESTAMP";
protected String DATATYPE_BOOLEAN = "BIT";
protected String DATATYPE_DECIMAL = "DECIMAL";
protected String DATATYPE_FLOAT = "FLOAT"; // floating point number (double precision 8 bytes)
protected String DATATYPE_CLOB = "CLOB";
protected String DATATYPE_BLOB = "BLOB";
protected String DATATYPE_UNIQUEID = "CHAR(36)"; // Globally Unique Identifier
// Options
protected boolean namePrimaryKeyConstraint = false; // Add name for primary key constraint
protected String alterColumnPhrase = " ALTER "; // Phrase for altering a column
protected String databaseObjectName = "DATABASE"; // Database object name for DROP database
// Flag whether or not to set column defaults when crating DDL statements
protected boolean ddlColumnDefaults = false;
protected DBDDLGenerator(T dbmsHandler)
{
this.dbms = dbmsHandler;
}
/**
* @return <code>true</code> if column default values are created with dll statements or <code>false</code> if not
*/
public boolean isDDLColumnDefaults()
{
return ddlColumnDefaults;
}
/**
* Set true if column default values should be included in DDL Statements
*
* @param ddlColumnDefaults <code>true</code> if dll statements should include
* column default values or <code>false</code> if not
*/
public void setDDLColumnDefaults(boolean ddlColumnDefaults)
{
this.ddlColumnDefaults = ddlColumnDefaults;
}
// Add statements
protected void addCreateTableStmt(DBTable table, StringBuilder sql, DBSQLScript script)
{
log.info("Adding create statmement for table {}.", table.getName());
script.addStmt(sql);
}
protected void addCreateIndexStmt(DBIndex index, StringBuilder sql, DBSQLScript script)
{
log.info("Adding create statmement for index {}.", index.getName());
script.addStmt(sql);
}
protected void addCreateRelationStmt(DBRelation rel, StringBuilder sql, DBSQLScript script)
{
log.info("Adding create statmement for relation {}.", rel.getName());
script.addStmt(sql);
}
protected void addCreateViewStmt(DBView v, StringBuilder sql, DBSQLScript script)
{
log.info("Adding create statmement for view {}.", v.getName());
script.addStmt(sql);
}
protected void addAlterTableStmt(DBColumn col, StringBuilder sql, DBSQLScript script)
{
log.info("Adding alter statmement for column {}.", col.getFullName());
script.addStmt(sql);
}
/**
* appends the data type of a column
* @param type the type
* @param size the size
* @param sql the builder that we will append to
* @return true if further column attributes may be added or false otherwise
*/
protected boolean appendColumnDataType(DataType type, double size, DBTableColumn c, StringBuilder sql)
{
switch (type)
{
case INTEGER:
case AUTOINC:
{ int bytes = Math.abs((int)size);
if (bytes>0 && bytes<3)
sql.append(DATATYPE_INT_SMALL);
else if (bytes>4)
sql.append(DATATYPE_INT_BIG);
else // Default
sql.append(DATATYPE_INTEGER); // Default integer length
}
break;
case VARCHAR:
case CHAR:
{ // Char or Varchar
sql.append((type==DataType.CHAR) ? DATATYPE_CHAR : DATATYPE_VARCHAR);
// get length (sign may be used for specifying (unicode>0) or bytes (non-unicode<0))
int len = Math.abs((int)size);
if (len == 0)
len = (type==DataType.CHAR) ? 1 : 100;
sql.append("(");
sql.append(String.valueOf(len));
sql.append(")");
}
break;
case DATE:
sql.append(DATATYPE_DATE);
break;
case TIME:
sql.append(DATATYPE_TIME);
break;
case DATETIME:
case TIMESTAMP:
sql.append(DATATYPE_TIMESTAMP);
break;
case BOOL:
sql.append(DATATYPE_BOOLEAN);
break;
case FLOAT:
{ sql.append(DATATYPE_FLOAT);
// append precision (if specified)
int prec = Math.abs((int)size);
if (prec>0) {
sql.append("(");
sql.append(String.valueOf(prec));
sql.append(")");
}
break;
}
case DECIMAL:
{ sql.append(DATATYPE_DECIMAL);
int prec = (int) size;
int scale = c.getDecimalScale();
if (prec>0) {
// append precision and scale
sql.append("(");
sql.append(String.valueOf(prec));
sql.append(",");
sql.append(String.valueOf(scale));
sql.append(")");
}
}
break;
case CLOB:
sql.append(DATATYPE_CLOB);
break;
case BLOB:
sql.append(DATATYPE_BLOB);
if (size > 0) {
sql.append("(").append((long) size).append(") ");
}
break;
case UNIQUEID:
// emulate using java.util.UUID
sql.append(DATATYPE_UNIQUEID);
break;
default:
// Error: Unable to append column of type UNKNOWN
throw new UnspecifiedErrorException("Error: Unable to append column of type UNKNOWN");
}
// done. Add more attributes (like e.g. NULLABLE or NOT NULL)
return true;
}
/**
* Appends a table column definition to a ddl statement
* @param c the column which description to append
* @param alter true if altering an existing column or false otherwise
* @param sql the sql builder object
*/
protected void appendColumnDesc(DBTableColumn c, boolean alter, StringBuilder sql)
{
// Append name
c.addSQL(sql, DBExpr.CTX_NAME);
sql.append(" ");
// Unknown data type
if (!appendColumnDataType(c.getDataType(), c.getSize(), c, sql))
return;
// Default Value
if (isDDLColumnDefaults() && !c.isAutoGenerated() && c.getDefaultValue()!=null)
{ sql.append(" DEFAULT ");
sql.append(dbms.getValueString(c.getDefaultValue(), c.getDataType()));
}
// Nullable
if (c.isRequired() || c.isAutoGenerated())
sql.append(" NOT NULL");
}
/**
* Appends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.
* @param type operation to perform (CREATE, DROP, ALTER)
* @param dbo the object for which to perform the operation (DBDatabase, DBTable, DBView, DBColumn, DBRelation)
* @param script the script to which to add the DDL command(s)
*/
public void getDDLScript(DDLActionType type, DBObject dbo, DBSQLScript script)
{
// The Object's database must be attached to this dbms
if (dbo==null || dbo.getDatabase().getDbms()!=dbms)
throw new InvalidArgumentException("dbo", dbo);
// Check Type of object
String schema = dbo.getDatabase().getSchema();
if (dbo instanceof DBDatabase)
{ // Database
switch (type)
{
case CREATE:
createDatabase((DBDatabase) dbo, script);
return;
case DROP:
dropObject(null, schema, databaseObjectName, script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBTable)
{ // Table
switch (type)
{
case CREATE:
createTable((DBTable) dbo, script);
return;
case DROP:
dropObject(schema, ((DBTable) dbo).getName(), "TABLE", script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBView)
{ // View
switch (type)
{
case CREATE:
createView((DBView) dbo, script);
return;
case DROP:
dropObject(schema, ((DBView) dbo).getName(), "VIEW", script);
return;
case ALTER:
dropObject(schema, ((DBView) dbo).getName(), "VIEW", script);
createView((DBView) dbo, script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBRelation)
{ // Relation
switch (type)
{
case CREATE:
createRelation((DBRelation) dbo, script);
return;
case DROP:
dropObject(schema, ((DBRelation) dbo).getName(), "CONSTRAINT", script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBIndex)
{ // Relation
switch (type)
{
case CREATE:
createIndex(((DBIndex) dbo).getTable(), (DBIndex) dbo, script);
return;
case DROP:
dropObject(schema, ((DBIndex) dbo).getName(), "INDEX", script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBTableColumn)
{ // Table Column
alterTable((DBTableColumn) dbo, type, script);
}
else
{ // dll generation not supported for this type
throw new NotSupportedException(this, "getDDLScript() for "+dbo.getClass().getName());
}
}
/**
* Appends the DDL-Script for creating the given database to an SQL-Script<br>
* This includes the generation of all tables, views and relations.
* @param db the database to create
* @param script the sql script to which to append the dll command(s)
*/
protected void createDatabase(DBDatabase db, DBSQLScript script)
{
// Create all Tables
for (DBTable dbTable : db.getTables())
{
createTable(dbTable, script);
}
// Create Relations
for (DBRelation dbRelation : db.getRelations())
{
createRelation(dbRelation, script);
}
// Create Views
for (DBView v : db.getViews())
{
try {
createView(v, script);
} catch (NotSupportedException e) {
// View command not implemented
log.warn("Error creating the view {0}. This view will be ignored.", v.getName());
}
}
}
/**
* Appends the DDL-Script for dropping a database to the given script object
* @param db the database to drop
* @param script the sql script to which to append the dll command(s)
*/
protected void dropDatabase(DBDatabase db, DBSQLScript script)
{
dropObject(null, db.getSchema(), "DATABASE", script);
}
/**
* Appends the DDL-Script for creating the given table to an SQL-Script
* @param t the table to create
* @param script the sql script to which to append the dll command(s)
*/
protected void createTable(DBTable t, DBSQLScript script)
{
StringBuilder sql = new StringBuilder();
sql.append("-- creating table ");
sql.append(t.getName());
sql.append(" --\r\n");
sql.append("CREATE TABLE ");
t.addSQL(sql, DBExpr.CTX_FULLNAME);
sql.append(" (");
boolean addSeparator = false;
for (DBColumn dbColumn : t.getColumns()) {
DBTableColumn c = (DBTableColumn) dbColumn;
if (c.getDataType() == DataType.UNKNOWN)
continue; // Ignore and continue;
// Append column
sql.append((addSeparator) ? ",\r\n " : "\r\n ");
appendColumnDesc(c, false, sql);
addSeparator = true;
}
// Primary Key
DBIndex pk = t.getPrimaryKey();
if (pk != null)
{ // add the primary key
sql.append(",\r\n");
if (namePrimaryKeyConstraint) {
sql.append(" CONSTRAINT ");
appendElementName(sql, pk.getName());
}
sql.append(" PRIMARY KEY (");
addSeparator = false;
// columns
DBColumn[] keyColumns = pk.getColumns();
for (DBColumn keyColumn : keyColumns) {
sql.append(addSeparator ? ", " : "");
keyColumn.addSQL(sql, DBExpr.CTX_NAME);
addSeparator = true;
}
sql.append(")");
}
sql.append(")");
// Create the table
addCreateTableStmt(t, sql, script);
// Create all Indexes
createTableIndexes(t, pk, script);
}
/**
* Appends the DDL-Script for creating all indexes of table (except the primary key) to an SQL-Script
* @param t the table to create
* @param pk the primary key index to ignore
* @param script the sql script to which to append the dll command(s)
*/
protected void createTableIndexes(DBTable t, DBIndex pk, DBSQLScript script)
{
// Create other Indexes (except primary key)
for (DBIndex idx : t.getIndexes())
{
if (idx == pk || idx.getType() == DBIndexType.PRIMARY_KEY)
continue;
// Create Index
createIndex(t, idx, script);
}
}
/**
* Appends the DDL-Script for creating a single index to an SQL-Script
* @param t the table
* @param idx the index to create
* @param script the sql script to which to append the dll command(s)
*/
protected void createIndex(DBTable t, DBIndex idx, DBSQLScript script)
{
StringBuilder sql = new StringBuilder();
// Create Index
sql.append((idx.getType().isUnique()) ? "CREATE UNIQUE INDEX " : "CREATE INDEX ");
appendElementName(sql, idx.getName());
sql.append(" ON ");
t.addSQL(sql, DBExpr.CTX_FULLNAME);
sql.append(" (");
// columns
boolean addSeparator = false;
DBExpr[] idxColumns = idx.getExpressions();
for (DBExpr idxColumn : idxColumns)
{
sql.append(addSeparator ? ", " : "");
idxColumn.addSQL(sql, DBExpr.CTX_NAME);
sql.append("");
addSeparator = true;
}
sql.append(")");
// Create Index
addCreateIndexStmt(idx, sql, script);
}
/**
* Appends the DDL-Script for creating the given foreign-key relation to an SQL-Script
* @param r the relation to create
* @param script the sql script to which to append the dll command(s)
*/
protected void createRelation(DBRelation r, DBSQLScript script)
{
DBTable sourceTable = (DBTable) r.getReferences()[0].getSourceColumn().getRowSet();
DBTable targetTable = (DBTable) r.getReferences()[0].getTargetColumn().getRowSet();
StringBuilder sql = new StringBuilder();
sql.append("-- creating foreign key constraint ");
sql.append(r.getName());
sql.append(" --\r\n");
sql.append("ALTER TABLE ");
sourceTable.addSQL(sql, DBExpr.CTX_FULLNAME);
sql.append(" ADD CONSTRAINT ");
appendElementName(sql, r.getName());
sql.append(" FOREIGN KEY (");
// Source Names
boolean addSeparator = false;
DBRelation.DBReference[] refs = r.getReferences();
for (DBRelation.DBReference ref1 : refs)
{
sql.append((addSeparator) ? ", " : "");
ref1.getSourceColumn().addSQL(sql, DBExpr.CTX_NAME);
addSeparator = true;
}
// References
sql.append(") REFERENCES ");
targetTable.addSQL(sql, DBExpr.CTX_FULLNAME);
sql.append(" (");
// Target Names
addSeparator = false;
for (DBRelation.DBReference ref : refs)
{
sql.append((addSeparator) ? ", " : "");
ref.getTargetColumn().addSQL(sql, DBExpr.CTX_NAME);
addSeparator = true;
}
sql.append(")");
// On Delete Action
if (r.getOnDeleteAction()==DBRelation.DBCascadeAction.CASCADE)
{
sql.append(" ON DELETE CASCADE");
}
// done
addCreateRelationStmt(r, sql, script);
}
/**
* Appends the DDL-Script for altering a table to an SQL-Script
* @param col the column which to add, modify or drop
* @param type the type of operation to perform (CREATE | MODIFY | DROP)
* @param script the sql script to which to append the dll command(s)
*/
protected void alterTable(DBTableColumn col, DDLActionType type, DBSQLScript script)
{
StringBuilder sql = new StringBuilder();
sql.append("ALTER TABLE ");
col.getRowSet().addSQL(sql, DBExpr.CTX_FULLNAME);
switch(type)
{
case CREATE:
sql.append(" ADD ");
appendColumnDesc(col, false, sql);
break;
case ALTER:
sql.append(alterColumnPhrase);
/*
sql.append(" ALTER "); // Derby, H2,
sql.append(" MODIFY "); // MySQL, Oracle
sql.append(" ALTER COLUMN "); // HSQL, Postgre, SQLServer
*/
appendColumnDesc(col, true, sql);
break;
case DROP:
sql.append(" DROP COLUMN ");
sql.append(col.getName());
break;
}
// done
addAlterTableStmt(col, sql, script);
}
/**
* Appends the DDL-Script for creating the given view to an SQL-Script
* @param v the view to create
* @param script the sql script to which to append the dll command(s)
*/
protected void createView(DBView v, DBSQLScript script)
{
// Create the Command
DBCommandExpr cmd = v.createCommand();
if (cmd==null)
{ // Check whether Error information is available
log.error("No command has been supplied for view " + v.getName());
throw new NotSupportedException(this, v.getName() + ".createCommand");
}
// Make sure there is no OrderBy
cmd.clearOrderBy();
// Build String
StringBuilder sql = new StringBuilder();
sql.append( "CREATE VIEW ");
v.addSQL(sql, DBExpr.CTX_FULLNAME);
sql.append( " (" );
boolean addSeparator = false;
for(DBColumn c : v.getColumns())
{
if (addSeparator)
sql.append(", ");
// Add Column name
c.addSQL(sql, DBExpr.CTX_NAME);
// next
addSeparator = true;
}
sql.append(")\r\nAS\r\n");
cmd.addSQL( sql, DBExpr.CTX_DEFAULT);
// done
addCreateViewStmt(v, sql, script);
}
/**
* Appends the DDL-Script for dropping a database object to an SQL-Script
* @param name the name of the object to delete
* @param objType the type of object to delete (TABLE, COLUMN, VIEW, RELATION, etc)
* @param script the sql script to which to append the dll command(s)
*/
protected void dropObject(String schema, String name, String objType, DBSQLScript script)
{
if (StringUtils.isEmpty(name))
throw new InvalidArgumentException("name", name);
// Create Drop Statement
StringBuilder sql = new StringBuilder();
sql.append("DROP ");
sql.append(objType);
sql.append(" ");
if (StringUtils.isNotEmpty(schema))
{ // append schema
sql.append(schema);
sql.append(".");
}
appendElementName(sql, name);
script.addStmt(sql);
}
protected void appendElementName(StringBuilder sql, String name)
{
dbms.appendObjectName(sql, name, null);
}
}
|
zubtsov/competitive-programming
|
codeforces.com/1490A/solution.py
|
<gh_stars>0
from math import ceil, log2
for t in range(int(input())):
array_len = int(input())
array = list(map(int, input().split()))
numbers_to_insert = 0
for i in range(1, array_len):
ratio = max(array[i - 1], array[i]) / min(array[i - 1], array[i])
if ratio > 2:
numbers_to_insert += ceil(log2(ratio)) - 1
print(numbers_to_insert)
|
AnneSophieS/manager
|
packages/manager/apps/dedicated/client/app/cdn/dedicated/manage/logs/cdn-dedicated-manage-logs.routes.js
|
angular.module('App').config(($stateProvider) => {
$stateProvider.state('app.networks.cdn.dedicated.logs', {
url: '/logs',
views: {
cdnView: {
templateUrl: 'cdn/dedicated/manage/logs/cdn-dedicated-manage-logs.html',
controller: 'CdnLogsCtrl',
controllerAs: '$ctrl',
},
},
translations: { value: ['.'], format: 'json' },
});
});
|
igiant/connect
|
senderPolicy.go
|
<filename>senderPolicy.go
package connect
import "encoding/json"
type SenderPolicyOptions struct {
AuthenticationRequired bool `json:"authenticationRequired"` // Require sender authentication for local domains
AntiSpoofingEnabled bool `json:"antiSpoofingEnabled"` // Is Antispoofing enabled
IPWhiteList OptionalEntity `json:"IPWhiteList"` // Trusted senders (Not chceked by anti-spoofing)
}
// SenderPolicyGet - Obtain Sender Policy options.
// Return
// options - current sender options
func (s *ServerConnection) SenderPolicyGet() (*SenderPolicyOptions, error) {
data, err := s.CallRaw("SenderPolicy.get", nil)
if err != nil {
return nil, err
}
options := struct {
Result struct {
Options SenderPolicyOptions `json:"options"`
} `json:"result"`
}{}
err = json.Unmarshal(data, &options)
return &options.Result.Options, err
}
// SenderPolicySet - Set Sender Policy options.
// options - options to be updated
func (s *ServerConnection) SenderPolicySet(options SenderPolicyOptions) error {
params := struct {
Options SenderPolicyOptions `json:"options"`
}{options}
_, err := s.CallRaw("SenderPolicy.set", params)
return err
}
|
ak-ustutt/GeCCo-public
|
include/par_scale_copy_modes.h
|
<filename>include/par_scale_copy_modes.h<gh_stars>0
integer,parameter::
& MOD_SQUARE = 1,
& MOD_MULT = 2,
& MOD_PRECOND = 3,
& MOD_PRC_THRESH = 4,
& MOD_SCALE = 5,
& MOD_ADD_VEC = 6
|
Ibrahimovic88/Alphago365
|
octopus-backend/src/main/java/com/alphago365/octopus/model/BoundaryChange.java
|
package com.alphago365.octopus.model;
public enum BoundaryChange {
DOWN, UP, KEEP
}
|
seed-age/circulate
|
src/main/java/com/sunnsoft/ext/base/Jsonp.java
|
<reponame>seed-age/circulate
package com.sunnsoft.ext.base;
import com.opensymphony.xwork2.ActionSupport;
import com.sunnsoft.util.struts2.Results;
public class Jsonp extends ActionSupport {
/**
*
*/
private static final long serialVersionUID = 1L;
private String callback;
protected String json;
public String getCallback() {
return callback;
}
public void setCallback(String callback) {
this.callback = callback;
}
public String getJson() {
return json;
}
public void setJson(String json) {
this.json = json;
}
@Override
public String execute() throws Exception {
return Results.GLOBAL_JSONP;
}
}
|
YoduYodu/school-projects
|
school-projects/principals-of-software-development/trip-advisor-backend/src/main/java/hotel/ReentrantReadWriteLock.java
|
package hotel;
import java.util.HashMap;
import java.util.Map;
/**
* A custom reentrant read/write lock that allows:
* 1) Multiple readers (when there is no writer). Any thread can acquire multiple read locks (if nobody is writing).
* 2) One writer (when nobody else is writing or reading).
* 3) A writer is allowed to acquire a read lock while holding the write lock.
* 4) A writer is allowed to acquire another write lock while holding the write lock.
* 5) A reader can not acquire a write lock while holding a read lock.
*
* Use ReentrantReadWriteLockTest to test this class.
* The code is modified from the code of Prof. Rollins.
*/
public class ReentrantReadWriteLock {
private Map<Long, Integer> readerCounter;
private Map<Long, Integer> writerCounter;
/**
* Constructor for ReentrantReadWriteLock
*/
public ReentrantReadWriteLock() {
readerCounter = new HashMap<>();
writerCounter = new HashMap<>();
}
/**
* Return true if the current thread holds a read lock.
*
* @return true or false
*/
public synchronized boolean isReadLockHeldByCurrentThread() {
return readerCounter.containsKey(Thread.currentThread().getId());
}
/**
* Return true if the current thread holds a write lock.
*
* @return true or false
*/
public synchronized boolean isWriteLockHeldByCurrentThread() {
return writerCounter.containsKey(Thread.currentThread().getId());
}
/**
* Non-blocking method that attempts to acquire the read lock. Returns true
* if successful.
* Checks conditions (whether it can acquire the read lock), and if they are true,
* updates readers info.
*
* Note that if conditions are false (can not acquire the read lock at the moment), this method
* does NOT wait, just returns false
* @return true if the read lock is acquired
*/
public synchronized boolean tryAcquiringReadLock() {
Long threadId = Thread.currentThread().getId();
if (writerCounter.size() != 0 && !isWriteLockHeldByCurrentThread()) {
return false;
} else {
readerCounter.put(threadId, readerCounter.getOrDefault(threadId, 0) + 1);
return true;
}
}
/**
* Non-blocking method that attempts to acquire the write lock. Returns true
* if successful.
* Checks conditions (whether it can acquire the write lock), and if they are true,
* updates writers info.
*
* Note that if conditions are false (can not acquire the write lock at the moment), this method
* does NOT wait, just returns false
*
* @return true if the writer lock is acquired
*/
public synchronized boolean tryAcquiringWriteLock() {
Long threadId = Thread.currentThread().getId();
if (readerCounter.size() != 0) {
return false;
} else if (writerCounter.size() > 0 && !isWriteLockHeldByCurrentThread()) {
return false;
} else {
writerCounter.put(threadId, writerCounter.getOrDefault(threadId, 0) + 1);
return true;
}
}
/**
* Blocking method that will return only when the read lock has been
* acquired.
* Calls tryAcquiringReadLock, and as long as it returns false, waits.
* Catches InterruptedException.
*
*/
public synchronized void lockRead() {
while (!tryAcquiringReadLock()) {
try {
wait();
} catch (InterruptedException e) {
System.out.println(e.toString());
}
}
}
/**
* Releases the read lock held by the calling thread. Other threads might
* still be holding read locks. If no more readers after unlocking, calls notifyAll().
*/
public synchronized void unlockRead() {
Long threadId = Thread.currentThread().getId();
if (isReadLockHeldByCurrentThread()) {
readerCounter.put(threadId, readerCounter.get(threadId) - 1);
}
// Remove the entry if a reader contains 0 lock
if (readerCounter.get(threadId) == 0) {
readerCounter.remove(threadId);
}
// Calls notifyAll if no readers
if (readerCounter.size() == 0) {
notifyAll();
}
}
/**
* Blocking method that will return only when the write lock has been
* acquired.
* Calls tryAcquiringWriteLock, and as long as it returns false, waits.
* Catches InterruptedException.
*/
public synchronized void lockWrite() {
while (!tryAcquiringWriteLock()) {
try {
wait();
} catch (InterruptedException e) {
System.out.println(e.toString());
}
}
}
/**
* Releases the write lock held by the calling thread. The calling thread
* may continue to hold a read lock.
* If the number of writers becomes 0, calls notifyAll.
*/
public synchronized void unlockWrite() {
Long threadId = Thread.currentThread().getId();
if (isWriteLockHeldByCurrentThread()) {
writerCounter.put(threadId, writerCounter.get(threadId) - 1);
}
// Remove the entry if a writer contains 0 lock
if (writerCounter.get(threadId) == 0) {
writerCounter.remove(threadId);
}
// Calls notifyAll if no writers
if (writerCounter.size() == 0) {
notifyAll();
}
}
}
|
crazzfeng/UsingSelf
|
impl/src/main/java/com/crazy/net/util/TestC.java
|
package com.crazy.net.util;
import java.util.List;
/**
* @author <NAME>
* @title: TestC
* @description:
* @date 2018/9/18 18:11
*/
public class TestC {
private List<Site> sites;
private String remark;
private User user;
public TestC() {
}
public List<Site> getSites() {
return sites;
}
public void setSites(List<Site> sites) {
this.sites = sites;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
}
|
veot/ifcbdb
|
ifcbdb/dashboard/management/commands/addtag.py
|
<filename>ifcbdb/dashboard/management/commands/addtag.py
from django.core.management.base import BaseCommand, CommandError
from dashboard.models import Bin
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('bin', type=str, help='bin id')
parser.add_argument('tag', type=str, help='tag')
def handle(self, *args, **options):
bin_id = options['bin']
tag = options['tag']
bin = Bin.objects.get(pid=bin_id)
bin.add_tag(tag)
print(bin.tag_names)
|
eddie4941/servicetalk
|
servicetalk-http-netty/src/test/java/io/servicetalk/http/netty/SniTest.java
|
/*
* Copyright © 2021 Apple Inc. and the ServiceTalk project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.servicetalk.http.netty;
import io.servicetalk.http.api.BlockingHttpClient;
import io.servicetalk.http.api.BlockingHttpService;
import io.servicetalk.http.api.HttpProtocolConfig;
import io.servicetalk.http.api.HttpRequest;
import io.servicetalk.http.api.HttpResponseStatus;
import io.servicetalk.http.api.ReservedBlockingHttpConnection;
import io.servicetalk.test.resources.DefaultTestCerts;
import io.servicetalk.transport.api.ClientSslConfigBuilder;
import io.servicetalk.transport.api.ServerContext;
import io.servicetalk.transport.api.ServerSslConfig;
import io.servicetalk.transport.api.ServerSslConfigBuilder;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import java.util.List;
import java.util.stream.Stream;
import javax.annotation.Nullable;
import javax.net.ssl.SSLHandshakeException;
import static io.servicetalk.http.netty.HttpProtocol.HTTP_1;
import static io.servicetalk.http.netty.HttpProtocol.HTTP_2;
import static io.servicetalk.test.resources.DefaultTestCerts.serverPemHostname;
import static io.servicetalk.transport.netty.internal.AddressUtils.localAddress;
import static io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort;
import static java.net.InetAddress.getLoopbackAddress;
import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
class SniTest {
private static final String SNI_HOSTNAME = "servicetalk.io";
@ParameterizedTest(name = "protocols={0}, alpn={1}")
@MethodSource("protocolsAndAlpn")
void sniSuccess(List<HttpProtocol> protocols, boolean useALPN) throws Exception {
try (ServerContext serverContext = HttpServers.forAddress(localAddress(0))
.protocols(protocolConfigs(protocols))
.sslConfig(untrustedServerConfig(alpnIds(protocols, useALPN)),
singletonMap(SNI_HOSTNAME, trustedServerConfig(alpnIds(protocols, useALPN))))
.listenBlockingAndAwait(newSslVerifyService());
BlockingHttpClient client = newClient(serverContext, protocols, useALPN)) {
assertEquals(HttpResponseStatus.OK, client.request(client.get("/")).status());
}
}
@ParameterizedTest(name = "protocols={0}, alpn={1}")
@MethodSource("protocolsAndAlpn")
void sniDefaultFallbackSuccess(List<HttpProtocol> protocols, boolean useALPN) throws Exception {
try (ServerContext serverContext = HttpServers.forAddress(localAddress(0))
.protocols(protocolConfigs(protocols))
.sslConfig(trustedServerConfig(alpnIds(protocols, useALPN)),
singletonMap("no_match" + SNI_HOSTNAME, untrustedServerConfig()))
.listenBlockingAndAwait(newSslVerifyService());
BlockingHttpClient client = newClient(serverContext, protocols, useALPN)) {
assertEquals(HttpResponseStatus.OK, client.request(client.get("/")).status());
}
}
@ParameterizedTest(name = "protocols={0}, alpn={1}")
@MethodSource("protocolsAndAlpn")
void sniFailExpected(List<HttpProtocol> protocols, boolean useALPN) throws Exception {
try (ServerContext serverContext = HttpServers.forAddress(localAddress(0))
.protocols(protocolConfigs(protocols))
.sslConfig(trustedServerConfig(alpnIds(protocols, useALPN)),
singletonMap(SNI_HOSTNAME, untrustedServerConfig(alpnIds(protocols, useALPN))))
.listenBlockingAndAwait(newSslVerifyService());
BlockingHttpClient client = newClient(serverContext, protocols, useALPN)) {
assertThrows(SSLHandshakeException.class, () -> client.request(client.get("/")));
}
}
@ParameterizedTest(name = "protocols={0}, alpn={1}")
@MethodSource("protocolsAndAlpn")
void sniDefaultFallbackFailExpected(List<HttpProtocol> protocols, boolean useALPN) throws Exception {
try (ServerContext serverContext = HttpServers.forAddress(localAddress(0))
.protocols(protocolConfigs(protocols))
.sslConfig(untrustedServerConfig(alpnIds(protocols, useALPN)),
singletonMap("no_match" + SNI_HOSTNAME, trustedServerConfig(alpnIds(protocols, useALPN))))
.listenBlockingAndAwait(newSslVerifyService());
BlockingHttpClient client = newClient(serverContext, protocols, useALPN)) {
assertThrows(SSLHandshakeException.class, () -> client.request(client.get("/")));
}
}
@ParameterizedTest(name = "protocols={0}, alpn={1}")
@MethodSource("protocolsAndAlpn")
void sniClientDefaultServerSuccess(List<HttpProtocol> protocols, boolean useALPN) throws Exception {
try (ServerContext serverContext = HttpServers.forAddress(localAddress(0))
.protocols(protocolConfigs(protocols))
.sslConfig(trustedServerConfig(alpnIds(protocols, useALPN)))
.listenBlockingAndAwait(newSslVerifyService());
BlockingHttpClient client = newClient(serverContext, protocols, useALPN)) {
assertEquals(HttpResponseStatus.OK, client.request(client.get("/")).status());
}
}
@ParameterizedTest(name = "protocols={0}, alpn={1}")
@MethodSource("protocolsAndAlpn")
void noSniClientDefaultServerFallbackSuccess(List<HttpProtocol> protocols, boolean useALPN) throws Exception {
try (ServerContext serverContext = HttpServers.forAddress(localAddress(0))
.protocols(protocolConfigs(protocols))
.sslConfig(trustedServerConfig(alpnIds(protocols, useALPN)),
singletonMap(getLoopbackAddress().getHostName(), untrustedServerConfig()))
.listenBlockingAndAwait(newSslVerifyService());
BlockingHttpClient client = HttpClients.forSingleAddress(
getLoopbackAddress().getHostName(),
serverHostAndPort(serverContext).port())
.protocols(protocolConfigs(protocols))
.sslConfig(configureAlpn(new ClientSslConfigBuilder(DefaultTestCerts::loadServerCAPem)
.peerHost(serverPemHostname()), protocols, useALPN).build())
.inferSniHostname(false)
.buildBlocking()) {
HttpRequest request = client.get("/");
ReservedBlockingHttpConnection reserved = client.reserveConnection(request);
assertNotNull(reserved.connectionContext().sslSession());
assertEquals(HttpResponseStatus.OK, reserved.request(request).status());
reserved.release();
}
}
@ParameterizedTest(name = "protocols={0}, alpn={1}")
@MethodSource("protocolsAndAlpn")
void noSniClientDefaultServerFallbackFailExpected(List<HttpProtocol> protocols, boolean useALPN) throws Exception {
try (ServerContext serverContext = HttpServers.forAddress(localAddress(0))
.protocols(protocolConfigs(protocols))
.sslConfig(untrustedServerConfig(alpnIds(protocols, useALPN)),
singletonMap(getLoopbackAddress().getHostName(),
trustedServerConfig(alpnIds(protocols, useALPN))))
.listenBlockingAndAwait(newSslVerifyService());
BlockingHttpClient client = HttpClients.forSingleAddress(getLoopbackAddress().getHostName(),
serverHostAndPort(serverContext).port())
.protocols(protocolConfigs(protocols))
.sslConfig(configureAlpn(new ClientSslConfigBuilder(DefaultTestCerts::loadServerCAPem),
protocols, useALPN).build())
.inferSniHostname(false)
.buildBlocking()) {
assertThrows(SSLHandshakeException.class, () -> client.request(client.get("/")));
}
}
@SuppressWarnings("unused")
private static Stream<Arguments> protocolsAndAlpn() {
return Stream.of(Arguments.of(singletonList(HTTP_2), false),
Arguments.of(singletonList(HTTP_2), true),
Arguments.of(singletonList(HTTP_1), false),
Arguments.of(singletonList(HTTP_1), true)
);
}
private static BlockingHttpClient newClient(ServerContext serverContext,
List<HttpProtocol> protocols, boolean useALPN) {
return HttpClients.forSingleAddress(serverHostAndPort(serverContext))
.protocols(protocolConfigs(protocols))
.sslConfig(configureAlpn(new ClientSslConfigBuilder(DefaultTestCerts::loadServerCAPem)
.sniHostname(SNI_HOSTNAME).peerHost(serverPemHostname()), protocols, useALPN).build())
.buildBlocking();
}
private static ClientSslConfigBuilder configureAlpn(ClientSslConfigBuilder builder, List<HttpProtocol> protocols,
boolean useALPN) {
if (useALPN) {
builder.alpnProtocols(alpnIds(protocols));
}
return builder;
}
private static ServerSslConfig untrustedServerConfig() {
return untrustedServerConfig((String[]) null);
}
private static ServerSslConfig untrustedServerConfig(@Nullable String... alpn) {
// Need a key that won't be trusted by the client, just use the client's key.
ServerSslConfigBuilder builder = new ServerSslConfigBuilder(DefaultTestCerts::loadClientPem,
DefaultTestCerts::loadClientKey);
if (alpn != null) {
builder.alpnProtocols(alpn);
}
return builder.build();
}
@Nullable
private static String[] alpnIds(List<HttpProtocol> protocols, boolean useALPN) {
return useALPN ? alpnIds(protocols) : null;
}
private static String[] alpnIds(List<HttpProtocol> protocols) {
String[] ids = new String[protocols.size()];
for (int i = 0; i < ids.length; ++i) {
ids[i] = protocols.get(i).config.alpnId();
}
return ids;
}
private static ServerSslConfig trustedServerConfig(@Nullable String... alpn) {
ServerSslConfigBuilder builder = new ServerSslConfigBuilder(DefaultTestCerts::loadServerPem,
DefaultTestCerts::loadServerKey);
if (alpn != null) {
builder.alpnProtocols(alpn);
}
return builder.build();
}
private static HttpProtocolConfig[] protocolConfigs(List<HttpProtocol> protocols) {
HttpProtocolConfig[] configs = new HttpProtocolConfig[protocols.size()];
for (int i = 0; i < configs.length; ++i) {
configs[i] = protocols.get(i).config;
}
return configs;
}
private static BlockingHttpService newSslVerifyService() {
return (ctx, request, responseFactory) ->
ctx.sslSession() != null ? responseFactory.ok() : responseFactory.internalServerError();
}
}
|
yinxiaoer/jietu-laundry
|
laundry-jt/laundry-common/src/main/java/com/jietu/common/service/AliyunOssService.java
|
<filename>laundry-jt/laundry-common/src/main/java/com/jietu/common/service/AliyunOssService.java
//package com.jietu.common.service;
//
//import com.aliyun.oss.ClientConfiguration;
//import com.aliyun.oss.OSSClient;
//import com.aliyun.oss.common.auth.DefaultCredentialProvider;
//import com.aliyun.oss.model.OSSObject;
//import com.aliyun.oss.model.ObjectMetadata;
//import com.aliyun.oss.model.PutObjectResult;
//import org.apache.commons.lang3.StringUtils;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//
//import javax.annotation.PostConstruct;
//import java.io.ByteArrayInputStream;
//import java.io.File;
//import java.io.FileInputStream;
//import java.io.InputStream;
//
///**
// * 阿里云oss存储服务
// * @author: 印修河
// * @date: 2018/12/22 13:36
// */
//@Service
//public class AliyunOssService {
//
// private static final Logger logger = LoggerFactory.getLogger(AliyunOssService.class);
// /** 阿里云API的密钥Access Key ID */
// @Value("${aliyun.accessKeyId}")
// private String accessKeyId;
// /** 阿里云API的密钥Access Key Secret */
// @Value("${aliyun.accessKeySecret}")
// private String accessKeySecret;
// /** 阿里云API的内或外网域名 */
// @Value("${aliyun.endpoint}")
// private String endpoint;
// /** 阿里云API的bucket名称 */
// @Value("${aliyun.bucketName}")
// private String bucketName;
//
// private OSSClient ossClient;
//
// /**
// * 初始化ossClient
// */
// @PostConstruct
// public void init(){
// DefaultCredentialProvider credentialProvider = new DefaultCredentialProvider(accessKeyId, accessKeySecret);
// ClientConfiguration conf = new ClientConfiguration();
// ossClient = new OSSClient(endpoint, credentialProvider, conf);
// }
//
// /**
// * 创建文件夹
// *
// * @param folder 文件夹名如"qj_nanjing/"
// * @return 文件夹名
// */
// public String createFolder(String folder) {
// // 文件夹名
// final String keySuffixWithSlash = folder;
// // 判断文件夹是否存在,不存在则创建
// if (!ossClient.doesObjectExist(bucketName, keySuffixWithSlash)) {
// // 创建文件夹
// ossClient.putObject(bucketName, keySuffixWithSlash, new ByteArrayInputStream(new byte[0]));
// logger.info("创建oss文件夹成功");
// // 得到文件夹名
// OSSObject object = ossClient.getObject(bucketName, keySuffixWithSlash);
// String fileDir = object.getKey();
// return fileDir;
// }
// return keySuffixWithSlash;
// }
//
// /**
// * 根据key删除OSS服务器上的文件
// *
// * @param folder 模拟文件夹名 如"qj_nanjing/"
// * @param key Bucket下的文件的路径名+文件名 如:"upload/cake.jpg"
// */
// public void deleteFile(String folder, String key) {
// ossClient.deleteObject(bucketName, folder + key);
// logger.info("删除{}下的{}[{}文件成功", bucketName, folder, key);
// }
//
// /**
// * 上传文件至OSS
// *
// * @param file 上传文件(文件全路径如:D:\\image\\cake.jpg)
// * @param folder 模拟文件夹名 如"qj_nanjing/"
// * @return String 返回的唯一MD5数字签名
// */
// public String uploadFile2OSS(File file, String folder, String fileName) {
// logger.info("开始上传文件{}/{}到阿里云OSS", folder, fileName);
// String resultStr = null;
// try {
// // 以输入流的形式上传文件
// InputStream is = new FileInputStream(file);
// // 文件大小
// Long fileSize = file.length();
// // 创建上传Object的Metadata
// ObjectMetadata metadata = new ObjectMetadata();
// // 上传的文件的长度
// metadata.setContentLength(is.available());
// // 指定该Object被下载时的网页的缓存行为
// metadata.setCacheControl("no-cache");
// // 指定该Object下设置Header
// metadata.setHeader("Pragma", "no-cache");
// // 指定该Object被下载时的内容编码格式
// metadata.setContentEncoding("utf-8");
// // 文件的MIME,定义文件的类型及网页编码,决定浏览器将以什么形式、什么编码读取文件。如果用户没有指定则根据Key或文件名的扩展名生成,
// // 如果没有扩展名则填默认值application/octet-stream
// metadata.setContentType(getContentType(fileName));
// // 指定该Object被下载时的名称(指示MINME用户代理如何显示附加的文件,打开或下载,及文件名称)
// metadata.setContentDisposition("filename/filesize=" + fileName + "/" + fileSize + "Byte.");
// // 上传文件 (上传文件流的形式)
// PutObjectResult putResult = ossClient.putObject(bucketName, folder + fileName, is, metadata);
// // 解析结果
// resultStr = putResult.getETag();
// } catch (Exception e) {
// e.printStackTrace();
// logger.error("上传阿里云OSS服务器异常:" + e.getMessage(), e);
// }
// logger.info("结束上传文件{}/{}到阿里云OSS", folder, fileName);
// return resultStr;
// }
//
// /**
// * 上传文件至OSS
// *
// * @param is 文件输入流
// * @param folder 模拟文件夹名 如"qj_nanjing/"
// * @param fileName 文件名称
// * @param fileSize 文件大小
// * @return String 返回的唯一MD5数字签名
// */
// public String uploadFile2OSS(InputStream is, String folder, String fileName, Long fileSize) {
// logger.info("开始上传文件{}/{}到阿里云OSS", folder, fileName);
// //由于阿里云OSS不允许/打头,所以在此判断如果是/打头则去掉
// if(StringUtils.isNotBlank(folder) && "/".equals(folder.substring(0,1))){
// folder = folder.substring(1);
// }
//
// String resultStr = null;
// try {
// // 创建上传Object的Metadata
// ObjectMetadata metadata = new ObjectMetadata();
// // 上传的文件的长度
// metadata.setContentLength(is.available());
// // 指定该Object被下载时的网页的缓存行为
// metadata.setCacheControl("no-cache");
// // 指定该Object下设置Header
// metadata.setHeader("Pragma", "no-cache");
// // 指定该Object被下载时的内容编码格式
// metadata.setContentEncoding("utf-8");
// // 文件的MIME,定义文件的类型及网页编码,决定浏览器将以什么形式、什么编码读取文件。如果用户没有指定则根据Key或文件名的扩展名生成,
// // 如果没有扩展名则填默认值application/octet-stream
// metadata.setContentType(getContentType(fileName));
// // 指定该Object被下载时的名称(指示MINME用户代理如何显示附加的文件,打开或下载,及文件名称)
// metadata.setContentDisposition("filename/filesize=" + fileName + "/" + fileSize + "Byte.");
// // 上传文件 (上传文件流的形式)
// PutObjectResult putResult = ossClient.putObject(bucketName, folder + "/" + fileName, is, metadata);
// // 解析结果
// resultStr = putResult.getETag();
// } catch (Exception e) {
// e.printStackTrace();
// logger.error("上传阿里云OSS服务器异常:" + e.getMessage(), e);
// }
// logger.info("结束上传文件{}/{}到阿里云OSS", folder, fileName);
// return resultStr;
// }
//
// /**
// * 通过文件名判断并获取OSS服务文件上传时文件的contentType
// *
// * @param fileName 文件名
// * @return 文件的contentType
// */
// public String getContentType(String fileName) {
// // 文件的后缀名
// String fileExtension = fileName.substring(fileName.lastIndexOf("."));
// if (".bmp".equalsIgnoreCase(fileExtension)) {
// return "image/bmp";
// }
// if (".gif".equalsIgnoreCase(fileExtension)) {
// return "image/gif";
// }
// if (".jpeg".equalsIgnoreCase(fileExtension) || ".jpg".equalsIgnoreCase(fileExtension)
// || ".png".equalsIgnoreCase(fileExtension)) {
// return "image/jpeg";
// }
// if (".png".equalsIgnoreCase(fileExtension)) {
// return "image/png";
// }
// if (".html".equalsIgnoreCase(fileExtension)) {
// return "text/html";
// }
// if (".txt".equalsIgnoreCase(fileExtension)) {
// return "text/plain";
// }
// if (".vsd".equalsIgnoreCase(fileExtension)) {
// return "application/vnd.visio";
// }
// if (".ppt".equalsIgnoreCase(fileExtension) || "pptx".equalsIgnoreCase(fileExtension)) {
// return "application/vnd.ms-powerpoint";
// }
// if (".doc".equalsIgnoreCase(fileExtension) || "docx".equalsIgnoreCase(fileExtension)) {
// return "application/msword";
// }
// if (".xml".equalsIgnoreCase(fileExtension)) {
// return "text/xml";
// }
// // 默认返回类型
// return "";
// }
//
//}
|
Andreas237/AndroidPolicyAutomation
|
ExtractedJars/PACT_com.pactforcure.app/javafiles/com/itextpdf/text/pdf/BidiOrder.java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 <NAME>.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.itextpdf.text.pdf;
import com.itextpdf.text.error_messages.MessageLocalization;
public final class BidiOrder
{
public BidiOrder(byte abyte0[])
{
// 0 0:aload_0
// 1 1:invokespecial #1029 <Method void Object()>
paragraphEmbeddingLevel = -1;
// 2 4:aload_0
// 3 5:iconst_m1
// 4 6:putfield #1031 <Field byte paragraphEmbeddingLevel>
validateTypes(abyte0);
// 5 9:aload_1
// 6 10:invokestatic #1034 <Method void validateTypes(byte[])>
initialTypes = (byte[])(byte[])((byte []) (abyte0)).clone();
// 7 13:aload_0
// 8 14:aload_1
// 9 15:invokevirtual #1039 <Method Object _5B_B.clone()>
// 10 18:checkcast #1035 <Class byte[]>
// 11 21:checkcast #1035 <Class byte[]>
// 12 24:putfield #1041 <Field byte[] initialTypes>
runAlgorithm();
// 13 27:aload_0
// 14 28:invokespecial #1044 <Method void runAlgorithm()>
// 15 31:return
}
public BidiOrder(byte abyte0[], byte byte0)
{
// 0 0:aload_0
// 1 1:invokespecial #1029 <Method void Object()>
paragraphEmbeddingLevel = -1;
// 2 4:aload_0
// 3 5:iconst_m1
// 4 6:putfield #1031 <Field byte paragraphEmbeddingLevel>
validateTypes(abyte0);
// 5 9:aload_1
// 6 10:invokestatic #1034 <Method void validateTypes(byte[])>
validateParagraphEmbeddingLevel(byte0);
// 7 13:iload_2
// 8 14:invokestatic #1049 <Method void validateParagraphEmbeddingLevel(byte)>
initialTypes = (byte[])(byte[])((byte []) (abyte0)).clone();
// 9 17:aload_0
// 10 18:aload_1
// 11 19:invokevirtual #1039 <Method Object _5B_B.clone()>
// 12 22:checkcast #1035 <Class byte[]>
// 13 25:checkcast #1035 <Class byte[]>
// 14 28:putfield #1041 <Field byte[] initialTypes>
paragraphEmbeddingLevel = byte0;
// 15 31:aload_0
// 16 32:iload_2
// 17 33:putfield #1031 <Field byte paragraphEmbeddingLevel>
runAlgorithm();
// 18 36:aload_0
// 19 37:invokespecial #1044 <Method void runAlgorithm()>
// 20 40:return
}
public BidiOrder(char ac[], int i, int j, byte byte0)
{
// 0 0:aload_0
// 1 1:invokespecial #1029 <Method void Object()>
paragraphEmbeddingLevel = -1;
// 2 4:aload_0
// 3 5:iconst_m1
// 4 6:putfield #1031 <Field byte paragraphEmbeddingLevel>
initialTypes = new byte[j];
// 5 9:aload_0
// 6 10:iload_3
// 7 11:newarray byte[]
// 8 13:putfield #1041 <Field byte[] initialTypes>
for(int k = 0; k < j; k++)
//* 9 16:iconst_0
//* 10 17:istore 5
//* 11 19:iload 5
//* 12 21:iload_3
//* 13 22:icmpge 51
initialTypes[k] = rtypes[ac[i + k]];
// 14 25:aload_0
// 15 26:getfield #1041 <Field byte[] initialTypes>
// 16 29:iload 5
// 17 31:getstatic #60 <Field byte[] rtypes>
// 18 34:aload_1
// 19 35:iload_2
// 20 36:iload 5
// 21 38:iadd
// 22 39:caload
// 23 40:baload
// 24 41:bastore
// 25 42:iload 5
// 26 44:iconst_1
// 27 45:iadd
// 28 46:istore 5
//* 29 48:goto 19
validateParagraphEmbeddingLevel(byte0);
// 30 51:iload 4
// 31 53:invokestatic #1049 <Method void validateParagraphEmbeddingLevel(byte)>
paragraphEmbeddingLevel = byte0;
// 32 56:aload_0
// 33 57:iload 4
// 34 59:putfield #1031 <Field byte paragraphEmbeddingLevel>
runAlgorithm();
// 35 62:aload_0
// 36 63:invokespecial #1044 <Method void runAlgorithm()>
// 37 66:return
}
private static int[] computeMultilineReordering(byte abyte0[], int ai[])
{
int ai1[] = new int[abyte0.length];
// 0 0:aload_0
// 1 1:arraylength
// 2 2:newarray int[]
// 3 4:astore 6
int j = 0;
// 4 6:iconst_0
// 5 7:istore_3
for(int i = 0; i < ai.length; i++)
//* 6 8:iconst_0
//* 7 9:istore_2
//* 8 10:iload_2
//* 9 11:aload_1
//* 10 12:arraylength
//* 11 13:icmpge 91
{
int l = ai[i];
// 12 16:aload_1
// 13 17:iload_2
// 14 18:iaload
// 15 19:istore 5
int ai2[] = ((int []) (new byte[l - j]));
// 16 21:iload 5
// 17 23:iload_3
// 18 24:isub
// 19 25:newarray byte[]
// 20 27:astore 7
System.arraycopy(((Object) (abyte0)), j, ((Object) (ai2)), 0, ai2.length);
// 21 29:aload_0
// 22 30:iload_3
// 23 31:aload 7
// 24 33:iconst_0
// 25 34:aload 7
// 26 36:arraylength
// 27 37:invokestatic #1058 <Method void System.arraycopy(Object, int, Object, int, int)>
ai2 = computeReordering(((byte []) (ai2)));
// 28 40:aload 7
// 29 42:invokestatic #1062 <Method int[] computeReordering(byte[])>
// 30 45:astore 7
for(int k = 0; k < ai2.length; k++)
//* 31 47:iconst_0
//* 32 48:istore 4
//* 33 50:iload 4
//* 34 52:aload 7
//* 35 54:arraylength
//* 36 55:icmpge 81
ai1[j + k] = ai2[k] + j;
// 37 58:aload 6
// 38 60:iload_3
// 39 61:iload 4
// 40 63:iadd
// 41 64:aload 7
// 42 66:iload 4
// 43 68:iaload
// 44 69:iload_3
// 45 70:iadd
// 46 71:iastore
// 47 72:iload 4
// 48 74:iconst_1
// 49 75:iadd
// 50 76:istore 4
//* 51 78:goto 50
j = l;
// 52 81:iload 5
// 53 83:istore_3
}
// 54 84:iload_2
// 55 85:iconst_1
// 56 86:iadd
// 57 87:istore_2
//* 58 88:goto 10
return ai1;
// 59 91:aload 6
// 60 93:areturn
}
private static int[] computeReordering(byte abyte0[])
{
int j2 = abyte0.length;
// 0 0:aload_0
// 1 1:arraylength
// 2 2:istore 7
int ai[] = new int[j2];
// 3 4:iload 7
// 4 6:newarray int[]
// 5 8:astore 8
for(int i = 0; i < j2; i++)
//* 6 10:iconst_0
//* 7 11:istore_1
//* 8 12:iload_1
//* 9 13:iload 7
//* 10 15:icmpge 30
ai[i] = i;
// 11 18:aload 8
// 12 20:iload_1
// 13 21:iload_1
// 14 22:iastore
// 15 23:iload_1
// 16 24:iconst_1
// 17 25:iadd
// 18 26:istore_1
//* 19 27:goto 12
int j = 0;
// 20 30:iconst_0
// 21 31:istore_1
byte byte0 = 63;
// 22 32:bipush 63
// 23 34:istore_3
for(int l = 0; l < j2;)
//* 24 35:iconst_0
//* 25 36:istore_2
//* 26 37:iload_2
//* 27 38:iload 7
//* 28 40:icmpge 97
{
byte byte1 = abyte0[l];
// 29 43:aload_0
// 30 44:iload_2
// 31 45:baload
// 32 46:istore 5
int j1 = j;
// 33 48:iload_1
// 34 49:istore 4
if(byte1 > j)
//* 35 51:iload 5
//* 36 53:iload_1
//* 37 54:icmple 61
j1 = ((int) (byte1));
// 38 57:iload 5
// 39 59:istore 4
byte byte2 = byte0;
// 40 61:iload_3
// 41 62:istore 6
if((byte1 & 1) != 0)
//* 42 64:iload 5
//* 43 66:iconst_1
//* 44 67:iand
//* 45 68:ifeq 84
{
byte2 = byte0;
// 46 71:iload_3
// 47 72:istore 6
if(byte1 < byte0)
//* 48 74:iload 5
//* 49 76:iload_3
//* 50 77:icmpge 84
byte2 = byte1;
// 51 80:iload 5
// 52 82:istore 6
}
l++;
// 53 84:iload_2
// 54 85:iconst_1
// 55 86:iadd
// 56 87:istore_2
j = j1;
// 57 88:iload 4
// 58 90:istore_1
byte0 = byte2;
// 59 91:iload 6
// 60 93:istore_3
}
//* 61 94:goto 37
for(int k1 = j; k1 >= byte0; k1--)
//* 62 97:iload_1
//* 63 98:istore 4
//* 64 100:iload 4
//* 65 102:iload_3
//* 66 103:icmplt 213
{
int i1;
for(int k = 0; k < j2; k = i1 + 1)
//* 67 106:iconst_0
//* 68 107:istore_1
//* 69 108:iload_1
//* 70 109:iload 7
//* 71 111:icmpge 204
{
i1 = k;
// 72 114:iload_1
// 73 115:istore_2
if(abyte0[k] < k1)
continue;
// 74 116:aload_0
// 75 117:iload_1
// 76 118:baload
// 77 119:iload 4
// 78 121:icmplt 197
for(i1 = k + 1; i1 < j2 && abyte0[i1] >= k1; i1++);
// 79 124:iload_1
// 80 125:iconst_1
// 81 126:iadd
// 82 127:istore_2
// 83 128:iload_2
// 84 129:iload 7
// 85 131:icmpge 149
// 86 134:aload_0
// 87 135:iload_2
// 88 136:baload
// 89 137:iload 4
// 90 139:icmplt 149
// 91 142:iload_2
// 92 143:iconst_1
// 93 144:iadd
// 94 145:istore_2
//* 95 146:goto 128
int l1 = k;
// 96 149:iload_1
// 97 150:istore 5
for(k = i1 - 1; l1 < k; k--)
//* 98 152:iload_2
//* 99 153:iconst_1
//* 100 154:isub
//* 101 155:istore_1
//* 102 156:iload 5
//* 103 158:iload_1
//* 104 159:icmpge 197
{
int i2 = ai[l1];
// 105 162:aload 8
// 106 164:iload 5
// 107 166:iaload
// 108 167:istore 6
ai[l1] = ai[k];
// 109 169:aload 8
// 110 171:iload 5
// 111 173:aload 8
// 112 175:iload_1
// 113 176:iaload
// 114 177:iastore
ai[k] = i2;
// 115 178:aload 8
// 116 180:iload_1
// 117 181:iload 6
// 118 183:iastore
l1++;
// 119 184:iload 5
// 120 186:iconst_1
// 121 187:iadd
// 122 188:istore 5
}
// 123 190:iload_1
// 124 191:iconst_1
// 125 192:isub
// 126 193:istore_1
}
// 127 194:goto 156
// 128 197:iload_2
// 129 198:iconst_1
// 130 199:iadd
// 131 200:istore_1
}
// 132 201:goto 108
// 133 204:iload 4
// 134 206:iconst_1
// 135 207:isub
// 136 208:istore 4
//* 137 210:goto 100
return ai;
// 138 213:aload 8
// 139 215:areturn
}
private void determineExplicitEmbeddingLevels()
{
embeddings = processEmbeddings(resultTypes, paragraphEmbeddingLevel);
// 0 0:aload_0
// 1 1:aload_0
// 2 2:getfield #1065 <Field byte[] resultTypes>
// 3 5:aload_0
// 4 6:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 5 9:invokestatic #1069 <Method byte[] processEmbeddings(byte[], byte)>
// 6 12:putfield #1071 <Field byte[] embeddings>
for(int i = 0; i < textLength; i++)
//* 7 15:iconst_0
//* 8 16:istore_3
//* 9 17:iload_3
//* 10 18:aload_0
//* 11 19:getfield #1073 <Field int textLength>
//* 12 22:icmpge 72
{
byte byte1 = embeddings[i];
// 13 25:aload_0
// 14 26:getfield #1071 <Field byte[] embeddings>
// 15 29:iload_3
// 16 30:baload
// 17 31:istore_2
byte byte0 = byte1;
// 18 32:iload_2
// 19 33:istore_1
if((byte1 & 0x80) != 0)
//* 20 34:iload_2
//* 21 35:sipush 128
//* 22 38:iand
//* 23 39:ifeq 58
{
byte0 = (byte)(byte1 & 0x7f);
// 24 42:iload_2
// 25 43:bipush 127
// 26 45:iand
// 27 46:int2byte
// 28 47:istore_1
resultTypes[i] = typeForLevel(((int) (byte0)));
// 29 48:aload_0
// 30 49:getfield #1065 <Field byte[] resultTypes>
// 31 52:iload_3
// 32 53:iload_1
// 33 54:invokestatic #1077 <Method byte typeForLevel(int)>
// 34 57:bastore
}
resultLevels[i] = byte0;
// 35 58:aload_0
// 36 59:getfield #1079 <Field byte[] resultLevels>
// 37 62:iload_3
// 38 63:iload_1
// 39 64:bastore
}
// 40 65:iload_3
// 41 66:iconst_1
// 42 67:iadd
// 43 68:istore_3
//* 44 69:goto 17
// 45 72:return
}
private void determineParagraphEmbeddingLevel()
{
byte byte1 = -1;
// 0 0:iconst_m1
// 1 1:istore_3
int i = 0;
// 2 2:iconst_0
// 3 3:istore_1
byte byte0;
label0:
do
{
label1:
{
byte0 = byte1;
// 4 4:iload_3
// 5 5:istore_2
if(i < textLength)
//* 6 6:iload_1
//* 7 7:aload_0
//* 8 8:getfield #1073 <Field int textLength>
//* 9 11:icmpge 35
{
byte0 = resultTypes[i];
// 10 14:aload_0
// 11 15:getfield #1065 <Field byte[] resultTypes>
// 12 18:iload_1
// 13 19:baload
// 14 20:istore_2
if(byte0 != 0 && byte0 != 4 && byte0 != 3)
break label1;
// 15 21:iload_2
// 16 22:ifeq 35
// 17 25:iload_2
// 18 26:iconst_4
// 19 27:icmpeq 35
// 20 30:iload_2
// 21 31:iconst_3
// 22 32:icmpne 46
}
if(byte0 == -1)
//* 23 35:iload_2
//* 24 36:iconst_m1
//* 25 37:icmpne 53
{
paragraphEmbeddingLevel = 0;
// 26 40:aload_0
// 27 41:iconst_0
// 28 42:putfield #1031 <Field byte paragraphEmbeddingLevel>
return;
// 29 45:return
}
break label0;
}
i++;
// 30 46:iload_1
// 31 47:iconst_1
// 32 48:iadd
// 33 49:istore_1
} while(true);
// 34 50:goto 4
if(byte0 == 0)
//* 35 53:iload_2
//* 36 54:ifne 63
{
paragraphEmbeddingLevel = 0;
// 37 57:aload_0
// 38 58:iconst_0
// 39 59:putfield #1031 <Field byte paragraphEmbeddingLevel>
return;
// 40 62:return
} else
{
paragraphEmbeddingLevel = 1;
// 41 63:aload_0
// 42 64:iconst_1
// 43 65:putfield #1031 <Field byte paragraphEmbeddingLevel>
return;
// 44 68:return
}
}
private int findRunLimit(int i, int j, byte abyte0[])
{
int l;
label0:
{
l = i - 1;
// 0 0:iload_1
// 1 1:iconst_1
// 2 2:isub
// 3 3:istore 5
do
{
i = l + 1;
// 4 5:iload 5
// 5 7:iconst_1
// 6 8:iadd
// 7 9:istore_1
if(i >= j)
break;
// 8 10:iload_1
// 9 11:iload_2
// 10 12:icmpge 57
byte byte0 = resultTypes[i];
// 11 15:aload_0
// 12 16:getfield #1065 <Field byte[] resultTypes>
// 13 19:iload_1
// 14 20:baload
// 15 21:istore 6
int k = 0;
// 16 23:iconst_0
// 17 24:istore 4
do
{
l = i;
// 18 26:iload_1
// 19 27:istore 5
if(k >= abyte0.length)
break label0;
// 20 29:iload 4
// 21 31:aload_3
// 22 32:arraylength
// 23 33:icmpge 60
l = i;
// 24 36:iload_1
// 25 37:istore 5
if(byte0 == abyte0[k])
break;
// 26 39:iload 6
// 27 41:aload_3
// 28 42:iload 4
// 29 44:baload
// 30 45:icmpeq 5
k++;
// 31 48:iload 4
// 32 50:iconst_1
// 33 51:iadd
// 34 52:istore 4
} while(true);
// 35 54:goto 26
} while(true);
l = j;
// 36 57:iload_2
// 37 58:istore 5
}
return l;
// 38 60:iload 5
// 39 62:ireturn
}
private int findRunStart(int i, byte abyte0[])
{
label0:
{
int k;
label1:
do
{
k = i - 1;
// 0 0:iload_1
// 1 1:iconst_1
// 2 2:isub
// 3 3:istore 4
if(k < 0)
break label0;
// 4 5:iload 4
// 5 7:iflt 50
byte byte0 = resultTypes[k];
// 6 10:aload_0
// 7 11:getfield #1065 <Field byte[] resultTypes>
// 8 14:iload 4
// 9 16:baload
// 10 17:istore 5
int j = 0;
// 11 19:iconst_0
// 12 20:istore_3
do
{
if(j >= abyte0.length)
break label1;
// 13 21:iload_3
// 14 22:aload_2
// 15 23:arraylength
// 16 24:icmpge 45
i = k;
// 17 27:iload 4
// 18 29:istore_1
if(byte0 == abyte0[j])
continue label1;
// 19 30:iload 5
// 20 32:aload_2
// 21 33:iload_3
// 22 34:baload
// 23 35:icmpeq 0
j++;
// 24 38:iload_3
// 25 39:iconst_1
// 26 40:iadd
// 27 41:istore_3
} while(true);
// 28 42:goto 21
} while(true);
return k + 1;
// 29 45:iload 4
// 30 47:iconst_1
// 31 48:iadd
// 32 49:ireturn
}
return 0;
// 33 50:iconst_0
// 34 51:ireturn
}
public static final byte getDirection(char c)
{
return rtypes[c];
// 0 0:getstatic #60 <Field byte[] rtypes>
// 1 3:iload_0
// 2 4:baload
// 3 5:ireturn
}
private static boolean isWhitespace(byte byte0)
{
switch(byte0)
//* 0 0:iload_0
{
//* 1 1:lookupswitch 7: default 68
// 1: 70
// 2: 70
// 5: 70
// 6: 70
// 7: 70
// 14: 70
// 17: 70
default:
return false;
// 2 68:iconst_0
// 3 69:ireturn
case 1: // '\001'
case 2: // '\002'
case 5: // '\005'
case 6: // '\006'
case 7: // '\007'
case 14: // '\016'
case 17: // '\021'
return true;
// 4 70:iconst_1
// 5 71:ireturn
}
}
private static byte[] processEmbeddings(byte abyte0[], byte byte0)
{
byte byte2;
byte byte3;
int l;
int i1;
byte byte4;
int j1;
int k1;
byte abyte1[];
byte abyte2[];
k1 = abyte0.length;
// 0 0:aload_0
// 1 1:arraylength
// 2 2:istore 12
abyte1 = new byte[k1];
// 3 4:iload 12
// 4 6:newarray byte[]
// 5 8:astore 13
abyte2 = new byte[62];
// 6 10:bipush 62
// 7 12:newarray byte[]
// 8 14:astore 14
j1 = 0;
// 9 16:iconst_0
// 10 17:istore 11
byte4 = 0;
// 11 19:iconst_0
// 12 20:istore 10
i1 = 0;
// 13 22:iconst_0
// 14 23:istore 9
byte3 = byte0;
// 15 25:iload_1
// 16 26:istore 4
byte2 = byte0;
// 17 28:iload_1
// 18 29:istore_3
l = 0;
// 19 30:iconst_0
// 20 31:istore 8
_L6:
int i;
if(l >= k1)
break MISSING_BLOCK_LABEL_420;
// 21 33:iload 8
// 22 35:iload 12
// 23 37:icmpge 420
abyte1[l] = byte2;
// 24 40:aload 13
// 25 42:iload 8
// 26 44:iload_3
// 27 45:bastore
i = ((int) (abyte0[l]));
// 28 46:aload_0
// 29 47:iload 8
// 30 49:baload
// 31 50:istore 5
i;
// 32 52:iload 5
JVM INSTR lookupswitch 6: default 112
// 1: 149
// 2: 149
// 5: 149
// 6: 149
// 7: 293
// 15: 397;
// 33 54:lookupswitch 6: default 112
// 1: 149
// 2: 149
// 5: 149
// 6: 149
// 7: 293
// 15: 397
goto _L1 _L2 _L2 _L2 _L2 _L3 _L4
_L2:
break; /* Loop/switch isn't completed */
_L4:
break MISSING_BLOCK_LABEL_397;
_L1:
byte byte1;
int j;
int k;
k = j1;
// 34 112:iload 11
// 35 114:istore 7
j = i1;
// 36 116:iload 9
// 37 118:istore 6
i = ((int) (byte4));
// 38 120:iload 10
// 39 122:istore 5
byte1 = byte2;
// 40 124:iload_3
// 41 125:istore_2
_L7:
l++;
// 42 126:iload 8
// 43 128:iconst_1
// 44 129:iadd
// 45 130:istore 8
byte2 = byte1;
// 46 132:iload_2
// 47 133:istore_3
byte4 = ((byte) (i));
// 48 134:iload 5
// 49 136:istore 10
i1 = j;
// 50 138:iload 6
// 51 140:istore 9
j1 = k;
// 52 142:iload 7
// 53 144:istore 11
if(true) goto _L6; else goto _L5
// 54 146:goto 33
_L5:
label0:
{
if(i1 != 0)
break label0;
// 55 149:iload 9
// 56 151:ifne 274
if(i == 5 || i == 6)
//* 57 154:iload 5
//* 58 156:iconst_5
//* 59 157:icmpeq 167
//* 60 160:iload 5
//* 61 162:bipush 6
//* 62 164:icmpne 233
byte1 = (byte)(byte3 + 1 | 1);
// 63 167:iload 4
// 64 169:iconst_1
// 65 170:iadd
// 66 171:iconst_1
// 67 172:ior
// 68 173:int2byte
// 69 174:istore_2
else
//* 70 175:iload_2
//* 71 176:bipush 62
//* 72 178:icmpge 248
//* 73 181:aload 14
//* 74 183:iload 11
//* 75 185:iload_3
//* 76 186:bastore
//* 77 187:iload 11
//* 78 189:iconst_1
//* 79 190:iadd
//* 80 191:istore 7
//* 81 193:iload_2
//* 82 194:istore 4
//* 83 196:iload 5
//* 84 198:iconst_2
//* 85 199:icmpeq 209
//* 86 202:iload 5
//* 87 204:bipush 6
//* 88 206:icmpne 245
//* 89 209:iload_2
//* 90 210:sipush 128
//* 91 213:ior
//* 92 214:int2byte
//* 93 215:istore_2
//* 94 216:aload 13
//* 95 218:iload 8
//* 96 220:iload_2
//* 97 221:bastore
//* 98 222:iload 10
//* 99 224:istore 5
//* 100 226:iload 9
//* 101 228:istore 6
//* 102 230:goto 126
byte1 = (byte)(byte3 + 2 & -2);
// 103 233:iload 4
// 104 235:iconst_2
// 105 236:iadd
// 106 237:bipush -2
// 107 239:iand
// 108 240:int2byte
// 109 241:istore_2
if(byte1 < 62)
{
abyte2[j1] = byte2;
k = j1 + 1;
byte3 = byte1;
if(i == 2 || i == 6)
byte1 |= 0x80;
abyte1[l] = byte1;
i = ((int) (byte4));
j = i1;
} else
//* 110 242:goto 175
//* 111 245:goto 216
{
if(byte3 != 60)
break label0;
// 112 248:iload 4
// 113 250:bipush 60
// 114 252:icmpne 274
i = byte4 + 1;
// 115 255:iload 10
// 116 257:iconst_1
// 117 258:iadd
// 118 259:istore 5
byte1 = byte2;
// 119 261:iload_3
// 120 262:istore_2
j = i1;
// 121 263:iload 9
// 122 265:istore 6
k = j1;
// 123 267:iload 11
// 124 269:istore 7
}
}
goto _L7
//* 125 271:goto 126
j = i1 + 1;
// 126 274:iload 9
// 127 276:iconst_1
// 128 277:iadd
// 129 278:istore 6
byte1 = byte2;
// 130 280:iload_3
// 131 281:istore_2
i = ((int) (byte4));
// 132 282:iload 10
// 133 284:istore 5
k = j1;
// 134 286:iload 11
// 135 288:istore 7
goto _L7
//* 136 290:goto 126
_L3:
if(i1 > 0)
//* 137 293:iload 9
//* 138 295:ifle 317
{
j = i1 - 1;
// 139 298:iload 9
// 140 300:iconst_1
// 141 301:isub
// 142 302:istore 6
byte1 = byte2;
// 143 304:iload_3
// 144 305:istore_2
i = ((int) (byte4));
// 145 306:iload 10
// 146 308:istore 5
k = j1;
// 147 310:iload 11
// 148 312:istore 7
} else
//* 149 314:goto 126
if(byte4 > 0 && byte3 != 61)
//* 150 317:iload 10
//* 151 319:ifle 348
//* 152 322:iload 4
//* 153 324:bipush 61
//* 154 326:icmpeq 348
{
i = byte4 - 1;
// 155 329:iload 10
// 156 331:iconst_1
// 157 332:isub
// 158 333:istore 5
byte1 = byte2;
// 159 335:iload_3
// 160 336:istore_2
j = i1;
// 161 337:iload 9
// 162 339:istore 6
k = j1;
// 163 341:iload 11
// 164 343:istore 7
} else
//* 165 345:goto 126
{
byte1 = byte2;
// 166 348:iload_3
// 167 349:istore_2
i = ((int) (byte4));
// 168 350:iload 10
// 169 352:istore 5
j = i1;
// 170 354:iload 9
// 171 356:istore 6
k = j1;
// 172 358:iload 11
// 173 360:istore 7
if(j1 > 0)
//* 174 362:iload 11
//* 175 364:ifle 126
{
k = j1 - 1;
// 176 367:iload 11
// 177 369:iconst_1
// 178 370:isub
// 179 371:istore 7
byte1 = abyte2[k];
// 180 373:aload 14
// 181 375:iload 7
// 182 377:baload
// 183 378:istore_2
byte3 = (byte)(byte1 & 0x7f);
// 184 379:iload_2
// 185 380:bipush 127
// 186 382:iand
// 187 383:int2byte
// 188 384:istore 4
i = ((int) (byte4));
// 189 386:iload 10
// 190 388:istore 5
j = i1;
// 191 390:iload 9
// 192 392:istore 6
}
}
goto _L7
//* 193 394:goto 126
k = 0;
// 194 397:iconst_0
// 195 398:istore 7
j = 0;
// 196 400:iconst_0
// 197 401:istore 6
i = 0;
// 198 403:iconst_0
// 199 404:istore 5
byte3 = byte0;
// 200 406:iload_1
// 201 407:istore 4
byte1 = byte0;
// 202 409:iload_1
// 203 410:istore_2
abyte1[l] = byte0;
// 204 411:aload 13
// 205 413:iload 8
// 206 415:iload_1
// 207 416:bastore
goto _L7
//* 208 417:goto 126
return abyte1;
// 209 420:aload 13
// 210 422:areturn
}
private int reinsertExplicitCodes(int i)
{
int j = initialTypes.length;
// 0 0:aload_0
// 1 1:getfield #1041 <Field byte[] initialTypes>
// 2 4:arraylength
// 3 5:istore_3
do
{
j--;
// 4 6:iload_3
// 5 7:iconst_1
// 6 8:isub
// 7 9:istore_3
if(j < 0)
break;
// 8 10:iload_3
// 9 11:iflt 121
byte byte0 = initialTypes[j];
// 10 14:aload_0
// 11 15:getfield #1041 <Field byte[] initialTypes>
// 12 18:iload_3
// 13 19:baload
// 14 20:istore_2
if(byte0 == 1 || byte0 == 5 || byte0 == 2 || byte0 == 6 || byte0 == 7 || byte0 == 14)
//* 15 21:iload_2
//* 16 22:iconst_1
//* 17 23:icmpeq 54
//* 18 26:iload_2
//* 19 27:iconst_5
//* 20 28:icmpeq 54
//* 21 31:iload_2
//* 22 32:iconst_2
//* 23 33:icmpeq 54
//* 24 36:iload_2
//* 25 37:bipush 6
//* 26 39:icmpeq 54
//* 27 42:iload_2
//* 28 43:bipush 7
//* 29 45:icmpeq 54
//* 30 48:iload_2
//* 31 49:bipush 14
//* 32 51:icmpne 78
{
embeddings[j] = 0;
// 33 54:aload_0
// 34 55:getfield #1071 <Field byte[] embeddings>
// 35 58:iload_3
// 36 59:iconst_0
// 37 60:bastore
resultTypes[j] = byte0;
// 38 61:aload_0
// 39 62:getfield #1065 <Field byte[] resultTypes>
// 40 65:iload_3
// 41 66:iload_2
// 42 67:bastore
resultLevels[j] = -1;
// 43 68:aload_0
// 44 69:getfield #1079 <Field byte[] resultLevels>
// 45 72:iload_3
// 46 73:iconst_m1
// 47 74:bastore
} else
//* 48 75:goto 6
{
i--;
// 49 78:iload_1
// 50 79:iconst_1
// 51 80:isub
// 52 81:istore_1
embeddings[j] = embeddings[i];
// 53 82:aload_0
// 54 83:getfield #1071 <Field byte[] embeddings>
// 55 86:iload_3
// 56 87:aload_0
// 57 88:getfield #1071 <Field byte[] embeddings>
// 58 91:iload_1
// 59 92:baload
// 60 93:bastore
resultTypes[j] = resultTypes[i];
// 61 94:aload_0
// 62 95:getfield #1065 <Field byte[] resultTypes>
// 63 98:iload_3
// 64 99:aload_0
// 65 100:getfield #1065 <Field byte[] resultTypes>
// 66 103:iload_1
// 67 104:baload
// 68 105:bastore
resultLevels[j] = resultLevels[i];
// 69 106:aload_0
// 70 107:getfield #1079 <Field byte[] resultLevels>
// 71 110:iload_3
// 72 111:aload_0
// 73 112:getfield #1079 <Field byte[] resultLevels>
// 74 115:iload_1
// 75 116:baload
// 76 117:bastore
}
} while(true);
// 77 118:goto 6
if(resultLevels[0] == -1)
//* 78 121:aload_0
//* 79 122:getfield #1079 <Field byte[] resultLevels>
//* 80 125:iconst_0
//* 81 126:baload
//* 82 127:iconst_m1
//* 83 128:icmpne 141
resultLevels[0] = paragraphEmbeddingLevel;
// 84 131:aload_0
// 85 132:getfield #1079 <Field byte[] resultLevels>
// 86 135:iconst_0
// 87 136:aload_0
// 88 137:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 89 140:bastore
for(i = 1; i < initialTypes.length; i++)
//* 90 141:iconst_1
//* 91 142:istore_1
//* 92 143:iload_1
//* 93 144:aload_0
//* 94 145:getfield #1041 <Field byte[] initialTypes>
//* 95 148:arraylength
//* 96 149:icmpge 183
if(resultLevels[i] == -1)
//* 97 152:aload_0
//* 98 153:getfield #1079 <Field byte[] resultLevels>
//* 99 156:iload_1
//* 100 157:baload
//* 101 158:iconst_m1
//* 102 159:icmpne 176
resultLevels[i] = resultLevels[i - 1];
// 103 162:aload_0
// 104 163:getfield #1079 <Field byte[] resultLevels>
// 105 166:iload_1
// 106 167:aload_0
// 107 168:getfield #1079 <Field byte[] resultLevels>
// 108 171:iload_1
// 109 172:iconst_1
// 110 173:isub
// 111 174:baload
// 112 175:bastore
// 113 176:iload_1
// 114 177:iconst_1
// 115 178:iadd
// 116 179:istore_1
//* 117 180:goto 143
return initialTypes.length;
// 118 183:aload_0
// 119 184:getfield #1041 <Field byte[] initialTypes>
// 120 187:arraylength
// 121 188:ireturn
}
private int removeExplicitCodes()
{
int j = 0;
// 0 0:iconst_0
// 1 1:istore_2
for(int i = 0; i < textLength;)
//* 2 2:iconst_0
//* 3 3:istore_1
//* 4 4:iload_1
//* 5 5:aload_0
//* 6 6:getfield #1073 <Field int textLength>
//* 7 9:icmpge 120
{
byte byte0 = initialTypes[i];
// 8 12:aload_0
// 9 13:getfield #1041 <Field byte[] initialTypes>
// 10 16:iload_1
// 11 17:baload
// 12 18:istore 4
int k = j;
// 13 20:iload_2
// 14 21:istore_3
if(byte0 != 1)
//* 15 22:iload 4
//* 16 24:iconst_1
//* 17 25:icmpeq 111
{
k = j;
// 18 28:iload_2
// 19 29:istore_3
if(byte0 != 5)
//* 20 30:iload 4
//* 21 32:iconst_5
//* 22 33:icmpeq 111
{
k = j;
// 23 36:iload_2
// 24 37:istore_3
if(byte0 != 2)
//* 25 38:iload 4
//* 26 40:iconst_2
//* 27 41:icmpeq 111
{
k = j;
// 28 44:iload_2
// 29 45:istore_3
if(byte0 != 6)
//* 30 46:iload 4
//* 31 48:bipush 6
//* 32 50:icmpeq 111
{
k = j;
// 33 53:iload_2
// 34 54:istore_3
if(byte0 != 7)
//* 35 55:iload 4
//* 36 57:bipush 7
//* 37 59:icmpeq 111
{
k = j;
// 38 62:iload_2
// 39 63:istore_3
if(byte0 != 14)
//* 40 64:iload 4
//* 41 66:bipush 14
//* 42 68:icmpeq 111
{
embeddings[j] = embeddings[i];
// 43 71:aload_0
// 44 72:getfield #1071 <Field byte[] embeddings>
// 45 75:iload_2
// 46 76:aload_0
// 47 77:getfield #1071 <Field byte[] embeddings>
// 48 80:iload_1
// 49 81:baload
// 50 82:bastore
resultTypes[j] = resultTypes[i];
// 51 83:aload_0
// 52 84:getfield #1065 <Field byte[] resultTypes>
// 53 87:iload_2
// 54 88:aload_0
// 55 89:getfield #1065 <Field byte[] resultTypes>
// 56 92:iload_1
// 57 93:baload
// 58 94:bastore
resultLevels[j] = resultLevels[i];
// 59 95:aload_0
// 60 96:getfield #1079 <Field byte[] resultLevels>
// 61 99:iload_2
// 62 100:aload_0
// 63 101:getfield #1079 <Field byte[] resultLevels>
// 64 104:iload_1
// 65 105:baload
// 66 106:bastore
k = j + 1;
// 67 107:iload_2
// 68 108:iconst_1
// 69 109:iadd
// 70 110:istore_3
}
}
}
}
}
}
i++;
// 71 111:iload_1
// 72 112:iconst_1
// 73 113:iadd
// 74 114:istore_1
j = k;
// 75 115:iload_3
// 76 116:istore_2
}
//* 77 117:goto 4
return j;
// 78 120:iload_2
// 79 121:ireturn
}
private void resolveImplicitLevels(int i, int j, byte byte0, byte byte1, byte byte2)
{
if((byte0 & 1) == 0)
//* 0 0:iload_3
//* 1 1:iconst_1
//* 2 2:iand
//* 3 3:ifne 74
while(i < j)
//* 4 6:iload_1
//* 5 7:iload_2
//* 6 8:icmpge 116
{
byte0 = resultTypes[i];
// 7 11:aload_0
// 8 12:getfield #1065 <Field byte[] resultTypes>
// 9 15:iload_1
// 10 16:baload
// 11 17:istore_3
if(byte0 != 0)
//* 12 18:iload_3
//* 13 19:ifne 29
//* 14 22:iload_1
//* 15 23:iconst_1
//* 16 24:iadd
//* 17 25:istore_1
//* 18 26:goto 6
if(byte0 == 3)
//* 19 29:iload_3
//* 20 30:iconst_3
//* 21 31:icmpne 54
{
byte abyte0[] = resultLevels;
// 22 34:aload_0
// 23 35:getfield #1079 <Field byte[] resultLevels>
// 24 38:astore 6
abyte0[i] = (byte)(abyte0[i] + 1);
// 25 40:aload 6
// 26 42:iload_1
// 27 43:aload 6
// 28 45:iload_1
// 29 46:baload
// 30 47:iconst_1
// 31 48:iadd
// 32 49:int2byte
// 33 50:bastore
} else
//* 34 51:goto 22
{
byte abyte1[] = resultLevels;
// 35 54:aload_0
// 36 55:getfield #1079 <Field byte[] resultLevels>
// 37 58:astore 6
abyte1[i] = (byte)(abyte1[i] + 2);
// 38 60:aload 6
// 39 62:iload_1
// 40 63:aload 6
// 41 65:iload_1
// 42 66:baload
// 43 67:iconst_2
// 44 68:iadd
// 45 69:int2byte
// 46 70:bastore
}
i++;
}
else
//* 47 71:goto 22
while(i < j)
//* 48 74:iload_1
//* 49 75:iload_2
//* 50 76:icmpge 116
{
if(resultTypes[i] != 3)
//* 51 79:aload_0
//* 52 80:getfield #1065 <Field byte[] resultTypes>
//* 53 83:iload_1
//* 54 84:baload
//* 55 85:iconst_3
//* 56 86:icmpne 96
//* 57 89:iload_1
//* 58 90:iconst_1
//* 59 91:iadd
//* 60 92:istore_1
//* 61 93:goto 74
{
byte abyte2[] = resultLevels;
// 62 96:aload_0
// 63 97:getfield #1079 <Field byte[] resultLevels>
// 64 100:astore 6
abyte2[i] = (byte)(abyte2[i] + 1);
// 65 102:aload 6
// 66 104:iload_1
// 67 105:aload 6
// 68 107:iload_1
// 69 108:baload
// 70 109:iconst_1
// 71 110:iadd
// 72 111:int2byte
// 73 112:bastore
}
i++;
}
//* 74 113:goto 89
// 75 116:return
}
private void resolveNeutralTypes(int i, int j, byte byte0, byte byte1, byte byte2)
{
int l = i;
// 0 0:iload_1
// 1 1:istore 9
do
{
label0:
{
label1:
{
if(l >= j)
break label0;
// 2 3:iload 9
// 3 5:iload_2
// 4 6:icmpge 259
int i1 = ((int) (resultTypes[l]));
// 5 9:aload_0
// 6 10:getfield #1065 <Field byte[] resultTypes>
// 7 13:iload 9
// 8 15:baload
// 9 16:istore 10
int k;
if(i1 != 17 && i1 != 18 && i1 != 15)
//* 10 18:iload 10
//* 11 20:bipush 17
//* 12 22:icmpeq 50
//* 13 25:iload 10
//* 14 27:bipush 18
//* 15 29:icmpeq 50
//* 16 32:iload 10
//* 17 34:bipush 15
//* 18 36:icmpeq 50
{
k = l;
// 19 39:iload 9
// 20 41:istore 8
if(i1 != 16)
break label1;
// 21 43:iload 10
// 22 45:bipush 16
// 23 47:icmpne 123
}
i1 = findRunLimit(l, j, new byte[] {
15, 16, 17, 18
});
// 24 50:aload_0
// 25 51:iload 9
// 26 53:iload_2
// 27 54:iconst_4
// 28 55:newarray byte[]
// 29 57:dup
// 30 58:iconst_0
// 31 59:ldc1 #10 <Int 15>
// 32 61:bastore
// 33 62:dup
// 34 63:iconst_1
// 35 64:ldc1 #40 <Int 16>
// 36 66:bastore
// 37 67:dup
// 38 68:iconst_2
// 39 69:ldc1 #44 <Int 17>
// 40 71:bastore
// 41 72:dup
// 42 73:iconst_3
// 43 74:ldc1 #30 <Int 18>
// 44 76:bastore
// 45 77:invokespecial #1097 <Method int findRunLimit(int, int, byte[])>
// 46 80:istore 10
byte byte3;
if(l == i)
//* 47 82:iload 9
//* 48 84:iload_1
//* 49 85:icmpne 132
{
byte3 = byte1;
// 50 88:iload 4
// 51 90:istore 6
} else
//* 52 92:iload 10
//* 53 94:iload_2
//* 54 95:icmpne 192
//* 55 98:iload 5
//* 56 100:istore 8
//* 57 102:iload 6
//* 58 104:iload 8
//* 59 106:icmpne 250
//* 60 109:aload_0
//* 61 110:iload 9
//* 62 112:iload 10
//* 63 114:iload 6
//* 64 116:invokespecial #1101 <Method void setTypes(int, int, byte)>
//* 65 119:iload 10
//* 66 121:istore 8
//* 67 123:iload 8
//* 68 125:iconst_1
//* 69 126:iadd
//* 70 127:istore 9
//* 71 129:goto 3
{
byte byte4 = resultTypes[l - 1];
// 72 132:aload_0
// 73 133:getfield #1065 <Field byte[] resultTypes>
// 74 136:iload 9
// 75 138:iconst_1
// 76 139:isub
// 77 140:baload
// 78 141:istore 7
byte3 = byte4;
// 79 143:iload 7
// 80 145:istore 6
if(byte4 != 0)
//* 81 147:iload 7
//* 82 149:ifeq 92
{
byte3 = byte4;
// 83 152:iload 7
// 84 154:istore 6
if(byte4 != 3)
//* 85 156:iload 7
//* 86 158:iconst_3
//* 87 159:icmpeq 92
if(byte4 == 11)
//* 88 162:iload 7
//* 89 164:bipush 11
//* 90 166:icmpne 175
{
byte3 = 3;
// 91 169:iconst_3
// 92 170:istore 6
} else
//* 93 172:goto 92
{
byte3 = byte4;
// 94 175:iload 7
// 95 177:istore 6
if(byte4 == 8)
//* 96 179:iload 7
//* 97 181:bipush 8
//* 98 183:icmpne 92
byte3 = 3;
// 99 186:iconst_3
// 100 187:istore 6
}
}
}
if(i1 == j)
{
k = ((int) (byte2));
} else
//* 101 189:goto 92
{
byte byte5 = resultTypes[i1];
// 102 192:aload_0
// 103 193:getfield #1065 <Field byte[] resultTypes>
// 104 196:iload 10
// 105 198:baload
// 106 199:istore 11
k = ((int) (byte5));
// 107 201:iload 11
// 108 203:istore 8
if(byte5 != 0)
//* 109 205:iload 11
//* 110 207:ifeq 102
{
k = ((int) (byte5));
// 111 210:iload 11
// 112 212:istore 8
if(byte5 != 3)
//* 113 214:iload 11
//* 114 216:iconst_3
//* 115 217:icmpeq 102
if(byte5 == 11)
//* 116 220:iload 11
//* 117 222:bipush 11
//* 118 224:icmpne 233
{
k = 3;
// 119 227:iconst_3
// 120 228:istore 8
} else
//* 121 230:goto 102
{
k = ((int) (byte5));
// 122 233:iload 11
// 123 235:istore 8
if(byte5 == 8)
//* 124 237:iload 11
//* 125 239:bipush 8
//* 126 241:icmpne 102
k = 3;
// 127 244:iconst_3
// 128 245:istore 8
}
}
}
if(byte3 != k)
//* 129 247:goto 102
byte3 = typeForLevel(((int) (byte0)));
// 130 250:iload_3
// 131 251:invokestatic #1077 <Method byte typeForLevel(int)>
// 132 254:istore 6
setTypes(l, i1, byte3);
k = i1;
}
l = k + 1;
continue;
}
//* 133 256:goto 109
return;
// 134 259:return
} while(true);
}
private void resolveWeakTypes(int i, int j, byte byte0, byte byte1, byte byte2)
{
byte byte3 = byte1;
// 0 0:iload 4
// 1 2:istore 6
byte0 = ((byte) (i));
// 2 4:iload_1
// 3 5:istore_3
while(byte0 < j)
//* 4 6:iload_3
//* 5 7:iload_2
//* 6 8:icmpge 48
{
byte byte4 = resultTypes[byte0];
// 7 11:aload_0
// 8 12:getfield #1065 <Field byte[] resultTypes>
// 9 15:iload_3
// 10 16:baload
// 11 17:istore 7
if(byte4 == 13)
//* 12 19:iload 7
//* 13 21:bipush 13
//* 14 23:icmpne 41
resultTypes[byte0] = byte3;
// 15 26:aload_0
// 16 27:getfield #1065 <Field byte[] resultTypes>
// 17 30:iload_3
// 18 31:iload 6
// 19 33:bastore
else
//* 20 34:iload_3
//* 21 35:iconst_1
//* 22 36:iadd
//* 23 37:istore_3
//* 24 38:goto 6
byte3 = byte4;
// 25 41:iload 7
// 26 43:istore 6
byte0++;
}
//* 27 45:goto 34
byte0 = ((byte) (i));
// 28 48:iload_1
// 29 49:istore_3
_L14:
if(byte0 >= j) goto _L2; else goto _L1
// 30 50:iload_3
// 31 51:iload_2
// 32 52:icmpge 133
_L1:
if(resultTypes[byte0] != 8) goto _L4; else goto _L3
// 33 55:aload_0
// 34 56:getfield #1065 <Field byte[] resultTypes>
// 35 59:iload_3
// 36 60:baload
// 37 61:bipush 8
// 38 63:icmpne 117
_L3:
int k = byte0 - 1;
// 39 66:iload_3
// 40 67:iconst_1
// 41 68:isub
// 42 69:istore 8
_L8:
if(k < i) goto _L4; else goto _L5
// 43 71:iload 8
// 44 73:iload_1
// 45 74:icmplt 117
_L5:
int i1 = ((int) (resultTypes[k]));
// 46 77:aload_0
// 47 78:getfield #1065 <Field byte[] resultTypes>
// 48 81:iload 8
// 49 83:baload
// 50 84:istore 9
if(i1 != 0 && i1 != 3 && i1 != 4) goto _L7; else goto _L6
// 51 86:iload 9
// 52 88:ifeq 103
// 53 91:iload 9
// 54 93:iconst_3
// 55 94:icmpeq 103
// 56 97:iload 9
// 57 99:iconst_4
// 58 100:icmpne 124
_L6:
if(i1 == 4)
//* 59 103:iload 9
//* 60 105:iconst_4
//* 61 106:icmpne 117
resultTypes[byte0] = 11;
// 62 109:aload_0
// 63 110:getfield #1065 <Field byte[] resultTypes>
// 64 113:iload_3
// 65 114:bipush 11
// 66 116:bastore
_L4:
byte0++;
// 67 117:iload_3
// 68 118:iconst_1
// 69 119:iadd
// 70 120:istore_3
continue; /* Loop/switch isn't completed */
// 71 121:goto 50
_L7:
k--;
// 72 124:iload 8
// 73 126:iconst_1
// 74 127:isub
// 75 128:istore 8
if(true) goto _L8; else goto _L2
// 76 130:goto 71
_L2:
for(byte0 = ((byte) (i)); byte0 < j; byte0++)
//* 77 133:iload_1
//* 78 134:istore_3
//* 79 135:iload_3
//* 80 136:iload_2
//* 81 137:icmpge 164
if(resultTypes[byte0] == 4)
//* 82 140:aload_0
//* 83 141:getfield #1065 <Field byte[] resultTypes>
//* 84 144:iload_3
//* 85 145:baload
//* 86 146:iconst_4
//* 87 147:icmpne 157
resultTypes[byte0] = 3;
// 88 150:aload_0
// 89 151:getfield #1065 <Field byte[] resultTypes>
// 90 154:iload_3
// 91 155:iconst_3
// 92 156:bastore
// 93 157:iload_3
// 94 158:iconst_1
// 95 159:iadd
// 96 160:istore_3
//* 97 161:goto 135
byte0 = ((byte) (i + 1));
// 98 164:iload_1
// 99 165:iconst_1
// 100 166:iadd
// 101 167:istore_3
while(byte0 < j - 1)
//* 102 168:iload_3
//* 103 169:iload_2
//* 104 170:iconst_1
//* 105 171:isub
//* 106 172:icmpge 282
{
if(resultTypes[byte0] == 9 || resultTypes[byte0] == 12)
//* 107 175:aload_0
//* 108 176:getfield #1065 <Field byte[] resultTypes>
//* 109 179:iload_3
//* 110 180:baload
//* 111 181:bipush 9
//* 112 183:icmpeq 197
//* 113 186:aload_0
//* 114 187:getfield #1065 <Field byte[] resultTypes>
//* 115 190:iload_3
//* 116 191:baload
//* 117 192:bipush 12
//* 118 194:icmpne 239
{
byte byte5 = resultTypes[byte0 - 1];
// 119 197:aload_0
// 120 198:getfield #1065 <Field byte[] resultTypes>
// 121 201:iload_3
// 122 202:iconst_1
// 123 203:isub
// 124 204:baload
// 125 205:istore 8
i1 = ((int) (resultTypes[byte0 + 1]));
// 126 207:aload_0
// 127 208:getfield #1065 <Field byte[] resultTypes>
// 128 211:iload_3
// 129 212:iconst_1
// 130 213:iadd
// 131 214:baload
// 132 215:istore 9
if(byte5 == 8 && i1 == 8)
//* 133 217:iload 8
//* 134 219:bipush 8
//* 135 221:icmpne 246
//* 136 224:iload 9
//* 137 226:bipush 8
//* 138 228:icmpne 246
resultTypes[byte0] = 8;
// 139 231:aload_0
// 140 232:getfield #1065 <Field byte[] resultTypes>
// 141 235:iload_3
// 142 236:bipush 8
// 143 238:bastore
else
//* 144 239:iload_3
//* 145 240:iconst_1
//* 146 241:iadd
//* 147 242:istore_3
//* 148 243:goto 168
if(resultTypes[byte0] == 12 && byte5 == 11 && i1 == 11)
//* 149 246:aload_0
//* 150 247:getfield #1065 <Field byte[] resultTypes>
//* 151 250:iload_3
//* 152 251:baload
//* 153 252:bipush 12
//* 154 254:icmpne 239
//* 155 257:iload 8
//* 156 259:bipush 11
//* 157 261:icmpne 239
//* 158 264:iload 9
//* 159 266:bipush 11
//* 160 268:icmpne 239
resultTypes[byte0] = 11;
// 161 271:aload_0
// 162 272:getfield #1065 <Field byte[] resultTypes>
// 163 275:iload_3
// 164 276:bipush 11
// 165 278:bastore
}
byte0++;
}
//* 166 279:goto 239
byte0 = ((byte) (i));
// 167 282:iload_1
// 168 283:istore_3
while(byte0 < j)
//* 169 284:iload_3
//* 170 285:iload_2
//* 171 286:icmpge 402
{
int l = ((int) (byte0));
// 172 289:iload_3
// 173 290:istore 8
if(resultTypes[byte0] != 10)
continue;
// 174 292:aload_0
// 175 293:getfield #1065 <Field byte[] resultTypes>
// 176 296:iload_3
// 177 297:baload
// 178 298:bipush 10
// 179 300:icmpne 369
int j1 = findRunLimit(((int) (byte0)), j, new byte[] {
10
});
// 180 303:aload_0
// 181 304:iload_3
// 182 305:iload_2
// 183 306:iconst_1
// 184 307:newarray byte[]
// 185 309:dup
// 186 310:iconst_0
// 187 311:bipush 10
// 188 313:bastore
// 189 314:invokespecial #1097 <Method int findRunLimit(int, int, byte[])>
// 190 317:istore 10
if(byte0 == i)
//* 191 319:iload_3
//* 192 320:iload_1
//* 193 321:icmpne 377
l = ((int) (byte1));
// 194 324:iload 4
// 195 326:istore 8
else
//* 196 328:iload 8
//* 197 330:istore 9
//* 198 332:iload 8
//* 199 334:bipush 8
//* 200 336:icmpeq 349
//* 201 339:iload 10
//* 202 341:iload_2
//* 203 342:icmpne 390
//* 204 345:iload 5
//* 205 347:istore 9
//* 206 349:iload 9
//* 207 351:bipush 8
//* 208 353:icmpne 365
//* 209 356:aload_0
//* 210 357:iload_3
//* 211 358:iload 10
//* 212 360:bipush 8
//* 213 362:invokespecial #1101 <Method void setTypes(int, int, byte)>
//* 214 365:iload 10
//* 215 367:istore 8
//* 216 369:iload 8
//* 217 371:iconst_1
//* 218 372:iadd
//* 219 373:istore_3
//* 220 374:goto 284
l = ((int) (resultTypes[byte0 - 1]));
// 221 377:aload_0
// 222 378:getfield #1065 <Field byte[] resultTypes>
// 223 381:iload_3
// 224 382:iconst_1
// 225 383:isub
// 226 384:baload
// 227 385:istore 8
i1 = l;
if(l != 8)
if(j1 == j)
i1 = ((int) (byte2));
else
//* 228 387:goto 328
i1 = ((int) (resultTypes[j1]));
// 229 390:aload_0
// 230 391:getfield #1065 <Field byte[] resultTypes>
// 231 394:iload 10
// 232 396:baload
// 233 397:istore 9
if(i1 == 8)
setTypes(((int) (byte0)), j1, (byte)8);
l = j1;
byte0 = ((byte) (l + 1));
}
//* 234 399:goto 349
for(byte0 = ((byte) (i)); byte0 < j; byte0++)
//* 235 402:iload_1
//* 236 403:istore_3
//* 237 404:iload_3
//* 238 405:iload_2
//* 239 406:icmpge 453
{
byte2 = resultTypes[byte0];
// 240 409:aload_0
// 241 410:getfield #1065 <Field byte[] resultTypes>
// 242 413:iload_3
// 243 414:baload
// 244 415:istore 5
if(byte2 == 9 || byte2 == 10 || byte2 == 12)
//* 245 417:iload 5
//* 246 419:bipush 9
//* 247 421:icmpeq 438
//* 248 424:iload 5
//* 249 426:bipush 10
//* 250 428:icmpeq 438
//* 251 431:iload 5
//* 252 433:bipush 12
//* 253 435:icmpne 446
resultTypes[byte0] = 18;
// 254 438:aload_0
// 255 439:getfield #1065 <Field byte[] resultTypes>
// 256 442:iload_3
// 257 443:bipush 18
// 258 445:bastore
}
// 259 446:iload_3
// 260 447:iconst_1
// 261 448:iadd
// 262 449:istore_3
//* 263 450:goto 404
byte0 = ((byte) (i));
// 264 453:iload_1
// 265 454:istore_3
_L11:
if(byte0 >= j)
break MISSING_BLOCK_LABEL_538;
// 266 455:iload_3
// 267 456:iload_2
// 268 457:icmpge 538
if(resultTypes[byte0] != 8) goto _L10; else goto _L9
// 269 460:aload_0
// 270 461:getfield #1065 <Field byte[] resultTypes>
// 271 464:iload_3
// 272 465:baload
// 273 466:bipush 8
// 274 468:icmpne 522
_L9:
i1 = ((int) (byte1));
// 275 471:iload 4
// 276 473:istore 9
byte2 = ((byte) (byte0 - 1));
// 277 475:iload_3
// 278 476:iconst_1
// 279 477:isub
// 280 478:istore 5
_L12:
byte byte6 = ((byte) (i1));
// 281 480:iload 9
// 282 482:istore 8
if(byte2 >= i)
//* 283 484:iload 5
//* 284 486:iload_1
//* 285 487:icmplt 510
{
byte6 = resultTypes[byte2];
// 286 490:aload_0
// 287 491:getfield #1065 <Field byte[] resultTypes>
// 288 494:iload 5
// 289 496:baload
// 290 497:istore 8
if(byte6 != 0 && byte6 != 3)
break MISSING_BLOCK_LABEL_529;
// 291 499:iload 8
// 292 501:ifeq 510
// 293 504:iload 8
// 294 506:iconst_3
// 295 507:icmpne 529
}
if(byte6 == 0)
//* 296 510:iload 8
//* 297 512:ifne 522
resultTypes[byte0] = 0;
// 298 515:aload_0
// 299 516:getfield #1065 <Field byte[] resultTypes>
// 300 519:iload_3
// 301 520:iconst_0
// 302 521:bastore
_L10:
byte0++;
// 303 522:iload_3
// 304 523:iconst_1
// 305 524:iadd
// 306 525:istore_3
goto _L11
//* 307 526:goto 455
byte2--;
// 308 529:iload 5
// 309 531:iconst_1
// 310 532:isub
// 311 533:istore 5
goto _L12
//* 312 535:goto 480
return;
// 313 538:return
if(true) goto _L14; else goto _L13
_L13:
}
private void runAlgorithm()
{
textLength = initialTypes.length;
// 0 0:aload_0
// 1 1:aload_0
// 2 2:getfield #1041 <Field byte[] initialTypes>
// 3 5:arraylength
// 4 6:putfield #1073 <Field int textLength>
resultTypes = (byte[])(byte[])((byte []) (initialTypes)).clone();
// 5 9:aload_0
// 6 10:aload_0
// 7 11:getfield #1041 <Field byte[] initialTypes>
// 8 14:invokevirtual #1039 <Method Object _5B_B.clone()>
// 9 17:checkcast #1035 <Class byte[]>
// 10 20:checkcast #1035 <Class byte[]>
// 11 23:putfield #1065 <Field byte[] resultTypes>
if(paragraphEmbeddingLevel == -1)
//* 12 26:aload_0
//* 13 27:getfield #1031 <Field byte paragraphEmbeddingLevel>
//* 14 30:iconst_m1
//* 15 31:icmpne 38
determineParagraphEmbeddingLevel();
// 16 34:aload_0
// 17 35:invokespecial #1104 <Method void determineParagraphEmbeddingLevel()>
resultLevels = new byte[textLength];
// 18 38:aload_0
// 19 39:aload_0
// 20 40:getfield #1073 <Field int textLength>
// 21 43:newarray byte[]
// 22 45:putfield #1079 <Field byte[] resultLevels>
setLevels(0, textLength, paragraphEmbeddingLevel);
// 23 48:aload_0
// 24 49:iconst_0
// 25 50:aload_0
// 26 51:getfield #1073 <Field int textLength>
// 27 54:aload_0
// 28 55:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 29 58:invokespecial #1107 <Method void setLevels(int, int, byte)>
determineExplicitEmbeddingLevels();
// 30 61:aload_0
// 31 62:invokespecial #1109 <Method void determineExplicitEmbeddingLevels()>
textLength = removeExplicitCodes();
// 32 65:aload_0
// 33 66:aload_0
// 34 67:invokespecial #1111 <Method int removeExplicitCodes()>
// 35 70:putfield #1073 <Field int textLength>
int i = ((int) (paragraphEmbeddingLevel));
// 36 73:aload_0
// 37 74:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 38 77:istore 4
int j = 0;
// 39 79:iconst_0
// 40 80:istore 5
while(j < textLength)
//* 41 82:iload 5
//* 42 84:aload_0
//* 43 85:getfield #1073 <Field int textLength>
//* 44 88:icmpge 228
{
byte byte0 = resultLevels[j];
// 45 91:aload_0
// 46 92:getfield #1079 <Field byte[] resultLevels>
// 47 95:iload 5
// 48 97:baload
// 49 98:istore_1
byte byte1 = typeForLevel(Math.max(i, ((int) (byte0))));
// 50 99:iload 4
// 51 101:iload_1
// 52 102:invokestatic #1117 <Method int Math.max(int, int)>
// 53 105:invokestatic #1077 <Method byte typeForLevel(int)>
// 54 108:istore_2
for(i = j + 1; i < textLength && resultLevels[i] == byte0; i++);
// 55 109:iload 5
// 56 111:iconst_1
// 57 112:iadd
// 58 113:istore 4
// 59 115:iload 4
// 60 117:aload_0
// 61 118:getfield #1073 <Field int textLength>
// 62 121:icmpge 144
// 63 124:aload_0
// 64 125:getfield #1079 <Field byte[] resultLevels>
// 65 128:iload 4
// 66 130:baload
// 67 131:iload_1
// 68 132:icmpne 144
// 69 135:iload 4
// 70 137:iconst_1
// 71 138:iadd
// 72 139:istore 4
//* 73 141:goto 115
byte byte2;
byte byte3;
if(i < textLength)
//* 74 144:iload 4
//* 75 146:aload_0
//* 76 147:getfield #1073 <Field int textLength>
//* 77 150:icmpge 219
byte3 = resultLevels[i];
// 78 153:aload_0
// 79 154:getfield #1079 <Field byte[] resultLevels>
// 80 157:iload 4
// 81 159:baload
// 82 160:istore 6
else
//* 83 162:iload 6
//* 84 164:iload_1
//* 85 165:invokestatic #1117 <Method int Math.max(int, int)>
//* 86 168:invokestatic #1077 <Method byte typeForLevel(int)>
//* 87 171:istore_3
//* 88 172:aload_0
//* 89 173:iload 5
//* 90 175:iload 4
//* 91 177:iload_1
//* 92 178:iload_2
//* 93 179:iload_3
//* 94 180:invokespecial #1119 <Method void resolveWeakTypes(int, int, byte, byte, byte)>
//* 95 183:aload_0
//* 96 184:iload 5
//* 97 186:iload 4
//* 98 188:iload_1
//* 99 189:iload_2
//* 100 190:iload_3
//* 101 191:invokespecial #1121 <Method void resolveNeutralTypes(int, int, byte, byte, byte)>
//* 102 194:aload_0
//* 103 195:iload 5
//* 104 197:iload 4
//* 105 199:iload_1
//* 106 200:iload_2
//* 107 201:iload_3
//* 108 202:invokespecial #1123 <Method void resolveImplicitLevels(int, int, byte, byte, byte)>
//* 109 205:iload_1
//* 110 206:istore 6
//* 111 208:iload 4
//* 112 210:istore 5
//* 113 212:iload 6
//* 114 214:istore 4
//* 115 216:goto 82
byte3 = paragraphEmbeddingLevel;
// 116 219:aload_0
// 117 220:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 118 223:istore 6
byte2 = typeForLevel(Math.max(((int) (byte3)), ((int) (byte0))));
resolveWeakTypes(j, i, byte0, byte1, byte2);
resolveNeutralTypes(j, i, byte0, byte1, byte2);
resolveImplicitLevels(j, i, byte0, byte1, byte2);
byte3 = byte0;
j = i;
i = ((int) (byte3));
}
//* 119 225:goto 162
textLength = reinsertExplicitCodes(textLength);
// 120 228:aload_0
// 121 229:aload_0
// 122 230:aload_0
// 123 231:getfield #1073 <Field int textLength>
// 124 234:invokespecial #1125 <Method int reinsertExplicitCodes(int)>
// 125 237:putfield #1073 <Field int textLength>
// 126 240:return
}
private void setLevels(int i, int j, byte byte0)
{
for(; i < j; i++)
//* 0 0:iload_1
//* 1 1:iload_2
//* 2 2:icmpge 19
resultLevels[i] = byte0;
// 3 5:aload_0
// 4 6:getfield #1079 <Field byte[] resultLevels>
// 5 9:iload_1
// 6 10:iload_3
// 7 11:bastore
// 8 12:iload_1
// 9 13:iconst_1
// 10 14:iadd
// 11 15:istore_1
//* 12 16:goto 0
// 13 19:return
}
private void setTypes(int i, int j, byte byte0)
{
for(; i < j; i++)
//* 0 0:iload_1
//* 1 1:iload_2
//* 2 2:icmpge 19
resultTypes[i] = byte0;
// 3 5:aload_0
// 4 6:getfield #1065 <Field byte[] resultTypes>
// 5 9:iload_1
// 6 10:iload_3
// 7 11:bastore
// 8 12:iload_1
// 9 13:iconst_1
// 10 14:iadd
// 11 15:istore_1
//* 12 16:goto 0
// 13 19:return
}
private static byte typeForLevel(int i)
{
return ((byte)((i & 1) != 0 ? 3 : 0));
// 0 0:iload_0
// 1 1:iconst_1
// 2 2:iand
// 3 3:ifne 8
// 4 6:iconst_0
// 5 7:ireturn
// 6 8:iconst_3
// 7 9:ireturn
}
private static void validateLineBreaks(int ai[], int i)
{
int k = 0;
// 0 0:iconst_0
// 1 1:istore_3
for(int j = 0; j < ai.length; j++)
//* 2 2:iconst_0
//* 3 3:istore_2
//* 4 4:iload_2
//* 5 5:aload_0
//* 6 6:arraylength
//* 7 7:icmpge 64
{
int l = ai[j];
// 8 10:aload_0
// 9 11:iload_2
// 10 12:iaload
// 11 13:istore 4
if(l <= k)
//* 12 15:iload 4
//* 13 17:iload_3
//* 14 18:icmpgt 54
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("bad.linebreak.1.at.index.2", new Object[] {
String.valueOf(l), String.valueOf(j)
}));
// 15 21:new #1129 <Class IllegalArgumentException>
// 16 24:dup
// 17 25:ldc2 #1131 <String "bad.linebreak.1.at.index.2">
// 18 28:iconst_2
// 19 29:anewarray Object[]
// 20 32:dup
// 21 33:iconst_0
// 22 34:iload 4
// 23 36:invokestatic #1137 <Method String String.valueOf(int)>
// 24 39:aastore
// 25 40:dup
// 26 41:iconst_1
// 27 42:iload_2
// 28 43:invokestatic #1137 <Method String String.valueOf(int)>
// 29 46:aastore
// 30 47:invokestatic #1143 <Method String MessageLocalization.getComposedMessage(String, Object[])>
// 31 50:invokespecial #1146 <Method void IllegalArgumentException(String)>
// 32 53:athrow
k = l;
// 33 54:iload 4
// 34 56:istore_3
}
// 35 57:iload_2
// 36 58:iconst_1
// 37 59:iadd
// 38 60:istore_2
//* 39 61:goto 4
if(k != i)
//* 40 64:iload_3
//* 41 65:iload_1
//* 42 66:icmpeq 84
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("last.linebreak.must.be.at.1", i));
// 43 69:new #1129 <Class IllegalArgumentException>
// 44 72:dup
// 45 73:ldc2 #1148 <String "last.linebreak.must.be.at.1">
// 46 76:iload_1
// 47 77:invokestatic #1151 <Method String MessageLocalization.getComposedMessage(String, int)>
// 48 80:invokespecial #1146 <Method void IllegalArgumentException(String)>
// 49 83:athrow
else
return;
// 50 84:return
}
private static void validateParagraphEmbeddingLevel(byte byte0)
{
if(byte0 != -1 && byte0 != 0 && byte0 != 1)
//* 0 0:iload_0
//* 1 1:iconst_m1
//* 2 2:icmpeq 29
//* 3 5:iload_0
//* 4 6:ifeq 29
//* 5 9:iload_0
//* 6 10:iconst_1
//* 7 11:icmpeq 29
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("illegal.paragraph.embedding.level.1", ((int) (byte0))));
// 8 14:new #1129 <Class IllegalArgumentException>
// 9 17:dup
// 10 18:ldc2 #1153 <String "illegal.paragraph.embedding.level.1">
// 11 21:iload_0
// 12 22:invokestatic #1151 <Method String MessageLocalization.getComposedMessage(String, int)>
// 13 25:invokespecial #1146 <Method void IllegalArgumentException(String)>
// 14 28:athrow
else
return;
// 15 29:return
}
private static void validateTypes(byte abyte0[])
{
if(abyte0 == null)
//* 0 0:aload_0
//* 1 1:ifnonnull 22
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("types.is.null", new Object[0]));
// 2 4:new #1129 <Class IllegalArgumentException>
// 3 7:dup
// 4 8:ldc2 #1155 <String "types.is.null">
// 5 11:iconst_0
// 6 12:anewarray Object[]
// 7 15:invokestatic #1143 <Method String MessageLocalization.getComposedMessage(String, Object[])>
// 8 18:invokespecial #1146 <Method void IllegalArgumentException(String)>
// 9 21:athrow
for(int i = 0; i < abyte0.length; i++)
//* 10 22:iconst_0
//* 11 23:istore_1
//* 12 24:iload_1
//* 13 25:aload_0
//* 14 26:arraylength
//* 15 27:icmpge 85
if(abyte0[i] < 0 || abyte0[i] > 18)
//* 16 30:aload_0
//* 17 31:iload_1
//* 18 32:baload
//* 19 33:iflt 44
//* 20 36:aload_0
//* 21 37:iload_1
//* 22 38:baload
//* 23 39:bipush 18
//* 24 41:icmple 78
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("illegal.type.value.at.1.2", new Object[] {
String.valueOf(i), String.valueOf(((int) (abyte0[i])))
}));
// 25 44:new #1129 <Class IllegalArgumentException>
// 26 47:dup
// 27 48:ldc2 #1157 <String "illegal.type.value.at.1.2">
// 28 51:iconst_2
// 29 52:anewarray Object[]
// 30 55:dup
// 31 56:iconst_0
// 32 57:iload_1
// 33 58:invokestatic #1137 <Method String String.valueOf(int)>
// 34 61:aastore
// 35 62:dup
// 36 63:iconst_1
// 37 64:aload_0
// 38 65:iload_1
// 39 66:baload
// 40 67:invokestatic #1137 <Method String String.valueOf(int)>
// 41 70:aastore
// 42 71:invokestatic #1143 <Method String MessageLocalization.getComposedMessage(String, Object[])>
// 43 74:invokespecial #1146 <Method void IllegalArgumentException(String)>
// 44 77:athrow
// 45 78:iload_1
// 46 79:iconst_1
// 47 80:iadd
// 48 81:istore_1
//* 49 82:goto 24
for(int j = 0; j < abyte0.length - 1; j++)
//* 50 85:iconst_0
//* 51 86:istore_1
//* 52 87:iload_1
//* 53 88:aload_0
//* 54 89:arraylength
//* 55 90:iconst_1
//* 56 91:isub
//* 57 92:icmpge 125
if(abyte0[j] == 15)
//* 58 95:aload_0
//* 59 96:iload_1
//* 60 97:baload
//* 61 98:bipush 15
//* 62 100:icmpne 118
throw new IllegalArgumentException(MessageLocalization.getComposedMessage("b.type.before.end.of.paragraph.at.index.1", j));
// 63 103:new #1129 <Class IllegalArgumentException>
// 64 106:dup
// 65 107:ldc2 #1159 <String "b.type.before.end.of.paragraph.at.index.1">
// 66 110:iload_1
// 67 111:invokestatic #1151 <Method String MessageLocalization.getComposedMessage(String, int)>
// 68 114:invokespecial #1146 <Method void IllegalArgumentException(String)>
// 69 117:athrow
// 70 118:iload_1
// 71 119:iconst_1
// 72 120:iadd
// 73 121:istore_1
//* 74 122:goto 87
// 75 125:return
}
public byte getBaseLevel()
{
return paragraphEmbeddingLevel;
// 0 0:aload_0
// 1 1:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 2 4:ireturn
}
public byte[] getLevels()
{
return getLevels(new int[] {
textLength
});
// 0 0:aload_0
// 1 1:iconst_1
// 2 2:newarray int[]
// 3 4:dup
// 4 5:iconst_0
// 5 6:aload_0
// 6 7:getfield #1073 <Field int textLength>
// 7 10:iastore
// 8 11:invokevirtual #1166 <Method byte[] getLevels(int[])>
// 9 14:areturn
}
public byte[] getLevels(int ai[])
{
validateLineBreaks(ai, textLength);
// 0 0:aload_1
// 1 1:aload_0
// 2 2:getfield #1073 <Field int textLength>
// 3 5:invokestatic #1168 <Method void validateLineBreaks(int[], int)>
byte abyte0[] = (byte[])(byte[])((byte []) (resultLevels)).clone();
// 4 8:aload_0
// 5 9:getfield #1079 <Field byte[] resultLevels>
// 6 12:invokevirtual #1039 <Method Object _5B_B.clone()>
// 7 15:checkcast #1035 <Class byte[]>
// 8 18:checkcast #1035 <Class byte[]>
// 9 21:astore 6
for(int i = 0; i < abyte0.length; i++)
//* 10 23:iconst_0
//* 11 24:istore_2
//* 12 25:iload_2
//* 13 26:aload 6
//* 14 28:arraylength
//* 15 29:icmpge 101
{
byte byte0 = initialTypes[i];
// 16 32:aload_0
// 17 33:getfield #1041 <Field byte[] initialTypes>
// 18 36:iload_2
// 19 37:baload
// 20 38:istore_3
if(byte0 != 15 && byte0 != 16)
continue;
// 21 39:iload_3
// 22 40:bipush 15
// 23 42:icmpeq 51
// 24 45:iload_3
// 25 46:bipush 16
// 26 48:icmpne 94
abyte0[i] = paragraphEmbeddingLevel;
// 27 51:aload 6
// 28 53:iload_2
// 29 54:aload_0
// 30 55:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 31 58:bastore
for(int k = i - 1; k >= 0 && isWhitespace(initialTypes[k]); k--)
//* 32 59:iload_2
//* 33 60:iconst_1
//* 34 61:isub
//* 35 62:istore_3
//* 36 63:iload_3
//* 37 64:iflt 94
//* 38 67:aload_0
//* 39 68:getfield #1041 <Field byte[] initialTypes>
//* 40 71:iload_3
//* 41 72:baload
//* 42 73:invokestatic #1170 <Method boolean isWhitespace(byte)>
//* 43 76:ifeq 94
abyte0[k] = paragraphEmbeddingLevel;
// 44 79:aload 6
// 45 81:iload_3
// 46 82:aload_0
// 47 83:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 48 86:bastore
// 49 87:iload_3
// 50 88:iconst_1
// 51 89:isub
// 52 90:istore_3
}
// 53 91:goto 63
// 54 94:iload_2
// 55 95:iconst_1
// 56 96:iadd
// 57 97:istore_2
//* 58 98:goto 25
int l = 0;
// 59 101:iconst_0
// 60 102:istore_3
for(int j = 0; j < ai.length; j++)
//* 61 103:iconst_0
//* 62 104:istore_2
//* 63 105:iload_2
//* 64 106:aload_1
//* 65 107:arraylength
//* 66 108:icmpge 169
{
int j1 = ai[j];
// 67 111:aload_1
// 68 112:iload_2
// 69 113:iaload
// 70 114:istore 5
for(int i1 = j1 - 1; i1 >= l && isWhitespace(initialTypes[i1]); i1--)
//* 71 116:iload 5
//* 72 118:iconst_1
//* 73 119:isub
//* 74 120:istore 4
//* 75 122:iload 4
//* 76 124:iload_3
//* 77 125:icmplt 159
//* 78 128:aload_0
//* 79 129:getfield #1041 <Field byte[] initialTypes>
//* 80 132:iload 4
//* 81 134:baload
//* 82 135:invokestatic #1170 <Method boolean isWhitespace(byte)>
//* 83 138:ifeq 159
abyte0[i1] = paragraphEmbeddingLevel;
// 84 141:aload 6
// 85 143:iload 4
// 86 145:aload_0
// 87 146:getfield #1031 <Field byte paragraphEmbeddingLevel>
// 88 149:bastore
// 89 150:iload 4
// 90 152:iconst_1
// 91 153:isub
// 92 154:istore 4
//* 93 156:goto 122
l = j1;
// 94 159:iload 5
// 95 161:istore_3
}
// 96 162:iload_2
// 97 163:iconst_1
// 98 164:iadd
// 99 165:istore_2
//* 100 166:goto 105
return abyte0;
// 101 169:aload 6
// 102 171:areturn
}
public int[] getReordering(int ai[])
{
validateLineBreaks(ai, textLength);
// 0 0:aload_1
// 1 1:aload_0
// 2 2:getfield #1073 <Field int textLength>
// 3 5:invokestatic #1168 <Method void validateLineBreaks(int[], int)>
return computeMultilineReordering(getLevels(ai), ai);
// 4 8:aload_0
// 5 9:aload_1
// 6 10:invokevirtual #1166 <Method byte[] getLevels(int[])>
// 7 13:aload_1
// 8 14:invokestatic #1174 <Method int[] computeMultilineReordering(byte[], int[])>
// 9 17:areturn
}
public static final byte AL = 4;
public static final byte AN = 11;
public static final byte B = 15;
public static final byte BN = 14;
public static final byte CS = 12;
public static final byte EN = 8;
public static final byte ES = 9;
public static final byte ET = 10;
public static final byte L = 0;
public static final byte LRE = 1;
public static final byte LRO = 2;
public static final byte NSM = 13;
public static final byte ON = 18;
public static final byte PDF = 7;
public static final byte R = 3;
public static final byte RLE = 5;
public static final byte RLO = 6;
public static final byte S = 16;
public static final byte TYPE_MAX = 18;
public static final byte TYPE_MIN = 0;
public static final byte WS = 17;
private static char baseTypes[] = {
'\0', '\b', '\016', '\t', '\t', '\020', '\n', '\n', '\017', '\013',
'\013', '\020', '\f', '\f', '\021', '\r', '\r', '\017', '\016', '\033',
'\016', '\034', '\036', '\017', '\037', '\037', '\020', ' ', ' ', '\021',
'!', '"', '\022', '#', '%', '\n', '&', '*', '\022', '+',
'+', '\n', ',', ',', '\f', '-', '-', '\n', '.', '.',
'\f', '/', '/', '\t', '0', '9', '\b', ':', ':', '\f',
';', '@', '\022', 'A', 'Z', '\0', '[', '`', '\022', 'a',
'z', '\0', '{', '~', '\022', '\177', '\204', '\016', '\205', '\205',
'\017', '\206', '\237', '\016', '\240', '\240', '\f', '\241', '\241', '\022',
'\242', '\245', '\n', '\246', '\251', '\022', '\252', '\252', '\0', '\253',
'\257', '\022', '\260', '\261', '\n', '\262', '\263', '\b', '\264', '\264',
'\022', '\265', '\265', '\0', '\266', '\270', '\022', '\271', '\271', '\b',
'\272', '\272', '\0', '\273', '\277', '\022', '\300', '\326', '\0', '\327',
'\327', '\022', '\330', '\366', '\0', '\367', '\367', '\022', '\370', '\u02B8',
'\0', '\u02B9', '\u02BA', '\022', '\u02BB', '\u02C1', '\0', '\u02C2', '\u02CF', '\022',
'\u02D0', '\u02D1', '\0', '\u02D2', '\u02DF', '\022', '\u02E0', '\u02E4', '\0', '\u02E5',
'\u02ED', '\022', '\u02EE', '\u02EE', '\0', '\u02EF', '\u02FF', '\022', '\u0300', '\u0357',
'\r', '\u0358', '\u035C', '\0', '\u035D', '\u036F', '\r', '\u0370', '\u0373', '\0',
'\u0374', '\u0375', '\022', '\u0376', '\u037D', '\0', '\u037E', '\u037E', '\022', '\u037F',
'\u0383', '\0', '\u0384', '\u0385', '\022', '\u0386', '\u0386', '\0', '\u0387', '\u0387',
'\022', '\u0388', '\u03F5', '\0', '\u03F6', '\u03F6', '\022', '\u03F7', '\u0482', '\0',
'\u0483', '\u0486', '\r', '\u0487', '\u0487', '\0', '\u0488', '\u0489', '\r', '\u048A',
'\u0589', '\0', '\u058A', '\u058A', '\022', '\u058B', '\u0590', '\0', '\u0591', '\u05A1',
'\r', '\u05A2', '\u05A2', '\0', '\u05A3', '\u05B9', '\r', '\u05BA', '\u05BA', '\0',
'\u05BB', '\u05BD', '\r', '\u05BE', '\u05BE', '\003', '\u05BF', '\u05BF', '\r', '\u05C0',
'\u05C0', '\003', '\u05C1', '\u05C2', '\r', '\u05C3', '\u05C3', '\003', '\u05C4', '\u05C4',
'\r', '\u05C5', '\u05CF', '\0', '\u05D0', '\u05EA', '\003', '\u05EB', '\u05EF', '\0',
'\u05F0', '\u05F4', '\003', '\u05F5', '\u05FF', '\0', '\u0600', '\u0603', '\004', '\u0604',
'\u060B', '\0', '\u060C', '\u060C', '\f', '\u060D', '\u060D', '\004', '\u060E', '\u060F',
'\022', '\u0610', '\u0615', '\r', '\u0616', '\u061A', '\0', '\u061B', '\u061B', '\004',
'\u061C', '\u061E', '\0', '\u061F', '\u061F', '\004', '\u0620', '\u0620', '\0', '\u0621',
'\u063A', '\004', '\u063B', '\u063F', '\0', '\u0640', '\u064A', '\004', '\u064B', '\u0658',
'\r', '\u0659', '\u065F', '\0', '\u0660', '\u0669', '\013', '\u066A', '\u066A', '\n',
'\u066B', '\u066C', '\013', '\u066D', '\u066F', '\004', '\u0670', '\u0670', '\r', '\u0671',
'\u06D5', '\004', '\u06D6', '\u06DC', '\r', '\u06DD', '\u06DD', '\004', '\u06DE', '\u06E4',
'\r', '\u06E5', '\u06E6', '\004', '\u06E7', '\u06E8', '\r', '\u06E9', '\u06E9', '\022',
'\u06EA', '\u06ED', '\r', '\u06EE', '\u06EF', '\004', '\u06F0', '\u06F9', '\b', '\u06FA',
'\u070D', '\004', '\u070E', '\u070E', '\0', '\u070F', '\u070F', '\016', '\u0710', '\u0710',
'\004', '\u0711', '\u0711', '\r', '\u0712', '\u072F', '\004', '\u0730', '\u074A', '\r',
'\u074B', '\u074C', '\0', '\u074D', '\u074F', '\004', '\u0750', '\u077F', '\0', '\u0780',
'\u07A5', '\004', '\u07A6', '\u07B0', '\r', '\u07B1', '\u07B1', '\004', '\u07B2', '\u0900',
'\0', '\u0901', '\u0902', '\r', '\u0903', '\u093B', '\0', '\u093C', '\u093C', '\r',
'\u093D', '\u0940', '\0', '\u0941', '\u0948', '\r', '\u0949', '\u094C', '\0', '\u094D',
'\u094D', '\r', '\u094E', '\u0950', '\0', '\u0951', '\u0954', '\r', '\u0955', '\u0961',
'\0', '\u0962', '\u0963', '\r', '\u0964', '\u0980', '\0', '\u0981', '\u0981', '\r',
'\u0982', '\u09BB', '\0', '\u09BC', '\u09BC', '\r', '\u09BD', '\u09C0', '\0', '\u09C1',
'\u09C4', '\r', '\u09C5', '\u09CC', '\0', '\u09CD', '\u09CD', '\r', '\u09CE', '\u09E1',
'\0', '\u09E2', '\u09E3', '\r', '\u09E4', '\u09F1', '\0', '\u09F2', '\u09F3', '\n',
'\u09F4', '\u0A00', '\0', '\u0A01', '\u0A02', '\r', '\u0A03', '\u0A3B', '\0', '\u0A3C',
'\u0A3C', '\r', '\u0A3D', '\u0A40', '\0', '\u0A41', '\u0A42', '\r', '\u0A43', '\u0A46',
'\0', '\u0A47', '\u0A48', '\r', '\u0A49', '\u0A4A', '\0', '\u0A4B', '\u0A4D', '\r',
'\u0A4E', '\u0A6F', '\0', '\u0A70', '\u0A71', '\r', '\u0A72', '\u0A80', '\0', '\u0A81',
'\u0A82', '\r', '\u0A83', '\u0ABB', '\0', '\u0ABC', '\u0ABC', '\r', '\u0ABD', '\u0AC0',
'\0', '\u0AC1', '\u0AC5', '\r', '\u0AC6', '\u0AC6', '\0', '\u0AC7', '\u0AC8', '\r',
'\u0AC9', '\u0ACC', '\0', '\u0ACD', '\u0ACD', '\r', '\u0ACE', '\u0AE1', '\0', '\u0AE2',
'\u0AE3', '\r', '\u0AE4', '\u0AF0', '\0', '\u0AF1', '\u0AF1', '\n', '\u0AF2', '\u0B00',
'\0', '\u0B01', '\u0B01', '\r', '\u0B02', '\u0B3B', '\0', '\u0B3C', '\u0B3C', '\r',
'\u0B3D', '\u0B3E', '\0', '\u0B3F', '\u0B3F', '\r', '\u0B40', '\u0B40', '\0', '\u0B41',
'\u0B43', '\r', '\u0B44', '\u0B4C', '\0', '\u0B4D', '\u0B4D', '\r', '\u0B4E', '\u0B55',
'\0', '\u0B56', '\u0B56', '\r', '\u0B57', '\u0B81', '\0', '\u0B82', '\u0B82', '\r',
'\u0B83', '\u0BBF', '\0', '\u0BC0', '\u0BC0', '\r', '\u0BC1', '\u0BCC', '\0', '\u0BCD',
'\u0BCD', '\r', '\u0BCE', '\u0BF2', '\0', '\u0BF3', '\u0BF8', '\022', '\u0BF9', '\u0BF9',
'\n', '\u0BFA', '\u0BFA', '\022', '\u0BFB', '\u0C3D', '\0', '\u0C3E', '\u0C40', '\r',
'\u0C41', '\u0C45', '\0', '\u0C46', '\u0C48', '\r', '\u0C49', '\u0C49', '\0', '\u0C4A',
'\u0C4D', '\r', '\u0C4E', '\u0C54', '\0', '\u0C55', '\u0C56', '\r', '\u0C57', '\u0CBB',
'\0', '\u0CBC', '\u0CBC', '\r', '\u0CBD', '\u0CCB', '\0', '\u0CCC', '\u0CCD', '\r',
'\u0CCE', '\u0D40', '\0', '\u0D41', '\u0D43', '\r', '\u0D44', '\u0D4C', '\0', '\u0D4D',
'\u0D4D', '\r', '\u0D4E', '\u0DC9', '\0', '\u0DCA', '\u0DCA', '\r', '\u0DCB', '\u0DD1',
'\0', '\u0DD2', '\u0DD4', '\r', '\u0DD5', '\u0DD5', '\0', '\u0DD6', '\u0DD6', '\r',
'\u0DD7', '\u0E30', '\0', '\u0E31', '\u0E31', '\r', '\u0E32', '\u0E33', '\0', '\u0E34',
'\u0E3A', '\r', '\u0E3B', '\u0E3E', '\0', '\u0E3F', '\u0E3F', '\n', '\u0E40', '\u0E46',
'\0', '\u0E47', '\u0E4E', '\r', '\u0E4F', '\u0EB0', '\0', '\u0EB1', '\u0EB1', '\r',
'\u0EB2', '\u0EB3', '\0', '\u0EB4', '\u0EB9', '\r', '\u0EBA', '\u0EBA', '\0', '\u0EBB',
'\u0EBC', '\r', '\u0EBD', '\u0EC7', '\0', '\u0EC8', '\u0ECD', '\r', '\u0ECE', '\u0F17',
'\0', '\u0F18', '\u0F19', '\r', '\u0F1A', '\u0F34', '\0', '\u0F35', '\u0F35', '\r',
'\u0F36', '\u0F36', '\0', '\u0F37', '\u0F37', '\r', '\u0F38', '\u0F38', '\0', '\u0F39',
'\u0F39', '\r', '\u0F3A', '\u0F3D', '\022', '\u0F3E', '\u0F70', '\0', '\u0F71', '\u0F7E',
'\r', '\u0F7F', '\u0F7F', '\0', '\u0F80', '\u0F84', '\r', '\u0F85', '\u0F85', '\0',
'\u0F86', '\u0F87', '\r', '\u0F88', '\u0F8F', '\0', '\u0F90', '\u0F97', '\r', '\u0F98',
'\u0F98', '\0', '\u0F99', '\u0FBC', '\r', '\u0FBD', '\u0FC5', '\0', '\u0FC6', '\u0FC6',
'\r', '\u0FC7', '\u102C', '\0', '\u102D', '\u1030', '\r', '\u1031', '\u1031', '\0',
'\u1032', '\u1032', '\r', '\u1033', '\u1035', '\0', '\u1036', '\u1037', '\r', '\u1038',
'\u1038', '\0', '\u1039', '\u1039', '\r', '\u103A', '\u1057', '\0', '\u1058', '\u1059',
'\r', '\u105A', '\u167F', '\0', '\u1680', '\u1680', '\021', '\u1681', '\u169A', '\0',
'\u169B', '\u169C', '\022', '\u169D', '\u1711', '\0', '\u1712', '\u1714', '\r', '\u1715',
'\u1731', '\0', '\u1732', '\u1734', '\r', '\u1735', '\u1751', '\0', '\u1752', '\u1753',
'\r', '\u1754', '\u1771', '\0', '\u1772', '\u1773', '\r', '\u1774', '\u17B6', '\0',
'\u17B7', '\u17BD', '\r', '\u17BE', '\u17C5', '\0', '\u17C6', '\u17C6', '\r', '\u17C7',
'\u17C8', '\0', '\u17C9', '\u17D3', '\r', '\u17D4', '\u17DA', '\0', '\u17DB', '\u17DB',
'\n', '\u17DC', '\u17DC', '\0', '\u17DD', '\u17DD', '\r', '\u17DE', '\u17EF', '\0',
'\u17F0', '\u17F9', '\022', '\u17FA', '\u17FF', '\0', '\u1800', '\u180A', '\022', '\u180B',
'\u180D', '\r', '\u180E', '\u180E', '\021', '\u180F', '\u18A8', '\0', '\u18A9', '\u18A9',
'\r', '\u18AA', '\u191F', '\0', '\u1920', '\u1922', '\r', '\u1923', '\u1926', '\0',
'\u1927', '\u192B', '\r', '\u192C', '\u1931', '\0', '\u1932', '\u1932', '\r', '\u1933',
'\u1938', '\0', '\u1939', '\u193B', '\r', '\u193C', '\u193F', '\0', '\u1940', '\u1940',
'\022', '\u1941', '\u1943', '\0', '\u1944', '\u1945', '\022', '\u1946', '\u19DF', '\0',
'\u19E0', '\u19FF', '\022', '\u1A00', '\u1FBC', '\0', '\u1FBD', '\u1FBD', '\022', '\u1FBE',
'\u1FBE', '\0', '\u1FBF', '\u1FC1', '\022', '\u1FC2', '\u1FCC', '\0', '\u1FCD', '\u1FCF',
'\022', '\u1FD0', '\u1FDC', '\0', '\u1FDD', '\u1FDF', '\022', '\u1FE0', '\u1FEC', '\0',
'\u1FED', '\u1FEF', '\022', '\u1FF0', '\u1FFC', '\0', '\u1FFD', '\u1FFE', '\022', '\u1FFF',
'\u1FFF', '\0', '\u2000', '\u200A', '\021', '\u200B', '\u200D', '\016', '\u200E', '\u200E',
'\0', '\u200F', '\u200F', '\003', '\u2010', '\u2027', '\022', '\u2028', '\u2028', '\021',
'\u2029', '\u2029', '\017', '\u202A', '\u202A', '\001', '\u202B', '\u202B', '\005', '\u202C',
'\u202C', '\007', '\u202D', '\u202D', '\002', '\u202E', '\u202E', '\006', '\u202F', '\u202F',
'\021', '\u2030', '\u2034', '\n', '\u2035', '\u2054', '\022', '\u2055', '\u2056', '\0',
'\u2057', '\u2057', '\022', '\u2058', '\u205E', '\0', '\u205F', '\u205F', '\021', '\u2060',
'\u2063', '\016', '\u2064', '\u2069', '\0', '\u206A', '\u206F', '\016', '\u2070', '\u2070',
'\b', '\u2071', '\u2073', '\0', '\u2074', '\u2079', '\b', '\u207A', '\u207B', '\n',
'\u207C', '\u207E', '\022', '\u207F', '\u207F', '\0', '\u2080', '\u2089', '\b', '\u208A',
'\u208B', '\n', '\u208C', '\u208E', '\022', '\u208F', '\u209F', '\0', '\u20A0', '\u20B1',
'\n', '\u20B2', '\u20CF', '\0', '\u20D0', '\u20EA', '\r', '\u20EB', '\u20FF', '\0',
'\u2100', '\u2101', '\022', '\u2102', '\u2102', '\0', '\u2103', '\u2106', '\022', '\u2107',
'\u2107', '\0', '\u2108', '\u2109', '\022', '\u210A', '\u2113', '\0', '\u2114', '\u2114',
'\022', '\u2115', '\u2115', '\0', '\u2116', '\u2118', '\022', '\u2119', '\u211D', '\0',
'\u211E', '\u2123', '\022', '\u2124', '\u2124', '\0', '\u2125', '\u2125', '\022', '\u2126',
'\u2126', '\0', '\u2127', '\u2127', '\022', '\u2128', '\u2128', '\0', '\u2129', '\u2129',
'\022', '\u212A', '\u212D', '\0', '\u212E', '\u212E', '\n', '\u212F', '\u2131', '\0',
'\u2132', '\u2132', '\022', '\u2133', '\u2139', '\0', '\u213A', '\u213B', '\022', '\u213C',
'\u213F', '\0', '\u2140', '\u2144', '\022', '\u2145', '\u2149', '\0', '\u214A', '\u214B',
'\022', '\u214C', '\u2152', '\0', '\u2153', '\u215F', '\022', '\u2160', '\u218F', '\0',
'\u2190', '\u2211', '\022', '\u2212', '\u2213', '\n', '\u2214', '\u2335', '\022', '\u2336',
'\u237A', '\0', '\u237B', '\u2394', '\022', '\u2395', '\u2395', '\0', '\u2396', '\u23D0',
'\022', '\u23D1', '\u23FF', '\0', '\u2400', '\u2426', '\022', '\u2427', '\u243F', '\0',
'\u2440', '\u244A', '\022', '\u244B', '\u245F', '\0', '\u2460', '\u249B', '\b', '\u249C',
'\u24E9', '\0', '\u24EA', '\u24EA', '\b', '\u24EB', '\u2617', '\022', '\u2618', '\u2618',
'\0', '\u2619', '\u267D', '\022', '\u267E', '\u267F', '\0', '\u2680', '\u2691', '\022',
'\u2692', '\u269F', '\0', '\u26A0', '\u26A1', '\022', '\u26A2', '\u2700', '\0', '\u2701',
'\u2704', '\022', '\u2705', '\u2705', '\0', '\u2706', '\u2709', '\022', '\u270A', '\u270B',
'\0', '\u270C', '\u2727', '\022', '\u2728', '\u2728', '\0', '\u2729', '\u274B', '\022',
'\u274C', '\u274C', '\0', '\u274D', '\u274D', '\022', '\u274E', '\u274E', '\0', '\u274F',
'\u2752', '\022', '\u2753', '\u2755', '\0', '\u2756', '\u2756', '\022', '\u2757', '\u2757',
'\0', '\u2758', '\u275E', '\022', '\u275F', '\u2760', '\0', '\u2761', '\u2794', '\022',
'\u2795', '\u2797', '\0', '\u2798', '\u27AF', '\022', '\u27B0', '\u27B0', '\0', '\u27B1',
'\u27BE', '\022', '\u27BF', '\u27CF', '\0', '\u27D0', '\u27EB', '\022', '\u27EC', '\u27EF',
'\0', '\u27F0', '\u2B0D', '\022', '\u2B0E', '\u2E7F', '\0', '\u2E80', '\u2E99', '\022',
'\u2E9A', '\u2E9A', '\0', '\u2E9B', '\u2EF3', '\022', '\u2EF4', '\u2EFF', '\0', '\u2F00',
'\u2FD5', '\022', '\u2FD6', '\u2FEF', '\0', '\u2FF0', '\u2FFB', '\022', '\u2FFC', '\u2FFF',
'\0', '\u3000', '\u3000', '\021', '\u3001', '\u3004', '\022', '\u3005', '\u3007', '\0',
'\u3008', '\u3020', '\022', '\u3021', '\u3029', '\0', '\u302A', '\u302F', '\r', '\u3030',
'\u3030', '\022', '\u3031', '\u3035', '\0', '\u3036', '\u3037', '\022', '\u3038', '\u303C',
'\0', '\u303D', '\u303F', '\022', '\u3040', '\u3098', '\0', '\u3099', '\u309A', '\r',
'\u309B', '\u309C', '\022', '\u309D', '\u309F', '\0', '\u30A0', '\u30A0', '\022', '\u30A1',
'\u30FA', '\0', '\u30FB', '\u30FB', '\022', '\u30FC', '\u321C', '\0', '\u321D', '\u321E',
'\022', '\u321F', '\u324F', '\0', '\u3250', '\u325F', '\022', '\u3260', '\u327B', '\0',
'\u327C', '\u327D', '\022', '\u327E', '\u32B0', '\0', '\u32B1', '\u32BF', '\022', '\u32C0',
'\u32CB', '\0', '\u32CC', '\u32CF', '\022', '\u32D0', '\u3376', '\0', '\u3377', '\u337A',
'\022', '\u337B', '\u33DD', '\0', '\u33DE', '\u33DF', '\022', '\u33E0', '\u33FE', '\0',
'\u33FF', '\u33FF', '\022', '\u3400', '\u4DBF', '\0', '\u4DC0', '\u4DFF', '\022', '\u4E00',
'\uA48F', '\0', '\uA490', '\uA4C6', '\022', '\uA4C7', '\uFB1C', '\0', '\uFB1D', '\uFB1D',
'\003', '\uFB1E', '\uFB1E', '\r', '\uFB1F', '\uFB28', '\003', '\uFB29', '\uFB29', '\n',
'\uFB2A', '\uFB36', '\003', '\uFB37', '\uFB37', '\0', '\uFB38', '\uFB3C', '\003', '\uFB3D',
'\uFB3D', '\0', '\uFB3E', '\uFB3E', '\003', '\uFB3F', '\uFB3F', '\0', '\uFB40', '\uFB41',
'\003', '\uFB42', '\uFB42', '\0', '\uFB43', '\uFB44', '\003', '\uFB45', '\uFB45', '\0',
'\uFB46', '\uFB4F', '\003', '\uFB50', '\uFBB1', '\004', '\uFBB2', '\uFBD2', '\0', '\uFBD3',
'\uFD3D', '\004', '\uFD3E', '\uFD3F', '\022', '\uFD40', '\uFD4F', '\0', '\uFD50', '\uFD8F',
'\004', '\uFD90', '\uFD91', '\0', '\uFD92', '\uFDC7', '\004', '\uFDC8', '\uFDEF', '\0',
'\uFDF0', '\uFDFC', '\004', '\uFDFD', '\uFDFD', '\022', '\uFDFE', '\uFDFF', '\0', '\uFE00',
'\uFE0F', '\r', '\uFE10', '\uFE1F', '\0', '\uFE20', '\uFE23', '\r', '\uFE24', '\uFE2F',
'\0', '\uFE30', '\uFE4F', '\022', '\uFE50', '\uFE50', '\f', '\uFE51', '\uFE51', '\022',
'\uFE52', '\uFE52', '\f', '\uFE53', '\uFE53', '\0', '\uFE54', '\uFE54', '\022', '\uFE55',
'\uFE55', '\f', '\uFE56', '\uFE5E', '\022', '\uFE5F', '\uFE5F', '\n', '\uFE60', '\uFE61',
'\022', '\uFE62', '\uFE63', '\n', '\uFE64', '\uFE66', '\022', '\uFE67', '\uFE67', '\0',
'\uFE68', '\uFE68', '\022', '\uFE69', '\uFE6A', '\n', '\uFE6B', '\uFE6B', '\022', '\uFE6C',
'\uFE6F', '\0', '\uFE70', '\uFE74', '\004', '\uFE75', '\uFE75', '\0', '\uFE76', '\uFEFC',
'\004', '\uFEFD', '\uFEFE', '\0', '\uFEFF', '\uFEFF', '\016', '\uFF00', '\uFF00', '\0',
'\uFF01', '\uFF02', '\022', '\uFF03', '\uFF05', '\n', '\uFF06', '\uFF0A', '\022', '\uFF0B',
'\uFF0B', '\n', '\uFF0C', '\uFF0C', '\f', '\uFF0D', '\uFF0D', '\n', '\uFF0E', '\uFF0E',
'\f', '\uFF0F', '\uFF0F', '\t', '\uFF10', '\uFF19', '\b', '\uFF1A', '\uFF1A', '\f',
'\uFF1B', '\uFF20', '\022', '\uFF21', '\uFF3A', '\0', '\uFF3B', '\uFF40', '\022', '\uFF41',
'\uFF5A', '\0', '\uFF5B', '\uFF65', '\022', '\uFF66', '\uFFDF', '\0', '\uFFE0', '\uFFE1',
'\n', '\uFFE2', '\uFFE4', '\022', '\uFFE5', '\uFFE6', '\n', '\uFFE7', '\uFFE7', '\0',
'\uFFE8', '\uFFEE', '\022', '\uFFEF', '\uFFF8', '\0', '\uFFF9', '\uFFFB', '\016', '\uFFFC',
'\uFFFD', '\022', '\uFFFE', '\uFFFF', '\0'
};
private static final byte rtypes[];
private byte embeddings[];
private byte initialTypes[];
private byte paragraphEmbeddingLevel;
private byte resultLevels[];
private byte resultTypes[];
private int textLength;
static
{
rtypes = new byte[0x10000];
// 0 0:ldc1 #58 <Int 0x10000>
// 1 2:newarray byte[]
// 2 4:putstatic #60 <Field byte[] rtypes>
// 3 7:sipush 1725
// 4 10:newarray char[]
// 5 12:dup
// 6 13:iconst_0
// 7 14:ldc1 #22 <Int 0>
// 8 16:castore
// 9 17:dup
// 10 18:iconst_1
// 11 19:ldc1 #16 <Int 8>
// 12 21:castore
// 13 22:dup
// 14 23:iconst_2
// 15 24:ldc1 #12 <Int 14>
// 16 26:castore
// 17 27:dup
// 18 28:iconst_3
// 19 29:ldc1 #18 <Int 9>
// 20 31:castore
// 21 32:dup
// 22 33:iconst_4
// 23 34:ldc1 #18 <Int 9>
// 24 36:castore
// 25 37:dup
// 26 38:iconst_5
// 27 39:ldc1 #40 <Int 16>
// 28 41:castore
// 29 42:dup
// 30 43:bipush 6
// 31 45:ldc1 #20 <Int 10>
// 32 47:castore
// 33 48:dup
// 34 49:bipush 7
// 35 51:ldc1 #20 <Int 10>
// 36 53:castore
// 37 54:dup
// 38 55:bipush 8
// 39 57:ldc1 #10 <Int 15>
// 40 59:castore
// 41 60:dup
// 42 61:bipush 9
// 43 63:ldc1 #9 <Int 11>
// 44 65:castore
// 45 66:dup
// 46 67:bipush 10
// 47 69:ldc1 #9 <Int 11>
// 48 71:castore
// 49 72:dup
// 50 73:bipush 11
// 51 75:ldc1 #40 <Int 16>
// 52 77:castore
// 53 78:dup
// 54 79:bipush 12
// 55 81:ldc1 #14 <Int 12>
// 56 83:castore
// 57 84:dup
// 58 85:bipush 13
// 59 87:ldc1 #14 <Int 12>
// 60 89:castore
// 61 90:dup
// 62 91:bipush 14
// 63 93:ldc1 #44 <Int 17>
// 64 95:castore
// 65 96:dup
// 66 97:bipush 15
// 67 99:ldc1 #28 <Int 13>
// 68 101:castore
// 69 102:dup
// 70 103:bipush 16
// 71 105:ldc1 #28 <Int 13>
// 72 107:castore
// 73 108:dup
// 74 109:bipush 17
// 75 111:ldc1 #10 <Int 15>
// 76 113:castore
// 77 114:dup
// 78 115:bipush 18
// 79 117:ldc1 #12 <Int 14>
// 80 119:castore
// 81 120:dup
// 82 121:bipush 19
// 83 123:ldc1 #61 <Int 27>
// 84 125:castore
// 85 126:dup
// 86 127:bipush 20
// 87 129:ldc1 #12 <Int 14>
// 88 131:castore
// 89 132:dup
// 90 133:bipush 21
// 91 135:ldc1 #62 <Int 28>
// 92 137:castore
// 93 138:dup
// 94 139:bipush 22
// 95 141:ldc1 #63 <Int 30>
// 96 143:castore
// 97 144:dup
// 98 145:bipush 23
// 99 147:ldc1 #10 <Int 15>
// 100 149:castore
// 101 150:dup
// 102 151:bipush 24
// 103 153:ldc1 #64 <Int 31>
// 104 155:castore
// 105 156:dup
// 106 157:bipush 25
// 107 159:ldc1 #64 <Int 31>
// 108 161:castore
// 109 162:dup
// 110 163:bipush 26
// 111 165:ldc1 #40 <Int 16>
// 112 167:castore
// 113 168:dup
// 114 169:bipush 27
// 115 171:ldc1 #65 <Int 32>
// 116 173:castore
// 117 174:dup
// 118 175:bipush 28
// 119 177:ldc1 #65 <Int 32>
// 120 179:castore
// 121 180:dup
// 122 181:bipush 29
// 123 183:ldc1 #44 <Int 17>
// 124 185:castore
// 125 186:dup
// 126 187:bipush 30
// 127 189:ldc1 #66 <Int 33>
// 128 191:castore
// 129 192:dup
// 130 193:bipush 31
// 131 195:ldc1 #67 <Int 34>
// 132 197:castore
// 133 198:dup
// 134 199:bipush 32
// 135 201:ldc1 #30 <Int 18>
// 136 203:castore
// 137 204:dup
// 138 205:bipush 33
// 139 207:ldc1 #68 <Int 35>
// 140 209:castore
// 141 210:dup
// 142 211:bipush 34
// 143 213:ldc1 #69 <Int 37>
// 144 215:castore
// 145 216:dup
// 146 217:bipush 35
// 147 219:ldc1 #20 <Int 10>
// 148 221:castore
// 149 222:dup
// 150 223:bipush 36
// 151 225:ldc1 #70 <Int 38>
// 152 227:castore
// 153 228:dup
// 154 229:bipush 37
// 155 231:ldc1 #71 <Int 42>
// 156 233:castore
// 157 234:dup
// 158 235:bipush 38
// 159 237:ldc1 #30 <Int 18>
// 160 239:castore
// 161 240:dup
// 162 241:bipush 39
// 163 243:ldc1 #72 <Int 43>
// 164 245:castore
// 165 246:dup
// 166 247:bipush 40
// 167 249:ldc1 #72 <Int 43>
// 168 251:castore
// 169 252:dup
// 170 253:bipush 41
// 171 255:ldc1 #20 <Int 10>
// 172 257:castore
// 173 258:dup
// 174 259:bipush 42
// 175 261:ldc1 #73 <Int 44>
// 176 263:castore
// 177 264:dup
// 178 265:bipush 43
// 179 267:ldc1 #73 <Int 44>
// 180 269:castore
// 181 270:dup
// 182 271:bipush 44
// 183 273:ldc1 #14 <Int 12>
// 184 275:castore
// 185 276:dup
// 186 277:bipush 45
// 187 279:ldc1 #74 <Int 45>
// 188 281:castore
// 189 282:dup
// 190 283:bipush 46
// 191 285:ldc1 #74 <Int 45>
// 192 287:castore
// 193 288:dup
// 194 289:bipush 47
// 195 291:ldc1 #20 <Int 10>
// 196 293:castore
// 197 294:dup
// 198 295:bipush 48
// 199 297:ldc1 #75 <Int 46>
// 200 299:castore
// 201 300:dup
// 202 301:bipush 49
// 203 303:ldc1 #75 <Int 46>
// 204 305:castore
// 205 306:dup
// 206 307:bipush 50
// 207 309:ldc1 #14 <Int 12>
// 208 311:castore
// 209 312:dup
// 210 313:bipush 51
// 211 315:ldc1 #76 <Int 47>
// 212 317:castore
// 213 318:dup
// 214 319:bipush 52
// 215 321:ldc1 #76 <Int 47>
// 216 323:castore
// 217 324:dup
// 218 325:bipush 53
// 219 327:ldc1 #18 <Int 9>
// 220 329:castore
// 221 330:dup
// 222 331:bipush 54
// 223 333:ldc1 #77 <Int 48>
// 224 335:castore
// 225 336:dup
// 226 337:bipush 55
// 227 339:ldc1 #78 <Int 57>
// 228 341:castore
// 229 342:dup
// 230 343:bipush 56
// 231 345:ldc1 #16 <Int 8>
// 232 347:castore
// 233 348:dup
// 234 349:bipush 57
// 235 351:ldc1 #79 <Int 58>
// 236 353:castore
// 237 354:dup
// 238 355:bipush 58
// 239 357:ldc1 #79 <Int 58>
// 240 359:castore
// 241 360:dup
// 242 361:bipush 59
// 243 363:ldc1 #14 <Int 12>
// 244 365:castore
// 245 366:dup
// 246 367:bipush 60
// 247 369:ldc1 #80 <Int 59>
// 248 371:castore
// 249 372:dup
// 250 373:bipush 61
// 251 375:ldc1 #81 <Int 64>
// 252 377:castore
// 253 378:dup
// 254 379:bipush 62
// 255 381:ldc1 #30 <Int 18>
// 256 383:castore
// 257 384:dup
// 258 385:bipush 63
// 259 387:ldc1 #82 <Int 65>
// 260 389:castore
// 261 390:dup
// 262 391:bipush 64
// 263 393:ldc1 #83 <Int 90>
// 264 395:castore
// 265 396:dup
// 266 397:bipush 65
// 267 399:ldc1 #22 <Int 0>
// 268 401:castore
// 269 402:dup
// 270 403:bipush 66
// 271 405:ldc1 #84 <Int 91>
// 272 407:castore
// 273 408:dup
// 274 409:bipush 67
// 275 411:ldc1 #85 <Int 96>
// 276 413:castore
// 277 414:dup
// 278 415:bipush 68
// 279 417:ldc1 #30 <Int 18>
// 280 419:castore
// 281 420:dup
// 282 421:bipush 69
// 283 423:ldc1 #86 <Int 97>
// 284 425:castore
// 285 426:dup
// 286 427:bipush 70
// 287 429:ldc1 #87 <Int 122>
// 288 431:castore
// 289 432:dup
// 290 433:bipush 71
// 291 435:ldc1 #22 <Int 0>
// 292 437:castore
// 293 438:dup
// 294 439:bipush 72
// 295 441:ldc1 #88 <Int 123>
// 296 443:castore
// 297 444:dup
// 298 445:bipush 73
// 299 447:ldc1 #89 <Int 126>
// 300 449:castore
// 301 450:dup
// 302 451:bipush 74
// 303 453:ldc1 #30 <Int 18>
// 304 455:castore
// 305 456:dup
// 306 457:bipush 75
// 307 459:ldc1 #90 <Int 127>
// 308 461:castore
// 309 462:dup
// 310 463:bipush 76
// 311 465:ldc1 #91 <Int 132>
// 312 467:castore
// 313 468:dup
// 314 469:bipush 77
// 315 471:ldc1 #12 <Int 14>
// 316 473:castore
// 317 474:dup
// 318 475:bipush 78
// 319 477:ldc1 #92 <Int 133>
// 320 479:castore
// 321 480:dup
// 322 481:bipush 79
// 323 483:ldc1 #92 <Int 133>
// 324 485:castore
// 325 486:dup
// 326 487:bipush 80
// 327 489:ldc1 #10 <Int 15>
// 328 491:castore
// 329 492:dup
// 330 493:bipush 81
// 331 495:ldc1 #93 <Int 134>
// 332 497:castore
// 333 498:dup
// 334 499:bipush 82
// 335 501:ldc1 #94 <Int 159>
// 336 503:castore
// 337 504:dup
// 338 505:bipush 83
// 339 507:ldc1 #12 <Int 14>
// 340 509:castore
// 341 510:dup
// 342 511:bipush 84
// 343 513:ldc1 #95 <Int 160>
// 344 515:castore
// 345 516:dup
// 346 517:bipush 85
// 347 519:ldc1 #95 <Int 160>
// 348 521:castore
// 349 522:dup
// 350 523:bipush 86
// 351 525:ldc1 #14 <Int 12>
// 352 527:castore
// 353 528:dup
// 354 529:bipush 87
// 355 531:ldc1 #96 <Int 161>
// 356 533:castore
// 357 534:dup
// 358 535:bipush 88
// 359 537:ldc1 #96 <Int 161>
// 360 539:castore
// 361 540:dup
// 362 541:bipush 89
// 363 543:ldc1 #30 <Int 18>
// 364 545:castore
// 365 546:dup
// 366 547:bipush 90
// 367 549:ldc1 #97 <Int 162>
// 368 551:castore
// 369 552:dup
// 370 553:bipush 91
// 371 555:ldc1 #98 <Int 165>
// 372 557:castore
// 373 558:dup
// 374 559:bipush 92
// 375 561:ldc1 #20 <Int 10>
// 376 563:castore
// 377 564:dup
// 378 565:bipush 93
// 379 567:ldc1 #99 <Int 166>
// 380 569:castore
// 381 570:dup
// 382 571:bipush 94
// 383 573:ldc1 #100 <Int 169>
// 384 575:castore
// 385 576:dup
// 386 577:bipush 95
// 387 579:ldc1 #30 <Int 18>
// 388 581:castore
// 389 582:dup
// 390 583:bipush 96
// 391 585:ldc1 #101 <Int 170>
// 392 587:castore
// 393 588:dup
// 394 589:bipush 97
// 395 591:ldc1 #101 <Int 170>
// 396 593:castore
// 397 594:dup
// 398 595:bipush 98
// 399 597:ldc1 #22 <Int 0>
// 400 599:castore
// 401 600:dup
// 402 601:bipush 99
// 403 603:ldc1 #102 <Int 171>
// 404 605:castore
// 405 606:dup
// 406 607:bipush 100
// 407 609:ldc1 #103 <Int 175>
// 408 611:castore
// 409 612:dup
// 410 613:bipush 101
// 411 615:ldc1 #30 <Int 18>
// 412 617:castore
// 413 618:dup
// 414 619:bipush 102
// 415 621:ldc1 #104 <Int 176>
// 416 623:castore
// 417 624:dup
// 418 625:bipush 103
// 419 627:ldc1 #105 <Int 177>
// 420 629:castore
// 421 630:dup
// 422 631:bipush 104
// 423 633:ldc1 #20 <Int 10>
// 424 635:castore
// 425 636:dup
// 426 637:bipush 105
// 427 639:ldc1 #106 <Int 178>
// 428 641:castore
// 429 642:dup
// 430 643:bipush 106
// 431 645:ldc1 #107 <Int 179>
// 432 647:castore
// 433 648:dup
// 434 649:bipush 107
// 435 651:ldc1 #16 <Int 8>
// 436 653:castore
// 437 654:dup
// 438 655:bipush 108
// 439 657:ldc1 #108 <Int 180>
// 440 659:castore
// 441 660:dup
// 442 661:bipush 109
// 443 663:ldc1 #108 <Int 180>
// 444 665:castore
// 445 666:dup
// 446 667:bipush 110
// 447 669:ldc1 #30 <Int 18>
// 448 671:castore
// 449 672:dup
// 450 673:bipush 111
// 451 675:ldc1 #109 <Int 181>
// 452 677:castore
// 453 678:dup
// 454 679:bipush 112
// 455 681:ldc1 #109 <Int 181>
// 456 683:castore
// 457 684:dup
// 458 685:bipush 113
// 459 687:ldc1 #22 <Int 0>
// 460 689:castore
// 461 690:dup
// 462 691:bipush 114
// 463 693:ldc1 #110 <Int 182>
// 464 695:castore
// 465 696:dup
// 466 697:bipush 115
// 467 699:ldc1 #111 <Int 184>
// 468 701:castore
// 469 702:dup
// 470 703:bipush 116
// 471 705:ldc1 #30 <Int 18>
// 472 707:castore
// 473 708:dup
// 474 709:bipush 117
// 475 711:ldc1 #112 <Int 185>
// 476 713:castore
// 477 714:dup
// 478 715:bipush 118
// 479 717:ldc1 #112 <Int 185>
// 480 719:castore
// 481 720:dup
// 482 721:bipush 119
// 483 723:ldc1 #16 <Int 8>
// 484 725:castore
// 485 726:dup
// 486 727:bipush 120
// 487 729:ldc1 #113 <Int 186>
// 488 731:castore
// 489 732:dup
// 490 733:bipush 121
// 491 735:ldc1 #113 <Int 186>
// 492 737:castore
// 493 738:dup
// 494 739:bipush 122
// 495 741:ldc1 #22 <Int 0>
// 496 743:castore
// 497 744:dup
// 498 745:bipush 123
// 499 747:ldc1 #114 <Int 187>
// 500 749:castore
// 501 750:dup
// 502 751:bipush 124
// 503 753:ldc1 #115 <Int 191>
// 504 755:castore
// 505 756:dup
// 506 757:bipush 125
// 507 759:ldc1 #30 <Int 18>
// 508 761:castore
// 509 762:dup
// 510 763:bipush 126
// 511 765:ldc1 #116 <Int 192>
// 512 767:castore
// 513 768:dup
// 514 769:bipush 127
// 515 771:ldc1 #117 <Int 214>
// 516 773:castore
// 517 774:dup
// 518 775:sipush 128
// 519 778:ldc1 #22 <Int 0>
// 520 780:castore
// 521 781:dup
// 522 782:sipush 129
// 523 785:ldc1 #118 <Int 215>
// 524 787:castore
// 525 788:dup
// 526 789:sipush 130
// 527 792:ldc1 #118 <Int 215>
// 528 794:castore
// 529 795:dup
// 530 796:sipush 131
// 531 799:ldc1 #30 <Int 18>
// 532 801:castore
// 533 802:dup
// 534 803:sipush 132
// 535 806:ldc1 #119 <Int 216>
// 536 808:castore
// 537 809:dup
// 538 810:sipush 133
// 539 813:ldc1 #120 <Int 246>
// 540 815:castore
// 541 816:dup
// 542 817:sipush 134
// 543 820:ldc1 #22 <Int 0>
// 544 822:castore
// 545 823:dup
// 546 824:sipush 135
// 547 827:ldc1 #121 <Int 247>
// 548 829:castore
// 549 830:dup
// 550 831:sipush 136
// 551 834:ldc1 #121 <Int 247>
// 552 836:castore
// 553 837:dup
// 554 838:sipush 137
// 555 841:ldc1 #30 <Int 18>
// 556 843:castore
// 557 844:dup
// 558 845:sipush 138
// 559 848:ldc1 #122 <Int 248>
// 560 850:castore
// 561 851:dup
// 562 852:sipush 139
// 563 855:ldc1 #123 <Int 696>
// 564 857:castore
// 565 858:dup
// 566 859:sipush 140
// 567 862:ldc1 #22 <Int 0>
// 568 864:castore
// 569 865:dup
// 570 866:sipush 141
// 571 869:ldc1 #124 <Int 697>
// 572 871:castore
// 573 872:dup
// 574 873:sipush 142
// 575 876:ldc1 #125 <Int 698>
// 576 878:castore
// 577 879:dup
// 578 880:sipush 143
// 579 883:ldc1 #30 <Int 18>
// 580 885:castore
// 581 886:dup
// 582 887:sipush 144
// 583 890:ldc1 #126 <Int 699>
// 584 892:castore
// 585 893:dup
// 586 894:sipush 145
// 587 897:ldc1 #127 <Int 705>
// 588 899:castore
// 589 900:dup
// 590 901:sipush 146
// 591 904:ldc1 #22 <Int 0>
// 592 906:castore
// 593 907:dup
// 594 908:sipush 147
// 595 911:ldc1 #128 <Int 706>
// 596 913:castore
// 597 914:dup
// 598 915:sipush 148
// 599 918:ldc1 #129 <Int 719>
// 600 920:castore
// 601 921:dup
// 602 922:sipush 149
// 603 925:ldc1 #30 <Int 18>
// 604 927:castore
// 605 928:dup
// 606 929:sipush 150
// 607 932:ldc1 #130 <Int 720>
// 608 934:castore
// 609 935:dup
// 610 936:sipush 151
// 611 939:ldc1 #131 <Int 721>
// 612 941:castore
// 613 942:dup
// 614 943:sipush 152
// 615 946:ldc1 #22 <Int 0>
// 616 948:castore
// 617 949:dup
// 618 950:sipush 153
// 619 953:ldc1 #132 <Int 722>
// 620 955:castore
// 621 956:dup
// 622 957:sipush 154
// 623 960:ldc1 #133 <Int 735>
// 624 962:castore
// 625 963:dup
// 626 964:sipush 155
// 627 967:ldc1 #30 <Int 18>
// 628 969:castore
// 629 970:dup
// 630 971:sipush 156
// 631 974:ldc1 #134 <Int 736>
// 632 976:castore
// 633 977:dup
// 634 978:sipush 157
// 635 981:ldc1 #135 <Int 740>
// 636 983:castore
// 637 984:dup
// 638 985:sipush 158
// 639 988:ldc1 #22 <Int 0>
// 640 990:castore
// 641 991:dup
// 642 992:sipush 159
// 643 995:ldc1 #136 <Int 741>
// 644 997:castore
// 645 998:dup
// 646 999:sipush 160
// 647 1002:ldc1 #137 <Int 749>
// 648 1004:castore
// 649 1005:dup
// 650 1006:sipush 161
// 651 1009:ldc1 #30 <Int 18>
// 652 1011:castore
// 653 1012:dup
// 654 1013:sipush 162
// 655 1016:ldc1 #138 <Int 750>
// 656 1018:castore
// 657 1019:dup
// 658 1020:sipush 163
// 659 1023:ldc1 #138 <Int 750>
// 660 1025:castore
// 661 1026:dup
// 662 1027:sipush 164
// 663 1030:ldc1 #22 <Int 0>
// 664 1032:castore
// 665 1033:dup
// 666 1034:sipush 165
// 667 1037:ldc1 #139 <Int 751>
// 668 1039:castore
// 669 1040:dup
// 670 1041:sipush 166
// 671 1044:ldc1 #140 <Int 767>
// 672 1046:castore
// 673 1047:dup
// 674 1048:sipush 167
// 675 1051:ldc1 #30 <Int 18>
// 676 1053:castore
// 677 1054:dup
// 678 1055:sipush 168
// 679 1058:ldc1 #141 <Int 768>
// 680 1060:castore
// 681 1061:dup
// 682 1062:sipush 169
// 683 1065:ldc1 #142 <Int 855>
// 684 1067:castore
// 685 1068:dup
// 686 1069:sipush 170
// 687 1072:ldc1 #28 <Int 13>
// 688 1074:castore
// 689 1075:dup
// 690 1076:sipush 171
// 691 1079:ldc1 #143 <Int 856>
// 692 1081:castore
// 693 1082:dup
// 694 1083:sipush 172
// 695 1086:ldc1 #144 <Int 860>
// 696 1088:castore
// 697 1089:dup
// 698 1090:sipush 173
// 699 1093:ldc1 #22 <Int 0>
// 700 1095:castore
// 701 1096:dup
// 702 1097:sipush 174
// 703 1100:ldc1 #145 <Int 861>
// 704 1102:castore
// 705 1103:dup
// 706 1104:sipush 175
// 707 1107:ldc1 #146 <Int 879>
// 708 1109:castore
// 709 1110:dup
// 710 1111:sipush 176
// 711 1114:ldc1 #28 <Int 13>
// 712 1116:castore
// 713 1117:dup
// 714 1118:sipush 177
// 715 1121:ldc1 #147 <Int 880>
// 716 1123:castore
// 717 1124:dup
// 718 1125:sipush 178
// 719 1128:ldc1 #148 <Int 883>
// 720 1130:castore
// 721 1131:dup
// 722 1132:sipush 179
// 723 1135:ldc1 #22 <Int 0>
// 724 1137:castore
// 725 1138:dup
// 726 1139:sipush 180
// 727 1142:ldc1 #149 <Int 884>
// 728 1144:castore
// 729 1145:dup
// 730 1146:sipush 181
// 731 1149:ldc1 #150 <Int 885>
// 732 1151:castore
// 733 1152:dup
// 734 1153:sipush 182
// 735 1156:ldc1 #30 <Int 18>
// 736 1158:castore
// 737 1159:dup
// 738 1160:sipush 183
// 739 1163:ldc1 #151 <Int 886>
// 740 1165:castore
// 741 1166:dup
// 742 1167:sipush 184
// 743 1170:ldc1 #152 <Int 893>
// 744 1172:castore
// 745 1173:dup
// 746 1174:sipush 185
// 747 1177:ldc1 #22 <Int 0>
// 748 1179:castore
// 749 1180:dup
// 750 1181:sipush 186
// 751 1184:ldc1 #153 <Int 894>
// 752 1186:castore
// 753 1187:dup
// 754 1188:sipush 187
// 755 1191:ldc1 #153 <Int 894>
// 756 1193:castore
// 757 1194:dup
// 758 1195:sipush 188
// 759 1198:ldc1 #30 <Int 18>
// 760 1200:castore
// 761 1201:dup
// 762 1202:sipush 189
// 763 1205:ldc1 #154 <Int 895>
// 764 1207:castore
// 765 1208:dup
// 766 1209:sipush 190
// 767 1212:ldc1 #155 <Int 899>
// 768 1214:castore
// 769 1215:dup
// 770 1216:sipush 191
// 771 1219:ldc1 #22 <Int 0>
// 772 1221:castore
// 773 1222:dup
// 774 1223:sipush 192
// 775 1226:ldc1 #156 <Int 900>
// 776 1228:castore
// 777 1229:dup
// 778 1230:sipush 193
// 779 1233:ldc1 #157 <Int 901>
// 780 1235:castore
// 781 1236:dup
// 782 1237:sipush 194
// 783 1240:ldc1 #30 <Int 18>
// 784 1242:castore
// 785 1243:dup
// 786 1244:sipush 195
// 787 1247:ldc1 #158 <Int 902>
// 788 1249:castore
// 789 1250:dup
// 790 1251:sipush 196
// 791 1254:ldc1 #158 <Int 902>
// 792 1256:castore
// 793 1257:dup
// 794 1258:sipush 197
// 795 1261:ldc1 #22 <Int 0>
// 796 1263:castore
// 797 1264:dup
// 798 1265:sipush 198
// 799 1268:ldc1 #159 <Int 903>
// 800 1270:castore
// 801 1271:dup
// 802 1272:sipush 199
// 803 1275:ldc1 #159 <Int 903>
// 804 1277:castore
// 805 1278:dup
// 806 1279:sipush 200
// 807 1282:ldc1 #30 <Int 18>
// 808 1284:castore
// 809 1285:dup
// 810 1286:sipush 201
// 811 1289:ldc1 #160 <Int 904>
// 812 1291:castore
// 813 1292:dup
// 814 1293:sipush 202
// 815 1296:ldc1 #161 <Int 1013>
// 816 1298:castore
// 817 1299:dup
// 818 1300:sipush 203
// 819 1303:ldc1 #22 <Int 0>
// 820 1305:castore
// 821 1306:dup
// 822 1307:sipush 204
// 823 1310:ldc1 #162 <Int 1014>
// 824 1312:castore
// 825 1313:dup
// 826 1314:sipush 205
// 827 1317:ldc1 #162 <Int 1014>
// 828 1319:castore
// 829 1320:dup
// 830 1321:sipush 206
// 831 1324:ldc1 #30 <Int 18>
// 832 1326:castore
// 833 1327:dup
// 834 1328:sipush 207
// 835 1331:ldc1 #163 <Int 1015>
// 836 1333:castore
// 837 1334:dup
// 838 1335:sipush 208
// 839 1338:ldc1 #164 <Int 1154>
// 840 1340:castore
// 841 1341:dup
// 842 1342:sipush 209
// 843 1345:ldc1 #22 <Int 0>
// 844 1347:castore
// 845 1348:dup
// 846 1349:sipush 210
// 847 1352:ldc1 #165 <Int 1155>
// 848 1354:castore
// 849 1355:dup
// 850 1356:sipush 211
// 851 1359:ldc1 #166 <Int 1158>
// 852 1361:castore
// 853 1362:dup
// 854 1363:sipush 212
// 855 1366:ldc1 #28 <Int 13>
// 856 1368:castore
// 857 1369:dup
// 858 1370:sipush 213
// 859 1373:ldc1 #167 <Int 1159>
// 860 1375:castore
// 861 1376:dup
// 862 1377:sipush 214
// 863 1380:ldc1 #167 <Int 1159>
// 864 1382:castore
// 865 1383:dup
// 866 1384:sipush 215
// 867 1387:ldc1 #22 <Int 0>
// 868 1389:castore
// 869 1390:dup
// 870 1391:sipush 216
// 871 1394:ldc1 #168 <Int 1160>
// 872 1396:castore
// 873 1397:dup
// 874 1398:sipush 217
// 875 1401:ldc1 #169 <Int 1161>
// 876 1403:castore
// 877 1404:dup
// 878 1405:sipush 218
// 879 1408:ldc1 #28 <Int 13>
// 880 1410:castore
// 881 1411:dup
// 882 1412:sipush 219
// 883 1415:ldc1 #170 <Int 1162>
// 884 1417:castore
// 885 1418:dup
// 886 1419:sipush 220
// 887 1422:ldc1 #171 <Int 1417>
// 888 1424:castore
// 889 1425:dup
// 890 1426:sipush 221
// 891 1429:ldc1 #22 <Int 0>
// 892 1431:castore
// 893 1432:dup
// 894 1433:sipush 222
// 895 1436:ldc1 #172 <Int 1418>
// 896 1438:castore
// 897 1439:dup
// 898 1440:sipush 223
// 899 1443:ldc1 #172 <Int 1418>
// 900 1445:castore
// 901 1446:dup
// 902 1447:sipush 224
// 903 1450:ldc1 #30 <Int 18>
// 904 1452:castore
// 905 1453:dup
// 906 1454:sipush 225
// 907 1457:ldc1 #173 <Int 1419>
// 908 1459:castore
// 909 1460:dup
// 910 1461:sipush 226
// 911 1464:ldc1 #174 <Int 1424>
// 912 1466:castore
// 913 1467:dup
// 914 1468:sipush 227
// 915 1471:ldc1 #22 <Int 0>
// 916 1473:castore
// 917 1474:dup
// 918 1475:sipush 228
// 919 1478:ldc1 #175 <Int 1425>
// 920 1480:castore
// 921 1481:dup
// 922 1482:sipush 229
// 923 1485:ldc1 #176 <Int 1441>
// 924 1487:castore
// 925 1488:dup
// 926 1489:sipush 230
// 927 1492:ldc1 #28 <Int 13>
// 928 1494:castore
// 929 1495:dup
// 930 1496:sipush 231
// 931 1499:ldc1 #177 <Int 1442>
// 932 1501:castore
// 933 1502:dup
// 934 1503:sipush 232
// 935 1506:ldc1 #177 <Int 1442>
// 936 1508:castore
// 937 1509:dup
// 938 1510:sipush 233
// 939 1513:ldc1 #22 <Int 0>
// 940 1515:castore
// 941 1516:dup
// 942 1517:sipush 234
// 943 1520:ldc1 #178 <Int 1443>
// 944 1522:castore
// 945 1523:dup
// 946 1524:sipush 235
// 947 1527:ldc1 #179 <Int 1465>
// 948 1529:castore
// 949 1530:dup
// 950 1531:sipush 236
// 951 1534:ldc1 #28 <Int 13>
// 952 1536:castore
// 953 1537:dup
// 954 1538:sipush 237
// 955 1541:ldc1 #180 <Int 1466>
// 956 1543:castore
// 957 1544:dup
// 958 1545:sipush 238
// 959 1548:ldc1 #180 <Int 1466>
// 960 1550:castore
// 961 1551:dup
// 962 1552:sipush 239
// 963 1555:ldc1 #22 <Int 0>
// 964 1557:castore
// 965 1558:dup
// 966 1559:sipush 240
// 967 1562:ldc1 #181 <Int 1467>
// 968 1564:castore
// 969 1565:dup
// 970 1566:sipush 241
// 971 1569:ldc1 #182 <Int 1469>
// 972 1571:castore
// 973 1572:dup
// 974 1573:sipush 242
// 975 1576:ldc1 #28 <Int 13>
// 976 1578:castore
// 977 1579:dup
// 978 1580:sipush 243
// 979 1583:ldc1 #183 <Int 1470>
// 980 1585:castore
// 981 1586:dup
// 982 1587:sipush 244
// 983 1590:ldc1 #183 <Int 1470>
// 984 1592:castore
// 985 1593:dup
// 986 1594:sipush 245
// 987 1597:ldc1 #34 <Int 3>
// 988 1599:castore
// 989 1600:dup
// 990 1601:sipush 246
// 991 1604:ldc1 #184 <Int 1471>
// 992 1606:castore
// 993 1607:dup
// 994 1608:sipush 247
// 995 1611:ldc1 #184 <Int 1471>
// 996 1613:castore
// 997 1614:dup
// 998 1615:sipush 248
// 999 1618:ldc1 #28 <Int 13>
// 1000 1620:castore
// 1001 1621:dup
// 1002 1622:sipush 249
// 1003 1625:ldc1 #185 <Int 1472>
// 1004 1627:castore
// 1005 1628:dup
// 1006 1629:sipush 250
// 1007 1632:ldc1 #185 <Int 1472>
// 1008 1634:castore
// 1009 1635:dup
// 1010 1636:sipush 251
// 1011 1639:ldc1 #34 <Int 3>
// 1012 1641:castore
// 1013 1642:dup
// 1014 1643:sipush 252
// 1015 1646:ldc1 #186 <Int 1473>
// 1016 1648:castore
// 1017 1649:dup
// 1018 1650:sipush 253
// 1019 1653:ldc1 #187 <Int 1474>
// 1020 1655:castore
// 1021 1656:dup
// 1022 1657:sipush 254
// 1023 1660:ldc1 #28 <Int 13>
// 1024 1662:castore
// 1025 1663:dup
// 1026 1664:sipush 255
// 1027 1667:ldc1 #188 <Int 1475>
// 1028 1669:castore
// 1029 1670:dup
// 1030 1671:sipush 256
// 1031 1674:ldc1 #188 <Int 1475>
// 1032 1676:castore
// 1033 1677:dup
// 1034 1678:sipush 257
// 1035 1681:ldc1 #34 <Int 3>
// 1036 1683:castore
// 1037 1684:dup
// 1038 1685:sipush 258
// 1039 1688:ldc1 #189 <Int 1476>
// 1040 1690:castore
// 1041 1691:dup
// 1042 1692:sipush 259
// 1043 1695:ldc1 #189 <Int 1476>
// 1044 1697:castore
// 1045 1698:dup
// 1046 1699:sipush 260
// 1047 1702:ldc1 #28 <Int 13>
// 1048 1704:castore
// 1049 1705:dup
// 1050 1706:sipush 261
// 1051 1709:ldc1 #190 <Int 1477>
// 1052 1711:castore
// 1053 1712:dup
// 1054 1713:sipush 262
// 1055 1716:ldc1 #191 <Int 1487>
// 1056 1718:castore
// 1057 1719:dup
// 1058 1720:sipush 263
// 1059 1723:ldc1 #22 <Int 0>
// 1060 1725:castore
// 1061 1726:dup
// 1062 1727:sipush 264
// 1063 1730:ldc1 #192 <Int 1488>
// 1064 1732:castore
// 1065 1733:dup
// 1066 1734:sipush 265
// 1067 1737:ldc1 #193 <Int 1514>
// 1068 1739:castore
// 1069 1740:dup
// 1070 1741:sipush 266
// 1071 1744:ldc1 #34 <Int 3>
// 1072 1746:castore
// 1073 1747:dup
// 1074 1748:sipush 267
// 1075 1751:ldc1 #194 <Int 1515>
// 1076 1753:castore
// 1077 1754:dup
// 1078 1755:sipush 268
// 1079 1758:ldc1 #195 <Int 1519>
// 1080 1760:castore
// 1081 1761:dup
// 1082 1762:sipush 269
// 1083 1765:ldc1 #22 <Int 0>
// 1084 1767:castore
// 1085 1768:dup
// 1086 1769:sipush 270
// 1087 1772:ldc1 #196 <Int 1520>
// 1088 1774:castore
// 1089 1775:dup
// 1090 1776:sipush 271
// 1091 1779:ldc1 #197 <Int 1524>
// 1092 1781:castore
// 1093 1782:dup
// 1094 1783:sipush 272
// 1095 1786:ldc1 #34 <Int 3>
// 1096 1788:castore
// 1097 1789:dup
// 1098 1790:sipush 273
// 1099 1793:ldc1 #198 <Int 1525>
// 1100 1795:castore
// 1101 1796:dup
// 1102 1797:sipush 274
// 1103 1800:ldc1 #199 <Int 1535>
// 1104 1802:castore
// 1105 1803:dup
// 1106 1804:sipush 275
// 1107 1807:ldc1 #22 <Int 0>
// 1108 1809:castore
// 1109 1810:dup
// 1110 1811:sipush 276
// 1111 1814:ldc1 #200 <Int 1536>
// 1112 1816:castore
// 1113 1817:dup
// 1114 1818:sipush 277
// 1115 1821:ldc1 #201 <Int 1539>
// 1116 1823:castore
// 1117 1824:dup
// 1118 1825:sipush 278
// 1119 1828:ldc1 #7 <Int 4>
// 1120 1830:castore
// 1121 1831:dup
// 1122 1832:sipush 279
// 1123 1835:ldc1 #202 <Int 1540>
// 1124 1837:castore
// 1125 1838:dup
// 1126 1839:sipush 280
// 1127 1842:ldc1 #203 <Int 1547>
// 1128 1844:castore
// 1129 1845:dup
// 1130 1846:sipush 281
// 1131 1849:ldc1 #22 <Int 0>
// 1132 1851:castore
// 1133 1852:dup
// 1134 1853:sipush 282
// 1135 1856:ldc1 #204 <Int 1548>
// 1136 1858:castore
// 1137 1859:dup
// 1138 1860:sipush 283
// 1139 1863:ldc1 #204 <Int 1548>
// 1140 1865:castore
// 1141 1866:dup
// 1142 1867:sipush 284
// 1143 1870:ldc1 #14 <Int 12>
// 1144 1872:castore
// 1145 1873:dup
// 1146 1874:sipush 285
// 1147 1877:ldc1 #205 <Int 1549>
// 1148 1879:castore
// 1149 1880:dup
// 1150 1881:sipush 286
// 1151 1884:ldc1 #205 <Int 1549>
// 1152 1886:castore
// 1153 1887:dup
// 1154 1888:sipush 287
// 1155 1891:ldc1 #7 <Int 4>
// 1156 1893:castore
// 1157 1894:dup
// 1158 1895:sipush 288
// 1159 1898:ldc1 #206 <Int 1550>
// 1160 1900:castore
// 1161 1901:dup
// 1162 1902:sipush 289
// 1163 1905:ldc1 #207 <Int 1551>
// 1164 1907:castore
// 1165 1908:dup
// 1166 1909:sipush 290
// 1167 1912:ldc1 #30 <Int 18>
// 1168 1914:castore
// 1169 1915:dup
// 1170 1916:sipush 291
// 1171 1919:ldc1 #208 <Int 1552>
// 1172 1921:castore
// 1173 1922:dup
// 1174 1923:sipush 292
// 1175 1926:ldc1 #209 <Int 1557>
// 1176 1928:castore
// 1177 1929:dup
// 1178 1930:sipush 293
// 1179 1933:ldc1 #28 <Int 13>
// 1180 1935:castore
// 1181 1936:dup
// 1182 1937:sipush 294
// 1183 1940:ldc1 #210 <Int 1558>
// 1184 1942:castore
// 1185 1943:dup
// 1186 1944:sipush 295
// 1187 1947:ldc1 #211 <Int 1562>
// 1188 1949:castore
// 1189 1950:dup
// 1190 1951:sipush 296
// 1191 1954:ldc1 #22 <Int 0>
// 1192 1956:castore
// 1193 1957:dup
// 1194 1958:sipush 297
// 1195 1961:ldc1 #212 <Int 1563>
// 1196 1963:castore
// 1197 1964:dup
// 1198 1965:sipush 298
// 1199 1968:ldc1 #212 <Int 1563>
// 1200 1970:castore
// 1201 1971:dup
// 1202 1972:sipush 299
// 1203 1975:ldc1 #7 <Int 4>
// 1204 1977:castore
// 1205 1978:dup
// 1206 1979:sipush 300
// 1207 1982:ldc1 #213 <Int 1564>
// 1208 1984:castore
// 1209 1985:dup
// 1210 1986:sipush 301
// 1211 1989:ldc1 #214 <Int 1566>
// 1212 1991:castore
// 1213 1992:dup
// 1214 1993:sipush 302
// 1215 1996:ldc1 #22 <Int 0>
// 1216 1998:castore
// 1217 1999:dup
// 1218 2000:sipush 303
// 1219 2003:ldc1 #215 <Int 1567>
// 1220 2005:castore
// 1221 2006:dup
// 1222 2007:sipush 304
// 1223 2010:ldc1 #215 <Int 1567>
// 1224 2012:castore
// 1225 2013:dup
// 1226 2014:sipush 305
// 1227 2017:ldc1 #7 <Int 4>
// 1228 2019:castore
// 1229 2020:dup
// 1230 2021:sipush 306
// 1231 2024:ldc1 #216 <Int 1568>
// 1232 2026:castore
// 1233 2027:dup
// 1234 2028:sipush 307
// 1235 2031:ldc1 #216 <Int 1568>
// 1236 2033:castore
// 1237 2034:dup
// 1238 2035:sipush 308
// 1239 2038:ldc1 #22 <Int 0>
// 1240 2040:castore
// 1241 2041:dup
// 1242 2042:sipush 309
// 1243 2045:ldc1 #217 <Int 1569>
// 1244 2047:castore
// 1245 2048:dup
// 1246 2049:sipush 310
// 1247 2052:ldc1 #218 <Int 1594>
// 1248 2054:castore
// 1249 2055:dup
// 1250 2056:sipush 311
// 1251 2059:ldc1 #7 <Int 4>
// 1252 2061:castore
// 1253 2062:dup
// 1254 2063:sipush 312
// 1255 2066:ldc1 #219 <Int 1595>
// 1256 2068:castore
// 1257 2069:dup
// 1258 2070:sipush 313
// 1259 2073:ldc1 #220 <Int 1599>
// 1260 2075:castore
// 1261 2076:dup
// 1262 2077:sipush 314
// 1263 2080:ldc1 #22 <Int 0>
// 1264 2082:castore
// 1265 2083:dup
// 1266 2084:sipush 315
// 1267 2087:ldc1 #221 <Int 1600>
// 1268 2089:castore
// 1269 2090:dup
// 1270 2091:sipush 316
// 1271 2094:ldc1 #222 <Int 1610>
// 1272 2096:castore
// 1273 2097:dup
// 1274 2098:sipush 317
// 1275 2101:ldc1 #7 <Int 4>
// 1276 2103:castore
// 1277 2104:dup
// 1278 2105:sipush 318
// 1279 2108:ldc1 #223 <Int 1611>
// 1280 2110:castore
// 1281 2111:dup
// 1282 2112:sipush 319
// 1283 2115:ldc1 #224 <Int 1624>
// 1284 2117:castore
// 1285 2118:dup
// 1286 2119:sipush 320
// 1287 2122:ldc1 #28 <Int 13>
// 1288 2124:castore
// 1289 2125:dup
// 1290 2126:sipush 321
// 1291 2129:ldc1 #225 <Int 1625>
// 1292 2131:castore
// 1293 2132:dup
// 1294 2133:sipush 322
// 1295 2136:ldc1 #226 <Int 1631>
// 1296 2138:castore
// 1297 2139:dup
// 1298 2140:sipush 323
// 1299 2143:ldc1 #22 <Int 0>
// 1300 2145:castore
// 1301 2146:dup
// 1302 2147:sipush 324
// 1303 2150:ldc1 #227 <Int 1632>
// 1304 2152:castore
// 1305 2153:dup
// 1306 2154:sipush 325
// 1307 2157:ldc1 #228 <Int 1641>
// 1308 2159:castore
// 1309 2160:dup
// 1310 2161:sipush 326
// 1311 2164:ldc1 #9 <Int 11>
// 1312 2166:castore
// 1313 2167:dup
// 1314 2168:sipush 327
// 1315 2171:ldc1 #229 <Int 1642>
// 1316 2173:castore
// 1317 2174:dup
// 1318 2175:sipush 328
// 1319 2178:ldc1 #229 <Int 1642>
// 1320 2180:castore
// 1321 2181:dup
// 1322 2182:sipush 329
// 1323 2185:ldc1 #20 <Int 10>
// 1324 2187:castore
// 1325 2188:dup
// 1326 2189:sipush 330
// 1327 2192:ldc1 #230 <Int 1643>
// 1328 2194:castore
// 1329 2195:dup
// 1330 2196:sipush 331
// 1331 2199:ldc1 #231 <Int 1644>
// 1332 2201:castore
// 1333 2202:dup
// 1334 2203:sipush 332
// 1335 2206:ldc1 #9 <Int 11>
// 1336 2208:castore
// 1337 2209:dup
// 1338 2210:sipush 333
// 1339 2213:ldc1 #232 <Int 1645>
// 1340 2215:castore
// 1341 2216:dup
// 1342 2217:sipush 334
// 1343 2220:ldc1 #233 <Int 1647>
// 1344 2222:castore
// 1345 2223:dup
// 1346 2224:sipush 335
// 1347 2227:ldc1 #7 <Int 4>
// 1348 2229:castore
// 1349 2230:dup
// 1350 2231:sipush 336
// 1351 2234:ldc1 #234 <Int 1648>
// 1352 2236:castore
// 1353 2237:dup
// 1354 2238:sipush 337
// 1355 2241:ldc1 #234 <Int 1648>
// 1356 2243:castore
// 1357 2244:dup
// 1358 2245:sipush 338
// 1359 2248:ldc1 #28 <Int 13>
// 1360 2250:castore
// 1361 2251:dup
// 1362 2252:sipush 339
// 1363 2255:ldc1 #235 <Int 1649>
// 1364 2257:castore
// 1365 2258:dup
// 1366 2259:sipush 340
// 1367 2262:ldc1 #236 <Int 1749>
// 1368 2264:castore
// 1369 2265:dup
// 1370 2266:sipush 341
// 1371 2269:ldc1 #7 <Int 4>
// 1372 2271:castore
// 1373 2272:dup
// 1374 2273:sipush 342
// 1375 2276:ldc1 #237 <Int 1750>
// 1376 2278:castore
// 1377 2279:dup
// 1378 2280:sipush 343
// 1379 2283:ldc1 #238 <Int 1756>
// 1380 2285:castore
// 1381 2286:dup
// 1382 2287:sipush 344
// 1383 2290:ldc1 #28 <Int 13>
// 1384 2292:castore
// 1385 2293:dup
// 1386 2294:sipush 345
// 1387 2297:ldc1 #239 <Int 1757>
// 1388 2299:castore
// 1389 2300:dup
// 1390 2301:sipush 346
// 1391 2304:ldc1 #239 <Int 1757>
// 1392 2306:castore
// 1393 2307:dup
// 1394 2308:sipush 347
// 1395 2311:ldc1 #7 <Int 4>
// 1396 2313:castore
// 1397 2314:dup
// 1398 2315:sipush 348
// 1399 2318:ldc1 #240 <Int 1758>
// 1400 2320:castore
// 1401 2321:dup
// 1402 2322:sipush 349
// 1403 2325:ldc1 #241 <Int 1764>
// 1404 2327:castore
// 1405 2328:dup
// 1406 2329:sipush 350
// 1407 2332:ldc1 #28 <Int 13>
// 1408 2334:castore
// 1409 2335:dup
// 1410 2336:sipush 351
// 1411 2339:ldc1 #242 <Int 1765>
// 1412 2341:castore
// 1413 2342:dup
// 1414 2343:sipush 352
// 1415 2346:ldc1 #243 <Int 1766>
// 1416 2348:castore
// 1417 2349:dup
// 1418 2350:sipush 353
// 1419 2353:ldc1 #7 <Int 4>
// 1420 2355:castore
// 1421 2356:dup
// 1422 2357:sipush 354
// 1423 2360:ldc1 #244 <Int 1767>
// 1424 2362:castore
// 1425 2363:dup
// 1426 2364:sipush 355
// 1427 2367:ldc1 #245 <Int 1768>
// 1428 2369:castore
// 1429 2370:dup
// 1430 2371:sipush 356
// 1431 2374:ldc1 #28 <Int 13>
// 1432 2376:castore
// 1433 2377:dup
// 1434 2378:sipush 357
// 1435 2381:ldc1 #246 <Int 1769>
// 1436 2383:castore
// 1437 2384:dup
// 1438 2385:sipush 358
// 1439 2388:ldc1 #246 <Int 1769>
// 1440 2390:castore
// 1441 2391:dup
// 1442 2392:sipush 359
// 1443 2395:ldc1 #30 <Int 18>
// 1444 2397:castore
// 1445 2398:dup
// 1446 2399:sipush 360
// 1447 2402:ldc1 #247 <Int 1770>
// 1448 2404:castore
// 1449 2405:dup
// 1450 2406:sipush 361
// 1451 2409:ldc1 #248 <Int 1773>
// 1452 2411:castore
// 1453 2412:dup
// 1454 2413:sipush 362
// 1455 2416:ldc1 #28 <Int 13>
// 1456 2418:castore
// 1457 2419:dup
// 1458 2420:sipush 363
// 1459 2423:ldc1 #249 <Int 1774>
// 1460 2425:castore
// 1461 2426:dup
// 1462 2427:sipush 364
// 1463 2430:ldc1 #250 <Int 1775>
// 1464 2432:castore
// 1465 2433:dup
// 1466 2434:sipush 365
// 1467 2437:ldc1 #7 <Int 4>
// 1468 2439:castore
// 1469 2440:dup
// 1470 2441:sipush 366
// 1471 2444:ldc1 #251 <Int 1776>
// 1472 2446:castore
// 1473 2447:dup
// 1474 2448:sipush 367
// 1475 2451:ldc1 #252 <Int 1785>
// 1476 2453:castore
// 1477 2454:dup
// 1478 2455:sipush 368
// 1479 2458:ldc1 #16 <Int 8>
// 1480 2460:castore
// 1481 2461:dup
// 1482 2462:sipush 369
// 1483 2465:ldc1 #253 <Int 1786>
// 1484 2467:castore
// 1485 2468:dup
// 1486 2469:sipush 370
// 1487 2472:ldc1 #254 <Int 1805>
// 1488 2474:castore
// 1489 2475:dup
// 1490 2476:sipush 371
// 1491 2479:ldc1 #7 <Int 4>
// 1492 2481:castore
// 1493 2482:dup
// 1494 2483:sipush 372
// 1495 2486:ldc1 #255 <Int 1806>
// 1496 2488:castore
// 1497 2489:dup
// 1498 2490:sipush 373
// 1499 2493:ldc1 #255 <Int 1806>
// 1500 2495:castore
// 1501 2496:dup
// 1502 2497:sipush 374
// 1503 2500:ldc1 #22 <Int 0>
// 1504 2502:castore
// 1505 2503:dup
// 1506 2504:sipush 375
// 1507 2507:ldc2 #256 <Int 1807>
// 1508 2510:castore
// 1509 2511:dup
// 1510 2512:sipush 376
// 1511 2515:ldc2 #256 <Int 1807>
// 1512 2518:castore
// 1513 2519:dup
// 1514 2520:sipush 377
// 1515 2523:ldc1 #12 <Int 14>
// 1516 2525:castore
// 1517 2526:dup
// 1518 2527:sipush 378
// 1519 2530:ldc2 #257 <Int 1808>
// 1520 2533:castore
// 1521 2534:dup
// 1522 2535:sipush 379
// 1523 2538:ldc2 #257 <Int 1808>
// 1524 2541:castore
// 1525 2542:dup
// 1526 2543:sipush 380
// 1527 2546:ldc1 #7 <Int 4>
// 1528 2548:castore
// 1529 2549:dup
// 1530 2550:sipush 381
// 1531 2553:ldc2 #258 <Int 1809>
// 1532 2556:castore
// 1533 2557:dup
// 1534 2558:sipush 382
// 1535 2561:ldc2 #258 <Int 1809>
// 1536 2564:castore
// 1537 2565:dup
// 1538 2566:sipush 383
// 1539 2569:ldc1 #28 <Int 13>
// 1540 2571:castore
// 1541 2572:dup
// 1542 2573:sipush 384
// 1543 2576:ldc2 #259 <Int 1810>
// 1544 2579:castore
// 1545 2580:dup
// 1546 2581:sipush 385
// 1547 2584:ldc2 #260 <Int 1839>
// 1548 2587:castore
// 1549 2588:dup
// 1550 2589:sipush 386
// 1551 2592:ldc1 #7 <Int 4>
// 1552 2594:castore
// 1553 2595:dup
// 1554 2596:sipush 387
// 1555 2599:ldc2 #261 <Int 1840>
// 1556 2602:castore
// 1557 2603:dup
// 1558 2604:sipush 388
// 1559 2607:ldc2 #262 <Int 1866>
// 1560 2610:castore
// 1561 2611:dup
// 1562 2612:sipush 389
// 1563 2615:ldc1 #28 <Int 13>
// 1564 2617:castore
// 1565 2618:dup
// 1566 2619:sipush 390
// 1567 2622:ldc2 #263 <Int 1867>
// 1568 2625:castore
// 1569 2626:dup
// 1570 2627:sipush 391
// 1571 2630:ldc2 #264 <Int 1868>
// 1572 2633:castore
// 1573 2634:dup
// 1574 2635:sipush 392
// 1575 2638:ldc1 #22 <Int 0>
// 1576 2640:castore
// 1577 2641:dup
// 1578 2642:sipush 393
// 1579 2645:ldc2 #265 <Int 1869>
// 1580 2648:castore
// 1581 2649:dup
// 1582 2650:sipush 394
// 1583 2653:ldc2 #266 <Int 1871>
// 1584 2656:castore
// 1585 2657:dup
// 1586 2658:sipush 395
// 1587 2661:ldc1 #7 <Int 4>
// 1588 2663:castore
// 1589 2664:dup
// 1590 2665:sipush 396
// 1591 2668:ldc2 #267 <Int 1872>
// 1592 2671:castore
// 1593 2672:dup
// 1594 2673:sipush 397
// 1595 2676:ldc2 #268 <Int 1919>
// 1596 2679:castore
// 1597 2680:dup
// 1598 2681:sipush 398
// 1599 2684:ldc1 #22 <Int 0>
// 1600 2686:castore
// 1601 2687:dup
// 1602 2688:sipush 399
// 1603 2691:ldc2 #269 <Int 1920>
// 1604 2694:castore
// 1605 2695:dup
// 1606 2696:sipush 400
// 1607 2699:ldc2 #270 <Int 1957>
// 1608 2702:castore
// 1609 2703:dup
// 1610 2704:sipush 401
// 1611 2707:ldc1 #7 <Int 4>
// 1612 2709:castore
// 1613 2710:dup
// 1614 2711:sipush 402
// 1615 2714:ldc2 #271 <Int 1958>
// 1616 2717:castore
// 1617 2718:dup
// 1618 2719:sipush 403
// 1619 2722:ldc2 #272 <Int 1968>
// 1620 2725:castore
// 1621 2726:dup
// 1622 2727:sipush 404
// 1623 2730:ldc1 #28 <Int 13>
// 1624 2732:castore
// 1625 2733:dup
// 1626 2734:sipush 405
// 1627 2737:ldc2 #273 <Int 1969>
// 1628 2740:castore
// 1629 2741:dup
// 1630 2742:sipush 406
// 1631 2745:ldc2 #273 <Int 1969>
// 1632 2748:castore
// 1633 2749:dup
// 1634 2750:sipush 407
// 1635 2753:ldc1 #7 <Int 4>
// 1636 2755:castore
// 1637 2756:dup
// 1638 2757:sipush 408
// 1639 2760:ldc2 #274 <Int 1970>
// 1640 2763:castore
// 1641 2764:dup
// 1642 2765:sipush 409
// 1643 2768:ldc2 #275 <Int 2304>
// 1644 2771:castore
// 1645 2772:dup
// 1646 2773:sipush 410
// 1647 2776:ldc1 #22 <Int 0>
// 1648 2778:castore
// 1649 2779:dup
// 1650 2780:sipush 411
// 1651 2783:ldc2 #276 <Int 2305>
// 1652 2786:castore
// 1653 2787:dup
// 1654 2788:sipush 412
// 1655 2791:ldc2 #277 <Int 2306>
// 1656 2794:castore
// 1657 2795:dup
// 1658 2796:sipush 413
// 1659 2799:ldc1 #28 <Int 13>
// 1660 2801:castore
// 1661 2802:dup
// 1662 2803:sipush 414
// 1663 2806:ldc2 #278 <Int 2307>
// 1664 2809:castore
// 1665 2810:dup
// 1666 2811:sipush 415
// 1667 2814:ldc2 #279 <Int 2363>
// 1668 2817:castore
// 1669 2818:dup
// 1670 2819:sipush 416
// 1671 2822:ldc1 #22 <Int 0>
// 1672 2824:castore
// 1673 2825:dup
// 1674 2826:sipush 417
// 1675 2829:ldc2 #280 <Int 2364>
// 1676 2832:castore
// 1677 2833:dup
// 1678 2834:sipush 418
// 1679 2837:ldc2 #280 <Int 2364>
// 1680 2840:castore
// 1681 2841:dup
// 1682 2842:sipush 419
// 1683 2845:ldc1 #28 <Int 13>
// 1684 2847:castore
// 1685 2848:dup
// 1686 2849:sipush 420
// 1687 2852:ldc2 #281 <Int 2365>
// 1688 2855:castore
// 1689 2856:dup
// 1690 2857:sipush 421
// 1691 2860:ldc2 #282 <Int 2368>
// 1692 2863:castore
// 1693 2864:dup
// 1694 2865:sipush 422
// 1695 2868:ldc1 #22 <Int 0>
// 1696 2870:castore
// 1697 2871:dup
// 1698 2872:sipush 423
// 1699 2875:ldc2 #283 <Int 2369>
// 1700 2878:castore
// 1701 2879:dup
// 1702 2880:sipush 424
// 1703 2883:ldc2 #284 <Int 2376>
// 1704 2886:castore
// 1705 2887:dup
// 1706 2888:sipush 425
// 1707 2891:ldc1 #28 <Int 13>
// 1708 2893:castore
// 1709 2894:dup
// 1710 2895:sipush 426
// 1711 2898:ldc2 #285 <Int 2377>
// 1712 2901:castore
// 1713 2902:dup
// 1714 2903:sipush 427
// 1715 2906:ldc2 #286 <Int 2380>
// 1716 2909:castore
// 1717 2910:dup
// 1718 2911:sipush 428
// 1719 2914:ldc1 #22 <Int 0>
// 1720 2916:castore
// 1721 2917:dup
// 1722 2918:sipush 429
// 1723 2921:ldc2 #287 <Int 2381>
// 1724 2924:castore
// 1725 2925:dup
// 1726 2926:sipush 430
// 1727 2929:ldc2 #287 <Int 2381>
// 1728 2932:castore
// 1729 2933:dup
// 1730 2934:sipush 431
// 1731 2937:ldc1 #28 <Int 13>
// 1732 2939:castore
// 1733 2940:dup
// 1734 2941:sipush 432
// 1735 2944:ldc2 #288 <Int 2382>
// 1736 2947:castore
// 1737 2948:dup
// 1738 2949:sipush 433
// 1739 2952:ldc2 #289 <Int 2384>
// 1740 2955:castore
// 1741 2956:dup
// 1742 2957:sipush 434
// 1743 2960:ldc1 #22 <Int 0>
// 1744 2962:castore
// 1745 2963:dup
// 1746 2964:sipush 435
// 1747 2967:ldc2 #290 <Int 2385>
// 1748 2970:castore
// 1749 2971:dup
// 1750 2972:sipush 436
// 1751 2975:ldc2 #291 <Int 2388>
// 1752 2978:castore
// 1753 2979:dup
// 1754 2980:sipush 437
// 1755 2983:ldc1 #28 <Int 13>
// 1756 2985:castore
// 1757 2986:dup
// 1758 2987:sipush 438
// 1759 2990:ldc2 #292 <Int 2389>
// 1760 2993:castore
// 1761 2994:dup
// 1762 2995:sipush 439
// 1763 2998:ldc2 #293 <Int 2401>
// 1764 3001:castore
// 1765 3002:dup
// 1766 3003:sipush 440
// 1767 3006:ldc1 #22 <Int 0>
// 1768 3008:castore
// 1769 3009:dup
// 1770 3010:sipush 441
// 1771 3013:ldc2 #294 <Int 2402>
// 1772 3016:castore
// 1773 3017:dup
// 1774 3018:sipush 442
// 1775 3021:ldc2 #295 <Int 2403>
// 1776 3024:castore
// 1777 3025:dup
// 1778 3026:sipush 443
// 1779 3029:ldc1 #28 <Int 13>
// 1780 3031:castore
// 1781 3032:dup
// 1782 3033:sipush 444
// 1783 3036:ldc2 #296 <Int 2404>
// 1784 3039:castore
// 1785 3040:dup
// 1786 3041:sipush 445
// 1787 3044:ldc2 #297 <Int 2432>
// 1788 3047:castore
// 1789 3048:dup
// 1790 3049:sipush 446
// 1791 3052:ldc1 #22 <Int 0>
// 1792 3054:castore
// 1793 3055:dup
// 1794 3056:sipush 447
// 1795 3059:ldc2 #298 <Int 2433>
// 1796 3062:castore
// 1797 3063:dup
// 1798 3064:sipush 448
// 1799 3067:ldc2 #298 <Int 2433>
// 1800 3070:castore
// 1801 3071:dup
// 1802 3072:sipush 449
// 1803 3075:ldc1 #28 <Int 13>
// 1804 3077:castore
// 1805 3078:dup
// 1806 3079:sipush 450
// 1807 3082:ldc2 #299 <Int 2434>
// 1808 3085:castore
// 1809 3086:dup
// 1810 3087:sipush 451
// 1811 3090:ldc2 #300 <Int 2491>
// 1812 3093:castore
// 1813 3094:dup
// 1814 3095:sipush 452
// 1815 3098:ldc1 #22 <Int 0>
// 1816 3100:castore
// 1817 3101:dup
// 1818 3102:sipush 453
// 1819 3105:ldc2 #301 <Int 2492>
// 1820 3108:castore
// 1821 3109:dup
// 1822 3110:sipush 454
// 1823 3113:ldc2 #301 <Int 2492>
// 1824 3116:castore
// 1825 3117:dup
// 1826 3118:sipush 455
// 1827 3121:ldc1 #28 <Int 13>
// 1828 3123:castore
// 1829 3124:dup
// 1830 3125:sipush 456
// 1831 3128:ldc2 #302 <Int 2493>
// 1832 3131:castore
// 1833 3132:dup
// 1834 3133:sipush 457
// 1835 3136:ldc2 #303 <Int 2496>
// 1836 3139:castore
// 1837 3140:dup
// 1838 3141:sipush 458
// 1839 3144:ldc1 #22 <Int 0>
// 1840 3146:castore
// 1841 3147:dup
// 1842 3148:sipush 459
// 1843 3151:ldc2 #304 <Int 2497>
// 1844 3154:castore
// 1845 3155:dup
// 1846 3156:sipush 460
// 1847 3159:ldc2 #305 <Int 2500>
// 1848 3162:castore
// 1849 3163:dup
// 1850 3164:sipush 461
// 1851 3167:ldc1 #28 <Int 13>
// 1852 3169:castore
// 1853 3170:dup
// 1854 3171:sipush 462
// 1855 3174:ldc2 #306 <Int 2501>
// 1856 3177:castore
// 1857 3178:dup
// 1858 3179:sipush 463
// 1859 3182:ldc2 #307 <Int 2508>
// 1860 3185:castore
// 1861 3186:dup
// 1862 3187:sipush 464
// 1863 3190:ldc1 #22 <Int 0>
// 1864 3192:castore
// 1865 3193:dup
// 1866 3194:sipush 465
// 1867 3197:ldc2 #308 <Int 2509>
// 1868 3200:castore
// 1869 3201:dup
// 1870 3202:sipush 466
// 1871 3205:ldc2 #308 <Int 2509>
// 1872 3208:castore
// 1873 3209:dup
// 1874 3210:sipush 467
// 1875 3213:ldc1 #28 <Int 13>
// 1876 3215:castore
// 1877 3216:dup
// 1878 3217:sipush 468
// 1879 3220:ldc2 #309 <Int 2510>
// 1880 3223:castore
// 1881 3224:dup
// 1882 3225:sipush 469
// 1883 3228:ldc2 #310 <Int 2529>
// 1884 3231:castore
// 1885 3232:dup
// 1886 3233:sipush 470
// 1887 3236:ldc1 #22 <Int 0>
// 1888 3238:castore
// 1889 3239:dup
// 1890 3240:sipush 471
// 1891 3243:ldc2 #311 <Int 2530>
// 1892 3246:castore
// 1893 3247:dup
// 1894 3248:sipush 472
// 1895 3251:ldc2 #312 <Int 2531>
// 1896 3254:castore
// 1897 3255:dup
// 1898 3256:sipush 473
// 1899 3259:ldc1 #28 <Int 13>
// 1900 3261:castore
// 1901 3262:dup
// 1902 3263:sipush 474
// 1903 3266:ldc2 #313 <Int 2532>
// 1904 3269:castore
// 1905 3270:dup
// 1906 3271:sipush 475
// 1907 3274:ldc2 #314 <Int 2545>
// 1908 3277:castore
// 1909 3278:dup
// 1910 3279:sipush 476
// 1911 3282:ldc1 #22 <Int 0>
// 1912 3284:castore
// 1913 3285:dup
// 1914 3286:sipush 477
// 1915 3289:ldc2 #315 <Int 2546>
// 1916 3292:castore
// 1917 3293:dup
// 1918 3294:sipush 478
// 1919 3297:ldc2 #316 <Int 2547>
// 1920 3300:castore
// 1921 3301:dup
// 1922 3302:sipush 479
// 1923 3305:ldc1 #20 <Int 10>
// 1924 3307:castore
// 1925 3308:dup
// 1926 3309:sipush 480
// 1927 3312:ldc2 #317 <Int 2548>
// 1928 3315:castore
// 1929 3316:dup
// 1930 3317:sipush 481
// 1931 3320:ldc2 #318 <Int 2560>
// 1932 3323:castore
// 1933 3324:dup
// 1934 3325:sipush 482
// 1935 3328:ldc1 #22 <Int 0>
// 1936 3330:castore
// 1937 3331:dup
// 1938 3332:sipush 483
// 1939 3335:ldc2 #319 <Int 2561>
// 1940 3338:castore
// 1941 3339:dup
// 1942 3340:sipush 484
// 1943 3343:ldc2 #320 <Int 2562>
// 1944 3346:castore
// 1945 3347:dup
// 1946 3348:sipush 485
// 1947 3351:ldc1 #28 <Int 13>
// 1948 3353:castore
// 1949 3354:dup
// 1950 3355:sipush 486
// 1951 3358:ldc2 #321 <Int 2563>
// 1952 3361:castore
// 1953 3362:dup
// 1954 3363:sipush 487
// 1955 3366:ldc2 #322 <Int 2619>
// 1956 3369:castore
// 1957 3370:dup
// 1958 3371:sipush 488
// 1959 3374:ldc1 #22 <Int 0>
// 1960 3376:castore
// 1961 3377:dup
// 1962 3378:sipush 489
// 1963 3381:ldc2 #323 <Int 2620>
// 1964 3384:castore
// 1965 3385:dup
// 1966 3386:sipush 490
// 1967 3389:ldc2 #323 <Int 2620>
// 1968 3392:castore
// 1969 3393:dup
// 1970 3394:sipush 491
// 1971 3397:ldc1 #28 <Int 13>
// 1972 3399:castore
// 1973 3400:dup
// 1974 3401:sipush 492
// 1975 3404:ldc2 #324 <Int 2621>
// 1976 3407:castore
// 1977 3408:dup
// 1978 3409:sipush 493
// 1979 3412:ldc2 #325 <Int 2624>
// 1980 3415:castore
// 1981 3416:dup
// 1982 3417:sipush 494
// 1983 3420:ldc1 #22 <Int 0>
// 1984 3422:castore
// 1985 3423:dup
// 1986 3424:sipush 495
// 1987 3427:ldc2 #326 <Int 2625>
// 1988 3430:castore
// 1989 3431:dup
// 1990 3432:sipush 496
// 1991 3435:ldc2 #327 <Int 2626>
// 1992 3438:castore
// 1993 3439:dup
// 1994 3440:sipush 497
// 1995 3443:ldc1 #28 <Int 13>
// 1996 3445:castore
// 1997 3446:dup
// 1998 3447:sipush 498
// 1999 3450:ldc2 #328 <Int 2627>
// 2000 3453:castore
// 2001 3454:dup
// 2002 3455:sipush 499
// 2003 3458:ldc2 #329 <Int 2630>
// 2004 3461:castore
// 2005 3462:dup
// 2006 3463:sipush 500
// 2007 3466:ldc1 #22 <Int 0>
// 2008 3468:castore
// 2009 3469:dup
// 2010 3470:sipush 501
// 2011 3473:ldc2 #330 <Int 2631>
// 2012 3476:castore
// 2013 3477:dup
// 2014 3478:sipush 502
// 2015 3481:ldc2 #331 <Int 2632>
// 2016 3484:castore
// 2017 3485:dup
// 2018 3486:sipush 503
// 2019 3489:ldc1 #28 <Int 13>
// 2020 3491:castore
// 2021 3492:dup
// 2022 3493:sipush 504
// 2023 3496:ldc2 #332 <Int 2633>
// 2024 3499:castore
// 2025 3500:dup
// 2026 3501:sipush 505
// 2027 3504:ldc2 #333 <Int 2634>
// 2028 3507:castore
// 2029 3508:dup
// 2030 3509:sipush 506
// 2031 3512:ldc1 #22 <Int 0>
// 2032 3514:castore
// 2033 3515:dup
// 2034 3516:sipush 507
// 2035 3519:ldc2 #334 <Int 2635>
// 2036 3522:castore
// 2037 3523:dup
// 2038 3524:sipush 508
// 2039 3527:ldc2 #335 <Int 2637>
// 2040 3530:castore
// 2041 3531:dup
// 2042 3532:sipush 509
// 2043 3535:ldc1 #28 <Int 13>
// 2044 3537:castore
// 2045 3538:dup
// 2046 3539:sipush 510
// 2047 3542:ldc2 #336 <Int 2638>
// 2048 3545:castore
// 2049 3546:dup
// 2050 3547:sipush 511
// 2051 3550:ldc2 #337 <Int 2671>
// 2052 3553:castore
// 2053 3554:dup
// 2054 3555:sipush 512
// 2055 3558:ldc1 #22 <Int 0>
// 2056 3560:castore
// 2057 3561:dup
// 2058 3562:sipush 513
// 2059 3565:ldc2 #338 <Int 2672>
// 2060 3568:castore
// 2061 3569:dup
// 2062 3570:sipush 514
// 2063 3573:ldc2 #339 <Int 2673>
// 2064 3576:castore
// 2065 3577:dup
// 2066 3578:sipush 515
// 2067 3581:ldc1 #28 <Int 13>
// 2068 3583:castore
// 2069 3584:dup
// 2070 3585:sipush 516
// 2071 3588:ldc2 #340 <Int 2674>
// 2072 3591:castore
// 2073 3592:dup
// 2074 3593:sipush 517
// 2075 3596:ldc2 #341 <Int 2688>
// 2076 3599:castore
// 2077 3600:dup
// 2078 3601:sipush 518
// 2079 3604:ldc1 #22 <Int 0>
// 2080 3606:castore
// 2081 3607:dup
// 2082 3608:sipush 519
// 2083 3611:ldc2 #342 <Int 2689>
// 2084 3614:castore
// 2085 3615:dup
// 2086 3616:sipush 520
// 2087 3619:ldc2 #343 <Int 2690>
// 2088 3622:castore
// 2089 3623:dup
// 2090 3624:sipush 521
// 2091 3627:ldc1 #28 <Int 13>
// 2092 3629:castore
// 2093 3630:dup
// 2094 3631:sipush 522
// 2095 3634:ldc2 #344 <Int 2691>
// 2096 3637:castore
// 2097 3638:dup
// 2098 3639:sipush 523
// 2099 3642:ldc2 #345 <Int 2747>
// 2100 3645:castore
// 2101 3646:dup
// 2102 3647:sipush 524
// 2103 3650:ldc1 #22 <Int 0>
// 2104 3652:castore
// 2105 3653:dup
// 2106 3654:sipush 525
// 2107 3657:ldc2 #346 <Int 2748>
// 2108 3660:castore
// 2109 3661:dup
// 2110 3662:sipush 526
// 2111 3665:ldc2 #346 <Int 2748>
// 2112 3668:castore
// 2113 3669:dup
// 2114 3670:sipush 527
// 2115 3673:ldc1 #28 <Int 13>
// 2116 3675:castore
// 2117 3676:dup
// 2118 3677:sipush 528
// 2119 3680:ldc2 #347 <Int 2749>
// 2120 3683:castore
// 2121 3684:dup
// 2122 3685:sipush 529
// 2123 3688:ldc2 #348 <Int 2752>
// 2124 3691:castore
// 2125 3692:dup
// 2126 3693:sipush 530
// 2127 3696:ldc1 #22 <Int 0>
// 2128 3698:castore
// 2129 3699:dup
// 2130 3700:sipush 531
// 2131 3703:ldc2 #349 <Int 2753>
// 2132 3706:castore
// 2133 3707:dup
// 2134 3708:sipush 532
// 2135 3711:ldc2 #350 <Int 2757>
// 2136 3714:castore
// 2137 3715:dup
// 2138 3716:sipush 533
// 2139 3719:ldc1 #28 <Int 13>
// 2140 3721:castore
// 2141 3722:dup
// 2142 3723:sipush 534
// 2143 3726:ldc2 #351 <Int 2758>
// 2144 3729:castore
// 2145 3730:dup
// 2146 3731:sipush 535
// 2147 3734:ldc2 #351 <Int 2758>
// 2148 3737:castore
// 2149 3738:dup
// 2150 3739:sipush 536
// 2151 3742:ldc1 #22 <Int 0>
// 2152 3744:castore
// 2153 3745:dup
// 2154 3746:sipush 537
// 2155 3749:ldc2 #352 <Int 2759>
// 2156 3752:castore
// 2157 3753:dup
// 2158 3754:sipush 538
// 2159 3757:ldc2 #353 <Int 2760>
// 2160 3760:castore
// 2161 3761:dup
// 2162 3762:sipush 539
// 2163 3765:ldc1 #28 <Int 13>
// 2164 3767:castore
// 2165 3768:dup
// 2166 3769:sipush 540
// 2167 3772:ldc2 #354 <Int 2761>
// 2168 3775:castore
// 2169 3776:dup
// 2170 3777:sipush 541
// 2171 3780:ldc2 #355 <Int 2764>
// 2172 3783:castore
// 2173 3784:dup
// 2174 3785:sipush 542
// 2175 3788:ldc1 #22 <Int 0>
// 2176 3790:castore
// 2177 3791:dup
// 2178 3792:sipush 543
// 2179 3795:ldc2 #356 <Int 2765>
// 2180 3798:castore
// 2181 3799:dup
// 2182 3800:sipush 544
// 2183 3803:ldc2 #356 <Int 2765>
// 2184 3806:castore
// 2185 3807:dup
// 2186 3808:sipush 545
// 2187 3811:ldc1 #28 <Int 13>
// 2188 3813:castore
// 2189 3814:dup
// 2190 3815:sipush 546
// 2191 3818:ldc2 #357 <Int 2766>
// 2192 3821:castore
// 2193 3822:dup
// 2194 3823:sipush 547
// 2195 3826:ldc2 #358 <Int 2785>
// 2196 3829:castore
// 2197 3830:dup
// 2198 3831:sipush 548
// 2199 3834:ldc1 #22 <Int 0>
// 2200 3836:castore
// 2201 3837:dup
// 2202 3838:sipush 549
// 2203 3841:ldc2 #359 <Int 2786>
// 2204 3844:castore
// 2205 3845:dup
// 2206 3846:sipush 550
// 2207 3849:ldc2 #360 <Int 2787>
// 2208 3852:castore
// 2209 3853:dup
// 2210 3854:sipush 551
// 2211 3857:ldc1 #28 <Int 13>
// 2212 3859:castore
// 2213 3860:dup
// 2214 3861:sipush 552
// 2215 3864:ldc2 #361 <Int 2788>
// 2216 3867:castore
// 2217 3868:dup
// 2218 3869:sipush 553
// 2219 3872:ldc2 #362 <Int 2800>
// 2220 3875:castore
// 2221 3876:dup
// 2222 3877:sipush 554
// 2223 3880:ldc1 #22 <Int 0>
// 2224 3882:castore
// 2225 3883:dup
// 2226 3884:sipush 555
// 2227 3887:ldc2 #363 <Int 2801>
// 2228 3890:castore
// 2229 3891:dup
// 2230 3892:sipush 556
// 2231 3895:ldc2 #363 <Int 2801>
// 2232 3898:castore
// 2233 3899:dup
// 2234 3900:sipush 557
// 2235 3903:ldc1 #20 <Int 10>
// 2236 3905:castore
// 2237 3906:dup
// 2238 3907:sipush 558
// 2239 3910:ldc2 #364 <Int 2802>
// 2240 3913:castore
// 2241 3914:dup
// 2242 3915:sipush 559
// 2243 3918:ldc2 #365 <Int 2816>
// 2244 3921:castore
// 2245 3922:dup
// 2246 3923:sipush 560
// 2247 3926:ldc1 #22 <Int 0>
// 2248 3928:castore
// 2249 3929:dup
// 2250 3930:sipush 561
// 2251 3933:ldc2 #366 <Int 2817>
// 2252 3936:castore
// 2253 3937:dup
// 2254 3938:sipush 562
// 2255 3941:ldc2 #366 <Int 2817>
// 2256 3944:castore
// 2257 3945:dup
// 2258 3946:sipush 563
// 2259 3949:ldc1 #28 <Int 13>
// 2260 3951:castore
// 2261 3952:dup
// 2262 3953:sipush 564
// 2263 3956:ldc2 #367 <Int 2818>
// 2264 3959:castore
// 2265 3960:dup
// 2266 3961:sipush 565
// 2267 3964:ldc2 #368 <Int 2875>
// 2268 3967:castore
// 2269 3968:dup
// 2270 3969:sipush 566
// 2271 3972:ldc1 #22 <Int 0>
// 2272 3974:castore
// 2273 3975:dup
// 2274 3976:sipush 567
// 2275 3979:ldc2 #369 <Int 2876>
// 2276 3982:castore
// 2277 3983:dup
// 2278 3984:sipush 568
// 2279 3987:ldc2 #369 <Int 2876>
// 2280 3990:castore
// 2281 3991:dup
// 2282 3992:sipush 569
// 2283 3995:ldc1 #28 <Int 13>
// 2284 3997:castore
// 2285 3998:dup
// 2286 3999:sipush 570
// 2287 4002:ldc2 #370 <Int 2877>
// 2288 4005:castore
// 2289 4006:dup
// 2290 4007:sipush 571
// 2291 4010:ldc2 #371 <Int 2878>
// 2292 4013:castore
// 2293 4014:dup
// 2294 4015:sipush 572
// 2295 4018:ldc1 #22 <Int 0>
// 2296 4020:castore
// 2297 4021:dup
// 2298 4022:sipush 573
// 2299 4025:ldc2 #372 <Int 2879>
// 2300 4028:castore
// 2301 4029:dup
// 2302 4030:sipush 574
// 2303 4033:ldc2 #372 <Int 2879>
// 2304 4036:castore
// 2305 4037:dup
// 2306 4038:sipush 575
// 2307 4041:ldc1 #28 <Int 13>
// 2308 4043:castore
// 2309 4044:dup
// 2310 4045:sipush 576
// 2311 4048:ldc2 #373 <Int 2880>
// 2312 4051:castore
// 2313 4052:dup
// 2314 4053:sipush 577
// 2315 4056:ldc2 #373 <Int 2880>
// 2316 4059:castore
// 2317 4060:dup
// 2318 4061:sipush 578
// 2319 4064:ldc1 #22 <Int 0>
// 2320 4066:castore
// 2321 4067:dup
// 2322 4068:sipush 579
// 2323 4071:ldc2 #374 <Int 2881>
// 2324 4074:castore
// 2325 4075:dup
// 2326 4076:sipush 580
// 2327 4079:ldc2 #375 <Int 2883>
// 2328 4082:castore
// 2329 4083:dup
// 2330 4084:sipush 581
// 2331 4087:ldc1 #28 <Int 13>
// 2332 4089:castore
// 2333 4090:dup
// 2334 4091:sipush 582
// 2335 4094:ldc2 #376 <Int 2884>
// 2336 4097:castore
// 2337 4098:dup
// 2338 4099:sipush 583
// 2339 4102:ldc2 #377 <Int 2892>
// 2340 4105:castore
// 2341 4106:dup
// 2342 4107:sipush 584
// 2343 4110:ldc1 #22 <Int 0>
// 2344 4112:castore
// 2345 4113:dup
// 2346 4114:sipush 585
// 2347 4117:ldc2 #378 <Int 2893>
// 2348 4120:castore
// 2349 4121:dup
// 2350 4122:sipush 586
// 2351 4125:ldc2 #378 <Int 2893>
// 2352 4128:castore
// 2353 4129:dup
// 2354 4130:sipush 587
// 2355 4133:ldc1 #28 <Int 13>
// 2356 4135:castore
// 2357 4136:dup
// 2358 4137:sipush 588
// 2359 4140:ldc2 #379 <Int 2894>
// 2360 4143:castore
// 2361 4144:dup
// 2362 4145:sipush 589
// 2363 4148:ldc2 #380 <Int 2901>
// 2364 4151:castore
// 2365 4152:dup
// 2366 4153:sipush 590
// 2367 4156:ldc1 #22 <Int 0>
// 2368 4158:castore
// 2369 4159:dup
// 2370 4160:sipush 591
// 2371 4163:ldc2 #381 <Int 2902>
// 2372 4166:castore
// 2373 4167:dup
// 2374 4168:sipush 592
// 2375 4171:ldc2 #381 <Int 2902>
// 2376 4174:castore
// 2377 4175:dup
// 2378 4176:sipush 593
// 2379 4179:ldc1 #28 <Int 13>
// 2380 4181:castore
// 2381 4182:dup
// 2382 4183:sipush 594
// 2383 4186:ldc2 #382 <Int 2903>
// 2384 4189:castore
// 2385 4190:dup
// 2386 4191:sipush 595
// 2387 4194:ldc2 #383 <Int 2945>
// 2388 4197:castore
// 2389 4198:dup
// 2390 4199:sipush 596
// 2391 4202:ldc1 #22 <Int 0>
// 2392 4204:castore
// 2393 4205:dup
// 2394 4206:sipush 597
// 2395 4209:ldc2 #384 <Int 2946>
// 2396 4212:castore
// 2397 4213:dup
// 2398 4214:sipush 598
// 2399 4217:ldc2 #384 <Int 2946>
// 2400 4220:castore
// 2401 4221:dup
// 2402 4222:sipush 599
// 2403 4225:ldc1 #28 <Int 13>
// 2404 4227:castore
// 2405 4228:dup
// 2406 4229:sipush 600
// 2407 4232:ldc2 #385 <Int 2947>
// 2408 4235:castore
// 2409 4236:dup
// 2410 4237:sipush 601
// 2411 4240:ldc2 #386 <Int 3007>
// 2412 4243:castore
// 2413 4244:dup
// 2414 4245:sipush 602
// 2415 4248:ldc1 #22 <Int 0>
// 2416 4250:castore
// 2417 4251:dup
// 2418 4252:sipush 603
// 2419 4255:ldc2 #387 <Int 3008>
// 2420 4258:castore
// 2421 4259:dup
// 2422 4260:sipush 604
// 2423 4263:ldc2 #387 <Int 3008>
// 2424 4266:castore
// 2425 4267:dup
// 2426 4268:sipush 605
// 2427 4271:ldc1 #28 <Int 13>
// 2428 4273:castore
// 2429 4274:dup
// 2430 4275:sipush 606
// 2431 4278:ldc2 #388 <Int 3009>
// 2432 4281:castore
// 2433 4282:dup
// 2434 4283:sipush 607
// 2435 4286:ldc2 #389 <Int 3020>
// 2436 4289:castore
// 2437 4290:dup
// 2438 4291:sipush 608
// 2439 4294:ldc1 #22 <Int 0>
// 2440 4296:castore
// 2441 4297:dup
// 2442 4298:sipush 609
// 2443 4301:ldc2 #390 <Int 3021>
// 2444 4304:castore
// 2445 4305:dup
// 2446 4306:sipush 610
// 2447 4309:ldc2 #390 <Int 3021>
// 2448 4312:castore
// 2449 4313:dup
// 2450 4314:sipush 611
// 2451 4317:ldc1 #28 <Int 13>
// 2452 4319:castore
// 2453 4320:dup
// 2454 4321:sipush 612
// 2455 4324:ldc2 #391 <Int 3022>
// 2456 4327:castore
// 2457 4328:dup
// 2458 4329:sipush 613
// 2459 4332:ldc2 #392 <Int 3058>
// 2460 4335:castore
// 2461 4336:dup
// 2462 4337:sipush 614
// 2463 4340:ldc1 #22 <Int 0>
// 2464 4342:castore
// 2465 4343:dup
// 2466 4344:sipush 615
// 2467 4347:ldc2 #393 <Int 3059>
// 2468 4350:castore
// 2469 4351:dup
// 2470 4352:sipush 616
// 2471 4355:ldc2 #394 <Int 3064>
// 2472 4358:castore
// 2473 4359:dup
// 2474 4360:sipush 617
// 2475 4363:ldc1 #30 <Int 18>
// 2476 4365:castore
// 2477 4366:dup
// 2478 4367:sipush 618
// 2479 4370:ldc2 #395 <Int 3065>
// 2480 4373:castore
// 2481 4374:dup
// 2482 4375:sipush 619
// 2483 4378:ldc2 #395 <Int 3065>
// 2484 4381:castore
// 2485 4382:dup
// 2486 4383:sipush 620
// 2487 4386:ldc1 #20 <Int 10>
// 2488 4388:castore
// 2489 4389:dup
// 2490 4390:sipush 621
// 2491 4393:ldc2 #396 <Int 3066>
// 2492 4396:castore
// 2493 4397:dup
// 2494 4398:sipush 622
// 2495 4401:ldc2 #396 <Int 3066>
// 2496 4404:castore
// 2497 4405:dup
// 2498 4406:sipush 623
// 2499 4409:ldc1 #30 <Int 18>
// 2500 4411:castore
// 2501 4412:dup
// 2502 4413:sipush 624
// 2503 4416:ldc2 #397 <Int 3067>
// 2504 4419:castore
// 2505 4420:dup
// 2506 4421:sipush 625
// 2507 4424:ldc2 #398 <Int 3133>
// 2508 4427:castore
// 2509 4428:dup
// 2510 4429:sipush 626
// 2511 4432:ldc1 #22 <Int 0>
// 2512 4434:castore
// 2513 4435:dup
// 2514 4436:sipush 627
// 2515 4439:ldc2 #399 <Int 3134>
// 2516 4442:castore
// 2517 4443:dup
// 2518 4444:sipush 628
// 2519 4447:ldc2 #400 <Int 3136>
// 2520 4450:castore
// 2521 4451:dup
// 2522 4452:sipush 629
// 2523 4455:ldc1 #28 <Int 13>
// 2524 4457:castore
// 2525 4458:dup
// 2526 4459:sipush 630
// 2527 4462:ldc2 #401 <Int 3137>
// 2528 4465:castore
// 2529 4466:dup
// 2530 4467:sipush 631
// 2531 4470:ldc2 #402 <Int 3141>
// 2532 4473:castore
// 2533 4474:dup
// 2534 4475:sipush 632
// 2535 4478:ldc1 #22 <Int 0>
// 2536 4480:castore
// 2537 4481:dup
// 2538 4482:sipush 633
// 2539 4485:ldc2 #403 <Int 3142>
// 2540 4488:castore
// 2541 4489:dup
// 2542 4490:sipush 634
// 2543 4493:ldc2 #404 <Int 3144>
// 2544 4496:castore
// 2545 4497:dup
// 2546 4498:sipush 635
// 2547 4501:ldc1 #28 <Int 13>
// 2548 4503:castore
// 2549 4504:dup
// 2550 4505:sipush 636
// 2551 4508:ldc2 #405 <Int 3145>
// 2552 4511:castore
// 2553 4512:dup
// 2554 4513:sipush 637
// 2555 4516:ldc2 #405 <Int 3145>
// 2556 4519:castore
// 2557 4520:dup
// 2558 4521:sipush 638
// 2559 4524:ldc1 #22 <Int 0>
// 2560 4526:castore
// 2561 4527:dup
// 2562 4528:sipush 639
// 2563 4531:ldc2 #406 <Int 3146>
// 2564 4534:castore
// 2565 4535:dup
// 2566 4536:sipush 640
// 2567 4539:ldc2 #407 <Int 3149>
// 2568 4542:castore
// 2569 4543:dup
// 2570 4544:sipush 641
// 2571 4547:ldc1 #28 <Int 13>
// 2572 4549:castore
// 2573 4550:dup
// 2574 4551:sipush 642
// 2575 4554:ldc2 #408 <Int 3150>
// 2576 4557:castore
// 2577 4558:dup
// 2578 4559:sipush 643
// 2579 4562:ldc2 #409 <Int 3156>
// 2580 4565:castore
// 2581 4566:dup
// 2582 4567:sipush 644
// 2583 4570:ldc1 #22 <Int 0>
// 2584 4572:castore
// 2585 4573:dup
// 2586 4574:sipush 645
// 2587 4577:ldc2 #410 <Int 3157>
// 2588 4580:castore
// 2589 4581:dup
// 2590 4582:sipush 646
// 2591 4585:ldc2 #411 <Int 3158>
// 2592 4588:castore
// 2593 4589:dup
// 2594 4590:sipush 647
// 2595 4593:ldc1 #28 <Int 13>
// 2596 4595:castore
// 2597 4596:dup
// 2598 4597:sipush 648
// 2599 4600:ldc2 #412 <Int 3159>
// 2600 4603:castore
// 2601 4604:dup
// 2602 4605:sipush 649
// 2603 4608:ldc2 #413 <Int 3259>
// 2604 4611:castore
// 2605 4612:dup
// 2606 4613:sipush 650
// 2607 4616:ldc1 #22 <Int 0>
// 2608 4618:castore
// 2609 4619:dup
// 2610 4620:sipush 651
// 2611 4623:ldc2 #414 <Int 3260>
// 2612 4626:castore
// 2613 4627:dup
// 2614 4628:sipush 652
// 2615 4631:ldc2 #414 <Int 3260>
// 2616 4634:castore
// 2617 4635:dup
// 2618 4636:sipush 653
// 2619 4639:ldc1 #28 <Int 13>
// 2620 4641:castore
// 2621 4642:dup
// 2622 4643:sipush 654
// 2623 4646:ldc2 #415 <Int 3261>
// 2624 4649:castore
// 2625 4650:dup
// 2626 4651:sipush 655
// 2627 4654:ldc2 #416 <Int 3275>
// 2628 4657:castore
// 2629 4658:dup
// 2630 4659:sipush 656
// 2631 4662:ldc1 #22 <Int 0>
// 2632 4664:castore
// 2633 4665:dup
// 2634 4666:sipush 657
// 2635 4669:ldc2 #417 <Int 3276>
// 2636 4672:castore
// 2637 4673:dup
// 2638 4674:sipush 658
// 2639 4677:ldc2 #418 <Int 3277>
// 2640 4680:castore
// 2641 4681:dup
// 2642 4682:sipush 659
// 2643 4685:ldc1 #28 <Int 13>
// 2644 4687:castore
// 2645 4688:dup
// 2646 4689:sipush 660
// 2647 4692:ldc2 #419 <Int 3278>
// 2648 4695:castore
// 2649 4696:dup
// 2650 4697:sipush 661
// 2651 4700:ldc2 #420 <Int 3392>
// 2652 4703:castore
// 2653 4704:dup
// 2654 4705:sipush 662
// 2655 4708:ldc1 #22 <Int 0>
// 2656 4710:castore
// 2657 4711:dup
// 2658 4712:sipush 663
// 2659 4715:ldc2 #421 <Int 3393>
// 2660 4718:castore
// 2661 4719:dup
// 2662 4720:sipush 664
// 2663 4723:ldc2 #422 <Int 3395>
// 2664 4726:castore
// 2665 4727:dup
// 2666 4728:sipush 665
// 2667 4731:ldc1 #28 <Int 13>
// 2668 4733:castore
// 2669 4734:dup
// 2670 4735:sipush 666
// 2671 4738:ldc2 #423 <Int 3396>
// 2672 4741:castore
// 2673 4742:dup
// 2674 4743:sipush 667
// 2675 4746:ldc2 #424 <Int 3404>
// 2676 4749:castore
// 2677 4750:dup
// 2678 4751:sipush 668
// 2679 4754:ldc1 #22 <Int 0>
// 2680 4756:castore
// 2681 4757:dup
// 2682 4758:sipush 669
// 2683 4761:ldc2 #425 <Int 3405>
// 2684 4764:castore
// 2685 4765:dup
// 2686 4766:sipush 670
// 2687 4769:ldc2 #425 <Int 3405>
// 2688 4772:castore
// 2689 4773:dup
// 2690 4774:sipush 671
// 2691 4777:ldc1 #28 <Int 13>
// 2692 4779:castore
// 2693 4780:dup
// 2694 4781:sipush 672
// 2695 4784:ldc2 #426 <Int 3406>
// 2696 4787:castore
// 2697 4788:dup
// 2698 4789:sipush 673
// 2699 4792:ldc2 #427 <Int 3529>
// 2700 4795:castore
// 2701 4796:dup
// 2702 4797:sipush 674
// 2703 4800:ldc1 #22 <Int 0>
// 2704 4802:castore
// 2705 4803:dup
// 2706 4804:sipush 675
// 2707 4807:ldc2 #428 <Int 3530>
// 2708 4810:castore
// 2709 4811:dup
// 2710 4812:sipush 676
// 2711 4815:ldc2 #428 <Int 3530>
// 2712 4818:castore
// 2713 4819:dup
// 2714 4820:sipush 677
// 2715 4823:ldc1 #28 <Int 13>
// 2716 4825:castore
// 2717 4826:dup
// 2718 4827:sipush 678
// 2719 4830:ldc2 #429 <Int 3531>
// 2720 4833:castore
// 2721 4834:dup
// 2722 4835:sipush 679
// 2723 4838:ldc2 #430 <Int 3537>
// 2724 4841:castore
// 2725 4842:dup
// 2726 4843:sipush 680
// 2727 4846:ldc1 #22 <Int 0>
// 2728 4848:castore
// 2729 4849:dup
// 2730 4850:sipush 681
// 2731 4853:ldc2 #431 <Int 3538>
// 2732 4856:castore
// 2733 4857:dup
// 2734 4858:sipush 682
// 2735 4861:ldc2 #432 <Int 3540>
// 2736 4864:castore
// 2737 4865:dup
// 2738 4866:sipush 683
// 2739 4869:ldc1 #28 <Int 13>
// 2740 4871:castore
// 2741 4872:dup
// 2742 4873:sipush 684
// 2743 4876:ldc2 #433 <Int 3541>
// 2744 4879:castore
// 2745 4880:dup
// 2746 4881:sipush 685
// 2747 4884:ldc2 #433 <Int 3541>
// 2748 4887:castore
// 2749 4888:dup
// 2750 4889:sipush 686
// 2751 4892:ldc1 #22 <Int 0>
// 2752 4894:castore
// 2753 4895:dup
// 2754 4896:sipush 687
// 2755 4899:ldc2 #434 <Int 3542>
// 2756 4902:castore
// 2757 4903:dup
// 2758 4904:sipush 688
// 2759 4907:ldc2 #434 <Int 3542>
// 2760 4910:castore
// 2761 4911:dup
// 2762 4912:sipush 689
// 2763 4915:ldc1 #28 <Int 13>
// 2764 4917:castore
// 2765 4918:dup
// 2766 4919:sipush 690
// 2767 4922:ldc2 #435 <Int 3543>
// 2768 4925:castore
// 2769 4926:dup
// 2770 4927:sipush 691
// 2771 4930:ldc2 #436 <Int 3632>
// 2772 4933:castore
// 2773 4934:dup
// 2774 4935:sipush 692
// 2775 4938:ldc1 #22 <Int 0>
// 2776 4940:castore
// 2777 4941:dup
// 2778 4942:sipush 693
// 2779 4945:ldc2 #437 <Int 3633>
// 2780 4948:castore
// 2781 4949:dup
// 2782 4950:sipush 694
// 2783 4953:ldc2 #437 <Int 3633>
// 2784 4956:castore
// 2785 4957:dup
// 2786 4958:sipush 695
// 2787 4961:ldc1 #28 <Int 13>
// 2788 4963:castore
// 2789 4964:dup
// 2790 4965:sipush 696
// 2791 4968:ldc2 #438 <Int 3634>
// 2792 4971:castore
// 2793 4972:dup
// 2794 4973:sipush 697
// 2795 4976:ldc2 #439 <Int 3635>
// 2796 4979:castore
// 2797 4980:dup
// 2798 4981:sipush 698
// 2799 4984:ldc1 #22 <Int 0>
// 2800 4986:castore
// 2801 4987:dup
// 2802 4988:sipush 699
// 2803 4991:ldc2 #440 <Int 3636>
// 2804 4994:castore
// 2805 4995:dup
// 2806 4996:sipush 700
// 2807 4999:ldc2 #441 <Int 3642>
// 2808 5002:castore
// 2809 5003:dup
// 2810 5004:sipush 701
// 2811 5007:ldc1 #28 <Int 13>
// 2812 5009:castore
// 2813 5010:dup
// 2814 5011:sipush 702
// 2815 5014:ldc2 #442 <Int 3643>
// 2816 5017:castore
// 2817 5018:dup
// 2818 5019:sipush 703
// 2819 5022:ldc2 #443 <Int 3646>
// 2820 5025:castore
// 2821 5026:dup
// 2822 5027:sipush 704
// 2823 5030:ldc1 #22 <Int 0>
// 2824 5032:castore
// 2825 5033:dup
// 2826 5034:sipush 705
// 2827 5037:ldc2 #444 <Int 3647>
// 2828 5040:castore
// 2829 5041:dup
// 2830 5042:sipush 706
// 2831 5045:ldc2 #444 <Int 3647>
// 2832 5048:castore
// 2833 5049:dup
// 2834 5050:sipush 707
// 2835 5053:ldc1 #20 <Int 10>
// 2836 5055:castore
// 2837 5056:dup
// 2838 5057:sipush 708
// 2839 5060:ldc2 #445 <Int 3648>
// 2840 5063:castore
// 2841 5064:dup
// 2842 5065:sipush 709
// 2843 5068:ldc2 #446 <Int 3654>
// 2844 5071:castore
// 2845 5072:dup
// 2846 5073:sipush 710
// 2847 5076:ldc1 #22 <Int 0>
// 2848 5078:castore
// 2849 5079:dup
// 2850 5080:sipush 711
// 2851 5083:ldc2 #447 <Int 3655>
// 2852 5086:castore
// 2853 5087:dup
// 2854 5088:sipush 712
// 2855 5091:ldc2 #448 <Int 3662>
// 2856 5094:castore
// 2857 5095:dup
// 2858 5096:sipush 713
// 2859 5099:ldc1 #28 <Int 13>
// 2860 5101:castore
// 2861 5102:dup
// 2862 5103:sipush 714
// 2863 5106:ldc2 #449 <Int 3663>
// 2864 5109:castore
// 2865 5110:dup
// 2866 5111:sipush 715
// 2867 5114:ldc2 #450 <Int 3760>
// 2868 5117:castore
// 2869 5118:dup
// 2870 5119:sipush 716
// 2871 5122:ldc1 #22 <Int 0>
// 2872 5124:castore
// 2873 5125:dup
// 2874 5126:sipush 717
// 2875 5129:ldc2 #451 <Int 3761>
// 2876 5132:castore
// 2877 5133:dup
// 2878 5134:sipush 718
// 2879 5137:ldc2 #451 <Int 3761>
// 2880 5140:castore
// 2881 5141:dup
// 2882 5142:sipush 719
// 2883 5145:ldc1 #28 <Int 13>
// 2884 5147:castore
// 2885 5148:dup
// 2886 5149:sipush 720
// 2887 5152:ldc2 #452 <Int 3762>
// 2888 5155:castore
// 2889 5156:dup
// 2890 5157:sipush 721
// 2891 5160:ldc2 #453 <Int 3763>
// 2892 5163:castore
// 2893 5164:dup
// 2894 5165:sipush 722
// 2895 5168:ldc1 #22 <Int 0>
// 2896 5170:castore
// 2897 5171:dup
// 2898 5172:sipush 723
// 2899 5175:ldc2 #454 <Int 3764>
// 2900 5178:castore
// 2901 5179:dup
// 2902 5180:sipush 724
// 2903 5183:ldc2 #455 <Int 3769>
// 2904 5186:castore
// 2905 5187:dup
// 2906 5188:sipush 725
// 2907 5191:ldc1 #28 <Int 13>
// 2908 5193:castore
// 2909 5194:dup
// 2910 5195:sipush 726
// 2911 5198:ldc2 #456 <Int 3770>
// 2912 5201:castore
// 2913 5202:dup
// 2914 5203:sipush 727
// 2915 5206:ldc2 #456 <Int 3770>
// 2916 5209:castore
// 2917 5210:dup
// 2918 5211:sipush 728
// 2919 5214:ldc1 #22 <Int 0>
// 2920 5216:castore
// 2921 5217:dup
// 2922 5218:sipush 729
// 2923 5221:ldc2 #457 <Int 3771>
// 2924 5224:castore
// 2925 5225:dup
// 2926 5226:sipush 730
// 2927 5229:ldc2 #458 <Int 3772>
// 2928 5232:castore
// 2929 5233:dup
// 2930 5234:sipush 731
// 2931 5237:ldc1 #28 <Int 13>
// 2932 5239:castore
// 2933 5240:dup
// 2934 5241:sipush 732
// 2935 5244:ldc2 #459 <Int 3773>
// 2936 5247:castore
// 2937 5248:dup
// 2938 5249:sipush 733
// 2939 5252:ldc2 #460 <Int 3783>
// 2940 5255:castore
// 2941 5256:dup
// 2942 5257:sipush 734
// 2943 5260:ldc1 #22 <Int 0>
// 2944 5262:castore
// 2945 5263:dup
// 2946 5264:sipush 735
// 2947 5267:ldc2 #461 <Int 3784>
// 2948 5270:castore
// 2949 5271:dup
// 2950 5272:sipush 736
// 2951 5275:ldc2 #462 <Int 3789>
// 2952 5278:castore
// 2953 5279:dup
// 2954 5280:sipush 737
// 2955 5283:ldc1 #28 <Int 13>
// 2956 5285:castore
// 2957 5286:dup
// 2958 5287:sipush 738
// 2959 5290:ldc2 #463 <Int 3790>
// 2960 5293:castore
// 2961 5294:dup
// 2962 5295:sipush 739
// 2963 5298:ldc2 #464 <Int 3863>
// 2964 5301:castore
// 2965 5302:dup
// 2966 5303:sipush 740
// 2967 5306:ldc1 #22 <Int 0>
// 2968 5308:castore
// 2969 5309:dup
// 2970 5310:sipush 741
// 2971 5313:ldc2 #465 <Int 3864>
// 2972 5316:castore
// 2973 5317:dup
// 2974 5318:sipush 742
// 2975 5321:ldc2 #466 <Int 3865>
// 2976 5324:castore
// 2977 5325:dup
// 2978 5326:sipush 743
// 2979 5329:ldc1 #28 <Int 13>
// 2980 5331:castore
// 2981 5332:dup
// 2982 5333:sipush 744
// 2983 5336:ldc2 #467 <Int 3866>
// 2984 5339:castore
// 2985 5340:dup
// 2986 5341:sipush 745
// 2987 5344:ldc2 #468 <Int 3892>
// 2988 5347:castore
// 2989 5348:dup
// 2990 5349:sipush 746
// 2991 5352:ldc1 #22 <Int 0>
// 2992 5354:castore
// 2993 5355:dup
// 2994 5356:sipush 747
// 2995 5359:ldc2 #469 <Int 3893>
// 2996 5362:castore
// 2997 5363:dup
// 2998 5364:sipush 748
// 2999 5367:ldc2 #469 <Int 3893>
// 3000 5370:castore
// 3001 5371:dup
// 3002 5372:sipush 749
// 3003 5375:ldc1 #28 <Int 13>
// 3004 5377:castore
// 3005 5378:dup
// 3006 5379:sipush 750
// 3007 5382:ldc2 #470 <Int 3894>
// 3008 5385:castore
// 3009 5386:dup
// 3010 5387:sipush 751
// 3011 5390:ldc2 #470 <Int 3894>
// 3012 5393:castore
// 3013 5394:dup
// 3014 5395:sipush 752
// 3015 5398:ldc1 #22 <Int 0>
// 3016 5400:castore
// 3017 5401:dup
// 3018 5402:sipush 753
// 3019 5405:ldc2 #471 <Int 3895>
// 3020 5408:castore
// 3021 5409:dup
// 3022 5410:sipush 754
// 3023 5413:ldc2 #471 <Int 3895>
// 3024 5416:castore
// 3025 5417:dup
// 3026 5418:sipush 755
// 3027 5421:ldc1 #28 <Int 13>
// 3028 5423:castore
// 3029 5424:dup
// 3030 5425:sipush 756
// 3031 5428:ldc2 #472 <Int 3896>
// 3032 5431:castore
// 3033 5432:dup
// 3034 5433:sipush 757
// 3035 5436:ldc2 #472 <Int 3896>
// 3036 5439:castore
// 3037 5440:dup
// 3038 5441:sipush 758
// 3039 5444:ldc1 #22 <Int 0>
// 3040 5446:castore
// 3041 5447:dup
// 3042 5448:sipush 759
// 3043 5451:ldc2 #473 <Int 3897>
// 3044 5454:castore
// 3045 5455:dup
// 3046 5456:sipush 760
// 3047 5459:ldc2 #473 <Int 3897>
// 3048 5462:castore
// 3049 5463:dup
// 3050 5464:sipush 761
// 3051 5467:ldc1 #28 <Int 13>
// 3052 5469:castore
// 3053 5470:dup
// 3054 5471:sipush 762
// 3055 5474:ldc2 #474 <Int 3898>
// 3056 5477:castore
// 3057 5478:dup
// 3058 5479:sipush 763
// 3059 5482:ldc2 #475 <Int 3901>
// 3060 5485:castore
// 3061 5486:dup
// 3062 5487:sipush 764
// 3063 5490:ldc1 #30 <Int 18>
// 3064 5492:castore
// 3065 5493:dup
// 3066 5494:sipush 765
// 3067 5497:ldc2 #476 <Int 3902>
// 3068 5500:castore
// 3069 5501:dup
// 3070 5502:sipush 766
// 3071 5505:ldc2 #477 <Int 3952>
// 3072 5508:castore
// 3073 5509:dup
// 3074 5510:sipush 767
// 3075 5513:ldc1 #22 <Int 0>
// 3076 5515:castore
// 3077 5516:dup
// 3078 5517:sipush 768
// 3079 5520:ldc2 #478 <Int 3953>
// 3080 5523:castore
// 3081 5524:dup
// 3082 5525:sipush 769
// 3083 5528:ldc2 #479 <Int 3966>
// 3084 5531:castore
// 3085 5532:dup
// 3086 5533:sipush 770
// 3087 5536:ldc1 #28 <Int 13>
// 3088 5538:castore
// 3089 5539:dup
// 3090 5540:sipush 771
// 3091 5543:ldc2 #480 <Int 3967>
// 3092 5546:castore
// 3093 5547:dup
// 3094 5548:sipush 772
// 3095 5551:ldc2 #480 <Int 3967>
// 3096 5554:castore
// 3097 5555:dup
// 3098 5556:sipush 773
// 3099 5559:ldc1 #22 <Int 0>
// 3100 5561:castore
// 3101 5562:dup
// 3102 5563:sipush 774
// 3103 5566:ldc2 #481 <Int 3968>
// 3104 5569:castore
// 3105 5570:dup
// 3106 5571:sipush 775
// 3107 5574:ldc2 #482 <Int 3972>
// 3108 5577:castore
// 3109 5578:dup
// 3110 5579:sipush 776
// 3111 5582:ldc1 #28 <Int 13>
// 3112 5584:castore
// 3113 5585:dup
// 3114 5586:sipush 777
// 3115 5589:ldc2 #483 <Int 3973>
// 3116 5592:castore
// 3117 5593:dup
// 3118 5594:sipush 778
// 3119 5597:ldc2 #483 <Int 3973>
// 3120 5600:castore
// 3121 5601:dup
// 3122 5602:sipush 779
// 3123 5605:ldc1 #22 <Int 0>
// 3124 5607:castore
// 3125 5608:dup
// 3126 5609:sipush 780
// 3127 5612:ldc2 #484 <Int 3974>
// 3128 5615:castore
// 3129 5616:dup
// 3130 5617:sipush 781
// 3131 5620:ldc2 #485 <Int 3975>
// 3132 5623:castore
// 3133 5624:dup
// 3134 5625:sipush 782
// 3135 5628:ldc1 #28 <Int 13>
// 3136 5630:castore
// 3137 5631:dup
// 3138 5632:sipush 783
// 3139 5635:ldc2 #486 <Int 3976>
// 3140 5638:castore
// 3141 5639:dup
// 3142 5640:sipush 784
// 3143 5643:ldc2 #487 <Int 3983>
// 3144 5646:castore
// 3145 5647:dup
// 3146 5648:sipush 785
// 3147 5651:ldc1 #22 <Int 0>
// 3148 5653:castore
// 3149 5654:dup
// 3150 5655:sipush 786
// 3151 5658:ldc2 #488 <Int 3984>
// 3152 5661:castore
// 3153 5662:dup
// 3154 5663:sipush 787
// 3155 5666:ldc2 #489 <Int 3991>
// 3156 5669:castore
// 3157 5670:dup
// 3158 5671:sipush 788
// 3159 5674:ldc1 #28 <Int 13>
// 3160 5676:castore
// 3161 5677:dup
// 3162 5678:sipush 789
// 3163 5681:ldc2 #490 <Int 3992>
// 3164 5684:castore
// 3165 5685:dup
// 3166 5686:sipush 790
// 3167 5689:ldc2 #490 <Int 3992>
// 3168 5692:castore
// 3169 5693:dup
// 3170 5694:sipush 791
// 3171 5697:ldc1 #22 <Int 0>
// 3172 5699:castore
// 3173 5700:dup
// 3174 5701:sipush 792
// 3175 5704:ldc2 #491 <Int 3993>
// 3176 5707:castore
// 3177 5708:dup
// 3178 5709:sipush 793
// 3179 5712:ldc2 #492 <Int 4028>
// 3180 5715:castore
// 3181 5716:dup
// 3182 5717:sipush 794
// 3183 5720:ldc1 #28 <Int 13>
// 3184 5722:castore
// 3185 5723:dup
// 3186 5724:sipush 795
// 3187 5727:ldc2 #493 <Int 4029>
// 3188 5730:castore
// 3189 5731:dup
// 3190 5732:sipush 796
// 3191 5735:ldc2 #494 <Int 4037>
// 3192 5738:castore
// 3193 5739:dup
// 3194 5740:sipush 797
// 3195 5743:ldc1 #22 <Int 0>
// 3196 5745:castore
// 3197 5746:dup
// 3198 5747:sipush 798
// 3199 5750:ldc2 #495 <Int 4038>
// 3200 5753:castore
// 3201 5754:dup
// 3202 5755:sipush 799
// 3203 5758:ldc2 #495 <Int 4038>
// 3204 5761:castore
// 3205 5762:dup
// 3206 5763:sipush 800
// 3207 5766:ldc1 #28 <Int 13>
// 3208 5768:castore
// 3209 5769:dup
// 3210 5770:sipush 801
// 3211 5773:ldc2 #496 <Int 4039>
// 3212 5776:castore
// 3213 5777:dup
// 3214 5778:sipush 802
// 3215 5781:ldc2 #497 <Int 4140>
// 3216 5784:castore
// 3217 5785:dup
// 3218 5786:sipush 803
// 3219 5789:ldc1 #22 <Int 0>
// 3220 5791:castore
// 3221 5792:dup
// 3222 5793:sipush 804
// 3223 5796:ldc2 #498 <Int 4141>
// 3224 5799:castore
// 3225 5800:dup
// 3226 5801:sipush 805
// 3227 5804:ldc2 #499 <Int 4144>
// 3228 5807:castore
// 3229 5808:dup
// 3230 5809:sipush 806
// 3231 5812:ldc1 #28 <Int 13>
// 3232 5814:castore
// 3233 5815:dup
// 3234 5816:sipush 807
// 3235 5819:ldc2 #500 <Int 4145>
// 3236 5822:castore
// 3237 5823:dup
// 3238 5824:sipush 808
// 3239 5827:ldc2 #500 <Int 4145>
// 3240 5830:castore
// 3241 5831:dup
// 3242 5832:sipush 809
// 3243 5835:ldc1 #22 <Int 0>
// 3244 5837:castore
// 3245 5838:dup
// 3246 5839:sipush 810
// 3247 5842:ldc2 #501 <Int 4146>
// 3248 5845:castore
// 3249 5846:dup
// 3250 5847:sipush 811
// 3251 5850:ldc2 #501 <Int 4146>
// 3252 5853:castore
// 3253 5854:dup
// 3254 5855:sipush 812
// 3255 5858:ldc1 #28 <Int 13>
// 3256 5860:castore
// 3257 5861:dup
// 3258 5862:sipush 813
// 3259 5865:ldc2 #502 <Int 4147>
// 3260 5868:castore
// 3261 5869:dup
// 3262 5870:sipush 814
// 3263 5873:ldc2 #503 <Int 4149>
// 3264 5876:castore
// 3265 5877:dup
// 3266 5878:sipush 815
// 3267 5881:ldc1 #22 <Int 0>
// 3268 5883:castore
// 3269 5884:dup
// 3270 5885:sipush 816
// 3271 5888:ldc2 #504 <Int 4150>
// 3272 5891:castore
// 3273 5892:dup
// 3274 5893:sipush 817
// 3275 5896:ldc2 #505 <Int 4151>
// 3276 5899:castore
// 3277 5900:dup
// 3278 5901:sipush 818
// 3279 5904:ldc1 #28 <Int 13>
// 3280 5906:castore
// 3281 5907:dup
// 3282 5908:sipush 819
// 3283 5911:ldc2 #506 <Int 4152>
// 3284 5914:castore
// 3285 5915:dup
// 3286 5916:sipush 820
// 3287 5919:ldc2 #506 <Int 4152>
// 3288 5922:castore
// 3289 5923:dup
// 3290 5924:sipush 821
// 3291 5927:ldc1 #22 <Int 0>
// 3292 5929:castore
// 3293 5930:dup
// 3294 5931:sipush 822
// 3295 5934:ldc2 #507 <Int 4153>
// 3296 5937:castore
// 3297 5938:dup
// 3298 5939:sipush 823
// 3299 5942:ldc2 #507 <Int 4153>
// 3300 5945:castore
// 3301 5946:dup
// 3302 5947:sipush 824
// 3303 5950:ldc1 #28 <Int 13>
// 3304 5952:castore
// 3305 5953:dup
// 3306 5954:sipush 825
// 3307 5957:ldc2 #508 <Int 4154>
// 3308 5960:castore
// 3309 5961:dup
// 3310 5962:sipush 826
// 3311 5965:ldc2 #509 <Int 4183>
// 3312 5968:castore
// 3313 5969:dup
// 3314 5970:sipush 827
// 3315 5973:ldc1 #22 <Int 0>
// 3316 5975:castore
// 3317 5976:dup
// 3318 5977:sipush 828
// 3319 5980:ldc2 #510 <Int 4184>
// 3320 5983:castore
// 3321 5984:dup
// 3322 5985:sipush 829
// 3323 5988:ldc2 #511 <Int 4185>
// 3324 5991:castore
// 3325 5992:dup
// 3326 5993:sipush 830
// 3327 5996:ldc1 #28 <Int 13>
// 3328 5998:castore
// 3329 5999:dup
// 3330 6000:sipush 831
// 3331 6003:ldc2 #512 <Int 4186>
// 3332 6006:castore
// 3333 6007:dup
// 3334 6008:sipush 832
// 3335 6011:ldc2 #513 <Int 5759>
// 3336 6014:castore
// 3337 6015:dup
// 3338 6016:sipush 833
// 3339 6019:ldc1 #22 <Int 0>
// 3340 6021:castore
// 3341 6022:dup
// 3342 6023:sipush 834
// 3343 6026:ldc2 #514 <Int 5760>
// 3344 6029:castore
// 3345 6030:dup
// 3346 6031:sipush 835
// 3347 6034:ldc2 #514 <Int 5760>
// 3348 6037:castore
// 3349 6038:dup
// 3350 6039:sipush 836
// 3351 6042:ldc1 #44 <Int 17>
// 3352 6044:castore
// 3353 6045:dup
// 3354 6046:sipush 837
// 3355 6049:ldc2 #515 <Int 5761>
// 3356 6052:castore
// 3357 6053:dup
// 3358 6054:sipush 838
// 3359 6057:ldc2 #516 <Int 5786>
// 3360 6060:castore
// 3361 6061:dup
// 3362 6062:sipush 839
// 3363 6065:ldc1 #22 <Int 0>
// 3364 6067:castore
// 3365 6068:dup
// 3366 6069:sipush 840
// 3367 6072:ldc2 #517 <Int 5787>
// 3368 6075:castore
// 3369 6076:dup
// 3370 6077:sipush 841
// 3371 6080:ldc2 #518 <Int 5788>
// 3372 6083:castore
// 3373 6084:dup
// 3374 6085:sipush 842
// 3375 6088:ldc1 #30 <Int 18>
// 3376 6090:castore
// 3377 6091:dup
// 3378 6092:sipush 843
// 3379 6095:ldc2 #519 <Int 5789>
// 3380 6098:castore
// 3381 6099:dup
// 3382 6100:sipush 844
// 3383 6103:ldc2 #520 <Int 5905>
// 3384 6106:castore
// 3385 6107:dup
// 3386 6108:sipush 845
// 3387 6111:ldc1 #22 <Int 0>
// 3388 6113:castore
// 3389 6114:dup
// 3390 6115:sipush 846
// 3391 6118:ldc2 #521 <Int 5906>
// 3392 6121:castore
// 3393 6122:dup
// 3394 6123:sipush 847
// 3395 6126:ldc2 #522 <Int 5908>
// 3396 6129:castore
// 3397 6130:dup
// 3398 6131:sipush 848
// 3399 6134:ldc1 #28 <Int 13>
// 3400 6136:castore
// 3401 6137:dup
// 3402 6138:sipush 849
// 3403 6141:ldc2 #523 <Int 5909>
// 3404 6144:castore
// 3405 6145:dup
// 3406 6146:sipush 850
// 3407 6149:ldc2 #524 <Int 5937>
// 3408 6152:castore
// 3409 6153:dup
// 3410 6154:sipush 851
// 3411 6157:ldc1 #22 <Int 0>
// 3412 6159:castore
// 3413 6160:dup
// 3414 6161:sipush 852
// 3415 6164:ldc2 #525 <Int 5938>
// 3416 6167:castore
// 3417 6168:dup
// 3418 6169:sipush 853
// 3419 6172:ldc2 #526 <Int 5940>
// 3420 6175:castore
// 3421 6176:dup
// 3422 6177:sipush 854
// 3423 6180:ldc1 #28 <Int 13>
// 3424 6182:castore
// 3425 6183:dup
// 3426 6184:sipush 855
// 3427 6187:ldc2 #527 <Int 5941>
// 3428 6190:castore
// 3429 6191:dup
// 3430 6192:sipush 856
// 3431 6195:ldc2 #528 <Int 5969>
// 3432 6198:castore
// 3433 6199:dup
// 3434 6200:sipush 857
// 3435 6203:ldc1 #22 <Int 0>
// 3436 6205:castore
// 3437 6206:dup
// 3438 6207:sipush 858
// 3439 6210:ldc2 #529 <Int 5970>
// 3440 6213:castore
// 3441 6214:dup
// 3442 6215:sipush 859
// 3443 6218:ldc2 #530 <Int 5971>
// 3444 6221:castore
// 3445 6222:dup
// 3446 6223:sipush 860
// 3447 6226:ldc1 #28 <Int 13>
// 3448 6228:castore
// 3449 6229:dup
// 3450 6230:sipush 861
// 3451 6233:ldc2 #531 <Int 5972>
// 3452 6236:castore
// 3453 6237:dup
// 3454 6238:sipush 862
// 3455 6241:ldc2 #532 <Int 6001>
// 3456 6244:castore
// 3457 6245:dup
// 3458 6246:sipush 863
// 3459 6249:ldc1 #22 <Int 0>
// 3460 6251:castore
// 3461 6252:dup
// 3462 6253:sipush 864
// 3463 6256:ldc2 #533 <Int 6002>
// 3464 6259:castore
// 3465 6260:dup
// 3466 6261:sipush 865
// 3467 6264:ldc2 #534 <Int 6003>
// 3468 6267:castore
// 3469 6268:dup
// 3470 6269:sipush 866
// 3471 6272:ldc1 #28 <Int 13>
// 3472 6274:castore
// 3473 6275:dup
// 3474 6276:sipush 867
// 3475 6279:ldc2 #535 <Int 6004>
// 3476 6282:castore
// 3477 6283:dup
// 3478 6284:sipush 868
// 3479 6287:ldc2 #536 <Int 6070>
// 3480 6290:castore
// 3481 6291:dup
// 3482 6292:sipush 869
// 3483 6295:ldc1 #22 <Int 0>
// 3484 6297:castore
// 3485 6298:dup
// 3486 6299:sipush 870
// 3487 6302:ldc2 #537 <Int 6071>
// 3488 6305:castore
// 3489 6306:dup
// 3490 6307:sipush 871
// 3491 6310:ldc2 #538 <Int 6077>
// 3492 6313:castore
// 3493 6314:dup
// 3494 6315:sipush 872
// 3495 6318:ldc1 #28 <Int 13>
// 3496 6320:castore
// 3497 6321:dup
// 3498 6322:sipush 873
// 3499 6325:ldc2 #539 <Int 6078>
// 3500 6328:castore
// 3501 6329:dup
// 3502 6330:sipush 874
// 3503 6333:ldc2 #540 <Int 6085>
// 3504 6336:castore
// 3505 6337:dup
// 3506 6338:sipush 875
// 3507 6341:ldc1 #22 <Int 0>
// 3508 6343:castore
// 3509 6344:dup
// 3510 6345:sipush 876
// 3511 6348:ldc2 #541 <Int 6086>
// 3512 6351:castore
// 3513 6352:dup
// 3514 6353:sipush 877
// 3515 6356:ldc2 #541 <Int 6086>
// 3516 6359:castore
// 3517 6360:dup
// 3518 6361:sipush 878
// 3519 6364:ldc1 #28 <Int 13>
// 3520 6366:castore
// 3521 6367:dup
// 3522 6368:sipush 879
// 3523 6371:ldc2 #542 <Int 6087>
// 3524 6374:castore
// 3525 6375:dup
// 3526 6376:sipush 880
// 3527 6379:ldc2 #543 <Int 6088>
// 3528 6382:castore
// 3529 6383:dup
// 3530 6384:sipush 881
// 3531 6387:ldc1 #22 <Int 0>
// 3532 6389:castore
// 3533 6390:dup
// 3534 6391:sipush 882
// 3535 6394:ldc2 #544 <Int 6089>
// 3536 6397:castore
// 3537 6398:dup
// 3538 6399:sipush 883
// 3539 6402:ldc2 #545 <Int 6099>
// 3540 6405:castore
// 3541 6406:dup
// 3542 6407:sipush 884
// 3543 6410:ldc1 #28 <Int 13>
// 3544 6412:castore
// 3545 6413:dup
// 3546 6414:sipush 885
// 3547 6417:ldc2 #546 <Int 6100>
// 3548 6420:castore
// 3549 6421:dup
// 3550 6422:sipush 886
// 3551 6425:ldc2 #547 <Int 6106>
// 3552 6428:castore
// 3553 6429:dup
// 3554 6430:sipush 887
// 3555 6433:ldc1 #22 <Int 0>
// 3556 6435:castore
// 3557 6436:dup
// 3558 6437:sipush 888
// 3559 6440:ldc2 #548 <Int 6107>
// 3560 6443:castore
// 3561 6444:dup
// 3562 6445:sipush 889
// 3563 6448:ldc2 #548 <Int 6107>
// 3564 6451:castore
// 3565 6452:dup
// 3566 6453:sipush 890
// 3567 6456:ldc1 #20 <Int 10>
// 3568 6458:castore
// 3569 6459:dup
// 3570 6460:sipush 891
// 3571 6463:ldc2 #549 <Int 6108>
// 3572 6466:castore
// 3573 6467:dup
// 3574 6468:sipush 892
// 3575 6471:ldc2 #549 <Int 6108>
// 3576 6474:castore
// 3577 6475:dup
// 3578 6476:sipush 893
// 3579 6479:ldc1 #22 <Int 0>
// 3580 6481:castore
// 3581 6482:dup
// 3582 6483:sipush 894
// 3583 6486:ldc2 #550 <Int 6109>
// 3584 6489:castore
// 3585 6490:dup
// 3586 6491:sipush 895
// 3587 6494:ldc2 #550 <Int 6109>
// 3588 6497:castore
// 3589 6498:dup
// 3590 6499:sipush 896
// 3591 6502:ldc1 #28 <Int 13>
// 3592 6504:castore
// 3593 6505:dup
// 3594 6506:sipush 897
// 3595 6509:ldc2 #551 <Int 6110>
// 3596 6512:castore
// 3597 6513:dup
// 3598 6514:sipush 898
// 3599 6517:ldc2 #552 <Int 6127>
// 3600 6520:castore
// 3601 6521:dup
// 3602 6522:sipush 899
// 3603 6525:ldc1 #22 <Int 0>
// 3604 6527:castore
// 3605 6528:dup
// 3606 6529:sipush 900
// 3607 6532:ldc2 #553 <Int 6128>
// 3608 6535:castore
// 3609 6536:dup
// 3610 6537:sipush 901
// 3611 6540:ldc2 #554 <Int 6137>
// 3612 6543:castore
// 3613 6544:dup
// 3614 6545:sipush 902
// 3615 6548:ldc1 #30 <Int 18>
// 3616 6550:castore
// 3617 6551:dup
// 3618 6552:sipush 903
// 3619 6555:ldc2 #555 <Int 6138>
// 3620 6558:castore
// 3621 6559:dup
// 3622 6560:sipush 904
// 3623 6563:ldc2 #556 <Int 6143>
// 3624 6566:castore
// 3625 6567:dup
// 3626 6568:sipush 905
// 3627 6571:ldc1 #22 <Int 0>
// 3628 6573:castore
// 3629 6574:dup
// 3630 6575:sipush 906
// 3631 6578:ldc2 #557 <Int 6144>
// 3632 6581:castore
// 3633 6582:dup
// 3634 6583:sipush 907
// 3635 6586:ldc2 #558 <Int 6154>
// 3636 6589:castore
// 3637 6590:dup
// 3638 6591:sipush 908
// 3639 6594:ldc1 #30 <Int 18>
// 3640 6596:castore
// 3641 6597:dup
// 3642 6598:sipush 909
// 3643 6601:ldc2 #559 <Int 6155>
// 3644 6604:castore
// 3645 6605:dup
// 3646 6606:sipush 910
// 3647 6609:ldc2 #560 <Int 6157>
// 3648 6612:castore
// 3649 6613:dup
// 3650 6614:sipush 911
// 3651 6617:ldc1 #28 <Int 13>
// 3652 6619:castore
// 3653 6620:dup
// 3654 6621:sipush 912
// 3655 6624:ldc2 #561 <Int 6158>
// 3656 6627:castore
// 3657 6628:dup
// 3658 6629:sipush 913
// 3659 6632:ldc2 #561 <Int 6158>
// 3660 6635:castore
// 3661 6636:dup
// 3662 6637:sipush 914
// 3663 6640:ldc1 #44 <Int 17>
// 3664 6642:castore
// 3665 6643:dup
// 3666 6644:sipush 915
// 3667 6647:ldc2 #562 <Int 6159>
// 3668 6650:castore
// 3669 6651:dup
// 3670 6652:sipush 916
// 3671 6655:ldc2 #563 <Int 6312>
// 3672 6658:castore
// 3673 6659:dup
// 3674 6660:sipush 917
// 3675 6663:ldc1 #22 <Int 0>
// 3676 6665:castore
// 3677 6666:dup
// 3678 6667:sipush 918
// 3679 6670:ldc2 #564 <Int 6313>
// 3680 6673:castore
// 3681 6674:dup
// 3682 6675:sipush 919
// 3683 6678:ldc2 #564 <Int 6313>
// 3684 6681:castore
// 3685 6682:dup
// 3686 6683:sipush 920
// 3687 6686:ldc1 #28 <Int 13>
// 3688 6688:castore
// 3689 6689:dup
// 3690 6690:sipush 921
// 3691 6693:ldc2 #565 <Int 6314>
// 3692 6696:castore
// 3693 6697:dup
// 3694 6698:sipush 922
// 3695 6701:ldc2 #566 <Int 6431>
// 3696 6704:castore
// 3697 6705:dup
// 3698 6706:sipush 923
// 3699 6709:ldc1 #22 <Int 0>
// 3700 6711:castore
// 3701 6712:dup
// 3702 6713:sipush 924
// 3703 6716:ldc2 #567 <Int 6432>
// 3704 6719:castore
// 3705 6720:dup
// 3706 6721:sipush 925
// 3707 6724:ldc2 #568 <Int 6434>
// 3708 6727:castore
// 3709 6728:dup
// 3710 6729:sipush 926
// 3711 6732:ldc1 #28 <Int 13>
// 3712 6734:castore
// 3713 6735:dup
// 3714 6736:sipush 927
// 3715 6739:ldc2 #569 <Int 6435>
// 3716 6742:castore
// 3717 6743:dup
// 3718 6744:sipush 928
// 3719 6747:ldc2 #570 <Int 6438>
// 3720 6750:castore
// 3721 6751:dup
// 3722 6752:sipush 929
// 3723 6755:ldc1 #22 <Int 0>
// 3724 6757:castore
// 3725 6758:dup
// 3726 6759:sipush 930
// 3727 6762:ldc2 #571 <Int 6439>
// 3728 6765:castore
// 3729 6766:dup
// 3730 6767:sipush 931
// 3731 6770:ldc2 #572 <Int 6443>
// 3732 6773:castore
// 3733 6774:dup
// 3734 6775:sipush 932
// 3735 6778:ldc1 #28 <Int 13>
// 3736 6780:castore
// 3737 6781:dup
// 3738 6782:sipush 933
// 3739 6785:ldc2 #573 <Int 6444>
// 3740 6788:castore
// 3741 6789:dup
// 3742 6790:sipush 934
// 3743 6793:ldc2 #574 <Int 6449>
// 3744 6796:castore
// 3745 6797:dup
// 3746 6798:sipush 935
// 3747 6801:ldc1 #22 <Int 0>
// 3748 6803:castore
// 3749 6804:dup
// 3750 6805:sipush 936
// 3751 6808:ldc2 #575 <Int 6450>
// 3752 6811:castore
// 3753 6812:dup
// 3754 6813:sipush 937
// 3755 6816:ldc2 #575 <Int 6450>
// 3756 6819:castore
// 3757 6820:dup
// 3758 6821:sipush 938
// 3759 6824:ldc1 #28 <Int 13>
// 3760 6826:castore
// 3761 6827:dup
// 3762 6828:sipush 939
// 3763 6831:ldc2 #576 <Int 6451>
// 3764 6834:castore
// 3765 6835:dup
// 3766 6836:sipush 940
// 3767 6839:ldc2 #577 <Int 6456>
// 3768 6842:castore
// 3769 6843:dup
// 3770 6844:sipush 941
// 3771 6847:ldc1 #22 <Int 0>
// 3772 6849:castore
// 3773 6850:dup
// 3774 6851:sipush 942
// 3775 6854:ldc2 #578 <Int 6457>
// 3776 6857:castore
// 3777 6858:dup
// 3778 6859:sipush 943
// 3779 6862:ldc2 #579 <Int 6459>
// 3780 6865:castore
// 3781 6866:dup
// 3782 6867:sipush 944
// 3783 6870:ldc1 #28 <Int 13>
// 3784 6872:castore
// 3785 6873:dup
// 3786 6874:sipush 945
// 3787 6877:ldc2 #580 <Int 6460>
// 3788 6880:castore
// 3789 6881:dup
// 3790 6882:sipush 946
// 3791 6885:ldc2 #581 <Int 6463>
// 3792 6888:castore
// 3793 6889:dup
// 3794 6890:sipush 947
// 3795 6893:ldc1 #22 <Int 0>
// 3796 6895:castore
// 3797 6896:dup
// 3798 6897:sipush 948
// 3799 6900:ldc2 #582 <Int 6464>
// 3800 6903:castore
// 3801 6904:dup
// 3802 6905:sipush 949
// 3803 6908:ldc2 #582 <Int 6464>
// 3804 6911:castore
// 3805 6912:dup
// 3806 6913:sipush 950
// 3807 6916:ldc1 #30 <Int 18>
// 3808 6918:castore
// 3809 6919:dup
// 3810 6920:sipush 951
// 3811 6923:ldc2 #583 <Int 6465>
// 3812 6926:castore
// 3813 6927:dup
// 3814 6928:sipush 952
// 3815 6931:ldc2 #584 <Int 6467>
// 3816 6934:castore
// 3817 6935:dup
// 3818 6936:sipush 953
// 3819 6939:ldc1 #22 <Int 0>
// 3820 6941:castore
// 3821 6942:dup
// 3822 6943:sipush 954
// 3823 6946:ldc2 #585 <Int 6468>
// 3824 6949:castore
// 3825 6950:dup
// 3826 6951:sipush 955
// 3827 6954:ldc2 #586 <Int 6469>
// 3828 6957:castore
// 3829 6958:dup
// 3830 6959:sipush 956
// 3831 6962:ldc1 #30 <Int 18>
// 3832 6964:castore
// 3833 6965:dup
// 3834 6966:sipush 957
// 3835 6969:ldc2 #587 <Int 6470>
// 3836 6972:castore
// 3837 6973:dup
// 3838 6974:sipush 958
// 3839 6977:ldc2 #588 <Int 6623>
// 3840 6980:castore
// 3841 6981:dup
// 3842 6982:sipush 959
// 3843 6985:ldc1 #22 <Int 0>
// 3844 6987:castore
// 3845 6988:dup
// 3846 6989:sipush 960
// 3847 6992:ldc2 #589 <Int 6624>
// 3848 6995:castore
// 3849 6996:dup
// 3850 6997:sipush 961
// 3851 7000:ldc2 #590 <Int 6655>
// 3852 7003:castore
// 3853 7004:dup
// 3854 7005:sipush 962
// 3855 7008:ldc1 #30 <Int 18>
// 3856 7010:castore
// 3857 7011:dup
// 3858 7012:sipush 963
// 3859 7015:ldc2 #591 <Int 6656>
// 3860 7018:castore
// 3861 7019:dup
// 3862 7020:sipush 964
// 3863 7023:ldc2 #592 <Int 8124>
// 3864 7026:castore
// 3865 7027:dup
// 3866 7028:sipush 965
// 3867 7031:ldc1 #22 <Int 0>
// 3868 7033:castore
// 3869 7034:dup
// 3870 7035:sipush 966
// 3871 7038:ldc2 #593 <Int 8125>
// 3872 7041:castore
// 3873 7042:dup
// 3874 7043:sipush 967
// 3875 7046:ldc2 #593 <Int 8125>
// 3876 7049:castore
// 3877 7050:dup
// 3878 7051:sipush 968
// 3879 7054:ldc1 #30 <Int 18>
// 3880 7056:castore
// 3881 7057:dup
// 3882 7058:sipush 969
// 3883 7061:ldc2 #594 <Int 8126>
// 3884 7064:castore
// 3885 7065:dup
// 3886 7066:sipush 970
// 3887 7069:ldc2 #594 <Int 8126>
// 3888 7072:castore
// 3889 7073:dup
// 3890 7074:sipush 971
// 3891 7077:ldc1 #22 <Int 0>
// 3892 7079:castore
// 3893 7080:dup
// 3894 7081:sipush 972
// 3895 7084:ldc2 #595 <Int 8127>
// 3896 7087:castore
// 3897 7088:dup
// 3898 7089:sipush 973
// 3899 7092:ldc2 #596 <Int 8129>
// 3900 7095:castore
// 3901 7096:dup
// 3902 7097:sipush 974
// 3903 7100:ldc1 #30 <Int 18>
// 3904 7102:castore
// 3905 7103:dup
// 3906 7104:sipush 975
// 3907 7107:ldc2 #597 <Int 8130>
// 3908 7110:castore
// 3909 7111:dup
// 3910 7112:sipush 976
// 3911 7115:ldc2 #598 <Int 8140>
// 3912 7118:castore
// 3913 7119:dup
// 3914 7120:sipush 977
// 3915 7123:ldc1 #22 <Int 0>
// 3916 7125:castore
// 3917 7126:dup
// 3918 7127:sipush 978
// 3919 7130:ldc2 #599 <Int 8141>
// 3920 7133:castore
// 3921 7134:dup
// 3922 7135:sipush 979
// 3923 7138:ldc2 #600 <Int 8143>
// 3924 7141:castore
// 3925 7142:dup
// 3926 7143:sipush 980
// 3927 7146:ldc1 #30 <Int 18>
// 3928 7148:castore
// 3929 7149:dup
// 3930 7150:sipush 981
// 3931 7153:ldc2 #601 <Int 8144>
// 3932 7156:castore
// 3933 7157:dup
// 3934 7158:sipush 982
// 3935 7161:ldc2 #602 <Int 8156>
// 3936 7164:castore
// 3937 7165:dup
// 3938 7166:sipush 983
// 3939 7169:ldc1 #22 <Int 0>
// 3940 7171:castore
// 3941 7172:dup
// 3942 7173:sipush 984
// 3943 7176:ldc2 #603 <Int 8157>
// 3944 7179:castore
// 3945 7180:dup
// 3946 7181:sipush 985
// 3947 7184:ldc2 #604 <Int 8159>
// 3948 7187:castore
// 3949 7188:dup
// 3950 7189:sipush 986
// 3951 7192:ldc1 #30 <Int 18>
// 3952 7194:castore
// 3953 7195:dup
// 3954 7196:sipush 987
// 3955 7199:ldc2 #605 <Int 8160>
// 3956 7202:castore
// 3957 7203:dup
// 3958 7204:sipush 988
// 3959 7207:ldc2 #606 <Int 8172>
// 3960 7210:castore
// 3961 7211:dup
// 3962 7212:sipush 989
// 3963 7215:ldc1 #22 <Int 0>
// 3964 7217:castore
// 3965 7218:dup
// 3966 7219:sipush 990
// 3967 7222:ldc2 #607 <Int 8173>
// 3968 7225:castore
// 3969 7226:dup
// 3970 7227:sipush 991
// 3971 7230:ldc2 #608 <Int 8175>
// 3972 7233:castore
// 3973 7234:dup
// 3974 7235:sipush 992
// 3975 7238:ldc1 #30 <Int 18>
// 3976 7240:castore
// 3977 7241:dup
// 3978 7242:sipush 993
// 3979 7245:ldc2 #609 <Int 8176>
// 3980 7248:castore
// 3981 7249:dup
// 3982 7250:sipush 994
// 3983 7253:ldc2 #610 <Int 8188>
// 3984 7256:castore
// 3985 7257:dup
// 3986 7258:sipush 995
// 3987 7261:ldc1 #22 <Int 0>
// 3988 7263:castore
// 3989 7264:dup
// 3990 7265:sipush 996
// 3991 7268:ldc2 #611 <Int 8189>
// 3992 7271:castore
// 3993 7272:dup
// 3994 7273:sipush 997
// 3995 7276:ldc2 #612 <Int 8190>
// 3996 7279:castore
// 3997 7280:dup
// 3998 7281:sipush 998
// 3999 7284:ldc1 #30 <Int 18>
// 4000 7286:castore
// 4001 7287:dup
// 4002 7288:sipush 999
// 4003 7291:ldc2 #613 <Int 8191>
// 4004 7294:castore
// 4005 7295:dup
// 4006 7296:sipush 1000
// 4007 7299:ldc2 #613 <Int 8191>
// 4008 7302:castore
// 4009 7303:dup
// 4010 7304:sipush 1001
// 4011 7307:ldc1 #22 <Int 0>
// 4012 7309:castore
// 4013 7310:dup
// 4014 7311:sipush 1002
// 4015 7314:ldc2 #614 <Int 8192>
// 4016 7317:castore
// 4017 7318:dup
// 4018 7319:sipush 1003
// 4019 7322:ldc2 #615 <Int 8202>
// 4020 7325:castore
// 4021 7326:dup
// 4022 7327:sipush 1004
// 4023 7330:ldc1 #44 <Int 17>
// 4024 7332:castore
// 4025 7333:dup
// 4026 7334:sipush 1005
// 4027 7337:ldc2 #616 <Int 8203>
// 4028 7340:castore
// 4029 7341:dup
// 4030 7342:sipush 1006
// 4031 7345:ldc2 #617 <Int 8205>
// 4032 7348:castore
// 4033 7349:dup
// 4034 7350:sipush 1007
// 4035 7353:ldc1 #12 <Int 14>
// 4036 7355:castore
// 4037 7356:dup
// 4038 7357:sipush 1008
// 4039 7360:ldc2 #618 <Int 8206>
// 4040 7363:castore
// 4041 7364:dup
// 4042 7365:sipush 1009
// 4043 7368:ldc2 #618 <Int 8206>
// 4044 7371:castore
// 4045 7372:dup
// 4046 7373:sipush 1010
// 4047 7376:ldc1 #22 <Int 0>
// 4048 7378:castore
// 4049 7379:dup
// 4050 7380:sipush 1011
// 4051 7383:ldc2 #619 <Int 8207>
// 4052 7386:castore
// 4053 7387:dup
// 4054 7388:sipush 1012
// 4055 7391:ldc2 #619 <Int 8207>
// 4056 7394:castore
// 4057 7395:dup
// 4058 7396:sipush 1013
// 4059 7399:ldc1 #34 <Int 3>
// 4060 7401:castore
// 4061 7402:dup
// 4062 7403:sipush 1014
// 4063 7406:ldc2 #620 <Int 8208>
// 4064 7409:castore
// 4065 7410:dup
// 4066 7411:sipush 1015
// 4067 7414:ldc2 #621 <Int 8231>
// 4068 7417:castore
// 4069 7418:dup
// 4070 7419:sipush 1016
// 4071 7422:ldc1 #30 <Int 18>
// 4072 7424:castore
// 4073 7425:dup
// 4074 7426:sipush 1017
// 4075 7429:ldc2 #622 <Int 8232>
// 4076 7432:castore
// 4077 7433:dup
// 4078 7434:sipush 1018
// 4079 7437:ldc2 #622 <Int 8232>
// 4080 7440:castore
// 4081 7441:dup
// 4082 7442:sipush 1019
// 4083 7445:ldc1 #44 <Int 17>
// 4084 7447:castore
// 4085 7448:dup
// 4086 7449:sipush 1020
// 4087 7452:ldc2 #623 <Int 8233>
// 4088 7455:castore
// 4089 7456:dup
// 4090 7457:sipush 1021
// 4091 7460:ldc2 #623 <Int 8233>
// 4092 7463:castore
// 4093 7464:dup
// 4094 7465:sipush 1022
// 4095 7468:ldc1 #10 <Int 15>
// 4096 7470:castore
// 4097 7471:dup
// 4098 7472:sipush 1023
// 4099 7475:ldc2 #624 <Int 8234>
// 4100 7478:castore
// 4101 7479:dup
// 4102 7480:sipush 1024
// 4103 7483:ldc2 #624 <Int 8234>
// 4104 7486:castore
// 4105 7487:dup
// 4106 7488:sipush 1025
// 4107 7491:ldc1 #24 <Int 1>
// 4108 7493:castore
// 4109 7494:dup
// 4110 7495:sipush 1026
// 4111 7498:ldc2 #625 <Int 8235>
// 4112 7501:castore
// 4113 7502:dup
// 4114 7503:sipush 1027
// 4115 7506:ldc2 #625 <Int 8235>
// 4116 7509:castore
// 4117 7510:dup
// 4118 7511:sipush 1028
// 4119 7514:ldc1 #36 <Int 5>
// 4120 7516:castore
// 4121 7517:dup
// 4122 7518:sipush 1029
// 4123 7521:ldc2 #626 <Int 8236>
// 4124 7524:castore
// 4125 7525:dup
// 4126 7526:sipush 1030
// 4127 7529:ldc2 #626 <Int 8236>
// 4128 7532:castore
// 4129 7533:dup
// 4130 7534:sipush 1031
// 4131 7537:ldc1 #32 <Int 7>
// 4132 7539:castore
// 4133 7540:dup
// 4134 7541:sipush 1032
// 4135 7544:ldc2 #627 <Int 8237>
// 4136 7547:castore
// 4137 7548:dup
// 4138 7549:sipush 1033
// 4139 7552:ldc2 #627 <Int 8237>
// 4140 7555:castore
// 4141 7556:dup
// 4142 7557:sipush 1034
// 4143 7560:ldc1 #26 <Int 2>
// 4144 7562:castore
// 4145 7563:dup
// 4146 7564:sipush 1035
// 4147 7567:ldc2 #628 <Int 8238>
// 4148 7570:castore
// 4149 7571:dup
// 4150 7572:sipush 1036
// 4151 7575:ldc2 #628 <Int 8238>
// 4152 7578:castore
// 4153 7579:dup
// 4154 7580:sipush 1037
// 4155 7583:ldc1 #38 <Int 6>
// 4156 7585:castore
// 4157 7586:dup
// 4158 7587:sipush 1038
// 4159 7590:ldc2 #629 <Int 8239>
// 4160 7593:castore
// 4161 7594:dup
// 4162 7595:sipush 1039
// 4163 7598:ldc2 #629 <Int 8239>
// 4164 7601:castore
// 4165 7602:dup
// 4166 7603:sipush 1040
// 4167 7606:ldc1 #44 <Int 17>
// 4168 7608:castore
// 4169 7609:dup
// 4170 7610:sipush 1041
// 4171 7613:ldc2 #630 <Int 8240>
// 4172 7616:castore
// 4173 7617:dup
// 4174 7618:sipush 1042
// 4175 7621:ldc2 #631 <Int 8244>
// 4176 7624:castore
// 4177 7625:dup
// 4178 7626:sipush 1043
// 4179 7629:ldc1 #20 <Int 10>
// 4180 7631:castore
// 4181 7632:dup
// 4182 7633:sipush 1044
// 4183 7636:ldc2 #632 <Int 8245>
// 4184 7639:castore
// 4185 7640:dup
// 4186 7641:sipush 1045
// 4187 7644:ldc2 #633 <Int 8276>
// 4188 7647:castore
// 4189 7648:dup
// 4190 7649:sipush 1046
// 4191 7652:ldc1 #30 <Int 18>
// 4192 7654:castore
// 4193 7655:dup
// 4194 7656:sipush 1047
// 4195 7659:ldc2 #634 <Int 8277>
// 4196 7662:castore
// 4197 7663:dup
// 4198 7664:sipush 1048
// 4199 7667:ldc2 #635 <Int 8278>
// 4200 7670:castore
// 4201 7671:dup
// 4202 7672:sipush 1049
// 4203 7675:ldc1 #22 <Int 0>
// 4204 7677:castore
// 4205 7678:dup
// 4206 7679:sipush 1050
// 4207 7682:ldc2 #636 <Int 8279>
// 4208 7685:castore
// 4209 7686:dup
// 4210 7687:sipush 1051
// 4211 7690:ldc2 #636 <Int 8279>
// 4212 7693:castore
// 4213 7694:dup
// 4214 7695:sipush 1052
// 4215 7698:ldc1 #30 <Int 18>
// 4216 7700:castore
// 4217 7701:dup
// 4218 7702:sipush 1053
// 4219 7705:ldc2 #637 <Int 8280>
// 4220 7708:castore
// 4221 7709:dup
// 4222 7710:sipush 1054
// 4223 7713:ldc2 #638 <Int 8286>
// 4224 7716:castore
// 4225 7717:dup
// 4226 7718:sipush 1055
// 4227 7721:ldc1 #22 <Int 0>
// 4228 7723:castore
// 4229 7724:dup
// 4230 7725:sipush 1056
// 4231 7728:ldc2 #639 <Int 8287>
// 4232 7731:castore
// 4233 7732:dup
// 4234 7733:sipush 1057
// 4235 7736:ldc2 #639 <Int 8287>
// 4236 7739:castore
// 4237 7740:dup
// 4238 7741:sipush 1058
// 4239 7744:ldc1 #44 <Int 17>
// 4240 7746:castore
// 4241 7747:dup
// 4242 7748:sipush 1059
// 4243 7751:ldc2 #640 <Int 8288>
// 4244 7754:castore
// 4245 7755:dup
// 4246 7756:sipush 1060
// 4247 7759:ldc2 #641 <Int 8291>
// 4248 7762:castore
// 4249 7763:dup
// 4250 7764:sipush 1061
// 4251 7767:ldc1 #12 <Int 14>
// 4252 7769:castore
// 4253 7770:dup
// 4254 7771:sipush 1062
// 4255 7774:ldc2 #642 <Int 8292>
// 4256 7777:castore
// 4257 7778:dup
// 4258 7779:sipush 1063
// 4259 7782:ldc2 #643 <Int 8297>
// 4260 7785:castore
// 4261 7786:dup
// 4262 7787:sipush 1064
// 4263 7790:ldc1 #22 <Int 0>
// 4264 7792:castore
// 4265 7793:dup
// 4266 7794:sipush 1065
// 4267 7797:ldc2 #644 <Int 8298>
// 4268 7800:castore
// 4269 7801:dup
// 4270 7802:sipush 1066
// 4271 7805:ldc2 #645 <Int 8303>
// 4272 7808:castore
// 4273 7809:dup
// 4274 7810:sipush 1067
// 4275 7813:ldc1 #12 <Int 14>
// 4276 7815:castore
// 4277 7816:dup
// 4278 7817:sipush 1068
// 4279 7820:ldc2 #646 <Int 8304>
// 4280 7823:castore
// 4281 7824:dup
// 4282 7825:sipush 1069
// 4283 7828:ldc2 #646 <Int 8304>
// 4284 7831:castore
// 4285 7832:dup
// 4286 7833:sipush 1070
// 4287 7836:ldc1 #16 <Int 8>
// 4288 7838:castore
// 4289 7839:dup
// 4290 7840:sipush 1071
// 4291 7843:ldc2 #647 <Int 8305>
// 4292 7846:castore
// 4293 7847:dup
// 4294 7848:sipush 1072
// 4295 7851:ldc2 #648 <Int 8307>
// 4296 7854:castore
// 4297 7855:dup
// 4298 7856:sipush 1073
// 4299 7859:ldc1 #22 <Int 0>
// 4300 7861:castore
// 4301 7862:dup
// 4302 7863:sipush 1074
// 4303 7866:ldc2 #649 <Int 8308>
// 4304 7869:castore
// 4305 7870:dup
// 4306 7871:sipush 1075
// 4307 7874:ldc2 #650 <Int 8313>
// 4308 7877:castore
// 4309 7878:dup
// 4310 7879:sipush 1076
// 4311 7882:ldc1 #16 <Int 8>
// 4312 7884:castore
// 4313 7885:dup
// 4314 7886:sipush 1077
// 4315 7889:ldc2 #651 <Int 8314>
// 4316 7892:castore
// 4317 7893:dup
// 4318 7894:sipush 1078
// 4319 7897:ldc2 #652 <Int 8315>
// 4320 7900:castore
// 4321 7901:dup
// 4322 7902:sipush 1079
// 4323 7905:ldc1 #20 <Int 10>
// 4324 7907:castore
// 4325 7908:dup
// 4326 7909:sipush 1080
// 4327 7912:ldc2 #653 <Int 8316>
// 4328 7915:castore
// 4329 7916:dup
// 4330 7917:sipush 1081
// 4331 7920:ldc2 #654 <Int 8318>
// 4332 7923:castore
// 4333 7924:dup
// 4334 7925:sipush 1082
// 4335 7928:ldc1 #30 <Int 18>
// 4336 7930:castore
// 4337 7931:dup
// 4338 7932:sipush 1083
// 4339 7935:ldc2 #655 <Int 8319>
// 4340 7938:castore
// 4341 7939:dup
// 4342 7940:sipush 1084
// 4343 7943:ldc2 #655 <Int 8319>
// 4344 7946:castore
// 4345 7947:dup
// 4346 7948:sipush 1085
// 4347 7951:ldc1 #22 <Int 0>
// 4348 7953:castore
// 4349 7954:dup
// 4350 7955:sipush 1086
// 4351 7958:ldc2 #656 <Int 8320>
// 4352 7961:castore
// 4353 7962:dup
// 4354 7963:sipush 1087
// 4355 7966:ldc2 #657 <Int 8329>
// 4356 7969:castore
// 4357 7970:dup
// 4358 7971:sipush 1088
// 4359 7974:ldc1 #16 <Int 8>
// 4360 7976:castore
// 4361 7977:dup
// 4362 7978:sipush 1089
// 4363 7981:ldc2 #658 <Int 8330>
// 4364 7984:castore
// 4365 7985:dup
// 4366 7986:sipush 1090
// 4367 7989:ldc2 #659 <Int 8331>
// 4368 7992:castore
// 4369 7993:dup
// 4370 7994:sipush 1091
// 4371 7997:ldc1 #20 <Int 10>
// 4372 7999:castore
// 4373 8000:dup
// 4374 8001:sipush 1092
// 4375 8004:ldc2 #660 <Int 8332>
// 4376 8007:castore
// 4377 8008:dup
// 4378 8009:sipush 1093
// 4379 8012:ldc2 #661 <Int 8334>
// 4380 8015:castore
// 4381 8016:dup
// 4382 8017:sipush 1094
// 4383 8020:ldc1 #30 <Int 18>
// 4384 8022:castore
// 4385 8023:dup
// 4386 8024:sipush 1095
// 4387 8027:ldc2 #662 <Int 8335>
// 4388 8030:castore
// 4389 8031:dup
// 4390 8032:sipush 1096
// 4391 8035:ldc2 #663 <Int 8351>
// 4392 8038:castore
// 4393 8039:dup
// 4394 8040:sipush 1097
// 4395 8043:ldc1 #22 <Int 0>
// 4396 8045:castore
// 4397 8046:dup
// 4398 8047:sipush 1098
// 4399 8050:ldc2 #664 <Int 8352>
// 4400 8053:castore
// 4401 8054:dup
// 4402 8055:sipush 1099
// 4403 8058:ldc2 #665 <Int 8369>
// 4404 8061:castore
// 4405 8062:dup
// 4406 8063:sipush 1100
// 4407 8066:ldc1 #20 <Int 10>
// 4408 8068:castore
// 4409 8069:dup
// 4410 8070:sipush 1101
// 4411 8073:ldc2 #666 <Int 8370>
// 4412 8076:castore
// 4413 8077:dup
// 4414 8078:sipush 1102
// 4415 8081:ldc2 #667 <Int 8399>
// 4416 8084:castore
// 4417 8085:dup
// 4418 8086:sipush 1103
// 4419 8089:ldc1 #22 <Int 0>
// 4420 8091:castore
// 4421 8092:dup
// 4422 8093:sipush 1104
// 4423 8096:ldc2 #668 <Int 8400>
// 4424 8099:castore
// 4425 8100:dup
// 4426 8101:sipush 1105
// 4427 8104:ldc2 #669 <Int 8426>
// 4428 8107:castore
// 4429 8108:dup
// 4430 8109:sipush 1106
// 4431 8112:ldc1 #28 <Int 13>
// 4432 8114:castore
// 4433 8115:dup
// 4434 8116:sipush 1107
// 4435 8119:ldc2 #670 <Int 8427>
// 4436 8122:castore
// 4437 8123:dup
// 4438 8124:sipush 1108
// 4439 8127:ldc2 #671 <Int 8447>
// 4440 8130:castore
// 4441 8131:dup
// 4442 8132:sipush 1109
// 4443 8135:ldc1 #22 <Int 0>
// 4444 8137:castore
// 4445 8138:dup
// 4446 8139:sipush 1110
// 4447 8142:ldc2 #672 <Int 8448>
// 4448 8145:castore
// 4449 8146:dup
// 4450 8147:sipush 1111
// 4451 8150:ldc2 #673 <Int 8449>
// 4452 8153:castore
// 4453 8154:dup
// 4454 8155:sipush 1112
// 4455 8158:ldc1 #30 <Int 18>
// 4456 8160:castore
// 4457 8161:dup
// 4458 8162:sipush 1113
// 4459 8165:ldc2 #674 <Int 8450>
// 4460 8168:castore
// 4461 8169:dup
// 4462 8170:sipush 1114
// 4463 8173:ldc2 #674 <Int 8450>
// 4464 8176:castore
// 4465 8177:dup
// 4466 8178:sipush 1115
// 4467 8181:ldc1 #22 <Int 0>
// 4468 8183:castore
// 4469 8184:dup
// 4470 8185:sipush 1116
// 4471 8188:ldc2 #675 <Int 8451>
// 4472 8191:castore
// 4473 8192:dup
// 4474 8193:sipush 1117
// 4475 8196:ldc2 #676 <Int 8454>
// 4476 8199:castore
// 4477 8200:dup
// 4478 8201:sipush 1118
// 4479 8204:ldc1 #30 <Int 18>
// 4480 8206:castore
// 4481 8207:dup
// 4482 8208:sipush 1119
// 4483 8211:ldc2 #677 <Int 8455>
// 4484 8214:castore
// 4485 8215:dup
// 4486 8216:sipush 1120
// 4487 8219:ldc2 #677 <Int 8455>
// 4488 8222:castore
// 4489 8223:dup
// 4490 8224:sipush 1121
// 4491 8227:ldc1 #22 <Int 0>
// 4492 8229:castore
// 4493 8230:dup
// 4494 8231:sipush 1122
// 4495 8234:ldc2 #678 <Int 8456>
// 4496 8237:castore
// 4497 8238:dup
// 4498 8239:sipush 1123
// 4499 8242:ldc2 #679 <Int 8457>
// 4500 8245:castore
// 4501 8246:dup
// 4502 8247:sipush 1124
// 4503 8250:ldc1 #30 <Int 18>
// 4504 8252:castore
// 4505 8253:dup
// 4506 8254:sipush 1125
// 4507 8257:ldc2 #680 <Int 8458>
// 4508 8260:castore
// 4509 8261:dup
// 4510 8262:sipush 1126
// 4511 8265:ldc2 #681 <Int 8467>
// 4512 8268:castore
// 4513 8269:dup
// 4514 8270:sipush 1127
// 4515 8273:ldc1 #22 <Int 0>
// 4516 8275:castore
// 4517 8276:dup
// 4518 8277:sipush 1128
// 4519 8280:ldc2 #682 <Int 8468>
// 4520 8283:castore
// 4521 8284:dup
// 4522 8285:sipush 1129
// 4523 8288:ldc2 #682 <Int 8468>
// 4524 8291:castore
// 4525 8292:dup
// 4526 8293:sipush 1130
// 4527 8296:ldc1 #30 <Int 18>
// 4528 8298:castore
// 4529 8299:dup
// 4530 8300:sipush 1131
// 4531 8303:ldc2 #683 <Int 8469>
// 4532 8306:castore
// 4533 8307:dup
// 4534 8308:sipush 1132
// 4535 8311:ldc2 #683 <Int 8469>
// 4536 8314:castore
// 4537 8315:dup
// 4538 8316:sipush 1133
// 4539 8319:ldc1 #22 <Int 0>
// 4540 8321:castore
// 4541 8322:dup
// 4542 8323:sipush 1134
// 4543 8326:ldc2 #684 <Int 8470>
// 4544 8329:castore
// 4545 8330:dup
// 4546 8331:sipush 1135
// 4547 8334:ldc2 #685 <Int 8472>
// 4548 8337:castore
// 4549 8338:dup
// 4550 8339:sipush 1136
// 4551 8342:ldc1 #30 <Int 18>
// 4552 8344:castore
// 4553 8345:dup
// 4554 8346:sipush 1137
// 4555 8349:ldc2 #686 <Int 8473>
// 4556 8352:castore
// 4557 8353:dup
// 4558 8354:sipush 1138
// 4559 8357:ldc2 #687 <Int 8477>
// 4560 8360:castore
// 4561 8361:dup
// 4562 8362:sipush 1139
// 4563 8365:ldc1 #22 <Int 0>
// 4564 8367:castore
// 4565 8368:dup
// 4566 8369:sipush 1140
// 4567 8372:ldc2 #688 <Int 8478>
// 4568 8375:castore
// 4569 8376:dup
// 4570 8377:sipush 1141
// 4571 8380:ldc2 #689 <Int 8483>
// 4572 8383:castore
// 4573 8384:dup
// 4574 8385:sipush 1142
// 4575 8388:ldc1 #30 <Int 18>
// 4576 8390:castore
// 4577 8391:dup
// 4578 8392:sipush 1143
// 4579 8395:ldc2 #690 <Int 8484>
// 4580 8398:castore
// 4581 8399:dup
// 4582 8400:sipush 1144
// 4583 8403:ldc2 #690 <Int 8484>
// 4584 8406:castore
// 4585 8407:dup
// 4586 8408:sipush 1145
// 4587 8411:ldc1 #22 <Int 0>
// 4588 8413:castore
// 4589 8414:dup
// 4590 8415:sipush 1146
// 4591 8418:ldc2 #691 <Int 8485>
// 4592 8421:castore
// 4593 8422:dup
// 4594 8423:sipush 1147
// 4595 8426:ldc2 #691 <Int 8485>
// 4596 8429:castore
// 4597 8430:dup
// 4598 8431:sipush 1148
// 4599 8434:ldc1 #30 <Int 18>
// 4600 8436:castore
// 4601 8437:dup
// 4602 8438:sipush 1149
// 4603 8441:ldc2 #692 <Int 8486>
// 4604 8444:castore
// 4605 8445:dup
// 4606 8446:sipush 1150
// 4607 8449:ldc2 #692 <Int 8486>
// 4608 8452:castore
// 4609 8453:dup
// 4610 8454:sipush 1151
// 4611 8457:ldc1 #22 <Int 0>
// 4612 8459:castore
// 4613 8460:dup
// 4614 8461:sipush 1152
// 4615 8464:ldc2 #693 <Int 8487>
// 4616 8467:castore
// 4617 8468:dup
// 4618 8469:sipush 1153
// 4619 8472:ldc2 #693 <Int 8487>
// 4620 8475:castore
// 4621 8476:dup
// 4622 8477:sipush 1154
// 4623 8480:ldc1 #30 <Int 18>
// 4624 8482:castore
// 4625 8483:dup
// 4626 8484:sipush 1155
// 4627 8487:ldc2 #694 <Int 8488>
// 4628 8490:castore
// 4629 8491:dup
// 4630 8492:sipush 1156
// 4631 8495:ldc2 #694 <Int 8488>
// 4632 8498:castore
// 4633 8499:dup
// 4634 8500:sipush 1157
// 4635 8503:ldc1 #22 <Int 0>
// 4636 8505:castore
// 4637 8506:dup
// 4638 8507:sipush 1158
// 4639 8510:ldc2 #695 <Int 8489>
// 4640 8513:castore
// 4641 8514:dup
// 4642 8515:sipush 1159
// 4643 8518:ldc2 #695 <Int 8489>
// 4644 8521:castore
// 4645 8522:dup
// 4646 8523:sipush 1160
// 4647 8526:ldc1 #30 <Int 18>
// 4648 8528:castore
// 4649 8529:dup
// 4650 8530:sipush 1161
// 4651 8533:ldc2 #696 <Int 8490>
// 4652 8536:castore
// 4653 8537:dup
// 4654 8538:sipush 1162
// 4655 8541:ldc2 #697 <Int 8493>
// 4656 8544:castore
// 4657 8545:dup
// 4658 8546:sipush 1163
// 4659 8549:ldc1 #22 <Int 0>
// 4660 8551:castore
// 4661 8552:dup
// 4662 8553:sipush 1164
// 4663 8556:ldc2 #698 <Int 8494>
// 4664 8559:castore
// 4665 8560:dup
// 4666 8561:sipush 1165
// 4667 8564:ldc2 #698 <Int 8494>
// 4668 8567:castore
// 4669 8568:dup
// 4670 8569:sipush 1166
// 4671 8572:ldc1 #20 <Int 10>
// 4672 8574:castore
// 4673 8575:dup
// 4674 8576:sipush 1167
// 4675 8579:ldc2 #699 <Int 8495>
// 4676 8582:castore
// 4677 8583:dup
// 4678 8584:sipush 1168
// 4679 8587:ldc2 #700 <Int 8497>
// 4680 8590:castore
// 4681 8591:dup
// 4682 8592:sipush 1169
// 4683 8595:ldc1 #22 <Int 0>
// 4684 8597:castore
// 4685 8598:dup
// 4686 8599:sipush 1170
// 4687 8602:ldc2 #701 <Int 8498>
// 4688 8605:castore
// 4689 8606:dup
// 4690 8607:sipush 1171
// 4691 8610:ldc2 #701 <Int 8498>
// 4692 8613:castore
// 4693 8614:dup
// 4694 8615:sipush 1172
// 4695 8618:ldc1 #30 <Int 18>
// 4696 8620:castore
// 4697 8621:dup
// 4698 8622:sipush 1173
// 4699 8625:ldc2 #702 <Int 8499>
// 4700 8628:castore
// 4701 8629:dup
// 4702 8630:sipush 1174
// 4703 8633:ldc2 #703 <Int 8505>
// 4704 8636:castore
// 4705 8637:dup
// 4706 8638:sipush 1175
// 4707 8641:ldc1 #22 <Int 0>
// 4708 8643:castore
// 4709 8644:dup
// 4710 8645:sipush 1176
// 4711 8648:ldc2 #704 <Int 8506>
// 4712 8651:castore
// 4713 8652:dup
// 4714 8653:sipush 1177
// 4715 8656:ldc2 #705 <Int 8507>
// 4716 8659:castore
// 4717 8660:dup
// 4718 8661:sipush 1178
// 4719 8664:ldc1 #30 <Int 18>
// 4720 8666:castore
// 4721 8667:dup
// 4722 8668:sipush 1179
// 4723 8671:ldc2 #706 <Int 8508>
// 4724 8674:castore
// 4725 8675:dup
// 4726 8676:sipush 1180
// 4727 8679:ldc2 #707 <Int 8511>
// 4728 8682:castore
// 4729 8683:dup
// 4730 8684:sipush 1181
// 4731 8687:ldc1 #22 <Int 0>
// 4732 8689:castore
// 4733 8690:dup
// 4734 8691:sipush 1182
// 4735 8694:ldc2 #708 <Int 8512>
// 4736 8697:castore
// 4737 8698:dup
// 4738 8699:sipush 1183
// 4739 8702:ldc2 #709 <Int 8516>
// 4740 8705:castore
// 4741 8706:dup
// 4742 8707:sipush 1184
// 4743 8710:ldc1 #30 <Int 18>
// 4744 8712:castore
// 4745 8713:dup
// 4746 8714:sipush 1185
// 4747 8717:ldc2 #710 <Int 8517>
// 4748 8720:castore
// 4749 8721:dup
// 4750 8722:sipush 1186
// 4751 8725:ldc2 #711 <Int 8521>
// 4752 8728:castore
// 4753 8729:dup
// 4754 8730:sipush 1187
// 4755 8733:ldc1 #22 <Int 0>
// 4756 8735:castore
// 4757 8736:dup
// 4758 8737:sipush 1188
// 4759 8740:ldc2 #712 <Int 8522>
// 4760 8743:castore
// 4761 8744:dup
// 4762 8745:sipush 1189
// 4763 8748:ldc2 #713 <Int 8523>
// 4764 8751:castore
// 4765 8752:dup
// 4766 8753:sipush 1190
// 4767 8756:ldc1 #30 <Int 18>
// 4768 8758:castore
// 4769 8759:dup
// 4770 8760:sipush 1191
// 4771 8763:ldc2 #714 <Int 8524>
// 4772 8766:castore
// 4773 8767:dup
// 4774 8768:sipush 1192
// 4775 8771:ldc2 #715 <Int 8530>
// 4776 8774:castore
// 4777 8775:dup
// 4778 8776:sipush 1193
// 4779 8779:ldc1 #22 <Int 0>
// 4780 8781:castore
// 4781 8782:dup
// 4782 8783:sipush 1194
// 4783 8786:ldc2 #716 <Int 8531>
// 4784 8789:castore
// 4785 8790:dup
// 4786 8791:sipush 1195
// 4787 8794:ldc2 #717 <Int 8543>
// 4788 8797:castore
// 4789 8798:dup
// 4790 8799:sipush 1196
// 4791 8802:ldc1 #30 <Int 18>
// 4792 8804:castore
// 4793 8805:dup
// 4794 8806:sipush 1197
// 4795 8809:ldc2 #718 <Int 8544>
// 4796 8812:castore
// 4797 8813:dup
// 4798 8814:sipush 1198
// 4799 8817:ldc2 #719 <Int 8591>
// 4800 8820:castore
// 4801 8821:dup
// 4802 8822:sipush 1199
// 4803 8825:ldc1 #22 <Int 0>
// 4804 8827:castore
// 4805 8828:dup
// 4806 8829:sipush 1200
// 4807 8832:ldc2 #720 <Int 8592>
// 4808 8835:castore
// 4809 8836:dup
// 4810 8837:sipush 1201
// 4811 8840:ldc2 #721 <Int 8721>
// 4812 8843:castore
// 4813 8844:dup
// 4814 8845:sipush 1202
// 4815 8848:ldc1 #30 <Int 18>
// 4816 8850:castore
// 4817 8851:dup
// 4818 8852:sipush 1203
// 4819 8855:ldc2 #722 <Int 8722>
// 4820 8858:castore
// 4821 8859:dup
// 4822 8860:sipush 1204
// 4823 8863:ldc2 #723 <Int 8723>
// 4824 8866:castore
// 4825 8867:dup
// 4826 8868:sipush 1205
// 4827 8871:ldc1 #20 <Int 10>
// 4828 8873:castore
// 4829 8874:dup
// 4830 8875:sipush 1206
// 4831 8878:ldc2 #724 <Int 8724>
// 4832 8881:castore
// 4833 8882:dup
// 4834 8883:sipush 1207
// 4835 8886:ldc2 #725 <Int 9013>
// 4836 8889:castore
// 4837 8890:dup
// 4838 8891:sipush 1208
// 4839 8894:ldc1 #30 <Int 18>
// 4840 8896:castore
// 4841 8897:dup
// 4842 8898:sipush 1209
// 4843 8901:ldc2 #726 <Int 9014>
// 4844 8904:castore
// 4845 8905:dup
// 4846 8906:sipush 1210
// 4847 8909:ldc2 #727 <Int 9082>
// 4848 8912:castore
// 4849 8913:dup
// 4850 8914:sipush 1211
// 4851 8917:ldc1 #22 <Int 0>
// 4852 8919:castore
// 4853 8920:dup
// 4854 8921:sipush 1212
// 4855 8924:ldc2 #728 <Int 9083>
// 4856 8927:castore
// 4857 8928:dup
// 4858 8929:sipush 1213
// 4859 8932:ldc2 #729 <Int 9108>
// 4860 8935:castore
// 4861 8936:dup
// 4862 8937:sipush 1214
// 4863 8940:ldc1 #30 <Int 18>
// 4864 8942:castore
// 4865 8943:dup
// 4866 8944:sipush 1215
// 4867 8947:ldc2 #730 <Int 9109>
// 4868 8950:castore
// 4869 8951:dup
// 4870 8952:sipush 1216
// 4871 8955:ldc2 #730 <Int 9109>
// 4872 8958:castore
// 4873 8959:dup
// 4874 8960:sipush 1217
// 4875 8963:ldc1 #22 <Int 0>
// 4876 8965:castore
// 4877 8966:dup
// 4878 8967:sipush 1218
// 4879 8970:ldc2 #731 <Int 9110>
// 4880 8973:castore
// 4881 8974:dup
// 4882 8975:sipush 1219
// 4883 8978:ldc2 #732 <Int 9168>
// 4884 8981:castore
// 4885 8982:dup
// 4886 8983:sipush 1220
// 4887 8986:ldc1 #30 <Int 18>
// 4888 8988:castore
// 4889 8989:dup
// 4890 8990:sipush 1221
// 4891 8993:ldc2 #733 <Int 9169>
// 4892 8996:castore
// 4893 8997:dup
// 4894 8998:sipush 1222
// 4895 9001:ldc2 #734 <Int 9215>
// 4896 9004:castore
// 4897 9005:dup
// 4898 9006:sipush 1223
// 4899 9009:ldc1 #22 <Int 0>
// 4900 9011:castore
// 4901 9012:dup
// 4902 9013:sipush 1224
// 4903 9016:ldc2 #735 <Int 9216>
// 4904 9019:castore
// 4905 9020:dup
// 4906 9021:sipush 1225
// 4907 9024:ldc2 #736 <Int 9254>
// 4908 9027:castore
// 4909 9028:dup
// 4910 9029:sipush 1226
// 4911 9032:ldc1 #30 <Int 18>
// 4912 9034:castore
// 4913 9035:dup
// 4914 9036:sipush 1227
// 4915 9039:ldc2 #737 <Int 9255>
// 4916 9042:castore
// 4917 9043:dup
// 4918 9044:sipush 1228
// 4919 9047:ldc2 #738 <Int 9279>
// 4920 9050:castore
// 4921 9051:dup
// 4922 9052:sipush 1229
// 4923 9055:ldc1 #22 <Int 0>
// 4924 9057:castore
// 4925 9058:dup
// 4926 9059:sipush 1230
// 4927 9062:ldc2 #739 <Int 9280>
// 4928 9065:castore
// 4929 9066:dup
// 4930 9067:sipush 1231
// 4931 9070:ldc2 #740 <Int 9290>
// 4932 9073:castore
// 4933 9074:dup
// 4934 9075:sipush 1232
// 4935 9078:ldc1 #30 <Int 18>
// 4936 9080:castore
// 4937 9081:dup
// 4938 9082:sipush 1233
// 4939 9085:ldc2 #741 <Int 9291>
// 4940 9088:castore
// 4941 9089:dup
// 4942 9090:sipush 1234
// 4943 9093:ldc2 #742 <Int 9311>
// 4944 9096:castore
// 4945 9097:dup
// 4946 9098:sipush 1235
// 4947 9101:ldc1 #22 <Int 0>
// 4948 9103:castore
// 4949 9104:dup
// 4950 9105:sipush 1236
// 4951 9108:ldc2 #743 <Int 9312>
// 4952 9111:castore
// 4953 9112:dup
// 4954 9113:sipush 1237
// 4955 9116:ldc2 #744 <Int 9371>
// 4956 9119:castore
// 4957 9120:dup
// 4958 9121:sipush 1238
// 4959 9124:ldc1 #16 <Int 8>
// 4960 9126:castore
// 4961 9127:dup
// 4962 9128:sipush 1239
// 4963 9131:ldc2 #745 <Int 9372>
// 4964 9134:castore
// 4965 9135:dup
// 4966 9136:sipush 1240
// 4967 9139:ldc2 #746 <Int 9449>
// 4968 9142:castore
// 4969 9143:dup
// 4970 9144:sipush 1241
// 4971 9147:ldc1 #22 <Int 0>
// 4972 9149:castore
// 4973 9150:dup
// 4974 9151:sipush 1242
// 4975 9154:ldc2 #747 <Int 9450>
// 4976 9157:castore
// 4977 9158:dup
// 4978 9159:sipush 1243
// 4979 9162:ldc2 #747 <Int 9450>
// 4980 9165:castore
// 4981 9166:dup
// 4982 9167:sipush 1244
// 4983 9170:ldc1 #16 <Int 8>
// 4984 9172:castore
// 4985 9173:dup
// 4986 9174:sipush 1245
// 4987 9177:ldc2 #748 <Int 9451>
// 4988 9180:castore
// 4989 9181:dup
// 4990 9182:sipush 1246
// 4991 9185:ldc2 #749 <Int 9751>
// 4992 9188:castore
// 4993 9189:dup
// 4994 9190:sipush 1247
// 4995 9193:ldc1 #30 <Int 18>
// 4996 9195:castore
// 4997 9196:dup
// 4998 9197:sipush 1248
// 4999 9200:ldc2 #750 <Int 9752>
// 5000 9203:castore
// 5001 9204:dup
// 5002 9205:sipush 1249
// 5003 9208:ldc2 #750 <Int 9752>
// 5004 9211:castore
// 5005 9212:dup
// 5006 9213:sipush 1250
// 5007 9216:ldc1 #22 <Int 0>
// 5008 9218:castore
// 5009 9219:dup
// 5010 9220:sipush 1251
// 5011 9223:ldc2 #751 <Int 9753>
// 5012 9226:castore
// 5013 9227:dup
// 5014 9228:sipush 1252
// 5015 9231:ldc2 #752 <Int 9853>
// 5016 9234:castore
// 5017 9235:dup
// 5018 9236:sipush 1253
// 5019 9239:ldc1 #30 <Int 18>
// 5020 9241:castore
// 5021 9242:dup
// 5022 9243:sipush 1254
// 5023 9246:ldc2 #753 <Int 9854>
// 5024 9249:castore
// 5025 9250:dup
// 5026 9251:sipush 1255
// 5027 9254:ldc2 #754 <Int 9855>
// 5028 9257:castore
// 5029 9258:dup
// 5030 9259:sipush 1256
// 5031 9262:ldc1 #22 <Int 0>
// 5032 9264:castore
// 5033 9265:dup
// 5034 9266:sipush 1257
// 5035 9269:ldc2 #755 <Int 9856>
// 5036 9272:castore
// 5037 9273:dup
// 5038 9274:sipush 1258
// 5039 9277:ldc2 #756 <Int 9873>
// 5040 9280:castore
// 5041 9281:dup
// 5042 9282:sipush 1259
// 5043 9285:ldc1 #30 <Int 18>
// 5044 9287:castore
// 5045 9288:dup
// 5046 9289:sipush 1260
// 5047 9292:ldc2 #757 <Int 9874>
// 5048 9295:castore
// 5049 9296:dup
// 5050 9297:sipush 1261
// 5051 9300:ldc2 #758 <Int 9887>
// 5052 9303:castore
// 5053 9304:dup
// 5054 9305:sipush 1262
// 5055 9308:ldc1 #22 <Int 0>
// 5056 9310:castore
// 5057 9311:dup
// 5058 9312:sipush 1263
// 5059 9315:ldc2 #759 <Int 9888>
// 5060 9318:castore
// 5061 9319:dup
// 5062 9320:sipush 1264
// 5063 9323:ldc2 #760 <Int 9889>
// 5064 9326:castore
// 5065 9327:dup
// 5066 9328:sipush 1265
// 5067 9331:ldc1 #30 <Int 18>
// 5068 9333:castore
// 5069 9334:dup
// 5070 9335:sipush 1266
// 5071 9338:ldc2 #761 <Int 9890>
// 5072 9341:castore
// 5073 9342:dup
// 5074 9343:sipush 1267
// 5075 9346:ldc2 #762 <Int 9984>
// 5076 9349:castore
// 5077 9350:dup
// 5078 9351:sipush 1268
// 5079 9354:ldc1 #22 <Int 0>
// 5080 9356:castore
// 5081 9357:dup
// 5082 9358:sipush 1269
// 5083 9361:ldc2 #763 <Int 9985>
// 5084 9364:castore
// 5085 9365:dup
// 5086 9366:sipush 1270
// 5087 9369:ldc2 #764 <Int 9988>
// 5088 9372:castore
// 5089 9373:dup
// 5090 9374:sipush 1271
// 5091 9377:ldc1 #30 <Int 18>
// 5092 9379:castore
// 5093 9380:dup
// 5094 9381:sipush 1272
// 5095 9384:ldc2 #765 <Int 9989>
// 5096 9387:castore
// 5097 9388:dup
// 5098 9389:sipush 1273
// 5099 9392:ldc2 #765 <Int 9989>
// 5100 9395:castore
// 5101 9396:dup
// 5102 9397:sipush 1274
// 5103 9400:ldc1 #22 <Int 0>
// 5104 9402:castore
// 5105 9403:dup
// 5106 9404:sipush 1275
// 5107 9407:ldc2 #766 <Int 9990>
// 5108 9410:castore
// 5109 9411:dup
// 5110 9412:sipush 1276
// 5111 9415:ldc2 #767 <Int 9993>
// 5112 9418:castore
// 5113 9419:dup
// 5114 9420:sipush 1277
// 5115 9423:ldc1 #30 <Int 18>
// 5116 9425:castore
// 5117 9426:dup
// 5118 9427:sipush 1278
// 5119 9430:ldc2 #768 <Int 9994>
// 5120 9433:castore
// 5121 9434:dup
// 5122 9435:sipush 1279
// 5123 9438:ldc2 #769 <Int 9995>
// 5124 9441:castore
// 5125 9442:dup
// 5126 9443:sipush 1280
// 5127 9446:ldc1 #22 <Int 0>
// 5128 9448:castore
// 5129 9449:dup
// 5130 9450:sipush 1281
// 5131 9453:ldc2 #770 <Int 9996>
// 5132 9456:castore
// 5133 9457:dup
// 5134 9458:sipush 1282
// 5135 9461:ldc2 #771 <Int 10023>
// 5136 9464:castore
// 5137 9465:dup
// 5138 9466:sipush 1283
// 5139 9469:ldc1 #30 <Int 18>
// 5140 9471:castore
// 5141 9472:dup
// 5142 9473:sipush 1284
// 5143 9476:ldc2 #772 <Int 10024>
// 5144 9479:castore
// 5145 9480:dup
// 5146 9481:sipush 1285
// 5147 9484:ldc2 #772 <Int 10024>
// 5148 9487:castore
// 5149 9488:dup
// 5150 9489:sipush 1286
// 5151 9492:ldc1 #22 <Int 0>
// 5152 9494:castore
// 5153 9495:dup
// 5154 9496:sipush 1287
// 5155 9499:ldc2 #773 <Int 10025>
// 5156 9502:castore
// 5157 9503:dup
// 5158 9504:sipush 1288
// 5159 9507:ldc2 #774 <Int 10059>
// 5160 9510:castore
// 5161 9511:dup
// 5162 9512:sipush 1289
// 5163 9515:ldc1 #30 <Int 18>
// 5164 9517:castore
// 5165 9518:dup
// 5166 9519:sipush 1290
// 5167 9522:ldc2 #775 <Int 10060>
// 5168 9525:castore
// 5169 9526:dup
// 5170 9527:sipush 1291
// 5171 9530:ldc2 #775 <Int 10060>
// 5172 9533:castore
// 5173 9534:dup
// 5174 9535:sipush 1292
// 5175 9538:ldc1 #22 <Int 0>
// 5176 9540:castore
// 5177 9541:dup
// 5178 9542:sipush 1293
// 5179 9545:ldc2 #776 <Int 10061>
// 5180 9548:castore
// 5181 9549:dup
// 5182 9550:sipush 1294
// 5183 9553:ldc2 #776 <Int 10061>
// 5184 9556:castore
// 5185 9557:dup
// 5186 9558:sipush 1295
// 5187 9561:ldc1 #30 <Int 18>
// 5188 9563:castore
// 5189 9564:dup
// 5190 9565:sipush 1296
// 5191 9568:ldc2 #777 <Int 10062>
// 5192 9571:castore
// 5193 9572:dup
// 5194 9573:sipush 1297
// 5195 9576:ldc2 #777 <Int 10062>
// 5196 9579:castore
// 5197 9580:dup
// 5198 9581:sipush 1298
// 5199 9584:ldc1 #22 <Int 0>
// 5200 9586:castore
// 5201 9587:dup
// 5202 9588:sipush 1299
// 5203 9591:ldc2 #778 <Int 10063>
// 5204 9594:castore
// 5205 9595:dup
// 5206 9596:sipush 1300
// 5207 9599:ldc2 #779 <Int 10066>
// 5208 9602:castore
// 5209 9603:dup
// 5210 9604:sipush 1301
// 5211 9607:ldc1 #30 <Int 18>
// 5212 9609:castore
// 5213 9610:dup
// 5214 9611:sipush 1302
// 5215 9614:ldc2 #780 <Int 10067>
// 5216 9617:castore
// 5217 9618:dup
// 5218 9619:sipush 1303
// 5219 9622:ldc2 #781 <Int 10069>
// 5220 9625:castore
// 5221 9626:dup
// 5222 9627:sipush 1304
// 5223 9630:ldc1 #22 <Int 0>
// 5224 9632:castore
// 5225 9633:dup
// 5226 9634:sipush 1305
// 5227 9637:ldc2 #782 <Int 10070>
// 5228 9640:castore
// 5229 9641:dup
// 5230 9642:sipush 1306
// 5231 9645:ldc2 #782 <Int 10070>
// 5232 9648:castore
// 5233 9649:dup
// 5234 9650:sipush 1307
// 5235 9653:ldc1 #30 <Int 18>
// 5236 9655:castore
// 5237 9656:dup
// 5238 9657:sipush 1308
// 5239 9660:ldc2 #783 <Int 10071>
// 5240 9663:castore
// 5241 9664:dup
// 5242 9665:sipush 1309
// 5243 9668:ldc2 #783 <Int 10071>
// 5244 9671:castore
// 5245 9672:dup
// 5246 9673:sipush 1310
// 5247 9676:ldc1 #22 <Int 0>
// 5248 9678:castore
// 5249 9679:dup
// 5250 9680:sipush 1311
// 5251 9683:ldc2 #784 <Int 10072>
// 5252 9686:castore
// 5253 9687:dup
// 5254 9688:sipush 1312
// 5255 9691:ldc2 #785 <Int 10078>
// 5256 9694:castore
// 5257 9695:dup
// 5258 9696:sipush 1313
// 5259 9699:ldc1 #30 <Int 18>
// 5260 9701:castore
// 5261 9702:dup
// 5262 9703:sipush 1314
// 5263 9706:ldc2 #786 <Int 10079>
// 5264 9709:castore
// 5265 9710:dup
// 5266 9711:sipush 1315
// 5267 9714:ldc2 #787 <Int 10080>
// 5268 9717:castore
// 5269 9718:dup
// 5270 9719:sipush 1316
// 5271 9722:ldc1 #22 <Int 0>
// 5272 9724:castore
// 5273 9725:dup
// 5274 9726:sipush 1317
// 5275 9729:ldc2 #788 <Int 10081>
// 5276 9732:castore
// 5277 9733:dup
// 5278 9734:sipush 1318
// 5279 9737:ldc2 #789 <Int 10132>
// 5280 9740:castore
// 5281 9741:dup
// 5282 9742:sipush 1319
// 5283 9745:ldc1 #30 <Int 18>
// 5284 9747:castore
// 5285 9748:dup
// 5286 9749:sipush 1320
// 5287 9752:ldc2 #790 <Int 10133>
// 5288 9755:castore
// 5289 9756:dup
// 5290 9757:sipush 1321
// 5291 9760:ldc2 #791 <Int 10135>
// 5292 9763:castore
// 5293 9764:dup
// 5294 9765:sipush 1322
// 5295 9768:ldc1 #22 <Int 0>
// 5296 9770:castore
// 5297 9771:dup
// 5298 9772:sipush 1323
// 5299 9775:ldc2 #792 <Int 10136>
// 5300 9778:castore
// 5301 9779:dup
// 5302 9780:sipush 1324
// 5303 9783:ldc2 #793 <Int 10159>
// 5304 9786:castore
// 5305 9787:dup
// 5306 9788:sipush 1325
// 5307 9791:ldc1 #30 <Int 18>
// 5308 9793:castore
// 5309 9794:dup
// 5310 9795:sipush 1326
// 5311 9798:ldc2 #794 <Int 10160>
// 5312 9801:castore
// 5313 9802:dup
// 5314 9803:sipush 1327
// 5315 9806:ldc2 #794 <Int 10160>
// 5316 9809:castore
// 5317 9810:dup
// 5318 9811:sipush 1328
// 5319 9814:ldc1 #22 <Int 0>
// 5320 9816:castore
// 5321 9817:dup
// 5322 9818:sipush 1329
// 5323 9821:ldc2 #795 <Int 10161>
// 5324 9824:castore
// 5325 9825:dup
// 5326 9826:sipush 1330
// 5327 9829:ldc2 #796 <Int 10174>
// 5328 9832:castore
// 5329 9833:dup
// 5330 9834:sipush 1331
// 5331 9837:ldc1 #30 <Int 18>
// 5332 9839:castore
// 5333 9840:dup
// 5334 9841:sipush 1332
// 5335 9844:ldc2 #797 <Int 10175>
// 5336 9847:castore
// 5337 9848:dup
// 5338 9849:sipush 1333
// 5339 9852:ldc2 #798 <Int 10191>
// 5340 9855:castore
// 5341 9856:dup
// 5342 9857:sipush 1334
// 5343 9860:ldc1 #22 <Int 0>
// 5344 9862:castore
// 5345 9863:dup
// 5346 9864:sipush 1335
// 5347 9867:ldc2 #799 <Int 10192>
// 5348 9870:castore
// 5349 9871:dup
// 5350 9872:sipush 1336
// 5351 9875:ldc2 #800 <Int 10219>
// 5352 9878:castore
// 5353 9879:dup
// 5354 9880:sipush 1337
// 5355 9883:ldc1 #30 <Int 18>
// 5356 9885:castore
// 5357 9886:dup
// 5358 9887:sipush 1338
// 5359 9890:ldc2 #801 <Int 10220>
// 5360 9893:castore
// 5361 9894:dup
// 5362 9895:sipush 1339
// 5363 9898:ldc2 #802 <Int 10223>
// 5364 9901:castore
// 5365 9902:dup
// 5366 9903:sipush 1340
// 5367 9906:ldc1 #22 <Int 0>
// 5368 9908:castore
// 5369 9909:dup
// 5370 9910:sipush 1341
// 5371 9913:ldc2 #803 <Int 10224>
// 5372 9916:castore
// 5373 9917:dup
// 5374 9918:sipush 1342
// 5375 9921:ldc2 #804 <Int 11021>
// 5376 9924:castore
// 5377 9925:dup
// 5378 9926:sipush 1343
// 5379 9929:ldc1 #30 <Int 18>
// 5380 9931:castore
// 5381 9932:dup
// 5382 9933:sipush 1344
// 5383 9936:ldc2 #805 <Int 11022>
// 5384 9939:castore
// 5385 9940:dup
// 5386 9941:sipush 1345
// 5387 9944:ldc2 #806 <Int 11903>
// 5388 9947:castore
// 5389 9948:dup
// 5390 9949:sipush 1346
// 5391 9952:ldc1 #22 <Int 0>
// 5392 9954:castore
// 5393 9955:dup
// 5394 9956:sipush 1347
// 5395 9959:ldc2 #807 <Int 11904>
// 5396 9962:castore
// 5397 9963:dup
// 5398 9964:sipush 1348
// 5399 9967:ldc2 #808 <Int 11929>
// 5400 9970:castore
// 5401 9971:dup
// 5402 9972:sipush 1349
// 5403 9975:ldc1 #30 <Int 18>
// 5404 9977:castore
// 5405 9978:dup
// 5406 9979:sipush 1350
// 5407 9982:ldc2 #809 <Int 11930>
// 5408 9985:castore
// 5409 9986:dup
// 5410 9987:sipush 1351
// 5411 9990:ldc2 #809 <Int 11930>
// 5412 9993:castore
// 5413 9994:dup
// 5414 9995:sipush 1352
// 5415 9998:ldc1 #22 <Int 0>
// 5416 10000:castore
// 5417 10001:dup
// 5418 10002:sipush 1353
// 5419 10005:ldc2 #810 <Int 11931>
// 5420 10008:castore
// 5421 10009:dup
// 5422 10010:sipush 1354
// 5423 10013:ldc2 #811 <Int 12019>
// 5424 10016:castore
// 5425 10017:dup
// 5426 10018:sipush 1355
// 5427 10021:ldc1 #30 <Int 18>
// 5428 10023:castore
// 5429 10024:dup
// 5430 10025:sipush 1356
// 5431 10028:ldc2 #812 <Int 12020>
// 5432 10031:castore
// 5433 10032:dup
// 5434 10033:sipush 1357
// 5435 10036:ldc2 #813 <Int 12031>
// 5436 10039:castore
// 5437 10040:dup
// 5438 10041:sipush 1358
// 5439 10044:ldc1 #22 <Int 0>
// 5440 10046:castore
// 5441 10047:dup
// 5442 10048:sipush 1359
// 5443 10051:ldc2 #814 <Int 12032>
// 5444 10054:castore
// 5445 10055:dup
// 5446 10056:sipush 1360
// 5447 10059:ldc2 #815 <Int 12245>
// 5448 10062:castore
// 5449 10063:dup
// 5450 10064:sipush 1361
// 5451 10067:ldc1 #30 <Int 18>
// 5452 10069:castore
// 5453 10070:dup
// 5454 10071:sipush 1362
// 5455 10074:ldc2 #816 <Int 12246>
// 5456 10077:castore
// 5457 10078:dup
// 5458 10079:sipush 1363
// 5459 10082:ldc2 #817 <Int 12271>
// 5460 10085:castore
// 5461 10086:dup
// 5462 10087:sipush 1364
// 5463 10090:ldc1 #22 <Int 0>
// 5464 10092:castore
// 5465 10093:dup
// 5466 10094:sipush 1365
// 5467 10097:ldc2 #818 <Int 12272>
// 5468 10100:castore
// 5469 10101:dup
// 5470 10102:sipush 1366
// 5471 10105:ldc2 #819 <Int 12283>
// 5472 10108:castore
// 5473 10109:dup
// 5474 10110:sipush 1367
// 5475 10113:ldc1 #30 <Int 18>
// 5476 10115:castore
// 5477 10116:dup
// 5478 10117:sipush 1368
// 5479 10120:ldc2 #820 <Int 12284>
// 5480 10123:castore
// 5481 10124:dup
// 5482 10125:sipush 1369
// 5483 10128:ldc2 #821 <Int 12287>
// 5484 10131:castore
// 5485 10132:dup
// 5486 10133:sipush 1370
// 5487 10136:ldc1 #22 <Int 0>
// 5488 10138:castore
// 5489 10139:dup
// 5490 10140:sipush 1371
// 5491 10143:ldc2 #822 <Int 12288>
// 5492 10146:castore
// 5493 10147:dup
// 5494 10148:sipush 1372
// 5495 10151:ldc2 #822 <Int 12288>
// 5496 10154:castore
// 5497 10155:dup
// 5498 10156:sipush 1373
// 5499 10159:ldc1 #44 <Int 17>
// 5500 10161:castore
// 5501 10162:dup
// 5502 10163:sipush 1374
// 5503 10166:ldc2 #823 <Int 12289>
// 5504 10169:castore
// 5505 10170:dup
// 5506 10171:sipush 1375
// 5507 10174:ldc2 #824 <Int 12292>
// 5508 10177:castore
// 5509 10178:dup
// 5510 10179:sipush 1376
// 5511 10182:ldc1 #30 <Int 18>
// 5512 10184:castore
// 5513 10185:dup
// 5514 10186:sipush 1377
// 5515 10189:ldc2 #825 <Int 12293>
// 5516 10192:castore
// 5517 10193:dup
// 5518 10194:sipush 1378
// 5519 10197:ldc2 #826 <Int 12295>
// 5520 10200:castore
// 5521 10201:dup
// 5522 10202:sipush 1379
// 5523 10205:ldc1 #22 <Int 0>
// 5524 10207:castore
// 5525 10208:dup
// 5526 10209:sipush 1380
// 5527 10212:ldc2 #827 <Int 12296>
// 5528 10215:castore
// 5529 10216:dup
// 5530 10217:sipush 1381
// 5531 10220:ldc2 #828 <Int 12320>
// 5532 10223:castore
// 5533 10224:dup
// 5534 10225:sipush 1382
// 5535 10228:ldc1 #30 <Int 18>
// 5536 10230:castore
// 5537 10231:dup
// 5538 10232:sipush 1383
// 5539 10235:ldc2 #829 <Int 12321>
// 5540 10238:castore
// 5541 10239:dup
// 5542 10240:sipush 1384
// 5543 10243:ldc2 #830 <Int 12329>
// 5544 10246:castore
// 5545 10247:dup
// 5546 10248:sipush 1385
// 5547 10251:ldc1 #22 <Int 0>
// 5548 10253:castore
// 5549 10254:dup
// 5550 10255:sipush 1386
// 5551 10258:ldc2 #831 <Int 12330>
// 5552 10261:castore
// 5553 10262:dup
// 5554 10263:sipush 1387
// 5555 10266:ldc2 #832 <Int 12335>
// 5556 10269:castore
// 5557 10270:dup
// 5558 10271:sipush 1388
// 5559 10274:ldc1 #28 <Int 13>
// 5560 10276:castore
// 5561 10277:dup
// 5562 10278:sipush 1389
// 5563 10281:ldc2 #833 <Int 12336>
// 5564 10284:castore
// 5565 10285:dup
// 5566 10286:sipush 1390
// 5567 10289:ldc2 #833 <Int 12336>
// 5568 10292:castore
// 5569 10293:dup
// 5570 10294:sipush 1391
// 5571 10297:ldc1 #30 <Int 18>
// 5572 10299:castore
// 5573 10300:dup
// 5574 10301:sipush 1392
// 5575 10304:ldc2 #834 <Int 12337>
// 5576 10307:castore
// 5577 10308:dup
// 5578 10309:sipush 1393
// 5579 10312:ldc2 #835 <Int 12341>
// 5580 10315:castore
// 5581 10316:dup
// 5582 10317:sipush 1394
// 5583 10320:ldc1 #22 <Int 0>
// 5584 10322:castore
// 5585 10323:dup
// 5586 10324:sipush 1395
// 5587 10327:ldc2 #836 <Int 12342>
// 5588 10330:castore
// 5589 10331:dup
// 5590 10332:sipush 1396
// 5591 10335:ldc2 #837 <Int 12343>
// 5592 10338:castore
// 5593 10339:dup
// 5594 10340:sipush 1397
// 5595 10343:ldc1 #30 <Int 18>
// 5596 10345:castore
// 5597 10346:dup
// 5598 10347:sipush 1398
// 5599 10350:ldc2 #838 <Int 12344>
// 5600 10353:castore
// 5601 10354:dup
// 5602 10355:sipush 1399
// 5603 10358:ldc2 #839 <Int 12348>
// 5604 10361:castore
// 5605 10362:dup
// 5606 10363:sipush 1400
// 5607 10366:ldc1 #22 <Int 0>
// 5608 10368:castore
// 5609 10369:dup
// 5610 10370:sipush 1401
// 5611 10373:ldc2 #840 <Int 12349>
// 5612 10376:castore
// 5613 10377:dup
// 5614 10378:sipush 1402
// 5615 10381:ldc2 #841 <Int 12351>
// 5616 10384:castore
// 5617 10385:dup
// 5618 10386:sipush 1403
// 5619 10389:ldc1 #30 <Int 18>
// 5620 10391:castore
// 5621 10392:dup
// 5622 10393:sipush 1404
// 5623 10396:ldc2 #842 <Int 12352>
// 5624 10399:castore
// 5625 10400:dup
// 5626 10401:sipush 1405
// 5627 10404:ldc2 #843 <Int 12440>
// 5628 10407:castore
// 5629 10408:dup
// 5630 10409:sipush 1406
// 5631 10412:ldc1 #22 <Int 0>
// 5632 10414:castore
// 5633 10415:dup
// 5634 10416:sipush 1407
// 5635 10419:ldc2 #844 <Int 12441>
// 5636 10422:castore
// 5637 10423:dup
// 5638 10424:sipush 1408
// 5639 10427:ldc2 #845 <Int 12442>
// 5640 10430:castore
// 5641 10431:dup
// 5642 10432:sipush 1409
// 5643 10435:ldc1 #28 <Int 13>
// 5644 10437:castore
// 5645 10438:dup
// 5646 10439:sipush 1410
// 5647 10442:ldc2 #846 <Int 12443>
// 5648 10445:castore
// 5649 10446:dup
// 5650 10447:sipush 1411
// 5651 10450:ldc2 #847 <Int 12444>
// 5652 10453:castore
// 5653 10454:dup
// 5654 10455:sipush 1412
// 5655 10458:ldc1 #30 <Int 18>
// 5656 10460:castore
// 5657 10461:dup
// 5658 10462:sipush 1413
// 5659 10465:ldc2 #848 <Int 12445>
// 5660 10468:castore
// 5661 10469:dup
// 5662 10470:sipush 1414
// 5663 10473:ldc2 #849 <Int 12447>
// 5664 10476:castore
// 5665 10477:dup
// 5666 10478:sipush 1415
// 5667 10481:ldc1 #22 <Int 0>
// 5668 10483:castore
// 5669 10484:dup
// 5670 10485:sipush 1416
// 5671 10488:ldc2 #850 <Int 12448>
// 5672 10491:castore
// 5673 10492:dup
// 5674 10493:sipush 1417
// 5675 10496:ldc2 #850 <Int 12448>
// 5676 10499:castore
// 5677 10500:dup
// 5678 10501:sipush 1418
// 5679 10504:ldc1 #30 <Int 18>
// 5680 10506:castore
// 5681 10507:dup
// 5682 10508:sipush 1419
// 5683 10511:ldc2 #851 <Int 12449>
// 5684 10514:castore
// 5685 10515:dup
// 5686 10516:sipush 1420
// 5687 10519:ldc2 #852 <Int 12538>
// 5688 10522:castore
// 5689 10523:dup
// 5690 10524:sipush 1421
// 5691 10527:ldc1 #22 <Int 0>
// 5692 10529:castore
// 5693 10530:dup
// 5694 10531:sipush 1422
// 5695 10534:ldc2 #853 <Int 12539>
// 5696 10537:castore
// 5697 10538:dup
// 5698 10539:sipush 1423
// 5699 10542:ldc2 #853 <Int 12539>
// 5700 10545:castore
// 5701 10546:dup
// 5702 10547:sipush 1424
// 5703 10550:ldc1 #30 <Int 18>
// 5704 10552:castore
// 5705 10553:dup
// 5706 10554:sipush 1425
// 5707 10557:ldc2 #854 <Int 12540>
// 5708 10560:castore
// 5709 10561:dup
// 5710 10562:sipush 1426
// 5711 10565:ldc2 #855 <Int 12828>
// 5712 10568:castore
// 5713 10569:dup
// 5714 10570:sipush 1427
// 5715 10573:ldc1 #22 <Int 0>
// 5716 10575:castore
// 5717 10576:dup
// 5718 10577:sipush 1428
// 5719 10580:ldc2 #856 <Int 12829>
// 5720 10583:castore
// 5721 10584:dup
// 5722 10585:sipush 1429
// 5723 10588:ldc2 #857 <Int 12830>
// 5724 10591:castore
// 5725 10592:dup
// 5726 10593:sipush 1430
// 5727 10596:ldc1 #30 <Int 18>
// 5728 10598:castore
// 5729 10599:dup
// 5730 10600:sipush 1431
// 5731 10603:ldc2 #858 <Int 12831>
// 5732 10606:castore
// 5733 10607:dup
// 5734 10608:sipush 1432
// 5735 10611:ldc2 #859 <Int 12879>
// 5736 10614:castore
// 5737 10615:dup
// 5738 10616:sipush 1433
// 5739 10619:ldc1 #22 <Int 0>
// 5740 10621:castore
// 5741 10622:dup
// 5742 10623:sipush 1434
// 5743 10626:ldc2 #860 <Int 12880>
// 5744 10629:castore
// 5745 10630:dup
// 5746 10631:sipush 1435
// 5747 10634:ldc2 #861 <Int 12895>
// 5748 10637:castore
// 5749 10638:dup
// 5750 10639:sipush 1436
// 5751 10642:ldc1 #30 <Int 18>
// 5752 10644:castore
// 5753 10645:dup
// 5754 10646:sipush 1437
// 5755 10649:ldc2 #862 <Int 12896>
// 5756 10652:castore
// 5757 10653:dup
// 5758 10654:sipush 1438
// 5759 10657:ldc2 #863 <Int 12923>
// 5760 10660:castore
// 5761 10661:dup
// 5762 10662:sipush 1439
// 5763 10665:ldc1 #22 <Int 0>
// 5764 10667:castore
// 5765 10668:dup
// 5766 10669:sipush 1440
// 5767 10672:ldc2 #864 <Int 12924>
// 5768 10675:castore
// 5769 10676:dup
// 5770 10677:sipush 1441
// 5771 10680:ldc2 #865 <Int 12925>
// 5772 10683:castore
// 5773 10684:dup
// 5774 10685:sipush 1442
// 5775 10688:ldc1 #30 <Int 18>
// 5776 10690:castore
// 5777 10691:dup
// 5778 10692:sipush 1443
// 5779 10695:ldc2 #866 <Int 12926>
// 5780 10698:castore
// 5781 10699:dup
// 5782 10700:sipush 1444
// 5783 10703:ldc2 #867 <Int 12976>
// 5784 10706:castore
// 5785 10707:dup
// 5786 10708:sipush 1445
// 5787 10711:ldc1 #22 <Int 0>
// 5788 10713:castore
// 5789 10714:dup
// 5790 10715:sipush 1446
// 5791 10718:ldc2 #868 <Int 12977>
// 5792 10721:castore
// 5793 10722:dup
// 5794 10723:sipush 1447
// 5795 10726:ldc2 #869 <Int 12991>
// 5796 10729:castore
// 5797 10730:dup
// 5798 10731:sipush 1448
// 5799 10734:ldc1 #30 <Int 18>
// 5800 10736:castore
// 5801 10737:dup
// 5802 10738:sipush 1449
// 5803 10741:ldc2 #870 <Int 12992>
// 5804 10744:castore
// 5805 10745:dup
// 5806 10746:sipush 1450
// 5807 10749:ldc2 #871 <Int 13003>
// 5808 10752:castore
// 5809 10753:dup
// 5810 10754:sipush 1451
// 5811 10757:ldc1 #22 <Int 0>
// 5812 10759:castore
// 5813 10760:dup
// 5814 10761:sipush 1452
// 5815 10764:ldc2 #872 <Int 13004>
// 5816 10767:castore
// 5817 10768:dup
// 5818 10769:sipush 1453
// 5819 10772:ldc2 #873 <Int 13007>
// 5820 10775:castore
// 5821 10776:dup
// 5822 10777:sipush 1454
// 5823 10780:ldc1 #30 <Int 18>
// 5824 10782:castore
// 5825 10783:dup
// 5826 10784:sipush 1455
// 5827 10787:ldc2 #874 <Int 13008>
// 5828 10790:castore
// 5829 10791:dup
// 5830 10792:sipush 1456
// 5831 10795:ldc2 #875 <Int 13174>
// 5832 10798:castore
// 5833 10799:dup
// 5834 10800:sipush 1457
// 5835 10803:ldc1 #22 <Int 0>
// 5836 10805:castore
// 5837 10806:dup
// 5838 10807:sipush 1458
// 5839 10810:ldc2 #876 <Int 13175>
// 5840 10813:castore
// 5841 10814:dup
// 5842 10815:sipush 1459
// 5843 10818:ldc2 #877 <Int 13178>
// 5844 10821:castore
// 5845 10822:dup
// 5846 10823:sipush 1460
// 5847 10826:ldc1 #30 <Int 18>
// 5848 10828:castore
// 5849 10829:dup
// 5850 10830:sipush 1461
// 5851 10833:ldc2 #878 <Int 13179>
// 5852 10836:castore
// 5853 10837:dup
// 5854 10838:sipush 1462
// 5855 10841:ldc2 #879 <Int 13277>
// 5856 10844:castore
// 5857 10845:dup
// 5858 10846:sipush 1463
// 5859 10849:ldc1 #22 <Int 0>
// 5860 10851:castore
// 5861 10852:dup
// 5862 10853:sipush 1464
// 5863 10856:ldc2 #880 <Int 13278>
// 5864 10859:castore
// 5865 10860:dup
// 5866 10861:sipush 1465
// 5867 10864:ldc2 #881 <Int 13279>
// 5868 10867:castore
// 5869 10868:dup
// 5870 10869:sipush 1466
// 5871 10872:ldc1 #30 <Int 18>
// 5872 10874:castore
// 5873 10875:dup
// 5874 10876:sipush 1467
// 5875 10879:ldc2 #882 <Int 13280>
// 5876 10882:castore
// 5877 10883:dup
// 5878 10884:sipush 1468
// 5879 10887:ldc2 #883 <Int 13310>
// 5880 10890:castore
// 5881 10891:dup
// 5882 10892:sipush 1469
// 5883 10895:ldc1 #22 <Int 0>
// 5884 10897:castore
// 5885 10898:dup
// 5886 10899:sipush 1470
// 5887 10902:ldc2 #884 <Int 13311>
// 5888 10905:castore
// 5889 10906:dup
// 5890 10907:sipush 1471
// 5891 10910:ldc2 #884 <Int 13311>
// 5892 10913:castore
// 5893 10914:dup
// 5894 10915:sipush 1472
// 5895 10918:ldc1 #30 <Int 18>
// 5896 10920:castore
// 5897 10921:dup
// 5898 10922:sipush 1473
// 5899 10925:ldc2 #885 <Int 13312>
// 5900 10928:castore
// 5901 10929:dup
// 5902 10930:sipush 1474
// 5903 10933:ldc2 #886 <Int 19903>
// 5904 10936:castore
// 5905 10937:dup
// 5906 10938:sipush 1475
// 5907 10941:ldc1 #22 <Int 0>
// 5908 10943:castore
// 5909 10944:dup
// 5910 10945:sipush 1476
// 5911 10948:ldc2 #887 <Int 19904>
// 5912 10951:castore
// 5913 10952:dup
// 5914 10953:sipush 1477
// 5915 10956:ldc2 #888 <Int 19967>
// 5916 10959:castore
// 5917 10960:dup
// 5918 10961:sipush 1478
// 5919 10964:ldc1 #30 <Int 18>
// 5920 10966:castore
// 5921 10967:dup
// 5922 10968:sipush 1479
// 5923 10971:ldc2 #889 <Int 19968>
// 5924 10974:castore
// 5925 10975:dup
// 5926 10976:sipush 1480
// 5927 10979:ldc2 #890 <Int -23409>
// 5928 10982:castore
// 5929 10983:dup
// 5930 10984:sipush 1481
// 5931 10987:ldc1 #22 <Int 0>
// 5932 10989:castore
// 5933 10990:dup
// 5934 10991:sipush 1482
// 5935 10994:ldc2 #891 <Int -23408>
// 5936 10997:castore
// 5937 10998:dup
// 5938 10999:sipush 1483
// 5939 11002:ldc2 #892 <Int -23354>
// 5940 11005:castore
// 5941 11006:dup
// 5942 11007:sipush 1484
// 5943 11010:ldc1 #30 <Int 18>
// 5944 11012:castore
// 5945 11013:dup
// 5946 11014:sipush 1485
// 5947 11017:ldc2 #893 <Int -23353>
// 5948 11020:castore
// 5949 11021:dup
// 5950 11022:sipush 1486
// 5951 11025:ldc2 #894 <Int -1252>
// 5952 11028:castore
// 5953 11029:dup
// 5954 11030:sipush 1487
// 5955 11033:ldc1 #22 <Int 0>
// 5956 11035:castore
// 5957 11036:dup
// 5958 11037:sipush 1488
// 5959 11040:ldc2 #895 <Int -1251>
// 5960 11043:castore
// 5961 11044:dup
// 5962 11045:sipush 1489
// 5963 11048:ldc2 #895 <Int -1251>
// 5964 11051:castore
// 5965 11052:dup
// 5966 11053:sipush 1490
// 5967 11056:ldc1 #34 <Int 3>
// 5968 11058:castore
// 5969 11059:dup
// 5970 11060:sipush 1491
// 5971 11063:ldc2 #896 <Int -1250>
// 5972 11066:castore
// 5973 11067:dup
// 5974 11068:sipush 1492
// 5975 11071:ldc2 #896 <Int -1250>
// 5976 11074:castore
// 5977 11075:dup
// 5978 11076:sipush 1493
// 5979 11079:ldc1 #28 <Int 13>
// 5980 11081:castore
// 5981 11082:dup
// 5982 11083:sipush 1494
// 5983 11086:ldc2 #897 <Int -1249>
// 5984 11089:castore
// 5985 11090:dup
// 5986 11091:sipush 1495
// 5987 11094:ldc2 #898 <Int -1240>
// 5988 11097:castore
// 5989 11098:dup
// 5990 11099:sipush 1496
// 5991 11102:ldc1 #34 <Int 3>
// 5992 11104:castore
// 5993 11105:dup
// 5994 11106:sipush 1497
// 5995 11109:ldc2 #899 <Int -1239>
// 5996 11112:castore
// 5997 11113:dup
// 5998 11114:sipush 1498
// 5999 11117:ldc2 #899 <Int -1239>
// 6000 11120:castore
// 6001 11121:dup
// 6002 11122:sipush 1499
// 6003 11125:ldc1 #20 <Int 10>
// 6004 11127:castore
// 6005 11128:dup
// 6006 11129:sipush 1500
// 6007 11132:ldc2 #900 <Int -1238>
// 6008 11135:castore
// 6009 11136:dup
// 6010 11137:sipush 1501
// 6011 11140:ldc2 #901 <Int -1226>
// 6012 11143:castore
// 6013 11144:dup
// 6014 11145:sipush 1502
// 6015 11148:ldc1 #34 <Int 3>
// 6016 11150:castore
// 6017 11151:dup
// 6018 11152:sipush 1503
// 6019 11155:ldc2 #902 <Int -1225>
// 6020 11158:castore
// 6021 11159:dup
// 6022 11160:sipush 1504
// 6023 11163:ldc2 #902 <Int -1225>
// 6024 11166:castore
// 6025 11167:dup
// 6026 11168:sipush 1505
// 6027 11171:ldc1 #22 <Int 0>
// 6028 11173:castore
// 6029 11174:dup
// 6030 11175:sipush 1506
// 6031 11178:ldc2 #903 <Int -1224>
// 6032 11181:castore
// 6033 11182:dup
// 6034 11183:sipush 1507
// 6035 11186:ldc2 #904 <Int -1220>
// 6036 11189:castore
// 6037 11190:dup
// 6038 11191:sipush 1508
// 6039 11194:ldc1 #34 <Int 3>
// 6040 11196:castore
// 6041 11197:dup
// 6042 11198:sipush 1509
// 6043 11201:ldc2 #905 <Int -1219>
// 6044 11204:castore
// 6045 11205:dup
// 6046 11206:sipush 1510
// 6047 11209:ldc2 #905 <Int -1219>
// 6048 11212:castore
// 6049 11213:dup
// 6050 11214:sipush 1511
// 6051 11217:ldc1 #22 <Int 0>
// 6052 11219:castore
// 6053 11220:dup
// 6054 11221:sipush 1512
// 6055 11224:ldc2 #906 <Int -1218>
// 6056 11227:castore
// 6057 11228:dup
// 6058 11229:sipush 1513
// 6059 11232:ldc2 #906 <Int -1218>
// 6060 11235:castore
// 6061 11236:dup
// 6062 11237:sipush 1514
// 6063 11240:ldc1 #34 <Int 3>
// 6064 11242:castore
// 6065 11243:dup
// 6066 11244:sipush 1515
// 6067 11247:ldc2 #907 <Int -1217>
// 6068 11250:castore
// 6069 11251:dup
// 6070 11252:sipush 1516
// 6071 11255:ldc2 #907 <Int -1217>
// 6072 11258:castore
// 6073 11259:dup
// 6074 11260:sipush 1517
// 6075 11263:ldc1 #22 <Int 0>
// 6076 11265:castore
// 6077 11266:dup
// 6078 11267:sipush 1518
// 6079 11270:ldc2 #908 <Int -1216>
// 6080 11273:castore
// 6081 11274:dup
// 6082 11275:sipush 1519
// 6083 11278:ldc2 #909 <Int -1215>
// 6084 11281:castore
// 6085 11282:dup
// 6086 11283:sipush 1520
// 6087 11286:ldc1 #34 <Int 3>
// 6088 11288:castore
// 6089 11289:dup
// 6090 11290:sipush 1521
// 6091 11293:ldc2 #910 <Int -1214>
// 6092 11296:castore
// 6093 11297:dup
// 6094 11298:sipush 1522
// 6095 11301:ldc2 #910 <Int -1214>
// 6096 11304:castore
// 6097 11305:dup
// 6098 11306:sipush 1523
// 6099 11309:ldc1 #22 <Int 0>
// 6100 11311:castore
// 6101 11312:dup
// 6102 11313:sipush 1524
// 6103 11316:ldc2 #911 <Int -1213>
// 6104 11319:castore
// 6105 11320:dup
// 6106 11321:sipush 1525
// 6107 11324:ldc2 #912 <Int -1212>
// 6108 11327:castore
// 6109 11328:dup
// 6110 11329:sipush 1526
// 6111 11332:ldc1 #34 <Int 3>
// 6112 11334:castore
// 6113 11335:dup
// 6114 11336:sipush 1527
// 6115 11339:ldc2 #913 <Int -1211>
// 6116 11342:castore
// 6117 11343:dup
// 6118 11344:sipush 1528
// 6119 11347:ldc2 #913 <Int -1211>
// 6120 11350:castore
// 6121 11351:dup
// 6122 11352:sipush 1529
// 6123 11355:ldc1 #22 <Int 0>
// 6124 11357:castore
// 6125 11358:dup
// 6126 11359:sipush 1530
// 6127 11362:ldc2 #914 <Int -1210>
// 6128 11365:castore
// 6129 11366:dup
// 6130 11367:sipush 1531
// 6131 11370:ldc2 #915 <Int -1201>
// 6132 11373:castore
// 6133 11374:dup
// 6134 11375:sipush 1532
// 6135 11378:ldc1 #34 <Int 3>
// 6136 11380:castore
// 6137 11381:dup
// 6138 11382:sipush 1533
// 6139 11385:ldc2 #916 <Int -1200>
// 6140 11388:castore
// 6141 11389:dup
// 6142 11390:sipush 1534
// 6143 11393:ldc2 #917 <Int -1103>
// 6144 11396:castore
// 6145 11397:dup
// 6146 11398:sipush 1535
// 6147 11401:ldc1 #7 <Int 4>
// 6148 11403:castore
// 6149 11404:dup
// 6150 11405:sipush 1536
// 6151 11408:ldc2 #918 <Int -1102>
// 6152 11411:castore
// 6153 11412:dup
// 6154 11413:sipush 1537
// 6155 11416:ldc2 #919 <Int -1070>
// 6156 11419:castore
// 6157 11420:dup
// 6158 11421:sipush 1538
// 6159 11424:ldc1 #22 <Int 0>
// 6160 11426:castore
// 6161 11427:dup
// 6162 11428:sipush 1539
// 6163 11431:ldc2 #920 <Int -1069>
// 6164 11434:castore
// 6165 11435:dup
// 6166 11436:sipush 1540
// 6167 11439:ldc2 #921 <Int -707>
// 6168 11442:castore
// 6169 11443:dup
// 6170 11444:sipush 1541
// 6171 11447:ldc1 #7 <Int 4>
// 6172 11449:castore
// 6173 11450:dup
// 6174 11451:sipush 1542
// 6175 11454:ldc2 #922 <Int -706>
// 6176 11457:castore
// 6177 11458:dup
// 6178 11459:sipush 1543
// 6179 11462:ldc2 #923 <Int -705>
// 6180 11465:castore
// 6181 11466:dup
// 6182 11467:sipush 1544
// 6183 11470:ldc1 #30 <Int 18>
// 6184 11472:castore
// 6185 11473:dup
// 6186 11474:sipush 1545
// 6187 11477:ldc2 #924 <Int -704>
// 6188 11480:castore
// 6189 11481:dup
// 6190 11482:sipush 1546
// 6191 11485:ldc2 #925 <Int -689>
// 6192 11488:castore
// 6193 11489:dup
// 6194 11490:sipush 1547
// 6195 11493:ldc1 #22 <Int 0>
// 6196 11495:castore
// 6197 11496:dup
// 6198 11497:sipush 1548
// 6199 11500:ldc2 #926 <Int -688>
// 6200 11503:castore
// 6201 11504:dup
// 6202 11505:sipush 1549
// 6203 11508:ldc2 #927 <Int -625>
// 6204 11511:castore
// 6205 11512:dup
// 6206 11513:sipush 1550
// 6207 11516:ldc1 #7 <Int 4>
// 6208 11518:castore
// 6209 11519:dup
// 6210 11520:sipush 1551
// 6211 11523:ldc2 #928 <Int -624>
// 6212 11526:castore
// 6213 11527:dup
// 6214 11528:sipush 1552
// 6215 11531:ldc2 #929 <Int -623>
// 6216 11534:castore
// 6217 11535:dup
// 6218 11536:sipush 1553
// 6219 11539:ldc1 #22 <Int 0>
// 6220 11541:castore
// 6221 11542:dup
// 6222 11543:sipush 1554
// 6223 11546:ldc2 #930 <Int -622>
// 6224 11549:castore
// 6225 11550:dup
// 6226 11551:sipush 1555
// 6227 11554:ldc2 #931 <Int -569>
// 6228 11557:castore
// 6229 11558:dup
// 6230 11559:sipush 1556
// 6231 11562:ldc1 #7 <Int 4>
// 6232 11564:castore
// 6233 11565:dup
// 6234 11566:sipush 1557
// 6235 11569:ldc2 #932 <Int -568>
// 6236 11572:castore
// 6237 11573:dup
// 6238 11574:sipush 1558
// 6239 11577:ldc2 #933 <Int -529>
// 6240 11580:castore
// 6241 11581:dup
// 6242 11582:sipush 1559
// 6243 11585:ldc1 #22 <Int 0>
// 6244 11587:castore
// 6245 11588:dup
// 6246 11589:sipush 1560
// 6247 11592:ldc2 #934 <Int -528>
// 6248 11595:castore
// 6249 11596:dup
// 6250 11597:sipush 1561
// 6251 11600:ldc2 #935 <Int -516>
// 6252 11603:castore
// 6253 11604:dup
// 6254 11605:sipush 1562
// 6255 11608:ldc1 #7 <Int 4>
// 6256 11610:castore
// 6257 11611:dup
// 6258 11612:sipush 1563
// 6259 11615:ldc2 #936 <Int -515>
// 6260 11618:castore
// 6261 11619:dup
// 6262 11620:sipush 1564
// 6263 11623:ldc2 #936 <Int -515>
// 6264 11626:castore
// 6265 11627:dup
// 6266 11628:sipush 1565
// 6267 11631:ldc1 #30 <Int 18>
// 6268 11633:castore
// 6269 11634:dup
// 6270 11635:sipush 1566
// 6271 11638:ldc2 #937 <Int -514>
// 6272 11641:castore
// 6273 11642:dup
// 6274 11643:sipush 1567
// 6275 11646:ldc2 #938 <Int -513>
// 6276 11649:castore
// 6277 11650:dup
// 6278 11651:sipush 1568
// 6279 11654:ldc1 #22 <Int 0>
// 6280 11656:castore
// 6281 11657:dup
// 6282 11658:sipush 1569
// 6283 11661:ldc2 #939 <Int -512>
// 6284 11664:castore
// 6285 11665:dup
// 6286 11666:sipush 1570
// 6287 11669:ldc2 #940 <Int -497>
// 6288 11672:castore
// 6289 11673:dup
// 6290 11674:sipush 1571
// 6291 11677:ldc1 #28 <Int 13>
// 6292 11679:castore
// 6293 11680:dup
// 6294 11681:sipush 1572
// 6295 11684:ldc2 #941 <Int -496>
// 6296 11687:castore
// 6297 11688:dup
// 6298 11689:sipush 1573
// 6299 11692:ldc2 #942 <Int -481>
// 6300 11695:castore
// 6301 11696:dup
// 6302 11697:sipush 1574
// 6303 11700:ldc1 #22 <Int 0>
// 6304 11702:castore
// 6305 11703:dup
// 6306 11704:sipush 1575
// 6307 11707:ldc2 #943 <Int -480>
// 6308 11710:castore
// 6309 11711:dup
// 6310 11712:sipush 1576
// 6311 11715:ldc2 #944 <Int -477>
// 6312 11718:castore
// 6313 11719:dup
// 6314 11720:sipush 1577
// 6315 11723:ldc1 #28 <Int 13>
// 6316 11725:castore
// 6317 11726:dup
// 6318 11727:sipush 1578
// 6319 11730:ldc2 #945 <Int -476>
// 6320 11733:castore
// 6321 11734:dup
// 6322 11735:sipush 1579
// 6323 11738:ldc2 #946 <Int -465>
// 6324 11741:castore
// 6325 11742:dup
// 6326 11743:sipush 1580
// 6327 11746:ldc1 #22 <Int 0>
// 6328 11748:castore
// 6329 11749:dup
// 6330 11750:sipush 1581
// 6331 11753:ldc2 #947 <Int -464>
// 6332 11756:castore
// 6333 11757:dup
// 6334 11758:sipush 1582
// 6335 11761:ldc2 #948 <Int -433>
// 6336 11764:castore
// 6337 11765:dup
// 6338 11766:sipush 1583
// 6339 11769:ldc1 #30 <Int 18>
// 6340 11771:castore
// 6341 11772:dup
// 6342 11773:sipush 1584
// 6343 11776:ldc2 #949 <Int -432>
// 6344 11779:castore
// 6345 11780:dup
// 6346 11781:sipush 1585
// 6347 11784:ldc2 #949 <Int -432>
// 6348 11787:castore
// 6349 11788:dup
// 6350 11789:sipush 1586
// 6351 11792:ldc1 #14 <Int 12>
// 6352 11794:castore
// 6353 11795:dup
// 6354 11796:sipush 1587
// 6355 11799:ldc2 #950 <Int -431>
// 6356 11802:castore
// 6357 11803:dup
// 6358 11804:sipush 1588
// 6359 11807:ldc2 #950 <Int -431>
// 6360 11810:castore
// 6361 11811:dup
// 6362 11812:sipush 1589
// 6363 11815:ldc1 #30 <Int 18>
// 6364 11817:castore
// 6365 11818:dup
// 6366 11819:sipush 1590
// 6367 11822:ldc2 #951 <Int -430>
// 6368 11825:castore
// 6369 11826:dup
// 6370 11827:sipush 1591
// 6371 11830:ldc2 #951 <Int -430>
// 6372 11833:castore
// 6373 11834:dup
// 6374 11835:sipush 1592
// 6375 11838:ldc1 #14 <Int 12>
// 6376 11840:castore
// 6377 11841:dup
// 6378 11842:sipush 1593
// 6379 11845:ldc2 #952 <Int -429>
// 6380 11848:castore
// 6381 11849:dup
// 6382 11850:sipush 1594
// 6383 11853:ldc2 #952 <Int -429>
// 6384 11856:castore
// 6385 11857:dup
// 6386 11858:sipush 1595
// 6387 11861:ldc1 #22 <Int 0>
// 6388 11863:castore
// 6389 11864:dup
// 6390 11865:sipush 1596
// 6391 11868:ldc2 #953 <Int -428>
// 6392 11871:castore
// 6393 11872:dup
// 6394 11873:sipush 1597
// 6395 11876:ldc2 #953 <Int -428>
// 6396 11879:castore
// 6397 11880:dup
// 6398 11881:sipush 1598
// 6399 11884:ldc1 #30 <Int 18>
// 6400 11886:castore
// 6401 11887:dup
// 6402 11888:sipush 1599
// 6403 11891:ldc2 #954 <Int -427>
// 6404 11894:castore
// 6405 11895:dup
// 6406 11896:sipush 1600
// 6407 11899:ldc2 #954 <Int -427>
// 6408 11902:castore
// 6409 11903:dup
// 6410 11904:sipush 1601
// 6411 11907:ldc1 #14 <Int 12>
// 6412 11909:castore
// 6413 11910:dup
// 6414 11911:sipush 1602
// 6415 11914:ldc2 #955 <Int -426>
// 6416 11917:castore
// 6417 11918:dup
// 6418 11919:sipush 1603
// 6419 11922:ldc2 #956 <Int -418>
// 6420 11925:castore
// 6421 11926:dup
// 6422 11927:sipush 1604
// 6423 11930:ldc1 #30 <Int 18>
// 6424 11932:castore
// 6425 11933:dup
// 6426 11934:sipush 1605
// 6427 11937:ldc2 #957 <Int -417>
// 6428 11940:castore
// 6429 11941:dup
// 6430 11942:sipush 1606
// 6431 11945:ldc2 #957 <Int -417>
// 6432 11948:castore
// 6433 11949:dup
// 6434 11950:sipush 1607
// 6435 11953:ldc1 #20 <Int 10>
// 6436 11955:castore
// 6437 11956:dup
// 6438 11957:sipush 1608
// 6439 11960:ldc2 #958 <Int -416>
// 6440 11963:castore
// 6441 11964:dup
// 6442 11965:sipush 1609
// 6443 11968:ldc2 #959 <Int -415>
// 6444 11971:castore
// 6445 11972:dup
// 6446 11973:sipush 1610
// 6447 11976:ldc1 #30 <Int 18>
// 6448 11978:castore
// 6449 11979:dup
// 6450 11980:sipush 1611
// 6451 11983:ldc2 #960 <Int -414>
// 6452 11986:castore
// 6453 11987:dup
// 6454 11988:sipush 1612
// 6455 11991:ldc2 #961 <Int -413>
// 6456 11994:castore
// 6457 11995:dup
// 6458 11996:sipush 1613
// 6459 11999:ldc1 #20 <Int 10>
// 6460 12001:castore
// 6461 12002:dup
// 6462 12003:sipush 1614
// 6463 12006:ldc2 #962 <Int -412>
// 6464 12009:castore
// 6465 12010:dup
// 6466 12011:sipush 1615
// 6467 12014:ldc2 #963 <Int -410>
// 6468 12017:castore
// 6469 12018:dup
// 6470 12019:sipush 1616
// 6471 12022:ldc1 #30 <Int 18>
// 6472 12024:castore
// 6473 12025:dup
// 6474 12026:sipush 1617
// 6475 12029:ldc2 #964 <Int -409>
// 6476 12032:castore
// 6477 12033:dup
// 6478 12034:sipush 1618
// 6479 12037:ldc2 #964 <Int -409>
// 6480 12040:castore
// 6481 12041:dup
// 6482 12042:sipush 1619
// 6483 12045:ldc1 #22 <Int 0>
// 6484 12047:castore
// 6485 12048:dup
// 6486 12049:sipush 1620
// 6487 12052:ldc2 #965 <Int -408>
// 6488 12055:castore
// 6489 12056:dup
// 6490 12057:sipush 1621
// 6491 12060:ldc2 #965 <Int -408>
// 6492 12063:castore
// 6493 12064:dup
// 6494 12065:sipush 1622
// 6495 12068:ldc1 #30 <Int 18>
// 6496 12070:castore
// 6497 12071:dup
// 6498 12072:sipush 1623
// 6499 12075:ldc2 #966 <Int -407>
// 6500 12078:castore
// 6501 12079:dup
// 6502 12080:sipush 1624
// 6503 12083:ldc2 #967 <Int -406>
// 6504 12086:castore
// 6505 12087:dup
// 6506 12088:sipush 1625
// 6507 12091:ldc1 #20 <Int 10>
// 6508 12093:castore
// 6509 12094:dup
// 6510 12095:sipush 1626
// 6511 12098:ldc2 #968 <Int -405>
// 6512 12101:castore
// 6513 12102:dup
// 6514 12103:sipush 1627
// 6515 12106:ldc2 #968 <Int -405>
// 6516 12109:castore
// 6517 12110:dup
// 6518 12111:sipush 1628
// 6519 12114:ldc1 #30 <Int 18>
// 6520 12116:castore
// 6521 12117:dup
// 6522 12118:sipush 1629
// 6523 12121:ldc2 #969 <Int -404>
// 6524 12124:castore
// 6525 12125:dup
// 6526 12126:sipush 1630
// 6527 12129:ldc2 #970 <Int -401>
// 6528 12132:castore
// 6529 12133:dup
// 6530 12134:sipush 1631
// 6531 12137:ldc1 #22 <Int 0>
// 6532 12139:castore
// 6533 12140:dup
// 6534 12141:sipush 1632
// 6535 12144:ldc2 #971 <Int -400>
// 6536 12147:castore
// 6537 12148:dup
// 6538 12149:sipush 1633
// 6539 12152:ldc2 #972 <Int -396>
// 6540 12155:castore
// 6541 12156:dup
// 6542 12157:sipush 1634
// 6543 12160:ldc1 #7 <Int 4>
// 6544 12162:castore
// 6545 12163:dup
// 6546 12164:sipush 1635
// 6547 12167:ldc2 #973 <Int -395>
// 6548 12170:castore
// 6549 12171:dup
// 6550 12172:sipush 1636
// 6551 12175:ldc2 #973 <Int -395>
// 6552 12178:castore
// 6553 12179:dup
// 6554 12180:sipush 1637
// 6555 12183:ldc1 #22 <Int 0>
// 6556 12185:castore
// 6557 12186:dup
// 6558 12187:sipush 1638
// 6559 12190:ldc2 #974 <Int -394>
// 6560 12193:castore
// 6561 12194:dup
// 6562 12195:sipush 1639
// 6563 12198:ldc2 #975 <Int -260>
// 6564 12201:castore
// 6565 12202:dup
// 6566 12203:sipush 1640
// 6567 12206:ldc1 #7 <Int 4>
// 6568 12208:castore
// 6569 12209:dup
// 6570 12210:sipush 1641
// 6571 12213:ldc2 #976 <Int -259>
// 6572 12216:castore
// 6573 12217:dup
// 6574 12218:sipush 1642
// 6575 12221:ldc2 #977 <Int -258>
// 6576 12224:castore
// 6577 12225:dup
// 6578 12226:sipush 1643
// 6579 12229:ldc1 #22 <Int 0>
// 6580 12231:castore
// 6581 12232:dup
// 6582 12233:sipush 1644
// 6583 12236:ldc2 #978 <Int -257>
// 6584 12239:castore
// 6585 12240:dup
// 6586 12241:sipush 1645
// 6587 12244:ldc2 #978 <Int -257>
// 6588 12247:castore
// 6589 12248:dup
// 6590 12249:sipush 1646
// 6591 12252:ldc1 #12 <Int 14>
// 6592 12254:castore
// 6593 12255:dup
// 6594 12256:sipush 1647
// 6595 12259:ldc2 #979 <Int -256>
// 6596 12262:castore
// 6597 12263:dup
// 6598 12264:sipush 1648
// 6599 12267:ldc2 #979 <Int -256>
// 6600 12270:castore
// 6601 12271:dup
// 6602 12272:sipush 1649
// 6603 12275:ldc1 #22 <Int 0>
// 6604 12277:castore
// 6605 12278:dup
// 6606 12279:sipush 1650
// 6607 12282:ldc2 #980 <Int -255>
// 6608 12285:castore
// 6609 12286:dup
// 6610 12287:sipush 1651
// 6611 12290:ldc2 #981 <Int -254>
// 6612 12293:castore
// 6613 12294:dup
// 6614 12295:sipush 1652
// 6615 12298:ldc1 #30 <Int 18>
// 6616 12300:castore
// 6617 12301:dup
// 6618 12302:sipush 1653
// 6619 12305:ldc2 #982 <Int -253>
// 6620 12308:castore
// 6621 12309:dup
// 6622 12310:sipush 1654
// 6623 12313:ldc2 #983 <Int -251>
// 6624 12316:castore
// 6625 12317:dup
// 6626 12318:sipush 1655
// 6627 12321:ldc1 #20 <Int 10>
// 6628 12323:castore
// 6629 12324:dup
// 6630 12325:sipush 1656
// 6631 12328:ldc2 #984 <Int -250>
// 6632 12331:castore
// 6633 12332:dup
// 6634 12333:sipush 1657
// 6635 12336:ldc2 #985 <Int -246>
// 6636 12339:castore
// 6637 12340:dup
// 6638 12341:sipush 1658
// 6639 12344:ldc1 #30 <Int 18>
// 6640 12346:castore
// 6641 12347:dup
// 6642 12348:sipush 1659
// 6643 12351:ldc2 #986 <Int -245>
// 6644 12354:castore
// 6645 12355:dup
// 6646 12356:sipush 1660
// 6647 12359:ldc2 #986 <Int -245>
// 6648 12362:castore
// 6649 12363:dup
// 6650 12364:sipush 1661
// 6651 12367:ldc1 #20 <Int 10>
// 6652 12369:castore
// 6653 12370:dup
// 6654 12371:sipush 1662
// 6655 12374:ldc2 #987 <Int -244>
// 6656 12377:castore
// 6657 12378:dup
// 6658 12379:sipush 1663
// 6659 12382:ldc2 #987 <Int -244>
// 6660 12385:castore
// 6661 12386:dup
// 6662 12387:sipush 1664
// 6663 12390:ldc1 #14 <Int 12>
// 6664 12392:castore
// 6665 12393:dup
// 6666 12394:sipush 1665
// 6667 12397:ldc2 #988 <Int -243>
// 6668 12400:castore
// 6669 12401:dup
// 6670 12402:sipush 1666
// 6671 12405:ldc2 #988 <Int -243>
// 6672 12408:castore
// 6673 12409:dup
// 6674 12410:sipush 1667
// 6675 12413:ldc1 #20 <Int 10>
// 6676 12415:castore
// 6677 12416:dup
// 6678 12417:sipush 1668
// 6679 12420:ldc2 #989 <Int -242>
// 6680 12423:castore
// 6681 12424:dup
// 6682 12425:sipush 1669
// 6683 12428:ldc2 #989 <Int -242>
// 6684 12431:castore
// 6685 12432:dup
// 6686 12433:sipush 1670
// 6687 12436:ldc1 #14 <Int 12>
// 6688 12438:castore
// 6689 12439:dup
// 6690 12440:sipush 1671
// 6691 12443:ldc2 #990 <Int -241>
// 6692 12446:castore
// 6693 12447:dup
// 6694 12448:sipush 1672
// 6695 12451:ldc2 #990 <Int -241>
// 6696 12454:castore
// 6697 12455:dup
// 6698 12456:sipush 1673
// 6699 12459:ldc1 #18 <Int 9>
// 6700 12461:castore
// 6701 12462:dup
// 6702 12463:sipush 1674
// 6703 12466:ldc2 #991 <Int -240>
// 6704 12469:castore
// 6705 12470:dup
// 6706 12471:sipush 1675
// 6707 12474:ldc2 #992 <Int -231>
// 6708 12477:castore
// 6709 12478:dup
// 6710 12479:sipush 1676
// 6711 12482:ldc1 #16 <Int 8>
// 6712 12484:castore
// 6713 12485:dup
// 6714 12486:sipush 1677
// 6715 12489:ldc2 #993 <Int -230>
// 6716 12492:castore
// 6717 12493:dup
// 6718 12494:sipush 1678
// 6719 12497:ldc2 #993 <Int -230>
// 6720 12500:castore
// 6721 12501:dup
// 6722 12502:sipush 1679
// 6723 12505:ldc1 #14 <Int 12>
// 6724 12507:castore
// 6725 12508:dup
// 6726 12509:sipush 1680
// 6727 12512:ldc2 #994 <Int -229>
// 6728 12515:castore
// 6729 12516:dup
// 6730 12517:sipush 1681
// 6731 12520:ldc2 #995 <Int -224>
// 6732 12523:castore
// 6733 12524:dup
// 6734 12525:sipush 1682
// 6735 12528:ldc1 #30 <Int 18>
// 6736 12530:castore
// 6737 12531:dup
// 6738 12532:sipush 1683
// 6739 12535:ldc2 #996 <Int -223>
// 6740 12538:castore
// 6741 12539:dup
// 6742 12540:sipush 1684
// 6743 12543:ldc2 #997 <Int -198>
// 6744 12546:castore
// 6745 12547:dup
// 6746 12548:sipush 1685
// 6747 12551:ldc1 #22 <Int 0>
// 6748 12553:castore
// 6749 12554:dup
// 6750 12555:sipush 1686
// 6751 12558:ldc2 #998 <Int -197>
// 6752 12561:castore
// 6753 12562:dup
// 6754 12563:sipush 1687
// 6755 12566:ldc2 #999 <Int -192>
// 6756 12569:castore
// 6757 12570:dup
// 6758 12571:sipush 1688
// 6759 12574:ldc1 #30 <Int 18>
// 6760 12576:castore
// 6761 12577:dup
// 6762 12578:sipush 1689
// 6763 12581:ldc2 #1000 <Int -191>
// 6764 12584:castore
// 6765 12585:dup
// 6766 12586:sipush 1690
// 6767 12589:ldc2 #1001 <Int -166>
// 6768 12592:castore
// 6769 12593:dup
// 6770 12594:sipush 1691
// 6771 12597:ldc1 #22 <Int 0>
// 6772 12599:castore
// 6773 12600:dup
// 6774 12601:sipush 1692
// 6775 12604:ldc2 #1002 <Int -165>
// 6776 12607:castore
// 6777 12608:dup
// 6778 12609:sipush 1693
// 6779 12612:ldc2 #1003 <Int -155>
// 6780 12615:castore
// 6781 12616:dup
// 6782 12617:sipush 1694
// 6783 12620:ldc1 #30 <Int 18>
// 6784 12622:castore
// 6785 12623:dup
// 6786 12624:sipush 1695
// 6787 12627:ldc2 #1004 <Int -154>
// 6788 12630:castore
// 6789 12631:dup
// 6790 12632:sipush 1696
// 6791 12635:ldc2 #1005 <Int -33>
// 6792 12638:castore
// 6793 12639:dup
// 6794 12640:sipush 1697
// 6795 12643:ldc1 #22 <Int 0>
// 6796 12645:castore
// 6797 12646:dup
// 6798 12647:sipush 1698
// 6799 12650:ldc2 #1006 <Int -32>
// 6800 12653:castore
// 6801 12654:dup
// 6802 12655:sipush 1699
// 6803 12658:ldc2 #1007 <Int -31>
// 6804 12661:castore
// 6805 12662:dup
// 6806 12663:sipush 1700
// 6807 12666:ldc1 #20 <Int 10>
// 6808 12668:castore
// 6809 12669:dup
// 6810 12670:sipush 1701
// 6811 12673:ldc2 #1008 <Int -30>
// 6812 12676:castore
// 6813 12677:dup
// 6814 12678:sipush 1702
// 6815 12681:ldc2 #1009 <Int -28>
// 6816 12684:castore
// 6817 12685:dup
// 6818 12686:sipush 1703
// 6819 12689:ldc1 #30 <Int 18>
// 6820 12691:castore
// 6821 12692:dup
// 6822 12693:sipush 1704
// 6823 12696:ldc2 #1010 <Int -27>
// 6824 12699:castore
// 6825 12700:dup
// 6826 12701:sipush 1705
// 6827 12704:ldc2 #1011 <Int -26>
// 6828 12707:castore
// 6829 12708:dup
// 6830 12709:sipush 1706
// 6831 12712:ldc1 #20 <Int 10>
// 6832 12714:castore
// 6833 12715:dup
// 6834 12716:sipush 1707
// 6835 12719:ldc2 #1012 <Int -25>
// 6836 12722:castore
// 6837 12723:dup
// 6838 12724:sipush 1708
// 6839 12727:ldc2 #1012 <Int -25>
// 6840 12730:castore
// 6841 12731:dup
// 6842 12732:sipush 1709
// 6843 12735:ldc1 #22 <Int 0>
// 6844 12737:castore
// 6845 12738:dup
// 6846 12739:sipush 1710
// 6847 12742:ldc2 #1013 <Int -24>
// 6848 12745:castore
// 6849 12746:dup
// 6850 12747:sipush 1711
// 6851 12750:ldc2 #1014 <Int -18>
// 6852 12753:castore
// 6853 12754:dup
// 6854 12755:sipush 1712
// 6855 12758:ldc1 #30 <Int 18>
// 6856 12760:castore
// 6857 12761:dup
// 6858 12762:sipush 1713
// 6859 12765:ldc2 #1015 <Int -17>
// 6860 12768:castore
// 6861 12769:dup
// 6862 12770:sipush 1714
// 6863 12773:ldc2 #1016 <Int -8>
// 6864 12776:castore
// 6865 12777:dup
// 6866 12778:sipush 1715
// 6867 12781:ldc1 #22 <Int 0>
// 6868 12783:castore
// 6869 12784:dup
// 6870 12785:sipush 1716
// 6871 12788:ldc2 #1017 <Int -7>
// 6872 12791:castore
// 6873 12792:dup
// 6874 12793:sipush 1717
// 6875 12796:ldc2 #1018 <Int -5>
// 6876 12799:castore
// 6877 12800:dup
// 6878 12801:sipush 1718
// 6879 12804:ldc1 #12 <Int 14>
// 6880 12806:castore
// 6881 12807:dup
// 6882 12808:sipush 1719
// 6883 12811:ldc2 #1019 <Int -4>
// 6884 12814:castore
// 6885 12815:dup
// 6886 12816:sipush 1720
// 6887 12819:ldc2 #1020 <Int -3>
// 6888 12822:castore
// 6889 12823:dup
// 6890 12824:sipush 1721
// 6891 12827:ldc1 #30 <Int 18>
// 6892 12829:castore
// 6893 12830:dup
// 6894 12831:sipush 1722
// 6895 12834:ldc2 #1021 <Int -2>
// 6896 12837:castore
// 6897 12838:dup
// 6898 12839:sipush 1723
// 6899 12842:ldc2 #1022 <Int -1>
// 6900 12845:castore
// 6901 12846:dup
// 6902 12847:sipush 1724
// 6903 12850:ldc1 #22 <Int 0>
// 6904 12852:castore
// 6905 12853:putstatic #1024 <Field char[] baseTypes>
int j;
for(int i = 0; i < baseTypes.length; i = j + 1)
//*6906 12856:iconst_0
//*6907 12857:istore_1
//*6908 12858:iload_1
//*6909 12859:getstatic #1024 <Field char[] baseTypes>
//*6910 12862:arraylength
//*6911 12863:icmpge 12931
{
char c = baseTypes[i];
// 6912 12866:getstatic #1024 <Field char[] baseTypes>
// 6913 12869:iload_1
// 6914 12870:caload
// 6915 12871:istore_2
char ac[] = baseTypes;
// 6916 12872:getstatic #1024 <Field char[] baseTypes>
// 6917 12875:astore 5
i++;
// 6918 12877:iload_1
// 6919 12878:iconst_1
// 6920 12879:iadd
// 6921 12880:istore_1
char c1 = ac[i];
// 6922 12881:aload 5
// 6923 12883:iload_1
// 6924 12884:caload
// 6925 12885:istore_3
ac = baseTypes;
// 6926 12886:getstatic #1024 <Field char[] baseTypes>
// 6927 12889:astore 5
j = i + 1;
// 6928 12891:iload_1
// 6929 12892:iconst_1
// 6930 12893:iadd
// 6931 12894:istore 4
byte byte0 = (byte)ac[j];
// 6932 12896:aload 5
// 6933 12898:iload 4
// 6934 12900:caload
// 6935 12901:int2byte
// 6936 12902:istore_0
for(i = ((int) (c)); i <= c1; i++)
//*6937 12903:iload_2
//*6938 12904:istore_1
//*6939 12905:iload_1
//*6940 12906:iload_3
//*6941 12907:icmpgt 12923
rtypes[i] = byte0;
// 6942 12910:getstatic #60 <Field byte[] rtypes>
// 6943 12913:iload_1
// 6944 12914:iload_0
// 6945 12915:bastore
// 6946 12916:iload_1
// 6947 12917:iconst_1
// 6948 12918:iadd
// 6949 12919:istore_1
}
// 6950 12920:goto 12905
// 6951 12923:iload 4
// 6952 12925:iconst_1
// 6953 12926:iadd
// 6954 12927:istore_1
//*6955 12928:goto 12858
//*6956 12931:return
}
}
|
liebeskind/Spoke
|
src/ui/properties/ModelNodeEditor.js
|
import React, { Component } from "react";
import PropTypes from "prop-types";
import NodeEditor from "./NodeEditor";
import SelectInput from "../inputs/SelectInput";
import InputGroup from "../inputs/InputGroup";
import BooleanInput from "../inputs/BooleanInput";
import ModelInput from "../inputs/ModelInput";
export default class ModelNodeEditor extends Component {
static propTypes = {
editor: PropTypes.object,
node: PropTypes.object
};
static iconClassName = "fa-cube";
static description = "A 3D model in your scene, loaded from a GLTF URL or file.";
onChangeSrc = (src, { scaleToFit }) => {
if (scaleToFit) {
this.props.node.scaleToFit = scaleToFit;
}
this.props.editor.setNodeProperty(this.props.node, "src", src);
};
onChangeAnimation = activeClipName => {
this.props.editor.setNodeProperty(this.props.node, "activeClipName", activeClipName);
};
onChangeCollidable = collidable => {
this.props.editor.setNodeProperty(this.props.node, "collidable", collidable);
};
onChangeWalkable = walkable => {
this.props.editor.setNodeProperty(this.props.node, "walkable", walkable);
};
onChangeCastShadow = castShadow => {
this.props.editor.setNodeProperty(this.props.node, "castShadow", castShadow);
};
onChangeReceiveShadow = receiveShadow => {
this.props.editor.setNodeProperty(this.props.node, "receiveShadow", receiveShadow);
};
render() {
const node = this.props.node;
const activeClipName = node.activeClipName;
const clipOptions = node.getClipNames().map(name => ({ label: name, value: name }));
clipOptions.unshift({ label: "None", value: null });
return (
<NodeEditor description={ModelNodeEditor.description} {...this.props}>
<InputGroup name="Model">
<ModelInput value={node.src} onChange={this.onChangeSrc} />
</InputGroup>
<InputGroup name="Loop Animation">
<SelectInput options={clipOptions} value={activeClipName} onChange={this.onChangeAnimation} />
</InputGroup>
<InputGroup name="Collidable">
<BooleanInput value={node.collidable} onChange={this.onChangeCollidable} />
</InputGroup>
<InputGroup name="Walkable">
<BooleanInput value={node.walkable} onChange={this.onChangeWalkable} />
</InputGroup>
<InputGroup name="Cast Shadow">
<BooleanInput value={node.castShadow} onChange={this.onChangeCastShadow} />
</InputGroup>
<InputGroup name="Receive Shadow">
<BooleanInput value={node.receiveShadow} onChange={this.onChangeReceiveShadow} />
</InputGroup>
</NodeEditor>
);
}
}
|
fiadone/toolchain
|
packages/server/scaffold/server/helpers/async.js
|
const axios = require('axios')
/**
* Decorates config with default headers
* @param {object} config The axios config
*/
function withDefaultHeaders(config) {
if (!config.headers) {
config.headers = {
'Content-Type': 'application/json',
accept: 'application/json'
}
}
return config
}
/**
* Decorates config with authorization headers
* @param {object} config The axios config
* @param {string} jwt The authorization token
*/
function withAuthorization(config, jwt) {
if (jwt) {
config.headers.Authorization = `Bearer ${jwt}`
}
return config
}
/**
* Decorates config with transformResponse in order to provide a result shorthand
* @param {object} config The axios config
*/
function withResponseSuccess(config) {
config.transformResponse = data => {
data.success = data.status >= 200 && data.status < 300
}
return config
}
/**
* Async request handler
* @param {object} config The axios config
* @param {string} jwt The authorization token
*/
async function asyncRequest(config, jwt) {
config = withResponseSuccess(withAuthorization(withDefaultHeaders(config), jwt))
let response = {}
try {
response = await axios(config)
} catch (error) {
response = error.response
}
return response
}
module.exports = asyncRequest
|
sbg/sevenbridges-python
|
tests/test_automations.py
|
import faker
import pytest
import tempfile
import os
from sevenbridges.errors import SbgError
from sevenbridges.transfer.upload import CodePackageUpload
generator = faker.Factory.create()
def test_get_automation(api, given, verifier):
# precondition
api.aa = True
id = generator.uuid4()
given.automations.exists(id=id)
# action
automation = api.automations.get(id=id)
# verification
assert automation.id == id
verifier.automations.fetched(id=id)
@pytest.mark.parametrize("name", [generator.name(), None])
def test_create_automation(api, given, verifier, name):
# preconditions
automation_description = generator.name()
billing_group = generator.uuid4()
settings = {
"secret_token": generator.uuid4()
}
given.automations.can_be_created(
name=name,
billing_group=billing_group,
description=automation_description,
secret_settings=settings
)
# action
if name:
automation = api.automations.create(
name=name, billing_group=billing_group,
description=automation_description,
secret_settings=settings
)
# verification
assert automation.name == name
assert automation.description == automation_description
assert automation.billing_group == billing_group
assert set(automation.secret_settings).issubset(set(settings))
verifier.automations.created()
else:
with pytest.raises(SbgError):
api.automations.create(
name=name, billing_group=billing_group,
description=automation_description
)
@pytest.mark.parametrize("project_based", [True, False])
def test_create_project_based_automation(api, given, project_based):
# preconditions
name = generator.name()
given.automations.can_be_created(name=name, project_based=project_based)
# action
automation = api.automations.create(name, project_based=project_based)
# verification
assert automation.project_based == project_based
def test_modify_automation(api, given, verifier):
# preconditions
automation_id = generator.uuid4()
given.automations.exists(id=automation_id)
new_name = generator.name()
new_billing_group = generator.uuid4()
given.automations.can_be_saved(
id=automation_id, name=new_name, billing_group=new_billing_group
)
# action
automation = api.automations.get(automation_id)
# verification
automation.name = new_name
automation.billing_group = new_billing_group
automation.save()
assert automation.name == new_name
assert automation.billing_group == new_billing_group
verifier.automations.saved(id=automation.id)
def test_archive_automation(api, given, verifier):
# preconditions
automation_id = generator.uuid4()
given.automations.exists(id=automation_id)
given.automations.can_be_archived(id=automation_id)
# action
automation = api.automations.get(automation_id)
automation.archive()
assert automation.archived
# verification
verifier.automations.action_archive_performed(id=automation.id)
def test_restore_automation(api, given, verifier):
# preconditions
automation_id = generator.uuid4()
given.automations.exists(id=automation_id)
given.automations.can_be_restored(id=automation_id)
# action
automation = api.automations.get(automation_id)
automation.restore()
assert not automation.archived
# verification
verifier.automations.action_restore_performed(id=automation.id)
def test_query_automations(api, given, verifier):
# preconditions
api.aa = True
total = 10
name = generator.slug()
given.automations.query(total)
# action
automations = api.automations.query(name=name)
# verification
assert len(automations) == total
verifier.automations.queried(name=name)
def test_get_packages(api, given, verifier):
# precondition
api.aa = True
total = 10
id = generator.uuid4()
given.automations.exists(id=id)
given.automations.has_packages(id, total)
# action
automation = api.automations.get(id)
members = automation.get_packages()
# verification
assert len(members) == total
verifier.automations.packages_retrieved(id)
def test_get_package(api, given, verifier):
# precondition
api.aa = True
package_id = generator.uuid4()
given.automations.has_package(package_id)
# action
package = api.automations.get_package(package_id)
# verification
assert package.id == package_id
verifier.automations.package_retrieved(package_id)
'''
# Commenting theses two tests out due to upload issue they have
@pytest.mark.parametrize("file", [True, False])
@pytest.mark.parametrize("version", [generator.slug(), None])
@pytest.mark.parametrize("schema", [{"test": "test"}, None])
def test_add_package(api, given, verifier, file, version, schema):
# preconditions
automation_id = generator.uuid4()
package_id = generator.uuid4()
package_file_id = generator.uuid4()
upload_id = generator.uuid4()
file_part_url = generator.url()
given.automations.exists(id=automation_id)
given.automations.can_add_package(
package_id=package_id, automation_id=automation_id,
location=package_file_id, version=version, schema=schema
)
given.cp_uploads.initialized_upload(part_size=1, upload_id=upload_id)
given.cp_uploads.got_file_part(file_part_url)
given.cp_uploads.got_etag(file_part_url)
given.cp_uploads.reported_part()
given.cp_uploads.finalized_upload(package_file_id)
automation = api.automations.get(automation_id)
# action
if file and version and schema:
temp_file = tempfile.NamedTemporaryFile('w', delete=False, dir='/tmp')
temp_file.write('dummy content')
temp_file.close()
package = automation.add_package(
file_path=temp_file.name, version=version, schema=schema
)
os.remove(temp_file.name)
# verification
assert package.location == package_file_id
assert package.version == version
verifier.automation_packages.created(automation_id=automation_id)
else:
with pytest.raises(SbgError):
automation.add_package(
file_path=None, version=version,
schema=schema
)
@pytest.mark.parametrize("empty_file", [True, False])
def test_code_package_upload(api, given, empty_file):
upload_id = generator.uuid4()
automation_id = generator.uuid4()
file_id = generator.uuid4()
file_part_url = generator.url()
file_name = generator.uuid4()
given.cp_uploads.initialized_upload(part_size=1, upload_id=upload_id)
given.cp_uploads.got_file_part(file_part_url)
given.cp_uploads.got_etag(file_part_url)
given.cp_uploads.reported_part()
given.cp_uploads.finalized_upload(file_id)
temp_file = tempfile.NamedTemporaryFile('w', delete=False, dir='/tmp')
if not empty_file:
temp_file.write('dummy content')
temp_file.close()
if empty_file:
with pytest.raises(SbgError):
CodePackageUpload(
temp_file.name,
automation_id,
api=api,
part_size=1,
file_name=file_name
)
else:
upload = CodePackageUpload(
temp_file.name,
automation_id,
api=api,
part_size=1,
file_name=file_name
)
upload.start()
upload.wait()
result = upload.result()
assert upload.status == 'COMPLETED'
assert result.id == file_id
os.remove(temp_file.name)
'''
def test_code_package_upload_stop(api, given):
upload_id = generator.uuid4()
automation_id = generator.uuid4()
file_part_url = generator.url()
file_name = generator.uuid4()
given.cp_uploads.initialized_upload(part_size=1, upload_id=upload_id)
given.cp_uploads.got_file_part(file_part_url)
given.cp_uploads.got_etag(file_part_url)
given.cp_uploads.reported_part()
given.cp_uploads.deleted()
temp_file = tempfile.NamedTemporaryFile('w', delete=False, dir='/tmp')
temp_file.write('dummy content')
temp_file.close()
upload = CodePackageUpload(
temp_file.name,
automation_id,
api=api,
part_size=1,
file_name=file_name
)
upload.start()
upload._status = 'RUNNING'
upload.stop()
os.remove(temp_file.name)
assert upload.status == 'STOPPED'
def test_archive_package(api, given, verifier):
# preconditions
automation_id = generator.uuid4()
package_id = generator.uuid4()
given.automation_packages.exists(
id=package_id, automation=automation_id
)
given.automation_packages.can_be_archived(
id=package_id, automation=automation_id
)
# action
package = api.automations.get_package(package_id)
package.archive()
assert package.archived
# verification
verifier.automation_packages.action_archive_performed(
automation_id=automation_id, package_id=package_id
)
def test_modify_package(api, given, verifier):
# preconditions
automation_id = generator.uuid4()
package_id = generator.uuid4()
new_custom_url = generator.url()
given.automation_packages.exists(
id=package_id, automation=automation_id
)
given.automation_packages.can_be_saved(
id=package_id, automation=automation_id, custom_url=new_custom_url
)
# action
package = api.automation_packages.get(package_id)
package.custom_url = new_custom_url
package.save()
assert package.custom_url == new_custom_url
# verification
verifier.automation_packages.saved(id=package_id)
def test_restore_package(api, given, verifier):
# preconditions
automation_id = generator.uuid4()
package_id = generator.uuid4()
given.automation_packages.exists(
id=package_id, automation=automation_id
)
given.automation_packages.can_be_restored(
id=package_id, automation=automation_id
)
# action
package = api.automations.get_package(package_id)
package.restore()
assert not package.archived
# verification
verifier.automation_packages.action_restore_performed(
automation_id=automation_id, package_id=package_id
)
def test_get_member(api, given, verifier):
# precondition
api.aa = True
member_username = generator.user_name()
id = generator.uuid4()
given.automations.exists(id=id)
given.automations.has_member(id, member_username)
# action
automation = api.automations.get(id)
member = automation.get_member(member_username)
# verification
assert member.username == member_username
verifier.automations.member_retrieved(id, member_username)
def test_get_members(api, given, verifier):
# precondition
api.aa = True
total = 10
id = generator.uuid4()
given.automations.exists(id=id)
given.automations.has_members(id, total)
# action
automation = api.automations.get(id)
packages = automation.get_members()
# verification
assert len(packages) == total
verifier.automations.members_retrieved(id)
def test_add_member(api, given, verifier):
# precondition
api.aa = True
username = generator.user_name()
permissions = {
"write": True,
"read": True,
"copy": True,
"execute": True,
"admin": True
}
id = generator.uuid4()
given.automations.exists(id=id)
given.automations.can_add_member(id, username)
# action
automation = api.automations.get(id)
automation.add_member(username, permissions)
# verification
verifier.automations.member_added(id)
def test_remove_member(api, given, verifier):
# precondition
api.aa = True
id = generator.uuid4()
username = generator.user_name()
given.automations.exists(id=id)
given.automations.has_member(id, username)
given.automations.can_remove_member(id, username)
# action
automation = api.automations.get(id)
automation.remove_member(username)
# verification
verifier.automations.member_removed(id, username)
def test_save_member(api, given, verifier):
# precondition
api.aa = True
id = generator.uuid4()
username = generator.user_name()
given.automations.exists(id=id)
given.automations.has_member(id=id, username=username)
given.automation_members.exists(username=username, automation=id)
given.automation_members.can_be_saved(username=username, automation=id)
# # action
automation = api.automations.get(id=id)
member = automation.get_member(username=username)
member.permissions['admin'] = True
member.save()
# # verification
verifier.automation_members.saved(automation=id, username=username)
def test_get_runs(api, given, verifier):
# precondition
api.aa = True
total = 10
name = generator.name()
id = generator.uuid4()
given.automations.exists(id=id)
given.automations.has_runs(id, total)
# action
automation = api.automations.get(id)
runs = automation.get_runs(name=name)
# verification
assert len(runs) == total
verifier.automations.runs_retrieved()
def test_get_run(api, given, verifier):
# precondition
api.aa = True
id = generator.uuid4()
given.automation_runs.exists(id=id)
# action
automation_run = api.automation_runs.get(id=id)
# verification
assert automation_run.id == id
verifier.automation_runs.fetched(id=id)
def test_query_runs(api, given, verifier):
# precondition
api.aa = True
total = 10
name = generator.name()
given.automation_runs.query(total=total)
# action
automation_runs = api.automation_runs.query(name=name)
# verification
assert len(automation_runs) == total
verifier.automation_runs.queried(name=name)
def test_create_run(api, given, verifier):
# precondition
api.aa = True
inputs = {}
name = generator.name()
id = generator.uuid4()
secret_settings = {generator.name(): generator.name()}
given.automations.exists(id=id)
given.automations.has_packages(id=id, total=1)
given.automation_runs.can_be_created()
# action
automation = api.automations.get(id=id)
package = automation.get_packages()[0]
api.automation_runs.create(
package=package,
inputs=inputs,
name=name,
secret_settings=secret_settings
)
# verification
verifier.automation_runs.created()
def test_stop_run(api, given, verifier):
# precondition
api.aa = True
id = generator.uuid4()
given.automation_runs.exists(id=id)
given.automation_runs.can_be_stopped(id=id)
# action
automation_run = api.automation_runs.get(id=id)
automation_run.stop()
# verification
verifier.automation_runs.stopped(id=id)
def test_get_run_log(api, given):
# precondition
api.aa = True
id = generator.uuid4()
given.automation_runs.exists(id=id)
# action
automation_run = api.automation_runs.get(id=id)
log_file = automation_run.get_log_file()
# verification
assert log_file
def test_get_run_state(api, given, verifier):
# precondition
api.aa = True
id = generator.uuid4()
expected_state = given.automation_runs.default_state()
given.automation_runs.exists(id=id)
given.automation_runs.has_state(id=id, state=expected_state)
# action
automation_run = api.automation_runs.get(id=id)
state = automation_run.get_state()
# verification
assert expected_state == state
verifier.automation_runs.state_fetched(id=id)
def test_rerun(api, given, verifier):
# precondition
api.aa = True
inputs = {}
name = generator.name()
id = generator.uuid4()
secret_settings = {generator.name(): generator.name()}
given.automation_runs.has_rerun(
id=id,
secret_settings=secret_settings,
inputs=inputs,
name=name,
merge=True
)
# action
api.automation_runs.rerun(
id=id, inputs=inputs, secret_settings=secret_settings, name=name,
merge=True
)
# verification
verifier.automation_runs.reran(id=id)
def test_update(api, given, verifier):
# precondition
api.aa = True
id = generator.uuid4()
new_name = generator.name()
given.automation_runs.exists(id=id)
run = api.automation_runs.get(id=id)
# action
run.name = new_name
# verification
verifier.automation_runs.updated(id=id)
|
alibaba/id2_client_sdk
|
include/irot/se/irot_hal.h
|
/*
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
*/
#ifndef __IROT_HAL_H__
#define __IROT_HAL_H__
#include "ls_osa.h"
#ifdef __cplusplus
extern "C" {
#endif
#define KEY_ID_ID2 0 /* Key is used by ID2 */
/* irot hal error code definitions */
#define IROT_SUCCESS 0 /* The operation was successful */
#define IROT_ERROR_GENERIC -1 /* The generice error */
#define IROT_ERROR_BAD_PARAMETERS -2 /* Input parameters are invalid */
#define IROT_ERROR_SHORT_BUFFER -3 /* The supplied buffer is too short for output */
#define IROT_ERROR_EXCESS_DATA -4 /* Too much data for the requested operation */
#define IROT_ERROR_OUT_OF_MEMORY -5 /* Out of memory */
#define IROT_ERROR_COMMUNICATION -7 /* Communication error */
#define IROT_ERROR_NOT_SUPPORTED -8 /* The request operation is not supported */
#define IROT_ERROR_NOT_IMPLEMENTED -9 /* The request operation is not implemented */
#define IROT_ERROR_TIMEOUT -10 /* Communication timeout */
#define IROT_ERROR_ITEM_NOT_FOUND -11 /* The item is not exist */
typedef int irot_result_t;
typedef enum {
BLOCK_MODE_ECB = 0x00,
BLOCK_MODE_CBC = 0x01,
BLOCK_MODE_CTR = 0x02,
} block_mode_t;
typedef enum {
SYM_PADDING_NOPADDING = 0x00,
SYM_PADDING_PKCS5 = 0x02,
SYM_PADDING_PKCS7 = 0x03,
} irot_sym_padding_t;
typedef enum {
ASYM_PADDING_NOPADDING = 0x00,
ASYM_PADDING_PKCS1 = 0x01,
} irot_asym_padding_t;
typedef enum {
MODE_DECRYPT = 0x00,
MODE_ENCRYPT = 0x01,
} crypto_mode_t;
typedef enum {
ASYM_TYPE_RSA_MD5_PKCS1 = 0x00,
ASYM_TYPE_RSA_SHA1_PKCS1 = 0x01,
ASYM_TYPE_RSA_SHA256_PKCS1 = 0x02,
ASYM_TYPE_RSA_SHA384_PKCS1 = 0x03,
ASYM_TYPE_RSA_SHA512_PKCS1 = 0x04,
ASYM_TYPE_SM2_SM3 = 0x05,
ASYM_TYPE_ECDSA = 0x06,
} asym_sign_verify_t;
typedef enum {
HASH_TYPE_SHA1 = 0x00,
HASH_TYPE_SHA224 = 0x01,
HASH_TYPE_SHA256 = 0x02,
HASH_TYPE_SHA384 = 0x03,
HASH_TYPE_SHA512 = 0x04,
HASH_TYPE_SM3 = 0x05,
} hash_t;
typedef struct _sym_crypto_param_t {
block_mode_t block_mode; ///< block mode
irot_sym_padding_t padding_type; ///< padding type
crypto_mode_t mode; ///< mode(encrypt or decrypt)
} sym_crypto_param_t;
// key object
typedef struct {
struct {
uint8_t key_object_type; ///< the key object type
} head;
struct {
uint8_t buf[0x04]; ///< placeholder for key
} body;
} key_object;
typedef struct {
struct {
uint8_t key_object_type;
} head;
struct {
uint8_t *key_value; ///< the key value
uint32_t key_len; ///< the key length(bytes)
} body;
} key_object_sym;
typedef struct {
struct {
uint8_t key_object_type;
} head;
struct {
uint8_t *e; ///< public exponent
uint32_t e_len; ///< public exponent length(bytes)
uint8_t *n; ///< public modulus
uint32_t n_len; ///< public modulus length(bytes)
} body;
} key_object_rsa_public;
typedef struct {
struct {
uint8_t key_object_type;
} head;
struct {
uint8_t *d; ///< private exponent
uint32_t d_len; ///< private exponent length(bytes)
uint8_t *n; ///< private modulus
uint32_t n_len; ///< private modulus length(bytes)
} body;
} key_object_rsa_private;
typedef struct {
struct {
uint8_t key_object_type;
} head;
struct {
uint8_t *p; ///< 1st prime factor
uint8_t *q; ///< 2st prime factor
uint8_t *dp; ///< d % (p - 1)
uint8_t *dq; ///< d % (q - 1)
uint8_t *qinv; ///< (1/q) % p
uint32_t len; ///< the length for the 5 parameters must with the same length(bytes)
} body;
} key_object_rsa_crt_private;
irot_result_t irot_hal_init(void);
/**
* @brief get the ID2 value, the length is 12 bytes with hex format.
*
* @param[out] id2: output buffer, which size must >= 12 bytes.
* @param[inout] len: in - the ID2 buffer size; out - the actual length.
*
* @return @see error code definitions.
*/
irot_result_t irot_hal_get_id2(uint8_t *id2, uint32_t *len);
/**
* @brief encrypt or decrypt the data with symmetric algorithms.
*
* @param[in] key_obj: if the key object is not null, then use this parameter as the key;
* otherwise, use the internal key identified by the key id parameter.
* @param[in] key_id: identify the internal key.
* @param[in] in: the input data.
* @param[in] in_len: the input data length.
* @param[out] out: the output buffer.
* @param[inout] out_len: in - the buffer size; out - the actual length.
* @param[in] crypto_param: see sym_crypto_param_t definition.
*
* @return @see error code definitions.
*/
irot_result_t irot_hal_sym_crypto(key_object *key_obj, uint8_t key_id,
const uint8_t *iv, uint32_t iv_len,
const uint8_t *in, uint32_t in_len,
uint8_t *out, uint32_t *out_len,
sym_crypto_param_t *crypto_param);
/**
* @brief compute the signature result with the asymmetric algorithms.
*
* @param[in] key_obj: if the key object is not null, then use this parameter as the key;
* otherwise, use the internal key identified by the key id parameter.
* @param[in] key_id: identify the internal key.
* @param[in] in: the input data.
* @param[in] in_len: the input data length.
* @param[out] out: the output buffer.
* @param[inout] out_len: in - the buffer size; out - the actual length.
* @param[in] type: see asym_sign_verify_t definition.
*
* @return @see error code definitions.
*/
irot_result_t irot_hal_asym_priv_sign(key_object *key_obj, uint8_t key_id,
const uint8_t *in, uint32_t in_len,
uint8_t *out, uint32_t *out_len,
asym_sign_verify_t type);
/**
* @brief decrypt the data with the asymmetric algorithms.
*
* @param[in] key_obj: if the key object is not null, then use this parameter as the key;
* otherwise, use the internal key identified by the key id parameter.
* @param[in] key_id: identify the internal key.
* @param[in] in: the input data.
* @param[in] in_len: the input data length.
* @param[out] out: the output buffer.
* @param[inout] out_len: in - the buffer size; out - the actual length.
* @param[in] padding: see asym_padding_t definition.
*
* @return @see error code definitions.
*/
irot_result_t irot_hal_asym_priv_decrypt(key_object *key_obj, uint8_t key_id,
const uint8_t *in, uint32_t in_len,
uint8_t *out, uint32_t *out_len,
irot_asym_padding_t padding);
/**
* @brief compute the hash with the hash type.
*
* @param[in] in: the input data.
* @param[in] in_len: the input data length.
* @param[out] out: the output data buffer.
* @param[inout] out_len: in - the buffer size; out - the actual length.
* @param[in] type: the hash type.
*
* @return @see error code definitions.
*/
irot_result_t irot_hal_hash_sum(const uint8_t *in, uint32_t in_len, uint8_t *out, uint32_t *out_len, hash_t type);
/**
* @brief generate random number with the given length.
*
* @param[in] buf: the output buffer.
* @param[in] len: the output length to be generated with random bytes.
*
* @return @see error code definitions.
*/
irot_result_t irot_hal_get_random(uint8_t *buf, uint32_t len);
/*
* @brief irot hal cleanup.
*
* @return @see error code definitions.
*/
irot_result_t irot_hal_cleanup(void);
#ifdef __cplusplus
}
#endif
#endif /* __IROT_HAL_H__ */
|
ideaslocas/aDLL
|
dlldiscovery/initstructures.cpp
|
<reponame>ideaslocas/aDLL
#include "adll.h"
DLLINFO* InitDLLInfo(size_t size)
{
DLLINFO* DLL = NULL;
size_t i = 0;
DLL = (DLLINFO*)calloc(size, sizeof(DLLINFO));
if (DLL == NULL)
{
printf("[!] ERROR: InitDLLInfo - calloc couldn't allocate memory\n");
return NULL;
}
for (i = 0; i < size; i++)
{
DLL[i].Name = NULL;
DLL[i].Import = L"";
DLL[i].dFlag = 0;
DLL[i].pFlag = L"";
DLL[i].Known = 0;
DLL[i].Found = 0;
DLL[i].FPath = L"";
DLL[i].ReLvl = 0;
DLL[i].ReDLLs = NULL;
}
return DLL;
}
VOID InitSchPaths(SCHPATHS *SPaths, LPCWSTR fPath, WORD Arch)
{
WCHAR Buff[MAX_PATH] = { 0 };
size_t Len = 0;
// Get the executable directory
Len = wcslen(fPath);
while (fPath[Len] != '\\')
{
Len--;
}
wcsncpy_s(Buff, _countof(Buff), fPath, Len);
SPaths->AppDir = _wcsdup(Buff);
ZeroMemory(Buff, MAX_PATH);
// 32-bit applications are redirected by the File System to SysWoW64 directory if they try to acces to System32
if (Arch == 32)
GetSystemWow64Directory(Buff, MAX_PATH);
else
GetSystemDirectoryW(Buff, MAX_PATH);
SPaths->SysDir32 = _wcsdup(Buff);
// There is no function that retrieves the path to the System (16-bit) directory
if (PathIsDirectoryW(L"C:\\Windows\\System"))
SPaths->SysDir16 = _wcsdup(L"C:\\Windows\\System");
else
SPaths->SysDir16 = NULL;
ZeroMemory(Buff, MAX_PATH);
GetWindowsDirectoryW(Buff, MAX_PATH);
SPaths->WinDir = _wcsdup(Buff);
ZeroMemory(Buff, MAX_PATH);
GetCurrentDirectoryW(MAX_PATH, Buff);
SPaths->CWDir = _wcsdup(Buff);
WCHAR PATHBuff[PATHENVMAX] = { 0 };
GetEnvironmentVariableW(L"PATH", PATHBuff, PATHENVMAX);
SPaths->PATHDirs = _wcsdup(PATHBuff);
return;
}
|
jainkuniya/central-medic-center
|
CMC/src/prescription/Prescription.java
|
<reponame>jainkuniya/central-medic-center<filename>CMC/src/prescription/Prescription.java
package prescription;
public class Prescription {
private int medicineId;
private String medicineName;
private double quantity;
private int times;
private int itemId;
public Prescription(int medicineId, String medicineName, double quantity, int times, int itemId) {
this.medicineId = medicineId;
this.medicineName = medicineName;
this.quantity = quantity;
this.times = times;
this.itemId = itemId;
}
public Prescription(String medicineName, double quantity, int times, int itemId) {
this.medicineName = medicineName;
this.quantity = quantity;
this.times = times;
this.itemId = itemId;
}
public int getMedicineId() {
return medicineId;
}
public String getMedicineName() {
return medicineName;
}
public void setMedicineName(String medicineName) {
this.medicineName = medicineName;
}
public double getQuantity() {
return quantity;
}
public void setQuantity(double quantity) {
this.quantity = quantity;
}
public int getTimes() {
return times;
}
public void setTimes(int times) {
this.times = times;
}
public int getItemId() {
return itemId;
}
public void setItemId(int itemId) {
this.itemId = itemId;
}
}
|
andela-jejezie/peopleProject
|
node_modules/bower/node_modules/insight/node_modules/inquirer/node_modules/cli-color/node_modules/es5-ext/object/validate-stringifiable-value.js
|
'use strict';
var value = require('./valid-value')
, stringifiable = require('./validate-stringifiable');
module.exports = function (x) { return stringifiable(value(x)); };
|
jpmiii/ExilePearl
|
src/main/java/com/devotedmc/ExilePearl/core/PearlBoundaryTask.java
|
<filename>src/main/java/com/devotedmc/ExilePearl/core/PearlBoundaryTask.java
package com.devotedmc.ExilePearl.core;
import static vg.civcraft.mc.civmodcore.util.TextUtil.msg;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Chunk;
import org.bukkit.EntityEffect;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.util.Vector;
import com.devotedmc.ExilePearl.BorderHandler;
import com.devotedmc.ExilePearl.ExilePearl;
import com.devotedmc.ExilePearl.ExilePearlApi;
import com.devotedmc.ExilePearl.config.PearlConfig;
import com.devotedmc.ExilePearl.event.PlayerFreedEvent;
import com.devotedmc.ExilePearl.event.PlayerPearledEvent;
import com.devotedmc.ExilePearl.util.BastionWrapper;
import com.google.common.collect.ImmutableList;
/**
* This class tracks the pearls players that are online and prevents them
* from entering the zone around their pearl location.
* <p>
* It also prevents them from entering bastion fields that they don't
* have permission on. (this part isn't done yet)
*
* @author Gordon
*/
final class PearlBoundaryTask extends ExilePearlTask implements BorderHandler {
private Set<UUID> pearledPlayers = new HashSet<UUID>();
private int radius = 1000;
private double bastionDamage = 1;
public static final int KNOCKBACK = 3;
//these material IDs are acceptable for places to teleport player; breathable blocks and water
public static final LinkedHashSet<Integer> safeOpenBlocks = new LinkedHashSet<Integer>(Arrays.asList(
new Integer[] {
0, 6, 8, 9, 27, 28, 30, 31, 32, 37, 38, 39, 40, 50, 55,
59, 63, 64, 65, 66, 68, 69, 70, 71, 72, 75, 76, 77, 78,
83, 90, 93, 94, 96, 104, 105, 106, 115, 131, 132, 141,
142, 149, 150, 157, 171, 175, 177}
));
public static final LinkedHashSet<Integer> okBaseBlocks = new LinkedHashSet<Integer>(Arrays.asList(
new Integer[] {
17, 18, 161, 162}
));
//these material IDs are ones we don't want to drop the player onto, like cactus or lava or fire or activated Ender portal
public static final LinkedHashSet<Integer> painfulBlocks =
new LinkedHashSet<Integer>(Arrays.asList( new Integer[] {10, 11, 51, 81, 119} ));
public PearlBoundaryTask(final ExilePearlApi pearlApi) {
super(pearlApi);
}
@Override
public String getTaskName() {
return "Pearl Boundary";
}
@Override
public int getTickInterval() {
return TICKS_PER_SECOND;
}
@Override
public void start() {
// Track any players who are already online
for(ExilePearl p : pearlApi.getPearls()) {
Player player = p.getPlayer();
if (player != null && player.isOnline()) {
pearledPlayers.add(player.getUniqueId());
}
}
super.start();
if (enabled) {
pearlApi.log("Using pearl radius value of %d.", radius);
}
}
@Override
public void run() {
if (radius == 0)
return;
Collection<UUID> players = ImmutableList.copyOf(pearledPlayers);
for (UUID uid : players) {
checkPlayer(uid);
}
}
/**
* Checks whether a player needs to be snapped back
* @param player The player to check
*/
private void checkPlayer(UUID playerId) {
Player player = pearlApi.getPlayer(playerId);
if (player == null || !player.isOnline()) {
return;
}
// Ignore creative/spectating players
if (player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR) {
return;
}
// Ignore if not pearled
ExilePearl pearl = pearlApi.getPearl(player.getUniqueId());
if (pearl == null) {
return;
}
// Ignore if dead already
if (player.isDead()) {
return;
}
if (!pushoutBastion(player)) {
checkBastion(player);
}
// Ignore non-block holders
if (!pearl.getHolder().isBlock()) {
return;
}
Location pearlLocation = pearl.getLocation();
Location playerLocation = player.getLocation();
// Ignore if different world
if (pearlLocation.getWorld() != playerLocation.getWorld()) {
return;
}
// Ignore if player outside the radius
double distance = Math.sqrt(Math.pow(pearlLocation.getX() - playerLocation.getX(), 2) + Math.pow(pearlLocation.getZ() - playerLocation.getZ(), 2));
if (distance >= radius) {
return;
}
Location newLoc = getCorrectedLocation(pearlLocation, playerLocation, pearl.getPlayer().isFlying());
player.teleport(newLoc, TeleportCause.PLUGIN);
msg(pearl.getPlayer(), "<i>You can't come within %d blocks of your pearl at (%d, %d).", radius,
pearl.getLocation().getBlockX(), pearl.getLocation().getBlockZ());
}
private Location getCorrectedLocation(Location pearlLocation, Location playerLocation, boolean flying) {
double x = pearlLocation.getX();
double z = pearlLocation.getZ();
double xLoc = playerLocation.getX();
double zLoc = playerLocation.getZ();
double yLoc = playerLocation.getY();
double radiusSquared = (radius * radius) + 5;
// algorithm originally from: http://stackoverflow.com/questions/300871/best-way-to-find-a-point-on-a-circle-closest-to-a-given-point
// modified by <NAME> to support elliptical border shape
//Transform the ellipse to a circle with radius 1 (we need to transform the point the same way)
double dX = xLoc - x;
double dZ = zLoc - z;
double dU = Math.sqrt(dX *dX + dZ * dZ); //distance of the untransformed point from the center
double dT = Math.sqrt(dX *dX / radiusSquared + dZ * dZ / radiusSquared); //distance of the transformed point from the center
double f = (1 / dT + KNOCKBACK / dU); //"correction" factor for the distances
xLoc = x + dX * f;
zLoc = z + dZ * f;
int ixLoc = Location.locToBlock(xLoc);
int izLoc = Location.locToBlock(zLoc);
Location wbTest = new Location(playerLocation.getWorld(), xLoc, yLoc, zLoc);
// Jump to other side of circle if this location is outside the world border
if (!pearlApi.isLocationInsideBorder(wbTest)) {
xLoc = x - dX * f;
zLoc = z - dZ * f;
ixLoc = Location.locToBlock(xLoc);
izLoc = Location.locToBlock(zLoc);
}
// Make sure the chunk we're checking in is actually loaded
Chunk tChunk = pearlLocation.getWorld().getChunkAt(ixLoc >> 4, ixLoc >> 4);
if (!tChunk.isLoaded()) {
tChunk.load();
}
yLoc = getSafeY(playerLocation.getWorld(), ixLoc, Location.locToBlock(yLoc), izLoc, flying);
if (yLoc == -1)
return null;
return new Location(playerLocation.getWorld(), Math.round(xLoc) + 0.5, yLoc, Math.round(zLoc) + 0.5, playerLocation.getYaw(), playerLocation.getPitch());
}
// find closest safe Y position from the starting position
@SuppressWarnings("deprecation")
private double getSafeY(World world, int X, int Y, int Z, boolean flying)
{
// artificial height limit of 127 added for Nether worlds since CraftBukkit still incorrectly returns 255 for their max height, leading to players sent to the "roof" of the Nether
final boolean isNether = world.getEnvironment() == World.Environment.NETHER;
int limTop = isNether ? 125 : world.getMaxHeight() - 2;
final int highestBlockBoundary = Math.min(world.getHighestBlockYAt(X, Z) + 1, limTop);
// if Y is larger than the world can be and user can fly, return Y - Unless we are in the Nether, we might not want players on the roof
if (flying && Y > limTop && !isNether)
return (double) Y;
// make sure Y values are within the boundaries of the world.
if (Y > limTop)
{
if (isNether)
Y = limTop; // because of the roof, the nether can not rely on highestBlockBoundary, so limTop has to be used
else
{
if (flying)
Y = limTop;
else
Y = highestBlockBoundary; // there will never be a save block to stand on for Y values > highestBlockBoundary
}
}
if (Y < 0)
Y = 0;
// for non Nether worlds we don't need to check upwards to the world-limit, it is enough to check up to the highestBlockBoundary, unless player is flying
if (!isNether && !flying) {
limTop = highestBlockBoundary;
// Expanding Y search method adapted from Acru's code in the Nether plugin
// look full up first. Start at highest Y; we want to prefer landing on the surface.
int lastOkY = -1;
for(int y2 = limTop - 1; (y2 >= Y); y2--){
// Look above.
if (isSafeSpot(world, X, y2, Z, flying)) {
Integer below = (Integer)world.getBlockTypeIdAt(X, y2 - 1, Z);
if (okBaseBlocks.contains(below)) {
lastOkY = y2;
} else {
return (double)y2;
}
}
}
// We don't prefer to teleport into trees, but beats caves. If we found an option, take it.
if (lastOkY > -1) {
return (double) lastOkY;
}
} else {
// look full up first, starting from active Y (try to preserve level height for nether and flying)
for(int y2 = Y; (y2 > limTop); y2++){
// Look above.
if(y2 < limTop)
{
if (isSafeSpot(world, X, y2, Z, flying))
return (double)y2;
}
}
}
// the look fully below.
for (int y1 = Y; (y1 > 0); y1--) {
// Look below.
if(y1 > 0)
{
if (isSafeSpot(world, X, y1, Z, flying))
return (double)y1;
}
}
// this should help prevent so many cavespawns on pushback.
return -1.0; // no safe Y location?!?!? Must be a rare spot in a Nether world or something
}
/**
* Checks if a particular spot consists of 2 breathable blocks over something relatively solid
* @param world The world
* @param X The x coordinate
* @param Y The y coordinate
* @param Z The z coordinate
* @param flying whether the player is flying
* @return true if the spot is safe
*/
@SuppressWarnings("deprecation")
private boolean isSafeSpot(World world, int X, int Y, int Z, boolean flying)
{
boolean safe = safeOpenBlocks.contains((Integer)world.getBlockTypeIdAt(X, Y, Z)) // target block open and safe
&& safeOpenBlocks.contains((Integer)world.getBlockTypeIdAt(X, Y + 1, Z)); // above target block open and safe
if (!safe || flying)
return safe;
Integer below = (Integer)world.getBlockTypeIdAt(X, Y - 1, Z);
return (safe
&& (!safeOpenBlocks.contains(below) || below == 8 || below == 9) // below target block not open/breathable (so presumably solid), or is water
&& !painfulBlocks.contains(below) // below target block not painful
);
}
/**
* Tracks pearled players that log in
* @param e The event args
*/
@EventHandler(priority=EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerJoin(PlayerJoinEvent e) {
if (pearlApi.isPlayerExiled(e.getPlayer())) {
pearledPlayers.add(e.getPlayer().getUniqueId());
}
}
/**
* Stops tracking pearled players that log out
* @param e The event args
*/
@EventHandler(priority=EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerQuit(PlayerQuitEvent e) {
pearledPlayers.remove(e.getPlayer().getUniqueId());
}
/**
* Tracks newly pearled players
* @param e The event args
*/
@EventHandler(priority=EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerPearled(PlayerPearledEvent e) {
Player p = e.getPearl().getPlayer();
if (p != null && p.isOnline()) {
pearledPlayers.add(e.getPearl().getPlayerId());
}
}
/**
* Stops tracking freed players
* @param e The event args
*/
@EventHandler(priority=EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerFreed(PlayerFreedEvent e) {
pearledPlayers.remove(e.getPearl().getPlayerId());
}
@Override
public void loadConfig(PearlConfig config) {
this.radius = config.getRulePearlRadius();
this.bastionDamage = config.getBastionDamage();
}
/**
* Gets whether a player is being tracked
* @param player The player to check
* @return true if the player is being tracked
*/
public boolean isPlayerTracked(Player player) {
return pearledPlayers.contains(player.getUniqueId());
}
/**
* Checks whether the exiled player is inside any bastion fields they don't have
* permission on and deals them damage if they are.
* @param player The player to check
*/
private void checkBastion(Player player) {
if (pearlApi.isPlayerInUnpermittedBastion(player) && player.getHealth() > 0) {
player.setHealth(Math.max(0, player.getHealth() - bastionDamage));
player.playSound(player.getLocation(), Sound.ENTITY_GENERIC_HURT, 1.0F, 1.0F);
player.playEffect(EntityEffect.HURT);
msg(player, "<b>You aren't allowed in this bastion field when exiled.");
}
}
/**
* Makes a best effort to push a player out of overlapping bastion fields using some fancy vector math.
* Will work with all current types of bastions, square and circle, and resolves the vector intersections
* with ease ... if I remember my maths.
* @param player The player to check
* @return true if the player was in a bastion field AND could be pushed back safely, false otherwise.
* False does _not_ mean they are not in a bastion field.
*/
private boolean pushoutBastion(Player player) {
List<BastionWrapper> bastions = pearlApi.getPlayerInUnpermittedBastion(player);
if (bastions.isEmpty()) {
return false;
}
Location loc = player.getLocation().clone();
Vector v = null;
for (BastionWrapper computeShell : bastions) {
if (v == null) {
v = computeShell.getPushout(loc, KNOCKBACK);
} else {
Vector p = computeShell.getPushout(loc, KNOCKBACK);
if (p != null) {
v.add(p);
}
}
}
if (v != null) {
Location tLoc = loc.add(v);
double yLoc = getSafeY(loc.getWorld(), tLoc.getBlockX(), tLoc.getBlockY(), tLoc.getBlockZ(), player.isFlying());
if (yLoc == -1)
return false;
Location newLoc = new Location(loc.getWorld(), tLoc.getX(), yLoc, tLoc.getZ(), tLoc.getYaw(), tLoc.getPitch());
player.teleport(newLoc, TeleportCause.PLUGIN);
msg(player, "<b>You aren't allowed to enter this bastion field when exiled.");
return true;
}
return false;
}
}
|
whitespur/zheshiyigeniubidexiangmu
|
jsExcuter/src/main/java/com/github/misterchangray/libs/huobi/response/HistoryTrade.java
|
<filename>jsExcuter/src/main/java/com/github/misterchangray/libs/huobi/response/HistoryTrade.java
package com.github.misterchangray.libs.huobi.response;
/**
* @Author ISME
* @Date 2018/1/14
* @Time 15:24
*/
public class HistoryTrade {
/**
* id : 17592256642623
* amount : 0.04
* price : 1997
* direction : buy
* ts : 1502448920106
*/
private long id;
private double amount;
private int price;
private String direction;
private long ts;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public double getAmount() {
return amount;
}
public void setAmount(double amount) {
this.amount = amount;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
public String getDirection() {
return direction;
}
public void setDirection(String direction) {
this.direction = direction;
}
public long getTs() {
return ts;
}
public void setTs(long ts) {
this.ts = ts;
}
}
|
hoppinghol/herd
|
herd-code/herd-dao/src/test/java/org/finra/herd/dao/StorageFileJdbcDaoTest.java
|
<reponame>hoppinghol/herd
/*
* Copyright 2015 herd contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.finra.herd.dao;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.transaction.AfterTransaction;
import org.finra.herd.model.jpa.StorageEntity;
import org.finra.herd.model.jpa.StorageFileEntity;
import org.finra.herd.model.jpa.StorageUnitEntity;
import org.finra.herd.model.jpa.StorageUnitStatusEntity;
public class StorageFileJdbcDaoTest extends AbstractDaoTest
{
private StorageUnitEntity storageUnitEntity;
@Autowired
JdbcTemplate jdbcTemplate;
@Test
@Rollback(false)
public void testSaveStorageFiles()
{
// Set up test data within the transaction
storageUnitEntity = storageUnitDaoTestHelper
.createStorageUnitEntity(StorageEntity.MANAGED_STORAGE, NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, INITIAL_FORMAT_VERSION,
PARTITION_VALUE, SUBPARTITION_VALUES, INITIAL_DATA_VERSION, true, BDATA_STATUS, StorageUnitStatusEntity.ENABLED, NO_STORAGE_DIRECTORY_PATH);
// Use the after transaction method to validate the save storage files functionality.
}
@AfterTransaction
private void validateSaveStorageFiles() throws SQLException
{
List<StorageFileEntity> storageFileEntities = new ArrayList<>();
for (String file : LOCAL_FILES)
{
StorageFileEntity storageFileEntity = new StorageFileEntity();
storageFileEntity.setStorageUnit(storageUnitEntity);
storageFileEntity.setPath(file);
storageFileEntity.setFileSizeBytes(FILE_SIZE_1_KB);
storageFileEntity.setRowCount(ROW_COUNT_1000);
storageFileEntities.add(storageFileEntity);
}
// Batch save the storage files list.
storageFileDao.saveStorageFiles(storageFileEntities);
// Retrieve the relative storage file entities and validate the results.
for (String file : LOCAL_FILES)
{
StorageFileEntity storageFileEntity = storageFileDao.getStorageFileByStorageNameAndFilePath(StorageEntity.MANAGED_STORAGE, file);
assertTrue(storageFileEntity.getPath().compareTo(file) == 0);
assertTrue(storageFileEntity.getFileSizeBytes().compareTo(FILE_SIZE_1_KB) == 0);
assertTrue(storageFileEntity.getRowCount().compareTo(ROW_COUNT_1000) == 0);
}
// Confirm negative results when using wrong input parameters.
assertNull(storageFileDao.getStorageFileByStorageNameAndFilePath("I_DO_NOT_EXIST", LOCAL_FILES.get(0)));
assertNull(storageFileDao.getStorageFileByStorageNameAndFilePath(StorageEntity.MANAGED_STORAGE, "I_DO_NOT_EXIST"));
// Validate null values.
storageFileEntities = new ArrayList<>();
for (String file : LOCAL_FILES_2)
{
StorageFileEntity storageFileEntity = new StorageFileEntity();
storageFileEntity.setStorageUnit(storageUnitEntity);
storageFileEntity.setPath(file);
storageFileEntity.setFileSizeBytes(null);
storageFileEntity.setRowCount(null);
storageFileEntities.add(storageFileEntity);
}
// Batch save the storage files list.
storageFileDao.saveStorageFiles(storageFileEntities);
// Retrieve the relative storage file entities and validate the results.
for (String file : LOCAL_FILES_2)
{
StorageFileEntity storageFileEntity = storageFileDao.getStorageFileByStorageNameAndFilePath(StorageEntity.MANAGED_STORAGE, file);
assertTrue(storageFileEntity.getPath().compareTo(file) == 0);
assertTrue(storageFileEntity.getFileSizeBytes() == null);
assertTrue(storageFileEntity.getRowCount() == null);
}
// Insert null path test
storageFileEntities = new ArrayList<>();
for (int i = 0; i < LOCAL_FILES_2.size(); i++)
{
StorageFileEntity storageFileEntity = new StorageFileEntity();
storageFileEntity.setStorageUnit(storageUnitEntity);
storageFileEntity.setPath(null);
storageFileEntity.setFileSizeBytes(null);
storageFileEntity.setRowCount(null);
storageFileEntities.add(storageFileEntity);
}
// Batch save the storage files list.
storageFileDao.saveStorageFiles(storageFileEntities);
// Manually cleanup.
DataSource dataSource = jdbcTemplate.getDataSource();
Connection connection = dataSource.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement(" DELETE FROM strge_file; " + " DELETE FROM strge_unit; " +
" DELETE FROM bus_objct_data_stts_hs; " + " DELETE FROM bus_objct_data; " +
" DELETE FROM bus_objct_data_stts_cd_lk WHERE bus_objct_data_stts_cd LIKE 'UT%'; " + " DELETE FROM bus_objct_frmt; " +
" DELETE FROM bus_objct_dfntn; " + " DELETE FROM name_space; " + " DELETE FROM file_type_cd_lk; " + " DELETE FROM data_prvdr; ");
preparedStatement.execute();
}
}
|
trettstadtnlb/openjpa
|
openjpa-examples/opentrader/src/main/java/org/apache/openjpa/trader/client/TradeOrderWindow.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.trader.client;
import java.util.List;
import org.apache.openjpa.trader.client.event.ServiceEvent;
import org.apache.openjpa.trader.client.event.ServiceEventHandler.UpdateStockHandler;
import org.apache.openjpa.trader.client.ui.HelpLink;
import org.apache.openjpa.trader.client.ui.MessageBox;
import org.apache.openjpa.trader.domain.Ask;
import org.apache.openjpa.trader.domain.Bid;
import org.apache.openjpa.trader.domain.Stock;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.TextBox;
/**
* This Widget allows the user to enter the details of a trade order (an Ask or
* Bid) and call the {@link TradingServiceAdapterAsync Trading Service} via asynchronous RPC
* callback to record the order.
* <br>
* The widget demonstrates the aspect where a displayed element can change either
* because other elements within the same widget are changing or because some external
* state is changing. For example, the gain/loss of a requested buy/sell offer can
* change as the user enters a different price. It can also change if the market
* price of the stock has changed externally. The former changes are handled by adding
* event handlers to the widget elements (such as onKeyUp in a text box), the later
* changes are notified by this widget registering to the {@link OpenTrader main application}.
*
*
* @author <NAME>
*
*/
class TradeOrderWindow extends FlexTable implements UpdateStockHandler {
private final OpenTrader session;
final ListBox symbols = new ListBox(false);
final Button ask = new Button("Ask");
final Button bid = new Button("Bid");
final TextBox marketPrice = new TextBox();
final TextBox userPrice = new TextBox();
final TextBox userVolume = new TextBox();
final TextBox margin = new TextBox();
final TextBox gain = new TextBox();
public TradeOrderWindow(final OpenTrader session, int w, int h) {
super();
this.session = session;
setPixelSize(w, h);
setStyleName("TradeOrderWindow");
session.registerHandler(ServiceEvent.StockUpdated.TYPE, this);
marketPrice.setReadOnly(true);
margin.setReadOnly(true);
gain.setReadOnly(true);
userPrice.setMaxLength(10);
userVolume.setMaxLength(10);
setCellPadding(-2);
setCellSpacing(-1);
setHTML(0, 0, "Stock");
setHTML(0, 1, "Market");
setHTML(0, 2, session.getName());
setHTML(0, 3, "Margin");
setHTML(0, 4, "Volume");
setHTML(0, 5, "Gain/Loss");
for (int i = 0; i < 5; i++) {
getCellFormatter().addStyleName(0, i, "TradingWindow-Label");
}
setWidget(1, 0, symbols);
setWidget(1, 1, marketPrice);
setWidget(1, 2, userPrice);
setWidget(1, 3, margin);
setWidget(1, 4, userVolume);
setWidget(1, 5, gain);
setWidget(2, 2, ask);
setWidget(2, 3, bid);
DOM.setStyleAttribute(getRowFormatter().getElement(0), "height", "4px");
userPrice.setFocus(true);
userPrice.setTabIndex(1);
userPrice.setTabIndex(2);
ask.setTabIndex(3);
bid.setTabIndex(4);
userPrice.addKeyUpHandler(new KeyUpHandler() {
public void onKeyUp(KeyUpEvent event) {
if (userPrice.getText().trim().length() == 0)
return;
double price = 0.0;
try {
price = Double.parseDouble(userPrice.getText());
} catch (NumberFormatException e) {
MessageBox.alert(userPrice.getText() + " must be a number");
return;
}
double diff = calculateDiff(price, getSelectedStock().getMarketPrice());
margin.setText(FormatUtil.priceFormat.format(diff));
gain.setText(FormatUtil.changeFormat.format(diff * Integer.parseInt(userVolume.getText())));
}
});
userVolume.addKeyUpHandler(new KeyUpHandler() {
public void onKeyUp(KeyUpEvent event) {
if (userVolume.getText().trim().length() == 0)
return;
int volume = 0;
try {
volume = Integer.parseInt(userVolume.getText());
} catch (NumberFormatException e) {
MessageBox.alert(userVolume.getText() + " must be a positive integer");
return;
}
if (volume <= 0) {
MessageBox.alert(userVolume.getText() + " must be a positive integer");
return;
}
double diff = Double.parseDouble(margin.getText());
gain.setText(FormatUtil.changeFormat.format(diff * volume));
}
});
List<Stock> stocks = session.getTradedStocks();
int n = stocks.size();
for (int i = 0; i < n; i++) {
symbols.addItem(stocks.get(i).getSymbol());
}
symbols.setSelectedIndex(0);
initialize(stocks.get(0), false);
symbols.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(ChangeEvent event) {
Stock stock = getSelectedStock();
initialize(stock, false);
}
});
ask.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent ce) {
if (!validateData())
return;
session.getService().ask(session.getTrader(),
getSelectedStock(),
Integer.parseInt(userVolume.getText()),
Double.parseDouble(userPrice.getText()),
new AskCallback());
}
});
bid.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent ce) {
if (!validateData())
return;
session.getService().bid(session.getTrader(),
getSelectedStock(),
Integer.parseInt(userVolume.getText()),
Double.parseDouble(userPrice.getText()),
new BidCallback());
}
});
}
/**
* Sets the content of the widgets based on the given stock. The widget
* content depends on the current stock price as well as user entered
* values.
*
* @param stock
* @param retainUserValue
*/
void initialize(Stock stock, boolean retainUserValue) {
marketPrice.setText(FormatUtil.priceFormat.format(stock.getMarketPrice()));
if (retainUserValue && userPrice.getText().length() > 0) {
double diff = calculateDiff(Double.parseDouble(userPrice.getText()), stock.getMarketPrice());
margin.setText(FormatUtil.priceFormat.format(diff));
gain.setText(FormatUtil.priceFormat.format(diff * Integer.parseInt(userVolume.getText())));
} else {
userPrice.setText(FormatUtil.priceFormat.format(stock.getMarketPrice()));
userVolume.setText(FormatUtil.volumeFormat.format(100));
margin.setText(FormatUtil.priceFormat.format(0));
gain.setText(FormatUtil.priceFormat.format(0));
}
}
public void addHelp(final String url) {
HelpLink help = new HelpLink(url);
setWidget(0, 6, help);
getCellFormatter().setAlignment(0, 6,
HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE);
}
Stock getSelectedStock() {
return session.getTradedStocks().get(symbols.getSelectedIndex());
}
boolean validateData() {
try {
if (Double.parseDouble(userPrice.getText()) <= 0) {
MessageBox.alert("Price [" + userPrice.getText() + "] must be positive number");
return false;
}
} catch (NumberFormatException e) {
MessageBox.alert("Price [" + userPrice.getText() + "] must be a positive number");
return false;
}
try {
if (Integer.parseInt(userVolume.getText()) <= 0) {
MessageBox.alert("Volume [" + userVolume.getText() + "] must be a positive integer");
return false;
}
} catch (NumberFormatException e) {
MessageBox.alert("Volume [" + userVolume.getText() + "] must be a positive integer");
return false;
}
return true;
}
double calculateDiff(double p1, double p2) {
return truncate(Math.abs(p1-p2));
}
private static double truncate (double x){
double fract;
double whole;
if ( x > 0 ){
whole = Math.floor(x);
fract = Math.floor( (x - whole) * 100) / 100;
} else {
whole = Math.ceil(x);
fract = Math.ceil( (x - whole) * 100) / 100;
}
return whole + fract;
}
/**
* ---------------------------------------------------------------------------------
* Service Event Response Management
* ---------------------------------------------------------------------------------
*/
public void onStockUpdated(ServiceEvent.StockUpdated event) {
Stock updated = event.getPayload();
Stock current = getSelectedStock();
if (updated.equals(current)) {
initialize(updated, true);
}
}
/**
* ---------------------------------------------------------------------------------
* Asynchronous RPC service callbacks
* ---------------------------------------------------------------------------------
*/
/**
* Updates display once the offer to sell has been successfully placed.
*
*/
class AskCallback implements AsyncCallback<Ask> {
public void onSuccess(Ask result) {
session.fireEvent(new ServiceEvent.TradableAdded(result));
}
public void onFailure(Throwable caught) {
session.handleError(caught);
}
}
/**
* Updates display once the offer to buy has been successfully placed.
*
*/
class BidCallback implements AsyncCallback<Bid> {
public void onSuccess(Bid result) {
session.fireEvent(new ServiceEvent.TradableAdded(result));
}
public void onFailure(Throwable caught) {
session.handleError(caught);
}
}
}
|
Kichiru69/Java_Course
|
src/FirstCourse/Lesson_30/Phone.java
|
<reponame>Kichiru69/Java_Course
package FirstCourse.Lesson_30;
import java.util.ArrayList;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
public class Phone {
String name;
int modelNumber;
String os;
Phone(String name, int modelNumber, String os) {
this.name = name;
this.modelNumber = modelNumber;
this.os = os;
}
static ArrayList<Phone> createPhone(Supplier<Phone> supplier) {
ArrayList<Phone> al = new ArrayList<>();
for (int i = 0; i < 3; i++) {
al.add(supplier.get());
}
return al;
}
public String toString() {
return name + " " + modelNumber + " " + os;
}
static void changePhone(Phone ph, Consumer<Phone> consumer) {
consumer.accept(ph);
}
static void isSimilar(Phone ph, Predicate<Phone> predicate) {
if (predicate.test(ph)) {
System.out.println("Similar Phones");
} else {
System.out.println("Not similar");
}
}
public static void main(String[] args) {
ArrayList<Phone> al = createPhone(() -> new Phone("Xiaomi", 9, "Android"));
System.out.println(al);
changePhone(al.get(1), phone -> {phone.name="Iphone"; phone.modelNumber=5; phone.os="IOS";});
System.out.println(al);
isSimilar(al.get(0), phone -> phone.name.equals(al.get(2).name));
}
}
|
ittaiz/jmock-library
|
jmock-junit4/src/test/java/testdata/jmock/acceptance/junit4/JUnit4TestThatDoesNotSatisfyExpectations.java
|
package testdata.jmock.acceptance.junit4;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.jmock.integration.junit4.JMock;
import org.jmock.integration.junit4.JUnit4Mockery;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(JMock.class)
public class JUnit4TestThatDoesNotSatisfyExpectations {
private Mockery context = new JUnit4Mockery();
private Runnable runnable = context.mock(Runnable.class);
@Test
public void doesNotSatisfyExpectations() {
context.checking(new Expectations() {{
oneOf (runnable).run();
}});
// Return without satisfying the expectation for runnable.run()
}
}
|
yarden-livnat/cg
|
server/sqlite_db.js
|
/**
* Created by yarden on 7/9/15.
*/
const path = require('path');
var sqlite = require('sqlite3');
var DB_FILE = 'cg.sqlite';
var DB_DIR = process.env.CG_DIR || '../data';
//debugging
sqlite.verbose();
var db = new sqlite.Database(path.join(DB_DIR,DB_FILE));
db.on('profile', function(sql, time) {
console.log('['+time/1000+' secs] query:'+sql);
});
function population(req, res, next) {
res.sendfile('data/population.csv');
}
function kb(req, res, next) {
db.serialize(function() {
db.all('select id, category, name, system, details from kb', function(err, rows) {
if (err) next(err);
res.send(JSON.stringify(rows));
});
});
}
function info(req, res, next) {
var query;
if (req.params.topic == 'pathogens') query = 'select name from pathogen_info';
else if (req.params.topic == 'detectors') query = 'select name from detector_info';
else next(new Error('unknown table ['+req.params.topic+']'));
db.all(query, function(err, rows) {
if (err) next(err);
res.send(JSON.stringify(rows));
});
}
function pathogens(req, res, next) {
var list = req.body.names;
var from = req.body.from;
var to = req.body.to;
var data = [];
var n = 0;
var stmt = db.prepare(
'select enc_id, date, positive from pathogens, encounter ' +
' where pathogens.path_id = (select id from pathogen_info where name = ?) ' +
' and enc_id = encounter.id ' +
' and encounter.date between ? and ?' +
' order by date');
db.parallelize(function() {
list.forEach(function(pathogen) {
stmt.all(pathogen, from, to,
function(err, rows) {
if (err) next(err);
data.push({name: pathogen, rows: rows});
n++;
if (n == list.length) {
console.log('done '+ data);
res.send(JSON.stringify(data));
}
});
});
});
}
function detectors(req, res, next) {
var list = req.body.names;
var from = req.body.from;
var to = req.body.to;
var data = [];
var n = 0;
var stmt = db.prepare(
'select enc_id as id, prob, similar from detectors, encounter ' +
' where detectors.did = (select id from detector_info where name = ?) ' +
' and enc_id = encounter.id ' +
' and encounter.date between ? and ? ' +
' order by enc_id');
console.log('>> detector');
db.parallelize(function() {
list.forEach(function(detector) {
console.log('detector:',detector,from, to);
stmt.all(detector, from, to,
function(err, rows) {
if (err) next(err);
data.push({name: detector, rows: rows});
n++;
if (n == list.length) {
res.send(JSON.stringify(data));
}
});
});
});
}
function query(req, res, next) {
var query = req.query;
var associations;
var enc;
var from = query.from;
var to = query.to;
var enc_stmt = db.prepare('select id, date, age, zipcode from encounter where date between ? and ?');
var association_stmt = db.prepare('select enc_id, tag_id from enc_tag, encounter where encounter.date between ? and ? and enc_id = encounter.id');
db.serialize(function() {
enc_stmt.all(from, to,
function(err, rows) {
enc = rows;
}
);
association_stmt.all(query.from, query.to,
function(err, rows) {
associations = rows;
res.send(JSON.stringify({from: query.from, to: query.to, enc: enc, associations: associations}));
});
});
}
exports.kb = kb;
exports.query = query;
exports.population = population;
exports.info = info;
exports.pathogens = pathogens;
exports.detectors = detectors;
|
nagasudhirpulla/wrldc_codebook
|
tests/repos/test_outageTypesRepo.py
|
<filename>tests/repos/test_outageTypesRepo.py
import unittest
from src.appConfig import initAppConfig
from src.repos.outageTypes.outageTypesRepo import OutageTypesRepo
import datetime as dt
class TestOutageTypesRepo(unittest.TestCase):
def setUp(self):
self.appConf = initAppConfig()
def test_getRealTimeOutageTypes(self) -> None:
"""tests the function that gets elements for display from outage software
"""
pwcDbConnStr = self.appConf['pwcDbConnStr']
oRepo = OutageTypesRepo(pwcDbConnStr)
oTypes = oRepo.getRealTimeOutageTypes()
self.assertFalse(len(oTypes) == 0)
|
shanejixx/algorithm-and-data-structure
|
pattern/bitwise-XOR/0137.SingleNumberII.js
|
<reponame>shanejixx/algorithm-and-data-structure
// Given an integer array nums where every element appears three times except for one, which appears exactly once. Find the single element and return it.
// You must implement a solution with a linear runtime complexity and use only constant extra space.
//
// Example 1:
// Input: nums = [2,2,3,2]
// Output: 3
// Example 2:
// Input: nums = [0,1,0,1,0,1,99]
// Output: 99
//
// Constraints:
// 1 <= nums.length <= 3 * 104
// -231 <= nums[i] <= 231 - 1
// Each element in nums appears exactly three times except for one element which appears once.
// 来源:力扣(LeetCode)
// 链接:https://leetcode-cn.com/problems/single-number-ii
// 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
// 🎨 方法一:位运算
// 📝 思路:考虑数字的二进制形式,对于出现三次的数字,各 二进制位 出现的次数都是 3 的倍数 https://leetcode-cn.com/problems/single-number-ii/solution/single-number-ii-mo-ni-san-jin-zhi-fa-by-jin407891/
/**
* @param {number[]} nums
* @return {number}
*/
var singleNumber = function (nums) {
let res = 0;
// 32位整型
for (let i = 0; i < 32; i++) {
let total = 0;
for (const num of nums) {
// num的第i位二进制位
total += (num >> i & 1)
}
// 出现三次数字的第i位二进制位的必然使3的倍数 || 没有出现
if (total % 3 !== 0) {
res = res | (1 << i)
}
}
return res
};
|
Gmrakari/STL
|
06_algorithms/10_other_algo/25_reverse_copy.cpp
|
/*
* Date:2021-08-25 15:45
* filename:25_reverse_copy.cpp
*
*/
/*
* 行为类似于reverse(),但产生出来的新序列会被置于以result指出的容器中。
* 返回值OutputIterator指向新产生的最后元素的下一位置。原序列没有任何改变。
*
*/
template <class BidirectionalIterator, class OutputIterator>
OutputIterator reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result) {
while (first != last) { //整个序列走一遍
--last; //尾端前移一个位置
*result = *last; //将尾端所指元素复制到result所指位置
++result; //result前进一个位置
}
return result;
}
|
h-dj/blog-cloud
|
blog-admin/src/main/java/cn/hdj/admin/domain/dto/MenuForm.java
|
package cn.hdj.admin.domain.dto;
import lombok.Data;
/**
* @author huangjiajian
* @version 1.0
* @description:
*/
@Data
public class MenuForm {
/**
* 菜单名称
*/
private String menuName;
/**
* 菜单类型:0目录,1菜单,2按钮
*/
private Integer type;
/**
* parentId
*/
private Long parentId;
/**
* 父菜单名称
*/
private String parentName;
/**
* 排序
*/
private Integer sort;
/**
* 备注
*/
private String remark;
/**
* 权限标识
*/
private String permission;
/**
* 链接
*/
private String url;
/**
* 图标
*/
private String icon;
/**
* 组件名
*/
private String component;
/**
* 是否隐藏
*/
private Boolean hidden;
}
|
olivejp/RoomSample
|
app/src/main/java/firebaseauthcom/example/orlanth23/roomsample/ui/adapter/EtapeAdapter.java
|
package firebaseauthcom.example.orlanth23.roomsample.ui.adapter;
import android.support.v7.util.DiffUtil;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import butterknife.BindView;
import butterknife.ButterKnife;
import firebaseauthcom.example.orlanth23.roomsample.DateConverter;
import firebaseauthcom.example.orlanth23.roomsample.R;
import firebaseauthcom.example.orlanth23.roomsample.Utilities;
import firebaseauthcom.example.orlanth23.roomsample.database.local.entity.StepEntity;
/**
* Created by orlanth23 on 05/10/2017.
*/
public class EtapeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private List<StepEntity> mEtapes;
public EtapeAdapter() {
mEtapes = new ArrayList<>();
}
public void setEtapes(final List<StepEntity> etapes) {
if (mEtapes == null) {
mEtapes = etapes;
notifyItemRangeInserted(0, etapes.size());
} else {
DiffUtil.DiffResult result = DiffUtil.calculateDiff(new DiffUtil.Callback() {
@Override
public int getOldListSize() {
return mEtapes.size();
}
@Override
public int getNewListSize() {
return etapes.size();
}
@Override
public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
return mEtapes.get(oldItemPosition).getIdColis().equals(etapes.get(newItemPosition).getIdColis());
}
@Override
public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
StepEntity newEtape = etapes.get(newItemPosition);
StepEntity oldEtape = mEtapes.get(oldItemPosition);
return Objects.equals(newEtape.getIdEtapeAcheminement(), oldEtape.getIdEtapeAcheminement())
&& Objects.equals(newEtape.getIdColis(), oldEtape.getIdColis())
&& Objects.equals(newEtape.getDate(), oldEtape.getDate())
&& Objects.equals(newEtape.getCommentaire(), oldEtape.getCommentaire())
&& Objects.equals(newEtape.getDescription(), oldEtape.getDescription())
&& Objects.equals(newEtape.getLocalisation(), oldEtape.getLocalisation());
}
});
mEtapes = etapes;
result.dispatchUpdatesTo(this);
}
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view;
view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.adapter_etape, parent, false);
return new ViewHolderEtape(view);
}
@Override
public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) {
ViewHolderEtape viewHeader = (ViewHolderEtape) holder;
viewHeader.etape = mEtapes.get(position);
viewHeader.mStepDate.setText(DateConverter.convertDateEntityToUi(viewHeader.etape.getDate()));
viewHeader.mStepLocalisation.setText(viewHeader.etape.getLocalisation());
viewHeader.mStepDescription.setText(viewHeader.etape.getDescription());
if (viewHeader.etape.getCommentaire().isEmpty()) {
viewHeader.mStepCommentaire.setVisibility(View.GONE);
} else {
viewHeader.mStepCommentaire.setText(viewHeader.etape.getCommentaire());
}
// Change status image.
viewHeader.mStepStatus.setImageResource(Utilities.getStatusDrawable(viewHeader.etape.getStatus()));
}
@Override
public int getItemCount() {
return mEtapes.size();
}
class ViewHolderEtape extends RecyclerView.ViewHolder {
@BindView(R.id.step_localisation)
TextView mStepLocalisation;
@BindView(R.id.step_date)
TextView mStepDate;
@BindView(R.id.step_description)
TextView mStepDescription;
@BindView(R.id.step_commentaire)
TextView mStepCommentaire;
@BindView(R.id.img_step_status)
ImageView mStepStatus;
StepEntity etape;
ViewHolderEtape(View view) {
super(view);
ButterKnife.bind(this, view);
}
}
}
|
genesis-2/trunk
|
libraries/gffs-structure/trunk/src/edu/virginia/vcgr/genii/client/gui/browser/plugins/TabPluginDescriptor.java
|
package edu.virginia.vcgr.genii.client.gui.browser.plugins;
import java.util.Comparator;
/**
* The tab plugin descriptor is a wrapper which holds information describing a tab plugin.
*
* @author mmm2a
*/
public class TabPluginDescriptor extends PluginDescriptor<ITabPlugin>
{
static private Comparator<TabPluginDescriptor> _sorter = new PrioritySorter();
private String _tabName;
private int _priority;
/**
* Create a new tab plugin descriptor.
*
* @param pluginName
* The common name of this plugin.
* @param plugin
* The implementing plugin instance.
* @param tabName
* The name that the tab should have.
* @param priority
* The priority that the tab should have. Priorities affect the order in which tabs are displayed and go from lower numbers to
* higher numbers.
*/
public TabPluginDescriptor(String pluginName, ITabPlugin plugin, String tabName, int priority)
{
super(pluginName, plugin);
_tabName = tabName;
_priority = priority;
}
/**
* Retrieve the tab name for this plugin.
*
* @return The tab's name.
*/
public String getTabName()
{
return _tabName;
}
/**
* Retrieve the tab priority for this plugin.
*
* @return The tab priority.
*/
public int getPriority()
{
return _priority;
}
/**
* Return a comparator that can be used to sort tab descriptors based on priority.
*
* @return The tab priority comparator.
*/
static public Comparator<TabPluginDescriptor> getPriorityComparator()
{
return _sorter;
}
/**
* This internal class implements the Comparator interface so that tab plugins can easily be sorted by priority.
*
* @author mmm2a
*/
static private class PrioritySorter implements Comparator<TabPluginDescriptor>
{
@Override
public int compare(TabPluginDescriptor o1, TabPluginDescriptor o2)
{
return o1._priority - o2._priority;
}
}
}
|
basarevych/next-dashboard
|
api-server/src/Mailer.js
|
const nodemailer = require("nodemailer");
/**
* Mailer service
*/
class Mailer {
constructor(config) {
this.config = config;
if (this.config.emailServer) {
let config = {
host: this.config.emailServer,
port: this.config.emailPort,
secure: this.config.emailSsl,
tls: {
rejectUnauthorized: false // do not fail on invalid certs
}
};
if (this.config.emailUsername && this.config.emailPassword) {
config.auth = {
type: "login",
user: this.config.emailUsername,
pass: this.config.emailPassword
};
}
this.transport = nodemailer.createTransport(config);
} else {
this.transport = nodemailer.createTransport({
sendmail: true,
newline: "unix",
path: "sendmail"
});
}
}
static get $provides() {
return "mailer";
}
static get $requires() {
return ["config"];
}
static get $lifecycle() {
return "singleton";
}
/**
* Check the transport is working
*/
async init() {
if (this.promise) return this.promise;
this.promise = new Promise((resolve, reject) => {
if (!this.config.emailServer) return resolve();
if (process.env.NODE_ENV !== "test") process.stdout.write("> Mailer... ");
this.transport.verify((error, success) => {
if (error || !success) return reject(error);
if (process.env.NODE_ENV !== "test") console.log("online");
resolve();
});
});
return this.promise;
}
/**
* Send mail
*/
async send({ to, from, subject, text, html }) {
return new Promise((resolve, reject) => {
this.transport.sendMail({ to, from, subject, text, html }, error => {
if (error) return reject(error);
if (process.env.NODE_ENV === "development")
console.log(`> Sent mail for ${to}`);
resolve();
});
});
}
}
module.exports = Mailer;
|
GabrielAmare/ItemEngine
|
example_2/engine/__init__.py
|
from .lexer import lexer
from .materials import *
from .parser import parser
from item_engine.textbase.items.chars import Char
from item_engine.textbase.items.lemmas import Lemma
from typing import Iterator
__all__ = ['parse']
def parse(src: Iterator[Char]) -> Iterator[Lemma]:
return parser(lexer(src))
|
mwhchen/quantecon
|
wald_friedman/wald_solution_plots.py
|
import matplotlib.pyplot as plt
import numpy as np
import quantecon as qe
import seaborn as sb
from wald_class import *
c = 1.25
L0 = 25
L1 = 25
a0, b0 = 2.5, 2.0
a1, b1 = 2.0, 2.5
m = 25
f0 = np.clip(st.beta.pdf(np.linspace(0, 1, m), a=a0, b=b0), 1e-6, np.inf)
f0 = f0 / np.sum(f0)
f1 = np.clip(st.beta.pdf(np.linspace(0, 1, m), a=a1, b=b1), 1e-6, np.inf)
f1 = f1 / np.sum(f1) # Make sure sums to 1
# Create an instance of our WaldFriedman class
wf = WaldFriedman(c, L0, L1, f0, f1, m=m)
# Solve using qe's `compute_fixed_point` function
J = qe.compute_fixed_point(wf.bellman_operator, np.zeros(m),
error_tol=1e-7, verbose=False,
print_skip=10, max_iter=500)
lb, ub = wf.find_cutoff_rule(J)
# Get draws
ndraws = 500
cdist, tdist = wf.stopping_dist(ndraws=ndraws)
fig, ax = plt.subplots(2, 2, figsize=(12, 9))
ax[0, 0].plot(f0, label=r"$f_0$")
ax[0, 0].plot(f1, label=r"$f_1$")
ax[0, 0].set_ylabel(r"probability of $z_k$", size=14)
ax[0, 0].set_xlabel(r"$k$", size=14)
ax[0, 0].set_title("Distributions", size=14)
ax[0, 0].legend(fontsize=14)
ax[0, 1].plot(wf.pgrid, J)
ax[0, 1].annotate(r"$\beta$", xy=(lb+0.025, 0.5), size=14)
ax[0, 1].annotate(r"$\alpha$", xy=(ub+0.025, 0.5), size=14)
ax[0, 1].vlines(lb, 0.0, wf.payoff_choose_f1(lb), linestyle="--")
ax[0, 1].vlines(ub, 0.0, wf.payoff_choose_f0(ub), linestyle="--")
ax[0, 1].set_ylim(0, 0.5*max(L0, L1))
ax[0, 1].set_ylabel("cost", size=14)
ax[0, 1].set_xlabel(r"$p_k$", size=14)
ax[0, 1].set_title(r"Value function $J$", size=14)
# Histogram the stopping times
ax[1, 0].hist(tdist, bins=np.max(tdist))
ax[1, 0].set_title("Stopping times over {} replications".format(ndraws), size=14)
ax[1, 0].set_xlabel("time", size=14)
ax[1, 0].set_ylabel("number of stops", size=14)
ax[1, 0].annotate("mean = {}".format(np.mean(tdist)),
xy=(max(tdist)/2,
max(np.histogram(tdist, bins=max(tdist))[0])/2),
size=16)
ax[1, 1].hist(cdist, bins=2)
ax[1, 1].set_title("Correct decisions over {} replications".format(ndraws), size=14)
ax[1, 1].annotate("% correct = {}".format(np.mean(cdist)),
xy=(0.05, ndraws/2), size=16)
fig.tight_layout()
plt.show()
|
zipated/src
|
content/browser/renderer_host/input/mouse_latency_browsertest.cc
|
<filename>content/browser/renderer_host/input/mouse_latency_browsertest.cc
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/json/json_reader.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/test/test_timeouts.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/input/synthetic_gesture.h"
#include "content/browser/renderer_host/input/synthetic_gesture_controller.h"
#include "content/browser/renderer_host/input/synthetic_gesture_target.h"
#include "content/browser/renderer_host/input/synthetic_smooth_move_gesture.h"
#include "content/browser/renderer_host/input/synthetic_tap_gesture.h"
#include "content/browser/renderer_host/render_widget_host_factory.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/input/synthetic_gesture_params.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/tracing_controller.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace {
const char kDataURL[] =
"data:text/html;charset=utf-8,"
"<!DOCTYPE html>"
"<html>"
"<head>"
"<title>Mouse event trace events reported.</title>"
"<script src=\"../../resources/testharness.js\"></script>"
"<script src=\"../../resources/testharnessreport.js\"></script>"
"<script>"
" let i=0;"
" document.addEventListener('mousemove', () => {"
" var end = performance.now() + 20;"
" while(performance.now() < end);"
" document.body.style.backgroundColor = 'rgb(' + (i++) + ',0,0)'"
" });"
"</script>"
"<style>"
"body {"
" height:3000px;"
// Prevent text selection logic from triggering, as it makes the test flaky.
" user-select: none;"
"}"
"</style>"
"</head>"
"<body>"
"</body>"
"</html>";
} // namespace
namespace content {
// This class listens for terminated latency info events. It listens
// for both the mouse event ack and the gpu swap buffers event since
// the event could occur in either.
class TracingRenderWidgetHost : public RenderWidgetHostImpl {
public:
TracingRenderWidgetHost(RenderWidgetHostDelegate* delegate,
RenderProcessHost* process,
int32_t routing_id,
mojom::WidgetPtr widget,
bool hidden)
: RenderWidgetHostImpl(delegate,
process,
routing_id,
std::move(widget),
hidden) {}
void OnGpuSwapBuffersCompletedInternal(
const ui::LatencyInfo& latency_info) override {
RenderWidgetHostImpl::OnGpuSwapBuffersCompletedInternal(latency_info);
RunClosureIfNecessary(latency_info);
}
void OnMouseEventAck(const MouseEventWithLatencyInfo& event,
InputEventAckSource ack_source,
InputEventAckState ack_result) override {
RenderWidgetHostImpl::OnMouseEventAck(event, ack_source, ack_result);
if (event.latency.terminated())
RunClosureIfNecessary(event.latency);
}
void WaitFor(const std::string& trace_name) {
trace_waiting_name_ = trace_name;
base::RunLoop run_loop;
closure_ = run_loop.QuitClosure();
run_loop.Run();
}
private:
void RunClosureIfNecessary(const ui::LatencyInfo& latency_info) {
if (!trace_waiting_name_.empty() && closure_ &&
latency_info.trace_name() == trace_waiting_name_) {
trace_waiting_name_.clear();
std::move(closure_).Run();
}
}
std::string trace_waiting_name_;
base::OnceClosure closure_;
};
class TracingRenderWidgetHostFactory : public RenderWidgetHostFactory {
public:
TracingRenderWidgetHostFactory() {
RenderWidgetHostFactory::RegisterFactory(this);
}
~TracingRenderWidgetHostFactory() override {
RenderWidgetHostFactory::UnregisterFactory();
}
RenderWidgetHostImpl* CreateRenderWidgetHost(
RenderWidgetHostDelegate* delegate,
RenderProcessHost* process,
int32_t routing_id,
mojom::WidgetPtr widget_interface,
bool hidden) override {
return new TracingRenderWidgetHost(delegate, process, routing_id,
std::move(widget_interface), hidden);
}
private:
DISALLOW_COPY_AND_ASSIGN(TracingRenderWidgetHostFactory);
};
class MouseLatencyBrowserTest : public ContentBrowserTest {
public:
MouseLatencyBrowserTest() : loop_(base::MessageLoop::TYPE_UI) {}
~MouseLatencyBrowserTest() override {}
RenderWidgetHostImpl* GetWidgetHost() {
return RenderWidgetHostImpl::From(
shell()->web_contents()->GetRenderViewHost()->GetWidget());
}
void OnSyntheticGestureCompleted(SyntheticGesture::Result result) {
EXPECT_EQ(SyntheticGesture::GESTURE_FINISHED, result);
runner_->Quit();
}
void OnTraceDataCollected(
std::unique_ptr<const base::DictionaryValue> metadata,
base::RefCountedString* trace_data_string) {
std::unique_ptr<base::Value> trace_data =
base::JSONReader::Read(trace_data_string->data());
ASSERT_TRUE(trace_data);
trace_data_ = trace_data->Clone();
runner_->Quit();
}
protected:
void LoadURL() {
const GURL data_url(kDataURL);
NavigateToURL(shell(), data_url);
RenderWidgetHostImpl* host = GetWidgetHost();
host->GetView()->SetSize(gfx::Size(400, 400));
}
// Generate mouse events for a synthetic click at |point|.
void DoSyncClick(const gfx::PointF& position) {
SyntheticTapGestureParams params;
params.gesture_source_type = SyntheticGestureParams::MOUSE_INPUT;
params.position = position;
params.duration_ms = 100;
std::unique_ptr<SyntheticTapGesture> gesture(
new SyntheticTapGesture(params));
GetWidgetHost()->QueueSyntheticGesture(
std::move(gesture),
base::BindOnce(&MouseLatencyBrowserTest::OnSyntheticGestureCompleted,
base::Unretained(this)));
// Runs until we get the OnSyntheticGestureCompleted callback
runner_ = std::make_unique<base::RunLoop>();
runner_->Run();
}
// Generate mouse events drag from |position|.
void DoSyncCoalescedMoves(const gfx::PointF position,
const gfx::Vector2dF& delta1,
const gfx::Vector2dF& delta2) {
SyntheticSmoothMoveGestureParams params;
params.input_type = SyntheticSmoothMoveGestureParams::MOUSE_DRAG_INPUT;
params.start_point.SetPoint(position.x(), position.y());
params.distances.push_back(delta1);
params.distances.push_back(delta2);
std::unique_ptr<SyntheticSmoothMoveGesture> gesture(
new SyntheticSmoothMoveGesture(params));
GetWidgetHost()->QueueSyntheticGesture(
std::move(gesture),
base::BindOnce(&MouseLatencyBrowserTest::OnSyntheticGestureCompleted,
base::Unretained(this)));
// Runs until we get the OnSyntheticGestureCompleted callback
runner_ = std::make_unique<base::RunLoop>();
runner_->Run();
}
void StartTracing() {
base::trace_event::TraceConfig trace_config(
"{"
"\"enable_argument_filter\":false,"
"\"enable_systrace\":false,"
"\"included_categories\":["
"\"latencyInfo\""
"],"
"\"record_mode\":\"record-until-full\""
"}");
base::RunLoop run_loop;
ASSERT_TRUE(TracingController::GetInstance()->StartTracing(
trace_config, run_loop.QuitClosure()));
run_loop.Run();
}
const base::Value& StopTracing() {
bool success = TracingController::GetInstance()->StopTracing(
TracingController::CreateStringEndpoint(
base::Bind(&MouseLatencyBrowserTest::OnTraceDataCollected,
base::Unretained(this))));
EXPECT_TRUE(success);
// Runs until we get the OnTraceDataCollected callback, which populates
// trace_data_;
runner_ = std::make_unique<base::RunLoop>();
runner_->Run();
return trace_data_;
}
private:
base::MessageLoop loop_;
std::unique_ptr<base::RunLoop> runner_;
base::Value trace_data_;
TracingRenderWidgetHostFactory widget_factory_;
DISALLOW_COPY_AND_ASSIGN(MouseLatencyBrowserTest);
};
// Ensures that LatencyInfo async slices are reported correctly for MouseUp and
// MouseDown events in the case where no swap is generated.
// Disabled on Android because we don't support synthetic mouse input on
// Android (crbug.com/723618).
// Disabled on Windows due to flakyness (https://crbug.com/800303).
// Disabled on Linux due to flakyness (https://crbug.com/815363).
#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_LINUX)
#define MAYBE_MouseDownAndUpRecordedWithoutSwap \
DISABLED_MouseDownAndUpRecordedWithoutSwap
#else
#define MAYBE_MouseDownAndUpRecordedWithoutSwap \
MouseDownAndUpRecordedWithoutSwap
#endif
IN_PROC_BROWSER_TEST_F(MouseLatencyBrowserTest,
MAYBE_MouseDownAndUpRecordedWithoutSwap) {
LoadURL();
auto filter = std::make_unique<InputMsgWatcher>(
GetWidgetHost(), blink::WebInputEvent::kMouseUp);
StartTracing();
DoSyncClick(gfx::PointF(100, 100));
EXPECT_EQ(INPUT_EVENT_ACK_STATE_CONSUMED,
filter->GetAckStateWaitIfNecessary());
const base::Value& trace_data = StopTracing();
const base::DictionaryValue* trace_data_dict;
trace_data.GetAsDictionary(&trace_data_dict);
ASSERT_TRUE(trace_data.GetAsDictionary(&trace_data_dict));
const base::ListValue* traceEvents;
ASSERT_TRUE(trace_data_dict->GetList("traceEvents", &traceEvents));
std::vector<std::string> trace_event_names;
for (size_t i = 0; i < traceEvents->GetSize(); ++i) {
const base::DictionaryValue* traceEvent;
ASSERT_TRUE(traceEvents->GetDictionary(i, &traceEvent));
std::string name;
ASSERT_TRUE(traceEvent->GetString("name", &name));
if (name != "InputLatency::MouseUp" && name != "InputLatency::MouseDown")
continue;
trace_event_names.push_back(name);
}
// We see two events per async slice, a begin and an end.
EXPECT_THAT(trace_event_names,
testing::UnorderedElementsAre(
"InputLatency::MouseDown", "InputLatency::MouseDown",
"InputLatency::MouseUp", "InputLatency::MouseUp"));
}
// Ensures that LatencyInfo async slices are reported correctly for MouseMove
// events in the case where events are coalesced. (crbug.com/771165).
// Disabled on Android because we don't support synthetic mouse input on Android
// (crbug.com/723618).
// http://crbug.com/801629 : Flaky on Linux and Windows
#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_LINUX)
#define MAYBE_CoalescedMouseMovesCorrectlyTerminated \
DISABLED_CoalescedMouseMovesCorrectlyTerminated
#else
#define MAYBE_CoalescedMouseMovesCorrectlyTerminated \
CoalescedMouseMovesCorrectlyTerminated
#endif
IN_PROC_BROWSER_TEST_F(MouseLatencyBrowserTest,
MAYBE_CoalescedMouseMovesCorrectlyTerminated) {
LoadURL();
StartTracing();
DoSyncCoalescedMoves(gfx::PointF(100, 100), gfx::Vector2dF(150, 150),
gfx::Vector2dF(250, 250));
static_cast<TracingRenderWidgetHost*>(
shell()->web_contents()->GetRenderWidgetHostView()->GetRenderWidgetHost())
->WaitFor("InputLatency::MouseUp");
const base::Value& trace_data = StopTracing();
const base::DictionaryValue* trace_data_dict;
trace_data.GetAsDictionary(&trace_data_dict);
ASSERT_TRUE(trace_data.GetAsDictionary(&trace_data_dict));
const base::ListValue* traceEvents;
ASSERT_TRUE(trace_data_dict->GetList("traceEvents", &traceEvents));
std::map<std::string, int> trace_ids;
for (size_t i = 0; i < traceEvents->GetSize(); ++i) {
const base::DictionaryValue* traceEvent;
ASSERT_TRUE(traceEvents->GetDictionary(i, &traceEvent));
std::string name;
ASSERT_TRUE(traceEvent->GetString("name", &name));
if (name != "InputLatency::MouseMove")
continue;
std::string id;
if (traceEvent->GetString("id", &id))
++trace_ids[id];
}
for (auto i : trace_ids) {
// Each trace id should show up once for the begin, and once for the end.
EXPECT_EQ(2, i.second);
}
}
} // namespace content
|
xzl8028/xenia-mobile
|
app/screens/post_options/index.test.js
|
<filename>app/screens/post_options/index.test.js
// Copyright (c) 2015-present Xenia, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {mapStateToProps} from './index';
import * as channelSelectors from 'mattermost-redux/selectors/entities/channels';
import * as generalSelectors from 'mattermost-redux/selectors/entities/general';
import * as userSelectors from 'mattermost-redux/selectors/entities/users';
import * as commonSelectors from 'mattermost-redux/selectors/entities/common';
import * as teamSelectors from 'mattermost-redux/selectors/entities/teams';
import * as deviceSelectors from 'app/selectors/device';
import * as preferencesSelectors from 'mattermost-redux/selectors/entities/preferences';
channelSelectors.getChannel = jest.fn();
channelSelectors.getCurrentChannelId = jest.fn();
generalSelectors.getConfig = jest.fn();
generalSelectors.getLicense = jest.fn();
generalSelectors.hasNewPermissions = jest.fn();
userSelectors.getCurrentUserId = jest.fn();
commonSelectors.getCurrentUserId = jest.fn();
commonSelectors.getCurrentChannelId = jest.fn();
teamSelectors.getCurrentTeamId = jest.fn();
teamSelectors.getCurrentTeamUrl = jest.fn();
deviceSelectors.getDimensions = jest.fn();
preferencesSelectors.getTheme = jest.fn();
describe('mapStateToProps', () => {
const baseState = {};
const baseOwnProps = {
post: {},
};
test('canFlag is false for system messages', () => {
const ownProps = {
...baseOwnProps,
isSystemMessage: true,
};
const props = mapStateToProps(baseState, ownProps);
expect(props.canFlag).toBe(false);
});
test('canFlag is true for non-system messages', () => {
const ownProps = {
...baseOwnProps,
isSystemMessage: false,
};
const props = mapStateToProps(baseState, ownProps);
expect(props.canFlag).toBe(true);
});
});
|
ichitaso/TwitterListEnabler
|
Twitter-Dumped/7.60.6/T1ComposeSessionConfig.h
|
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <objc/NSObject.h>
@class NSArray, NSString, TFNTwitterAccount, TFNTwitterComposition;
@interface T1ComposeSessionConfig : NSObject
{
_Bool _didOpenComposer;
_Bool _didShowFoundMediaTooltip;
_Bool _didRequestCameraAuthorization;
long long _cameraAuthorizationStatus;
_Bool _didOpenCamera;
_Bool _cameraDidCancel;
_Bool _didOpenPeriscopeBroadcast;
_Bool _wantPoll;
_Bool _wantStartFromCamera;
_Bool _wantStartFromVideo;
_Bool _wantFoundMediaTooltip;
_Bool _wantStartFromPeriscopeBroadcast;
_Bool _wantPresentOverModal;
NSArray *_initialCompositions;
NSString *_scribePage;
CDUnknownBlockType _dismissCompletionBlock;
TFNTwitterAccount *_account;
}
@property(nonatomic) _Bool wantPresentOverModal; // @synthesize wantPresentOverModal=_wantPresentOverModal;
@property(nonatomic) _Bool wantStartFromPeriscopeBroadcast; // @synthesize wantStartFromPeriscopeBroadcast=_wantStartFromPeriscopeBroadcast;
@property(nonatomic) _Bool wantFoundMediaTooltip; // @synthesize wantFoundMediaTooltip=_wantFoundMediaTooltip;
@property(nonatomic) _Bool wantStartFromVideo; // @synthesize wantStartFromVideo=_wantStartFromVideo;
@property(nonatomic) _Bool wantStartFromCamera; // @synthesize wantStartFromCamera=_wantStartFromCamera;
@property(nonatomic) _Bool wantPoll; // @synthesize wantPoll=_wantPoll;
@property(retain, nonatomic) TFNTwitterAccount *account; // @synthesize account=_account;
@property(copy, nonatomic) CDUnknownBlockType dismissCompletionBlock; // @synthesize dismissCompletionBlock=_dismissCompletionBlock;
@property(retain, nonatomic) NSString *scribePage; // @synthesize scribePage=_scribePage;
@property(copy, nonatomic) NSArray *initialCompositions; // @synthesize initialCompositions=_initialCompositions;
- (void).cxx_destruct;
- (void)didOpenPeriscopeBroadcast;
- (_Bool)_shouldEnterPeriscopeMode;
@property(readonly, nonatomic) _Bool shouldOpenPeriscopeBroadcast;
- (void)cameraDidCancel;
- (void)cameraDidSelectAttachment:(id)arg1;
@property(readonly, nonatomic) unsigned long long cameraMode;
@property(readonly, nonatomic) _Bool shouldOpenCamera;
- (void)didRequestCameraAuthorization:(long long)arg1;
@property(readonly, nonatomic) _Bool shouldRequestCameraAuthorization;
- (_Bool)_isCameraAuthorized;
- (_Bool)_shouldEnterCameraMode;
- (_Bool)_deviceHasCamera;
- (void)didShowFoundMediaTooltip;
@property(readonly, nonatomic) _Bool shouldShowFoundMediaTooltip;
@property(readonly, nonatomic) _Bool shouldDismissModal;
- (void)didOpenComposer;
@property(readonly, nonatomic) _Bool shouldOpenComposer;
@property(readonly, nonatomic) _Bool shouldAddPoll;
@property(readonly, nonatomic) TFNTwitterComposition *initialComposition;
- (id)init;
@end
|
trinhvanhung/Java-Thread-Affinity
|
3.0.5/Java-Thread-Affinity/affinity/src/main/java/net/openhft/affinity/impl/LinuxHelper.java
|
/*
* Copyright (C) 2015 <EMAIL>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.openhft.affinity.impl;
import com.sun.jna.*;
import com.sun.jna.ptr.IntByReference;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
public class LinuxHelper {
private static final String LIBRARY_NAME = "c";
private static final VersionHelper UNKNOWN = new VersionHelper(0, 0, 0);
private static final VersionHelper VERSION_2_6 = new VersionHelper(2, 6, 0);
private static final VersionHelper version;
static {
final utsname uname = new utsname();
VersionHelper ver = UNKNOWN;
try {
if (CLibrary.INSTANCE.uname(uname) == 0) {
ver = new VersionHelper(uname.getRealeaseVersion());
}
} catch (Throwable e) {
//logger.warn("Failed to determine Linux version: " + e);
}
version = ver;
}
public static
@NotNull
cpu_set_t sched_getaffinity() {
final CLibrary lib = CLibrary.INSTANCE;
final cpu_set_t cpuset = new cpu_set_t();
final int size = version.isSameOrNewer(VERSION_2_6) ? cpu_set_t.SIZE_OF_CPU_SET_T : NativeLong.SIZE;
try {
if (lib.sched_getaffinity(0, size, cpuset) != 0) {
throw new IllegalStateException("sched_getaffinity(0, " + size +
", cpuset) failed; errno=" + Native.getLastError());
}
} catch (LastErrorException e) {
throw new IllegalStateException("sched_getaffinity(0, (" +
size + ") , cpuset) failed; errno=" + e.getErrorCode(), e);
}
return cpuset;
}
public static void sched_setaffinity(final BitSet affinity) {
final CLibrary lib = CLibrary.INSTANCE;
final cpu_set_t cpuset = new cpu_set_t();
final int size = version.isSameOrNewer(VERSION_2_6) ? cpu_set_t.SIZE_OF_CPU_SET_T : NativeLong.SIZE;
final long[] bits = affinity.toLongArray();
for (int i = 0; i < bits.length; i++) {
if (Platform.is64Bit()) {
cpuset.__bits[i].setValue(bits[i]);
} else {
cpuset.__bits[i * 2].setValue(bits[i] & 0xFFFFFFFFL);
cpuset.__bits[i * 2 + 1].setValue((bits[i] >>> 32) & 0xFFFFFFFFL);
}
}
try {
if (lib.sched_setaffinity(0, size, cpuset) != 0) {
throw new IllegalStateException("sched_setaffinity(0, " + size +
", 0x" + Utilities.toHexString(affinity) + ") failed; errno=" + Native.getLastError());
}
} catch (LastErrorException e) {
throw new IllegalStateException("sched_setaffinity(0, " + size +
", 0x" + Utilities.toHexString(affinity) + ") failed; errno=" + e.getErrorCode(), e);
}
}
public static int sched_getcpu() {
final CLibrary lib = CLibrary.INSTANCE;
try {
final int ret = lib.sched_getcpu();
if (ret < 0) {
throw new IllegalStateException("sched_getcpu() failed; errno=" + Native.getLastError());
}
return ret;
} catch (LastErrorException e) {
throw new IllegalStateException("sched_getcpu() failed; errno=" + e.getErrorCode(), e);
} catch (UnsatisfiedLinkError ule) {
try {
final IntByReference cpu = new IntByReference();
final IntByReference node = new IntByReference();
final int ret = lib.syscall(318, cpu, node, null);
if (ret != 0) {
throw new IllegalStateException("getcpu() failed; errno=" + Native.getLastError());
}
return cpu.getValue();
} catch (LastErrorException lee) {
if (lee.getErrorCode() == 38 && Platform.is64Bit()) { // unknown call
final Pointer getcpuAddr = new Pointer((-10L << 20) + 1024L * 2L);
final Function getcpu = Function.getFunction(getcpuAddr, Function.C_CONVENTION);
final IntByReference cpu = new IntByReference();
if (getcpu.invokeInt(new Object[]{cpu, null, null}) < 0) {
throw new IllegalStateException("getcpu() failed; errno=" + Native.getLastError());
} else {
return cpu.getValue();
}
} else {
throw new IllegalStateException("getcpu() failed; errno=" + lee.getErrorCode(), lee);
}
}
}
}
public static int getpid() {
final CLibrary lib = CLibrary.INSTANCE;
try {
final int ret = lib.getpid();
if (ret < 0) {
throw new IllegalStateException("getpid() failed; errno=" + Native.getLastError());
}
return ret;
} catch (LastErrorException e) {
throw new IllegalStateException("getpid() failed; errno=" + e.getErrorCode(), e);
}
}
public static int syscall(int number, Object... args) {
final CLibrary lib = CLibrary.INSTANCE;
try {
final int ret = lib.syscall(number, args);
if (ret < 0) {
throw new IllegalStateException("sched_getcpu() failed; errno=" + Native.getLastError());
}
return ret;
} catch (LastErrorException e) {
throw new IllegalStateException("sched_getcpu() failed; errno=" + e.getErrorCode(), e);
}
}
interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary) Native.loadLibrary(LIBRARY_NAME, CLibrary.class);
int sched_setaffinity(final int pid,
final int cpusetsize,
final cpu_set_t cpuset) throws LastErrorException;
int sched_getaffinity(final int pid,
final int cpusetsize,
final cpu_set_t cpuset) throws LastErrorException;
int getpid() throws LastErrorException;
int sched_getcpu() throws LastErrorException;
int uname(final utsname name) throws LastErrorException;
int syscall(int number, Object... args) throws LastErrorException;
}
/**
* Structure describing the system and machine.
*/
public static class utsname extends Structure {
public static final int _UTSNAME_LENGTH = 65;
static List<String> FIELD_ORDER = Arrays.asList(
"sysname",
"nodename",
"release",
"version",
"machine",
"domainname"
);
/**
* Name of the implementation of the operating system.
*/
public byte[] sysname = new byte[_UTSNAME_LENGTH];
/**
* Name of this node on the network.
*/
public byte[] nodename = new byte[_UTSNAME_LENGTH];
/**
* Current release level of this implementation.
*/
public byte[] release = new byte[_UTSNAME_LENGTH];
/**
* Current version level of this release.
*/
public byte[] version = new byte[_UTSNAME_LENGTH];
/**
* Name of the hardware type the system is running on.
*/
public byte[] machine = new byte[_UTSNAME_LENGTH];
/**
* NIS or YP domain name
*/
public byte[] domainname = new byte[_UTSNAME_LENGTH];
static int length(final byte[] data) {
int len = 0;
final int datalen = data.length;
while (len < datalen && data[len] != 0)
len++;
return len;
}
@Override
protected List getFieldOrder() {
return FIELD_ORDER;
}
public String getSysname() {
return new String(sysname, 0, length(sysname));
}
@SuppressWarnings({"UnusedDeclaration"})
public String getNodename() {
return new String(nodename, 0, length(nodename));
}
public String getRelease() {
return new String(release, 0, length(release));
}
public String getRealeaseVersion() {
final String release = getRelease();
final int releaseLen = release.length();
int len = 0;
for (; len < releaseLen; len++) {
final char c = release.charAt(len);
if (Character.isDigit(c) || c == '.') {
continue;
}
break;
}
return release.substring(0, len);
}
public String getVersion() {
return new String(version, 0, length(version));
}
public String getMachine() {
return new String(machine, 0, length(machine));
}
@SuppressWarnings({"UnusedDeclaration"})
public String getDomainname() {
return new String(domainname, 0, length(domainname));
}
@Override
public String toString() {
return getSysname() + " " + getRelease() +
" " + getVersion() + " " + getMachine();
}
}
public static class cpu_set_t extends Structure {
static final int __CPU_SETSIZE = 1024;
static final int __NCPUBITS = 8 * NativeLong.SIZE;
static final int SIZE_OF_CPU_SET_T = (__CPU_SETSIZE / __NCPUBITS) * NativeLong.SIZE;
static List<String> FIELD_ORDER = Arrays.asList("__bits");
public NativeLong[] __bits = new NativeLong[__CPU_SETSIZE / __NCPUBITS];
public cpu_set_t() {
for (int i = 0; i < __bits.length; i++) {
__bits[i] = new NativeLong(0);
}
}
@SuppressWarnings({"UnusedDeclaration"})
public static void __CPU_ZERO(cpu_set_t cpuset) {
for (NativeLong bits : cpuset.__bits) {
bits.setValue(0l);
}
}
public static int __CPUELT(int cpu) {
return cpu / __NCPUBITS;
}
public static long __CPUMASK(int cpu) {
return 1l << (cpu % __NCPUBITS);
}
@SuppressWarnings({"UnusedDeclaration"})
public static void __CPU_SET(int cpu, cpu_set_t cpuset) {
cpuset.__bits[__CPUELT(cpu)].setValue(
cpuset.__bits[__CPUELT(cpu)].longValue() | __CPUMASK(cpu));
}
@SuppressWarnings({"UnusedDeclaration"})
public static void __CPU_CLR(int cpu, cpu_set_t cpuset) {
cpuset.__bits[__CPUELT(cpu)].setValue(
cpuset.__bits[__CPUELT(cpu)].longValue() & ~__CPUMASK(cpu));
}
@SuppressWarnings({"UnusedDeclaration"})
public static boolean __CPU_ISSET(int cpu, cpu_set_t cpuset) {
return (cpuset.__bits[__CPUELT(cpu)].longValue() & __CPUMASK(cpu)) != 0;
}
@Override
protected List getFieldOrder() {
return FIELD_ORDER;
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.