repo_name
stringlengths 6
101
| path
stringlengths 4
300
| text
stringlengths 7
1.31M
|
|---|---|---|
Kanaderu/spiking-ddpg-mapless-navigation
|
ros/catkin_ws/src/ecl/ecl_core/ecl_formatters/include/ecl/formatters/common.hpp
|
/**
* @file /include/ecl/formatters/common.hpp
*
* @brief Common formatting definitions.
*
* @date May 2009
**/
/*****************************************************************************
** Ifdefs
*****************************************************************************/
#ifndef ECL_FORMATTERS_COMMON_HPP_
#define ECL_FORMATTERS_COMMON_HPP_
/*****************************************************************************
** Namespaces
*****************************************************************************/
namespace ecl {
/*****************************************************************************
** Format Tags
*****************************************************************************/
/**
* @brief Alignment tags for text formatting.
*
* Common alignment format tag for the formatters.
**/
enum Alignment
{
NoAlign, /**< @brief No alignment used. **/
LeftAlign, /**< @brief Align to the left. **/
RightAlign, /**< @brief Align to the right. **/
CentreAlign, /**< @brief Align in the centre. **/
};
/*****************************************************************************
** Default precision widths
*****************************************************************************/
/*
* These must match the default format precisions for each fundamental type.
*/
/**
* @brief Precision width trait for fundamental types.
*
* Numerical metafunction used by the default insertion
* operator to establish the width of a cell when a matrix is sent to
* an output stream. This value will generally store the space required
* by integers for decimal precision (i.e. none).
*/
template <typename Type> struct PrecisionWidth {
public:
static const int value = 0;
};
/**
* @brief Precision width trait for floats.
*
* Numerical metafunction used by the default insertion operator to
* establish the width of a cell when a matrix is sent to an output
* stream. This value determines the number of cells required
* for the default level of decimal precision (four decimal places).
*/
template <>
struct PrecisionWidth<float> {
public:
static const int value = 4;
};
/**
* @brief Precision width trait for doubles.
*
* Numerical meta-function used by the default insertion operator to
* establish the width of a cell when a matrix is sent to an output
* stream. This value determines the number of cells required
* for the default level of decimal precision (four decimal places).
*/
template <>
struct PrecisionWidth<double> {
public:
static const int value = 4;
};
/*****************************************************************************
* Format Classes
*****************************************************************************/
/**
* @brief Primary template for all formatter classes.
*
* Most formatters specialise from this primary template, however if no
* specialisation exists, this will look up the class to be formatted
* interface for a formatter type to use (T::Formatter). There are many
* basic type specialisations in the formatters namespace.
*
* @sa ecl::formatters.
*
**/
template <typename T>
class Format : public T::Formatter {};
}; // namespace ecl
#endif /*ECL_FORMATTERS_COMMON_HPP_*/
|
kanner/KnR_solutions
|
Chapter6/6-01/keyword_count.c
|
<gh_stars>0
/**
* Exercise 6-01, page 112
* Упражнение 6.01, страница 147
*
* Our version of getword does not properly handle underscores, string
* constants, comments, or preprocessor control lines. Write a better version.
*
* Наша версия getword не умеет корректно обрабатывать знаки подчеркивания,
* строковые константы, комментарии и управляющие строки
* препроцессора. Усовершенствуйте эту функцию соответствующим образом.
*/
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#define MAXWORD 100
#define NKEYS (sizeof keytab / sizeof keytab[0])
struct key {
char *word;
int count;
} keytab [] = {
/** here we added preprocessor control lines, use correct order! */
{"#define", 0},
{"#undef", 0},
{"#include", 0},
{"#line", 0},
{"#error", 0},
{"#pragma", 0},
{"#if", 0},
{"#ifdef", 0},
{"#ifndef", 0},
{"#elif", 0},
{"#else", 0},
/** original words */
{"auto", 0},
{"break", 0},
{"case", 0},
{"char", 0},
{"const", 0},
{"continue", 0},
{"default", 0},
/* ... */
{"printf", 0},
{"return", 0},
/** only for testing purposes, word should not start with '_' */
{"test_word", 0},
{"unsigned", 0},
{"void", 0},
{"volatile", 0},
{"while", 0},
};
/** Ex. 4-4 */
/** size of buffer for getch/ungetch */
#define BUFSIZE 100
/** buffer for ungetch */
char buf[BUFSIZE];
/** next free position in buf */
int bufp = 0;
/** get a (possibly pushed back) character */
int getch(void) {
return (bufp > 0) ? buf[--bufp] : getchar();
}
/** push character back on input */
void ungetch(int c) {
if (bufp >= BUFSIZE)
printf("ungetch: too many characters\n");
else
buf[bufp++] = c;
}
/** like Ex. 3-01 */
int binsearch(char *word, struct key tab[], int n)
{
int cond;
int low, high, mid;
low = 0;
high = n - 1;
while (low <= high) {
mid = (low+high) / 2;
if ((cond = strcmp(word, tab[mid].word)) < 0)
high = mid - 1;
else if (cond > 0)
low = mid + 1;
else
return mid;
}
/** no match */
return -1;
}
/** we don`t process several stars like in "/" + "**" */
int ext_syms(char sym, int beginning) {
int res = 0;
char next;
switch(sym) {
/** word should not start with '_'? */
case '_':
if (beginning == 1)
res = -1;
else
res = 0;
break;
case '"':
/** restart or end word processing. we would not process
special values like '\n', etc -- only full values
included in keytab[] */
res = -1;
break;
case '#':
res = 0;
break;
/** comments need one more character to check */
case '/':
if ((next = getch()) == '/' || next == '*')
res = next;
else {
ungetch(next);
res = -1;
}
break;
case '*':
if ((next = getch()) == '/')
res = next;
else if (next == '*')
res = next;
else {
ungetch(next);
res = -1;
}
break;
default:
res = -1;
break;
}
return res;
}
int getword_ext(char *w, int *lim, int beginning) {
int res = 0;
int c;
if ((c = ext_syms(*w, beginning)) == -1) {
ungetch(*w);
res = -1;
}
/** populate next character for comments */
else if (c > 0) {
// w++;
// lim--;
// *w = c;
res = c;
}
return res;
}
int getword(char *word, int lim)
{
int c, getch(void);
void ungetch(int);
char *w = word;
while (isspace(c = getch()))
;
if (c != EOF)
*w = c;
/** this should be used because EOF doesn`t return to stdin (in
getword_ext()) and we get previous character on next getch()!
Why...? */
else
return c;
/** added check for extended character values */
if (!isalpha(c)) {
if ((c = getword_ext(w, &lim, 1)) < 0) {
c = getch();
w++;
*w = '\0';
return c;
}
else if (c > 0) {
w++;
lim--;
*w = c;
}
}
w++;
for ( ; --lim > 0; w++) {
/** added check for extended character values */
if (!isalnum(*w = getch()) /*&& w != '_'*/) {
if ((c = getword_ext(w, &lim, 0)) < 0)
break;
else if (c > 0) {
w++;
lim--;
*w = c;
}
}
}
*w = '\0';
return word[0];
}
int main (void) {
int n;
char word[MAXWORD];
while (getword(word, MAXWORD) != EOF)
if (isalpha(word[0]) || ext_syms(word[0], 1) == 0)
if ((n = binsearch(word, keytab, NKEYS)) >= 0)
keytab[n].count++;
for (n = 0; n < NKEYS; n++)
if (keytab[n].count > 0)
printf("%4d %s\n",
keytab[n].count, keytab[n].word);
return 0;
}
|
jeyavelnkl/Jel_Apps
|
tracks/db/migrate/036_add_project_completed_at_column.rb
|
class AddProjectCompletedAtColumn < ActiveRecord::Migration
class Project < ActiveRecord::Base; end
def self.up
add_column :projects, :completed_at, :datetime
@projects = Project.all
@projects.select{ |project| project.state == 'completed'}.each do |project|
project.completed_at = project.updated_at
project.save
end
end
def self.down
remove_column :projects, :completed_at
end
end
|
Yeeyao/leetcode-go
|
array/309_test.go
|
<reponame>Yeeyao/leetcode-go<filename>array/309_test.go
package array
import (
"testing"
)
func TestPro(t *testing.T) {
t.Run("123. Best Time to Buy and Sell Stock III", func(t *testing.T) {
input := []int{1, 2, 3, 0, 2}
want := 3
got := solution(input)
if got != want {
t.Errorf("got: %v, want: %v", got, want)
}
})
t.Run("123. Best Time to Buy and Sell Stock III2", func(t *testing.T) {
input := []int{10, 20, 30, 40, 50, 60}
want := 50
got := solution(input)
if got != want {
t.Errorf("got: %v, want: %v", got, want)
}
})
}
/*
[ref](https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/solution/)
将买入和卖出分开考虑,买入为负收益,卖出为正收益
开始只能买入,卖出获得正收益,尽可能降低负收益而提高正收益
使用动态规划维护股市每一天结束后可以获得的累计最大收益,并进行状态转移
f[i] 表示第 i 天结束后的累计最大收益
f[i][0] 表示目前持有一支股票对应的累计最大收益
f[i][1] 表示不持有任何股票且在冷冻期,这里的意思是这天卖了然后不持有股票
f[i][2] 表示不持有任何股票且不在冷冻期,即之前卖了
第 i 天进行操作依赖于第 i - 1 天的情况
f[i][0] 可能 i - 1 天持有了股票到 i 也可能 i - 1 天在非冷冻期然后现在购买了
f[i][0] = max(f[i-1][0], f[i][2] - prices[i])
f[i][1] = f[i][0] + prices[i]
f[i][2] = max(f[i-1][2], f[i-1][1])
最终结果就是 max(f[n-1][1], f[n-1][2]) 毕竟最后一天持有股票是亏
初始值 f[0][0] = -prices[0] f[0][1] = 0 f[0][2] = 0
如果给定数组长度为 0 直接返回 0
初始化 dp 数组以及初始值,然后转移方程
最后返回
*/
func maxProfit(prices []int) int {
pricesLen := len(prices)
if pricesLen == 0 {
return 0
}
f := make([][3]int, pricesLen)
f[0][0], f[0][1], f[0][2] = -prices[0], 0, 0
for i := 1; i < pricesLen; i++ {
f[i][0] = max(f[i-1][2]-prices[i], f[i-1][0])
f[i][1] = f[i-1][0] + prices[i]
f[i][2] = max(f[i-1][2], f[i-1][1])
}
return max(f[pricesLen-1][1], f[pricesLen-1][2])
}
func max(a, b int) int {
if a > b {
return a
}
return b
}
func solution(prices []int) int {
const intMax = int(^uint(0) >> 1)
const intMin = ^intMax
tik0, tik1, tik0p := 0, intMin, 0
for _, p := range prices {
tik0old := tik0
if tik0 < tik1+p {
tik0 = tik1 + p
}
if tik1 < tik0p-p {
tik1 = tik0p - p
}
tik0p = tik0old
}
return tik0
}
|
CiarraTech/analyticalmetlx
|
src/main/java/com/d2lvalence/idkeyauth/implementation/TimestampParser.java
|
/**
* D2LValence package, auth module.
*
* Copyright (c) 2012 Desire2Learn Inc.
*
* 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 com.d2lvalence.idkeyauth.implementation;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Parses server responses to determine if the delay between the client and server is to large
* and to help determine the skew if so.
*/
class TimestampParser {
public TimestampParser() {
}
/**
* Returns the timestamp returned by the server if the time between the request and when the server received it is too large
*
* @param timestampMessage The message returned by the D2L Server
* @return The timestamp returned by the server or 0 if no timestamp returned
*/
public long tryParseTimestamp( String timestampMessage ) {
long result;
Pattern p = Pattern.compile("Timestamp out of range\\r*\\n*\\s*(([0-9]+))");
Matcher m = p.matcher(timestampMessage);
boolean match = m.matches();
if( match && m.groupCount() >= 2 ) {
result = Long.parseLong( m.group(1) );
return result;
}
result = 0;
return result;
}
}
|
Hyracoidea/hyrax-backend
|
microservice/account-microservice/data/src/main/java/com/hyrax/microservice/account/data/mapper/AccountMapper.java
|
package com.hyrax.microservice.account.data.mapper;
import com.hyrax.microservice.account.data.entity.AccountEntity;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
public interface AccountMapper {
Collection<AccountEntity> selectAllByUsernames(@Param("usernames") List<String> usernames);
AccountEntity selectByEmail(String email);
AccountEntity selectByUsername(String username);
void insert(AccountEntity accountEntity);
}
|
aryx/principia-softwarica
|
lib_graphics/libdraw/arith.c
|
<gh_stars>0
/*s: lib_graphics/libdraw/arith.c */
#include <u.h>
#include <libc.h>
#include <draw.h>
/*s: function [[Pt]] */
Point
Pt(int x, int y)
{
Point p;
p.x = x;
p.y = y;
return p;
}
/*e: function [[Pt]] */
/*s: function [[Rect]] */
Rectangle
Rect(int ax, int ay, int bx, int by)
{
Rectangle r;
r.min.x = ax;
r.min.y = ay;
r.max.x = bx;
r.max.y = by;
return r;
}
/*e: function [[Rect]] */
/*s: function [[Rpt]] */
Rectangle
Rpt(Point min, Point max)
{
Rectangle r;
r.min = min;
r.max = max;
return r;
}
/*e: function [[Rpt]] */
/*s: function [[addpt]] */
Point
addpt(Point a, Point b)
{
a.x += b.x;
a.y += b.y;
return a;
}
/*e: function [[addpt]] */
/*s: function [[subpt]] */
Point
subpt(Point a, Point b)
{
a.x -= b.x;
a.y -= b.y;
return a;
}
/*e: function [[subpt]] */
/*s: function [[insetrect]] */
Rectangle
insetrect(Rectangle r, int n)
{
r.min.x += n;
r.min.y += n;
r.max.x -= n;
r.max.y -= n;
return r;
}
/*e: function [[insetrect]] */
/*s: function [[divpt]] */
Point
divpt(Point a, int b)
{
a.x /= b;
a.y /= b;
return a;
}
/*e: function [[divpt]] */
/*s: function [[mulpt]] */
Point
mulpt(Point a, int b)
{
a.x *= b;
a.y *= b;
return a;
}
/*e: function [[mulpt]] */
/*s: function [[rectsubpt]] */
Rectangle
rectsubpt(Rectangle r, Point p)
{
r.min.x -= p.x;
r.min.y -= p.y;
r.max.x -= p.x;
r.max.y -= p.y;
return r;
}
/*e: function [[rectsubpt]] */
/*s: function [[rectaddpt]] */
Rectangle
rectaddpt(Rectangle r, Point p)
{
r.min.x += p.x;
r.min.y += p.y;
r.max.x += p.x;
r.max.y += p.y;
return r;
}
/*e: function [[rectaddpt]] */
/*s: function [[eqpt]] */
bool
eqpt(Point p, Point q)
{
return p.x==q.x && p.y==q.y;
}
/*e: function [[eqpt]] */
/*s: function [[eqrect]] */
bool
eqrect(Rectangle r, Rectangle s)
{
return r.min.x==s.min.x && r.max.x==s.max.x &&
r.min.y==s.min.y && r.max.y==s.max.y;
}
/*e: function [[eqrect]] */
/*s: function [[rectXrect]] */
bool
rectXrect(Rectangle r, Rectangle s)
{
return r.min.x < s.max.x && s.min.x < r.max.x &&
r.min.y < s.max.y && s.min.y < r.max.y;
}
/*e: function [[rectXrect]] */
/*s: function [[rectinrect]] */
bool
rectinrect(Rectangle r, Rectangle s)
{
return s.min.x <= r.min.x && r.max.x <= s.max.x &&
s.min.y <= r.min.y && r.max.y <= s.max.y;
}
/*e: function [[rectinrect]] */
/*s: function [[ptinrect]] */
bool
ptinrect(Point p, Rectangle r)
{
return p.x >= r.min.x && p.x < r.max.x &&
p.y >= r.min.y && p.y < r.max.y;
}
/*e: function [[ptinrect]] */
/*s: function [[canonrect]] */
Rectangle
canonrect(Rectangle r)
{
int t;
if (r.max.x < r.min.x) {
t = r.min.x;
r.min.x = r.max.x;
r.max.x = t;
}
if (r.max.y < r.min.y) {
t = r.min.y;
r.min.y = r.max.y;
r.max.y = t;
}
return r;
}
/*e: function [[canonrect]] */
/*s: function [[combinerect]] */
void
combinerect(Rectangle *r1, Rectangle r2)
{
if(r1->min.x > r2.min.x)
r1->min.x = r2.min.x;
if(r1->min.y > r2.min.y)
r1->min.y = r2.min.y;
if(r1->max.x < r2.max.x)
r1->max.x = r2.max.x;
if(r1->max.y < r2.max.y)
r1->max.y = r2.max.y;
}
/*e: function [[combinerect]] */
/*s: global [[ZP]] */
Point ZP;
/*e: global [[ZP]] */
/*s: global [[ZR]] */
Rectangle ZR;
/*e: global [[ZR]] */
/*e: lib_graphics/libdraw/arith.c */
|
bitmark-inc/bitmark-sdk-java
|
api-service/src/main/java/com/bitmark/apiservice/WebSocketClient.java
|
<gh_stars>1-10
/**
* SPDX-License-Identifier: ISC
* Copyright © 2014-2019 Bitmark. All rights reserved.
* Use of this source code is governed by an ISC
* license that can be found in the LICENSE file.
*/
package com.bitmark.apiservice;
import io.github.centrifugal.centrifuge.*;
class WebSocketClient extends EventListener {
private Client client;
private EventListener eventListener;
private boolean isConnected;
WebSocketClient(String address, String token) {
client = new Client(address, new Options(), this);
client.setToken(token);
}
void setEventListener(EventListener eventListener) {
this.eventListener = eventListener;
}
void connect() {
client.connect();
}
void disconnect() {
client.disconnect();
}
void subscribe(String channel, SubscriptionEventListener listener) {
if (isSubscribed(channel)) {
return;
}
Subscription subscription = client.getSubscription(channel);
if (subscription == null) {
subscription = client.newSubscription(channel, listener);
}
subscription.subscribe();
}
void unsubscribe(String channel) {
if (!isSubscribed(channel)) {
return;
}
final Subscription subscription = client.getSubscription(channel);
client.removeSubscription(subscription);
}
@Override
public void onConnect(Client client, ConnectEvent event) {
super.onConnect(client, event);
isConnected = true;
if (null != eventListener) {
eventListener.onConnect(client, event);
}
}
@Override
public void onDisconnect(Client client, DisconnectEvent event) {
super.onDisconnect(client, event);
isConnected = false;
if (null != eventListener) {
eventListener.onDisconnect(client, event);
}
}
private boolean isSubscribed(String channel) {
return client.getSubscription(channel) != null;
}
boolean isConnected() {
return isConnected;
}
}
|
abduegal/Microservice-Admin-Dashboard
|
example/src/main/java/com/aegal/example/ExampleService.java
|
<gh_stars>10-100
package com.aegal.example;
import com.aegal.example.resources.ExampleResource;
import com.aegal.framework.core.MicroserviceBundle;
import com.aegal.framework.core.MicroserviceConfig;
import com.aegal.framework.core.tenacity.InitializeTenacity;
import com.yammer.tenacity.core.bundle.TenacityBundleBuilder;
import com.yammer.tenacity.core.properties.TenacityPropertyKey;
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory;
import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
/**
* User: A.Egal
* Date: 9/6/14
* Time: 10:25 PM
*/
public class ExampleService extends Application<MicroserviceConfig> {
public static void main(String[] args) throws Exception {
new ExampleService().run(args);
}
public enum DependencyKeys implements TenacityPropertyKey {
Action;
public static TenacityPropertyKeyFactory getTenacityPropertyKeyFactory() {
return new TenacityPropertyKeyFactory(){
@Override
public TenacityPropertyKey from(String value) {
return DependencyKeys.valueOf(value.toUpperCase());
}
};
}
}
@Override
public void initialize(Bootstrap<MicroserviceConfig> bootstrap) {
bootstrap.addBundle(new MicroserviceBundle<>());
bootstrap.addBundle(TenacityBundleBuilder.newBuilder()
.propertyKeyFactory(DependencyKeys.getTenacityPropertyKeyFactory())
.propertyKeys(DependencyKeys.values())
.build());
}
@Override
public void run(MicroserviceConfig exampleConfiguration, Environment environment) throws Exception {
environment.jersey().register(ExampleResource.class);
InitializeTenacity.initialize(DependencyKeys.values());
}
}
|
colinwjd/venus
|
src/main/java/com/colinwjd/venus/service/impl/EventServiceImpl.java
|
package com.colinwjd.venus.service.impl;
import com.colinwjd.venus.model.entity.Event;
import com.colinwjd.venus.repository.EventRepository;
import com.colinwjd.venus.service.EventService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
/**
* 时间轴服务实现
*
* @author <NAME>
* @date 2018/9/1
*/
@Slf4j
@Service
public class EventServiceImpl implements EventService {
private final EventRepository eventRepository;
@Autowired
public EventServiceImpl(EventRepository eventRepository) {
this.eventRepository = eventRepository;
}
@Override
public Event saveByEvent(Event event) {
return eventRepository.save(event);
}
@Override
public Event removeById(Long id) {
Optional<Event> timeline = eventRepository.findById(id);
if (timeline.isPresent()) {
eventRepository.deleteById(id);
log.debug("Event deleted: " + timeline.get().getTitle());
}
return timeline.orElse(null);
}
@Override
public List<Event> findAll() {
return eventRepository.findAll();
}
@Override
public Page<Event> findAll(Pageable pageable) {
return eventRepository.findAll(pageable);
}
@Override
public List<Event> findLatestN(int n) {
return eventRepository.findLatestN(n);
}
@Override
public Event findById(Long id) {
return eventRepository.findById(id).orElse(null);
}
}
|
want-fly/huaweicloud-sdk-go-v3
|
services/ief/v1/model/model_list_pods_request.go
|
package model
import (
"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/utils"
"strings"
)
// Request Object
type ListPodsRequest struct {
// 指定节点查询应用实例, 可选, 与group_id、deployment_id、deployment_ids四选一
NodeId *string `json:"node_id,omitempty"`
// 指定节点组查询应用实例,可选,与node_id、deployment_id、deployment_ids四选一
GroupId *string `json:"group_id,omitempty"`
// 指定应用部署ID查询应用实例, 可选, 与node_id、group_id、deployment_ids四选一
DeploymentId *string `json:"deployment_id,omitempty"`
// 指定应用部署ID列表查询应用实例,多个ID使用逗号分隔,可选, 与node_id、group_id、deployment_id四选一
DeploymentIds *string `json:"deployment_ids,omitempty"`
// 查询返回记录的数量限制
Limit *int32 `json:"limit,omitempty"`
// 偏移量,表示查询该偏移量后面的记录
Offset *int32 `json:"offset,omitempty"`
// 铂金版实例ID,专业版实例为空值
IefInstanceId *string `json:"ief-instance-id,omitempty"`
}
func (o ListPodsRequest) String() string {
data, err := utils.Marshal(o)
if err != nil {
return "ListPodsRequest struct{}"
}
return strings.Join([]string{"ListPodsRequest", string(data)}, " ")
}
|
nogproject/nog
|
backend/internal/workflows/events/freeze-repo.go
|
package events
import (
"errors"
pb "github.com/nogproject/nog/backend/internal/nogfsopb"
"github.com/nogproject/nog/backend/pkg/ulid"
"github.com/nogproject/nog/backend/pkg/uuid"
)
// `WorkflowEvent_EV_FSO_FREEZE_REPO_STARTED_2` aka `EvFreezeRepoStarted2`.
// See freeze-repo workflow aka freezerepowf.
type EvFreezeRepoStarted2 struct {
RegistryId uuid.I // only freezerepowf.
RegistryName string // only freezerepowf.
StartRegistryVid ulid.I // only freezerepowf (optional).
RepoId uuid.I // only freezerepowf.
StartRepoVid ulid.I // only freezerepowf (optional).
RepoGlobalPath string // freezerepowf and workflow indexes.
AuthorName string // only freezerepowf.
AuthorEmail string // only freezerepowf.
WorkflowId uuid.I // only workflow indexes.
WorkflowEventId ulid.I // only workflow indexes.
}
func (EvFreezeRepoStarted2) WorkflowEvent() {}
func (ev *EvFreezeRepoStarted2) validateWorkflow() error {
if ev.RegistryId == uuid.Nil {
return errors.New("nil RegistryId")
}
if ev.RegistryName == "" {
return errors.New("empty RegistryName")
}
// StartRegistryVid may be nil.
if ev.RepoId == uuid.Nil {
return errors.New("nil RepoId")
}
// StartRepoVid may be nil.
if ev.RepoGlobalPath == "" {
return errors.New("empty RepoGlobalPath")
}
if ev.AuthorName == "" {
return errors.New("empty AuthorName")
}
if ev.AuthorEmail == "" {
return errors.New("empty AuthorEmail")
}
if ev.WorkflowId != uuid.Nil {
return errors.New("non-nil WorkflowId")
}
if ev.WorkflowEventId != ulid.Nil {
return errors.New("non-nil WorkflowEventId")
}
return ev.validateCommon()
}
func (ev *EvFreezeRepoStarted2) validateIndex() error {
if ev.RegistryId != uuid.Nil {
return errors.New("non-nil RegistryId")
}
if ev.RegistryName != "" {
return errors.New("non-empty RegistryName")
}
if ev.StartRegistryVid != ulid.Nil {
return errors.New("non-nil StartRegistryVid")
}
if ev.RepoId != uuid.Nil {
return errors.New("non-nil RepoId")
}
if ev.StartRepoVid != ulid.Nil {
return errors.New("non-nil StartRepoVid")
}
if ev.RepoGlobalPath == "" {
return errors.New("empty RepoGlobalPath")
}
if ev.AuthorName != "" {
return errors.New("non-empty AuthorName")
}
if ev.AuthorEmail != "" {
return errors.New("non-empty AuthorEmail")
}
if ev.WorkflowId == uuid.Nil {
return errors.New("nil WorkflowId")
}
if ev.WorkflowEventId == ulid.Nil {
return errors.New("nil WorkflowEventId")
}
return ev.validateCommon()
}
func (ev *EvFreezeRepoStarted2) validateCommon() error {
return nil
}
func NewPbFreezeRepoStarted2Workflow(ev *EvFreezeRepoStarted2) pb.WorkflowEvent {
if err := ev.validateWorkflow(); err != nil {
panic(err)
}
evpb := pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_STARTED_2,
RegistryId: ev.RegistryId[:],
FsoRegistryName: ev.RegistryName,
RepoId: ev.RepoId[:],
GitAuthor: &pb.GitUser{
Name: ev.AuthorName,
Email: ev.AuthorEmail,
},
FsoRepoInitInfo: &pb.FsoRepoInitInfo{
GlobalPath: ev.RepoGlobalPath,
},
}
if ev.StartRegistryVid != ulid.Nil {
evpb.RegistryEventId = ev.StartRegistryVid[:]
}
if ev.StartRepoVid != ulid.Nil {
evpb.RepoEventId = ev.StartRepoVid[:]
}
return evpb
}
func NewPbFreezeRepoStarted2Index(ev *EvFreezeRepoStarted2) pb.WorkflowEvent {
if err := ev.validateIndex(); err != nil {
panic(err)
}
return pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_STARTED_2,
WorkflowId: ev.WorkflowId[:],
WorkflowEventId: ev.WorkflowEventId[:],
FsoRepoInitInfo: &pb.FsoRepoInitInfo{
GlobalPath: ev.RepoGlobalPath,
},
}
}
func fromPbFreezeRepoStarted2(evpb *pb.WorkflowEvent) (WorkflowEvent, error) {
if evpb.Event != pb.WorkflowEvent_EV_FSO_FREEZE_REPO_STARTED_2 {
panic("invalid event")
}
ev := &EvFreezeRepoStarted2{}
if evpb.RegistryId != nil {
id, err := uuid.FromBytes(evpb.RegistryId)
if err != nil {
return nil, err
}
ev.RegistryId = id
}
ev.RegistryName = evpb.FsoRegistryName
if evpb.RegistryEventId != nil {
vid, err := ulid.ParseBytes(evpb.RegistryEventId)
if err != nil {
return nil, err
}
ev.StartRegistryVid = vid
}
if evpb.RepoId != nil {
id, err := uuid.FromBytes(evpb.RepoId)
if err != nil {
return nil, err
}
ev.RepoId = id
}
if evpb.RepoEventId != nil {
vid, err := ulid.ParseBytes(evpb.RepoEventId)
if err != nil {
return nil, err
}
ev.StartRepoVid = vid
}
if inf := evpb.FsoRepoInitInfo; inf != nil {
ev.RepoGlobalPath = inf.GlobalPath
}
if a := evpb.GitAuthor; a != nil {
ev.AuthorName = a.Name
ev.AuthorEmail = a.Email
}
if evpb.WorkflowId != nil {
id, err := uuid.FromBytes(evpb.WorkflowId)
if err != nil {
return nil, err
}
ev.WorkflowId = id
}
if evpb.WorkflowEventId != nil {
vid, err := ulid.ParseBytes(evpb.WorkflowEventId)
if err != nil {
return nil, err
}
ev.WorkflowEventId = vid
}
return ev, nil
}
// `WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_STARTED` aka `EvFreezeRepoFilesStarted`.
// See freeze-repo workflow aka freezerepowf.
type EvFreezeRepoFilesStarted struct{}
func (EvFreezeRepoFilesStarted) WorkflowEvent() {}
func NewPbFreezeRepoFilesStarted() pb.WorkflowEvent {
evpb := pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_STARTED,
}
return evpb
}
func fromPbFreezeRepoFilesStarted(evpb *pb.WorkflowEvent) (WorkflowEvent, error) {
if evpb.Event != pb.WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_STARTED {
panic("invalid event")
}
ev := &EvFreezeRepoFilesStarted{}
return ev, nil
}
// `WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_COMPLETED` aka `EvFreezeRepoFilesCompleted`.
// See freeze-repo workflow aka freezerepowf.
type EvFreezeRepoFilesCompleted struct {
StatusCode int32
StatusMessage string
}
func (EvFreezeRepoFilesCompleted) WorkflowEvent() {}
func NewPbFreezeRepoFilesCompletedOk() pb.WorkflowEvent {
return pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_COMPLETED,
StatusCode: 0,
StatusMessage: "",
}
}
func NewPbFreezeRepoFilesCompletedError(code int32, message string) pb.WorkflowEvent {
return pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_COMPLETED,
StatusCode: code,
StatusMessage: message,
}
}
func fromPbFreezeRepoFilesCompleted(evpb *pb.WorkflowEvent) (WorkflowEvent, error) {
if evpb.Event != pb.WorkflowEvent_EV_FSO_FREEZE_REPO_FILES_COMPLETED {
panic("invalid event")
}
ev := &EvFreezeRepoFilesCompleted{
StatusCode: evpb.StatusCode,
StatusMessage: evpb.StatusMessage,
}
return ev, nil
}
// `WorkflowEvent_EV_FSO_FREEZE_REPO_COMPLETED_2` aka `EvFreezeRepoCompleted2`.
// See freeze-repo workflow aka freezerepowf.
type EvFreezeRepoCompleted2 struct {
StatusCode int32 // only in freezerepowf, repos, and registry.
StatusMessage string // only in freezerepowf, repos, and registry.
WorkflowId uuid.I // only in workflow indexes.
WorkflowEventId ulid.I // only in workflow indexes.
}
func (EvFreezeRepoCompleted2) WorkflowEvent() {}
func NewPbFreezeRepoCompleted2Ok() pb.WorkflowEvent {
return pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_COMPLETED_2,
StatusCode: 0,
StatusMessage: "",
}
}
func NewPbFreezeRepoCompleted2Error(code int32, message string) pb.WorkflowEvent {
return pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_COMPLETED_2,
StatusCode: code,
StatusMessage: message,
}
}
func NewPbFreezeRepoCompleted2IdRef(id uuid.I, vid ulid.I) pb.WorkflowEvent {
return pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_COMPLETED_2,
WorkflowId: id[:],
WorkflowEventId: vid[:],
}
}
func fromPbFreezeRepoCompleted2(evpb *pb.WorkflowEvent) (WorkflowEvent, error) {
if evpb.Event != pb.WorkflowEvent_EV_FSO_FREEZE_REPO_COMPLETED_2 {
panic("invalid event")
}
ev := &EvFreezeRepoCompleted2{
StatusCode: evpb.StatusCode,
StatusMessage: evpb.StatusMessage,
}
if evpb.WorkflowId != nil {
id, err := uuid.FromBytes(evpb.WorkflowId)
if err != nil {
return nil, err
}
ev.WorkflowId = id
}
if evpb.WorkflowEventId != nil {
vid, err := ulid.ParseBytes(evpb.WorkflowEventId)
if err != nil {
return nil, err
}
ev.WorkflowEventId = vid
}
return ev, nil
}
// `WorkflowEvent_EV_FSO_FREEZE_REPO_COMMITTED` aka
// `EvFreezeRepoCommitted`.
type EvFreezeRepoCommitted struct{}
func (EvFreezeRepoCommitted) WorkflowEvent() {}
func NewPbFreezeRepoCommitted() pb.WorkflowEvent {
return pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_COMMITTED,
}
}
func fromPbFreezeRepoCommitted(
evpb *pb.WorkflowEvent,
) (WorkflowEvent, error) {
return &EvFreezeRepoCommitted{}, nil
}
// `WorkflowEvent_EV_FSO_FREEZE_REPO_DELETED` aka `EvFreezeRepoDeleted`.
// See split-root workflow aka splitrootwf.
type EvFreezeRepoDeleted struct {
WorkflowId uuid.I // only in workflow indexes.
}
func (EvFreezeRepoDeleted) WorkflowEvent() {}
func NewPbFreezeRepoDeleted(id uuid.I) pb.WorkflowEvent {
return pb.WorkflowEvent{
Event: pb.WorkflowEvent_EV_FSO_FREEZE_REPO_DELETED,
WorkflowId: id[:],
}
}
func fromPbFreezeRepoDeleted(evpb *pb.WorkflowEvent) (WorkflowEvent, error) {
ev := &EvFreezeRepoDeleted{}
id, err := uuid.FromBytes(evpb.WorkflowId)
if err != nil {
return nil, err
}
ev.WorkflowId = id
return ev, nil
}
|
googlemaps/android-on-demand-rides-deliveries-samples
|
java/consumer/src/main/java/com/google/mapsplatform/transportation/sample/consumer/provider/service/RetryingFuture.java
|
<gh_stars>1-10
/* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://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 com.google.mapsplatform.transportation.sample.consumer.provider.service;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import com.google.common.base.Predicate;
import com.google.common.base.Supplier;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SettableFuture;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
/** Retries getting Future if exception is thrown or certain criteria is not met. */
public final class RetryingFuture {
static int RUN_FOREVER = Integer.MIN_VALUE;
private final ScheduledExecutorService executor;
public RetryingFuture(ScheduledExecutorService executor) {
this.executor = executor;
}
/**
* Retries getting Future if exception is thrown or certain criteria is not met.
*
* @param futureSupplier entity that can create the target future.
* @param retries number of retries. Will run forever until success condition is met if set to
* {@link #RUN_FOREVER} .
* @param intervalMillis retry interval in milliseconds.
* @param successCondition if evaluates to true return future, otherwise retry until condition is
* met or retry count exhausted.
* @param <T> return type.
* @return valid result of type T.
*/
public <T> ListenableFuture<T> runWithRetries(
Supplier<ListenableFuture<T>> futureSupplier,
int retries,
long intervalMillis,
Predicate<T> successCondition) {
SettableFuture<T> resultFuture = SettableFuture.create();
runWithRetriesInternal(resultFuture, futureSupplier, retries, intervalMillis, successCondition);
return resultFuture;
}
private <T> void runWithRetriesInternal(
final SettableFuture<T> future,
final Supplier<ListenableFuture<T>> futureSupplier,
final int retries,
final long intervalMillis,
final Predicate<T> successCondition) {
ListenableFuture<T> immediateFuture;
try {
immediateFuture = futureSupplier.get();
} catch (Exception e) {
handleFailure(future, futureSupplier, retries, intervalMillis, successCondition, e);
return;
}
Futures.addCallback(
immediateFuture,
new FutureCallback<T>() {
@Override
public void onSuccess(T result) {
if (successCondition.apply(result)) {
future.set(result);
} else {
RuntimeException exception =
new RuntimeException("Success condition not met, retrying.");
handleFailure(
future, futureSupplier, retries, intervalMillis, successCondition, exception);
}
}
@Override
public void onFailure(Throwable t) {
handleFailure(future, futureSupplier, retries, intervalMillis, successCondition, t);
}
},
MoreExecutors.directExecutor());
}
private <T> void handleFailure(
SettableFuture<T> future,
Supplier<ListenableFuture<T>> futureSupplier,
int retries,
long delayInMillis,
Predicate<T> successCondition,
Throwable t) {
if (retries == RUN_FOREVER || retries > 0) {
ScheduledFuture<?> unused =
executor.schedule(
() -> {
int newRetriesCount = retries == RUN_FOREVER ? RUN_FOREVER : retries - 1;
runWithRetriesInternal(
future, futureSupplier, newRetriesCount, delayInMillis, successCondition);
},
delayInMillis,
MILLISECONDS);
} else {
future.setException(t);
}
}
}
|
sartak/slate2
|
src/ide/top-menu/index.js
|
<reponame>sartak/slate2<filename>src/ide/top-menu/index.js
import React, { useState } from 'react';
import './index.less';
import { SaveButton } from './save-button';
import { DownloadButton } from './download-button';
import { BuildButton } from './build-button';
import { PreviewButton } from './preview-button';
import { PreflightButton } from './preflight-button';
import { ReplayButton } from './replay-button';
import { ReplayScrubber } from './replay-scrubber';
import { SettingsButton } from './settings-button';
export const TopMenu = () => {
const [isBusy, setBusy] = useState(false);
return (
<div className="TopMenu">
<SaveButton isBusy={isBusy} setBusy={setBusy} />
<DownloadButton isBusy={isBusy} setBusy={setBusy} />
<BuildButton isBusy={isBusy} setBusy={setBusy} />
<PreviewButton isBusy={isBusy} setBusy={setBusy} />
<PreviewButton isBusy={isBusy} setBusy={setBusy} isPreflight />
<PreflightButton isBusy={isBusy} setBusy={setBusy} />
<ReplayButton isBusy={isBusy} setBusy={setBusy} />
<ReplayScrubber />
<SettingsButton isBusy={isBusy} setBusy={setBusy} />
</div>
);
};
|
r-lyeh/scriptorium
|
gamemonkey/src/gm/gmMachine.h
|
<filename>gamemonkey/src/gm/gmMachine.h
/*
_____ __ ___ __ ____ _ __
/ ___/__ ___ _ ___ / |/ /__ ___ / /_____ __ __/ __/_______(_)__ / /_
/ (_ / _ `/ ' \/ -_) /|_/ / _ \/ _ \/ '_/ -_) // /\ \/ __/ __/ / _ \/ __/
\___/\_,_/_/_/_/\__/_/ /_/\___/_//_/_/\_\\__/\_, /___/\__/_/ /_/ .__/\__/
/___/ /_/
See Copyright Notice in this file
*/
#ifndef _GMMACHINE_H_
#define _GMMACHINE_H_
/**********************************************************
GameMonkey Script
created by
<NAME> and <NAME>
**********************************************************/
/**********************************************************
GameMonkey Script License
Copyright (c) 2003 Auran Development Ltd.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions of
the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**********************************************************/
#include "gmConfig.h"
#include "gmMemFixed.h"
#include "gmMemFixedSet.h"
#include "gmLog.h"
#include "gmVariable.h"
#include "gmTableObject.h"
#include "gmOperators.h"
#include "gmFunctionObject.h"
#include "gmHash.h"
#include "gmArraySimple.h"
#include "gmIncGC.h"
#undef GetObject //Argh Windows defines this in WINGDI.H
#define GM_VERSION "1.29"
// fwd decls
class gmStringObject;
class gmUserObject;
class gmMachine;
class gmThread;
struct gmStackFrame;
struct gmSignal;
class gmSourceEntry;
class gmStream;
class gmBlockList;
enum gmMachineCommand
{
MC_COLLECT_GARBAGE = 0, // called when a gc cycle is run, a_context is the gc mark
MC_THREAD_EXCEPTION, // called when a thread causes an exception. a_context is the thread. (which is about to die) return false to kill thread, else it will hang around for debugging
MC_THREAD_CREATE, // called when a thread is created. a_context is the thread.
MC_THREAD_DESTROY, // called when a thread is destroyed. a_context is the thread. (which is about to die)
};
/// \brief gmMachineCallback is a callback used for debugger tie ins etc.
/// \return depends on a_command
typedef bool (GM_CDECL *gmMachineCallback)(gmMachine * a_machine, gmMachineCommand a_command, const void * a_context);
#if GM_USE_INCGC
typedef void (GM_CDECL *gmGCDestructCallback)(gmMachine * a_machine, gmUserObject* a_object);
typedef bool (GM_CDECL *gmGCTraceCallback)(gmMachine * a_machine, gmUserObject* a_object, gmGarbageCollector* a_gc, const int a_workLeftToGo, int& a_workDone);
#else //GM_USE_INCGC
typedef void (GM_CDECL *gmGarbageCollectCallback)(gmMachine * a_machine, gmUserObject * a_object, gmuint32 a_mark);
#endif //GM_USE_INCGC
/// \brief gmAsStringCallback is a callback registered with a gm type, which will convert the type to a string for print and debug purposes, the callback must
/// convert the type to a string < 256 characters long.
/// \param a_bufferSize at least 256 chars
typedef void (GM_CDECL *gmAsStringCallback)(gmUserObject * a_userObj, char * a_buffer, int a_bufferSize);
typedef void (GM_CDECL *gmPrintCallback)(gmMachine * a_machine, const char * a_string);
typedef bool (GM_CDECL *gmThreadIteratorCallback)(gmThread * a_thread, void * a_context);
typedef bool (GM_CDECL *gmUserBreakCallback)(gmThread * a_thread);
// the following callbacks return true if the thread is to yield after completion of the callback.
typedef bool (GM_CDECL *gmDebugLineCallback)(gmThread * a_thread);
typedef bool (GM_CDECL *gmDebugCallCallback)(gmThread * a_thread);
typedef bool (GM_CDECL *gmDebugRetCallback)(gmThread * a_thread);
typedef bool (GM_CDECL *gmDebugIsBrokenCallback)(gmThread * a_thread); // returns true if the thread is broken, or if the thread is pending delete after exception
#if GM_USER_FOREACH
/// Iterator types (NOTE: Should use these enums in gmCodeGen.cpp)
typedef int gmTypeIterator;
enum
{
GM_TYPE_ITR_NULL = -1,
GM_TYPE_ITR_FIRST = -2,
};
/// iterator callback
typedef void (GM_CDECL *gmTypeIteratorCallback)(gmThread *a_thread, const gmUserObject *a_user, gmTypeIterator &a_it, gmVariable *a_key, gmVariable *a_value);
#endif //GM_USER_FOREACH
/// \struct gmFunctionEntry
struct gmFunctionEntry
{
const char * m_name;
gmCFunction m_function;
const void * m_userData; ///< Optional user ptr or value to assist binding
};
/// \struct gmThreadInfo
struct gmThreadInfo
{
int m_threadId;
int m_threadState;
void * m_threadDebugUser;
};
/// \struct gmSignal
struct gmSignal
{
int m_srcThreadId; ///< id of the signalling thread.
int m_dstThreadId; ///< id of dst thread.
gmVariable m_signal; ///< signal.
gmSignal * m_nextSignal; ///< next thread in the threads signal list.
};
/// \class gmBlock
class gmBlock : public gmListDoubleNode<gmBlock>
{
public:
bool m_signalled; ///< has this block been signalled?
int m_srcThreadId; ///< id of the thread to cause the unblock
gmVariable m_block; ///< the block object, this will be pushed on the stack if unblocked.
gmThread * m_thread; ///< the thread this block belongs to
gmBlock * m_nextBlock; ///< next block on this thread
#if GM_USE_ENDON
bool m_endOn; ///< if set to true, the thread is killed when this signal is received
#endif //GM_USE_ENDON
class gmBlockList * m_list; ///< parent block list.
};
/// \class gmMachine
/// \brief the gmMachine object represents a scripting instance. many script threads may run on the one gmMachine.
/// gmMachine manages script source, script memory, garbage collection, function type overrides, operator overrides,
/// threads etc.
class gmMachine
{
public:
gmMachine();
virtual ~gmMachine();
/// \brief ResetAndFreeMemory() will reset the gmMachine.
void ResetAndFreeMemory();
/// \brief Init() will recreate the machine... only need to call this if you have called ResetAndFreeMemory()
/// \sa ResetAndFreeMemory();
void Init();
static gmMachineCallback s_machineCallback; ///< global machine callback
static gmPrintCallback s_printCallback; ///< global print callback
static gmUserBreakCallback s_userBreakCallback; ///< global execution break callback
//
//
// Registry
//
//
/// \brief RegisterLibrary() will register an array of functions to the machine as globals.
/// \param a_asTable as non-null will create a table in global scope and place the functions in the table.
/// \param a_newTable will create a new table for the functions; if false it will insert them into the existing table (if found)
void RegisterLibrary(gmFunctionEntry * a_functions, int a_numFunctions, const char * a_asTable = NULL, bool a_newTable = true);
/// \brief RegisterTypeLibrary() will register an array of functions to the machine as type variables.
void RegisterTypeLibrary(gmType a_type, gmFunctionEntry * a_functions, int a_numFunctions);
/// \brief RegisterLibraryFunction() will register a single functions to the machine as global.
/// \param a_name Script function name
/// \param a_function C function
/// \param a_asTable as non-null will use/create a table in global scope and place the functions in the table.
void RegisterLibraryFunction(const char * a_name, gmCFunction a_function, const char * a_asTable = NULL, const void* a_userData = NULL)
{
gmFunctionEntry entry = {a_name, a_function, a_userData};
RegisterLibrary(&entry, 1, a_asTable, false);
}
/// \brief RegisterTypeLibraryFunction() will register a single functions to the machine as type variable.
/// \param a_type Valid/Registered type identifier
/// \param a_name Script function name
/// \param a_function C function
void RegisterTypeLibraryFunction(gmType a_type, const char * a_name, gmCFunction a_function, const void* a_userData = NULL)
{
gmFunctionEntry entry = {a_name, a_function, a_userData};
RegisterTypeLibrary(a_type, &entry, 1);
}
/// \brief CreateUserType() will create a new user type such that you may bind your own operator functions etc.
/// \return the new user type.
gmType CreateUserType(const char * a_name);
/// \brief RegisterTypeVariable() will register a variable for a given gm type. This allows a default library
/// to bind type specific functions and constants to that type. ie, binding a ToFloat() function to the
/// int type.
void RegisterTypeVariable(gmType a_type, const char * a_variableName, const gmVariable &a_variable);
/// \brief RegisterTypeOperator() will let you regiester operators for user types only.
/// \param a_operator
/// \param a_function
/// \param a_nativeFunction
bool RegisterTypeOperator(gmType a_type, gmOperator a_operator, gmFunctionObject * a_function, gmOperatorFunction a_nativeFunction = NULL);
#if GM_USER_FOREACH
/// \brief RegisterTypeIterator() will let you assign a callback
/// \param a_type User type identifier
/// \param a_callback Iterator callback function
bool RegisterTypeIterator(gmType a_type, gmTypeIteratorCallback a_callback);
#endif //GM_USER_FOREACH
/// \brief GetTypeVariable() will lookup the type variables for the given variable key.
inline gmVariable GetTypeVariable(gmType a_type, const gmVariable &a_key) const;
/// \brief GetTypeNativeOperator() will lookup a type for a native operator
inline gmOperatorFunction GetTypeNativeOperator(gmType a_type, gmOperator a_operator);
/// \brief GetTypeOperator() will lookup a type for a GM function operator
inline gmFunctionObject * GetTypeOperator(gmType a_type, gmOperator a_operator);
/// \brief GetTypeName() will return the name of a_type
const char * GetTypeName(gmType a_type);
/// \brief Access the table for a 'type', or return NULL.
gmTableObject * GetTypeTable(gmType a_type);
/// \brief GetTypeId() will return the gmType for the specified type or GM_INVALID_TYPE if not found.
gmType GetTypeId(const char * a_typename) const;
//
//
// Thread Interface
//
//
/// \brief CheckSyntax()
/// \brief return the number of errors
int CheckSyntax(const char * a_string);
/// \brief ExecuteString() will compile a_string to byte code. If no errors occured, the code will be executed
/// in a new thread.
/// \param a_string is null terminated script string.
/// \param a_threadId is set to the id of the thread and may be NULL.
/// \param a_now is true, and execution will occur immediataly, and not at the next Execute() call.
/// \param a_filename Name of the source file, used for debug purposes, or NULL.
/// \param a_this The 'this' pointer passed to the un-named function. Or NULL to pass a null gmVariable.
/// \return the number of errors from compiling the script.
/// \sa GetCompileLog()
int ExecuteString(const char * a_string, int * a_threadId = NULL, bool a_now = true, const char * a_filename = NULL, gmVariable* a_this = NULL);
/// \brief ExecuteLib() will execute a pre-compiled lib in a new thread
/// \param a_stream is a stream to pull the lib from
/// \param a_threadId is set to the id of the thread and may be NULL.
/// \param a_now is true, and execution will occur immediataly, and not at the next Execute() call.
/// \param a_filename is the filename the lib came from for debugging purposes.
/// \return false on lib error
bool ExecuteLib(gmStream &a_stream, int * a_threadId = NULL, bool a_now = true, const char * a_filename = NULL, gmVariable* a_this = NULL);
/// \brief ExecuteFunction() will execute a thread on the passed function
bool ExecuteFunction(gmFunctionObject * a_function, int * a_threadId = NULL, bool a_now = true, gmVariable* a_this = NULL);
/// \brief CompileStringToLib() will compile a_string to byte code suitable for storage in a file.
/// \param a_string is null terminated script string.
/// \param a_stream is the file stream to compile the lib to
/// \return the number of errors from compiling the script.
/// \sa GetCompileLog()
int CompileStringToLib(const char * a_string, gmStream &a_stream);
/// \brief CompileStringToFunction()
gmFunctionObject * CompileStringToFunction(const char * a_string, int *a_errorCount = NULL, const char * a_filename = NULL);
/// \brief BindLibToFunction() Bind a precompiled library to a function.
/// \param a_stream is a stream to pull the lib from
/// \param a_filename is the filename the lib came from for debugging purposes.
/// \return Root function from Lib or NULL if failed
gmFunctionObject * BindLibToFunction(gmStream &a_stream, const char * a_filename = NULL);
/// \brief GetLog() will get the compile and runtime log of the last script compiled. log any runtime errors from
/// linked c functions to this log.
inline gmLog &GetLog() { return m_log; }
/// \brief CreateThread() will create a new thread. This thread will be placed in the running thread list.
/// \param a_this
/// \param a_function
/// \param a_threadId is set to the id of the created thread and may be NULL.
/// \return a thread, or NULL if the thread finished executing or could not be created.
gmThread * CreateThread(const gmVariable &a_this, const gmVariable &a_function, int * a_threadId = NULL);
gmThread * CreateThread(int * a_threadId = NULL);
/// \brief GetThread() will return the thread given a thread id.
/// \return NULL on error.
gmThread * GetThread(int a_threadId);
/// \brief Signal() will signal a single thread with the given variable
/// \param a_signal is the signal var
/// \param a_dstThreadId is the thread id we wish to unblock. dstThread id of GM_INVALID_THREAD is all threads
/// \param a_srcThreadId is the thread id of the signaling object
/// \param a_persist is true and the signal may persist if it had the potential to unblock a SYS_PENDING thread.
/// \return true if the signal fired, false otherwise
bool Signal(const gmVariable &a_signal, int a_dstThreadId, int a_srcThreadId);
/// \brief Sys_Block() will add a block to a thread.
/// \return the index of the block that was signalled, or -1 if the blocks were added and the thread is to enter a blocked state.
#if GM_USE_ENDON
int Sys_Block(gmThread * a_thread, int m_numBlocks, const gmVariable * a_blocks, bool a_endon = false);
#else //GM_USE_ENDON
int Sys_Block(gmThread * a_thread, int m_numBlocks, const gmVariable * a_blocks);
#endif //GM_USE_ENDON
/// \brief KillThread()
void KillThread(int a_threadId);
/// \brief ForEachThread()
void ForEachThread(gmThreadIteratorCallback a_callback, void * a_context);
/// \brief Sys_SwitchState() will change the executing state of a thread. if a_to is gmThread::KILLED, the thread
/// is reset.
void Sys_SwitchState(gmThread * a_thread, int a_to);
/// \brief KillExceptionThreads()
void KillExceptionThreads();
/// \brief Execute() will execute all running threads
/// \param m_deltaTime is the time in milliseconds since the machine was last updated.
/// \return number of running sleeping and blocked threads.
int Execute(gmuint32 a_delta);
/// \brief GetTime() will return the machine time in milliseconds.
inline gmuint32 GetTime() const { return m_time; }
/// \brief Presize() will presize the pools
void Presize(int a_pool8,
int a_pool16,
int a_pool24,
int a_pool32,
int a_pool64,
int a_pool128,
int a_pool256,
int a_pool512,
int a_gmStringObj,
int a_gmTableObj,
int a_gmFunctionObj,
int a_gmUserObj,
int a_gmStackFrame
);
//
//
// Garbage Collection Interface
//
//
/// \brief EnableGC() allows you to turn garbage collection on and off.... useful for when you are allocating many
/// objects from c \ c++, but have not yet added them to a thread stack or referenced table \ object such that
/// they will be marked should the garbage collection fire. make sure you turn gc back on again!!!
inline void EnableGC(bool a_state = true) { m_gcEnabled = a_state; }
inline bool IsGCEnabled() const { return m_gcEnabled; }
/// \brief CollectGarbage() will perform a garbage collection sweep iff the desired byte memory usage is less than
/// the current memory usage.
/// NOTE: If incremental collector is used, this may perform a FULL collect immediately.
/// \param a_forceFullCollect Force full collection immediately if garbage collection is not disabled
/// \return true if the garbage collector was run.
bool CollectGarbage(bool a_forceFullCollect = false);
/// \brief GetCurrentMemoryUsage() will return the number of bytes currently allocated by the system.
inline int GetCurrentMemoryUsage() const { return m_currentMemoryUsage + m_fixedSet.GetMemUsed(); }
/// \brief Set the machine to run a gc sweep whenever memory exceeds this limit.
inline void SetDesiredByteMemoryUsageHard(int a_desiredByteMemoryUsageHard);
/// \brief Set the machine to run a gc sweep whenever memory exceeds this limit.
inline void SetDesiredByteMemoryUsageSoft(int a_desiredByteMemoryUsageSoft);
/// \brief Return the number of bytes currently allocated by the system.
inline int GetDesiredByteMemoryUsageHard() const { return m_desiredByteMemoryUsageHard; }
/// \brief Return the number of bytes currently allocated by the system.
inline int GetDesiredByteMemoryUsageSoft() const { return m_desiredByteMemoryUsageSoft; }
/// \brief SetAutoMemoryUsage() will enable auto adjustment of the memory limit occuring with subsequent garbage collects.
inline void SetAutoMemoryUsage(bool a_enableAutoAdjust);
/// \brief Is automatic memory limit calculation enabled?
inline bool GetAutoMemoryUsage() const { return m_autoMem; }
/// \brief GetSystemMemUsed will return the number of bytes allocated by the system. This is slow, call for debug only
unsigned int GetSystemMemUsed() const;
/// \brief Adjust the amount of memory known to be used by the machine.
/// Use this function carefully with user types to allow the machine
/// to consider external memory allocated or freed in association
/// with a user type that will be garbage collected by the machine.
/// Make sure the function is called as positive on the alloc and negative on the free.
inline void AdjustKnownMemoryUsed(int a_amountUsedOrFreed) { m_currentMemoryUsage += a_amountUsedOrFreed; }
/// \brief RegisterUserCallbacks() will register user type garbage collect methods.
#if GM_USE_INCGC
void RegisterUserCallbacks(gmType a_type, gmGCTraceCallback a_gcTrace, gmGCDestructCallback a_gcDestruct, gmAsStringCallback a_asString = NULL);
/// \brief GetUserMarkCallback() will return the gc mark call back for a user type
inline gmGCTraceCallback GetUserGCTraceCallback(gmType a_type) const { return m_types[a_type].m_gcTrace; }
/// \brief GetUserGCCallback() will return the gc destruct call back for a user type
inline gmGCDestructCallback GetUserGCDestructCallback(gmType a_type) const { return m_types[a_type].m_gcDestruct; }
#else //GM_USE_INCGC
void RegisterUserCallbacks(gmType a_type, gmGarbageCollectCallback a_mark, gmGarbageCollectCallback a_gc, gmAsStringCallback a_asString = NULL);
/// \brief GetUserMarkCallback() will return the gc mark call back for a user type
inline gmGarbageCollectCallback GetUserMarkCallback(gmType a_type) const { return m_types[a_type].m_mark; }
/// \brief GetUserGCCallback() will return the gc destruct call back for a user type
inline gmGarbageCollectCallback GetUserGCCallback(gmType a_type) const { return m_types[a_type].m_gc; }
#endif //GM_USE_INCGC
/// \brief Return the callback associated with a_type
inline gmAsStringCallback GetUserAsStringCallback(gmType a_type) const { return m_types[a_type].m_asString; }
#if GM_USER_FOREACH
/// \brief Return the callback associated with a_type
inline gmTypeIteratorCallback GetUserTypeIteratorCallback(gmType a_type) const { return m_types[a_type].m_itrFunc; }
#endif //GM_USER_FOREACH
//
//
// Object Interface
//
//
/// \brief GetGlobals() will return the gmTableObject used to store global variables. note that global variables
/// are common to all threads.
inline gmTableObject * GetGlobals() { return m_global; }
/// \brief GetObject() will convert a gmptr (machine pointer size int) into an object pointer. use this whenever
/// converting from a gmVariable m_value.m_ref to an object.
inline gmObject * GetObject(gmptr a_ref);
/// \brief AllocStringObject() will create a constant string object from the unique string pool.
/// \param a_length is the string length not including '\0' terminator, (-1) if unknown
gmStringObject * AllocStringObject(const char * a_string, int a_length = -1);
/// \brief AllocPermanantStringObject() will create a constant string object from the unique string pool. this
/// string will not be garbage collected. (m_mark == GM_PERSIST)
/// \param a_length is the string length not including '\0' terminator, (-1) if unknown
gmStringObject * AllocPermanantStringObject(const char * a_string, int a_length = -1);
/// \brief AllocTableObject() will create a new empty table.
gmTableObject * AllocTableObject();
/// \brief AllocFunctionObject() will create a new function.
gmFunctionObject * AllocFunctionObject(gmCFunction a_function = NULL);
/// \brief AllocUserObject() will create a new user object.
/// \param a_user is a hook to tie the user object to any system.
/// \param a_userType is the user type user for operator binding etc.
/// \sa CreateUserType()
gmUserObject * AllocUserObject(void * a_user, int a_userType);
//
//
// Debug Interface
//
//
void * m_debugUser; ///< user hook for debugger
/// \brief SetDebugMode() will compile byte code with debug info.
/// This includes storing the source code in the gmMachine, and compiling line and symbol information
/// into the gmFunctionObjects.
inline void SetDebugMode(bool a_debug) { m_debug = a_debug; }
/// \brief GetDebugMode()
inline bool GetDebugMode() const { return m_debug; }
/// \brief AddSourceCode() will add source code to the machine, and return a unique id.
/// This is used when debug mode is set so the remote debugger can retrieve source as needed
/// for debugging.
/// \return a unique id for the source code, or 0 on error.
gmuint32 AddSourceCode(const char * a_source, const char * a_filename);
/// \brief GetSourceCode() will get source code debugging purposes.
/// \return true if the source was found, a_source and a_filename are set to the source and filname for the unique id.
bool GetSourceCode(gmuint32 a_id, const char * &a_source, const char * &a_filename);
/// \brief GetInstructionAtBreakPoint will return the insturction at the given break point, or NULL if the break
/// point could not be found. only works in debug mode. This is quite slow.
const void * GetInstructionAtBreakPoint(gmuint32 a_sourceId, int a_line);
// debugger hooks
gmDebugLineCallback m_line;
gmDebugCallCallback m_call;
gmDebugRetCallback m_return;
gmDebugIsBrokenCallback m_isBroken;
//
//
// Implementation allocators
//
//
inline gmStackFrame * Sys_AllocStackFrame() { return (gmStackFrame *) m_memStackFrames.Alloc(); }
inline void Sys_FreeStackFrame(gmStackFrame * a_frame) { m_memStackFrames.Free(a_frame); }
void Sys_FreeUniqueString(const char * a_string);
inline void * Sys_Alloc(int a_size);
inline void Sys_Free(void * a_mem) { m_fixedSet.Free(a_mem); }
void Sys_RemoveBlocks(gmThread * a_thread);
void Sys_RemoveSignals(gmThread * a_thread);
void Sys_SignalCreateThread(gmThread * a_thread);
#if GM_USE_INCGC
static void GM_CDECL ScanRootsCallBack(gmMachine* a_machine, gmGarbageCollector* a_gc);
inline gmGarbageCollector* GetGC() {GM_ASSERT(m_gc); return m_gc;}
inline void DestructDeleteObject(gmObject* a_object) {FreeObject(a_object);}
gmGarbageCollector* m_gc;
#endif //GM_USE_INCGC
inline int GetStatsGCNumFullCollects() { return m_statsGCFullCollect; }
inline int GetStatsGCNumIncCollects() { return m_statsGCIncCollect; }
inline int GetStatsGCNumWarnings() { return m_statsGCWarnings; }
/// \brief Is GC actually running a cycle
bool IsGCRunning();
/// \brief Add a CPP owned gmObject so machine knows about it to handle GC.
void AddCPPOwnedGMObject(gmObject * a_obj);
/// \brief Remove a CPP owned gmObject.
void RemoveCPPOwnedGMObject(gmObject * a_obj);
/// \brief Check if gmObject is in CPP owned list
bool IsCPPOwnedGMObject(gmObject * a_obj);
protected:
// Threads
int m_threadId; ///< cycling thread number
gmListDouble<gmThread> m_runningThreads;
gmListDouble<gmThread> m_blockedThreads;
gmListDouble<gmThread> m_sleepingThreads; ///< sorted by timez
gmListDouble<gmThread> m_killedThreads;
gmListDouble<gmThread> m_exceptionThreads; ///< dead threads, hanging around for debugging
gmHash<int, gmThread> m_threads;
int GetThreadId();
gmuint32 m_time; ///< machine time in milliseconds. (gives us 50 days)
gmThread * m_nextThread; ///< Set when cycling through threads, allows remove during iteration
bool m_nextThreadValid; ///< Set to true when m_nextThread is in use, even if it is null, which occurs on last thread.
// Objects
void FreeObject(gmObject * a_obj); ///< FreeObject() does not Destruct the object.
gmObject * CheckReference(gmptr a_ref);
gmTableObject * m_global; ///< global variables
gmObject * m_objects; ///< list of all objects
// Allocators
gmMemFixed m_memStringObj; ///< memory for String objects
gmMemFixed m_memTableObj; ///< memory for Table objects
gmMemFixed m_memFunctionObj; ///< memory for Function objects
gmMemFixed m_memUserObj; ///< memory for User objects
gmMemFixed m_memStackFrames; ///< memory for stack frame structures
gmMemFixedSet m_fixedSet; ///< string and small variable sized stuff allocator.
// Garbage Collection
int m_desiredByteMemoryUsageHard; ///< The hard upper memory limit
int m_desiredByteMemoryUsageSoft; ///< The soft limit where incremental GC may start
int m_currentMemoryUsage; ///< Current (known) used memory
bool m_autoMem; ///< Automatically adjust memory limit(s)
gmuint32 m_mark; ///< The mark phase Id for atomic GC
bool m_gcEnabled; ///< GC enabled/disabled
int m_framesSinceLastIncCollect; ///< number of frames or oportunities since last inc GC end
int m_gcPhaseCount; ///< GC phase, 2 phases required for full GC
int m_statsGCFullCollect; ///< How many times a full collect has occured
int m_statsGCIncCollect; ///< How many times incremental collect has started
int m_statsGCWarnings; ///< The incGC thinks it is being used inefficiently. It this number is large and growing rapidly the hard and soft limits may need calibrating.
// String Table
gmHash<const char *, gmStringObject> m_strings;
// Types
class Type
{
public:
gmStringObject * m_name; ///< type name
gmOperatorFunction m_nativeOperators[O_MAXOPERATORS]; ///< stack operators
gmptr m_operators[O_MAXOPERATORS]; ///< slow script call operators
gmTableObject * m_variables; ///< user type variables
#if GM_USE_INCGC
gmGCDestructCallback m_gcDestruct; ///< user type gc destruct callback
gmGCTraceCallback m_gcTrace; ///< user type gc trace callback
#else //GM_USE_INCGC
gmGarbageCollectCallback m_mark; ///< user type gc mark callback
gmGarbageCollectCallback m_gc; ///< user type gc callback
#endif //GM_USE_INCGC
gmAsStringCallback m_asString; ///< user type AsString callback
#if GM_USER_FOREACH
gmTypeIteratorCallback m_itrFunc; ///< user type iterator callback
#endif //GM_USER_FOREACH
void Init();
};
gmArraySimple<Type> m_types; ///< Variable types
#if GM_USE_INCGC
#if !GC_KEEP_PERSISTANT_SEPARATE
gmArraySimple<gmObject*> m_permanantStrings;
#endif //!GC_KEEP_PERSISTANT_SEPARATE
#endif //GM_USE_INCGC
void ResetDefaultTypes();
// Blocking
gmHash<gmVariable, gmBlockList, gmVariable> m_blocks; // current registered blocks.
// C++ owned gmObjects
class ObjHashNode : public gmHashNode<gmObject *, ObjHashNode>
{
public:
gmObject * m_obj;
const gmObject * GetKey() const { return m_obj; }
};
gmHash<gmObject*, ObjHashNode> m_cppOwnedGMObjs; ///< cpp owned gmObjects
// Debugging
bool m_debug;
gmListDouble<gmSourceEntry> m_source;
gmLog m_log;
};
//
//
// INLINE IMPLEMENTATION
//
//
inline void gmMachine::SetDesiredByteMemoryUsageHard(int a_desiredByteMemoryUsageHard)
{
m_desiredByteMemoryUsageHard = a_desiredByteMemoryUsageHard;
}
inline void gmMachine::SetDesiredByteMemoryUsageSoft(int a_desiredByteMemoryUsageSoft)
{
m_desiredByteMemoryUsageSoft = a_desiredByteMemoryUsageSoft;
}
inline void gmMachine::SetAutoMemoryUsage(bool a_enableAutoAdjust)
{
m_autoMem = a_enableAutoAdjust;
}
inline gmObject * gmMachine::GetObject(gmptr a_ref)
{
#if GMMACHINE_SUPERPARANOIDGC
return CheckReference(a_ref);
#else // GMMACHINE_SUPERPARANOIDGC
return (gmObject *) a_ref;
#endif // GMMACHINE_SUPERPARANOIDGC
}
inline gmVariable gmMachine::GetTypeVariable(gmType a_type, const gmVariable &a_key) const
{
return m_types[a_type].m_variables->Get(a_key);
}
inline gmOperatorFunction gmMachine::GetTypeNativeOperator(gmType a_type, gmOperator a_operator)
{
return m_types[a_type].m_nativeOperators[a_operator];
}
inline gmFunctionObject * gmMachine::GetTypeOperator(gmType a_type, gmOperator a_operator)
{
return (gmFunctionObject *) GetObject(m_types[a_type].m_operators[a_operator]);
}
inline void * gmMachine::Sys_Alloc(int a_size)
{
return m_fixedSet.Alloc(a_size);
}
#endif // _GMMACHINE_H_
|
TalesMUD/talesmud
|
pkg/entities/traits/lookat.go
|
<gh_stars>10-100
package traits
//LookAt ...
type LookAt struct {
Detail string `bson:"detail,omitempty" json:"detail"`
}
|
sekikn/incubator-gobblin
|
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaStreamingExtractor.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.gobblin.source.extractor.extract.kafka;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.avro.Schema;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Metric;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import com.google.common.util.concurrent.AtomicDouble;
import com.google.gson.JsonElement;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.apache.gobblin.commit.CommitStep;
import org.apache.gobblin.configuration.ConfigurationKeys;
import org.apache.gobblin.configuration.State;
import org.apache.gobblin.configuration.WorkUnitState;
import org.apache.gobblin.kafka.client.DecodeableKafkaRecord;
import org.apache.gobblin.kafka.client.GobblinKafkaConsumerClient;
import org.apache.gobblin.kafka.client.KafkaConsumerRecord;
import org.apache.gobblin.metrics.ContextAwareGauge;
import org.apache.gobblin.metrics.Tag;
import org.apache.gobblin.metrics.kafka.KafkaSchemaRegistry;
import org.apache.gobblin.metrics.kafka.SchemaRegistryException;
import org.apache.gobblin.source.extractor.CheckpointableWatermark;
import org.apache.gobblin.source.extractor.ComparableWatermark;
import org.apache.gobblin.source.extractor.Watermark;
import org.apache.gobblin.source.extractor.WatermarkSerializerHelper;
import org.apache.gobblin.source.extractor.extract.FlushingExtractor;
import org.apache.gobblin.source.extractor.extract.LongWatermark;
import org.apache.gobblin.source.workunit.WorkUnit;
import org.apache.gobblin.stream.FlushRecordEnvelope;
import org.apache.gobblin.stream.RecordEnvelope;
import org.apache.gobblin.util.ClassAliasResolver;
import org.apache.gobblin.util.ClustersNames;
import org.apache.gobblin.util.ConfigUtils;
import org.apache.gobblin.util.reflection.GobblinConstructorUtils;
import static org.apache.gobblin.source.extractor.extract.kafka.KafkaProduceRateTracker.KAFKA_PARTITION_PRODUCE_RATE_KEY;
import static org.apache.gobblin.source.extractor.extract.kafka.KafkaSource.DEFAULT_GOBBLIN_KAFKA_CONSUMER_CLIENT_FACTORY_CLASS;
import static org.apache.gobblin.source.extractor.extract.kafka.KafkaSource.GOBBLIN_KAFKA_CONSUMER_CLIENT_FACTORY_CLASS;
import static org.apache.gobblin.source.extractor.extract.kafka.workunit.packer.KafkaTopicGroupingWorkUnitPacker.NUM_PARTITIONS_ASSIGNED;
/**
* An implementation of {@link org.apache.gobblin.source.extractor.Extractor} which reads from Kafka and returns records .
* Type of record depends on deserializer set.
*/
@Slf4j
public class KafkaStreamingExtractor<S> extends FlushingExtractor<S, DecodeableKafkaRecord> {
public static final String DATASET_KEY = "dataset";
public static final String DATASET_PARTITION_KEY = "datasetPartition";
private static final Long MAX_LOG_DECODING_ERRORS = 5L;
private static final String KAFKA_EXTRACTOR_STATS_REPORTING_INTERVAL_MINUTES_KEY =
"gobblin.kafka.extractor.statsReportingIntervalMinutes";
private static final Long DEFAULT_KAFKA_EXTRACTOR_STATS_REPORTING_INTERVAL_MINUTES = 1L;
private final ClassAliasResolver<GobblinKafkaConsumerClient.GobblinKafkaConsumerClientFactory>
kafkaConsumerClientResolver;
private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
private final Map<String, AtomicDouble> consumerMetricsGauges = new ConcurrentHashMap<>();
private final KafkaExtractorStatsTracker statsTracker;
private final KafkaProduceRateTracker produceRateTracker;
private final List<KafkaPartition> partitions;
private final long extractorStatsReportingTimeIntervalMillis;
//Mapping from Kafka Partition Id to partition index
@Getter
private final Map<Integer, Integer> partitionIdToIndexMap;
private final String recordCreationTimestampFieldName;
private final TimeUnit recordCreationTimestampUnit;
private Iterator<KafkaConsumerRecord> messageIterator = null;
private long readStartTime;
private long lastExtractorStatsReportingTime;
private Map<KafkaPartition, Long> latestOffsetMap = Maps.newHashMap();
protected MultiLongWatermark lowWatermark;
protected MultiLongWatermark highWatermark;
protected MultiLongWatermark nextWatermark;
protected Map<Integer, DecodeableKafkaRecord> perPartitionLastSuccessfulRecord;
private final AtomicBoolean shutdownRequested = new AtomicBoolean(false);
@Override
public void shutdown() {
this.scheduledExecutorService.shutdownNow();
try {
boolean shutdown = this.scheduledExecutorService.awaitTermination(5, TimeUnit.SECONDS);
if (!shutdown) {
log.error("Could not shutdown metrics collection threads in 5 seconds.");
}
} catch (InterruptedException e) {
log.error("Interrupted when attempting to shutdown metrics collection threads.");
}
this.shutdownRequested.set(true);
super.shutdown();
}
@ToString
public static class KafkaWatermark implements CheckpointableWatermark {
@Getter
KafkaPartition topicPartition;
LongWatermark _lwm;
//Average TopicPartition Produce Rate by hour-of-day and day-of-week in records/sec.
@Getter
@Setter
double[][] avgProduceRates;
//Average consume rate for the topic when backlogged.
@Getter
@Setter
double avgConsumeRate = -1.0;
@Getter
@Setter
long avgRecordSize;
@VisibleForTesting
public KafkaWatermark(KafkaPartition topicPartition, LongWatermark lwm) {
this.topicPartition = topicPartition;
_lwm = lwm;
}
@Override
public String getSource() {
return topicPartition.toString();
}
@Override
public ComparableWatermark getWatermark() {
return _lwm;
}
@Override
public short calculatePercentCompletion(Watermark lowWatermark, Watermark highWatermark) {
return 0;
}
@Override
public JsonElement toJson() {
return WatermarkSerializerHelper.convertWatermarkToJson(this);
}
@Override
public int compareTo(CheckpointableWatermark o) {
Preconditions.checkArgument(o instanceof KafkaWatermark);
KafkaWatermark ko = (KafkaWatermark) o;
Preconditions.checkArgument(topicPartition.equals(ko.topicPartition));
return _lwm.compareTo(ko._lwm);
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (!(obj instanceof KafkaWatermark)) {
return false;
}
return this.compareTo((CheckpointableWatermark) obj) == 0;
}
@Override
public int hashCode() {
final int prime = 31;
return topicPartition.hashCode() * prime + _lwm.hashCode();
}
public LongWatermark getLwm() {
return _lwm;
}
}
AtomicLong _rowCount = new AtomicLong(0);
protected final Optional<KafkaSchemaRegistry<String, S>> _schemaRegistry;
protected final GobblinKafkaConsumerClient kafkaConsumerClient;
private final List<KafkaPartition> topicPartitions; // list of topic partitions assigned to this extractor
public KafkaStreamingExtractor(WorkUnitState state) {
super(state);
this.kafkaConsumerClientResolver =
new ClassAliasResolver<>(GobblinKafkaConsumerClient.GobblinKafkaConsumerClientFactory.class);
try {
this.kafkaConsumerClient = this.closer.register(
this.kafkaConsumerClientResolver.resolveClass(state.getProp(GOBBLIN_KAFKA_CONSUMER_CLIENT_FACTORY_CLASS,
DEFAULT_GOBBLIN_KAFKA_CONSUMER_CLIENT_FACTORY_CLASS))
.newInstance()
.create(ConfigUtils.propertiesToConfig(state.getProperties())));
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
throw new RuntimeException(e);
}
this._schemaRegistry = state.contains(KafkaSchemaRegistry.KAFKA_SCHEMA_REGISTRY_CLASS) ? Optional.of(
KafkaSchemaRegistry.<String, S>get(state.getProperties())) : Optional.<KafkaSchemaRegistry<String, S>>absent();
this.topicPartitions = getTopicPartitionsFromWorkUnit(state);
this.kafkaConsumerClient.assignAndSeek(topicPartitions, getTopicPartitionWatermarks(this.topicPartitions));
this.messageIterator = this.kafkaConsumerClient.consume();
this.partitions = KafkaUtils.getPartitions(state);
this.partitionIdToIndexMap = Maps.newHashMapWithExpectedSize(this.partitions.size());
try {
this.latestOffsetMap = this.kafkaConsumerClient.getLatestOffsets(this.partitions);
} catch (KafkaOffsetRetrievalFailureException e) {
e.printStackTrace();
}
this.statsTracker = new KafkaExtractorStatsTracker(state, partitions);
this.produceRateTracker = new KafkaProduceRateTracker(state, partitions, getWatermarkTracker(), statsTracker);
this.extractorStatsReportingTimeIntervalMillis =
state.getPropAsLong(KAFKA_EXTRACTOR_STATS_REPORTING_INTERVAL_MINUTES_KEY,
DEFAULT_KAFKA_EXTRACTOR_STATS_REPORTING_INTERVAL_MINUTES) * 60 * 1000;
resetExtractorStatsAndWatermarks(true);
//Schedule a thread for reporting Kafka consumer metrics
this.scheduledExecutorService.scheduleAtFixedRate(() -> {
Map<String, Metric> codahaleMetricMap = kafkaConsumerClient.getMetrics();
for (Map.Entry<String, Metric> metricEntry : codahaleMetricMap.entrySet()) {
if (log.isDebugEnabled()) {
log.debug("Metric name: {}, Value: {}", metricEntry.getKey(),
((Gauge<Double>) metricEntry.getValue()).getValue());
}
consumerMetricsGauges.computeIfAbsent(metricEntry.getKey(), k -> {
AtomicDouble d = new AtomicDouble();
ContextAwareGauge<Double> consumerMetricGauge =
getMetricContext().newContextAwareGauge(metricEntry.getKey(), () -> d.get());
getMetricContext().register(metricEntry.getKey(), consumerMetricGauge);
return d;
}).set(((Gauge<Double>) metricEntry.getValue()).getValue());
}
}, 0, 60, TimeUnit.SECONDS);
this.recordCreationTimestampFieldName =
this.workUnitState.getProp(KafkaSource.RECORD_CREATION_TIMESTAMP_FIELD, null);
this.recordCreationTimestampUnit = TimeUnit.valueOf(
this.workUnitState.getProp(KafkaSource.RECORD_CREATION_TIMESTAMP_UNIT, TimeUnit.MILLISECONDS.name()));
}
private Map<KafkaPartition, LongWatermark> getTopicPartitionWatermarks(List<KafkaPartition> topicPartitions) {
List<String> topicPartitionStrings =
topicPartitions.stream().map(topicPartition -> topicPartition.toString()).collect(Collectors.toList());
// read watermarks from storage
Map<String, CheckpointableWatermark> kafkaWatermarkMap =
super.getCommittedWatermarks(KafkaWatermark.class, topicPartitionStrings);
Map<KafkaPartition, LongWatermark> longWatermarkMap = new HashMap<>();
for (KafkaPartition topicPartition : topicPartitions) {
String topicPartitionString = topicPartition.toString();
if (kafkaWatermarkMap.containsKey(topicPartitionString)) {
LongWatermark longWatermark = ((KafkaWatermark) kafkaWatermarkMap.get(topicPartitionString)).getLwm();
longWatermarkMap.put(topicPartition, longWatermark);
} else {
longWatermarkMap.put(topicPartition, new LongWatermark(0L));
}
}
return longWatermarkMap;
}
private List<KafkaPartition> getTopicPartitionsFromWorkUnit(WorkUnitState state) {
// what topic partitions are we responsible for?
List<KafkaPartition> topicPartitions = new ArrayList<>();
WorkUnit workUnit = state.getWorkunit();
String topicNameProp = KafkaSource.TOPIC_NAME;
int numOfPartitions =
workUnit.contains(NUM_PARTITIONS_ASSIGNED) ? Integer.parseInt(workUnit.getProp(NUM_PARTITIONS_ASSIGNED)) : 0;
for (int i = 0; i < numOfPartitions; ++i) {
if (workUnit.getProp(topicNameProp, null) == null) {
log.warn("There's no topic.name property being set in workunt which could be an illegal state");
break;
}
String topicName = workUnit.getProp(topicNameProp);
String partitionIdProp = KafkaSource.PARTITION_ID + "." + i;
int partitionId = workUnit.getPropAsInt(partitionIdProp);
KafkaPartition topicPartition = new KafkaPartition.Builder().withTopicName(topicName).withId(partitionId).build();
topicPartitions.add(topicPartition);
}
return topicPartitions;
}
/**
* Get the schema (metadata) of the extracted data records.
*
* @return the schema of Kafka topic being extracted
*/
@Override
public S getSchema() {
try {
Schema schema = (Schema) this._schemaRegistry.get().getLatestSchemaByTopic(this.topicPartitions.get(0).getTopicName());
return (S) schema;
} catch (SchemaRegistryException e) {
e.printStackTrace();
}
return null;
}
@Override
public List<Tag<?>> generateTags(State state) {
List<Tag<?>> tags = super.generateTags(state);
String clusterIdentifier = ClustersNames.getInstance().getClusterName();
tags.add(new Tag<>("clusterIdentifier", clusterIdentifier));
return tags;
}
/**
* Return the next record. Return null if we're shutdown.
*/
@SuppressWarnings("unchecked")
@Override
public RecordEnvelope<DecodeableKafkaRecord> readRecordEnvelopeImpl() throws IOException {
if (this.shutdownRequested.get()) {
return null;
}
this.readStartTime = System.nanoTime();
long fetchStartTime = System.nanoTime();
try {
while (this.messageIterator == null || !this.messageIterator.hasNext()) {
Long currentTime = System.currentTimeMillis();
//it's time to flush, so break the while loop and directly return null
if ((currentTime - timeOfLastFlush) > this.flushIntervalMillis) {
return new FlushRecordEnvelope();
}
try {
fetchStartTime = System.nanoTime();
this.messageIterator = this.kafkaConsumerClient.consume();
} catch (Exception e) {
log.error("Failed to consume from Kafka", e);
}
}
DecodeableKafkaRecord kafkaConsumerRecord = (DecodeableKafkaRecord) this.messageIterator.next();
int partitionIndex = this.partitionIdToIndexMap.get(kafkaConsumerRecord.getPartition());
this.statsTracker.onFetchNextMessageBuffer(partitionIndex, fetchStartTime);
// track time for converting KafkaConsumerRecord to a RecordEnvelope
long decodeStartTime = System.nanoTime();
KafkaPartition topicPartition =
new KafkaPartition.Builder().withTopicName(kafkaConsumerRecord.getTopic()).withId(kafkaConsumerRecord.getPartition()).build();
RecordEnvelope<DecodeableKafkaRecord> recordEnvelope = new RecordEnvelope(kafkaConsumerRecord,
new KafkaWatermark(topicPartition, new LongWatermark(kafkaConsumerRecord.getOffset())));
recordEnvelope.setRecordMetadata("topicPartition", topicPartition);
recordEnvelope.setRecordMetadata(DATASET_KEY, topicPartition.getTopicName());
recordEnvelope.setRecordMetadata(DATASET_PARTITION_KEY, "" + topicPartition.getId());
this.statsTracker.onDecodeableRecord(partitionIndex, readStartTime, decodeStartTime,
kafkaConsumerRecord.getValueSizeInBytes(),
kafkaConsumerRecord.isTimestampLogAppend() ? kafkaConsumerRecord.getTimestamp() : 0L,
(this.recordCreationTimestampFieldName != null) ? kafkaConsumerRecord.getRecordCreationTimestamp(
this.recordCreationTimestampFieldName, this.recordCreationTimestampUnit) : 0L);
this.perPartitionLastSuccessfulRecord.put(partitionIndex, kafkaConsumerRecord);
this.nextWatermark.set(partitionIndex, kafkaConsumerRecord.getNextOffset());
return recordEnvelope;
} catch (Throwable t) {
this.statsTracker.onUndecodeableRecord(0);
if (shouldLogError()) {
log.error("Error when decoding a Kafka consumer record");
}
throw new IOException("Error in extraction", t);
}
}
private boolean shouldLogError() {
return this.statsTracker.getUndecodableMessageCount() <= MAX_LOG_DECODING_ERRORS;
}
@Override
protected void onFlushAck() throws IOException {
try {
//Refresh the latest offsets of TopicPartitions processed by the KafkaExtractor.
this.latestOffsetMap = this.kafkaConsumerClient.getLatestOffsets(this.partitions);
} catch (KafkaOffsetRetrievalFailureException e) {
log.error("Unable to retrieve latest offsets due to {}", e);
}
long currentTime = System.currentTimeMillis();
//Update the watermarks to include the current topic partition produce rates
this.produceRateTracker.writeProduceRateToKafkaWatermarks(this.latestOffsetMap, getLastCommittedWatermarks(),
this.highWatermark, currentTime);
// Assemble additional tags to be part of GTE, for now only Partition-ProduceRate.
Map<KafkaPartition, Map<String, String>> additionalTags = getAdditionalTagsHelper();
//Commit offsets to the watermark storage.
super.onFlushAck();
//Emit GobblinTrackingEvent with current extractor stats and reset them before the next epoch starts.
if (this.isInstrumentationEnabled()) {
if (currentTime - this.lastExtractorStatsReportingTime > this.extractorStatsReportingTimeIntervalMillis) {
for (int partitionIndex = 0; partitionIndex < this.partitions.size(); partitionIndex++) {
this.statsTracker.updateStatisticsForCurrentPartition(partitionIndex, readStartTime,
getLastSuccessfulRecordHeaderTimestamp(partitionIndex));
}
Map<KafkaPartition, Map<String, String>> tagsForPartitions =
this.statsTracker.generateTagsForPartitions(lowWatermark, highWatermark, nextWatermark, additionalTags);
this.statsTracker.emitTrackingEvents(getMetricContext(), tagsForPartitions);
this.resetExtractorStatsAndWatermarks(false);
this.lastExtractorStatsReportingTime = currentTime;
}
}
}
@Override
public CommitStep initCommitStep(String commitStepAlias, boolean isPrecommit) throws IOException {
try {
log.info("Instantiating {}", commitStepAlias);
return (CommitStep) GobblinConstructorUtils.invokeLongestConstructor(
new ClassAliasResolver(CommitStep.class).resolveClass(commitStepAlias), config, statsTracker);
} catch (ReflectiveOperationException e) {
throw new IOException(e);
}
}
/**
* A helper function to transform a Map<KafkaPartition, Double> to Map<KafkaPartition, Map<String, String>>.
* If hard to read: Using Collectors.toMap method to construct inline-initialized Map.
*/
Map<KafkaPartition, Map<String, String>> getAdditionalTagsHelper() {
return produceRateTracker.getPartitionsToProdRate()
.entrySet()
.stream()
.collect(Collectors.toMap(Map.Entry::getKey,
value -> Stream.of(new AbstractMap.SimpleEntry<>(KAFKA_PARTITION_PRODUCE_RATE_KEY, value.toString()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))));
}
@VisibleForTesting
public void resetExtractorStatsAndWatermarks(boolean isInit) {
if (isInit) {
//Initialize nextwatermark, highwatermark and lowwatermarks for Extractor stats reporting.
this.perPartitionLastSuccessfulRecord = Maps.newHashMapWithExpectedSize(this.partitions.size());
this.lastExtractorStatsReportingTime = System.currentTimeMillis();
this.lowWatermark =
new MultiLongWatermark(this.partitions.stream().map(partition -> 0L).collect(Collectors.toList()));
this.highWatermark =
new MultiLongWatermark(this.partitions.stream().map(partition -> 0L).collect(Collectors.toList()));
}
this.workUnitState.removeProp(KafkaSource.PREVIOUS_START_FETCH_EPOCH_TIME);
this.workUnitState.removeProp(KafkaSource.PREVIOUS_STOP_FETCH_EPOCH_TIME);
this.workUnitState.removeProp(KafkaSource.PREVIOUS_LOW_WATERMARK);
this.workUnitState.removeProp(KafkaSource.PREVIOUS_HIGH_WATERMARK);
this.workUnitState.removeProp(KafkaSource.PREVIOUS_LATEST_OFFSET);
int partitionIndex = 0;
for (KafkaPartition partition : partitions) {
if (isInit) {
this.partitionIdToIndexMap.put(partition.getId(), partitionIndex);
}
this.workUnitState.setProp(KafkaUtils.getPartitionPropName(KafkaSource.PREVIOUS_HIGH_WATERMARK, partitionIndex),
this.highWatermark.get(partitionIndex));
this.workUnitState.setProp(KafkaUtils.getPartitionPropName(KafkaSource.PREVIOUS_LOW_WATERMARK, partitionIndex),
this.lowWatermark.get(partitionIndex));
this.workUnitState.setProp(
KafkaUtils.getPartitionPropName(KafkaSource.PREVIOUS_START_FETCH_EPOCH_TIME, partitionIndex),
this.statsTracker.getStatsMap().get(partitions.get(partitionIndex)).getStartFetchEpochTime());
this.workUnitState.setProp(
KafkaUtils.getPartitionPropName(KafkaSource.PREVIOUS_STOP_FETCH_EPOCH_TIME, partitionIndex),
this.statsTracker.getStatsMap().get(partitions.get(partitionIndex)).getStopFetchEpochTime());
this.workUnitState.setProp(KafkaUtils.getPartitionPropName(KafkaSource.PREVIOUS_LATEST_OFFSET, partitionIndex),
this.highWatermark.get(partitionIndex));
KafkaWatermark kafkaWatermark = (KafkaWatermark) this.lastCommittedWatermarks.get(partition.toString());
long lowWatermarkValue = 0L;
if (kafkaWatermark != null) {
lowWatermarkValue = kafkaWatermark.getLwm().getValue() + 1;
}
this.lowWatermark.set(partitionIndex, lowWatermarkValue);
if (latestOffsetMap.containsKey(partition)) {
this.highWatermark.set(partitionIndex, latestOffsetMap.get(partition));
}
partitionIndex++;
}
this.nextWatermark = new MultiLongWatermark(this.lowWatermark);
// Add error partition count and error message count to workUnitState
this.workUnitState.setProp(ConfigurationKeys.ERROR_PARTITION_COUNT, this.statsTracker.getErrorPartitionCount());
this.workUnitState.setProp(ConfigurationKeys.ERROR_MESSAGE_UNDECODABLE_COUNT,
this.statsTracker.getUndecodableMessageCount());
this.workUnitState.setActualHighWatermark(this.nextWatermark);
//Reset stats tracker
this.statsTracker.reset();
}
protected long getLastSuccessfulRecordHeaderTimestamp(int partitionId) {
return 0;
}
/**
* Call back that asks the extractor to remove work from its plate
* @param workUnitState
*/
public boolean onWorkUnitRemove(WorkUnitState workUnitState) {
// TODO: check if these topic partitions actually were part of the assignment
// add to queue of flush control messages
// set up ack on them
return false;
}
public boolean onWorkUnitAdd(WorkUnitState workUnitState) {
List<KafkaPartition> newTopicPartitions = getTopicPartitionsFromWorkUnit(workUnitState);
// get watermarks for these topic partitions
Map<KafkaPartition, LongWatermark> topicWatermarksMap = getTopicPartitionWatermarks(newTopicPartitions);
this.topicPartitions.addAll(newTopicPartitions);
this.kafkaConsumerClient.assignAndSeek(topicPartitions, topicWatermarksMap);
return true;
}
@Override
public long getExpectedRecordCount() {
return _rowCount.get();
}
@Override
public void close() throws IOException {
this.closer.close();
}
@Deprecated
@Override
public long getHighWatermark() {
return 0;
}
@Override
public String toString() {
return topicPartitions.toString();
}
}
|
jdeolive/jeo
|
carto/src/main/java/org/jeo/carto/Prop.java
|
<reponame>jdeolive/jeo
package org.jeo.carto;
import org.jeo.filter.Expression;
import org.jeo.filter.Mixed;
public class Prop {
String key;
Expression value;
public Prop(String key) {
this.key = key;
}
public String getKey() {
return key;
}
public Expression getValue() {
return value;
}
public void setValue(Expression expr) {
if (value != null) {
if (value instanceof Mixed) {
value = ((Mixed) value).append(expr);
}
else {
value = new Mixed(value, expr);
}
}
else {
value = expr;
}
}
}
|
ebukaprof/UniMobile
|
app/src/main/java/com/uniport/www/uniportmobile/CodeOfConduct.java
|
<filename>app/src/main/java/com/uniport/www/uniportmobile/CodeOfConduct.java
package com.uniport.www.uniportmobile;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.ListView;
import GneralCustomAdapter.AllCustomListAdapter;
/**
* Created by INNOVATIONIST-PC on 3/16/2015.
*/
public class CodeOfConduct extends ActionBarActivity {
ListView viewContentConduct;
String [] stringConduct = {"Academic Staff", "Non Academic Staff","Student"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.code_of_conduct);
AllCustomListAdapter listAdapterConduct = new AllCustomListAdapter(CodeOfConduct.this,stringConduct);
viewContentConduct = (ListView) findViewById(R.id.listViewCode);
viewContentConduct.setAdapter(listAdapterConduct);
}
}
|
cdibbs/neoman-engine
|
lib/user-messager.js
|
<gh_stars>1-10
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
var UserMessager_1;
import { inject, injectable } from 'inversify';
import { LEVELS } from './i';
import TYPES from './di/types';
let UserMessager = UserMessager_1 = class UserMessager {
constructor(__mf, mfDict = null, usei18n = false) {
this.__mf = __mf;
this.mfDict = mfDict;
this.usei18n = usei18n;
this.console = console;
}
info(message, indent) {
this.write(message, indent, LEVELS.Info);
return this;
}
debug(message, indent) {
this.write(message, indent, LEVELS.Debug);
return this;
}
warn(message, indent) {
this.write(message, indent, LEVELS.Warn);
return this;
}
error(message, indent) {
this.write(message, indent, LEVELS.Error);
return this;
}
mf(message, mfDict) {
let newDict = {};
Object.assign(newDict, this.mfDict || {}, mfDict);
return this.__mf(message, newDict);
}
write(message, indent = 0, level = LEVELS.Debug) {
let space = " ".repeat(indent);
let msg = `${space}${message}`;
if (this.usei18n) {
msg = this.__mf(msg, this.mfDict);
}
switch (level) {
case LEVELS.Debug:
this.console.log(msg);
break;
case LEVELS.Info:
this.console.log(msg);
break;
case LEVELS.Warn:
this.console.warn(msg);
break;
case LEVELS.Error:
this.console.error(msg);
break;
default:
throw new Error(this.__mf('Write not implemented for level {level}.', { level: level }));
}
return this;
}
/**
* Enable i18n + MessageFormat dictionary for subsequent method calls.
* Example: this.msg.i18n(myKeyVals).debug("a {key} message")
* @param mfDict Dictionary to use for i18n
*/
i18n(mfDict) {
let newDict = {};
Object.assign(newDict, this.mfDict || {}, mfDict);
let um = new UserMessager_1(this.__mf, newDict, true);
um.console = this.console;
return um;
}
};
UserMessager = UserMessager_1 = __decorate([
injectable(),
__param(0, inject(TYPES.i18n)),
__metadata("design:paramtypes", [Function, Object, Boolean])
], UserMessager);
export { UserMessager };
//# sourceMappingURL=user-messager.js.map
|
uk-gov-mirror/ONSdigital.eq-survey-runner
|
app/data_model/app_models.py
|
from datetime import datetime
from dateutil.tz import tzutc
from marshmallow import Schema, fields, post_load, pre_dump
class QuestionnaireState:
def __init__(self, user_id, state_data, version):
self.user_id = user_id
self.state_data = state_data
self.version = version
self.created_at = datetime.now(tz=tzutc())
self.updated_at = datetime.now(tz=tzutc())
class EQSession:
def __init__(self, eq_session_id, user_id, session_data=None, expires_at=None):
self.eq_session_id = eq_session_id
self.user_id = user_id
self.session_data = session_data
self.created_at = datetime.now(tz=tzutc())
self.updated_at = datetime.now(tz=tzutc())
self.expires_at = expires_at
# Needed only when data is read from Postgres.
# The Timestamp() class already handles this when reading from Dynamo.
# Can be removed once only Dynamo is used.
if expires_at:
self.expires_at = expires_at.replace(tzinfo=tzutc())
class UsedJtiClaim:
def __init__(self, jti_claim, used_at, expires):
self.jti_claim = jti_claim
self.used_at = used_at
self.expires = expires
class SubmittedResponse:
def __init__(self, tx_id, data, valid_until):
self.tx_id = tx_id
self.data = data
self.valid_until = valid_until
# pylint: disable=no-self-use
class Timestamp(fields.Field):
def _serialize(self, value, attr, obj):
if value:
# Timezone aware datetime to timestamp
return int(value.replace(tzinfo=tzutc()).strftime('%s'))
def _deserialize(self, value, attr, data):
if value:
# Timestamp to timezone aware datetime
return datetime.utcfromtimestamp(value).replace(tzinfo=tzutc())
class DateTimeSchemaMixin:
created_at = fields.DateTime()
updated_at = fields.DateTime()
@pre_dump
def set_date(self, data):
data.updated_at = datetime.now(tz=tzutc())
return data
class QuestionnaireStateSchema(Schema, DateTimeSchemaMixin):
user_id = fields.Str()
state_data = fields.Str()
version = fields.Integer()
@post_load
def make_model(self, data):
created_at = data.pop('created_at', None)
updated_at = data.pop('updated_at', None)
model = QuestionnaireState(**data)
model.created_at = created_at
model.updated_at = updated_at
return model
class EQSessionSchema(Schema, DateTimeSchemaMixin):
eq_session_id = fields.Str()
user_id = fields.Str()
session_data = fields.Str()
expires_at = Timestamp(allow_none=True) # To cater in flight data (Should never actually be None)
@post_load
def make_model(self, data):
created_at = data.pop('created_at', None)
updated_at = data.pop('updated_at', None)
model = EQSession(**data)
model.created_at = created_at
model.updated_at = updated_at
return model
class UsedJtiClaimSchema(Schema):
jti_claim = fields.Str()
used_at = fields.DateTime()
expires = Timestamp()
@post_load
def make_model(self, data):
return UsedJtiClaim(**data)
class SubmittedResponseSchema(Schema):
tx_id = fields.Str()
data = fields.Str()
valid_until = Timestamp()
@post_load
def make_model(self, data):
return SubmittedResponse(**data)
|
gadzhimari/dialog-web-components
|
src/components/SidebarRecentItem/utils/decorators.js
|
<filename>src/components/SidebarRecentItem/utils/decorators.js
/*
* Copyright 2018 dialog LLC <<EMAIL>>
* @flow
*/
import {
code,
bold,
italic,
strike,
emoji,
namedEmoji
} from '@dlghq/markdown/src/decorators';
const decorators = [
code,
bold,
italic,
strike,
emoji,
namedEmoji
];
export default decorators;
|
Raznic/Bailiwick
|
src/records/validators.py
|
import re
from django.core.exceptions import ValidationError
def validate_owner_subdomain(owner: str, domain: str) -> None:
"""
Validate that an owner is equal to, or a sub-domain of, a domain.
:param owner:
:param domain:
:return:
"""
subdomain_regex = f"^([a-z0-9]+(-[a-z0-9]+)*\\.)*{domain}$"
if owner and not re.match(re.compile(subdomain_regex), str(owner)):
raise ValidationError({
"owner": "Owner must either be the current domain or a sub-domain."
})
|
BranchMetrics/branch_io_cli
|
lib/branch_io_cli/configuration/env_options.rb
|
module BranchIOCLI
module Configuration
class EnvOptions
def self.available_options
[
Option.new(
name: :completion_script,
description: "Get the path to the completion script for this shell",
default_value: false,
aliases: "-c"
),
Option.new(
name: :shell,
env_name: "SHELL",
description: "Specify shell for completion script",
type: String,
example: "zsh",
aliases: "-s"
),
Option.new(
name: :verbose,
description: "Generate verbose output",
default_value: false,
aliases: "-V"
)
]
end
end
end
end
|
gamladz/gamladz.github.io
|
node_modules/material-icons-svg/components/round/ArtTrack.js
|
<gh_stars>0
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const ReactComponent = props => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 24 24", width: "1em", height: "1em" }, props),
react_1.default.createElement("path", { d: "M21 13h-6c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1zm0-6h-6c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1zm-6 10h6c.55 0 1-.45 1-1s-.45-1-1-1h-6c-.55 0-1 .45-1 1s.45 1 1 1zm-3-8v6c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2zm-2.1 5.2l-1.26-1.68a.508.508 0 0 0-.8-.01L6.5 14.26l-.85-1.03a.5.5 0 0 0-.78.01l-.74.95a.5.5 0 0 0 .39.81H9.5a.5.5 0 0 0 .4-.8z" })));
exports.default = ReactComponent;
|
FreGalle/vitess
|
go/vt/sqlparser/sql.go
|
// Code generated by goyacc -o sql.go sql.y. DO NOT EDIT.
//line sql.y:18
package sqlparser
import __yyfmt__ "fmt"
//line sql.y:18
func setParseTree(yylex interface{}, stmt Statement) {
yylex.(*Tokenizer).ParseTree = stmt
}
func setAllowComments(yylex interface{}, allow bool) {
yylex.(*Tokenizer).AllowComments = allow
}
func setDDL(yylex interface{}, node Statement) {
yylex.(*Tokenizer).partialDDL = node
}
func incNesting(yylex interface{}) bool {
yylex.(*Tokenizer).nesting++
if yylex.(*Tokenizer).nesting == 200 {
return true
}
return false
}
func decNesting(yylex interface{}) {
yylex.(*Tokenizer).nesting--
}
// skipToEnd forces the lexer to end prematurely. Not all SQL statements
// are supported by the Parser, thus calling skipToEnd will make the lexer
// return EOF early.
func skipToEnd(yylex interface{}) {
yylex.(*Tokenizer).SkipToEnd = true
}
//line sql.y:53
type yySymType struct {
yys int
empty struct{}
statement Statement
selStmt SelectStatement
ddl *DDL
ins *Insert
byt byte
bytes []byte
bytes2 [][]byte
str string
strs []string
selectExprs SelectExprs
selectExpr SelectExpr
columns Columns
partitions Partitions
colName *ColName
tableExprs TableExprs
tableExpr TableExpr
joinCondition JoinCondition
tableName TableName
tableNames TableNames
indexHints *IndexHints
expr Expr
exprs Exprs
boolVal BoolVal
boolean bool
literal *Literal
colTuple ColTuple
values Values
valTuple ValTuple
subquery *Subquery
derivedTable *DerivedTable
whens []*When
when *When
orderBy OrderBy
order *Order
limit *Limit
updateExprs UpdateExprs
setExprs SetExprs
updateExpr *UpdateExpr
setExpr *SetExpr
characteristic Characteristic
characteristics []Characteristic
colIdent ColIdent
tableIdent TableIdent
convertType *ConvertType
aliasedTableName *AliasedTableExpr
TableSpec *TableSpec
columnType ColumnType
colKeyOpt ColumnKeyOption
optVal Expr
LengthScaleOption LengthScaleOption
columnDefinition *ColumnDefinition
indexDefinition *IndexDefinition
indexInfo *IndexInfo
indexOption *IndexOption
indexOptions []*IndexOption
indexColumn *IndexColumn
indexColumns []*IndexColumn
constraintDefinition *ConstraintDefinition
constraintInfo ConstraintInfo
ReferenceAction ReferenceAction
partDefs []*PartitionDefinition
partDef *PartitionDefinition
partSpec *PartitionSpec
vindexParam VindexParam
vindexParams []VindexParam
showFilter *ShowFilter
optLike *OptLike
isolationLevel IsolationLevel
insertAction InsertAction
scope Scope
ignore Ignore
lock Lock
joinType JoinType
comparisonExprOperator ComparisonExprOperator
isExprOperator IsExprOperator
matchExprOption MatchExprOption
orderDirection OrderDirection
explainType ExplainType
selectInto *SelectInto
createIndex *CreateIndex
createDatabase *CreateDatabase
alterDatabase *AlterDatabase
collateAndCharset CollateAndCharset
collateAndCharsets []CollateAndCharset
createTable *CreateTable
tableAndLockTypes []*TableAndLockType
tableAndLockType *TableAndLockType
lockType LockType
}
const LEX_ERROR = 57346
const UNION = 57347
const SELECT = 57348
const STREAM = 57349
const VSTREAM = 57350
const INSERT = 57351
const UPDATE = 57352
const DELETE = 57353
const FROM = 57354
const WHERE = 57355
const GROUP = 57356
const HAVING = 57357
const ORDER = 57358
const BY = 57359
const LIMIT = 57360
const OFFSET = 57361
const FOR = 57362
const ALL = 57363
const DISTINCT = 57364
const AS = 57365
const EXISTS = 57366
const ASC = 57367
const DESC = 57368
const INTO = 57369
const DUPLICATE = 57370
const KEY = 57371
const DEFAULT = 57372
const SET = 57373
const LOCK = 57374
const UNLOCK = 57375
const KEYS = 57376
const DO = 57377
const DISTINCTROW = 57378
const PARSER = 57379
const OUTFILE = 57380
const S3 = 57381
const DATA = 57382
const LOAD = 57383
const LINES = 57384
const TERMINATED = 57385
const ESCAPED = 57386
const ENCLOSED = 57387
const DUMPFILE = 57388
const CSV = 57389
const HEADER = 57390
const MANIFEST = 57391
const OVERWRITE = 57392
const STARTING = 57393
const OPTIONALLY = 57394
const VALUES = 57395
const LAST_INSERT_ID = 57396
const NEXT = 57397
const VALUE = 57398
const SHARE = 57399
const MODE = 57400
const SQL_NO_CACHE = 57401
const SQL_CACHE = 57402
const SQL_CALC_FOUND_ROWS = 57403
const JOIN = 57404
const STRAIGHT_JOIN = 57405
const LEFT = 57406
const RIGHT = 57407
const INNER = 57408
const OUTER = 57409
const CROSS = 57410
const NATURAL = 57411
const USE = 57412
const FORCE = 57413
const ON = 57414
const USING = 57415
const INPLACE = 57416
const COPY = 57417
const ALGORITHM = 57418
const NONE = 57419
const SHARED = 57420
const EXCLUSIVE = 57421
const ID = 57422
const AT_ID = 57423
const AT_AT_ID = 57424
const HEX = 57425
const STRING = 57426
const INTEGRAL = 57427
const FLOAT = 57428
const HEXNUM = 57429
const VALUE_ARG = 57430
const LIST_ARG = 57431
const COMMENT = 57432
const COMMENT_KEYWORD = 57433
const BIT_LITERAL = 57434
const NULL = 57435
const TRUE = 57436
const FALSE = 57437
const OFF = 57438
const OR = 57439
const XOR = 57440
const AND = 57441
const NOT = 57442
const BETWEEN = 57443
const CASE = 57444
const WHEN = 57445
const THEN = 57446
const ELSE = 57447
const END = 57448
const LE = 57449
const GE = 57450
const NE = 57451
const NULL_SAFE_EQUAL = 57452
const IS = 57453
const LIKE = 57454
const REGEXP = 57455
const IN = 57456
const SHIFT_LEFT = 57457
const SHIFT_RIGHT = 57458
const DIV = 57459
const MOD = 57460
const UNARY = 57461
const COLLATE = 57462
const BINARY = 57463
const UNDERSCORE_BINARY = 57464
const UNDERSCORE_UTF8MB4 = 57465
const UNDERSCORE_UTF8 = 57466
const UNDERSCORE_LATIN1 = 57467
const INTERVAL = 57468
const JSON_EXTRACT_OP = 57469
const JSON_UNQUOTE_EXTRACT_OP = 57470
const CREATE = 57471
const ALTER = 57472
const DROP = 57473
const RENAME = 57474
const ANALYZE = 57475
const ADD = 57476
const FLUSH = 57477
const SCHEMA = 57478
const TABLE = 57479
const INDEX = 57480
const VIEW = 57481
const TO = 57482
const IGNORE = 57483
const IF = 57484
const UNIQUE = 57485
const PRIMARY = 57486
const COLUMN = 57487
const SPATIAL = 57488
const FULLTEXT = 57489
const KEY_BLOCK_SIZE = 57490
const CHECK = 57491
const INDEXES = 57492
const ACTION = 57493
const CASCADE = 57494
const CONSTRAINT = 57495
const FOREIGN = 57496
const NO = 57497
const REFERENCES = 57498
const RESTRICT = 57499
const SHOW = 57500
const DESCRIBE = 57501
const EXPLAIN = 57502
const DATE = 57503
const ESCAPE = 57504
const REPAIR = 57505
const OPTIMIZE = 57506
const TRUNCATE = 57507
const MAXVALUE = 57508
const PARTITION = 57509
const REORGANIZE = 57510
const LESS = 57511
const THAN = 57512
const PROCEDURE = 57513
const TRIGGER = 57514
const VINDEX = 57515
const VINDEXES = 57516
const DIRECTORY = 57517
const NAME = 57518
const UPGRADE = 57519
const STATUS = 57520
const VARIABLES = 57521
const WARNINGS = 57522
const CASCADED = 57523
const DEFINER = 57524
const OPTION = 57525
const SQL = 57526
const UNDEFINED = 57527
const SEQUENCE = 57528
const MERGE = 57529
const TEMPTABLE = 57530
const INVOKER = 57531
const SECURITY = 57532
const BEGIN = 57533
const START = 57534
const TRANSACTION = 57535
const COMMIT = 57536
const ROLLBACK = 57537
const SAVEPOINT = 57538
const RELEASE = 57539
const WORK = 57540
const BIT = 57541
const TINYINT = 57542
const SMALLINT = 57543
const MEDIUMINT = 57544
const INT = 57545
const INTEGER = 57546
const BIGINT = 57547
const INTNUM = 57548
const REAL = 57549
const DOUBLE = 57550
const FLOAT_TYPE = 57551
const DECIMAL = 57552
const NUMERIC = 57553
const TIME = 57554
const TIMESTAMP = 57555
const DATETIME = 57556
const YEAR = 57557
const CHAR = 57558
const VARCHAR = 57559
const BOOL = 57560
const CHARACTER = 57561
const VARBINARY = 57562
const NCHAR = 57563
const TEXT = 57564
const TINYTEXT = 57565
const MEDIUMTEXT = 57566
const LONGTEXT = 57567
const BLOB = 57568
const TINYBLOB = 57569
const MEDIUMBLOB = 57570
const LONGBLOB = 57571
const JSON = 57572
const ENUM = 57573
const GEOMETRY = 57574
const POINT = 57575
const LINESTRING = 57576
const POLYGON = 57577
const GEOMETRYCOLLECTION = 57578
const MULTIPOINT = 57579
const MULTILINESTRING = 57580
const MULTIPOLYGON = 57581
const NULLX = 57582
const AUTO_INCREMENT = 57583
const APPROXNUM = 57584
const SIGNED = 57585
const UNSIGNED = 57586
const ZEROFILL = 57587
const COLLATION = 57588
const DATABASES = 57589
const SCHEMAS = 57590
const TABLES = 57591
const VITESS_METADATA = 57592
const VSCHEMA = 57593
const FULL = 57594
const PROCESSLIST = 57595
const COLUMNS = 57596
const FIELDS = 57597
const ENGINES = 57598
const PLUGINS = 57599
const EXTENDED = 57600
const KEYSPACES = 57601
const VITESS_KEYSPACES = 57602
const VITESS_SHARDS = 57603
const VITESS_TABLETS = 57604
const NAMES = 57605
const CHARSET = 57606
const GLOBAL = 57607
const SESSION = 57608
const ISOLATION = 57609
const LEVEL = 57610
const READ = 57611
const WRITE = 57612
const ONLY = 57613
const REPEATABLE = 57614
const COMMITTED = 57615
const UNCOMMITTED = 57616
const SERIALIZABLE = 57617
const CURRENT_TIMESTAMP = 57618
const DATABASE = 57619
const CURRENT_DATE = 57620
const CURRENT_TIME = 57621
const LOCALTIME = 57622
const LOCALTIMESTAMP = 57623
const CURRENT_USER = 57624
const UTC_DATE = 57625
const UTC_TIME = 57626
const UTC_TIMESTAMP = 57627
const REPLACE = 57628
const CONVERT = 57629
const CAST = 57630
const SUBSTR = 57631
const SUBSTRING = 57632
const GROUP_CONCAT = 57633
const SEPARATOR = 57634
const TIMESTAMPADD = 57635
const TIMESTAMPDIFF = 57636
const MATCH = 57637
const AGAINST = 57638
const BOOLEAN = 57639
const LANGUAGE = 57640
const WITH = 57641
const QUERY = 57642
const EXPANSION = 57643
const UNUSED = 57644
const ARRAY = 57645
const CUME_DIST = 57646
const DESCRIPTION = 57647
const DENSE_RANK = 57648
const EMPTY = 57649
const EXCEPT = 57650
const FIRST_VALUE = 57651
const GROUPING = 57652
const GROUPS = 57653
const JSON_TABLE = 57654
const LAG = 57655
const LAST_VALUE = 57656
const LATERAL = 57657
const LEAD = 57658
const MEMBER = 57659
const NTH_VALUE = 57660
const NTILE = 57661
const OF = 57662
const OVER = 57663
const PERCENT_RANK = 57664
const RANK = 57665
const RECURSIVE = 57666
const ROW_NUMBER = 57667
const SYSTEM = 57668
const WINDOW = 57669
const ACTIVE = 57670
const ADMIN = 57671
const BUCKETS = 57672
const CLONE = 57673
const COMPONENT = 57674
const DEFINITION = 57675
const ENFORCED = 57676
const EXCLUDE = 57677
const FOLLOWING = 57678
const GEOMCOLLECTION = 57679
const GET_MASTER_PUBLIC_KEY = 57680
const HISTOGRAM = 57681
const HISTORY = 57682
const INACTIVE = 57683
const INVISIBLE = 57684
const LOCKED = 57685
const MASTER_COMPRESSION_ALGORITHMS = 57686
const MASTER_PUBLIC_KEY_PATH = 57687
const MASTER_TLS_CIPHERSUITES = 57688
const MASTER_ZSTD_COMPRESSION_LEVEL = 57689
const NESTED = 57690
const NETWORK_NAMESPACE = 57691
const NOWAIT = 57692
const NULLS = 57693
const OJ = 57694
const OLD = 57695
const OPTIONAL = 57696
const ORDINALITY = 57697
const ORGANIZATION = 57698
const OTHERS = 57699
const PATH = 57700
const PERSIST = 57701
const PERSIST_ONLY = 57702
const PRECEDING = 57703
const PRIVILEGE_CHECKS_USER = 57704
const PROCESS = 57705
const RANDOM = 57706
const REFERENCE = 57707
const REQUIRE_ROW_FORMAT = 57708
const RESOURCE = 57709
const RESPECT = 57710
const RESTART = 57711
const RETAIN = 57712
const REUSE = 57713
const ROLE = 57714
const SECONDARY = 57715
const SECONDARY_ENGINE = 57716
const SECONDARY_LOAD = 57717
const SECONDARY_UNLOAD = 57718
const SKIP = 57719
const SRID = 57720
const THREAD_PRIORITY = 57721
const TIES = 57722
const UNBOUNDED = 57723
const VCPU = 57724
const VISIBLE = 57725
const FORMAT = 57726
const TREE = 57727
const VITESS = 57728
const TRADITIONAL = 57729
const LOCAL = 57730
const LOW_PRIORITY = 57731
var yyToknames = [...]string{
"$end",
"error",
"$unk",
"LEX_ERROR",
"UNION",
"SELECT",
"STREAM",
"VSTREAM",
"INSERT",
"UPDATE",
"DELETE",
"FROM",
"WHERE",
"GROUP",
"HAVING",
"ORDER",
"BY",
"LIMIT",
"OFFSET",
"FOR",
"ALL",
"DISTINCT",
"AS",
"EXISTS",
"ASC",
"DESC",
"INTO",
"DUPLICATE",
"KEY",
"DEFAULT",
"SET",
"LOCK",
"UNLOCK",
"KEYS",
"DO",
"DISTINCTROW",
"PARSER",
"OUTFILE",
"S3",
"DATA",
"LOAD",
"LINES",
"TERMINATED",
"ESCAPED",
"ENCLOSED",
"DUMPFILE",
"CSV",
"HEADER",
"MANIFEST",
"OVERWRITE",
"STARTING",
"OPTIONALLY",
"VALUES",
"LAST_INSERT_ID",
"NEXT",
"VALUE",
"SHARE",
"MODE",
"SQL_NO_CACHE",
"SQL_CACHE",
"SQL_CALC_FOUND_ROWS",
"JOIN",
"STRAIGHT_JOIN",
"LEFT",
"RIGHT",
"INNER",
"OUTER",
"CROSS",
"NATURAL",
"USE",
"FORCE",
"ON",
"USING",
"INPLACE",
"COPY",
"ALGORITHM",
"NONE",
"SHARED",
"EXCLUSIVE",
"'('",
"','",
"')'",
"ID",
"AT_ID",
"AT_AT_ID",
"HEX",
"STRING",
"INTEGRAL",
"FLOAT",
"HEXNUM",
"VALUE_ARG",
"LIST_ARG",
"COMMENT",
"COMMENT_KEYWORD",
"BIT_LITERAL",
"NULL",
"TRUE",
"FALSE",
"OFF",
"OR",
"XOR",
"AND",
"NOT",
"'!'",
"BETWEEN",
"CASE",
"WHEN",
"THEN",
"ELSE",
"END",
"'='",
"'<'",
"'>'",
"LE",
"GE",
"NE",
"NULL_SAFE_EQUAL",
"IS",
"LIKE",
"REGEXP",
"IN",
"'|'",
"'&'",
"SHIFT_LEFT",
"SHIFT_RIGHT",
"'+'",
"'-'",
"'*'",
"'/'",
"DIV",
"'%'",
"MOD",
"'^'",
"'~'",
"UNARY",
"COLLATE",
"BINARY",
"UNDERSCORE_BINARY",
"UNDERSCORE_UTF8MB4",
"UNDERSCORE_UTF8",
"UNDERSCORE_LATIN1",
"INTERVAL",
"'.'",
"JSON_EXTRACT_OP",
"JSON_UNQUOTE_EXTRACT_OP",
"CREATE",
"ALTER",
"DROP",
"RENAME",
"ANALYZE",
"ADD",
"FLUSH",
"SCHEMA",
"TABLE",
"INDEX",
"VIEW",
"TO",
"IGNORE",
"IF",
"UNIQUE",
"PRIMARY",
"COLUMN",
"SPATIAL",
"FULLTEXT",
"KEY_BLOCK_SIZE",
"CHECK",
"INDEXES",
"ACTION",
"CASCADE",
"CONSTRAINT",
"FOREIGN",
"NO",
"REFERENCES",
"RESTRICT",
"SHOW",
"DESCRIBE",
"EXPLAIN",
"DATE",
"ESCAPE",
"REPAIR",
"OPTIMIZE",
"TRUNCATE",
"MAXVALUE",
"PARTITION",
"REORGANIZE",
"LESS",
"THAN",
"PROCEDURE",
"TRIGGER",
"VINDEX",
"VINDEXES",
"DIRECTORY",
"NAME",
"UPGRADE",
"STATUS",
"VARIABLES",
"WARNINGS",
"CASCADED",
"DEFINER",
"OPTION",
"SQL",
"UNDEFINED",
"SEQUENCE",
"MERGE",
"TEMPTABLE",
"INVOKER",
"SECURITY",
"BEGIN",
"START",
"TRANSACTION",
"COMMIT",
"ROLLBACK",
"SAVEPOINT",
"RELEASE",
"WORK",
"BIT",
"TINYINT",
"SMALLINT",
"MEDIUMINT",
"INT",
"INTEGER",
"BIGINT",
"INTNUM",
"REAL",
"DOUBLE",
"FLOAT_TYPE",
"DECIMAL",
"NUMERIC",
"TIME",
"TIMESTAMP",
"DATETIME",
"YEAR",
"CHAR",
"VARCHAR",
"BOOL",
"CHARACTER",
"VARBINARY",
"NCHAR",
"TEXT",
"TINYTEXT",
"MEDIUMTEXT",
"LONGTEXT",
"BLOB",
"TINYBLOB",
"MEDIUMBLOB",
"LONGBLOB",
"JSON",
"ENUM",
"GEOMETRY",
"POINT",
"LINESTRING",
"POLYGON",
"GEOMETRYCOLLECTION",
"MULTIPOINT",
"MULTILINESTRING",
"MULTIPOLYGON",
"NULLX",
"AUTO_INCREMENT",
"APPROXNUM",
"SIGNED",
"UNSIGNED",
"ZEROFILL",
"COLLATION",
"DATABASES",
"SCHEMAS",
"TABLES",
"VITESS_METADATA",
"VSCHEMA",
"FULL",
"PROCESSLIST",
"COLUMNS",
"FIELDS",
"ENGINES",
"PLUGINS",
"EXTENDED",
"KEYSPACES",
"VITESS_KEYSPACES",
"VITESS_SHARDS",
"VITESS_TABLETS",
"NAMES",
"CHARSET",
"GLOBAL",
"SESSION",
"ISOLATION",
"LEVEL",
"READ",
"WRITE",
"ONLY",
"REPEATABLE",
"COMMITTED",
"UNCOMMITTED",
"SERIALIZABLE",
"CURRENT_TIMESTAMP",
"DATABASE",
"CURRENT_DATE",
"CURRENT_TIME",
"LOCALTIME",
"LOCALTIMESTAMP",
"CURRENT_USER",
"UTC_DATE",
"UTC_TIME",
"UTC_TIMESTAMP",
"REPLACE",
"CONVERT",
"CAST",
"SUBSTR",
"SUBSTRING",
"GROUP_CONCAT",
"SEPARATOR",
"TIMESTAMPADD",
"TIMESTAMPDIFF",
"MATCH",
"AGAINST",
"BOOLEAN",
"LANGUAGE",
"WITH",
"QUERY",
"EXPANSION",
"UNUSED",
"ARRAY",
"CUME_DIST",
"DESCRIPTION",
"DENSE_RANK",
"EMPTY",
"EXCEPT",
"FIRST_VALUE",
"GROUPING",
"GROUPS",
"JSON_TABLE",
"LAG",
"LAST_VALUE",
"LATERAL",
"LEAD",
"MEMBER",
"NTH_VALUE",
"NTILE",
"OF",
"OVER",
"PERCENT_RANK",
"RANK",
"RECURSIVE",
"ROW_NUMBER",
"SYSTEM",
"WINDOW",
"ACTIVE",
"ADMIN",
"BUCKETS",
"CLONE",
"COMPONENT",
"DEFINITION",
"ENFORCED",
"EXCLUDE",
"FOLLOWING",
"GEOMCOLLECTION",
"GET_MASTER_PUBLIC_KEY",
"HISTOGRAM",
"HISTORY",
"INACTIVE",
"INVISIBLE",
"LOCKED",
"MASTER_COMPRESSION_ALGORITHMS",
"MASTER_PUBLIC_KEY_PATH",
"MASTER_TLS_CIPHERSUITES",
"MASTER_ZSTD_COMPRESSION_LEVEL",
"NESTED",
"NETWORK_NAMESPACE",
"NOWAIT",
"NULLS",
"OJ",
"OLD",
"OPTIONAL",
"ORDINALITY",
"ORGANIZATION",
"OTHERS",
"PATH",
"PERSIST",
"PERSIST_ONLY",
"PRECEDING",
"PRIVILEGE_CHECKS_USER",
"PROCESS",
"RANDOM",
"REFERENCE",
"REQUIRE_ROW_FORMAT",
"RESOURCE",
"RESPECT",
"RESTART",
"RETAIN",
"REUSE",
"ROLE",
"SECONDARY",
"SECONDARY_ENGINE",
"SECONDARY_LOAD",
"SECONDARY_UNLOAD",
"SKIP",
"SRID",
"THREAD_PRIORITY",
"TIES",
"UNBOUNDED",
"VCPU",
"VISIBLE",
"FORMAT",
"TREE",
"VITESS",
"TRADITIONAL",
"LOCAL",
"LOW_PRIORITY",
"';'",
}
var yyStatenames = [...]string{}
const yyEofCode = 1
const yyErrCode = 2
const yyInitialStackSize = 16
//line yacctab:1
var yyExca = [...]int{
-1, 1,
1, -1,
-2, 0,
-1, 42,
155, 800,
-2, 87,
-1, 43,
136, 110,
236, 110,
-2, 104,
-1, 50,
34, 347,
155, 347,
167, 347,
195, 361,
196, 361,
-2, 349,
-1, 55,
157, 371,
-2, 369,
-1, 79,
55, 414,
-2, 422,
-1, 103,
136, 110,
236, 110,
-2, 105,
-1, 446,
143, 810,
-2, 806,
-1, 447,
143, 811,
-2, 807,
-1, 464,
55, 415,
-2, 427,
-1, 465,
55, 416,
-2, 428,
-1, 485,
111, 1098,
-2, 80,
-1, 486,
111, 998,
-2, 81,
-1, 491,
111, 956,
-2, 771,
-1, 493,
111, 1039,
-2, 773,
-1, 648,
136, 110,
236, 110,
-2, 273,
-1, 1035,
143, 813,
-2, 809,
-1, 1127,
73, 62,
81, 62,
-2, 66,
-1, 1522,
5, 668,
18, 668,
20, 668,
32, 668,
82, 668,
-2, 453,
-1, 1732,
45, 742,
-2, 740,
}
const yyPrivate = 57344
const yyLast = 20369
var yyAct = [...]int{
446, 1826, 1815, 1732, 1570, 1779, 1708, 390, 1346, 1678,
1439, 1632, 78, 3, 1655, 1502, 419, 682, 1314, 405,
1499, 1149, 1200, 457, 1503, 1347, 1145, 1074, 662, 804,
760, 1333, 913, 923, 1415, 1179, 1158, 1148, 1414, 1194,
811, 1124, 1514, 1391, 628, 490, 113, 1487, 625, 125,
956, 359, 125, 1459, 1273, 1022, 1202, 371, 1407, 125,
1029, 680, 1163, 975, 622, 378, 848, 841, 1106, 1113,
832, 809, 76, 831, 1076, 834, 798, 814, 1055, 451,
999, 31, 1223, 392, 845, 474, 629, 371, 466, 838,
371, 125, 371, 381, 621, 1089, 847, 821, 671, 1190,
1129, 970, 74, 104, 487, 105, 1071, 1072, 985, 388,
125, 125, 73, 773, 79, 1790, 1312, 1729, 125, 8,
654, 7, 6, 125, 1555, 1680, 379, 380, 1642, 1819,
1776, 1813, 1755, 1805, 774, 1571, 75, 1775, 1754, 1476,
1600, 637, 1313, 935, 101, 109, 1203, 110, 382, 81,
82, 83, 84, 85, 86, 1528, 452, 934, 1139, 472,
476, 431, 385, 437, 438, 435, 436, 1205, 434, 433,
432, 484, 33, 1529, 1530, 67, 37, 38, 439, 440,
695, 1719, 722, 721, 731, 732, 724, 725, 726, 727,
728, 729, 730, 723, 1429, 450, 733, 96, 1428, 449,
114, 115, 116, 101, 118, 119, 120, 639, 1460, 638,
114, 115, 116, 1377, 688, 689, 1376, 1140, 1141, 1378,
849, 933, 850, 1399, 1173, 1441, 1073, 33, 34, 35,
67, 37, 38, 1635, 1032, 690, 1757, 641, 1204, 691,
688, 689, 114, 115, 116, 1180, 66, 71, 1591, 1462,
101, 93, 39, 64, 65, 694, 62, 97, 1589, 111,
98, 99, 63, 986, 987, 988, 369, 984, 373, 367,
1425, 668, 945, 670, 930, 927, 928, 1564, 926, 1213,
1211, 1214, 1215, 1811, 1565, 100, 916, 683, 684, 693,
685, 51, 649, 1442, 944, 1444, 1253, 1443, 1464, 942,
1468, 66, 1463, 1804, 1461, 667, 669, 1792, 1709, 1466,
1107, 937, 940, 1245, 1738, 1198, 678, 1803, 1465, 1198,
1535, 946, 1791, 624, 1832, 478, 1198, 1315, 1317, 653,
943, 1467, 1469, 634, 1445, 950, 1698, 640, 1167, 125,
660, 698, 1242, 666, 100, 338, 1424, 1830, 1244, 1486,
1485, 371, 1484, 635, 117, 1252, 1167, 1736, 1251, 1621,
371, 1292, 647, 932, 745, 746, 1527, 42, 44, 47,
46, 49, 1554, 61, 371, 371, 1720, 1289, 1338, 1302,
1281, 1135, 825, 1753, 758, 931, 658, 696, 704, 1206,
881, 100, 114, 115, 116, 1180, 50, 70, 69, 1146,
733, 59, 60, 48, 726, 727, 728, 729, 730, 723,
1427, 665, 733, 723, 1373, 1316, 733, 1085, 114, 115,
116, 697, 711, 712, 710, 712, 710, 672, 1758, 52,
53, 936, 54, 55, 56, 57, 644, 677, 645, 713,
713, 646, 713, 673, 674, 675, 938, 1770, 664, 679,
125, 722, 721, 731, 732, 724, 725, 726, 727, 728,
729, 730, 723, 976, 1166, 733, 802, 1699, 1697, 68,
714, 743, 1546, 971, 1243, 371, 1241, 89, 125, 686,
125, 125, 1166, 371, 103, 1828, 1711, 924, 1829, 371,
1827, 710, 801, 745, 746, 707, 869, 705, 706, 1512,
487, 652, 761, 1006, 1212, 917, 382, 713, 1274, 745,
746, 851, 708, 1056, 796, 771, 90, 1004, 1005, 1003,
1478, 830, 919, 1397, 68, 799, 721, 731, 732, 724,
725, 726, 727, 728, 729, 730, 723, 882, 1056, 733,
1299, 1266, 1267, 1268, 807, 810, 776, 778, 780, 782,
784, 786, 787, 1833, 663, 815, 747, 748, 749, 750,
751, 752, 753, 754, 755, 756, 1741, 777, 779, 803,
783, 785, 977, 788, 818, 895, 898, 899, 900, 901,
902, 903, 972, 904, 905, 906, 907, 908, 883, 884,
885, 886, 867, 868, 896, 633, 870, 648, 871, 872,
873, 874, 875, 876, 877, 878, 879, 880, 887, 888,
889, 890, 891, 892, 893, 894, 1641, 1640, 1287, 1834,
1809, 125, 655, 656, 1288, 909, 1286, 1233, 994, 996,
997, 711, 712, 710, 125, 995, 920, 921, 66, 1480,
1560, 1489, 1411, 939, 371, 711, 712, 710, 125, 713,
1002, 1410, 1806, 125, 1209, 1170, 125, 955, 1412, 125,
1797, 371, 1171, 713, 1808, 1603, 371, 371, 371, 125,
371, 371, 1799, 897, 1787, 1567, 711, 712, 710, 1807,
1768, 1229, 1230, 1231, 371, 371, 1668, 1798, 1511, 1490,
960, 636, 1638, 1609, 713, 1561, 1090, 1091, 813, 1491,
1421, 711, 712, 710, 958, 941, 722, 721, 731, 732,
724, 725, 726, 727, 728, 729, 730, 723, 1408, 713,
733, 969, 959, 961, 461, 1087, 1060, 963, 964, 965,
1704, 967, 968, 1000, 1023, 114, 115, 116, 1703, 1024,
1652, 846, 951, 1025, 1423, 973, 974, 114, 115, 116,
962, 979, 639, 1232, 638, 477, 75, 371, 1237, 1234,
1225, 1235, 1228, 1168, 1224, 1695, 1810, 1099, 1226, 1227,
1500, 711, 712, 710, 1044, 1047, 1033, 77, 980, 1511,
1057, 1616, 1236, 1695, 1751, 1747, 461, 1086, 978, 713,
371, 371, 981, 1695, 1745, 989, 990, 991, 992, 709,
1001, 125, 1039, 1710, 1035, 460, 711, 712, 710, 1034,
114, 115, 116, 371, 1433, 114, 115, 116, 1550, 1380,
125, 1695, 1737, 371, 713, 1080, 761, 125, 482, 125,
114, 115, 116, 461, 1221, 1092, 1098, 125, 125, 1110,
479, 480, 1098, 1033, 371, 1695, 461, 371, 1381, 1125,
1042, 1043, 1367, 1065, 1066, 1026, 1027, 1138, 371, 371,
1130, 487, 1036, 1305, 487, 1695, 1694, 912, 1631, 1608,
461, 1035, 1619, 461, 1334, 1150, 1104, 447, 998, 1552,
1551, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015,
1016, 1017, 1018, 1019, 1020, 1021, 1548, 1549, 1174, 1109,
1175, 1176, 1177, 1178, 1100, 1548, 1547, 1165, 1181, 1182,
1183, 1098, 461, 371, 1110, 461, 1186, 1187, 1188, 1189,
1102, 1131, 709, 461, 1220, 1643, 126, 1128, 1136, 126,
912, 911, 858, 857, 372, 1304, 126, 1144, 1061, 1334,
1133, 1137, 1110, 125, 125, 125, 125, 125, 1196, 1110,
125, 125, 1131, 1153, 125, 371, 1219, 1098, 1197, 1130,
1088, 1069, 949, 843, 372, 66, 1788, 372, 126, 372,
1657, 125, 1644, 1645, 1646, 1417, 1651, 125, 125, 125,
1627, 33, 1132, 125, 371, 914, 1597, 126, 126, 1440,
1134, 1222, 1195, 1566, 33, 126, 1199, 1040, 1041, 1207,
126, 1046, 1049, 1050, 1259, 1192, 1193, 1511, 1263, 1208,
1238, 454, 1539, 1132, 910, 1385, 1257, 1191, 1185, 1184,
1000, 1130, 91, 717, 632, 720, 1064, 1647, 1685, 1067,
1068, 734, 735, 736, 737, 738, 739, 740, 1416, 718,
719, 716, 722, 721, 731, 732, 724, 725, 726, 727,
728, 729, 730, 723, 33, 66, 733, 408, 407, 410,
411, 412, 413, 1283, 1515, 1516, 409, 414, 66, 1658,
125, 1648, 1649, 1218, 1821, 1816, 1541, 1521, 125, 1341,
1518, 1500, 1417, 1430, 1269, 66, 982, 1001, 722, 721,
731, 732, 724, 725, 726, 727, 728, 729, 730, 723,
125, 1342, 733, 953, 1358, 1360, 1520, 1119, 1120, 1359,
1320, 125, 125, 125, 125, 125, 1282, 1348, 452, 1343,
1356, 1355, 1327, 125, 1354, 1357, 1794, 125, 66, 1774,
125, 125, 1492, 1298, 125, 125, 125, 1339, 1323, 1365,
812, 1336, 1300, 1772, 1620, 799, 1311, 1379, 1332, 371,
1331, 1763, 1319, 1760, 1796, 1778, 1780, 1321, 1386, 1786,
1326, 1785, 1731, 1392, 1392, 1322, 1150, 1270, 1271, 1272,
1382, 1368, 1324, 1325, 810, 1370, 1335, 1733, 948, 448,
1422, 958, 1350, 1351, 1349, 1353, 1052, 1352, 1416, 1337,
1403, 1361, 922, 856, 661, 1396, 1366, 95, 107, 1743,
1053, 805, 1371, 1742, 1419, 1374, 1402, 1393, 1404, 1405,
1406, 1400, 1401, 806, 1683, 1394, 126, 1387, 1384, 371,
1432, 1614, 1569, 1388, 1389, 1390, 1083, 461, 372, 724,
725, 726, 727, 728, 729, 730, 723, 372, 1420, 733,
125, 1216, 108, 952, 1409, 121, 371, 1090, 1091, 1705,
1123, 372, 372, 455, 456, 1330, 458, 371, 1418, 1801,
1293, 1800, 1783, 1329, 1764, 1278, 1279, 722, 721, 731,
732, 724, 725, 726, 727, 728, 729, 730, 723, 1613,
459, 733, 371, 77, 1612, 1495, 1296, 1334, 1023, 1434,
1115, 1118, 1119, 1120, 1116, 692, 1117, 1121, 1290, 1456,
1515, 1516, 1823, 1822, 1435, 826, 1437, 819, 1115, 1118,
1119, 1120, 1116, 1458, 1117, 1121, 1823, 1734, 1446, 371,
1481, 454, 1447, 1457, 1636, 1449, 1448, 126, 1084, 125,
75, 80, 72, 467, 1, 1070, 797, 1477, 358, 371,
1814, 1455, 1471, 1470, 112, 371, 371, 468, 1035, 1348,
1501, 1572, 372, 1034, 1654, 126, 1456, 126, 126, 1504,
372, 929, 1707, 1498, 1413, 1201, 372, 1156, 125, 467,
816, 817, 470, 1147, 469, 88, 619, 87, 1510, 676,
1155, 1154, 371, 468, 371, 1479, 371, 1696, 1398, 1392,
1392, 1392, 1172, 1509, 1634, 1519, 1540, 1395, 1523, 1150,
1525, 1150, 1526, 1740, 1545, 1532, 464, 465, 470, 1524,
469, 864, 862, 863, 861, 866, 865, 860, 351, 1531,
1496, 983, 368, 1534, 1122, 125, 852, 1543, 1544, 820,
1533, 125, 1536, 1537, 1538, 1165, 1240, 1451, 1452, 1239,
925, 1573, 371, 371, 371, 1553, 125, 1169, 348, 1556,
1558, 1559, 1472, 1473, 1557, 1474, 1475, 731, 732, 724,
725, 726, 727, 728, 729, 730, 723, 1482, 1483, 733,
687, 353, 741, 1328, 1375, 488, 1578, 1579, 481, 1650,
1506, 1582, 1217, 94, 1784, 1761, 1037, 1038, 1759, 1730,
1679, 1762, 1728, 1584, 1585, 1795, 1586, 1777, 126, 1588,
1082, 1590, 808, 1611, 1587, 1494, 1297, 770, 1054, 835,
391, 126, 993, 406, 403, 404, 1093, 1340, 715, 1348,
389, 372, 1615, 383, 827, 126, 1610, 1114, 1112, 1081,
126, 1111, 371, 126, 839, 1517, 126, 1624, 372, 1513,
371, 833, 1097, 372, 372, 372, 126, 372, 372, 1150,
1426, 1623, 915, 1382, 1210, 1563, 1630, 631, 463, 1542,
92, 372, 372, 1051, 1629, 1718, 1601, 1599, 462, 58,
36, 375, 371, 1789, 1769, 700, 471, 30, 29, 28,
23, 22, 21, 1637, 20, 1639, 1661, 19, 25, 1656,
18, 382, 17, 16, 106, 102, 45, 43, 1625, 41,
40, 1626, 650, 27, 1628, 371, 371, 371, 125, 371,
420, 32, 1659, 1580, 26, 15, 1671, 1673, 1674, 14,
371, 1660, 371, 1667, 13, 12, 11, 10, 371, 9,
5, 1686, 4, 1504, 372, 1675, 1688, 1504, 703, 1691,
24, 1684, 759, 32, 1682, 1677, 2, 1690, 0, 0,
0, 0, 371, 1692, 1693, 0, 1700, 0, 371, 125,
0, 0, 0, 1706, 1701, 0, 1702, 372, 372, 1712,
0, 0, 0, 0, 0, 0, 0, 0, 126, 0,
0, 0, 0, 0, 0, 453, 0, 0, 0, 0,
372, 0, 0, 0, 1727, 0, 371, 126, 1681, 382,
372, 1735, 1504, 0, 126, 0, 126, 0, 0, 0,
371, 371, 371, 0, 126, 126, 0, 0, 1744, 0,
0, 372, 0, 0, 372, 1749, 0, 0, 1656, 1150,
0, 1596, 0, 1750, 0, 372, 372, 371, 1756, 125,
0, 0, 1348, 1765, 114, 115, 116, 0, 0, 0,
0, 0, 1276, 0, 1771, 0, 1277, 1662, 1663, 1664,
1665, 1666, 1773, 1782, 1781, 1669, 1670, 1284, 1285, 0,
0, 0, 0, 1291, 0, 0, 1294, 1295, 1793, 0,
1595, 0, 0, 0, 1301, 0, 0, 0, 1303, 371,
372, 1306, 1307, 1308, 1309, 1310, 1594, 0, 339, 0,
1802, 0, 0, 0, 0, 0, 0, 342, 0, 0,
0, 0, 0, 0, 0, 352, 0, 1820, 0, 0,
126, 126, 126, 126, 126, 1831, 1602, 126, 126, 0,
0, 126, 372, 722, 721, 731, 732, 724, 725, 726,
727, 728, 729, 730, 723, 0, 0, 733, 126, 350,
0, 1363, 1364, 0, 126, 126, 126, 0, 357, 0,
126, 372, 0, 0, 0, 0, 0, 722, 721, 731,
732, 724, 725, 726, 727, 728, 729, 730, 723, 0,
0, 733, 722, 721, 731, 732, 724, 725, 726, 727,
728, 729, 730, 723, 0, 0, 733, 340, 722, 721,
731, 732, 724, 725, 726, 727, 728, 729, 730, 723,
0, 0, 733, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 354, 343, 344, 0, 355, 356,
363, 0, 0, 0, 347, 349, 360, 345, 346, 365,
364, 0, 341, 362, 361, 0, 0, 126, 0, 0,
0, 0, 0, 0, 0, 126, 0, 0, 0, 0,
0, 681, 0, 0, 0, 0, 0, 0, 0, 0,
681, 0, 0, 0, 0, 1817, 0, 126, 0, 0,
0, 0, 0, 0, 0, 0, 32, 0, 126, 126,
126, 126, 126, 0, 0, 0, 0, 742, 744, 0,
126, 0, 0, 0, 126, 1453, 1454, 126, 126, 0,
0, 126, 126, 126, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 372, 0, 757, 0,
0, 0, 762, 763, 764, 765, 766, 767, 768, 769,
0, 772, 775, 775, 775, 781, 775, 775, 781, 775,
789, 790, 791, 792, 793, 794, 795, 1450, 0, 0,
0, 0, 0, 0, 32, 0, 0, 0, 417, 0,
0, 1507, 0, 0, 0, 0, 0, 722, 721, 731,
732, 724, 725, 726, 727, 728, 729, 730, 723, 0,
836, 733, 1522, 0, 0, 0, 372, 722, 721, 731,
732, 724, 725, 726, 727, 728, 729, 730, 723, 0,
0, 733, 0, 0, 0, 1275, 0, 126, 0, 0,
0, 0, 0, 372, 0, 370, 0, 0, 0, 0,
0, 0, 0, 0, 372, 722, 721, 731, 732, 724,
725, 726, 727, 728, 729, 730, 723, 0, 0, 733,
0, 0, 0, 0, 0, 489, 0, 0, 623, 372,
630, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1581, 0, 0, 0, 1583, 0, 0, 0,
0, 0, 0, 0, 0, 0, 372, 1592, 1593, 0,
0, 0, 0, 0, 0, 0, 126, 0, 0, 0,
0, 0, 0, 0, 1607, 0, 372, 0, 0, 0,
0, 0, 372, 372, 0, 0, 0, 0, 0, 0,
0, 0, 1617, 1618, 0, 0, 1622, 0, 0, 0,
0, 0, 0, 0, 0, 126, 0, 0, 0, 0,
0, 0, 0, 0, 681, 0, 0, 0, 0, 372,
0, 372, 0, 372, 0, 0, 0, 0, 0, 0,
0, 681, 0, 0, 0, 0, 681, 681, 681, 0,
681, 681, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 681, 681, 0, 0, 0, 0,
0, 0, 126, 0, 0, 0, 0, 0, 126, 0,
0, 0, 0, 0, 800, 0, 0, 0, 0, 372,
372, 372, 0, 126, 0, 0, 0, 0, 0, 0,
0, 1672, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 123, 0, 0, 0, 0, 0, 0,
0, 0, 0, 374, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1714,
1715, 1716, 1717, 0, 1721, 0, 1722, 1723, 1724, 0,
1725, 1726, 0, 0, 0, 627, 0, 0, 0, 372,
0, 0, 0, 0, 0, 0, 0, 372, 0, 489,
0, 0, 0, 0, 642, 643, 0, 0, 489, 0,
0, 0, 651, 0, 1746, 0, 0, 657, 0, 0,
0, 0, 699, 701, 0, 1752, 0, 1126, 0, 372,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 372, 372, 372, 126, 372, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 372, 0, 372,
0, 0, 0, 0, 0, 372, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 372,
0, 0, 0, 0, 0, 372, 126, 0, 0, 0,
0, 0, 0, 823, 1824, 1825, 0, 0, 0, 0,
0, 489, 0, 0, 0, 0, 0, 853, 0, 0,
0, 0, 0, 0, 0, 681, 0, 0, 0, 0,
0, 0, 0, 372, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 372, 372, 372,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 372, 0, 126, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1280, 0, 0, 453, 0, 0,
0, 0, 0, 659, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 372, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1318, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
836, 0, 489, 0, 0, 0, 0, 1344, 1345, 0,
0, 836, 836, 836, 836, 836, 0, 0, 0, 489,
0, 0, 0, 0, 489, 489, 489, 1126, 489, 489,
836, 0, 0, 0, 836, 0, 0, 0, 0, 0,
0, 0, 489, 489, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 418, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 829, 0, 0, 840, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 124, 0, 0, 366, 0, 0, 0,
0, 0, 0, 124, 0, 1028, 0, 489, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1058, 0, 0, 0, 0, 475, 475, 0, 0,
0, 0, 0, 0, 0, 124, 0, 0, 1062, 1063,
0, 0, 0, 0, 0, 0, 0, 681, 0, 0,
0, 0, 0, 0, 124, 124, 0, 0, 0, 0,
0, 1094, 124, 0, 0, 0, 0, 124, 0, 0,
0, 823, 0, 0, 489, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 489, 0, 0, 489, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 489, 623, 0, 0,
0, 0, 0, 0, 0, 859, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 918, 0,
0, 0, 0, 1505, 0, 32, 0, 0, 0, 0,
0, 0, 947, 0, 0, 0, 0, 840, 0, 0,
954, 0, 0, 0, 0, 0, 0, 0, 836, 0,
0, 630, 0, 966, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 489, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1265, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1598, 0, 0,
0, 0, 0, 0, 0, 1604, 1605, 1606, 0, 0,
0, 0, 0, 124, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1101, 0, 0, 0, 0, 0,
0, 1105, 0, 1108, 0, 0, 0, 0, 0, 0,
0, 0, 1127, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1058, 0,
1653, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 124, 0, 0, 489, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1505, 475, 32,
0, 1505, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 124, 0, 124, 842, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1246, 1247, 1248,
1249, 1250, 0, 0, 1254, 1255, 0, 0, 1256, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1258, 0, 1431, 0, 0,
0, 0, 0, 1262, 0, 0, 1505, 1264, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1438, 0, 32, 0, 0, 0,
0, 0, 0, 0, 0, 489, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
489, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 489, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 124, 0, 1488, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 124, 0,
0, 0, 0, 0, 0, 0, 0, 489, 0, 0,
1058, 0, 124, 1508, 1488, 1812, 0, 124, 0, 0,
124, 0, 0, 957, 0, 0, 0, 0, 0, 0,
0, 0, 0, 124, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1369, 0, 0, 0, 0,
489, 0, 489, 0, 630, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1574, 1575, 1576, 0, 0, 0, 0, 0, 0, 0,
0, 0, 475, 957, 0, 0, 0, 475, 475, 0,
0, 475, 475, 475, 0, 0, 0, 1059, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1436, 0, 475, 475, 475, 475,
475, 0, 0, 0, 0, 1078, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1058, 0, 0, 0, 124, 0, 0, 0, 0, 0,
957, 124, 0, 124, 0, 0, 0, 0, 0, 0,
489, 124, 124, 0, 0, 0, 0, 0, 1633, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
489, 0, 0, 1493, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1633, 1633, 1633, 0, 1676, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1687, 0,
1689, 0, 0, 0, 0, 0, 1633, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 124, 124, 124,
124, 124, 0, 0, 124, 124, 0, 0, 124, 0,
1633, 0, 0, 0, 0, 0, 1633, 0, 0, 0,
0, 0, 0, 0, 0, 124, 0, 0, 0, 1562,
0, 1260, 1261, 124, 0, 1568, 0, 124, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1577, 0, 0, 0, 1739, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1748, 489,
489, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 475, 475, 0, 0, 0,
0, 0, 0, 1058, 0, 1766, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 475, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 124, 0, 0, 0, 0, 0,
0, 0, 1078, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1633, 0, 0,
0, 0, 0, 475, 124, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1059, 124, 124, 124, 124, 124,
0, 0, 0, 0, 0, 0, 0, 1362, 0, 0,
0, 124, 0, 0, 124, 124, 0, 0, 124, 1372,
957, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1713, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 124, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 475, 0, 0, 0, 0,
0, 0, 0, 1767, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 957, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 124, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1059, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 124, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 124,
0, 0, 0, 0, 0, 124, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
124, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1059, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 603,
591, 0, 1078, 544, 606, 517, 534, 615, 535, 538,
576, 501, 557, 236, 532, 0, 521, 497, 528, 498,
519, 546, 165, 550, 516, 593, 560, 605, 200, 0,
522, 248, 578, 279, 155, 208, 206, 301, 170, 166,
164, 154, 187, 213, 247, 297, 241, 612, 203, 567,
0, 288, 222, 124, 0, 0, 548, 595, 555, 587,
543, 577, 506, 566, 607, 533, 574, 608, 191, 153,
131, 233, 289, 172, 0, 0, 0, 114, 115, 116,
0, 1151, 1152, 0, 0, 0, 0, 0, 149, 0,
571, 602, 530, 573, 575, 618, 496, 568, 0, 499,
502, 614, 598, 525, 526, 1383, 0, 0, 0, 0,
0, 0, 547, 556, 584, 541, 0, 0, 0, 0,
0, 0, 0, 0, 523, 0, 565, 0, 0, 1059,
503, 500, 0, 124, 0, 0, 545, 0, 0, 0,
505, 0, 524, 585, 0, 494, 177, 589, 597, 542,
325, 601, 540, 539, 604, 259, 0, 293, 181, 199,
145, 196, 128, 140, 0, 179, 232, 266, 270, 594,
520, 529, 156, 527, 268, 245, 314, 564, 249, 267,
204, 303, 260, 313, 326, 327, 162, 226, 320, 298,
323, 335, 141, 159, 239, 294, 317, 285, 221, 300,
195, 284, 133, 296, 311, 150, 278, 0, 0, 0,
135, 309, 292, 219, 192, 193, 134, 0, 264, 163,
175, 158, 235, 306, 307, 157, 336, 142, 322, 137,
143, 321, 228, 302, 310, 220, 212, 136, 308, 218,
211, 198, 169, 183, 257, 207, 258, 184, 224, 223,
225, 0, 132, 0, 290, 318, 337, 147, 515, 590,
299, 331, 334, 0, 261, 148, 176, 168, 256, 174,
201, 330, 332, 333, 227, 144, 186, 286, 197, 205,
582, 617, 244, 269, 151, 316, 287, 510, 514, 508,
509, 558, 559, 511, 609, 610, 611, 586, 504, 0,
512, 513, 0, 592, 599, 600, 563, 127, 138, 202,
613, 262, 173, 319, 495, 507, 161, 518, 0, 0,
531, 536, 537, 549, 551, 552, 553, 554, 562, 569,
570, 572, 579, 580, 581, 583, 588, 596, 616, 129,
130, 139, 146, 152, 160, 167, 171, 178, 182, 185,
188, 189, 190, 194, 210, 214, 215, 216, 217, 229,
230, 231, 234, 237, 238, 240, 242, 243, 246, 250,
251, 252, 253, 254, 255, 263, 265, 271, 272, 273,
274, 275, 276, 277, 280, 281, 282, 283, 291, 295,
304, 305, 315, 324, 328, 180, 312, 329, 0, 209,
561, 603, 591, 0, 0, 544, 606, 517, 534, 615,
535, 538, 576, 501, 557, 236, 532, 0, 521, 497,
528, 498, 519, 546, 165, 550, 516, 593, 560, 605,
200, 0, 522, 248, 578, 279, 155, 208, 206, 301,
170, 166, 164, 154, 187, 213, 247, 297, 241, 612,
203, 567, 0, 288, 222, 0, 0, 0, 548, 595,
555, 587, 543, 577, 506, 566, 607, 533, 574, 608,
191, 153, 131, 233, 289, 172, 0, 0, 0, 114,
115, 116, 0, 1151, 1152, 0, 0, 0, 0, 0,
149, 0, 571, 602, 530, 573, 575, 618, 496, 568,
0, 499, 502, 614, 598, 525, 526, 0, 0, 0,
0, 0, 0, 0, 547, 556, 584, 541, 0, 0,
0, 0, 0, 0, 0, 0, 523, 0, 565, 0,
0, 0, 503, 500, 0, 0, 0, 0, 545, 0,
0, 0, 505, 0, 524, 585, 0, 494, 177, 589,
597, 542, 325, 601, 540, 539, 604, 259, 0, 293,
181, 199, 145, 196, 128, 140, 0, 179, 232, 266,
270, 594, 520, 529, 156, 527, 268, 245, 314, 564,
249, 267, 204, 303, 260, 313, 326, 327, 162, 226,
320, 298, 323, 335, 141, 159, 239, 294, 317, 285,
221, 300, 195, 284, 133, 296, 311, 150, 278, 0,
0, 0, 135, 309, 292, 219, 192, 193, 134, 0,
264, 163, 175, 158, 235, 306, 307, 157, 336, 142,
322, 137, 143, 321, 228, 302, 310, 220, 212, 136,
308, 218, 211, 198, 169, 183, 257, 207, 258, 184,
224, 223, 225, 0, 132, 0, 290, 318, 337, 147,
515, 590, 299, 331, 334, 0, 261, 148, 176, 168,
256, 174, 201, 330, 332, 333, 227, 144, 186, 286,
197, 205, 582, 617, 244, 269, 151, 316, 287, 510,
514, 508, 509, 558, 559, 511, 609, 610, 611, 586,
504, 0, 512, 513, 0, 592, 599, 600, 563, 127,
138, 202, 613, 262, 173, 319, 495, 507, 161, 518,
0, 0, 531, 536, 537, 549, 551, 552, 553, 554,
562, 569, 570, 572, 579, 580, 581, 583, 588, 596,
616, 129, 130, 139, 146, 152, 160, 167, 171, 178,
182, 185, 188, 189, 190, 194, 210, 214, 215, 216,
217, 229, 230, 231, 234, 237, 238, 240, 242, 243,
246, 250, 251, 252, 253, 254, 255, 263, 265, 271,
272, 273, 274, 275, 276, 277, 280, 281, 282, 283,
291, 295, 304, 305, 315, 324, 328, 180, 312, 329,
0, 209, 561, 603, 591, 0, 0, 544, 606, 517,
534, 615, 535, 538, 576, 501, 557, 236, 532, 0,
521, 497, 528, 498, 519, 546, 165, 550, 516, 593,
560, 605, 200, 0, 522, 248, 578, 279, 155, 208,
206, 301, 170, 166, 164, 154, 187, 213, 247, 297,
241, 612, 203, 567, 0, 288, 222, 0, 0, 0,
548, 595, 555, 587, 543, 577, 506, 566, 607, 533,
574, 608, 191, 153, 131, 233, 289, 172, 0, 0,
0, 114, 115, 116, 0, 0, 0, 0, 0, 0,
0, 0, 149, 0, 571, 602, 530, 573, 575, 618,
496, 568, 0, 499, 502, 614, 598, 525, 526, 0,
0, 0, 0, 0, 0, 0, 547, 556, 584, 541,
0, 0, 0, 0, 0, 0, 1497, 0, 523, 0,
565, 0, 0, 0, 503, 500, 0, 0, 0, 0,
545, 0, 0, 0, 505, 0, 524, 585, 0, 494,
177, 589, 597, 542, 325, 601, 540, 539, 604, 259,
0, 293, 181, 199, 145, 196, 128, 140, 0, 179,
232, 266, 270, 594, 520, 529, 156, 527, 268, 245,
314, 564, 249, 267, 204, 303, 260, 313, 326, 327,
162, 226, 320, 298, 323, 335, 141, 159, 239, 294,
317, 285, 221, 300, 195, 284, 133, 296, 311, 150,
278, 0, 0, 0, 135, 309, 292, 219, 192, 193,
134, 0, 264, 163, 175, 158, 235, 306, 307, 157,
336, 142, 322, 137, 143, 321, 228, 302, 310, 220,
212, 136, 308, 218, 211, 198, 169, 183, 257, 207,
258, 184, 224, 223, 225, 0, 132, 0, 290, 318,
337, 147, 515, 590, 299, 331, 334, 0, 261, 148,
176, 168, 256, 174, 201, 330, 332, 333, 227, 144,
186, 286, 197, 205, 582, 617, 244, 269, 151, 316,
287, 510, 514, 508, 509, 558, 559, 511, 609, 610,
611, 586, 504, 0, 512, 513, 0, 592, 599, 600,
563, 127, 138, 202, 613, 262, 173, 319, 495, 507,
161, 518, 0, 0, 531, 536, 537, 549, 551, 552,
553, 554, 562, 569, 570, 572, 579, 580, 581, 583,
588, 596, 616, 129, 130, 139, 146, 152, 160, 167,
171, 178, 182, 185, 188, 189, 190, 194, 210, 214,
215, 216, 217, 229, 230, 231, 234, 237, 238, 240,
242, 243, 246, 250, 251, 252, 253, 254, 255, 263,
265, 271, 272, 273, 274, 275, 276, 277, 280, 281,
282, 283, 291, 295, 304, 305, 315, 324, 328, 180,
312, 329, 0, 209, 561, 603, 591, 0, 0, 544,
606, 517, 534, 615, 535, 538, 576, 501, 557, 236,
532, 0, 521, 497, 528, 498, 519, 546, 165, 550,
516, 593, 560, 605, 200, 0, 522, 248, 578, 279,
155, 208, 206, 301, 170, 166, 164, 154, 187, 213,
247, 297, 241, 612, 203, 567, 0, 288, 222, 0,
0, 0, 548, 595, 555, 587, 543, 577, 506, 566,
607, 533, 574, 608, 191, 153, 131, 233, 289, 172,
66, 0, 0, 114, 115, 116, 0, 0, 0, 0,
0, 0, 0, 0, 149, 0, 571, 602, 530, 573,
575, 618, 496, 568, 0, 499, 502, 614, 598, 525,
526, 0, 0, 0, 0, 0, 0, 0, 547, 556,
584, 541, 0, 0, 0, 0, 0, 0, 0, 0,
523, 0, 565, 0, 0, 0, 503, 500, 0, 0,
0, 0, 545, 0, 0, 0, 505, 0, 524, 585,
0, 494, 177, 589, 597, 542, 325, 601, 540, 539,
604, 259, 0, 293, 181, 199, 145, 196, 128, 140,
0, 179, 232, 266, 270, 594, 520, 529, 156, 527,
268, 245, 314, 564, 249, 267, 204, 303, 260, 313,
326, 327, 162, 226, 320, 298, 323, 335, 141, 159,
239, 294, 317, 285, 221, 300, 195, 284, 133, 296,
311, 150, 278, 0, 0, 0, 135, 309, 292, 219,
192, 193, 134, 0, 264, 163, 175, 158, 235, 306,
307, 157, 336, 142, 322, 137, 143, 321, 228, 302,
310, 220, 212, 136, 308, 218, 211, 198, 169, 183,
257, 207, 258, 184, 224, 223, 225, 0, 132, 0,
290, 318, 337, 147, 515, 590, 299, 331, 334, 0,
261, 148, 176, 168, 256, 174, 201, 330, 332, 333,
227, 144, 186, 286, 197, 205, 582, 617, 244, 269,
151, 316, 287, 510, 514, 508, 509, 558, 559, 511,
609, 610, 611, 586, 504, 0, 512, 513, 0, 592,
599, 600, 563, 127, 138, 202, 613, 262, 173, 319,
495, 507, 161, 518, 0, 0, 531, 536, 537, 549,
551, 552, 553, 554, 562, 569, 570, 572, 579, 580,
581, 583, 588, 596, 616, 129, 130, 139, 146, 152,
160, 167, 171, 178, 182, 185, 188, 189, 190, 194,
210, 214, 215, 216, 217, 229, 230, 231, 234, 237,
238, 240, 242, 243, 246, 250, 251, 252, 253, 254,
255, 263, 265, 271, 272, 273, 274, 275, 276, 277,
280, 281, 282, 283, 291, 295, 304, 305, 315, 324,
328, 180, 312, 329, 0, 209, 561, 603, 591, 0,
0, 544, 606, 517, 534, 615, 535, 538, 576, 501,
557, 236, 532, 0, 521, 497, 528, 498, 519, 546,
165, 550, 516, 593, 560, 605, 200, 0, 522, 248,
578, 279, 155, 208, 206, 301, 170, 166, 164, 154,
187, 213, 247, 297, 241, 612, 203, 567, 0, 288,
222, 0, 0, 0, 548, 595, 555, 587, 543, 577,
506, 566, 607, 533, 574, 608, 191, 153, 131, 233,
289, 172, 0, 0, 0, 114, 115, 116, 0, 0,
0, 0, 0, 0, 0, 0, 149, 0, 571, 602,
530, 573, 575, 618, 496, 568, 0, 499, 502, 614,
598, 525, 526, 0, 0, 0, 0, 0, 0, 0,
547, 556, 584, 541, 0, 0, 0, 0, 0, 0,
1373, 0, 523, 0, 565, 0, 0, 0, 503, 500,
0, 0, 0, 0, 545, 0, 0, 0, 505, 0,
524, 585, 0, 494, 177, 589, 597, 542, 325, 601,
540, 539, 604, 259, 0, 293, 181, 199, 145, 196,
128, 140, 0, 179, 232, 266, 270, 594, 520, 529,
156, 527, 268, 245, 314, 564, 249, 267, 204, 303,
260, 313, 326, 327, 162, 226, 320, 298, 323, 335,
141, 159, 239, 294, 317, 285, 221, 300, 195, 284,
133, 296, 311, 150, 278, 0, 0, 0, 135, 309,
292, 219, 192, 193, 134, 0, 264, 163, 175, 158,
235, 306, 307, 157, 336, 142, 322, 137, 143, 321,
228, 302, 310, 220, 212, 136, 308, 218, 211, 198,
169, 183, 257, 207, 258, 184, 224, 223, 225, 0,
132, 0, 290, 318, 337, 147, 515, 590, 299, 331,
334, 0, 261, 148, 176, 168, 256, 174, 201, 330,
332, 333, 227, 144, 186, 286, 197, 205, 582, 617,
244, 269, 151, 316, 287, 510, 514, 508, 509, 558,
559, 511, 609, 610, 611, 586, 504, 0, 512, 513,
0, 592, 599, 600, 563, 127, 138, 202, 613, 262,
173, 319, 495, 507, 161, 518, 0, 0, 531, 536,
537, 549, 551, 552, 553, 554, 562, 569, 570, 572,
579, 580, 581, 583, 588, 596, 616, 129, 130, 139,
146, 152, 160, 167, 171, 178, 182, 185, 188, 189,
190, 194, 210, 214, 215, 216, 217, 229, 230, 231,
234, 237, 238, 240, 242, 243, 246, 250, 251, 252,
253, 254, 255, 263, 265, 271, 272, 273, 274, 275,
276, 277, 280, 281, 282, 283, 291, 295, 304, 305,
315, 324, 328, 180, 312, 329, 0, 209, 561, 603,
591, 0, 0, 544, 606, 517, 534, 615, 535, 538,
576, 501, 557, 236, 532, 0, 521, 497, 528, 498,
519, 546, 165, 550, 516, 593, 560, 605, 200, 0,
522, 248, 578, 279, 155, 208, 206, 301, 170, 166,
164, 154, 187, 213, 247, 297, 241, 612, 203, 567,
0, 288, 222, 0, 0, 0, 548, 595, 555, 587,
543, 577, 506, 566, 607, 533, 574, 608, 191, 153,
131, 233, 289, 172, 0, 0, 0, 114, 115, 116,
0, 0, 0, 0, 0, 0, 0, 0, 149, 0,
571, 602, 530, 573, 575, 618, 496, 568, 0, 499,
502, 614, 598, 525, 526, 0, 0, 0, 0, 0,
0, 0, 547, 556, 584, 541, 0, 0, 0, 0,
0, 0, 1103, 0, 523, 0, 565, 0, 0, 0,
503, 500, 0, 0, 0, 0, 545, 0, 0, 0,
505, 0, 524, 585, 0, 494, 177, 589, 597, 542,
325, 601, 540, 539, 604, 259, 0, 293, 181, 199,
145, 196, 128, 140, 0, 179, 232, 266, 270, 594,
520, 529, 156, 527, 268, 245, 314, 564, 249, 267,
204, 303, 260, 313, 326, 327, 162, 226, 320, 298,
323, 335, 141, 159, 239, 294, 317, 285, 221, 300,
195, 284, 133, 296, 311, 150, 278, 0, 0, 0,
135, 309, 292, 219, 192, 193, 134, 0, 264, 163,
175, 158, 235, 306, 307, 157, 336, 142, 322, 137,
143, 321, 228, 302, 310, 220, 212, 136, 308, 218,
211, 198, 169, 183, 257, 207, 258, 184, 224, 223,
225, 0, 132, 0, 290, 318, 337, 147, 515, 590,
299, 331, 334, 0, 261, 148, 176, 168, 256, 174,
201, 330, 332, 333, 227, 144, 186, 286, 197, 205,
582, 617, 244, 269, 151, 316, 287, 510, 514, 508,
509, 558, 559, 511, 609, 610, 611, 586, 504, 0,
512, 513, 0, 592, 599, 600, 563, 127, 138, 202,
613, 262, 173, 319, 495, 507, 161, 518, 0, 0,
531, 536, 537, 549, 551, 552, 553, 554, 562, 569,
570, 572, 579, 580, 581, 583, 588, 596, 616, 129,
130, 139, 146, 152, 160, 167, 171, 178, 182, 185,
188, 189, 190, 194, 210, 214, 215, 216, 217, 229,
230, 231, 234, 237, 238, 240, 242, 243, 246, 250,
251, 252, 253, 254, 255, 263, 265, 271, 272, 273,
274, 275, 276, 277, 280, 281, 282, 283, 291, 295,
304, 305, 315, 324, 328, 180, 312, 329, 0, 209,
561, 603, 591, 0, 0, 544, 606, 517, 534, 615,
535, 538, 576, 501, 557, 236, 532, 0, 521, 497,
528, 498, 519, 546, 165, 550, 516, 593, 560, 605,
200, 0, 522, 248, 578, 279, 155, 208, 206, 301,
170, 166, 164, 154, 187, 213, 247, 297, 241, 612,
203, 567, 0, 288, 222, 0, 0, 0, 548, 595,
555, 587, 543, 577, 506, 566, 607, 533, 574, 608,
191, 153, 131, 233, 289, 172, 0, 0, 0, 114,
115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
149, 0, 571, 602, 530, 573, 575, 618, 496, 568,
0, 499, 502, 614, 598, 525, 526, 0, 0, 0,
0, 0, 0, 0, 547, 556, 584, 541, 0, 0,
0, 0, 0, 0, 0, 0, 523, 0, 565, 0,
0, 0, 503, 500, 0, 0, 0, 0, 545, 0,
0, 0, 505, 0, 524, 585, 0, 494, 177, 589,
597, 542, 325, 601, 540, 539, 604, 259, 0, 293,
181, 199, 145, 196, 128, 140, 0, 179, 232, 266,
270, 594, 520, 529, 156, 527, 268, 245, 314, 564,
249, 267, 204, 303, 260, 313, 326, 327, 162, 226,
320, 298, 323, 335, 141, 159, 239, 294, 317, 285,
221, 300, 195, 284, 133, 296, 311, 150, 278, 0,
0, 0, 135, 309, 292, 219, 192, 193, 134, 0,
264, 163, 175, 158, 235, 306, 307, 157, 336, 142,
322, 137, 143, 321, 228, 302, 310, 220, 212, 136,
308, 218, 211, 198, 169, 183, 257, 207, 258, 184,
224, 223, 225, 0, 132, 0, 290, 318, 337, 147,
515, 590, 299, 331, 334, 0, 261, 148, 176, 168,
256, 174, 201, 330, 332, 333, 227, 144, 186, 286,
197, 205, 582, 617, 244, 269, 151, 316, 287, 510,
514, 508, 509, 558, 559, 511, 609, 610, 611, 586,
504, 0, 512, 513, 0, 592, 599, 600, 563, 127,
138, 202, 613, 262, 173, 319, 495, 507, 161, 518,
0, 0, 531, 536, 537, 549, 551, 552, 553, 554,
562, 569, 570, 572, 579, 580, 581, 583, 588, 596,
616, 129, 130, 139, 146, 152, 160, 167, 171, 178,
182, 185, 188, 189, 190, 194, 210, 214, 215, 216,
217, 229, 230, 231, 234, 237, 238, 240, 242, 243,
246, 250, 251, 252, 253, 254, 255, 263, 265, 271,
272, 273, 274, 275, 276, 277, 280, 281, 282, 283,
291, 295, 304, 305, 315, 324, 328, 180, 312, 329,
0, 209, 561, 603, 591, 0, 0, 544, 606, 517,
534, 615, 535, 538, 576, 501, 557, 236, 532, 0,
521, 497, 528, 498, 519, 546, 165, 550, 516, 593,
560, 605, 200, 0, 522, 248, 578, 279, 155, 208,
206, 301, 170, 166, 164, 154, 187, 213, 247, 297,
241, 612, 203, 567, 0, 288, 222, 0, 0, 0,
548, 595, 555, 587, 543, 577, 506, 566, 607, 533,
574, 608, 191, 153, 131, 233, 289, 172, 0, 0,
0, 114, 115, 116, 0, 0, 0, 0, 0, 0,
0, 0, 149, 0, 571, 602, 530, 573, 575, 618,
496, 568, 0, 499, 502, 614, 598, 525, 526, 0,
0, 0, 0, 0, 0, 0, 547, 556, 584, 541,
0, 0, 0, 0, 0, 0, 0, 0, 523, 0,
565, 0, 0, 0, 503, 500, 0, 0, 0, 0,
545, 0, 0, 0, 505, 0, 524, 585, 0, 494,
177, 589, 597, 542, 325, 601, 540, 539, 604, 259,
0, 293, 181, 199, 145, 196, 128, 140, 0, 179,
232, 266, 270, 594, 520, 529, 156, 527, 268, 245,
314, 564, 249, 267, 204, 303, 260, 313, 326, 327,
162, 226, 320, 298, 323, 335, 141, 159, 239, 294,
317, 285, 221, 300, 195, 284, 133, 296, 311, 150,
278, 0, 0, 0, 135, 309, 292, 219, 192, 193,
134, 0, 264, 163, 175, 158, 235, 306, 307, 157,
336, 142, 322, 137, 492, 321, 228, 302, 310, 220,
212, 136, 308, 218, 211, 198, 169, 183, 257, 207,
258, 184, 224, 223, 225, 0, 132, 0, 290, 318,
337, 147, 515, 590, 299, 331, 334, 0, 261, 148,
176, 168, 256, 174, 201, 330, 332, 333, 493, 491,
486, 485, 197, 205, 582, 617, 244, 269, 151, 316,
287, 510, 514, 508, 509, 558, 559, 511, 609, 610,
611, 586, 504, 0, 512, 513, 0, 592, 599, 600,
563, 127, 138, 202, 613, 262, 173, 319, 495, 507,
161, 518, 0, 0, 531, 536, 537, 549, 551, 552,
553, 554, 562, 569, 570, 572, 579, 580, 581, 583,
588, 596, 616, 129, 130, 139, 146, 152, 160, 167,
171, 178, 182, 185, 188, 189, 190, 194, 210, 214,
215, 216, 217, 229, 230, 231, 234, 237, 238, 240,
242, 243, 246, 250, 251, 252, 253, 254, 255, 263,
265, 271, 272, 273, 274, 275, 276, 277, 280, 281,
282, 283, 291, 295, 304, 305, 315, 324, 328, 180,
312, 329, 0, 209, 561, 603, 591, 0, 0, 544,
606, 517, 534, 615, 535, 538, 576, 501, 557, 236,
532, 0, 521, 497, 528, 498, 519, 546, 165, 550,
516, 593, 560, 605, 200, 0, 522, 248, 578, 279,
155, 208, 206, 301, 170, 166, 164, 154, 187, 213,
247, 297, 241, 612, 203, 567, 0, 288, 222, 0,
0, 0, 548, 595, 555, 587, 543, 577, 506, 566,
607, 533, 574, 608, 191, 153, 131, 233, 289, 172,
0, 0, 0, 114, 115, 116, 0, 0, 0, 0,
0, 0, 0, 0, 149, 0, 571, 602, 530, 573,
575, 618, 496, 568, 0, 499, 502, 614, 598, 525,
526, 0, 0, 0, 0, 0, 0, 0, 547, 556,
584, 541, 0, 0, 0, 0, 0, 0, 0, 0,
523, 0, 565, 0, 0, 0, 503, 500, 0, 0,
0, 0, 545, 0, 0, 0, 505, 0, 524, 585,
0, 494, 177, 589, 597, 542, 325, 601, 540, 539,
604, 259, 0, 293, 181, 199, 145, 196, 128, 140,
0, 179, 232, 266, 270, 594, 520, 529, 156, 527,
268, 245, 314, 564, 249, 267, 204, 303, 260, 313,
326, 327, 162, 226, 320, 298, 323, 335, 141, 159,
239, 294, 317, 285, 221, 300, 195, 284, 133, 296,
844, 150, 278, 0, 0, 0, 135, 309, 292, 219,
192, 193, 134, 0, 264, 163, 175, 158, 235, 306,
307, 157, 336, 142, 322, 137, 492, 321, 228, 302,
310, 220, 212, 136, 308, 218, 211, 198, 169, 183,
257, 207, 258, 184, 224, 223, 225, 0, 132, 0,
290, 318, 337, 147, 515, 590, 299, 331, 334, 0,
261, 148, 176, 168, 256, 174, 201, 330, 332, 333,
493, 491, 486, 485, 197, 205, 582, 617, 244, 269,
151, 316, 287, 510, 514, 508, 509, 558, 559, 511,
609, 610, 611, 586, 504, 0, 512, 513, 0, 592,
599, 600, 563, 127, 138, 202, 613, 262, 173, 319,
495, 507, 161, 518, 0, 0, 531, 536, 537, 549,
551, 552, 553, 554, 562, 569, 570, 572, 579, 580,
581, 583, 588, 596, 616, 129, 130, 139, 146, 152,
160, 167, 171, 178, 182, 185, 188, 189, 190, 194,
210, 214, 215, 216, 217, 229, 230, 231, 234, 237,
238, 240, 242, 243, 246, 250, 251, 252, 253, 254,
255, 263, 265, 271, 272, 273, 274, 275, 276, 277,
280, 281, 282, 283, 291, 295, 304, 305, 315, 324,
328, 180, 312, 329, 0, 209, 561, 603, 591, 0,
0, 544, 606, 517, 534, 615, 535, 538, 576, 501,
557, 236, 532, 0, 521, 497, 528, 498, 519, 546,
165, 550, 516, 593, 560, 605, 200, 0, 522, 248,
578, 279, 155, 208, 206, 301, 170, 166, 164, 154,
187, 213, 247, 297, 241, 612, 203, 567, 0, 288,
222, 0, 0, 0, 548, 595, 555, 587, 543, 577,
506, 566, 607, 533, 574, 608, 191, 153, 131, 233,
289, 172, 0, 0, 0, 114, 115, 116, 0, 0,
0, 0, 0, 0, 0, 0, 149, 0, 571, 602,
530, 573, 575, 618, 496, 568, 0, 499, 502, 614,
598, 525, 526, 0, 0, 0, 0, 0, 0, 0,
547, 556, 584, 541, 0, 0, 0, 0, 0, 0,
0, 0, 523, 0, 565, 0, 0, 0, 503, 500,
0, 0, 0, 0, 545, 0, 0, 0, 505, 0,
524, 585, 0, 494, 177, 589, 597, 542, 325, 601,
540, 539, 604, 259, 0, 293, 181, 199, 145, 196,
128, 140, 0, 179, 232, 266, 270, 594, 520, 529,
156, 527, 268, 245, 314, 564, 249, 267, 204, 303,
260, 313, 326, 327, 162, 226, 320, 298, 323, 335,
141, 159, 239, 294, 317, 285, 221, 300, 195, 284,
133, 296, 483, 150, 278, 0, 0, 0, 135, 309,
292, 219, 192, 193, 134, 0, 264, 163, 175, 158,
235, 306, 307, 157, 336, 142, 322, 137, 492, 321,
228, 302, 310, 220, 212, 136, 308, 218, 211, 198,
169, 183, 257, 207, 258, 184, 224, 223, 225, 0,
132, 0, 290, 318, 337, 147, 515, 590, 299, 331,
334, 0, 261, 148, 176, 168, 256, 174, 201, 330,
332, 333, 493, 491, 486, 485, 197, 205, 582, 617,
244, 269, 151, 316, 287, 510, 514, 508, 509, 558,
559, 511, 609, 610, 611, 586, 504, 0, 512, 513,
0, 592, 599, 600, 563, 127, 138, 202, 613, 262,
173, 319, 495, 507, 161, 518, 0, 0, 531, 536,
537, 549, 551, 552, 553, 554, 562, 569, 570, 572,
579, 580, 581, 583, 588, 596, 616, 129, 130, 139,
146, 152, 160, 167, 171, 178, 182, 185, 188, 189,
190, 194, 210, 214, 215, 216, 217, 229, 230, 231,
234, 237, 238, 240, 242, 243, 246, 250, 251, 252,
253, 254, 255, 263, 265, 271, 272, 273, 274, 275,
276, 277, 280, 281, 282, 283, 291, 295, 304, 305,
315, 324, 328, 180, 312, 329, 236, 209, 561, 1030,
0, 387, 0, 0, 0, 165, 0, 386, 0, 0,
0, 200, 0, 1031, 248, 0, 279, 155, 208, 206,
301, 170, 166, 164, 154, 187, 213, 247, 297, 241,
430, 203, 0, 0, 288, 222, 0, 0, 0, 0,
0, 421, 422, 0, 0, 0, 0, 0, 0, 0,
0, 191, 153, 131, 233, 289, 172, 66, 0, 0,
114, 115, 116, 408, 407, 410, 411, 412, 413, 0,
0, 149, 409, 414, 415, 416, 0, 0, 0, 0,
384, 401, 0, 429, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 398, 399, 473, 0, 0, 0, 444,
0, 400, 0, 0, 393, 394, 396, 395, 397, 402,
0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
443, 0, 0, 325, 0, 0, 441, 0, 259, 0,
293, 181, 199, 145, 196, 128, 140, 0, 179, 232,
266, 270, 0, 0, 0, 156, 0, 268, 245, 314,
0, 249, 267, 204, 303, 260, 313, 326, 327, 162,
226, 320, 298, 323, 335, 141, 159, 239, 294, 317,
285, 221, 300, 195, 284, 133, 296, 311, 150, 278,
0, 0, 0, 135, 309, 292, 219, 192, 193, 134,
0, 264, 163, 175, 158, 235, 306, 307, 157, 336,
142, 322, 137, 143, 321, 228, 302, 310, 220, 212,
136, 308, 218, 211, 198, 169, 183, 257, 207, 258,
184, 224, 223, 225, 0, 132, 0, 290, 318, 337,
147, 0, 0, 299, 331, 334, 0, 261, 148, 176,
168, 256, 174, 201, 330, 332, 333, 227, 144, 186,
286, 197, 205, 0, 0, 244, 269, 151, 316, 287,
431, 442, 437, 438, 435, 436, 0, 434, 433, 432,
445, 423, 424, 425, 426, 428, 0, 439, 440, 427,
127, 138, 202, 0, 262, 173, 319, 0, 0, 161,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 129, 130, 139, 146, 152, 160, 167, 171,
178, 182, 185, 188, 189, 190, 194, 210, 214, 215,
216, 217, 229, 230, 231, 234, 237, 238, 240, 242,
243, 246, 250, 251, 252, 253, 254, 255, 263, 265,
271, 272, 273, 274, 275, 276, 277, 280, 281, 282,
283, 291, 295, 304, 305, 315, 324, 328, 180, 312,
329, 236, 209, 0, 0, 0, 387, 0, 0, 0,
165, 0, 386, 0, 0, 0, 200, 0, 0, 248,
0, 279, 155, 208, 206, 301, 170, 166, 164, 154,
187, 213, 247, 297, 241, 430, 203, 0, 0, 288,
222, 0, 0, 0, 0, 0, 421, 422, 0, 0,
0, 0, 0, 0, 1142, 0, 191, 153, 131, 233,
289, 172, 66, 0, 0, 114, 115, 116, 408, 407,
410, 411, 412, 413, 0, 0, 149, 409, 414, 415,
416, 1143, 0, 0, 0, 384, 401, 0, 429, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 398, 399,
0, 0, 0, 0, 444, 0, 400, 0, 0, 393,
394, 396, 395, 397, 402, 0, 0, 0, 0, 0,
0, 0, 0, 0, 177, 443, 0, 0, 325, 0,
0, 441, 0, 259, 0, 293, 181, 199, 145, 196,
128, 140, 0, 179, 232, 266, 270, 0, 0, 0,
156, 0, 268, 245, 314, 0, 249, 267, 204, 303,
260, 313, 326, 327, 162, 226, 320, 298, 323, 335,
141, 159, 239, 294, 317, 285, 221, 300, 195, 284,
133, 296, 311, 150, 278, 0, 0, 0, 135, 309,
292, 219, 192, 193, 134, 0, 264, 163, 175, 158,
235, 306, 307, 157, 336, 142, 322, 137, 143, 321,
228, 302, 310, 220, 212, 136, 308, 218, 211, 198,
169, 183, 257, 207, 258, 184, 224, 223, 225, 0,
132, 0, 290, 318, 337, 147, 0, 0, 299, 331,
334, 0, 261, 148, 176, 168, 256, 174, 201, 330,
332, 333, 227, 144, 186, 286, 197, 205, 0, 0,
244, 269, 151, 316, 287, 431, 442, 437, 438, 435,
436, 0, 434, 433, 432, 445, 423, 424, 425, 426,
428, 0, 439, 440, 427, 127, 138, 202, 0, 262,
173, 319, 0, 0, 161, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 129, 130, 139,
146, 152, 160, 167, 171, 178, 182, 185, 188, 189,
190, 194, 210, 214, 215, 216, 217, 229, 230, 231,
234, 237, 238, 240, 242, 243, 246, 250, 251, 252,
253, 254, 255, 263, 265, 271, 272, 273, 274, 275,
276, 277, 280, 281, 282, 283, 291, 295, 304, 305,
315, 324, 328, 180, 312, 329, 236, 209, 0, 0,
0, 387, 0, 0, 0, 165, 0, 386, 0, 0,
0, 200, 0, 0, 248, 0, 279, 155, 208, 206,
301, 170, 166, 164, 154, 187, 213, 247, 297, 241,
430, 203, 0, 0, 288, 222, 0, 0, 0, 0,
0, 421, 422, 0, 0, 0, 0, 0, 0, 0,
0, 191, 153, 131, 233, 289, 172, 66, 0, 461,
114, 115, 116, 408, 407, 410, 411, 412, 413, 0,
0, 149, 409, 414, 415, 416, 0, 0, 0, 0,
384, 401, 0, 429, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 398, 399, 0, 0, 0, 0, 444,
0, 400, 0, 0, 393, 394, 396, 395, 397, 402,
0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
443, 0, 0, 325, 0, 0, 441, 0, 259, 0,
293, 181, 199, 145, 196, 128, 140, 0, 179, 232,
266, 270, 0, 0, 0, 156, 0, 268, 245, 314,
0, 249, 267, 204, 303, 260, 313, 326, 327, 162,
226, 320, 298, 323, 335, 141, 159, 239, 294, 317,
285, 221, 300, 195, 284, 133, 296, 311, 150, 278,
0, 0, 0, 135, 309, 292, 219, 192, 193, 134,
0, 264, 163, 175, 158, 235, 306, 307, 157, 336,
142, 322, 137, 143, 321, 228, 302, 310, 220, 212,
136, 308, 218, 211, 198, 169, 183, 257, 207, 258,
184, 224, 223, 225, 0, 132, 0, 290, 318, 337,
147, 0, 0, 299, 331, 334, 0, 261, 148, 176,
168, 256, 174, 201, 330, 332, 333, 227, 144, 186,
286, 197, 205, 0, 0, 244, 269, 151, 316, 287,
431, 442, 437, 438, 435, 436, 0, 434, 433, 432,
445, 423, 424, 425, 426, 428, 0, 439, 440, 427,
127, 138, 202, 0, 262, 173, 319, 0, 0, 161,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 129, 130, 139, 146, 152, 160, 167, 171,
178, 182, 185, 188, 189, 190, 194, 210, 214, 215,
216, 217, 229, 230, 231, 234, 237, 238, 240, 242,
243, 246, 250, 251, 252, 253, 254, 255, 263, 265,
271, 272, 273, 274, 275, 276, 277, 280, 281, 282,
283, 291, 295, 304, 305, 315, 324, 328, 180, 312,
329, 236, 209, 0, 0, 0, 387, 0, 0, 0,
165, 0, 386, 0, 0, 0, 200, 0, 0, 248,
0, 279, 155, 208, 206, 301, 170, 166, 164, 154,
187, 213, 247, 297, 241, 430, 203, 0, 0, 288,
222, 0, 0, 0, 0, 0, 421, 422, 0, 0,
0, 0, 0, 0, 0, 0, 191, 153, 131, 233,
289, 172, 66, 0, 0, 114, 115, 116, 408, 407,
410, 411, 412, 413, 0, 0, 149, 409, 414, 415,
416, 0, 0, 0, 0, 384, 401, 0, 429, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 398, 399,
473, 0, 0, 0, 444, 0, 400, 0, 0, 393,
394, 396, 395, 397, 402, 0, 0, 0, 0, 0,
0, 0, 0, 0, 177, 443, 0, 0, 325, 0,
0, 441, 0, 259, 0, 293, 181, 199, 145, 196,
128, 140, 0, 179, 232, 266, 270, 0, 0, 0,
156, 0, 268, 245, 314, 0, 249, 267, 204, 303,
260, 313, 326, 327, 162, 226, 320, 298, 323, 335,
141, 159, 239, 294, 317, 285, 221, 300, 195, 284,
133, 296, 311, 150, 278, 0, 0, 0, 135, 309,
292, 219, 192, 193, 134, 0, 264, 163, 175, 158,
235, 306, 307, 157, 336, 142, 322, 137, 143, 321,
228, 302, 310, 220, 212, 136, 308, 218, 211, 198,
169, 183, 257, 207, 258, 184, 224, 223, 225, 0,
132, 0, 290, 318, 337, 147, 0, 0, 299, 331,
334, 0, 261, 148, 176, 168, 256, 174, 201, 330,
332, 333, 227, 144, 186, 286, 197, 205, 0, 0,
244, 269, 151, 316, 287, 431, 442, 437, 438, 435,
436, 0, 434, 433, 432, 445, 423, 424, 425, 426,
428, 0, 439, 440, 427, 127, 138, 202, 0, 262,
173, 319, 0, 0, 161, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 129, 130, 139,
146, 152, 160, 167, 171, 178, 182, 185, 188, 189,
190, 194, 210, 214, 215, 216, 217, 229, 230, 231,
234, 237, 238, 240, 242, 243, 246, 250, 251, 252,
253, 254, 255, 263, 265, 271, 272, 273, 274, 275,
276, 277, 280, 281, 282, 283, 291, 295, 304, 305,
315, 324, 328, 180, 312, 329, 236, 209, 0, 0,
0, 387, 0, 0, 0, 165, 0, 386, 0, 0,
0, 200, 0, 0, 248, 0, 279, 155, 208, 206,
301, 170, 166, 164, 154, 187, 213, 247, 297, 241,
430, 203, 0, 0, 288, 222, 0, 0, 0, 0,
0, 421, 422, 0, 0, 0, 0, 0, 0, 0,
0, 191, 153, 131, 233, 289, 172, 66, 0, 0,
114, 115, 116, 408, 1048, 410, 411, 412, 413, 0,
0, 149, 409, 414, 415, 416, 0, 0, 0, 0,
384, 401, 0, 429, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 398, 399, 473, 0, 0, 0, 444,
0, 400, 0, 0, 393, 394, 396, 395, 397, 402,
0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
443, 0, 0, 325, 0, 0, 441, 0, 259, 0,
293, 181, 199, 145, 196, 128, 140, 0, 179, 232,
266, 270, 0, 0, 0, 156, 0, 268, 245, 314,
0, 249, 267, 204, 303, 260, 313, 326, 327, 162,
226, 320, 298, 323, 335, 141, 159, 239, 294, 317,
285, 221, 300, 195, 284, 133, 296, 311, 150, 278,
0, 0, 0, 135, 309, 292, 219, 192, 193, 134,
0, 264, 163, 175, 158, 235, 306, 307, 157, 336,
142, 322, 137, 143, 321, 228, 302, 310, 220, 212,
136, 308, 218, 211, 198, 169, 183, 257, 207, 258,
184, 224, 223, 225, 0, 132, 0, 290, 318, 337,
147, 0, 0, 299, 331, 334, 0, 261, 148, 176,
168, 256, 174, 201, 330, 332, 333, 227, 144, 186,
286, 197, 205, 0, 0, 244, 269, 151, 316, 287,
431, 442, 437, 438, 435, 436, 0, 434, 433, 432,
445, 423, 424, 425, 426, 428, 0, 439, 440, 427,
127, 138, 202, 0, 262, 173, 319, 0, 0, 161,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 129, 130, 139, 146, 152, 160, 167, 171,
178, 182, 185, 188, 189, 190, 194, 210, 214, 215,
216, 217, 229, 230, 231, 234, 237, 238, 240, 242,
243, 246, 250, 251, 252, 253, 254, 255, 263, 265,
271, 272, 273, 274, 275, 276, 277, 280, 281, 282,
283, 291, 295, 304, 305, 315, 324, 328, 180, 312,
329, 236, 209, 0, 0, 0, 387, 0, 0, 0,
165, 0, 386, 0, 0, 0, 200, 0, 0, 248,
0, 279, 155, 208, 206, 301, 170, 166, 164, 154,
187, 213, 247, 297, 241, 430, 203, 0, 0, 288,
222, 0, 0, 0, 0, 0, 421, 422, 0, 0,
0, 0, 0, 0, 0, 0, 191, 153, 131, 233,
289, 172, 66, 0, 0, 114, 115, 116, 408, 1045,
410, 411, 412, 413, 0, 0, 149, 409, 414, 415,
416, 0, 0, 0, 0, 384, 401, 0, 429, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 398, 399,
473, 0, 0, 0, 444, 0, 400, 0, 0, 393,
394, 396, 395, 397, 402, 0, 0, 0, 0, 0,
0, 0, 0, 0, 177, 443, 0, 0, 325, 0,
0, 441, 0, 259, 0, 293, 181, 199, 145, 196,
128, 140, 0, 179, 232, 266, 270, 0, 0, 0,
156, 0, 268, 245, 314, 0, 249, 267, 204, 303,
260, 313, 326, 327, 162, 226, 320, 298, 323, 335,
141, 159, 239, 294, 317, 285, 221, 300, 195, 284,
133, 296, 311, 150, 278, 0, 0, 0, 135, 309,
292, 219, 192, 193, 134, 0, 264, 163, 175, 158,
235, 306, 307, 157, 336, 142, 322, 137, 143, 321,
228, 302, 310, 220, 212, 136, 308, 218, 211, 198,
169, 183, 257, 207, 258, 184, 224, 223, 225, 0,
132, 0, 290, 318, 337, 147, 0, 0, 299, 331,
334, 0, 261, 148, 176, 168, 256, 174, 201, 330,
332, 333, 227, 144, 186, 286, 197, 205, 0, 0,
244, 269, 151, 316, 287, 431, 442, 437, 438, 435,
436, 0, 434, 433, 432, 445, 423, 424, 425, 426,
428, 0, 439, 440, 427, 127, 138, 202, 0, 262,
173, 319, 0, 0, 161, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 129, 130, 139,
146, 152, 160, 167, 171, 178, 182, 185, 188, 189,
190, 194, 210, 214, 215, 216, 217, 229, 230, 231,
234, 237, 238, 240, 242, 243, 246, 250, 251, 252,
253, 254, 255, 263, 265, 271, 272, 273, 274, 275,
276, 277, 280, 281, 282, 283, 291, 295, 304, 305,
315, 324, 328, 180, 312, 329, 454, 209, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 236,
0, 0, 0, 0, 387, 0, 0, 0, 165, 0,
386, 0, 0, 0, 200, 0, 0, 248, 0, 279,
155, 208, 206, 301, 170, 166, 164, 154, 187, 213,
247, 297, 241, 430, 203, 0, 0, 288, 222, 0,
0, 0, 0, 0, 421, 422, 0, 0, 0, 0,
0, 0, 0, 0, 191, 153, 131, 233, 289, 172,
66, 0, 0, 114, 115, 116, 408, 407, 410, 411,
412, 413, 0, 0, 149, 409, 414, 415, 416, 0,
0, 0, 0, 384, 401, 0, 429, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 398, 399, 0, 0,
0, 0, 444, 0, 400, 0, 0, 393, 394, 396,
395, 397, 402, 0, 0, 0, 0, 0, 0, 0,
0, 0, 177, 443, 0, 0, 325, 0, 0, 441,
0, 259, 0, 293, 181, 199, 145, 196, 128, 140,
0, 179, 232, 266, 270, 0, 0, 0, 156, 0,
268, 245, 314, 0, 249, 267, 204, 303, 260, 313,
326, 327, 162, 226, 320, 298, 323, 335, 141, 159,
239, 294, 317, 285, 221, 300, 195, 284, 133, 296,
311, 150, 278, 0, 0, 0, 135, 309, 292, 219,
192, 193, 134, 0, 264, 163, 175, 158, 235, 306,
307, 157, 336, 142, 322, 137, 143, 321, 228, 302,
310, 220, 212, 136, 308, 218, 211, 198, 169, 183,
257, 207, 258, 184, 224, 223, 225, 0, 132, 0,
290, 318, 337, 147, 0, 0, 299, 331, 334, 0,
261, 148, 176, 168, 256, 174, 201, 330, 332, 333,
227, 144, 186, 286, 197, 205, 0, 0, 244, 269,
151, 316, 287, 431, 442, 437, 438, 435, 436, 0,
434, 433, 432, 445, 423, 424, 425, 426, 428, 0,
439, 440, 427, 127, 138, 202, 0, 262, 173, 319,
0, 0, 161, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 129, 130, 139, 146, 152,
160, 167, 171, 178, 182, 185, 188, 189, 190, 194,
210, 214, 215, 216, 217, 229, 230, 231, 234, 237,
238, 240, 242, 243, 246, 250, 251, 252, 253, 254,
255, 263, 265, 271, 272, 273, 274, 275, 276, 277,
280, 281, 282, 283, 291, 295, 304, 305, 315, 324,
328, 180, 312, 329, 236, 209, 0, 0, 0, 387,
0, 0, 0, 165, 0, 386, 0, 0, 0, 200,
0, 0, 248, 0, 279, 155, 208, 206, 301, 170,
166, 164, 154, 187, 213, 247, 297, 241, 430, 203,
0, 0, 288, 222, 0, 0, 0, 0, 0, 421,
422, 0, 0, 0, 0, 0, 0, 0, 0, 191,
153, 131, 233, 289, 172, 66, 0, 0, 114, 115,
116, 408, 407, 410, 411, 412, 413, 0, 0, 149,
409, 414, 415, 416, 0, 0, 0, 0, 384, 401,
0, 429, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 398, 399, 0, 0, 0, 0, 444, 0, 400,
0, 0, 393, 394, 396, 395, 397, 402, 0, 0,
0, 0, 0, 0, 0, 0, 0, 177, 443, 0,
0, 325, 0, 0, 441, 0, 259, 0, 293, 181,
199, 145, 196, 128, 140, 0, 179, 232, 266, 270,
0, 0, 0, 156, 0, 268, 245, 314, 0, 249,
267, 204, 303, 260, 313, 326, 327, 162, 226, 320,
298, 323, 335, 141, 159, 239, 294, 317, 285, 221,
300, 195, 284, 133, 296, 311, 150, 278, 0, 0,
0, 135, 309, 292, 219, 192, 193, 134, 0, 264,
163, 175, 158, 235, 306, 307, 157, 336, 142, 322,
137, 143, 321, 228, 302, 310, 220, 212, 136, 308,
218, 211, 198, 169, 183, 257, 207, 258, 184, 224,
223, 225, 0, 132, 0, 290, 318, 337, 147, 0,
0, 299, 331, 334, 0, 261, 148, 176, 168, 256,
174, 201, 330, 332, 333, 227, 144, 186, 286, 197,
205, 0, 0, 244, 269, 151, 316, 287, 431, 442,
437, 438, 435, 436, 0, 434, 433, 432, 445, 423,
424, 425, 426, 428, 0, 439, 440, 427, 127, 138,
202, 0, 262, 173, 319, 0, 0, 161, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
129, 130, 139, 146, 152, 160, 167, 171, 178, 182,
185, 188, 189, 190, 194, 210, 214, 215, 216, 217,
229, 230, 231, 234, 237, 238, 240, 242, 243, 246,
250, 251, 252, 253, 254, 255, 263, 265, 271, 272,
273, 274, 275, 276, 277, 280, 281, 282, 283, 291,
295, 304, 305, 315, 324, 328, 180, 312, 329, 236,
209, 0, 0, 0, 0, 0, 0, 0, 165, 0,
0, 0, 0, 0, 200, 0, 0, 248, 0, 279,
155, 208, 206, 301, 170, 166, 164, 154, 187, 213,
247, 297, 241, 430, 203, 0, 0, 288, 222, 0,
0, 0, 0, 0, 421, 422, 0, 0, 0, 0,
0, 0, 0, 0, 191, 153, 131, 233, 289, 172,
66, 0, 0, 114, 115, 116, 408, 407, 410, 411,
412, 413, 0, 0, 149, 409, 414, 415, 416, 0,
0, 0, 0, 0, 401, 0, 429, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 398, 399, 0, 0,
0, 0, 444, 0, 400, 0, 0, 393, 394, 396,
395, 397, 402, 0, 0, 0, 0, 0, 0, 0,
0, 0, 177, 443, 0, 0, 325, 0, 0, 441,
0, 259, 0, 293, 181, 199, 145, 196, 128, 140,
0, 179, 232, 266, 270, 0, 0, 0, 156, 0,
268, 245, 314, 1818, 249, 267, 204, 303, 260, 313,
326, 327, 162, 226, 320, 298, 323, 335, 141, 159,
239, 294, 317, 285, 221, 300, 195, 284, 133, 296,
311, 150, 278, 0, 0, 0, 135, 309, 292, 219,
192, 193, 134, 0, 264, 163, 175, 158, 235, 306,
307, 157, 336, 142, 322, 137, 143, 321, 228, 302,
310, 220, 212, 136, 308, 218, 211, 198, 169, 183,
257, 207, 258, 184, 224, 223, 225, 0, 132, 0,
290, 318, 337, 147, 0, 0, 299, 331, 334, 0,
261, 148, 176, 168, 256, 174, 201, 330, 332, 333,
227, 144, 186, 286, 197, 205, 0, 0, 244, 269,
151, 316, 287, 431, 442, 437, 438, 435, 436, 0,
434, 433, 432, 445, 423, 424, 425, 426, 428, 0,
439, 440, 427, 127, 138, 202, 0, 262, 173, 319,
0, 0, 161, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 129, 130, 139, 146, 152,
160, 167, 171, 178, 182, 185, 188, 189, 190, 194,
210, 214, 215, 216, 217, 229, 230, 231, 234, 237,
238, 240, 242, 243, 246, 250, 251, 252, 253, 254,
255, 263, 265, 271, 272, 273, 274, 275, 276, 277,
280, 281, 282, 283, 291, 295, 304, 305, 315, 324,
328, 180, 312, 329, 236, 209, 0, 0, 0, 0,
0, 0, 0, 165, 0, 0, 0, 0, 0, 200,
0, 0, 248, 0, 279, 155, 208, 206, 301, 170,
166, 164, 154, 187, 213, 247, 297, 241, 430, 203,
0, 0, 288, 222, 0, 0, 0, 0, 0, 421,
422, 0, 0, 0, 0, 0, 0, 0, 0, 191,
153, 131, 233, 289, 172, 66, 0, 461, 114, 115,
116, 408, 407, 410, 411, 412, 413, 0, 0, 149,
409, 414, 415, 416, 0, 0, 0, 0, 0, 401,
0, 429, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 398, 399, 0, 0, 0, 0, 444, 0, 400,
0, 0, 393, 394, 396, 395, 397, 402, 0, 0,
0, 0, 0, 0, 0, 0, 0, 177, 443, 0,
0, 325, 0, 0, 441, 0, 259, 0, 293, 181,
199, 145, 196, 128, 140, 0, 179, 232, 266, 270,
0, 0, 0, 156, 0, 268, 245, 314, 0, 249,
267, 204, 303, 260, 313, 326, 327, 162, 226, 320,
298, 323, 335, 141, 159, 239, 294, 317, 285, 221,
300, 195, 284, 133, 296, 311, 150, 278, 0, 0,
0, 135, 309, 292, 219, 192, 193, 134, 0, 264,
163, 175, 158, 235, 306, 307, 157, 336, 142, 322,
137, 143, 321, 228, 302, 310, 220, 212, 136, 308,
218, 211, 198, 169, 183, 257, 207, 258, 184, 224,
223, 225, 0, 132, 0, 290, 318, 337, 147, 0,
0, 299, 331, 334, 0, 261, 148, 176, 168, 256,
174, 201, 330, 332, 333, 227, 144, 186, 286, 197,
205, 0, 0, 244, 269, 151, 316, 287, 431, 442,
437, 438, 435, 436, 0, 434, 433, 432, 445, 423,
424, 425, 426, 428, 0, 439, 440, 427, 127, 138,
202, 0, 262, 173, 319, 0, 0, 161, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
129, 130, 139, 146, 152, 160, 167, 171, 178, 182,
185, 188, 189, 190, 194, 210, 214, 215, 216, 217,
229, 230, 231, 234, 237, 238, 240, 242, 243, 246,
250, 251, 252, 253, 254, 255, 263, 265, 271, 272,
273, 274, 275, 276, 277, 280, 281, 282, 283, 291,
295, 304, 305, 315, 324, 328, 180, 312, 329, 236,
209, 0, 0, 0, 0, 0, 0, 0, 165, 0,
0, 0, 0, 0, 200, 0, 0, 248, 0, 279,
155, 208, 206, 301, 170, 166, 164, 154, 187, 213,
247, 297, 241, 430, 203, 0, 0, 288, 222, 0,
0, 0, 0, 0, 421, 422, 0, 0, 0, 0,
0, 0, 0, 0, 191, 153, 131, 233, 289, 172,
66, 0, 0, 114, 115, 116, 408, 407, 410, 411,
412, 413, 0, 0, 149, 409, 414, 415, 416, 0,
0, 0, 0, 0, 401, 0, 429, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 398, 399, 0, 0,
0, 0, 444, 0, 400, 0, 0, 393, 394, 396,
395, 397, 402, 0, 0, 0, 0, 0, 0, 0,
0, 0, 177, 443, 0, 0, 325, 0, 0, 441,
0, 259, 0, 293, 181, 199, 145, 196, 128, 140,
0, 179, 232, 266, 270, 0, 0, 0, 156, 0,
268, 245, 314, 0, 249, 267, 204, 303, 260, 313,
326, 327, 162, 226, 320, 298, 323, 335, 141, 159,
239, 294, 317, 285, 221, 300, 195, 284, 133, 296,
311, 150, 278, 0, 0, 0, 135, 309, 292, 219,
192, 193, 134, 0, 264, 163, 175, 158, 235, 306,
307, 157, 336, 142, 322, 137, 143, 321, 228, 302,
310, 220, 212, 136, 308, 218, 211, 198, 169, 183,
257, 207, 258, 184, 224, 223, 225, 0, 132, 0,
290, 318, 337, 147, 0, 0, 299, 331, 334, 0,
261, 148, 176, 168, 256, 174, 201, 330, 332, 333,
227, 144, 186, 286, 197, 205, 0, 0, 244, 269,
151, 316, 287, 431, 442, 437, 438, 435, 436, 0,
434, 433, 432, 445, 423, 424, 425, 426, 428, 0,
439, 440, 427, 127, 138, 202, 0, 262, 173, 319,
0, 0, 161, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 129, 130, 139, 146, 152,
160, 167, 171, 178, 182, 185, 188, 189, 190, 194,
210, 214, 215, 216, 217, 229, 230, 231, 234, 237,
238, 240, 242, 243, 246, 250, 251, 252, 253, 254,
255, 263, 265, 271, 272, 273, 274, 275, 276, 277,
280, 281, 282, 283, 291, 295, 304, 305, 315, 324,
328, 180, 312, 329, 236, 209, 0, 0, 0, 0,
0, 0, 0, 165, 0, 0, 0, 0, 0, 200,
0, 0, 248, 0, 279, 155, 208, 206, 301, 170,
166, 164, 154, 187, 213, 247, 297, 241, 0, 203,
0, 0, 288, 222, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
153, 131, 233, 289, 172, 0, 0, 0, 114, 115,
116, 0, 0, 0, 0, 0, 0, 0, 0, 149,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 722, 721, 731,
732, 724, 725, 726, 727, 728, 729, 730, 723, 0,
0, 733, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 177, 0, 0,
0, 325, 0, 0, 0, 0, 259, 0, 293, 181,
199, 145, 196, 128, 140, 0, 179, 232, 266, 270,
0, 0, 0, 156, 0, 268, 245, 314, 0, 249,
267, 204, 303, 260, 313, 326, 327, 162, 226, 320,
298, 323, 335, 141, 159, 239, 294, 317, 285, 221,
300, 195, 284, 133, 296, 311, 150, 278, 0, 0,
0, 135, 309, 292, 219, 192, 193, 134, 0, 264,
163, 175, 158, 235, 306, 307, 157, 336, 142, 322,
137, 143, 321, 228, 302, 310, 220, 212, 136, 308,
218, 211, 198, 169, 183, 257, 207, 258, 184, 224,
223, 225, 0, 132, 0, 290, 318, 337, 147, 0,
0, 299, 331, 334, 0, 261, 148, 176, 168, 256,
174, 201, 330, 332, 333, 227, 144, 186, 286, 197,
205, 0, 0, 244, 269, 151, 316, 287, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 127, 138,
202, 0, 262, 173, 319, 0, 0, 161, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
129, 130, 139, 146, 152, 160, 167, 171, 178, 182,
185, 188, 189, 190, 194, 210, 214, 215, 216, 217,
229, 230, 231, 234, 237, 238, 240, 242, 243, 246,
250, 251, 252, 253, 254, 255, 263, 265, 271, 272,
273, 274, 275, 276, 277, 280, 281, 282, 283, 291,
295, 304, 305, 315, 324, 328, 180, 312, 329, 236,
209, 0, 0, 822, 0, 0, 0, 0, 165, 0,
0, 0, 0, 0, 200, 0, 0, 248, 0, 279,
155, 208, 206, 301, 170, 166, 164, 154, 187, 213,
247, 297, 241, 0, 203, 0, 0, 288, 222, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 191, 153, 131, 233, 289, 172,
0, 0, 0, 114, 115, 116, 0, 824, 0, 0,
0, 0, 0, 0, 149, 0, 0, 0, 0, 0,
711, 712, 710, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 713, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 177, 0, 0, 0, 325, 0, 0, 0,
0, 259, 0, 293, 181, 199, 145, 196, 128, 140,
0, 179, 232, 266, 270, 0, 0, 0, 156, 0,
268, 245, 314, 0, 249, 267, 204, 303, 260, 313,
326, 327, 162, 226, 320, 298, 323, 335, 141, 159,
239, 294, 317, 285, 221, 300, 195, 284, 133, 296,
311, 150, 278, 0, 0, 0, 135, 309, 292, 219,
192, 193, 134, 0, 264, 163, 175, 158, 235, 306,
307, 157, 336, 142, 322, 137, 143, 321, 228, 302,
310, 220, 212, 136, 308, 218, 211, 198, 169, 183,
257, 207, 258, 184, 224, 223, 225, 0, 132, 0,
290, 318, 337, 147, 0, 0, 299, 331, 334, 0,
261, 148, 176, 168, 256, 174, 201, 330, 332, 333,
227, 144, 186, 286, 197, 205, 0, 0, 244, 269,
151, 316, 287, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 127, 138, 202, 0, 262, 173, 319,
0, 0, 161, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 129, 130, 139, 146, 152,
160, 167, 171, 178, 182, 185, 188, 189, 190, 194,
210, 214, 215, 216, 217, 229, 230, 231, 234, 237,
238, 240, 242, 243, 246, 250, 251, 252, 253, 254,
255, 263, 265, 271, 272, 273, 274, 275, 276, 277,
280, 281, 282, 283, 291, 295, 304, 305, 315, 324,
328, 180, 312, 329, 236, 209, 0, 0, 0, 0,
0, 0, 0, 165, 1167, 0, 0, 0, 0, 200,
0, 0, 248, 0, 279, 155, 208, 206, 301, 170,
166, 164, 154, 187, 213, 247, 297, 241, 0, 203,
0, 0, 288, 222, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
153, 131, 233, 289, 172, 0, 0, 0, 114, 115,
116, 0, 0, 0, 0, 0, 0, 0, 0, 149,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 177, 0, 0,
1166, 325, 0, 0, 0, 1162, 1159, 0, 1160, 1161,
199, 626, 196, 128, 140, 1157, 1164, 232, 266, 270,
0, 0, 0, 156, 0, 268, 245, 314, 0, 249,
267, 204, 303, 260, 313, 326, 327, 162, 226, 320,
298, 323, 335, 141, 159, 239, 294, 317, 285, 221,
300, 195, 284, 133, 296, 311, 150, 278, 0, 0,
0, 135, 309, 292, 219, 192, 193, 134, 0, 264,
163, 175, 158, 235, 306, 307, 157, 336, 142, 322,
137, 143, 321, 228, 302, 310, 220, 212, 136, 308,
218, 211, 198, 169, 183, 257, 207, 258, 184, 224,
223, 225, 0, 132, 0, 290, 318, 337, 147, 0,
0, 299, 331, 334, 0, 261, 148, 176, 168, 256,
174, 201, 330, 332, 333, 227, 144, 186, 286, 197,
205, 0, 0, 244, 269, 151, 316, 287, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 127, 138,
202, 0, 262, 173, 319, 0, 0, 161, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
129, 130, 139, 146, 152, 160, 167, 171, 178, 182,
185, 188, 189, 190, 194, 210, 214, 215, 216, 217,
229, 230, 231, 234, 237, 238, 240, 242, 243, 246,
250, 251, 252, 253, 254, 255, 263, 265, 271, 272,
273, 274, 275, 276, 277, 280, 281, 282, 283, 291,
295, 304, 305, 315, 324, 328, 180, 312, 329, 33,
209, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 236, 0, 0, 0, 0, 0, 0, 0,
0, 165, 0, 0, 0, 0, 0, 200, 0, 0,
248, 0, 279, 155, 208, 206, 301, 170, 166, 164,
154, 187, 213, 247, 297, 241, 0, 203, 0, 0,
288, 222, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 191, 153, 131,
233, 289, 172, 66, 0, 461, 114, 115, 116, 0,
0, 0, 0, 0, 0, 0, 0, 149, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 177, 0, 0, 0, 325,
0, 0, 0, 0, 259, 0, 293, 181, 199, 145,
196, 128, 140, 0, 179, 232, 266, 270, 0, 0,
0, 156, 0, 268, 245, 314, 0, 249, 267, 204,
303, 260, 313, 326, 327, 162, 226, 320, 298, 323,
335, 141, 159, 239, 294, 317, 285, 221, 300, 195,
284, 133, 296, 311, 150, 278, 0, 0, 0, 135,
309, 292, 219, 192, 193, 134, 0, 264, 163, 175,
158, 235, 306, 307, 157, 336, 142, 322, 137, 143,
321, 228, 302, 310, 220, 212, 136, 308, 218, 211,
198, 169, 183, 257, 207, 258, 184, 224, 223, 225,
0, 132, 0, 290, 318, 337, 147, 0, 0, 299,
331, 334, 0, 261, 148, 176, 168, 256, 174, 201,
330, 332, 333, 227, 144, 186, 286, 197, 205, 0,
0, 244, 269, 151, 316, 287, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 127, 138, 202, 0,
262, 173, 319, 0, 0, 161, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 129, 130,
139, 146, 152, 160, 167, 171, 178, 182, 185, 188,
189, 190, 194, 210, 214, 215, 216, 217, 229, 230,
231, 234, 237, 238, 240, 242, 243, 246, 250, 251,
252, 253, 254, 255, 263, 265, 271, 272, 273, 274,
275, 276, 277, 280, 281, 282, 283, 291, 295, 304,
305, 315, 324, 328, 180, 312, 329, 236, 209, 0,
0, 1077, 0, 0, 0, 0, 165, 0, 0, 0,
0, 0, 200, 0, 0, 248, 0, 279, 155, 208,
206, 301, 170, 166, 164, 154, 187, 213, 247, 297,
241, 0, 203, 0, 0, 288, 222, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 191, 153, 131, 233, 289, 172, 0, 0,
0, 114, 115, 116, 0, 1079, 0, 0, 0, 0,
0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
177, 0, 0, 0, 325, 0, 0, 0, 0, 259,
0, 293, 181, 199, 145, 196, 128, 140, 0, 179,
232, 266, 270, 0, 0, 0, 156, 0, 268, 245,
314, 0, 249, 267, 204, 303, 260, 313, 326, 327,
162, 226, 320, 298, 323, 335, 141, 159, 239, 294,
317, 285, 221, 300, 195, 284, 133, 296, 311, 150,
278, 0, 0, 0, 135, 309, 292, 219, 192, 193,
134, 0, 264, 163, 175, 158, 235, 306, 307, 157,
336, 142, 322, 137, 143, 321, 228, 302, 310, 220,
212, 136, 308, 218, 211, 198, 169, 183, 257, 207,
258, 184, 224, 223, 225, 0, 132, 0, 290, 318,
337, 147, 0, 0, 299, 331, 334, 0, 261, 148,
176, 168, 256, 174, 201, 330, 332, 333, 227, 144,
186, 286, 197, 205, 0, 0, 244, 269, 151, 316,
287, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 127, 138, 202, 0, 262, 173, 319, 0, 0,
161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 129, 130, 139, 146, 152, 160, 167,
171, 178, 182, 185, 188, 189, 190, 194, 210, 214,
215, 216, 217, 229, 230, 231, 234, 237, 238, 240,
242, 243, 246, 250, 251, 252, 253, 254, 255, 263,
265, 271, 272, 273, 274, 275, 276, 277, 280, 281,
282, 283, 291, 295, 304, 305, 315, 324, 328, 180,
312, 329, 33, 209, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 236, 0, 0, 0, 0,
0, 0, 0, 0, 165, 0, 0, 0, 0, 0,
200, 0, 0, 248, 0, 279, 155, 208, 206, 301,
170, 166, 164, 154, 187, 213, 247, 297, 241, 0,
203, 0, 0, 288, 222, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
191, 153, 131, 233, 289, 172, 66, 0, 0, 114,
115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
149, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 177, 0,
0, 0, 325, 0, 0, 0, 0, 259, 0, 293,
181, 199, 145, 196, 128, 140, 0, 179, 232, 266,
270, 0, 0, 0, 156, 0, 268, 245, 314, 0,
249, 267, 204, 303, 260, 313, 326, 327, 162, 226,
320, 298, 323, 335, 141, 159, 239, 294, 317, 285,
221, 300, 195, 284, 133, 296, 311, 150, 278, 0,
0, 0, 135, 309, 292, 219, 192, 193, 134, 0,
264, 163, 175, 158, 235, 306, 307, 157, 336, 142,
322, 137, 143, 321, 228, 302, 310, 220, 212, 136,
308, 218, 211, 198, 169, 183, 257, 207, 258, 184,
224, 223, 225, 0, 132, 0, 290, 318, 337, 147,
0, 0, 299, 331, 334, 0, 261, 148, 176, 168,
256, 174, 201, 330, 332, 333, 227, 144, 186, 286,
197, 205, 0, 0, 244, 269, 151, 316, 287, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
138, 202, 0, 262, 173, 319, 0, 0, 161, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 129, 130, 139, 146, 152, 160, 167, 171, 178,
182, 185, 188, 189, 190, 194, 210, 214, 215, 216,
217, 229, 230, 231, 234, 237, 238, 240, 242, 243,
246, 250, 251, 252, 253, 254, 255, 263, 265, 271,
272, 273, 274, 275, 276, 277, 280, 281, 282, 283,
291, 295, 304, 305, 315, 324, 328, 180, 312, 329,
236, 209, 0, 0, 0, 0, 0, 0, 0, 165,
0, 0, 0, 0, 0, 200, 0, 0, 248, 0,
279, 155, 208, 206, 301, 170, 166, 164, 154, 187,
213, 247, 297, 241, 0, 203, 0, 0, 288, 222,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 191, 153, 131, 233, 289,
172, 0, 0, 0, 114, 115, 116, 0, 0, 1095,
0, 0, 1096, 0, 0, 149, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 177, 0, 0, 0, 325, 0, 0,
0, 0, 259, 0, 293, 181, 199, 145, 196, 128,
140, 0, 179, 232, 266, 270, 0, 0, 0, 156,
0, 268, 245, 314, 0, 249, 267, 204, 303, 260,
313, 326, 327, 162, 226, 320, 298, 323, 335, 141,
159, 239, 294, 317, 285, 221, 300, 195, 284, 133,
296, 311, 150, 278, 0, 0, 0, 135, 309, 292,
219, 192, 193, 134, 0, 264, 163, 175, 158, 235,
306, 307, 157, 336, 142, 322, 137, 143, 321, 228,
302, 310, 220, 212, 136, 308, 218, 211, 198, 169,
183, 257, 207, 258, 184, 224, 223, 225, 0, 132,
0, 290, 318, 337, 147, 0, 0, 299, 331, 334,
0, 261, 148, 176, 168, 256, 174, 201, 330, 332,
333, 227, 144, 186, 286, 197, 205, 0, 0, 244,
269, 151, 316, 287, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 127, 138, 202, 0, 262, 173,
319, 0, 0, 161, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 129, 130, 139, 146,
152, 160, 167, 171, 178, 182, 185, 188, 189, 190,
194, 210, 214, 215, 216, 217, 229, 230, 231, 234,
237, 238, 240, 242, 243, 246, 250, 251, 252, 253,
254, 255, 263, 265, 271, 272, 273, 274, 275, 276,
277, 280, 281, 282, 283, 291, 295, 304, 305, 315,
324, 328, 180, 312, 329, 236, 209, 0, 0, 1077,
0, 0, 0, 0, 165, 0, 0, 0, 0, 0,
200, 0, 0, 248, 0, 279, 155, 208, 206, 301,
170, 166, 164, 154, 187, 213, 247, 297, 241, 0,
203, 0, 0, 288, 222, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
191, 153, 131, 233, 289, 172, 0, 0, 0, 114,
115, 116, 0, 1079, 0, 0, 0, 0, 0, 0,
149, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 177, 0,
0, 0, 325, 0, 0, 0, 0, 259, 0, 293,
181, 199, 145, 196, 128, 140, 0, 179, 232, 266,
270, 0, 0, 0, 156, 0, 268, 245, 314, 0,
1075, 267, 204, 303, 260, 313, 326, 327, 162, 226,
320, 298, 323, 335, 141, 159, 239, 294, 317, 285,
221, 300, 195, 284, 133, 296, 311, 150, 278, 0,
0, 0, 135, 309, 292, 219, 192, 193, 134, 0,
264, 163, 175, 158, 235, 306, 307, 157, 336, 142,
322, 137, 143, 321, 228, 302, 310, 220, 212, 136,
308, 218, 211, 198, 169, 183, 257, 207, 258, 184,
224, 223, 225, 0, 132, 0, 290, 318, 337, 147,
0, 0, 299, 331, 334, 0, 261, 148, 176, 168,
256, 174, 201, 330, 332, 333, 227, 144, 186, 286,
197, 205, 0, 0, 244, 269, 151, 316, 287, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
138, 202, 0, 262, 173, 319, 0, 0, 161, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 129, 130, 139, 146, 152, 160, 167, 171, 178,
182, 185, 188, 189, 190, 194, 210, 214, 215, 216,
217, 229, 230, 231, 234, 237, 238, 240, 242, 243,
246, 250, 251, 252, 253, 254, 255, 263, 265, 271,
272, 273, 274, 275, 276, 277, 280, 281, 282, 283,
291, 295, 304, 305, 315, 324, 328, 180, 312, 329,
236, 209, 0, 0, 0, 0, 0, 0, 0, 165,
0, 855, 0, 0, 0, 200, 0, 0, 248, 0,
279, 155, 208, 206, 301, 170, 166, 164, 154, 187,
213, 247, 297, 241, 0, 203, 0, 0, 288, 222,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 191, 153, 131, 233, 289,
172, 0, 0, 0, 114, 115, 116, 0, 854, 0,
0, 0, 0, 0, 0, 149, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 177, 0, 0, 0, 325, 0, 0,
0, 0, 259, 0, 293, 181, 199, 145, 196, 128,
140, 0, 179, 232, 266, 270, 0, 0, 0, 156,
0, 268, 245, 314, 0, 249, 267, 204, 303, 260,
313, 326, 327, 162, 226, 320, 298, 323, 335, 141,
159, 239, 294, 317, 285, 221, 300, 195, 284, 133,
296, 311, 150, 278, 0, 0, 0, 135, 309, 292,
219, 192, 193, 134, 0, 264, 163, 175, 158, 235,
306, 307, 157, 336, 142, 322, 137, 143, 321, 228,
302, 310, 220, 212, 136, 308, 218, 211, 198, 169,
183, 257, 207, 258, 184, 224, 223, 225, 0, 132,
0, 290, 318, 337, 147, 0, 0, 299, 331, 334,
0, 261, 148, 176, 168, 256, 174, 201, 330, 332,
333, 227, 144, 186, 286, 197, 205, 0, 0, 244,
269, 151, 316, 287, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 127, 138, 202, 0, 262, 173,
319, 0, 0, 161, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 129, 130, 139, 146,
152, 160, 167, 171, 178, 182, 185, 188, 189, 190,
194, 210, 214, 215, 216, 217, 229, 230, 231, 234,
237, 238, 240, 242, 243, 246, 250, 251, 252, 253,
254, 255, 263, 265, 271, 272, 273, 274, 275, 276,
277, 280, 281, 282, 283, 291, 295, 304, 305, 315,
324, 328, 180, 312, 329, 236, 209, 0, 0, 0,
0, 0, 0, 0, 165, 0, 0, 0, 0, 0,
200, 0, 0, 248, 0, 279, 155, 208, 206, 301,
170, 166, 164, 154, 187, 213, 247, 297, 241, 0,
203, 0, 0, 288, 222, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
191, 153, 131, 233, 289, 172, 0, 0, 0, 114,
115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
149, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 620, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 177, 0,
0, 0, 325, 0, 0, 0, 0, 259, 0, 293,
181, 199, 626, 196, 128, 140, 624, 179, 232, 266,
270, 0, 0, 0, 156, 0, 268, 245, 314, 0,
249, 267, 204, 303, 260, 313, 326, 327, 162, 226,
320, 298, 323, 335, 141, 159, 239, 294, 317, 285,
221, 300, 195, 284, 133, 296, 311, 150, 278, 0,
0, 0, 135, 309, 292, 219, 192, 193, 134, 0,
264, 163, 175, 158, 235, 306, 307, 157, 336, 142,
322, 137, 143, 321, 228, 302, 310, 220, 212, 136,
308, 218, 211, 198, 169, 183, 257, 207, 258, 184,
224, 223, 225, 0, 132, 0, 290, 318, 337, 147,
0, 0, 299, 331, 334, 0, 261, 148, 176, 168,
256, 174, 201, 330, 332, 333, 227, 144, 186, 286,
197, 205, 0, 0, 244, 269, 151, 316, 287, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
138, 202, 0, 262, 173, 319, 0, 0, 161, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 129, 130, 139, 146, 152, 160, 167, 171, 178,
182, 185, 188, 189, 190, 194, 210, 214, 215, 216,
217, 229, 230, 231, 234, 237, 238, 240, 242, 243,
246, 250, 251, 252, 253, 254, 255, 263, 265, 271,
272, 273, 274, 275, 276, 277, 280, 281, 282, 283,
291, 295, 304, 305, 315, 324, 328, 180, 312, 329,
236, 209, 0, 0, 0, 0, 0, 0, 0, 165,
0, 0, 0, 0, 0, 200, 0, 0, 248, 0,
279, 155, 208, 206, 301, 170, 166, 164, 154, 187,
213, 247, 297, 241, 0, 203, 0, 0, 288, 222,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 191, 153, 131, 233, 289,
172, 0, 0, 461, 114, 115, 116, 0, 0, 0,
0, 0, 0, 0, 0, 149, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 177, 0, 0, 0, 325, 0, 0,
0, 0, 259, 0, 293, 181, 199, 145, 196, 128,
140, 0, 179, 232, 266, 270, 0, 0, 0, 156,
0, 268, 245, 314, 0, 249, 267, 204, 303, 260,
313, 326, 327, 162, 226, 320, 298, 323, 335, 141,
159, 239, 294, 317, 285, 221, 300, 195, 284, 133,
296, 311, 150, 278, 0, 0, 0, 135, 309, 292,
219, 192, 193, 134, 0, 264, 163, 175, 158, 235,
306, 307, 157, 336, 142, 322, 137, 143, 321, 228,
302, 310, 220, 212, 136, 308, 218, 211, 198, 169,
183, 257, 207, 258, 184, 224, 223, 225, 0, 132,
0, 290, 318, 337, 147, 0, 0, 299, 331, 334,
0, 261, 148, 176, 168, 256, 174, 201, 330, 332,
333, 227, 144, 186, 286, 197, 205, 0, 0, 244,
269, 151, 316, 287, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 127, 138, 202, 0, 262, 173,
319, 0, 0, 161, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 129, 130, 139, 146,
152, 160, 167, 171, 178, 182, 185, 188, 189, 190,
194, 210, 214, 215, 216, 217, 229, 230, 231, 234,
237, 238, 240, 242, 243, 246, 250, 251, 252, 253,
254, 255, 263, 265, 271, 272, 273, 274, 275, 276,
277, 280, 281, 282, 283, 291, 295, 304, 305, 315,
324, 328, 180, 312, 329, 236, 209, 0, 0, 0,
0, 0, 0, 0, 165, 0, 0, 0, 0, 0,
200, 0, 0, 248, 0, 279, 155, 208, 206, 301,
170, 166, 164, 154, 187, 213, 247, 297, 241, 0,
203, 0, 0, 288, 222, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
191, 153, 131, 233, 289, 172, 66, 0, 0, 114,
115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
149, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 177, 0,
0, 0, 325, 0, 0, 0, 0, 259, 0, 293,
181, 199, 145, 196, 128, 140, 0, 179, 232, 266,
270, 0, 0, 0, 156, 0, 268, 245, 314, 0,
249, 267, 204, 303, 260, 313, 326, 327, 162, 226,
320, 298, 323, 335, 141, 159, 239, 294, 317, 285,
221, 300, 195, 284, 133, 296, 311, 150, 278, 0,
0, 0, 135, 309, 292, 219, 192, 193, 134, 0,
264, 163, 175, 158, 235, 306, 307, 157, 336, 142,
322, 137, 143, 321, 228, 302, 310, 220, 212, 136,
308, 218, 211, 198, 169, 183, 257, 207, 258, 184,
224, 223, 225, 0, 132, 0, 290, 318, 337, 147,
0, 0, 299, 331, 334, 0, 261, 148, 176, 168,
256, 174, 201, 330, 332, 333, 227, 144, 186, 286,
197, 205, 0, 0, 244, 269, 151, 316, 287, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
138, 202, 0, 262, 173, 319, 0, 0, 161, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 129, 130, 139, 146, 152, 160, 167, 171, 178,
182, 185, 188, 189, 190, 194, 210, 214, 215, 216,
217, 229, 230, 231, 234, 237, 238, 240, 242, 243,
246, 250, 251, 252, 253, 254, 255, 263, 265, 271,
272, 273, 274, 275, 276, 277, 280, 281, 282, 283,
291, 295, 304, 305, 315, 324, 328, 180, 312, 329,
236, 209, 0, 0, 0, 0, 0, 0, 0, 165,
0, 0, 0, 0, 0, 200, 0, 0, 248, 0,
279, 155, 208, 206, 301, 170, 166, 164, 154, 187,
213, 247, 297, 241, 0, 203, 0, 0, 288, 222,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 191, 153, 131, 233, 289,
172, 0, 0, 0, 114, 115, 116, 0, 1079, 0,
0, 0, 0, 0, 0, 149, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 177, 0, 0, 0, 325, 0, 0,
0, 0, 259, 0, 293, 181, 199, 145, 196, 128,
140, 0, 179, 232, 266, 270, 0, 0, 0, 156,
0, 268, 245, 314, 0, 249, 267, 204, 303, 260,
313, 326, 327, 162, 226, 320, 298, 323, 335, 141,
159, 239, 294, 317, 285, 221, 300, 195, 284, 133,
296, 311, 150, 278, 0, 0, 0, 135, 309, 292,
219, 192, 193, 134, 0, 264, 163, 175, 158, 235,
306, 307, 157, 336, 142, 322, 137, 143, 321, 228,
302, 310, 220, 212, 136, 308, 218, 211, 198, 169,
183, 257, 207, 258, 184, 224, 223, 225, 0, 132,
0, 290, 318, 337, 147, 0, 0, 299, 331, 334,
0, 261, 148, 176, 168, 256, 174, 201, 330, 332,
333, 227, 144, 186, 286, 197, 205, 0, 0, 244,
269, 151, 316, 287, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 127, 138, 202, 0, 262, 173,
319, 0, 0, 161, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 129, 130, 139, 146,
152, 160, 167, 171, 178, 182, 185, 188, 189, 190,
194, 210, 214, 215, 216, 217, 229, 230, 231, 234,
237, 238, 240, 242, 243, 246, 250, 251, 252, 253,
254, 255, 263, 265, 271, 272, 273, 274, 275, 276,
277, 280, 281, 282, 283, 291, 295, 304, 305, 315,
324, 328, 180, 312, 329, 236, 209, 0, 0, 0,
0, 0, 0, 0, 165, 0, 0, 0, 0, 0,
200, 0, 0, 248, 0, 279, 155, 208, 206, 301,
170, 166, 164, 154, 187, 213, 247, 297, 241, 0,
203, 0, 0, 288, 222, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
191, 153, 131, 233, 289, 172, 0, 0, 0, 114,
115, 116, 0, 824, 0, 0, 0, 0, 0, 0,
149, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 177, 0,
0, 0, 325, 0, 0, 0, 0, 259, 0, 293,
181, 199, 145, 196, 128, 140, 0, 179, 232, 266,
270, 0, 0, 0, 156, 0, 268, 245, 314, 0,
249, 267, 204, 303, 260, 313, 326, 327, 162, 226,
320, 298, 323, 335, 141, 159, 239, 294, 317, 285,
221, 300, 195, 284, 133, 296, 311, 150, 278, 0,
0, 0, 135, 309, 292, 219, 192, 193, 134, 0,
264, 163, 175, 158, 235, 306, 307, 157, 336, 142,
322, 137, 143, 321, 228, 302, 310, 220, 212, 136,
308, 218, 211, 198, 169, 183, 257, 207, 258, 184,
224, 223, 225, 0, 132, 0, 290, 318, 337, 147,
0, 0, 299, 331, 334, 0, 261, 148, 176, 168,
256, 174, 201, 330, 332, 333, 227, 144, 186, 286,
197, 205, 0, 0, 244, 269, 151, 316, 287, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
138, 202, 0, 262, 173, 319, 0, 0, 161, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 129, 130, 139, 146, 152, 160, 167, 171, 178,
182, 185, 188, 189, 190, 194, 210, 214, 215, 216,
217, 229, 230, 231, 234, 237, 238, 240, 242, 243,
246, 250, 251, 252, 253, 254, 255, 263, 265, 271,
272, 273, 274, 275, 276, 277, 280, 281, 282, 283,
291, 295, 304, 305, 315, 324, 328, 180, 312, 329,
837, 209, 0, 0, 0, 0, 0, 236, 0, 0,
0, 0, 0, 0, 0, 0, 165, 0, 0, 0,
0, 0, 200, 0, 0, 248, 0, 279, 155, 208,
206, 301, 170, 166, 164, 154, 187, 213, 247, 297,
241, 0, 203, 0, 0, 288, 222, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 191, 153, 131, 233, 289, 172, 0, 0,
0, 114, 115, 116, 0, 0, 0, 0, 0, 0,
0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
177, 0, 0, 0, 325, 0, 0, 0, 0, 259,
0, 293, 181, 199, 145, 196, 128, 140, 0, 179,
232, 266, 270, 0, 0, 0, 156, 0, 268, 245,
314, 0, 249, 267, 204, 303, 260, 313, 326, 327,
162, 226, 320, 298, 323, 335, 141, 159, 239, 294,
317, 285, 221, 300, 195, 284, 133, 296, 311, 150,
278, 0, 0, 0, 135, 309, 292, 219, 192, 193,
134, 0, 264, 163, 175, 158, 235, 306, 307, 157,
336, 142, 322, 137, 143, 321, 228, 302, 310, 220,
212, 136, 308, 218, 211, 198, 169, 183, 257, 207,
258, 184, 224, 223, 225, 0, 132, 0, 290, 318,
337, 147, 0, 0, 299, 331, 334, 0, 261, 148,
176, 168, 256, 174, 201, 330, 332, 333, 227, 144,
186, 286, 197, 205, 0, 0, 244, 269, 151, 316,
287, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 127, 138, 202, 0, 262, 173, 319, 0, 0,
161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 129, 130, 139, 146, 152, 160, 167,
171, 178, 182, 185, 188, 189, 190, 194, 210, 214,
215, 216, 217, 229, 230, 231, 234, 237, 238, 240,
242, 243, 246, 250, 251, 252, 253, 254, 255, 263,
265, 271, 272, 273, 274, 275, 276, 277, 280, 281,
282, 283, 291, 295, 304, 305, 315, 324, 328, 180,
312, 329, 236, 209, 0, 0, 0, 0, 0, 0,
828, 165, 0, 0, 0, 0, 0, 200, 0, 0,
248, 0, 279, 155, 208, 206, 301, 170, 166, 164,
154, 187, 213, 247, 297, 241, 0, 203, 0, 0,
288, 222, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 191, 153, 131,
233, 289, 172, 0, 0, 0, 114, 115, 116, 0,
0, 0, 0, 0, 0, 0, 0, 149, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 177, 0, 0, 0, 325,
0, 0, 0, 0, 259, 0, 293, 181, 199, 145,
196, 128, 140, 0, 179, 232, 266, 270, 0, 0,
0, 156, 0, 268, 245, 314, 0, 249, 267, 204,
303, 260, 313, 326, 327, 162, 226, 320, 298, 323,
335, 141, 159, 239, 294, 317, 285, 221, 300, 195,
284, 133, 296, 311, 150, 278, 0, 0, 0, 135,
309, 292, 219, 192, 193, 134, 0, 264, 163, 175,
158, 235, 306, 307, 157, 336, 142, 322, 137, 143,
321, 228, 302, 310, 220, 212, 136, 308, 218, 211,
198, 169, 183, 257, 207, 258, 184, 224, 223, 225,
0, 132, 0, 290, 318, 337, 147, 0, 0, 299,
331, 334, 0, 261, 148, 176, 168, 256, 174, 201,
330, 332, 333, 227, 144, 186, 286, 197, 205, 0,
0, 244, 269, 151, 316, 287, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 127, 138, 202, 0,
262, 173, 319, 0, 0, 161, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 129, 130,
139, 146, 152, 160, 167, 171, 178, 182, 185, 188,
189, 190, 194, 210, 214, 215, 216, 217, 229, 230,
231, 234, 237, 238, 240, 242, 243, 246, 250, 251,
252, 253, 254, 255, 263, 265, 271, 272, 273, 274,
275, 276, 277, 280, 281, 282, 283, 291, 295, 304,
305, 315, 324, 328, 180, 312, 329, 236, 209, 0,
0, 0, 0, 0, 0, 0, 165, 0, 0, 0,
0, 0, 200, 0, 0, 248, 0, 279, 155, 208,
206, 301, 170, 166, 164, 154, 187, 213, 247, 297,
241, 0, 203, 0, 0, 288, 222, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 191, 153, 131, 233, 289, 172, 0, 0,
0, 114, 115, 116, 0, 702, 0, 0, 0, 0,
0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
177, 0, 0, 0, 325, 0, 0, 0, 0, 259,
0, 293, 181, 199, 145, 196, 128, 140, 0, 179,
232, 266, 270, 0, 0, 0, 156, 0, 268, 245,
314, 0, 249, 267, 204, 303, 260, 313, 326, 327,
162, 226, 320, 298, 323, 335, 141, 159, 239, 294,
317, 285, 221, 300, 195, 284, 133, 296, 311, 150,
278, 0, 0, 0, 135, 309, 292, 219, 192, 193,
134, 0, 264, 163, 175, 158, 235, 306, 307, 157,
336, 142, 322, 137, 143, 321, 228, 302, 310, 220,
212, 136, 308, 218, 211, 198, 169, 183, 257, 207,
258, 184, 224, 223, 225, 0, 132, 0, 290, 318,
337, 147, 0, 0, 299, 331, 334, 0, 261, 148,
176, 168, 256, 174, 201, 330, 332, 333, 227, 144,
186, 286, 197, 205, 0, 0, 244, 269, 151, 316,
287, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 127, 138, 202, 0, 262, 173, 319, 0, 0,
161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 129, 130, 139, 146, 152, 160, 167,
171, 178, 182, 185, 188, 189, 190, 194, 210, 214,
215, 216, 217, 229, 230, 231, 234, 237, 238, 240,
242, 243, 246, 250, 251, 252, 253, 254, 255, 263,
265, 271, 272, 273, 274, 275, 276, 277, 280, 281,
282, 283, 291, 295, 304, 305, 315, 324, 328, 180,
312, 329, 236, 209, 0, 0, 0, 0, 0, 0,
0, 165, 0, 0, 0, 0, 0, 200, 0, 0,
248, 0, 279, 155, 208, 206, 301, 170, 166, 164,
154, 187, 213, 247, 297, 241, 0, 203, 0, 0,
288, 222, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 191, 153, 131,
233, 289, 172, 0, 0, 0, 114, 115, 116, 0,
0, 0, 0, 0, 0, 0, 0, 149, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 377, 0, 177, 0, 0, 0, 325,
0, 0, 0, 0, 259, 0, 293, 181, 199, 145,
196, 128, 140, 0, 179, 232, 266, 270, 0, 0,
0, 156, 0, 268, 245, 314, 0, 249, 267, 204,
303, 260, 313, 326, 327, 162, 226, 320, 298, 323,
335, 141, 159, 239, 294, 317, 285, 221, 300, 195,
284, 133, 296, 311, 150, 278, 0, 0, 0, 135,
309, 292, 219, 192, 193, 134, 0, 264, 163, 175,
158, 235, 306, 307, 157, 336, 142, 322, 137, 143,
321, 228, 302, 310, 220, 212, 136, 308, 218, 211,
198, 169, 183, 257, 207, 258, 184, 224, 223, 225,
0, 132, 0, 290, 318, 337, 147, 0, 0, 299,
331, 334, 0, 261, 148, 176, 168, 256, 174, 201,
330, 332, 333, 227, 144, 186, 286, 197, 205, 0,
0, 244, 269, 151, 316, 287, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 127, 138, 202, 0,
262, 173, 319, 0, 0, 161, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 129, 130,
139, 146, 152, 160, 167, 171, 178, 182, 185, 188,
189, 190, 194, 210, 214, 215, 216, 217, 229, 230,
231, 234, 237, 238, 240, 242, 243, 246, 250, 251,
252, 253, 254, 255, 263, 265, 271, 272, 273, 274,
275, 276, 277, 280, 281, 282, 283, 291, 295, 304,
305, 315, 324, 328, 376, 312, 329, 236, 209, 0,
0, 0, 0, 0, 0, 0, 165, 0, 0, 0,
0, 0, 200, 0, 0, 248, 0, 279, 155, 208,
206, 301, 170, 166, 164, 154, 187, 213, 247, 297,
241, 0, 203, 0, 0, 288, 222, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 191, 153, 131, 233, 289, 172, 0, 0,
0, 114, 115, 116, 0, 0, 0, 0, 0, 0,
0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
177, 0, 122, 0, 325, 0, 0, 0, 0, 259,
0, 293, 181, 199, 145, 196, 128, 140, 0, 179,
232, 266, 270, 0, 0, 0, 156, 0, 268, 245,
314, 0, 249, 267, 204, 303, 260, 313, 326, 327,
162, 226, 320, 298, 323, 335, 141, 159, 239, 294,
317, 285, 221, 300, 195, 284, 133, 296, 311, 150,
278, 0, 0, 0, 135, 309, 292, 219, 192, 193,
134, 0, 264, 163, 175, 158, 235, 306, 307, 157,
336, 142, 322, 137, 143, 321, 228, 302, 310, 220,
212, 136, 308, 218, 211, 198, 169, 183, 257, 207,
258, 184, 224, 223, 225, 0, 132, 0, 290, 318,
337, 147, 0, 0, 299, 331, 334, 0, 261, 148,
176, 168, 256, 174, 201, 330, 332, 333, 227, 144,
186, 286, 197, 205, 0, 0, 244, 269, 151, 316,
287, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 127, 138, 202, 0, 262, 173, 319, 0, 0,
161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 129, 130, 139, 146, 152, 160, 167,
171, 178, 182, 185, 188, 189, 190, 194, 210, 214,
215, 216, 217, 229, 230, 231, 234, 237, 238, 240,
242, 243, 246, 250, 251, 252, 253, 254, 255, 263,
265, 271, 272, 273, 274, 275, 276, 277, 280, 281,
282, 283, 291, 295, 304, 305, 315, 324, 328, 180,
312, 329, 236, 209, 0, 0, 0, 0, 0, 0,
0, 165, 0, 0, 0, 0, 0, 200, 0, 0,
248, 0, 279, 155, 208, 206, 301, 170, 166, 164,
154, 187, 213, 247, 297, 241, 0, 203, 0, 0,
288, 222, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 191, 153, 131,
233, 289, 172, 0, 0, 0, 114, 115, 116, 0,
0, 0, 0, 0, 0, 0, 0, 149, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 177, 0, 0, 0, 325,
0, 0, 0, 0, 259, 0, 293, 181, 199, 145,
196, 128, 140, 0, 179, 232, 266, 270, 0, 0,
0, 156, 0, 268, 245, 314, 0, 249, 267, 204,
303, 260, 313, 326, 327, 162, 226, 320, 298, 323,
335, 141, 159, 239, 294, 317, 285, 221, 300, 195,
284, 133, 296, 311, 150, 278, 0, 0, 0, 135,
309, 292, 219, 192, 193, 134, 0, 264, 163, 175,
158, 235, 306, 307, 157, 336, 142, 322, 137, 143,
321, 228, 302, 310, 220, 212, 136, 308, 218, 211,
198, 169, 183, 257, 207, 258, 184, 224, 223, 225,
0, 132, 0, 290, 318, 337, 147, 0, 0, 299,
331, 334, 0, 261, 148, 176, 168, 256, 174, 201,
330, 332, 333, 227, 144, 186, 286, 197, 205, 0,
0, 244, 269, 151, 316, 287, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 127, 138, 202, 0,
262, 173, 319, 0, 0, 161, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 129, 130,
139, 146, 152, 160, 167, 171, 178, 182, 185, 188,
189, 190, 194, 210, 214, 215, 216, 217, 229, 230,
231, 234, 237, 238, 240, 242, 243, 246, 250, 251,
252, 253, 254, 255, 263, 265, 271, 272, 273, 274,
275, 276, 277, 280, 281, 282, 283, 291, 295, 304,
305, 315, 324, 328, 180, 312, 329, 0, 209,
}
var yyPact = [...]int{
221, -1000, -295, 1325, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, 1267, 988, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
397, 942, 97, 1168, -9, 664, 200, 50, 19578, 191,
1661, 19963, -1000, 59, -1000, 51, 19963, 55, 19193, -1000,
-1000, -1000, 11075, 1139, -67, -71, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, 1005, 1232, 1238, 1263, 751, 1347,
-1000, 9522, 9522, 167, 167, 167, 7982, -1000, -1000, 16106,
19963, 19963, 948, 174, 198, 174, -162, -1000, -1000, -1000,
-1000, -1000, -1000, 1168, -1000, -1000, 101, -1000, -1000, 19963,
19963, 290, 1168, 98, -1000, -1000, -1000, 19963, 170, 664,
170, 170, 19963, -1000, 243, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 19963, 664,
1163, 435, 117, 308, 308, 308, 308, -1000, 282, -1000,
5570, 92, 95, -31, 1282, 93, -11, -1000, 435, 5570,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 184, -1000,
-1000, -1000, -1000, 19963, 18808, 166, 401, -1000, -1000, -1000,
-1000, 718, 322, -1000, 11075, 920, 885, 885, -1000, -1000,
220, -1000, -1000, 12230, 12230, 12230, 12230, 12230, 12230, 12230,
12230, 12230, 12230, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, 885, 241, -1000,
10690, 885, 885, 885, 885, 885, 885, 885, 885, 11075,
885, 885, 885, 885, 885, 885, 885, 885, 885, 885,
885, 885, 885, 885, 885, 885, -1000, -1000, -1000, 19963,
-1000, 1267, -1000, 988, -1000, -1000, -1000, 1181, 11075, 11075,
1267, -1000, 1085, 9522, -1000, -1000, 1311, -1000, -1000, -1000,
-1000, 481, 1295, -1000, 13000, 239, 1293, 18423, -1000, 16876,
18038, 882, 7580, -64, -1000, -1000, -1000, 400, 15721, -1000,
-1000, -1000, 1162, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 851,
19963, -1000, -1000, 359, 664, -1000, 934, -1000, 849, -1000,
905, 87, 394, 19963, 419, 664, 664, -1000, -1000, -1000,
1161, 376, 127, 5570, 109, 140, 118, 19963, 1168, 1138,
881, 178, 19963, 1219, 1031, 19963, 664, -1000, 6776, -1000,
5570, 435, -1000, 636, 11075, 5570, 5570, 5570, 19963, 5570,
5570, -1000, 634, -1000, -1000, -1000, 461, -1000, -1000, -1000,
-1000, -1000, -1000, 5570, 5570, 451, 461, 451, -1000, -1000,
-1000, -1000, 11075, 308, -1000, 1014, -1000, -1000, 54, -1000,
-1000, -1000, -1000, -1000, 1325, -1000, -1000, -1000, -139, 11075,
11075, 11075, 11075, 532, 321, 12230, 558, 398, 12230, 12230,
12230, 12230, 12230, 12230, 12230, 12230, 12230, 12230, 12230, 12230,
12230, 12230, 12230, 652, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, 664, -1000, 1315, 971, 971, 264, 264, 264,
264, 264, 264, 264, 264, 264, 12615, 8367, 6776, 751,
841, 1267, 9522, 9522, 11075, 11075, 10292, 9907, 9522, 1164,
406, 322, 19963, -1000, -1000, 11845, -1000, -1000, -1000, -1000,
-1000, 642, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 19963,
19963, 9522, 9522, 9522, 9522, 9522, -1000, 880, -1000, -180,
15336, 1238, 751, 1311, 1199, 1318, 296, 706, 879, -1000,
671, 1238, 14951, 755, -1000, 1311, -1000, -1000, -1000, 19963,
-1000, -1000, 17646, -1000, -1000, 6374, 19963, 126, 19963, -1000,
868, 1246, -1000, -1000, -1000, 1227, 14566, 19963, 940, 909,
-1000, -1000, 238, 7178, -64, -1000, 7178, 776, -1000, -127,
-70, 8752, 263, -1000, -1000, -1000, -1000, 4766, 13385, 681,
559, -37, -1000, -1000, -1000, 905, -1000, 905, 905, 905,
905, 9, 9, 9, 9, -1000, -1000, -1000, -1000, -1000,
939, 938, -1000, 905, 905, 905, 905, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, 937, 937, 937, 912, 912, 160,
11075, 73, 19963, 1222, 566, 79, 393, 77, -1000, 1217,
1000, -1000, 376, 747, -1000, -1000, 598, 598, 319, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
129, -1000, 19963, 19963, 19963, 19963, 19963, 207, 104, 19963,
19963, 878, -1000, 19963, 5570, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, 322, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
19963, -1000, -1000, -1000, -1000, 435, 19963, 19963, 19963, 435,
322, -1000, 19963, 19963, -1000, -1000, -1000, -1000, -1000, 322,
321, 324, 389, -1000, -1000, 445, -1000, -1000, 1975, -1000,
-1000, -1000, -1000, 558, 12230, 12230, 12230, 329, 1975, 2013,
1333, 403, 264, 276, 276, 280, 280, 280, 280, 280,
1103, 1103, -1000, -1000, -1000, 642, -1000, -1000, -1000, 642,
9522, 9522, 876, 885, 237, -1000, 1005, -1000, -1000, 1238,
830, 830, 545, 601, 365, 1286, 830, 349, 1248, 830,
830, 9522, -1000, -1000, 431, -1000, 11075, 642, -1000, 236,
-1000, 1145, 854, 782, 830, 642, 642, 830, 830, 19963,
-1000, -289, -1000, -145, 257, 885, -1000, 17261, -1000, -1000,
1181, -1000, -1000, 1119, -1000, 1081, 11075, 11075, 11075, -1000,
-1000, -1000, 1181, 1243, -1000, 1097, 1095, 1274, 9522, 16876,
1311, -1000, -1000, -1000, 235, 1274, 1048, 885, -1000, 19963,
16876, 16876, 16876, 16876, 16876, -1000, 1062, 1059, -1000, 1058,
1042, 1043, 19963, -1000, 833, 751, 14566, 126, 779, 16876,
19963, -1000, -1000, 16876, 19963, 5972, -1000, 776, -64, -73,
-1000, -1000, -1000, -1000, 322, -1000, 732, 767, 4364, -1000,
-1000, -1000, -1000, 153, -1000, -1000, 935, 664, -1000, 1188,
327, 327, 309, 664, 1186, -1000, -1000, -1000, -1000, 1165,
-1000, 427, -39, -1000, -1000, 9, 9, -1000, -1000, 263,
1159, 263, 263, 263, 631, 631, -1000, -1000, -1000, -1000,
-1000, 563, -1000, -1000, -1000, 554, -1000, -1000, 934, 576,
1006, 73, -1000, 664, 376, 613, 1143, -1000, -1000, 662,
190, 63, 111, -1000, -1000, -1000, -1000, 1011, 19963, 727,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 19963,
-1000, -1000, -1000, -1000, -1000, 19963, 916, -1000, -1000, -1000,
-1000, 35, 107, 102, 177, -1000, 5570, -1000, 451, -1000,
-1000, -1000, 451, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
329, 1975, 1955, -1000, 12230, 12230, -1000, -1000, 830, 830,
9522, 6776, 1267, 1181, -1000, -1000, 71, 652, 71, 12230,
12230, -1000, 12230, 12230, -1000, -174, 761, 410, -1000, 11075,
531, -1000, 6776, -1000, 12230, 12230, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, -1000, 197, 195, 194, 19963, -1000,
-1000, 602, 612, 1074, 322, 322, -1000, -1000, 19963, -1000,
-1000, -1000, -1000, 1271, 11075, -1000, 758, -1000, 5168, 1238,
1009, 19963, 885, 1325, 13783, 19963, 926, -1000, 388, 1246,
992, 1008, 1228, -1000, -1000, -1000, -1000, 1044, -1000, 1015,
-1000, -1000, -1000, -1000, -1000, 751, 1274, 16876, 861, -1000,
861, -1000, 223, -1000, -1000, -1000, -131, -117, -1000, -1000,
-1000, 4766, -1000, 4766, -1000, 19963, 149, -1000, 664, 664,
664, -1000, -1000, -1000, 932, 1004, 12230, -1000, -1000, -1000,
263, 263, -1000, 335, -1000, -1000, -1000, 824, -1000, 815,
737, 798, 21, -1000, 899, 1156, 376, 376, -1000, -1000,
552, -1000, 608, -1000, 19963, 78, -1000, 913, 591, -1000,
19963, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1195, -181,
664, 19963, 19963, 19963, -1000, 19963, -1000, 435, 435, -1000,
12230, 1975, 1975, -1000, -1000, 642, -1000, 1238, -1000, 642,
905, 905, -1000, 905, 912, -1000, 905, 37, 905, 27,
642, 642, 1776, 1760, 1711, 966, 885, -169, -1000, 322,
11075, -1000, 1745, 584, 885, 885, 885, 788, -1000, 606,
9, -1000, -1000, -1000, 1269, 1262, 322, -1000, -1000, -1000,
1193, 698, 700, -1000, -1000, 9137, 791, 1091, 216, 788,
1267, 19963, 11075, -1000, -1000, 11075, 900, -1000, 11075, -1000,
-1000, -1000, 1267, 1267, 861, -1000, -1000, 286, -1000, -1000,
-1000, 4364, -1000, 786, -1000, 1186, -1000, -1000, -1000, 19963,
-25, 1314, 1975, -1000, -1000, -1000, -1000, 9, 605, 9,
529, -1000, 528, -1000, -1000, -223, -1000, -1000, 895, 997,
-1000, -1000, 896, -1000, -1000, -1000, 658, -1000, -1000, 885,
-1000, 6776, -1000, -1000, 890, 996, -1000, -1000, -1000, -1000,
1975, -1000, 1181, -1000, -1000, 159, -1000, -1000, -1000, -1000,
-1000, -1000, -1000, -1000, 12230, 12230, 12230, 12230, 12230, 1238,
599, 322, 12230, 12230, 16491, 19963, 19963, 14168, 19963, 9,
-57, -1000, 11075, 11075, 1185, -1000, 885, -1000, 975, 19963,
885, 19963, -1000, 1238, -1000, 322, 322, 19963, 322, 1238,
-1000, 73, 784, -1000, 307, -1000, -132, 263, -1000, 263,
656, 648, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
1226, 19963, -1000, 124, 722, -1000, 375, 19963, 19963, -1000,
-1000, -1000, 1145, 1145, 1145, 1145, 60, 642, -1000, 1145,
1145, 764, -1000, 764, 764, 257, -1000, -284, -1000, 1120,
1134, 322, 718, 1307, -1000, 885, 1325, 214, 700, -1000,
-1000, 740, -1000, -1000, 141, 19963, 472, 1174, -1000, 1170,
-1000, -1000, -1000, -1000, -1000, 988, 712, 704, -1000, 19963,
6776, 4766, 702, -1000, -1000, -1000, -1000, -1000, 642, 69,
-185, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -57, 189,
-1000, 1102, 1099, 1247, 19963, 700, 19963, -1000, 19963, -1000,
-1000, 593, -1000, -1000, 131, -1000, -1000, 124, 1090, -1000,
-1000, 916, -1000, 1071, -178, -188, 1106, 1108, 1108, 1134,
1245, 1117, 1114, -1000, 587, 607, -1000, 886, -1000, -1000,
-83, -1000, 121, -181, -1000, 1068, -1000, 1104, 588, -1000,
-1000, -1000, -1000, 585, -1000, 1244, 1242, -1000, 19963, 151,
-1000, -1000, 116, -1000, -183, -1000, 580, -1000, -1000, -1000,
577, 533, 684, 83, 885, -186, -1000, -1000, -1000, -1000,
1003, -1000, 11460, -189, 1002, -1000, 1292, 1145, 642, -1000,
-1000, 1306, 316, 316, -1000, -1000, -1000, -1000, -1000, 156,
523, -1000, -1000, -1000, -1000,
}
var yyPgo = [...]int{
0, 1646, 1642, 12, 81, 79, 1640, 1638, 1632, 1630,
122, 121, 119, 1629, 1627, 1626, 1625, 1624, 1619, 1615,
1614, 1603, 1602, 1600, 1599, 1597, 1596, 105, 103, 484,
1595, 1594, 1593, 1592, 1590, 1588, 1587, 1584, 1582, 1581,
1580, 1579, 1578, 1577, 114, 1576, 1575, 1574, 1573, 1571,
1570, 1569, 1568, 1567, 1565, 1563, 102, 1560, 54, 234,
60, 77, 1558, 88, 1557, 1555, 1554, 1552, 1550, 85,
1542, 41, 73, 70, 1541, 42, 1539, 1535, 89, 1534,
1531, 69, 1528, 1527, 2314, 1524, 67, 75, 18, 31,
1523, 1520, 1518, 1517, 109, 162, 1516, 1515, 19, 1514,
1513, 134, 1512, 80, 30, 15, 16, 24, 1510, 83,
1509, 7, 1508, 78, 1507, 1506, 1505, 1503, 40, 1502,
71, 95, 23, 1500, 5, 9, 1497, 1495, 1492, 1491,
1490, 1489, 3, 1488, 1485, 1484, 1483, 1482, 29, 1480,
11, 1479, 68, 47, 20, 8, 1478, 1475, 25, 84,
66, 96, 1474, 1473, 1472, 755, 1471, 63, 1470, 125,
1448, 28, 98, 501, 595, 1447, 1445, 1440, 1439, 1436,
45, 877, 2068, 17, 97, 1429, 1426, 2764, 50, 74,
27, 1424, 1422, 1421, 65, 61, 55, 741, 1418, 53,
1417, 1416, 1415, 1414, 1413, 1412, 1411, 32, 1403, 1397,
1396, 35, 26, 99, 39, 1394, 1392, 1388, 1387, 58,
94, 1381, 1380, 64, 62, 1379, 101, 43, 33, 1377,
1376, 1375, 1373, 37, 21, 1367, 86, 44, 56, 38,
34, 1365, 22, 1364, 36, 48, 1362, 6, 1361, 14,
1354, 4, 0, 1351, 10, 1344, 82, 1197, 1, 1340,
2, 1338, 1336, 76, 1335, 1334, 1332, 1610, 726, 100,
1331, 113,
}
var yyR1 = [...]int{
0, 255, 256, 256, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 242, 242, 242, 245, 245, 21, 41,
3, 3, 3, 3, 2, 2, 8, 9, 4, 5,
5, 10, 10, 50, 50, 11, 12, 12, 12, 12,
259, 259, 78, 78, 79, 79, 142, 142, 13, 14,
14, 151, 151, 150, 150, 150, 152, 152, 152, 152,
187, 187, 15, 15, 15, 15, 15, 57, 57, 244,
244, 243, 241, 241, 240, 240, 239, 23, 24, 25,
26, 247, 247, 219, 30, 30, 29, 29, 29, 29,
31, 31, 28, 28, 27, 27, 221, 221, 220, 220,
220, 220, 220, 220, 210, 190, 190, 190, 190, 193,
193, 191, 191, 191, 191, 191, 191, 191, 191, 191,
192, 192, 192, 192, 192, 194, 194, 194, 194, 194,
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
195, 195, 195, 195, 195, 196, 196, 196, 196, 196,
196, 196, 196, 209, 209, 197, 197, 203, 203, 204,
204, 204, 206, 206, 207, 207, 165, 165, 165, 199,
199, 200, 200, 205, 205, 201, 201, 201, 202, 202,
202, 208, 208, 208, 208, 208, 198, 198, 211, 232,
232, 231, 231, 228, 228, 228, 228, 218, 218, 225,
225, 225, 225, 225, 225, 215, 215, 215, 216, 216,
214, 214, 217, 217, 227, 227, 226, 212, 212, 213,
213, 234, 234, 234, 234, 234, 235, 249, 250, 248,
248, 248, 248, 248, 166, 166, 166, 222, 222, 222,
223, 223, 223, 224, 224, 224, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 246, 246, 246, 246, 246, 246, 246,
246, 246, 246, 246, 246, 246, 246, 238, 236, 236,
237, 237, 17, 22, 22, 18, 18, 18, 18, 19,
19, 32, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 158, 158, 251, 251, 160, 160, 156,
156, 159, 159, 157, 157, 157, 161, 161, 161, 162,
162, 188, 188, 188, 34, 34, 36, 36, 37, 38,
38, 182, 182, 183, 183, 39, 40, 49, 49, 49,
49, 49, 49, 51, 51, 51, 7, 7, 7, 7,
46, 46, 46, 6, 6, 35, 35, 42, 252, 252,
253, 254, 254, 254, 254, 43, 20, 260, 44, 45,
45, 56, 56, 56, 52, 52, 52, 55, 55, 55,
60, 60, 62, 62, 62, 62, 62, 63, 63, 63,
63, 63, 63, 59, 59, 61, 61, 61, 61, 175,
175, 175, 174, 174, 70, 70, 71, 71, 72, 72,
73, 73, 73, 110, 87, 87, 141, 141, 140, 140,
143, 143, 74, 74, 74, 74, 75, 75, 76, 76,
77, 77, 181, 181, 180, 180, 180, 179, 179, 80,
80, 80, 82, 81, 81, 81, 81, 83, 83, 85,
85, 84, 84, 86, 88, 88, 88, 88, 88, 89,
89, 69, 69, 69, 69, 69, 69, 69, 69, 154,
154, 91, 91, 90, 90, 90, 90, 90, 90, 90,
90, 90, 90, 102, 102, 102, 102, 102, 102, 92,
92, 92, 92, 92, 92, 92, 58, 58, 103, 103,
103, 109, 104, 104, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 99, 99,
99, 99, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 98, 98, 98, 98, 98,
98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
98, 261, 261, 101, 100, 100, 100, 100, 100, 100,
100, 54, 54, 54, 54, 54, 186, 186, 189, 189,
189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
189, 114, 114, 53, 53, 112, 112, 113, 115, 115,
111, 111, 111, 94, 94, 94, 94, 94, 94, 94,
94, 96, 96, 96, 116, 116, 117, 117, 118, 118,
119, 119, 120, 121, 121, 121, 122, 122, 122, 122,
233, 233, 233, 233, 233, 229, 229, 229, 229, 230,
230, 230, 64, 64, 64, 64, 66, 66, 65, 65,
47, 47, 48, 48, 48, 67, 67, 68, 68, 68,
68, 138, 138, 138, 123, 123, 123, 123, 128, 128,
128, 124, 124, 126, 126, 126, 127, 127, 127, 125,
131, 131, 133, 133, 132, 132, 130, 130, 135, 135,
134, 134, 129, 129, 93, 93, 93, 93, 93, 139,
139, 139, 139, 144, 144, 105, 105, 107, 107, 106,
108, 145, 145, 148, 146, 146, 149, 149, 149, 149,
149, 147, 147, 147, 176, 176, 176, 153, 153, 163,
163, 164, 164, 155, 155, 167, 167, 167, 167, 167,
167, 167, 167, 167, 167, 168, 168, 168, 169, 169,
136, 136, 136, 136, 137, 137, 172, 172, 173, 173,
177, 177, 178, 178, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
257, 258, 184, 185, 185, 185,
}
var yyR2 = [...]int{
0, 2, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 1, 1, 1, 0, 1, 2, 3,
5, 6, 6, 7, 4, 6, 5, 7, 8, 1,
3, 7, 8, 1, 1, 9, 9, 8, 7, 7,
1, 1, 1, 3, 1, 3, 0, 4, 3, 5,
4, 1, 3, 3, 2, 2, 2, 2, 2, 1,
1, 1, 2, 2, 6, 11, 2, 0, 2, 0,
2, 1, 0, 2, 1, 3, 3, 4, 7, 4,
2, 1, 1, 4, 0, 1, 1, 1, 2, 2,
0, 1, 5, 5, 4, 4, 2, 4, 1, 1,
3, 4, 3, 3, 8, 3, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 1, 2, 2, 2, 2,
4, 4, 2, 2, 3, 3, 3, 3, 1, 1,
1, 1, 1, 6, 6, 1, 1, 1, 1, 1,
1, 1, 1, 1, 3, 0, 3, 0, 5, 0,
3, 5, 0, 1, 0, 1, 0, 1, 2, 0,
2, 0, 3, 0, 1, 0, 3, 3, 0, 2,
2, 0, 2, 1, 2, 1, 0, 2, 5, 0,
1, 1, 2, 2, 3, 2, 3, 0, 1, 2,
3, 3, 3, 2, 2, 1, 1, 1, 1, 1,
1, 1, 0, 1, 1, 3, 3, 3, 1, 3,
1, 10, 11, 11, 12, 1, 5, 3, 3, 1,
1, 2, 2, 2, 0, 1, 2, 0, 1, 3,
1, 2, 3, 1, 1, 1, 5, 6, 6, 6,
6, 4, 4, 3, 6, 7, 5, 5, 5, 12,
7, 5, 9, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 7, 1, 3,
8, 8, 3, 3, 5, 4, 6, 5, 4, 3,
2, 3, 4, 4, 3, 4, 4, 4, 4, 4,
4, 3, 3, 3, 3, 2, 7, 2, 3, 4,
5, 7, 5, 4, 2, 4, 4, 3, 3, 5,
2, 3, 3, 1, 1, 1, 1, 0, 1, 0,
1, 1, 1, 0, 2, 2, 0, 2, 2, 0,
2, 0, 1, 1, 2, 1, 1, 2, 1, 1,
5, 0, 1, 0, 1, 2, 3, 0, 3, 3,
3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 3, 3, 2, 2, 3, 1, 3,
2, 1, 2, 1, 2, 2, 2, 0, 2, 0,
2, 1, 2, 2, 0, 1, 1, 0, 1, 1,
0, 1, 0, 1, 2, 3, 4, 1, 1, 1,
1, 1, 1, 1, 3, 1, 2, 3, 5, 0,
1, 2, 1, 1, 0, 2, 1, 3, 1, 1,
1, 3, 3, 3, 3, 7, 0, 3, 1, 3,
1, 3, 4, 4, 4, 3, 2, 4, 0, 1,
0, 2, 0, 1, 0, 1, 2, 1, 1, 1,
2, 2, 1, 2, 3, 2, 3, 2, 2, 2,
1, 1, 3, 3, 0, 5, 4, 5, 5, 0,
2, 1, 3, 3, 3, 2, 3, 1, 2, 0,
3, 1, 1, 3, 3, 4, 4, 5, 3, 4,
5, 6, 2, 1, 2, 1, 2, 1, 2, 1,
1, 1, 1, 1, 1, 1, 0, 2, 1, 1,
1, 3, 1, 3, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
2, 2, 2, 3, 1, 1, 1, 1, 4, 5,
5, 6, 4, 4, 6, 6, 6, 8, 8, 8,
8, 9, 8, 5, 4, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 8,
8, 0, 2, 3, 4, 4, 4, 4, 4, 4,
4, 0, 3, 4, 7, 3, 1, 1, 2, 3,
3, 1, 2, 2, 1, 2, 1, 2, 2, 1,
2, 0, 1, 0, 2, 1, 2, 4, 0, 2,
1, 3, 5, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 2, 0, 3, 0, 2, 0, 3,
1, 3, 2, 0, 1, 1, 0, 2, 4, 4,
0, 2, 2, 1, 1, 3, 3, 3, 3, 3,
3, 3, 0, 3, 3, 3, 0, 3, 1, 1,
0, 4, 0, 1, 1, 0, 3, 1, 3, 2,
1, 0, 2, 4, 0, 9, 3, 5, 0, 3,
3, 0, 1, 0, 2, 2, 0, 2, 2, 2,
0, 3, 0, 3, 0, 3, 0, 4, 0, 3,
0, 4, 0, 1, 2, 1, 5, 4, 4, 1,
3, 3, 5, 0, 5, 1, 3, 1, 2, 3,
1, 1, 3, 3, 1, 3, 3, 3, 3, 3,
2, 1, 2, 1, 1, 1, 1, 1, 1, 0,
2, 0, 3, 0, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
0, 1, 1, 1, 0, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 0, 1, 1,
}
var yyChk = [...]int{
-1000, -255, -1, -3, -8, -9, -10, -11, -12, -13,
-14, -15, -16, -17, -18, -19, -32, -33, -34, -36,
-37, -38, -39, -40, -6, -35, -20, -21, -41, -42,
-43, -4, -257, 6, 7, 8, -50, 10, 11, 31,
-23, -24, 146, -25, 147, -26, 149, 148, 182, 150,
175, 70, 208, 209, 211, 212, 213, 214, -51, 180,
181, 152, 35, 41, 32, 33, 80, 9, 303, 177,
176, 26, -256, 407, -56, 5, -118, 16, -3, -44,
-260, -44, -44, -44, -44, -44, -44, -219, -221, 80,
119, 80, -57, 154, -136, -247, 100, 160, 163, 164,
294, 153, -30, -29, -28, -27, -31, 30, -247, 154,
156, 268, -245, -242, 83, 84, 85, 154, 154, 155,
156, -247, 154, -84, -177, -242, -171, 313, 168, 345,
346, 76, 258, 208, 222, 216, 243, 235, 314, 347,
169, 198, 233, 236, 281, 166, 348, 263, 271, 94,
211, 290, 349, 75, 47, 40, 178, 231, 227, 199,
350, 322, 192, 225, 46, 28, 45, 351, 273, 248,
44, 352, 79, 318, 275, 226, 272, 152, 353, 171,
401, 164, 354, 249, 253, 355, 282, 48, 356, 357,
358, 74, 220, 221, 359, 206, 167, 284, 247, 165,
34, 276, 315, 54, 186, 285, 42, 251, 41, 405,
360, 246, 242, 49, 361, 362, 363, 364, 245, 219,
241, 204, 58, 255, 254, 256, 193, 280, 238, 365,
366, 367, 172, 77, 368, 228, 19, 369, 370, 200,
371, 52, 372, 373, 288, 181, 374, 50, 37, 184,
375, 376, 377, 378, 379, 380, 274, 250, 252, 161,
188, 270, 317, 381, 224, 382, 173, 185, 180, 289,
174, 383, 384, 385, 386, 387, 388, 389, 212, 39,
390, 391, 392, 393, 207, 203, 283, 292, 57, 78,
260, 394, 218, 163, 201, 395, 209, 51, 195, 266,
205, 43, 239, 187, 396, 397, 229, 230, 244, 217,
240, 210, 402, 189, 182, 398, 291, 202, 261, 319,
194, 237, 234, 196, 399, 156, 190, 191, 400, 403,
277, 267, 278, 279, 268, 197, 232, 262, 154, 137,
236, 281, 146, 264, 265, 276, 277, 273, -160, 274,
188, -188, 154, -156, 263, 267, 268, 197, -251, -242,
275, 283, 282, 269, 279, 278, -177, 210, -182, 215,
-172, -242, -171, 213, -84, -49, 401, 150, -184, -184,
-184, -104, -69, -90, 103, -95, 30, 24, -94, -91,
-111, -108, -109, 137, 138, 140, 139, 141, 126, 127,
134, 104, 142, -99, -97, -98, -100, 87, 86, 95,
88, 89, 90, 91, 96, 97, 98, -172, -177, -106,
-257, 64, 65, 304, 305, 306, 307, 312, 308, 106,
53, 293, 302, 301, 300, 297, 298, 295, 296, 310,
311, 159, 294, 153, 132, 303, -242, -171, 40, 266,
266, -5, -4, -257, 6, 21, 22, -122, 18, 17,
-258, 82, -52, -62, 59, 60, -63, 22, 36, 63,
61, -45, -61, 128, -69, -177, -61, -155, 158, -155,
-155, -146, -187, 210, -149, 283, 282, -173, -147, -172,
-170, 281, 236, 280, 151, 320, 102, 23, 25, 105,
137, 17, 106, 136, 304, 146, 68, 321, 295, 296,
293, 299, 306, 307, 294, 264, 30, 11, 323, 26,
176, 22, 36, 130, 148, 109, 110, 179, 24, 177,
98, 326, 20, 71, 12, 14, 327, 328, 15, 159,
158, 121, 155, 66, 9, 142, 27, 118, 62, 329,
29, 330, 331, 332, 333, 64, 119, 18, 297, 298,
32, 406, 334, 312, 183, 132, 69, 55, 103, 335,
336, 96, 337, 99, 72, 100, 16, 67, 38, 338,
339, 340, 286, 341, 120, 149, 303, 65, 342, 153,
265, 6, 309, 31, 175, 63, 343, 154, 108, 310,
311, 157, 97, 5, 160, 33, 10, 70, 73, 300,
301, 302, 53, 316, 107, 13, 344, 287, 101, -220,
119, -210, -213, -172, 170, -235, 166, -84, -227, -226,
-172, -64, 76, -164, 159, 155, -164, 303, -27, -28,
236, 136, -84, -84, 146, 148, 151, 72, -29, 194,
-22, -84, -163, 159, -242, -163, -163, -84, 143, -84,
-242, 31, -161, 119, 13, 294, -242, 188, 154, 189,
156, -162, 119, -162, -162, -162, -215, 155, 34, 167,
-185, -257, -173, 195, 196, 195, -159, -158, 271, 272,
266, 270, 13, 196, 266, 191, -161, -185, 157, -172,
-46, -172, 87, -7, -3, -11, -10, -12, 111, 81,
102, 100, 101, 118, -69, -92, 121, 103, 119, 120,
105, 123, 122, 133, 126, 127, 128, 129, 130, 131,
132, 124, 125, 136, 111, 112, 113, 114, 115, 116,
117, -154, -257, -109, -257, 144, 145, -95, -95, -95,
-95, -95, -95, -95, -95, -95, -95, -257, 143, -2,
-104, -4, -257, -257, -257, -257, -257, -257, -257, -257,
-114, -69, -257, -261, -101, -257, -261, -101, -261, -101,
-261, -257, -261, -101, -261, -101, -261, -261, -101, -257,
-257, -257, -257, -257, -257, -257, -184, -252, -253, -87,
-84, -118, -3, -44, -138, 20, 32, -69, -119, -120,
-69, -118, 55, -59, -61, -63, 59, 60, 93, 12,
-175, -174, 23, -172, 87, 143, 12, -85, 27, -84,
-71, -72, -73, -74, -87, -110, -257, 12, -78, -79,
-84, -86, -177, 81, 210, -149, -187, -151, -150, 284,
286, 111, -176, -172, 87, 30, 31, 82, 81, -84,
-190, -193, -195, -194, -196, -191, -192, 233, 234, 137,
237, 239, 240, 241, 242, 243, 244, 245, 246, 247,
248, 31, 178, 229, 230, 231, 232, 249, 250, 251,
252, 253, 254, 255, 256, 216, 235, 314, 217, 218,
219, 220, 221, 222, 224, 225, 226, 227, 228, -242,
80, 82, 81, -197, 80, -67, 199, 111, -84, 103,
-242, -242, 31, -218, 111, -167, 151, 148, 149, -238,
147, 258, 236, 94, 30, 16, 304, 184, 319, -242,
185, -185, 190, 190, 154, 154, 203, -84, 40, 81,
157, -78, 24, 72, -84, -242, -178, -177, -170, -185,
-161, 87, -69, -185, -185, -185, -84, -185, -185, 87,
-216, 12, 121, -185, -185, -157, 12, 121, -216, -157,
-69, -162, 72, -183, 213, 247, 402, 403, 404, -69,
-69, -69, -69, -102, 96, 103, 97, 98, -95, -103,
-106, -109, 92, 121, 119, 120, 105, -95, -95, -95,
-95, -95, -95, -95, -95, -95, -95, -95, -95, -95,
-95, -95, -186, -242, 87, -242, -94, -94, -172, -60,
22, 36, -59, -173, -178, -170, -56, -258, -258, -118,
-59, -59, -69, -69, -111, 87, -59, -111, 87, -59,
-59, -55, 22, 36, -112, -113, 107, -111, -172, -177,
-258, -95, -172, -172, -59, -60, -60, -59, -59, 81,
-254, 286, 287, 406, -180, 184, -179, 23, -177, 87,
-122, -258, -123, 27, 10, 121, 81, 19, 81, -121,
25, 26, -122, -96, -172, 88, 91, -70, 81, 12,
-63, -84, -174, 128, -178, -84, -142, 184, -84, 31,
81, -80, -82, -81, -83, 62, 66, 68, 63, 64,
65, 69, -181, 23, -71, -3, -257, -84, -78, -259,
81, 12, 73, -259, 81, 143, -149, -151, 81, 285,
287, 288, 72, 99, -69, -202, 136, -222, -223, -224,
-173, 87, 88, -210, -211, -212, -225, 170, -234, 161,
163, 164, 160, -214, 171, -235, 155, 29, 82, -165,
96, 103, -206, 261, -197, -197, -197, -197, -197, -201,
236, -201, -201, -201, 80, 80, -197, -197, -197, -197,
-203, 80, -203, -203, -204, 80, -204, -235, 166, -69,
-232, -231, -228, 73, 165, 94, 316, -226, -121, 88,
-66, 201, 111, 202, 204, 205, 24, -137, 73, -218,
-242, 87, -184, -246, 166, 162, 170, 171, 164, 83,
84, 85, 155, 29, 161, 163, 184, 160, -246, -168,
-169, 157, 23, 155, 29, 184, -84, -84, -84, -84,
-84, 151, 148, 192, -84, -84, -84, -185, -84, -161,
-177, -177, -84, -161, -84, -172, 96, 97, 98, -103,
-95, -95, -95, -58, 179, 102, -258, -258, -59, -59,
-257, 143, -5, -122, -258, -258, 81, 73, 23, 12,
12, -258, 12, 12, -258, -258, -59, -115, -113, 109,
-69, -258, 143, -258, 81, 81, -258, -258, -258, -258,
-258, -253, 405, 287, -88, 70, 158, 71, -257, -179,
-138, 38, 46, 57, -69, -69, -120, -138, -153, 20,
12, 53, 53, -89, 13, -61, -71, -63, 143, -89,
-93, 31, 53, -3, -257, -257, -145, -148, -111, -72,
-73, -73, -72, -73, 62, 62, 62, 67, 62, 67,
62, -81, -177, -258, -258, -3, -142, 73, -71, -84,
-71, -86, -177, 128, -150, -152, 289, 286, 292, -242,
87, 81, -224, 111, -213, 80, -242, 29, -214, -214,
-214, -217, -242, -217, 29, -199, 30, 96, -207, 262,
-201, -201, -202, 31, -202, -202, -202, -209, 87, -209,
88, 88, 82, -233, -229, -230, 32, 76, -228, -242,
-218, 87, 37, 82, 156, 207, -68, 299, 87, 83,
72, -172, -242, 87, -184, -184, -84, -184, -172, -244,
73, 190, 258, 190, 193, 157, -185, -157, -157, -58,
102, -95, -95, -258, -258, -60, -173, -118, -138, -189,
137, 233, 178, 231, 227, 247, 238, 260, 229, 261,
-186, -189, -95, -95, -95, -95, 313, -118, 110, -69,
108, -173, -95, -95, 155, 155, 155, -143, -172, 39,
87, 87, 58, -84, -116, 14, -69, 128, -122, -144,
72, -145, -105, -107, -106, -257, -139, -258, -172, -143,
-89, 81, 111, -76, -75, 72, 73, -77, 72, -75,
62, 62, -258, -89, -71, -89, -89, 143, 286, 290,
291, -223, -224, -227, -234, 171, -217, -217, -217, 80,
-200, 72, -95, -202, -202, -242, 137, 82, 81, 82,
81, 82, 81, -166, 351, 103, -230, -229, -218, -218,
88, 87, -84, -65, 199, 206, 80, 84, -84, 27,
-241, 316, -243, -242, -172, -172, -172, -84, -161, -161,
-95, -258, -122, -258, -197, -197, -197, -204, -197, 221,
-197, 221, -258, -258, 20, 20, 20, 20, -257, -53,
309, -69, 81, 81, -257, -257, -257, -258, 81, 87,
-201, -117, 15, 17, 28, -144, 81, -258, -258, 81,
53, 143, -258, -118, -148, -69, -69, 80, -69, -118,
-89, 82, -140, -172, -205, 258, 10, -201, 87, -201,
88, 88, 351, 30, 77, 78, 79, 30, 74, 75,
-141, 80, 82, -257, -240, -239, -173, 80, 73, -138,
-201, -242, -95, -95, -95, -95, -95, -122, 87, -95,
-95, -140, -258, -140, -140, -180, -172, -201, -125, -130,
-159, -69, -104, 29, -107, 53, -3, -172, -105, -172,
-122, -140, -122, -232, 82, 81, -208, 161, 29, 160,
-98, -202, -202, 82, 82, 23, -140, -236, -237, 184,
81, 111, -140, -84, -258, -258, -258, -258, -54, 121,
316, -258, -258, -258, -258, -258, -258, -88, -128, 401,
-131, 42, -132, 43, 10, -105, 143, 82, 173, -172,
-198, 94, 29, 29, -3, 82, -258, 81, -172, -239,
-224, 82, -258, 314, 69, 317, -125, 47, 239, -133,
51, -134, -129, 52, 17, -145, -172, -84, 87, -47,
316, -237, 53, -244, 58, 315, 318, -126, 49, -124,
48, -124, -132, 17, -135, 44, 45, 87, 80, -48,
198, 405, 186, -241, 58, -127, 50, 72, 99, 87,
17, 17, -140, 166, 187, 316, 72, 99, 87, 87,
82, 200, -257, 317, -249, -250, 72, -95, 183, 318,
-250, 72, 11, 10, -258, -258, -248, 174, 169, 172,
31, -248, 168, 30, 96,
}
var yyDef = [...]int{
32, -2, 2, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 668, 0, 407, 407, 407, 407, 407, 407, 407,
0, 0, -2, -2, 0, 36, 0, 0, 0, 0,
-2, 365, 366, 0, 368, -2, 0, 0, 377, 1152,
1152, 1152, 0, 0, 0, 0, 1150, 53, 54, 383,
384, 385, 1, 3, 0, 411, 676, 0, 0, -2,
409, 0, 0, 783, 783, 783, 0, 82, 83, 0,
0, 0, 692, 781, 0, 781, 0, 801, 802, 803,
101, 102, 86, -2, 106, 107, 0, 111, 100, 0,
0, 0, 110, 37, 33, 34, 35, 0, 779, 0,
779, 779, 0, 310, 491, 810, 811, 939, 940, 941,
942, 943, 944, 945, 946, 947, 948, 949, 950, 951,
952, 953, 954, 955, 956, 957, 958, 959, 960, 961,
962, 963, 964, 965, 966, 967, 968, 969, 970, 971,
972, 973, 974, 975, 976, 977, 978, 979, 980, 981,
982, 983, 984, 985, 986, 987, 988, 989, 990, 991,
992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001,
1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021,
1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031,
1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051,
1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061,
1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071,
1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081,
1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091,
1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101,
1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111,
1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121,
1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131,
1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141,
1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 0, 0,
0, 356, 0, 359, 359, 359, 359, 325, 0, 327,
1153, 0, 0, 0, 334, 0, 0, 340, 356, 1153,
348, 362, 363, 350, 345, 346, 364, 367, 0, 372,
375, 806, 807, 0, 390, 0, 992, 382, 395, 396,
406, 38, 542, 501, 0, 507, 509, 0, 544, 545,
546, 547, 548, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 574, 575, 576, 577, 653, 654, 655,
656, 657, 658, 659, 660, 511, 512, 650, 0, 760,
0, 0, 0, 0, 0, 0, 0, 0, 0, 641,
0, 611, 611, 611, 611, 611, 611, 611, 611, 0,
0, 0, 0, 0, 0, 0, -2, -2, 1152, 0,
405, 668, 49, 0, 407, 412, 413, 711, 0, 0,
668, 1151, 0, 0, -2, -2, 423, 429, 430, 431,
432, 408, 0, 435, 439, 0, 0, 0, 784, 0,
0, 68, 0, 1123, 764, -2, -2, 0, 0, 808,
809, -2, 955, -2, 814, 815, 816, 817, 818, 819,
820, 821, 822, 823, 824, 825, 826, 827, 828, 829,
830, 831, 832, 833, 834, 835, 836, 837, 838, 839,
840, 841, 842, 843, 844, 845, 846, 847, 848, 849,
850, 851, 852, 853, 854, 855, 856, 857, 858, 859,
860, 861, 862, 863, 864, 865, 866, 867, 868, 869,
870, 871, 872, 873, 874, 875, 876, 877, 878, 879,
880, 881, 882, 883, 884, 885, 886, 887, 888, 889,
890, 891, 892, 893, 894, 895, 896, 897, 898, 899,
900, 901, 902, 903, 904, 905, 906, 907, 908, 909,
910, 911, 912, 913, 914, 915, 916, 917, 918, 919,
920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
930, 931, 932, 933, 934, 935, 936, 937, 938, 0,
0, 118, 119, 0, 0, 240, 957, 116, 0, 234,
175, 705, 0, 0, 0, 0, 0, 88, 108, 109,
0, 217, 0, 1153, 0, 0, 0, 0, -2, 0,
302, 0, 0, 0, 0, 0, 0, 309, 0, 311,
1153, 356, 314, 0, 0, 1153, 1153, 1153, 0, 1153,
1153, 321, 0, 322, 323, 324, 0, 225, 226, 227,
328, 1154, 1155, 1153, 1153, 353, 0, 353, 351, 352,
343, 344, 0, 359, 337, 338, 341, 342, 373, 376,
393, 391, 392, 394, 386, 387, 388, 389, 0, 0,
0, 0, 0, 0, 505, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 529, 530, 531, 532, 533, 534,
535, 508, 0, 522, 0, 0, 0, 564, 565, 566,
567, 568, 569, 570, 571, 572, 0, 420, 0, 0,
0, 668, 0, 0, 0, 0, 0, 0, 0, 417,
0, 642, 0, 595, 603, 0, 596, 604, 597, 605,
598, 0, 599, 606, 600, 607, 601, 602, 608, 0,
0, 0, 420, 420, 0, 0, 39, 397, 398, 0,
474, 676, 0, 422, 714, 0, 0, 677, 669, 670,
673, 676, 0, 444, 433, 424, 427, 428, 410, 0,
436, 440, 0, 442, 443, 0, 0, 66, 0, 490,
0, 446, 448, 449, 450, 472, 0, 0, 0, 0,
62, 64, 491, 0, 1123, 770, 0, 70, 71, 0,
0, 0, 198, 774, 775, 776, 772, 257, 0, 0,
186, 182, 126, 127, 128, 175, 130, 175, 175, 175,
175, 195, 195, 195, 195, 158, 159, 160, 161, 162,
0, 0, 145, 175, 175, 175, 175, 165, 166, 167,
168, 169, 170, 171, 172, 131, 132, 133, 134, 135,
136, 137, 138, 139, 177, 177, 177, 179, 179, 0,
0, 209, 0, 673, 0, 696, 0, 0, 97, 0,
804, 99, 217, 0, 218, 1152, 0, 0, 795, 272,
785, 786, 787, 788, 789, 790, 791, 792, 793, 794,
0, 271, 0, 0, 0, 0, 0, 0, 0, 0,
0, 305, 780, 0, 1153, 308, 492, 812, 813, 312,
313, 357, 358, 315, 316, 317, 318, 319, 320, 360,
0, 228, 229, 329, 333, 356, 0, 0, 0, 356,
335, 336, 0, 0, 374, 378, 379, 380, 381, 543,
502, 503, 504, 506, 523, 0, 525, 527, 513, 514,
538, 539, 540, 0, 0, 0, 0, 536, 518, 0,
549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
559, 560, 563, 626, 627, 0, 561, 562, 573, 0,
0, 0, 421, 651, 0, -2, 0, 541, 759, 676,
0, 0, 0, 0, 546, 653, 0, 546, 653, 0,
0, 0, 418, 419, 648, 645, 0, 0, 650, 0,
612, 0, 0, 0, 0, 0, 0, 0, 0, 0,
400, 401, 403, 0, 494, 1061, 475, 0, 477, 478,
711, 50, 40, 0, 712, 0, 0, 0, 0, 672,
674, 675, 711, 0, 661, 0, 0, 499, 0, 0,
425, 46, 441, 437, 0, 499, 0, 0, 489, 0,
0, 0, 0, 0, 0, 479, 0, 0, 482, 0,
0, 0, 0, 473, 0, 0, 0, -2, 0, 0,
0, 60, 61, 0, 0, 0, 765, 69, 0, 0,
74, 75, 766, 767, 768, 769, 0, 103, 258, 260,
263, 264, 265, 120, 122, 123, 0, 0, 238, 1071,
1105, 993, 232, 232, 991, 245, 230, 231, 117, 189,
187, 0, 184, 183, 129, 195, 195, 152, 153, 198,
0, 198, 198, 198, 0, 0, 146, 147, 148, 149,
140, 0, 141, 142, 143, 0, 144, 239, 0, 0,
680, 210, 211, 0, 217, 0, 0, 235, 236, 0,
0, 0, 0, 693, 694, 695, 782, 0, 0, 0,
114, 115, 266, 1152, 283, 284, 285, 286, 287, 288,
289, 290, 291, 292, 293, 294, 295, 296, 1152, 0,
1152, 796, 797, 798, 799, 0, 89, 276, 278, 277,
281, 0, 0, 0, 0, 303, 1153, 307, 353, 330,
354, 355, 353, 332, 339, 370, 524, 526, 528, 515,
536, 519, 0, 516, 0, 0, 510, 578, 0, 0,
420, 0, 668, 711, 582, 583, 0, 0, 0, 0,
0, 619, 0, 0, 620, 0, 668, 0, 646, 0,
0, 594, 0, 613, 0, 0, 614, 615, 616, 617,
618, 399, 402, 404, 454, 0, 0, 0, 0, 476,
42, 0, 0, 0, 678, 679, 671, 41, 0, 777,
778, 662, 663, 664, 0, 434, 445, 426, 0, 676,
753, 0, 0, 745, 0, 0, 499, 761, 0, 447,
468, 470, 0, 465, 480, 481, 483, 0, 485, 0,
487, 488, 451, 452, 453, 0, 499, 0, 499, 63,
499, 65, 0, 493, 72, 73, 0, 0, 79, 199,
200, 0, 261, 0, 121, 0, 0, 219, 232, 232,
232, 223, 233, 224, 0, 191, 0, 188, 125, 185,
198, 198, 154, 0, 155, 156, 157, 0, 173, 0,
0, 0, 254, 84, 684, 683, 217, 217, 212, 213,
0, 215, 0, 176, 0, 0, 706, 707, 0, 710,
0, 805, 112, 113, 267, 268, 269, 270, 0, 92,
0, 0, 0, 0, 274, 0, 306, 356, 356, 517,
0, 537, 520, 579, 580, 0, 652, 676, 44, 0,
175, 175, 631, 175, 179, 634, 175, 636, 175, 639,
0, 0, 0, 0, 0, 0, 0, 643, 593, 649,
0, 651, 0, 0, 0, 0, 0, 0, 460, 0,
195, 716, 713, 43, 666, 0, 500, 438, 47, 51,
0, 753, 744, 755, 757, 0, 0, 0, 749, 0,
668, 0, 0, 462, 469, 0, 0, 463, 0, 464,
484, 486, -2, 668, 499, 58, 59, 0, 76, 77,
78, 259, 262, 0, 237, 0, 220, 221, 222, 0,
193, 0, 190, 150, 151, 196, 197, 195, 0, 195,
0, 180, 0, 246, 255, 0, 681, 682, 0, 0,
214, 216, 456, 697, 698, 699, 0, 709, 98, 0,
275, 0, 90, 91, 0, 0, 280, 304, 326, 331,
521, 581, 711, 584, 628, 195, 632, 633, 635, 637,
638, 640, 586, 585, 0, 0, 0, 0, 0, 676,
0, 647, 0, 0, 0, 0, 0, 474, 0, 195,
736, 48, 0, 0, 0, 52, 0, 758, 0, 0,
0, 0, 67, 676, 762, 763, 466, 0, 471, 676,
57, 209, 0, 458, 201, 194, 0, 198, 174, 198,
0, 0, 256, 685, 686, 687, 688, 689, 690, 691,
0, 0, 708, 0, 93, 94, 0, 0, 0, 45,
629, 630, 0, 0, 0, 0, 621, 0, 644, 0,
0, 0, 496, 0, 0, 494, 461, 718, 717, 730,
734, 667, 665, 0, 756, 0, 748, 751, 747, 750,
55, 0, 56, 208, 0, 0, 206, 0, 203, 205,
192, 163, 164, 178, 181, 0, 0, 0, 298, 0,
0, 0, 0, 282, 587, 589, 588, 590, 0, 0,
0, 592, 609, 610, 495, 497, 498, 455, 736, 0,
729, 732, -2, 0, 0, 746, 0, 467, 0, 459,
124, 0, 202, 204, 700, 457, 297, 0, 0, 95,
96, 89, 591, 0, 0, 0, 723, 721, 721, 734,
0, 738, 0, 743, 0, 754, 752, 0, 207, 85,
702, 299, 0, 92, 622, 0, 625, 726, 0, 719,
722, 720, 731, 0, 737, 0, 0, 735, 0, 0,
703, 704, 0, 279, 623, 715, 0, 724, 725, 733,
0, 0, 0, 0, 0, 0, 727, 728, 739, 741,
241, 701, 0, 0, 242, 243, 0, 0, 0, 624,
244, 0, 0, 0, 300, 301, 247, 249, 250, 0,
0, 248, 251, 252, 253,
}
var yyTok1 = [...]int{
1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 104, 3, 3, 3, 131, 123, 3,
80, 82, 128, 126, 81, 127, 143, 129, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 407,
112, 111, 113, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 133, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 122, 3, 134,
}
var yyTok2 = [...]int{
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 83, 84,
85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 105,
106, 107, 108, 109, 110, 114, 115, 116, 117, 118,
119, 120, 121, 124, 125, 130, 132, 135, 136, 137,
138, 139, 140, 141, 142, 144, 145, 146, 147, 148,
149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
269, 270, 271, 272, 273, 274,
}
var yyTok3 = [...]int{
57600, 275, 57601, 276, 57602, 277, 57603, 278, 57604, 279,
57605, 280, 57606, 281, 57607, 282, 57608, 283, 57609, 284,
57610, 285, 57611, 286, 57612, 287, 57613, 288, 57614, 289,
57615, 290, 57616, 291, 57617, 292, 57618, 293, 57619, 294,
57620, 295, 57621, 296, 57622, 297, 57623, 298, 57624, 299,
57625, 300, 57626, 301, 57627, 302, 57628, 303, 57629, 304,
57630, 305, 57631, 306, 57632, 307, 57633, 308, 57634, 309,
57635, 310, 57636, 311, 57637, 312, 57638, 313, 57639, 314,
57640, 315, 57641, 316, 57642, 317, 57643, 318, 57644, 319,
57645, 320, 57646, 321, 57647, 322, 57648, 323, 57649, 324,
57650, 325, 57651, 326, 57652, 327, 57653, 328, 57654, 329,
57655, 330, 57656, 331, 57657, 332, 57658, 333, 57659, 334,
57660, 335, 57661, 336, 57662, 337, 57663, 338, 57664, 339,
57665, 340, 57666, 341, 57667, 342, 57668, 343, 57669, 344,
57670, 345, 57671, 346, 57672, 347, 57673, 348, 57674, 349,
57675, 350, 57676, 351, 57677, 352, 57678, 353, 57679, 354,
57680, 355, 57681, 356, 57682, 357, 57683, 358, 57684, 359,
57685, 360, 57686, 361, 57687, 362, 57688, 363, 57689, 364,
57690, 365, 57691, 366, 57692, 367, 57693, 368, 57694, 369,
57695, 370, 57696, 371, 57697, 372, 57698, 373, 57699, 374,
57700, 375, 57701, 376, 57702, 377, 57703, 378, 57704, 379,
57705, 380, 57706, 381, 57707, 382, 57708, 383, 57709, 384,
57710, 385, 57711, 386, 57712, 387, 57713, 388, 57714, 389,
57715, 390, 57716, 391, 57717, 392, 57718, 393, 57719, 394,
57720, 395, 57721, 396, 57722, 397, 57723, 398, 57724, 399,
57725, 400, 57726, 401, 57727, 402, 57728, 403, 57729, 404,
57730, 405, 57731, 406, 0,
}
var yyErrorMessages = [...]struct {
state int
token int
msg string
}{}
//line yaccpar:1
/* parser for yacc output */
var (
yyDebug = 0
yyErrorVerbose = false
)
type yyLexer interface {
Lex(lval *yySymType) int
Error(s string)
}
type yyParser interface {
Parse(yyLexer) int
Lookahead() int
}
type yyParserImpl struct {
lval yySymType
stack [yyInitialStackSize]yySymType
char int
}
func (p *yyParserImpl) Lookahead() int {
return p.char
}
func yyNewParser() yyParser {
return &yyParserImpl{}
}
const yyFlag = -1000
func yyTokname(c int) string {
if c >= 1 && c-1 < len(yyToknames) {
if yyToknames[c-1] != "" {
return yyToknames[c-1]
}
}
return __yyfmt__.Sprintf("tok-%v", c)
}
func yyStatname(s int) string {
if s >= 0 && s < len(yyStatenames) {
if yyStatenames[s] != "" {
return yyStatenames[s]
}
}
return __yyfmt__.Sprintf("state-%v", s)
}
func yyErrorMessage(state, lookAhead int) string {
const TOKSTART = 4
if !yyErrorVerbose {
return "syntax error"
}
for _, e := range yyErrorMessages {
if e.state == state && e.token == lookAhead {
return "syntax error: " + e.msg
}
}
res := "syntax error: unexpected " + yyTokname(lookAhead)
// To match Bison, suggest at most four expected tokens.
expected := make([]int, 0, 4)
// Look for shiftable tokens.
base := yyPact[state]
for tok := TOKSTART; tok-1 < len(yyToknames); tok++ {
if n := base + tok; n >= 0 && n < yyLast && yyChk[yyAct[n]] == tok {
if len(expected) == cap(expected) {
return res
}
expected = append(expected, tok)
}
}
if yyDef[state] == -2 {
i := 0
for yyExca[i] != -1 || yyExca[i+1] != state {
i += 2
}
// Look for tokens that we accept or reduce.
for i += 2; yyExca[i] >= 0; i += 2 {
tok := yyExca[i]
if tok < TOKSTART || yyExca[i+1] == 0 {
continue
}
if len(expected) == cap(expected) {
return res
}
expected = append(expected, tok)
}
// If the default action is to accept or reduce, give up.
if yyExca[i+1] != 0 {
return res
}
}
for i, tok := range expected {
if i == 0 {
res += ", expecting "
} else {
res += " or "
}
res += yyTokname(tok)
}
return res
}
func yylex1(lex yyLexer, lval *yySymType) (char, token int) {
token = 0
char = lex.Lex(lval)
if char <= 0 {
token = yyTok1[0]
goto out
}
if char < len(yyTok1) {
token = yyTok1[char]
goto out
}
if char >= yyPrivate {
if char < yyPrivate+len(yyTok2) {
token = yyTok2[char-yyPrivate]
goto out
}
}
for i := 0; i < len(yyTok3); i += 2 {
token = yyTok3[i+0]
if token == char {
token = yyTok3[i+1]
goto out
}
}
out:
if token == 0 {
token = yyTok2[1] /* unknown char */
}
if yyDebug >= 3 {
__yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char))
}
return char, token
}
func yyParse(yylex yyLexer) int {
return yyNewParser().Parse(yylex)
}
func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int {
var yyn int
var yyVAL yySymType
var yyDollar []yySymType
_ = yyDollar // silence set and not used
yyS := yyrcvr.stack[:]
Nerrs := 0 /* number of errors */
Errflag := 0 /* error recovery flag */
yystate := 0
yyrcvr.char = -1
yytoken := -1 // yyrcvr.char translated into internal numbering
defer func() {
// Make sure we report no lookahead when not parsing.
yystate = -1
yyrcvr.char = -1
yytoken = -1
}()
yyp := -1
goto yystack
ret0:
return 0
ret1:
return 1
yystack:
/* put a state and value onto the stack */
if yyDebug >= 4 {
__yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate))
}
yyp++
if yyp >= len(yyS) {
nyys := make([]yySymType, len(yyS)*2)
copy(nyys, yyS)
yyS = nyys
}
yyS[yyp] = yyVAL
yyS[yyp].yys = yystate
yynewstate:
yyn = yyPact[yystate]
if yyn <= yyFlag {
goto yydefault /* simple state */
}
if yyrcvr.char < 0 {
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
}
yyn += yytoken
if yyn < 0 || yyn >= yyLast {
goto yydefault
}
yyn = yyAct[yyn]
if yyChk[yyn] == yytoken { /* valid shift */
yyrcvr.char = -1
yytoken = -1
yyVAL = yyrcvr.lval
yystate = yyn
if Errflag > 0 {
Errflag--
}
goto yystack
}
yydefault:
/* default state action */
yyn = yyDef[yystate]
if yyn == -2 {
if yyrcvr.char < 0 {
yyrcvr.char, yytoken = yylex1(yylex, &yyrcvr.lval)
}
/* look through exception table */
xi := 0
for {
if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate {
break
}
xi += 2
}
for xi += 2; ; xi += 2 {
yyn = yyExca[xi+0]
if yyn < 0 || yyn == yytoken {
break
}
}
yyn = yyExca[xi+1]
if yyn < 0 {
goto ret0
}
}
if yyn == 0 {
/* error ... attempt to resume parsing */
switch Errflag {
case 0: /* brand new error */
yylex.Error(yyErrorMessage(yystate, yytoken))
Nerrs++
if yyDebug >= 1 {
__yyfmt__.Printf("%s", yyStatname(yystate))
__yyfmt__.Printf(" saw %s\n", yyTokname(yytoken))
}
fallthrough
case 1, 2: /* incompletely recovered error ... try again */
Errflag = 3
/* find a state where "error" is a legal shift action */
for yyp >= 0 {
yyn = yyPact[yyS[yyp].yys] + yyErrCode
if yyn >= 0 && yyn < yyLast {
yystate = yyAct[yyn] /* simulate a shift of "error" */
if yyChk[yystate] == yyErrCode {
goto yystack
}
}
/* the current p has no shift on "error", pop stack */
if yyDebug >= 2 {
__yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys)
}
yyp--
}
/* there is no state on the stack with an error shift ... abort */
goto ret1
case 3: /* no shift yet; clobber input char */
if yyDebug >= 2 {
__yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken))
}
if yytoken == yyEofCode {
goto ret1
}
yyrcvr.char = -1
yytoken = -1
goto yynewstate /* try again in the same state */
}
}
/* reduction by production yyn */
if yyDebug >= 2 {
__yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate))
}
yynt := yyn
yypt := yyp
_ = yypt // guard against "declared and not used"
yyp -= yyR2[yyn]
// yyp is now the index of $0. Perform the default action. Iff the
// reduced production is ε, $1 is possibly out of range.
if yyp+1 >= len(yyS) {
nyys := make([]yySymType, len(yyS)*2)
copy(nyys, yyS)
yyS = nyys
}
yyVAL = yyS[yyp+1]
/* consult goto table to find next state */
yyn = yyR1[yyn]
yyg := yyPgo[yyn]
yyj := yyg + yyS[yyp].yys + 1
if yyj >= yyLast {
yystate = yyAct[yyg]
} else {
yystate = yyAct[yyj]
if yyChk[yystate] != -yyn {
yystate = yyAct[yyg]
}
}
// dummy call; replaced with literal code
switch yynt {
case 1:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:388
{
setParseTree(yylex, yyDollar[1].statement)
}
case 2:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:393
{
}
case 3:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:394
{
}
case 4:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:398
{
yyVAL.statement = yyDollar[1].selStmt
}
case 32:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:429
{
setParseTree(yylex, nil)
}
case 33:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:435
{
yyVAL.colIdent = NewColIdentWithAt(string(yyDollar[1].bytes), NoAt)
}
case 34:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:439
{
yyVAL.colIdent = NewColIdentWithAt(string(yyDollar[1].bytes), SingleAt)
}
case 35:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:443
{
yyVAL.colIdent = NewColIdentWithAt(string(yyDollar[1].bytes), DoubleAt)
}
case 36:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:448
{
yyVAL.colIdent = NewColIdentWithAt("", NoAt)
}
case 37:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:452
{
yyVAL.colIdent = yyDollar[1].colIdent
}
case 38:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:458
{
yyVAL.statement = &OtherAdmin{}
}
case 39:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:464
{
yyVAL.statement = &Load{}
}
case 40:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:470
{
sel := yyDollar[1].selStmt.(*Select)
sel.OrderBy = yyDollar[2].orderBy
sel.Limit = yyDollar[3].limit
sel.Lock = yyDollar[4].lock
sel.Into = yyDollar[5].selectInto
yyVAL.selStmt = sel
}
case 41:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:479
{
yyVAL.selStmt = &Union{FirstStatement: &ParenSelect{Select: yyDollar[2].selStmt}, OrderBy: yyDollar[4].orderBy, Limit: yyDollar[5].limit, Lock: yyDollar[6].lock}
}
case 42:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:483
{
yyVAL.selStmt = Unionize(yyDollar[1].selStmt, yyDollar[3].selStmt, yyDollar[2].boolean, yyDollar[4].orderBy, yyDollar[5].limit, yyDollar[6].lock)
}
case 43:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:487
{
yyVAL.selStmt = NewSelect(Comments(yyDollar[2].bytes2), SelectExprs{Nextval{Expr: yyDollar[5].expr}}, []string{yyDollar[3].str} /*options*/, TableExprs{&AliasedTableExpr{Expr: yyDollar[7].tableName}}, nil /*where*/, nil /*groupBy*/, nil /*having*/)
}
case 44:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:510
{
sel := yyDollar[1].selStmt.(*Select)
sel.OrderBy = yyDollar[2].orderBy
sel.Limit = yyDollar[3].limit
sel.Lock = yyDollar[4].lock
yyVAL.selStmt = sel
}
case 45:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:518
{
yyVAL.selStmt = Unionize(yyDollar[1].selStmt, yyDollar[3].selStmt, yyDollar[2].boolean, yyDollar[4].orderBy, yyDollar[5].limit, yyDollar[6].lock)
}
case 46:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:524
{
yyVAL.statement = &Stream{Comments: Comments(yyDollar[2].bytes2), SelectExpr: yyDollar[3].selectExpr, Table: yyDollar[5].tableName}
}
case 47:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:530
{
yyVAL.statement = &VStream{Comments: Comments(yyDollar[2].bytes2), SelectExpr: yyDollar[3].selectExpr, Table: yyDollar[5].tableName, Where: NewWhere(WhereClause, yyDollar[6].expr), Limit: yyDollar[7].limit}
}
case 48:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:538
{
yyVAL.selStmt = NewSelect(Comments(yyDollar[2].bytes2), yyDollar[4].selectExprs /*SelectExprs*/, yyDollar[3].strs /*options*/, yyDollar[5].tableExprs /*from*/, NewWhere(WhereClause, yyDollar[6].expr), GroupBy(yyDollar[7].exprs), NewWhere(HavingClause, yyDollar[8].expr))
}
case 49:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:544
{
yyVAL.selStmt = yyDollar[1].selStmt
}
case 50:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:548
{
yyVAL.selStmt = &ParenSelect{Select: yyDollar[2].selStmt}
}
case 51:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:555
{
// insert_data returns a *Insert pre-filled with Columns & Values
ins := yyDollar[6].ins
ins.Action = yyDollar[1].insertAction
ins.Comments = yyDollar[2].bytes2
ins.Ignore = yyDollar[3].ignore
ins.Table = yyDollar[4].tableName
ins.Partitions = yyDollar[5].partitions
ins.OnDup = OnDup(yyDollar[7].updateExprs)
yyVAL.statement = ins
}
case 52:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:567
{
cols := make(Columns, 0, len(yyDollar[7].updateExprs))
vals := make(ValTuple, 0, len(yyDollar[8].updateExprs))
for _, updateList := range yyDollar[7].updateExprs {
cols = append(cols, updateList.Name.Name)
vals = append(vals, updateList.Expr)
}
yyVAL.statement = &Insert{Action: yyDollar[1].insertAction, Comments: Comments(yyDollar[2].bytes2), Ignore: yyDollar[3].ignore, Table: yyDollar[4].tableName, Partitions: yyDollar[5].partitions, Columns: cols, Rows: Values{vals}, OnDup: OnDup(yyDollar[8].updateExprs)}
}
case 53:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:579
{
yyVAL.insertAction = InsertAct
}
case 54:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:583
{
yyVAL.insertAction = ReplaceAct
}
case 55:
yyDollar = yyS[yypt-9 : yypt+1]
//line sql.y:589
{
yyVAL.statement = &Update{Comments: Comments(yyDollar[2].bytes2), Ignore: yyDollar[3].ignore, TableExprs: yyDollar[4].tableExprs, Exprs: yyDollar[6].updateExprs, Where: NewWhere(WhereClause, yyDollar[7].expr), OrderBy: yyDollar[8].orderBy, Limit: yyDollar[9].limit}
}
case 56:
yyDollar = yyS[yypt-9 : yypt+1]
//line sql.y:595
{
yyVAL.statement = &Delete{Comments: Comments(yyDollar[2].bytes2), Ignore: yyDollar[3].ignore, TableExprs: TableExprs{&AliasedTableExpr{Expr: yyDollar[5].tableName}}, Partitions: yyDollar[6].partitions, Where: NewWhere(WhereClause, yyDollar[7].expr), OrderBy: yyDollar[8].orderBy, Limit: yyDollar[9].limit}
}
case 57:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:599
{
yyVAL.statement = &Delete{Comments: Comments(yyDollar[2].bytes2), Ignore: yyDollar[3].ignore, Targets: yyDollar[5].tableNames, TableExprs: yyDollar[7].tableExprs, Where: NewWhere(WhereClause, yyDollar[8].expr)}
}
case 58:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:603
{
yyVAL.statement = &Delete{Comments: Comments(yyDollar[2].bytes2), Ignore: yyDollar[3].ignore, Targets: yyDollar[4].tableNames, TableExprs: yyDollar[6].tableExprs, Where: NewWhere(WhereClause, yyDollar[7].expr)}
}
case 59:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:607
{
yyVAL.statement = &Delete{Comments: Comments(yyDollar[2].bytes2), Ignore: yyDollar[3].ignore, Targets: yyDollar[4].tableNames, TableExprs: yyDollar[6].tableExprs, Where: NewWhere(WhereClause, yyDollar[7].expr)}
}
case 60:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:612
{
}
case 61:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:613
{
}
case 62:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:617
{
yyVAL.tableNames = TableNames{yyDollar[1].tableName}
}
case 63:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:621
{
yyVAL.tableNames = append(yyVAL.tableNames, yyDollar[3].tableName)
}
case 64:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:627
{
yyVAL.tableNames = TableNames{yyDollar[1].tableName}
}
case 65:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:631
{
yyVAL.tableNames = append(yyVAL.tableNames, yyDollar[3].tableName)
}
case 66:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:636
{
yyVAL.partitions = nil
}
case 67:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:640
{
yyVAL.partitions = yyDollar[3].partitions
}
case 68:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:646
{
yyVAL.statement = &Set{Comments: Comments(yyDollar[2].bytes2), Exprs: yyDollar[3].setExprs}
}
case 69:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:652
{
yyVAL.statement = &SetTransaction{Comments: Comments(yyDollar[2].bytes2), Scope: yyDollar[3].scope, Characteristics: yyDollar[5].characteristics}
}
case 70:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:656
{
yyVAL.statement = &SetTransaction{Comments: Comments(yyDollar[2].bytes2), Characteristics: yyDollar[4].characteristics, Scope: ImplicitScope}
}
case 71:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:662
{
yyVAL.characteristics = []Characteristic{yyDollar[1].characteristic}
}
case 72:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:666
{
yyVAL.characteristics = append(yyVAL.characteristics, yyDollar[3].characteristic)
}
case 73:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:672
{
yyVAL.characteristic = yyDollar[3].isolationLevel
}
case 74:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:676
{
yyVAL.characteristic = ReadWrite
}
case 75:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:680
{
yyVAL.characteristic = ReadOnly
}
case 76:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:686
{
yyVAL.isolationLevel = RepeatableRead
}
case 77:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:690
{
yyVAL.isolationLevel = ReadCommitted
}
case 78:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:694
{
yyVAL.isolationLevel = ReadUncommitted
}
case 79:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:698
{
yyVAL.isolationLevel = Serializable
}
case 80:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:704
{
yyVAL.scope = SessionScope
}
case 81:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:708
{
yyVAL.scope = GlobalScope
}
case 82:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:714
{
yyDollar[1].createTable.TableSpec = yyDollar[2].TableSpec
yyDollar[1].createTable.FullyParsed = true
yyVAL.statement = yyDollar[1].createTable
}
case 83:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:720
{
// Create table [name] like [name]
yyDollar[1].createTable.OptLike = yyDollar[2].optLike
yyDollar[1].createTable.FullyParsed = true
yyVAL.statement = yyDollar[1].createTable
}
case 84:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:727
{
yyDollar[1].createIndex.Columns = yyDollar[3].indexColumns
yyDollar[1].createIndex.Options = append(yyDollar[5].indexOptions, yyDollar[6].indexOptions...)
yyDollar[1].createIndex.FullyParsed = true
yyVAL.statement = yyDollar[1].createIndex
}
case 85:
yyDollar = yyS[yypt-11 : yypt+1]
//line sql.y:734
{
yyVAL.statement = &CreateView{ViewName: yyDollar[7].tableName.ToViewName(), IsReplace: yyDollar[2].boolean, Algorithm: yyDollar[3].str, Definer: yyDollar[4].str, Security: yyDollar[5].str, Columns: yyDollar[8].columns, Select: yyDollar[10].selStmt, CheckOption: yyDollar[11].str}
}
case 86:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:738
{
yyDollar[1].createDatabase.FullyParsed = true
yyDollar[1].createDatabase.CreateOptions = yyDollar[2].collateAndCharsets
yyVAL.statement = yyDollar[1].createDatabase
}
case 87:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:745
{
yyVAL.boolean = false
}
case 88:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:749
{
yyVAL.boolean = true
}
case 89:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:754
{
yyVAL.colIdent = NewColIdent("")
}
case 90:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:758
{
yyVAL.colIdent = yyDollar[2].colIdent
}
case 91:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:764
{
yyVAL.colIdent = yyDollar[1].colIdent
}
case 92:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:769
{
var v []VindexParam
yyVAL.vindexParams = v
}
case 93:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:774
{
yyVAL.vindexParams = yyDollar[2].vindexParams
}
case 94:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:780
{
yyVAL.vindexParams = make([]VindexParam, 0, 4)
yyVAL.vindexParams = append(yyVAL.vindexParams, yyDollar[1].vindexParam)
}
case 95:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:785
{
yyVAL.vindexParams = append(yyVAL.vindexParams, yyDollar[3].vindexParam)
}
case 96:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:791
{
yyVAL.vindexParam = VindexParam{Key: yyDollar[1].colIdent, Val: yyDollar[3].str}
}
case 97:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:797
{
yyVAL.createTable = &CreateTable{Table: yyDollar[4].tableName, IfNotExists: yyDollar[3].boolean}
setDDL(yylex, yyVAL.createTable)
}
case 98:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:804
{
yyVAL.createIndex = &CreateIndex{Constraint: yyDollar[2].str, Name: yyDollar[4].colIdent, IndexType: yyDollar[5].str, Table: yyDollar[7].tableName}
setDDL(yylex, yyVAL.createIndex)
}
case 99:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:811
{
yyVAL.createDatabase = &CreateDatabase{DBName: string(yyDollar[4].colIdent.String()), IfNotExists: yyDollar[3].boolean}
setDDL(yylex, yyVAL.createDatabase)
}
case 100:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:818
{
yyVAL.alterDatabase = &AlterDatabase{}
setDDL(yylex, yyVAL.alterDatabase)
}
case 103:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:829
{
yyVAL.TableSpec = yyDollar[2].TableSpec
yyVAL.TableSpec.Options = yyDollar[4].str
}
case 104:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:835
{
yyVAL.collateAndCharsets = nil
}
case 105:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:839
{
yyVAL.collateAndCharsets = yyDollar[1].collateAndCharsets
}
case 106:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:845
{
yyVAL.collateAndCharsets = []CollateAndCharset{yyDollar[1].collateAndCharset}
}
case 107:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:849
{
yyVAL.collateAndCharsets = []CollateAndCharset{yyDollar[1].collateAndCharset}
}
case 108:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:853
{
yyVAL.collateAndCharsets = append(yyDollar[1].collateAndCharsets, yyDollar[2].collateAndCharset)
}
case 109:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:857
{
yyVAL.collateAndCharsets = append(yyDollar[1].collateAndCharsets, yyDollar[2].collateAndCharset)
}
case 110:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:862
{
yyVAL.boolean = false
}
case 111:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:866
{
yyVAL.boolean = true
}
case 112:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:872
{
yyVAL.collateAndCharset = CollateAndCharset{Type: CharacterSetType, Value: (yyDollar[5].colIdent.String()), IsDefault: yyDollar[1].boolean}
}
case 113:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:876
{
yyVAL.collateAndCharset = CollateAndCharset{Type: CharacterSetType, Value: ("'" + string(yyDollar[5].bytes) + "'"), IsDefault: yyDollar[1].boolean}
}
case 114:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:882
{
yyVAL.collateAndCharset = CollateAndCharset{Type: CollateType, Value: (yyDollar[4].colIdent.String()), IsDefault: yyDollar[1].boolean}
}
case 115:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:886
{
yyVAL.collateAndCharset = CollateAndCharset{Type: CollateType, Value: ("'" + string(yyDollar[4].bytes) + "'"), IsDefault: yyDollar[1].boolean}
}
case 116:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:893
{
yyVAL.optLike = &OptLike{LikeTable: yyDollar[2].tableName}
}
case 117:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:897
{
yyVAL.optLike = &OptLike{LikeTable: yyDollar[3].tableName}
}
case 118:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:903
{
yyVAL.TableSpec = &TableSpec{}
yyVAL.TableSpec.AddColumn(yyDollar[1].columnDefinition)
}
case 119:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:908
{
yyVAL.TableSpec = &TableSpec{}
yyVAL.TableSpec.AddConstraint(yyDollar[1].constraintDefinition)
}
case 120:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:913
{
yyVAL.TableSpec.AddColumn(yyDollar[3].columnDefinition)
}
case 121:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:917
{
yyVAL.TableSpec.AddColumn(yyDollar[3].columnDefinition)
yyVAL.TableSpec.AddConstraint(yyDollar[4].constraintDefinition)
}
case 122:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:922
{
yyVAL.TableSpec.AddIndex(yyDollar[3].indexDefinition)
}
case 123:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:926
{
yyVAL.TableSpec.AddConstraint(yyDollar[3].constraintDefinition)
}
case 124:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:932
{
yyDollar[2].columnType.NotNull = yyDollar[3].boolean
yyDollar[2].columnType.Default = yyDollar[4].optVal
yyDollar[2].columnType.OnUpdate = yyDollar[5].optVal
yyDollar[2].columnType.Autoincrement = yyDollar[6].boolean
yyDollar[2].columnType.KeyOpt = yyDollar[7].colKeyOpt
yyDollar[2].columnType.Comment = yyDollar[8].literal
yyVAL.columnDefinition = &ColumnDefinition{Name: yyDollar[1].colIdent, Type: yyDollar[2].columnType}
}
case 125:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:943
{
yyVAL.columnType = yyDollar[1].columnType
yyVAL.columnType.Unsigned = yyDollar[2].boolean
yyVAL.columnType.Zerofill = yyDollar[3].boolean
}
case 129:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:954
{
yyVAL.columnType = yyDollar[1].columnType
yyVAL.columnType.Length = yyDollar[2].literal
}
case 130:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:959
{
yyVAL.columnType = yyDollar[1].columnType
}
case 131:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:965
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 132:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:969
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 133:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:973
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 134:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:977
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 135:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:981
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 136:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:985
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 137:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:989
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 138:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:993
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 139:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:997
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 140:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1003
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length
yyVAL.columnType.Scale = yyDollar[2].LengthScaleOption.Scale
}
case 141:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1009
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length
yyVAL.columnType.Scale = yyDollar[2].LengthScaleOption.Scale
}
case 142:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1015
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length
yyVAL.columnType.Scale = yyDollar[2].LengthScaleOption.Scale
}
case 143:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1021
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length
yyVAL.columnType.Scale = yyDollar[2].LengthScaleOption.Scale
}
case 144:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1027
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
yyVAL.columnType.Length = yyDollar[2].LengthScaleOption.Length
yyVAL.columnType.Scale = yyDollar[2].LengthScaleOption.Scale
}
case 145:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1035
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 146:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1039
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 147:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1043
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 148:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1047
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 149:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1051
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 150:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1057
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal, Charset: yyDollar[3].str, Collate: yyDollar[4].str}
}
case 151:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1061
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal, Charset: yyDollar[3].str, Collate: yyDollar[4].str}
}
case 152:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1065
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 153:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1069
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 154:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1073
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Charset: yyDollar[2].str, Collate: yyDollar[3].str}
}
case 155:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1077
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Charset: yyDollar[2].str, Collate: yyDollar[3].str}
}
case 156:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1081
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Charset: yyDollar[2].str, Collate: yyDollar[3].str}
}
case 157:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1085
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), Charset: yyDollar[2].str, Collate: yyDollar[3].str}
}
case 158:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1089
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 159:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1093
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 160:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1097
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 161:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1101
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 162:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1105
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 163:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:1109
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), EnumValues: yyDollar[3].strs, Charset: yyDollar[5].str, Collate: yyDollar[6].str}
}
case 164:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:1114
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes), EnumValues: yyDollar[3].strs, Charset: yyDollar[5].str, Collate: yyDollar[6].str}
}
case 165:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1120
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 166:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1124
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 167:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1128
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 168:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1132
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 169:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1136
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 170:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1140
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 171:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1144
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 172:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1148
{
yyVAL.columnType = ColumnType{Type: string(yyDollar[1].bytes)}
}
case 173:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1154
{
yyVAL.strs = make([]string, 0, 4)
yyVAL.strs = append(yyVAL.strs, "'"+string(yyDollar[1].bytes)+"'")
}
case 174:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1159
{
yyVAL.strs = append(yyDollar[1].strs, "'"+string(yyDollar[3].bytes)+"'")
}
case 175:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1164
{
yyVAL.literal = nil
}
case 176:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1168
{
yyVAL.literal = NewIntLiteral(yyDollar[2].bytes)
}
case 177:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1173
{
yyVAL.LengthScaleOption = LengthScaleOption{}
}
case 178:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1177
{
yyVAL.LengthScaleOption = LengthScaleOption{
Length: NewIntLiteral(yyDollar[2].bytes),
Scale: NewIntLiteral(yyDollar[4].bytes),
}
}
case 179:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1185
{
yyVAL.LengthScaleOption = LengthScaleOption{}
}
case 180:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1189
{
yyVAL.LengthScaleOption = LengthScaleOption{
Length: NewIntLiteral(yyDollar[2].bytes),
}
}
case 181:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1195
{
yyVAL.LengthScaleOption = LengthScaleOption{
Length: NewIntLiteral(yyDollar[2].bytes),
Scale: NewIntLiteral(yyDollar[4].bytes),
}
}
case 182:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1203
{
yyVAL.boolean = false
}
case 183:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1207
{
yyVAL.boolean = true
}
case 184:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1212
{
yyVAL.boolean = false
}
case 185:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1216
{
yyVAL.boolean = true
}
case 186:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1222
{
yyVAL.boolean = false
}
case 187:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1226
{
yyVAL.boolean = false
}
case 188:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1230
{
yyVAL.boolean = true
}
case 189:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1235
{
yyVAL.optVal = nil
}
case 190:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1239
{
yyVAL.optVal = yyDollar[2].expr
}
case 191:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1244
{
yyVAL.optVal = nil
}
case 192:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1248
{
yyVAL.optVal = yyDollar[3].expr
}
case 193:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1253
{
yyVAL.boolean = false
}
case 194:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1257
{
yyVAL.boolean = true
}
case 195:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1262
{
yyVAL.str = ""
}
case 196:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1266
{
yyVAL.str = string(yyDollar[3].colIdent.String())
}
case 197:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1270
{
yyVAL.str = string(yyDollar[3].bytes)
}
case 198:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1275
{
yyVAL.str = ""
}
case 199:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1279
{
yyVAL.str = string(yyDollar[2].colIdent.String())
}
case 200:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1283
{
yyVAL.str = string(yyDollar[2].bytes)
}
case 201:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1288
{
yyVAL.colKeyOpt = colKeyNone
}
case 202:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1292
{
yyVAL.colKeyOpt = colKeyPrimary
}
case 203:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1296
{
yyVAL.colKeyOpt = colKey
}
case 204:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1300
{
yyVAL.colKeyOpt = colKeyUniqueKey
}
case 205:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1304
{
yyVAL.colKeyOpt = colKeyUnique
}
case 206:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1309
{
yyVAL.literal = nil
}
case 207:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1313
{
yyVAL.literal = NewStrLiteral(yyDollar[2].bytes)
}
case 208:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1319
{
yyVAL.indexDefinition = &IndexDefinition{Info: yyDollar[1].indexInfo, Columns: yyDollar[3].indexColumns, Options: yyDollar[5].indexOptions}
}
case 209:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1324
{
yyVAL.indexOptions = nil
}
case 210:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1328
{
yyVAL.indexOptions = yyDollar[1].indexOptions
}
case 211:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1334
{
yyVAL.indexOptions = []*IndexOption{yyDollar[1].indexOption}
}
case 212:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1338
{
yyVAL.indexOptions = append(yyVAL.indexOptions, yyDollar[2].indexOption)
}
case 213:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1344
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), String: string(yyDollar[2].colIdent.String())}
}
case 214:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1348
{
// should not be string
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), Value: NewIntLiteral(yyDollar[3].bytes)}
}
case 215:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1353
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), Value: NewStrLiteral(yyDollar[2].bytes)}
}
case 216:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1357
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes) + " " + string(yyDollar[2].bytes), Value: NewStrLiteral(yyDollar[3].bytes)}
}
case 217:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1363
{
yyVAL.str = ""
}
case 218:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1367
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 219:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1373
{
yyVAL.indexInfo = &IndexInfo{Type: string(yyDollar[1].bytes) + " " + string(yyDollar[2].bytes), Name: NewColIdent("PRIMARY"), Primary: true, Unique: true}
}
case 220:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1377
{
yyVAL.indexInfo = &IndexInfo{Type: string(yyDollar[1].bytes) + " " + string(yyDollar[2].str), Name: NewColIdent(yyDollar[3].str), Spatial: true, Unique: false}
}
case 221:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1381
{
yyVAL.indexInfo = &IndexInfo{Type: string(yyDollar[1].bytes) + " " + string(yyDollar[2].str), Name: NewColIdent(yyDollar[3].str), Fulltext: true, Unique: false}
}
case 222:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1385
{
yyVAL.indexInfo = &IndexInfo{Type: string(yyDollar[1].bytes) + " " + string(yyDollar[2].str), Name: NewColIdent(yyDollar[3].str), Unique: true}
}
case 223:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1389
{
yyVAL.indexInfo = &IndexInfo{Type: string(yyDollar[1].bytes), Name: NewColIdent(yyDollar[2].str), Unique: true}
}
case 224:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1393
{
yyVAL.indexInfo = &IndexInfo{Type: string(yyDollar[1].str), Name: NewColIdent(yyDollar[2].str), Unique: false}
}
case 225:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1399
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 226:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1403
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 227:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1407
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 228:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1414
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 229:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1418
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 230:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1424
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 231:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1428
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 232:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1433
{
yyVAL.str = ""
}
case 233:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1437
{
yyVAL.str = string(yyDollar[1].colIdent.String())
}
case 234:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1443
{
yyVAL.indexColumns = []*IndexColumn{yyDollar[1].indexColumn}
}
case 235:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1447
{
yyVAL.indexColumns = append(yyVAL.indexColumns, yyDollar[3].indexColumn)
}
case 236:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1453
{
yyVAL.indexColumn = &IndexColumn{Column: yyDollar[1].colIdent, Length: yyDollar[2].literal, Direction: yyDollar[3].orderDirection}
}
case 237:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1459
{
yyVAL.constraintDefinition = &ConstraintDefinition{Name: string(yyDollar[2].colIdent.String()), Details: yyDollar[3].constraintInfo}
}
case 238:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1463
{
yyVAL.constraintDefinition = &ConstraintDefinition{Details: yyDollar[1].constraintInfo}
}
case 239:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1469
{
yyVAL.constraintDefinition = &ConstraintDefinition{Name: string(yyDollar[2].colIdent.String()), Details: yyDollar[3].constraintInfo}
}
case 240:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1473
{
yyVAL.constraintDefinition = &ConstraintDefinition{Details: yyDollar[1].constraintInfo}
}
case 241:
yyDollar = yyS[yypt-10 : yypt+1]
//line sql.y:1479
{
yyVAL.constraintInfo = &ForeignKeyDefinition{Source: yyDollar[4].columns, ReferencedTable: yyDollar[7].tableName, ReferencedColumns: yyDollar[9].columns}
}
case 242:
yyDollar = yyS[yypt-11 : yypt+1]
//line sql.y:1483
{
yyVAL.constraintInfo = &ForeignKeyDefinition{Source: yyDollar[4].columns, ReferencedTable: yyDollar[7].tableName, ReferencedColumns: yyDollar[9].columns, OnDelete: yyDollar[11].ReferenceAction}
}
case 243:
yyDollar = yyS[yypt-11 : yypt+1]
//line sql.y:1487
{
yyVAL.constraintInfo = &ForeignKeyDefinition{Source: yyDollar[4].columns, ReferencedTable: yyDollar[7].tableName, ReferencedColumns: yyDollar[9].columns, OnUpdate: yyDollar[11].ReferenceAction}
}
case 244:
yyDollar = yyS[yypt-12 : yypt+1]
//line sql.y:1491
{
yyVAL.constraintInfo = &ForeignKeyDefinition{Source: yyDollar[4].columns, ReferencedTable: yyDollar[7].tableName, ReferencedColumns: yyDollar[9].columns, OnDelete: yyDollar[11].ReferenceAction, OnUpdate: yyDollar[12].ReferenceAction}
}
case 245:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1495
{
yyVAL.constraintInfo = yyDollar[1].constraintInfo
}
case 246:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1501
{
yyVAL.constraintInfo = &CheckConstraintDefinition{Expr: yyDollar[3].expr, Enforced: yyDollar[5].boolean}
}
case 247:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1507
{
yyVAL.ReferenceAction = yyDollar[3].ReferenceAction
}
case 248:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1513
{
yyVAL.ReferenceAction = yyDollar[3].ReferenceAction
}
case 249:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1519
{
yyVAL.ReferenceAction = Restrict
}
case 250:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1523
{
yyVAL.ReferenceAction = Cascade
}
case 251:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1527
{
yyVAL.ReferenceAction = NoAction
}
case 252:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1531
{
yyVAL.ReferenceAction = SetDefault
}
case 253:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1535
{
yyVAL.ReferenceAction = SetNull
}
case 254:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1540
{
yyVAL.boolean = true
}
case 255:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1544
{
yyVAL.boolean = true
}
case 256:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1548
{
yyVAL.boolean = false
}
case 257:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1553
{
yyVAL.str = ""
}
case 258:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1557
{
yyVAL.str = " " + string(yyDollar[1].str)
}
case 259:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1561
{
yyVAL.str = string(yyDollar[1].str) + ", " + string(yyDollar[3].str)
}
case 260:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1569
{
yyVAL.str = yyDollar[1].str
}
case 261:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1573
{
yyVAL.str = yyDollar[1].str + " " + yyDollar[2].str
}
case 262:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1577
{
yyVAL.str = yyDollar[1].str + "=" + yyDollar[3].str
}
case 263:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1583
{
yyVAL.str = yyDollar[1].colIdent.String()
}
case 264:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1587
{
yyVAL.str = "'" + string(yyDollar[1].bytes) + "'"
}
case 265:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1591
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 266:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1597
{
yyVAL.statement = &DDL{Action: AlterDDLAction, Table: yyDollar[3].tableName}
}
case 267:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:1601
{
yyVAL.statement = &DDL{Action: AlterDDLAction, Table: yyDollar[3].tableName}
}
case 268:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:1605
{
yyVAL.statement = &DDL{Action: AlterDDLAction, Table: yyDollar[3].tableName}
}
case 269:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:1609
{
// Change this to a rename statement
yyVAL.statement = &DDL{Action: RenameDDLAction, FromTables: TableNames{yyDollar[3].tableName}, ToTables: TableNames{yyDollar[6].tableName}}
}
case 270:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:1614
{
// Rename an index can just be an alter
yyVAL.statement = &DDL{Action: AlterDDLAction, Table: yyDollar[3].tableName}
}
case 271:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1619
{
yyVAL.statement = &DDL{Action: AlterDDLAction, Table: yyDollar[3].tableName.ToViewName()}
}
case 272:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1623
{
yyVAL.statement = &DDL{Action: AlterDDLAction, Table: yyDollar[3].tableName, PartitionSpec: yyDollar[4].partSpec}
}
case 273:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1627
{
yyDollar[1].alterDatabase.FullyParsed = true
yyDollar[1].alterDatabase.DBName = yyDollar[2].colIdent.String()
yyDollar[1].alterDatabase.AlterOptions = yyDollar[3].collateAndCharsets
yyVAL.statement = yyDollar[1].alterDatabase
}
case 274:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:1634
{
yyDollar[1].alterDatabase.FullyParsed = true
yyDollar[1].alterDatabase.DBName = yyDollar[2].colIdent.String()
yyDollar[1].alterDatabase.UpdateDataDirectory = true
yyVAL.statement = yyDollar[1].alterDatabase
}
case 275:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:1641
{
yyVAL.statement = &DDL{
Action: CreateVindexDDLAction,
Table: yyDollar[5].tableName,
VindexSpec: &VindexSpec{
Name: NewColIdent(yyDollar[5].tableName.Name.String()),
Type: yyDollar[6].colIdent,
Params: yyDollar[7].vindexParams,
},
}
}
case 276:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1653
{
yyVAL.statement = &DDL{
Action: DropVindexDDLAction,
Table: yyDollar[5].tableName,
VindexSpec: &VindexSpec{
Name: NewColIdent(yyDollar[5].tableName.Name.String()),
},
}
}
case 277:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1663
{
yyVAL.statement = &DDL{Action: AddVschemaTableDDLAction, Table: yyDollar[5].tableName}
}
case 278:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1667
{
yyVAL.statement = &DDL{Action: DropVschemaTableDDLAction, Table: yyDollar[5].tableName}
}
case 279:
yyDollar = yyS[yypt-12 : yypt+1]
//line sql.y:1671
{
yyVAL.statement = &DDL{
Action: AddColVindexDDLAction,
Table: yyDollar[4].tableName,
VindexSpec: &VindexSpec{
Name: yyDollar[7].colIdent,
Type: yyDollar[11].colIdent,
Params: yyDollar[12].vindexParams,
},
VindexCols: yyDollar[9].columns,
}
}
case 280:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:1684
{
yyVAL.statement = &DDL{
Action: DropColVindexDDLAction,
Table: yyDollar[4].tableName,
VindexSpec: &VindexSpec{
Name: yyDollar[7].colIdent,
},
}
}
case 281:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1694
{
yyVAL.statement = &DDL{Action: AddSequenceDDLAction, Table: yyDollar[5].tableName}
}
case 282:
yyDollar = yyS[yypt-9 : yypt+1]
//line sql.y:1698
{
yyVAL.statement = &DDL{
Action: AddAutoIncDDLAction,
Table: yyDollar[4].tableName,
AutoIncSpec: &AutoIncSpec{
Column: yyDollar[7].colIdent,
Sequence: yyDollar[9].tableName,
},
}
}
case 297:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:1727
{
yyVAL.partSpec = &PartitionSpec{Action: ReorganizeAction, Name: yyDollar[3].colIdent, Definitions: yyDollar[6].partDefs}
}
case 298:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1733
{
yyVAL.partDefs = []*PartitionDefinition{yyDollar[1].partDef}
}
case 299:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1737
{
yyVAL.partDefs = append(yyDollar[1].partDefs, yyDollar[3].partDef)
}
case 300:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:1743
{
yyVAL.partDef = &PartitionDefinition{Name: yyDollar[2].colIdent, Limit: yyDollar[7].expr}
}
case 301:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:1747
{
yyVAL.partDef = &PartitionDefinition{Name: yyDollar[2].colIdent, Maxvalue: true}
}
case 302:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1753
{
yyVAL.statement = yyDollar[3].ddl
}
case 303:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1759
{
yyVAL.ddl = &DDL{Action: RenameDDLAction, FromTables: TableNames{yyDollar[1].tableName}, ToTables: TableNames{yyDollar[3].tableName}}
}
case 304:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1763
{
yyVAL.ddl = yyDollar[1].ddl
yyVAL.ddl.FromTables = append(yyVAL.ddl.FromTables, yyDollar[3].tableName)
yyVAL.ddl.ToTables = append(yyVAL.ddl.ToTables, yyDollar[5].tableName)
}
case 305:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1771
{
yyVAL.statement = &DDL{Action: DropDDLAction, FromTables: yyDollar[4].tableNames, IfExists: yyDollar[3].boolean}
}
case 306:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:1775
{
// Change this to an alter statement
yyVAL.statement = &DDL{Action: AlterDDLAction, Table: yyDollar[5].tableName}
}
case 307:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1780
{
yyVAL.statement = &DDL{Action: DropDDLAction, FromTables: TableNames{yyDollar[4].tableName.ToViewName()}, IfExists: yyDollar[3].boolean}
}
case 308:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1784
{
yyVAL.statement = &DropDatabase{DBName: string(yyDollar[4].colIdent.String()), IfExists: yyDollar[3].boolean}
}
case 309:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1790
{
yyVAL.statement = &DDL{Action: TruncateDDLAction, Table: yyDollar[3].tableName}
}
case 310:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1794
{
yyVAL.statement = &DDL{Action: TruncateDDLAction, Table: yyDollar[2].tableName}
}
case 311:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1799
{
yyVAL.statement = &OtherRead{}
}
case 312:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1805
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].colIdent.String()), Scope: ImplicitScope}}
}
case 313:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1810
{
showTablesOpt := &ShowTablesOpt{Filter: yyDollar[4].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Type: CharsetStr, ShowTablesOpt: showTablesOpt, Scope: ImplicitScope}}
}
case 314:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1815
{
showTablesOpt := &ShowTablesOpt{Filter: yyDollar[3].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), ShowTablesOpt: showTablesOpt, Scope: ImplicitScope}}
}
case 315:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1820
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].bytes), Scope: ImplicitScope}}
}
case 316:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1825
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].colIdent.String()), Scope: ImplicitScope}}
}
case 317:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1829
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].bytes), Scope: ImplicitScope}}
}
case 318:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1833
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].bytes), Table: yyDollar[4].tableName, Scope: ImplicitScope}}
}
case 319:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1837
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].bytes), Scope: ImplicitScope}}
}
case 320:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1841
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].bytes), Scope: ImplicitScope}}
}
case 321:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1845
{
showTablesOpt := &ShowTablesOpt{Filter: yyDollar[3].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), ShowTablesOpt: showTablesOpt, Scope: ImplicitScope}}
}
case 322:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1850
{
showTablesOpt := &ShowTablesOpt{Filter: yyDollar[3].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), ShowTablesOpt: showTablesOpt, Scope: ImplicitScope}}
}
case 323:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1855
{
showTablesOpt := &ShowTablesOpt{Filter: yyDollar[3].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), ShowTablesOpt: showTablesOpt, Scope: ImplicitScope}}
}
case 324:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1860
{
showTablesOpt := &ShowTablesOpt{Filter: yyDollar[3].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), ShowTablesOpt: showTablesOpt, Scope: ImplicitScope}}
}
case 325:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1865
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), Scope: ImplicitScope}}
}
case 326:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:1869
{
showTablesOpt := &ShowTablesOpt{DbName: yyDollar[6].str, Filter: yyDollar[7].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Extended: string(yyDollar[2].str), Type: string(yyDollar[3].str), ShowTablesOpt: showTablesOpt, OnTable: yyDollar[5].tableName, Scope: ImplicitScope}}
}
case 327:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1874
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), Scope: ImplicitScope}}
}
case 328:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1878
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), Scope: ImplicitScope}}
}
case 329:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1882
{
yyVAL.statement = &Show{&ShowLegacy{Scope: yyDollar[2].scope, Type: string(yyDollar[3].bytes)}}
}
case 330:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1886
{
yyVAL.statement = &Show{&ShowTableStatus{DatabaseName: yyDollar[4].str, Filter: yyDollar[5].showFilter}}
}
case 331:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:1890
{
yyVAL.statement = &Show{&ShowColumns{Full: yyDollar[2].str, Table: yyDollar[5].tableName, DbName: yyDollar[6].str, Filter: yyDollar[7].showFilter}}
}
case 332:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1894
{
// this is ugly, but I couldn't find a better way for now
if yyDollar[3].str == "processlist" {
yyVAL.statement = &Show{&ShowLegacy{Type: yyDollar[3].str, Scope: ImplicitScope}}
} else {
showTablesOpt := &ShowTablesOpt{Full: yyDollar[2].str, DbName: yyDollar[4].str, Filter: yyDollar[5].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Type: yyDollar[3].str, ShowTablesOpt: showTablesOpt, Scope: ImplicitScope}}
}
}
case 333:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1904
{
yyVAL.statement = &Show{&ShowLegacy{Scope: yyDollar[2].scope, Type: string(yyDollar[3].bytes)}}
}
case 334:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1908
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), Scope: ImplicitScope}}
}
case 335:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1912
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), ShowCollationFilterOpt: yyDollar[4].expr, Scope: ImplicitScope}}
}
case 336:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:1916
{
showTablesOpt := &ShowTablesOpt{Filter: yyDollar[4].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Scope: VitessMetadataScope, Type: string(yyDollar[3].bytes), ShowTablesOpt: showTablesOpt}}
}
case 337:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1921
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].bytes), Scope: ImplicitScope}}
}
case 338:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1925
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].bytes), Scope: ImplicitScope}}
}
case 339:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:1929
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes) + " " + string(yyDollar[3].bytes), OnTable: yyDollar[5].tableName, Scope: ImplicitScope}}
}
case 340:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:1933
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].bytes), Scope: ImplicitScope}}
}
case 341:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1938
{
// This should probably be a different type (ShowVitessTopoOpt), but
// just getting the thing working for now
showTablesOpt := &ShowTablesOpt{Filter: yyDollar[3].showFilter}
yyVAL.statement = &Show{&ShowLegacy{Type: yyDollar[2].str, ShowTablesOpt: showTablesOpt}}
}
case 342:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:1952
{
yyVAL.statement = &Show{&ShowLegacy{Type: string(yyDollar[2].colIdent.String()), Scope: ImplicitScope}}
}
case 343:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1958
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 344:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1962
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 345:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1968
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 346:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1972
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 347:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1978
{
yyVAL.str = ""
}
case 348:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1982
{
yyVAL.str = "extended "
}
case 349:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:1988
{
yyVAL.str = ""
}
case 350:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1992
{
yyVAL.str = "full "
}
case 351:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:1998
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 352:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2002
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 353:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2008
{
yyVAL.str = ""
}
case 354:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2012
{
yyVAL.str = yyDollar[2].tableIdent.v
}
case 355:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2016
{
yyVAL.str = yyDollar[2].tableIdent.v
}
case 356:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2022
{
yyVAL.showFilter = nil
}
case 357:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2026
{
yyVAL.showFilter = &ShowFilter{Like: string(yyDollar[2].bytes)}
}
case 358:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2030
{
yyVAL.showFilter = &ShowFilter{Filter: yyDollar[2].expr}
}
case 359:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2036
{
yyVAL.showFilter = nil
}
case 360:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2040
{
yyVAL.showFilter = &ShowFilter{Like: string(yyDollar[2].bytes)}
}
case 361:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2046
{
yyVAL.scope = ImplicitScope
}
case 362:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2050
{
yyVAL.scope = SessionScope
}
case 363:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2054
{
yyVAL.scope = GlobalScope
}
case 364:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2060
{
yyVAL.statement = &Use{DBName: yyDollar[2].tableIdent}
}
case 365:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2064
{
yyVAL.statement = &Use{DBName: TableIdent{v: ""}}
}
case 366:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2070
{
yyVAL.statement = &Begin{}
}
case 367:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2074
{
yyVAL.statement = &Begin{}
}
case 368:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2080
{
yyVAL.statement = &Commit{}
}
case 369:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2086
{
yyVAL.statement = &Rollback{}
}
case 370:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:2090
{
yyVAL.statement = &SRollback{Name: yyDollar[5].colIdent}
}
case 371:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2095
{
yyVAL.empty = struct{}{}
}
case 372:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2097
{
yyVAL.empty = struct{}{}
}
case 373:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2100
{
yyVAL.empty = struct{}{}
}
case 374:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2102
{
yyVAL.empty = struct{}{}
}
case 375:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2107
{
yyVAL.statement = &Savepoint{Name: yyDollar[2].colIdent}
}
case 376:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2113
{
yyVAL.statement = &Release{Name: yyDollar[3].colIdent}
}
case 377:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2118
{
yyVAL.explainType = EmptyType
}
case 378:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2122
{
yyVAL.explainType = JSONType
}
case 379:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2126
{
yyVAL.explainType = TreeType
}
case 380:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2130
{
yyVAL.explainType = VitessType
}
case 381:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2134
{
yyVAL.explainType = TraditionalType
}
case 382:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2138
{
yyVAL.explainType = AnalyzeType
}
case 383:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2144
{
yyVAL.bytes = yyDollar[1].bytes
}
case 384:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2148
{
yyVAL.bytes = yyDollar[1].bytes
}
case 385:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2152
{
yyVAL.bytes = yyDollar[1].bytes
}
case 386:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2158
{
yyVAL.statement = yyDollar[1].selStmt
}
case 387:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2162
{
yyVAL.statement = yyDollar[1].statement
}
case 388:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2166
{
yyVAL.statement = yyDollar[1].statement
}
case 389:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2170
{
yyVAL.statement = yyDollar[1].statement
}
case 390:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2175
{
yyVAL.str = ""
}
case 391:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2179
{
yyVAL.str = ""
}
case 392:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2183
{
yyVAL.str = ""
}
case 393:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2189
{
yyVAL.statement = &OtherRead{}
}
case 394:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2193
{
yyVAL.statement = &Explain{Type: yyDollar[2].explainType, Statement: yyDollar[3].statement}
}
case 395:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2199
{
yyVAL.statement = &OtherAdmin{}
}
case 396:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2203
{
yyVAL.statement = &OtherAdmin{}
}
case 397:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2209
{
yyVAL.statement = &LockTables{Tables: yyDollar[3].tableAndLockTypes}
}
case 398:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2215
{
yyVAL.tableAndLockTypes = TableAndLockTypes{yyDollar[1].tableAndLockType}
}
case 399:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2219
{
yyVAL.tableAndLockTypes = append(yyDollar[1].tableAndLockTypes, yyDollar[3].tableAndLockType)
}
case 400:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2225
{
yyVAL.tableAndLockType = &TableAndLockType{Table: yyDollar[1].aliasedTableName, Lock: yyDollar[2].lockType}
}
case 401:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2231
{
yyVAL.lockType = Read
}
case 402:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2235
{
yyVAL.lockType = ReadLocal
}
case 403:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2239
{
yyVAL.lockType = Write
}
case 404:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2243
{
yyVAL.lockType = LowPriorityWrite
}
case 405:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2249
{
yyVAL.statement = &UnlockTables{}
}
case 406:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2255
{
yyVAL.statement = &DDL{Action: FlushDDLAction}
}
case 407:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2259
{
setAllowComments(yylex, true)
}
case 408:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2263
{
yyVAL.bytes2 = yyDollar[2].bytes2
setAllowComments(yylex, false)
}
case 409:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2269
{
yyVAL.bytes2 = nil
}
case 410:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2273
{
yyVAL.bytes2 = append(yyDollar[1].bytes2, yyDollar[2].bytes)
}
case 411:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2279
{
yyVAL.boolean = true
}
case 412:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2283
{
yyVAL.boolean = false
}
case 413:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2287
{
yyVAL.boolean = true
}
case 414:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2292
{
yyVAL.str = ""
}
case 415:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2296
{
yyVAL.str = SQLNoCacheStr
}
case 416:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2300
{
yyVAL.str = SQLCacheStr
}
case 417:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2305
{
yyVAL.boolean = false
}
case 418:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2309
{
yyVAL.boolean = true
}
case 419:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2313
{
yyVAL.boolean = true
}
case 420:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2318
{
yyVAL.selectExprs = nil
}
case 421:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2322
{
yyVAL.selectExprs = yyDollar[1].selectExprs
}
case 422:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2327
{
yyVAL.strs = nil
}
case 423:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2331
{
yyVAL.strs = []string{yyDollar[1].str}
}
case 424:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2335
{ // TODO: This is a hack since I couldn't get it to work in a nicer way. I got 'conflicts: 8 shift/reduce'
yyVAL.strs = []string{yyDollar[1].str, yyDollar[2].str}
}
case 425:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2339
{
yyVAL.strs = []string{yyDollar[1].str, yyDollar[2].str, yyDollar[3].str}
}
case 426:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2343
{
yyVAL.strs = []string{yyDollar[1].str, yyDollar[2].str, yyDollar[3].str, yyDollar[4].str}
}
case 427:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2349
{
yyVAL.str = SQLNoCacheStr
}
case 428:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2353
{
yyVAL.str = SQLCacheStr
}
case 429:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2357
{
yyVAL.str = DistinctStr
}
case 430:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2361
{
yyVAL.str = DistinctStr
}
case 431:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2365
{
yyVAL.str = StraightJoinHint
}
case 432:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2369
{
yyVAL.str = SQLCalcFoundRowsStr
}
case 433:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2375
{
yyVAL.selectExprs = SelectExprs{yyDollar[1].selectExpr}
}
case 434:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2379
{
yyVAL.selectExprs = append(yyVAL.selectExprs, yyDollar[3].selectExpr)
}
case 435:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2385
{
yyVAL.selectExpr = &StarExpr{}
}
case 436:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2389
{
yyVAL.selectExpr = &AliasedExpr{Expr: yyDollar[1].expr, As: yyDollar[2].colIdent}
}
case 437:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2393
{
yyVAL.selectExpr = &StarExpr{TableName: TableName{Name: yyDollar[1].tableIdent}}
}
case 438:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:2397
{
yyVAL.selectExpr = &StarExpr{TableName: TableName{Qualifier: yyDollar[1].tableIdent, Name: yyDollar[3].tableIdent}}
}
case 439:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2402
{
yyVAL.colIdent = ColIdent{}
}
case 440:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2406
{
yyVAL.colIdent = yyDollar[1].colIdent
}
case 441:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2410
{
yyVAL.colIdent = yyDollar[2].colIdent
}
case 443:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2417
{
yyVAL.colIdent = NewColIdent(string(yyDollar[1].bytes))
}
case 444:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2422
{
yyVAL.tableExprs = TableExprs{&AliasedTableExpr{Expr: TableName{Name: NewTableIdent("dual")}}}
}
case 445:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2426
{
yyVAL.tableExprs = yyDollar[2].tableExprs
}
case 446:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2432
{
yyVAL.tableExprs = TableExprs{yyDollar[1].tableExpr}
}
case 447:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2436
{
yyVAL.tableExprs = append(yyVAL.tableExprs, yyDollar[3].tableExpr)
}
case 450:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2446
{
yyVAL.tableExpr = yyDollar[1].aliasedTableName
}
case 451:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2450
{
yyVAL.tableExpr = &AliasedTableExpr{Expr: yyDollar[1].derivedTable, As: yyDollar[3].tableIdent}
}
case 452:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2454
{
yyVAL.tableExpr = &ParenTableExpr{Exprs: yyDollar[2].tableExprs}
}
case 453:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2460
{
yyVAL.derivedTable = &DerivedTable{yyDollar[2].selStmt}
}
case 454:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2466
{
yyVAL.aliasedTableName = &AliasedTableExpr{Expr: yyDollar[1].tableName, As: yyDollar[2].tableIdent, Hints: yyDollar[3].indexHints}
}
case 455:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:2470
{
yyVAL.aliasedTableName = &AliasedTableExpr{Expr: yyDollar[1].tableName, Partitions: yyDollar[4].partitions, As: yyDollar[6].tableIdent, Hints: yyDollar[7].indexHints}
}
case 456:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2475
{
yyVAL.columns = nil
}
case 457:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2479
{
yyVAL.columns = yyDollar[2].columns
}
case 458:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2485
{
yyVAL.columns = Columns{yyDollar[1].colIdent}
}
case 459:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2489
{
yyVAL.columns = append(yyVAL.columns, yyDollar[3].colIdent)
}
case 460:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2495
{
yyVAL.partitions = Partitions{yyDollar[1].colIdent}
}
case 461:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2499
{
yyVAL.partitions = append(yyVAL.partitions, yyDollar[3].colIdent)
}
case 462:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2512
{
yyVAL.tableExpr = &JoinTableExpr{LeftExpr: yyDollar[1].tableExpr, Join: yyDollar[2].joinType, RightExpr: yyDollar[3].tableExpr, Condition: yyDollar[4].joinCondition}
}
case 463:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2516
{
yyVAL.tableExpr = &JoinTableExpr{LeftExpr: yyDollar[1].tableExpr, Join: yyDollar[2].joinType, RightExpr: yyDollar[3].tableExpr, Condition: yyDollar[4].joinCondition}
}
case 464:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2520
{
yyVAL.tableExpr = &JoinTableExpr{LeftExpr: yyDollar[1].tableExpr, Join: yyDollar[2].joinType, RightExpr: yyDollar[3].tableExpr, Condition: yyDollar[4].joinCondition}
}
case 465:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2524
{
yyVAL.tableExpr = &JoinTableExpr{LeftExpr: yyDollar[1].tableExpr, Join: yyDollar[2].joinType, RightExpr: yyDollar[3].tableExpr}
}
case 466:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2530
{
yyVAL.joinCondition = JoinCondition{On: yyDollar[2].expr}
}
case 467:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2532
{
yyVAL.joinCondition = JoinCondition{Using: yyDollar[3].columns}
}
case 468:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2536
{
yyVAL.joinCondition = JoinCondition{}
}
case 469:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2538
{
yyVAL.joinCondition = yyDollar[1].joinCondition
}
case 470:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2542
{
yyVAL.joinCondition = JoinCondition{}
}
case 471:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2544
{
yyVAL.joinCondition = JoinCondition{On: yyDollar[2].expr}
}
case 472:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2547
{
yyVAL.empty = struct{}{}
}
case 473:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2549
{
yyVAL.empty = struct{}{}
}
case 474:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2552
{
yyVAL.tableIdent = NewTableIdent("")
}
case 475:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2556
{
yyVAL.tableIdent = yyDollar[1].tableIdent
}
case 476:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2560
{
yyVAL.tableIdent = yyDollar[2].tableIdent
}
case 478:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2567
{
yyVAL.tableIdent = NewTableIdent(string(yyDollar[1].bytes))
}
case 479:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2573
{
yyVAL.joinType = NormalJoinType
}
case 480:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2577
{
yyVAL.joinType = NormalJoinType
}
case 481:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2581
{
yyVAL.joinType = NormalJoinType
}
case 482:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2587
{
yyVAL.joinType = StraightJoinType
}
case 483:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2593
{
yyVAL.joinType = LeftJoinType
}
case 484:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2597
{
yyVAL.joinType = LeftJoinType
}
case 485:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2601
{
yyVAL.joinType = RightJoinType
}
case 486:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2605
{
yyVAL.joinType = RightJoinType
}
case 487:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2611
{
yyVAL.joinType = NaturalJoinType
}
case 488:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2615
{
if yyDollar[2].joinType == LeftJoinType {
yyVAL.joinType = NaturalLeftJoinType
} else {
yyVAL.joinType = NaturalRightJoinType
}
}
case 489:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2625
{
yyVAL.tableName = yyDollar[2].tableName
}
case 490:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2629
{
yyVAL.tableName = yyDollar[1].tableName
}
case 491:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2635
{
yyVAL.tableName = TableName{Name: yyDollar[1].tableIdent}
}
case 492:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2639
{
yyVAL.tableName = TableName{Qualifier: yyDollar[1].tableIdent, Name: yyDollar[3].tableIdent}
}
case 493:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2645
{
yyVAL.tableName = TableName{Name: yyDollar[1].tableIdent}
}
case 494:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2650
{
yyVAL.indexHints = nil
}
case 495:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:2654
{
yyVAL.indexHints = &IndexHints{Type: UseOp, Indexes: yyDollar[4].columns}
}
case 496:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2658
{
yyVAL.indexHints = &IndexHints{Type: UseOp}
}
case 497:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:2662
{
yyVAL.indexHints = &IndexHints{Type: IgnoreOp, Indexes: yyDollar[4].columns}
}
case 498:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:2666
{
yyVAL.indexHints = &IndexHints{Type: ForceOp, Indexes: yyDollar[4].columns}
}
case 499:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2671
{
yyVAL.expr = nil
}
case 500:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2675
{
yyVAL.expr = yyDollar[2].expr
}
case 501:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2681
{
yyVAL.expr = yyDollar[1].expr
}
case 502:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2685
{
yyVAL.expr = &AndExpr{Left: yyDollar[1].expr, Right: yyDollar[3].expr}
}
case 503:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2689
{
yyVAL.expr = &OrExpr{Left: yyDollar[1].expr, Right: yyDollar[3].expr}
}
case 504:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2693
{
yyVAL.expr = &XorExpr{Left: yyDollar[1].expr, Right: yyDollar[3].expr}
}
case 505:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2697
{
yyVAL.expr = &NotExpr{Expr: yyDollar[2].expr}
}
case 506:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2701
{
yyVAL.expr = &IsExpr{Operator: yyDollar[3].isExprOperator, Expr: yyDollar[1].expr}
}
case 507:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2705
{
yyVAL.expr = yyDollar[1].expr
}
case 508:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2709
{
yyVAL.expr = &Default{ColName: yyDollar[2].str}
}
case 509:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2715
{
yyVAL.str = ""
}
case 510:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2719
{
yyVAL.str = string(yyDollar[2].colIdent.String())
}
case 511:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2725
{
yyVAL.boolVal = BoolVal(true)
}
case 512:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2729
{
yyVAL.boolVal = BoolVal(false)
}
case 513:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2735
{
yyVAL.expr = &ComparisonExpr{Left: yyDollar[1].expr, Operator: yyDollar[2].comparisonExprOperator, Right: yyDollar[3].expr}
}
case 514:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2739
{
yyVAL.expr = &ComparisonExpr{Left: yyDollar[1].expr, Operator: InOp, Right: yyDollar[3].colTuple}
}
case 515:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2743
{
yyVAL.expr = &ComparisonExpr{Left: yyDollar[1].expr, Operator: NotInOp, Right: yyDollar[4].colTuple}
}
case 516:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2747
{
yyVAL.expr = &ComparisonExpr{Left: yyDollar[1].expr, Operator: LikeOp, Right: yyDollar[3].expr, Escape: yyDollar[4].expr}
}
case 517:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:2751
{
yyVAL.expr = &ComparisonExpr{Left: yyDollar[1].expr, Operator: NotLikeOp, Right: yyDollar[4].expr, Escape: yyDollar[5].expr}
}
case 518:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2755
{
yyVAL.expr = &ComparisonExpr{Left: yyDollar[1].expr, Operator: RegexpOp, Right: yyDollar[3].expr}
}
case 519:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:2759
{
yyVAL.expr = &ComparisonExpr{Left: yyDollar[1].expr, Operator: NotRegexpOp, Right: yyDollar[4].expr}
}
case 520:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:2763
{
yyVAL.expr = &RangeCond{Left: yyDollar[1].expr, Operator: BetweenOp, From: yyDollar[3].expr, To: yyDollar[5].expr}
}
case 521:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:2767
{
yyVAL.expr = &RangeCond{Left: yyDollar[1].expr, Operator: NotBetweenOp, From: yyDollar[4].expr, To: yyDollar[6].expr}
}
case 522:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2771
{
yyVAL.expr = &ExistsExpr{Subquery: yyDollar[2].subquery}
}
case 523:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2777
{
yyVAL.isExprOperator = IsNullOp
}
case 524:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2781
{
yyVAL.isExprOperator = IsNotNullOp
}
case 525:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2785
{
yyVAL.isExprOperator = IsTrueOp
}
case 526:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2789
{
yyVAL.isExprOperator = IsNotTrueOp
}
case 527:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2793
{
yyVAL.isExprOperator = IsFalseOp
}
case 528:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2797
{
yyVAL.isExprOperator = IsNotFalseOp
}
case 529:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2803
{
yyVAL.comparisonExprOperator = EqualOp
}
case 530:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2807
{
yyVAL.comparisonExprOperator = LessThanOp
}
case 531:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2811
{
yyVAL.comparisonExprOperator = GreaterThanOp
}
case 532:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2815
{
yyVAL.comparisonExprOperator = LessEqualOp
}
case 533:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2819
{
yyVAL.comparisonExprOperator = GreaterEqualOp
}
case 534:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2823
{
yyVAL.comparisonExprOperator = NotEqualOp
}
case 535:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2827
{
yyVAL.comparisonExprOperator = NullSafeEqualOp
}
case 536:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:2832
{
yyVAL.expr = nil
}
case 537:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2836
{
yyVAL.expr = yyDollar[2].expr
}
case 538:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2842
{
yyVAL.colTuple = yyDollar[1].valTuple
}
case 539:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2846
{
yyVAL.colTuple = yyDollar[1].subquery
}
case 540:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2850
{
yyVAL.colTuple = ListArg(yyDollar[1].bytes)
}
case 541:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2856
{
yyVAL.subquery = &Subquery{yyDollar[2].selStmt}
}
case 542:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2862
{
yyVAL.exprs = Exprs{yyDollar[1].expr}
}
case 543:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2866
{
yyVAL.exprs = append(yyDollar[1].exprs, yyDollar[3].expr)
}
case 544:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2872
{
yyVAL.expr = yyDollar[1].expr
}
case 545:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2876
{
yyVAL.expr = yyDollar[1].boolVal
}
case 546:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2880
{
yyVAL.expr = yyDollar[1].colName
}
case 547:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2884
{
yyVAL.expr = yyDollar[1].expr
}
case 548:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:2888
{
yyVAL.expr = yyDollar[1].subquery
}
case 549:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2892
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: BitAndOp, Right: yyDollar[3].expr}
}
case 550:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2896
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: BitOrOp, Right: yyDollar[3].expr}
}
case 551:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2900
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: BitXorOp, Right: yyDollar[3].expr}
}
case 552:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2904
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: PlusOp, Right: yyDollar[3].expr}
}
case 553:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2908
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: MinusOp, Right: yyDollar[3].expr}
}
case 554:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2912
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: MultOp, Right: yyDollar[3].expr}
}
case 555:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2916
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: DivOp, Right: yyDollar[3].expr}
}
case 556:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2920
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: IntDivOp, Right: yyDollar[3].expr}
}
case 557:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2924
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: ModOp, Right: yyDollar[3].expr}
}
case 558:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2928
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: ModOp, Right: yyDollar[3].expr}
}
case 559:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2932
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: ShiftLeftOp, Right: yyDollar[3].expr}
}
case 560:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2936
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].expr, Operator: ShiftRightOp, Right: yyDollar[3].expr}
}
case 561:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2940
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].colName, Operator: JSONExtractOp, Right: yyDollar[3].expr}
}
case 562:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2944
{
yyVAL.expr = &BinaryExpr{Left: yyDollar[1].colName, Operator: JSONUnquoteExtractOp, Right: yyDollar[3].expr}
}
case 563:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:2948
{
yyVAL.expr = &CollateExpr{Expr: yyDollar[1].expr, Charset: yyDollar[3].str}
}
case 564:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2952
{
yyVAL.expr = &UnaryExpr{Operator: BinaryOp, Expr: yyDollar[2].expr}
}
case 565:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2956
{
yyVAL.expr = &UnaryExpr{Operator: UBinaryOp, Expr: yyDollar[2].expr}
}
case 566:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2960
{
yyVAL.expr = &UnaryExpr{Operator: Utf8Op, Expr: yyDollar[2].expr}
}
case 567:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2964
{
yyVAL.expr = &UnaryExpr{Operator: Utf8mb4Op, Expr: yyDollar[2].expr}
}
case 568:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2968
{
yyVAL.expr = &UnaryExpr{Operator: Latin1Op, Expr: yyDollar[2].expr}
}
case 569:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2972
{
if num, ok := yyDollar[2].expr.(*Literal); ok && num.Type == IntVal {
yyVAL.expr = num
} else {
yyVAL.expr = &UnaryExpr{Operator: UPlusOp, Expr: yyDollar[2].expr}
}
}
case 570:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2980
{
if num, ok := yyDollar[2].expr.(*Literal); ok && num.Type == IntVal {
// Handle double negative
if num.Val[0] == '-' {
num.Val = num.Val[1:]
yyVAL.expr = num
} else {
yyVAL.expr = NewIntLiteral(append([]byte("-"), num.Val...))
}
} else {
yyVAL.expr = &UnaryExpr{Operator: UMinusOp, Expr: yyDollar[2].expr}
}
}
case 571:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2994
{
yyVAL.expr = &UnaryExpr{Operator: TildaOp, Expr: yyDollar[2].expr}
}
case 572:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:2998
{
yyVAL.expr = &UnaryExpr{Operator: BangOp, Expr: yyDollar[2].expr}
}
case 573:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3002
{
// This rule prevents the usage of INTERVAL
// as a function. If support is needed for that,
// we'll need to revisit this. The solution
// will be non-trivial because of grammar conflicts.
yyVAL.expr = &IntervalExpr{Expr: yyDollar[2].expr, Unit: yyDollar[3].colIdent.String()}
}
case 578:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3020
{
yyVAL.expr = &FuncExpr{Name: yyDollar[1].colIdent, Exprs: yyDollar[3].selectExprs}
}
case 579:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:3024
{
yyVAL.expr = &FuncExpr{Name: yyDollar[1].colIdent, Distinct: true, Exprs: yyDollar[4].selectExprs}
}
case 580:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:3028
{
yyVAL.expr = &FuncExpr{Name: yyDollar[1].colIdent, Distinct: true, Exprs: yyDollar[4].selectExprs}
}
case 581:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:3032
{
yyVAL.expr = &FuncExpr{Qualifier: yyDollar[1].tableIdent, Name: yyDollar[3].colIdent, Exprs: yyDollar[5].selectExprs}
}
case 582:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3042
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("left"), Exprs: yyDollar[3].selectExprs}
}
case 583:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3046
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("right"), Exprs: yyDollar[3].selectExprs}
}
case 584:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:3050
{
yyVAL.expr = &ConvertExpr{Expr: yyDollar[3].expr, Type: yyDollar[5].convertType}
}
case 585:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:3054
{
yyVAL.expr = &ConvertExpr{Expr: yyDollar[3].expr, Type: yyDollar[5].convertType}
}
case 586:
yyDollar = yyS[yypt-6 : yypt+1]
//line sql.y:3058
{
yyVAL.expr = &ConvertUsingExpr{Expr: yyDollar[3].expr, Type: yyDollar[5].str}
}
case 587:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:3062
{
yyVAL.expr = &SubstrExpr{Name: yyDollar[3].colName, From: yyDollar[5].expr, To: yyDollar[7].expr}
}
case 588:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:3066
{
yyVAL.expr = &SubstrExpr{Name: yyDollar[3].colName, From: yyDollar[5].expr, To: yyDollar[7].expr}
}
case 589:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:3070
{
yyVAL.expr = &SubstrExpr{StrVal: NewStrLiteral(yyDollar[3].bytes), From: yyDollar[5].expr, To: yyDollar[7].expr}
}
case 590:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:3074
{
yyVAL.expr = &SubstrExpr{StrVal: NewStrLiteral(yyDollar[3].bytes), From: yyDollar[5].expr, To: yyDollar[7].expr}
}
case 591:
yyDollar = yyS[yypt-9 : yypt+1]
//line sql.y:3078
{
yyVAL.expr = &MatchExpr{Columns: yyDollar[3].selectExprs, Expr: yyDollar[7].expr, Option: yyDollar[8].matchExprOption}
}
case 592:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:3082
{
yyVAL.expr = &GroupConcatExpr{Distinct: yyDollar[3].boolean, Exprs: yyDollar[4].selectExprs, OrderBy: yyDollar[5].orderBy, Separator: yyDollar[6].str, Limit: yyDollar[7].limit}
}
case 593:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:3086
{
yyVAL.expr = &CaseExpr{Expr: yyDollar[2].expr, Whens: yyDollar[3].whens, Else: yyDollar[4].expr}
}
case 594:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3090
{
yyVAL.expr = &ValuesFuncExpr{Name: yyDollar[3].colName}
}
case 595:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3100
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("current_timestamp")}
}
case 596:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3104
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("utc_timestamp")}
}
case 597:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3108
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("utc_time")}
}
case 598:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3113
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("utc_date")}
}
case 599:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3118
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("localtime")}
}
case 600:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3123
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("localtimestamp")}
}
case 601:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3129
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("current_date")}
}
case 602:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3134
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("current_time")}
}
case 603:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3139
{
yyVAL.expr = &CurTimeFuncExpr{Name: NewColIdent("current_timestamp"), Fsp: yyDollar[2].expr}
}
case 604:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3143
{
yyVAL.expr = &CurTimeFuncExpr{Name: NewColIdent("utc_timestamp"), Fsp: yyDollar[2].expr}
}
case 605:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3147
{
yyVAL.expr = &CurTimeFuncExpr{Name: NewColIdent("utc_time"), Fsp: yyDollar[2].expr}
}
case 606:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3152
{
yyVAL.expr = &CurTimeFuncExpr{Name: NewColIdent("localtime"), Fsp: yyDollar[2].expr}
}
case 607:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3157
{
yyVAL.expr = &CurTimeFuncExpr{Name: NewColIdent("localtimestamp"), Fsp: yyDollar[2].expr}
}
case 608:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3162
{
yyVAL.expr = &CurTimeFuncExpr{Name: NewColIdent("current_time"), Fsp: yyDollar[2].expr}
}
case 609:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:3166
{
yyVAL.expr = &TimestampFuncExpr{Name: string("timestampadd"), Unit: yyDollar[3].colIdent.String(), Expr1: yyDollar[5].expr, Expr2: yyDollar[7].expr}
}
case 610:
yyDollar = yyS[yypt-8 : yypt+1]
//line sql.y:3170
{
yyVAL.expr = &TimestampFuncExpr{Name: string("timestampdiff"), Unit: yyDollar[3].colIdent.String(), Expr1: yyDollar[5].expr, Expr2: yyDollar[7].expr}
}
case 613:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3180
{
yyVAL.expr = yyDollar[2].expr
}
case 614:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3190
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("if"), Exprs: yyDollar[3].selectExprs}
}
case 615:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3194
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("database"), Exprs: yyDollar[3].selectExprs}
}
case 616:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3198
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("schema"), Exprs: yyDollar[3].selectExprs}
}
case 617:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3202
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("mod"), Exprs: yyDollar[3].selectExprs}
}
case 618:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3206
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("replace"), Exprs: yyDollar[3].selectExprs}
}
case 619:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3210
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("substr"), Exprs: yyDollar[3].selectExprs}
}
case 620:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3214
{
yyVAL.expr = &FuncExpr{Name: NewColIdent("substr"), Exprs: yyDollar[3].selectExprs}
}
case 621:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3220
{
yyVAL.matchExprOption = NoOption
}
case 622:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3224
{
yyVAL.matchExprOption = BooleanModeOpt
}
case 623:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3228
{
yyVAL.matchExprOption = NaturalLanguageModeOpt
}
case 624:
yyDollar = yyS[yypt-7 : yypt+1]
//line sql.y:3232
{
yyVAL.matchExprOption = NaturalLanguageModeWithQueryExpansionOpt
}
case 625:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3236
{
yyVAL.matchExprOption = QueryExpansionOpt
}
case 626:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3242
{
yyVAL.str = string(yyDollar[1].colIdent.String())
}
case 627:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3246
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 628:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3252
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 629:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3256
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal, Charset: yyDollar[3].str, Operator: CharacterSetOp}
}
case 630:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3260
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal, Charset: string(yyDollar[3].colIdent.String())}
}
case 631:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3264
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes)}
}
case 632:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3268
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 633:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3272
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes)}
yyVAL.convertType.Length = yyDollar[2].LengthScaleOption.Length
yyVAL.convertType.Scale = yyDollar[2].LengthScaleOption.Scale
}
case 634:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3278
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes)}
}
case 635:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3282
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 636:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3286
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes)}
}
case 637:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3290
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes)}
}
case 638:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3294
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes), Length: yyDollar[2].literal}
}
case 639:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3298
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes)}
}
case 640:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3302
{
yyVAL.convertType = &ConvertType{Type: string(yyDollar[1].bytes)}
}
case 641:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3307
{
yyVAL.expr = nil
}
case 642:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3311
{
yyVAL.expr = yyDollar[1].expr
}
case 643:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3316
{
yyVAL.str = string("")
}
case 644:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3320
{
yyVAL.str = " separator '" + string(yyDollar[2].bytes) + "'"
}
case 645:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3326
{
yyVAL.whens = []*When{yyDollar[1].when}
}
case 646:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3330
{
yyVAL.whens = append(yyDollar[1].whens, yyDollar[2].when)
}
case 647:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3336
{
yyVAL.when = &When{Cond: yyDollar[2].expr, Val: yyDollar[4].expr}
}
case 648:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3341
{
yyVAL.expr = nil
}
case 649:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3345
{
yyVAL.expr = yyDollar[2].expr
}
case 650:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3351
{
yyVAL.colName = &ColName{Name: yyDollar[1].colIdent}
}
case 651:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3355
{
yyVAL.colName = &ColName{Qualifier: TableName{Name: yyDollar[1].tableIdent}, Name: yyDollar[3].colIdent}
}
case 652:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:3359
{
yyVAL.colName = &ColName{Qualifier: TableName{Qualifier: yyDollar[1].tableIdent, Name: yyDollar[3].tableIdent}, Name: yyDollar[5].colIdent}
}
case 653:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3365
{
yyVAL.expr = NewStrLiteral(yyDollar[1].bytes)
}
case 654:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3369
{
yyVAL.expr = NewHexLiteral(yyDollar[1].bytes)
}
case 655:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3373
{
yyVAL.expr = NewBitLiteral(yyDollar[1].bytes)
}
case 656:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3377
{
yyVAL.expr = NewIntLiteral(yyDollar[1].bytes)
}
case 657:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3381
{
yyVAL.expr = NewFloatLiteral(yyDollar[1].bytes)
}
case 658:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3385
{
yyVAL.expr = NewHexNumLiteral(yyDollar[1].bytes)
}
case 659:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3389
{
yyVAL.expr = NewArgument(yyDollar[1].bytes)
}
case 660:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3393
{
yyVAL.expr = &NullVal{}
}
case 661:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3399
{
// TODO(sougou): Deprecate this construct.
if yyDollar[1].colIdent.Lowered() != "value" {
yylex.Error("expecting value after next")
return 1
}
yyVAL.expr = NewIntLiteral([]byte("1"))
}
case 662:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3408
{
yyVAL.expr = NewIntLiteral(yyDollar[1].bytes)
}
case 663:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3412
{
yyVAL.expr = NewArgument(yyDollar[1].bytes)
}
case 664:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3417
{
yyVAL.exprs = nil
}
case 665:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3421
{
yyVAL.exprs = yyDollar[3].exprs
}
case 666:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3426
{
yyVAL.expr = nil
}
case 667:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3430
{
yyVAL.expr = yyDollar[2].expr
}
case 668:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3435
{
yyVAL.orderBy = nil
}
case 669:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3439
{
yyVAL.orderBy = yyDollar[3].orderBy
}
case 670:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3445
{
yyVAL.orderBy = OrderBy{yyDollar[1].order}
}
case 671:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3449
{
yyVAL.orderBy = append(yyDollar[1].orderBy, yyDollar[3].order)
}
case 672:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3455
{
yyVAL.order = &Order{Expr: yyDollar[1].expr, Direction: yyDollar[2].orderDirection}
}
case 673:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3460
{
yyVAL.orderDirection = AscOrder
}
case 674:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3464
{
yyVAL.orderDirection = AscOrder
}
case 675:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3468
{
yyVAL.orderDirection = DescOrder
}
case 676:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3473
{
yyVAL.limit = nil
}
case 677:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3477
{
yyVAL.limit = &Limit{Rowcount: yyDollar[2].expr}
}
case 678:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3481
{
yyVAL.limit = &Limit{Offset: yyDollar[2].expr, Rowcount: yyDollar[4].expr}
}
case 679:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3485
{
yyVAL.limit = &Limit{Offset: yyDollar[4].expr, Rowcount: yyDollar[2].expr}
}
case 680:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3490
{
yyVAL.indexOptions = nil
}
case 681:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3494
{
yyVAL.indexOptions = []*IndexOption{yyDollar[1].indexOption, yyDollar[2].indexOption}
}
case 682:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3498
{
yyVAL.indexOptions = []*IndexOption{yyDollar[1].indexOption, yyDollar[2].indexOption}
}
case 683:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3502
{
yyVAL.indexOptions = []*IndexOption{yyDollar[1].indexOption}
}
case 684:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3506
{
yyVAL.indexOptions = []*IndexOption{yyDollar[1].indexOption}
}
case 685:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3513
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), String: string(yyDollar[3].bytes)}
}
case 686:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3517
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), String: string(yyDollar[3].bytes)}
}
case 687:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3521
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), String: string(yyDollar[3].bytes)}
}
case 688:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3525
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), String: string(yyDollar[3].bytes)}
}
case 689:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3531
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), String: string(yyDollar[3].bytes)}
}
case 690:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3535
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), String: string(yyDollar[3].bytes)}
}
case 691:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3539
{
yyVAL.indexOption = &IndexOption{Name: string(yyDollar[1].bytes), String: string(yyDollar[3].bytes)}
}
case 692:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3544
{
yyVAL.str = ""
}
case 693:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3548
{
yyVAL.str = string(yyDollar[3].bytes)
}
case 694:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3552
{
yyVAL.str = string(yyDollar[3].bytes)
}
case 695:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3556
{
yyVAL.str = string(yyDollar[3].bytes)
}
case 696:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3561
{
yyVAL.str = ""
}
case 697:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3565
{
yyVAL.str = yyDollar[3].str
}
case 698:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3571
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 699:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3575
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 700:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3580
{
yyVAL.str = ""
}
case 701:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3584
{
yyVAL.str = yyDollar[2].str
}
case 702:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3589
{
yyVAL.str = "cascaded"
}
case 703:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3593
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 704:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3597
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 705:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3602
{
yyVAL.str = ""
}
case 706:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3606
{
yyVAL.str = yyDollar[3].str
}
case 707:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3612
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 708:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3616
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 709:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3620
{
yyVAL.str = "'" + string(yyDollar[1].bytes) + "'@" + string(yyDollar[2].bytes)
}
case 710:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3624
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 711:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3629
{
yyVAL.lock = NoLock
}
case 712:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3633
{
yyVAL.lock = ForUpdateLock
}
case 713:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3637
{
yyVAL.lock = ShareModeLock
}
case 714:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3642
{
yyVAL.selectInto = nil
}
case 715:
yyDollar = yyS[yypt-9 : yypt+1]
//line sql.y:3646
{
yyVAL.selectInto = &SelectInto{Type: IntoOutfileS3, FileName: string(yyDollar[4].bytes), Charset: yyDollar[5].str, FormatOption: yyDollar[6].str, ExportOption: yyDollar[7].str, Manifest: yyDollar[8].str, Overwrite: yyDollar[9].str}
}
case 716:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3650
{
yyVAL.selectInto = &SelectInto{Type: IntoDumpfile, FileName: string(yyDollar[3].bytes), Charset: "", FormatOption: "", ExportOption: "", Manifest: "", Overwrite: ""}
}
case 717:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:3654
{
yyVAL.selectInto = &SelectInto{Type: IntoOutfile, FileName: string(yyDollar[3].bytes), Charset: yyDollar[4].str, FormatOption: "", ExportOption: yyDollar[5].str, Manifest: "", Overwrite: ""}
}
case 718:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3659
{
yyVAL.str = ""
}
case 719:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3663
{
yyVAL.str = " format csv" + yyDollar[3].str
}
case 720:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3667
{
yyVAL.str = " format text" + yyDollar[3].str
}
case 721:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3672
{
yyVAL.str = ""
}
case 722:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3676
{
yyVAL.str = " header"
}
case 723:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3681
{
yyVAL.str = ""
}
case 724:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3685
{
yyVAL.str = " manifest on"
}
case 725:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3689
{
yyVAL.str = " manifest off"
}
case 726:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3694
{
yyVAL.str = ""
}
case 727:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3698
{
yyVAL.str = " overwrite on"
}
case 728:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3702
{
yyVAL.str = " overwrite off"
}
case 729:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3708
{
yyVAL.str = yyDollar[1].str + yyDollar[2].str
}
case 730:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3713
{
yyVAL.str = ""
}
case 731:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3717
{
yyVAL.str = " lines" + yyDollar[2].str + yyDollar[3].str
}
case 732:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3722
{
yyVAL.str = ""
}
case 733:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3726
{
yyVAL.str = " starting by '" + string(yyDollar[3].bytes) + "'"
}
case 734:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3731
{
yyVAL.str = ""
}
case 735:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3735
{
yyVAL.str = " terminated by '" + string(yyDollar[3].bytes) + "'"
}
case 736:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3740
{
yyVAL.str = ""
}
case 737:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3744
{
yyVAL.str = " " + yyDollar[1].str + yyDollar[2].str + yyDollar[3].str + yyDollar[4].str
}
case 738:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3749
{
yyVAL.str = ""
}
case 739:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3753
{
yyVAL.str = " escaped by '" + string(yyDollar[3].bytes) + "'"
}
case 740:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3758
{
yyVAL.str = ""
}
case 741:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3762
{
yyVAL.str = yyDollar[1].str + " enclosed by '" + string(yyDollar[4].bytes) + "'"
}
case 742:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3767
{
yyVAL.str = ""
}
case 743:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3771
{
yyVAL.str = " optionally"
}
case 744:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3784
{
yyVAL.ins = &Insert{Rows: yyDollar[2].values}
}
case 745:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3788
{
yyVAL.ins = &Insert{Rows: yyDollar[1].selStmt}
}
case 746:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:3792
{
yyVAL.ins = &Insert{Columns: yyDollar[2].columns, Rows: yyDollar[5].values}
}
case 747:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3796
{
yyVAL.ins = &Insert{Rows: yyDollar[4].values}
}
case 748:
yyDollar = yyS[yypt-4 : yypt+1]
//line sql.y:3800
{
yyVAL.ins = &Insert{Columns: yyDollar[2].columns, Rows: yyDollar[4].selStmt}
}
case 749:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3806
{
yyVAL.columns = Columns{yyDollar[1].colIdent}
}
case 750:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3810
{
yyVAL.columns = Columns{yyDollar[3].colIdent}
}
case 751:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3814
{
yyVAL.columns = append(yyVAL.columns, yyDollar[3].colIdent)
}
case 752:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:3818
{
yyVAL.columns = append(yyVAL.columns, yyDollar[5].colIdent)
}
case 753:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3823
{
yyVAL.updateExprs = nil
}
case 754:
yyDollar = yyS[yypt-5 : yypt+1]
//line sql.y:3827
{
yyVAL.updateExprs = yyDollar[5].updateExprs
}
case 755:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3833
{
yyVAL.values = Values{yyDollar[1].valTuple}
}
case 756:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3837
{
yyVAL.values = append(yyDollar[1].values, yyDollar[3].valTuple)
}
case 757:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3843
{
yyVAL.valTuple = yyDollar[1].valTuple
}
case 758:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3847
{
yyVAL.valTuple = ValTuple{}
}
case 759:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3853
{
yyVAL.valTuple = ValTuple(yyDollar[2].exprs)
}
case 760:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3859
{
if len(yyDollar[1].valTuple) == 1 {
yyVAL.expr = yyDollar[1].valTuple[0]
} else {
yyVAL.expr = yyDollar[1].valTuple
}
}
case 761:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3869
{
yyVAL.updateExprs = UpdateExprs{yyDollar[1].updateExpr}
}
case 762:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3873
{
yyVAL.updateExprs = append(yyDollar[1].updateExprs, yyDollar[3].updateExpr)
}
case 763:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3879
{
yyVAL.updateExpr = &UpdateExpr{Name: yyDollar[1].colName, Expr: yyDollar[3].expr}
}
case 764:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3885
{
yyVAL.setExprs = SetExprs{yyDollar[1].setExpr}
}
case 765:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3889
{
yyVAL.setExprs = append(yyDollar[1].setExprs, yyDollar[3].setExpr)
}
case 766:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3895
{
yyVAL.setExpr = &SetExpr{Name: yyDollar[1].colIdent, Scope: ImplicitScope, Expr: NewStrLiteral([]byte("on"))}
}
case 767:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3899
{
yyVAL.setExpr = &SetExpr{Name: yyDollar[1].colIdent, Scope: ImplicitScope, Expr: NewStrLiteral([]byte("off"))}
}
case 768:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3903
{
yyVAL.setExpr = &SetExpr{Name: yyDollar[1].colIdent, Scope: ImplicitScope, Expr: yyDollar[3].expr}
}
case 769:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3907
{
yyVAL.setExpr = &SetExpr{Name: NewColIdent(string(yyDollar[1].bytes)), Scope: ImplicitScope, Expr: yyDollar[2].expr}
}
case 770:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3911
{
yyDollar[2].setExpr.Scope = yyDollar[1].scope
yyVAL.setExpr = yyDollar[2].setExpr
}
case 772:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3919
{
yyVAL.bytes = []byte("charset")
}
case 774:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3926
{
yyVAL.expr = NewStrLiteral([]byte(yyDollar[1].colIdent.String()))
}
case 775:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3930
{
yyVAL.expr = NewStrLiteral(yyDollar[1].bytes)
}
case 776:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3934
{
yyVAL.expr = &Default{}
}
case 779:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3943
{
yyVAL.boolean = false
}
case 780:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:3945
{
yyVAL.boolean = true
}
case 781:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3948
{
yyVAL.boolean = false
}
case 782:
yyDollar = yyS[yypt-3 : yypt+1]
//line sql.y:3950
{
yyVAL.boolean = true
}
case 783:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3953
{
yyVAL.ignore = false
}
case 784:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3955
{
yyVAL.ignore = true
}
case 785:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3959
{
yyVAL.empty = struct{}{}
}
case 786:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3961
{
yyVAL.empty = struct{}{}
}
case 787:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3963
{
yyVAL.empty = struct{}{}
}
case 788:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3965
{
yyVAL.empty = struct{}{}
}
case 789:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3967
{
yyVAL.empty = struct{}{}
}
case 790:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3969
{
yyVAL.empty = struct{}{}
}
case 791:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3971
{
yyVAL.empty = struct{}{}
}
case 792:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3973
{
yyVAL.empty = struct{}{}
}
case 793:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3975
{
yyVAL.empty = struct{}{}
}
case 794:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3977
{
yyVAL.empty = struct{}{}
}
case 795:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3981
{
yyVAL.empty = struct{}{}
}
case 796:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3983
{
yyVAL.empty = struct{}{}
}
case 797:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3985
{
yyVAL.empty = struct{}{}
}
case 798:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3989
{
yyVAL.empty = struct{}{}
}
case 799:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3991
{
yyVAL.empty = struct{}{}
}
case 800:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:3994
{
yyVAL.str = ""
}
case 801:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3996
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 802:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:3998
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 803:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4000
{
yyVAL.str = string(yyDollar[1].bytes)
}
case 804:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:4003
{
yyVAL.str = ""
}
case 805:
yyDollar = yyS[yypt-2 : yypt+1]
//line sql.y:4005
{
yyVAL.str = yyDollar[2].colIdent.val
}
case 806:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4009
{
yyVAL.colIdent = yyDollar[1].colIdent
}
case 807:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4013
{
yyVAL.colIdent = NewColIdent(string(yyDollar[1].bytes))
}
case 809:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4020
{
yyVAL.colIdent = NewColIdent(string(yyDollar[1].bytes))
}
case 810:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4026
{
yyVAL.tableIdent = NewTableIdent(string(yyDollar[1].colIdent.String()))
}
case 811:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4030
{
yyVAL.tableIdent = NewTableIdent(string(yyDollar[1].bytes))
}
case 813:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4037
{
yyVAL.tableIdent = NewTableIdent(string(yyDollar[1].bytes))
}
case 1150:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4398
{
if incNesting(yylex) {
yylex.Error("max nesting level reached")
return 1
}
}
case 1151:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4407
{
decNesting(yylex)
}
case 1152:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:4412
{
skipToEnd(yylex)
}
case 1153:
yyDollar = yyS[yypt-0 : yypt+1]
//line sql.y:4417
{
skipToEnd(yylex)
}
case 1154:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4421
{
skipToEnd(yylex)
}
case 1155:
yyDollar = yyS[yypt-1 : yypt+1]
//line sql.y:4425
{
skipToEnd(yylex)
}
}
goto yystack /* stack new state and value */
}
|
iboxdb/db4o-gpl
|
db4o.j/db4o-core/core/src/com/db4o/internal/query/result/IdTreeQueryResult.java
|
<gh_stars>10-100
/* Copyright (C) 2006 Versant Inc. http://www.db4o.com */
package com.db4o.internal.query.result;
import com.db4o.foundation.*;
import com.db4o.internal.*;
/**
* @exclude
*/
public class IdTreeQueryResult extends AbstractQueryResult{
private Tree _ids;
public IdTreeQueryResult(Transaction transaction, IntIterator4 ids) {
super(transaction);
_ids = TreeInt.addAll(null, ids);
}
public IntIterator4 iterateIDs() {
return new IntIterator4Adaptor(new TreeKeyIterator(_ids));
}
public int size() {
if(_ids == null){
return 0;
}
return _ids.size();
}
public AbstractQueryResult supportSort(){
return toIdList();
}
public AbstractQueryResult supportElementAccess(){
return toIdList();
}
}
|
best08618/asylo
|
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/i386/avx512f-klogic-2.c
|
/* { dg-do run } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-require-effective-target avx512f } */
#include "avx512f-check.h"
void
avx512f_test (void)
{
__mmask16 dst, src1, src2, dst_ref;
volatile __m512 x = _mm512_setzero_ps();
__asm__( "kmovw %1, %0" : "=k" (src1) : "r" (0x0FFF) );
__asm__( "kmovw %1, %0" : "=k" (src2) : "r" (0x0F0F) );
dst = _mm512_kand (src1, src2);
x = _mm512_mask_add_ps (x, dst, x, x);
dst_ref = src1 & src2;
if (dst != dst_ref)
abort ();
dst = _mm512_kandn (src1, src2);
x = _mm512_mask_add_ps (x, dst, x, x);
dst_ref = ~src1 & src2;
if (dst != dst_ref)
abort ();
dst = _mm512_kor (src1, src2);
x = _mm512_mask_add_ps (x, dst, x, x);
dst_ref = src1 | src2;
if (dst != dst_ref)
abort ();
dst = _mm512_kxnor (src1, src2);
x = _mm512_mask_add_ps (x, dst, x, x);
dst_ref = ~(src1 ^ src2);
if (dst != dst_ref)
abort ();
dst = _mm512_kxor (src1, src2);
x = _mm512_mask_add_ps (x, dst, x, x);
dst_ref = src1 ^ src2;
if (dst != dst_ref)
abort ();
dst = _mm512_knot (src1);
x = _mm512_mask_add_ps (x, dst, x, x);
dst_ref = ~src1;
if (dst != dst_ref)
abort ();
dst = _mm512_kunpackb (src1, src2);
x = _mm512_mask_add_ps (x, dst, x, x);
dst_ref = ((src1 << 8) | src2) & 0xFFFF;
if (dst != dst_ref)
abort ();
}
|
sirinath/Harmony
|
drlvm/vm/tests/kernel/java/lang/ClassTestGetDeclaredConstructors.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.
*/
/**
* @author <NAME>, <NAME>
*/
package java.lang;
import java.lang.reflect.Constructor;
import junit.framework.TestCase;
/**
* tested class: java.lang.Class
* tested method: getDeclaredConstructors
*/
public class ClassTestGetDeclaredConstructors extends TestCase {
/**
* The primitive types don't declare constructors.
*/
public void test1() {
Constructor[] cs = Integer.TYPE.getDeclaredConstructors();
assertNotNull("unexpected null", cs);
assertEquals("array length:", 0, cs.length);
}
/**
* The arrays don't declare constructors.
*/
public void test2() {
Constructor[] cs = new int[0].getClass().getDeclaredConstructors();
assertNotNull("unexpected null", cs);
assertEquals("array length:", 0, cs.length);
}
/**
* Only default constructor which takes no parameters must be returned.
* Constructors of the super class must not be returned.
*/
public void test3() {
Constructor[] cs = ClassTestGetDeclaredConstructors.class
.getDeclaredConstructors();
assertNotNull("unexpected null", cs);
assertEquals("array length:", 1, cs.length);
assertEquals("array length:", 0, cs[0].getParameterTypes().length);
}
/**
* Only default constructor which takes no parameters must be returned.
* Constructors of the super class must not be returned.
*/
public void test4() {
Constructor[] cs = Inner.class
.getDeclaredConstructors();
assertNotNull("unexpected null", cs);
assertEquals("Constructors length:", 1, cs.length);
assertEquals("Parameters length:", 0, cs[0].getParameterTypes().length);
}
/**
* The getDeclaredConstructors() method must return protected, package
* private and private constructors.
*/
public void test5() {
Constructor[] cs = Inner2.class.getDeclaredConstructors();
assertEquals("Constructors length:", 2, cs.length);
Class[] args = cs[0].getParameterTypes();
if (args.length == 0) {
args = cs[1].getParameterTypes();
assertEquals("Assert 0: args length:", 1, args.length);
assertSame("objects differ:", String.class, args[0]);
} else {
assertEquals("Assert 1: args length:", 1, args.length);
assertSame("objects differ:", String.class, args[0]);
args = cs[1].getParameterTypes();
assertEquals("Assert 2: args length:", 0, args.length);
}
}
/**
* The interfaces can not define constructors.
*/
public void test6() {
Constructor[] cs = Inner3.class.getDeclaredConstructors();
assertNotNull("unexpected null", cs);
assertEquals("array length:", 0, cs.length);
}
static class Inner extends Throwable {
private static final long serialVersionUID = 0L;
}
public static class Inner2 {
public Inner2(String s) {
}
private Inner2() {
}
}
public static interface Inner3 {
}
}
|
mayur9991/spring-security
|
oauth2/oauth2-jose/src/test/java/org/springframework/security/oauth2/jwt/JwtTests.java
|
/*
* Copyright 2002-2017 the original author or 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
*
* https://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.springframework.security.oauth2.jwt;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import org.springframework.security.oauth2.jose.jws.JwsAlgorithms;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests for {@link Jwt}.
*
* @author <NAME>
*/
public class JwtTests {
private static final String ISS_CLAIM = "iss";
private static final String SUB_CLAIM = "sub";
private static final String AUD_CLAIM = "aud";
private static final String EXP_CLAIM = "exp";
private static final String NBF_CLAIM = "nbf";
private static final String IAT_CLAIM = "iat";
private static final String JTI_CLAIM = "jti";
private static final String ISS_VALUE = "https://provider.com";
private static final String SUB_VALUE = "subject1";
private static final List<String> AUD_VALUE = Arrays.asList("aud1", "aud2");
private static final long EXP_VALUE = Instant.now().plusSeconds(60).toEpochMilli();
private static final long NBF_VALUE = Instant.now().plusSeconds(5).toEpochMilli();
private static final long IAT_VALUE = Instant.now().toEpochMilli();
private static final String JTI_VALUE = "jwt-id-1";
private static final Map<String, Object> HEADERS;
private static final Map<String, Object> CLAIMS;
private static final String JWT_TOKEN_VALUE = "jwt-token-value";
static {
HEADERS = new HashMap<>();
HEADERS.put("alg", JwsAlgorithms.RS256);
CLAIMS = new HashMap<>();
CLAIMS.put(ISS_CLAIM, ISS_VALUE);
CLAIMS.put(SUB_CLAIM, SUB_VALUE);
CLAIMS.put(AUD_CLAIM, AUD_VALUE);
CLAIMS.put(EXP_CLAIM, EXP_VALUE);
CLAIMS.put(NBF_CLAIM, NBF_VALUE);
CLAIMS.put(IAT_CLAIM, IAT_VALUE);
CLAIMS.put(JTI_CLAIM, JTI_VALUE);
}
@Test
public void constructorWhenTokenValueIsNullThenThrowIllegalArgumentException() {
assertThatIllegalArgumentException().isThrownBy(
() -> new Jwt(null, Instant.ofEpochMilli(IAT_VALUE), Instant.ofEpochMilli(EXP_VALUE), HEADERS, CLAIMS));
}
@Test
public void constructorWhenHeadersIsEmptyThenThrowIllegalArgumentException() {
assertThatIllegalArgumentException().isThrownBy(() -> new Jwt(JWT_TOKEN_VALUE, Instant.ofEpochMilli(IAT_VALUE),
Instant.ofEpochMilli(EXP_VALUE), Collections.emptyMap(), CLAIMS));
}
@Test
public void constructorWhenClaimsIsEmptyThenThrowIllegalArgumentException() {
assertThatIllegalArgumentException().isThrownBy(() -> new Jwt(JWT_TOKEN_VALUE, Instant.ofEpochMilli(IAT_VALUE),
Instant.ofEpochMilli(EXP_VALUE), HEADERS, Collections.emptyMap()));
}
@Test
public void constructorWhenParametersProvidedAndValidThenCreated() {
Jwt jwt = new Jwt(JWT_TOKEN_VALUE, Instant.ofEpochMilli(IAT_VALUE), Instant.ofEpochMilli(EXP_VALUE), HEADERS,
CLAIMS);
assertThat(jwt.getTokenValue()).isEqualTo(JWT_TOKEN_VALUE);
assertThat(jwt.getHeaders()).isEqualTo(HEADERS);
assertThat(jwt.getClaims()).isEqualTo(CLAIMS);
assertThat(jwt.getIssuer().toString()).isEqualTo(ISS_VALUE);
assertThat(jwt.getSubject()).isEqualTo(SUB_VALUE);
assertThat(jwt.getAudience()).isEqualTo(AUD_VALUE);
assertThat(jwt.getExpiresAt().toEpochMilli()).isEqualTo(EXP_VALUE);
assertThat(jwt.getNotBefore().getEpochSecond()).isEqualTo(NBF_VALUE);
assertThat(jwt.getIssuedAt().toEpochMilli()).isEqualTo(IAT_VALUE);
assertThat(jwt.getId()).isEqualTo(JTI_VALUE);
}
}
|
sam7k9621/ManagerUtils
|
Maths/src/RooFitExt.cc
|
<gh_stars>0
/*******************************************************************************
*
* Filename : RooFitExt.hpp
* Description : Implementation for RooFitExt.hpp defined functions
* Author : Yi-Mu "Enoch" Chen [ <EMAIL> ]
*
*******************************************************************************/
#include "ManagerUtils/Maths/interface/RooFitExt.hpp"
#include <RooAbsData.h>
#include <RooAbsPdf.h>
#include <RooDataSet.h>
#include <RooRealVar.h>
#include <TH1.h>
/*******************************************************************************
* Kolmongorov-Smirov Test
*******************************************************************************/
double
KSTest(
RooAbsData& dataset,
RooAbsPdf& pdf,
RooRealVar& var,
const RooCmdArg& cut,
double gen,
unsigned bin
)
{
RooDataSet* pdfset = pdf.generate( RooArgSet( var ), dataset.sumEntries() * gen );
RooAbsData* pdfsubset = pdfset->reduce( RooFit::SelectVars( RooArgSet( var ) ), cut );
TH1* pdfhist = pdfsubset->createHistogram( "pdfhist", var, RooFit::Binning( bin ) );
RooAbsData* setsubset = dataset.reduce( RooFit::SelectVars( RooArgSet( var ) ), cut );
TH1* dathist = setsubset->createHistogram( "dathist", var, RooFit::Binning( bin ) );
double ans = pdfhist->KolmogorovTest( dathist );
delete pdfhist;
delete dathist;
delete pdfset;
delete pdfsubset;
delete setsubset;
return ans;
}
|
dawsonlp/herd
|
dm-code/dm-service/src/test/java/org/finra/dm/service/helper/DmDaoHelperTest.java
|
/*
* 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.dm.service.helper;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Arrays;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.finra.dm.model.ObjectNotFoundException;
import org.finra.dm.model.jpa.BusinessObjectDataEntity;
import org.finra.dm.model.jpa.BusinessObjectFormatEntity;
import org.finra.dm.model.jpa.StorageEntity;
import org.finra.dm.model.jpa.StoragePlatformEntity;
import org.finra.dm.model.jpa.StorageUnitEntity;
import org.finra.dm.model.api.xml.BusinessObjectDataKey;
import org.finra.dm.service.AbstractServiceTest;
/**
* This class tests functionality within the DmDaoHelper class.
*/
public class DmDaoHelperTest extends AbstractServiceTest
{
@Autowired
DmDaoHelper dmDaoHelper;
@Test
public void testIsBusinessObjectDataAttributeRequired()
{
// Create and persist test database entities required for testing.
BusinessObjectFormatEntity businessObjectFormatEntity =
createBusinessObjectFormatEntity(NAMESPACE_CD, BOD_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, FORMAT_DESCRIPTION, true,
PARTITION_KEY);
createBusinessObjectDataAttributeDefinitionEntity(NAMESPACE_CD, BOD_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION,
ATTRIBUTE_NAME_1_MIXED_CASE);
createBusinessObjectDataAttributeDefinitionEntity(NAMESPACE_CD, BOD_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION,
ATTRIBUTE_NAME_2_MIXED_CASE);
// Validate the functionality.
assertTrue(dmDaoHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_1_MIXED_CASE, businessObjectFormatEntity));
assertTrue(dmDaoHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_2_MIXED_CASE, businessObjectFormatEntity));
assertFalse(dmDaoHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_3_MIXED_CASE, businessObjectFormatEntity));
assertTrue(dmDaoHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_1_MIXED_CASE.toUpperCase(), businessObjectFormatEntity));
assertTrue(dmDaoHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_1_MIXED_CASE.toLowerCase(), businessObjectFormatEntity));
}
@Test
public void testGetStorageAttributeValueByName()
{
// Prepare test data.
StorageEntity storageEntity = createStorageEntity(STORAGE_NAME, StoragePlatformEntity.S3);
createStorageAttributeEntity(storageEntity, ATTRIBUTE_NAME_1_MIXED_CASE, ATTRIBUTE_VALUE_1);
createStorageAttributeEntity(storageEntity, ATTRIBUTE_NAME_2_MIXED_CASE, BLANK_TEXT);
createStorageAttributeEntity(storageEntity, ATTRIBUTE_NAME_3_MIXED_CASE, null);
dmDao.saveAndRefresh(storageEntity);
// Retrieve optional attribute values.
Assert.assertEquals(ATTRIBUTE_VALUE_1, dmDaoHelper.getStorageAttributeValueByName(ATTRIBUTE_NAME_1_MIXED_CASE, storageEntity, false));
Assert.assertEquals(BLANK_TEXT, dmDaoHelper.getStorageAttributeValueByName(ATTRIBUTE_NAME_2_MIXED_CASE, storageEntity, false));
Assert.assertNull(dmDaoHelper.getStorageAttributeValueByName(ATTRIBUTE_NAME_3_MIXED_CASE, storageEntity, false));
// Validate case insensitivity.
Assert.assertEquals(ATTRIBUTE_VALUE_1, dmDaoHelper.getStorageAttributeValueByName(ATTRIBUTE_NAME_1_MIXED_CASE.toUpperCase(), storageEntity, false));
Assert.assertEquals(ATTRIBUTE_VALUE_1, dmDaoHelper.getStorageAttributeValueByName(ATTRIBUTE_NAME_1_MIXED_CASE.toLowerCase(), storageEntity, false));
// Retrieve a required attribute value.
Assert.assertEquals(ATTRIBUTE_VALUE_1, dmDaoHelper.getStorageAttributeValueByName(ATTRIBUTE_NAME_1_MIXED_CASE, storageEntity, true));
// Try to retrieve a missing required attribute values when
// - attribute does not exist
// - attribute exists with a blank text value
// - attribute exists with a null value
for (String attributeName : Arrays.asList("I_DO_NOT_EXIST", ATTRIBUTE_NAME_2_MIXED_CASE, ATTRIBUTE_NAME_3_MIXED_CASE))
{
try
{
dmDaoHelper.getStorageAttributeValueByName(attributeName, storageEntity, true);
}
catch (IllegalArgumentException e)
{
Assert.assertEquals(String.format("Attribute \"%s\" for \"%s\" storage must be configured.", attributeName, STORAGE_NAME), e.getMessage());
}
}
}
@Test
public void testGetStorageUnitEntity()
{
// Create and persist test database entities.
BusinessObjectDataEntity businessObjectDataEntity =
createBusinessObjectDataEntity(NAMESPACE_CD, BOD_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
NO_SUBPARTITION_VALUES, DATA_VERSION, true, BDATA_STATUS);
StorageEntity storageEntity = createStorageEntity(STORAGE_NAME, StoragePlatformEntity.S3);
StorageUnitEntity storageUnitEntity = createStorageUnitEntity(storageEntity, businessObjectDataEntity);
// Try to retrieve a non existing storage unit.
try
{
dmDaoHelper.getStorageUnitEntity(businessObjectDataEntity, "I_DO_NOT_EXIST");
fail("Should throw an ObjectNotFoundException.");
}
catch (ObjectNotFoundException e)
{
assertEquals(String.format("Could not find storage unit in \"I_DO_NOT_EXIST\" storage for the business object data {%s}.", dmHelper
.businessObjectDataKeyToString(
new BusinessObjectDataKey(NAMESPACE_CD, BOD_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
NO_SUBPARTITION_VALUES, DATA_VERSION))), e.getMessage());
}
// Retrieve an existing storage unit entity.
StorageUnitEntity resultStorageUnitEntity = dmDaoHelper.getStorageUnitEntity(businessObjectDataEntity, STORAGE_NAME);
assertNotNull(resultStorageUnitEntity);
assertEquals(storageUnitEntity.getId(), resultStorageUnitEntity.getId());
}
@Test
public void testGetPartitionValue()
{
// Create and persist test database entities.
BusinessObjectDataEntity businessObjectDataEntity =
createBusinessObjectDataEntity(NAMESPACE_CD, BOD_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
SUBPARTITION_VALUES, DATA_VERSION, true, BDATA_STATUS);
// Retrieve primary and sub-partition values along with trying the "out of bounds" cases.
assertEquals(null, dmDaoHelper.getPartitionValue(businessObjectDataEntity, 0));
assertEquals(PARTITION_VALUE, dmDaoHelper.getPartitionValue(businessObjectDataEntity, 1));
for (int partitionColumnPosition = 2; partitionColumnPosition <= BusinessObjectDataEntity.MAX_SUBPARTITIONS + 1; partitionColumnPosition++)
{
assertEquals(SUBPARTITION_VALUES.get(partitionColumnPosition - 2),
dmDaoHelper.getPartitionValue(businessObjectDataEntity, partitionColumnPosition));
}
assertEquals(null, dmDaoHelper.getPartitionValue(businessObjectDataEntity, BusinessObjectDataEntity.MAX_SUBPARTITIONS + 2));
}
}
|
cflowe/ACE
|
TAO/tao/RTScheduling/Request_Interceptor.h
|
<filename>TAO/tao/RTScheduling/Request_Interceptor.h
// -*- C++ -*-
//
//$Id: Request_Interceptor.h 81429 2008-04-24 18:49:54Z johnnyw $
#ifndef TAO_RTSCHEDULING_REQUEST_INTERCEPTOR_H
#define TAO_RTSCHEDULING_REQUEST_INTERCEPTOR_H
#include "tao/RTScheduling/rtscheduler_export.h"
#include "tao/RTScheduling/RTScheduler.h"
#include "ace/Atomic_Op.h"
#include "tao/RTScheduling/Current.h"
#include "tao/LocalObject.h"
#include "tao/PI_Server/PI_Server.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
extern ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> server_guid_counter;
class TAO_RTScheduler_Export Client_Interceptor:
public PortableInterceptor::ClientRequestInterceptor,
public ::CORBA::LocalObject
{
public:
// Client_Interceptor (RTScheduling::Current_ptr current);
virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri);
virtual void send_poll (PortableInterceptor::ClientRequestInfo_ptr ri);
virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri);
virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri);
virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr ri);
virtual char* name (void);
virtual void destroy (void);
static const IOP::ServiceId SchedulingInfo;
};
class TAO_RTScheduler_Export Server_Interceptor :
public PortableInterceptor::ServerRequestInterceptor,
public ::CORBA::LocalObject
{
public:
Server_Interceptor (TAO_RTScheduler_Current_ptr current);
virtual void receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr ri);
virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri);
virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri);
virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri);
virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr ri);
virtual char* name (void);
virtual void destroy (void);
static const IOP::ServiceId SchedulingInfo;
private:
TAO_RTScheduler_Current_var current_;
};
TAO_END_VERSIONED_NAMESPACE_DECL
#endif /* TAO_RTSCHEDULING_REQUEST_INTERCEPTOR_H */
|
ZenPylon/professional-services
|
tools/ml-auto-eda/ml_eda/orchestration/analysis_tracker.py
|
# Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tracker for storing the performed analysis results"""
from __future__ import absolute_import
from __future__ import print_function
from typing import Set, List
from collections import defaultdict
from ml_eda.metadata import run_metadata_pb2
from ml_eda.metadata.metadata_definition import MetadataDef
def get_analysis_unique_name(analysis: run_metadata_pb2.Analysis) -> str:
"""The unique name of an analysis is:
[analysis_name]_[attribute_one]_[attribute_two]_ ......
Args:
analysis: (run_metadata_pb2.Analysis)
Returns:
string
"""
attributes = analysis.features
# run_metadata_pb2.Analysis.Name is an integer, need the following
# conversion to get its string value
analysis_name = run_metadata_pb2.Analysis.Name.Name(analysis.name)
return '-'.join([analysis_name] + [att.name for att in attributes])
class AttributeAnalysisTracker:
"""
Tracker for storing the performed analysis results related to one
particular attribute
"""
def __init__(self, att_type: str, att_name: str):
"""
Args:
att_type: (string), attribute type
att_name: (string), attribute name
"""
self.att_type = att_type
self.att_name = att_name
self.attribute_tracker = dict()
def add_analysis(self, analysis: run_metadata_pb2.Analysis):
"""Add an analysis result to attribute tracker
Args:
analysis: (run_metadata_pb2.Analysis), performed analysis result
Returns:
"""
analysis_unique_name = get_analysis_unique_name(analysis)
self.attribute_tracker[analysis_unique_name] = analysis
def get_analysis(self,
analysis_name: str) -> List[run_metadata_pb2.Analysis]:
"""Return all the analysis related to the attribute given an analysis
name. Since one attribute can run the same analysis with
multiple attributes, this function would return an iterator.
Args:
analysis_name: (string), name of the analysis specified in the proto
Returns:
List[run_metadata_pb2.Analysis]
"""
analysis = []
for item in self.attribute_tracker:
if item.startswith(analysis_name):
analysis.append(self.attribute_tracker[item])
return analysis
def get_all_analysis(self) -> List[run_metadata_pb2.Analysis]:
"""Return all the analysis stored in the attribute tracker"""
return list(self.attribute_tracker.values())
class AnalysisTracker:
"""
Tracker for storing the performed analysis results
"""
def __init__(self, metadata: MetadataDef):
self.metadata = metadata
# tracker for tracking all the analysis
self.analysis_tracker = dict()
# tracker for tracking all attributes having analysis performed
self.attribute_tracker = dict()
# tracker for attributes in different type
self.attribute_type_tracker = defaultdict(set)
def add_analysis(self, analysis: run_metadata_pb2.Analysis):
"""Add analysis to two trackers
Args:
analysis: (run_metadata_pb2.Analysis)
Returns:
"""
analysis_attributes = analysis.features
# Get the unique name for the analysis
analysis_unique_name = get_analysis_unique_name(analysis)
# Add analysis to analysis_tracker
self.analysis_tracker[analysis_unique_name] = analysis
# Add analysis to attribute_tracker
for attr in analysis_attributes:
if attr.name not in self.attribute_tracker:
self.attribute_tracker[attr.name] = AttributeAnalysisTracker(
att_name=attr.name,
att_type=attr.type)
self.attribute_type_tracker[attr.type].add(attr.name)
self.attribute_tracker[attr.name].add_analysis(analysis)
def get_target(self) -> run_metadata_pb2.Attribute:
"""Get the target attribute"""
return self.metadata.target_column
def get_attributes(self) -> List[str]:
"""Get the names of all the involved attributes"""
return list(self.attribute_tracker.keys())
def get_numerical_attributes(self) -> Set[str]:
"""Get the names of all numerical attributes"""
return self.attribute_type_tracker[run_metadata_pb2.Attribute.NUMERICAL]
def get_categorical_attributes(self) -> Set[str]:
"""Get the names of all categorical attributes"""
return self.attribute_type_tracker[run_metadata_pb2.Attribute.CATEGORICAL]
def get_all_analysis(self) -> List[run_metadata_pb2.Analysis]:
"""Get all the stored analyses results"""
return list(self.analysis_tracker.values())
def get_all_analysis_unique_names(self):
"""Get the unique name of all sotre analyses"""
return self.analysis_tracker.keys()
def get_attribute_analysis(self,
attribute_name: str,
analysis_name: str
) -> List[run_metadata_pb2.Analysis]:
"""Get all the analyses given attribute name and analysis name"""
if attribute_name in self.attribute_tracker:
return self.attribute_tracker[attribute_name].get_analysis(
analysis_name)
return []
def get_attribute_all_analysis(self, attribute_name: str
) -> List[run_metadata_pb2.Analysis]:
"""Get all the analyses given attribute name"""
if attribute_name in self.attribute_tracker:
return self.attribute_tracker[attribute_name].get_all_analysis()
return []
def get_analysis(self, analysis_name: str
) -> List[run_metadata_pb2.Analysis]:
"""Get all the analyses given analysis name"""
analysis = []
for item in self.analysis_tracker:
if item.startswith(analysis_name):
analysis.append(self.analysis_tracker[item])
return analysis
|
ibaca/functional-rosetta-stone
|
problems/src/test/java/utils/EndToEnd.java
|
<reponame>ibaca/functional-rosetta-stone
package utils;
public interface EndToEnd { }
|
megahertz0/android_thunder
|
dex_src/com/baidu/mobads/j/s.java
|
<reponame>megahertz0/android_thunder
package com.baidu.mobads.j;
import android.content.Context;
import android.graphics.Rect;
import android.os.PowerManager;
import android.util.DisplayMetrics;
import android.view.View;
import com.baidu.mobads.interfaces.utils.IXAdViewUtils;
import com.xunlei.tdlive.R;
import com.xunlei.xiazaibao.sdk.XZBDevice;
public class s implements IXAdViewUtils {
public int getVisiblePercent(View view, Context context) {
if (view == null) {
return 0;
}
try {
if (!view.isShown()) {
return 0;
}
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
int i = displayMetrics.heightPixels;
int i2 = displayMetrics.widthPixels;
Rect rect = new Rect();
view.getGlobalVisibleRect(rect);
if (rect.top > i || rect.left > i2) {
return 0;
}
double width = (double) (rect.width() * rect.height());
return (int) ((width * 100.0d) / ((double) (view.getHeight() * view.getWidth())));
} catch (Exception e) {
return 0;
}
}
public boolean isAdViewOutsideScreen(View view) {
int[] iArr = new int[2];
view.getLocationOnScreen(iArr);
Rect windowRect = m.a().m().getWindowRect(view.getContext());
int width = iArr[0] + (view.getWidth() / 2);
int height = iArr[1] + (view.getHeight() / 2);
return width <= 0 || width >= windowRect.width() || height <= 0 || height >= windowRect.height();
}
public boolean isScreenOn(Context context) {
try {
PowerManager powerManager = (PowerManager) context.getSystemService("power");
return ((Boolean) powerManager.getClass().getMethod("isScreenOn", new Class[0]).invoke(powerManager, new Object[0])).booleanValue();
} catch (Throwable e) {
m.a().f().d(e);
return true;
}
}
public boolean isAdViewTooSmall(View view) {
return view != null && (view.getWidth() < 10 || view.getHeight() < 10);
}
public boolean isAdViewShown(View view) {
return view != null && view.isShown();
}
public boolean isVisible(View view, int i) {
if (view == null || view.getVisibility() != 0 || view.getParent() == null) {
return false;
}
Rect rect = new Rect();
if (!view.getGlobalVisibleRect(rect)) {
return false;
}
long height = ((long) view.getHeight()) * ((long) view.getWidth());
return height > 0 && (((long) rect.height()) * ((long) rect.width())) * 100 >= height * ((long) i);
}
public int getViewState(View view) {
if (!isScreenOn(view.getContext())) {
return XZBDevice.DOWNLOAD_LIST_ALL;
}
if (!isAdViewShown(view)) {
return 1;
}
if (a(view)) {
return !isVisible(view, R.styleable.AppCompatTheme_buttonBarStyle) ? XZBDevice.DOWNLOAD_LIST_FAILED : 0;
} else {
return R.styleable.Toolbar_contentInsetEnd;
}
}
private boolean a(View view) {
return view.getWidth() > 15 && view.getHeight() > 15;
}
}
|
weucode/COMFORT
|
artifact_evaluation/data/codeCoverage/die_generate/149.js
|
<reponame>weucode/COMFORT
for (var i = 0; i < -NaN; i++) {
i *= i;
}
|
arrow-lang/arrow-legacy
|
include/arrow/ast/nodes/node.hpp
|
// Copyright (c) 2014-2015 <NAME>, All Rights Reserved.
// Distributed under the MIT License
// See accompanying file LICENSE
#ifndef ARROW_AST_NODES_NODE_H
#define ARROW_AST_NODES_NODE_H 1
#include "arrow/ref.hpp"
#include "arrow/span.hpp"
namespace arrow {
namespace ast {
struct Visitor;
/// Abstract base class of all AST nodes.
// TODO: Do something and make it illegal to instantiate these.
struct Node {
explicit Node(Span span) : span(span) {
}
virtual ~Node() noexcept;
virtual void accept(Visitor&);
Span span;
};
struct Item : Node {
Item(Span span, bool exported_)
: Node(span), exported(exported_) {
}
virtual ~Item() noexcept;
/// Whether this module-level item was exported and made
/// available for import from other modules.
bool exported;
};
} // namespace ast
} // namespace arrow
#endif // ARROW_AST_NODES_NODE_H
|
Sherlock-Shock/community_vue
|
src/api/login.js
|
<filename>src/api/login.js<gh_stars>0
import {request} from 'utils/request.js';
export function login(userid1,password1){
let param = new URLSearchParams()
param.append('userid', userid1)
param.append('password', <PASSWORD>)
return request({
url: '/login',
method: 'post',
data: param
})
}
|
heyingquan13/kafka
|
clients/src/test/java/org/apache/kafka/common/requests/RequestHeaderTest.java
|
<reponame>heyingquan13/kafka
/*
* 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.kafka.common.requests;
import org.apache.kafka.common.message.RequestHeaderData;
import org.apache.kafka.common.protocol.ApiKeys;
import org.apache.kafka.common.protocol.ByteBufferAccessor;
import org.apache.kafka.common.protocol.ObjectSerializationCache;
import org.junit.jupiter.api.Test;
import java.nio.ByteBuffer;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class RequestHeaderTest {
@Test
public void testSerdeControlledShutdownV0() {
// Verify that version 0 of controlled shutdown does not include the clientId field
short apiVersion = 0;
int correlationId = 2342;
ByteBuffer rawBuffer = ByteBuffer.allocate(32);
rawBuffer.putShort(ApiKeys.CONTROLLED_SHUTDOWN.id);
rawBuffer.putShort(apiVersion);
rawBuffer.putInt(correlationId);
rawBuffer.flip();
RequestHeader deserialized = RequestHeader.parse(rawBuffer);
assertEquals(ApiKeys.CONTROLLED_SHUTDOWN, deserialized.apiKey());
assertEquals(0, deserialized.apiVersion());
assertEquals(correlationId, deserialized.correlationId());
assertEquals("", deserialized.clientId());
assertEquals(0, deserialized.headerVersion());
ByteBuffer serializedBuffer = RequestTestUtils.serializeRequestHeader(deserialized);
assertEquals(ApiKeys.CONTROLLED_SHUTDOWN.id, serializedBuffer.getShort(0));
assertEquals(0, serializedBuffer.getShort(2));
assertEquals(correlationId, serializedBuffer.getInt(4));
assertEquals(8, serializedBuffer.limit());
}
@Test
public void testRequestHeaderV1() {
short apiVersion = 1;
RequestHeader header = new RequestHeader(ApiKeys.FIND_COORDINATOR, apiVersion, "", 10);
assertEquals(1, header.headerVersion());
ByteBuffer buffer = RequestTestUtils.serializeRequestHeader(header);
assertEquals(10, buffer.remaining());
RequestHeader deserialized = RequestHeader.parse(buffer);
assertEquals(header, deserialized);
}
@Test
public void testRequestHeaderV2() {
short apiVersion = 2;
RequestHeader header = new RequestHeader(ApiKeys.CREATE_DELEGATION_TOKEN, apiVersion, "", 10);
assertEquals(2, header.headerVersion());
ByteBuffer buffer = RequestTestUtils.serializeRequestHeader(header);
assertEquals(11, buffer.remaining());
RequestHeader deserialized = RequestHeader.parse(buffer);
assertEquals(header, deserialized);
}
@Test
public void parseHeaderFromBufferWithNonZeroPosition() {
ByteBuffer buffer = ByteBuffer.allocate(64);
buffer.position(10);
RequestHeader header = new RequestHeader(ApiKeys.FIND_COORDINATOR, (short) 1, "", 10);
ObjectSerializationCache serializationCache = new ObjectSerializationCache();
// size must be called before write to avoid an NPE with the current implementation
header.size(serializationCache);
header.write(buffer, serializationCache);
int limit = buffer.position();
buffer.position(10);
buffer.limit(limit);
RequestHeader parsed = RequestHeader.parse(buffer);
assertEquals(header, parsed);
}
@Test
public void parseHeaderWithNullClientId() {
RequestHeaderData headerData = new RequestHeaderData().
setClientId(null).
setCorrelationId(123).
setRequestApiKey(ApiKeys.FIND_COORDINATOR.id).
setRequestApiVersion((short) 10);
ObjectSerializationCache serializationCache = new ObjectSerializationCache();
ByteBuffer buffer = ByteBuffer.allocate(headerData.size(serializationCache, (short) 2));
headerData.write(new ByteBufferAccessor(buffer), serializationCache, (short) 2);
buffer.flip();
RequestHeader parsed = RequestHeader.parse(buffer);
assertEquals("", parsed.clientId());
assertEquals(123, parsed.correlationId());
assertEquals(ApiKeys.FIND_COORDINATOR, parsed.apiKey());
assertEquals((short) 10, parsed.apiVersion());
}
}
|
mattcobb/codekit-java
|
codekit/src/main/java/com/att/api/aab/service/ContactResultSet.java
|
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/*
* Copyright 2014 AT&T
*
* 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 com.att.api.aab.service;
import org.json.JSONArray;
import org.json.JSONObject;
public final class ContactResultSet {
private final int totalRecords;
private final int totalPages;
private final int currentPageIndex;
private final int previousPage;
private final int nextPage;
private Contact[] contacts;
private QuickContact[] quickContacts;
private ContactResultSet(JSONObject jobj) {
this.totalRecords = jobj.getInt("totalRecords");
this.totalPages = jobj.getInt("totalPages");
this.currentPageIndex = jobj.getInt("currentPageIndex");
this.previousPage = jobj.getInt("previousPage");
this.nextPage = jobj.getInt("nextPage");
if (jobj.has("contacts")) {
JSONArray jarr = jobj.getJSONObject("contacts").getJSONArray("contact");
Contact[] contacts = new Contact[jarr.length()];
for (int i = 0; i < jarr.length(); ++i) {
contacts[i] = Contact.valueOf(jarr.getJSONObject(i));
}
this.contacts = contacts;
}
if (jobj.has("quickContacts")) {
JSONArray jarr = jobj.getJSONObject("quickContacts").getJSONArray("quickContact");
QuickContact[] quickContacts = new QuickContact[jarr.length()];
for (int i = 0; i < jarr.length(); ++i) {
quickContacts[i] = QuickContact.valueOf(jarr.getJSONObject(i));
}
this.quickContacts = quickContacts;
}
}
public int getTotalRecords() {
return totalRecords;
}
public int getTotalPages() {
return totalPages;
}
public int getCurrentPageIndex() {
return currentPageIndex;
}
public int getPreviousPage() {
return previousPage;
}
public int getNextPage() {
return nextPage;
}
public Contact[] getContacts() {
return contacts;
}
public QuickContact[] getQuickContacts() {
return quickContacts;
}
public static ContactResultSet valueOf(JSONObject jobj) {
return new ContactResultSet(jobj);
}
}
|
lukaszlaszuk/insightconnect-plugins
|
plugins/zscaler/icon_zscaler/actions/get_sandbox_report_for_hash/schema.py
|
# GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json
class Component:
DESCRIPTION = "Get a full report for an MD5 hash of a file that was analyzed by Sandbox"
class Input:
HASH = "hash"
class Output:
FULL_REPORT = "full_report"
class GetSandboxReportForHashInput(insightconnect_plugin_runtime.Input):
schema = json.loads("""
{
"type": "object",
"title": "Variables",
"properties": {
"hash": {
"type": "string",
"title": "Hash",
"description": "MD5 hash to get report",
"order": 1
}
},
"required": [
"hash"
]
}
""")
def __init__(self):
super(self.__class__, self).__init__(self.schema)
class GetSandboxReportForHashOutput(insightconnect_plugin_runtime.Output):
schema = json.loads("""
{
"type": "object",
"title": "Variables",
"properties": {
"full_report": {
"$ref": "#/definitions/full_report",
"title": "Full Report",
"description": "Full report of an analyzed MD5 hash",
"order": 1
}
},
"required": [
"full_report"
],
"definitions": {
"Classification": {
"type": "object",
"title": "Classification",
"properties": {
"Category": {
"type": "string",
"title": "Category",
"description": "Category",
"order": 1
},
"DetectedMalware": {
"type": "string",
"title": "Detected Malware",
"description": "Detected malware",
"order": 2
},
"Score": {
"type": "integer",
"title": "Score",
"description": "Score",
"order": 3
},
"Type": {
"type": "string",
"title": "Type",
"description": "Type",
"order": 4
}
}
},
"FileProperties": {
"type": "object",
"title": "FileProperties",
"properties": {
"DigitalCerificate": {
"type": "string",
"title": "Digital Certificate",
"description": "Digital certificate",
"order": 1
},
"FileSize": {
"type": "integer",
"title": "File Size",
"description": "File size",
"order": 2
},
"FileType": {
"type": "string",
"title": "File Type",
"description": "File type",
"order": 3
},
"Issuer": {
"type": "string",
"title": "Issuer",
"description": "Issuer",
"order": 4
},
"MD5": {
"type": "string",
"title": "MD5",
"description": "MD5",
"order": 5
},
"RootCA": {
"type": "string",
"title": "Root CA",
"description": "Root CA",
"order": 6
},
"SHA1": {
"type": "string",
"title": "SHA1",
"description": "SHA1",
"order": 7
},
"SSDeep": {
"type": "string",
"title": "SS Deep",
"description": "SS deep",
"order": 8
},
"Sha256": {
"type": "string",
"title": "SHA256",
"description": "SHA256",
"order": 9
}
}
},
"FullDetails": {
"type": "object",
"title": "FullDetails",
"properties": {
"Classification": {
"$ref": "#/definitions/Classification",
"title": "Classification",
"description": "Classification",
"order": 1
},
"FileProperties": {
"$ref": "#/definitions/FileProperties",
"title": "File Properties",
"description": "File properties",
"order": 2
},
"Networking": {
"type": "array",
"title": "Networking",
"description": "Networking",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 6
},
"Persistence": {
"type": "array",
"title": "Persistence",
"description": "Persistence",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 3
},
"SecurityBypass": {
"type": "array",
"title": "Security Bypass",
"description": "Security bypass",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 4
},
"Stealth": {
"type": "array",
"title": "Stealth",
"description": "Stealth",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 7
},
"Summary": {
"$ref": "#/definitions/Summary",
"title": "Summary",
"description": "Summary",
"order": 5
},
"SystemSummary": {
"type": "array",
"title": "System Summary",
"description": "System summary",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 8
}
},
"definitions": {
"Classification": {
"type": "object",
"title": "Classification",
"properties": {
"Category": {
"type": "string",
"title": "Category",
"description": "Category",
"order": 1
},
"DetectedMalware": {
"type": "string",
"title": "Detected Malware",
"description": "Detected malware",
"order": 2
},
"Score": {
"type": "integer",
"title": "Score",
"description": "Score",
"order": 3
},
"Type": {
"type": "string",
"title": "Type",
"description": "Type",
"order": 4
}
}
},
"FileProperties": {
"type": "object",
"title": "FileProperties",
"properties": {
"DigitalCerificate": {
"type": "string",
"title": "Digital Certificate",
"description": "Digital certificate",
"order": 1
},
"FileSize": {
"type": "integer",
"title": "File Size",
"description": "File size",
"order": 2
},
"FileType": {
"type": "string",
"title": "File Type",
"description": "File type",
"order": 3
},
"Issuer": {
"type": "string",
"title": "Issuer",
"description": "Issuer",
"order": 4
},
"MD5": {
"type": "string",
"title": "MD5",
"description": "MD5",
"order": 5
},
"RootCA": {
"type": "string",
"title": "Root CA",
"description": "Root CA",
"order": 6
},
"SHA1": {
"type": "string",
"title": "SHA1",
"description": "SHA1",
"order": 7
},
"SSDeep": {
"type": "string",
"title": "SS Deep",
"description": "SS deep",
"order": 8
},
"Sha256": {
"type": "string",
"title": "SHA256",
"description": "SHA256",
"order": 9
}
}
},
"PersistenceSummary": {
"type": "object",
"title": "PersistenceSummary",
"properties": {
"Risk": {
"type": "string",
"title": "Risk",
"description": "Risk",
"order": 1
},
"Signature": {
"type": "string",
"title": "Signature",
"description": "Signature",
"order": 2
},
"SignatureSources": {
"type": "array",
"title": "Signature Sources",
"description": "Signature sources",
"items": {
"type": "string"
},
"order": 3
}
}
},
"Summary": {
"type": "object",
"title": "Summary",
"properties": {
"Category": {
"type": "string",
"title": "Category",
"description": "Category",
"order": 1
},
"Duration": {
"type": "integer",
"title": "Duration",
"description": "Duration",
"order": 2
},
"FileType": {
"type": "string",
"title": "File Type",
"description": "File type",
"order": 3
},
"StartTime": {
"type": "integer",
"title": "Start Time",
"description": "Start time",
"order": 4
},
"Status": {
"type": "string",
"title": "Status",
"description": "Status",
"order": 5
}
}
}
}
},
"PersistenceSummary": {
"type": "object",
"title": "PersistenceSummary",
"properties": {
"Risk": {
"type": "string",
"title": "Risk",
"description": "Risk",
"order": 1
},
"Signature": {
"type": "string",
"title": "Signature",
"description": "Signature",
"order": 2
},
"SignatureSources": {
"type": "array",
"title": "Signature Sources",
"description": "Signature sources",
"items": {
"type": "string"
},
"order": 3
}
}
},
"Summary": {
"type": "object",
"title": "Summary",
"properties": {
"Category": {
"type": "string",
"title": "Category",
"description": "Category",
"order": 1
},
"Duration": {
"type": "integer",
"title": "Duration",
"description": "Duration",
"order": 2
},
"FileType": {
"type": "string",
"title": "File Type",
"description": "File type",
"order": 3
},
"StartTime": {
"type": "integer",
"title": "Start Time",
"description": "Start time",
"order": 4
},
"Status": {
"type": "string",
"title": "Status",
"description": "Status",
"order": 5
}
}
},
"full_report": {
"type": "object",
"title": "full_report",
"properties": {
"FullDetails": {
"$ref": "#/definitions/FullDetails",
"title": "Full Details",
"description": "Full details",
"order": 1
}
},
"definitions": {
"Classification": {
"type": "object",
"title": "Classification",
"properties": {
"Category": {
"type": "string",
"title": "Category",
"description": "Category",
"order": 1
},
"DetectedMalware": {
"type": "string",
"title": "Detected Malware",
"description": "Detected malware",
"order": 2
},
"Score": {
"type": "integer",
"title": "Score",
"description": "Score",
"order": 3
},
"Type": {
"type": "string",
"title": "Type",
"description": "Type",
"order": 4
}
}
},
"FileProperties": {
"type": "object",
"title": "FileProperties",
"properties": {
"DigitalCerificate": {
"type": "string",
"title": "Digital Certificate",
"description": "Digital certificate",
"order": 1
},
"FileSize": {
"type": "integer",
"title": "File Size",
"description": "File size",
"order": 2
},
"FileType": {
"type": "string",
"title": "File Type",
"description": "File type",
"order": 3
},
"Issuer": {
"type": "string",
"title": "Issuer",
"description": "Issuer",
"order": 4
},
"MD5": {
"type": "string",
"title": "MD5",
"description": "MD5",
"order": 5
},
"RootCA": {
"type": "string",
"title": "Root CA",
"description": "Root CA",
"order": 6
},
"SHA1": {
"type": "string",
"title": "SHA1",
"description": "SHA1",
"order": 7
},
"SSDeep": {
"type": "string",
"title": "SS Deep",
"description": "SS deep",
"order": 8
},
"Sha256": {
"type": "string",
"title": "SHA256",
"description": "SHA256",
"order": 9
}
}
},
"FullDetails": {
"type": "object",
"title": "FullDetails",
"properties": {
"Classification": {
"$ref": "#/definitions/Classification",
"title": "Classification",
"description": "Classification",
"order": 1
},
"FileProperties": {
"$ref": "#/definitions/FileProperties",
"title": "File Properties",
"description": "File properties",
"order": 2
},
"Networking": {
"type": "array",
"title": "Networking",
"description": "Networking",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 6
},
"Persistence": {
"type": "array",
"title": "Persistence",
"description": "Persistence",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 3
},
"SecurityBypass": {
"type": "array",
"title": "Security Bypass",
"description": "Security bypass",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 4
},
"Stealth": {
"type": "array",
"title": "Stealth",
"description": "Stealth",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 7
},
"Summary": {
"$ref": "#/definitions/Summary",
"title": "Summary",
"description": "Summary",
"order": 5
},
"SystemSummary": {
"type": "array",
"title": "System Summary",
"description": "System summary",
"items": {
"$ref": "#/definitions/PersistenceSummary"
},
"order": 8
}
},
"definitions": {
"Classification": {
"type": "object",
"title": "Classification",
"properties": {
"Category": {
"type": "string",
"title": "Category",
"description": "Category",
"order": 1
},
"DetectedMalware": {
"type": "string",
"title": "Detected Malware",
"description": "Detected malware",
"order": 2
},
"Score": {
"type": "integer",
"title": "Score",
"description": "Score",
"order": 3
},
"Type": {
"type": "string",
"title": "Type",
"description": "Type",
"order": 4
}
}
},
"FileProperties": {
"type": "object",
"title": "FileProperties",
"properties": {
"DigitalCerificate": {
"type": "string",
"title": "Digital Certificate",
"description": "Digital certificate",
"order": 1
},
"FileSize": {
"type": "integer",
"title": "File Size",
"description": "File size",
"order": 2
},
"FileType": {
"type": "string",
"title": "File Type",
"description": "File type",
"order": 3
},
"Issuer": {
"type": "string",
"title": "Issuer",
"description": "Issuer",
"order": 4
},
"MD5": {
"type": "string",
"title": "MD5",
"description": "MD5",
"order": 5
},
"RootCA": {
"type": "string",
"title": "Root CA",
"description": "Root CA",
"order": 6
},
"SHA1": {
"type": "string",
"title": "SHA1",
"description": "SHA1",
"order": 7
},
"SSDeep": {
"type": "string",
"title": "SS Deep",
"description": "SS deep",
"order": 8
},
"Sha256": {
"type": "string",
"title": "SHA256",
"description": "SHA256",
"order": 9
}
}
},
"PersistenceSummary": {
"type": "object",
"title": "PersistenceSummary",
"properties": {
"Risk": {
"type": "string",
"title": "Risk",
"description": "Risk",
"order": 1
},
"Signature": {
"type": "string",
"title": "Signature",
"description": "Signature",
"order": 2
},
"SignatureSources": {
"type": "array",
"title": "Signature Sources",
"description": "Signature sources",
"items": {
"type": "string"
},
"order": 3
}
}
},
"Summary": {
"type": "object",
"title": "Summary",
"properties": {
"Category": {
"type": "string",
"title": "Category",
"description": "Category",
"order": 1
},
"Duration": {
"type": "integer",
"title": "Duration",
"description": "Duration",
"order": 2
},
"FileType": {
"type": "string",
"title": "File Type",
"description": "File type",
"order": 3
},
"StartTime": {
"type": "integer",
"title": "Start Time",
"description": "Start time",
"order": 4
},
"Status": {
"type": "string",
"title": "Status",
"description": "Status",
"order": 5
}
}
}
}
},
"PersistenceSummary": {
"type": "object",
"title": "PersistenceSummary",
"properties": {
"Risk": {
"type": "string",
"title": "Risk",
"description": "Risk",
"order": 1
},
"Signature": {
"type": "string",
"title": "Signature",
"description": "Signature",
"order": 2
},
"SignatureSources": {
"type": "array",
"title": "Signature Sources",
"description": "Signature sources",
"items": {
"type": "string"
},
"order": 3
}
}
},
"Summary": {
"type": "object",
"title": "Summary",
"properties": {
"Category": {
"type": "string",
"title": "Category",
"description": "Category",
"order": 1
},
"Duration": {
"type": "integer",
"title": "Duration",
"description": "Duration",
"order": 2
},
"FileType": {
"type": "string",
"title": "File Type",
"description": "File type",
"order": 3
},
"StartTime": {
"type": "integer",
"title": "Start Time",
"description": "Start time",
"order": 4
},
"Status": {
"type": "string",
"title": "Status",
"description": "Status",
"order": 5
}
}
}
}
}
}
}
""")
def __init__(self):
super(self.__class__, self).__init__(self.schema)
|
AllanKerr/attachment
|
icons/cs-30-icons.js
|
<filename>icons/cs-30-icons.js<gh_stars>0
/* eslint-disable max-len */
import '@polymer/polymer/polymer-legacy.js';
import '@polymer/iron-iconset-svg/iron-iconset-svg.js';
const $_documentContainer = document.createElement('template');
$_documentContainer.innerHTML = `<iron-iconset-svg name="d2l-cs-30" size="30" rtl-mirroring="true">
<svg>
<defs>
<g id="content">
<path d="M24.8,0h-7.6C16.5,0,16,0.4,16,1v16.5c0,0.1,0,0.2,0.2,0.3c0.1,0.1,0.3,0.2,0.5,0.2c0.2,0,0.3,0,0.4-0.1l0,0
l2.3-1.7L21,15l1.6,1.2l2.3,1.7c0.1,0.1,0.3,0.1,0.4,0.1c0.2,0,0.3,0,0.5-0.2c0.1-0.1,0.2-0.2,0.2-0.3V1C26,0.4,25.5,0,24.8,0z
M24,14.7l-1.8-1.3C21.8,13.1,21.4,13,21,13s-0.8,0.1-1.2,0.4L18,14.7V2h6V14.7z"></path>
<path d="M26,21v5c0,2.2-1.8,4-4,4H8c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h5c0.5,0,1,0.5,1,1s-0.5,1-1,1H8
C6.9,2,6,2.9,6,4v22c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2v-5c0-0.5,0.5-1,1-1S26,20.5,26,21z"></path>
<path d="M13.5,5h-5C8.2,5,8,4.8,8,4.5S8.2,4,8.5,4h5C13.8,4,14,4.2,14,4.5S13.8,5,13.5,5z"></path>
<path d="M13.5,8h-5C8.2,8,8,7.8,8,7.5S8.2,7,8.5,7h5C13.8,7,14,7.2,14,7.5S13.8,8,13.5,8z"></path>
<path d="M13.5,11h-5C8.2,11,8,10.8,8,10.5S8.2,10,8.5,10h5c0.3,0,0.5,0.2,0.5,0.5S13.8,11,13.5,11z"></path>
<path d="M13.5,14h-5C8.2,14,8,13.8,8,13.5S8.2,13,8.5,13h5c0.3,0,0.5,0.2,0.5,0.5S13.8,14,13.5,14z"></path>
<path d="M13.5,17h-5C8.2,17,8,16.8,8,16.5S8.2,16,8.5,16h5c0.3,0,0.5,0.2,0.5,0.5S13.8,17,13.5,17z"></path>
<path d="M21.5,20h-13C8.2,20,8,19.8,8,19.5S8.2,19,8.5,19h13c0.3,0,0.5,0.2,0.5,0.5S21.8,20,21.5,20z"></path>
<path d="M21.5,23h-13C8.2,23,8,22.8,8,22.5S8.2,22,8.5,22h13c0.3,0,0.5,0.2,0.5,0.5S21.8,23,21.5,23z"></path>
<path d="M21.5,26h-13C8.2,26,8,25.8,8,25.5S8.2,25,8.5,25h13c0.3,0,0.5,0.2,0.5,0.5S21.8,26,21.5,26z"></path>
</g>
<g id="google_doc">
<path d="M25.4,7.6c0-0.1-0.1-0.1-0.1-0.1l-6.8-6.8C18,0.2,17.5,0,17,0H7.8c-2.2,0-4,1.8-4,4v22c0,2.2,1.8,4,4,4h14
c2.2,0,4-1.8,4-4V8.8C25.8,8.4,25.7,7.9,25.4,7.6z M17.8,2.8l0.6,0.6l4,4L23,8h-3.2c-1.1,0-2-0.9-2-2V2.8z M23.8,26c0,1.1-0.9,2-2,2
h-14c-1.1,0-2-0.9-2-2V4c0-1.1,0.9-2,2-2h8v4c0,2.2,1.8,4,4,4h4V26z"></path>
<path d="M18.7,24.7H11c-0.4,0-0.7-0.2-0.9-0.5l-1.7-3c-0.2-0.3-0.2-0.6,0-0.9l3.6-6.1c0.2-0.3,0.5-0.5,0.9-0.5h3.8
c0.4,0,0.7,0.2,0.9,0.5l3.6,6.1c0.2,0.3,0.2,0.6,0,0.9l-1.7,3C19.4,24.5,19,24.7,18.7,24.7z M16.8,14.7l-3.8,0l-3.6,6.1l1.7,2.9
l7.7,0l1.7-2.9L16.8,14.7z M20.3,20.7C20.3,20.7,20.3,20.7,20.3,20.7L20.3,20.7L20.3,20.7z"></path>
<path d="M16.4,21.7h-3.2c-0.3,0-0.5-0.1-0.6-0.3l-0.7-1.2c-0.1-0.2-0.1-0.5,0-0.7l1.5-2.4c0.1-0.2,0.4-0.3,0.6-0.3h1.6
c0.3,0,0.5,0.1,0.6,0.3l1.5,2.5c0.1,0.2,0.1,0.5,0,0.7L17,21.3C16.9,21.6,16.7,21.7,16.4,21.7z M13.4,20.7h2.9l0.5-0.9l-1.3-2.1
h-1.3l-1.3,2.1L13.4,20.7z M16.9,20C16.9,20,16.9,20,16.9,20C16.9,20,16.9,20,16.9,20z M12.8,20L12.8,20C12.8,20,12.8,20,12.8,20z
M14.3,17.5L14.3,17.5C14.3,17.5,14.3,17.5,14.3,17.5z"></path>
</g>
<g id="one_drive">
<path d="M25.87,8a.833.833,0,0,0-.16-.21L18.21.29A.833.833,0,0,0,18,.13.983.983,0,0,0,17.5,0H8A4.012,4.012,0,0,0,4,4V26a4.012,
4.012,0,0,0,4,4H22a4.012,4.012,0,0,0,4-4V8.5A.982.982,0,0,0,25.87,8ZM18,2.92,23.08,8H20a2.006,2.006,0,0,1-2-2ZM24,26a2.006,2.006,
0,0,1-2,2H8a2.006,2.006,0,0,1-2-2V4A2.006,2.006,0,0,1,8,2h8V6a4.012,4.012,0,0,0,4,4h4Z"></path>
<path d="M11.495,20.349a2.565,2.565,0,0,0,.084.657H9.545A1.5,1.5,0,0,1,8,19.552,1.464,1.464,0,0,1,9.5,18.1a.342.342,0,0,0,.342-.308,
2.1,2.1,0,0,1,2.167-2.027,2.4,2.4,0,0,1,.495.055c.051.011.1.024.153.038a.558.558,0,0,0,.142.026.35.35,0,0,0,.329-.231,2.643,2.643,
0,0,1,2.579-1.636A2.735,2.735,0,0,1,18.4,16.008a2.963,2.963,0,0,0-1.775-.594,3,3,0,0,0-2.88,2.223A2.748,2.748,0,0,0,
11.495,20.349Zm10.184,1.034a1.029,1.029,0,0,1-.755.322h-6.71a1.35,1.35,0,0,1-1.342-1.356,1.3,1.3,0,0,1,.273-.811,1.208,1.208,0,0,
1,.5-.412A1.189,1.189,0,0,1,14.053,19a1.146,1.146,0,0,1,.161-.014h.468a.34.34,0,0,0,.342-.349v-.021a1.4,1.4,0,0,1-.007-.175,1.617,
1.617,0,0,1,1.608-1.629,1.665,1.665,0,0,1,1.524,1.069.335.335,0,0,0,.314.217.284.284,0,0,0,.133-.028,1.705,1.705,0,0,1,.72-.168,1.377,
1.377,0,0,1,.335.042A1.627,1.627,0,0,1,20.9,19.273a.341.341,0,0,0,.3.294,1.143,1.143,0,0,1,.8,1.048A1.06,1.06,0,0,1,21.678,21.383Z"></path>
</g>
<g id="link">
<path d="M28.4,1.6c-1-1-2.4-1.6-3.8-1.6c-1.4,0-2.7,0.5-3.8,1.6l-5.3,5.3c-1.8,1.8-2,4.7-0.6,6.8l-1.3,1.3
c-0.9-0.6-1.9-0.9-3-0.9c-1.4,0-2.7,0.5-3.8,1.6l-5.3,5.3c-2.1,2.1-2.1,5.5,0,7.5c1,1,2.4,1.6,3.8,1.6c1.4,0,2.7-0.5,3.8-1.6
l5.3-5.3c1.8-1.8,2-4.7,0.6-6.8l1.3-1.3c0.9,0.6,1.9,0.9,3,0.9c1.4,0,2.7-0.5,3.8-1.6l5.3-5.3C30.5,7,30.5,3.6,28.4,1.6z M14,19.3
c0,0.9-0.3,1.7-1,2.4L7.7,27c-0.6,0.6-1.5,1-2.4,1c-0.9,0-1.7-0.4-2.4-1c-0.6-0.6-1-1.5-1-2.4c0-0.9,0.3-1.7,1-2.4L8.3,17
c0.6-0.6,1.5-1,2.4-1c0.6,0,1.1,0.1,1.6,0.4L8.6,20c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3c0.3,0,0.5-0.1,0.7-0.3l3.6-3.6
C13.9,18.3,14,18.8,14,19.3z M27,7.7L21.7,13c-0.6,0.6-1.5,1-2.4,1c-0.6,0-1.1-0.1-1.6-0.4l3.6-3.6c0.4-0.4,0.4-1,0-1.4
c-0.4-0.4-1-0.4-1.4,0l-3.6,3.6c-0.2-0.5-0.4-1-0.4-1.5c0-0.9,0.3-1.7,1-2.4L22.3,3c0.6-0.6,1.5-1,2.4-1c0.9,0,1.7,0.3,2.4,1
c0.6,0.6,1,1.5,1,2.4C28,6.2,27.7,7.1,27,7.7z"></path>
</g>
<g id="file">
<path d="M25.5,7.6c0-0.1-0.1-0.1-0.1-0.1l-6.8-6.8C18.2,0.2,17.7,0,17.2,0H8C5.8,0,4,1.8,4,4v22c0,2.2,1.8,4,4,4h14
c2.2,0,4-1.8,4-4V8.8C26,8.4,25.8,7.9,25.5,7.6z M18,2.8l0.6,0.6l4,4L23.2,8H20c-1.1,0-2-0.9-2-2V2.8z M24,26c0,1.1-0.9,2-2,2H8
c-1.1,0-2-0.9-2-2V4c0-1.1,0.9-2,2-2h8v4c0,2.2,1.8,4,4,4h4V26z"></path>
<path d="M13.5,5h-5C8.2,5,8,4.8,8,4.5S8.2,4,8.5,4h5C13.8,4,14,4.2,14,4.5S13.8,5,13.5,5z"></path>
<path d="M13.5,8h-5C8.2,8,8,7.8,8,7.5S8.2,7,8.5,7h5C13.8,7,14,7.2,14,7.5S13.8,8,13.5,8z"></path>
<path d="M21.5,20h-13C8.2,20,8,19.8,8,19.5S8.2,19,8.5,19h13c0.3,0,0.5,0.2,0.5,0.5S21.8,20,21.5,20z"></path>
<path d="M21.5,23h-13C8.2,23,8,22.8,8,22.5S8.2,22,8.5,22h13c0.3,0,0.5,0.2,0.5,0.5S21.8,23,21.5,23z"></path>
<path d="M21.5,26h-13C8.2,26,8,25.8,8,25.5S8.2,25,8.5,25h13c0.3,0,0.5,0.2,0.5,0.5S21.8,26,21.5,26z"></path>
<path d="M22,16.5c0,0.3-0.2,0.5-0.5,0.5h-13C8.2,17,8,16.8,8,16.5C8,16.2,8.2,16,8.5,16h13C21.8,16,22,16.2,22,16.5z"></path>
<path d="M22,13.5c0,0.3-0.2,0.5-0.5,0.5h-13C8.2,14,8,13.8,8,13.5C8,13.2,8.2,13,8.5,13h13C21.8,13,22,13.2,22,13.5z"></path>
<path d="M16,10.5c0,0.3-0.2,0.5-0.5,0.5h-7C8.2,11,8,10.8,8,10.5C8,10.2,8.2,10,8.5,10h7C15.8,10,16,10.2,16,10.5z"></path>
</g>
</defs>
</svg>
</iron-iconset-svg>`;
document.head.appendChild($_documentContainer.content);
|
Royalone-mobile/NoPlayer
|
core/src/main/java/com/novoda/noplayer/internal/mediaplayer/SystemProperties.java
|
<filename>core/src/main/java/com/novoda/noplayer/internal/mediaplayer/SystemProperties.java
package com.novoda.noplayer.internal.mediaplayer;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* This class uses reflection to call android.os.SystemProperties.get(String) since the class is hidden.
*/
class SystemProperties {
private static final String SYSTEM_PROPERTIES_CLASS = "android.os.SystemProperties";
private static final String SYSTEM_PROPERTIES_METHOD_GET = "get";
private static final Object STATIC_CLASS_INSTANCE = null;
String get(String key) throws MissingSystemPropertiesException {
try {
Class<?> systemProperties = Class.forName(SYSTEM_PROPERTIES_CLASS);
Method getMethod = systemProperties.getMethod(SYSTEM_PROPERTIES_METHOD_GET, String.class);
return (String) getMethod.invoke(STATIC_CLASS_INSTANCE, key);
} catch (ClassNotFoundException e) {
throw new MissingSystemPropertiesException(e);
} catch (NoSuchMethodException e) {
throw new MissingSystemPropertiesException(e);
} catch (InvocationTargetException e) {
throw new MissingSystemPropertiesException(e);
} catch (IllegalAccessException e) {
throw new MissingSystemPropertiesException(e);
}
}
static class MissingSystemPropertiesException extends Exception {
MissingSystemPropertiesException(Exception e) {
super(e);
}
}
}
|
NotJustAToy/falcon-heavy
|
falcon_heavy/contrib/django/decorators.py
|
# Copyright 2019-2020 Not Just A Toy Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import io
import typing as ty
from django.http import HttpRequest, HttpResponse, StreamingHttpResponse
from falcon_heavy.core import types as t
from falcon_heavy.contrib.decorators import AbstractOpenAPIDecorator, NormalizedRequest, ViewArgs, ViewKwargs
from falcon_heavy.contrib.responses import Cookie, ContentKind
__all__ = (
'DjangoAbstractOpenAPIDecorator',
)
class DjangoAbstractOpenAPIDecorator(AbstractOpenAPIDecorator):
def _get_normalized_request(
self,
instance: ty.Any,
args: ViewArgs,
kwargs: ViewKwargs
) -> NormalizedRequest:
request: HttpRequest = args[0]
headers = {}
for name, value in request.META.items():
if name == 'CONTENT_TYPE':
headers['content-type'] = value
elif name == 'CONTENT_LENGTH':
headers['content-length'] = value
elif name.startswith('HTTP_'):
headers[name[5:].lower().replace('_', '-')] = value
if not hasattr(request, '_body'):
stream = request
else:
stream = io.BytesIO(request.body)
return NormalizedRequest(
original=request,
method=request.method.lower(),
path=request.path,
path_params=kwargs,
query_params=request.GET,
headers=headers,
cookies=request.COOKIES,
stream=stream,
content_length=int(request.META.get('CONTENT_LENGTH') or 0),
content_type=request.META.get('CONTENT_TYPE', '')
)
def _render_response(
self,
status_code: int,
headers: ty.Mapping[str, ty.Any],
cookies: ty.Iterable[Cookie],
instance: ty.Any,
args: ViewArgs,
kwargs: ViewKwargs,
content_type: ty.Optional[str] = None,
content_length: ty.Optional[int] = None,
content: ty.Any = t.Undefined,
content_kind: ContentKind = ContentKind.UNDEFINED,
**context: ty.Any
) -> HttpResponse:
if content_kind == ContentKind.STREAMING:
response = StreamingHttpResponse(streaming_content=content, content_type=content_type, status=status_code)
elif content_kind == ContentKind.MEDIA:
response = HttpResponse(content=content, content_type=content_type, status=status_code)
else:
response = HttpResponse(content_type=content_type, status=status_code)
for name, value in headers.items():
response[name] = value
if content_length is not None:
response['content-length'] = str(content_length)
for cookie in cookies:
response.set_cookie(
cookie.name,
value=cookie.value,
max_age=cookie.max_age,
expires=cookie.expires,
path=cookie.path,
domain=cookie.domain,
secure=cookie.secure,
httponly=cookie.http_only,
samesite=cookie.same_site
)
return response
|
AtomicGameEngine/AtomicPrototypes
|
ParticleEmitter3D/JavaScript/Resources/Components/UI.js
|
'atomic component';
//define font description style
var fd = new Atomic.UIFontDescription();
fd.id = "Vera";
fd.size = 22;
var particleEmitter;
function createButton(self, text, peffectName, layout) {
//create UIButton element
var button = new Atomic.UIButton();
//set its text and font description style
button.text = text;
button.fontDescription = fd;
//laying on the right side
button.gravity = Atomic.UI_GRAVITY.UI_GRAVITY_RIGHT;
//this event will be called when buttons is clicked
button.onClick = function() {
particleEmitter.effect = Atomic.cache.getResource("ParticleEffect", "Particles/" + peffectName + ".peffect");
};
//add button
layout.addChild(button);
}
//UI component
exports.component = function(self) {
particleEmitter = self.getComponent("ParticleEmitter");
// root view
self.uiView = new Atomic.UIView();
// Create a layout, otherwise child widgets won't know how to size themselves
// and would manually need to be sized
var layout = new Atomic.UILayout();
layout.rect = self.uiView.rect;
layout.axis = Atomic.UI_AXIS.UI_AXIS_Y;
layout.layoutPosition = Atomic.UI_LAYOUT_POSITION.UI_LAYOUT_POSITION_GRAVITY;
//add our layout
self.uiView.addChild(layout);
//create buttons
createButton(self, "Disco", "Disco", layout);
createButton(self, "Fire", "Fire", layout);
createButton(self, "Smoke", "Smoke", layout);
createButton(self, "SmokeStack", "SmokeStack", layout);
createButton(self, "SnowExplosion", "SnowExplosion", layout);
};
|
qiuhoude/skynet_learn_dir
|
learn/cpp_learn/RefrenceDemo.cpp
|
<filename>learn/cpp_learn/RefrenceDemo.cpp
#include <iostream>
using namespace std;
/*
引用必须在定义的同时初始化,并且以后也要从一而终,不能再引用其它数据,这有点类似于常量(const 变量)。
注意,引用在定义时需要添加&,在使用时不能添加&,使用时添加&表示取地址
*/
void swap1(int a, int b);
void swap2(int *p1, int *p2);
void swap3(int &r1, int &r2);
int &plus10(int &r) // 返回ref类型
{
cout << "in :" << &r << endl;
r += 10;
cout << "out:" << &r << endl;
return r;
}
int main()
{
int a = 99;
const int &r = a;
// r = 47; // 加const 不能再次赋值
cout << a << ", " << r << endl;
cout << &a << ", " << &r << endl;
cout << "=============================" << endl;
// int num1, num2;
// cout << "Input two integers swap1: ";
// cin >> num1 >> num2;
// swap1(num1, num2);
// cout << num1 << " " << num2 << endl;
// cout << "Input two integers swap2: ";
// cin >> num1 >> num2;
// swap2(&num1, &num2);
// cout << num1 << " " << num2 << endl;
// cout << "Input two integers swap3: ";
// cin >> num1 >> num2;
// swap3(num1, num2);
// cout << num1 << " " << num2 << endl;
cout << "=============================" << endl;
int num1 = 10;
int &num2 = plus10(num1); // 要用引用去接 ,如果用int 接num2的地址就会重新stack上申请
cout << num1 << " " << num2 << endl;
cout << &num1 << " " << &num2 << endl;
num2 = 3;
cout << num1 << " " << num2 << endl;
return 0;
}
//直接传递参数内容
void swap1(int a, int b)
{
int temp = a;
a = b;
b = temp;
}
//传递指针
void swap2(int *p1, int *p2)
{
int temp = *p1;
*p1 = *p2;
*p2 = temp;
}
//按引用传参
void swap3(int &r1, int &r2)
{
int temp = r1;
r1 = r2;
r2 = temp;
}
|
TonnyRed/sedna
|
kernel/tr/strings/text_data.h
|
<filename>kernel/tr/strings/text_data.h<gh_stars>10-100
/*
* File: text_data.h
* Copyright (C) 2006 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS)
*/
#ifndef _TEXT_DATA_H
#define _TEXT_DATA_H
#include "common/sedna.h"
#include "common/xptr.h"
#include "strings_base.h"
struct text_source_t {
enum type_t {
text_mem,
text_pstr,
text_pstrlong,
text_estr
} type;
union {
xptr data;
const char * cstr;
} u;
strsize_t _text_size; // May be undefined for pstr_long
};
static const text_source_t NULL_TEXT = {text_source_t::text_mem};
static inline
bool text_is_null(const text_source_t &t) { return t.type == NULL_TEXT.type && t._text_size == NULL_TEXT._text_size; }
static inline
struct text_source_t text_source_pstr(const xptr text, strsize_t size) {
struct text_source_t result = {text_source_t::text_pstr};
result._text_size = size;
result.u.data = text;
return result;
}
static inline
struct text_source_t text_source_estr(const xptr text, strsize_t size) {
struct text_source_t result = {text_source_t::text_estr};
result._text_size = size;
result.u.data = text;
return result;
}
static inline
struct text_source_t text_source_pstrlong(const xptr text) {
struct text_source_t result = {text_source_t::text_pstrlong};
result.u.data = text;
return result;
}
inline static
struct text_source_t text_source_mem(const char * mem, size_t size) {
struct text_source_t result = {text_source_t::text_mem};
result._text_size = size;
result.u.cstr = mem;
return result;
}
inline static
struct text_source_t text_source_cstr(const char * str) {
struct text_source_t result = {text_source_t::text_mem};
result._text_size = strlen(str);
result.u.cstr = str;
return result;
}
inline static
text_source_t _mem_trimLeft(text_source_t ts) {
U_ASSERT(ts.type == text_source_t::text_mem);
strsize_t wp_k = 0;
strsize_t wp_s = ts._text_size;
while (wp_k < wp_s) {
char s = *ts.u.cstr;
if (s != 32 && s != 9 && s != 10 && s != 13) break;
++ts.u.cstr; --ts._text_size;
++wp_k;
}
return ts;
}
inline static
text_source_t trimLeft(text_source_t ts) {
if (ts.type == text_source_t::text_mem) {
return _mem_trimLeft(ts);
} else {
U_ASSERT(false);
return NULL_TEXT;
}
}
#endif /* _TEXT_DATA_H */
|
OstVoj/Electron_React
|
app/components/tab/common/TabButtonContainer.js
|
import React from 'react';
import PropTypes from 'prop-types';
import Col from '../../sections/Col';
import Row from '../../sections/Row';
import styles from './TabButtonContainer.css';
const TabButtonContainer = ({ onSave, onCancel, onClear }) => (
<Row p c>
<Col w={33}>
<button
type="button"
className={styles.tabContainerButton}
onClick={onCancel}
>
Cancel
</button>
</Col>
<Col w={33}>
<button
type="button"
className={styles.tabContainerButton}
onClick={onClear}
>
Clear
</button>
</Col>
<Col w={33}>
<button
type="button"
className={styles.tabContainerButton}
onClick={onSave}
>
Save
</button>
</Col>
</Row>
);
TabButtonContainer.propTypes = {
onSave: PropTypes.func,
onCancel: PropTypes.func,
onClear: PropTypes.func
};
TabButtonContainer.defaultProps = {
onSave: e => {
console.log('No onChange function. value: ', e.target.value);
},
onCancel: e => {
console.log('No onChange function. value: ', e.target.value);
},
onClear: e => {
console.log('No onChange function. value: ', e.target.value);
}
};
export default TabButtonContainer;
|
paullewallencom/java-978-1-8471-9440-4
|
_src/Chapter_14/ch14/WebServiceVersioning/02_WebService20070101/src/com/binildas/esb/servicemix/ws/version20070101/IHello.java
|
<filename>_src/Chapter_14/ch14/WebServiceVersioning/02_WebService20070101/src/com/binildas/esb/servicemix/ws/version20070101/IHello.java
package com.binildas.esb.servicemix.ws.version20070101;
// version20070101.ws.servicemix.esb.binildas.com
public interface IHello{
String hello(String param);
}
|
jadonk/debexpo
|
debexpo/config/routing.py
|
# -*- coding: utf-8 -*-
#
# routing.py — Routes configuration
#
# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/
#
# Copyright © 2008 <NAME> <<EMAIL>>
# Copyright © 2010 <NAME> <<EMAIL>>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
"""
Routes configuration
The more specific and detailed routes should be defined first so they
may take precedent over the more generic routes. For more information
refer to the routes manual at http://routes.groovie.org/docs/
"""
__author__ = '<NAME>'
__copyright__ = 'Copyright © 2008 <NAME>, Copyright © 2010 <NAME>'
__license__ = 'MIT'
from routes import Mapper
def make_map(config):
"""
Creates, configures and returns the routes Mapper.
"""
map = Mapper(directory=config['pylons.paths']['controllers'],
always_scan=config['debug'])
map.minimization = False
# The ErrorController route (handles 404/500 error pages); it should
# likely stay at the top, ensuring it can always be resolved
map.connect('error/{action}', controller='error')
map.connect('error/{action}/{id}', controller='error')
# CUSTOM ROUTES HERE
# n.b.: chances are, this route is overriden by a productive setup in its
# web server configuration
if config['debexpo.handle_debian'].lower() == 'true':
map.connect('/debian/*filename', controller='debian', action='index')
map.connect('index', '/', controller='index', action='index')
map.connect('contact', '/contact', controller='index', action='contact')
map.connect('intro-maintainers', '/intro-maintainers',
controller='index', action='intro_maintainers')
map.connect('sponsors', '/sponsors', controller='sponsor', action='index')
map.connect('packaging-team', '/sponsors/spackaging-team', controller='sponsor', action='packaging_team')
map.connect('guidelines', '/sponsors/guidelines', controller='sponsor', action='guidelines')
map.connect('sponsor-developer', '/sponsors/profile/{id}', controller='sponsor', action='developer')
map.connect('sponsor_tag_save', '/sponsors/save', controller='sponsor', action='save')
map.connect('sponsor_tag_clear', '/sponsors/clear', controller='sponsor', action='clear')
map.connect('intro-reviewers', '/intro-reviewers', controller='index', action='intro_reviewers')
map.connect('my', '/my', controller='my', action='index')
map.connect('download-dmup', '/my/download-dmup', controller='my', action='download-dmup')
map.connect('login', '/login', controller='login', action='index')
map.connect('logout', '/logout', controller='login', action='logout')
map.connect('news', '/news', controller='index', action='news')
map.connect('/package', controller='package', action='index')
map.connect('package', '/package/{packagename}', controller='package', action='index')
map.connect('comment', '/package/{packagename}/comment', controller='package', action='comment')
map.connect('sponsor', '/package/{packagename}/needs_sponsor/{key}', controller='package', action='sponsor')
map.connect('subscribe', '/package/{packagename}/subscribe', controller='package', action='subscribe')
map.connect('delete', '/package/{packagename}/delete/{key}', controller='package', action='delete')
map.connect('rfs-howto', '/sponsors/rfs-howto', controller='sponsor', action='rfs_howto')
map.connect('rfs', '/sponsors/rfs-howto/{packagename}', controller='sponsor', action='rfs_howto')
map.connect('packages', '/packages/{action}', controller='packages', action='index')
map.connect('all-packages', '/packages', controller='packages', action='index')
map.connect('packages-uploader', '/packages/uploader/{id}', controller='packages', action='uploader')
#map.connect('/packages/{action}/{id}', controller='packages', action='index', id=None)
map.connect('packages_filter_feed', '/packages/{filter}/{id}/feed', controller='packages', action='feed')
#map.connect('packages_feed', '/packages/feed', controller='packages', action='feed')
map.connect('qa', '/qa', controller='index', action='qa')
#map.connect('register', '/register/{action}/{id}', controller='register', action='index', id=None)
# LEGACY ROUTE. CAN BE REMOVED LATER
map.connect('/upload/{email}/{password}/{filename}', controller='upload',
action='index')
map.connect('/upload/{filename}', controller='upload', action='index')
map.connect('/soap.wsdl', controller='soap')
map.connect('/{controller}/{action}')
map.connect('/{controller}/{action}/{id}')
#map.connect('/*url', controller='template', action='view')
return map
|
Kosoku/Ditko
|
Ditko/iOS/UIColor+KDIExtensions.h
|
<filename>Ditko/iOS/UIColor+KDIExtensions.h
//
// UIColor+KDIExtensions.h
// Ditko
//
// Created by <NAME> on 3/7/17.
// Copyright © 2021 Kosoku Interactive, LLC. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIColor (KDIExtensions)
#pragma mark Creation
/**
Creates and returns a color in the RGB color space with random values between 0 and 255 for R, G, and B respectively. Alpha is always 1.0.
*/
@property (class,readonly,nonatomic) UIColor *KDI_colorRandomRGB;
/**
Creates and returns a UIColor in the RGB color space with random values between 0 and 255 for R, G, B, and A respectively.
*/
@property (class,readonly,nonatomic) UIColor *KDI_colorRandomRGBA;
/**
Creates and returns a random color in the HSB color space, using values between 0 and 240 for H, S, and B respectively. Alpha is always 1.0.
*/
@property (class,readonly,nonatomic) UIColor *KDI_colorRandomHSB;
/**
Creates and returns a random color in the HSB color space, using values between 0 and 240 for H, S, B, and A respectively.
*/
@property (class,readonly,nonatomic) UIColor *KDI_colorRandomHSBA;
#pragma mark Hexadecimal
/**
Creates and returns a color by parsing *hexadecimalString*.
@param hexadecimalString The string to parse
@return The UIColor created from *hexadecimalString*
*/
+ (nullable UIColor *)KDI_colorWithHexadecimalString:(nullable NSString *)hexadecimalString;
/**
Returns the hexadecimal string from *color*.
@param color The color for which to return a hexadecimal string
@return The hexadecimal string
*/
+ (nullable NSString *)KDI_hexadecimalStringFromColor:(UIColor *)color;
/**
Returns [self.class KDI_hexadecimalStringFromColor:self].
*/
- (nullable NSString *)KDI_hexadecimalString;
#pragma mark Visibility
/**
Tells where the the color has enough luminance compared to the backgroundColor at stated tolerance (luminance level to surpass).
@param backgroundColor the color of the background
@param tolerance the luminance level tolerance
@return BOOL
*/
- (BOOL)KDI_colorVisibleOverBackgroundColor:(UIColor *)backgroundColor tolerance:(CGFloat)tolerance;
#pragma mark Contrasting
/**
Creates and returns a contrasting color for the provided *color*, which will either be UIColor.blackColor or UIColor.whiteColor depending on the perceived brightness of *color*. The perceived brightness is calculated using https://www.w3.org/TR/AERT#color-contrast as a reference. If the contrasting color cannot be computed, *color* is returned.
@param color The color for which to compute the contrasting color
@return The contrasting color
*/
+ (nullable UIColor *)KDI_contrastingColorOfColor:(nullable UIColor *)color;
/**
Returns [self.class KDI_contrastingColorOfColor:self].
@return The contrasting color
*/
- (UIColor *)KDI_contrastingColor;
#if (TARGET_OS_IOS)
/**
Returns a contrasting UIStatusBarStyle for the provided *color*.
@param color The color for which to compute a contrasting status bar style
@return The contrasting status bar style
*/
+ (UIStatusBarStyle)KDI_contrastingStatusBarStyleForColor:(nullable UIColor *)color;
/**
Returns [self.class KDI_contrastingStatusBarStyleForColor:self].
@return The contrasting status bar style
*/
- (UIStatusBarStyle)KDI_contrastingStatusBarStyle;
#endif
#pragma mark Inverse
/**
Creates and returns the inverse of the provided color. The inverse of UIColor.blackColor is UIColor.whiteColor.
@param color The color for which to return the inverse color
@return The inverse color
*/
+ (nullable UIColor *)KDI_inverseColorOfColor:(nullable UIColor *)color;
/**
Returns [self.class KDI_inverseColorOfColor:self].
@return The inverse color
*/
- (UIColor *)KDI_inverseColor;
#pragma mark Hue
/**
Returns a color by adjusting the hue of the *color* by *delta*.
@param color The color to adjust
@param delta The amount to adjust by
@return The new color
*/
+ (nullable UIColor *)KDI_colorByAdjustingHueOfColor:(nullable UIColor *)color delta:(CGFloat)delta;
/**
Returns [self.class KDI_colorByAdjustingHueOfColor:self delta:delta].
*/
- (nullable UIColor *)KDI_colorByAdjustingHueBy:(CGFloat)delta;
/**
Returns a color by adjusting the hue of the *color* by a *percent* of its current value.
@param color The color to adjust
@param percent The percentage to adjust by
@return The new color
*/
+ (nullable UIColor *)KDI_colorByAdjustingHueOfColor:(nullable UIColor *)color percent:(CGFloat)percent;
/**
Returns [self.class KDI_colorByAdjustingHueOfColor:self percent:percent].
*/
- (nullable UIColor *)KDI_colorByAdjustingHueByPercent:(CGFloat)percent;
#pragma mark Saturation
/**
Returns a color by adjusting the saturation of the *color* by *delta*.
@param color The color to adjust
@param delta The amount to adjust by
@return The new color
*/
+ (nullable UIColor *)KDI_colorByAdjustingSaturationOfColor:(nullable UIColor *)color delta:(CGFloat)delta;
/**
Returns [self.class KDI_colorByAdjustingSaturationOfColor:self delta:delta].
*/
- (nullable UIColor *)KDI_colorByAdjustingSaturationBy:(CGFloat)delta;
/**
Returns a color by adjusting the saturation of the *color* by a *percent* of its current value.
@param color The color to adjust
@param percent The percentage to adjust by
@return The new color
*/
+ (nullable UIColor *)KDI_colorByAdjustingSaturationOfColor:(nullable UIColor *)color percent:(CGFloat)percent;
/**
Returns [self.class KDI_colorByAdjustingSaturationOfColor:self percent:percent].
*/
- (nullable UIColor *)KDI_colorByAdjustingSaturationByPercent:(CGFloat)percent;
#pragma mark Brightness
/**
Returns a color by adjusting the brightness of *color* by *delta*. Clamps the new brightness between 0.0 and 1.0.
@param color The color to adjust
@param delta The amount to adjust the brightness
@return The new color
*/
+ (nullable UIColor *)KDI_colorByAdjustingBrightnessOfColor:(nullable UIColor *)color delta:(CGFloat)delta;
/**
Calls `[self.class KDI_colorByAdjustingBrightnessOfColor:self delta:delta]`.
@param delta The amount to adjust the brightness
@return The new color
*/
- (nullable UIColor *)KDI_colorByAdjustingBrightnessBy:(CGFloat)delta;
/**
Returns a color by adjusting the brightness of the *color* by a *percent* of its current value.
@param color The color to adjust
@param percent The percentage to adjust by
@return The new color
*/
+ (nullable UIColor *)KDI_colorByAdjustingBrightnessOfColor:(nullable UIColor *)color percent:(CGFloat)percent;
/**
Returns [self.class KDI_colorByAdjustingBrightnessOfColor:self percent:percent].
*/
- (nullable UIColor *)KDI_colorByAdjustingBrightnessByPercent:(CGFloat)percent;
@end
NS_ASSUME_NONNULL_END
|
mmattamala/gtsam.org
|
doxygen/a01472.js
|
var a01472 =
[
[ "bound", "a01472.html#a3893277d250edd92b03ac9f3cdc0384c", null ]
];
|
dm7h/fpga-event-recorder
|
src/Logikanalysator/USB-TPLE/v_1.0/PC_Software/urjtag-0.10/src/flash/flash.c
|
/*
* $Id: flash.c 1488 2009-04-10 20:12:02Z arniml $
*
* Copyright (C) 2002 ETC s.r.o.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* Written by <NAME> <<EMAIL>>, 2002.
* Modified by <NAME> <<EMAIL>>, 20/09/2006
*
* Documentation:
* [1] Advanced Micro Devices, "Common Flash Memory Interface Specification Release 2.0",
* December 1, 2001
* [2] Intel Corporation, "Intel PXA250 and PXA210 Application Processors
* Developer's Manual", February 2002, Order Number: 278522-001
* [3] Intel Corporation, "Common Flash Interface (CFI) and Command Sets
* Application Note 646", April 2000, Order Number: 292204-004
* [4] Advanced Micro Devices, "Common Flash Memory Interface Publication 100 Vendor & Device
* ID Code Assignments", December 1, 2001, Volume Number: 96.1
*
*/
#include "sysdep.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <flash/cfi.h>
#include <flash/intel.h>
#include "bus.h"
#include "flash.h"
#include "jtag.h"
extern flash_driver_t amd_32_flash_driver;
extern flash_driver_t amd_16_flash_driver;
extern flash_driver_t amd_8_flash_driver;
extern flash_driver_t intel_32_flash_driver;
extern flash_driver_t intel_16_flash_driver;
extern flash_driver_t intel_8_flash_driver;
extern flash_driver_t amd_29xx040_flash_driver; //20/09/2006
flash_driver_t *flash_drivers[] = {
&amd_32_flash_driver,
&amd_16_flash_driver,
&amd_8_flash_driver,
&intel_32_flash_driver,
&intel_16_flash_driver,
&intel_8_flash_driver,
&amd_29xx040_flash_driver, //20/09/2006
NULL
};
extern cfi_array_t *cfi_array;
static flash_driver_t *flash_driver = NULL;
static void
set_flash_driver( void )
{
int i;
cfi_query_structure_t *cfi;
flash_driver = NULL;
if (cfi_array == NULL)
return;
cfi = &cfi_array->cfi_chips[0]->cfi;
for (i = 0; flash_drivers[i] != NULL; i++)
if (flash_drivers[i]->autodetect( cfi_array )) {
flash_driver = flash_drivers[i];
flash_driver->print_info( cfi_array );
return;
}
printf( _("unknown flash - vendor id: %d (0x%04x)\n"),
cfi->identification_string.pri_id_code,
cfi->identification_string.pri_id_code );
printf( _("Flash not supported!\n") );
}
void
flashmsbin( bus_t *bus, FILE *f, int noverify )
{
uint32_t adr;
cfi_query_structure_t *cfi;
set_flash_driver();
if (!cfi_array || !flash_driver) {
printf( _("no flash driver found\n") );
return;
}
cfi = &cfi_array->cfi_chips[0]->cfi;
/* test sync bytes */
{
char sync[8];
fread( &sync, sizeof (char), 7, f );
sync[7] = '\0';
if (strcmp( "B000FF\n", sync ) != 0) {
printf( _("Invalid sync sequence!\n") );
return;
}
}
/* erase memory blocks */
{
uint32_t start;
uint32_t len;
int first, last;
fread( &start, sizeof start, 1, f );
fread( &len, sizeof len, 1, f );
first = start / (cfi->device_geometry.erase_block_regions[0].erase_block_size * 2);
last = (start + len - 1) / (cfi->device_geometry.erase_block_regions[0].erase_block_size * 2);
for (; first <= last; first++) {
adr = first * cfi->device_geometry.erase_block_regions[0].erase_block_size * 2;
flash_driver->unlock_block( cfi_array, adr );
printf( _("block %d unlocked\n"), first );
printf( _("erasing block %d: %d\n"), first, flash_driver->erase_block( cfi_array, adr ) );
}
}
printf( _("program:\n") );
for (;;) {
uint32_t a, l, c;
fread( &a, sizeof a, 1, f );
fread( &l, sizeof l, 1, f );
fread( &c, sizeof c, 1, f );
if (feof( f )) {
printf( _("Error: premature end of file\n") );
return;
}
printf( _("record: start = 0x%08X, len = 0x%08X, checksum = 0x%08X\n"), a, l, c );
if ((a == 0) && (c == 0))
break;
if (l & 3) {
printf( _("Error: Invalid record length!\n") );
return;
}
while (l) {
uint32_t data;
printf( _("addr: 0x%08X"), a );
printf( "\r" );
fflush(stdout);
fread( &data, sizeof data, 1, f );
if (flash_driver->program( cfi_array, a, &data, 1 )) {
printf( _("\nflash error\n") );
return;
}
a += 4;
l -= 4;
}
}
printf( "\n" );
flash_driver->readarray( cfi_array );
if (noverify) {
printf( _("verify skipped\n") );
return;
}
fseek( f, 15, SEEK_SET );
printf( _("verify:\n") );
for (;;) {
uint32_t a, l, c;
fread( &a, sizeof a, 1, f );
fread( &l, sizeof l, 1, f );
fread( &c, sizeof c, 1, f );
if (feof( f )) {
printf( _("Error: premature end of file\n") );
return;
}
printf( _("record: start = 0x%08X, len = 0x%08X, checksum = 0x%08X\n"), a, l, c );
if ((a == 0) && (c == 0))
break;
if (l & 3) {
printf( _("Error: Invalid record length!\n") );
return;
}
while (l) {
uint32_t data, readed;
printf( _("addr: 0x%08X"), a );
printf( "\r" );
fflush( stdout );
fread( &data, sizeof data, 1, f );
readed = bus_read( bus, a );
if (data != readed) {
printf( _("\nverify error: 0x%08X vs. 0x%08X at addr %08X\n"),
readed, data, a );
return;
}
a += 4;
l -= 4;
}
}
printf( _("\nDone.\n") );
}
static int
find_block( cfi_query_structure_t *cfi, int adr, int bus_width, int chip_width, int *bytes_until_next_block )
{
int i;
int b = 0;
int bb = 0;
for (i = 0; i < cfi->device_geometry.number_of_erase_regions; i++) {
const int region_blocks = cfi->device_geometry.erase_block_regions[i].number_of_erase_blocks;
const int flash_block_size = cfi->device_geometry.erase_block_regions[i].erase_block_size;
const int region_block_size = (bus_width / chip_width) * flash_block_size;
const int region_size = region_blocks * region_block_size;
if (adr < (bb + region_size))
{
int bir = (adr - bb) / region_block_size;
*bytes_until_next_block = bb + (bir + 1) * region_block_size - adr;
return b + bir;
}
b += region_blocks;
bb += region_size;
}
return -1;
}
void
flashmem( bus_t *bus, FILE *f, uint32_t addr, int noverify )
{
uint32_t adr;
cfi_query_structure_t *cfi;
int *erased;
int i;
int neb;
int bus_width;
int chip_width;
#define BSIZE (1 << 12)
uint32_t write_buffer[BSIZE];
int write_buffer_count;
uint32_t write_buffer_adr;
set_flash_driver();
if (!cfi_array || !flash_driver) {
printf( _("no flash driver found\n") );
return;
}
cfi = &cfi_array->cfi_chips[0]->cfi;
bus_width = cfi_array->bus_width;
chip_width = cfi_array->cfi_chips[0]->width;
for (i = 0, neb = 0; i < cfi->device_geometry.number_of_erase_regions; i++)
neb += cfi->device_geometry.erase_block_regions[i].number_of_erase_blocks;
erased = malloc( neb * sizeof *erased );
if (!erased) {
printf( _("Out of memory!\n") );
return;
}
for (i = 0; i < neb; i++)
erased[i] = 0;
printf( _("program:\n") );
adr = addr;
while (!feof( f )) {
uint32_t data;
uint8_t b[BSIZE];
int bc = 0, bn = 0, btr = BSIZE;
int block_no = find_block( cfi, adr - cfi_array->address, bus_width, chip_width, &btr );
write_buffer_count = 0;
write_buffer_adr = adr;
if(btr > BSIZE) btr = BSIZE;
bn = fread( b, 1, btr, f );
if (bn > 0 && !erased[block_no]) {
flash_driver->unlock_block( cfi_array, adr );
printf( _("\nblock %d unlocked\n"), block_no );
printf( _("erasing block %d: %d\n"), block_no, flash_driver->erase_block( cfi_array, adr ) );
erased[block_no] = 1;
}
for (bc = 0; bc < bn; bc += flash_driver->bus_width) {
int j;
if ((adr & (BSIZE-1)) == 0) {
printf( _("addr: 0x%08X"), adr );
printf( "\r" );
fflush( stdout );
}
data = 0;
for (j = 0; j < flash_driver->bus_width; j++)
if (big_endian)
data = (data << 8) | b[bc + j];
else
data |= b[bc + j] << (j * 8);
/* store data in write buffer, will be programmed to flash later */
write_buffer[write_buffer_count++] = data;
adr += flash_driver->bus_width;
}
if (write_buffer_count > 0)
if (flash_driver->program( cfi_array, write_buffer_adr, write_buffer, write_buffer_count )) {
printf( _("\nflash error\n") );
return;
}
}
free( erased );
printf( _("addr: 0x%08X\n"), adr - flash_driver->bus_width);
flash_driver->readarray( cfi_array );
if (noverify) {
printf( _("verify skipped\n") );
return;
}
fseek( f, 0, SEEK_SET );
printf( _("verify:\n") );
fflush( stdout );
adr = addr;
while (!feof( f )) {
uint32_t data, readed;
uint8_t b[BSIZE];
int bc = 0, bn = 0, btr = BSIZE;
bn = fread( b, 1, btr, f );
for (bc = 0; bc < bn; bc += flash_driver->bus_width) {
int j;
if ((adr & 0xFF) == 0) {
printf( _("addr: 0x%08X"), adr );
printf( "\r" );
fflush( stdout );
}
data = 0;
for (j = 0; j < flash_driver->bus_width; j++)
if (big_endian)
data = (data << 8) | b[bc + j];
else
data |= b[bc + j] << (j * 8);
readed = bus_read( bus, adr );
if (data != readed) {
printf( _("addr: 0x%08X\n"), adr );
printf( _("verify error:\nread: 0x%08X\nexpected: 0x%08X\n"), readed, data );
return;
}
adr += flash_driver->bus_width;
}
}
printf( _("addr: 0x%08X\nDone.\n"), adr - flash_driver->bus_width);
}
void
flasherase( bus_t *bus, uint32_t addr, int number )
{
cfi_query_structure_t *cfi;
int i;
int status = 0;
int bus_width;
int chip_width;
set_flash_driver();
if (!cfi_array || !flash_driver) {
printf( _("no flash driver found\n") );
return;
}
cfi = &cfi_array->cfi_chips[0]->cfi;
bus_width = cfi_array->bus_width;
chip_width = cfi_array->cfi_chips[0]->width;
printf( _("\nErasing %d Flash block%s from address 0x%x\n"), number, number > 1 ? "s" : "", addr );
for (i = 1; i <= number; i++) {
int btr = 0;
int block_no = find_block( cfi, addr - cfi_array->address, bus_width, chip_width, &btr );
if (block_no < 0) {
status = FLASH_ERROR_UNKNOWN;
break;
}
printf( _("(%d%% Completed) FLASH Block %d : Unlocking ... "), i*100/number, block_no );
fflush(stdout);
flash_driver->unlock_block( cfi_array, addr );
printf( _("Erasing ... ") );
fflush(stdout);
status = flash_driver->erase_block( cfi_array, addr );
if (status == 0) {
if (i == number) {
printf( "\r" );
printf( _("(100%% Completed) FLASH Block %d : Unlocking ... Erasing ... Ok.\n"), block_no );
} else {
printf( _("Ok.") );
printf( "\r" );
printf( _("%78s"), "" );
printf( "\r" );
}
}
else
printf( _("ERROR.\n") );
addr += btr;
}
if (status == 0)
printf( _("\nErasing Completed.\n") );
else
printf( _("\nErasing Failed.\n") );
/* BYPASS */
// parts_set_instruction( ps, "BYPASS" );
// chain_shift_instructions( chain );
}
|
JamesCao2048/BlizzardData
|
Corpus/aspectj/3927.java
|
<gh_stars>1-10
import symbols.Helper;
import org.aspectj.testing.Tester;
import org.aspectj.tools.ide.SymbolManager;
import org.aspectj.tools.ide.SourceLine;
import org.aspectj.tools.ide.Declaration;
import java.io.File;
public class CrosscutTest {
private static Helper h = new Helper();
public static void main(String[] args) {
Declaration classDec = h.getDecl("C.java", 3);
Declaration aspectDec = h.getDecl("A.java", 3);
Declaration methodDecV = h.getDecl("C.java", 8);
Declaration methodDecVI = h.getDecl("C.java", 9);
Declaration methodDecVLF = h.getDecl("C.java",10);
Declaration methodDecISO = h.getDecl("C.java",11);
Declaration fieldDecI = h.getDecl("C.java",13);
Declaration fieldDecF = h.getDecl("C.java",14);
Declaration pointcutDecInstOf = h.getDecl("A.java", 6);
Declaration pointcutDecHasAsp = h.getDecl("A.java", 7);
Declaration pointcutDecWithin = h.getDecl("A.java", 10);
Declaration pointcutDecWithinAll = h.getDecl("A.java", 11);
Declaration pointcutDecWithinCode = h.getDecl("A.java", 12);
Declaration pointcutDecCFlow = h.getDecl("A.java", 15);
Declaration pointcutDecCFlowTop = h.getDecl("A.java", 16);
Declaration pointcutDecCalls = h.getDecl("A.java", 19);
Declaration pointcutDecRec = h.getDecl("A.java", 20);
Declaration pointcutDecExec = h.getDecl("A.java", 21);
Declaration pointcutDecCallsTo = h.getDecl("A.java", 22);
Declaration pointcutDecHandThr = h.getDecl("A.java", 25);
Declaration pointcutDecHandErr = h.getDecl("A.java", 26);
Declaration pointcutDecHandExc = h.getDecl("A.java", 27);
Declaration pointcutDecHandRt = h.getDecl("A.java", 28);
Declaration pointcutDecGets = h.getDecl("A.java", 31);
Declaration pointcutDecSets = h.getDecl("A.java", 32);
Declaration adviceDecBefore = h.getDecl("A.java", 35);
Declaration adviceDecAfter = h.getDecl("A.java", 36);
Declaration adviceDecAfterRet = h.getDecl("A.java", 37);
Declaration adviceDecAfterThr = h.getDecl("A.java", 38);
Declaration adviceDecAround = h.getDecl("A.java", 41);
Declaration fieldDecIntrD = h.getDecl("A.java", 44);
Declaration methodDecIntrV = h.getDecl("A.java", 45);
Declaration adviceDecBeforeToString = h.getDecl("A.java", 47);
Declaration adviceDecBeforeNew = h.getDecl("A.java", 48);
if (!h.allDecsFound) return;
// Check "points to"
h.checkPointsNothing(methodDecV);
h.checkPointsNothing(methodDecVI);
h.checkPointsNothing(methodDecVLF);
h.checkPointsNothing(methodDecISO);
h.checkPointsNothing(pointcutDecInstOf);
h.checkPointsNothing(pointcutDecHasAsp);
h.checkPointsNothing(pointcutDecWithin);
h.checkPointsNothing(pointcutDecWithinAll);
h.checkPointsNothing(pointcutDecWithinCode);
h.checkPointsNothing(pointcutDecCFlow);
h.checkPointsNothing(pointcutDecCFlowTop);
h.checkPointsNothing(pointcutDecCalls);
h.checkPointsNothing(pointcutDecRec);
h.checkPointsNothing(pointcutDecExec);
h.checkPointsNothing(pointcutDecCallsTo);
h.checkPointsNothing(pointcutDecHandThr);
h.checkPointsNothing(pointcutDecHandErr);
h.checkPointsNothing(pointcutDecHandExc);
h.checkPointsNothing(pointcutDecHandRt);
h.checkPointsNothing(pointcutDecGets);
h.checkPointsNothing(pointcutDecSets);
//XXX Need to decide if advices on introductions have to point to
// the introduction declaration, or to the member that was introduced
h.checkPointsTo(adviceDecBefore, new Declaration[]{methodDecV,methodDecIntrV});
h.checkPointsTo(adviceDecAfter, new Declaration[]{methodDecV,methodDecIntrV});
h.checkPointsTo(adviceDecAfterRet, new Declaration[]{methodDecISO});
h.checkPointsTo(adviceDecAfterThr, new Declaration[]{methodDecV});
h.checkPointsTo(adviceDecAround, new Declaration[]{methodDecV});
h.checkPointsNothing(adviceDecBeforeToString);
h.checkPointsNothing(adviceDecBeforeNew);
// Check "pointed by"
h.checkPointedToBy(methodDecV, new Declaration[]{adviceDecBefore,adviceDecAfter,adviceDecAfterThr,adviceDecAround});
h.checkPointedToByNone(methodDecVI);
h.checkPointedToByNone(methodDecVLF);
h.checkPointedToBy(methodDecISO, new Declaration[]{adviceDecAfterRet});
h.checkPointedToByNone(pointcutDecInstOf);
h.checkPointedToByNone(pointcutDecHasAsp);
h.checkPointedToByNone(pointcutDecWithin);
h.checkPointedToByNone(pointcutDecWithinAll);
h.checkPointedToByNone(pointcutDecWithinCode);
h.checkPointedToByNone(pointcutDecCFlow);
h.checkPointedToByNone(pointcutDecCFlowTop);
h.checkPointedToByNone(pointcutDecCalls);
h.checkPointedToByNone(pointcutDecRec);
h.checkPointedToByNone(pointcutDecExec);
h.checkPointedToByNone(pointcutDecCallsTo);
h.checkPointedToByNone(pointcutDecHandThr);
h.checkPointedToByNone(pointcutDecHandErr);
h.checkPointedToByNone(pointcutDecHandExc);
h.checkPointedToByNone(pointcutDecHandRt);
h.checkPointedToByNone(pointcutDecGets);
h.checkPointedToByNone(pointcutDecSets);
h.checkPointedToByNone(adviceDecBefore);
h.checkPointedToByNone(adviceDecBefore);
h.checkPointedToByNone(adviceDecAfter);
h.checkPointedToByNone(adviceDecAfterRet);
h.checkPointedToByNone(adviceDecAfterThr);
h.checkPointedToByNone(adviceDecAround);
h.checkPointedToByNone(adviceDecBeforeToString);
h.checkPointedToByNone(adviceDecBeforeNew);
}
}
|
kagwicharles/Seniorproject-ui
|
node_modules/@iconify/icons-ic/twotone-auto-fix-high.js
|
<filename>node_modules/@iconify/icons-ic/twotone-auto-fix-high.js<gh_stars>0
var data = {
"body": "<path opacity=\".3\" d=\"M4.415 18.167l7.17-7.17l1.414 1.414l-7.17 7.17z\" fill=\"currentColor\"/><path d=\"M20 7l.94-2.06L23 4l-2.06-.94L20 1l-.94 2.06L17 4l2.06.94zM8.5 7l.94-2.06L11.5 4l-2.06-.94L8.5 1l-.94 2.06L5.5 4l2.06.94zM20 12.5l-.94 2.06l-2.06.94l2.06.94l.94 2.06l.94-2.06L23 15.5l-2.06-.94zm-2.29-3.38l-2.83-2.83c-.2-.19-.45-.29-.71-.29c-.26 0-.51.1-.71.29L2.29 17.46a.996.996 0 0 0 0 1.41l2.83 2.83c.2.2.45.3.71.3s.51-.1.71-.29l11.17-11.17c.39-.39.39-1.03 0-1.42zM5.83 19.59l-1.41-1.41L11.59 11L13 12.41l-7.17 7.18zM14.41 11L13 9.59l1.17-1.17l1.41 1.41L14.41 11z\" fill=\"currentColor\"/>",
"width": 24,
"height": 24
};
exports.__esModule = true;
exports.default = data;
|
alchon/Image_editor
|
src/components/ui/Tools.js
|
<gh_stars>1-10
import React, {Component} from 'react';
import '../../css/ui/Tools.scss';
export default class Tools extends Component {
constructor(props){
super(props);
this.state = {
info : true
}
}
componentDidMount(){
// console.log('Tools UI Mount');
}
componentDidUpdate(){
// console.log('Tools UI Update');
}
componentWillUnmount(){
// console.log('Tools UI Unmount');
}
addImage = () => {
this.props.addImage('https://source.unsplash.com/random/500x400');
}
handleInfo = () => {
this.setState({info : !this.state.info});
}
render(){
return (
<div className="sub">
<div className="sub-title">
Tools
</div>
<div className="sub-tools-menu">
<div>
<button onClick={this.props.objectInfo}>오브젝트 정보 출력</button>
<button onClick={this.props.getCanvasInfo}>캔버스 출력</button>
<button onClick={this.props.getCanvasBackinfo}>캔버스 배경 크기</button>
</div>
<div>
<button onClick={this.props.openSaveModal}>save</button>
</div>
<button onClick = {this.handleInfo} style={{color : 'black', backgroundColor : 'skyblue'}}>내부 정보 열고닫기</button>
{ this.state.info ?
<div>
<div style={ {color : 'red', padding : '10px'}}>
{this.props.object.type !== 'not active' ?
<div>
<p>object left from center : {this.props.object.left.toFixed(3)}</p>
<p>object top from center: {this.props.object.top.toFixed(3)}</p>
<p>object scaleX : {this.props.object.scaleX.toFixed(3)}</p>
<p>object scaleY : {this.props.object.scaleY.toFixed(3)}</p>
<p>object width : {this.props.object.width}</p>
<p>object height : {this.props.object.height}</p>
<p>object width * scaleX : {(this.props.object.width * this.props.object.scaleX).toFixed(3)}</p>
<p>object height * scaleY : {(this.props.object.height * this.props.object.scaleY).toFixed(3)}</p>
<p> left : {this.props.object.aCoords.tl.x.toFixed(3)} </p>
<p> right : {this.props.object.aCoords.br.x.toFixed(3)} </p>
<p> top : {this.props.object.aCoords.tl.y.toFixed(3)} </p>
<p> bottom : {this.props.object.aCoords.br.y.toFixed(3)} </p>
</div> : null}
</div>
<div style={ { padding : '10px'}}>
{this.props.canvas ?
<div>
<p> 좌측 상단 좌표 = x : {(-this.props.canvasView.x / this.props.zoom)} y : {(-this.props.canvasView.y / this.props.zoom)}</p>
<p> 우측 하단 좌표 = x : { (-this.props.canvasView.x / this.props.zoom) + (this.props.canvas.width / this.props.zoom) }
y : {(-this.props.canvasView.y / this.props.zoom) + (this.props.canvas.height / this.props.zoom) }</p>
{this.props.canvas.backgroundImage ?
<div>
<p>배경 width {this.props.canvas.backgroundImage.width}</p>
<p>배경 height {this.props.canvas.backgroundImage.height}</p>
<p>배경 scaleX {this.props.canvas.backgroundImage.scaleX}</p>
<p>배경 scaleY {this.props.canvas.backgroundImage.scaleY}</p>
<p>배경 left {this.props.canvas.backgroundImage.left}</p>
<p>배경 top {this.props.canvas.backgroundImage.top}</p>
</div> : null}
</div> : null}
</div>
</div> : null
}
<div>
<p>유저 이름 : {this.props.user_name} </p>
<p>프로젝트 정보 : {this.props.prj_idx} </p>
<p>저장 유무: {this.props.isSaved ? 'true' : 'false'} </p>
</div>
</div>
</div>
);
}
}
|
bbarber9/rpgtools
|
packages/frontend/src/hooks/authentication/useLogin.js
|
import { useApolloClient, useMutation } from "@apollo/client";
import gql from "graphql-tag";
export const LOGIN_QUERY = gql`
mutation login($username: String!, $password: String!) {
login(username: $username, password: $password) {
_id
}
}
`;
export default (callback) => {
const client = useApolloClient();
const [login, { loading, error }] = useMutation(LOGIN_QUERY, {
async update(cache, { data }) {
await client.resetStore();
},
onCompleted: callback,
});
return {
login: async (username, password) =>
await login({ variables: { username, password } }),
loading,
errors: error ? error.graphQLErrors.map((error) => error.message) : [],
};
};
|
eleritec/fractal-ui
|
src/main/java/net/eleritec/fractalui/dialog/AbstractDialogLauncher.java
|
<filename>src/main/java/net/eleritec/fractalui/dialog/AbstractDialogLauncher.java
package net.eleritec.fractalui.dialog;
import javax.swing.*;
import net.eleritec.fractalui.AbstractUI;
import net.eleritec.fractalui.AbstractView;
import net.eleritec.fractalui.AbstractViewController;
import net.eleritec.fractalui.util.SwingUtils;
import java.awt.*;
import java.awt.event.*;
/**
* @author cbutler
*/
public abstract class AbstractDialogLauncher<T> {
protected AbstractUI<T> ui;
protected Component owner;
private String title;
protected abstract T createModel();
protected AbstractUI<T> createDefaultUI() {
return null;
}
public Dimension getInitialSize() {
return new Dimension(800, 600);
}
public Point getInitialLocation() {
Dimension size = getInitialSize();
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int x = screenSize.width/2 - size.width/2;
int y = screenSize.height/2 - size.height/2;
return new Point(x, y);
}
public JDialog launchDialog() {
JDialog dialog = createDialog();
dialog.setVisible(true);
return dialog;
}
protected JDialog createDialog() {
AbstractView<T> view = initializeMVC();
Dimension d = getInitialSize();
JDialog dialog = SwingUtils.placeInDialog(view, owner, d.width,
d.height, isModal());
setFrameDefaults(dialog);
return dialog;
}
protected AbstractView<T> initializeMVC() {
AbstractView<T> view = ui.getView();
loadModel();
initializeView(view);
initializeListeners();
return view;
}
protected void setFrameDefaults(JDialog dialog) {
dialog.setTitle(getTitle());
if(owner!=null) {
dialog.setLocationRelativeTo(owner);
}
Point location = getInitialLocation();
if(location!=null) {
dialog.setLocation(location);
}
dialog.addWindowListener(createDialogCloseListener());
initializeFrame(dialog);
}
protected void loadModel() {
T model = createModel();
AbstractViewController<T> controller = ui.getController();
// if(model!=null && !controller.isValidModel(model)) {
// throw new RuntimeException("Invalid Data Model " +
// model.getClass() + " for Controller " + controller.getClass());
// }
controller.setDataModel(model);
}
protected ActionListener createCancelAction() {
return new ActionListener() {
public void actionPerformed(ActionEvent e) {
SwingUtils.disposeFrame(ui.getView());
}
};
}
protected void onDialogClosed() {
}
protected void initializeFrame(JDialog dialog) {
}
protected void initializeView(AbstractView<T> view) {
}
protected void initializeListeners() {
}
public String getTitle() {
return getString(title);
}
public void setTitle(String title) {
this.title = title;
}
protected String getString(String key) {
return ui==null? key: ui.getResource().getString(key);
}
public AbstractUI<T> getUi() {
return ui;
}
public void setUi(AbstractUI<T> ui) {
this.ui = ui;
}
public Component getOwner() {
return owner;
}
public void setOwner(Container owner) {
this.owner = owner;
}
public boolean isModal() {
return true;
}
protected WindowListener createDialogCloseListener() {
return new WindowAdapter() {
public void windowClosed(WindowEvent e) {
onDialogClosed();
}
public void windowClosing(WindowEvent e) {
onDialogClosed();
}
};
}
}
|
CaptainSora/Python-Project-Euler
|
PE045.py
|
<filename>PE045.py
from itertools import count
from _polygonal_tools import is_polygonal, poly
def in_all(min_val):
"""
Finds the first number greater than min_val which is triangular,
pentagonal, and hexagonal.
"""
# Every hexagonal number is also triangular.
for t in count(1):
hex = poly(6, t)
if hex <= min_val:
continue
elif is_polygonal(5, hex):
return hex
def solve(vol=0):
return in_all(40755)
|
funrunskypalace/vnpy
|
vnpy/api/xtp/generator/xtp_struct_common.py
|
XTPRspInfoStruct = {
"error_id": "int",
"error_msg": "string",
}
XTPRI = XTPRspInfoStruct
|
Ddnirvana/test-CI
|
openeuler-kernel/include/linux/crash_core.h
|
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef LINUX_CRASH_CORE_H
#define LINUX_CRASH_CORE_H
#include <linux/linkage.h>
#include <linux/elfcore.h>
#include <linux/elf.h>
#define CRASH_CORE_NOTE_NAME "CORE"
#define CRASH_CORE_NOTE_HEAD_BYTES ALIGN(sizeof(struct elf_note), 4)
#define CRASH_CORE_NOTE_NAME_BYTES ALIGN(sizeof(CRASH_CORE_NOTE_NAME), 4)
#define CRASH_CORE_NOTE_DESC_BYTES ALIGN(sizeof(struct elf_prstatus), 4)
/*
* The per-cpu notes area is a list of notes terminated by a "NULL"
* note header. For kdump, the code in vmcore.c runs in the context
* of the second kernel to combine them into one note.
*/
#define CRASH_CORE_NOTE_BYTES ((CRASH_CORE_NOTE_HEAD_BYTES * 2) + \
CRASH_CORE_NOTE_NAME_BYTES + \
CRASH_CORE_NOTE_DESC_BYTES)
#define VMCOREINFO_BYTES PAGE_SIZE
#define VMCOREINFO_NOTE_NAME "VMCOREINFO"
#define VMCOREINFO_NOTE_NAME_BYTES ALIGN(sizeof(VMCOREINFO_NOTE_NAME), 4)
#define VMCOREINFO_NOTE_SIZE ((CRASH_CORE_NOTE_HEAD_BYTES * 2) + \
VMCOREINFO_NOTE_NAME_BYTES + \
VMCOREINFO_BYTES)
typedef u32 note_buf_t[CRASH_CORE_NOTE_BYTES/4];
void crash_update_vmcoreinfo_safecopy(void *ptr);
void crash_save_vmcoreinfo(void);
void arch_crash_save_vmcoreinfo(void);
__printf(1, 2)
void vmcoreinfo_append_str(const char *fmt, ...);
phys_addr_t paddr_vmcoreinfo_note(void);
#define VMCOREINFO_OSRELEASE(value) \
vmcoreinfo_append_str("OSRELEASE=%s\n", value)
#define VMCOREINFO_BUILD_ID(value) \
vmcoreinfo_append_str("BUILD-ID=%s\n", value)
#define VMCOREINFO_PAGESIZE(value) \
vmcoreinfo_append_str("PAGESIZE=%ld\n", value)
#define VMCOREINFO_SYMBOL(name) \
vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name)
#define VMCOREINFO_SYMBOL_ARRAY(name) \
vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)name)
#define VMCOREINFO_SIZE(name) \
vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
(unsigned long)sizeof(name))
#define VMCOREINFO_STRUCT_SIZE(name) \
vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
(unsigned long)sizeof(struct name))
#define VMCOREINFO_OFFSET(name, field) \
vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
(unsigned long)offsetof(struct name, field))
#define VMCOREINFO_TYPE_OFFSET(name, field) \
vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \
(unsigned long)offsetof(name, field))
#define VMCOREINFO_LENGTH(name, value) \
vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value)
#define VMCOREINFO_NUMBER(name) \
vmcoreinfo_append_str("NUMBER(%s)=%ld\n", #name, (long)name)
#define VMCOREINFO_CONFIG(name) \
vmcoreinfo_append_str("CONFIG_%s=y\n", #name)
extern unsigned char *vmcoreinfo_data;
extern size_t vmcoreinfo_size;
extern u32 *vmcoreinfo_note;
extern struct resource crashk_res;
extern struct resource crashk_low_res;
/* raw contents of kernel .notes section */
extern const void __start_notes __weak;
extern const void __stop_notes __weak;
Elf_Word *append_elf_note(Elf_Word *buf, char *name, unsigned int type,
void *data, size_t data_len);
void final_note(Elf_Word *buf);
int __init parse_crashkernel(char *cmdline, unsigned long long system_ram,
unsigned long long *crash_size, unsigned long long *crash_base);
int parse_crashkernel_high(char *cmdline, unsigned long long system_ram,
unsigned long long *crash_size, unsigned long long *crash_base);
int parse_crashkernel_low(char *cmdline, unsigned long long system_ram,
unsigned long long *crash_size, unsigned long long *crash_base);
#endif /* LINUX_CRASH_CORE_H */
|
enquora/hotdraw.js
|
src/Figures/LineFigure.js
|
/**
* Hotdraw.js : LineFigure
*
* {Comments are copied from the Java Implementation of HotDraw}
*
* A line figure.
*
* @author <NAME>. <<EMAIL>>
* @copyright 2004-2017 Web Semantics, Inc.
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://websemantics.ca
* @since 4th August 2005
* @package websemantics/hotdraw/figures
*/
LineFigure.prototype = new PolyLineFigure();
function LineFigure() {
var argv = LineFigure.arguments;
var argc = LineFigure.length;
this.className = "LineFigure";
if (argv.length > 0) this.initLineFigure();
}
//*************
// initLineFigure: Constructs a LineFigure with both start and end set to Point(0,0).
//*************
LineFigure.prototype.initLineFigure = function() {
this.initPolyLineFigure(0, 0);
this.addPoint(0, 0);
}
//*************
// Gets a copy of the start point. OR . Sets the start point.
//
// Forms:
//======
// (1) Point startPoint();
// (2) startPoint(10,10);
//*************
/* Point */
LineFigure.prototype.startPoint = function( /* int */ x, /* int */ y) {
if (x != undefined && y != undefined) this.setPointAt(new Point(x, y), 0);
else return this.pointAt(0);
}
//*************
// Gets a copy of the end point. OR . Sets the end point.
//
// Forms:
//======
// (1) Point endPoint();
// (2) endPoint(10,10);
//*************
LineFigure.prototype.endPoint = function( /* int */ x, /* int */ y) {
if (x != undefined && y != undefined) this.setPointAt(new Point(x, y), 1);
else return this.pointAt(1);
}
//*************
// Sets the start and end point.
//*************
LineFigure.prototype.setPoints = function( /* Point */ start, /* Point */ end) {
this.setPointAt(start, 0);
this.setPointAt(end, 1);
}
//*************
// basicDisplayBox
//*************
LineFigure.prototype.basicDisplayBox = function( /* Point */ origin, /* Point */ corner) {
this.setPoints(origin, corner);
}
//*************
// createSVGContent
//*************
LineFigure.prototype.createSVGContent = function( /* Graphics */ g) {
this.shape = g.drawLine(this.startPoint().x, this.startPoint().y, this.startPoint().x + 100, this.startPoint().y + 100);
this.updatePolyLineAttributes();
//this.shape.setAttribute("marker-end","url(#Tail)");
//this.shape.setAttribute("marker-start","url(#Arrow1Lstart)");
}
//*************
// draw
//*************
LineFigure.prototype.draw = function( /* Graphics */ g) {
this.drawLineFigure(g);
}
//*************
// draw a figure and its subclass.
//*************
LineFigure.prototype.drawLineFigure = function( /* Graphics */ g) {
this.drawAbstractFigure(g);
var p1 = this.startPoint();
var p2 = this.endPoint();
this.shape.x = p1.x;
this.shape.y = p1.y;
this.shape.x2 = p2.x;
this.shape.y2 = p2.y;
this.shape.update();
}
//*************
// handles
//*************
/* Vector */
LineFigure.prototype.handles = function() {
var handles = new Vector(this.fPoints.size());
for (var i = 0; i < this.fPoints.size(); i++) handles.addElement(new PolyLineHandle(this, this.locator(i), i));
return handles;
}
//*************
// clone
//*************
LineFigure.prototype.clone = function() {
return new LineFigure(true);
}
//*************
// serialize
//*************
/* String */
LineFigure.prototype.serialize = function() {
return this.serializeLineFigure();
}
//*************
// serializeLineFigure
//*************
/* String */
LineFigure.prototype.serializeLineFigure = function() {
var ret = new Hashtable;
var sPoint = this.startPoint();
var ePoint = this.endPoint();
ret.put("x1", sPoint.getX());
ret.put("y1", sPoint.getY());
ret.put("x2", ePoint.getX());
ret.put("y2", ePoint.getY());
return this.serializePolyLineFigure() + ret.serialize();
}
//*************
// deserialize
//*************
/* Hashtable */
LineFigure.prototype.deserialize = function( /* String */ str) {
return this.deserializeLineFigure(str);
}
//*************
// deserializeLineFigure
//*************
/* Hashtable */
LineFigure.prototype.deserializeLineFigure = function( /* String */ str) {
/* Hashtable */
var inp = this.deserializePolyLineFigure(str);
var x1 = parseFloat(inp.get("x1"));
var y1 = parseFloat(inp.get("y1"));
var x2 = parseFloat(inp.get("x2"));
var y2 = parseFloat(inp.get("y2"));
this.startPoint(x1, y1);
this.endPoint(x2, y2);
return inp;
}
//*************
// serializeAsRDF [NEW: 17-3-2006]
//*************
/* String */
LineFigure.prototype.serializeAsRDF = function( /* String */ contextUri, command) {
return this.serializeAsRDFLineFigure(contextUri, command);
}
//*************
// serializeAsRDFLineFigure [NEW: 17-3-2006]
//*************
/* String */
LineFigure.prototype.serializeAsRDFLineFigure = function( /* String */ contextUri, command) {
var nodeName = this.shape.getNode().nodeName;
var history = "<" + contextUri + nodeName + "_" + this.myCount + "/historyNode_" + this.historyNodeCounter + "> ";
var sPoint = this.startPoint();
var ePoint = this.endPoint();
var content = '';
content += history + " svg:x1 " + sPoint.getX() + " . ";
content += history + " svg:y1 " + sPoint.getY() + " . ";
content += history + " svg:x2 " + ePoint.getX() + " . ";
content += history + " svg:y2 " + ePoint.getY() + " . ";
content = this.serializeAsRDFPolyLineFigure(contextUri, command) + content;
return content;
}
|
toastier/srf
|
app/controllers/openings.server.controller.js
|
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Opening = mongoose.model('Opening'),
_ = require('lodash');
/**
* Get the error message from error object
*/
var getErrorMessage = function (err) {
var message = '';
if (err.code) {
switch (err.code) {
case 11000:
case 11001:
message = 'Opening already exists';
break;
default:
message = 'Something went wrong';
}
} else {
for (var errName in err.errors) {
if (err.errors[errName].message) {
message = err.errors[errName].message;
}
}
}
return message;
};
/**
* Create a opening
*/
exports.create = function (req, res) {
var opening = new Opening(req.body);
opening.user = req.user;
opening.save(function (err) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(opening);
}
});
};
/**
* Show the current opening
*/
exports.read = function (req, res) {
res.jsonp(req.opening);
};
/**
* Get data for opening, if opening is active, open and not closed
* @param {Object} req
* @param {Object} res
*/
exports.readCurrent = function (req, res) {
//@todo add control over 'currentness' of opening
res.jsonp(req.opening);
};
/**
* Update a opening
*/
exports.update = function (req, res) {
var opening = req.opening;
opening = _.extend(opening, req.body);
opening.save(function (err) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(opening);
}
});
};
/**
* Delete an opening
*/
exports.delete = function (req, res) {
var opening = req.opening;
opening.remove(function (err) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(opening);
}
});
};
/**
* List of Openings
*/
exports.list = function (req, res) {
Opening
.find()
.sort('-datePosted')
.exec(function (err, openings) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(openings);
}
});
};
/**
* List of Openings for public access
* @param {Object} req
* @param {Object} res
*/
exports.current = function (req, res) {
var conditions = {isActive: true};
if (req.params && req.params.position) {
conditions.position = req.params.position;
}
Opening
.find(conditions)
.where('dateStart').lte(Date.now())
.where('dateClose').gte(Date.now())
.sort('-datePosted')
.exec(function (err, openings) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(openings);
}
});
};
/**
* Opening middleware
*/
exports.openingByID = function (req, res, next, id) {
Opening
.findById(id)
.populate('postingLink')
.exec(function (err, opening) {
if (err) {
return next(err);
}
if (!opening) {
return next(new Error('Failed to load opening ' + id));
}
req.opening = opening;
next();
});
};
/**
* Opening authorization middleware
*/
exports.hasAuthorization = function (req, res, next) {
if (req.opening.user.id !== req.user.id) {
return res.send(403, {
message: 'User is not authorized'
});
}
next();
};
|
dreimannzelt/layer-ruby
|
spec/layer/client_spec.rb
|
<filename>spec/layer/client_spec.rb
require 'spec_helper'
describe Layer::Client do
describe 'default configuration' do
describe '.app_id' do
before do
ENV['LAYER_APP_ID'] = 'layer_app_id'
end
it 'should default to LAYER_APP_ID environment variable' do
expect(Layer::Client.app_id).to eq('layer_app_id')
end
it 'should be configurable' do
Layer::Client.app_id = 'custom_app_id'
expect(Layer::Client.app_id).to eq('custom_app_id')
end
end
describe '.token' do
before do
ENV['LAYER_PLATFORM_TOKEN'] = 'layer_platform_token'
end
it 'should default to LAYER_APP_ID environment variable' do
expect(Layer::Client.token).to eq('layer_platform_token')
end
it 'should be configurable' do
Layer::Client.token = 'custom_platform_token'
expect(Layer::Client.token).to eq('custom_platform_token')
end
end
describe '.configure' do
it 'should yield the client' do
expect { |block| Layer::Client.configure(&block) }
.to yield_with_args(described_class)
end
end
end
end
|
tusharchoudhary0003/Custom-Football-Game
|
sources/com/google/zxing/p204f/p206b/C10269b.java
|
package com.google.zxing.p204f.p206b;
import java.lang.reflect.Array;
/* renamed from: com.google.zxing.f.b.b */
/* compiled from: ByteMatrix */
public final class C10269b {
/* renamed from: a */
private final byte[][] f31124a;
/* renamed from: b */
private final int f31125b;
/* renamed from: c */
private final int f31126c;
public C10269b(int width, int height) {
this.f31124a = (byte[][]) Array.newInstance(byte.class, new int[]{height, width});
this.f31125b = width;
this.f31126c = height;
}
/* renamed from: b */
public int mo33636b() {
return this.f31126c;
}
/* renamed from: c */
public int mo33637c() {
return this.f31125b;
}
/* renamed from: a */
public byte mo33631a(int x, int y) {
return this.f31124a[y][x];
}
/* renamed from: a */
public byte[][] mo33635a() {
return this.f31124a;
}
/* renamed from: a */
public void mo33633a(int x, int y, int value) {
this.f31124a[y][x] = (byte) value;
}
/* renamed from: a */
public void mo33634a(int x, int y, boolean value) {
this.f31124a[y][x] = value ? (byte) 1 : 0;
}
/* renamed from: a */
public void mo33632a(byte value) {
for (int y = 0; y < this.f31126c; y++) {
for (int x = 0; x < this.f31125b; x++) {
this.f31124a[y][x] = value;
}
}
}
public String toString() {
StringBuilder result = new StringBuilder((this.f31125b * 2 * this.f31126c) + 2);
for (int y = 0; y < this.f31126c; y++) {
for (int x = 0; x < this.f31125b; x++) {
byte b = this.f31124a[y][x];
if (b == 0) {
result.append(" 0");
} else if (b != 1) {
result.append(" ");
} else {
result.append(" 1");
}
}
result.append(10);
}
return result.toString();
}
}
|
mauguignard/cbmc
|
regression/cbmc/struct7/main.c
|
struct my_struct
{
int i;
int array[10];
} s;
void f(int *p)
{
int diff;
diff=p-&s.array[0];
// should pass
*p=1;
}
int main()
{
int ind, x;
ind=x;
int *p=&s.array[ind];
if(ind>=0 && ind<=9)
f(p);
}
|
madnight/gitter
|
server/utils/secure-method.js
|
<gh_stars>0
'use strict';
var Promise = require('bluebird');
var StatusError = require('statuserror');
function iterateValidators(validators, context, args) {
if (typeof validators === 'function') {
return Promise.try(function() {
return validators.apply(context, args);
});
}
if (!validators.length) return Promise.resolve(false);
if (validators.length === 1) {
return Promise.try(function() {
return validators[0].apply(context, args);
});
}
return (function iteratorValidators(position) {
if (position >= validators.length) {
return false;
}
var validator = validators[position];
return Promise.resolve(validator.apply(context, args))
.then(function(access) {
if (access) return true;
return iteratorValidators(position + 1);
})
})(0);
}
function execSecurityValidators(context, validators, fn, args) {
return iterateValidators(validators, context, args)
.then(function(access) {
if (!access) throw new StatusError(403);
return fn.apply(context, args);
});
}
function secureMethod(validators, fn) {
return function() {
var args = Array.prototype.slice.call(arguments);
var self = this;
return Promise.try(function() {
return execSecurityValidators(self, validators, fn, args);
});
}
}
module.exports = secureMethod;
|
messyKassaye/my_stock
|
resources/js/home/loan/state/HomeLoanReducer.js
|
<reponame>messyKassaye/my_stock
import {combineReducers} from 'redux'
import HomeLoanReducer from './reducers/HomeLoanReducer'
export default combineReducers({
homeLoanReducer:HomeLoanReducer
})
|
1757WestwoodRobotics/2022-RapidReact
|
commands/intake/autoballintake.py
|
<filename>commands/intake/autoballintake.py
from commands2 import CommandBase
from networktables import NetworkTables
from wpimath.trajectory import TrapezoidProfile, TrapezoidProfileRadians
from wpimath.controller import ProfiledPIDController, ProfiledPIDControllerRadians
from wpilib.geometry import Rotation2d
from wpilib import SmartDashboard
import constants
from subsystems.drivesubsystem import DriveSubsystem
from subsystems.intakesubsystem import IntakeSubsystem
from util import convenientmath
class AutoBallIntake(CommandBase):
def __init__(self, drive: DriveSubsystem, intake: IntakeSubsystem) -> None:
CommandBase.__init__(self)
self.setName(__class__.__name__)
self.drive = drive
self.intake = intake
self.distanceController = ProfiledPIDController(
constants.kDriveToBallPGain,
constants.kDriveToBallIGain,
constants.kDriveToBallDGain,
TrapezoidProfile.Constraints(
constants.kMaxForwardLinearVelocity,
constants.kMaxForwardLinearAcceleration,
),
)
self.ballAngle = Rotation2d()
self.distanceController.setTolerance( # These constants are reusable and likely will not need to change
constants.kDriveToTargetDistanceTolerance,
constants.kDriveToTargetLinearVelocityTolerance,
)
self.ballDistance = 0
self.addRequirements([self.drive, self.intake])
self.angleController = ProfiledPIDControllerRadians(
constants.kDriveToTargetAnglePGain,
constants.kDriveToTargetAngleIGain,
constants.kDriveToTargetAngleDGain,
TrapezoidProfileRadians.Constraints(
constants.kMaxRotationAngularVelocity,
constants.kMaxRotationAngularAcceleration,
),
)
self.angleController.setTolerance( # bet you can't guess what's copy/pasted
constants.kDriveToTargetAngleTolerance,
constants.kDriveToTargetAngularVelocityTolerance,
)
self.angleController.enableContinuousInput(
-1 * constants.kRadiansPerRevolution / 2,
constants.kRadiansPerRevolution / 2,
)
def updateDistanceToGoal(self) -> None:
if not (
SmartDashboard.getBoolean(
constants.kBallAngleRelativeToRobotKeys.validKey, False
)
and SmartDashboard.getBoolean(
constants.kBallDistanceRelativeToRobotKeys.validKey, False
)
):
self.ballDistance = 0
self.ballAngle = Rotation2d()
return
self.ballDistance = SmartDashboard.getNumber(
constants.kBallDistanceRelativeToRobotKeys.valueKey, 0
)
self.ballAngle = Rotation2d(
SmartDashboard.getNumber(
constants.kBallAngleRelativeToRobotKeys.valueKey, 0
)
)
def initialize(self) -> None:
CommandBase.initialize(self)
self.updateDistanceToGoal()
self.distanceController.reset(self.ballDistance)
self.angleController.reset(self.ballAngle.radians())
def execute(self) -> None:
if NetworkTables.getTable(constants.kLimelightCargoNetworkTableName).getBoolean(
constants.kLimelightTargetValidKey, False
):
self.updateDistanceToGoal()
distanceControllerOutput = self.distanceController.calculate(
-1 * self.ballDistance, 0
)
angleControllerOutput = self.angleController.calculate(
-1 * self.ballAngle.radians(), 0
)
distanceControllerAxisOutputs = (
convenientmath.translationFromDistanceAndRotation(
distanceControllerOutput, self.ballAngle
)
)
self.drive.arcadeDriveWithFactors(
distanceControllerAxisOutputs.X(),
distanceControllerAxisOutputs.Y(),
angleControllerOutput,
DriveSubsystem.CoordinateMode.RobotRelative,
)
self.intake.deployIntake()
else:
self.intake.retractIntake()
def end(self, _interrupted: bool) -> None:
self.drive.arcadeDriveWithFactors(
0, 0, 0, DriveSubsystem.CoordinateMode.RobotRelative
)
self.intake.retractIntake()
def isFinished(self) -> bool:
return self.distanceController.atGoal() and self.angleController.atGoal()
|
quienmedebe/api-rest
|
test/unit/shared/wrapAsync.test.js
|
const sinon = require('sinon');
const wrapAsync = require('../../../src/modules/shared/wrapAsync');
describe('Shared -> wrapAsync', function () {
it('given a failed promise, should execute the parameter next with the error', async function () {
const fn = sinon.stub().rejects();
const next = sinon.stub();
await wrapAsync(fn)(null, null, next);
sinon.assert.called(next);
});
});
|
htlcnn/ironpython-stubs
|
release/stubs.min/Autodesk/Revit/UI/__init___parts/RadioButtonGroup.py
|
<reponame>htlcnn/ironpython-stubs
class RadioButtonGroup(RibbonItem):
""" Represents a group of related buttons in the Ribbon. """
def AddItem(self,buttonData):
"""
AddItem(self: RadioButtonGroup,buttonData: ToggleButtonData) -> ToggleButton
Adds a new ToggleButton to the RadioButtonGroup.
buttonData: An object containing the data needed to construct the ToggleButton.
Returns: The newly added ToggleButton.
"""
pass
def AddItems(self,buttonData):
""" AddItems(self: RadioButtonGroup,buttonData: IList[ToggleButtonData]) -> IList[ToggleButton] """
pass
def GetItems(self):
"""
GetItems(self: RadioButtonGroup) -> IList[ToggleButton]
Gets the collection of ToggleButtons assigned to the RadioButtonGroup.
"""
pass
Current=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets or sets the current checked ToggleButton of the RadioButtonGroup.
Get: Current(self: RadioButtonGroup) -> ToggleButton
Set: Current(self: RadioButtonGroup)=value
"""
m_ItemType=None
|
Reinserev/ubb.dp.1819
|
src/main/java/popa/catalin/lab1/domain/Coffee.java
|
package popa.catalin.lab1.domain;
import popa.catalin.lab1.CoffeeException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public abstract class Coffee implements Drinkable {
protected static Ingredient twoCupsWater = new Ingredient(2.0f, "cups", "water");
protected static Ingredient fourCupsWater = new Ingredient(4.0f, "cups", "water");
protected static Ingredient quarterCupBeansRoasted = new Ingredient(0.25f, "cups", "coffee-beans", "roasted");
protected static Ingredient hundredMLMilkFoamed = new Ingredient(100f, "ml", "milk", "foamed");
protected static Ingredient hundredMLMilkSteamed = new Ingredient(100f, "ml", "milk", "steamed");
// that moment when you realize that Java 8 doesent' allow methods to be both static and abstract...
static List<Ingredient> getStandardIngredients() {
return Collections.emptyList();
}
// used for extra ingredients, maybe syrup and stuff? Like Starbucks' Vanilla Latte
private List<Ingredient> ingredients = new ArrayList<>();
public List<Ingredient> getIngredients() {
return ingredients;
}
public void addIngredient(Ingredient ingredient) {
ingredients.add(ingredient);
}
}
|
JeffreyRiggle/textadventurelib
|
src/main/java/textadventurelib/persistence/TransitionPersistenceObject.java
|
<gh_stars>0
package textadventurelib.persistence;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerConfigurationException;
import ilusr.persistencelib.configuration.PersistXml;
import ilusr.persistencelib.configuration.XmlConfigurationObject;
/**
*
* @author <NAME>
*
* Creates xml persistence for transition data. Xml should be in the follow format.
*
* <pre>
* {@code
* <Transition>
* <DisplayType>Window</DisplayType>
* <MediaLocation>PathToFile</MediaLocation>
* </Transition>
* }
* </pre>
*/
public class TransitionPersistenceObject extends XmlConfigurationObject{
private final static String TRANSITION_NAME = "Transition";
private final static String DISPLAY_TYPE_NAME = "DisplayType";
private final static String MEDIA_LOCATION_NAME = "MediaLocation";
private XmlConfigurationObject displayType;
private XmlConfigurationObject mediaLocation;
/**
* Ctor
* @throws TransformerConfigurationException
* @throws ParserConfigurationException
*/
public TransitionPersistenceObject() throws TransformerConfigurationException, ParserConfigurationException {
super(TRANSITION_NAME);
displayType = new XmlConfigurationObject(DISPLAY_TYPE_NAME);
mediaLocation = new XmlConfigurationObject(MEDIA_LOCATION_NAME);
}
/**
*
* @param type The new @see DisplayType for this transition.
*/
public void displayType(DisplayType type) {
displayType.value(type);
}
/**
*
* @return The @see DisplayType for this transtion.
*/
public DisplayType displayType() {
return displayType.value();
}
/**
*
* @param path The new location to the display information.
*/
public void mediaLocation(String path) {
mediaLocation.value(path);
}
/**
*
* @return The display file associated with this transition.
*/
public String mediaLocation() {
return mediaLocation.value();
}
/**
* Prepares the xml to be saved. This must be called before saving the xml.
*/
public void prepareXml() {
super.clearChildren();
super.clearConfigurationProperties();
super.addChild(displayType);
super.addChild(mediaLocation);
}
/**
* Updates this object based off information stored in a @see XmlConfigurationObject
* @param obj The @see XmlConfigurationObject to load data from.
*/
public void convertFromPersistence(XmlConfigurationObject obj) {
for (PersistXml child : obj.children()) {
XmlConfigurationObject cChild = (XmlConfigurationObject)child;
switch (cChild.name()) {
case DISPLAY_TYPE_NAME:
displayType(convertToDisplayType(cChild.<String>value()));
break;
case MEDIA_LOCATION_NAME:
mediaLocation(cChild.<String>value());
break;
default:
break;
}
}
}
private DisplayType convertToDisplayType(String type) {
if (type == null || type.isEmpty()) {
return null;
}
if (type.equalsIgnoreCase("SplashScreen")) {
return DisplayType.SplashScreen;
}
return DisplayType.Window;
}
}
|
ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra
|
cosmosis-standard-library/likelihood/planck2015/plc-2.0/src/clik_lensing.c
|
#include "clik_lensing.h"
#include "pmc.h"
#include "cldf/cldf.h"
#include "lenslike/plenslike/plenslike.h"
#define _dealwitherr error *lerr,**err; if(_err==NULL) {lerr=NULL;err=&lerr;} else {err=_err;}
#define _forwardError(A,B,C) if(_err!=NULL) {forwardError(A,B,C);} else {quitOnError(A,B,stderr);}
#define _testErrorRetVA(A,B,C,D,E,F,...) if(_err!=NULL) {testErrorRetVA(A,B,C,D,E,F,__VA_ARGS__);} else {testErrorExitVA(A,B,C,D,E,__VA_ARGS__);}
typedef struct {
int nbins,lmax,nlt;
double *bins;
double *cors, *cor0;
double *siginv;
double *buf,*p_hat,*duf;
int renorm,ren1,has_calib;
double *cl_fid;
} dts_lensing;
double dts_lensing_lkl(void *vds,double *pars, error **err) {
dts_lensing *dt;
int il,ib,it;
double b_ib;
int cut;
double lkl,bv;
double calib,bb;
double *fpars,*fphi;
int i0;
dt = vds;
calib = 1;
if (dt->has_calib==1) {
calib = pars[dt->nlt];
calib = 1./(calib*calib);
}
fpars = pars;
if (dt->renorm == 0) {
fpars = dt->cl_fid;
}
fphi = pars;
if (dt->ren1 == 0) {
fphi = dt->cl_fid;
}
for(ib=0;ib<dt->nbins;ib++) {
b_ib = 0;
cut=0;
for(il=0;il<dt->lmax+1;il++) {
bv = dt->bins[ib*(dt->lmax+1) + il];
if (bv==0) {
if (cut==0) {
continue;
} else {
break;
}
}
b_ib += (bv * pars[il]*(il*il*(il+1.)*(il+1.))/2./M_PI) ;
//_DEBUGHERE_("%d %g %g",il,pars[il]*(il*il*(il+1)*(il+1))/2./M_PI,pars[il])
cut=1;
}
//_DEBUGHERE_("%g",b_ib);
if (dt->cor0!=NULL) {
b_ib -= dt->cor0[ib];
}
//_DEBUGHERE_("%g",b_ib);
if (dt->cors!=NULL) {
bb = 0;
for(il=0;il<dt->lmax+1;il++) {
bb += (dt->cors[ib*dt->nlt + il] * fphi[il]*(il*il*(il+1.)*(il+1.))/2./M_PI);
}
//_DEBUGHERE_("%g",bb);
for(i0 = dt->lmax+1;i0<dt->nlt;i0+=dt->lmax+1) {
for(il=0; il<dt->lmax+1;il++) {
//_DEBUGHERE_("%d %g",il,fpars[il + i0]*il*(il+1.)/2./M_PI);
bb += (dt->cors[ib*dt->nlt + il + i0] * fpars[il + i0]*il*(il+1.)/2./M_PI)*calib;
}
//_DEBUGHERE_("%g",bb);
}
b_ib+=bb;
//_DEBUGHERE_("%g %g",bb,b_ib);
}
dt->buf[ib] = dt->p_hat[ib] - b_ib;
}
lkl = 0;
for(ib=0;ib<dt->nbins;ib++) {
lkl += dt->siginv[ib*dt->nbins+ib] * dt->buf[ib]* dt->buf[ib];
for(it=ib+1;it<dt->nbins;it++) {
lkl += 2*dt->siginv[ib*dt->nbins+it] * dt->buf[it]* dt->buf[ib];
}
}
return -.5*lkl;
}
void* dts_lensing_init(int lmax,int *hascl, int nbins, double* bins, double *p_hat, double *cors, double *cor0, double* siginv,double *cl_fid, int renorm ,int ren1,int has_calib, error **err ) {
dts_lensing *ds;
int cli;
int tlt;
ds = malloc_err(sizeof(dts_lensing),err);
forwardError(*err,__LINE__,NULL);
ds->nbins = nbins;
ds->lmax = lmax;
ds->renorm = renorm;
ds->ren1 = ren1;
ds->has_calib = has_calib;
ds->bins = malloc_err(sizeof(double)*nbins*(lmax+1),err);
forwardError(*err,__LINE__,NULL);
memcpy(ds->bins,bins,sizeof(double)*nbins*(lmax+1));
ds->p_hat = malloc_err(sizeof(double)*nbins,err);
forwardError(*err,__LINE__,NULL);
memcpy(ds->p_hat,p_hat,sizeof(double)*nbins);
ds->siginv = malloc_err(sizeof(double)*nbins*nbins,err);
forwardError(*err,__LINE__,NULL);
memcpy(ds->siginv,siginv,sizeof(double)*nbins*nbins);
ds->buf = malloc_err(sizeof(double)*nbins,err);
forwardError(*err,__LINE__,NULL);
ds->nlt = 0;
ds->cors = NULL;
tlt = lmax + 1;
if (cors!=NULL) {
ds->nlt = lmax+1;
for(cli=0;cli<6;cli++) {
if (hascl[cli]!=0) {
ds->nlt += lmax+1;
}
}
ds->cors = malloc_err(sizeof(double)*nbins*ds->nlt,err);
forwardError(*err,__LINE__,NULL);
memcpy(ds->cors,cors,sizeof(double)*nbins*ds->nlt);
tlt = ds->nlt;
}
ds->cl_fid = malloc_err(sizeof(double)*tlt,err);
forwardError(*err,__LINE__,NULL);
memcpy(ds->cl_fid,cl_fid,sizeof(double)*tlt);
ds->cor0 = NULL;
if (cor0!=NULL) {
ds->cor0 = malloc_err(sizeof(double)*nbins,err);
forwardError(*err,__LINE__,NULL);
memcpy(ds->cor0,cor0,sizeof(double)*nbins);
}
return ds;
}
void dts_lensing_free(void **vvds) {
dts_lensing *ds;
return;
ds = *vvds;
free(ds->p_hat);
free(ds->bins);
free(ds->siginv);
free(ds->buf);
free(ds->duf);
free(ds->cl_fid);
if (ds->cor0!=NULL) {
free(ds->cor0);
}
if (ds->cors!=NULL) {
free(ds->cors);
}
free(ds);
*vvds = NULL;
}
int find_in_file(FILE* f, char *what, error **err) {
char *buf;
int i,cnt,l,j;
cnt = 0;
l = strlen(what);
buf = malloc_err(sizeof(char)*(2*l+1),err);
forwardError(*err,__LINE__,0);
memset(buf,'\0',sizeof(char)*(2*l+2));
j=0;
while(1) {
i=fread((buf+cnt),sizeof(char),1,f);
if (i==0) {
free(buf);
return 0;
}
if (cnt==2*l-1) {
memcpy(buf,buf+l,sizeof(char)*l);
cnt = l-1;
}
cnt++;
j++;
buf[cnt]='\0';
if ((cnt>=l) && (strcmp(buf+(cnt-l),what)==0)) {
free(buf);
return 1;
}
}
}
clik_lensing_object* _clik_lensing_init(char *fpath, error **err) {
clik_lensing_object *plid;
FILE *f;
cldf *df;
int good;
char buf[1000];
int cnt;
char *npath,*rpath;
plid = malloc_err(sizeof(clik_lensing_object),err);
forwardError(*err,__LINE__,NULL);
plid->renorm = 1;
plid->ren1 = 1;
plid->has_check = 0;
plid->cl_fid = NULL;
for(cnt=0;cnt<7;cnt++) {
plid->lmax[cnt] = -1;
}
// test whether we have a clik file
df = cldf_open(fpath,err);
if (isError(*err) ) {
// regular file
purgeError(err);
f = fopen_err(fpath,"r",err);
forwardError(*err,__LINE__,NULL);
good = find_in_file(f,"# planck lensing",err);
forwardError(*err,__LINE__,NULL);
testErrorRetVA(good==0,-2432,"%s is not a clik lensing file\n",*err,__LINE__,NULL,fpath);
good = find_in_file(f,"# format: ",err);
forwardError(*err,__LINE__,NULL);
testErrorRetVA(good==0,-2432,"%s is not a clik lensing file (can't find format)\n",*err,__LINE__,NULL,fpath);
memset(buf,'\0',sizeof(char)*5);
testErrorRetVA(fread(buf,sizeof(char),4,f)!=4,-2432,"%s is not a clik lensing file (can't find format)\n",*err,__LINE__,NULL,fpath);
buf[5] = '\0';
npath = fpath;
plid->type=0;
if (strcmp(buf,"mono")==0) {
// mono file
fclose(f);
plid->type=1;
}
if (strcmp(buf,"qecl")==0) {
fclose(f);
plid->type=2;
}
if (strcmp(buf,"full")==0) {
fclose(f);
plid->type=3;
}
testErrorRetVA(plid->type==0,-2432,"%s is not a clik lensing file (can't find format %s)\n",*err,__LINE__,NULL,fpath,buf);
} else {
int hk;
plid->type = cldf_readint(df,"clik_lensing/itype",err);
forwardError(*err,__LINE__,NULL);
if (plid->type!=4) {
int sz=-1;
rpath = cldf_readstr(df,"clik_lensing/filename",&sz,err);
forwardError(*err,__LINE__,NULL);
sprintf(buf,"%s/clik_lensing/%s",fpath,rpath);
npath = buf;
plid->renorm = cldf_readint(df,"clik_lensing/renorm",err);
forwardError(*err,__LINE__,NULL);
plid->ren1 = cldf_readint_default(df,"clik_lensing/ren1",1,err);
forwardError(*err,__LINE__,NULL);
hk = cldf_haskey(df,"clik_lensing/check",err);
forwardError(*err,__LINE__,NULL);
if (hk==1) {
plid->check = cldf_readfloat(df,"clik_lensing/check",err);
forwardError(*err,__LINE__,NULL);
plid->has_check = 1;
}
}
}
if (plid->type==1) {
plid->plens_payload = malloc_err(sizeof(plenslike_dat_mono),err);
forwardError(*err,__LINE__,NULL);
load_plenslike_dat_mono(plid->plens_payload, npath);
plid->lmax[0] = ((plenslike_dat_mono*) (plid->plens_payload))->lmax;
plid->lmax[1] = ((plenslike_dat_mono*) (plid->plens_payload))->lmax;
}
if (plid->type==2) {
plid->plens_payload = malloc_err(sizeof(plenslike_dat_qecl),err);
forwardError(*err,__LINE__,NULL);
good = load_plenslike_dat_qecl(plid->plens_payload, npath);
testErrorRetVA(good!=0,-2432,"can't read %s\n",*err,__LINE__,NULL,fpath);
plid->lmax[0] = ((plenslike_dat_qecl*) (plid->plens_payload))->lmaxphi;
plid->lmax[1] = ((plenslike_dat_qecl*) (plid->plens_payload))->lmaxcmb;
plid->lmax[2] = plid->lmax[1];
plid->lmax[4] = plid->lmax[1];
}
if (plid->type==3) {
plid->plens_payload = malloc_err(sizeof(plenslike_dat_full),err);
forwardError(*err,__LINE__,NULL);
good = load_plenslike_dat_full(plid->plens_payload, npath);
testErrorRetVA(good!=0,-2432,"can't read %s\n",*err,__LINE__,NULL,fpath);
plid->lmax[0] = ((plenslike_dat_full*) (plid->plens_payload))->lmaxphi;
plid->lmax[1] = ((plenslike_dat_full*) (plid->plens_payload))->lmaxcmb;
plid->lmax[2] = plid->lmax[1];
plid->lmax[4] = plid->lmax[1];
}
if (plid->type==4) {
double *bins;
double *cors;
double *cor0;
double *siginv;
double *p_hat;
double *cl_fid;
int sz;
int nbins, lmax;
int *hascl;
int hk;
int nlt;
int cli;
int has_calib;
nbins = cldf_readint(df,"clik_lensing/nbins",err);
forwardError(*err,__LINE__,NULL);
lmax = cldf_readint(df,"clik_lensing/lmax",err);
forwardError(*err,__LINE__,NULL);
sz = 6;
hascl = cldf_readintarray(df,"clik_lensing/hascl",&sz,err);
forwardError(*err,__LINE__,NULL);
sz = nbins;
p_hat = cldf_readfloatarray(df,"clik_lensing/pp_hat",&sz,err);
forwardError(*err,__LINE__,NULL);
sz = nbins*(lmax+1);
bins = cldf_readfloatarray(df,"clik_lensing/bins",&sz,err);
forwardError(*err,__LINE__,NULL);
sz = nbins*nbins;
siginv = cldf_readfloatarray(df,"clik_lensing/siginv",&sz,err);
forwardError(*err,__LINE__,NULL);
nlt = 0;
plid->lmax[0] = lmax;
for(cli=0;cli<6;cli++) {
plid->lmax[cli+1] = -1;
if (hascl[cli]!=0) {
plid->lmax[cli+1] = lmax;
nlt += lmax+1;
}
}
cors = NULL;
if (nlt!=0) {
nlt += lmax+1;
sz = nlt*nbins;
cors = cldf_readfloatarray(df,"clik_lensing/cors",&sz,err);
forwardError(*err,__LINE__,NULL);
} else {
nlt = lmax + 1;
}
sz = nlt;
cl_fid = cldf_readfloatarray(df,"clik_lensing/cl_fid",&sz,err);
forwardError(*err,__LINE__,NULL);
plid->renorm = cldf_readint(df,"clik_lensing/renorm",err);
forwardError(*err,__LINE__,NULL);
plid->ren1 = cldf_readint(df,"clik_lensing/ren1",err);
forwardError(*err,__LINE__,NULL);
has_calib = cldf_readint(df,"clik_lensing/has_calib",err);
forwardError(*err,__LINE__,NULL);
cor0 = NULL;
hk = cldf_haskey(df,"clik_lensing/cor0",err);
forwardError(*err,__LINE__,NULL);
if (hk!=0) {
sz = nbins;
cor0 = cldf_readfloatarray(df,"clik_lensing/cor0",&sz,err);
forwardError(*err,__LINE__,NULL);
}
hk = cldf_haskey(df,"clik_lensing/check",err);
forwardError(*err,__LINE__,NULL);
if (hk==1) {
plid->check = cldf_readfloat(df,"clik_lensing/check",err);
forwardError(*err,__LINE__,NULL);
plid->has_check = 1;
}
plid->plens_payload = dts_lensing_init( lmax, hascl, nbins, bins, p_hat, cors, cor0, siginv, cl_fid, plid->renorm ,plid->ren1,has_calib,err );
forwardError(*err,__LINE__,NULL);
free(hascl);
free(p_hat);
free(siginv);
free(bins);
free(cl_fid);
if(cors!=NULL) {
free(cors);
}
if(cor0!=NULL) {
free(cor0);
}
}
return plid;
}
clik_lensing_object* clik_lensing_init(char *fpath, error **_err) {
clik_lensing_object *plid;
_dealwitherr;
plid = _clik_lensing_init(fpath,err);
_forwardError(*err,__LINE__,NULL);
clik_lensing_selftest(plid,fpath,err);
_forwardError(*err,__LINE__,NULL);
return plid;
}
double clik_lensing_compute(clik_lensing_object *lclik, double *pars,error **_err) {
double *cltt,*clte,*clee, *clphi,*clbb;
int nextra,lmax[7];
double lkl;
_dealwitherr;
/*nextra = int clik_lensing_get_extra_parameter_names(clikid, NULL, err);
_forwardError(*err,__LINE__,NULL);*/
clik_lensing_get_lmaxs(lclik,lmax,err);
_forwardError(*err,__LINE__,-1);
clphi = pars;
cltt = clphi + lclik->lmax[0]+1;
clee = cltt + lclik->lmax[1]+1;
clbb = clee + lclik->lmax[2]+1;
clte = clbb + lclik->lmax[3]+1;
if (lclik->type==1) {
plenslike_dat_mono *pmono;
pmono = lclik->plens_payload;
if (lclik->renorm==1) {
lkl = calc_plenslike_mono_renorm( pmono, clphi, cltt, pmono->bl_fid);
} else {
lkl = calc_plenslike_mono( pmono, clphi);
}
}
if (lclik->type==2) {
plenslike_dat_qecl *pqecl;
pqecl = lclik->plens_payload;
if (lclik->renorm==1) {
lkl = calc_plenslike_qecl_renorm( pqecl, clphi, cltt, clee,clte);
} else {
lkl = calc_plenslike_qecl( pqecl, clphi);
}
}
if (lclik->type==3) {
plenslike_dat_full *pfull;
pfull = lclik->plens_payload;
if (lclik->renorm==1) {
if (lclik->ren1==1) {
//_DEBUGHERE_("n0 n1","");
lkl = calc_plenslike_full_renorm_ren1( pfull, clphi, cltt, clee,clte);
} else {
//_DEBUGHERE_("n0","");
lkl = calc_plenslike_full_renorm( pfull, clphi, cltt, clee,clte);
}
} else {
if (lclik->ren1==1) {
//_DEBUGHERE_("n1","");
lkl = calc_plenslike_full_ren1( pfull, clphi);
} else {
//_DEBUGHERE_("","");
lkl = calc_plenslike_full( pfull, clphi);
}
}
}
if (lclik->type==4) {
void *pqecl;
pqecl = lclik->plens_payload;
lkl = dts_lensing_lkl(pqecl,pars,err);
forwardError(*err,__LINE__,0);
}
return lkl;
}
void clik_lensing_cleanup(clik_lensing_object **plclik) {
if ((*plclik)->type==1) {
plenslike_dat_mono *pmono;
pmono = (*plclik)->plens_payload;
free_plenslike_dat_mono(pmono);
}
if ((*plclik)->type==2) {
plenslike_dat_qecl *pqecl;
pqecl = (*plclik)->plens_payload;
free_plenslike_dat_qecl(pqecl);
}
if ((*plclik)->type==3) {
plenslike_dat_full *pfull;
pfull = (*plclik)->plens_payload;
free_plenslike_dat_full(pfull);
}
if ((*plclik)->type==4) {
dts_lensing_free(&((*plclik)->plens_payload));
}
free(*plclik);
*plclik = NULL;
}
int clik_try_lensing(char *fpath,error **_err) {
clik_lensing_object *plid;
_dealwitherr;
plid = _clik_lensing_init(fpath,err);
if (isError(*err)) {
//printError(stderr,*err);
purgeError(err);
return 0;
}
clik_lensing_cleanup(&plid);
return 1;
}
int clik_lensing_get_lmax(clik_lensing_object *lclik, error **_err) {
int lmax[7];
_dealwitherr;
//_DEBUGHERE_("WARNING THIS FONCTION IS %s","DEPRECATED");
testErrorRet(0==0,-12134,"This function is deprecated",*err,__LINE__,-1);
//clik_lensing_get_lmaxs(lclik,lmax,err);
//forwardError(*err,__LINE__,-1);
return lmax[0];
}
void clik_lensing_get_lmaxs(clik_lensing_object *lclik, int *lmax, error **_err) {
int i;
_dealwitherr;
memset(lmax,-1,sizeof(int)*7);
lmax[0] = lclik->lmax[0];
for(i=0;i<7*lclik->renorm;i++) {
lmax[i] = lclik->lmax[i];
}
}
int clik_lensing_get_extra_parameter_names(clik_lensing_object* lclik, parnam **names, error **_err) {
parnam *pn;
_dealwitherr;
int nr;
nr = 0;
if (lclik->type==4) {
nr = 1;
}
if (names!=NULL) {
pn = malloc_err(1*sizeof(parnam),err);
_forwardError(*err,__LINE__,-1);
*names = pn;
if (lclik->type==4) {
sprintf(pn[0],"%s","A_planck");
}
}
return nr;
}
double* clik_lensing_clcmb_fid(clik_lensing_object* lclik, error **_err) {
_dealwitherr;
double *cltt;
int *lmax;
int tot,i;
lmax = lclik->lmax;
tot=lmax[1]+1;
for(i=2;i<7;i++) {
tot+= lmax[i]+1;
}
cltt = malloc_err(sizeof(double)*(tot),err);
_forwardError(*err,__LINE__,NULL);
if ((lclik)->type==1) {
plenslike_dat_mono *pmono;
pmono = (lclik)->plens_payload;
memcpy(cltt,pmono->cltt_fid,sizeof(double)*(tot));
}
if ((lclik)->type==2) {
plenslike_dat_qecl *pqecl;
pqecl = (lclik)->plens_payload;
memcpy(cltt,pqecl->cltt_fid,sizeof(double)*(lmax[1]+1));
memcpy(cltt+(lmax[1]+1),pqecl->clee_fid,sizeof(double)*(lmax[2]+1));
memcpy(cltt+(lmax[1]+1+lmax[2]+1+lmax[3]+1),pqecl->clte_fid,sizeof(double)*(lmax[4]+1));
}
if ((lclik)->type==3) {
plenslike_dat_full *pfull;
pfull = (lclik)->plens_payload;
memcpy(cltt,pfull->cltt_fid,sizeof(double)*(lmax[1]+1));
memcpy(cltt+(lmax[1]+1),pfull->clee_fid,sizeof(double)*(lmax[2]+1));
memcpy(cltt+(lmax[1]+1+lmax[2]+1+lmax[3]+1),pfull->clte_fid,sizeof(double)*(lmax[4]+1));
}
if ((lclik)->type==4) {
dts_lensing *pfull;
pfull = (lclik)->plens_payload;
memcpy(cltt,(pfull->cl_fid + lmax[0]+1),sizeof(double)*(tot));
}
return cltt;
}
double* clik_lensing_cltt_fid(clik_lensing_object* lclik, error **_err) {
double *cltt;
_dealwitherr;
cltt = clik_lensing_clcmb_fid(lclik,err);
_forwardError(*err,__LINE__,NULL);
return cltt;
}
double* clik_lensing_clpp_fid(clik_lensing_object* lclik, error **_err) {
double *cltt;
int lmax[7];
_dealwitherr;
clik_lensing_get_lmaxs(lclik,lmax,err);
_forwardError(*err,__LINE__,NULL);
cltt = malloc_err(sizeof(double)*(lmax[0]+1),err);
_forwardError(*err,__LINE__,NULL);
if ((lclik)->type==1) {
plenslike_dat_mono *pmono;
pmono = (lclik)->plens_payload;
memcpy(cltt,pmono->clpp_fid,sizeof(double)*(lmax[0]+1));
}
if ((lclik)->type==2) {
plenslike_dat_qecl *pqecl;
pqecl = (lclik)->plens_payload;
memcpy(cltt,pqecl->clpp_fid,sizeof(double)*(lmax[0]+1));
}
if ((lclik)->type==3) {
plenslike_dat_full *pfull;
pfull = (lclik)->plens_payload;
memcpy(cltt,pfull->clpp_fid,sizeof(double)*(lmax[0]+1));
}
if ((lclik)->type==4) {
dts_lensing *pfull;
pfull = (lclik)->plens_payload;
memcpy(cltt,pfull->cl_fid,sizeof(double)*(lmax[0]+1));
}
return cltt;
}
void clik_lensing_selftest(clik_lensing_object *lclik, char *fpath, error **err) {
int nextra,ndim;
double *clX, *clt;
double res;
int lmax[7];
int i,cmbdim;
clik_lensing_get_lmaxs(lclik,lmax,err);
forwardError(*err,__LINE__,);
nextra = clik_lensing_get_extra_parameter_names(lclik,NULL,err);
forwardError(*err,__LINE__,);
ndim = nextra + lmax[0]+1;
cmbdim = 0;
for(i=1;i<7;i++) {
cmbdim += lmax[i]+1;
}
ndim +=cmbdim;
clt = malloc_err(sizeof(double)*ndim,err);
forwardError(*err,__LINE__,);
clX = clik_lensing_clpp_fid(lclik,err);
forwardError(*err,__LINE__,);
memcpy(clt,clX,sizeof(double)*(lmax[0]+1));
free(clX);
if (cmbdim>0) {
clX = clik_lensing_clcmb_fid(lclik,err);
forwardError(*err,__LINE__,);
memcpy(clt+(lmax[0]+1),clX,sizeof(double)*(ndim-nextra-(lmax[0]+1)));
if (nextra==1) {
clt[ndim-nextra] = 1;
}
free(clX);
}
res = clik_lensing_compute(lclik,clt,err);
forwardError(*err,__LINE__,);
if (lclik->has_check==1) {
printf("Checking lensing likelihood '%s' on test data. got %g expected %g (diff %g)\n",fpath,res,lclik->check,res-lclik->check);
} else {
printf("Checking lensing likelihood '%s' on test data. got %g\n",fpath,res);
}
free(clt);
}
|
yurloc/uberfire
|
uberfire-io/src/main/java/org/uberfire/io/IOClusteredService.java
|
<filename>uberfire-io/src/main/java/org/uberfire/io/IOClusteredService.java
package org.uberfire.io;
public interface IOClusteredService extends IOService {
void start();
}
|
l33tnobody/l33t_sol
|
src/738MonotoneIncreasingDigits.java
|
<reponame>l33tnobody/l33t_sol
class Solution {
public int monotoneIncreasingDigits(int N) {
char[] digits = (N + "").toCharArray();
int pos = digits.length;
for(int i = digits.length - 1; i > 0; i--) {
if(digits[i-1] > digits[i]) {
pos = i; // will set to 9 from here to the end
digits[i-1]--; // on char
}
}
for(int j = pos; j<digits.length; j++) {
digits[j] = '9';
}
return Integer.parseInt(new String(digits));
}
}
|
hiloWang/notes
|
Android/00-Code/MobileGuard/app/src/main/java/com/itheima/mobileguard/activities/LostSetup1Activity.java
|
<gh_stars>1-10
package com.itheima.mobileguard.activities;
import android.os.Bundle;
import com.itheima.mobileguard.R;
public class LostSetup1Activity extends BaseLostSetupActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_lostfindsetup1);
}
@Override
public void showNext() {
startActivityAndFinishSelf(LostSetup2Activity.class);
}
public void showPrevious() {
}
}
|
Bobholamovic/SimpleCV
|
simplecv/core/default_backward.py
|
<filename>simplecv/core/default_backward.py
import warnings
try:
from apex import amp
except ImportError:
# warnings.warn("If you want to use apex, please install apex from https://www.github.com/nvidia/apex")
pass
__all__ = [
'amp_backward'
]
def amp_backward(self, total_loss, optimizer):
with amp.scale_loss(total_loss, optimizer) as scaled_loss:
scaled_loss.backward()
|
antisvin/er-301
|
mods/core/objects/heads/RecordHead.cpp
|
#include <core/objects/heads/RecordHead.h>
#include <math.h>
namespace od
{
RecordHead::RecordHead()
{
}
RecordHead::~RecordHead()
{
}
void RecordHead::zeroBuffer()
{
if (mpSample)
{
mpSample->zero();
}
}
} /* namespace od */
|
Svvarg/tallDoors
|
src/main/java/tektor/minecraft/talldoors/doorworkshop/entity/doorparts/NullPartEntity.java
|
<gh_stars>0
package tektor.minecraft.talldoors.doorworkshop.entity.doorparts;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
public class NullPartEntity extends AbstractDoorPart{
public NullPartEntity(World par1World) {
super(par1World);
}
public NullPartEntity(World par1World, int posX, int heightPosition, int posZ,
int heightSize, int orientation, float depth) {
super(par1World, posX, heightPosition, posZ, heightSize, orientation, depth);
}
/*
@Override
public void setBoundsAt(double x, double y, double z)
{
}*/
@Override
public AxisAlignedBB getBoundingBox() {
return null;
}
@Override
public AxisAlignedBB getCollisionBox(Entity par1Entity) {
return null;
}
@Override
public boolean canBeCollidedWith() {
return false;
}
}
|
xlf999/AdsDemo
|
MobGiAdSDK/AggregationAdThirdSDKs/Glispa/1.9.8/LingTuiAudience.h
|
//
// LingTuiUser.h
// LingTuiLibrary
//
// Created by sweetchao on 16/11/4.
// Copyright © 2016年 LingTui. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface LingTuiAudience : NSObject
@property(nonatomic,assign) int age;/*用户年龄*/
@property(nonatomic,assign) int gender; /*性别 : 0:未知;1:男;2:女;*/
@property(nonatomic,strong) NSString * keywords; /*关键字 :用','分隔关键字*/
@property(nonatomic,strong) NSString * birthday;/*生日 :格式为"yyyy-MM-dd"*/
@property(nonatomic,strong) NSString * postalcode;/*邮编*/
@property(nonatomic,strong) NSString * hobbies;/*爱好*/
@property(nonatomic,strong) NSString * work;/*职业*/
@property(nonatomic,assign) int salary;/*收入:整数,以元为单位*/
@property(nonatomic,assign) int education;/*用户最高教育学历 : 学历输入数字,范围为0-6 0代表小学,1代表初中,2代表中专/高中,3代表专科,4代表本科,5代表硕士,6代表博士*/
-(void)setUser;
@end
|
flier/gocombine
|
pkg/option/option.go
|
package option
import "fmt"
// Option represents an optional value: every Option is either Some and contains a value, or None, and does not.
type Option[T any] struct {
v *T
}
func (o Option[T]) String() string {
if o.v != nil {
if s, ok := interface{}(o.v).(fmt.Stringer); ok {
return s.String()
}
return fmt.Sprintf("%v", *o.v)
}
return "<none>"
}
// Some value of type T.
func Some[T any](v T) Option[T] { return Option[T]{&v} }
// None means no value.
func None[T any]() Option[T] { return Option[T]{} }
// HasSome returns true if the option is a `Some` value.
func (o Option[T]) HasSome() bool { return o.v != nil }
// IsNone returns true if the option is a `None` value.
func (o Option[T]) IsNone() bool { return o.v == nil }
// Expect returns the contained `Some` value,
// or panic if the `o` value equals `None` with a custom panic message provided by `msg`.
func (o Option[T]) Expect(msg string) T {
if o.v == nil {
panic(msg)
}
return *o.v
}
// Unwrap returns the contained `Some` value, or panic if the `o` value equals `None`.
func (o Option[T]) Unwrap() T {
return o.Expect("Unwrap on a `None` value")
}
// UnwrapOr returns the contained `Some` value or a provided `defaultValue`.
func (o Option[T]) UnwrapOr(defaultValue T) T {
if o.v == nil {
return defaultValue
}
return *o.v
}
// UnwrapOrElse returns the contained `Some` value or computes it from a closure `f`.
func (o Option[T]) UnwrapOrElse(f func() T) T {
if o.v == nil {
return f()
}
return *o.v
}
// UnwrapOrDefault returns the contained `Some` value or a default.
func (o Option[T]) UnwrapOrDefault() (v T) {
if o.v != nil {
v = *o.v
}
return
}
// OkOr transforms the Option[T] into a (T, error), mapping `Some(v)` to `v` and `None` to `err`.
func (o Option[T]) OkOr(e error) (v T, err error) {
if o.v != nil {
v = *o.v
} else {
err = e
}
return
}
// OkOrElse transforms the Option[T] into a (T, error), mapping `Some(v)` to `v` and `None` to `f()`.
func (o Option[T]) OkOrElse(f func() error) (v T, err error) {
if o.v != nil {
v = *o.v
} else {
err = f()
}
return
}
// Map maps an Option[T] to Option[U] by applying a function `f` to a contained value.
func Map[T, U any](o Option[T], f func(T) U) Option[U] {
if o.v == nil {
return None[U]()
}
return Some(f(*o.v))
}
// MapOr returns the provided default result (if none), or applies a function to the contained value (if any).
func MapOr[T, U any](o Option[T], defaultValue U, f func(T) U) Option[U] {
if o.v == nil {
return Some(defaultValue)
}
return Some(f(*o.v))
}
// MapOrElse computes a default function result (if none),
// or applies a different function to the contained value (if any).
func MapOrElse[T, U any](o Option[T], defaultValue func() U, f func(T) U) Option[U] {
if o.v == nil {
return Some(defaultValue())
}
return Some(f(*o.v))
}
// And returns `None` if the option `o` is `None``, otherwise returns `b`.
func And[T, U any](o Option[T], b Option[U]) Option[U] {
if o.v == nil {
return None[U]()
}
return b
}
// AndThen returns `None` if the option `o` is `None`,
// otherwise calls `f` with the wrapped value and returns the result.
func AndThen[T, U any](o Option[T], f func(T) Option[U]) Option[U] {
if o.v == nil {
return None[U]()
}
return f(*o.v)
}
// Or returns the option `o` if it contains a value, otherwise returns `b`.
func Or[T any](o, b Option[T]) Option[T] {
if o.v != nil {
return o
}
return b
}
// OrElse returns the option `o` if it contains a value, otherwise calls `f`` and returns the result.
func OrElse[T any](o Option[T], f func() Option[T]) Option[T] {
if o.v != nil {
return o
}
return f()
}
// Contains returns `true` if the option `o` is a `Some` value containing the given value.
func Contains[T comparable](o Option[T], v T) bool {
return o.v != nil && *o.v == v
}
|
Pooja2589/TechnoHelpers
|
harviewer/tests/functional/config.js
|
define([], function() {
// These are custom properties that the tests can grab.
// harViewerBase: The root URL to the harviewer app.
// testBase: The root URL to the harviewer test pages, HARs and HARPs.
// We use the .lan suffixin this example to appease Microsoft Edge that doesn't like
// browsing to single-word local hostname. See:
// https://social.technet.microsoft.com/Forums/en-US/246298d8-52c1-4440-8d7f-05329d50e653/edge-browser-hosts-file?forum=win10itprogeneral
return {
harViewerBase: "http://harviewer.lan:49001/webapp/",
testBase: "http://harviewer.lan:49001/selenium/",
findTimeout: 30 * 1000,
};
});
|
ydong08/GooglePay_AP
|
terminalapp/com/google/android/libraries/commerce/hce/crypto/SmartTap2CryptoModule.java
|
package com.google.android.libraries.commerce.hce.crypto;
import android.app.Application;
import com.google.android.libraries.commerce.hce.crypto.SmartTap2ECKeyManager.CryptoClientWrapper;
import com.google.android.libraries.commerce.hce.crypto.SmartTap2ECKeyManager.KeyFactoryWrapper;
import com.google.android.libraries.commerce.hce.crypto.SmartTap2SharedKey.Factory;
import com.google.android.libraries.commerce.hce.crypto.SmartTap2SharedKey.KeyAgreementWrapper;
import dagger.Module;
import dagger.Provides;
import java.security.SecureRandom;
import java.util.concurrent.Executors;
import javax.inject.Singleton;
@Module(complete = true, injects = {SmartTap2Decryptor.class, SmartTap2MerchantSigner.class, SmartTap2SharedKey.class}, library = true)
public class SmartTap2CryptoModule {
@Provides
public static SecureRandom getSecureRandom() {
return new SecureRandom();
}
@Provides
public static SmartTap2ECKeyManager getSmartTap2ECKeyManager() {
return new SmartTap2ECKeyManager(new CryptoClientWrapper(), new KeyFactoryWrapper());
}
@Singleton
@Provides
public static SmartTap2ConscryptInstaller getSmartTap2ConscryptInstaller(Application application) {
return new SmartTap2ConscryptInstaller(application);
}
@Provides
public static SmartTap2Encryptor getSmartTap2Encryptor(SecureRandom secureRandom, SmartTap2HmacGenerator smartTap2HmacGenerator, SmartTap2ECKeyManager smartTap2ECKeyManager, SmartTap2Cipher smartTap2Cipher) {
return new SmartTap2Encryptor(smartTap2HmacGenerator, smartTap2ECKeyManager, new Factory(new KeyAgreementWrapper()), secureRandom, Executors.newSingleThreadExecutor(), smartTap2Cipher);
}
@Provides
public static SmartTap2MerchantVerifier getSmartTap2MerchantVerifier() {
return new SmartTap2MerchantVerifier();
}
}
|
Yelp/mycroft
|
mycroft/tests/logic/test_aws_resources.py
|
# -*- coding: utf-8 -*-
from boto.dynamodb2.fields import HashKey
from boto.dynamodb2.table import Table
from boto.dynamodb2.types import STRING
import pytest
import staticconf.testing
from mycroft.logic.aws_resources import check_dynamodb
from mycroft.logic.aws_resources import dynamodb_table_names
from tests.models.test_abstract_records import dynamodb_connection # noqa
from tests.data.mock_config import MOCK_CONFIG
def test_dynamodb_table_names():
with staticconf.testing.MockConfiguration(MOCK_CONFIG):
assert len(dynamodb_table_names()) > 0
@pytest.yield_fixture # noqa
def dynamodb_table_name(dynamodb_connection): # noqa
table_name = 'My_Test_Table'
table = Table.create(table_name,
schema=[HashKey('hash', data_type=STRING)],
connection=dynamodb_connection)
yield table_name
assert table.delete()
def test_check_dynamo_db(dynamodb_connection, dynamodb_table_name): # noqa
result = check_dynamodb(dynamodb_connection, [dynamodb_table_name])
assert 'dynamodb' in result
def test_check_dynamo_db_failed(dynamodb_connection): # noqa
result = check_dynamodb(dynamodb_connection, ['not-exist'])
assert 'dynamodb' in result
assert result['dynamodb'] == 'fail'
assert 'dynamodb_exception' in result
|
nospk/crm-mini-spa
|
app/models/invoice_sell.js
|
<gh_stars>1-10
const mongoose = require('mongoose');
const Invoice_sell_Schema = mongoose.Schema({
serial: {
type: String,required: true
},
type:{
type: String, required: true //sell - back
},
company:{
type: mongoose.Schema.Types.ObjectId, required: true, ref:'Company'
},
store:{
type: mongoose.Schema.Types.ObjectId, required: true, ref:'Stores'
},
list_item:[{
id: {type: mongoose.Schema.Types.ObjectId, required: true, ref:'Product_services'},
quantity: {type: Number, required: true},
type: {type:String, required:true},
price:{type:Number, required: true},
cost_price:{type:Number, required: true},
price_sale: {type:Number},
_id: false
}],
list_item_edit:[[{
id: {type: mongoose.Schema.Types.ObjectId, required: true, ref:'Product_services'},
quantity: {type: Number, required: true},
type: {type:String, required:true},
price:{type:Number, required: true},
cost_price:{type:Number, required: true},
price_sale: {type:Number},
_id: false
}]],
discount:{
type: mongoose.Schema.Types.ObjectId, ref:'Discount'
},
customer_pay:{
type: Number, require: true
},
payment:{
type: Number, require: true
},
payment_back:{
type: Number, require: true
},
employees:{
type: mongoose.Schema.Types.ObjectId, required: true, ref:'Employees'
},
customer:{
type: mongoose.Schema.Types.ObjectId, ref:'Customer'
},
bill:[{
type: mongoose.Schema.Types.ObjectId, ref:'Cash_book',
_id: false
}],
bill_html:{
type: String, require: true
},
who_created:{
type: String
},
edit_times:{
type: Number, default:0
},
note:{
type: String
},
isActive:{
type: Boolean, default:true
},
isEdit:{
type: Boolean, default:false
},
isCanBeEdit:{
type: Boolean, default:true
}
}, { timestamps: true });
module.exports = mongoose.model('Invoice_sell', Invoice_sell_Schema);
|
lihanxiang/msims
|
src/main/java/com/lee/msims/service/moodle/AssignmentService.java
|
package com.lee.msims.service.moodle;
import com.lee.msims.pojo.moodle.Assignment;
import java.util.List;
public interface AssignmentService {
// Insert
void createAssignment(Assignment assignment);
// Update
void editAssignmentInfo(Assignment assignment);
// Select
Assignment getAssignmentById(int id);
List<Assignment> getAssignmentsOfCourse(String courseCode);
List<String> getAssignmentsByStudentId(int studentId);
List<String> getStudentsWhoAreSubmitted(int assignmentId);
int checkIfSubmitted(int studentId, int assignmentId);
// Delete
void deleteAssignment(int id);
}
|
GmallPlatform/gmall
|
stuff/controllers/getAllData.js
|
'use strict';
var myUtil=require('./myUtil.js');
function getData(model,method,options,c){
return new Promise(function(resolve,reject){
if(method=='load'){
options=options.criteria;
}
model[method](options,function(err, results){
/*if(method=='load'){
// console.log('i- ',i++,err,results)
}else{
console.log('i- ',i++,err,results.length,c)
}*/
if(err){return reject(err)}
if(results){
resolve(results)
}else{
resolve([])
}
})
})
}
exports.getAllDataForIndex=function(models,lang,store,subDomain,preload,next){
let [Group,Brand,Stat,Filter,Paps,Seopage,Coupon,Witget,HomePage,Campaign,Master,Info,Label] = models;
//console.log(req.query)
//res.json([[1,3],[2,4]])
try{
let options = {
perPage: 200,
page: 0,
criteria:null,
lang:lang,
req:{store:{lang:lang}}
}
let d=Date.now()
let q1={store:store};
let q2={$and:[{store:store},{actived:true}]};
let q3={url:subDomain};
//console.log(q3)
let q4={$and:[{store:store},{actived:true},{dateEnd:{$gte:Date.now()}}]};
let acts=[];
options.criteria=q1;
acts.push(getData(Group,'list',options,'group'))
acts.push(getData(Brand,'list',options,'brand'))
options.criteria=q2;
acts.push(getData(Stat,'list',options,'stat'))
acts.push(getData(Filter,'list',options,'filters'))
options.criteria=q1;
acts.push(getData(Paps,'list',options,'paps'))
options.criteria=q2;
acts.push(getData(Seopage,'list',options,'seopage'))
acts.push(getData(Coupon,'list',options,'coupon'))
acts.push(getData(Witget,'list',options,'witget'))
options.criteria=q3;
acts.push(getData(HomePage,'load',options,'homepage'))
options.criteria=q4;
acts.push(getData(Campaign,'list',options,'campaign'))
options.criteria=q1;
acts.push(getData(Master,'list',options,'masters'))
acts.push(getData(Info,'list',options,'info'))
acts.push(getData(Label,'list',options,'label'))
if(preload){
options.criteria={preload:true,store:store}
acts.push(getData(Stat,'load',options,'stat'))
}
//console.log('time one is - ',Date.now()-d)
Promise.all(acts).then(function (results) {
//console.log(results)
//console.log('results.length',results.length)
//console.log('time is - ',Date.now()-d)
results.forEach(function (item,i) {
myUtil.setLangField(item,lang)
if(i==8 && item.blocks && item.blocks.length){
item.top=[];item.left=[];item.right=[];
item.blocks.forEach(function (b) {
if(b.position){
if(b.position=='top'){
item.top.push(b)
}else if(b.position=='left'){
item.left.push(b)
} else if(b.position=='right'){
item.right.push(b)
}
}
})
}
})
//console.log(results)
return next(null,results)
},function(err){
console.log('err',err)
return next(err)
}).catch(function (err) {
console.log(err)
return next(err)
})
}catch(err){
console.log('err from catch ',err)
return next(err)
}
}
|
Chill-Studies/Chill-Studies
|
APIs/utils/email.js
|
<reponame>Chill-Studies/Chill-Studies<filename>APIs/utils/email.js
const nodemailer = require("nodemailer");
const sendEmail = async option => {
console.log(option);
//1) create a transfer
const transporter = nodemailer.createTransport({
host: process.env.MAIL_HOST,
port: process.env.MAIL_PORT,
auth: {
user: process.env.MAIL_USER,
pass: <PASSWORD>
}
//Active in gmail
});
//2) Define the email option
const mailOption = {
from: "<NAME> <<EMAIL>>",
to: option.studentId,
subject: option.subject,
text: option.message
};
//3)Actually send the email
await transporter.sendMail(mailOption);
};
module.exports = sendEmail;
|
camelCaseD/gravit
|
src/infinity-editor/guide/guides.js
|
<reponame>camelCaseD/gravit
(function (_) {
/**
* The guide manager
* @param {IFScene} scene
* @class IFGuides
* @extend IFEventTarget
* @constructor
*/
function IFGuides(scene) {
this._scene = scene;
this._guides = [];
this._counter = 0;
this._visuals = [];
this._shapeBoxGuide = new IFShapeBoxGuide(this);
this._addGuide(this._shapeBoxGuide);
this._addGuide(new IFPageGuide(this));
this._addGuide(new IFGridGuide(this));
this._addGuide(new IFUnitGuide(this));
}
IFObject.inherit(IFGuides, IFEventTarget);
/**
* The length of snap zone lines in pixels
* @type {Number}
*/
IFGuides.VISUALS_LENGTH = 20;
// -----------------------------------------------------------------------------------------------------------------
// IFGuides.InvalidationRequestEvent Event
// -----------------------------------------------------------------------------------------------------------------
/**
* An event for an invalidation request event
* @param {IFRect} [area] the area to invalidate
* @class IFGuides.InvalidationRequestEvent
* @extends IFEvent
* @constructor
*/
IFGuides.InvalidationRequestEvent = function (area) {
this.area = area;
};
IFObject.inherit(IFGuides.InvalidationRequestEvent, IFEvent);
/** @type {IFRect} */
IFGuides.InvalidationRequestEvent.prototype.area = null;
/** @override */
IFGuides.InvalidationRequestEvent.prototype.toString = function () {
return "[Event IFGuides.InvalidationRequestEvent]";
};
/**
* @type {IFScene}
* @private
*/
IFGuides.prototype._scene = null;
/**
* @type {Array<IFGuide>}
* @private
*/
IFGuides.prototype._guides = null;
/**
* @type {IFShapeBoxGuide}
* @private
*/
IFGuides.prototype._shapeBoxGuide = null;
/**
* Internal counter of begin/endMap calls
* @type {number}
* @private
*/
IFGuides.prototype._counter = 0;
/**
* An array of vusial guides' lines ends in scene coordinates
* @type {Array<Array<IFPoint>>}
* @private
*/
IFGuides.prototype._visuals = null;
/**
* Stores the area in scene coordinates, where painting of visual guides occurs
* @type {IFRect}
* @private
*/
IFGuides.prototype._area = null;
/**
* Call this if you want to start mapping. This needs
* to be followed by a closing call to finishMap. If
* you just want to map without any visual guides,
* you don't need to call this.
*/
IFGuides.prototype.beginMap = function () {
if (this._counter == 0) {
this._visuals = [];
if (this._area && !this._area.isEmpty()) {
this.invalidate(this._area);
}
this._area = null;
}
++this._counter;
};
/**
* Finish mapping. See beginMap description.
*/
IFGuides.prototype.finishMap = function () {
if (this._counter > 0) {
--this._counter;
if (this._counter == 0 && this._visuals.length) {
var minx = null;
var miny = null;
var maxx = null;
var maxy = null;
var visLine;
for (var i = 0; i < this._visuals.length; ++i) {
visLine = this._visuals[i];
for (var j = 0; j < 2; ++j) {
if (minx === null || minx > visLine[j].getX()) {
minx = visLine[j].getX();
}
if (miny === null || miny > visLine[j].getY()) {
miny = visLine[j].getY();
}
if (maxx === null || maxx < visLine[j].getX()) {
maxx = visLine[j].getX();
}
if (maxy === null || maxy < visLine[j].getY()) {
maxy = visLine[j].getY();
}
}
}
minx -= 1;
miny -= 1;
maxx += 1;
maxy += 1;
this._area = new IFRect(minx, miny, maxx - minx, maxy - miny);
this.invalidate(this._area);
this._shapeBoxGuide.cleanExclusions();
}
}
};
/**
* Map a point to the current snapping options
* @param {IFPoint} point the point to map
* @returns {IFPoint} a mapped point
*/
IFGuides.prototype.mapPoint = function (point) {
var resX = null;
var resY = null;
var guide;
var res = null;
var targPts = [];
for (var i = 0; i < this._guides.length && (resX === null || resY === null); ++i) {
guide = this._guides[i];
if (guide.isMappingAllowed()) {
res = guide.map(point.getX(), point.getY());
if (res) {
if (res.x && resX === null) {
resX = res.x.value;
if (this._visuals && res.x.guide) {
if (res.x.guide instanceof IFPoint) {
targPts.push(res.x.guide);
} else {
this._visuals.push(res.x.guide);
}
}
}
if (res.y && resY === null) {
resY = res.y.value;
if (this._visuals && res.y.guide) {
if (res.y.guide instanceof IFPoint) {
targPts.push(res.y.guide);
} else {
this._visuals.push(res.y.guide);
}
}
}
}
res = null;
}
}
if (resX === null) {
resX = point.getX();
}
if (resY === null) {
resY = point.getY();
}
var resPt = new IFPoint(resX, resY);
var pt;
for (var i = 0; i < targPts.length; ++i) {
pt = targPts[i];
if (Math.abs(resX - pt.getX()) >= 2 || Math.abs(resY - pt.getY()) >= 2) {
this._visuals.push([resPt, pt]);
}
}
return resPt;
};
/**
* Called whenever the guides should paint itself
* @param {IFTransform} transform the transformation of the scene
* @param {IFPaintContext} context
*/
IFGuides.prototype.paint = function (transform, context) {
var guide;
for (var i = 0; i < this._guides.length; ++i) {
guide = this._guides[i];
if (guide.hasMixin(IFGuide.Visual)) {
guide.paint(transform, context);
}
}
var visLine;
for (var i = 0; i < this._visuals.length; ++i) {
visLine = this._visuals[i];
var pt0 = transform.mapPoint(visLine[0]);
var pt1 = transform.mapPoint(visLine[1]);
context.canvas.strokeLine(Math.floor(pt0.getX()) + 0.5, Math.floor(pt0.getY()) + 0.5,
Math.floor(pt1.getX()) + 0.5, Math.floor(pt1.getY()) + 0.5, 1, context.guideOutlineColor);
}
this._visuals = [];
};
/**
* Triggers invalidation request of passed area
* @param {IFRect} area - an area to invalidate; if empty, last stored area painted with visuals is used
*/
IFGuides.prototype.invalidate = function (area) {
if (this.hasEventListeners(IFGuides.InvalidationRequestEvent)) {
if (area && !area.isEmpty()) {
this.trigger(new IFGuides.InvalidationRequestEvent(area));
} else if (this._area && !this._area.isEmpty()) {
this.trigger(new IFGuides.InvalidationRequestEvent(this._area));
this._area = null;
}
}
};
/**
* Returns ShapeBoxGuide
* @returns {IFShapeBoxGuide}
*/
IFGuides.prototype.getShapeBoxGuide = function () {
return this._shapeBoxGuide;
};
/**
* Calculates and return snap zone lines for a bbox and a location against the bbox.
* Everything is in scene coordinates
* @param {IFRect} bBox
* @param {IFPoint} location
* @return {Array<Array<IFPoint>>}
*/
IFGuides.prototype.getBBoxSnapZones = function (bBox, location) {
var visLines = null;
var snapZonesAllowed = false;
for (var i = 0; i < this._guides.length && !snapZonesAllowed; ++i) {
var guide = this._guides[i];
if (guide.isMappingAllowed() && !(guide instanceof IFUnitGuide)) {
snapZonesAllowed = true;
}
}
var pDst = this._scene.getProperty('pickDist');
if (snapZonesAllowed && bBox && !bBox.isEmpty() && bBox.expanded(pDst, pDst, pDst, pDst).containsPoint(location)) {
visLines = [];
var side = bBox.getClosestSideName(location);
var sidePos = bBox.getSide(side);
var tl = bBox.getSide(IFRect.Side.TOP_LEFT);
var br = bBox.getSide(IFRect.Side.BOTTOM_RIGHT);
var shapeWidth = Math.abs(br.getX() - tl.getX());
var shapeHeight = Math.abs(br.getY() - tl.getY());
var vis1 = null;
var vis2 = null;
var horV;
if (shapeWidth > IFGuides.VISUALS_LENGTH * 2) {
horV = IFGuides.VISUALS_LENGTH;
} else if (shapeWidth > IFGuides.VISUALS_LENGTH) {
horV = shapeWidth / 2;
} else {
horV = shapeWidth;
}
var y1 = sidePos.getY();
var y2 = y1;
var x1 = tl.getX();
switch (side) {
case IFRect.Side.TOP_CENTER:
case IFRect.Side.CENTER:
case IFRect.Side.BOTTOM_CENTER:
x1 = sidePos.getX() - horV / 2;
break;
case IFRect.Side.TOP_RIGHT:
case IFRect.Side.RIGHT_CENTER:
case IFRect.Side.BOTTOM_RIGHT:
x1 = sidePos.getX() - horV;
break;
}
var x2 = x1 + horV;
visLines.push([new IFPoint(x1, y1), new IFPoint(x2, y2)]);
var vertV;
if (shapeHeight > IFGuides.VISUALS_LENGTH * 2) {
vertV = IFGuides.VISUALS_LENGTH;
} else if (shapeHeight > IFGuides.VISUALS_LENGTH) {
vertV = shapeHeight / 2;
} else {
vertV = shapeHeight;
}
x1 = sidePos.getX();
x2 = x1;
y1 = tl.getY();
switch (side) {
case IFRect.Side.LEFT_CENTER:
case IFRect.Side.CENTER:
case IFRect.Side.RIGHT_CENTER:
y1 = sidePos.getY() - vertV / 2;
break;
case IFRect.Side.BOTTOM_LEFT:
case IFRect.Side.BOTTOM_CENTER:
case IFRect.Side.BOTTOM_RIGHT:
y1 = sidePos.getY() - vertV;
break;
}
y2 = y1 + vertV;
visLines.push([new IFPoint(x1, y1), new IFPoint(x2, y2)]);
}
return visLines;
};
/**
* Add a guide to this manager
* @param {IFGuide} guide
*/
IFGuides.prototype._addGuide = function (guide) {
this._guides.push(guide);
};
/** @override */
IFGuides.prototype.toString = function () {
return "[Object IFGuides]";
};
_.IFGuides = IFGuides;
})(this);
|
dvreeze/yaidom3
|
jvm/src/test/scala/eu/cdevreeze/yaidom3/props/DefaultElemGenerator.scala
|
<reponame>dvreeze/yaidom3<gh_stars>0
/*
* Copyright 2021-2021 <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.
*/
package eu.cdevreeze.yaidom3.props
import java.io.File
import scala.util.chaining.*
import eu.cdevreeze.yaidom3.core.EName
import eu.cdevreeze.yaidom3.core.ENameProvider
import eu.cdevreeze.yaidom3.core.ENameProvider.Trivial.given
import eu.cdevreeze.yaidom3.core.Namespaces.*
import eu.cdevreeze.yaidom3.core.Navigation.*
import eu.cdevreeze.yaidom3.queryapi.ClarkElemApi
import eu.cdevreeze.yaidom3.queryapi.Nodes
import eu.cdevreeze.yaidom3.node.saxon.SaxonNodes
import eu.cdevreeze.yaidom3.props.DefaultElemGenerator.rootElemPaths
import net.sf.saxon.s9api.Processor
import net.sf.saxon.s9api.streams.Predicates.*
import org.scalacheck.Gen
/**
* Default abstract ElemGenerator, leaving only the element type open.
*
* @author
* <NAME>
*/
abstract class DefaultElemGenerator[E <: ClarkElemApi[E] & Nodes.Elem] extends ElemGenerator[E]:
protected def convertToElemType(e: SaxonNodes.Elem): E
val genElem: Gen[E] =
val rootElems: Seq[E] = rootElemPaths.map(DefaultElemGenerator.loadXmlFile).map(convertToElemType)
val allElems: Seq[E] = rootElems.flatMap(_.findAllDescendantElemsOrSelf)
require(allElems.size >= 100, s"Expected at least 100 elements")
Gen.oneOf(Gen.oneOf(allElems), Gen.oneOf(rootElems))
val genElemPred: Gen[E => Boolean] =
Gen.oneOf(Seq(predTrue, predLocalNameSizeGt7, predLocalNameContainsCapital, predLocalNameContainsNoCapital))
val genElemName: Gen[EName] =
genElem.flatMap(e => Gen.oneOf(e.name, e.findAllChildElems.headOption.map(_.name).getOrElse(EName.parse("dummyName"))))
val genElemLocalName: Gen[LocalName] = genElemName.map(_.localPart)
val genNavigationPath: Gen[NavigationPath] =
genElem.flatMap { e =>
val lastChildElemStep = NavigationStep((e.findAllChildElems.size - 1).max(0)) // Could point to nothing
val secondChildElemOfLastChildElemPath = NavigationPath.from(Seq(lastChildElemStep.toInt, 1)) // Could point to nothing
Gen.oneOf(Seq(NavigationPath.empty, NavigationPath.from(Seq(0, 0)), NavigationPath.from(Seq(2)), secondChildElemOfLastChildElemPath))
}
private def predTrue(e: E): Boolean = true
private def predLocalNameSizeGt7(e: E): Boolean = e.name.localPart.toString.size > 7
private def predLocalNameContainsCapital(e: E): Boolean = e.name.localPart.toString.exists(c => Character.isUpperCase(c))
private def predLocalNameContainsNoCapital(e: E): Boolean = !predLocalNameContainsCapital(e)
object DefaultElemGenerator:
private val rootElemPaths: Seq[String] = Seq(
"/cars.xml",
"/feed1.xml",
"/feed2.xml",
"/feed3.xml",
"/sample-xbrl-instance.xml",
"/airportsGermany.xml",
"/miniXmlBaseTestFile.xml",
"/xmlBaseTestFile.xml"
)
private val saxonProcessor: Processor = Processor(false)
private def loadXmlFile(classpathResource: String): SaxonNodes.Elem =
val file = File(classOf[DefaultElemGenerator[?]].getResource(classpathResource).toURI)
saxonProcessor
.newDocumentBuilder()
.build(file)
.pipe(_.children(isElement.test(_)).iterator.next)
.pipe(SaxonNodes.Elem(_))
end DefaultElemGenerator
|
BlackBeltPanda/ViaVersion
|
common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9_1to1_9/Protocol1_9_1To1_9.java
|
package us.myles.ViaVersion.protocols.protocol1_9_1to1_9;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.protocol.Protocol;
import us.myles.ViaVersion.api.remapper.PacketHandler;
import us.myles.ViaVersion.api.remapper.PacketRemapper;
import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.packets.State;
public class Protocol1_9_1To1_9 extends Protocol {
@Override
protected void registerPackets() {
// Currently supports 1.9.1 and 1.9.2
// Join Game Packet
registerOutgoing(State.PLAY, 0x23, 0x23, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.INT); // 0 - Player ID
map(Type.UNSIGNED_BYTE); // 1 - Player Gamemode
// 1.9.1 PRE 2 Changed this
map(Type.BYTE, Type.INT); // 2 - Player Dimension
map(Type.UNSIGNED_BYTE); // 3 - World Difficulty
map(Type.UNSIGNED_BYTE); // 4 - Max Players (Tab)
map(Type.STRING); // 5 - Level Type
map(Type.BOOLEAN); // 6 - Reduced Debug info
}
});
// Sound Effect Packet
registerOutgoing(State.PLAY, 0x47, 0x47, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT); // 0 - Sound ID
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
int sound = wrapper.get(Type.VAR_INT, 0);
if (sound >= 415) // Add 1 to every sound id since there is no Elytra sound on a 1.9 server
wrapper.set(Type.VAR_INT, 0, sound + 1);
}
});
}
});
}
@Override
public void init(UserConnection userConnection) {
}
}
|
seanlinc/Playmate
|
sjtwo-c/toolchains/windows/mingw/msys/1.0/include/sys/cygwin.h
|
/* sys/cygwin.h
Copyright 1997, 1998, 2000, 2001 Red Hat, Inc.
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#ifndef _SYS_CYGWIN_H
#define _SYS_CYGWIN_H
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
extern pid_t cygwin32_winpid_to_pid (int);
extern void cygwin32_win32_to_posix_path_list (const char *, char *);
extern int cygwin32_win32_to_posix_path_list_buf_size (const char *);
extern void cygwin32_posix_to_win32_path_list (const char *, char *);
extern int cygwin32_posix_to_win32_path_list_buf_size (const char *);
extern int cygwin32_conv_to_win32_path (const char *, char *);
extern int cygwin32_conv_to_full_win32_path (const char *, char *);
extern void cygwin32_conv_to_posix_path (const char *, char *);
extern void cygwin32_conv_to_full_posix_path (const char *, char *);
extern int cygwin32_posix_path_list_p (const char *);
extern void cygwin32_split_path (const char *, char *, char *);
extern pid_t cygwin_winpid_to_pid (int);
extern int cygwin_win32_to_posix_path_list (const char *, char *);
extern int cygwin_win32_to_posix_path_list_buf_size (const char *);
extern int cygwin_posix_to_win32_path_list (const char *, char *);
extern int cygwin_posix_to_win32_path_list_buf_size (const char *);
extern int cygwin_conv_to_win32_path (const char *, char *);
extern char * msys_p2w (char const * const);
extern int cygwin_conv_to_full_win32_path (const char *, char *);
extern int cygwin_conv_to_posix_path (const char *, char *);
extern int cygwin_conv_to_full_posix_path (const char *, char *);
extern int cygwin_posix_path_list_p (const char *);
extern void cygwin_split_path (const char *, char *, char *);
struct __cygwin_perfile
{
const char *name;
unsigned flags;
};
/* External interface stuff */
typedef enum
{
CW_LOCK_PINFO,
CW_UNLOCK_PINFO,
CW_GETTHREADNAME,
CW_GETPINFO,
CW_SETPINFO,
CW_SETTHREADNAME,
CW_GETVERSIONINFO,
CW_READ_V1_MOUNT_TABLES,
CW_USER_DATA,
CW_PERFILE,
CW_GET_CYGDRIVE_PREFIXES,
CW_GETPINFO_FULL,
CW_INIT_EXCEPTIONS,
CW_GET_CYGDRIVE_INFO,
CW_EXIT_PROCESS,
CW_SYNC_WINENV
} cygwin_getinfo_types;
#define CW_NEXTPID 0x80000000 // or with pid to get next one
/* Flags associated with process_state */
enum
{
PID_IN_USE = 0x0001, // Entry in use.
PID_ZOMBIE = 0x0002, // Child exited: no parent wait.
PID_STOPPED = 0x0004, // Waiting for SIGCONT.
PID_TTYIN = 0x0008, // Waiting for terminal input.
PID_TTYOU = 0x0010, // Waiting for terminal output.
PID_ORPHANED = 0x0020, // Member of an orphaned process group.
PID_ACTIVE = 0x0040, // Pid accepts signals.
PID_CYGPARENT = 0x0080, // Set if parent was a cygwin app.
PID_SPLIT_HEAP = 0x0100, // Set if the heap has been split,
// which means we can't fork again.
PID_UNUSED = 0x0200, // Flag that pid should be cleared from parent's
// wait list
PID_UNUSED1 = 0x0400, // Set if process uses Winsock.
PID_INITIALIZING = 0x0800, // Set until ready to receive signals.
PID_USETTY = 0x1000, // Setting this enables or disables cygwin's
// tty support. This is inherited by
// all execed or forked processes.
PID_UNUSED2 = 0x2000, // child has execed
PID_EXECED = 0x4000, // redirect to original pid info block
PID_NOREDIR = 0x8000, // don't redirect if execed
PID_EXITED = 0x80000000 // Free entry.
};
#ifdef WINVER
#ifdef _PATH_PASSWD
extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
#endif
/* This lives in the app and is initialized before jumping into the DLL.
It should only contain stuff which the user's process needs to see, or
which is needed before the user pointer is initialized, or is needed to
carry inheritance information from parent to child. Note that it cannot
be used to carry inheritance information across exec!
Remember, this structure is linked into the application's executable.
Changes to this can invalidate existing executables, so we go to extra
lengths to avoid having to do it.
When adding/deleting members, remember to adjust {public,internal}_reserved.
The size of the class shouldn't change [unless you really are prepared to
invalidate all existing executables]. The program does a check (using
SIZEOF_PER_PROCESS) to make sure you remember to make the adjustment.
*/
#ifdef __cplusplus
class ResourceLocks;
class MTinterface;
#endif
struct per_process
{
char *initial_sp;
/* The offset of these 3 values can never change. */
/* magic_biscuit is the size of this class and should never change. */
unsigned long magic_biscuit;
unsigned long dll_major;
unsigned long dll_minor;
struct _reent **impure_ptr_ptr;
char ***envptr;
/* Used to point to the memory machine we should use. Usually these
point back into the dll, but they can be overridden by the user. */
void *(*malloc)(size_t);
void (*free)(void *);
void *(*realloc)(void *, size_t);
int *fmode_ptr;
int (*main)(int, char **, char **);
void (**ctors)(void);
void (**dtors)(void);
/* For fork */
void *data_start;
void *data_end;
void *bss_start;
void *bss_end;
void *(*calloc)(size_t, size_t);
/* For future expansion of values set by the app. */
void (*premain[4]) (int, char **, struct per_process *);
/* The rest are *internal* to cygwin.dll.
Those that are here because we want the child to inherit the value from
the parent (which happens when bss is copied) are marked as such. */
/* non-zero of ctors have been run. Inherited from parent. */
int run_ctors_p;
DWORD unused[7];
/* Non-zero means the task was forked. The value is the pid.
Inherited from parent. */
int forkee;
HMODULE hmodule;
DWORD api_major; /* API version that this program was */
DWORD api_minor; /* linked with */
/* For future expansion, so apps won't have to be relinked if we
add an item. */
DWORD unused2[5];
#if defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__)
ResourceLocks *resourcelocks;
MTinterface *threadinterface;
#else
void *resourcelocks;
void *threadinterface;
#endif
struct _reent *impure_ptr;
};
#define per_process_overwrite ((unsigned) &(((struct per_process *) NULL)->resourcelocks))
extern void cygwin_premain0 (int argc, char **argv, struct per_process *);
extern void cygwin_premain1 (int argc, char **argv, struct per_process *);
extern void cygwin_premain2 (int argc, char **argv, struct per_process *);
extern void cygwin_premain3 (int argc, char **argv, struct per_process *);
extern void cygwin_set_impersonation_token (const HANDLE);
/* included if <windows.h> is included */
extern int cygwin32_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
extern int cygwin_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
#include <sys/resource.h>
#define TTY_CONSOLE 0x40000000
struct external_pinfo
{
pid_t pid;
pid_t ppid;
HANDLE hProcess;
DWORD dwProcessId, dwSpawnedProcessId;
uid_t uid;
gid_t gid;
pid_t pgid;
pid_t sid;
int ctty;
mode_t umask;
long start_time;
struct rusage rusage_self;
struct rusage rusage_children;
char progname[MAX_PATH];
DWORD strace_mask;
HANDLE strace_file;
DWORD process_state;
};
DWORD cygwin_internal (cygwin_getinfo_types, ...);
#endif /*WINVER*/
#ifdef __cplusplus
};
#endif
#endif /* _SYS_CYGWIN_H */
|
BenWeber42/dawn
|
gtclang/src/gtclang/Frontend/GTClangIncludeChecker.h
|
<reponame>BenWeber42/dawn
//===--------------------------------------------------------------------------------*- C++ -*-===//
// _ _
// | | | |
// __ _| |_ ___| | __ _ _ __ __ _
// / _` | __/ __| |/ _` | '_ \ / _` |
// | (_| | || (__| | (_| | | | | (_| |
// \__, |\__\___|_|\__,_|_| |_|\__, | - GridTools Clang DSL
// __/ | __/ |
// |___/ |___/
//
//
// This file is distributed under the MIT License (MIT).
// See LICENSE.txt for details.
//
//===------------------------------------------------------------------------------------------===//
#ifndef GTCLANG_FRONTEND_INCLUDEPROCESSOR_H
#define GTCLANG_FRONTEND_INCLUDEPROCESSOR_H
#include <llvm/ADT/SmallVector.h>
#include <llvm/ADT/StringRef.h>
#include <string>
#include <vector>
namespace gtclang {
/// @brief Ensures that input file has necessary gtclang includes needed for stencil DSL
/// @ingroup frontend
class GTClangIncludeChecker {
public:
GTClangIncludeChecker();
void Update(const std::string& sourceFile);
void Restore();
protected:
void ScanHeader(const llvm::SmallVector<llvm::StringRef, 100>& PPCodeLines,
std::vector<std::string>& includes, std::vector<std::string>& namespaces);
void WriteFile(const llvm::SmallVector<llvm::StringRef, 100>& PPCodeLines,
std::vector<std::string>& includes, std::vector<std::string>& namespaces);
private:
bool updated_;
std::string sourceFile_;
};
} // namespace gtclang
#endif
|
aabir13/java
|
Basics/StaticBlock.java
|
<reponame>aabir13/java<filename>Basics/StaticBlock.java
//Code to understand the concept of static block and instance block
public class StaticBlock
{
/*Static block is that segment of code which is executed before the main method.
A particular code can have multiple static blocks each of which shall be executed before the main method.*/
static
{
System.out.println("2");
}
/*Instance block also called init block is executed only when an object is created in the main method*/
{
System.out.println("4");
}
public static void main(String[] args)
{
System.out.println("1");
new StaticBlock();
}
static
{
System.out.println("3");
}
}
|
opetstudio/dashboard-reactjs
|
public/native-script.js
|
<reponame>opetstudio/dashboard-reactjs<gh_stars>0
// window.MerchantCreatePageComponentComponentWillMount = function () {
// $('body').attr('class', 'hold-transition skin-blue sidebar-mini')
// console.log('MerchantCreatePageComponentComponentWillMount')
// }
// window.MerchantCreatePageComponentComponentDidMount = function () {
// $('body').attr('class', 'hold-transition skin-blue sidebar-mini')
// $('.select2').select2()
// console.log('MerchantCreatePageComponentComponentDidMount')
// }
// window.HomePageComponent = function () {
// // $('body').attr('class', 'hold-transition skin-blue sidebar-mini');
// }
// window.LoginPageComponent = function () {
// // $('body').attr('class', 'hold-transition login-page');
// // $('input').iCheck({
// // checkboxClass: 'icheckbox_square-blue',
// // radioClass: 'iradio_square-blue',
// // increaseArea: '20%' /* optional */
// // });
// }
$(function () {
console.log('native-script')
if ((window.location.pathname).includes('/login')) {
console.log(window.location.pathname)
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' /* optional */
})
} else {
}
})
|
guipernicone/orange-talents-02-template-proposta
|
src/main/java/com/zup/orange/proposta/entity/proposal/request/CreateProposalRequest.java
|
<gh_stars>0
package com.zup.orange.proposta.entity.proposal.request;
import com.zup.orange.proposta.entity.proposal.Proposal;
import com.zup.orange.proposta.validation.CPFOrCNPJ;
import org.springframework.util.Assert;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;
public class CreateProposalRequest {
@NotBlank(message = "{NotBlank}")
private String name;
@NotBlank(message = "{NotBlank}")
@Email
private String email;
@NotBlank(message = "{NotBlank}")
@CPFOrCNPJ
private String document;
@NotNull(message = "{NotNull}")
@Positive
private BigDecimal salary;
@NotNull(message = "{NotNull}")
private AddressRequest address;
@Deprecated
public CreateProposalRequest() {}
public CreateProposalRequest(String name, String email, String document, BigDecimal salary, AddressRequest address) {
Assert.hasLength(name, "The name must not be empty");
Assert.hasLength(email, "The email must not be empty");
Assert.hasLength(document, "The document must not be empty");
Assert.notNull(salary, "The salary must not be empty");
Assert.notNull(address, "The address must not be empty");
this.name = name;
this.email = email;
this.document = document;
this.salary = salary;
this.address = address;
}
public String getName() {
return name;
}
public String getEmail() {
return email;
}
public String getDocument() {
return document;
}
public BigDecimal getSalary() {
return salary;
}
public AddressRequest getAddress() {
return address;
}
public Proposal toModel(){
return new Proposal(
this.name,
this.email,
this.document,
this.salary,
this.address.toModel()
);
}
}
|
kevinychen/snap2
|
snap-app/src/parser/popup.js
|
import * as classNames from "classnames";
import React from "react";
import "./popup.css"
export class Popup extends React.Component {
render() {
return (
<div
className={classNames("popup", this.customClass(), { "hide": !this.props.isVisible })}
>
{this.renderContent()}
{this.renderSubmitSection()}
</div>
);
}
renderSubmitSection() {
return (
<div className="submit-section">
<button onClick={this.exit}>Cancel</button>
{this.renderSubmitButton("Submit")}
</div>
);
}
renderSubmitButton(text) {
if (this.state.awaitingServer) {
return (
<button disabled={true}>
Please wait...
</button>
);
} else {
return (
<button
className="blue"
onClick={() => {
this.setState({ awaitingServer: true });
this.submit();
}}
>
{text}
</button>
);
}
}
exit = () => {
const { exit } = this.props;
this.finish();
exit();
}
finish = () => this.setState({ awaitingServer: false });
}
|
ramisseker/SayacApp-
|
src/components/MeterReadInfoCard/index.js
|
<gh_stars>0
import {Button, Image, Text, TextInput, View} from 'react-native';
import {PropTypes, ViewPropTypes} from '~/components/config';
import React, {useState} from 'react';
import VectorImage from 'react-native-vector-image';
import {checkGray} from '~assets';
import moment from 'moment';
import styles from './styles';
const MeterReadInfoCard = props => {
const {onPress, meterReadTime, meterValue, delayAmount, amount} = props;
return (
<View style={styles.container}>
<View style={styles.bottom}>
<VectorImage style={styles.svg} source={checkGray} />
<Text style={styles.info}>Sayaç okundu</Text>
<Text style={styles.meterReadTime}>
{moment(meterReadTime).format('LLL')}
</Text>
</View>
<View style={styles.lines}>
<Text style={styles.info}>Değer:</Text>
<Text style={styles.values}>{meterValue}</Text>
</View>
<View style={styles.lines}>
<Text style={styles.info}>Gecikme:</Text>
<Text style={styles.values}>{`${delayAmount} ₺`}</Text>
</View>
<View style={styles.lines}>
<Text style={styles.info}>Tutar:</Text>
<Text style={styles.values}>{amount + ' ₺'}</Text>
</View>
</View>
);
};
MeterReadInfoCard.propTypes = {
onPress: PropTypes.func,
meterReadtime: PropTypes.string,
meterValue: PropTypes.number,
};
MeterReadInfoCard.defaultProps = {
onPress: () => console.log(),
meterValue: 557865555,
meterReadTime: '18 Ağustos 2021, 00.01',
delayAmount: '0.00 ₺',
amount: '48.20 ₺',
};
export {MeterReadInfoCard};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.