code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
|---|---|---|---|---|---|
/********************************
* 프로젝트 : gargoyle-rax
* 패키지 : com.kyj.fx.rax
* 작성일 : 2018. 7. 3.
* 작성자 : KYJ
*******************************/
package com.kyj.fx.rax;
import java.util.function.Function;
import com.kyj.fx.commons.utils.FxUtil;
import com.kyj.fx.commons.utils.ValueUtil;
import com.kyj.fx.rax.item.FormulaParameter;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
/**
*
* Utility Function.<br/>
*
*
* @author KYJ
*
*/
public abstract class AbstractFomulaParameterToLabelFunction implements Function<FormulaParameter, RaxVirtualCommentLabel> {
@Override
public RaxVirtualCommentLabel apply(FormulaParameter stepParam) {
RaxVirtualCommentLabel lbl = null;
if (ValueUtil.isNotEmpty(stepParam)) {
lbl = new RaxVirtualCommentLabel(toString(stepParam));
lbl.setTextFill(Color.DEEPSKYBLUE);
}
if (lbl != null) {
lbl.setFont(Font.font(8.0d));
lbl.setBackground(FxUtil.getBackgroundColor(Color.WHITESMOKE));
}
return lbl;
}
public abstract String toString(FormulaParameter stepParam);
}
|
callakrsos/Gargoyle
|
gargoyle-rax/src/main/java/com/kyj/fx/rax/AbstractFomulaParameterToLabelFunction.java
|
Java
|
gpl-2.0
| 1,093
|
/*
KeePass Password Safe - The Open-Source Password Manager
Copyright (C) 2003-2019 Dominik Reichl <dominik.reichl@t-online.de>
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Security;
using System.Text;
#if !KeePassUAP
using System.Security.Cryptography;
#endif
using KeePassLib.Resources;
namespace KeePassLib.Cryptography.Cipher
{
public sealed class StandardAesEngine : ICipherEngine
{
#if !KeePassUAP
private const CipherMode SaeCipherMode = CipherMode.CBC;
private const PaddingMode SaePaddingMode = PaddingMode.PKCS7;
#endif
private static PwUuid g_uuidAes = null;
public static PwUuid AesUuid
{
get
{
PwUuid pu = g_uuidAes;
if(pu == null)
{
pu = new PwUuid(new byte[] {
0x31, 0xC1, 0xF2, 0xE6, 0xBF, 0x71, 0x43, 0x50,
0xBE, 0x58, 0x05, 0x21, 0x6A, 0xFC, 0x5A, 0xFF });
g_uuidAes = pu;
}
return pu;
}
}
public PwUuid CipherUuid
{
get { return StandardAesEngine.AesUuid; }
}
public string DisplayName
{
get
{
return ("AES/Rijndael (" + KLRes.KeyBits.Replace(@"{PARAM}",
"256") + ", FIPS 197)");
}
}
private static void ValidateArguments(Stream s, bool bEncrypt, byte[] pbKey, byte[] pbIV)
{
if(s == null) { Debug.Assert(false); throw new ArgumentNullException("s"); }
if(pbKey == null) { Debug.Assert(false); throw new ArgumentNullException("pbKey"); }
if(pbKey.Length != 32) { Debug.Assert(false); throw new ArgumentOutOfRangeException("pbKey"); }
if(pbIV == null) { Debug.Assert(false); throw new ArgumentNullException("pbIV"); }
if(pbIV.Length != 16) { Debug.Assert(false); throw new ArgumentOutOfRangeException("pbIV"); }
if(bEncrypt)
{
Debug.Assert(s.CanWrite);
if(!s.CanWrite) throw new ArgumentException("Stream must be writable!");
}
else // Decrypt
{
Debug.Assert(s.CanRead);
if(!s.CanRead) throw new ArgumentException("Stream must be readable!");
}
}
private static Stream CreateStream(Stream s, bool bEncrypt, byte[] pbKey, byte[] pbIV)
{
StandardAesEngine.ValidateArguments(s, bEncrypt, pbKey, pbIV);
#if KeePassUAP
return StandardAesEngineExt.CreateStream(s, bEncrypt, pbKey, pbIV);
#else
SymmetricAlgorithm a = CryptoUtil.CreateAes();
if(a.BlockSize != 128) // AES block size
{
Debug.Assert(false);
a.BlockSize = 128;
}
a.KeySize = 256;
a.Mode = SaeCipherMode;
a.Padding = SaePaddingMode;
ICryptoTransform t;
if(bEncrypt) t = a.CreateEncryptor(pbKey, pbIV);
else t = a.CreateDecryptor(pbKey, pbIV);
if(t == null) { Debug.Assert(false); throw new SecurityException("Unable to create AES transform!"); }
return new CryptoStreamEx(s, t, bEncrypt ? CryptoStreamMode.Write :
CryptoStreamMode.Read, a);
#endif
}
public Stream EncryptStream(Stream s, byte[] pbKey, byte[] pbIV)
{
return StandardAesEngine.CreateStream(s, true, pbKey, pbIV);
}
public Stream DecryptStream(Stream s, byte[] pbKey, byte[] pbIV)
{
return StandardAesEngine.CreateStream(s, false, pbKey, pbIV);
}
}
}
|
joshuadugie/KeePass-2.x
|
KeePassLib/Cryptography/Cipher/StandardAesEngine.cs
|
C#
|
gpl-2.0
| 3,938
|
#include<stdio.h>
int main()
{
int a[15];
int i,j,temp;
for(i=0; i<10; i++)
scanf("%d",&a[i]);
for(i=1; i<=9; i++)
for(j=0; j<9; j++)
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
for(i=0; i<3; i++)
printf("%d\n",a[9-i]);
return 0;
}
|
zning1994/practice
|
Program/SDKDOJ/SDKDACM/VOJ/ex2.c
|
C
|
gpl-2.0
| 396
|
#ifndef CT_REDEFINE
#define CT_REDEFINE
/* Workaround for my version of rpcgen */
#define cvstool_ls_1_svc cvstool_ls_1
#define cvstool_lsver_1_svc cvstool_lsver_1
#define cvstool_update_1_svc cvstool_update_1
#endif
|
garye/VCFS
|
cvstool_redefines.h
|
C
|
gpl-2.0
| 219
|
<?php
$this->breadcrumbs = array(
'Danh mục tuyển dụng' => array('index'),
'Manage',
);
$this->menu = array(
array('label' => 'Thêm mới', 'url' => array('create'))
);
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
$('.search-form').toggle();
return false;
});
$('.search-form form').submit(function(){
$('#product-grid').yiiGridView('update', {
data: $(this).serialize()
});
return false;
});
");
?>
<h1>Danh sách</h1>
<?php echo CHtml::link('Tìm kiếm', '#', array('class' => 'search-button')); ?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array(
'model' => $model,
));
?>
</div><!-- search-form -->
<?php
$form = $this->beginWidget('CActiveForm', array(
'enableAjaxValidation' => TRUE,
));
?>
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'album-grid',
'dataProvider' => $model->search(),
'filter' => $model,
'selectableRows' => 2,
'columns' => array(
array(
'id' => 'autoId',
'class' => 'CCheckBoxColumn',
'selectableRows' => '50',
),
array(
'name' => 'location',
'value' => 'CHtml::textField("setLocation[$data->id]",$data->location)',
'type' => 'raw',
),
array(
'name' => 'education',
'value' => function($data) {
if ($data->education == Jobs::JOB_UNIVERSITY)
$item = 'Đại học';
elseif ($data->education == Jobs::JOB_COLLEGE)
$item = 'Cao đẳng';
elseif ($data->education == Jobs::JOB_INTERMEDIATE)
$item = 'Trung cấp';
else
$item = 'Lao động phổ thông';
return $item;
},
'filter' => array(Jobs::JOB_UNIVERSITY => 'Đại học', Jobs::JOB_COLLEGE => 'Cao Đẳng', Jobs::JOB_INTERMEDIATE => ' Trung cấp', Jobs::JOB_GENERAL => 'Lao động phổ thông'),
),
array(
'name' => 'wage',
'value' => 'CHtml::textField("setWage[$data->id]",$data->wage)',
'type' => 'raw',
),
array(
'name' => 'gender',
'value' => function($data) {
if ($data->gender == 1)
$item = 'Nam';
elseif ($data->gender == 0)
$item = 'Nữ';
else
$item = 'Nam/Nữ';
return $item;
},
'filter' => array(1 => 'Nam', '2' => 'Nữ', '10' => 'Nam/Nữ'),
),
array(
'name' => 'job_type',
'value' => 'CHtml::textField("setJob_type[$data->id]",$data->job_type,array("style"=>"width:100px;"))',
'type' => 'raw',
'filter' => FALSE,
),
array(
'name' => 'probation_period',
'value' => 'CHtml::textField("setProbation_period[$data->id]",$data->probation_period,array("style"=>"width:100px;"))',
'type' => 'raw',
'filter' => FALSE,
),
array(// display 'create_time' using an expression
'name' => 'create_time',
'value' => 'CHtml::textField("setCreate_time[$data->id]", date("d-m-Y", $data->create_time),array("style"=>"width:80px;"))',
'type' => 'raw',
'filter' => FALSE,
),
array(// display 'create_time' using an expression
'name' => 'update_time',
'value' => 'CHtml::textField("setUpdate_time[$data->id]", date("d-m-Y", $data->update_time),array("style"=>"width:80px;"))',
'type' => 'raw',
'filter' => FALSE,
),
array(
'name' => 'status',
'value' => '$data->status==1?"Hiện":"Ẩn"',
'filter' => array(1 => 'Hiện', 0 => 'Ẩn'),
),
array(
'class' => 'CButtonColumn',
),
),
));
?>
<script>
function reloadGrid(data) {
$.fn.yiiGridView.update('album-grid');
}
</script>
<span>Tick chọn:</span>
<?php echo CHtml::ajaxSubmitButton('Filter', array('jobs/ajaxUpdate'), array(), array("style" => "display:none;")); ?>
<?php echo CHtml::ajaxSubmitButton('Hiện', array('jobs/ajaxUpdate', 'act' => 'doActive'), array('success' => 'reloadGrid')); ?>
<?php echo CHtml::ajaxSubmitButton('Ẩn', array('jobs/ajaxUpdate', 'act' => 'doInactive'), array('success' => 'reloadGrid')); ?>
<br/><BR>
<span> Cập nhật: </span>
<?php echo CHtml::ajaxSubmitButton('Vị trí', array('jobs/ajaxUpdate', 'act' => 'doLocation'), array('success' => 'reloadGrid')); ?>
<?php echo CHtml::ajaxSubmitButton('Mức lương', array('jobs/ajaxUpdate', 'act' => 'dowage'), array('success' => 'reloadGrid')); ?>
<?php echo CHtml::ajaxSubmitButton('Hình thức làm việc', array('jobs/ajaxUpdate', 'act' => 'doJob_type'), array('success' => 'reloadGrid')); ?>
<?php echo CHtml::ajaxSubmitButton('Thời gian thử việc', array('jobs/ajaxUpdate', 'act' => 'doProbation_period'), array('success' => 'reloadGrid')); ?>
<?php echo CHtml::ajaxSubmitButton('Thứ hạng', array('jobs/ajaxUpdate', 'act' => 'doSortRank'), array('success' => 'reloadGrid')); ?>
<?php echo CHtml::ajaxSubmitButton('Ngày hết hạn', array('jobs/ajaxUpdate', 'act' => 'doUpdate_time'), array('success' => 'reloadGrid')); ?>
<?php $this->endWidget(); ?>
<style>
#preview {
position: absolute;
border: 1px solid #ccc;
background: #333;
padding: 5px;
display: none;
color: #fff;
}
#preview img {
max-width: 500px;
max-height: 500px;
}
</style>
|
sonha/camera
|
protected/views/admin/jobs/admin.php
|
PHP
|
gpl-2.0
| 5,774
|
package net.minecraft.src;
public class RequestDelete extends Request
{
public RequestDelete(String par1Str, int par2, int par3)
{
super(par1Str, par2, par3);
}
public RequestDelete func_96370_f()
{
try
{
this.field_96367_a.setDoOutput(true);
this.field_96367_a.setRequestMethod("DELETE");
this.field_96367_a.connect();
return this;
}
catch (Exception var2)
{
throw new ExceptionMcoHttp("Failed URL: " + this.field_96365_b, var2);
}
}
public Request func_96359_e()
{
return this.func_96370_f();
}
}
|
LolololTrololol/InsertNameHere
|
minecraft/net/minecraft/src/RequestDelete.java
|
Java
|
gpl-2.0
| 662
|
/**
* Created by kuku on 10/01/15.
*/
$(document).ready(function(){
$('.form-usuario-perfil').attr('disabled', 'disabled'); //Disable
});
$(".editarFormularioUsuarioPerfil").click(mostrarBotonesPerfil);
function mostrarBotonesPerfil(){
$("#botoneraPerfil").show("slow");
$(".editarFormularioUsuarioPerfil").hide("slow");
}
|
IsmiKin/Podonet
|
web/js/usuario/perfilUsuario.js
|
JavaScript
|
gpl-2.0
| 342
|
# Makefile for OS project
# To build, first `make dep`, then `make`. Everything should be automatic.
# Will compile all *.c and *.S files in the current directory.
OUTDIR = output/
release: CFLAGS_EXTRA = -flto -ffat-lto-objects -fwhole-program -O2 -DRELEASE_BUILD
release: bootimg
# Flags to use when compiling, preprocessing, assembling, and linking
CFLAGS += -g $(CFLAGS_EXTRA) -Wall -fno-stack-protector -nostdlib -fno-exceptions -ffreestanding
ASFLAGS += -DASM
LDFLAGS += -g $(CFLAGS_EXTRA) -nostdlib -static -Wno-attributes
CC=`./detect-gcc.sh`
CXX=`./detect-gcc.sh`
#If you have any .h files in another directory, add -I<dir> to this line
CPPFLAGS += -I. -g
CXXFLAGS += -g $(CFLAGS_EXTRA) -Wall -std=c++1y -nostdlib -fno-exceptions -ffreestanding -ftemplate-depth=4096 -fno-rtti -I.
CRTBEGIN_OBJ:=$(shell $(CC) $(CFLAGS) -print-file-name=crtbegin.o)
CRTEND_OBJ:=$(shell $(CC) $(CFLAGS) -print-file-name=crtend.o)
CRTI_OBJ=crti.o
CRTN_OBJ=crtn.o
# This generates the list of source files
SRC = $(wildcard **/**/*.S) $(wildcard **/*.S) $(wildcard **/**/*.c) $(wildcard **/*.c) $(wildcard *.S) $(wildcard *.c)
SRC_CPP = $(wildcard **/**/*.cpp) $(wildcard **/*.cpp) $(wildcard *.cpp)
# This generates the list of .o files. The order matters, boot.o must be first
OBJS = $(filter-out crtn.o, $(filter-out crti.o, $(filter-out boot.o,$(patsubst %.S,%.o,$(filter %.S,$(SRC))))))
OBJS += $(patsubst %.c,%.o,$(filter %.c,$(SRC)))
OBJS += $(patsubst %.cpp,%.o,$(filter %.cpp,$(SRC_CPP)))
INTERNAL_OBJS:=boot.o $(CRTI_OBJ) $(OBJS) $(CRTN_OBJ)
ALL_OBJS:= $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) boot.o
bootimg: Makefile $(ALL_OBJS)
$(CC) $(LDFLAGS) $(ALL_OBJS) -Wl,--section-start=.init=400000 -o $(OUTDIR)/bootimg
(cd $(OUTDIR); ./debug.sh)
debug: bootimg
dep: Makefile.dep
Makefile.dep: $(SRC)
$(CC) -MM $(CFLAGS) $(SRC) > $@
.PHONY: clean, tidy
clean:
rm -f $(INTERNAL_OBJS) Makefile.dep $(OUTDIR)/bootimg
tidy: clean
rm -f $(OUTDIR)/mp3.img
ifneq ($(MAKECMDGOALS),dep)
ifneq ($(MAKECMDGOALS),clean)
include Makefile.dep
endif
endif
|
TakefiveInteractive/TedkOS
|
student-distrib/Makefile
|
Makefile
|
gpl-2.0
| 2,089
|
//
// gbuild.h --- definition of the abstract G matrix builder
//
// Copyright (C) 1996 Limit Point Systems, Inc.
//
// Author: Edward Seidl <seidl@janed.com>
// Maintainer: LPS
//
// This file is part of the SC Toolkit.
//
// The SC Toolkit is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// The SC Toolkit 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 Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public License
// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
//
// The U.S. Government is granted a limited license as per AL 91-7.
//
#ifndef _chemistry_qc_scf_gbuild_h
#define _chemistry_qc_scf_gbuild_h
#ifdef __GNUC__
#pragma interface
#endif
#include <util/group/thread.h>
#include <chemistry/qc/scf/scf.h>
namespace sc {
template<class T>
class GBuild : public Thread {
protected:
T& contribution;
double accuracy_;
public:
GBuild(T&t) : contribution(t) {}
virtual ~GBuild() {}
};
}
#endif
// Local Variables:
// mode: c++
// c-file-style: "ETS"
// End:
|
qsnake/mpqc
|
src/lib/chemistry/qc/scf/gbuild.h
|
C
|
gpl-2.0
| 1,484
|
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateExperimentScientistsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('experiment_scientists', function (Blueprint $table) {
$table->id();
$table->integer('experiment_id');
$table->integer('user_id');
$table->timestamps();
// $table->foreign('experiment_id')->references('id')->on('experiments');
// $table->foreign('user_id')->references('id')->on('users');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('experiment_scientists');
}
}
|
khaivngo/QuickEval
|
database/migrations/2021_05_14_012802_create_experiment_scientists_table.php
|
PHP
|
gpl-2.0
| 870
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>freemind: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">freemind
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Packages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacefreemind.html">freemind</a></li><li class="navelem"><a class="el" href="namespacefreemind_1_1controller.html">controller</a></li><li class="navelem"><a class="el" href="namespacefreemind_1_1controller_1_1filter.html">filter</a></li><li class="navelem"><a class="el" href="namespacefreemind_1_1controller_1_1filter_1_1condition.html">condition</a></li><li class="navelem"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html">SelectedViewCondition</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">freemind.controller.filter.condition.SelectedViewCondition Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html">freemind.controller.filter.condition.SelectedViewCondition</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html#a7d97c33d56cd77a498b38351f8eca890">checkNode</a>(Controller c, MindMapNode node)</td><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html">freemind.controller.filter.condition.SelectedViewCondition</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html#a6c47815abfd85b7a9c1079c9dc72cec4">CreateCondition</a>()</td><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html">freemind.controller.filter.condition.SelectedViewCondition</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html#a55c5a35f71acca5f98da62483209981e">getListCellRendererComponent</a>()</td><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html">freemind.controller.filter.condition.SelectedViewCondition</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html#a43677b3a1e33ea50dbc650c894ff61f3">save</a>(XMLElement element)</td><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html">freemind.controller.filter.condition.SelectedViewCondition</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html#ae042223c891344da36f49a0375c1422e">SelectedViewCondition</a>()</td><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html">freemind.controller.filter.condition.SelectedViewCondition</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html#a3d63b524c623404dd19d0fb6f3ce0d27">toString</a>()</td><td class="entry"><a class="el" href="classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition.html">freemind.controller.filter.condition.SelectedViewCondition</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Apr 21 2015 12:44:19 for freemind by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
|
mibischo/freemind
|
doxygen/html/classfreemind_1_1controller_1_1filter_1_1condition_1_1_selected_view_condition-members.html
|
HTML
|
gpl-2.0
| 8,349
|
<?php
/* Finding the path to the wp-admin folder */
$iswin = preg_match('/:\\\/', dirname(__file__));
$slash = ($iswin) ? "\\" : "/";
$wp_path = preg_split('/(?=((\\\|\/)wp-content)).*/', dirname(__file__));
$wp_path = (isset($wp_path[0]) && $wp_path[0] != "") ? $wp_path[0] : $_SERVER["DOCUMENT_ROOT"];
/** Load WordPress Administration Bootstrap */
require_once($wp_path . $slash . 'wp-load.php');
require_once($wp_path . $slash . 'wp-admin' . $slash . 'admin.php');
load_plugin_textdomain( 'kimili-flash-embed', FALSE, 'kimili-flash-embed/langs/');
$title = "Kimili Flash Embed";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php bloginfo('name') ?> › <?php echo wp_specialchars( $title ); ?> — WordPress</title>
<?php
wp_admin_css( 'css/global' );
wp_admin_css();
wp_admin_css( 'css/colors' );
wp_admin_css( 'css/ie' );
$hook_suffix = '';
if ( isset($page_hook) )
$hook_suffix = "$page_hook";
else if ( isset($plugin_page) )
$hook_suffix = "$plugin_page";
else if ( isset($pagenow) )
$hook_suffix = "$pagenow";
do_action("admin_print_styles-$hook_suffix");
do_action('admin_print_styles');
do_action("admin_print_scripts-$hook_suffix");
do_action('admin_print_scripts');
do_action("admin_head-$hook_suffix");
do_action('admin_head');
?>
<link rel="stylesheet" href="<?php echo plugins_url('/kimili-flash-embed/css/generator.css'); ?>?ver=<?php echo $KimiliFlashEmbed->version ?>" type="text/css" media="screen" title="no title" charset="utf-8" />
<script src="<?php echo plugins_url('/kimili-flash-embed/js/kfe.js'); ?>?ver=<?php echo $KimiliFlashEmbed->version ?>" type="text/javascript" charset="utf-8"></script>
<!--
<?php echo wp_specialchars($title." Tag Generator" ); ?> is heavily based on
SWFObject 2 HTML and JavaScript generator v1.2 <http://code.google.com/p/swfobject/>
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-->
</head>
<body class="<?php echo apply_filters( 'admin_body_class', '' ); ?>">
<div class="wrap" id="KFE_Generator">
<h2><?php echo wp_specialchars($title." ".__("Tag Generator",'kimili-flash-embed') ); ?></h2>
<div class="note"><?php _e('Asterisk (<span class="req">*</span>) indicates required field','kimili-flash-embed'); ?></div>
<fieldset>
<legend><?php _e("SWFObject Configuration",'kimili-flash-embed'); ?> [ <a id="toggle1" href="#">-</a> ]</legend>
<div id="toggleable1">
<div class="col1">
<label for="publishingMethod"><?php _e("Publish method",'kimili-flash-embed'); ?>:</label> <span class="req">*</span>
</div>
<div class="col2">
<select id="publishingMethod" name="publishmethod">
<option value="static" <?php if (!get_option('kml_flashembed_publish_method')) echo "selected=\"selected\""; ?>><?php _e("Static publishing",'kimili-flash-embed'); ?></option>
<option value="dynamic" <?php if (get_option('kml_flashembed_publish_method')) echo "selected=\"selected\""; ?>><?php _e("Dynamic publishing",'kimili-flash-embed'); ?></option>
</select>
<a id="togglePublishingMethodHelp" href="#"><?php _e("what is this?",'kimili-flash-embed'); ?></a>
</div>
<div class="clear"> </div>
<div id="publishingMethodHelp" class="help">
<h2><?php _e("Static publishing",'kimili-flash-embed'); ?></h2>
<h3><?php _e("Description",'kimili-flash-embed'); ?></h3>
<p><?php _e("Embed Flash content and alternative content using standards compliant markup, and use unobtrusive JavaScript to resolve the issues that markup alone cannot solve.",'kimili-flash-embed'); ?></p>
<h3><?php _e("Pros",'kimili-flash-embed'); ?></h3>
<p><?php _e("The embedding of Flash content does not rely on JavaScript and the actual authoring of standards compliant markup is promoted.",'kimili-flash-embed'); ?></p>
<h3><?php _e("Cons",'kimili-flash-embed'); ?></h3>
<p><?php _e("Does not solve 'click-to-activate' mechanisms in Internet Explorer 6+ and Opera 9+.",'kimili-flash-embed'); ?></p>
<h2><?php _e("Dynamic publishing",'kimili-flash-embed'); ?></h2>
<h3><?php _e("Description",'kimili-flash-embed'); ?></h3>
<p><?php _e("Create alternative content using standards compliant markup and embed Flash content with unobtrusive JavaScript.",'kimili-flash-embed'); ?></p>
<h3><?php _e("Pros",'kimili-flash-embed'); ?></h3>
<p><?php _e("Avoids 'click-to-activate' mechanisms in Internet Explorer 6+ and Opera 9+.",'kimili-flash-embed'); ?></p>
<h3><?php _e("Cons",'kimili-flash-embed'); ?></h3>
<p><?php _e("The embedding of Flash content relies on JavaScript, so if you have the Flash plug-in installed, but have JavaScript disabled or use a browser that doesn't support JavaScript, you will not be able to see your Flash content, however you will see alternative content instead. Flash content will also not be shown on a device like Sony PSP, which has very poor JavaScript support, and automated tools like RSS readers are not able to pick up Flash content.",'kimili-flash-embed'); ?></p>
</div>
<div class="col1">
<label title="<?php _e("Flash version consists of major, minor and release version",'kimili-flash-embed'); ?>" class="info"><?php _e("Flash Version",'kimili-flash-embed'); ?></label>: <span class="req">*</span>
</div>
<div class="col2">
<input type="text" id="major" name="major" value="<?php echo get_option('kml_flashembed_version_major'); ?>" size="4" maxlength="2" />
.
<input type="text" id="minor" name="minor" value="<?php echo get_option('kml_flashembed_version_minor'); ?>" size="4" maxlength="4" />
.
<input type="text" id="release" name="release" value="<?php echo get_option('kml_flashembed_version_revision'); ?>" size="4" maxlength="4" />
</div>
<div class="clear"> </div>
<div class="col1">
<label for="expressInstall" title="<?php _e("Check checkbox to activate express install functionality on your swf.",'kimili-flash-embed'); ?>" class="info"><?php _e("Adobe Express Install",'kimili-flash-embed'); ?>:</label>
</div>
<div class="col2">
<input type="checkbox" id="expressInstall" name="useexpressinstall" value="true" <?php if (get_option('kml_flashembed_use_express_install')) echo "checked=\"checked\""; ?> />
</div>
<div class="clear"> </div>
<div id="toggleReplaceId">
<div class="col1">
<label for="replaceId"><?php _e("HTML container ID",'kimili-flash-embed'); ?>:</label>
</div>
<div class="col2">
<input type="text" id="replaceId" name="replaceId" value="" size="20" />
<a id="toggleReplaceIdHelp" href="#"><?php _e("what is this?",'kimili-flash-embed'); ?></a>
</div>
<div id="replaceIdHelp" class="help">
<p><?php _e("Specifies the id attribute of the HTML container element that will be replaced with Flash content if enough JavaScript and Flash support is available.",'kimili-flash-embed'); ?></p>
<p><?php _e("This HTML container will be generated automatically and will embed your alternative HTML content as defined in the HTML section.",'kimili-flash-embed'); ?></p>
<p><?php _e("If you don't define an ID here, KFE will randomly generate an ID for you.",'kimili-flash-embed'); ?></p>
</div>
<div class="clear"> </div>
</div>
</div>
</fieldset>
<fieldset>
<legend><?php _e("SWF definition",'kimili-flash-embed'); ?> [ <a id="toggle2" href="#">-</a> ]</legend>
<div id="toggleable2">
<div class="col1">
<label for="swf" title="<?php _e("The relative or absolute path to your Flash content .swf file",'kimili-flash-embed'); ?>" class="info"><?php _e("Flash (.swf)",'kimili-flash-embed'); ?>:</label> <span class="req">*</span>
</div>
<div class="col2">
<input type="text" id="swf" name="movie" value="<?php echo get_option('kml_flashembed_filename'); ?>" size="20" />
</div>
<div class="clear"> </div>
<div class="col1">
<label title="<?php _e("Width × height (unit)",'kimili-flash-embed'); ?>" class="info"><?php _e("Dimensions",'kimili-flash-embed'); ?>:</label> <span class="req">*</span>
</div>
<div class="col2">
<input type="text" id="width" name="width" value="<?php echo get_option('kml_flashembed_width'); ?>" size="5" maxlength="5" />
×
<input type="text" id="height" name="height" value="<?php echo get_option('kml_flashembed_height'); ?>" size="5" maxlength="5" />
<select id="unit" name="unit">
<option <?php if (get_option('kml_flashembed_dimensions_unit') == "pixels") echo "selected=\"selected\""; ?> value="pixels"><?php _e("pixels",'kimili-flash-embed'); ?></option>
<option <?php if (get_option('kml_flashembed_dimensions_unit') == "percentage") echo "selected=\"selected\""; ?> value="percentage"><?php _e("percentage",'kimili-flash-embed'); ?></option>
</select>
</div>
<div class="clear"> </div>
<div id="toggleAttsParamsContainer">
<div class="col1"><label class="info" title="<?php _e("HTML object element attributes",'kimili-flash-embed'); ?>"><?php _e("Attributes",'kimili-flash-embed'); ?>:</label></div>
<div class="col3">
<label for="attId" class="info" title="<?php _e("Uniquely identifies the Flash movie so that it can be referenced using a scripting language or by CSS",'kimili-flash-embed'); ?>"><?php _e("Flash content ID",'kimili-flash-embed'); ?></label>
</div>
<div class="col4">
<input type="text" id="attId" name="fid" value="<?php echo get_option('kml_flashembed_flash_id'); ?>" size="15" />
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="attClass" class="info" title="<?php _e("Classifies the Flash movie so that it can be referenced using a scripting language or by CSS",'kimili-flash-embed'); ?>">class</label>
</div>
<div class="col4">
<input type="text" id="attClass" name="targetclass" value="<?php echo get_option('kml_flashembed_target_class'); ?>" size="15" />
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="align" class="info" title="<?php _e("HTML alignment of the object element. If this attribute is omitted, it by default centers the movie and crops edges if the browser window is smaller than the movie. NOTE: Using this attribute is not valid in XHTML 1.0 Strict.",'kimili-flash-embed'); ?>">align</label>
</div>
<div class="col4">
<select id="align" name="align">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_align') == "left") echo "selected=\"selected\""; ?> value="left">left</option>
<option <?php if (get_option('kml_flashembed_align') == "right") echo "selected=\"selected\""; ?> value="right">right</option>
<option <?php if (get_option('kml_flashembed_align') == "top") echo "selected=\"selected\""; ?> value="top">top</option>
<option <?php if (get_option('kml_flashembed_align') == "bottom") echo "selected=\"selected\""; ?> value="bottom">bottom</option>
</select>
</div>
<div class="clear"> </div>
<div class="col1">
<label class="info" title="<?php _e("HTML object element nested param elements",'kimili-flash-embed'); ?>"><?php _e("Parameters",'kimili-flash-embed'); ?>:</label>
</div>
<div class="col3">
<label for="play" class="info" title="<?php _e("Specifies whether the movie begins playing immediately on loading in the browser. The default value is true if this attribute is omitted.",'kimili-flash-embed'); ?>">play</label>
</div>
<div class="col4">
<select id="play" name="play">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_play') == "true") echo "selected=\"selected\""; ?> value="true">true</option>
<option <?php if (get_option('kml_flashembed_play') == "false") echo "selected=\"selected\""; ?> value="false">false</option>
</select>
</div>
<div class="col3">
<label for="loop" class="info" title="<?php _e("Specifies whether the movie repeats indefinitely or stops when it reaches the last frame. The default value is true if this attribute is omitted",'kimili-flash-embed'); ?>.">loop</label>
</div>
<div class="col4">
<select id="loop" name="loop">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_loop') == "true") echo "selected=\"selected\""; ?> value="true">true</option>
<option <?php if (get_option('kml_flashembed_loop') == "false") echo "selected=\"selected\""; ?> value="false">false</option>
</select>
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="menu" class="info" title="<?php _e("Shows a shortcut menu when users right-click (Windows) or control-click (Macintosh) the SWF file. To show only About Flash in the shortcut menu, deselect this option. By default, this option is set to true.",'kimili-flash-embed'); ?>">menu</label>
</div>
<div class="col4">
<select id="menu" name="menu">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_menu') == "true") echo "selected=\"selected\""; ?> value="true">true</option>
<option <?php if (get_option('kml_flashembed_menu') == "false") echo "selected=\"selected\""; ?> value="false">false</option>
</select>
</div>
<div class="col3">
<label for="quality" class="info" title="<?php _e("Specifies the trade-off between processing time and appearance. The default value is 'high' if this attribute is omitted.",'kimili-flash-embed'); ?>">quality</label>
</div>
<div class="col4">
<select id="quality" name="quality">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_quality') == "best") echo "selected=\"selected\""; ?> value="best">best</option>
<option <?php if (get_option('kml_flashembed_quality') == "high") echo "selected=\"selected\""; ?> value="high">high</option>
<option <?php if (get_option('kml_flashembed_quality') == "medium") echo "selected=\"selected\""; ?> value="medium">medium</option>
<option <?php if (get_option('kml_flashembed_quality') == "autohigh") echo "selected=\"selected\""; ?> value="autohigh">autohigh</option>
<option <?php if (get_option('kml_flashembed_quality') == "autolow") echo "selected=\"selected\""; ?> value="autolow">autolow</option>
<option <?php if (get_option('kml_flashembed_quality') == "low") echo "selected=\"selected\""; ?> value="low">low</option>
</select>
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="scale" class="info" title="<?php _e("Specifies scaling, aspect ratio, borders, distortion and cropping for if you have changed the document's original width and height.",'kimili-flash-embed'); ?>">scale</label>
</div>
<div class="col4">
<select id="scale" name="scale">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_scale') == "showall") echo "selected=\"selected\""; ?> value="showall">showall</option>
<option <?php if (get_option('kml_flashembed_scale') == "noborder") echo "selected=\"selected\""; ?> value="noborder">noborder</option>
<option <?php if (get_option('kml_flashembed_scale') == "exactfit") echo "selected=\"selected\""; ?> value="exactfit">exactfit</option>
<option <?php if (get_option('kml_flashembed_scale') == "noscale") echo "selected=\"selected\""; ?> value="noscale">noscale</option>
</select>
</div>
<div class="col3">
<label for="salign" class="info" title="<?php _e("Specifies where the content is placed within the application window and how it is cropped.",'kimili-flash-embed'); ?>">salign</label>
</div>
<div class="col4">
<select id="salign" name="salign">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_salign') == "tl") echo "selected=\"selected\""; ?> value="tl">tl</option>
<option <?php if (get_option('kml_flashembed_salign') == "tr") echo "selected=\"selected\""; ?> value="tr">tr</option>
<option <?php if (get_option('kml_flashembed_salign') == "bl") echo "selected=\"selected\""; ?> value="bl">bl</option>
<option <?php if (get_option('kml_flashembed_salign') == "br") echo "selected=\"selected\""; ?> value="br">br</option>
<option <?php if (get_option('kml_flashembed_salign') == "l") echo "selected=\"selected\""; ?> value="l">l</option>
<option <?php if (get_option('kml_flashembed_salign') == "t") echo "selected=\"selected\""; ?> value="t">t</option>
<option <?php if (get_option('kml_flashembed_salign') == "r") echo "selected=\"selected\""; ?> value="r">r</option>
<option <?php if (get_option('kml_flashembed_salign') == "b") echo "selected=\"selected\""; ?> value="b">b</option>
</select>
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="wmode" class="info" title="<?php _e("Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. The default value is 'window' if this attribute is omitted.",'kimili-flash-embed'); ?>">wmode</label>
</div>
<div class="col4">
<select id="wmode" name="wmode">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_wmode') == "window") echo "selected=\"selected\""; ?> value="window">window</option>
<option <?php if (get_option('kml_flashembed_wmode') == "opaque") echo "selected=\"selected\""; ?> value="opaque">opaque</option>
<option <?php if (get_option('kml_flashembed_wmode') == "transparent") echo "selected=\"selected\""; ?> value="transparent">transparent</option>
<option <?php if (get_option('kml_flashembed_wmode') == "direct") echo "selected=\"selected\""; ?> value="direct">direct</option>
<option <?php if (get_option('kml_flashembed_wmode') == "gpu") echo "selected=\"selected\""; ?> value="gpu">gpu</option>
</select>
</div>
<div class="col3">
<label for="bgcolor" class="info" title="<?php _e("Hexadecimal RGB value in the format #RRGGBB, which specifies the background color of the movie, which will override the background color setting specified in the Flash file.",'kimili-flash-embed'); ?>">bgcolor</label>
</div>
<div class="col4">
<input type="text" id="bgcolor" name="bgcolor" value="<?php echo get_option('kml_flashembed_bgcolor'); ?>" size="15" maxlength="7" />
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="devicefont" class="info" title="<?php _e("Specifies whether static text objects that the Device Font option has not been selected for will be drawn using device fonts anyway, if the necessary fonts are available from the operating system.",'kimili-flash-embed'); ?>">devicefont</label>
</div>
<div class="col4">
<select id="devicefont" name="devicefont">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_devicefont') == "true") echo "selected=\"selected\""; ?> value="true">true</option>
<option <?php if (get_option('kml_flashembed_devicefont') == "false") echo "selected=\"selected\""; ?> value="false">false</option>
</select>
</div>
<div class="col3">
<label for="seamlesstabbing" class="info" title="<?php _e("Specifies whether users are allowed to use the Tab key to move keyboard focus out of a Flash movie and into the surrounding HTML (or the browser, if there is nothing focusable in the HTML following the Flash movie). The default value is true if this attribute is omitted.",'kimili-flash-embed'); ?>">seamlesstabbing</label>
</div>
<div class="col4">
<select id="seamlesstabbing" name="seamlesstabbing">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_seamlesstabbing') == "true") echo "selected=\"selected\""; ?> value="true">true</option>
<option <?php if (get_option('kml_flashembed_seamlesstabbing') == "false") echo "selected=\"selected\""; ?> value="false">false</option>
</select>
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="swliveconnect" class="info" title="<?php _e("Specifies whether the browser should start Java when loading the Flash Player for the first time. The default value is false if this attribute is omitted. If you use JavaScript and Flash on the same page, Java must be running for the FSCommand to work.",'kimili-flash-embed'); ?>">swliveconnect</label>
</div>
<div class="col4">
<select id="swliveconnect" name="swliveconnect">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_swliveconnect') == "true") echo "selected=\"selected\""; ?> value="true">true</option>
<option <?php if (get_option('kml_flashembed_swliveconnect') == "false") echo "selected=\"selected\""; ?> value="false">false</option>
</select>
</div>
<div class="col3">
<label for="allowfullscreen" class="info" title="<?php _e("Enables full-screen mode. The default value is false if this attribute is omitted. You must have version 9,0,28,0 or greater of Flash Player installed to use full-screen mode.",'kimili-flash-embed'); ?>">allowfullscreen</label>
</div>
<div class="col4">
<select id="allowfullscreen" name="allowfullscreen">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_allowfullscreen') == "true") echo "selected=\"selected\""; ?> value="true">true</option>
<option <?php if (get_option('kml_flashembed_allowfullscreen') == "false") echo "selected=\"selected\""; ?> value="false">false</option>
</select>
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="allowscriptaccess" class="info" title="<?php _e("Controls the ability to perform outbound scripting from within a Flash SWF. The default value is 'always' if this attribute is omitted.",'kimili-flash-embed'); ?>">allowscriptaccess</label>
</div>
<div class="col4">
<select id="allowscriptaccess" name="allowscriptaccess">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_allowscriptaccess') == "always") echo "selected=\"selected\""; ?> value="always">always</option>
<option <?php if (get_option('kml_flashembed_allowscriptaccess') == "sameDomain") echo "selected=\"selected\""; ?> value="sameDomain">sameDomain</option>
<option <?php if (get_option('kml_flashembed_allowscriptaccess') == "never") echo "selected=\"selected\""; ?> value="never">never</option>
</select>
</div>
<div class="col3">
<label for="allownetworking" class="info" title="<?php _e("Controls a SWF file's access to network functionality. The default value is 'all' if this attribute is omitted.",'kimili-flash-embed'); ?>">allownetworking</label>
</div>
<div class="col4">
<select id="allownetworking" name="allownetworking">
<option value=""><?php _e("Choose",'kimili-flash-embed'); ?>...</option>
<option <?php if (get_option('kml_flashembed_allownetworking') == "all") echo "selected=\"selected\""; ?> value="all">all</option>
<option <?php if (get_option('kml_flashembed_allownetworking') == "internal") echo "selected=\"selected\""; ?> value="internal">internal</option>
<option <?php if (get_option('kml_flashembed_allownetworking') == "none") echo "selected=\"selected\""; ?> value="none">none</option>
</select>
</div>
<div class="clear"> </div>
<div class="col1"> </div>
<div class="col3">
<label for="base" class="info" title="<?php _e("Specifies the base directory or URL used to resolve all relative path statements in the Flash Player movie. This attribute is helpful when your Flash Player movies are kept in a different directory from your other files.",'kimili-flash-embed'); ?>">base</label>
</div>
<div class="col5">
<input type="text" id="base" name="base" value="<?php echo get_option('kml_flashembed_base'); ?>" size="15" />
</div>
<div class="clear"> </div>
<div class="col1">
<label class="info" title="<?php _e("Method to pass variables to a Flash movie. You need to separate individual name/variable pairs with a semicolon (i.e. name=John Doe ; count=3).",'kimili-flash-embed'); ?>">fvars:</label>
</div>
<div class="col2">
<textarea name="fvars" id="fvars" rows="4" cols="40"><?php echo stripcslashes(get_option('kml_flashembed_fvars')); ?></textarea>
</div>
</div>
<div class="clear"> </div>
<div class="col1"><a id="toggleAttsParams" href="#"><?php _e("more",'kimili-flash-embed'); ?></a></div>
<div class="clear"> </div>
</div>
</fieldset>
<fieldset>
<legend><?php _e("Alternative Content",'kimili-flash-embed'); ?> [ <a id="toggle3" href="#">-</a> ]</legend>
<div id="toggleable3">
<div class="col2">
<label for="alternativeContent"><?php _e("Alternative content",'kimili-flash-embed'); ?>:</label>
<a id="toggleAlternativeContentHelp" href="#alternativeContentHelp"><?php _e("what is this",'kimili-flash-embed'); ?>?</a>
</div>
<div id="alternativeContentHelp" class="help">
<p>
<?php _e("The object element allows you to nest alternative HTML content inside of it, which will be displayed if Flash is not installed or supported.
This content will also be picked up by search engines, making it a great tool for creating search-engine-friendly content.",'kimili-flash-embed'); ?>
</p>
<p><?php _e("Summarized, you should use alternative content for the following:",'kimili-flash-embed'); ?></p>
<ul>
<li><?php _e("When you like to create content that is accessible for people who browse the Web without plugins",'kimili-flash-embed'); ?></li>
<li><?php _e("When you like to create search-engine-friendly content",'kimili-flash-embed'); ?></li>
<li><?php _e("To tell visitors that they can have a richer user experience by downloading the Flash plugin",'kimili-flash-embed'); ?></li>
</ul>
</div>
<div class="clear"> </div>
<div class="col2">
<textarea id="alternativeContent" name="alternativeContent" rows="6" cols="10"><?php echo stripcslashes(get_option('kml_flashembed_alt_content')); ?></textarea>
</div>
<div class="clear"> </div>
</div>
</fieldset>
<div class="col1">
<input type="button" class="button" id="generate" name="generate" value="<?php _e("Generate",'kimili-flash-embed'); ?>" />
</div>
</div>
<script type="text/javascript" charset="utf-8">
// <![CDATA[
jQuery(document).ready(function(){
try {
Kimili.Flash.Generator.initialize();
Kimili.Flash.Generator.i18n = {
more : "<?php _e("more",'kimili-flash-embed'); ?>",
less : "<?php _e("less",'kimili-flash-embed'); ?>"
};
} catch (e) {
throw "<?php _e("Kimili is not defined. This generator isn't going to put a KFE tag in your code.",'kimili-flash-embed'); ?>";
}
});
// ]]>
</script>
</body>
</html>
|
EthanBlast/Glam-Star-Life
|
wp-content/plugins/kimili-flash-embed/admin/config.php
|
PHP
|
gpl-2.0
| 28,850
|
package main
import (
"fmt"
"log"
"net/http"
"os"
"strconv"
"github.com/akamensky/argparse"
"github.com/skip2/go-qrcode"
)
type Config struct {
Port *int
}
func handle(w http.ResponseWriter, r *http.Request) {
log.Printf("%s %s %s %s", r.RemoteAddr, r.Method, r.URL, r.Proto)
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Content-Type", "text/html")
var err error
level := qrcode.Highest
size := 256
h := r.FormValue("h")
l := r.FormValue("l")
s := r.FormValue("s")
if s != "" {
size, err = strconv.Atoi(s)
if err != nil {
log.Print(err)
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintf(w, "bad request")
return
}
}
switch l {
case "low":
level = qrcode.Low
case "Medium":
level = qrcode.Medium
case "high":
level = qrcode.High
case "highest":
level = qrcode.Highest
default:
level = qrcode.Highest
}
png, err := qrcode.Encode(h, level, size)
if err == nil {
w.Header().Set("Content-Type", "image/png")
log.Printf("encode [%s]", h)
w.Write(png)
} else {
log.Print(err)
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintf(w, "bad request")
}
}
func main() {
parser := argparse.NewParser("QrcodeGen", "Qrcode service")
config := Config{}
config.Port = parser.Int("p", "port", &argparse.Options{Default: 8301, Help: "set port"})
err := parser.Parse(os.Args)
if err != nil {
fmt.Print(parser.Usage(err))
os.Exit(2)
}
http.HandleFunc("/", handle)
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", *config.Port), nil))
os.Exit(0)
}
|
LaoQi/icode
|
qrcodegen/qrcodeGen.go
|
GO
|
gpl-2.0
| 1,540
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using HA4IoT.Contracts.Api;
using HA4IoT.Contracts.Services;
using HA4IoT.Contracts.Services.Backup;
using HA4IoT.Contracts.Services.Resources;
using HA4IoT.Contracts.Services.Settings;
using HA4IoT.Contracts.Services.Storage;
using HA4IoT.Settings;
using Newtonsoft.Json.Linq;
namespace HA4IoT.Services.Resources
{
[ApiServiceClass(typeof(IResourceService))]
public class ResourceService : ServiceBase, IResourceService
{
private const string StorageFilename = "ResourceService.json";
private const string BackupKeyName = "Resources";
private readonly object _syncRoot = new object();
private readonly List<Resource> _resources = new List<Resource>();
private readonly IStorageService _storageService;
private readonly ISettingsService _settingsService;
private ControllerSettings _controllerSettings;
public ResourceService(IBackupService backupService, IStorageService storageService, ISettingsService settingsService)
{
if (backupService == null) throw new ArgumentNullException(nameof(backupService));
if (storageService == null) throw new ArgumentNullException(nameof(storageService));
if (settingsService == null) throw new ArgumentNullException(nameof(settingsService));
_storageService = storageService;
_settingsService = settingsService;
backupService.CreatingBackup += (s, e) => CreateBackup(e);
backupService.RestoringBackup += (s, e) => RestoreBackup(e);
}
public void Initialize()
{
_controllerSettings = _settingsService.GetSettings<ControllerSettings>();
lock (_syncRoot)
{
TryLoadResources();
}
}
public void RegisterText(Enum id, string value)
{
var uri = GenerateUri(id);
lock (_syncRoot)
{
var resource = _resources.FirstOrDefault(r => r.Uri.Equals(uri));
if (resource != null)
{
return;
}
resource = new Resource(uri, value);
_resources.Add(resource);
SaveResources();
}
}
public string GetText(Enum id)
{
var uri = GenerateUri(id);
lock (_syncRoot)
{
var resource = _resources.FirstOrDefault(r => r.Uri.Equals(uri));
if (resource == null)
{
return $"#Resource '{uri}' not found.";
}
var resourceValue = resource.Values.FirstOrDefault(rv => rv.LanguageCode.Equals(_controllerSettings.Language));
if (resourceValue == null)
{
return resource.DefaultValue;
}
return resourceValue.Value;
}
}
public string GetText(Enum id, params object[] formatParameterObjects)
{
if (formatParameterObjects == null) throw new ArgumentNullException(nameof(formatParameterObjects));
var text = GetText(id);
foreach (var formatParameter in formatParameterObjects)
{
foreach (var property in formatParameter.GetType().GetProperties())
{
text = ReplaceFormatParameter(text, property.Name, property.GetValue(formatParameter));
}
}
return text;
}
public string GetText(Enum id, IDictionary<string, object> formatParameters)
{
if (formatParameters == null) throw new ArgumentNullException(nameof(formatParameters));
var text = GetText(id);
foreach (var formatParameter in formatParameters)
{
text = ReplaceFormatParameter(text, formatParameter.Key, formatParameter.Value);
}
return text;
}
[ApiMethod]
public void SetTexts(IApiContext apiContext)
{
lock (_syncRoot)
{
var request = apiContext.Request.ToObject<SetTextsRequest>();
if (request?.Resources == null || !request.Resources.Any())
{
apiContext.ResultCode = ApiResultCode.InvalidBody;
return;
}
foreach (var updatedResource in request.Resources)
{
var existingResource = _resources.FirstOrDefault(r => r.Uri.Equals(updatedResource.Uri));
if (existingResource != null)
{
_resources.Remove(existingResource);
}
_resources.Add(updatedResource);
}
SaveResources();
}
}
[ApiMethod]
public void GetTexts(IApiContext apiContext)
{
lock (_syncRoot)
{
var request = apiContext.Request.ToObject<GetTextsRequest>();
var matchingResources = _resources;
if (!string.IsNullOrEmpty(request.Category))
{
matchingResources = _resources.Where(r => r.Uri.StartsWith(request.Category + ".")).ToList();
}
apiContext.Response["Resources"] = JToken.FromObject(matchingResources);
}
}
private void TryLoadResources()
{
List<Resource> persistedResources;
if (_storageService.TryRead(StorageFilename, out persistedResources))
{
_resources.AddRange(persistedResources);
}
}
private void SaveResources()
{
_storageService.Write(StorageFilename, _resources);
}
private string GenerateUri(Enum id)
{
return $"{id.GetType().Name}.{id}";
}
private string ReplaceFormatParameter(string text, string name, object value)
{
return text.Replace("{" + name + "}", Convert.ToString(value));
}
private void CreateBackup(BackupEventArgs backupEventArgs)
{
lock (_syncRoot)
{
backupEventArgs.Backup[BackupKeyName] = JToken.FromObject(_resources);
}
}
private void RestoreBackup(BackupEventArgs backupEventArgs)
{
if (backupEventArgs.Backup.Property(BackupKeyName) == null)
{
return;
}
var resources = backupEventArgs.Backup[BackupKeyName].Value<List<Resource>>();
lock (_syncRoot)
{
_resources.Clear();
_resources.AddRange(resources);
}
}
}
}
|
byrialsen/HA4IoT
|
SDK/HA4IoT/Services/Resources/ResourceService.cs
|
C#
|
gpl-2.0
| 7,003
|
////////////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2003-2010, Coolsand Technologies, Inc. //
// All Rights Reserved //
// //
// This source code is the property of Coolsand Technologies and is //
// confidential. Any modification, distribution, reproduction or //
// exploitation of any content of this file is totally forbidden, //
// except with the written permission of Coolsand Technologies. //
// //
////////////////////////////////////////////////////////////////////////////////
// //
// $HeadURL: http://subversion-server/svn/developing/modem2G/branches/aint_dev/platform/edrv/fmd/include/fmd_m.h $ //
// $Author: julien $ //
// $Date: 2008-03-05 15:00:45 +0100 (Wed, 05 Mar 2008) $ //
// $Revision: 17366 $ //
// //
////////////////////////////////////////////////////////////////////////////////
//
/// @file fmd.c
/// That file implement the FM driver for RDA5870 chip.
//
////////////////////////////////////////////////////////////////////////////////
#include "cs_types.h"
#include "bal_fstrace.h"
#include "fmd_config.h"
#include "fmd_m.h"
#include "tgt_fmd_cfg.h"
#include "fmdp_debug.h"
#include "pmd_m.h"
#include "hal_i2c.h"
#include "hal_sys.h"
#include "hal_gpio.h"
#include "hal_timers.h"
#include "sxr_tim.h"
#include "sxr_tls.h"
//#include "cmn_defs.h"
#ifdef I2C_BASED_ON_GPIO
#include "gpio_i2c.h"
#endif
// =============================================================================
// MACROS
// =============================================================================
#define BASE_FREQ_USEUROPE 87000
#define BASE_FREQ_JAPAN 76000
#define BASE_FREQ_WORLD 76000
#define BASE_FREQ_EAST_EUROPE 65000
#define CHAN_SPACE g_chanSpacing[g_fmdConfig->channelSpacing]
// MACROS for PRIVATE FUNCTION USE ONLY
#define FMD_I2C_BPS g_fmdConfig->i2cBps
#define HAL_I2C_BUS_ID g_fmdConfig->i2cBusId
// =============================================================================
// TYPES
// =============================================================================
//=============================================================================
// FMD_STATE_T
//-----------------------------------------------------------------------------
/// State of the tune or seek pooling process (using function timers)
//=============================================================================
typedef enum
{
/// Initial state, no operation in process
FMD_STATE_IDLE,
/// Pooling states for tune and seek
FMD_STATE_TUNE_POLL,
FMD_STATE_SEEK_POLL,
/// Once polling is done, we need to stop, is SPI is not avalaible, this is delayed to those states
FMD_STATE_TUNE_STOP,
FMD_STATE_SEEK_STOP,
FMD_STATE_QTY
} FMD_STATE_T;
// =============================================================================
// GLOBAL VARIABLES
// =============================================================================
PRIVATE CONST TGT_FMD_CONFIG_T* g_fmdConfig;
PRIVATE UINT32 g_baseFreq[FMD_BAND_QTY] = {BASE_FREQ_USEUROPE, BASE_FREQ_JAPAN, BASE_FREQ_WORLD, BASE_FREQ_EAST_EUROPE};
PRIVATE UINT32 g_chanSpacing[FMD_CHANNEL_SPACING_QTY] = {100,200,50};
PRIVATE FMD_BAND_T g_band = FMD_BAND_QTY; // using FMD_BAND_QTY as a closed state marker
PRIVATE UINT16 g_fmRegSysCtrl; // BassBoost ForceMono and Mute state
PRIVATE FMD_CALLBACK_T* g_callback = NULL;
PRIVATE FMD_STATE_T g_state = FMD_STATE_IDLE;
PRIVATE HAL_SYS_CLOCK_OUT_ID_T g_fmdClockOutId;
/// when using SPI to avoid conflicts
//PRIVATE BOOL g_spiInUse = FALSE;
//extern void rdafm_iic_write_data(unsigned char regaddr, const unsigned short *data, unsigned char datalen);
//extern void rdafm_iic_read_data(unsigned char regaddr, unsigned short *data, unsigned char datalen);
uint8 g_fm_regs[]={
0xc0,0x01,
0x00,0x00,
0x04,0x00,
0x8a,0xad,
#if 0
0x60,0x00,
0x42,0xc6,
0x00,0x00,
0x00,0x00,
0x44,0x68,
0x5d,0x8f,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0xf0,0x17,
0x47,0x79,
0x2d,0x00,
0x80,0x31,
0x22,0x11,
0xf8,0x38,
0xc3,0xc4,
0x1f,0xce,
0x94,0x12,
0x00,0xa8,
0xc4,0x00,
0xe8,0x7f,
0x34,0x14,
0x81,0x6a,
0x46,0x08,
0x00,0x86,
0x06,0x61,
0x00,0x00,
0x10,0x9e,
0x23,0xc8,
0x04,0x06,
0x06,0x0b,
0xe1,0x05,
0xbb,0x6c,
0x2b,0xec,
0x09,0x0f,
0x34,0x14,
0x14,0x50,
0x09,0x6d,
0x2d,0x96,
0x01,0xda,
0x2a,0x7b,
0x08,0x21,
0x13,0xd5,
0x48,0x91,
0x00,0xbc,
0x08,0xa0,
0x0a,0x12,
0x0b,0x82,
0x25,0xc7,
0x2b,0xe0,
0x3e,0xdd,
0x1e,0x9d,
0x0c,0x95,
0x08,0x8d,
0x04,0x85,
0x00,0x80,
0x00,0x00,
0x58,0x04,
0x58,0x04,
0x38,0x35,
0x2f,0x2b,
0x27,0x22,
0x1b,0x15,
0x0f,0x08,
0x03,0xfd,
0xfd,0xfd,
0x17,0xaf,
0xff,0xff,
0xff,0x00,
0x2e,0x94,
0xc8,0x4e,
0x00,0xfd,
0xd4,0x98,
#endif
};
typedef struct
{
uint8 address;
uint16 value;
}RDA_FM_REG_T;
static RDA_FM_REG_T RDA5820_rx_initialization_reg[] = {
#if 0
{0x05,0x886F},
{0x07,0x7800},
{0x13,0x0008},
{0x15,0x1420},
{0x16,0xC000},
{0x1C,0x3126},
{0x22,0x9C24},
{0x25,0x1B2A},
{0x47,0xF660},
#endif
{0x05,0x884F},
{0x07,0x7800},
{0x13,0x0008},
//{0x15,0x1420},
{0x16,0xC000},
{0x1C,0x3126},
{0x22,0x9C24},
//{0x25,0x1B2A},
{0x47,0xF660},
};
static RDA_FM_REG_T RDA5820_tx_initialization_reg[] = {
#if 0
{0x05,0x886F},
{0x07,0x7800},
{0x13,0x0008},
{0x15,0x1420},
{0x16,0xC000},
{0x1C,0x3126},
{0x22,0x9C24},
{0x25,0x1B2A},
{0x47,0xF660},
#endif
{0x05,0x884F},
{0x07,0x7800},
{0x13,0x0008},
//{0x15,0x1420},
{0x16,0xC000},
{0x1C,0x3126},
{0x22,0x9C24},
//{0x25,0x1B2A},
{0x47,0xF660},
};
//#define HAL_I2C_BUS_ID HAL_I2C_BUS_ID_2
#define FMD_CHIP_ADRESS 0x11//0010001
#define FMD_CHIP_ADRESS_T 0x11
#define I2C_MASTER_ACK (1<<0)
#define I2C_MASTER_RD (1<<4)
#define I2C_MASTER_STO (1<<8)
#define I2C_MASTER_WR (1<<12)
#define I2C_MASTER_STA (1<<16)
void rdafm_iic_write_data(unsigned char regaddr, unsigned char *data, unsigned char datalen)
{
HAL_ERR_T halErr = HAL_ERR_RESOURCE_BUSY;
UINT8 Data_half[2];
UINT8 i=0;
hal_I2cSendRawByte(HAL_I2C_BUS_ID,(FMD_CHIP_ADRESS_T<<1),I2C_MASTER_WR | I2C_MASTER_STA);
hal_I2cSendRawByte(HAL_I2C_BUS_ID,regaddr,I2C_MASTER_WR);
for(i=0;i<datalen-1;i++,data++)//data
{
halErr=hal_I2cSendRawByte(HAL_I2C_BUS_ID,*data,I2C_MASTER_WR);
}
halErr=hal_I2cSendRawByte(HAL_I2C_BUS_ID,*data,I2C_MASTER_WR|I2C_MASTER_STO);
// SXS_TRACE(TSTDOUT, "rdabt_iic_rf_write_data: %d\n.",halErr);
}
void rdafm_iic_read_data(unsigned char regaddr, unsigned char *data, unsigned char datalen)
{
UINT8 Data_half[2];
UINT8 i=0;
hal_I2cSendRawByte(HAL_I2C_BUS_ID,(FMD_CHIP_ADRESS_T<<1),I2C_MASTER_WR | I2C_MASTER_STA);
hal_I2cSendRawByte(HAL_I2C_BUS_ID,regaddr,I2C_MASTER_WR);
hal_I2cSendRawByte(HAL_I2C_BUS_ID,((FMD_CHIP_ADRESS_T<<1)|1),I2C_MASTER_WR | I2C_MASTER_STA);
for(i=0;i<datalen-1;i++,data++)//data
{
(*data)=hal_I2cReadRawByte(HAL_I2C_BUS_ID,I2C_MASTER_RD);
}
(*data)=hal_I2cReadRawByte(HAL_I2C_BUS_ID,I2C_MASTER_RD | I2C_MASTER_ACK | I2C_MASTER_STO);
// SXS_TRACE(TSTDOUT, "rdabt_iic_rf_read_data: %d\n.");
}
PRIVATE FMD_ERR_T fmd_I2cOpen(HAL_I2C_BPS_T bps)
{
#ifdef I2C_BASED_ON_GPIO
gpio_i2c_open();
#else
hal_I2cOpen(HAL_I2C_BUS_ID);
#endif
return FMD_ERR_NO;
}
VOID fmd_I2cClose(VOID)
{
#ifdef I2C_BASED_ON_GPIO
gpio_i2c_close();
#else
hal_I2cClose(HAL_I2C_BUS_ID);
#endif
}
VOID fmd_WriteSingle(UINT32 addr, UINT16 data)
{
#ifdef I2C_BASED_ON_GPIO
gpio_i2c_write_data(FMD_CHIP_ADRESS,(unsigned char * )&addr,1, (unsigned char * )&data, 1);
#else
hal_I2cSendByte(HAL_I2C_BUS_ID,FMD_CHIP_ADRESS,addr,data);
#endif
// sxs_fprintf(TSTDOUT,"fmd_WriteSingle addr=%x,data=%x",addr,data);
}
PRIVATE FMD_ERR_T fmd_Write(UINT32 addr, UINT8* data,UINT8 length)
{
//hal_HstSendEvent(SYS_EVENT,0x123456);
if(length == 2)
{
hal_HstSendEvent(SYS_EVENT,0x58100000 + addr);
hal_HstSendEvent(SYS_EVENT,(data[0]<<8) | data[1]);
HW_i2c_write(addr, data, 0x22);
}
else
{
hal_HstSendEvent(SYS_EVENT,0x58300000 + addr);
hal_i2c_Sequen_write(addr,data,length,0x20);
}
return 0;
fmd_I2cOpen(FMD_I2C_BPS);
#ifdef I2C_BASED_ON_GPIO
gpio_i2c_write_data(FMD_CHIP_ADRESS,(unsigned char * )&addr,1, data, length);
#else
// hal_I2cSendData(HAL_I2C_BUS_ID,FMD_CHIP_ADRESS, addr,data,length);
rdafm_iic_write_data(addr,data, length);
#endif
fmd_I2cClose();
sxs_fprintf(TSTDOUT,"fmd_Write addr=%x,data[0]=%x,data[1]=%x",addr,data[0],data[1]);
return FMD_ERR_NO;
}
PRIVATE FMD_ERR_T fmd_Read(UINT32 addr, UINT8* data,UINT8 length)
{
UINT16 value;
//hal_HstSendEvent(SYS_EVENT,0x987654);
//HW_i2c_Write_Address(0x0a,0x20);
/*
value = HW_i2c_read_2(0x0e,0x22);
data[0] = (value>>8) & 0xff;
data[1] = value & 0xff;
*/
if(length == 2)
{
HW_i2c_read(addr, data, 0x22);
hal_HstSendEvent(SYS_EVENT,0x58000000 + addr);
hal_HstSendEvent(SYS_EVENT,(data[0]<<8) | data[1]);
}
else
{
hal_HstSendEvent(SYS_EVENT,0x58200000 + addr);
hal_i2c_Sequen_read(data,length,0x20);
}
return 0;
fmd_I2cOpen(FMD_I2C_BPS);
#ifdef I2C_BASED_ON_GPIO
gpio_i2c_read_data(FMD_CHIP_ADRESS,(UINT8* )&addr,1, data, length);
#else
// hal_I2cGetData(HAL_I2C_BUS_ID,FMD_CHIP_ADRESS,addr,data,length);
// sxr_Sleep(25 MILLI_SECONDS);
rdafm_iic_read_data(addr, data, length);
#endif
// sxr_Sleep(25 MILLI_SECONDS);
fmd_I2cClose();
sxs_fprintf(TSTDOUT,"fmd_Read addr=%x,data[0]=%x,data[1]=%x",addr,data[0],data[1]);
return FMD_ERR_NO;
}
//=============================================================================
// fmd_Scheduler
//-----------------------------------------------------------------------------
/// Process tune and seek operations
/// @param data used to send register read value to next time processing
/// in case SPI is not available.
//=============================================================================
VOID fmd_Scheduler(UINT32 data)
{
FMD_ERR_T errStatus = FMD_ERR_NO;
UINT8 readReg[2] = {0};
FMD_ASSERT(g_state < FMD_STATE_QTY, "FMD state unknown: %d", g_state);
// the POLLING step
if ((g_state == FMD_STATE_TUNE_POLL) || (g_state == FMD_STATE_SEEK_POLL))
{
//errStatus = fmd_Read(0x0a, &rdReg);
fmd_Read(0x0a,readReg,2);
SXS_TRACE(TSTDOUT,"chan(fmd_Scheduler) = %x,reg1=%x",readReg[0],readReg[1]);
if (errStatus == FMD_ERR_NO)
{
// no error, check STC bit
if (readReg[0] & 0x40)
{
// done: next step:
SXS_TRACE(TSTDOUT,"chan(readReg0)#########");
if (g_state == FMD_STATE_TUNE_POLL)
{
g_state = FMD_STATE_TUNE_STOP;
}
else if (g_state == FMD_STATE_SEEK_POLL)
{
g_state = FMD_STATE_SEEK_STOP;
}
}
}
}
g_state = FMD_STATE_IDLE;
}
PUBLIC FMD_ERR_T fmd_Open(FMD_BAND_T band,
FMD_CALLBACK_T* callback,
FMD_INIT_T* initValues)
{
CONST TGT_FMD_CONFIG_T* fmdTgtCfg = tgt_GetFmdConfig();
FMD_ERR_T errStatus;
UINT8 dacVol;
UINT16 chan;
UINT8 readReg[8] = {0};
UINT8 writeReg[8] = {0};
UINT8 TestReg[2] = {0};
int i;
UINT8 CHIPID;
// Check if already opened
// -----------------------
if (g_band != FMD_BAND_QTY)
{
return FMD_ERR_ALREADY_OPENED;
}
// Check the parameters and store them
// -----------------------------------
switch (band)
{
case FMD_BAND_US_EUROPE:
case FMD_BAND_JAPAN:
case FMD_BAND_WORLD:
case FMD_BAND_EAST_EUROPE:
g_band = band;
break;
default:
// this chip has limited band support...
return FMD_ERR_BAD_PARAMETER;
}
if (fmdTgtCfg == NULL)
{
g_band = FMD_BAND_QTY; // close marker
return FMD_ERR_BAD_PARAMETER;
}
g_fmdConfig = fmdTgtCfg;
g_callback = callback;
// default : mute , stereo, no bass boost
g_fmRegSysCtrl = 0;
dacVol = 0;
chan = 0;
// set the required initial state
// ------------------------------
if (initValues != NULL)
{
// set given parameters
dacVol = g_fmdConfig->volumeVal[initValues->volume];
// compute the mute bit
if (initValues->volume == FMD_ANA_MUTE)
{
g_fmRegSysCtrl &= ~0x4000;
}
else
{
g_fmRegSysCtrl |= 0x4000;
}
if (initValues->bassBoost == TRUE)
{
g_fmRegSysCtrl |= 0x1000;
}
else
{
g_fmRegSysCtrl &= ~0x1000;
}
if (initValues->forceMono == TRUE)
{
g_fmRegSysCtrl |= 0x2000;
}
else
{
g_fmRegSysCtrl &= ~0x2000;
}
chan = (initValues->freqKHz - g_baseFreq[g_band])/CHAN_SPACE;
}
// enable the clock
// g_fmdClockOutId = hal_SysClkOutOpen(HAL_SYS_CLOCK_OUT_FREQ_32K);
// if (HAL_SYS_CLOCK_OUT_RESOURCE_UNAVAILABLE == g_fmdClockOutId)
{
// return FMD_ERR_RESOURCE_BUSY;
}
// enable the POWER
// pmd_EnablePower(PMD_POWER_FM, TRUE);
sxr_Sleep(25 MILLI_SECONDS);
sxr_Sleep(25 MILLI_SECONDS);
// Wait for at least powerOnTime
sxr_Sleep(g_fmdConfig->powerOnTime);
#if 1
writeReg[0] = 0xc0;
writeReg[1] = 0x01;
errStatus = fmd_Write(0x02, writeReg,2);
// Soft Reset
writeReg[0] = 0;
writeReg[1] = 0x02;
errStatus = fmd_Write(0x02, writeReg,2);
writeReg[0] = 0xc0;
writeReg[1] = 0x01;
errStatus = fmd_Write(0x02, writeReg,2);
#endif
// Wait about 5ms
sxr_Sleep(5 MILLI_SECONDS);
for(i =0;i<sizeof(RDA5820_rx_initialization_reg)/sizeof(RDA5820_rx_initialization_reg[0]); i++)
{
writeReg[0] = (RDA5820_rx_initialization_reg[i].value >> 8) & 0xff;
writeReg[1] = RDA5820_rx_initialization_reg[i].value & 0xff;
errStatus = fmd_Write(RDA5820_rx_initialization_reg[i].address, writeReg,2);
//error_ind=RDAFM_write_data(RDA5820_rx_initialization_reg[i].address,&(RDA5820_rx_initialization_reg[i].value),1);
}
fmd_Read(0x40,(UINT8*)readReg,2);
readReg[1] &= (~0x0f);
readReg[1] |= initValues->Tx1Rx0;
fmd_Write(0x40,(UINT8*)readReg,2);
fmd_Read(0x0c,(UINT8*)readReg,2);
//readReg = ((readReg & 0x3ff) * CHAN_SPACE) + g_baseFreq[g_band];
SXS_TRACE(TSTDOUT,"read the register is 0x0A=%x,0x0B=%x,0x0C=%x,0x0D=%x",readReg[0],readReg[1],readReg[2],readReg[3]);
// fmd_Read(0x0e,(UINT8*)TestReg,2);
//hal_HstSendEvent(SYS_EVENT,0xFF00001F);
//hal_HstSendEvent(SYS_EVENT,TestReg[0]);
//hal_HstSendEvent(SYS_EVENT,TestReg[1]);
//hal_HstSendEvent(SYS_EVENT,0xF100002F);
// Register configuration
// System control
#if 1
g_fm_regs[0] = 0x84;//(UINT8)(0x80 | ((g_fmRegSysCtrl&0xFF00)>>8));//0x02
g_fm_regs[1] = 0x01;//(UINT8)(0x01 | (`&0x00FF));
g_fm_regs[2] = 0x0;//0x1e;//(UINT8)(((chan & 0x03ff)>>2) & 0xFF);//0x03
g_fm_regs[3] = 0x0;//0x10;//(UINT8)((((chan & 0x03ff) << 6)&0x00C0) | 0x10 | ((g_band & 3) << 2) | (g_fmdConfig->channelSpacing & 3));
g_fm_regs[4] = 0x04;
g_fm_regs[5] = 0;
g_fm_regs[6] = 0x8a;//(UINT8)(0x80 |(g_fmdConfig->seekRSSIThreshold & 0x7f));//0x05
g_fm_regs[7] = 0xad;//(0xa0 | (dacVol & 0x0f));
#endif
SXS_TRACE(TSTDOUT,"NEW reg0=%x,reg1=%x,reg2=%x,reg3=%x,reg6=%x,reg7=%x,",g_fm_regs[0],g_fm_regs[1],g_fm_regs[2],g_fm_regs[3],g_fm_regs[6],g_fm_regs[7]);
// errStatus = fmd_Write(0x02, g_fm_regs,sizeof(g_fm_regs)/sizeof(g_fm_regs[0]));
//must delay for tune
sxr_Sleep(100 MILLI_SECONDS);
return FMD_ERR_NO;
}
// =============================================================================
// fmd_Tune
// -----------------------------------------------------------------------------
/// This function tunes the FM channel to the desired frequency.
/// Once the tune operation has locked the channel, the callback registered
/// at #fmd_Open will be called.
/// @param freqKHz FM frequency
/// @return \c FMD_ERR_NO, or \c FMD_ERR_RESOURCE_BUSY
// =============================================================================
PUBLIC FMD_ERR_T fmd_Tune(UINT32 freqKHz)
{
FMD_ERR_T errStatus;
UINT8 readReg[2] = {0};
UINT8 writeReg[2] = {0};
UINT16 chan;
chan = (freqKHz - g_baseFreq[g_band])/CHAN_SPACE;
g_fm_regs[2] = (UINT8)(((chan & 0x03ff)>>2) & 0xFF);//0x03
//open I2S ,must use |0x30 ;if colse I2s ,use |0x10
g_fm_regs[3] = (UINT8)((((chan & 0x03) << 6)&0x00C0) | 0x10 | (g_fm_regs[3]&0x0f));
errStatus = fmd_Write(0x03, g_fm_regs+2, 2);
sxr_Sleep(50 MILLI_SECONDS);
return errStatus;
}
// =============================================================================
// fmd_Close
// -----------------------------------------------------------------------------
/// This function closes the FM driver and desactivate the FM chip
/// and stops any pending #fmd_Tune or #fmd_Seek operation.
/// @return \c FMD_ERR_NO, or \c FMD_ERR_RESOURCE_BUSY
// =============================================================================
PUBLIC FMD_ERR_T fmd_Close(VOID)
{
FMD_ERR_T errStatus;
UINT8 writeReg[2] = {0};
// check oppened
if (g_band == FMD_BAND_QTY)
{
//FMD_ASSERT(g_spiInUse, "closing FMD while not open");
return FMD_ERR_ALREADY_OPENED; // ALREADY_CLOSED here !!
}
// cancel pending actions
if (g_state != FMD_STATE_IDLE)
{
g_state = FMD_STATE_IDLE;
//sxr_StopFunctionTimer((void (*)(void *))fmd_Scheduler);
}
// put radio in sleep mode (+mute and high Z ?)
errStatus = fmd_Write(0x02, writeReg,2); // 0xc000
if (errStatus != FMD_ERR_NO)
{
return errStatus;
}
// close
// cut the power, cut the clock
//pmd_EnablePower(PMD_POWER_FM, FALSE);
//hal_SysClkOutClose(g_fmdClockOutId);
g_band = FMD_BAND_QTY; // close marker
return FMD_ERR_NO;
}
// =============================================================================
// fmd_Seek
// -----------------------------------------------------------------------------
/// This function seeks to the next FM channel.
/// Once the seek operation has found a channel, the callback registered
/// at #fmd_Open will be called.
/// @param seekUp \c TRUE : increasing frequency, \c FALSE: decreasing frequency
/// @return \c FMD_ERR_NO, or \c FMD_ERR_RESOURCE_BUSY
// =============================================================================
PUBLIC FMD_ERR_T fmd_Seek(BOOL seekUp)
{
FMD_ERR_T errStatus;
UINT8 writeReg[2] = {0};
if (g_state != FMD_STATE_IDLE)
{
return FMD_ERR_RESOURCE_BUSY;
}
if (seekUp)
{
// Seek up
writeReg[0] = (UINT8)(0x83 | ((g_fmRegSysCtrl&0xFF00)>>8));//0x02
writeReg[1] = (UINT8)(0x01 | (g_fmRegSysCtrl&0x00FF));
}
else
{
// Seek down
writeReg[0] = (UINT8)(0x81 | ((g_fmRegSysCtrl&0xFF00)>>8));//0x02
writeReg[1] = (UINT8)(0x01 | (g_fmRegSysCtrl&0x00FF));
}
errStatus = fmd_Write(0x02, writeReg,2);
if (errStatus != FMD_ERR_NO)
{
return errStatus;
}
// schedule read & callback
g_state = FMD_STATE_TUNE_POLL;
sxr_StartFunctionTimer(100 MILLI_SECONDS, fmd_Scheduler, 0, 0);
return FMD_ERR_NO;
}
// =============================================================================
// fmd_SetVolume
// -----------------------------------------------------------------------------
/// This function sets the volume and other audio related paramters.
/// @param volume analog volume
/// @param bassBoost enable/disable bass boost
/// @param forceMono enable/disable mono output of stereo radios
/// @return \c FMD_ERR_NO or \c FMD_ERR_RESOURCE_BUSY
// =============================================================================
PUBLIC FMD_ERR_T fmd_SetVolume(FMD_ANA_LEVEL_T volume,
BOOL bassBoost,
BOOL forceMono)
{
FMD_ERR_T errStatus=0;
UINT8 writeReg[2] = {0};
UINT8 dacVol;
if(volume >= FMD_ANA_VOL_QTY)
volume=FMD_ANA_VOL_15;
FMD_ASSERT(volume < FMD_ANA_VOL_QTY, "FMD volume out of range (%d)", volume);
// compute the mute bit
if (volume == FMD_ANA_MUTE)
{
g_fmRegSysCtrl &= ~0x4000;
}
else
{
g_fmRegSysCtrl |= 0x4000;
}
if (bassBoost == TRUE)
{
g_fmRegSysCtrl |= 0x1000;
}
else
{
g_fmRegSysCtrl &= ~0x1000;
}
if (forceMono == TRUE)
{
g_fmRegSysCtrl |= 0x2000;
}
else
{
g_fmRegSysCtrl &= ~0x2000;
}
g_fm_regs[0] = (UINT8)(0x80 | ((g_fmRegSysCtrl&0xFF00)>>8));//0x02
g_fm_regs[1] = (UINT8)(0x01 | (g_fmRegSysCtrl&0x00FF));
errStatus = fmd_Write(0x02, g_fm_regs,2);
// sxr_Sleep(50 MILLI_SECONDS);
// get volume value from config
//dacVol = g_fmdConfig->volumeVal[volume];
// g_fm_regs[0] = (UINT8)(0x80 | ((g_fmRegSysCtrl&0xFF00)>>8));//0x02
// g_fm_regs[1] = 0x01;//(UINT8)(0x01 | (`&0x00FF));
// g_fm_regs[2] = 0x29;//0x1e;//(UINT8)(((chan & 0x03ff)>>2) & 0xFF);//0x03
// g_fm_regs[3] &= ~0x10; // 0xc0;//0x10;//(UINT8)((((chan & 0x03ff) << 6)&0x00C0) | 0x10 | ((g_band & 3) << 2) | (g_fmdConfig->channelSpacing & 3));
// g_fm_regs[4] = 0x04;
// g_fm_regs[5] = 0;
// g_fm_regs[6] = (g_fmdConfig->seekRSSIThreshold & 0x7f);//0x05
g_fm_regs[7] = (0xa0 | (volume));
errStatus = fmd_Write(0x05, g_fm_regs+6 ,2);
// sxr_Sleep(50 MILLI_SECONDS);
return errStatus;
}
PUBLIC FMD_ERR_T fmd_TxPaGain(uint8 pagain)
{
FMD_ERR_T errStatus=0;
UINT8 writeReg[2] = {0};
fmd_Read(0x42,(UINT8*)writeReg,2);
writeReg[1] &= (~0x3f);
writeReg[1] |= pagain;
fmd_Write(0x42,(UINT8*)writeReg,2);
return errStatus;
}
PUBLIC FMD_ERR_T fmd_TxSigGain(uint8 siggain)
{
FMD_ERR_T errStatus=0;
UINT8 writeReg[2] = {0};
fmd_Read(0x42,(UINT8*)writeReg,2);
writeReg[0] &= (~0x07);
writeReg[0] |= siggain;
fmd_Write(0x42,(UINT8*)writeReg,2);
return errStatus;
}
// =============================================================================
// fmd_GetFreq
// -----------------------------------------------------------------------------
/// @param pFreqKHz pointer to a UINT32 receiving the channel frequency
/// @return \c FMD_ERR_NO, \c FMD_ERR_RESOURCE_BUSY or
/// \c FMD_ERR_BAD_PARAMETER if \p pFreqKHz is \c NULL
// =============================================================================
PUBLIC FMD_ERR_T fmd_GetFreq(UINT32 *pFreqKHz)
{
UINT8 readReg[10] = {0};
FMD_ERR_T errStatus;
if (pFreqKHz == NULL)
{
return FMD_ERR_BAD_PARAMETER;
}
sxr_Sleep(100 MILLI_SECONDS);
errStatus = fmd_Read(0x0a, readReg,2);
SXS_TRACE(TSTDOUT,"reg0=%x,reg1=%x",readReg[0],readReg[1]);
if (errStatus == FMD_ERR_NO)
{
*pFreqKHz = (((readReg[0]<<8) |readReg[1]) & 0x03ff) * CHAN_SPACE + g_baseFreq[g_band];
}
return errStatus;
}
// =============================================================================
// fmd_GetStereoStatus
// -----------------------------------------------------------------------------
/// @param pStereoStatus pointer to a BOOL receiving the stereo status:
/// \c TRUE the channel is received in stereo,
/// \c FALSE the channel is recieved in mono.
/// @return \c FMD_ERR_NO, \c FMD_ERR_RESOURCE_BUSY or
/// \c FMD_ERR_BAD_PARAMETER if \p pStereoStatus is \c NULL
// =============================================================================
PUBLIC FMD_ERR_T fmd_GetStereoStatus(BOOL *pStereoStatus)
{
UINT8 readReg[2] = {0};
FMD_ERR_T errStatus;
if (pStereoStatus == NULL)
{
return FMD_ERR_BAD_PARAMETER;
}
errStatus = fmd_Read(0x0a, readReg,2);
SXS_TRACE(TSTDOUT,"reg0=%x,reg1=%x",readReg[0],readReg[1]);
if (errStatus == FMD_ERR_NO)
{
if ((readReg[0] & 0x04) == 0)
{
*pStereoStatus = FALSE;
}
else
{
*pStereoStatus = TRUE;
}
}
return errStatus;
}
// =============================================================================
// fmd_GetRssi
// -----------------------------------------------------------------------------
/// @param pRSSI pointer to a UINT32 receiving a measure of the channel quality, should not be used as the meaning of this is dependant on the actual FM chip.
/// @return \c FMD_ERR_NO, \c FMD_ERR_RESOURCE_BUSY or
/// \c FMD_ERR_BAD_PARAMETER if \p pRSSI is \c NULL
// =============================================================================
DEPRECATED PUBLIC FMD_ERR_T fmd_GetRssi(BYTE* pRSSI)
{
UINT8 readReg[4] = {0};
UINT32 freq = 0;
FMD_ERR_T errStatus;
if (pRSSI == NULL)
{
return FMD_ERR_BAD_PARAMETER;
}
*pRSSI = 0;
errStatus = fmd_Read(0x0a, readReg,2);
SXS_TRACE(TSTDOUT,"reg0=%x,reg1=%x",readReg[0],readReg[1]);
while (((readReg[3] & 0x80) == 0 ) && (freq <20))
{
sxr_Sleep(5 MILLI_SECONDS);
errStatus = fmd_Read(0x0b, readReg+2,2);
SXS_TRACE(TSTDOUT,"wait ready reg0=%x,reg1=%x",readReg[0],readReg[1]);
freq++;
}
if(freq <20)
{
if ((readReg[2] & 0x01) == 0 )
{
*pRSSI = 0;
}
else
{
*pRSSI = ((readReg[2] & 0xfe) >> 1);
}
}
else
*pRSSI = 0;
return errStatus;
}
PUBLIC BOOL fmd_ValidStop(UINT32 freqKHz)
{
FMD_ERR_T errStatus;
UINT8 readReg[4] = {0};
UINT8 writeReg[2] = {0};
UINT16 chan;
UINT8 i = 0;
SXS_TRACE(TSTDOUT,"fmd_ValidStop freqKHz= %d",freqKHz);
chan = (freqKHz - g_baseFreq[g_band])/CHAN_SPACE;
g_fm_regs[2] = (UINT8)(((chan & 0x03ff)>>2) & 0xFF);//0x03
//open I2S ,must use |0x30 ;if colse I2s ,use |0x10
g_fm_regs[3] = (UINT8)((((chan & 0x03) << 6)&0x00C0) | 0x10 | (g_fm_regs[3]&0x0f));
errStatus = fmd_Write(0x03, g_fm_regs+2, 2);
sxr_Sleep(50 MILLI_SECONDS);
//waiting for FmReady
do
{
i++;
if(i>10) return 0;
sxr_Sleep(10 MILLI_SECONDS);
//read REG0A&0B
errStatus = fmd_Read(0x0b, readReg+2,2);
}while((readReg[3]&0x80)==0);
if ((readReg[2] &0x01)==0) return 0;
return 1;
}
// =============================================================================
// fmd_GetRssiThreshold
// -----------------------------------------------------------------------------
/// @return a Threshold used to compare with RSSI measure of the channel quality, only useful with fmd_GetRssi.
// =============================================================================
DEPRECATED PUBLIC UINT32 fmd_GetRssiThreshold(VOID)
{
return g_fmdConfig->seekRSSIThreshold;
}
// =============================================================================
// fmd_I2sOpen
// -----------------------------------------------------------------------------
/// This function open the I2S interface
/// @param fmdI2sCfg I2S configuration
/// @return \c FMD_ERR_NO, or \c FMD_ERR_RESOURCE_BUSY
// =============================================================================
PUBLIC FMD_ERR_T fmd_I2sOpen(FMD_I2S_CFG_T fmdI2sCfg)
{
UINT8 readReg[2] = {0};
UINT8 writeReg[2] = {0};
FMD_ERR_T errStatus;
hal_HstSendEvent(SYS_EVENT,0x58000011);
//hwp_aif->serial_ctrl = (hwp_aif->serial_ctrl&0xfffffff3)|0x04;
//RDA_WRITE_REG(0xa1a40008,(RDA_READ_REG(0xa1a40008)&0xfffffff3)|0x04);
//RDA_WRITE_REG(0xa1a40008,(RDA_READ_REG(0xa1a40008)|0x80)); // for fm out
writeReg[0] = 0x1a;//0x12;
writeReg[1] = 0x00;
//writeReg[1] =((fmdI2sCfg.freq & 0xF)<<4);
errStatus = fmd_Write(0x06, writeReg,2); //i2s slave, 48k
writeReg[0] = 0x06;
writeReg[1] = 0x40; //enable i2s
errStatus = fmd_Write(0x04, writeReg,2);
sxr_Sleep(50 MILLI_SECONDS);
#if 1
// close ear
errStatus = fmd_Read(0x03, readReg,2);
// SXS_TRACE(TSTDOUT,"fmd_Read=%x,fmd_Read=%x",readReg[0],readReg[1]);
writeReg[0] = readReg[0];
writeReg[1] = readReg[1]|(1<<5);
errStatus = fmd_Write(0x03, writeReg,2);
sxr_Sleep(50 MILLI_SECONDS);
errStatus = fmd_Read(0x09, readReg,2);
// SXS_TRACE(TSTDOUT,"fmd_Read=%x,fmd_Read=%x",readReg[0],readReg[1]);
writeReg[0] = readReg[0];
writeReg[1] = readReg[1]|(1<<0);
errStatus = fmd_Write(0x09, writeReg,2);
#endif
return errStatus;
}
// =============================================================================
// fmd_I2sClose
// -----------------------------------------------------------------------------
/// This function close the I2S interface
/// @return \c FMD_ERR_NO, or \c FMD_ERR_RESOURCE_BUSY
// =============================================================================
PUBLIC FMD_ERR_T fmd_I2sClose()
{
UINT8 readReg[2] = {0};
UINT8 writeReg[2] = {0};
FMD_ERR_T errStatus;
//hwp_aif->serial_ctrl = hwp_aif->serial_ctrl&0xfffffff3;
//RDA_WRITE_REG(0xa1a40008,(RDA_READ_REG(0xa1a40008)&0xfffffff3));
#if 1
errStatus = fmd_Read(0x09, readReg,2);
writeReg[0] = readReg[0];
writeReg[1] = readReg[1]&0xfe;
errStatus = fmd_Write(0x09, writeReg,2);
//enable earphone
sxr_Sleep(50 MILLI_SECONDS);
errStatus = fmd_Read(0x03, readReg,2);
writeReg[0] = readReg[0];
writeReg[1] = readReg[1]&0xDF;
errStatus = fmd_Write(0x03, writeReg,2);
#endif
//disable i2s
writeReg[0] = 0x00;
writeReg[1] = 0x00;
errStatus = fmd_Write(0x04, writeReg,2);
sxr_Sleep(50 MILLI_SECONDS);
return errStatus;
}
// =============================================================================
// fmd_PreInit
// -----------------------------------------------------------------------------
/// This function initial fm in handset power on.
// =============================================================================
PROTECTED VOID fmd_PreInit(VOID)
{
UINT8 writeReg[2] = {0};
// enable the clock
g_fmdClockOutId = hal_SysClkOutOpen(HAL_SYS_CLOCK_OUT_FREQ_32K);
g_fmdConfig = tgt_GetFmdConfig();
// enable the POWER
pmd_EnablePower(PMD_POWER_FM, TRUE);
// Wait for at least powerOnTime
hal_TimDelay(30 MS_WAITING);
// Soft Reset
writeReg[0] = 0;
writeReg[1] = 0x02;
fmd_Write(0x02, writeReg,2);
// Wait about 5ms
hal_TimDelay(5 MS_WAITING);
// put radio in sleep mode
writeReg[0] = 0x00;
writeReg[1] = 0x00;
fmd_Write(0x02, writeReg,2);
// cut the power, cut the clock
pmd_EnablePower(PMD_POWER_FM, FALSE);
hal_SysClkOutClose(g_fmdClockOutId);
}
|
BarryChen/RDA
|
RDA585X_V2.1_SVN32/platform/edrv/fmd/rda5820/src/fmd.c
|
C
|
gpl-2.0
| 31,554
|
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="./assets/ico/favicon.ico">
<title>$IhmName$</title>
<!-- Bootstrap core CSS -->
<link href="./css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="./css/main.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Css added -->
|
saez0pub/simpleIHM
|
var/templates/header_1.html
|
HTML
|
gpl-2.0
| 891
|
(function($){
$(function(){
boxHeight(0.4,0.7);
var imgSrc1 = $('.view-banner .views-field-field-image-banner img').attr('src');
var current2 = $('.view-banner .views-field-field-image-banner');
$('.view-banner .views-field-field-image-banner img').remove();
$(current2).append('<div class="backbg"></div>');
$('.view-banner .views-field-field-image-banner .backbg').css('background-image', 'url(' + imgSrc1 + ')');
var imgSrc1 = $('#header-image img').attr('src');
var current2 = $('#header-image');
$('#header-image img').remove();
$(current2).append('<div class="backbg"></div>');
$('#header-image .backbg').css('background-image', 'url(' + imgSrc1 + ')');
function boxHeight(w,h)
{
var height=$(window).height();
var width=$(window).width();
$('#block-views-team-bio-block').css({'height':h*height});
$('#block-views-team-bio-block').css({'width':w*width});
}
if($(window).width()<950)
{
boxHeight(0.7,0.6);
}
if($(window).width()<767)
{
boxHeight(0.8,0.7);
}
$(window).resize(function(){
boxHeight(0.4,0.7);
if($(window).width()<950)
{
boxHeight(0.7,0.6);
}
if($(window).width()<767)
{
boxHeight(0.8,0.7);
}
});
});
})(jQuery);
|
CCI-Studios/RE-Dale
|
sites/all/themes/redale/js/background-size.js
|
JavaScript
|
gpl-2.0
| 1,248
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /home/test1/tmp/qtopia/qt//qtopia-core-opensource-src-4.3.6/src/corelib/kernel/qtimer.cpp -->
<head>
<title>Qt 4.3: Qt 3 Support Members for QTimer</title>
<link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 class="title">Qt 3 Support Members for QTimer</h1>
<p><b>The following class members are part of the <a href="qt3support.html">Qt 3 support layer</a>.</b> They are provided to help you port old code to Qt 4. We advise against using them in new code.</p>
<p><ul><li><a href="qtimer.html">QTimer class reference</a></li></ul></p>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qtimer-qt3.html#QTimer-2">QTimer</a></b> ( QObject * <i>parent</i>, const char * <i>name</i> )</li>
</ul>
<ul>
<li><div class="fn"/>8 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<h3>Public Slots</h3>
<ul>
<li><div class="fn"/>void <b><a href="qtimer-qt3.html#changeInterval">changeInterval</a></b> ( int <i>msec</i> )</li>
<li><div class="fn"/>int <b><a href="qtimer-qt3.html#start-3">start</a></b> ( int <i>msec</i>, bool <i>sshot</i> )</li>
</ul>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QTimer-2"></a>QTimer::QTimer ( <a href="qobject.html">QObject</a> * <i>parent</i>, const char * <i>name</i> )</h3>
<p>Constructs a timer called <i>name</i>, with a <i>parent</i>.</p>
<h3 class="fn"><a name="changeInterval"></a>void QTimer::changeInterval ( int <i>msec</i> ) <tt> [slot]</tt></h3>
<p>Use setInterval(msec) or start(msec) instead.</p>
<h3 class="fn"><a name="start-3"></a>int QTimer::start ( int <i>msec</i>, bool <i>sshot</i> ) <tt> [slot]</tt></h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Call setSingleShot(<i>sshot</i>) and start(<i>msec</i>) instead.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright © 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.6</div></td>
</tr></table></div></address></body>
</html>
|
muromec/qtopia-ezx
|
qtopiacore/qt/doc/html/qtimer-qt3.html
|
HTML
|
gpl-2.0
| 3,416
|
<?php
/**
* -------------------------------------------------------------------------
* Fields plugin for GLPI
* -------------------------------------------------------------------------
*
* LICENSE
*
* This file is part of Fields.
*
* Fields 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.
*
* Fields 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 Fields. If not, see <http://www.gnu.org/licenses/>.
* -------------------------------------------------------------------------
* @copyright Copyright (C) 2013-2022 by Fields plugin team.
* @license GPLv2 https://www.gnu.org/licenses/gpl-2.0.html
* @link https://github.com/pluginsGLPI/fields
* -------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
if (preg_match('/[a-z]/i', $_REQUEST['ddtype']) !== 1) {
throw new \RuntimeException(sprintf('Invalid itemtype "%"', $_REQUEST['ddtype']));
}
$path = PLUGINFIELDS_FRONT_PATH . '/' . $_REQUEST['ddtype'] . '.form.php';
require_once $path;
|
pluginsGLPI/fields
|
front/commondropdown.form.php
|
PHP
|
gpl-2.0
| 1,481
|
/**
* \file PropertyTreeTest.hpp
* \brief PropertyTree unit test header file
*
*/
/*
* This file is part of OndALear collection of open source components.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Copyright (C) 2008 Amnon Janiv <amnon.janiv@ondalear.com>
*
* Initial version: 2011-11-11
* Author: Amnon Janiv <amnon.janiv@ondalear.com>
*/
/*
* $Id: $
*/
#ifndef ONDALEAR_TEST_PropertyTreeTest_HPP
#define ONDALEAR_TEST_PropertyTreeTest_HPP
#include "core/CoreIncludes.hpp"
#include "test/Unittest.hpp"
#include "container/PropertyTree.hpp"
namespace ondalear {
namespace test {
namespace container {
/**
* \class PropertyTreeTest
* \brief PropertyTree class features test
*
*/
class CORE_API PropertyTreeTest
: public Unittest {
public:
PropertyTreeTest();
void test_lifecycle();
void test_value_string();
void test_operator_general();
void test_value_template_integer();
void test_value_template_bool();
void test_value_template_string();
void test_util();
void test_value_tree();
void test_iteration();
protected:
PropertyTree buildPropertyTree();
};
} //namespace container
} //namespace test
} //namespace ondalear
DECLARE_USING_TYPE(ondalear::test::container,PropertyTreeTest);
#endif //ONDALEAR_TEST_PropertyTreeTest_HPP
|
ajaniv/softwarebook
|
c++/Container/ContainerTest/PropertyTreeTest.hpp
|
C++
|
gpl-2.0
| 1,435
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Configuration;
using Domain;
using Core;
using Extensions;
namespace Extensions {
public static class CollectionExtensions {
/// <summary>
/// Merge elements in the ordered sequence <code>collection</code> based on <code>groupSelector</code>. Return results for each group using <code>resultSelector</code>.
/// </summary>
/// <param name="collection"></param>
/// <param name="groupSelector"></param>
/// <param name="resultSelector"></param>
/// <returns></returns>
public static IEnumerable<TResult> GroupMerge<T,TResult>(this IEnumerable<T> collection,Func<T,T,int> orderingFunction,Func<IEnumerable<T>,T,bool> groupSelector,Func<IEnumerable<T>,TResult> resultSelector) {
// Create groups by the group selector
var groups=new List<List<T>>();
foreach(T item in collection.OrderBy(item => item,orderingFunction)) {
var groupForItem=groups.FirstOrDefault(group => groupSelector.Invoke(group,item));
if(groupForItem!=null) {
groupForItem.Add(item);
} else {
var newGroup=new List<T>();
newGroup.Add(item);
groups.Add(newGroup);
}
}
// And project the results for each group using the resultSelector
return groups.Select(group => resultSelector.Invoke(group));
}
public static IEnumerable<T> OrderBy<T>(this IEnumerable<T> objects, Func<T,T,int> orderingFunction) {
return objects.OrderBy(t => t, new LambdaComparer<T> (orderingFunction));
}
public static IEnumerable<T> OrderBy<T,TKey>(this IEnumerable<T> objects, Func<T,TKey> keySelector, Func<TKey,TKey,int> orderingFunction) {
return objects.OrderBy(keySelector, new LambdaComparer<TKey> (orderingFunction));
}
public static IEnumerable<T> FetchAllRelated<T>(this IEnumerable<T> objects) where T:class,new() {
return Prefetcher<T>.FetchAllRelated(objects);
}
public static IEnumerable<T> FetchRelated<T>(this IEnumerable<T> objects,params Expression<Func<T,object>>[] propertySelectors) where T:class,new() {
return Prefetcher<T>.FetchRelated(objects,propertySelectors);
}
public static bool IsSubSetOf<T>(this IEnumerable<T> objects, IEnumerable<T> otherObjects) {
return !objects.Except (otherObjects).Any ();
}
public static string ToIdString<T>(this IEnumerable<T> objects) where T: HasId {
return objects.Select(c => c.id).ToIdString();
}
public static string ToIdString(this IEnumerable<int> objects) {
return objects.Aggregate("",(str,obj) => string.IsNullOrEmpty(str)?obj.ToString():string.Format("{0},{1}",str,obj));
}
}
}
|
olale/GenericDAO
|
GenericDAO/Extensions/CollectionExtensions.cs
|
C#
|
gpl-2.0
| 2,940
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_05) on Wed Nov 20 14:29:07 CET 2013 -->
<title>Uses of Interface de.bwvaachen.beamoflightgame.model.INumberTile</title>
<meta name="date" content="2013-11-20">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface de.bwvaachen.beamoflightgame.model.INumberTile";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../de/bwvaachen/beamoflightgame/model/INumberTile.html" title="interface in de.bwvaachen.beamoflightgame.model">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?de/bwvaachen/beamoflightgame/model/class-use/INumberTile.html" target="_top">Frames</a></li>
<li><a href="INumberTile.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Interface de.bwvaachen.beamoflightgame.model.INumberTile" class="title">Uses of Interface<br>de.bwvaachen.beamoflightgame.model.INumberTile</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../de/bwvaachen/beamoflightgame/model/INumberTile.html" title="interface in de.bwvaachen.beamoflightgame.model">INumberTile</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#de.bwvaachen.beamoflightgame.model.impl">de.bwvaachen.beamoflightgame.model.impl</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="de.bwvaachen.beamoflightgame.model.impl">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../de/bwvaachen/beamoflightgame/model/INumberTile.html" title="interface in de.bwvaachen.beamoflightgame.model">INumberTile</a> in <a href="../../../../../de/bwvaachen/beamoflightgame/model/impl/package-summary.html">de.bwvaachen.beamoflightgame.model.impl</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation">
<caption><span>Constructor parameters in <a href="../../../../../de/bwvaachen/beamoflightgame/model/impl/package-summary.html">de.bwvaachen.beamoflightgame.model.impl</a> with type arguments of type <a href="../../../../../de/bwvaachen/beamoflightgame/model/INumberTile.html" title="interface in de.bwvaachen.beamoflightgame.model">INumberTile</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colLast"><code><strong><a href="../../../../../de/bwvaachen/beamoflightgame/model/impl/BeamsOfLightPuzzleBoard.html#BeamsOfLightPuzzleBoard(int, int, java.lang.Iterable)">BeamsOfLightPuzzleBoard</a></strong>(int width,
int heigth,
java.lang.Iterable<<a href="../../../../../de/bwvaachen/beamoflightgame/model/INumberTile.html" title="interface in de.bwvaachen.beamoflightgame.model">INumberTile</a>> nrs)</code> </td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../de/bwvaachen/beamoflightgame/model/INumberTile.html" title="interface in de.bwvaachen.beamoflightgame.model">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?de/bwvaachen/beamoflightgame/model/class-use/INumberTile.html" target="_top">Frames</a></li>
<li><a href="INumberTile.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|
BastianW/LichtstrahlenSpiel
|
de.bwvaachen.beamoflightgame/doc/de/bwvaachen/beamoflightgame/model/class-use/INumberTile.html
|
HTML
|
gpl-2.0
| 6,680
|
// display the calendar here
var hotelTable = document.getElementById("hotelCalendarTable");
var defaultData = hotelTable.innerHTML;
var stringHTML = "";
var date=31;
var count=0;
// stringHTML = "<tr><td>1</td><td>2</td></tr>";
var table = document.getElementById("hotelCalendarTable");
for (var i = 1; i <= date; i++) {
if (count === 0){
stringHTML += "<tr>";
count++
}
if (count === 7 || i === date) {
stringHTML += "<td>" + i + "</td></tr>";
count=0;
}
else {
stringHTML += "<td>" + i + "</td>";
count++;
}
}
hotelTable.innerHTML += stringHTML;
|
Athit101/ITE220
|
Week2-2/js/calendar.js
|
JavaScript
|
gpl-2.0
| 566
|
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>PHPXRef 0.7.1 : Unnamed Project : Variable Reference: $plugins</title>
<link rel="stylesheet" href="../sample.css" type="text/css">
<link rel="stylesheet" href="../sample-print.css" type="text/css" media="print">
<style id="hilight" type="text/css"></style>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff">
<table class="pagetitle" width="100%">
<tr>
<td valign="top" class="pagetitle">
[ <a href="../index.html">Index</a> ]
</td>
<td align="right" class="pagetitle">
<h2 style="margin-bottom: 0px">PHP Cross Reference of Unnamed Project</h2>
</td>
</tr>
</table>
<!-- Generated by PHPXref 0.7.1 at Sat Nov 21 22:13:19 2015 -->
<!-- PHPXref (c) 2000-2010 Gareth Watts - gareth@omnipotent.net -->
<!-- http://phpxref.sourceforge.net/ -->
<script src="../phpxref.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
ext='.html';
relbase='../';
subdir='_variables';
filename='index.html';
cookiekey='phpxref';
handleNavFrame(relbase, subdir, filename);
logVariable('plugins');
// -->
</script>
<script language="JavaScript" type="text/javascript">
if (gwGetCookie('xrefnav')=='off')
document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>');
else
document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>');
</script>
<noscript>
<p class="navlinks">
[ <a href="../nav.html" target="_top">Show Explorer</a> ]
[ <a href="index.html" target="_top">Hide Navbar</a> ]
</p>
</noscript>
[<a href="../index.html">Top level directory</a>]<br>
<script language="JavaScript" type="text/javascript">
<!--
document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>');
document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">');
document.writeln('<tr><td class="searchbox-title">');
document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>');
document.writeln('<\/td><\/tr>');
document.writeln('<tr><td class="searchbox-body" id="searchbox-body">');
document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>');
document.writeln('<a class="searchbox-body" href="../_classes/index.html">Class<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="classname"><br>');
document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../_functions/index.html">Function<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="funcname"><br>');
document.writeln('<a class="searchbox-body" href="../_variables/index.html">Variable<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="varname"><br>');
document.writeln('<a class="searchbox-body" href="../_constants/index.html">Constant<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="constname"><br>');
document.writeln('<a class="searchbox-body" href="../_tables/index.html">Table<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="tablename"><br>');
document.writeln('<input type="submit" class="searchbox-button" value="Search">');
document.writeln('<\/form>');
document.writeln('<\/td><\/tr><\/table>');
document.writeln('<\/td><\/tr><\/table>');
// -->
</script>
<div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div>
<h3>Variable Cross Reference</h3>
<h2><a href="index.html#plugins">$plugins</a></h2>
<b>Defined at:</b><ul>
<li><a href="../rsc/js/tiny_mce/tinymce.gzip.php.html">/rsc/js/tiny_mce/tinymce.gzip.php</A> -> <a href="../rsc/js/tiny_mce/tinymce.gzip.php.source.html#l94"> line 94</A></li>
<li><a href="../rsc/js/tiny_mce/tinymce.gzip.php.html">/rsc/js/tiny_mce/tinymce.gzip.php</A> -> <a href="../rsc/js/tiny_mce/tinymce.gzip.php.source.html#l99"> line 99</A></li>
</ul>
<br><b>Referenced 5 times:</b><ul>
<li><a href="../rsc/js/tiny_mce/tinymce.gzip.php.html">/rsc/js/tiny_mce/tinymce.gzip.php</a> -> <a href="../rsc/js/tiny_mce/tinymce.gzip.php.source.html#l94"> line 94</a></li>
<li><a href="../rsc/js/tiny_mce/tinymce.gzip.php.html">/rsc/js/tiny_mce/tinymce.gzip.php</a> -> <a href="../rsc/js/tiny_mce/tinymce.gzip.php.source.html#l95"> line 95</a></li>
<li><a href="../rsc/js/tiny_mce/tinymce.gzip.php.html">/rsc/js/tiny_mce/tinymce.gzip.php</a> -> <a href="../rsc/js/tiny_mce/tinymce.gzip.php.source.html#l96"> line 96</a></li>
<li><a href="../rsc/js/tiny_mce/tinymce.gzip.php.html">/rsc/js/tiny_mce/tinymce.gzip.php</a> -> <a href="../rsc/js/tiny_mce/tinymce.gzip.php.source.html#l99"> line 99</a></li>
<li><a href="../rsc/js/tiny_mce/tinymce.gzip.php.html">/rsc/js/tiny_mce/tinymce.gzip.php</a> -> <a href="../rsc/js/tiny_mce/tinymce.gzip.php.source.html#l146"> line 146</a></li>
</ul>
<!-- A link to the phpxref site in your customized footer file is appreciated ;-) -->
<br><hr>
<table width="100%">
<tr><td>Generated: Sat Nov 21 22:13:19 2015</td>
<td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td>
</tr>
</table>
</body></html>
|
mgsolipa/b2evolution_phpxref
|
_variables/plugins.html
|
HTML
|
gpl-2.0
| 5,626
|
<?php
/**
* @package HikaShop for Joomla!
* @version 2.6.1
* @author hikashop.com
* @copyright (C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
class hikashopOrderHelper {
var $table = '';
var $pkey = '';
var $groupMap = '';
var $groupVal = '';
var $orderingMap = '';
function order($down = true, $useCID = true) {
$database = JFactory::getDBO();
if($down){
$sign = '>';
$dir = 'ASC';
}else{
$sign = '<';
$dir = 'DESC';
}
$orders = JRequest::getVar( 'order', array(), '', 'array' );
if($useCID) {
$ids = JRequest::getVar( 'cid', array(), '', 'array' );
} else {
$ids = array_keys($orders);
}
$orderingMap = $this->orderingMap;
$id = (int) $ids[0];
$pkey = $this->pkey;
if(!empty($this->main_pkey)){
$main = $this->main_pkey;
}else{
$main = $pkey;
}
$query = 'SELECT a.'.$orderingMap.',a.'.$pkey.' FROM '.hikashop_table($this->table).' as b, '.hikashop_table($this->table).' as a';
$query .= ' WHERE a.'.$orderingMap.' '.$sign.' b.'.$orderingMap.' AND b.'.$main.' = '.$id.$this->group(false,'a').$this->group(false,'b');
$query .= ' ORDER BY a.'.$orderingMap.' '.$dir.' LIMIT 1';
$database->setQuery($query);
$secondElement = $database->loadObject();
if(empty($secondElement)) return false;
$firstElement = new stdClass();
if($main==$pkey){
$firstElement->$pkey = $id;
}else{
$database->setQuery('SELECT '.$pkey.' FROM '.hikashop_table($this->table).' WHERE '.$main.' = '.$id.$this->group(false));
$firstElement->$pkey = (int)$database->loadResult();
}
$firstElement->$orderingMap = $secondElement->$orderingMap;
if($down)$secondElement->$orderingMap--;
else $secondElement->$orderingMap++;
$status1 = $database->updateObject(hikashop_table($this->table),$firstElement,$pkey);
$status2 = $database->updateObject(hikashop_table($this->table),$secondElement,$pkey);
$status = $status1 && $status2;
if($status){
if (!HIKASHOP_PHP5) {
$app =& JFactory::getApplication();
}else{
$app = JFactory::getApplication();
}
$app->enqueueMessage(JText::_( 'NEW_ORDERING_SAVED' ), 'message');
}
return $status;
}
function save($useCID = true) {
$app = JFactory::getApplication();
$pkey = $this->pkey;
if(!empty($this->main_pkey)){
$main = $this->main_pkey;
}else{
$main = $pkey;
}
$orderingMap = $this->orderingMap;
$order = JRequest::getVar('order', array(), 'post', 'array');
if($useCID) {
$cid = JRequest::getVar('cid', array(), 'post', 'array');
JArrayHelper::toInteger($cid);
} else {
$cid = array_keys($order);
}
if(empty($cid)) {
$app->enqueueMessage(JText::_('ERROR_ORDERING'), 'error');
return false;
}
$database = JFactory::getDBO();
if(!empty($this->groupMap)){
$query = 'SELECT `'.$main.'` FROM '.hikashop_table($this->table).' WHERE `'.$main.'` IN ('.implode(',',$cid).') '. $this->group();
$database->setQuery($query);
if(!HIKASHOP_J25){
$results = $database->loadResultArray();
} else {
$results = $database->loadColumn();
}
$newcid = array();
$neworder=array();
foreach($cid as $key => $val){
if(in_array($val,$results)){
$newcid[] = $val;
if($useCID) {
$neworder[] = $order[$key];
} else {
$neworder[] = $order[$val];
}
}
}
$cid = $newcid;
$order = $neworder;
if($main!=$pkey){
$query = 'SELECT `'.$main.'`,`'.$pkey.'` FROM '.hikashop_table($this->table).' WHERE `'.$main.'` IN ('.implode(',',$cid).') '. $this->group();
$database->setQuery($query);
$results = $database->loadObjectList($main);
$newcid=array();
foreach($cid as $id){
$newcid[] = $results[$id]->$pkey;
}
$cid = $newcid;
}
}
if(empty($cid)) {
$app->enqueueMessage(JText::_( 'ERROR_ORDERING' ), 'error');
return false;
}
$query = 'SELECT `'.$orderingMap.'`,`'.$pkey.'` FROM '.hikashop_table($this->table).' WHERE `'.$pkey.'` NOT IN ('.implode(',',$cid).') ' . $this->group();
$query .= ' ORDER BY `'.$orderingMap.'` ASC';
$database->setQuery($query);
$results = $database->loadObjectList($pkey);
$oldResults = $results;
asort($order);
$newOrder = array();
while(!empty($order) || !empty($results)){
$dbElement = reset($results);
if(!empty($order) && empty($dbElement->$orderingMap) || (!empty($order) && reset($order) <= $dbElement->$orderingMap)){
$newOrder[] = $cid[(int)key($order)];
unset($order[key($order)]);
}else{
$newOrder[] = $dbElement->$pkey;
unset($results[$dbElement->$pkey]);
}
}
$i = 1;
$status = true;
$element = new stdClass();
foreach($newOrder as $val){
$element->$pkey = $val;
$element->$orderingMap = $i;
if(!isset($oldResults[$val]) || $oldResults[$val]->$orderingMap != $i){
$status = $database->updateObject(hikashop_table($this->table),$element,$pkey) && $status;
}
$i++;
}
if($status){
$app->enqueueMessage(JText::_( 'NEW_ORDERING_SAVED' ), 'message');
}else{
$app->enqueueMessage(JText::_( 'ERROR_ORDERING' ), 'error');
}
return $status;
}
function reOrder() {
$db = JFactory::getDBO();
$orderingMap = $this->orderingMap;
$query = 'SELECT MAX(`'.$orderingMap.'`) FROM '.hikashop_table($this->table) . $this->group(true);
$db->setQuery($query);
$max = $db->loadResult();
$max++;
$query = 'UPDATE '.hikashop_table($this->table).' SET `'.$orderingMap.'` ='.$max.' WHERE `'.$orderingMap.'`=0' . $this->group();
$db->setQuery($query);
$db->query();
$query = 'SELECT `'.$orderingMap.'`,`'.$this->pkey.'` FROM '.hikashop_table($this->table) . $this->group(true);
$query .= ' ORDER BY `'.$orderingMap.'` ASC';
$db->setQuery($query);
$results = $db->loadObjectList();
$i = 1;
if(!empty($results)){
foreach($results as $oneResult){
if($oneResult->$orderingMap != $i){
$oneResult->$orderingMap = $i;
$db->updateObject( hikashop_table($this->table), $oneResult, $this->pkey);
}
$i++;
}
}
}
function group($addWhere = false,$table = '') {
if(!empty($this->groupMap)){
$db = JFactory::getDBO();
if(is_array($this->groupMap)){
$groups = array();
foreach($this->groupMap as $k => $group){
if(!empty($table)){
$group = $table.'.'.$group;
}
$groups[]= $group.' = '.$db->Quote($this->groupVal[$k]);
}
$groups = ' ' . implode(' AND ',$groups);
}else{
$groups = ' ' .(!empty($table)?$table.'.':''). $this->groupMap.' = '.$db->Quote($this->groupVal);
}
if($addWhere){
$groups = ' WHERE'.$groups;
}else{
$groups = ' AND'.$groups;
}
}else{
$groups='';
}
return $groups;
}
}
|
githubupttik/upttik
|
administrator/components/com_hikashop/helpers/order.php
|
PHP
|
gpl-2.0
| 6,728
|
// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Review notes:
//
// - The use of macros in these inline functions may seem superfluous
// but it is absolutely needed to make sure gcc generates optimal
// code. gcc is not happy when attempting to inline too deep.
//
#ifndef V8_OBJECTS_INL_H_
#define V8_OBJECTS_INL_H_
#include "src/base/atomicops.h"
#include "src/base/bits.h"
#include "src/contexts.h"
#include "src/conversions-inl.h"
#include "src/elements.h"
#include "src/factory.h"
#include "src/field-index-inl.h"
#include "src/heap/heap-inl.h"
#include "src/heap/heap.h"
#include "src/heap/incremental-marking.h"
#include "src/heap/objects-visiting.h"
#include "src/heap/spaces.h"
#include "src/heap/store-buffer.h"
#include "src/isolate.h"
#include "src/layout-descriptor-inl.h"
#include "src/lookup.h"
#include "src/objects.h"
#include "src/property.h"
#include "src/prototype.h"
#include "src/transitions-inl.h"
#include "src/type-feedback-vector-inl.h"
#include "src/v8memory.h"
namespace v8 {
namespace internal {
PropertyDetails::PropertyDetails(Smi* smi) {
value_ = smi->value();
}
Smi* PropertyDetails::AsSmi() const {
// Ensure the upper 2 bits have the same value by sign extending it. This is
// necessary to be able to use the 31st bit of the property details.
int value = value_ << 1;
return Smi::FromInt(value >> 1);
}
PropertyDetails PropertyDetails::AsDeleted() const {
Smi* smi = Smi::FromInt(value_ | DeletedField::encode(1));
return PropertyDetails(smi);
}
int PropertyDetails::field_width_in_words() const {
DCHECK(type() == FIELD);
if (!FLAG_unbox_double_fields) return 1;
if (kDoubleSize == kPointerSize) return 1;
return representation().IsDouble() ? kDoubleSize / kPointerSize : 1;
}
#define TYPE_CHECKER(type, instancetype) \
bool Object::Is##type() const { \
return Object::IsHeapObject() && \
HeapObject::cast(this)->map()->instance_type() == instancetype; \
}
#define CAST_ACCESSOR(type) \
type* type::cast(Object* object) { \
SLOW_DCHECK(object->Is##type()); \
return reinterpret_cast<type*>(object); \
} \
const type* type::cast(const Object* object) { \
SLOW_DCHECK(object->Is##type()); \
return reinterpret_cast<const type*>(object); \
}
#define INT_ACCESSORS(holder, name, offset) \
int holder::name() const { return READ_INT_FIELD(this, offset); } \
void holder::set_##name(int value) { WRITE_INT_FIELD(this, offset, value); }
#define ACCESSORS(holder, name, type, offset) \
type* holder::name() const { return type::cast(READ_FIELD(this, offset)); } \
void holder::set_##name(type* value, WriteBarrierMode mode) { \
WRITE_FIELD(this, offset, value); \
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, offset, value, mode); \
}
// Getter that returns a tagged Smi and setter that writes a tagged Smi.
#define ACCESSORS_TO_SMI(holder, name, offset) \
Smi* holder::name() const { return Smi::cast(READ_FIELD(this, offset)); } \
void holder::set_##name(Smi* value, WriteBarrierMode mode) { \
WRITE_FIELD(this, offset, value); \
}
// Getter that returns a Smi as an int and writes an int as a Smi.
#define SMI_ACCESSORS(holder, name, offset) \
int holder::name() const { \
Object* value = READ_FIELD(this, offset); \
return Smi::cast(value)->value(); \
} \
void holder::set_##name(int value) { \
WRITE_FIELD(this, offset, Smi::FromInt(value)); \
}
#define SYNCHRONIZED_SMI_ACCESSORS(holder, name, offset) \
int holder::synchronized_##name() const { \
Object* value = ACQUIRE_READ_FIELD(this, offset); \
return Smi::cast(value)->value(); \
} \
void holder::synchronized_set_##name(int value) { \
RELEASE_WRITE_FIELD(this, offset, Smi::FromInt(value)); \
}
#define NOBARRIER_SMI_ACCESSORS(holder, name, offset) \
int holder::nobarrier_##name() const { \
Object* value = NOBARRIER_READ_FIELD(this, offset); \
return Smi::cast(value)->value(); \
} \
void holder::nobarrier_set_##name(int value) { \
NOBARRIER_WRITE_FIELD(this, offset, Smi::FromInt(value)); \
}
#define BOOL_GETTER(holder, field, name, offset) \
bool holder::name() const { \
return BooleanBit::get(field(), offset); \
} \
#define BOOL_ACCESSORS(holder, field, name, offset) \
bool holder::name() const { \
return BooleanBit::get(field(), offset); \
} \
void holder::set_##name(bool value) { \
set_##field(BooleanBit::set(field(), offset, value)); \
}
bool Object::IsFixedArrayBase() const {
return IsFixedArray() || IsFixedDoubleArray() || IsConstantPoolArray() ||
IsFixedTypedArrayBase() || IsExternalArray();
}
// External objects are not extensible, so the map check is enough.
bool Object::IsExternal() const {
return Object::IsHeapObject() &&
HeapObject::cast(this)->map() ==
HeapObject::cast(this)->GetHeap()->external_map();
}
bool Object::IsAccessorInfo() const {
return IsExecutableAccessorInfo() || IsDeclaredAccessorInfo();
}
bool Object::IsSmi() const {
return HAS_SMI_TAG(this);
}
bool Object::IsHeapObject() const {
return Internals::HasHeapObjectTag(this);
}
TYPE_CHECKER(HeapNumber, HEAP_NUMBER_TYPE)
TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE)
TYPE_CHECKER(Symbol, SYMBOL_TYPE)
bool Object::IsString() const {
return Object::IsHeapObject()
&& HeapObject::cast(this)->map()->instance_type() < FIRST_NONSTRING_TYPE;
}
bool Object::IsName() const {
return IsString() || IsSymbol();
}
bool Object::IsUniqueName() const {
return IsInternalizedString() || IsSymbol();
}
bool Object::IsSpecObject() const {
return Object::IsHeapObject()
&& HeapObject::cast(this)->map()->instance_type() >= FIRST_SPEC_OBJECT_TYPE;
}
bool Object::IsSpecFunction() const {
if (!Object::IsHeapObject()) return false;
InstanceType type = HeapObject::cast(this)->map()->instance_type();
return type == JS_FUNCTION_TYPE || type == JS_FUNCTION_PROXY_TYPE;
}
bool Object::IsTemplateInfo() const {
return IsObjectTemplateInfo() || IsFunctionTemplateInfo();
}
bool Object::IsInternalizedString() const {
if (!this->IsHeapObject()) return false;
uint32_t type = HeapObject::cast(this)->map()->instance_type();
STATIC_ASSERT(kNotInternalizedTag != 0);
return (type & (kIsNotStringMask | kIsNotInternalizedMask)) ==
(kStringTag | kInternalizedTag);
}
bool Object::IsConsString() const {
if (!IsString()) return false;
return StringShape(String::cast(this)).IsCons();
}
bool Object::IsSlicedString() const {
if (!IsString()) return false;
return StringShape(String::cast(this)).IsSliced();
}
bool Object::IsSeqString() const {
if (!IsString()) return false;
return StringShape(String::cast(this)).IsSequential();
}
bool Object::IsSeqOneByteString() const {
if (!IsString()) return false;
return StringShape(String::cast(this)).IsSequential() &&
String::cast(this)->IsOneByteRepresentation();
}
bool Object::IsSeqTwoByteString() const {
if (!IsString()) return false;
return StringShape(String::cast(this)).IsSequential() &&
String::cast(this)->IsTwoByteRepresentation();
}
bool Object::IsExternalString() const {
if (!IsString()) return false;
return StringShape(String::cast(this)).IsExternal();
}
bool Object::IsExternalOneByteString() const {
if (!IsString()) return false;
return StringShape(String::cast(this)).IsExternal() &&
String::cast(this)->IsOneByteRepresentation();
}
bool Object::IsExternalTwoByteString() const {
if (!IsString()) return false;
return StringShape(String::cast(this)).IsExternal() &&
String::cast(this)->IsTwoByteRepresentation();
}
bool Object::HasValidElements() {
// Dictionary is covered under FixedArray.
return IsFixedArray() || IsFixedDoubleArray() || IsExternalArray() ||
IsFixedTypedArrayBase();
}
Handle<Object> Object::NewStorageFor(Isolate* isolate,
Handle<Object> object,
Representation representation) {
if (representation.IsSmi() && object->IsUninitialized()) {
return handle(Smi::FromInt(0), isolate);
}
if (!representation.IsDouble()) return object;
double value;
if (object->IsUninitialized()) {
value = 0;
} else if (object->IsMutableHeapNumber()) {
value = HeapNumber::cast(*object)->value();
} else {
value = object->Number();
}
return isolate->factory()->NewHeapNumber(value, MUTABLE);
}
Handle<Object> Object::WrapForRead(Isolate* isolate,
Handle<Object> object,
Representation representation) {
DCHECK(!object->IsUninitialized());
if (!representation.IsDouble()) {
DCHECK(object->FitsRepresentation(representation));
return object;
}
return isolate->factory()->NewHeapNumber(HeapNumber::cast(*object)->value());
}
StringShape::StringShape(const String* str)
: type_(str->map()->instance_type()) {
set_valid();
DCHECK((type_ & kIsNotStringMask) == kStringTag);
}
StringShape::StringShape(Map* map)
: type_(map->instance_type()) {
set_valid();
DCHECK((type_ & kIsNotStringMask) == kStringTag);
}
StringShape::StringShape(InstanceType t)
: type_(static_cast<uint32_t>(t)) {
set_valid();
DCHECK((type_ & kIsNotStringMask) == kStringTag);
}
bool StringShape::IsInternalized() {
DCHECK(valid());
STATIC_ASSERT(kNotInternalizedTag != 0);
return (type_ & (kIsNotStringMask | kIsNotInternalizedMask)) ==
(kStringTag | kInternalizedTag);
}
bool String::IsOneByteRepresentation() const {
uint32_t type = map()->instance_type();
return (type & kStringEncodingMask) == kOneByteStringTag;
}
bool String::IsTwoByteRepresentation() const {
uint32_t type = map()->instance_type();
return (type & kStringEncodingMask) == kTwoByteStringTag;
}
bool String::IsOneByteRepresentationUnderneath() {
uint32_t type = map()->instance_type();
STATIC_ASSERT(kIsIndirectStringTag != 0);
STATIC_ASSERT((kIsIndirectStringMask & kStringEncodingMask) == 0);
DCHECK(IsFlat());
switch (type & (kIsIndirectStringMask | kStringEncodingMask)) {
case kOneByteStringTag:
return true;
case kTwoByteStringTag:
return false;
default: // Cons or sliced string. Need to go deeper.
return GetUnderlying()->IsOneByteRepresentation();
}
}
bool String::IsTwoByteRepresentationUnderneath() {
uint32_t type = map()->instance_type();
STATIC_ASSERT(kIsIndirectStringTag != 0);
STATIC_ASSERT((kIsIndirectStringMask & kStringEncodingMask) == 0);
DCHECK(IsFlat());
switch (type & (kIsIndirectStringMask | kStringEncodingMask)) {
case kOneByteStringTag:
return false;
case kTwoByteStringTag:
return true;
default: // Cons or sliced string. Need to go deeper.
return GetUnderlying()->IsTwoByteRepresentation();
}
}
bool String::HasOnlyOneByteChars() {
uint32_t type = map()->instance_type();
return (type & kOneByteDataHintMask) == kOneByteDataHintTag ||
IsOneByteRepresentation();
}
bool StringShape::IsCons() {
return (type_ & kStringRepresentationMask) == kConsStringTag;
}
bool StringShape::IsSliced() {
return (type_ & kStringRepresentationMask) == kSlicedStringTag;
}
bool StringShape::IsIndirect() {
return (type_ & kIsIndirectStringMask) == kIsIndirectStringTag;
}
bool StringShape::IsExternal() {
return (type_ & kStringRepresentationMask) == kExternalStringTag;
}
bool StringShape::IsSequential() {
return (type_ & kStringRepresentationMask) == kSeqStringTag;
}
StringRepresentationTag StringShape::representation_tag() {
uint32_t tag = (type_ & kStringRepresentationMask);
return static_cast<StringRepresentationTag>(tag);
}
uint32_t StringShape::encoding_tag() {
return type_ & kStringEncodingMask;
}
uint32_t StringShape::full_representation_tag() {
return (type_ & (kStringRepresentationMask | kStringEncodingMask));
}
STATIC_ASSERT((kStringRepresentationMask | kStringEncodingMask) ==
Internals::kFullStringRepresentationMask);
STATIC_ASSERT(static_cast<uint32_t>(kStringEncodingMask) ==
Internals::kStringEncodingMask);
bool StringShape::IsSequentialOneByte() {
return full_representation_tag() == (kSeqStringTag | kOneByteStringTag);
}
bool StringShape::IsSequentialTwoByte() {
return full_representation_tag() == (kSeqStringTag | kTwoByteStringTag);
}
bool StringShape::IsExternalOneByte() {
return full_representation_tag() == (kExternalStringTag | kOneByteStringTag);
}
STATIC_ASSERT((kExternalStringTag | kOneByteStringTag) ==
Internals::kExternalOneByteRepresentationTag);
STATIC_ASSERT(v8::String::ONE_BYTE_ENCODING == kOneByteStringTag);
bool StringShape::IsExternalTwoByte() {
return full_representation_tag() == (kExternalStringTag | kTwoByteStringTag);
}
STATIC_ASSERT((kExternalStringTag | kTwoByteStringTag) ==
Internals::kExternalTwoByteRepresentationTag);
STATIC_ASSERT(v8::String::TWO_BYTE_ENCODING == kTwoByteStringTag);
uc32 FlatStringReader::Get(int index) {
DCHECK(0 <= index && index <= length_);
if (is_one_byte_) {
return static_cast<const byte*>(start_)[index];
} else {
return static_cast<const uc16*>(start_)[index];
}
}
Handle<Object> StringTableShape::AsHandle(Isolate* isolate, HashTableKey* key) {
return key->AsHandle(isolate);
}
Handle<Object> CompilationCacheShape::AsHandle(Isolate* isolate,
HashTableKey* key) {
return key->AsHandle(isolate);
}
Handle<Object> CodeCacheHashTableShape::AsHandle(Isolate* isolate,
HashTableKey* key) {
return key->AsHandle(isolate);
}
template <typename Char>
class SequentialStringKey : public HashTableKey {
public:
explicit SequentialStringKey(Vector<const Char> string, uint32_t seed)
: string_(string), hash_field_(0), seed_(seed) { }
virtual uint32_t Hash() OVERRIDE {
hash_field_ = StringHasher::HashSequentialString<Char>(string_.start(),
string_.length(),
seed_);
uint32_t result = hash_field_ >> String::kHashShift;
DCHECK(result != 0); // Ensure that the hash value of 0 is never computed.
return result;
}
virtual uint32_t HashForObject(Object* other) OVERRIDE {
return String::cast(other)->Hash();
}
Vector<const Char> string_;
uint32_t hash_field_;
uint32_t seed_;
};
class OneByteStringKey : public SequentialStringKey<uint8_t> {
public:
OneByteStringKey(Vector<const uint8_t> str, uint32_t seed)
: SequentialStringKey<uint8_t>(str, seed) { }
virtual bool IsMatch(Object* string) OVERRIDE {
return String::cast(string)->IsOneByteEqualTo(string_);
}
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
};
class SeqOneByteSubStringKey : public HashTableKey {
public:
SeqOneByteSubStringKey(Handle<SeqOneByteString> string, int from, int length)
: string_(string), from_(from), length_(length) {
DCHECK(string_->IsSeqOneByteString());
}
virtual uint32_t Hash() OVERRIDE {
DCHECK(length_ >= 0);
DCHECK(from_ + length_ <= string_->length());
const uint8_t* chars = string_->GetChars() + from_;
hash_field_ = StringHasher::HashSequentialString(
chars, length_, string_->GetHeap()->HashSeed());
uint32_t result = hash_field_ >> String::kHashShift;
DCHECK(result != 0); // Ensure that the hash value of 0 is never computed.
return result;
}
virtual uint32_t HashForObject(Object* other) OVERRIDE {
return String::cast(other)->Hash();
}
virtual bool IsMatch(Object* string) OVERRIDE;
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
private:
Handle<SeqOneByteString> string_;
int from_;
int length_;
uint32_t hash_field_;
};
class TwoByteStringKey : public SequentialStringKey<uc16> {
public:
explicit TwoByteStringKey(Vector<const uc16> str, uint32_t seed)
: SequentialStringKey<uc16>(str, seed) { }
virtual bool IsMatch(Object* string) OVERRIDE {
return String::cast(string)->IsTwoByteEqualTo(string_);
}
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
};
// Utf8StringKey carries a vector of chars as key.
class Utf8StringKey : public HashTableKey {
public:
explicit Utf8StringKey(Vector<const char> string, uint32_t seed)
: string_(string), hash_field_(0), seed_(seed) { }
virtual bool IsMatch(Object* string) OVERRIDE {
return String::cast(string)->IsUtf8EqualTo(string_);
}
virtual uint32_t Hash() OVERRIDE {
if (hash_field_ != 0) return hash_field_ >> String::kHashShift;
hash_field_ = StringHasher::ComputeUtf8Hash(string_, seed_, &chars_);
uint32_t result = hash_field_ >> String::kHashShift;
DCHECK(result != 0); // Ensure that the hash value of 0 is never computed.
return result;
}
virtual uint32_t HashForObject(Object* other) OVERRIDE {
return String::cast(other)->Hash();
}
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
if (hash_field_ == 0) Hash();
return isolate->factory()->NewInternalizedStringFromUtf8(
string_, chars_, hash_field_);
}
Vector<const char> string_;
uint32_t hash_field_;
int chars_; // Caches the number of characters when computing the hash code.
uint32_t seed_;
};
bool Object::IsNumber() const {
return IsSmi() || IsHeapNumber();
}
TYPE_CHECKER(ByteArray, BYTE_ARRAY_TYPE)
TYPE_CHECKER(FreeSpace, FREE_SPACE_TYPE)
bool Object::IsFiller() const {
if (!Object::IsHeapObject()) return false;
InstanceType instance_type = HeapObject::cast(this)->map()->instance_type();
return instance_type == FREE_SPACE_TYPE || instance_type == FILLER_TYPE;
}
bool Object::IsExternalArray() const {
if (!Object::IsHeapObject())
return false;
InstanceType instance_type =
HeapObject::cast(this)->map()->instance_type();
return (instance_type >= FIRST_EXTERNAL_ARRAY_TYPE &&
instance_type <= LAST_EXTERNAL_ARRAY_TYPE);
}
#define TYPED_ARRAY_TYPE_CHECKER(Type, type, TYPE, ctype, size) \
TYPE_CHECKER(External##Type##Array, EXTERNAL_##TYPE##_ARRAY_TYPE) \
TYPE_CHECKER(Fixed##Type##Array, FIXED_##TYPE##_ARRAY_TYPE)
TYPED_ARRAYS(TYPED_ARRAY_TYPE_CHECKER)
#undef TYPED_ARRAY_TYPE_CHECKER
bool Object::IsFixedTypedArrayBase() const {
if (!Object::IsHeapObject()) return false;
InstanceType instance_type =
HeapObject::cast(this)->map()->instance_type();
return (instance_type >= FIRST_FIXED_TYPED_ARRAY_TYPE &&
instance_type <= LAST_FIXED_TYPED_ARRAY_TYPE);
}
bool Object::IsJSReceiver() const {
STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
return IsHeapObject() &&
HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_RECEIVER_TYPE;
}
bool Object::IsJSObject() const {
STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
return IsHeapObject() &&
HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_OBJECT_TYPE;
}
bool Object::IsJSProxy() const {
if (!Object::IsHeapObject()) return false;
return HeapObject::cast(this)->map()->IsJSProxyMap();
}
TYPE_CHECKER(JSFunctionProxy, JS_FUNCTION_PROXY_TYPE)
TYPE_CHECKER(JSSet, JS_SET_TYPE)
TYPE_CHECKER(JSMap, JS_MAP_TYPE)
TYPE_CHECKER(JSSetIterator, JS_SET_ITERATOR_TYPE)
TYPE_CHECKER(JSMapIterator, JS_MAP_ITERATOR_TYPE)
TYPE_CHECKER(JSWeakMap, JS_WEAK_MAP_TYPE)
TYPE_CHECKER(JSWeakSet, JS_WEAK_SET_TYPE)
TYPE_CHECKER(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE)
TYPE_CHECKER(Map, MAP_TYPE)
TYPE_CHECKER(FixedArray, FIXED_ARRAY_TYPE)
TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE)
TYPE_CHECKER(ConstantPoolArray, CONSTANT_POOL_ARRAY_TYPE)
bool Object::IsJSWeakCollection() const {
return IsJSWeakMap() || IsJSWeakSet();
}
bool Object::IsDescriptorArray() const {
return IsFixedArray();
}
bool Object::IsLayoutDescriptor() const {
return IsSmi() || IsFixedTypedArrayBase();
}
bool Object::IsTransitionArray() const {
return IsFixedArray();
}
bool Object::IsTypeFeedbackVector() const { return IsFixedArray(); }
bool Object::IsDeoptimizationInputData() const {
// Must be a fixed array.
if (!IsFixedArray()) return false;
// There's no sure way to detect the difference between a fixed array and
// a deoptimization data array. Since this is used for asserts we can
// check that the length is zero or else the fixed size plus a multiple of
// the entry size.
int length = FixedArray::cast(this)->length();
if (length == 0) return true;
length -= DeoptimizationInputData::kFirstDeoptEntryIndex;
return length >= 0 && length % DeoptimizationInputData::kDeoptEntrySize == 0;
}
bool Object::IsDeoptimizationOutputData() const {
if (!IsFixedArray()) return false;
// There's actually no way to see the difference between a fixed array and
// a deoptimization data array. Since this is used for asserts we can check
// that the length is plausible though.
if (FixedArray::cast(this)->length() % 2 != 0) return false;
return true;
}
bool Object::IsDependentCode() const {
if (!IsFixedArray()) return false;
// There's actually no way to see the difference between a fixed array and
// a dependent codes array.
return true;
}
bool Object::IsContext() const {
if (!Object::IsHeapObject()) return false;
Map* map = HeapObject::cast(this)->map();
Heap* heap = map->GetHeap();
return (map == heap->function_context_map() ||
map == heap->catch_context_map() ||
map == heap->with_context_map() ||
map == heap->native_context_map() ||
map == heap->block_context_map() ||
map == heap->module_context_map() ||
map == heap->script_context_map());
}
bool Object::IsNativeContext() const {
return Object::IsHeapObject() &&
HeapObject::cast(this)->map() ==
HeapObject::cast(this)->GetHeap()->native_context_map();
}
bool Object::IsScriptContextTable() const {
if (!Object::IsHeapObject()) return false;
Map* map = HeapObject::cast(this)->map();
Heap* heap = map->GetHeap();
return map == heap->script_context_table_map();
}
bool Object::IsScopeInfo() const {
return Object::IsHeapObject() &&
HeapObject::cast(this)->map() ==
HeapObject::cast(this)->GetHeap()->scope_info_map();
}
TYPE_CHECKER(JSFunction, JS_FUNCTION_TYPE)
template <> inline bool Is<JSFunction>(Object* obj) {
return obj->IsJSFunction();
}
TYPE_CHECKER(Code, CODE_TYPE)
TYPE_CHECKER(Oddball, ODDBALL_TYPE)
TYPE_CHECKER(Cell, CELL_TYPE)
TYPE_CHECKER(PropertyCell, PROPERTY_CELL_TYPE)
TYPE_CHECKER(WeakCell, WEAK_CELL_TYPE)
TYPE_CHECKER(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE)
TYPE_CHECKER(JSGeneratorObject, JS_GENERATOR_OBJECT_TYPE)
TYPE_CHECKER(JSModule, JS_MODULE_TYPE)
TYPE_CHECKER(JSValue, JS_VALUE_TYPE)
TYPE_CHECKER(JSDate, JS_DATE_TYPE)
TYPE_CHECKER(JSMessageObject, JS_MESSAGE_OBJECT_TYPE)
bool Object::IsStringWrapper() const {
return IsJSValue() && JSValue::cast(this)->value()->IsString();
}
TYPE_CHECKER(Foreign, FOREIGN_TYPE)
bool Object::IsBoolean() const {
return IsOddball() &&
((Oddball::cast(this)->kind() & Oddball::kNotBooleanMask) == 0);
}
TYPE_CHECKER(JSArray, JS_ARRAY_TYPE)
TYPE_CHECKER(JSArrayBuffer, JS_ARRAY_BUFFER_TYPE)
TYPE_CHECKER(JSTypedArray, JS_TYPED_ARRAY_TYPE)
TYPE_CHECKER(JSDataView, JS_DATA_VIEW_TYPE)
bool Object::IsJSArrayBufferView() const {
return IsJSDataView() || IsJSTypedArray();
}
TYPE_CHECKER(JSRegExp, JS_REGEXP_TYPE)
template <> inline bool Is<JSArray>(Object* obj) {
return obj->IsJSArray();
}
bool Object::IsHashTable() const {
return Object::IsHeapObject() &&
HeapObject::cast(this)->map() ==
HeapObject::cast(this)->GetHeap()->hash_table_map();
}
bool Object::IsWeakHashTable() const {
return IsHashTable();
}
bool Object::IsDictionary() const {
return IsHashTable() &&
this != HeapObject::cast(this)->GetHeap()->string_table();
}
bool Object::IsNameDictionary() const {
return IsDictionary();
}
bool Object::IsSeededNumberDictionary() const {
return IsDictionary();
}
bool Object::IsUnseededNumberDictionary() const {
return IsDictionary();
}
bool Object::IsStringTable() const {
return IsHashTable();
}
bool Object::IsJSFunctionResultCache() const {
if (!IsFixedArray()) return false;
const FixedArray* self = FixedArray::cast(this);
int length = self->length();
if (length < JSFunctionResultCache::kEntriesIndex) return false;
if ((length - JSFunctionResultCache::kEntriesIndex)
% JSFunctionResultCache::kEntrySize != 0) {
return false;
}
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
// TODO(svenpanne) We use const_cast here and below to break our dependency
// cycle between the predicates and the verifiers. This can be removed when
// the verifiers are const-correct, too.
reinterpret_cast<JSFunctionResultCache*>(const_cast<Object*>(this))->
JSFunctionResultCacheVerify();
}
#endif
return true;
}
bool Object::IsNormalizedMapCache() const {
return NormalizedMapCache::IsNormalizedMapCache(this);
}
int NormalizedMapCache::GetIndex(Handle<Map> map) {
return map->Hash() % NormalizedMapCache::kEntries;
}
bool NormalizedMapCache::IsNormalizedMapCache(const Object* obj) {
if (!obj->IsFixedArray()) return false;
if (FixedArray::cast(obj)->length() != NormalizedMapCache::kEntries) {
return false;
}
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
reinterpret_cast<NormalizedMapCache*>(const_cast<Object*>(obj))->
NormalizedMapCacheVerify();
}
#endif
return true;
}
bool Object::IsCompilationCacheTable() const {
return IsHashTable();
}
bool Object::IsCodeCacheHashTable() const {
return IsHashTable();
}
bool Object::IsPolymorphicCodeCacheHashTable() const {
return IsHashTable();
}
bool Object::IsMapCache() const {
return IsHashTable();
}
bool Object::IsObjectHashTable() const {
return IsHashTable();
}
bool Object::IsOrderedHashTable() const {
return IsHeapObject() &&
HeapObject::cast(this)->map() ==
HeapObject::cast(this)->GetHeap()->ordered_hash_table_map();
}
bool Object::IsOrderedHashSet() const {
return IsOrderedHashTable();
}
bool Object::IsOrderedHashMap() const {
return IsOrderedHashTable();
}
bool Object::IsPrimitive() const {
return IsOddball() || IsNumber() || IsString();
}
bool Object::IsJSGlobalProxy() const {
bool result = IsHeapObject() &&
(HeapObject::cast(this)->map()->instance_type() ==
JS_GLOBAL_PROXY_TYPE);
DCHECK(!result ||
HeapObject::cast(this)->map()->is_access_check_needed());
return result;
}
bool Object::IsGlobalObject() const {
if (!IsHeapObject()) return false;
InstanceType type = HeapObject::cast(this)->map()->instance_type();
return type == JS_GLOBAL_OBJECT_TYPE ||
type == JS_BUILTINS_OBJECT_TYPE;
}
TYPE_CHECKER(JSGlobalObject, JS_GLOBAL_OBJECT_TYPE)
TYPE_CHECKER(JSBuiltinsObject, JS_BUILTINS_OBJECT_TYPE)
bool Object::IsUndetectableObject() const {
return IsHeapObject()
&& HeapObject::cast(this)->map()->is_undetectable();
}
bool Object::IsAccessCheckNeeded() const {
if (!IsHeapObject()) return false;
if (IsJSGlobalProxy()) {
const JSGlobalProxy* proxy = JSGlobalProxy::cast(this);
GlobalObject* global = proxy->GetIsolate()->context()->global_object();
return proxy->IsDetachedFrom(global);
}
return HeapObject::cast(this)->map()->is_access_check_needed();
}
bool Object::IsStruct() const {
if (!IsHeapObject()) return false;
switch (HeapObject::cast(this)->map()->instance_type()) {
#define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return true;
STRUCT_LIST(MAKE_STRUCT_CASE)
#undef MAKE_STRUCT_CASE
default: return false;
}
}
#define MAKE_STRUCT_PREDICATE(NAME, Name, name) \
bool Object::Is##Name() const { \
return Object::IsHeapObject() \
&& HeapObject::cast(this)->map()->instance_type() == NAME##_TYPE; \
}
STRUCT_LIST(MAKE_STRUCT_PREDICATE)
#undef MAKE_STRUCT_PREDICATE
bool Object::IsUndefined() const {
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kUndefined;
}
bool Object::IsNull() const {
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kNull;
}
bool Object::IsTheHole() const {
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kTheHole;
}
bool Object::IsException() const {
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kException;
}
bool Object::IsUninitialized() const {
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kUninitialized;
}
bool Object::IsTrue() const {
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kTrue;
}
bool Object::IsFalse() const {
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kFalse;
}
bool Object::IsArgumentsMarker() const {
return IsOddball() && Oddball::cast(this)->kind() == Oddball::kArgumentMarker;
}
double Object::Number() {
DCHECK(IsNumber());
return IsSmi()
? static_cast<double>(reinterpret_cast<Smi*>(this)->value())
: reinterpret_cast<HeapNumber*>(this)->value();
}
bool Object::IsNaN() const {
return this->IsHeapNumber() && std::isnan(HeapNumber::cast(this)->value());
}
bool Object::IsMinusZero() const {
return this->IsHeapNumber() &&
i::IsMinusZero(HeapNumber::cast(this)->value());
}
MaybeHandle<Smi> Object::ToSmi(Isolate* isolate, Handle<Object> object) {
if (object->IsSmi()) return Handle<Smi>::cast(object);
if (object->IsHeapNumber()) {
double value = Handle<HeapNumber>::cast(object)->value();
int int_value = FastD2I(value);
if (value == FastI2D(int_value) && Smi::IsValid(int_value)) {
return handle(Smi::FromInt(int_value), isolate);
}
}
return Handle<Smi>();
}
MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate,
Handle<Object> object) {
return ToObject(
isolate, object, handle(isolate->context()->native_context(), isolate));
}
bool Object::HasSpecificClassOf(String* name) {
return this->IsJSObject() && (JSObject::cast(this)->class_name() == name);
}
MaybeHandle<Object> Object::GetProperty(Handle<Object> object,
Handle<Name> name) {
LookupIterator it(object, name);
return GetProperty(&it);
}
MaybeHandle<Object> Object::GetElement(Isolate* isolate,
Handle<Object> object,
uint32_t index) {
// GetElement can trigger a getter which can cause allocation.
// This was not always the case. This DCHECK is here to catch
// leftover incorrect uses.
DCHECK(AllowHeapAllocation::IsAllowed());
return Object::GetElementWithReceiver(isolate, object, object, index);
}
Handle<Object> Object::GetPrototypeSkipHiddenPrototypes(
Isolate* isolate, Handle<Object> receiver) {
PrototypeIterator iter(isolate, receiver);
while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) {
if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) {
return PrototypeIterator::GetCurrent(iter);
}
iter.Advance();
}
return PrototypeIterator::GetCurrent(iter);
}
MaybeHandle<Object> Object::GetPropertyOrElement(Handle<Object> object,
Handle<Name> name) {
uint32_t index;
Isolate* isolate = name->GetIsolate();
if (name->AsArrayIndex(&index)) return GetElement(isolate, object, index);
return GetProperty(object, name);
}
MaybeHandle<Object> Object::GetProperty(Isolate* isolate,
Handle<Object> object,
const char* name) {
Handle<String> str = isolate->factory()->InternalizeUtf8String(name);
DCHECK(!str.is_null());
#ifdef DEBUG
uint32_t index; // Assert that the name is not an array index.
DCHECK(!str->AsArrayIndex(&index));
#endif // DEBUG
return GetProperty(object, str);
}
MaybeHandle<Object> JSProxy::GetElementWithHandler(Handle<JSProxy> proxy,
Handle<Object> receiver,
uint32_t index) {
return GetPropertyWithHandler(
proxy, receiver, proxy->GetIsolate()->factory()->Uint32ToString(index));
}
MaybeHandle<Object> JSProxy::SetElementWithHandler(Handle<JSProxy> proxy,
Handle<JSReceiver> receiver,
uint32_t index,
Handle<Object> value,
StrictMode strict_mode) {
Isolate* isolate = proxy->GetIsolate();
Handle<String> name = isolate->factory()->Uint32ToString(index);
return SetPropertyWithHandler(proxy, receiver, name, value, strict_mode);
}
Maybe<bool> JSProxy::HasElementWithHandler(Handle<JSProxy> proxy,
uint32_t index) {
Isolate* isolate = proxy->GetIsolate();
Handle<String> name = isolate->factory()->Uint32ToString(index);
return HasPropertyWithHandler(proxy, name);
}
#define FIELD_ADDR(p, offset) \
(reinterpret_cast<byte*>(p) + offset - kHeapObjectTag)
#define FIELD_ADDR_CONST(p, offset) \
(reinterpret_cast<const byte*>(p) + offset - kHeapObjectTag)
#define READ_FIELD(p, offset) \
(*reinterpret_cast<Object* const*>(FIELD_ADDR_CONST(p, offset)))
#define ACQUIRE_READ_FIELD(p, offset) \
reinterpret_cast<Object*>(base::Acquire_Load( \
reinterpret_cast<const base::AtomicWord*>(FIELD_ADDR_CONST(p, offset))))
#define NOBARRIER_READ_FIELD(p, offset) \
reinterpret_cast<Object*>(base::NoBarrier_Load( \
reinterpret_cast<const base::AtomicWord*>(FIELD_ADDR_CONST(p, offset))))
#define WRITE_FIELD(p, offset, value) \
(*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value)
#define RELEASE_WRITE_FIELD(p, offset, value) \
base::Release_Store( \
reinterpret_cast<base::AtomicWord*>(FIELD_ADDR(p, offset)), \
reinterpret_cast<base::AtomicWord>(value));
#define NOBARRIER_WRITE_FIELD(p, offset, value) \
base::NoBarrier_Store( \
reinterpret_cast<base::AtomicWord*>(FIELD_ADDR(p, offset)), \
reinterpret_cast<base::AtomicWord>(value));
#define WRITE_BARRIER(heap, object, offset, value) \
heap->incremental_marking()->RecordWrite( \
object, HeapObject::RawField(object, offset), value); \
if (heap->InNewSpace(value)) { \
heap->RecordWrite(object->address(), offset); \
}
#define CONDITIONAL_WRITE_BARRIER(heap, object, offset, value, mode) \
if (mode == UPDATE_WRITE_BARRIER) { \
heap->incremental_marking()->RecordWrite( \
object, HeapObject::RawField(object, offset), value); \
if (heap->InNewSpace(value)) { \
heap->RecordWrite(object->address(), offset); \
} \
}
#ifndef V8_TARGET_ARCH_MIPS
#define READ_DOUBLE_FIELD(p, offset) \
(*reinterpret_cast<const double*>(FIELD_ADDR_CONST(p, offset)))
#else // V8_TARGET_ARCH_MIPS
// Prevent gcc from using load-double (mips ldc1) on (possibly)
// non-64-bit aligned HeapNumber::value.
static inline double read_double_field(const void* p, int offset) {
union conversion {
double d;
uint32_t u[2];
} c;
c.u[0] = (*reinterpret_cast<const uint32_t*>(
FIELD_ADDR_CONST(p, offset)));
c.u[1] = (*reinterpret_cast<const uint32_t*>(
FIELD_ADDR_CONST(p, offset + 4)));
return c.d;
}
#define READ_DOUBLE_FIELD(p, offset) read_double_field(p, offset)
#endif // V8_TARGET_ARCH_MIPS
#ifndef V8_TARGET_ARCH_MIPS
#define WRITE_DOUBLE_FIELD(p, offset, value) \
(*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value)
#else // V8_TARGET_ARCH_MIPS
// Prevent gcc from using store-double (mips sdc1) on (possibly)
// non-64-bit aligned HeapNumber::value.
static inline void write_double_field(void* p, int offset,
double value) {
union conversion {
double d;
uint32_t u[2];
} c;
c.d = value;
(*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset))) = c.u[0];
(*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset + 4))) = c.u[1];
}
#define WRITE_DOUBLE_FIELD(p, offset, value) \
write_double_field(p, offset, value)
#endif // V8_TARGET_ARCH_MIPS
#define READ_INT_FIELD(p, offset) \
(*reinterpret_cast<const int*>(FIELD_ADDR_CONST(p, offset)))
#define WRITE_INT_FIELD(p, offset, value) \
(*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value)
#define READ_INTPTR_FIELD(p, offset) \
(*reinterpret_cast<const intptr_t*>(FIELD_ADDR_CONST(p, offset)))
#define WRITE_INTPTR_FIELD(p, offset, value) \
(*reinterpret_cast<intptr_t*>(FIELD_ADDR(p, offset)) = value)
#define READ_UINT32_FIELD(p, offset) \
(*reinterpret_cast<const uint32_t*>(FIELD_ADDR_CONST(p, offset)))
#define WRITE_UINT32_FIELD(p, offset, value) \
(*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)) = value)
#define READ_INT32_FIELD(p, offset) \
(*reinterpret_cast<const int32_t*>(FIELD_ADDR_CONST(p, offset)))
#define WRITE_INT32_FIELD(p, offset, value) \
(*reinterpret_cast<int32_t*>(FIELD_ADDR(p, offset)) = value)
#define READ_INT64_FIELD(p, offset) \
(*reinterpret_cast<const int64_t*>(FIELD_ADDR_CONST(p, offset)))
#define WRITE_INT64_FIELD(p, offset, value) \
(*reinterpret_cast<int64_t*>(FIELD_ADDR(p, offset)) = value)
#define READ_SHORT_FIELD(p, offset) \
(*reinterpret_cast<const uint16_t*>(FIELD_ADDR_CONST(p, offset)))
#define WRITE_SHORT_FIELD(p, offset, value) \
(*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)) = value)
#define READ_BYTE_FIELD(p, offset) \
(*reinterpret_cast<const byte*>(FIELD_ADDR_CONST(p, offset)))
#define NOBARRIER_READ_BYTE_FIELD(p, offset) \
static_cast<byte>(base::NoBarrier_Load( \
reinterpret_cast<base::Atomic8*>(FIELD_ADDR(p, offset))))
#define WRITE_BYTE_FIELD(p, offset, value) \
(*reinterpret_cast<byte*>(FIELD_ADDR(p, offset)) = value)
#define NOBARRIER_WRITE_BYTE_FIELD(p, offset, value) \
base::NoBarrier_Store( \
reinterpret_cast<base::Atomic8*>(FIELD_ADDR(p, offset)), \
static_cast<base::Atomic8>(value));
Object** HeapObject::RawField(HeapObject* obj, int byte_offset) {
return reinterpret_cast<Object**>(FIELD_ADDR(obj, byte_offset));
}
int Smi::value() const {
return Internals::SmiValue(this);
}
Smi* Smi::FromInt(int value) {
DCHECK(Smi::IsValid(value));
return reinterpret_cast<Smi*>(Internals::IntToSmi(value));
}
Smi* Smi::FromIntptr(intptr_t value) {
DCHECK(Smi::IsValid(value));
int smi_shift_bits = kSmiTagSize + kSmiShiftSize;
return reinterpret_cast<Smi*>((value << smi_shift_bits) | kSmiTag);
}
bool Smi::IsValid(intptr_t value) {
bool result = Internals::IsValidSmi(value);
DCHECK_EQ(result, value >= kMinValue && value <= kMaxValue);
return result;
}
MapWord MapWord::FromMap(const Map* map) {
return MapWord(reinterpret_cast<uintptr_t>(map));
}
Map* MapWord::ToMap() {
return reinterpret_cast<Map*>(value_);
}
bool MapWord::IsForwardingAddress() {
return HAS_SMI_TAG(reinterpret_cast<Object*>(value_));
}
MapWord MapWord::FromForwardingAddress(HeapObject* object) {
Address raw = reinterpret_cast<Address>(object) - kHeapObjectTag;
return MapWord(reinterpret_cast<uintptr_t>(raw));
}
HeapObject* MapWord::ToForwardingAddress() {
DCHECK(IsForwardingAddress());
return HeapObject::FromAddress(reinterpret_cast<Address>(value_));
}
#ifdef VERIFY_HEAP
void HeapObject::VerifyObjectField(int offset) {
VerifyPointer(READ_FIELD(this, offset));
}
void HeapObject::VerifySmiField(int offset) {
CHECK(READ_FIELD(this, offset)->IsSmi());
}
#endif
Heap* HeapObject::GetHeap() const {
Heap* heap =
MemoryChunk::FromAddress(reinterpret_cast<const byte*>(this))->heap();
SLOW_DCHECK(heap != NULL);
return heap;
}
Isolate* HeapObject::GetIsolate() const {
return GetHeap()->isolate();
}
Map* HeapObject::map() const {
#ifdef DEBUG
// Clear mark potentially added by PathTracer.
uintptr_t raw_value =
map_word().ToRawValue() & ~static_cast<uintptr_t>(PathTracer::kMarkTag);
return MapWord::FromRawValue(raw_value).ToMap();
#else
return map_word().ToMap();
#endif
}
void HeapObject::set_map(Map* value) {
set_map_word(MapWord::FromMap(value));
if (value != NULL) {
// TODO(1600) We are passing NULL as a slot because maps can never be on
// evacuation candidate.
value->GetHeap()->incremental_marking()->RecordWrite(this, NULL, value);
}
}
Map* HeapObject::synchronized_map() {
return synchronized_map_word().ToMap();
}
void HeapObject::synchronized_set_map(Map* value) {
synchronized_set_map_word(MapWord::FromMap(value));
if (value != NULL) {
// TODO(1600) We are passing NULL as a slot because maps can never be on
// evacuation candidate.
value->GetHeap()->incremental_marking()->RecordWrite(this, NULL, value);
}
}
void HeapObject::synchronized_set_map_no_write_barrier(Map* value) {
synchronized_set_map_word(MapWord::FromMap(value));
}
// Unsafe accessor omitting write barrier.
void HeapObject::set_map_no_write_barrier(Map* value) {
set_map_word(MapWord::FromMap(value));
}
MapWord HeapObject::map_word() const {
return MapWord(
reinterpret_cast<uintptr_t>(NOBARRIER_READ_FIELD(this, kMapOffset)));
}
void HeapObject::set_map_word(MapWord map_word) {
NOBARRIER_WRITE_FIELD(
this, kMapOffset, reinterpret_cast<Object*>(map_word.value_));
}
MapWord HeapObject::synchronized_map_word() const {
return MapWord(
reinterpret_cast<uintptr_t>(ACQUIRE_READ_FIELD(this, kMapOffset)));
}
void HeapObject::synchronized_set_map_word(MapWord map_word) {
RELEASE_WRITE_FIELD(
this, kMapOffset, reinterpret_cast<Object*>(map_word.value_));
}
HeapObject* HeapObject::FromAddress(Address address) {
DCHECK_TAG_ALIGNED(address);
return reinterpret_cast<HeapObject*>(address + kHeapObjectTag);
}
Address HeapObject::address() {
return reinterpret_cast<Address>(this) - kHeapObjectTag;
}
int HeapObject::Size() {
return SizeFromMap(map());
}
bool HeapObject::MayContainRawValues() {
InstanceType type = map()->instance_type();
if (type <= LAST_NAME_TYPE) {
if (type == SYMBOL_TYPE) {
return false;
}
DCHECK(type < FIRST_NONSTRING_TYPE);
// There are four string representations: sequential strings, external
// strings, cons strings, and sliced strings.
// Only the former two contain raw values and no heap pointers (besides the
// map-word).
return ((type & kIsIndirectStringMask) != kIsIndirectStringTag);
}
// The ConstantPoolArray contains heap pointers, but also raw values.
if (type == CONSTANT_POOL_ARRAY_TYPE) return true;
return (type <= LAST_DATA_TYPE);
}
void HeapObject::IteratePointers(ObjectVisitor* v, int start, int end) {
v->VisitPointers(reinterpret_cast<Object**>(FIELD_ADDR(this, start)),
reinterpret_cast<Object**>(FIELD_ADDR(this, end)));
}
void HeapObject::IteratePointer(ObjectVisitor* v, int offset) {
v->VisitPointer(reinterpret_cast<Object**>(FIELD_ADDR(this, offset)));
}
void HeapObject::IterateNextCodeLink(ObjectVisitor* v, int offset) {
v->VisitNextCodeLink(reinterpret_cast<Object**>(FIELD_ADDR(this, offset)));
}
double HeapNumber::value() const {
return READ_DOUBLE_FIELD(this, kValueOffset);
}
void HeapNumber::set_value(double value) {
WRITE_DOUBLE_FIELD(this, kValueOffset, value);
}
int HeapNumber::get_exponent() {
return ((READ_INT_FIELD(this, kExponentOffset) & kExponentMask) >>
kExponentShift) - kExponentBias;
}
int HeapNumber::get_sign() {
return READ_INT_FIELD(this, kExponentOffset) & kSignMask;
}
ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset)
Object** FixedArray::GetFirstElementAddress() {
return reinterpret_cast<Object**>(FIELD_ADDR(this, OffsetOfElementAt(0)));
}
bool FixedArray::ContainsOnlySmisOrHoles() {
Object* the_hole = GetHeap()->the_hole_value();
Object** current = GetFirstElementAddress();
for (int i = 0; i < length(); ++i) {
Object* candidate = *current++;
if (!candidate->IsSmi() && candidate != the_hole) return false;
}
return true;
}
FixedArrayBase* JSObject::elements() const {
Object* array = READ_FIELD(this, kElementsOffset);
return static_cast<FixedArrayBase*>(array);
}
void JSObject::ValidateElements(Handle<JSObject> object) {
#ifdef ENABLE_SLOW_DCHECKS
if (FLAG_enable_slow_asserts) {
ElementsAccessor* accessor = object->GetElementsAccessor();
accessor->Validate(object);
}
#endif
}
void AllocationSite::Initialize() {
set_transition_info(Smi::FromInt(0));
SetElementsKind(GetInitialFastElementsKind());
set_nested_site(Smi::FromInt(0));
set_pretenure_data(Smi::FromInt(0));
set_pretenure_create_count(Smi::FromInt(0));
set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()),
SKIP_WRITE_BARRIER);
}
void AllocationSite::MarkZombie() {
DCHECK(!IsZombie());
Initialize();
set_pretenure_decision(kZombie);
}
// Heuristic: We only need to create allocation site info if the boilerplate
// elements kind is the initial elements kind.
AllocationSiteMode AllocationSite::GetMode(
ElementsKind boilerplate_elements_kind) {
if (FLAG_pretenuring_call_new ||
IsFastSmiElementsKind(boilerplate_elements_kind)) {
return TRACK_ALLOCATION_SITE;
}
return DONT_TRACK_ALLOCATION_SITE;
}
AllocationSiteMode AllocationSite::GetMode(ElementsKind from,
ElementsKind to) {
if (FLAG_pretenuring_call_new ||
(IsFastSmiElementsKind(from) &&
IsMoreGeneralElementsKindTransition(from, to))) {
return TRACK_ALLOCATION_SITE;
}
return DONT_TRACK_ALLOCATION_SITE;
}
inline bool AllocationSite::CanTrack(InstanceType type) {
if (FLAG_allocation_site_pretenuring) {
return type == JS_ARRAY_TYPE ||
type == JS_OBJECT_TYPE ||
type < FIRST_NONSTRING_TYPE;
}
return type == JS_ARRAY_TYPE;
}
inline DependentCode::DependencyGroup AllocationSite::ToDependencyGroup(
Reason reason) {
switch (reason) {
case TENURING:
return DependentCode::kAllocationSiteTenuringChangedGroup;
break;
case TRANSITIONS:
return DependentCode::kAllocationSiteTransitionChangedGroup;
break;
}
UNREACHABLE();
return DependentCode::kAllocationSiteTransitionChangedGroup;
}
inline void AllocationSite::set_memento_found_count(int count) {
int value = pretenure_data()->value();
// Verify that we can count more mementos than we can possibly find in one
// new space collection.
DCHECK((GetHeap()->MaxSemiSpaceSize() /
(StaticVisitorBase::kMinObjectSizeInWords * kPointerSize +
AllocationMemento::kSize)) < MementoFoundCountBits::kMax);
DCHECK(count < MementoFoundCountBits::kMax);
set_pretenure_data(
Smi::FromInt(MementoFoundCountBits::update(value, count)),
SKIP_WRITE_BARRIER);
}
inline bool AllocationSite::IncrementMementoFoundCount() {
if (IsZombie()) return false;
int value = memento_found_count();
set_memento_found_count(value + 1);
return memento_found_count() == kPretenureMinimumCreated;
}
inline void AllocationSite::IncrementMementoCreateCount() {
DCHECK(FLAG_allocation_site_pretenuring);
int value = memento_create_count();
set_memento_create_count(value + 1);
}
inline bool AllocationSite::MakePretenureDecision(
PretenureDecision current_decision,
double ratio,
bool maximum_size_scavenge) {
// Here we just allow state transitions from undecided or maybe tenure
// to don't tenure, maybe tenure, or tenure.
if ((current_decision == kUndecided || current_decision == kMaybeTenure)) {
if (ratio >= kPretenureRatio) {
// We just transition into tenure state when the semi-space was at
// maximum capacity.
if (maximum_size_scavenge) {
set_deopt_dependent_code(true);
set_pretenure_decision(kTenure);
// Currently we just need to deopt when we make a state transition to
// tenure.
return true;
}
set_pretenure_decision(kMaybeTenure);
} else {
set_pretenure_decision(kDontTenure);
}
}
return false;
}
inline bool AllocationSite::DigestPretenuringFeedback(
bool maximum_size_scavenge) {
bool deopt = false;
int create_count = memento_create_count();
int found_count = memento_found_count();
bool minimum_mementos_created = create_count >= kPretenureMinimumCreated;
double ratio =
minimum_mementos_created || FLAG_trace_pretenuring_statistics ?
static_cast<double>(found_count) / create_count : 0.0;
PretenureDecision current_decision = pretenure_decision();
if (minimum_mementos_created) {
deopt = MakePretenureDecision(
current_decision, ratio, maximum_size_scavenge);
}
if (FLAG_trace_pretenuring_statistics) {
PrintF(
"AllocationSite(%p): (created, found, ratio) (%d, %d, %f) %s => %s\n",
static_cast<void*>(this), create_count, found_count, ratio,
PretenureDecisionName(current_decision),
PretenureDecisionName(pretenure_decision()));
}
// Clear feedback calculation fields until the next gc.
set_memento_found_count(0);
set_memento_create_count(0);
return deopt;
}
void JSObject::EnsureCanContainHeapObjectElements(Handle<JSObject> object) {
JSObject::ValidateElements(object);
ElementsKind elements_kind = object->map()->elements_kind();
if (!IsFastObjectElementsKind(elements_kind)) {
if (IsFastHoleyElementsKind(elements_kind)) {
TransitionElementsKind(object, FAST_HOLEY_ELEMENTS);
} else {
TransitionElementsKind(object, FAST_ELEMENTS);
}
}
}
void JSObject::EnsureCanContainElements(Handle<JSObject> object,
Object** objects,
uint32_t count,
EnsureElementsMode mode) {
ElementsKind current_kind = object->map()->elements_kind();
ElementsKind target_kind = current_kind;
{
DisallowHeapAllocation no_allocation;
DCHECK(mode != ALLOW_COPIED_DOUBLE_ELEMENTS);
bool is_holey = IsFastHoleyElementsKind(current_kind);
if (current_kind == FAST_HOLEY_ELEMENTS) return;
Heap* heap = object->GetHeap();
Object* the_hole = heap->the_hole_value();
for (uint32_t i = 0; i < count; ++i) {
Object* current = *objects++;
if (current == the_hole) {
is_holey = true;
target_kind = GetHoleyElementsKind(target_kind);
} else if (!current->IsSmi()) {
if (mode == ALLOW_CONVERTED_DOUBLE_ELEMENTS && current->IsNumber()) {
if (IsFastSmiElementsKind(target_kind)) {
if (is_holey) {
target_kind = FAST_HOLEY_DOUBLE_ELEMENTS;
} else {
target_kind = FAST_DOUBLE_ELEMENTS;
}
}
} else if (is_holey) {
target_kind = FAST_HOLEY_ELEMENTS;
break;
} else {
target_kind = FAST_ELEMENTS;
}
}
}
}
if (target_kind != current_kind) {
TransitionElementsKind(object, target_kind);
}
}
void JSObject::EnsureCanContainElements(Handle<JSObject> object,
Handle<FixedArrayBase> elements,
uint32_t length,
EnsureElementsMode mode) {
Heap* heap = object->GetHeap();
if (elements->map() != heap->fixed_double_array_map()) {
DCHECK(elements->map() == heap->fixed_array_map() ||
elements->map() == heap->fixed_cow_array_map());
if (mode == ALLOW_COPIED_DOUBLE_ELEMENTS) {
mode = DONT_ALLOW_DOUBLE_ELEMENTS;
}
Object** objects =
Handle<FixedArray>::cast(elements)->GetFirstElementAddress();
EnsureCanContainElements(object, objects, length, mode);
return;
}
DCHECK(mode == ALLOW_COPIED_DOUBLE_ELEMENTS);
if (object->GetElementsKind() == FAST_HOLEY_SMI_ELEMENTS) {
TransitionElementsKind(object, FAST_HOLEY_DOUBLE_ELEMENTS);
} else if (object->GetElementsKind() == FAST_SMI_ELEMENTS) {
Handle<FixedDoubleArray> double_array =
Handle<FixedDoubleArray>::cast(elements);
for (uint32_t i = 0; i < length; ++i) {
if (double_array->is_the_hole(i)) {
TransitionElementsKind(object, FAST_HOLEY_DOUBLE_ELEMENTS);
return;
}
}
TransitionElementsKind(object, FAST_DOUBLE_ELEMENTS);
}
}
void JSObject::SetMapAndElements(Handle<JSObject> object,
Handle<Map> new_map,
Handle<FixedArrayBase> value) {
JSObject::MigrateToMap(object, new_map);
DCHECK((object->map()->has_fast_smi_or_object_elements() ||
(*value == object->GetHeap()->empty_fixed_array())) ==
(value->map() == object->GetHeap()->fixed_array_map() ||
value->map() == object->GetHeap()->fixed_cow_array_map()));
DCHECK((*value == object->GetHeap()->empty_fixed_array()) ||
(object->map()->has_fast_double_elements() ==
value->IsFixedDoubleArray()));
object->set_elements(*value);
}
void JSObject::set_elements(FixedArrayBase* value, WriteBarrierMode mode) {
WRITE_FIELD(this, kElementsOffset, value);
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kElementsOffset, value, mode);
}
void JSObject::initialize_properties() {
DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array()));
WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array());
}
void JSObject::initialize_elements() {
FixedArrayBase* elements = map()->GetInitialElements();
WRITE_FIELD(this, kElementsOffset, elements);
}
Handle<String> Map::ExpectedTransitionKey(Handle<Map> map) {
DisallowHeapAllocation no_gc;
if (!map->HasTransitionArray()) return Handle<String>::null();
TransitionArray* transitions = map->transitions();
if (!transitions->IsSimpleTransition()) return Handle<String>::null();
int transition = TransitionArray::kSimpleTransitionIndex;
PropertyDetails details = transitions->GetTargetDetails(transition);
Name* name = transitions->GetKey(transition);
if (details.type() != FIELD) return Handle<String>::null();
if (details.attributes() != NONE) return Handle<String>::null();
if (!name->IsString()) return Handle<String>::null();
return Handle<String>(String::cast(name));
}
Handle<Map> Map::ExpectedTransitionTarget(Handle<Map> map) {
DCHECK(!ExpectedTransitionKey(map).is_null());
return Handle<Map>(map->transitions()->GetTarget(
TransitionArray::kSimpleTransitionIndex));
}
Handle<Map> Map::FindTransitionToField(Handle<Map> map, Handle<Name> key) {
DisallowHeapAllocation no_allocation;
if (!map->HasTransitionArray()) return Handle<Map>::null();
TransitionArray* transitions = map->transitions();
int transition = transitions->Search(FIELD, *key, NONE);
if (transition == TransitionArray::kNotFound) return Handle<Map>::null();
PropertyDetails details = transitions->GetTargetDetails(transition);
if (details.type() != FIELD) return Handle<Map>::null();
DCHECK_EQ(NONE, details.attributes());
return Handle<Map>(transitions->GetTarget(transition));
}
ACCESSORS(Oddball, to_string, String, kToStringOffset)
ACCESSORS(Oddball, to_number, Object, kToNumberOffset)
byte Oddball::kind() const {
return Smi::cast(READ_FIELD(this, kKindOffset))->value();
}
void Oddball::set_kind(byte value) {
WRITE_FIELD(this, kKindOffset, Smi::FromInt(value));
}
Object* Cell::value() const {
return READ_FIELD(this, kValueOffset);
}
void Cell::set_value(Object* val, WriteBarrierMode ignored) {
// The write barrier is not used for global property cells.
DCHECK(!val->IsPropertyCell() && !val->IsCell());
WRITE_FIELD(this, kValueOffset, val);
}
ACCESSORS(PropertyCell, dependent_code, DependentCode, kDependentCodeOffset)
Object* PropertyCell::type_raw() const {
return READ_FIELD(this, kTypeOffset);
}
void PropertyCell::set_type_raw(Object* val, WriteBarrierMode ignored) {
WRITE_FIELD(this, kTypeOffset, val);
}
Object* WeakCell::value() const { return READ_FIELD(this, kValueOffset); }
void WeakCell::clear() {
DCHECK(GetHeap()->gc_state() == Heap::MARK_COMPACT);
WRITE_FIELD(this, kValueOffset, Smi::FromInt(0));
}
void WeakCell::initialize(HeapObject* val) {
WRITE_FIELD(this, kValueOffset, val);
WRITE_BARRIER(GetHeap(), this, kValueOffset, val);
}
bool WeakCell::cleared() const { return value() == Smi::FromInt(0); }
Object* WeakCell::next() const { return READ_FIELD(this, kNextOffset); }
void WeakCell::set_next(Object* val, WriteBarrierMode mode) {
WRITE_FIELD(this, kNextOffset, val);
if (mode == UPDATE_WRITE_BARRIER) {
WRITE_BARRIER(GetHeap(), this, kNextOffset, val);
}
}
int JSObject::GetHeaderSize() {
InstanceType type = map()->instance_type();
// Check for the most common kind of JavaScript object before
// falling into the generic switch. This speeds up the internal
// field operations considerably on average.
if (type == JS_OBJECT_TYPE) return JSObject::kHeaderSize;
switch (type) {
case JS_GENERATOR_OBJECT_TYPE:
return JSGeneratorObject::kSize;
case JS_MODULE_TYPE:
return JSModule::kSize;
case JS_GLOBAL_PROXY_TYPE:
return JSGlobalProxy::kSize;
case JS_GLOBAL_OBJECT_TYPE:
return JSGlobalObject::kSize;
case JS_BUILTINS_OBJECT_TYPE:
return JSBuiltinsObject::kSize;
case JS_FUNCTION_TYPE:
return JSFunction::kSize;
case JS_VALUE_TYPE:
return JSValue::kSize;
case JS_DATE_TYPE:
return JSDate::kSize;
case JS_ARRAY_TYPE:
return JSArray::kSize;
case JS_ARRAY_BUFFER_TYPE:
return JSArrayBuffer::kSize;
case JS_TYPED_ARRAY_TYPE:
return JSTypedArray::kSize;
case JS_DATA_VIEW_TYPE:
return JSDataView::kSize;
case JS_SET_TYPE:
return JSSet::kSize;
case JS_MAP_TYPE:
return JSMap::kSize;
case JS_SET_ITERATOR_TYPE:
return JSSetIterator::kSize;
case JS_MAP_ITERATOR_TYPE:
return JSMapIterator::kSize;
case JS_WEAK_MAP_TYPE:
return JSWeakMap::kSize;
case JS_WEAK_SET_TYPE:
return JSWeakSet::kSize;
case JS_REGEXP_TYPE:
return JSRegExp::kSize;
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
return JSObject::kHeaderSize;
case JS_MESSAGE_OBJECT_TYPE:
return JSMessageObject::kSize;
default:
// TODO(jkummerow): Re-enable this. Blink currently hits this
// from its CustomElementConstructorBuilder.
// UNREACHABLE();
return 0;
}
}
int JSObject::GetInternalFieldCount() {
DCHECK(1 << kPointerSizeLog2 == kPointerSize);
// Make sure to adjust for the number of in-object properties. These
// properties do contribute to the size, but are not internal fields.
return ((Size() - GetHeaderSize()) >> kPointerSizeLog2) -
map()->inobject_properties();
}
int JSObject::GetInternalFieldOffset(int index) {
DCHECK(index < GetInternalFieldCount() && index >= 0);
return GetHeaderSize() + (kPointerSize * index);
}
Object* JSObject::GetInternalField(int index) {
DCHECK(index < GetInternalFieldCount() && index >= 0);
// Internal objects do follow immediately after the header, whereas in-object
// properties are at the end of the object. Therefore there is no need
// to adjust the index here.
return READ_FIELD(this, GetHeaderSize() + (kPointerSize * index));
}
void JSObject::SetInternalField(int index, Object* value) {
DCHECK(index < GetInternalFieldCount() && index >= 0);
// Internal objects do follow immediately after the header, whereas in-object
// properties are at the end of the object. Therefore there is no need
// to adjust the index here.
int offset = GetHeaderSize() + (kPointerSize * index);
WRITE_FIELD(this, offset, value);
WRITE_BARRIER(GetHeap(), this, offset, value);
}
void JSObject::SetInternalField(int index, Smi* value) {
DCHECK(index < GetInternalFieldCount() && index >= 0);
// Internal objects do follow immediately after the header, whereas in-object
// properties are at the end of the object. Therefore there is no need
// to adjust the index here.
int offset = GetHeaderSize() + (kPointerSize * index);
WRITE_FIELD(this, offset, value);
}
bool JSObject::IsUnboxedDoubleField(FieldIndex index) {
if (!FLAG_unbox_double_fields) return false;
return map()->IsUnboxedDoubleField(index);
}
bool Map::IsUnboxedDoubleField(FieldIndex index) {
if (!FLAG_unbox_double_fields) return false;
if (index.is_hidden_field() || !index.is_inobject()) return false;
return !layout_descriptor()->IsTagged(index.property_index());
}
// Access fast-case object properties at index. The use of these routines
// is needed to correctly distinguish between properties stored in-object and
// properties stored in the properties array.
Object* JSObject::RawFastPropertyAt(FieldIndex index) {
DCHECK(!IsUnboxedDoubleField(index));
if (index.is_inobject()) {
return READ_FIELD(this, index.offset());
} else {
return properties()->get(index.outobject_array_index());
}
}
double JSObject::RawFastDoublePropertyAt(FieldIndex index) {
DCHECK(IsUnboxedDoubleField(index));
return READ_DOUBLE_FIELD(this, index.offset());
}
void JSObject::RawFastPropertyAtPut(FieldIndex index, Object* value) {
if (index.is_inobject()) {
int offset = index.offset();
WRITE_FIELD(this, offset, value);
WRITE_BARRIER(GetHeap(), this, offset, value);
} else {
properties()->set(index.outobject_array_index(), value);
}
}
void JSObject::RawFastDoublePropertyAtPut(FieldIndex index, double value) {
WRITE_DOUBLE_FIELD(this, index.offset(), value);
}
void JSObject::FastPropertyAtPut(FieldIndex index, Object* value) {
if (IsUnboxedDoubleField(index)) {
DCHECK(value->IsMutableHeapNumber());
RawFastDoublePropertyAtPut(index, HeapNumber::cast(value)->value());
} else {
RawFastPropertyAtPut(index, value);
}
}
int JSObject::GetInObjectPropertyOffset(int index) {
return map()->GetInObjectPropertyOffset(index);
}
Object* JSObject::InObjectPropertyAt(int index) {
int offset = GetInObjectPropertyOffset(index);
return READ_FIELD(this, offset);
}
Object* JSObject::InObjectPropertyAtPut(int index,
Object* value,
WriteBarrierMode mode) {
// Adjust for the number of properties stored in the object.
int offset = GetInObjectPropertyOffset(index);
WRITE_FIELD(this, offset, value);
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, offset, value, mode);
return value;
}
void JSObject::InitializeBody(Map* map,
Object* pre_allocated_value,
Object* filler_value) {
DCHECK(!filler_value->IsHeapObject() ||
!GetHeap()->InNewSpace(filler_value));
DCHECK(!pre_allocated_value->IsHeapObject() ||
!GetHeap()->InNewSpace(pre_allocated_value));
int size = map->instance_size();
int offset = kHeaderSize;
if (filler_value != pre_allocated_value) {
int pre_allocated = map->pre_allocated_property_fields();
DCHECK(pre_allocated * kPointerSize + kHeaderSize <= size);
for (int i = 0; i < pre_allocated; i++) {
WRITE_FIELD(this, offset, pre_allocated_value);
offset += kPointerSize;
}
}
while (offset < size) {
WRITE_FIELD(this, offset, filler_value);
offset += kPointerSize;
}
}
bool JSObject::HasFastProperties() {
DCHECK(properties()->IsDictionary() == map()->is_dictionary_map());
return !properties()->IsDictionary();
}
bool Map::TooManyFastProperties(StoreFromKeyed store_mode) {
if (unused_property_fields() != 0) return false;
if (is_prototype_map()) return false;
int minimum = store_mode == CERTAINLY_NOT_STORE_FROM_KEYED ? 128 : 12;
int limit = Max(minimum, inobject_properties());
int external = NumberOfFields() - inobject_properties();
return external > limit;
}
void Struct::InitializeBody(int object_size) {
Object* value = GetHeap()->undefined_value();
for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) {
WRITE_FIELD(this, offset, value);
}
}
bool Object::ToArrayIndex(uint32_t* index) {
if (IsSmi()) {
int value = Smi::cast(this)->value();
if (value < 0) return false;
*index = value;
return true;
}
if (IsHeapNumber()) {
double value = HeapNumber::cast(this)->value();
uint32_t uint_value = static_cast<uint32_t>(value);
if (value == static_cast<double>(uint_value)) {
*index = uint_value;
return true;
}
}
return false;
}
bool Object::IsStringObjectWithCharacterAt(uint32_t index) {
if (!this->IsJSValue()) return false;
JSValue* js_value = JSValue::cast(this);
if (!js_value->value()->IsString()) return false;
String* str = String::cast(js_value->value());
if (index >= static_cast<uint32_t>(str->length())) return false;
return true;
}
void Object::VerifyApiCallResultType() {
#if ENABLE_EXTRA_CHECKS
if (!(IsSmi() ||
IsString() ||
IsSymbol() ||
IsSpecObject() ||
IsHeapNumber() ||
IsUndefined() ||
IsTrue() ||
IsFalse() ||
IsNull())) {
FATAL("API call returned invalid object");
}
#endif // ENABLE_EXTRA_CHECKS
}
Object* FixedArray::get(int index) const {
SLOW_DCHECK(index >= 0 && index < this->length());
return READ_FIELD(this, kHeaderSize + index * kPointerSize);
}
Handle<Object> FixedArray::get(Handle<FixedArray> array, int index) {
return handle(array->get(index), array->GetIsolate());
}
bool FixedArray::is_the_hole(int index) {
return get(index) == GetHeap()->the_hole_value();
}
void FixedArray::set(int index, Smi* value) {
DCHECK(map() != GetHeap()->fixed_cow_array_map());
DCHECK(index >= 0 && index < this->length());
DCHECK(reinterpret_cast<Object*>(value)->IsSmi());
int offset = kHeaderSize + index * kPointerSize;
WRITE_FIELD(this, offset, value);
}
void FixedArray::set(int index, Object* value) {
DCHECK_NE(GetHeap()->fixed_cow_array_map(), map());
DCHECK_EQ(FIXED_ARRAY_TYPE, map()->instance_type());
DCHECK(index >= 0 && index < this->length());
int offset = kHeaderSize + index * kPointerSize;
WRITE_FIELD(this, offset, value);
WRITE_BARRIER(GetHeap(), this, offset, value);
}
inline bool FixedDoubleArray::is_the_hole_nan(double value) {
return bit_cast<uint64_t, double>(value) == kHoleNanInt64;
}
inline double FixedDoubleArray::hole_nan_as_double() {
return bit_cast<double, uint64_t>(kHoleNanInt64);
}
inline double FixedDoubleArray::canonical_not_the_hole_nan_as_double() {
DCHECK(bit_cast<uint64_t>(base::OS::nan_value()) != kHoleNanInt64);
DCHECK((bit_cast<uint64_t>(base::OS::nan_value()) >> 32) != kHoleNanUpper32);
return base::OS::nan_value();
}
double FixedDoubleArray::get_scalar(int index) {
DCHECK(map() != GetHeap()->fixed_cow_array_map() &&
map() != GetHeap()->fixed_array_map());
DCHECK(index >= 0 && index < this->length());
double result = READ_DOUBLE_FIELD(this, kHeaderSize + index * kDoubleSize);
DCHECK(!is_the_hole_nan(result));
return result;
}
int64_t FixedDoubleArray::get_representation(int index) {
DCHECK(map() != GetHeap()->fixed_cow_array_map() &&
map() != GetHeap()->fixed_array_map());
DCHECK(index >= 0 && index < this->length());
return READ_INT64_FIELD(this, kHeaderSize + index * kDoubleSize);
}
Handle<Object> FixedDoubleArray::get(Handle<FixedDoubleArray> array,
int index) {
if (array->is_the_hole(index)) {
return array->GetIsolate()->factory()->the_hole_value();
} else {
return array->GetIsolate()->factory()->NewNumber(array->get_scalar(index));
}
}
void FixedDoubleArray::set(int index, double value) {
DCHECK(map() != GetHeap()->fixed_cow_array_map() &&
map() != GetHeap()->fixed_array_map());
int offset = kHeaderSize + index * kDoubleSize;
if (std::isnan(value)) value = canonical_not_the_hole_nan_as_double();
WRITE_DOUBLE_FIELD(this, offset, value);
}
void FixedDoubleArray::set_the_hole(int index) {
DCHECK(map() != GetHeap()->fixed_cow_array_map() &&
map() != GetHeap()->fixed_array_map());
int offset = kHeaderSize + index * kDoubleSize;
WRITE_DOUBLE_FIELD(this, offset, hole_nan_as_double());
}
bool FixedDoubleArray::is_the_hole(int index) {
int offset = kHeaderSize + index * kDoubleSize;
return is_the_hole_nan(READ_DOUBLE_FIELD(this, offset));
}
double* FixedDoubleArray::data_start() {
return reinterpret_cast<double*>(FIELD_ADDR(this, kHeaderSize));
}
void FixedDoubleArray::FillWithHoles(int from, int to) {
for (int i = from; i < to; i++) {
set_the_hole(i);
}
}
void ConstantPoolArray::NumberOfEntries::increment(Type type) {
DCHECK(type < NUMBER_OF_TYPES);
element_counts_[type]++;
}
int ConstantPoolArray::NumberOfEntries::equals(
const ConstantPoolArray::NumberOfEntries& other) const {
for (int i = 0; i < NUMBER_OF_TYPES; i++) {
if (element_counts_[i] != other.element_counts_[i]) return false;
}
return true;
}
bool ConstantPoolArray::NumberOfEntries::is_empty() const {
return total_count() == 0;
}
int ConstantPoolArray::NumberOfEntries::count_of(Type type) const {
DCHECK(type < NUMBER_OF_TYPES);
return element_counts_[type];
}
int ConstantPoolArray::NumberOfEntries::base_of(Type type) const {
int base = 0;
DCHECK(type < NUMBER_OF_TYPES);
for (int i = 0; i < type; i++) {
base += element_counts_[i];
}
return base;
}
int ConstantPoolArray::NumberOfEntries::total_count() const {
int count = 0;
for (int i = 0; i < NUMBER_OF_TYPES; i++) {
count += element_counts_[i];
}
return count;
}
int ConstantPoolArray::NumberOfEntries::are_in_range(int min, int max) const {
for (int i = FIRST_TYPE; i < NUMBER_OF_TYPES; i++) {
if (element_counts_[i] < min || element_counts_[i] > max) {
return false;
}
}
return true;
}
int ConstantPoolArray::Iterator::next_index() {
DCHECK(!is_finished());
int ret = next_index_++;
update_section();
return ret;
}
bool ConstantPoolArray::Iterator::is_finished() {
return next_index_ > array_->last_index(type_, final_section_);
}
void ConstantPoolArray::Iterator::update_section() {
if (next_index_ > array_->last_index(type_, current_section_) &&
current_section_ != final_section_) {
DCHECK(final_section_ == EXTENDED_SECTION);
current_section_ = EXTENDED_SECTION;
next_index_ = array_->first_index(type_, EXTENDED_SECTION);
}
}
bool ConstantPoolArray::is_extended_layout() {
uint32_t small_layout_1 = READ_UINT32_FIELD(this, kSmallLayout1Offset);
return IsExtendedField::decode(small_layout_1);
}
ConstantPoolArray::LayoutSection ConstantPoolArray::final_section() {
return is_extended_layout() ? EXTENDED_SECTION : SMALL_SECTION;
}
int ConstantPoolArray::first_extended_section_index() {
DCHECK(is_extended_layout());
uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset);
return TotalCountField::decode(small_layout_2);
}
int ConstantPoolArray::get_extended_section_header_offset() {
return RoundUp(SizeFor(NumberOfEntries(this, SMALL_SECTION)), kInt64Size);
}
ConstantPoolArray::WeakObjectState ConstantPoolArray::get_weak_object_state() {
uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset);
return WeakObjectStateField::decode(small_layout_2);
}
void ConstantPoolArray::set_weak_object_state(
ConstantPoolArray::WeakObjectState state) {
uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset);
small_layout_2 = WeakObjectStateField::update(small_layout_2, state);
WRITE_INT32_FIELD(this, kSmallLayout2Offset, small_layout_2);
}
int ConstantPoolArray::first_index(Type type, LayoutSection section) {
int index = 0;
if (section == EXTENDED_SECTION) {
DCHECK(is_extended_layout());
index += first_extended_section_index();
}
for (Type type_iter = FIRST_TYPE; type_iter < type;
type_iter = next_type(type_iter)) {
index += number_of_entries(type_iter, section);
}
return index;
}
int ConstantPoolArray::last_index(Type type, LayoutSection section) {
return first_index(type, section) + number_of_entries(type, section) - 1;
}
int ConstantPoolArray::number_of_entries(Type type, LayoutSection section) {
if (section == SMALL_SECTION) {
uint32_t small_layout_1 = READ_UINT32_FIELD(this, kSmallLayout1Offset);
uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset);
switch (type) {
case INT64:
return Int64CountField::decode(small_layout_1);
case CODE_PTR:
return CodePtrCountField::decode(small_layout_1);
case HEAP_PTR:
return HeapPtrCountField::decode(small_layout_1);
case INT32:
return Int32CountField::decode(small_layout_2);
default:
UNREACHABLE();
return 0;
}
} else {
DCHECK(section == EXTENDED_SECTION && is_extended_layout());
int offset = get_extended_section_header_offset();
switch (type) {
case INT64:
offset += kExtendedInt64CountOffset;
break;
case CODE_PTR:
offset += kExtendedCodePtrCountOffset;
break;
case HEAP_PTR:
offset += kExtendedHeapPtrCountOffset;
break;
case INT32:
offset += kExtendedInt32CountOffset;
break;
default:
UNREACHABLE();
}
return READ_INT_FIELD(this, offset);
}
}
bool ConstantPoolArray::offset_is_type(int offset, Type type) {
return (offset >= OffsetOfElementAt(first_index(type, SMALL_SECTION)) &&
offset <= OffsetOfElementAt(last_index(type, SMALL_SECTION))) ||
(is_extended_layout() &&
offset >= OffsetOfElementAt(first_index(type, EXTENDED_SECTION)) &&
offset <= OffsetOfElementAt(last_index(type, EXTENDED_SECTION)));
}
ConstantPoolArray::Type ConstantPoolArray::get_type(int index) {
LayoutSection section;
if (is_extended_layout() && index >= first_extended_section_index()) {
section = EXTENDED_SECTION;
} else {
section = SMALL_SECTION;
}
Type type = FIRST_TYPE;
while (index > last_index(type, section)) {
type = next_type(type);
}
DCHECK(type <= LAST_TYPE);
return type;
}
int64_t ConstantPoolArray::get_int64_entry(int index) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == INT64);
return READ_INT64_FIELD(this, OffsetOfElementAt(index));
}
double ConstantPoolArray::get_int64_entry_as_double(int index) {
STATIC_ASSERT(kDoubleSize == kInt64Size);
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == INT64);
return READ_DOUBLE_FIELD(this, OffsetOfElementAt(index));
}
Address ConstantPoolArray::get_code_ptr_entry(int index) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == CODE_PTR);
return reinterpret_cast<Address>(READ_FIELD(this, OffsetOfElementAt(index)));
}
Object* ConstantPoolArray::get_heap_ptr_entry(int index) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == HEAP_PTR);
return READ_FIELD(this, OffsetOfElementAt(index));
}
int32_t ConstantPoolArray::get_int32_entry(int index) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == INT32);
return READ_INT32_FIELD(this, OffsetOfElementAt(index));
}
void ConstantPoolArray::set(int index, int64_t value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == INT64);
WRITE_INT64_FIELD(this, OffsetOfElementAt(index), value);
}
void ConstantPoolArray::set(int index, double value) {
STATIC_ASSERT(kDoubleSize == kInt64Size);
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == INT64);
WRITE_DOUBLE_FIELD(this, OffsetOfElementAt(index), value);
}
void ConstantPoolArray::set(int index, Address value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == CODE_PTR);
WRITE_FIELD(this, OffsetOfElementAt(index), reinterpret_cast<Object*>(value));
}
void ConstantPoolArray::set(int index, Object* value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(!GetHeap()->InNewSpace(value));
DCHECK(get_type(index) == HEAP_PTR);
WRITE_FIELD(this, OffsetOfElementAt(index), value);
WRITE_BARRIER(GetHeap(), this, OffsetOfElementAt(index), value);
}
void ConstantPoolArray::set(int index, int32_t value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(get_type(index) == INT32);
WRITE_INT32_FIELD(this, OffsetOfElementAt(index), value);
}
void ConstantPoolArray::set_at_offset(int offset, int32_t value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(offset_is_type(offset, INT32));
WRITE_INT32_FIELD(this, offset, value);
}
void ConstantPoolArray::set_at_offset(int offset, int64_t value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(offset_is_type(offset, INT64));
WRITE_INT64_FIELD(this, offset, value);
}
void ConstantPoolArray::set_at_offset(int offset, double value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(offset_is_type(offset, INT64));
WRITE_DOUBLE_FIELD(this, offset, value);
}
void ConstantPoolArray::set_at_offset(int offset, Address value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(offset_is_type(offset, CODE_PTR));
WRITE_FIELD(this, offset, reinterpret_cast<Object*>(value));
WRITE_BARRIER(GetHeap(), this, offset, reinterpret_cast<Object*>(value));
}
void ConstantPoolArray::set_at_offset(int offset, Object* value) {
DCHECK(map() == GetHeap()->constant_pool_array_map());
DCHECK(!GetHeap()->InNewSpace(value));
DCHECK(offset_is_type(offset, HEAP_PTR));
WRITE_FIELD(this, offset, value);
WRITE_BARRIER(GetHeap(), this, offset, value);
}
void ConstantPoolArray::Init(const NumberOfEntries& small) {
uint32_t small_layout_1 =
Int64CountField::encode(small.count_of(INT64)) |
CodePtrCountField::encode(small.count_of(CODE_PTR)) |
HeapPtrCountField::encode(small.count_of(HEAP_PTR)) |
IsExtendedField::encode(false);
uint32_t small_layout_2 =
Int32CountField::encode(small.count_of(INT32)) |
TotalCountField::encode(small.total_count()) |
WeakObjectStateField::encode(NO_WEAK_OBJECTS);
WRITE_UINT32_FIELD(this, kSmallLayout1Offset, small_layout_1);
WRITE_UINT32_FIELD(this, kSmallLayout2Offset, small_layout_2);
if (kHeaderSize != kFirstEntryOffset) {
DCHECK(kFirstEntryOffset - kHeaderSize == kInt32Size);
WRITE_UINT32_FIELD(this, kHeaderSize, 0); // Zero out header padding.
}
}
void ConstantPoolArray::InitExtended(const NumberOfEntries& small,
const NumberOfEntries& extended) {
// Initialize small layout fields first.
Init(small);
// Set is_extended_layout field.
uint32_t small_layout_1 = READ_UINT32_FIELD(this, kSmallLayout1Offset);
small_layout_1 = IsExtendedField::update(small_layout_1, true);
WRITE_INT32_FIELD(this, kSmallLayout1Offset, small_layout_1);
// Initialize the extended layout fields.
int extended_header_offset = get_extended_section_header_offset();
WRITE_INT32_FIELD(this, extended_header_offset + kExtendedInt64CountOffset,
extended.count_of(INT64));
WRITE_INT32_FIELD(this, extended_header_offset + kExtendedCodePtrCountOffset,
extended.count_of(CODE_PTR));
WRITE_INT32_FIELD(this, extended_header_offset + kExtendedHeapPtrCountOffset,
extended.count_of(HEAP_PTR));
WRITE_INT32_FIELD(this, extended_header_offset + kExtendedInt32CountOffset,
extended.count_of(INT32));
}
int ConstantPoolArray::size() {
NumberOfEntries small(this, SMALL_SECTION);
if (!is_extended_layout()) {
return SizeFor(small);
} else {
NumberOfEntries extended(this, EXTENDED_SECTION);
return SizeForExtended(small, extended);
}
}
int ConstantPoolArray::length() {
uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset);
int length = TotalCountField::decode(small_layout_2);
if (is_extended_layout()) {
length += number_of_entries(INT64, EXTENDED_SECTION) +
number_of_entries(CODE_PTR, EXTENDED_SECTION) +
number_of_entries(HEAP_PTR, EXTENDED_SECTION) +
number_of_entries(INT32, EXTENDED_SECTION);
}
return length;
}
WriteBarrierMode HeapObject::GetWriteBarrierMode(
const DisallowHeapAllocation& promise) {
Heap* heap = GetHeap();
if (heap->incremental_marking()->IsMarking()) return UPDATE_WRITE_BARRIER;
if (heap->InNewSpace(this)) return SKIP_WRITE_BARRIER;
return UPDATE_WRITE_BARRIER;
}
void FixedArray::set(int index,
Object* value,
WriteBarrierMode mode) {
DCHECK(map() != GetHeap()->fixed_cow_array_map());
DCHECK(index >= 0 && index < this->length());
int offset = kHeaderSize + index * kPointerSize;
WRITE_FIELD(this, offset, value);
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, offset, value, mode);
}
void FixedArray::NoIncrementalWriteBarrierSet(FixedArray* array,
int index,
Object* value) {
DCHECK(array->map() != array->GetHeap()->fixed_cow_array_map());
DCHECK(index >= 0 && index < array->length());
int offset = kHeaderSize + index * kPointerSize;
WRITE_FIELD(array, offset, value);
Heap* heap = array->GetHeap();
if (heap->InNewSpace(value)) {
heap->RecordWrite(array->address(), offset);
}
}
void FixedArray::NoWriteBarrierSet(FixedArray* array,
int index,
Object* value) {
DCHECK(array->map() != array->GetHeap()->fixed_cow_array_map());
DCHECK(index >= 0 && index < array->length());
DCHECK(!array->GetHeap()->InNewSpace(value));
WRITE_FIELD(array, kHeaderSize + index * kPointerSize, value);
}
void FixedArray::set_undefined(int index) {
DCHECK(map() != GetHeap()->fixed_cow_array_map());
DCHECK(index >= 0 && index < this->length());
DCHECK(!GetHeap()->InNewSpace(GetHeap()->undefined_value()));
WRITE_FIELD(this,
kHeaderSize + index * kPointerSize,
GetHeap()->undefined_value());
}
void FixedArray::set_null(int index) {
DCHECK(index >= 0 && index < this->length());
DCHECK(!GetHeap()->InNewSpace(GetHeap()->null_value()));
WRITE_FIELD(this,
kHeaderSize + index * kPointerSize,
GetHeap()->null_value());
}
void FixedArray::set_the_hole(int index) {
DCHECK(map() != GetHeap()->fixed_cow_array_map());
DCHECK(index >= 0 && index < this->length());
DCHECK(!GetHeap()->InNewSpace(GetHeap()->the_hole_value()));
WRITE_FIELD(this,
kHeaderSize + index * kPointerSize,
GetHeap()->the_hole_value());
}
void FixedArray::FillWithHoles(int from, int to) {
for (int i = from; i < to; i++) {
set_the_hole(i);
}
}
Object** FixedArray::data_start() {
return HeapObject::RawField(this, kHeaderSize);
}
bool DescriptorArray::IsEmpty() {
DCHECK(length() >= kFirstIndex ||
this == GetHeap()->empty_descriptor_array());
return length() < kFirstIndex;
}
void DescriptorArray::SetNumberOfDescriptors(int number_of_descriptors) {
WRITE_FIELD(
this, kDescriptorLengthOffset, Smi::FromInt(number_of_descriptors));
}
// Perform a binary search in a fixed array. Low and high are entry indices. If
// there are three entries in this array it should be called with low=0 and
// high=2.
template <SearchMode search_mode, typename T>
int BinarySearch(T* array, Name* name, int low, int high, int valid_entries,
int* out_insertion_index) {
DCHECK(search_mode == ALL_ENTRIES || out_insertion_index == NULL);
uint32_t hash = name->Hash();
int limit = high;
DCHECK(low <= high);
while (low != high) {
int mid = (low + high) / 2;
Name* mid_name = array->GetSortedKey(mid);
uint32_t mid_hash = mid_name->Hash();
if (mid_hash >= hash) {
high = mid;
} else {
low = mid + 1;
}
}
for (; low <= limit; ++low) {
int sort_index = array->GetSortedKeyIndex(low);
Name* entry = array->GetKey(sort_index);
uint32_t current_hash = entry->Hash();
if (current_hash != hash) {
if (out_insertion_index != NULL) {
*out_insertion_index = sort_index + (current_hash > hash ? 0 : 1);
}
return T::kNotFound;
}
if (entry->Equals(name)) {
if (search_mode == ALL_ENTRIES || sort_index < valid_entries) {
return sort_index;
}
return T::kNotFound;
}
}
if (out_insertion_index != NULL) *out_insertion_index = limit + 1;
return T::kNotFound;
}
// Perform a linear search in this fixed array. len is the number of entry
// indices that are valid.
template <SearchMode search_mode, typename T>
int LinearSearch(T* array, Name* name, int len, int valid_entries,
int* out_insertion_index) {
uint32_t hash = name->Hash();
if (search_mode == ALL_ENTRIES) {
for (int number = 0; number < len; number++) {
int sorted_index = array->GetSortedKeyIndex(number);
Name* entry = array->GetKey(sorted_index);
uint32_t current_hash = entry->Hash();
if (current_hash > hash) {
if (out_insertion_index != NULL) *out_insertion_index = sorted_index;
return T::kNotFound;
}
if (current_hash == hash && entry->Equals(name)) return sorted_index;
}
if (out_insertion_index != NULL) *out_insertion_index = len;
return T::kNotFound;
} else {
DCHECK(len >= valid_entries);
DCHECK_EQ(NULL, out_insertion_index); // Not supported here.
for (int number = 0; number < valid_entries; number++) {
Name* entry = array->GetKey(number);
uint32_t current_hash = entry->Hash();
if (current_hash == hash && entry->Equals(name)) return number;
}
return T::kNotFound;
}
}
template <SearchMode search_mode, typename T>
int Search(T* array, Name* name, int valid_entries, int* out_insertion_index) {
if (search_mode == VALID_ENTRIES) {
SLOW_DCHECK(array->IsSortedNoDuplicates(valid_entries));
} else {
SLOW_DCHECK(array->IsSortedNoDuplicates());
}
int nof = array->number_of_entries();
if (nof == 0) {
if (out_insertion_index != NULL) *out_insertion_index = 0;
return T::kNotFound;
}
// Fast case: do linear search for small arrays.
const int kMaxElementsForLinearSearch = 8;
if ((search_mode == ALL_ENTRIES &&
nof <= kMaxElementsForLinearSearch) ||
(search_mode == VALID_ENTRIES &&
valid_entries <= (kMaxElementsForLinearSearch * 3))) {
return LinearSearch<search_mode>(array, name, nof, valid_entries,
out_insertion_index);
}
// Slow case: perform binary search.
return BinarySearch<search_mode>(array, name, 0, nof - 1, valid_entries,
out_insertion_index);
}
int DescriptorArray::Search(Name* name, int valid_descriptors) {
return internal::Search<VALID_ENTRIES>(this, name, valid_descriptors, NULL);
}
int DescriptorArray::SearchWithCache(Name* name, Map* map) {
int number_of_own_descriptors = map->NumberOfOwnDescriptors();
if (number_of_own_descriptors == 0) return kNotFound;
DescriptorLookupCache* cache = GetIsolate()->descriptor_lookup_cache();
int number = cache->Lookup(map, name);
if (number == DescriptorLookupCache::kAbsent) {
number = Search(name, number_of_own_descriptors);
cache->Update(map, name, number);
}
return number;
}
PropertyDetails Map::GetLastDescriptorDetails() {
return instance_descriptors()->GetDetails(LastAdded());
}
void Map::LookupDescriptor(JSObject* holder,
Name* name,
LookupResult* result) {
DescriptorArray* descriptors = this->instance_descriptors();
int number = descriptors->SearchWithCache(name, this);
if (number == DescriptorArray::kNotFound) return result->NotFound();
result->DescriptorResult(holder, descriptors->GetDetails(number), number);
}
void Map::LookupTransition(JSObject* holder, Name* name,
PropertyAttributes attributes,
LookupResult* result) {
int transition_index = this->SearchTransition(FIELD, name, attributes);
if (transition_index == TransitionArray::kNotFound) return result->NotFound();
result->TransitionResult(holder, this->GetTransition(transition_index));
}
FixedArrayBase* Map::GetInitialElements() {
if (has_fast_smi_or_object_elements() ||
has_fast_double_elements()) {
DCHECK(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array()));
return GetHeap()->empty_fixed_array();
} else if (has_external_array_elements()) {
ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this);
DCHECK(!GetHeap()->InNewSpace(empty_array));
return empty_array;
} else if (has_fixed_typed_array_elements()) {
FixedTypedArrayBase* empty_array =
GetHeap()->EmptyFixedTypedArrayForMap(this);
DCHECK(!GetHeap()->InNewSpace(empty_array));
return empty_array;
} else {
UNREACHABLE();
}
return NULL;
}
Object** DescriptorArray::GetKeySlot(int descriptor_number) {
DCHECK(descriptor_number < number_of_descriptors());
return RawFieldOfElementAt(ToKeyIndex(descriptor_number));
}
Object** DescriptorArray::GetDescriptorStartSlot(int descriptor_number) {
return GetKeySlot(descriptor_number);
}
Object** DescriptorArray::GetDescriptorEndSlot(int descriptor_number) {
return GetValueSlot(descriptor_number - 1) + 1;
}
Name* DescriptorArray::GetKey(int descriptor_number) {
DCHECK(descriptor_number < number_of_descriptors());
return Name::cast(get(ToKeyIndex(descriptor_number)));
}
int DescriptorArray::GetSortedKeyIndex(int descriptor_number) {
return GetDetails(descriptor_number).pointer();
}
Name* DescriptorArray::GetSortedKey(int descriptor_number) {
return GetKey(GetSortedKeyIndex(descriptor_number));
}
void DescriptorArray::SetSortedKey(int descriptor_index, int pointer) {
PropertyDetails details = GetDetails(descriptor_index);
set(ToDetailsIndex(descriptor_index), details.set_pointer(pointer).AsSmi());
}
void DescriptorArray::SetRepresentation(int descriptor_index,
Representation representation) {
DCHECK(!representation.IsNone());
PropertyDetails details = GetDetails(descriptor_index);
set(ToDetailsIndex(descriptor_index),
details.CopyWithRepresentation(representation).AsSmi());
}
Object** DescriptorArray::GetValueSlot(int descriptor_number) {
DCHECK(descriptor_number < number_of_descriptors());
return RawFieldOfElementAt(ToValueIndex(descriptor_number));
}
int DescriptorArray::GetValueOffset(int descriptor_number) {
return OffsetOfElementAt(ToValueIndex(descriptor_number));
}
Object* DescriptorArray::GetValue(int descriptor_number) {
DCHECK(descriptor_number < number_of_descriptors());
return get(ToValueIndex(descriptor_number));
}
void DescriptorArray::SetValue(int descriptor_index, Object* value) {
set(ToValueIndex(descriptor_index), value);
}
PropertyDetails DescriptorArray::GetDetails(int descriptor_number) {
DCHECK(descriptor_number < number_of_descriptors());
Object* details = get(ToDetailsIndex(descriptor_number));
return PropertyDetails(Smi::cast(details));
}
PropertyType DescriptorArray::GetType(int descriptor_number) {
return GetDetails(descriptor_number).type();
}
int DescriptorArray::GetFieldIndex(int descriptor_number) {
DCHECK(GetDetails(descriptor_number).type() == FIELD);
return GetDetails(descriptor_number).field_index();
}
HeapType* DescriptorArray::GetFieldType(int descriptor_number) {
DCHECK(GetDetails(descriptor_number).type() == FIELD);
return HeapType::cast(GetValue(descriptor_number));
}
Object* DescriptorArray::GetConstant(int descriptor_number) {
return GetValue(descriptor_number);
}
Object* DescriptorArray::GetCallbacksObject(int descriptor_number) {
DCHECK(GetType(descriptor_number) == CALLBACKS);
return GetValue(descriptor_number);
}
AccessorDescriptor* DescriptorArray::GetCallbacks(int descriptor_number) {
DCHECK(GetType(descriptor_number) == CALLBACKS);
Foreign* p = Foreign::cast(GetCallbacksObject(descriptor_number));
return reinterpret_cast<AccessorDescriptor*>(p->foreign_address());
}
void DescriptorArray::Get(int descriptor_number, Descriptor* desc) {
desc->Init(handle(GetKey(descriptor_number), GetIsolate()),
handle(GetValue(descriptor_number), GetIsolate()),
GetDetails(descriptor_number));
}
void DescriptorArray::Set(int descriptor_number,
Descriptor* desc,
const WhitenessWitness&) {
// Range check.
DCHECK(descriptor_number < number_of_descriptors());
NoIncrementalWriteBarrierSet(this,
ToKeyIndex(descriptor_number),
*desc->GetKey());
NoIncrementalWriteBarrierSet(this,
ToValueIndex(descriptor_number),
*desc->GetValue());
NoIncrementalWriteBarrierSet(this, ToDetailsIndex(descriptor_number),
desc->GetDetails().AsSmi());
}
void DescriptorArray::Set(int descriptor_number, Descriptor* desc) {
// Range check.
DCHECK(descriptor_number < number_of_descriptors());
set(ToKeyIndex(descriptor_number), *desc->GetKey());
set(ToValueIndex(descriptor_number), *desc->GetValue());
set(ToDetailsIndex(descriptor_number), desc->GetDetails().AsSmi());
}
void DescriptorArray::Append(Descriptor* desc) {
DisallowHeapAllocation no_gc;
int descriptor_number = number_of_descriptors();
SetNumberOfDescriptors(descriptor_number + 1);
Set(descriptor_number, desc);
uint32_t hash = desc->GetKey()->Hash();
int insertion;
for (insertion = descriptor_number; insertion > 0; --insertion) {
Name* key = GetSortedKey(insertion - 1);
if (key->Hash() <= hash) break;
SetSortedKey(insertion, GetSortedKeyIndex(insertion - 1));
}
SetSortedKey(insertion, descriptor_number);
}
void DescriptorArray::SwapSortedKeys(int first, int second) {
int first_key = GetSortedKeyIndex(first);
SetSortedKey(first, GetSortedKeyIndex(second));
SetSortedKey(second, first_key);
}
DescriptorArray::WhitenessWitness::WhitenessWitness(DescriptorArray* array)
: marking_(array->GetHeap()->incremental_marking()) {
marking_->EnterNoMarkingScope();
DCHECK(!marking_->IsMarking() ||
Marking::Color(array) == Marking::WHITE_OBJECT);
}
DescriptorArray::WhitenessWitness::~WhitenessWitness() {
marking_->LeaveNoMarkingScope();
}
template<typename Derived, typename Shape, typename Key>
int HashTable<Derived, Shape, Key>::ComputeCapacity(int at_least_space_for) {
const int kMinCapacity = 32;
int capacity = base::bits::RoundUpToPowerOfTwo32(at_least_space_for * 2);
if (capacity < kMinCapacity) {
capacity = kMinCapacity; // Guarantee min capacity.
}
return capacity;
}
template<typename Derived, typename Shape, typename Key>
int HashTable<Derived, Shape, Key>::FindEntry(Key key) {
return FindEntry(GetIsolate(), key);
}
// Find entry for key otherwise return kNotFound.
template<typename Derived, typename Shape, typename Key>
int HashTable<Derived, Shape, Key>::FindEntry(Isolate* isolate, Key key) {
uint32_t capacity = Capacity();
uint32_t entry = FirstProbe(HashTable::Hash(key), capacity);
uint32_t count = 1;
// EnsureCapacity will guarantee the hash table is never full.
while (true) {
Object* element = KeyAt(entry);
// Empty entry. Uses raw unchecked accessors because it is called by the
// string table during bootstrapping.
if (element == isolate->heap()->raw_unchecked_undefined_value()) break;
if (element != isolate->heap()->raw_unchecked_the_hole_value() &&
Shape::IsMatch(key, element)) return entry;
entry = NextProbe(entry, count++, capacity);
}
return kNotFound;
}
bool SeededNumberDictionary::requires_slow_elements() {
Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi()) return false;
return 0 !=
(Smi::cast(max_index_object)->value() & kRequiresSlowElementsMask);
}
uint32_t SeededNumberDictionary::max_number_key() {
DCHECK(!requires_slow_elements());
Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi()) return 0;
uint32_t value = static_cast<uint32_t>(Smi::cast(max_index_object)->value());
return value >> kRequiresSlowElementsTagSize;
}
void SeededNumberDictionary::set_requires_slow_elements() {
set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask));
}
// ------------------------------------
// Cast operations
CAST_ACCESSOR(AccessorInfo)
CAST_ACCESSOR(ByteArray)
CAST_ACCESSOR(Cell)
CAST_ACCESSOR(Code)
CAST_ACCESSOR(CodeCacheHashTable)
CAST_ACCESSOR(CompilationCacheTable)
CAST_ACCESSOR(ConsString)
CAST_ACCESSOR(ConstantPoolArray)
CAST_ACCESSOR(DeoptimizationInputData)
CAST_ACCESSOR(DeoptimizationOutputData)
CAST_ACCESSOR(DependentCode)
CAST_ACCESSOR(DescriptorArray)
CAST_ACCESSOR(ExternalArray)
CAST_ACCESSOR(ExternalOneByteString)
CAST_ACCESSOR(ExternalFloat32Array)
CAST_ACCESSOR(ExternalFloat64Array)
CAST_ACCESSOR(ExternalInt16Array)
CAST_ACCESSOR(ExternalInt32Array)
CAST_ACCESSOR(ExternalInt8Array)
CAST_ACCESSOR(ExternalString)
CAST_ACCESSOR(ExternalTwoByteString)
CAST_ACCESSOR(ExternalUint16Array)
CAST_ACCESSOR(ExternalUint32Array)
CAST_ACCESSOR(ExternalUint8Array)
CAST_ACCESSOR(ExternalUint8ClampedArray)
CAST_ACCESSOR(FixedArray)
CAST_ACCESSOR(FixedArrayBase)
CAST_ACCESSOR(FixedDoubleArray)
CAST_ACCESSOR(FixedTypedArrayBase)
CAST_ACCESSOR(Foreign)
CAST_ACCESSOR(FreeSpace)
CAST_ACCESSOR(GlobalObject)
CAST_ACCESSOR(HeapObject)
CAST_ACCESSOR(JSArray)
CAST_ACCESSOR(JSArrayBuffer)
CAST_ACCESSOR(JSArrayBufferView)
CAST_ACCESSOR(JSBuiltinsObject)
CAST_ACCESSOR(JSDataView)
CAST_ACCESSOR(JSDate)
CAST_ACCESSOR(JSFunction)
CAST_ACCESSOR(JSFunctionProxy)
CAST_ACCESSOR(JSFunctionResultCache)
CAST_ACCESSOR(JSGeneratorObject)
CAST_ACCESSOR(JSGlobalObject)
CAST_ACCESSOR(JSGlobalProxy)
CAST_ACCESSOR(JSMap)
CAST_ACCESSOR(JSMapIterator)
CAST_ACCESSOR(JSMessageObject)
CAST_ACCESSOR(JSModule)
CAST_ACCESSOR(JSObject)
CAST_ACCESSOR(JSProxy)
CAST_ACCESSOR(JSReceiver)
CAST_ACCESSOR(JSRegExp)
CAST_ACCESSOR(JSSet)
CAST_ACCESSOR(JSSetIterator)
CAST_ACCESSOR(JSTypedArray)
CAST_ACCESSOR(JSValue)
CAST_ACCESSOR(JSWeakMap)
CAST_ACCESSOR(JSWeakSet)
CAST_ACCESSOR(LayoutDescriptor)
CAST_ACCESSOR(Map)
CAST_ACCESSOR(Name)
CAST_ACCESSOR(NameDictionary)
CAST_ACCESSOR(NormalizedMapCache)
CAST_ACCESSOR(Object)
CAST_ACCESSOR(ObjectHashTable)
CAST_ACCESSOR(Oddball)
CAST_ACCESSOR(OrderedHashMap)
CAST_ACCESSOR(OrderedHashSet)
CAST_ACCESSOR(PolymorphicCodeCacheHashTable)
CAST_ACCESSOR(PropertyCell)
CAST_ACCESSOR(ScopeInfo)
CAST_ACCESSOR(SeededNumberDictionary)
CAST_ACCESSOR(SeqOneByteString)
CAST_ACCESSOR(SeqString)
CAST_ACCESSOR(SeqTwoByteString)
CAST_ACCESSOR(SharedFunctionInfo)
CAST_ACCESSOR(SlicedString)
CAST_ACCESSOR(Smi)
CAST_ACCESSOR(String)
CAST_ACCESSOR(StringTable)
CAST_ACCESSOR(Struct)
CAST_ACCESSOR(Symbol)
CAST_ACCESSOR(UnseededNumberDictionary)
CAST_ACCESSOR(WeakCell)
CAST_ACCESSOR(WeakHashTable)
template <class Traits>
FixedTypedArray<Traits>* FixedTypedArray<Traits>::cast(Object* object) {
SLOW_DCHECK(object->IsHeapObject() &&
HeapObject::cast(object)->map()->instance_type() ==
Traits::kInstanceType);
return reinterpret_cast<FixedTypedArray<Traits>*>(object);
}
template <class Traits>
const FixedTypedArray<Traits>*
FixedTypedArray<Traits>::cast(const Object* object) {
SLOW_DCHECK(object->IsHeapObject() &&
HeapObject::cast(object)->map()->instance_type() ==
Traits::kInstanceType);
return reinterpret_cast<FixedTypedArray<Traits>*>(object);
}
#define MAKE_STRUCT_CAST(NAME, Name, name) CAST_ACCESSOR(Name)
STRUCT_LIST(MAKE_STRUCT_CAST)
#undef MAKE_STRUCT_CAST
template <typename Derived, typename Shape, typename Key>
HashTable<Derived, Shape, Key>*
HashTable<Derived, Shape, Key>::cast(Object* obj) {
SLOW_DCHECK(obj->IsHashTable());
return reinterpret_cast<HashTable*>(obj);
}
template <typename Derived, typename Shape, typename Key>
const HashTable<Derived, Shape, Key>*
HashTable<Derived, Shape, Key>::cast(const Object* obj) {
SLOW_DCHECK(obj->IsHashTable());
return reinterpret_cast<const HashTable*>(obj);
}
SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset)
SYNCHRONIZED_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset)
SMI_ACCESSORS(FreeSpace, size, kSizeOffset)
NOBARRIER_SMI_ACCESSORS(FreeSpace, size, kSizeOffset)
SMI_ACCESSORS(String, length, kLengthOffset)
SYNCHRONIZED_SMI_ACCESSORS(String, length, kLengthOffset)
uint32_t Name::hash_field() {
return READ_UINT32_FIELD(this, kHashFieldOffset);
}
void Name::set_hash_field(uint32_t value) {
WRITE_UINT32_FIELD(this, kHashFieldOffset, value);
#if V8_HOST_ARCH_64_BIT
#if V8_TARGET_LITTLE_ENDIAN
WRITE_UINT32_FIELD(this, kHashFieldSlot + kIntSize, 0);
#else
WRITE_UINT32_FIELD(this, kHashFieldSlot, 0);
#endif
#endif
}
bool Name::Equals(Name* other) {
if (other == this) return true;
if ((this->IsInternalizedString() && other->IsInternalizedString()) ||
this->IsSymbol() || other->IsSymbol()) {
return false;
}
return String::cast(this)->SlowEquals(String::cast(other));
}
bool Name::Equals(Handle<Name> one, Handle<Name> two) {
if (one.is_identical_to(two)) return true;
if ((one->IsInternalizedString() && two->IsInternalizedString()) ||
one->IsSymbol() || two->IsSymbol()) {
return false;
}
return String::SlowEquals(Handle<String>::cast(one),
Handle<String>::cast(two));
}
ACCESSORS(Symbol, name, Object, kNameOffset)
ACCESSORS(Symbol, flags, Smi, kFlagsOffset)
BOOL_ACCESSORS(Symbol, flags, is_private, kPrivateBit)
BOOL_ACCESSORS(Symbol, flags, is_own, kOwnBit)
bool String::Equals(String* other) {
if (other == this) return true;
if (this->IsInternalizedString() && other->IsInternalizedString()) {
return false;
}
return SlowEquals(other);
}
bool String::Equals(Handle<String> one, Handle<String> two) {
if (one.is_identical_to(two)) return true;
if (one->IsInternalizedString() && two->IsInternalizedString()) {
return false;
}
return SlowEquals(one, two);
}
Handle<String> String::Flatten(Handle<String> string, PretenureFlag pretenure) {
if (!string->IsConsString()) return string;
Handle<ConsString> cons = Handle<ConsString>::cast(string);
if (cons->IsFlat()) return handle(cons->first());
return SlowFlatten(cons, pretenure);
}
uint16_t String::Get(int index) {
DCHECK(index >= 0 && index < length());
switch (StringShape(this).full_representation_tag()) {
case kSeqStringTag | kOneByteStringTag:
return SeqOneByteString::cast(this)->SeqOneByteStringGet(index);
case kSeqStringTag | kTwoByteStringTag:
return SeqTwoByteString::cast(this)->SeqTwoByteStringGet(index);
case kConsStringTag | kOneByteStringTag:
case kConsStringTag | kTwoByteStringTag:
return ConsString::cast(this)->ConsStringGet(index);
case kExternalStringTag | kOneByteStringTag:
return ExternalOneByteString::cast(this)->ExternalOneByteStringGet(index);
case kExternalStringTag | kTwoByteStringTag:
return ExternalTwoByteString::cast(this)->ExternalTwoByteStringGet(index);
case kSlicedStringTag | kOneByteStringTag:
case kSlicedStringTag | kTwoByteStringTag:
return SlicedString::cast(this)->SlicedStringGet(index);
default:
break;
}
UNREACHABLE();
return 0;
}
void String::Set(int index, uint16_t value) {
DCHECK(index >= 0 && index < length());
DCHECK(StringShape(this).IsSequential());
return this->IsOneByteRepresentation()
? SeqOneByteString::cast(this)->SeqOneByteStringSet(index, value)
: SeqTwoByteString::cast(this)->SeqTwoByteStringSet(index, value);
}
bool String::IsFlat() {
if (!StringShape(this).IsCons()) return true;
return ConsString::cast(this)->second()->length() == 0;
}
String* String::GetUnderlying() {
// Giving direct access to underlying string only makes sense if the
// wrapping string is already flattened.
DCHECK(this->IsFlat());
DCHECK(StringShape(this).IsIndirect());
STATIC_ASSERT(ConsString::kFirstOffset == SlicedString::kParentOffset);
const int kUnderlyingOffset = SlicedString::kParentOffset;
return String::cast(READ_FIELD(this, kUnderlyingOffset));
}
template<class Visitor>
ConsString* String::VisitFlat(Visitor* visitor,
String* string,
const int offset) {
int slice_offset = offset;
const int length = string->length();
DCHECK(offset <= length);
while (true) {
int32_t type = string->map()->instance_type();
switch (type & (kStringRepresentationMask | kStringEncodingMask)) {
case kSeqStringTag | kOneByteStringTag:
visitor->VisitOneByteString(
SeqOneByteString::cast(string)->GetChars() + slice_offset,
length - offset);
return NULL;
case kSeqStringTag | kTwoByteStringTag:
visitor->VisitTwoByteString(
SeqTwoByteString::cast(string)->GetChars() + slice_offset,
length - offset);
return NULL;
case kExternalStringTag | kOneByteStringTag:
visitor->VisitOneByteString(
ExternalOneByteString::cast(string)->GetChars() + slice_offset,
length - offset);
return NULL;
case kExternalStringTag | kTwoByteStringTag:
visitor->VisitTwoByteString(
ExternalTwoByteString::cast(string)->GetChars() + slice_offset,
length - offset);
return NULL;
case kSlicedStringTag | kOneByteStringTag:
case kSlicedStringTag | kTwoByteStringTag: {
SlicedString* slicedString = SlicedString::cast(string);
slice_offset += slicedString->offset();
string = slicedString->parent();
continue;
}
case kConsStringTag | kOneByteStringTag:
case kConsStringTag | kTwoByteStringTag:
return ConsString::cast(string);
default:
UNREACHABLE();
return NULL;
}
}
}
uint16_t SeqOneByteString::SeqOneByteStringGet(int index) {
DCHECK(index >= 0 && index < length());
return READ_BYTE_FIELD(this, kHeaderSize + index * kCharSize);
}
void SeqOneByteString::SeqOneByteStringSet(int index, uint16_t value) {
DCHECK(index >= 0 && index < length() && value <= kMaxOneByteCharCode);
WRITE_BYTE_FIELD(this, kHeaderSize + index * kCharSize,
static_cast<byte>(value));
}
Address SeqOneByteString::GetCharsAddress() {
return FIELD_ADDR(this, kHeaderSize);
}
uint8_t* SeqOneByteString::GetChars() {
return reinterpret_cast<uint8_t*>(GetCharsAddress());
}
Address SeqTwoByteString::GetCharsAddress() {
return FIELD_ADDR(this, kHeaderSize);
}
uc16* SeqTwoByteString::GetChars() {
return reinterpret_cast<uc16*>(FIELD_ADDR(this, kHeaderSize));
}
uint16_t SeqTwoByteString::SeqTwoByteStringGet(int index) {
DCHECK(index >= 0 && index < length());
return READ_SHORT_FIELD(this, kHeaderSize + index * kShortSize);
}
void SeqTwoByteString::SeqTwoByteStringSet(int index, uint16_t value) {
DCHECK(index >= 0 && index < length());
WRITE_SHORT_FIELD(this, kHeaderSize + index * kShortSize, value);
}
int SeqTwoByteString::SeqTwoByteStringSize(InstanceType instance_type) {
return SizeFor(length());
}
int SeqOneByteString::SeqOneByteStringSize(InstanceType instance_type) {
return SizeFor(length());
}
String* SlicedString::parent() {
return String::cast(READ_FIELD(this, kParentOffset));
}
void SlicedString::set_parent(String* parent, WriteBarrierMode mode) {
DCHECK(parent->IsSeqString() || parent->IsExternalString());
WRITE_FIELD(this, kParentOffset, parent);
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kParentOffset, parent, mode);
}
SMI_ACCESSORS(SlicedString, offset, kOffsetOffset)
String* ConsString::first() {
return String::cast(READ_FIELD(this, kFirstOffset));
}
Object* ConsString::unchecked_first() {
return READ_FIELD(this, kFirstOffset);
}
void ConsString::set_first(String* value, WriteBarrierMode mode) {
WRITE_FIELD(this, kFirstOffset, value);
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kFirstOffset, value, mode);
}
String* ConsString::second() {
return String::cast(READ_FIELD(this, kSecondOffset));
}
Object* ConsString::unchecked_second() {
return READ_FIELD(this, kSecondOffset);
}
void ConsString::set_second(String* value, WriteBarrierMode mode) {
WRITE_FIELD(this, kSecondOffset, value);
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kSecondOffset, value, mode);
}
bool ExternalString::is_short() {
InstanceType type = map()->instance_type();
return (type & kShortExternalStringMask) == kShortExternalStringTag;
}
const ExternalOneByteString::Resource* ExternalOneByteString::resource() {
return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset));
}
void ExternalOneByteString::update_data_cache() {
if (is_short()) return;
const char** data_field =
reinterpret_cast<const char**>(FIELD_ADDR(this, kResourceDataOffset));
*data_field = resource()->data();
}
void ExternalOneByteString::set_resource(
const ExternalOneByteString::Resource* resource) {
DCHECK(IsAligned(reinterpret_cast<intptr_t>(resource), kPointerSize));
*reinterpret_cast<const Resource**>(
FIELD_ADDR(this, kResourceOffset)) = resource;
if (resource != NULL) update_data_cache();
}
const uint8_t* ExternalOneByteString::GetChars() {
return reinterpret_cast<const uint8_t*>(resource()->data());
}
uint16_t ExternalOneByteString::ExternalOneByteStringGet(int index) {
DCHECK(index >= 0 && index < length());
return GetChars()[index];
}
const ExternalTwoByteString::Resource* ExternalTwoByteString::resource() {
return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset));
}
void ExternalTwoByteString::update_data_cache() {
if (is_short()) return;
const uint16_t** data_field =
reinterpret_cast<const uint16_t**>(FIELD_ADDR(this, kResourceDataOffset));
*data_field = resource()->data();
}
void ExternalTwoByteString::set_resource(
const ExternalTwoByteString::Resource* resource) {
*reinterpret_cast<const Resource**>(
FIELD_ADDR(this, kResourceOffset)) = resource;
if (resource != NULL) update_data_cache();
}
const uint16_t* ExternalTwoByteString::GetChars() {
return resource()->data();
}
uint16_t ExternalTwoByteString::ExternalTwoByteStringGet(int index) {
DCHECK(index >= 0 && index < length());
return GetChars()[index];
}
const uint16_t* ExternalTwoByteString::ExternalTwoByteStringGetData(
unsigned start) {
return GetChars() + start;
}
int ConsStringIterator::OffsetForDepth(int depth) { return depth & kDepthMask; }
void ConsStringIterator::PushLeft(ConsString* string) {
frames_[depth_++ & kDepthMask] = string;
}
void ConsStringIterator::PushRight(ConsString* string) {
// Inplace update.
frames_[(depth_-1) & kDepthMask] = string;
}
void ConsStringIterator::AdjustMaximumDepth() {
if (depth_ > maximum_depth_) maximum_depth_ = depth_;
}
void ConsStringIterator::Pop() {
DCHECK(depth_ > 0);
DCHECK(depth_ <= maximum_depth_);
depth_--;
}
uint16_t StringCharacterStream::GetNext() {
DCHECK(buffer8_ != NULL && end_ != NULL);
// Advance cursor if needed.
if (buffer8_ == end_) HasMore();
DCHECK(buffer8_ < end_);
return is_one_byte_ ? *buffer8_++ : *buffer16_++;
}
StringCharacterStream::StringCharacterStream(String* string, int offset)
: is_one_byte_(false) {
Reset(string, offset);
}
void StringCharacterStream::Reset(String* string, int offset) {
buffer8_ = NULL;
end_ = NULL;
ConsString* cons_string = String::VisitFlat(this, string, offset);
iter_.Reset(cons_string, offset);
if (cons_string != NULL) {
string = iter_.Next(&offset);
if (string != NULL) String::VisitFlat(this, string, offset);
}
}
bool StringCharacterStream::HasMore() {
if (buffer8_ != end_) return true;
int offset;
String* string = iter_.Next(&offset);
DCHECK_EQ(offset, 0);
if (string == NULL) return false;
String::VisitFlat(this, string);
DCHECK(buffer8_ != end_);
return true;
}
void StringCharacterStream::VisitOneByteString(
const uint8_t* chars, int length) {
is_one_byte_ = true;
buffer8_ = chars;
end_ = chars + length;
}
void StringCharacterStream::VisitTwoByteString(
const uint16_t* chars, int length) {
is_one_byte_ = false;
buffer16_ = chars;
end_ = reinterpret_cast<const uint8_t*>(chars + length);
}
void JSFunctionResultCache::MakeZeroSize() {
set_finger_index(kEntriesIndex);
set_size(kEntriesIndex);
}
void JSFunctionResultCache::Clear() {
int cache_size = size();
Object** entries_start = RawFieldOfElementAt(kEntriesIndex);
MemsetPointer(entries_start,
GetHeap()->the_hole_value(),
cache_size - kEntriesIndex);
MakeZeroSize();
}
int JSFunctionResultCache::size() {
return Smi::cast(get(kCacheSizeIndex))->value();
}
void JSFunctionResultCache::set_size(int size) {
set(kCacheSizeIndex, Smi::FromInt(size));
}
int JSFunctionResultCache::finger_index() {
return Smi::cast(get(kFingerIndex))->value();
}
void JSFunctionResultCache::set_finger_index(int finger_index) {
set(kFingerIndex, Smi::FromInt(finger_index));
}
byte ByteArray::get(int index) {
DCHECK(index >= 0 && index < this->length());
return READ_BYTE_FIELD(this, kHeaderSize + index * kCharSize);
}
void ByteArray::set(int index, byte value) {
DCHECK(index >= 0 && index < this->length());
WRITE_BYTE_FIELD(this, kHeaderSize + index * kCharSize, value);
}
int ByteArray::get_int(int index) {
DCHECK(index >= 0 && (index * kIntSize) < this->length());
return READ_INT_FIELD(this, kHeaderSize + index * kIntSize);
}
ByteArray* ByteArray::FromDataStartAddress(Address address) {
DCHECK_TAG_ALIGNED(address);
return reinterpret_cast<ByteArray*>(address - kHeaderSize + kHeapObjectTag);
}
Address ByteArray::GetDataStartAddress() {
return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize;
}
uint8_t* ExternalUint8ClampedArray::external_uint8_clamped_pointer() {
return reinterpret_cast<uint8_t*>(external_pointer());
}
uint8_t ExternalUint8ClampedArray::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
uint8_t* ptr = external_uint8_clamped_pointer();
return ptr[index];
}
Handle<Object> ExternalUint8ClampedArray::get(
Handle<ExternalUint8ClampedArray> array,
int index) {
return Handle<Smi>(Smi::FromInt(array->get_scalar(index)),
array->GetIsolate());
}
void ExternalUint8ClampedArray::set(int index, uint8_t value) {
DCHECK((index >= 0) && (index < this->length()));
uint8_t* ptr = external_uint8_clamped_pointer();
ptr[index] = value;
}
void* ExternalArray::external_pointer() const {
intptr_t ptr = READ_INTPTR_FIELD(this, kExternalPointerOffset);
return reinterpret_cast<void*>(ptr);
}
void ExternalArray::set_external_pointer(void* value, WriteBarrierMode mode) {
intptr_t ptr = reinterpret_cast<intptr_t>(value);
WRITE_INTPTR_FIELD(this, kExternalPointerOffset, ptr);
}
int8_t ExternalInt8Array::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
int8_t* ptr = static_cast<int8_t*>(external_pointer());
return ptr[index];
}
Handle<Object> ExternalInt8Array::get(Handle<ExternalInt8Array> array,
int index) {
return Handle<Smi>(Smi::FromInt(array->get_scalar(index)),
array->GetIsolate());
}
void ExternalInt8Array::set(int index, int8_t value) {
DCHECK((index >= 0) && (index < this->length()));
int8_t* ptr = static_cast<int8_t*>(external_pointer());
ptr[index] = value;
}
uint8_t ExternalUint8Array::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
uint8_t* ptr = static_cast<uint8_t*>(external_pointer());
return ptr[index];
}
Handle<Object> ExternalUint8Array::get(Handle<ExternalUint8Array> array,
int index) {
return Handle<Smi>(Smi::FromInt(array->get_scalar(index)),
array->GetIsolate());
}
void ExternalUint8Array::set(int index, uint8_t value) {
DCHECK((index >= 0) && (index < this->length()));
uint8_t* ptr = static_cast<uint8_t*>(external_pointer());
ptr[index] = value;
}
int16_t ExternalInt16Array::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
int16_t* ptr = static_cast<int16_t*>(external_pointer());
return ptr[index];
}
Handle<Object> ExternalInt16Array::get(Handle<ExternalInt16Array> array,
int index) {
return Handle<Smi>(Smi::FromInt(array->get_scalar(index)),
array->GetIsolate());
}
void ExternalInt16Array::set(int index, int16_t value) {
DCHECK((index >= 0) && (index < this->length()));
int16_t* ptr = static_cast<int16_t*>(external_pointer());
ptr[index] = value;
}
uint16_t ExternalUint16Array::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
uint16_t* ptr = static_cast<uint16_t*>(external_pointer());
return ptr[index];
}
Handle<Object> ExternalUint16Array::get(Handle<ExternalUint16Array> array,
int index) {
return Handle<Smi>(Smi::FromInt(array->get_scalar(index)),
array->GetIsolate());
}
void ExternalUint16Array::set(int index, uint16_t value) {
DCHECK((index >= 0) && (index < this->length()));
uint16_t* ptr = static_cast<uint16_t*>(external_pointer());
ptr[index] = value;
}
int32_t ExternalInt32Array::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
int32_t* ptr = static_cast<int32_t*>(external_pointer());
return ptr[index];
}
Handle<Object> ExternalInt32Array::get(Handle<ExternalInt32Array> array,
int index) {
return array->GetIsolate()->factory()->
NewNumberFromInt(array->get_scalar(index));
}
void ExternalInt32Array::set(int index, int32_t value) {
DCHECK((index >= 0) && (index < this->length()));
int32_t* ptr = static_cast<int32_t*>(external_pointer());
ptr[index] = value;
}
uint32_t ExternalUint32Array::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
uint32_t* ptr = static_cast<uint32_t*>(external_pointer());
return ptr[index];
}
Handle<Object> ExternalUint32Array::get(Handle<ExternalUint32Array> array,
int index) {
return array->GetIsolate()->factory()->
NewNumberFromUint(array->get_scalar(index));
}
void ExternalUint32Array::set(int index, uint32_t value) {
DCHECK((index >= 0) && (index < this->length()));
uint32_t* ptr = static_cast<uint32_t*>(external_pointer());
ptr[index] = value;
}
float ExternalFloat32Array::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
float* ptr = static_cast<float*>(external_pointer());
return ptr[index];
}
Handle<Object> ExternalFloat32Array::get(Handle<ExternalFloat32Array> array,
int index) {
return array->GetIsolate()->factory()->NewNumber(array->get_scalar(index));
}
void ExternalFloat32Array::set(int index, float value) {
DCHECK((index >= 0) && (index < this->length()));
float* ptr = static_cast<float*>(external_pointer());
ptr[index] = value;
}
double ExternalFloat64Array::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
double* ptr = static_cast<double*>(external_pointer());
return ptr[index];
}
Handle<Object> ExternalFloat64Array::get(Handle<ExternalFloat64Array> array,
int index) {
return array->GetIsolate()->factory()->NewNumber(array->get_scalar(index));
}
void ExternalFloat64Array::set(int index, double value) {
DCHECK((index >= 0) && (index < this->length()));
double* ptr = static_cast<double*>(external_pointer());
ptr[index] = value;
}
void* FixedTypedArrayBase::DataPtr() {
return FIELD_ADDR(this, kDataOffset);
}
int FixedTypedArrayBase::DataSize(InstanceType type) {
int element_size;
switch (type) {
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
case FIXED_##TYPE##_ARRAY_TYPE: \
element_size = size; \
break;
TYPED_ARRAYS(TYPED_ARRAY_CASE)
#undef TYPED_ARRAY_CASE
default:
UNREACHABLE();
return 0;
}
return length() * element_size;
}
int FixedTypedArrayBase::DataSize() {
return DataSize(map()->instance_type());
}
int FixedTypedArrayBase::size() {
return OBJECT_POINTER_ALIGN(kDataOffset + DataSize());
}
int FixedTypedArrayBase::TypedArraySize(InstanceType type) {
return OBJECT_POINTER_ALIGN(kDataOffset + DataSize(type));
}
uint8_t Uint8ArrayTraits::defaultValue() { return 0; }
uint8_t Uint8ClampedArrayTraits::defaultValue() { return 0; }
int8_t Int8ArrayTraits::defaultValue() { return 0; }
uint16_t Uint16ArrayTraits::defaultValue() { return 0; }
int16_t Int16ArrayTraits::defaultValue() { return 0; }
uint32_t Uint32ArrayTraits::defaultValue() { return 0; }
int32_t Int32ArrayTraits::defaultValue() { return 0; }
float Float32ArrayTraits::defaultValue() {
return static_cast<float>(base::OS::nan_value());
}
double Float64ArrayTraits::defaultValue() { return base::OS::nan_value(); }
template <class Traits>
typename Traits::ElementType FixedTypedArray<Traits>::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
ElementType* ptr = reinterpret_cast<ElementType*>(
FIELD_ADDR(this, kDataOffset));
return ptr[index];
}
template<> inline
FixedTypedArray<Float64ArrayTraits>::ElementType
FixedTypedArray<Float64ArrayTraits>::get_scalar(int index) {
DCHECK((index >= 0) && (index < this->length()));
return READ_DOUBLE_FIELD(this, ElementOffset(index));
}
template <class Traits>
void FixedTypedArray<Traits>::set(int index, ElementType value) {
DCHECK((index >= 0) && (index < this->length()));
ElementType* ptr = reinterpret_cast<ElementType*>(
FIELD_ADDR(this, kDataOffset));
ptr[index] = value;
}
template<> inline
void FixedTypedArray<Float64ArrayTraits>::set(
int index, Float64ArrayTraits::ElementType value) {
DCHECK((index >= 0) && (index < this->length()));
WRITE_DOUBLE_FIELD(this, ElementOffset(index), value);
}
template <class Traits>
typename Traits::ElementType FixedTypedArray<Traits>::from_int(int value) {
return static_cast<ElementType>(value);
}
template <> inline
uint8_t FixedTypedArray<Uint8ClampedArrayTraits>::from_int(int value) {
if (value < 0) return 0;
if (value > 0xFF) return 0xFF;
return static_cast<uint8_t>(value);
}
template <class Traits>
typename Traits::ElementType FixedTypedArray<Traits>::from_double(
double value) {
return static_cast<ElementType>(DoubleToInt32(value));
}
template<> inline
uint8_t FixedTypedArray<Uint8ClampedArrayTraits>::from_double(double value) {
// Handle NaNs and less than zero values which clamp to zero.
if (!(value > 0)) return 0;
if (value > 0xFF) return 0xFF;
return static_cast<uint8_t>(lrint(value));
}
template<> inline
float FixedTypedArray<Float32ArrayTraits>::from_double(double value) {
return static_cast<float>(value);
}
template<> inline
double FixedTypedArray<Float64ArrayTraits>::from_double(double value) {
return value;
}
template <class Traits>
Handle<Object> FixedTypedArray<Traits>::get(
Handle<FixedTypedArray<Traits> > array,
int index) {
return Traits::ToHandle(array->GetIsolate(), array->get_scalar(index));
}
template <class Traits>
Handle<Object> FixedTypedArray<Traits>::SetValue(
Handle<FixedTypedArray<Traits> > array,
uint32_t index,
Handle<Object> value) {
ElementType cast_value = Traits::defaultValue();
if (index < static_cast<uint32_t>(array->length())) {
if (value->IsSmi()) {
int int_value = Handle<Smi>::cast(value)->value();
cast_value = from_int(int_value);
} else if (value->IsHeapNumber()) {
double double_value = Handle<HeapNumber>::cast(value)->value();
cast_value = from_double(double_value);
} else {
// Clamp undefined to the default value. All other types have been
// converted to a number type further up in the call chain.
DCHECK(value->IsUndefined());
}
array->set(index, cast_value);
}
return Traits::ToHandle(array->GetIsolate(), cast_value);
}
Handle<Object> Uint8ArrayTraits::ToHandle(Isolate* isolate, uint8_t scalar) {
return handle(Smi::FromInt(scalar), isolate);
}
Handle<Object> Uint8ClampedArrayTraits::ToHandle(Isolate* isolate,
uint8_t scalar) {
return handle(Smi::FromInt(scalar), isolate);
}
Handle<Object> Int8ArrayTraits::ToHandle(Isolate* isolate, int8_t scalar) {
return handle(Smi::FromInt(scalar), isolate);
}
Handle<Object> Uint16ArrayTraits::ToHandle(Isolate* isolate, uint16_t scalar) {
return handle(Smi::FromInt(scalar), isolate);
}
Handle<Object> Int16ArrayTraits::ToHandle(Isolate* isolate, int16_t scalar) {
return handle(Smi::FromInt(scalar), isolate);
}
Handle<Object> Uint32ArrayTraits::ToHandle(Isolate* isolate, uint32_t scalar) {
return isolate->factory()->NewNumberFromUint(scalar);
}
Handle<Object> Int32ArrayTraits::ToHandle(Isolate* isolate, int32_t scalar) {
return isolate->factory()->NewNumberFromInt(scalar);
}
Handle<Object> Float32ArrayTraits::ToHandle(Isolate* isolate, float scalar) {
return isolate->factory()->NewNumber(scalar);
}
Handle<Object> Float64ArrayTraits::ToHandle(Isolate* isolate, double scalar) {
return isolate->factory()->NewNumber(scalar);
}
int Map::visitor_id() {
return READ_BYTE_FIELD(this, kVisitorIdOffset);
}
void Map::set_visitor_id(int id) {
DCHECK(0 <= id && id < 256);
WRITE_BYTE_FIELD(this, kVisitorIdOffset, static_cast<byte>(id));
}
int Map::instance_size() {
return NOBARRIER_READ_BYTE_FIELD(
this, kInstanceSizeOffset) << kPointerSizeLog2;
}
int Map::inobject_properties() {
return READ_BYTE_FIELD(this, kInObjectPropertiesOffset);
}
int Map::pre_allocated_property_fields() {
return READ_BYTE_FIELD(this, kPreAllocatedPropertyFieldsOffset);
}
int Map::GetInObjectPropertyOffset(int index) {
// Adjust for the number of properties stored in the object.
index -= inobject_properties();
DCHECK(index <= 0);
return instance_size() + (index * kPointerSize);
}
Handle<Map> Map::CopyInstallDescriptorsForTesting(
Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors,
Handle<LayoutDescriptor> layout_descriptor) {
return CopyInstallDescriptors(map, new_descriptor, descriptors,
layout_descriptor);
}
int HeapObject::SizeFromMap(Map* map) {
int instance_size = map->instance_size();
if (instance_size != kVariableSizeSentinel) return instance_size;
// Only inline the most frequent cases.
InstanceType instance_type = map->instance_type();
if (instance_type == FIXED_ARRAY_TYPE) {
return FixedArray::BodyDescriptor::SizeOf(map, this);
}
if (instance_type == ONE_BYTE_STRING_TYPE ||
instance_type == ONE_BYTE_INTERNALIZED_STRING_TYPE) {
// Strings may get concurrently truncated, hence we have to access its
// length synchronized.
return SeqOneByteString::SizeFor(
reinterpret_cast<SeqOneByteString*>(this)->synchronized_length());
}
if (instance_type == BYTE_ARRAY_TYPE) {
return reinterpret_cast<ByteArray*>(this)->ByteArraySize();
}
if (instance_type == FREE_SPACE_TYPE) {
return reinterpret_cast<FreeSpace*>(this)->nobarrier_size();
}
if (instance_type == STRING_TYPE ||
instance_type == INTERNALIZED_STRING_TYPE) {
// Strings may get concurrently truncated, hence we have to access its
// length synchronized.
return SeqTwoByteString::SizeFor(
reinterpret_cast<SeqTwoByteString*>(this)->synchronized_length());
}
if (instance_type == FIXED_DOUBLE_ARRAY_TYPE) {
return FixedDoubleArray::SizeFor(
reinterpret_cast<FixedDoubleArray*>(this)->length());
}
if (instance_type == CONSTANT_POOL_ARRAY_TYPE) {
return reinterpret_cast<ConstantPoolArray*>(this)->size();
}
if (instance_type >= FIRST_FIXED_TYPED_ARRAY_TYPE &&
instance_type <= LAST_FIXED_TYPED_ARRAY_TYPE) {
return reinterpret_cast<FixedTypedArrayBase*>(
this)->TypedArraySize(instance_type);
}
DCHECK(instance_type == CODE_TYPE);
return reinterpret_cast<Code*>(this)->CodeSize();
}
void Map::set_instance_size(int value) {
DCHECK_EQ(0, value & (kPointerSize - 1));
value >>= kPointerSizeLog2;
DCHECK(0 <= value && value < 256);
NOBARRIER_WRITE_BYTE_FIELD(
this, kInstanceSizeOffset, static_cast<byte>(value));
}
void Map::set_inobject_properties(int value) {
DCHECK(0 <= value && value < 256);
WRITE_BYTE_FIELD(this, kInObjectPropertiesOffset, static_cast<byte>(value));
}
void Map::set_pre_allocated_property_fields(int value) {
DCHECK(0 <= value && value < 256);
WRITE_BYTE_FIELD(this,
kPreAllocatedPropertyFieldsOffset,
static_cast<byte>(value));
}
InstanceType Map::instance_type() {
return static_cast<InstanceType>(READ_BYTE_FIELD(this, kInstanceTypeOffset));
}
void Map::set_instance_type(InstanceType value) {
WRITE_BYTE_FIELD(this, kInstanceTypeOffset, value);
}
int Map::unused_property_fields() {
return READ_BYTE_FIELD(this, kUnusedPropertyFieldsOffset);
}
void Map::set_unused_property_fields(int value) {
WRITE_BYTE_FIELD(this, kUnusedPropertyFieldsOffset, Min(value, 255));
}
byte Map::bit_field() {
return READ_BYTE_FIELD(this, kBitFieldOffset);
}
void Map::set_bit_field(byte value) {
WRITE_BYTE_FIELD(this, kBitFieldOffset, value);
}
byte Map::bit_field2() {
return READ_BYTE_FIELD(this, kBitField2Offset);
}
void Map::set_bit_field2(byte value) {
WRITE_BYTE_FIELD(this, kBitField2Offset, value);
}
void Map::set_non_instance_prototype(bool value) {
if (value) {
set_bit_field(bit_field() | (1 << kHasNonInstancePrototype));
} else {
set_bit_field(bit_field() & ~(1 << kHasNonInstancePrototype));
}
}
bool Map::has_non_instance_prototype() {
return ((1 << kHasNonInstancePrototype) & bit_field()) != 0;
}
void Map::set_function_with_prototype(bool value) {
set_bit_field(FunctionWithPrototype::update(bit_field(), value));
}
bool Map::function_with_prototype() {
return FunctionWithPrototype::decode(bit_field());
}
void Map::set_is_access_check_needed(bool access_check_needed) {
if (access_check_needed) {
set_bit_field(bit_field() | (1 << kIsAccessCheckNeeded));
} else {
set_bit_field(bit_field() & ~(1 << kIsAccessCheckNeeded));
}
}
bool Map::is_access_check_needed() {
return ((1 << kIsAccessCheckNeeded) & bit_field()) != 0;
}
void Map::set_is_extensible(bool value) {
if (value) {
set_bit_field2(bit_field2() | (1 << kIsExtensible));
} else {
set_bit_field2(bit_field2() & ~(1 << kIsExtensible));
}
}
bool Map::is_extensible() {
return ((1 << kIsExtensible) & bit_field2()) != 0;
}
void Map::set_is_prototype_map(bool value) {
set_bit_field2(IsPrototypeMapBits::update(bit_field2(), value));
}
bool Map::is_prototype_map() {
return IsPrototypeMapBits::decode(bit_field2());
}
void Map::set_dictionary_map(bool value) {
uint32_t new_bit_field3 = DictionaryMap::update(bit_field3(), value);
new_bit_field3 = IsUnstable::update(new_bit_field3, value);
set_bit_field3(new_bit_field3);
}
bool Map::is_dictionary_map() {
return DictionaryMap::decode(bit_field3());
}
Code::Flags Code::flags() {
return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset));
}
void Map::set_owns_descriptors(bool owns_descriptors) {
set_bit_field3(OwnsDescriptors::update(bit_field3(), owns_descriptors));
}
bool Map::owns_descriptors() {
return OwnsDescriptors::decode(bit_field3());
}
void Map::set_has_instance_call_handler() {
set_bit_field3(HasInstanceCallHandler::update(bit_field3(), true));
}
bool Map::has_instance_call_handler() {
return HasInstanceCallHandler::decode(bit_field3());
}
void Map::deprecate() {
set_bit_field3(Deprecated::update(bit_field3(), true));
}
bool Map::is_deprecated() {
return Deprecated::decode(bit_field3());
}
void Map::set_migration_target(bool value) {
set_bit_field3(IsMigrationTarget::update(bit_field3(), value));
}
bool Map::is_migration_target() {
return IsMigrationTarget::decode(bit_field3());
}
void Map::set_done_inobject_slack_tracking(bool value) {
set_bit_field3(DoneInobjectSlackTracking::update(bit_field3(), value));
}
bool Map::done_inobject_slack_tracking() {
return DoneInobjectSlackTracking::decode(bit_field3());
}
void Map::set_construction_count(int value) {
set_bit_field3(ConstructionCount::update(bit_field3(), value));
}
int Map::construction_count() {
return ConstructionCount::decode(bit_field3());
}
void Map::freeze() {
set_bit_field3(IsFrozen::update(bit_field3(), true));
}
bool Map::is_frozen() {
return IsFrozen::decode(bit_field3());
}
void Map::mark_unstable() {
set_bit_field3(IsUnstable::update(bit_field3(), true));
}
bool Map::is_stable() {
return !IsUnstable::decode(bit_field3());
}
bool Map::has_code_cache() {
return code_cache() != GetIsolate()->heap()->empty_fixed_array();
}
bool Map::CanBeDeprecated() {
int descriptor = LastAdded();
for (int i = 0; i <= descriptor; i++) {
PropertyDetails details = instance_descriptors()->GetDetails(i);
if (details.representation().IsNone()) return true;
if (details.representation().IsSmi()) return true;
if (details.representation().IsDouble()) return true;
if (details.representation().IsHeapObject()) return true;
if (details.type() == CONSTANT) return true;
}
return false;
}
void Map::NotifyLeafMapLayoutChange() {
if (is_stable()) {
mark_unstable();
dependent_code()->DeoptimizeDependentCodeGroup(
GetIsolate(),
DependentCode::kPrototypeCheckGroup);
}
}
bool Map::CanOmitMapChecks() {
return is_stable() && FLAG_omit_map_checks_for_leaf_maps;
}
int DependentCode::number_of_entries(DependencyGroup group) {
if (length() == 0) return 0;
return Smi::cast(get(group))->value();
}
void DependentCode::set_number_of_entries(DependencyGroup group, int value) {
set(group, Smi::FromInt(value));
}
bool DependentCode::is_code_at(int i) {
return get(kCodesStartIndex + i)->IsCode();
}
Code* DependentCode::code_at(int i) {
return Code::cast(get(kCodesStartIndex + i));
}
CompilationInfo* DependentCode::compilation_info_at(int i) {
return reinterpret_cast<CompilationInfo*>(
Foreign::cast(get(kCodesStartIndex + i))->foreign_address());
}
void DependentCode::set_object_at(int i, Object* object) {
set(kCodesStartIndex + i, object);
}
Object* DependentCode::object_at(int i) {
return get(kCodesStartIndex + i);
}
Object** DependentCode::slot_at(int i) {
return RawFieldOfElementAt(kCodesStartIndex + i);
}
void DependentCode::clear_at(int i) {
set_undefined(kCodesStartIndex + i);
}
void DependentCode::copy(int from, int to) {
set(kCodesStartIndex + to, get(kCodesStartIndex + from));
}
void DependentCode::ExtendGroup(DependencyGroup group) {
GroupStartIndexes starts(this);
for (int g = kGroupCount - 1; g > group; g--) {
if (starts.at(g) < starts.at(g + 1)) {
copy(starts.at(g), starts.at(g + 1));
}
}
}
void Code::set_flags(Code::Flags flags) {
STATIC_ASSERT(Code::NUMBER_OF_KINDS <= KindField::kMax + 1);
WRITE_INT_FIELD(this, kFlagsOffset, flags);
}
Code::Kind Code::kind() {
return ExtractKindFromFlags(flags());
}
bool Code::IsCodeStubOrIC() {
return kind() == STUB || kind() == HANDLER || kind() == LOAD_IC ||
kind() == KEYED_LOAD_IC || kind() == CALL_IC || kind() == STORE_IC ||
kind() == KEYED_STORE_IC || kind() == BINARY_OP_IC ||
kind() == COMPARE_IC || kind() == COMPARE_NIL_IC ||
kind() == TO_BOOLEAN_IC;
}
InlineCacheState Code::ic_state() {
InlineCacheState result = ExtractICStateFromFlags(flags());
// Only allow uninitialized or debugger states for non-IC code
// objects. This is used in the debugger to determine whether or not
// a call to code object has been replaced with a debug break call.
DCHECK(is_inline_cache_stub() ||
result == UNINITIALIZED ||
result == DEBUG_STUB);
return result;
}
ExtraICState Code::extra_ic_state() {
DCHECK(is_inline_cache_stub() || ic_state() == DEBUG_STUB);
return ExtractExtraICStateFromFlags(flags());
}
Code::StubType Code::type() {
return ExtractTypeFromFlags(flags());
}
// For initialization.
void Code::set_raw_kind_specific_flags1(int value) {
WRITE_INT_FIELD(this, kKindSpecificFlags1Offset, value);
}
void Code::set_raw_kind_specific_flags2(int value) {
WRITE_INT_FIELD(this, kKindSpecificFlags2Offset, value);
}
inline bool Code::is_crankshafted() {
return IsCrankshaftedField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
}
inline bool Code::is_hydrogen_stub() {
return is_crankshafted() && kind() != OPTIMIZED_FUNCTION;
}
inline void Code::set_is_crankshafted(bool value) {
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
int updated = IsCrankshaftedField::update(previous, value);
WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
}
inline bool Code::is_turbofanned() {
DCHECK(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
return IsTurbofannedField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
}
inline void Code::set_is_turbofanned(bool value) {
DCHECK(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
int updated = IsTurbofannedField::update(previous, value);
WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
}
bool Code::optimizable() {
DCHECK_EQ(FUNCTION, kind());
return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
}
void Code::set_optimizable(bool value) {
DCHECK_EQ(FUNCTION, kind());
WRITE_BYTE_FIELD(this, kOptimizableOffset, value ? 1 : 0);
}
bool Code::has_deoptimization_support() {
DCHECK_EQ(FUNCTION, kind());
byte flags = READ_BYTE_FIELD(this, kFullCodeFlags);
return FullCodeFlagsHasDeoptimizationSupportField::decode(flags);
}
void Code::set_has_deoptimization_support(bool value) {
DCHECK_EQ(FUNCTION, kind());
byte flags = READ_BYTE_FIELD(this, kFullCodeFlags);
flags = FullCodeFlagsHasDeoptimizationSupportField::update(flags, value);
WRITE_BYTE_FIELD(this, kFullCodeFlags, flags);
}
bool Code::has_debug_break_slots() {
DCHECK_EQ(FUNCTION, kind());
byte flags = READ_BYTE_FIELD(this, kFullCodeFlags);
return FullCodeFlagsHasDebugBreakSlotsField::decode(flags);
}
void Code::set_has_debug_break_slots(bool value) {
DCHECK_EQ(FUNCTION, kind());
byte flags = READ_BYTE_FIELD(this, kFullCodeFlags);
flags = FullCodeFlagsHasDebugBreakSlotsField::update(flags, value);
WRITE_BYTE_FIELD(this, kFullCodeFlags, flags);
}
bool Code::is_compiled_optimizable() {
DCHECK_EQ(FUNCTION, kind());
byte flags = READ_BYTE_FIELD(this, kFullCodeFlags);
return FullCodeFlagsIsCompiledOptimizable::decode(flags);
}
void Code::set_compiled_optimizable(bool value) {
DCHECK_EQ(FUNCTION, kind());
byte flags = READ_BYTE_FIELD(this, kFullCodeFlags);
flags = FullCodeFlagsIsCompiledOptimizable::update(flags, value);
WRITE_BYTE_FIELD(this, kFullCodeFlags, flags);
}
int Code::allow_osr_at_loop_nesting_level() {
DCHECK_EQ(FUNCTION, kind());
int fields = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
return AllowOSRAtLoopNestingLevelField::decode(fields);
}
void Code::set_allow_osr_at_loop_nesting_level(int level) {
DCHECK_EQ(FUNCTION, kind());
DCHECK(level >= 0 && level <= kMaxLoopNestingMarker);
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
int updated = AllowOSRAtLoopNestingLevelField::update(previous, level);
WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
}
int Code::profiler_ticks() {
DCHECK_EQ(FUNCTION, kind());
return READ_BYTE_FIELD(this, kProfilerTicksOffset);
}
void Code::set_profiler_ticks(int ticks) {
DCHECK(ticks < 256);
if (kind() == FUNCTION) {
WRITE_BYTE_FIELD(this, kProfilerTicksOffset, ticks);
}
}
int Code::builtin_index() {
return READ_INT32_FIELD(this, kKindSpecificFlags1Offset);
}
void Code::set_builtin_index(int index) {
WRITE_INT32_FIELD(this, kKindSpecificFlags1Offset, index);
}
unsigned Code::stack_slots() {
DCHECK(is_crankshafted());
return StackSlotsField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
}
void Code::set_stack_slots(unsigned slots) {
CHECK(slots <= (1 << kStackSlotsBitCount));
DCHECK(is_crankshafted());
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
int updated = StackSlotsField::update(previous, slots);
WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
}
unsigned Code::safepoint_table_offset() {
DCHECK(is_crankshafted());
return SafepointTableOffsetField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
}
void Code::set_safepoint_table_offset(unsigned offset) {
CHECK(offset <= (1 << kSafepointTableOffsetBitCount));
DCHECK(is_crankshafted());
DCHECK(IsAligned(offset, static_cast<unsigned>(kIntSize)));
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
int updated = SafepointTableOffsetField::update(previous, offset);
WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
}
unsigned Code::back_edge_table_offset() {
DCHECK_EQ(FUNCTION, kind());
return BackEdgeTableOffsetField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)) << kPointerSizeLog2;
}
void Code::set_back_edge_table_offset(unsigned offset) {
DCHECK_EQ(FUNCTION, kind());
DCHECK(IsAligned(offset, static_cast<unsigned>(kPointerSize)));
offset = offset >> kPointerSizeLog2;
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
int updated = BackEdgeTableOffsetField::update(previous, offset);
WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
}
bool Code::back_edges_patched_for_osr() {
DCHECK_EQ(FUNCTION, kind());
return allow_osr_at_loop_nesting_level() > 0;
}
byte Code::to_boolean_state() {
return extra_ic_state();
}
bool Code::has_function_cache() {
DCHECK(kind() == STUB);
return HasFunctionCacheField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
}
void Code::set_has_function_cache(bool flag) {
DCHECK(kind() == STUB);
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
int updated = HasFunctionCacheField::update(previous, flag);
WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
}
bool Code::marked_for_deoptimization() {
DCHECK(kind() == OPTIMIZED_FUNCTION);
return MarkedForDeoptimizationField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
}
void Code::set_marked_for_deoptimization(bool flag) {
DCHECK(kind() == OPTIMIZED_FUNCTION);
DCHECK(!flag || AllowDeoptimization::IsAllowed(GetIsolate()));
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
int updated = MarkedForDeoptimizationField::update(previous, flag);
WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
}
bool Code::is_weak_stub() {
return CanBeWeakStub() && WeakStubField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
}
void Code::mark_as_weak_stub() {
DCHECK(CanBeWeakStub());
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
int updated = WeakStubField::update(previous, true);
WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
}
bool Code::is_invalidated_weak_stub() {
return is_weak_stub() && InvalidatedWeakStubField::decode(
READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
}
void Code::mark_as_invalidated_weak_stub() {
DCHECK(is_inline_cache_stub());
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
int updated = InvalidatedWeakStubField::update(previous, true);
WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
}
bool Code::is_inline_cache_stub() {
Kind kind = this->kind();
switch (kind) {
#define CASE(name) case name: return true;
IC_KIND_LIST(CASE)
#undef CASE
default: return false;
}
}
bool Code::is_keyed_stub() {
return is_keyed_load_stub() || is_keyed_store_stub();
}
bool Code::is_debug_stub() {
return ic_state() == DEBUG_STUB;
}
ConstantPoolArray* Code::constant_pool() {
return ConstantPoolArray::cast(READ_FIELD(this, kConstantPoolOffset));
}
void Code::set_constant_pool(Object* value) {
DCHECK(value->IsConstantPoolArray());
WRITE_FIELD(this, kConstantPoolOffset, value);
WRITE_BARRIER(GetHeap(), this, kConstantPoolOffset, value);
}
Code::Flags Code::ComputeFlags(Kind kind, InlineCacheState ic_state,
ExtraICState extra_ic_state, StubType type,
CacheHolderFlag holder) {
// Compute the bit mask.
unsigned int bits = KindField::encode(kind)
| ICStateField::encode(ic_state)
| TypeField::encode(type)
| ExtraICStateField::encode(extra_ic_state)
| CacheHolderField::encode(holder);
return static_cast<Flags>(bits);
}
Code::Flags Code::ComputeMonomorphicFlags(Kind kind,
ExtraICState extra_ic_state,
CacheHolderFlag holder,
StubType type) {
return ComputeFlags(kind, MONOMORPHIC, extra_ic_state, type, holder);
}
Code::Flags Code::ComputeHandlerFlags(Kind handler_kind, StubType type,
CacheHolderFlag holder) {
return ComputeFlags(Code::HANDLER, MONOMORPHIC, handler_kind, type, holder);
}
Code::Kind Code::ExtractKindFromFlags(Flags flags) {
return KindField::decode(flags);
}
InlineCacheState Code::ExtractICStateFromFlags(Flags flags) {
return ICStateField::decode(flags);
}
ExtraICState Code::ExtractExtraICStateFromFlags(Flags flags) {
return ExtraICStateField::decode(flags);
}
Code::StubType Code::ExtractTypeFromFlags(Flags flags) {
return TypeField::decode(flags);
}
CacheHolderFlag Code::ExtractCacheHolderFromFlags(Flags flags) {
return CacheHolderField::decode(flags);
}
Code::Flags Code::RemoveTypeFromFlags(Flags flags) {
int bits = flags & ~TypeField::kMask;
return static_cast<Flags>(bits);
}
Code::Flags Code::RemoveTypeAndHolderFromFlags(Flags flags) {
int bits = flags & ~TypeField::kMask & ~CacheHolderField::kMask;
return static_cast<Flags>(bits);
}
Code* Code::GetCodeFromTargetAddress(Address address) {
HeapObject* code = HeapObject::FromAddress(address - Code::kHeaderSize);
// GetCodeFromTargetAddress might be called when marking objects during mark
// sweep. reinterpret_cast is therefore used instead of the more appropriate
// Code::cast. Code::cast does not work when the object's map is
// marked.
Code* result = reinterpret_cast<Code*>(code);
return result;
}
Object* Code::GetObjectFromEntryAddress(Address location_of_address) {
return HeapObject::
FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize);
}
bool Code::IsWeakObjectInOptimizedCode(Object* object) {
if (!FLAG_collect_maps) return false;
if (object->IsMap()) {
return Map::cast(object)->CanTransition() &&
FLAG_weak_embedded_maps_in_optimized_code;
}
if (object->IsJSObject() ||
(object->IsCell() && Cell::cast(object)->value()->IsJSObject())) {
return FLAG_weak_embedded_objects_in_optimized_code;
}
return false;
}
class Code::FindAndReplacePattern {
public:
FindAndReplacePattern() : count_(0) { }
void Add(Handle<Map> map_to_find, Handle<Object> obj_to_replace) {
DCHECK(count_ < kMaxCount);
find_[count_] = map_to_find;
replace_[count_] = obj_to_replace;
++count_;
}
private:
static const int kMaxCount = 4;
int count_;
Handle<Map> find_[kMaxCount];
Handle<Object> replace_[kMaxCount];
friend class Code;
};
bool Code::IsWeakObjectInIC(Object* object) {
return object->IsMap() && Map::cast(object)->CanTransition() &&
FLAG_collect_maps &&
FLAG_weak_embedded_maps_in_ic;
}
Object* Map::prototype() const {
return READ_FIELD(this, kPrototypeOffset);
}
void Map::set_prototype(Object* value, WriteBarrierMode mode) {
DCHECK(value->IsNull() || value->IsJSReceiver());
WRITE_FIELD(this, kPrototypeOffset, value);
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kPrototypeOffset, value, mode);
}
// If the descriptor is using the empty transition array, install a new empty
// transition array that will have place for an element transition.
static void EnsureHasTransitionArray(Handle<Map> map) {
Handle<TransitionArray> transitions;
if (!map->HasTransitionArray()) {
transitions = TransitionArray::Allocate(map->GetIsolate(), 0);
transitions->set_back_pointer_storage(map->GetBackPointer());
} else if (!map->transitions()->IsFullTransitionArray()) {
transitions = TransitionArray::ExtendToFullTransitionArray(map);
} else {
return;
}
map->set_transitions(*transitions);
}
LayoutDescriptor* Map::layout_descriptor_gc_safe() {
Object* layout_desc = READ_FIELD(this, kLayoutDecriptorOffset);
return LayoutDescriptor::cast_gc_safe(layout_desc);
}
void Map::UpdateDescriptors(DescriptorArray* descriptors,
LayoutDescriptor* layout_desc) {
set_instance_descriptors(descriptors);
if (FLAG_unbox_double_fields) {
if (layout_descriptor()->IsSlowLayout()) {
set_layout_descriptor(layout_desc);
}
SLOW_DCHECK(layout_descriptor()->IsConsistentWithMap(this));
DCHECK(visitor_id() == StaticVisitorBase::GetVisitorId(this));
}
}
void Map::InitializeDescriptors(DescriptorArray* descriptors,
LayoutDescriptor* layout_desc) {
int len = descriptors->number_of_descriptors();
set_instance_descriptors(descriptors);
SetNumberOfOwnDescriptors(len);
if (FLAG_unbox_double_fields) {
set_layout_descriptor(layout_desc);
SLOW_DCHECK(layout_descriptor()->IsConsistentWithMap(this));
set_visitor_id(StaticVisitorBase::GetVisitorId(this));
}
}
ACCESSORS(Map, instance_descriptors, DescriptorArray, kDescriptorsOffset)
ACCESSORS(Map, layout_descriptor, LayoutDescriptor, kLayoutDecriptorOffset)
void Map::set_bit_field3(uint32_t bits) {
if (kInt32Size != kPointerSize) {
WRITE_UINT32_FIELD(this, kBitField3Offset + kInt32Size, 0);
}
WRITE_UINT32_FIELD(this, kBitField3Offset, bits);
}
uint32_t Map::bit_field3() {
return READ_UINT32_FIELD(this, kBitField3Offset);
}
LayoutDescriptor* Map::GetLayoutDescriptor() {
return FLAG_unbox_double_fields ? layout_descriptor()
: LayoutDescriptor::FastPointerLayout();
}
void Map::AppendDescriptor(Descriptor* desc) {
DescriptorArray* descriptors = instance_descriptors();
int number_of_own_descriptors = NumberOfOwnDescriptors();
DCHECK(descriptors->number_of_descriptors() == number_of_own_descriptors);
descriptors->Append(desc);
SetNumberOfOwnDescriptors(number_of_own_descriptors + 1);
// This function does not support appending double field descriptors and
// it should never try to (otherwise, layout descriptor must be updated too).
#ifdef DEBUG
PropertyDetails details = desc->GetDetails();
CHECK(details.type() != FIELD || !details.representation().IsDouble());
#endif
}
Object* Map::GetBackPointer() {
Object* object = READ_FIELD(this, kTransitionsOrBackPointerOffset);
if (object->IsDescriptorArray()) {
return TransitionArray::cast(object)->back_pointer_storage();
} else {
DCHECK(object->IsMap() || object->IsUndefined());
return object;
}
}
bool Map::HasElementsTransition() {
return HasTransitionArray() && transitions()->HasElementsTransition();
}
bool Map::HasTransitionArray() const {
Object* object = READ_FIELD(this, kTransitionsOrBackPointerOffset);
return object->IsTransitionArray();
}
Map* Map::elements_transition_map() {
int index =
transitions()->SearchSpecial(GetHeap()->elements_transition_symbol());
return transitions()->GetTarget(index);
}
bool Map::CanHaveMoreTransitions() {
if (!HasTransitionArray()) return true;
return transitions()->number_of_transitions() <
TransitionArray::kMaxNumberOfTransitions;
}
Map* Map::GetTransition(int transition_index) {
return transitions()->GetTarget(transition_index);
}
int Map::SearchSpecialTransition(Symbol* name) {
if (HasTransitionArray()) {
return transitions()->SearchSpecial(name);
}
return TransitionArray::kNotFound;
}
int Map::SearchTransition(PropertyType type, Name* name,
PropertyAttributes attributes) {
if (HasTransitionArray()) {
return transitions()->Search(type, name, attributes);
}
return TransitionArray::kNotFound;
}
FixedArray* Map::GetPrototypeTransitions() {
if (!HasTransitionArray()) return GetHeap()->empty_fixed_array();
if (!transitions()->HasPrototypeTransitions()) {
return GetHeap()->empty_fixed_array();
}
return transitions()->GetPrototypeTransitions();
}
void Map::SetPrototypeTransitions(
Handle<Map> map, Handle<FixedArray> proto_transitions) {
EnsureHasTransitionArray(map);
int old_number_of_transitions = map->NumberOfProtoTransitions();
if (Heap::ShouldZapGarbage() && map->HasPrototypeTransitions()) {
DCHECK(map->GetPrototypeTransitions() != *proto_transitions);
map->ZapPrototypeTransitions();
}
map->transitions()->SetPrototypeTransitions(*proto_transitions);
map->SetNumberOfProtoTransitions(old_number_of_transitions);
}
bool Map::HasPrototypeTransitions() {
return HasTransitionArray() && transitions()->HasPrototypeTransitions();
}
TransitionArray* Map::transitions() const {
DCHECK(HasTransitionArray());
Object* object = READ_FIELD(this, kTransitionsOrBackPointerOffset);
return TransitionArray::cast(object);
}
void Map::set_transitions(TransitionArray* transition_array,
WriteBarrierMode mode) {
// Transition arrays are not shared. When one is replaced, it should not
// keep referenced objects alive, so we zap it.
// When there is another reference to the array somewhere (e.g. a handle),
// not zapping turns from a waste of memory into a source of crashes.
if (HasTransitionArray()) {
#ifdef DEBUG
for (int i = 0; i < transitions()->number_of_transitions(); i++) {
Map* target = transitions()->GetTarget(i);
if (target->instance_descriptors() == instance_descriptors()) {
Name* key = transitions()->GetKey(i);
int new_target_index;
if (TransitionArray::IsSpecialTransition(key)) {
new_target_index = transition_array->SearchSpecial(Symbol::cast(key));
} else {
PropertyDetails details =
TransitionArray::GetTargetDetails(key, target);
new_target_index = transition_array->Search(details.type(), key,
details.attributes());
}
DCHECK_NE(TransitionArray::kNotFound, new_target_index);
DCHECK_EQ(target, transition_array->GetTarget(new_target_index));
}
}
#endif
DCHECK(transitions() != transition_array);
ZapTransitions();
}
WRITE_FIELD(this, kTransitionsOrBackPointerOffset, transition_array);
CONDITIONAL_WRITE_BARRIER(
GetHeap(), this, kTransitionsOrBackPointerOffset, transition_array, mode);
}
void Map::init_back_pointer(Object* undefined) {
DCHECK(undefined->IsUndefined());
WRITE_FIELD(this, kTransitionsOrBackPointerOffset, undefined);
}
void Map::SetBackPointer(Object* value, WriteBarrierMode mode) {
DCHECK(instance_type() >= FIRST_JS_RECEIVER_TYPE);
DCHECK((value->IsUndefined() && GetBackPointer()->IsMap()) ||
(value->IsMap() && GetBackPointer()->IsUndefined()));
Object* object = READ_FIELD(this, kTransitionsOrBackPointerOffset);
if (object->IsTransitionArray()) {
TransitionArray::cast(object)->set_back_pointer_storage(value);
} else {
WRITE_FIELD(this, kTransitionsOrBackPointerOffset, value);
CONDITIONAL_WRITE_BARRIER(
GetHeap(), this, kTransitionsOrBackPointerOffset, value, mode);
}
}
ACCESSORS(Map, code_cache, Object, kCodeCacheOffset)
ACCESSORS(Map, dependent_code, DependentCode, kDependentCodeOffset)
ACCESSORS(Map, constructor, Object, kConstructorOffset)
ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
ACCESSORS(JSFunction, literals_or_bindings, FixedArray, kLiteralsOffset)
ACCESSORS(JSFunction, next_function_link, Object, kNextFunctionLinkOffset)
ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset)
ACCESSORS(GlobalObject, native_context, Context, kNativeContextOffset)
ACCESSORS(GlobalObject, global_proxy, JSObject, kGlobalProxyOffset)
ACCESSORS(JSGlobalProxy, native_context, Object, kNativeContextOffset)
ACCESSORS(JSGlobalProxy, hash, Object, kHashOffset)
ACCESSORS(AccessorInfo, name, Object, kNameOffset)
ACCESSORS_TO_SMI(AccessorInfo, flag, kFlagOffset)
ACCESSORS(AccessorInfo, expected_receiver_type, Object,
kExpectedReceiverTypeOffset)
ACCESSORS(DeclaredAccessorDescriptor, serialized_data, ByteArray,
kSerializedDataOffset)
ACCESSORS(DeclaredAccessorInfo, descriptor, DeclaredAccessorDescriptor,
kDescriptorOffset)
ACCESSORS(ExecutableAccessorInfo, getter, Object, kGetterOffset)
ACCESSORS(ExecutableAccessorInfo, setter, Object, kSetterOffset)
ACCESSORS(ExecutableAccessorInfo, data, Object, kDataOffset)
ACCESSORS(Box, value, Object, kValueOffset)
ACCESSORS(AccessorPair, getter, Object, kGetterOffset)
ACCESSORS(AccessorPair, setter, Object, kSetterOffset)
ACCESSORS(AccessCheckInfo, named_callback, Object, kNamedCallbackOffset)
ACCESSORS(AccessCheckInfo, indexed_callback, Object, kIndexedCallbackOffset)
ACCESSORS(AccessCheckInfo, data, Object, kDataOffset)
ACCESSORS(InterceptorInfo, getter, Object, kGetterOffset)
ACCESSORS(InterceptorInfo, setter, Object, kSetterOffset)
ACCESSORS(InterceptorInfo, query, Object, kQueryOffset)
ACCESSORS(InterceptorInfo, deleter, Object, kDeleterOffset)
ACCESSORS(InterceptorInfo, enumerator, Object, kEnumeratorOffset)
ACCESSORS(InterceptorInfo, data, Object, kDataOffset)
ACCESSORS(CallHandlerInfo, callback, Object, kCallbackOffset)
ACCESSORS(CallHandlerInfo, data, Object, kDataOffset)
ACCESSORS(TemplateInfo, tag, Object, kTagOffset)
ACCESSORS(TemplateInfo, property_list, Object, kPropertyListOffset)
ACCESSORS(TemplateInfo, property_accessors, Object, kPropertyAccessorsOffset)
ACCESSORS(FunctionTemplateInfo, serial_number, Object, kSerialNumberOffset)
ACCESSORS(FunctionTemplateInfo, call_code, Object, kCallCodeOffset)
ACCESSORS(FunctionTemplateInfo, prototype_template, Object,
kPrototypeTemplateOffset)
ACCESSORS(FunctionTemplateInfo, parent_template, Object, kParentTemplateOffset)
ACCESSORS(FunctionTemplateInfo, named_property_handler, Object,
kNamedPropertyHandlerOffset)
ACCESSORS(FunctionTemplateInfo, indexed_property_handler, Object,
kIndexedPropertyHandlerOffset)
ACCESSORS(FunctionTemplateInfo, instance_template, Object,
kInstanceTemplateOffset)
ACCESSORS(FunctionTemplateInfo, class_name, Object, kClassNameOffset)
ACCESSORS(FunctionTemplateInfo, signature, Object, kSignatureOffset)
ACCESSORS(FunctionTemplateInfo, instance_call_handler, Object,
kInstanceCallHandlerOffset)
ACCESSORS(FunctionTemplateInfo, access_check_info, Object,
kAccessCheckInfoOffset)
ACCESSORS_TO_SMI(FunctionTemplateInfo, flag, kFlagOffset)
ACCESSORS(ObjectTemplateInfo, constructor, Object, kConstructorOffset)
ACCESSORS(ObjectTemplateInfo, internal_field_count, Object,
kInternalFieldCountOffset)
ACCESSORS(SignatureInfo, receiver, Object, kReceiverOffset)
ACCESSORS(SignatureInfo, args, Object, kArgsOffset)
ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset)
ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset)
ACCESSORS(AllocationSite, nested_site, Object, kNestedSiteOffset)
ACCESSORS_TO_SMI(AllocationSite, pretenure_data, kPretenureDataOffset)
ACCESSORS_TO_SMI(AllocationSite, pretenure_create_count,
kPretenureCreateCountOffset)
ACCESSORS(AllocationSite, dependent_code, DependentCode,
kDependentCodeOffset)
ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset)
ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset)
ACCESSORS(Script, source, Object, kSourceOffset)
ACCESSORS(Script, name, Object, kNameOffset)
ACCESSORS(Script, id, Smi, kIdOffset)
ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset)
ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset)
ACCESSORS(Script, context_data, Object, kContextOffset)
ACCESSORS(Script, wrapper, HeapObject, kWrapperOffset)
ACCESSORS_TO_SMI(Script, type, kTypeOffset)
ACCESSORS(Script, line_ends, Object, kLineEndsOffset)
ACCESSORS(Script, eval_from_shared, Object, kEvalFromSharedOffset)
ACCESSORS_TO_SMI(Script, eval_from_instructions_offset,
kEvalFrominstructionsOffsetOffset)
ACCESSORS_TO_SMI(Script, flags, kFlagsOffset)
BOOL_ACCESSORS(Script, flags, is_shared_cross_origin, kIsSharedCrossOriginBit)
ACCESSORS(Script, source_url, Object, kSourceUrlOffset)
ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset)
Script::CompilationType Script::compilation_type() {
return BooleanBit::get(flags(), kCompilationTypeBit) ?
COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST;
}
void Script::set_compilation_type(CompilationType type) {
set_flags(BooleanBit::set(flags(), kCompilationTypeBit,
type == COMPILATION_TYPE_EVAL));
}
Script::CompilationState Script::compilation_state() {
return BooleanBit::get(flags(), kCompilationStateBit) ?
COMPILATION_STATE_COMPILED : COMPILATION_STATE_INITIAL;
}
void Script::set_compilation_state(CompilationState state) {
set_flags(BooleanBit::set(flags(), kCompilationStateBit,
state == COMPILATION_STATE_COMPILED));
}
ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex)
ACCESSORS(DebugInfo, original_code, Code, kOriginalCodeIndex)
ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex)
ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex)
ACCESSORS_TO_SMI(BreakPointInfo, code_position, kCodePositionIndex)
ACCESSORS_TO_SMI(BreakPointInfo, source_position, kSourcePositionIndex)
ACCESSORS_TO_SMI(BreakPointInfo, statement_position, kStatementPositionIndex)
ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex)
ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset)
ACCESSORS(SharedFunctionInfo, optimized_code_map, Object,
kOptimizedCodeMapOffset)
ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector,
kFeedbackVectorOffset)
#if TRACE_MAPS
SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset)
#endif
ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
kInstanceClassNameOffset)
ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset)
ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset)
SMI_ACCESSORS(FunctionTemplateInfo, length, kLengthOffset)
BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype,
kHiddenPrototypeBit)
BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit)
BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check,
kNeedsAccessCheckBit)
BOOL_ACCESSORS(FunctionTemplateInfo, flag, read_only_prototype,
kReadOnlyPrototypeBit)
BOOL_ACCESSORS(FunctionTemplateInfo, flag, remove_prototype,
kRemovePrototypeBit)
BOOL_ACCESSORS(FunctionTemplateInfo, flag, do_not_cache,
kDoNotCacheBit)
BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression,
kIsExpressionBit)
BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_toplevel,
kIsTopLevelBit)
BOOL_ACCESSORS(SharedFunctionInfo,
compiler_hints,
allows_lazy_compilation,
kAllowLazyCompilation)
BOOL_ACCESSORS(SharedFunctionInfo,
compiler_hints,
allows_lazy_compilation_without_context,
kAllowLazyCompilationWithoutContext)
BOOL_ACCESSORS(SharedFunctionInfo,
compiler_hints,
uses_arguments,
kUsesArguments)
BOOL_ACCESSORS(SharedFunctionInfo,
compiler_hints,
has_duplicate_parameters,
kHasDuplicateParameters)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, asm_function, kIsAsmFunction)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, deserialized, kDeserialized)
#if V8_HOST_ARCH_32_BIT
SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset)
SMI_ACCESSORS(SharedFunctionInfo, formal_parameter_count,
kFormalParameterCountOffset)
SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties,
kExpectedNofPropertiesOffset)
SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset)
SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type,
kStartPositionAndTypeOffset)
SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset)
SMI_ACCESSORS(SharedFunctionInfo, function_token_position,
kFunctionTokenPositionOffset)
SMI_ACCESSORS(SharedFunctionInfo, compiler_hints,
kCompilerHintsOffset)
SMI_ACCESSORS(SharedFunctionInfo, opt_count_and_bailout_reason,
kOptCountAndBailoutReasonOffset)
SMI_ACCESSORS(SharedFunctionInfo, counters, kCountersOffset)
SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
SMI_ACCESSORS(SharedFunctionInfo, profiler_ticks, kProfilerTicksOffset)
#else
#if V8_TARGET_LITTLE_ENDIAN
#define PSEUDO_SMI_LO_ALIGN 0
#define PSEUDO_SMI_HI_ALIGN kIntSize
#else
#define PSEUDO_SMI_LO_ALIGN kIntSize
#define PSEUDO_SMI_HI_ALIGN 0
#endif
#define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \
STATIC_ASSERT(holder::offset % kPointerSize == PSEUDO_SMI_LO_ALIGN); \
int holder::name() const { \
int value = READ_INT_FIELD(this, offset); \
DCHECK(kHeapObjectTag == 1); \
DCHECK((value & kHeapObjectTag) == 0); \
return value >> 1; \
} \
void holder::set_##name(int value) { \
DCHECK(kHeapObjectTag == 1); \
DCHECK((value & 0xC0000000) == 0xC0000000 || (value & 0xC0000000) == 0x0); \
WRITE_INT_FIELD(this, offset, (value << 1) & ~kHeapObjectTag); \
}
#define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \
STATIC_ASSERT(holder::offset % kPointerSize == PSEUDO_SMI_HI_ALIGN); \
INT_ACCESSORS(holder, name, offset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, length, kLengthOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
formal_parameter_count,
kFormalParameterCountOffset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
expected_nof_properties,
kExpectedNofPropertiesOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, num_literals, kNumLiteralsOffset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, end_position, kEndPositionOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
start_position_and_type,
kStartPositionAndTypeOffset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
function_token_position,
kFunctionTokenPositionOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
compiler_hints,
kCompilerHintsOffset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
opt_count_and_bailout_reason,
kOptCountAndBailoutReasonOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, counters, kCountersOffset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
ast_node_count,
kAstNodeCountOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
profiler_ticks,
kProfilerTicksOffset)
#endif
BOOL_GETTER(SharedFunctionInfo,
compiler_hints,
optimization_disabled,
kOptimizationDisabled)
void SharedFunctionInfo::set_optimization_disabled(bool disable) {
set_compiler_hints(BooleanBit::set(compiler_hints(),
kOptimizationDisabled,
disable));
// If disabling optimizations we reflect that in the code object so
// it will not be counted as optimizable code.
if ((code()->kind() == Code::FUNCTION) && disable) {
code()->set_optimizable(false);
}
}
StrictMode SharedFunctionInfo::strict_mode() {
return BooleanBit::get(compiler_hints(), kStrictModeFunction)
? STRICT : SLOPPY;
}
void SharedFunctionInfo::set_strict_mode(StrictMode strict_mode) {
// We only allow mode transitions from sloppy to strict.
DCHECK(this->strict_mode() == SLOPPY || this->strict_mode() == strict_mode);
int hints = compiler_hints();
hints = BooleanBit::set(hints, kStrictModeFunction, strict_mode == STRICT);
set_compiler_hints(hints);
}
FunctionKind SharedFunctionInfo::kind() {
return FunctionKindBits::decode(compiler_hints());
}
void SharedFunctionInfo::set_kind(FunctionKind kind) {
DCHECK(IsValidFunctionKind(kind));
int hints = compiler_hints();
hints = FunctionKindBits::update(hints, kind);
set_compiler_hints(hints);
}
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, inline_builtin,
kInlineBuiltin)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
name_should_print_as_anonymous,
kNameShouldPrintAsAnonymous)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_concise_method,
kIsConciseMethod)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_default_constructor,
kIsDefaultConstructor)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
is_default_constructor_call_super,
kIsDefaultConstructorCallSuper)
ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset)
ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset)
ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset)
bool Script::HasValidSource() {
Object* src = this->source();
if (!src->IsString()) return true;
String* src_str = String::cast(src);
if (!StringShape(src_str).IsExternal()) return true;
if (src_str->IsOneByteRepresentation()) {
return ExternalOneByteString::cast(src)->resource() != NULL;
} else if (src_str->IsTwoByteRepresentation()) {
return ExternalTwoByteString::cast(src)->resource() != NULL;
}
return true;
}
void SharedFunctionInfo::DontAdaptArguments() {
DCHECK(code()->kind() == Code::BUILTIN);
set_formal_parameter_count(kDontAdaptArgumentsSentinel);
}
int SharedFunctionInfo::start_position() const {
return start_position_and_type() >> kStartPositionShift;
}
void SharedFunctionInfo::set_start_position(int start_position) {
set_start_position_and_type((start_position << kStartPositionShift)
| (start_position_and_type() & ~kStartPositionMask));
}
Code* SharedFunctionInfo::code() const {
return Code::cast(READ_FIELD(this, kCodeOffset));
}
void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
DCHECK(value->kind() != Code::OPTIMIZED_FUNCTION);
WRITE_FIELD(this, kCodeOffset, value);
CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode);
}
void SharedFunctionInfo::ReplaceCode(Code* value) {
// If the GC metadata field is already used then the function was
// enqueued as a code flushing candidate and we remove it now.
if (code()->gc_metadata() != NULL) {
CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher();
flusher->EvictCandidate(this);
}
DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL);
set_code(value);
}
ScopeInfo* SharedFunctionInfo::scope_info() const {
return reinterpret_cast<ScopeInfo*>(READ_FIELD(this, kScopeInfoOffset));
}
void SharedFunctionInfo::set_scope_info(ScopeInfo* value,
WriteBarrierMode mode) {
WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value));
CONDITIONAL_WRITE_BARRIER(GetHeap(),
this,
kScopeInfoOffset,
reinterpret_cast<Object*>(value),
mode);
}
bool SharedFunctionInfo::is_compiled() {
return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy);
}
bool SharedFunctionInfo::IsApiFunction() {
return function_data()->IsFunctionTemplateInfo();
}
FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() {
DCHECK(IsApiFunction());
return FunctionTemplateInfo::cast(function_data());
}
bool SharedFunctionInfo::HasBuiltinFunctionId() {
return function_data()->IsSmi();
}
BuiltinFunctionId SharedFunctionInfo::builtin_function_id() {
DCHECK(HasBuiltinFunctionId());
return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value());
}
int SharedFunctionInfo::ic_age() {
return ICAgeBits::decode(counters());
}
void SharedFunctionInfo::set_ic_age(int ic_age) {
set_counters(ICAgeBits::update(counters(), ic_age));
}
int SharedFunctionInfo::deopt_count() {
return DeoptCountBits::decode(counters());
}
void SharedFunctionInfo::set_deopt_count(int deopt_count) {
set_counters(DeoptCountBits::update(counters(), deopt_count));
}
void SharedFunctionInfo::increment_deopt_count() {
int value = counters();
int deopt_count = DeoptCountBits::decode(value);
deopt_count = (deopt_count + 1) & DeoptCountBits::kMax;
set_counters(DeoptCountBits::update(value, deopt_count));
}
int SharedFunctionInfo::opt_reenable_tries() {
return OptReenableTriesBits::decode(counters());
}
void SharedFunctionInfo::set_opt_reenable_tries(int tries) {
set_counters(OptReenableTriesBits::update(counters(), tries));
}
int SharedFunctionInfo::opt_count() {
return OptCountBits::decode(opt_count_and_bailout_reason());
}
void SharedFunctionInfo::set_opt_count(int opt_count) {
set_opt_count_and_bailout_reason(
OptCountBits::update(opt_count_and_bailout_reason(), opt_count));
}
BailoutReason SharedFunctionInfo::DisableOptimizationReason() {
BailoutReason reason = static_cast<BailoutReason>(
DisabledOptimizationReasonBits::decode(opt_count_and_bailout_reason()));
return reason;
}
bool SharedFunctionInfo::has_deoptimization_support() {
Code* code = this->code();
return code->kind() == Code::FUNCTION && code->has_deoptimization_support();
}
void SharedFunctionInfo::TryReenableOptimization() {
int tries = opt_reenable_tries();
set_opt_reenable_tries((tries + 1) & OptReenableTriesBits::kMax);
// We reenable optimization whenever the number of tries is a large
// enough power of 2.
if (tries >= 16 && (((tries - 1) & tries) == 0)) {
set_optimization_disabled(false);
set_opt_count(0);
set_deopt_count(0);
code()->set_optimizable(true);
}
}
bool JSFunction::IsBuiltin() {
return context()->global_object()->IsJSBuiltinsObject();
}
bool JSFunction::IsFromNativeScript() {
Object* script = shared()->script();
bool native = script->IsScript() &&
Script::cast(script)->type()->value() == Script::TYPE_NATIVE;
DCHECK(!IsBuiltin() || native); // All builtins are also native.
return native;
}
bool JSFunction::IsFromExtensionScript() {
Object* script = shared()->script();
return script->IsScript() &&
Script::cast(script)->type()->value() == Script::TYPE_EXTENSION;
}
bool JSFunction::NeedsArgumentsAdaption() {
return shared()->formal_parameter_count() !=
SharedFunctionInfo::kDontAdaptArgumentsSentinel;
}
bool JSFunction::IsOptimized() {
return code()->kind() == Code::OPTIMIZED_FUNCTION;
}
bool JSFunction::IsOptimizable() {
return code()->kind() == Code::FUNCTION && code()->optimizable();
}
bool JSFunction::IsMarkedForOptimization() {
return code() == GetIsolate()->builtins()->builtin(
Builtins::kCompileOptimized);
}
bool JSFunction::IsMarkedForConcurrentOptimization() {
return code() == GetIsolate()->builtins()->builtin(
Builtins::kCompileOptimizedConcurrent);
}
bool JSFunction::IsInOptimizationQueue() {
return code() == GetIsolate()->builtins()->builtin(
Builtins::kInOptimizationQueue);
}
bool JSFunction::IsInobjectSlackTrackingInProgress() {
return has_initial_map() &&
initial_map()->construction_count() != JSFunction::kNoSlackTracking;
}
Code* JSFunction::code() {
return Code::cast(
Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset)));
}
void JSFunction::set_code(Code* value) {
DCHECK(!GetHeap()->InNewSpace(value));
Address entry = value->entry();
WRITE_INTPTR_FIELD(this, kCodeEntryOffset, reinterpret_cast<intptr_t>(entry));
GetHeap()->incremental_marking()->RecordWriteOfCodeEntry(
this,
HeapObject::RawField(this, kCodeEntryOffset),
value);
}
void JSFunction::set_code_no_write_barrier(Code* value) {
DCHECK(!GetHeap()->InNewSpace(value));
Address entry = value->entry();
WRITE_INTPTR_FIELD(this, kCodeEntryOffset, reinterpret_cast<intptr_t>(entry));
}
void JSFunction::ReplaceCode(Code* code) {
bool was_optimized = IsOptimized();
bool is_optimized = code->kind() == Code::OPTIMIZED_FUNCTION;
if (was_optimized && is_optimized) {
shared()->EvictFromOptimizedCodeMap(this->code(),
"Replacing with another optimized code");
}
set_code(code);
// Add/remove the function from the list of optimized functions for this
// context based on the state change.
if (!was_optimized && is_optimized) {
context()->native_context()->AddOptimizedFunction(this);
}
if (was_optimized && !is_optimized) {
// TODO(titzer): linear in the number of optimized functions; fix!
context()->native_context()->RemoveOptimizedFunction(this);
}
}
Context* JSFunction::context() {
return Context::cast(READ_FIELD(this, kContextOffset));
}
JSObject* JSFunction::global_proxy() {
return context()->global_proxy();
}
void JSFunction::set_context(Object* value) {
DCHECK(value->IsUndefined() || value->IsContext());
WRITE_FIELD(this, kContextOffset, value);
WRITE_BARRIER(GetHeap(), this, kContextOffset, value);
}
ACCESSORS(JSFunction, prototype_or_initial_map, Object,
kPrototypeOrInitialMapOffset)
Map* JSFunction::initial_map() {
return Map::cast(prototype_or_initial_map());
}
bool JSFunction::has_initial_map() {
return prototype_or_initial_map()->IsMap();
}
bool JSFunction::has_instance_prototype() {
return has_initial_map() || !prototype_or_initial_map()->IsTheHole();
}
bool JSFunction::has_prototype() {
return map()->has_non_instance_prototype() || has_instance_prototype();
}
Object* JSFunction::instance_prototype() {
DCHECK(has_instance_prototype());
if (has_initial_map()) return initial_map()->prototype();
// When there is no initial map and the prototype is a JSObject, the
// initial map field is used for the prototype field.
return prototype_or_initial_map();
}
Object* JSFunction::prototype() {
DCHECK(has_prototype());
// If the function's prototype property has been set to a non-JSObject
// value, that value is stored in the constructor field of the map.
if (map()->has_non_instance_prototype()) return map()->constructor();
return instance_prototype();
}
bool JSFunction::should_have_prototype() {
return map()->function_with_prototype();
}
bool JSFunction::is_compiled() {
return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy);
}
FixedArray* JSFunction::literals() {
DCHECK(!shared()->bound());
return literals_or_bindings();
}
void JSFunction::set_literals(FixedArray* literals) {
DCHECK(!shared()->bound());
set_literals_or_bindings(literals);
}
FixedArray* JSFunction::function_bindings() {
DCHECK(shared()->bound());
return literals_or_bindings();
}
void JSFunction::set_function_bindings(FixedArray* bindings) {
DCHECK(shared()->bound());
// Bound function literal may be initialized to the empty fixed array
// before the bindings are set.
DCHECK(bindings == GetHeap()->empty_fixed_array() ||
bindings->map() == GetHeap()->fixed_cow_array_map());
set_literals_or_bindings(bindings);
}
int JSFunction::NumberOfLiterals() {
DCHECK(!shared()->bound());
return literals()->length();
}
Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) {
DCHECK(id < kJSBuiltinsCount); // id is unsigned.
return READ_FIELD(this, OffsetOfFunctionWithId(id));
}
void JSBuiltinsObject::set_javascript_builtin(Builtins::JavaScript id,
Object* value) {
DCHECK(id < kJSBuiltinsCount); // id is unsigned.
WRITE_FIELD(this, OffsetOfFunctionWithId(id), value);
WRITE_BARRIER(GetHeap(), this, OffsetOfFunctionWithId(id), value);
}
Code* JSBuiltinsObject::javascript_builtin_code(Builtins::JavaScript id) {
DCHECK(id < kJSBuiltinsCount); // id is unsigned.
return Code::cast(READ_FIELD(this, OffsetOfCodeWithId(id)));
}
void JSBuiltinsObject::set_javascript_builtin_code(Builtins::JavaScript id,
Code* value) {
DCHECK(id < kJSBuiltinsCount); // id is unsigned.
WRITE_FIELD(this, OffsetOfCodeWithId(id), value);
DCHECK(!GetHeap()->InNewSpace(value));
}
ACCESSORS(JSProxy, handler, Object, kHandlerOffset)
ACCESSORS(JSProxy, hash, Object, kHashOffset)
ACCESSORS(JSFunctionProxy, call_trap, Object, kCallTrapOffset)
ACCESSORS(JSFunctionProxy, construct_trap, Object, kConstructTrapOffset)
void JSProxy::InitializeBody(int object_size, Object* value) {
DCHECK(!value->IsHeapObject() || !GetHeap()->InNewSpace(value));
for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) {
WRITE_FIELD(this, offset, value);
}
}
ACCESSORS(JSCollection, table, Object, kTableOffset)
#define ORDERED_HASH_TABLE_ITERATOR_ACCESSORS(name, type, offset) \
template<class Derived, class TableType> \
type* OrderedHashTableIterator<Derived, TableType>::name() const { \
return type::cast(READ_FIELD(this, offset)); \
} \
template<class Derived, class TableType> \
void OrderedHashTableIterator<Derived, TableType>::set_##name( \
type* value, WriteBarrierMode mode) { \
WRITE_FIELD(this, offset, value); \
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, offset, value, mode); \
}
ORDERED_HASH_TABLE_ITERATOR_ACCESSORS(table, Object, kTableOffset)
ORDERED_HASH_TABLE_ITERATOR_ACCESSORS(index, Object, kIndexOffset)
ORDERED_HASH_TABLE_ITERATOR_ACCESSORS(kind, Object, kKindOffset)
#undef ORDERED_HASH_TABLE_ITERATOR_ACCESSORS
ACCESSORS(JSWeakCollection, table, Object, kTableOffset)
ACCESSORS(JSWeakCollection, next, Object, kNextOffset)
Address Foreign::foreign_address() {
return AddressFrom<Address>(READ_INTPTR_FIELD(this, kForeignAddressOffset));
}
void Foreign::set_foreign_address(Address value) {
WRITE_INTPTR_FIELD(this, kForeignAddressOffset, OffsetFrom(value));
}
ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset)
ACCESSORS(JSGeneratorObject, context, Context, kContextOffset)
ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset)
SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset)
ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset)
SMI_ACCESSORS(JSGeneratorObject, stack_handler_index, kStackHandlerIndexOffset)
bool JSGeneratorObject::is_suspended() {
DCHECK_LT(kGeneratorExecuting, kGeneratorClosed);
DCHECK_EQ(kGeneratorClosed, 0);
return continuation() > 0;
}
bool JSGeneratorObject::is_closed() {
return continuation() == kGeneratorClosed;
}
bool JSGeneratorObject::is_executing() {
return continuation() == kGeneratorExecuting;
}
ACCESSORS(JSModule, context, Object, kContextOffset)
ACCESSORS(JSModule, scope_info, ScopeInfo, kScopeInfoOffset)
ACCESSORS(JSValue, value, Object, kValueOffset)
HeapNumber* HeapNumber::cast(Object* object) {
SLOW_DCHECK(object->IsHeapNumber() || object->IsMutableHeapNumber());
return reinterpret_cast<HeapNumber*>(object);
}
const HeapNumber* HeapNumber::cast(const Object* object) {
SLOW_DCHECK(object->IsHeapNumber() || object->IsMutableHeapNumber());
return reinterpret_cast<const HeapNumber*>(object);
}
ACCESSORS(JSDate, value, Object, kValueOffset)
ACCESSORS(JSDate, cache_stamp, Object, kCacheStampOffset)
ACCESSORS(JSDate, year, Object, kYearOffset)
ACCESSORS(JSDate, month, Object, kMonthOffset)
ACCESSORS(JSDate, day, Object, kDayOffset)
ACCESSORS(JSDate, weekday, Object, kWeekdayOffset)
ACCESSORS(JSDate, hour, Object, kHourOffset)
ACCESSORS(JSDate, min, Object, kMinOffset)
ACCESSORS(JSDate, sec, Object, kSecOffset)
ACCESSORS(JSMessageObject, type, String, kTypeOffset)
ACCESSORS(JSMessageObject, arguments, JSArray, kArgumentsOffset)
ACCESSORS(JSMessageObject, script, Object, kScriptOffset)
ACCESSORS(JSMessageObject, stack_frames, Object, kStackFramesOffset)
SMI_ACCESSORS(JSMessageObject, start_position, kStartPositionOffset)
SMI_ACCESSORS(JSMessageObject, end_position, kEndPositionOffset)
INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset)
INT_ACCESSORS(Code, prologue_offset, kPrologueOffset)
ACCESSORS(Code, relocation_info, ByteArray, kRelocationInfoOffset)
ACCESSORS(Code, handler_table, FixedArray, kHandlerTableOffset)
ACCESSORS(Code, deoptimization_data, FixedArray, kDeoptimizationDataOffset)
ACCESSORS(Code, raw_type_feedback_info, Object, kTypeFeedbackInfoOffset)
ACCESSORS(Code, next_code_link, Object, kNextCodeLinkOffset)
void Code::WipeOutHeader() {
WRITE_FIELD(this, kRelocationInfoOffset, NULL);
WRITE_FIELD(this, kHandlerTableOffset, NULL);
WRITE_FIELD(this, kDeoptimizationDataOffset, NULL);
WRITE_FIELD(this, kConstantPoolOffset, NULL);
// Do not wipe out major/minor keys on a code stub or IC
if (!READ_FIELD(this, kTypeFeedbackInfoOffset)->IsSmi()) {
WRITE_FIELD(this, kTypeFeedbackInfoOffset, NULL);
}
}
Object* Code::type_feedback_info() {
DCHECK(kind() == FUNCTION);
return raw_type_feedback_info();
}
void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) {
DCHECK(kind() == FUNCTION);
set_raw_type_feedback_info(value, mode);
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset,
value, mode);
}
uint32_t Code::stub_key() {
DCHECK(IsCodeStubOrIC());
Smi* smi_key = Smi::cast(raw_type_feedback_info());
return static_cast<uint32_t>(smi_key->value());
}
void Code::set_stub_key(uint32_t key) {
DCHECK(IsCodeStubOrIC());
set_raw_type_feedback_info(Smi::FromInt(key));
}
ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset)
INT_ACCESSORS(Code, ic_age, kICAgeOffset)
byte* Code::instruction_start() {
return FIELD_ADDR(this, kHeaderSize);
}
byte* Code::instruction_end() {
return instruction_start() + instruction_size();
}
int Code::body_size() {
return RoundUp(instruction_size(), kObjectAlignment);
}
ByteArray* Code::unchecked_relocation_info() {
return reinterpret_cast<ByteArray*>(READ_FIELD(this, kRelocationInfoOffset));
}
byte* Code::relocation_start() {
return unchecked_relocation_info()->GetDataStartAddress();
}
int Code::relocation_size() {
return unchecked_relocation_info()->length();
}
byte* Code::entry() {
return instruction_start();
}
bool Code::contains(byte* inner_pointer) {
return (address() <= inner_pointer) && (inner_pointer <= address() + Size());
}
ACCESSORS(JSArray, length, Object, kLengthOffset)
void* JSArrayBuffer::backing_store() const {
intptr_t ptr = READ_INTPTR_FIELD(this, kBackingStoreOffset);
return reinterpret_cast<void*>(ptr);
}
void JSArrayBuffer::set_backing_store(void* value, WriteBarrierMode mode) {
intptr_t ptr = reinterpret_cast<intptr_t>(value);
WRITE_INTPTR_FIELD(this, kBackingStoreOffset, ptr);
}
ACCESSORS(JSArrayBuffer, byte_length, Object, kByteLengthOffset)
ACCESSORS_TO_SMI(JSArrayBuffer, flag, kFlagOffset)
bool JSArrayBuffer::is_external() {
return BooleanBit::get(flag(), kIsExternalBit);
}
void JSArrayBuffer::set_is_external(bool value) {
set_flag(BooleanBit::set(flag(), kIsExternalBit, value));
}
bool JSArrayBuffer::should_be_freed() {
return BooleanBit::get(flag(), kShouldBeFreed);
}
void JSArrayBuffer::set_should_be_freed(bool value) {
set_flag(BooleanBit::set(flag(), kShouldBeFreed, value));
}
bool JSArrayBuffer::is_neuterable() {
return BooleanBit::get(flag(), kIsNeuterableBit);
}
void JSArrayBuffer::set_is_neuterable(bool value) {
set_flag(BooleanBit::set(flag(), kIsNeuterableBit, value));
}
ACCESSORS(JSArrayBuffer, weak_next, Object, kWeakNextOffset)
ACCESSORS(JSArrayBuffer, weak_first_view, Object, kWeakFirstViewOffset)
ACCESSORS(JSArrayBufferView, buffer, Object, kBufferOffset)
ACCESSORS(JSArrayBufferView, byte_offset, Object, kByteOffsetOffset)
ACCESSORS(JSArrayBufferView, byte_length, Object, kByteLengthOffset)
ACCESSORS(JSArrayBufferView, weak_next, Object, kWeakNextOffset)
ACCESSORS(JSTypedArray, length, Object, kLengthOffset)
ACCESSORS(JSRegExp, data, Object, kDataOffset)
JSRegExp::Type JSRegExp::TypeTag() {
Object* data = this->data();
if (data->IsUndefined()) return JSRegExp::NOT_COMPILED;
Smi* smi = Smi::cast(FixedArray::cast(data)->get(kTagIndex));
return static_cast<JSRegExp::Type>(smi->value());
}
int JSRegExp::CaptureCount() {
switch (TypeTag()) {
case ATOM:
return 0;
case IRREGEXP:
return Smi::cast(DataAt(kIrregexpCaptureCountIndex))->value();
default:
UNREACHABLE();
return -1;
}
}
JSRegExp::Flags JSRegExp::GetFlags() {
DCHECK(this->data()->IsFixedArray());
Object* data = this->data();
Smi* smi = Smi::cast(FixedArray::cast(data)->get(kFlagsIndex));
return Flags(smi->value());
}
String* JSRegExp::Pattern() {
DCHECK(this->data()->IsFixedArray());
Object* data = this->data();
String* pattern= String::cast(FixedArray::cast(data)->get(kSourceIndex));
return pattern;
}
Object* JSRegExp::DataAt(int index) {
DCHECK(TypeTag() != NOT_COMPILED);
return FixedArray::cast(data())->get(index);
}
void JSRegExp::SetDataAt(int index, Object* value) {
DCHECK(TypeTag() != NOT_COMPILED);
DCHECK(index >= kDataIndex); // Only implementation data can be set this way.
FixedArray::cast(data())->set(index, value);
}
ElementsKind JSObject::GetElementsKind() {
ElementsKind kind = map()->elements_kind();
#if DEBUG
FixedArrayBase* fixed_array =
reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset));
// If a GC was caused while constructing this object, the elements
// pointer may point to a one pointer filler map.
if (ElementsAreSafeToExamine()) {
Map* map = fixed_array->map();
DCHECK((IsFastSmiOrObjectElementsKind(kind) &&
(map == GetHeap()->fixed_array_map() ||
map == GetHeap()->fixed_cow_array_map())) ||
(IsFastDoubleElementsKind(kind) &&
(fixed_array->IsFixedDoubleArray() ||
fixed_array == GetHeap()->empty_fixed_array())) ||
(kind == DICTIONARY_ELEMENTS &&
fixed_array->IsFixedArray() &&
fixed_array->IsDictionary()) ||
(kind > DICTIONARY_ELEMENTS));
DCHECK((kind != SLOPPY_ARGUMENTS_ELEMENTS) ||
(elements()->IsFixedArray() && elements()->length() >= 2));
}
#endif
return kind;
}
ElementsAccessor* JSObject::GetElementsAccessor() {
return ElementsAccessor::ForKind(GetElementsKind());
}
bool JSObject::HasFastObjectElements() {
return IsFastObjectElementsKind(GetElementsKind());
}
bool JSObject::HasFastSmiElements() {
return IsFastSmiElementsKind(GetElementsKind());
}
bool JSObject::HasFastSmiOrObjectElements() {
return IsFastSmiOrObjectElementsKind(GetElementsKind());
}
bool JSObject::HasFastDoubleElements() {
return IsFastDoubleElementsKind(GetElementsKind());
}
bool JSObject::HasFastHoleyElements() {
return IsFastHoleyElementsKind(GetElementsKind());
}
bool JSObject::HasFastElements() {
return IsFastElementsKind(GetElementsKind());
}
bool JSObject::HasDictionaryElements() {
return GetElementsKind() == DICTIONARY_ELEMENTS;
}
bool JSObject::HasSloppyArgumentsElements() {
return GetElementsKind() == SLOPPY_ARGUMENTS_ELEMENTS;
}
bool JSObject::HasExternalArrayElements() {
HeapObject* array = elements();
DCHECK(array != NULL);
return array->IsExternalArray();
}
#define EXTERNAL_ELEMENTS_CHECK(Type, type, TYPE, ctype, size) \
bool JSObject::HasExternal##Type##Elements() { \
HeapObject* array = elements(); \
DCHECK(array != NULL); \
if (!array->IsHeapObject()) \
return false; \
return array->map()->instance_type() == EXTERNAL_##TYPE##_ARRAY_TYPE; \
}
TYPED_ARRAYS(EXTERNAL_ELEMENTS_CHECK)
#undef EXTERNAL_ELEMENTS_CHECK
bool JSObject::HasFixedTypedArrayElements() {
HeapObject* array = elements();
DCHECK(array != NULL);
return array->IsFixedTypedArrayBase();
}
#define FIXED_TYPED_ELEMENTS_CHECK(Type, type, TYPE, ctype, size) \
bool JSObject::HasFixed##Type##Elements() { \
HeapObject* array = elements(); \
DCHECK(array != NULL); \
if (!array->IsHeapObject()) \
return false; \
return array->map()->instance_type() == FIXED_##TYPE##_ARRAY_TYPE; \
}
TYPED_ARRAYS(FIXED_TYPED_ELEMENTS_CHECK)
#undef FIXED_TYPED_ELEMENTS_CHECK
bool JSObject::HasNamedInterceptor() {
return map()->has_named_interceptor();
}
bool JSObject::HasIndexedInterceptor() {
return map()->has_indexed_interceptor();
}
NameDictionary* JSObject::property_dictionary() {
DCHECK(!HasFastProperties());
return NameDictionary::cast(properties());
}
SeededNumberDictionary* JSObject::element_dictionary() {
DCHECK(HasDictionaryElements());
return SeededNumberDictionary::cast(elements());
}
bool Name::IsHashFieldComputed(uint32_t field) {
return (field & kHashNotComputedMask) == 0;
}
bool Name::HasHashCode() {
return IsHashFieldComputed(hash_field());
}
uint32_t Name::Hash() {
// Fast case: has hash code already been computed?
uint32_t field = hash_field();
if (IsHashFieldComputed(field)) return field >> kHashShift;
// Slow case: compute hash code and set it. Has to be a string.
return String::cast(this)->ComputeAndSetHash();
}
bool Name::IsOwn() {
return this->IsSymbol() && Symbol::cast(this)->is_own();
}
StringHasher::StringHasher(int length, uint32_t seed)
: length_(length),
raw_running_hash_(seed),
array_index_(0),
is_array_index_(0 < length_ && length_ <= String::kMaxArrayIndexSize),
is_first_char_(true) {
DCHECK(FLAG_randomize_hashes || raw_running_hash_ == 0);
}
bool StringHasher::has_trivial_hash() {
return length_ > String::kMaxHashCalcLength;
}
uint32_t StringHasher::AddCharacterCore(uint32_t running_hash, uint16_t c) {
running_hash += c;
running_hash += (running_hash << 10);
running_hash ^= (running_hash >> 6);
return running_hash;
}
uint32_t StringHasher::GetHashCore(uint32_t running_hash) {
running_hash += (running_hash << 3);
running_hash ^= (running_hash >> 11);
running_hash += (running_hash << 15);
if ((running_hash & String::kHashBitMask) == 0) {
return kZeroHash;
}
return running_hash;
}
void StringHasher::AddCharacter(uint16_t c) {
// Use the Jenkins one-at-a-time hash function to update the hash
// for the given character.
raw_running_hash_ = AddCharacterCore(raw_running_hash_, c);
}
bool StringHasher::UpdateIndex(uint16_t c) {
DCHECK(is_array_index_);
if (c < '0' || c > '9') {
is_array_index_ = false;
return false;
}
int d = c - '0';
if (is_first_char_) {
is_first_char_ = false;
if (c == '0' && length_ > 1) {
is_array_index_ = false;
return false;
}
}
if (array_index_ > 429496729U - ((d + 2) >> 3)) {
is_array_index_ = false;
return false;
}
array_index_ = array_index_ * 10 + d;
return true;
}
template<typename Char>
inline void StringHasher::AddCharacters(const Char* chars, int length) {
DCHECK(sizeof(Char) == 1 || sizeof(Char) == 2);
int i = 0;
if (is_array_index_) {
for (; i < length; i++) {
AddCharacter(chars[i]);
if (!UpdateIndex(chars[i])) {
i++;
break;
}
}
}
for (; i < length; i++) {
DCHECK(!is_array_index_);
AddCharacter(chars[i]);
}
}
template <typename schar>
uint32_t StringHasher::HashSequentialString(const schar* chars,
int length,
uint32_t seed) {
StringHasher hasher(length, seed);
if (!hasher.has_trivial_hash()) hasher.AddCharacters(chars, length);
return hasher.GetHashField();
}
uint32_t IteratingStringHasher::Hash(String* string, uint32_t seed) {
IteratingStringHasher hasher(string->length(), seed);
// Nothing to do.
if (hasher.has_trivial_hash()) return hasher.GetHashField();
ConsString* cons_string = String::VisitFlat(&hasher, string);
// The string was flat.
if (cons_string == NULL) return hasher.GetHashField();
// This is a ConsString, iterate across it.
ConsStringIterator iter(cons_string);
int offset;
while (NULL != (string = iter.Next(&offset))) {
String::VisitFlat(&hasher, string, offset);
}
return hasher.GetHashField();
}
void IteratingStringHasher::VisitOneByteString(const uint8_t* chars,
int length) {
AddCharacters(chars, length);
}
void IteratingStringHasher::VisitTwoByteString(const uint16_t* chars,
int length) {
AddCharacters(chars, length);
}
bool Name::AsArrayIndex(uint32_t* index) {
return IsString() && String::cast(this)->AsArrayIndex(index);
}
bool String::AsArrayIndex(uint32_t* index) {
uint32_t field = hash_field();
if (IsHashFieldComputed(field) && (field & kIsNotArrayIndexMask)) {
return false;
}
return SlowAsArrayIndex(index);
}
void String::SetForwardedInternalizedString(String* canonical) {
DCHECK(IsInternalizedString());
DCHECK(HasHashCode());
if (canonical == this) return; // No need to forward.
DCHECK(SlowEquals(canonical));
DCHECK(canonical->IsInternalizedString());
DCHECK(canonical->HasHashCode());
WRITE_FIELD(this, kHashFieldSlot, canonical);
// Setting the hash field to a tagged value sets the LSB, causing the hash
// code to be interpreted as uninitialized. We use this fact to recognize
// that we have a forwarded string.
DCHECK(!HasHashCode());
}
String* String::GetForwardedInternalizedString() {
DCHECK(IsInternalizedString());
if (HasHashCode()) return this;
String* canonical = String::cast(READ_FIELD(this, kHashFieldSlot));
DCHECK(canonical->IsInternalizedString());
DCHECK(SlowEquals(canonical));
DCHECK(canonical->HasHashCode());
return canonical;
}
Maybe<bool> JSReceiver::HasProperty(Handle<JSReceiver> object,
Handle<Name> name) {
if (object->IsJSProxy()) {
Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
return JSProxy::HasPropertyWithHandler(proxy, name);
}
Maybe<PropertyAttributes> result = GetPropertyAttributes(object, name);
if (!result.has_value) return Maybe<bool>();
return maybe(result.value != ABSENT);
}
Maybe<bool> JSReceiver::HasOwnProperty(Handle<JSReceiver> object,
Handle<Name> name) {
if (object->IsJSProxy()) {
Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
return JSProxy::HasPropertyWithHandler(proxy, name);
}
Maybe<PropertyAttributes> result = GetOwnPropertyAttributes(object, name);
if (!result.has_value) return Maybe<bool>();
return maybe(result.value != ABSENT);
}
Maybe<PropertyAttributes> JSReceiver::GetPropertyAttributes(
Handle<JSReceiver> object, Handle<Name> key) {
uint32_t index;
if (object->IsJSObject() && key->AsArrayIndex(&index)) {
return GetElementAttribute(object, index);
}
LookupIterator it(object, key);
return GetPropertyAttributes(&it);
}
Maybe<PropertyAttributes> JSReceiver::GetElementAttribute(
Handle<JSReceiver> object, uint32_t index) {
if (object->IsJSProxy()) {
return JSProxy::GetElementAttributeWithHandler(
Handle<JSProxy>::cast(object), object, index);
}
return JSObject::GetElementAttributeWithReceiver(
Handle<JSObject>::cast(object), object, index, true);
}
bool JSGlobalObject::IsDetached() {
return JSGlobalProxy::cast(global_proxy())->IsDetachedFrom(this);
}
bool JSGlobalProxy::IsDetachedFrom(GlobalObject* global) const {
const PrototypeIterator iter(this->GetIsolate(),
const_cast<JSGlobalProxy*>(this));
return iter.GetCurrent() != global;
}
Handle<Smi> JSReceiver::GetOrCreateIdentityHash(Handle<JSReceiver> object) {
return object->IsJSProxy()
? JSProxy::GetOrCreateIdentityHash(Handle<JSProxy>::cast(object))
: JSObject::GetOrCreateIdentityHash(Handle<JSObject>::cast(object));
}
Object* JSReceiver::GetIdentityHash() {
return IsJSProxy()
? JSProxy::cast(this)->GetIdentityHash()
: JSObject::cast(this)->GetIdentityHash();
}
Maybe<bool> JSReceiver::HasElement(Handle<JSReceiver> object, uint32_t index) {
if (object->IsJSProxy()) {
Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
return JSProxy::HasElementWithHandler(proxy, index);
}
Maybe<PropertyAttributes> result = JSObject::GetElementAttributeWithReceiver(
Handle<JSObject>::cast(object), object, index, true);
if (!result.has_value) return Maybe<bool>();
return maybe(result.value != ABSENT);
}
Maybe<bool> JSReceiver::HasOwnElement(Handle<JSReceiver> object,
uint32_t index) {
if (object->IsJSProxy()) {
Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
return JSProxy::HasElementWithHandler(proxy, index);
}
Maybe<PropertyAttributes> result = JSObject::GetElementAttributeWithReceiver(
Handle<JSObject>::cast(object), object, index, false);
if (!result.has_value) return Maybe<bool>();
return maybe(result.value != ABSENT);
}
Maybe<PropertyAttributes> JSReceiver::GetOwnElementAttribute(
Handle<JSReceiver> object, uint32_t index) {
if (object->IsJSProxy()) {
return JSProxy::GetElementAttributeWithHandler(
Handle<JSProxy>::cast(object), object, index);
}
return JSObject::GetElementAttributeWithReceiver(
Handle<JSObject>::cast(object), object, index, false);
}
bool AccessorInfo::all_can_read() {
return BooleanBit::get(flag(), kAllCanReadBit);
}
void AccessorInfo::set_all_can_read(bool value) {
set_flag(BooleanBit::set(flag(), kAllCanReadBit, value));
}
bool AccessorInfo::all_can_write() {
return BooleanBit::get(flag(), kAllCanWriteBit);
}
void AccessorInfo::set_all_can_write(bool value) {
set_flag(BooleanBit::set(flag(), kAllCanWriteBit, value));
}
PropertyAttributes AccessorInfo::property_attributes() {
return AttributesField::decode(static_cast<uint32_t>(flag()->value()));
}
void AccessorInfo::set_property_attributes(PropertyAttributes attributes) {
set_flag(Smi::FromInt(AttributesField::update(flag()->value(), attributes)));
}
bool AccessorInfo::IsCompatibleReceiver(Object* receiver) {
if (!HasExpectedReceiverType()) return true;
if (!receiver->IsJSObject()) return false;
return FunctionTemplateInfo::cast(expected_receiver_type())
->IsTemplateFor(JSObject::cast(receiver)->map());
}
void ExecutableAccessorInfo::clear_setter() {
set_setter(GetIsolate()->heap()->undefined_value(), SKIP_WRITE_BARRIER);
}
template<typename Derived, typename Shape, typename Key>
void Dictionary<Derived, Shape, Key>::SetEntry(int entry,
Handle<Object> key,
Handle<Object> value) {
SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0)));
}
template<typename Derived, typename Shape, typename Key>
void Dictionary<Derived, Shape, Key>::SetEntry(int entry,
Handle<Object> key,
Handle<Object> value,
PropertyDetails details) {
DCHECK(!key->IsName() ||
details.IsDeleted() ||
details.dictionary_index() > 0);
int index = DerivedHashTable::EntryToIndex(entry);
DisallowHeapAllocation no_gc;
WriteBarrierMode mode = FixedArray::GetWriteBarrierMode(no_gc);
FixedArray::set(index, *key, mode);
FixedArray::set(index+1, *value, mode);
FixedArray::set(index+2, details.AsSmi());
}
bool NumberDictionaryShape::IsMatch(uint32_t key, Object* other) {
DCHECK(other->IsNumber());
return key == static_cast<uint32_t>(other->Number());
}
uint32_t UnseededNumberDictionaryShape::Hash(uint32_t key) {
return ComputeIntegerHash(key, 0);
}
uint32_t UnseededNumberDictionaryShape::HashForObject(uint32_t key,
Object* other) {
DCHECK(other->IsNumber());
return ComputeIntegerHash(static_cast<uint32_t>(other->Number()), 0);
}
uint32_t SeededNumberDictionaryShape::SeededHash(uint32_t key, uint32_t seed) {
return ComputeIntegerHash(key, seed);
}
uint32_t SeededNumberDictionaryShape::SeededHashForObject(uint32_t key,
uint32_t seed,
Object* other) {
DCHECK(other->IsNumber());
return ComputeIntegerHash(static_cast<uint32_t>(other->Number()), seed);
}
Handle<Object> NumberDictionaryShape::AsHandle(Isolate* isolate, uint32_t key) {
return isolate->factory()->NewNumberFromUint(key);
}
bool NameDictionaryShape::IsMatch(Handle<Name> key, Object* other) {
// We know that all entries in a hash table had their hash keys created.
// Use that knowledge to have fast failure.
if (key->Hash() != Name::cast(other)->Hash()) return false;
return key->Equals(Name::cast(other));
}
uint32_t NameDictionaryShape::Hash(Handle<Name> key) {
return key->Hash();
}
uint32_t NameDictionaryShape::HashForObject(Handle<Name> key, Object* other) {
return Name::cast(other)->Hash();
}
Handle<Object> NameDictionaryShape::AsHandle(Isolate* isolate,
Handle<Name> key) {
DCHECK(key->IsUniqueName());
return key;
}
Handle<FixedArray> NameDictionary::DoGenerateNewEnumerationIndices(
Handle<NameDictionary> dictionary) {
return DerivedDictionary::GenerateNewEnumerationIndices(dictionary);
}
bool ObjectHashTableShape::IsMatch(Handle<Object> key, Object* other) {
return key->SameValue(other);
}
uint32_t ObjectHashTableShape::Hash(Handle<Object> key) {
return Smi::cast(key->GetHash())->value();
}
uint32_t ObjectHashTableShape::HashForObject(Handle<Object> key,
Object* other) {
return Smi::cast(other->GetHash())->value();
}
Handle<Object> ObjectHashTableShape::AsHandle(Isolate* isolate,
Handle<Object> key) {
return key;
}
Handle<ObjectHashTable> ObjectHashTable::Shrink(
Handle<ObjectHashTable> table, Handle<Object> key) {
return DerivedHashTable::Shrink(table, key);
}
template <int entrysize>
bool WeakHashTableShape<entrysize>::IsMatch(Handle<Object> key, Object* other) {
return key->SameValue(other);
}
template <int entrysize>
uint32_t WeakHashTableShape<entrysize>::Hash(Handle<Object> key) {
intptr_t hash = reinterpret_cast<intptr_t>(*key);
return (uint32_t)(hash & 0xFFFFFFFF);
}
template <int entrysize>
uint32_t WeakHashTableShape<entrysize>::HashForObject(Handle<Object> key,
Object* other) {
intptr_t hash = reinterpret_cast<intptr_t>(other);
return (uint32_t)(hash & 0xFFFFFFFF);
}
template <int entrysize>
Handle<Object> WeakHashTableShape<entrysize>::AsHandle(Isolate* isolate,
Handle<Object> key) {
return key;
}
void Map::ClearCodeCache(Heap* heap) {
// No write barrier is needed since empty_fixed_array is not in new space.
// Please note this function is used during marking:
// - MarkCompactCollector::MarkUnmarkedObject
// - IncrementalMarking::Step
DCHECK(!heap->InNewSpace(heap->empty_fixed_array()));
WRITE_FIELD(this, kCodeCacheOffset, heap->empty_fixed_array());
}
int Map::SlackForArraySize(int old_size, int size_limit) {
const int max_slack = size_limit - old_size;
CHECK(max_slack >= 0);
if (old_size < 4) return Min(max_slack, 1);
return Min(max_slack, old_size / 2);
}
void JSArray::EnsureSize(Handle<JSArray> array, int required_size) {
DCHECK(array->HasFastSmiOrObjectElements());
Handle<FixedArray> elts = handle(FixedArray::cast(array->elements()));
const int kArraySizeThatFitsComfortablyInNewSpace = 128;
if (elts->length() < required_size) {
// Doubling in size would be overkill, but leave some slack to avoid
// constantly growing.
Expand(array, required_size + (required_size >> 3));
// It's a performance benefit to keep a frequently used array in new-space.
} else if (!array->GetHeap()->new_space()->Contains(*elts) &&
required_size < kArraySizeThatFitsComfortablyInNewSpace) {
// Expand will allocate a new backing store in new space even if the size
// we asked for isn't larger than what we had before.
Expand(array, required_size);
}
}
void JSArray::set_length(Smi* length) {
// Don't need a write barrier for a Smi.
set_length(static_cast<Object*>(length), SKIP_WRITE_BARRIER);
}
bool JSArray::AllowsSetElementsLength() {
bool result = elements()->IsFixedArray() || elements()->IsFixedDoubleArray();
DCHECK(result == !HasExternalArrayElements());
return result;
}
void JSArray::SetContent(Handle<JSArray> array,
Handle<FixedArrayBase> storage) {
EnsureCanContainElements(array, storage, storage->length(),
ALLOW_COPIED_DOUBLE_ELEMENTS);
DCHECK((storage->map() == array->GetHeap()->fixed_double_array_map() &&
IsFastDoubleElementsKind(array->GetElementsKind())) ||
((storage->map() != array->GetHeap()->fixed_double_array_map()) &&
(IsFastObjectElementsKind(array->GetElementsKind()) ||
(IsFastSmiElementsKind(array->GetElementsKind()) &&
Handle<FixedArray>::cast(storage)->ContainsOnlySmisOrHoles()))));
array->set_elements(*storage);
array->set_length(Smi::FromInt(storage->length()));
}
int TypeFeedbackInfo::ic_total_count() {
int current = Smi::cast(READ_FIELD(this, kStorage1Offset))->value();
return ICTotalCountField::decode(current);
}
void TypeFeedbackInfo::set_ic_total_count(int count) {
int value = Smi::cast(READ_FIELD(this, kStorage1Offset))->value();
value = ICTotalCountField::update(value,
ICTotalCountField::decode(count));
WRITE_FIELD(this, kStorage1Offset, Smi::FromInt(value));
}
int TypeFeedbackInfo::ic_with_type_info_count() {
int current = Smi::cast(READ_FIELD(this, kStorage2Offset))->value();
return ICsWithTypeInfoCountField::decode(current);
}
void TypeFeedbackInfo::change_ic_with_type_info_count(int delta) {
if (delta == 0) return;
int value = Smi::cast(READ_FIELD(this, kStorage2Offset))->value();
int new_count = ICsWithTypeInfoCountField::decode(value) + delta;
// We can get negative count here when the type-feedback info is
// shared between two code objects. The can only happen when
// the debugger made a shallow copy of code object (see Heap::CopyCode).
// Since we do not optimize when the debugger is active, we can skip
// this counter update.
if (new_count >= 0) {
new_count &= ICsWithTypeInfoCountField::kMask;
value = ICsWithTypeInfoCountField::update(value, new_count);
WRITE_FIELD(this, kStorage2Offset, Smi::FromInt(value));
}
}
int TypeFeedbackInfo::ic_generic_count() {
return Smi::cast(READ_FIELD(this, kStorage3Offset))->value();
}
void TypeFeedbackInfo::change_ic_generic_count(int delta) {
if (delta == 0) return;
int new_count = ic_generic_count() + delta;
if (new_count >= 0) {
new_count &= ~Smi::kMinValue;
WRITE_FIELD(this, kStorage3Offset, Smi::FromInt(new_count));
}
}
void TypeFeedbackInfo::initialize_storage() {
WRITE_FIELD(this, kStorage1Offset, Smi::FromInt(0));
WRITE_FIELD(this, kStorage2Offset, Smi::FromInt(0));
WRITE_FIELD(this, kStorage3Offset, Smi::FromInt(0));
}
void TypeFeedbackInfo::change_own_type_change_checksum() {
int value = Smi::cast(READ_FIELD(this, kStorage1Offset))->value();
int checksum = OwnTypeChangeChecksum::decode(value);
checksum = (checksum + 1) % (1 << kTypeChangeChecksumBits);
value = OwnTypeChangeChecksum::update(value, checksum);
// Ensure packed bit field is in Smi range.
if (value > Smi::kMaxValue) value |= Smi::kMinValue;
if (value < Smi::kMinValue) value &= ~Smi::kMinValue;
WRITE_FIELD(this, kStorage1Offset, Smi::FromInt(value));
}
void TypeFeedbackInfo::set_inlined_type_change_checksum(int checksum) {
int value = Smi::cast(READ_FIELD(this, kStorage2Offset))->value();
int mask = (1 << kTypeChangeChecksumBits) - 1;
value = InlinedTypeChangeChecksum::update(value, checksum & mask);
// Ensure packed bit field is in Smi range.
if (value > Smi::kMaxValue) value |= Smi::kMinValue;
if (value < Smi::kMinValue) value &= ~Smi::kMinValue;
WRITE_FIELD(this, kStorage2Offset, Smi::FromInt(value));
}
int TypeFeedbackInfo::own_type_change_checksum() {
int value = Smi::cast(READ_FIELD(this, kStorage1Offset))->value();
return OwnTypeChangeChecksum::decode(value);
}
bool TypeFeedbackInfo::matches_inlined_type_change_checksum(int checksum) {
int value = Smi::cast(READ_FIELD(this, kStorage2Offset))->value();
int mask = (1 << kTypeChangeChecksumBits) - 1;
return InlinedTypeChangeChecksum::decode(value) == (checksum & mask);
}
SMI_ACCESSORS(AliasedArgumentsEntry, aliased_context_slot, kAliasedContextSlot)
Relocatable::Relocatable(Isolate* isolate) {
isolate_ = isolate;
prev_ = isolate->relocatable_top();
isolate->set_relocatable_top(this);
}
Relocatable::~Relocatable() {
DCHECK_EQ(isolate_->relocatable_top(), this);
isolate_->set_relocatable_top(prev_);
}
int JSObject::BodyDescriptor::SizeOf(Map* map, HeapObject* object) {
return map->instance_size();
}
void Foreign::ForeignIterateBody(ObjectVisitor* v) {
v->VisitExternalReference(
reinterpret_cast<Address*>(FIELD_ADDR(this, kForeignAddressOffset)));
}
template<typename StaticVisitor>
void Foreign::ForeignIterateBody() {
StaticVisitor::VisitExternalReference(
reinterpret_cast<Address*>(FIELD_ADDR(this, kForeignAddressOffset)));
}
void ExternalOneByteString::ExternalOneByteStringIterateBody(ObjectVisitor* v) {
typedef v8::String::ExternalOneByteStringResource Resource;
v->VisitExternalOneByteString(
reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)));
}
template <typename StaticVisitor>
void ExternalOneByteString::ExternalOneByteStringIterateBody() {
typedef v8::String::ExternalOneByteStringResource Resource;
StaticVisitor::VisitExternalOneByteString(
reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)));
}
void ExternalTwoByteString::ExternalTwoByteStringIterateBody(ObjectVisitor* v) {
typedef v8::String::ExternalStringResource Resource;
v->VisitExternalTwoByteString(
reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)));
}
template<typename StaticVisitor>
void ExternalTwoByteString::ExternalTwoByteStringIterateBody() {
typedef v8::String::ExternalStringResource Resource;
StaticVisitor::VisitExternalTwoByteString(
reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)));
}
static inline void IterateBodyUsingLayoutDescriptor(HeapObject* object,
int start_offset,
int end_offset,
ObjectVisitor* v) {
DCHECK(FLAG_unbox_double_fields);
DCHECK(IsAligned(start_offset, kPointerSize) &&
IsAligned(end_offset, kPointerSize));
InobjectPropertiesHelper helper(object->map());
DCHECK(!helper.all_fields_tagged());
for (int offset = start_offset; offset < end_offset; offset += kPointerSize) {
// Visit all tagged fields.
if (helper.IsTagged(offset)) {
v->VisitPointer(HeapObject::RawField(object, offset));
}
}
}
template<int start_offset, int end_offset, int size>
void FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(
HeapObject* obj,
ObjectVisitor* v) {
if (!FLAG_unbox_double_fields ||
obj->map()->layout_descriptor()->IsFastPointerLayout()) {
v->VisitPointers(HeapObject::RawField(obj, start_offset),
HeapObject::RawField(obj, end_offset));
} else {
IterateBodyUsingLayoutDescriptor(obj, start_offset, end_offset, v);
}
}
template<int start_offset>
void FlexibleBodyDescriptor<start_offset>::IterateBody(HeapObject* obj,
int object_size,
ObjectVisitor* v) {
if (!FLAG_unbox_double_fields ||
obj->map()->layout_descriptor()->IsFastPointerLayout()) {
v->VisitPointers(HeapObject::RawField(obj, start_offset),
HeapObject::RawField(obj, object_size));
} else {
IterateBodyUsingLayoutDescriptor(obj, start_offset, object_size, v);
}
}
template<class Derived, class TableType>
Object* OrderedHashTableIterator<Derived, TableType>::CurrentKey() {
TableType* table(TableType::cast(this->table()));
int index = Smi::cast(this->index())->value();
Object* key = table->KeyAt(index);
DCHECK(!key->IsTheHole());
return key;
}
void JSSetIterator::PopulateValueArray(FixedArray* array) {
array->set(0, CurrentKey());
}
void JSMapIterator::PopulateValueArray(FixedArray* array) {
array->set(0, CurrentKey());
array->set(1, CurrentValue());
}
Object* JSMapIterator::CurrentValue() {
OrderedHashMap* table(OrderedHashMap::cast(this->table()));
int index = Smi::cast(this->index())->value();
Object* value = table->ValueAt(index);
DCHECK(!value->IsTheHole());
return value;
}
#undef TYPE_CHECKER
#undef CAST_ACCESSOR
#undef INT_ACCESSORS
#undef ACCESSORS
#undef ACCESSORS_TO_SMI
#undef SMI_ACCESSORS
#undef SYNCHRONIZED_SMI_ACCESSORS
#undef NOBARRIER_SMI_ACCESSORS
#undef BOOL_GETTER
#undef BOOL_ACCESSORS
#undef FIELD_ADDR
#undef FIELD_ADDR_CONST
#undef READ_FIELD
#undef NOBARRIER_READ_FIELD
#undef WRITE_FIELD
#undef NOBARRIER_WRITE_FIELD
#undef WRITE_BARRIER
#undef CONDITIONAL_WRITE_BARRIER
#undef READ_DOUBLE_FIELD
#undef WRITE_DOUBLE_FIELD
#undef READ_INT_FIELD
#undef WRITE_INT_FIELD
#undef READ_INTPTR_FIELD
#undef WRITE_INTPTR_FIELD
#undef READ_UINT32_FIELD
#undef WRITE_UINT32_FIELD
#undef READ_SHORT_FIELD
#undef WRITE_SHORT_FIELD
#undef READ_BYTE_FIELD
#undef WRITE_BYTE_FIELD
#undef NOBARRIER_READ_BYTE_FIELD
#undef NOBARRIER_WRITE_BYTE_FIELD
} } // namespace v8::internal
#endif // V8_OBJECTS_INL_H_
|
hellotomfan/v8-coroutine
|
deps/v8/src/objects-inl.h
|
C
|
gpl-2.0
| 224,121
|
/**
* @file region.cc
* @author Thomas M. Howard (tmhoward@csail.mit.edu)
* Matthew R. Walter (mwalter@csail.mit.edu)
* @version 1.0
*
* @section LICENSE
*
* This file is part of h2sl.
*
* Copyright (C) 2014 by the Massachusetts Institute of Technology
*
* 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, see
* <http://www.gnu.org/licenses/gpl-2.0.html> or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* @section DESCRIPTION
*
* The implementation of a class used to describe a region of space
*/
#include "h2sl/region.h"
using namespace std;
using namespace h2sl;
Region::
Region( const string& regionType,
const Object& object ) : Grounding(),
_object( object ) {
insert_prop< std::string >( _properties, "region_type", regionType );
}
Region::
Region( xmlNodePtr root ) : Grounding(),
_object() {
insert_prop< std::string >( _properties, "region_type", "na" );
from_xml( root );
}
Region::
~Region() {
}
Region::
Region( const Region& other ) : Grounding( other ),
_object( other._object ){
}
Region&
Region::
operator=( const Region& other ) {
_properties = other._properties;
_object = other._object;
return (*this);
}
bool
Region::
operator==( const Region& other )const{
if( region_type() != other.region_type() ){
return false;
} if( _object != other._object ){
return false;
} else {
return true;
}
}
bool
Region::
operator!=( const Region& other )const{
return !( *this == other );
}
Grounding*
Region::
dup( void )const{
return new Region( *this );
}
void
Region::
to_xml( const string& filename )const{
xmlDocPtr doc = xmlNewDoc( ( xmlChar* )( "1.0" ) );
xmlNodePtr root = xmlNewDocNode( doc, NULL, ( xmlChar* )( "root" ), NULL );
xmlDocSetRootElement( doc, root );
to_xml( doc, root );
xmlSaveFormatFileEnc( filename.c_str(), doc, "UTF-8", 1 );
xmlFreeDoc( doc );
return;
}
void
Region::
to_xml( xmlDocPtr doc,
xmlNodePtr root )const{
xmlNodePtr node = xmlNewDocNode( doc, NULL, ( const xmlChar* )( "region" ), NULL );
xmlNewProp( node, ( const xmlChar* )( "region_type" ), ( const xmlChar* )( get_prop< std::string >( _properties, "region_type" ).c_str() ) );
_object.to_xml( doc, node );
xmlAddChild( root, node );
return;
}
void
Region::
from_xml( const string& filename ){
xmlDoc * doc = NULL;
xmlNodePtr root = NULL;
doc = xmlReadFile( filename.c_str(), NULL, 0 );
if( doc != NULL ){
root = xmlDocGetRootElement( doc );
if( root->type == XML_ELEMENT_NODE ){
xmlNodePtr l1 = NULL;
for( l1 = root->children; l1; l1 = l1->next ){
if( l1->type == XML_ELEMENT_NODE ){
if( xmlStrcmp( l1->name, ( const xmlChar* )( "region" ) ) == 0 ){
from_xml( l1 );
}
}
}
}
xmlFreeDoc( doc );
}
return;
}
void
Region::
from_xml( xmlNodePtr root ){
region_type() = "na";
_object = Object();
if( root->type == XML_ELEMENT_NODE ){
pair< bool, string > region_type_prop = has_prop< std::string >( root, "region_type" );
if( region_type_prop.first ){
region_type() = region_type_prop.second;
}
for( xmlNodePtr l1 = root->children; l1; l1 = l1->next ){
if( l1->type == XML_ELEMENT_NODE ){
if( xmlStrcmp( l1->name, ( const xmlChar* )( "object" ) ) == 0 ){
_object.from_xml( l1 );
}
}
}
}
return;
}
namespace h2sl {
ostream&
operator<<( ostream& out,
const Region& other ) {
out << "Region(";
out << "region_type=\"" << other.region_type() << "\",";
out << "object=" << other.object();
out << ")";
return out;
}
}
|
tmhoward/h2sl
|
src/symbol/region.cc
|
C++
|
gpl-2.0
| 4,358
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base data-ice="baseUrl" href="../../../../../">
<title data-ice="title">js/echo/store/proxy/index.js | API Document</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
<script src="script/prettify/prettify.js"></script>
<script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">
<header>
<a href="./">Home</a>
<a href="identifiers.html">Reference</a>
<a href="source.html">Source</a>
<a data-ice="repoURL" href="https://github.com/flessard/ECHO-Framework" class="repo-url-github">Repository</a>
<div class="search-box">
<span>
<img src="./image/search.png">
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
</span>
<ul class="search-result"></ul>
</div>
</header>
<nav class="navigation" data-ice="nav"><div>
<ul>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">components/button</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/button/index.js~Button.html">Button</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">components/grid</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/grid/grid.js~Grid.html">Grid</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/grid/row.js~Row.html">Row</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">components/icon</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/icon/index.js~Icon.html">Icon</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">components/input</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/input/text.js~TextInput.html">TextInput</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">components/tab</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/tab/panel.js~Panel.html">Panel</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/tab/tab.js~Tab.html">Tab</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">components/toolbar</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/toolbar/bar.js~Bar.html">Bar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/toolbar/button.js~ToolbarButton.html">ToolbarButton</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/toolbar/flex.js~ToolbarFlex.html">ToolbarFlex</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/components/toolbar/spacer.js~ToolbarSpacer.html">ToolbarSpacer</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">echo</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/echo/request.js~Request.html">Request</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-console">console</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-alertBox">alertBox</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-messageBox">messageBox</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-warningBox">warningBox</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-id">id</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-docUrl">docUrl</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">echo/components</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/echo/components/abstract.js~AbstractComponent.html">AbstractComponent</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/echo/components/input.js~AbstractInput.html">AbstractInput</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">echo/store</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/js/echo/store/abstract.js~AbstractStore.html">AbstractStore</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">utils</div><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isArray">isArray</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isDefined">isDefined</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isExist">isExist</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isFunction">isFunction</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isObject">isObject</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isString">isString</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-noop">noop</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ucfirst">ucfirst</a></span></span></li>
</ul>
</div>
</nav>
<div class="content" data-ice="content"><h1 data-ice="title">js/echo/store/proxy/index.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">import Memory from "./memory";
module.exports = {
Memory:Memory
};</code></pre>
</div>
<footer class="footer">
Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.4.7)</span></a>
</footer>
<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
|
flessard/ECHO-Framework
|
public/esdoc/file/js/echo/store/proxy/index.js.html
|
HTML
|
gpl-2.0
| 7,853
|
//
// view_dialogs.hpp
// BoE
//
// Created by Celtic Minstrel on 17-01-21.
//
//
#ifndef BOE_VIEW_DIALOGS_HPP
#define BOE_VIEW_DIALOGS_HPP
void put_item_info(class cDialog& me, const class cItem& s_i, const class cScenario& scen);
void put_monst_info(class cDialog& me, const class cMonster& store_m, const class cScenario& scen);
void put_monst_info(class cDialog& me, const class cCreature& store_m, const class cScenario& scen);
#endif
|
calref/cboe
|
src/view_dialogs.hpp
|
C++
|
gpl-2.0
| 446
|
/*****************************************************************************
* File: cvs_cmds.c
* Functions for communicating with the CVS server. Responses from the server
* are read into cvs_buff structures, and are read one line at a time by
* cvs_read_line.
****************************************************************************/
#include <sys/poll.h>
#include "cvs_cmds.h"
#include "utils.h"
static unsigned char
shifts[] =
{
0, 1, 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,
114,120, 53, 79, 96,109, 72,108, 70, 64, 76, 67,116, 74, 68, 87,
111, 52, 75,119, 49, 34, 82, 81, 95, 65,112, 86,118,110,122,105,
41, 57, 83, 43, 46,102, 40, 89, 38,103, 45, 50, 42,123, 91, 35,
125, 55, 54, 66,124,126, 59, 47, 92, 71,115, 78, 88,107,106, 56,
36,121,117,104,101,100, 69, 73, 99, 63, 94, 93, 39, 37, 61, 48,
58,113, 32, 90, 44, 98, 60, 51, 33, 97, 62, 77, 84, 80, 85,223,
225,216,187,166,229,189,222,188,141,249,148,200,184,136,248,190,
199,170,181,204,138,232,218,183,255,234,220,247,213,203,226,193,
174,172,228,252,217,201,131,230,197,211,145,238,161,179,160,212,
207,221,254,173,202,146,224,151,140,196,205,130,135,133,143,246,
192,159,244,239,185,168,215,144,139,165,180,157,147,186,214,176,
227,231,219,169,175,156,206,198,129,164,150,210,154,177,134,127,
182,128,158,208,162,132,167,209,149,241,153,251,237,236,171,195,
243,233,253,240,194,250,191,155,142,137,245,235,163,242,178,152 };
static cvs_session *session;
int DEBUG_RESP = 0;
/* Taken from the cvs client code */
char *scramble (char *str)
{
int i;
char *s;
s = (char *) malloc (strlen (str) + 2);
s[0] = 'A';
strcpy (s + 1, str);
for (i = 1; s[i]; i++)
{
s[i] = shifts[(unsigned char)(s[i])];
}
return s;
}
/* Initialize a socket */
static struct hostent *init_sockaddr(struct sockaddr_in *name,
char *hostname, unsigned int port)
{
struct hostent *hostinfo;
unsigned short shortport = port;
memset (name, 0, sizeof (*name));
name->sin_family = AF_INET;
name->sin_port = htons (shortport);
hostinfo = gethostbyname (hostname);
if (hostinfo == NULL)
{
fprintf (stderr, "Unknown host %s.\n", hostname);
exit(0);
}
name->sin_addr = *(struct in_addr *) hostinfo->h_addr;
return hostinfo;
}
/* Set initial CVS session arguments */
void cvs_init_session(char *hostname, char *root, char *module, char *user,
char *password, char *dir, bool use_gzip, char *tag)
{
session = (cvs_session *)malloc(sizeof(cvs_session));
session->hostname = strdup(hostname);
session->root = strdup(root);
session->module = strdup(module);
session->user = strdup(user);
session->password = scramble(password);
session->dir = strdup(dir);
session->use_gzip = use_gzip;
memset(session->tag, 0, sizeof(session->tag));
if (tag != NULL)
{
strncpy(session->tag, tag, VCFS_TAG_LEN);
}
}
/* Returned a malloc'ed cvs_buff containing the entire response.
* NOTE: Caller must free return value after use using cvs_free_buff.
*/
cvs_buff *cvs_get_buff()
{
cvs_buff *b = (cvs_buff *)malloc(sizeof(cvs_buff));
b->size = 0;
b->data = (char *)malloc(CVS_BUFF_SIZE);
memset(b->data, 0, CVS_BUFF_SIZE);
b->cookie = 0;
b->limit = CVS_BUFF_SIZE;
return b;
}
/* Free a previously allocated cvs_buff */
void cvs_free_buff(cvs_buff *b)
{
free(b->data);
free(b);
}
/* Make sure the buffer has enough for n more bytes, grow if not */
void cvs_ensure_buff(cvs_buff *b, int n)
{
if (b->size + n >= b->limit)
{
b->data = (char *)realloc(b->data, 2 * b->limit);
b->limit = 2 * b->limit;
}
}
/* See if the last thing we read is 'ok', meaning the message from the server
* has completed successfully, there should be no more data.
*/
int cvs_check_ok(char *c, int n)
{
if (n > 0)
{
return (c[n-3] == 'o' && c[n-2] == 'k' && c[n-1] == '\012');
}
else
{
return 0;
}
}
/* Look for an error. Currently unused */
int cvs_check_error(char *c, int n)
{
return (c[n-8] == 'e' && c[n-7] == 'r' && c[n-6] == 'r'
&& c[n-5] == 'o' && c[n-4] == 'r');
}
/* Read one line from the buffer into a malloc'ed string.
* NOTE: Caller must free line if not NULL.
*/
int cvs_buff_read_line(cvs_buff *b, char **line)
{
int len;
char *p;
char *l;
if (b->cookie >= b->size)
{
/* We've gone too far */
return 0;
}
/* Look for the end of the line */
p = (char *)memchr(b->data + b->cookie, '\012', b->size - b->cookie);
if (p == NULL)
{
return 0;
}
len = p - (b->data + b->cookie);
if (line != NULL)
{
l = (char *)malloc(len + 1);
memcpy(l, (char *)(b->data + b->cookie), len);
l[len] = '\0';
*line = l;
}
b->cookie = b->cookie + len + 1;
return (len + 1);
}
/* Read a response from the server into a cvs_buff */
cvs_buff *cvs_get_resp()
{
int n = 0;
cvs_buff *buff;
char temp[CVS_READ_SIZE];
int count = 0;
struct pollfd fds;
int result;
fds.fd = session->sock;
fds.events = POLLIN; /* Check if there is data waiting to be read */
fds.revents = 0;
buff = cvs_get_buff();
do
{
result = poll(&fds, 1, 10000);
if (result == 0)
{
/* There is nothing to read */
if (cvs_check_ok(temp, n))
{
/* We finished reading successfully */
break;
}
else
{
/* There was an error. TODO: Handle this */
debug("Error! Client read: \n%s\n", temp);
cvs_free_buff(buff);
return NULL;
}
}
//memset(&temp, 0, CVS_READ_SIZE);
n = recv(session->sock, &temp, CVS_READ_SIZE, 0);
if (DEBUG_RESP)
{
printf("The data is:\n-------------\n%s\n----------------\n",temp);
}
cvs_ensure_buff(buff, n);
memcpy(buff->data + buff->size, temp, n);
buff->size += n;
count++;
} while(!cvs_check_ok(temp, n)); /* Read until last thing read is 'ok' */
DEBUG_RESP = 0;
return buff;
}
/* Connect to the CVS pserver and authenticate ourselves */
int cvs_pserver_connect()
{
int sock;
struct sockaddr_in client_sock;
struct hostent *hostinfo;
char *begin = "BEGIN AUTH REQUEST\012";
char *end = "END AUTH REQUEST\012";
char resp[512];
int n;
sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock == -1)
{
fprintf(stderr, "Cannot create socket\n");
return -1;
}
hostinfo = init_sockaddr (&client_sock, session->hostname, CVSPORT);
if (connect(sock, (struct sockaddr *) &client_sock,
sizeof(client_sock)) < 0)
{
fprintf(stderr, "Could not connect to server\n");
return -1;
}
/* Authenticate ourselves with the server */
if (send (sock, begin, strlen (begin), 0) < 0)
fprintf(stderr, "Can't send\n");
if (send (sock, session->root, strlen(session->root), 0) < 0)
fprintf(stderr, "Can't send\n");
if (send (sock, "\012", 1, 0) < 0)
fprintf(stderr, "Can't send\n");
if (send (sock, session->user, strlen(session->user), 0) < 0)
fprintf(stderr, "Can't send\n");
if (send (sock, "\012", 1, 0) < 0)
fprintf(stderr, "Can't send\n");
if (send (sock, session->password, strlen(session->password), 0) < 0)
fprintf(stderr, "Can't send\n");
if (send (sock, "\012", 1, 0) < 0)
fprintf(stderr, "Can't send\n");
if (send (sock, end, strlen(end), 0) < 0)
fprintf(stderr, "Can't send\n");
/* Get the response */
n = recv(sock, &resp, 512, 0);
if (n < 0 || resp[2] != 'L')
{
/* The server didn't say "I Love you", so we weren't authenticated */
return -1;
}
session->sock = sock;
return sock;
}
/* Send data to the CVS server */
int cvs_send(int sock, char *msg)
{
int n;
if (msg == NULL)
{
fprintf(stderr, "Cannot send NULL message!\n");
return -1;
}
n = send(sock, msg, strlen(msg), 0);
if (n < 0)
{
fprintf(stderr, "Cannot send message: %s\n", msg);
return -1;
}
else {
/* Debug sends */
/* debug("C (%d bytes): %s\n", n, msg); */
}
return 1;
}
/* Send "expand-modules" CVS request */
int cvs_expand_modules(cvs_buff **resp)
{
char cmd[1024];
char buff[1024];
memset(buff, 0, 1024);
sprintf(&cmd[0], "Root %s\012", session->root);
cvs_send(session->sock, cmd);
sprintf(&cmd[0], "Argument %s\012", session->module);
cvs_send(session->sock, cmd);
cvs_send(session->sock, "Directory .\012");
sprintf(&cmd[0], "%s\012", session->root); /* Unecessary?? */
cvs_send(session->sock, cmd);
cvs_send(session->sock, "expand-modules\012");
*resp = cvs_get_resp();
return 1;
}
/* Checkout the module and get a complete dir listing. */
int cvs_co(cvs_buff **resp, char *tag)
{
char cmd[1024];
time_t before;
if (session->use_gzip)
{
cvs_send(session->sock, "gzip-file-contents 3\012");
}
if (strlen(session->tag) > 0)
{
strcpy(cmd, "Argument -r\012Argument ");
strcat(cmd, session->tag);
strcat(cmd, "\012");
cvs_send(session->sock, cmd);
}
/* TBD - rewrite with sprintf!! */
strcpy(cmd, "Argument ");
strcat(cmd, session->module);
strcat(cmd, "\012");
cvs_send(session->sock, cmd);
sprintf(cmd, "Directory .\012");
cvs_send(session->sock, cmd);
strcpy(cmd, session->root);
strcat(cmd, "\012");
cvs_send(session->sock, cmd);
cvs_send(session->sock, "co\012");
before = time(NULL);
*resp = cvs_get_resp();
if (*resp == NULL)
{
return 0;
}
printf("total time = %ld\n", time(NULL) - before);
return 1;
}
/* Send an "update" CVS request */
int cvs_get_file(vcfs_path name, char *ver, cvs_buff **resp)
{
char cmd[2048];
char temp[1024];
vcfs_path parent;
vcfs_name entry;
memset(cmd, 0, sizeof(cmd));
memset(temp, 0, sizeof(temp));
split_path(name, &parent, &entry);
sprintf(cmd, "Argument -r\012Argument %s\012", ver);
sprintf(temp, "Argument -u\012Directory .\012%s/%s\012\0", session->root, parent);
strcat(cmd, temp);
sprintf(temp, "Entry /%s/%s///\012\0", entry, ver);
strcat(cmd, temp);
sprintf(temp, "Argument %s\012update\012\0", entry);
strcat(cmd, temp);
cvs_send(session->sock, cmd);
*resp = cvs_get_resp();
return 1;
}
/* Send a "log" CVS request */
int cvs_get_status(vcfs_path name, char *ver, cvs_buff **resp)
{
char cmd[1024];
vcfs_path parent;
vcfs_name entry;
split_path(name, &parent, &entry);
sprintf(cmd, "Argument -r%s\012", ver);
cvs_send(session->sock, cmd);
sprintf(cmd, "Directory .\012%s/%s\012", session->root, parent);
cvs_send(session->sock, cmd);
sprintf(cmd, "Entry /%s/%s///\012", entry, ver);
cvs_send(session->sock, cmd);
sprintf(cmd, "Argument %s\012log\012", entry);
cvs_send(session->sock, cmd);
*resp = cvs_get_resp();
return 1;
}
/* Send a 'cvs status -v' command */
int cvs_get_status_tags(vcfs_ventry *v, cvs_buff **resp)
{
char cmd[1024];
vcfs_path parent;
vcfs_name entry;
split_path(v->name, &parent, &entry);
sprintf(cmd, "Argument -v\012");
cvs_send(session->sock, cmd);
sprintf(cmd, "Directory .\012%s/%s\012", session->root, parent);
cvs_send(session->sock, cmd);
sprintf(cmd, "Entry /%s/%s///\012", entry, v->ver);
cvs_send(session->sock, cmd);
sprintf(cmd, "Argument %s\012status\012", entry);
cvs_send(session->sock, cmd);
*resp = cvs_get_resp();
return 1;
}
int cvs_get_log(vcfs_path name, cvs_buff **resp)
{
char cmd[1024];
vcfs_path parent;
vcfs_name entry;
split_path(name, &parent, &entry);
sprintf(cmd, "Directory .\012%s/%s\012", session->root, parent);
cvs_send(session->sock, cmd);
//sprintf(cmd, "Entry /%s/%s///\012", entry, ver);
//cvs_send(session->sock, cmd);
sprintf(cmd, "Argument %s\012log\012", entry);
cvs_send(session->sock, cmd);
*resp = cvs_get_resp();
return 1;
}
/* TBD - Combine with split_path. Same functionality. */
int cvs_ver_extended(char *name, vcfs_path *short_name, vcfs_ver *ver)
{
char *p;
memset(short_name, 0, sizeof(short_name));
memset(ver, 0, sizeof(ver));
/* Look for a comma */
p = (char *)strrchr(name, ',');
if (p == NULL)
{
return 0;
}
strncpy(*short_name, name, (p - name));
(*short_name)[p - name] = '\0';
strncpy(*ver, p + 1, (strlen(name) - (p - name) - 1));
(*ver)[(strlen(name) - (p - name) - 1)] = '\0';
return 1;
}
/* Note: log message currently unsupported */
int cvs_get_log_info(cvs_buff *log_buff, char **ver,
char **date, char **author, char **msg)
{
char *line;
char *p, *a;
int len;
int n;
while ((n = cvs_buff_read_line(log_buff, &line)) > 0)
{
if (!strncmp(line, "M revision", 10))
{
/* This line lists a version number */
if (ver != NULL)
{
/* The version number is from the 2nd space to the end of the line */
p = (char *)strchr(line, ' ');
p = (char *)strchr(p + 1, ' ');
a = (char *)strchr(line, '\n');
/* Skip past the space */
p++;
/* Copy up to sizeof(vcfs_ver) bytes of the version */
len = a - p;
len = (len <= sizeof(vcfs_ver) ? len : sizeof(vcfs_ver));
*ver = malloc(len);
strncpy(*ver, p, len);
(*ver)[len] = '\0';
}
free(line);
/* The next line contains date and author information */
cvs_buff_read_line(log_buff, &line);
if (!strncmp(line, "M date:", 7))
{
p = (char *)strchr(line, ';');
if (p != NULL && date != NULL)
{
len = p - line - 8; /* Hack to copy correct chunk */
*date = malloc(len + 1);
strncpy(*date, line + 8, len);
(*date)[len] = '\0';
}
a = (char *)strchr(p + 1, ';');
if (a != NULL && author != NULL)
{
len = a - p - 11;
*author = malloc(len + 1);
strncpy(*author, p + 11, len);
(*author)[len] = '\0';
}
}
/* We found one a log entry, so return */
free(line);
return 1;
}
}
return 0;
}
|
garye/VCFS
|
cvs_cmds.c
|
C
|
gpl-2.0
| 16,236
|
/*
***************************************************************************
* Ralink Tech Inc.
* 4F, No. 2 Technology 5th Rd.
* Science-based Industrial Park
* Hsin-chu, Taiwan, R.O.C.
*
* (c) Copyright 2002-2006, Ralink Technology, Inc.
*
* All rights reserved. Ralink's source code is an unpublished work and the
* use of a copyright notice does not imply otherwise. This source code
* contains confidential trade secret material of Ralink Tech. Any attemp
* or participation in deciphering, decoding, reverse engineering or in any
* way altering the source code is stricitly prohibited, unless the prior
* written consent of Ralink Technology, Inc. is obtained.
***************************************************************************
Module Name:
ap_apcli.c
Abstract:
Support AP-Client function.
Note:
1. Call RT28xx_ApCli_Init() in init function and
call RT28xx_ApCli_Remove() in close function
2. MAC of ApCli-interface is initialized in RT28xx_ApCli_Init()
3. ApCli index (0) of different rx packet is got in
APHandleRxDoneInterrupt() by using FromWhichBSSID = pEntry->apidx;
Or FromWhichBSSID = BSS0;
4. ApCli index (0) of different tx packet is assigned in
MBSS_VirtualIF_PacketSend() by using RTMP_SET_PACKET_NET_DEVICE_MBSSID()
5. ApCli index (0) of different interface is got in APHardTransmit() by using
RTMP_GET_PACKET_IF()
6. ApCli index (0) of IOCTL command is put in pAd->OS_Cookie->ioctl_if
8. The number of ApCli only can be 1
9. apcli convert engine subroutines, we should just take care data packet.
Revision History:
Who When What
-------------- ---------- ----------------------------------------------
Shiang, Fonchi 02-13-2007 created
*/
#ifdef APCLI_SUPPORT
//add by duxt
#include "rt_config.h"
#include <linux/pid.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/sched.h>
UINT g_wisp_pid = 0;
/* --------------------------------- Public -------------------------------- */
/*
========================================================================
Routine Description:
Close ApCli network interface.
Arguments:
ad_p points to our adapter
Return Value:
None
Note:
========================================================================
*/
VOID RT28xx_ApCli_Close(
IN PRTMP_ADAPTER ad_p)
{
UINT index;
for(index = 0; index < MAX_APCLI_NUM; index++)
{
if (ad_p->ApCfg.ApCliTab[index].dev)
RtmpOSNetDevClose(ad_p->ApCfg.ApCliTab[index].dev);
}
}
/* --------------------------------- Private -------------------------------- */
INT ApCliIfLookUp(
IN PRTMP_ADAPTER pAd,
IN PUCHAR pAddr)
{
SHORT i;
SHORT ifIndex = -1;
do
{
for(i = 0; i < MAX_APCLI_NUM; i++)
{
if( MAC_ADDR_EQUAL(pAd->ApCfg.ApCliTab[i].CurrentAddress, pAddr))
{
ifIndex = i;
DBGPRINT(RT_DEBUG_TRACE, ("(%s) ApCliIfIndex = %d\n", __FUNCTION__, ifIndex));
break;
}
}
} while (FALSE);
return ifIndex;
}
BOOLEAN isValidApCliIf(
SHORT ifIndex)
{
if((ifIndex >= 0) && (ifIndex < MAX_APCLI_NUM))
return TRUE;
else
return FALSE;
}
/*! \brief init the management mac frame header
* \param p_hdr mac header
* \param subtype subtype of the frame
* \param p_ds destination address, don't care if it is a broadcast address
* \return none
* \pre the station has the following information in the pAd->UserCfg
* - bssid
* - station address
* \post
* \note this function initializes the following field
*/
VOID ApCliMgtMacHeaderInit(
IN PRTMP_ADAPTER pAd,
IN OUT PHEADER_802_11 pHdr80211,
IN UCHAR SubType,
IN UCHAR ToDs,
IN PUCHAR pDA,
IN PUCHAR pBssid,
IN USHORT ifIndex)
{
NdisZeroMemory(pHdr80211, sizeof(HEADER_802_11));
pHdr80211->FC.Type = BTYPE_MGMT;
pHdr80211->FC.SubType = SubType;
pHdr80211->FC.ToDs = ToDs;
COPY_MAC_ADDR(pHdr80211->Addr1, pDA);
COPY_MAC_ADDR(pHdr80211->Addr2, pAd->ApCfg.ApCliTab[ifIndex].CurrentAddress);
COPY_MAC_ADDR(pHdr80211->Addr3, pBssid);
}
#ifdef DOT11_N_SUPPORT
/*
========================================================================
Routine Description:
Verify the support rate for HT phy type
Arguments:
pAd Pointer to our adapter
Return Value:
FALSE if pAd->CommonCfg.SupportedHtPhy doesn't accept the pHtCapability. (AP Mode)
IRQL = PASSIVE_LEVEL
========================================================================
*/
BOOLEAN ApCliCheckHt(
IN PRTMP_ADAPTER pAd,
IN USHORT IfIndex,
IN OUT HT_CAPABILITY_IE *pHtCapability,
IN OUT ADD_HT_INFO_IE *pAddHtInfo)
{
PAPCLI_STRUCT pApCliEntry = NULL;
if (IfIndex >= MAX_APCLI_NUM)
return FALSE;
pApCliEntry = &pAd->ApCfg.ApCliTab[IfIndex];
/* If use AMSDU, set flag. */
if (pAd->CommonCfg.DesiredHtPhy.AmsduEnable && (pAd->CommonCfg.REGBACapability.field.AutoBA == FALSE))
CLIENT_STATUS_SET_FLAG(pApCliEntry, fCLIENT_STATUS_AMSDU_INUSED);
/* Save Peer Capability */
if (pHtCapability->HtCapInfo.ShortGIfor20)
CLIENT_STATUS_SET_FLAG(pApCliEntry, fCLIENT_STATUS_SGI20_CAPABLE);
if (pHtCapability->HtCapInfo.ShortGIfor40)
CLIENT_STATUS_SET_FLAG(pApCliEntry, fCLIENT_STATUS_SGI40_CAPABLE);
if (pHtCapability->HtCapInfo.TxSTBC)
CLIENT_STATUS_SET_FLAG(pApCliEntry, fCLIENT_STATUS_TxSTBC_CAPABLE);
if (pHtCapability->HtCapInfo.RxSTBC)
CLIENT_STATUS_SET_FLAG(pApCliEntry, fCLIENT_STATUS_RxSTBC_CAPABLE);
if (pAd->CommonCfg.bRdg && pHtCapability->ExtHtCapInfo.RDGSupport)
CLIENT_STATUS_SET_FLAG(pApCliEntry, fCLIENT_STATUS_RDG_CAPABLE);
pApCliEntry->MpduDensity = pHtCapability->HtCapParm.MpduDensity;
if ((pAd->OpMode == OPMODE_STA))
{
}
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[0] = 0xff;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[4] = 0x1;
switch (pAd->CommonCfg.RxStream)
{
case 1:
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[0] = 0xff;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[1] = 0x00;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[2] = 0x00;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[3] = 0x00;
break;
case 2:
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[0] = 0xff;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[1] = 0xff;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[2] = 0x00;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[3] = 0x00;
break;
case 3:
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[0] = 0xff;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[1] = 0xff;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[2] = 0xff;
pApCliEntry->ApCliMlmeAux.HtCapability.MCSSet[3] = 0x00;
break;
}
/* Record the RxMcs of AP */
NdisMoveMemory(pApCliEntry->RxMcsSet, pHtCapability->MCSSet, 16);
/* choose smaller setting */
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.ChannelWidth = pAddHtInfo->AddHtInfo.RecomWidth & pAd->CommonCfg.DesiredHtPhy.ChannelWidth;
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.GF = pHtCapability->HtCapInfo.GF &pAd->CommonCfg.DesiredHtPhy.GF;
/* Send Assoc Req with my HT capability. */
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.AMsduSize = pAd->CommonCfg.DesiredHtPhy.AmsduSize;
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.MimoPs = pHtCapability->HtCapInfo.MimoPs;
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.ShortGIfor20 = (pAd->CommonCfg.DesiredHtPhy.ShortGIfor20) & (pHtCapability->HtCapInfo.ShortGIfor20);
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.ShortGIfor40 = (pAd->CommonCfg.DesiredHtPhy.ShortGIfor40) & (pHtCapability->HtCapInfo.ShortGIfor40);
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.TxSTBC = (pAd->CommonCfg.DesiredHtPhy.TxSTBC)&(pHtCapability->HtCapInfo.RxSTBC);
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.RxSTBC = (pAd->CommonCfg.DesiredHtPhy.RxSTBC)&(pHtCapability->HtCapInfo.TxSTBC);
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapParm.MaxRAmpduFactor = (pAd->CommonCfg.DesiredHtPhy.MaxRAmpduFactor) & (pHtCapability->HtCapParm.MaxRAmpduFactor);
pApCliEntry->ApCliMlmeAux.HtCapability.HtCapParm.MpduDensity = pHtCapability->HtCapParm.MpduDensity;
pApCliEntry->ApCliMlmeAux.HtCapability.ExtHtCapInfo.PlusHTC = pHtCapability->ExtHtCapInfo.PlusHTC;
if (pAd->CommonCfg.bRdg)
{
pApCliEntry->ApCliMlmeAux.HtCapability.ExtHtCapInfo.RDGSupport = pHtCapability->ExtHtCapInfo.RDGSupport;
}
/*COPY_AP_HTSETTINGS_FROM_BEACON(pAd, pHtCapability); */
return TRUE;
}
#endif /* DOT11_N_SUPPORT */
//add by duxt
#define STAT_LINK_DOWN 0
#define STAT_LINK_UP 1
#define SIG_APCLI_LINKDOWN SIGUSR2 + 20
#define SIG_APCLI_LINKUP SIGUSR2 + 21
void send_signal_to_user(int stat)
{
struct task_struct *p = NULL;
if ( g_wisp_pid <= 0 )
return;
p = find_task_by_vpid(g_wisp_pid);
if (NULL != p) {
if ( STAT_LINK_DOWN == stat ) {
send_sig(SIG_APCLI_LINKDOWN, p, 0);
}
else if (STAT_LINK_UP == stat){
send_sig(SIG_APCLI_LINKUP, p, 0);
}
}
}
/*
==========================================================================
Routine Description:
Connected to the BSSID
Arguments:
pAd - Pointer to our adapter
ApCliIdx - Which ApCli interface
Return Value:
FALSE: fail to alloc Mac entry.
Note:
==========================================================================
*/
BOOLEAN ApCliLinkUp(
IN PRTMP_ADAPTER pAd,
IN UCHAR ifIndex)
{
BOOLEAN result = FALSE;
PAPCLI_STRUCT pApCliEntry = NULL;
PMAC_TABLE_ENTRY pMacEntry = NULL;
#ifdef MAC_REPEATER_SUPPORT
UCHAR CliIdx = 0xFF;
INVAILD_TRIGGER_MAC_ENTRY *pSkipEntry = NULL;
#endif /* MAC_REPEATER_SUPPORT */
#ifdef APCLI_CERT_SUPPORT
UINT32 Data;
#endif /* APCLI_CERT_SUPPORT */
do
{
if ((ifIndex < MAX_APCLI_NUM)
#ifdef MAC_REPEATER_SUPPORT
|| (ifIndex >= 64)
#endif /* MAC_REPEATER_SUPPORT */
)
{
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn)
{
if (ifIndex < MAX_APCLI_NUM)
{
struct net_device *pNetDev;
struct net *net= &init_net;
for_each_netdev(net, pNetDev)
{
if (pNetDev->priv_flags == IFF_EBRIDGE)
{
COPY_MAC_ADDR(pAd->ApCfg.BridgeAddress, pNetDev->dev_addr);
DBGPRINT(RT_DEBUG_ERROR, (" Bridge Address = %02X:%02X:%02X:%02X:%02X:%02X. !!!\n",
PRINT_MAC(pAd->ApCfg.BridgeAddress)));
}
pSkipEntry = RepeaterInvaildMacLookup(pAd, pNetDev->dev_addr);
if (pSkipEntry == NULL)
RTMPRepeaterInsertInvaildMacEntry(pAd, pNetDev->dev_addr);
}
}
if (ifIndex >= 64)
{
CliIdx = ((ifIndex - 64) % 16);
ifIndex = ((ifIndex - 64) / 16);
pMacEntry = MacTableLookup(pAd, pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].OriginalAddress);
if (pMacEntry && IS_ENTRY_CLIENT(pMacEntry))
pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].bEthCli = FALSE;
else
pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].bEthCli = TRUE;
pMacEntry = NULL;
}
}
#endif /* MAC_REPEATER_SUPPORT */
send_signal_to_user(STAT_LINK_UP); //add by duxt
DBGPRINT(RT_DEBUG_TRACE, ("!!! APCLI LINK UP - IF(apcli%d) AuthMode(%d)=%s, WepStatus(%d)=%s !!!\n",
ifIndex,
pAd->ApCfg.ApCliTab[ifIndex].AuthMode, GetAuthMode(pAd->ApCfg.ApCliTab[ifIndex].AuthMode),
pAd->ApCfg.ApCliTab[ifIndex].WepStatus, GetEncryptType(pAd->ApCfg.ApCliTab[ifIndex].WepStatus)));
}
else
{
DBGPRINT(RT_DEBUG_ERROR, ("!!! ERROR : APCLI LINK UP - IF(apcli%d)!!!\n", ifIndex));
result = FALSE;
break;
}
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx != 0xFF)
DBGPRINT(RT_DEBUG_ERROR, ("(%s) ifIndex = %d, CliIdx = %d !!!\n", __FUNCTION__, ifIndex, CliIdx));
#endif /* MAC_REPEATER_SUPPORT */
pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex];
/* Sanity check: This link had existed. */
if ((pApCliEntry->Valid)
#ifdef MAC_REPEATER_SUPPORT
&& (CliIdx == 0xFF)
#endif /* MAC_REPEATER_SUPPORT */
)
{
DBGPRINT(RT_DEBUG_ERROR, ("!!! ERROR : This link had existed - IF(apcli%d)!!!\n", ifIndex));
result = FALSE;
break;
}
/* Insert the Remote AP to our MacTable. */
/*pMacEntry = MacTableInsertApCliEntry(pAd, (PUCHAR)(pAd->ApCliMlmeAux.Bssid)); */
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn)
pMacEntry = RTMPInsertRepeaterMacEntry(pAd, (PUCHAR)(pApCliEntry->ApCliMlmeAux.Bssid), (ifIndex + MIN_NET_DEVICE_FOR_APCLI), CliIdx, TRUE);
else
#endif /* MAC_REPEATER_SUPPORT */
pMacEntry = MacTableInsertEntry(pAd, (PUCHAR)(pApCliEntry->ApCliMlmeAux.Bssid), (ifIndex + MIN_NET_DEVICE_FOR_APCLI), OPMODE_AP, TRUE);
if (pMacEntry)
{
UCHAR Rates[MAX_LEN_OF_SUPPORTED_RATES];
PUCHAR pRates = Rates;
UCHAR RatesLen;
UCHAR MaxSupportedRate = 0;
pMacEntry->Sst = SST_ASSOC;
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx != 0xFF)
{
pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].MacTabWCID = pMacEntry->Aid;
pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].CliValid = TRUE;
pMacEntry->bReptCli = TRUE;
pMacEntry->MatchReptCliIdx = CliIdx;
pMacEntry->ReptCliIdleCount = 0;
COPY_MAC_ADDR(pMacEntry->ReptCliAddr, pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].CurrentAddress);
if (pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].bEthCli == TRUE)
pMacEntry->bReptEthCli = TRUE;
else
pMacEntry->bReptEthCli = FALSE;
}
else
#endif /* MAC_REPEATER_SUPPORT */
{
pApCliEntry->Valid = TRUE;
pApCliEntry->MacTabWCID = pMacEntry->Aid;
#ifdef MAC_REPEATER_SUPPORT
pMacEntry->bReptCli = FALSE;
#endif /* MAC_REPEATER_SUPPORT */
COPY_MAC_ADDR(APCLI_ROOT_BSSID_GET(pAd, pApCliEntry->MacTabWCID), pApCliEntry->ApCliMlmeAux.Bssid);
pApCliEntry->SsidLen = pApCliEntry->ApCliMlmeAux.SsidLen;
NdisMoveMemory(pApCliEntry->Ssid, pApCliEntry->ApCliMlmeAux.Ssid, pApCliEntry->SsidLen);
}
#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
/*
If ApCli connects to different AP, ApCli couldn't send EAPOL_Start for WpaSupplicant.
*/
if ((pApCliEntry->AuthMode == Ndis802_11AuthModeWPA2) &&
(NdisEqualMemory(pAd->MlmeAux.Bssid, pApCliEntry->LastBssid, MAC_ADDR_LEN) == FALSE) &&
(pApCliEntry->bLostAp == TRUE))
{
pApCliEntry->bLostAp = FALSE;
}
COPY_MAC_ADDR(pApCliEntry->LastBssid, pAd->MlmeAux.Bssid);
#endif /* APCLI_WPA_SUPPLICANT_SUPPORT */
if (pMacEntry->AuthMode >= Ndis802_11AuthModeWPA)
pMacEntry->PortSecured = WPA_802_1X_PORT_NOT_SECURED;
else
{
#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
if (pApCliEntry->WpaSupplicantUP &&
(pMacEntry->WepStatus == Ndis802_11WEPEnabled) &&
(pApCliEntry->IEEE8021X == TRUE))
pMacEntry->PortSecured = WPA_802_1X_PORT_NOT_SECURED;
else
#endif /*APCLI_WPA_SUPPLICANT_SUPPORT*/
pMacEntry->PortSecured = WPA_802_1X_PORT_SECURED;
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx != 0xFF)
pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].CliConnectState = 2;
#endif /* MAC_REPEATER_SUPPORT */
}
#ifdef APCLI_AUTO_CONNECT_SUPPORT
if ((pAd->ApCfg.ApCliAutoConnectRunning == TRUE) &&
#ifdef MAC_REPEATER_SUPPORT
(CliIdx == 0xFF) &&
#endif /* MAC_REPEATER_SUPPORT */
(pMacEntry->PortSecured == WPA_802_1X_PORT_SECURED))
{
DBGPRINT(RT_DEBUG_TRACE, ("ApCli auto connected: ApCliLinkUp()\n"));
pAd->ApCfg.ApCliAutoConnectRunning = FALSE;
}
#endif /* APCLI_AUTO_CONNECT_SUPPORT */
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx == 0xFF)
#endif /* MAC_REPEATER_SUPPORT */
NdisGetSystemUpTime(&pApCliEntry->ApCliLinkUpTime);
/* Store appropriate RSN_IE for WPA SM negotiation later */
/* If WPAPSK/WPA2SPK mix mode, driver just stores either WPAPSK or WPA2PSK */
/* RSNIE. It depends on the AP-Client's authentication mode to store the corresponding RSNIE. */
if ((pMacEntry->AuthMode >= Ndis802_11AuthModeWPA) && (pApCliEntry->ApCliMlmeAux.VarIELen != 0))
{
PUCHAR pVIE;
UCHAR len;
PEID_STRUCT pEid;
pVIE = pApCliEntry->ApCliMlmeAux.VarIEs;
len = pApCliEntry->ApCliMlmeAux.VarIELen;
while (len > 0)
{
pEid = (PEID_STRUCT) pVIE;
/* For WPA/WPAPSK */
if ((pEid->Eid == IE_WPA) && (NdisEqualMemory(pEid->Octet, WPA_OUI, 4))
&& (pMacEntry->AuthMode == Ndis802_11AuthModeWPA || pMacEntry->AuthMode == Ndis802_11AuthModeWPAPSK))
{
NdisMoveMemory(pMacEntry->RSN_IE, pVIE, (pEid->Len + 2));
pMacEntry->RSNIE_Len = (pEid->Len + 2);
DBGPRINT(RT_DEBUG_TRACE, ("ApCliLinkUp: Store RSN_IE for WPA SM negotiation \n"));
}
/* For WPA2/WPA2PSK */
else if ((pEid->Eid == IE_RSN) && (NdisEqualMemory(pEid->Octet + 2, RSN_OUI, 3))
&& (pMacEntry->AuthMode == Ndis802_11AuthModeWPA2 || pMacEntry->AuthMode == Ndis802_11AuthModeWPA2PSK))
{
NdisMoveMemory(pMacEntry->RSN_IE, pVIE, (pEid->Len + 2));
pMacEntry->RSNIE_Len = (pEid->Len + 2);
DBGPRINT(RT_DEBUG_TRACE, ("ApCliLinkUp: Store RSN_IE for WPA2 SM negotiation \n"));
}
pVIE += (pEid->Len + 2);
len -= (pEid->Len + 2);
}
}
if (pMacEntry->RSNIE_Len == 0)
{
DBGPRINT(RT_DEBUG_TRACE, ("ApCliLinkUp: root-AP has no RSN_IE \n"));
}
else
{
hex_dump("The RSN_IE of root-AP", pMacEntry->RSN_IE, pMacEntry->RSNIE_Len);
}
SupportRate(pApCliEntry->ApCliMlmeAux.SupRate,
pApCliEntry->ApCliMlmeAux.SupRateLen,
pApCliEntry->ApCliMlmeAux.ExtRate,
pApCliEntry->ApCliMlmeAux.ExtRateLen,
&pRates,
&RatesLen,
&MaxSupportedRate);
pMacEntry->MaxSupportedRate = min(pAd->CommonCfg.MaxTxRate, MaxSupportedRate);
pMacEntry->RateLen = RatesLen;
if (pMacEntry->MaxSupportedRate < RATE_FIRST_OFDM_RATE)
{
pMacEntry->MaxHTPhyMode.field.MODE = MODE_CCK;
pMacEntry->MaxHTPhyMode.field.MCS = pMacEntry->MaxSupportedRate;
pMacEntry->MinHTPhyMode.field.MODE = MODE_CCK;
pMacEntry->MinHTPhyMode.field.MCS = pMacEntry->MaxSupportedRate;
pMacEntry->HTPhyMode.field.MODE = MODE_CCK;
pMacEntry->HTPhyMode.field.MCS = pMacEntry->MaxSupportedRate;
}
else
{
pMacEntry->MaxHTPhyMode.field.MODE = MODE_OFDM;
pMacEntry->MaxHTPhyMode.field.MCS = OfdmRateToRxwiMCS[pMacEntry->MaxSupportedRate];
pMacEntry->MinHTPhyMode.field.MODE = MODE_OFDM;
pMacEntry->MinHTPhyMode.field.MCS = OfdmRateToRxwiMCS[pMacEntry->MaxSupportedRate];
pMacEntry->HTPhyMode.field.MODE = MODE_OFDM;
pMacEntry->HTPhyMode.field.MCS = OfdmRateToRxwiMCS[pMacEntry->MaxSupportedRate];
}
pMacEntry->CapabilityInfo = pApCliEntry->ApCliMlmeAux.CapabilityInfo;
if ((pApCliEntry->WepStatus == Ndis802_11WEPEnabled)
#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
&& (pApCliEntry->WpaSupplicantUP == WPA_SUPPLICANT_DISABLE)
#endif /* APCLI_WPA_SUPPLICANT_SUPPORT */
)
{
PCIPHER_KEY pKey;
INT idx, BssIdx;
BssIdx = pAd->ApCfg.BssidNum + MAX_MESH_NUM + ifIndex;
#ifdef MAC_APCLI_SUPPORT
BssIdx = APCLI_BSS_BASE + ifIndex;
#endif /* MAC_APCLI_SUPPORT */
for (idx=0; idx < SHARE_KEY_NUM; idx++)
{
pKey = &pApCliEntry->SharedKey[idx];
if (pKey->KeyLen > 0)
{
/* Set key material and cipherAlg to Asic */
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx == 0xFF)
#endif /* MAC_REPEATER_SUPPORT */
{
RTMP_ASIC_SHARED_KEY_TABLE(pAd,
BssIdx,
idx,
pKey);
}
if (idx == pApCliEntry->DefaultKeyId)
{
INT cnt;
/* Generate 3-bytes IV randomly for software encryption using */
for(cnt = 0; cnt < LEN_WEP_TSC; cnt++)
pKey->TxTsc[cnt] = RandomByte(pAd);
RTMP_SET_WCID_SEC_INFO(pAd,
BssIdx,
idx,
pKey->CipherAlg,
pMacEntry->Aid,
SHAREDKEYTABLE);
}
}
}
}
#ifdef DOT11_N_SUPPORT
/* If this Entry supports 802.11n, upgrade to HT rate. */
if (pApCliEntry->ApCliMlmeAux.HtCapabilityLen != 0)
{
UCHAR j, bitmask; /*k,bitmask; */
CHAR i;
PHT_CAPABILITY_IE pHtCapability = (PHT_CAPABILITY_IE)&(pApCliEntry->ApCliMlmeAux.HtCapability);
if ((pApCliEntry->ApCliMlmeAux.HtCapability.HtCapInfo.GF) && (pAd->CommonCfg.DesiredHtPhy.GF))
{
pMacEntry->MaxHTPhyMode.field.MODE = MODE_HTGREENFIELD;
}
else
{
pMacEntry->MaxHTPhyMode.field.MODE = MODE_HTMIX;
pAd->MacTab.fAnyStationNonGF = TRUE;
pAd->CommonCfg.AddHTInfo.AddHtInfo2.NonGfPresent = 1;
}
if ((pHtCapability->HtCapInfo.ChannelWidth) && (pAd->CommonCfg.DesiredHtPhy.ChannelWidth))
{
pMacEntry->MaxHTPhyMode.field.BW= BW_40;
pMacEntry->MaxHTPhyMode.field.ShortGI = ((pAd->CommonCfg.DesiredHtPhy.ShortGIfor40)&(pHtCapability->HtCapInfo.ShortGIfor40));
}
else
{
pMacEntry->MaxHTPhyMode.field.BW = BW_20;
pMacEntry->MaxHTPhyMode.field.ShortGI = ((pAd->CommonCfg.DesiredHtPhy.ShortGIfor20)&(pHtCapability->HtCapInfo.ShortGIfor20));
pAd->MacTab.fAnyStation20Only = TRUE;
}
/* find max fixed rate */
/*for (i=15; i>=0; i--) */
for (i=23; i>=0; i--) /*3*3 */
{
j = i/8;
bitmask = (1<<(i-(j*8)));
if ((pAd->ApCfg.ApCliTab[ifIndex].DesiredHtPhyInfo.MCSSet[j] & bitmask) && (pHtCapability->MCSSet[j] & bitmask))
{
pMacEntry->MaxHTPhyMode.field.MCS = i;
break;
}
if (i==0)
break;
}
if (pAd->ApCfg.ApCliTab[ifIndex].DesiredTransmitSetting.field.MCS != MCS_AUTO)
{
DBGPRINT(RT_DEBUG_TRACE, ("IF-apcli%d : Desired MCS = %d\n", ifIndex,
pAd->ApCfg.ApCliTab[ifIndex].DesiredTransmitSetting.field.MCS));
if (pAd->ApCfg.ApCliTab[ifIndex].DesiredTransmitSetting.field.MCS == 32)
{
/* Fix MCS as HT Duplicated Mode */
pMacEntry->MaxHTPhyMode.field.BW = 1;
pMacEntry->MaxHTPhyMode.field.MODE = MODE_HTMIX;
pMacEntry->MaxHTPhyMode.field.STBC = 0;
pMacEntry->MaxHTPhyMode.field.ShortGI = 0;
pMacEntry->MaxHTPhyMode.field.MCS = 32;
}
else if (pMacEntry->MaxHTPhyMode.field.MCS > pAd->ApCfg.ApCliTab[ifIndex].HTPhyMode.field.MCS)
{
/* STA supports fixed MCS */
pMacEntry->MaxHTPhyMode.field.MCS = pAd->ApCfg.ApCliTab[ifIndex].HTPhyMode.field.MCS;
}
}
pMacEntry->MaxHTPhyMode.field.STBC = (pHtCapability->HtCapInfo.RxSTBC & (pAd->CommonCfg.DesiredHtPhy.TxSTBC));
pMacEntry->MpduDensity = pHtCapability->HtCapParm.MpduDensity;
pMacEntry->MaxRAmpduFactor = pHtCapability->HtCapParm.MaxRAmpduFactor;
pMacEntry->MmpsMode = (UCHAR)pHtCapability->HtCapInfo.MimoPs;
pMacEntry->AMsduSize = (UCHAR)pHtCapability->HtCapInfo.AMsduSize;
pMacEntry->HTPhyMode.word = pMacEntry->MaxHTPhyMode.word;
if (pAd->CommonCfg.DesiredHtPhy.AmsduEnable && (pAd->CommonCfg.REGBACapability.field.AutoBA == FALSE))
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_AMSDU_INUSED);
if (pHtCapability->HtCapInfo.ShortGIfor20)
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_SGI20_CAPABLE);
if (pHtCapability->HtCapInfo.ShortGIfor40)
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_SGI40_CAPABLE);
if (pHtCapability->HtCapInfo.TxSTBC)
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_TxSTBC_CAPABLE);
if (pHtCapability->HtCapInfo.RxSTBC)
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_RxSTBC_CAPABLE);
if (pHtCapability->ExtHtCapInfo.PlusHTC)
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_HTC_CAPABLE);
if (pAd->CommonCfg.bRdg && pHtCapability->ExtHtCapInfo.RDGSupport)
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_RDG_CAPABLE);
if (pHtCapability->ExtHtCapInfo.MCSFeedback == 0x03)
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_MCSFEEDBACK_CAPABLE);
NdisMoveMemory(&pMacEntry->HTCapability, &pApCliEntry->ApCliMlmeAux.HtCapability, sizeof(HT_CAPABILITY_IE));
NdisMoveMemory(pMacEntry->HTCapability.MCSSet, pApCliEntry->RxMcsSet, 16);
}
else
{
pAd->MacTab.fAnyStationIsLegacy = TRUE;
DBGPRINT(RT_DEBUG_TRACE, ("ApCliLinkUp - MaxSupRate=%d Mbps\n",
RateIdToMbps[pMacEntry->MaxSupportedRate]));
}
#endif /* DOT11_N_SUPPORT */
pMacEntry->HTPhyMode.word = pMacEntry->MaxHTPhyMode.word;
pMacEntry->CurrTxRate = pMacEntry->MaxSupportedRate;
if (pAd->ApCfg.ApCliTab[ifIndex].bAutoTxRateSwitch == FALSE)
{
pMacEntry->bAutoTxRateSwitch = FALSE;
/* If the legacy mode is set, overwrite the transmit setting of this entry. */
RTMPUpdateLegacyTxSetting((UCHAR)pAd->ApCfg.ApCliTab[ifIndex].DesiredTransmitSetting.field.FixedTxMode, pMacEntry);
}
else
{
UCHAR TableSize = 0;
pMacEntry->bAutoTxRateSwitch = TRUE;
MlmeSelectTxRateTable(pAd, pMacEntry, &pMacEntry->pTable, &TableSize, &pMacEntry->CurrTxRateIndex);
MlmeNewTxRate(pAd, pMacEntry);
#ifdef NEW_RATE_ADAPT_SUPPORT
if (! ADAPT_RATE_TABLE(pMacEntry->pTable))
#endif /* NEW_RATE_ADAPT_SUPPORT */
pMacEntry->HTPhyMode.field.ShortGI = GI_800;
}
/* It had been set in APStartUp. Don't set again. */
/*AsicSetEdcaParm(pAd, &pAd->CommonCfg.APEdcaParm); */
/* set this entry WMM capable or not */
if ((pApCliEntry->ApCliMlmeAux.APEdcaParm.bValid)
#ifdef DOT11_N_SUPPORT
|| IS_HT_STA(pMacEntry)
#endif /* DOT11_N_SUPPORT */
)
{
#ifdef APCLI_CERT_SUPPORT
if (pAd->bApCliCertTest == TRUE)
{
AsicSetEdcaParm(pAd, &pApCliEntry->ApCliMlmeAux.APEdcaParm);
pAd->ApCfg.BssEdcaParm.EdcaUpdateCount++;
}
#endif /* APCLI_CERT_SUPPORT */
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_WMM_CAPABLE);
}
else
{
CLIENT_STATUS_CLEAR_FLAG(pMacEntry, fCLIENT_STATUS_WMM_CAPABLE);
}
#ifdef APCLI_CERT_SUPPORT
if (pAd->bApCliCertTest == TRUE)
{
RTMP_IO_READ32(pAd, EDCA_AC0_CFG, &Data);
Data &= 0xFFFFFF00;
Data |= 0x60;
RTMP_IO_WRITE32(pAd, EDCA_AC0_CFG, Data);
RTMP_IO_WRITE32(pAd, PBF_MAX_PCNT, 0x1F3FBF9F);
}
#endif /* APCLI_CERT_SUPPORT */
if (pAd->CommonCfg.bAggregationCapable)
{
if ((pAd->CommonCfg.bPiggyBackCapable) && (pApCliEntry->ApCliMlmeAux.APRalinkIe & 0x00000003) == 3)
{
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_PIGGYBACK_INUSED);
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_AGGREGATION_INUSED);
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_AGGREGATION_CAPABLE);
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_PIGGYBACK_CAPABLE);
RTMPSetPiggyBack(pAd, TRUE);
DBGPRINT(RT_DEBUG_TRACE, ("Turn on Piggy-Back\n"));
}
else if (pApCliEntry->ApCliMlmeAux.APRalinkIe & 0x00000001)
{
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_AGGREGATION_INUSED);
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_AGGREGATION_CAPABLE);
DBGPRINT(RT_DEBUG_TRACE, ("Ralink Aggregation\n"));
}
}
/* Set falg to identify if peer AP is Ralink chipset */
if (pApCliEntry->ApCliMlmeAux.APRalinkIe != 0x0)
CLIENT_STATUS_SET_FLAG(pMacEntry, fCLIENT_STATUS_RALINK_CHIPSET);
else
CLIENT_STATUS_CLEAR_FLAG(pMacEntry, fCLIENT_STATUS_RALINK_CHIPSET);
/* set the apcli interface be valid. */
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx == 0xFF)
#endif /* MAC_REPEATER_SUPPORT */
pApCliEntry->Valid = TRUE;
result = TRUE;
#ifdef MAC_APCLI_SUPPORT
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx == 0xFF)
#endif /* MAC_REPEATER_SUPPORT */
AsicSetApCliBssid(pAd, pApCliEntry->ApCliMlmeAux.Bssid, ifIndex);
#endif /* MAC_APCLI_SUPPORT */
pAd->ApCfg.ApCliInfRunned++;
break;
}
result = FALSE;
} while(FALSE);
if (result == FALSE)
{
DBGPRINT(RT_DEBUG_ERROR, (" (%s) alloc mac entry fail!!!\n", __FUNCTION__));
return result;
}
#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
/*
When AuthMode is WPA2-Enterprise and AP reboot or STA lost AP,
WpaSupplicant would not send EapolStart to AP after STA re-connect to AP again.
In this case, driver would send EapolStart to AP.
*/
if ((pMacEntry->AuthMode == Ndis802_11AuthModeWPA2) &&
(NdisEqualMemory(pAd->MlmeAux.Bssid, pAd->ApCfg.ApCliTab[ifIndex].LastBssid, MAC_ADDR_LEN)) &&
(pAd->ApCfg.ApCliTab[ifIndex].bLostAp == TRUE))
{
ApcliWpaSendEapolStart(pAd, pAd->MlmeAux.Bssid,pMacEntry,&pAd->ApCfg.ApCliTab[ifIndex]);
pAd->ApCfg.ApCliTab[ifIndex].bLostAp = FALSE;
}
#endif /*APCLI_WPA_SUPPLICANT_SUPPORT */
RTMPSetSupportMCS(pAd,
OPMODE_AP,
pMacEntry,
pApCliEntry->ApCliMlmeAux.SupRate,
pApCliEntry->ApCliMlmeAux.SupRateLen,
pApCliEntry->ApCliMlmeAux.ExtRate,
pApCliEntry->ApCliMlmeAux.ExtRateLen,
&pApCliEntry->ApCliMlmeAux.HtCapability,
pApCliEntry->ApCliMlmeAux.HtCapabilityLen);
#ifdef WSC_AP_SUPPORT
/* WSC initial connect to AP, jump to Wsc start action and set the correct parameters */
if ((result == TRUE) &&
(pAd->ApCfg.ApCliTab[ifIndex].WscControl.WscConfMode != WSC_DISABLE) &&
(pAd->ApCfg.ApCliTab[ifIndex].WscControl.bWscTrigger == TRUE))
{
pAd->ApCfg.ApCliTab[ifIndex].WscControl.WscState = WSC_STATE_LINK_UP;
pAd->ApCfg.ApCliTab[ifIndex].WscControl.WscStatus = WSC_STATE_LINK_UP;
pAd->ApCfg.ApCliTab[ifIndex].WscControl.WscConfStatus = WSC_SCSTATE_UNCONFIGURED;
NdisZeroMemory(pApCliEntry->WscControl.EntryAddr, MAC_ADDR_LEN);
NdisMoveMemory(pApCliEntry->WscControl.EntryAddr, pApCliEntry->ApCliMlmeAux.Bssid, MAC_ADDR_LEN);
WscSendEapolStart(pAd, pMacEntry->Addr, AP_MODE);
}
else
{
WscStop(pAd, TRUE, &pAd->ApCfg.ApCliTab[ifIndex].WscControl);
}
#endif /* WSC_AP_SUPPORT */
#ifdef DOT11_N_SUPPORT
#ifdef DOT11N_DRAFT3
#ifdef APCLI_CERT_SUPPORT
if (pAd->bApCliCertTest == TRUE)
{
if ((pAd->CommonCfg.bBssCoexEnable == TRUE)
&& (pAd->CommonCfg.Channel <= 14)
&& (pApCliEntry->DesiredHtPhyInfo.bHtEnable == TRUE)
&& (pApCliEntry->ApCliMlmeAux.ExtCapInfo.BssCoexistMgmtSupport == 1)) {
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_SCAN_2040);
BuildEffectedChannelList(pAd);
/*pAd->CommonCfg.ScanParameter.Dot11BssWidthTriggerScanInt = 150; */
DBGPRINT(RT_DEBUG_TRACE,
("LinkUP AP supports 20/40 BSS COEX !!! Dot11BssWidthTriggerScanInt[%d]\n",
pAd->CommonCfg.Dot11BssWidthTriggerScanInt));
}
else
{
DBGPRINT(RT_DEBUG_TRACE,
("not supports 20/40 BSS COEX !!! \n"));
DBGPRINT(RT_DEBUG_TRACE,
("pAd->CommonCfg.bBssCoexEnable %d !!! \n",
pAd->CommonCfg.bBssCoexEnable));
DBGPRINT(RT_DEBUG_TRACE,
("pAd->CommonCfg.Channel %d !!! \n",
pAd->CommonCfg.Channel));
DBGPRINT(RT_DEBUG_TRACE,
("pApCliEntry->DesiredHtPhyInfo.bHtEnable %d !!! \n",
pApCliEntry->DesiredHtPhyInfo.bHtEnable));
DBGPRINT(RT_DEBUG_TRACE,
("pAd->ApCliMlmeAux.ExtCapInfo.BssCoexstSup %d !!! \n",
pApCliEntry->ApCliMlmeAux.ExtCapInfo.BssCoexistMgmtSupport));
DBGPRINT(RT_DEBUG_TRACE,
("pAd->CommonCfg.CentralChannel %d !!! \n",
pAd->CommonCfg.CentralChannel));
DBGPRINT(RT_DEBUG_TRACE,
("pAd->CommonCfg.PhyMode %d !!! \n",
pAd->CommonCfg.PhyMode));
}
}
#endif /* APCLI_CERT_SUPPORT */
#endif /* DOT11N_DRAFT3 */
#endif /* DOT11_N_SUPPORT */
return result;
}
/*
==========================================================================
Routine Description:
Disconnect current BSSID
Arguments:
pAd - Pointer to our adapter
ApCliIdx - Which ApCli interface
Return Value:
None
Note:
==========================================================================
*/
VOID ApCliLinkDown(
IN PRTMP_ADAPTER pAd,
IN UCHAR ifIndex)
{
PAPCLI_STRUCT pApCliEntry = NULL;
#ifdef MAC_REPEATER_SUPPORT
UCHAR CliIdx = 0xFF;
#endif /* MAC_REPEATER_SUPPORT */
UCHAR MacTabWCID = 0;
if ((ifIndex < MAX_APCLI_NUM)
#ifdef MAC_REPEATER_SUPPORT
|| (ifIndex >= 64)
#endif /* MAC_REPEATER_SUPPORT */
)
{
#ifdef MAC_REPEATER_SUPPORT
if (ifIndex >= 64)
{
CliIdx = ((ifIndex - 64) % 16);
ifIndex = ((ifIndex - 64) / 16);
DBGPRINT(RT_DEBUG_ERROR, ("!!! REPEATER CLI LINK DOWN - IF(apcli%d) Cli %d !!!\n", ifIndex, CliIdx));
}
else
#endif /* MAC_REPEATER_SUPPORT */
/* add by duxt */
send_signal_to_user(STAT_LINK_DOWN);
/* end add by duxt */
DBGPRINT(RT_DEBUG_TRACE, ("!!! APCLI LINK DOWN - IF(apcli%d)!!!\n", ifIndex));
}
else
{
DBGPRINT(RT_DEBUG_TRACE, ("!!! ERROR : APCLI LINK DOWN - IF(apcli%d)!!!\n", ifIndex));
return;
}
pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex];
if ((pApCliEntry->Valid == FALSE)
#ifdef MAC_REPEATER_SUPPORT
&& (CliIdx == 0xFF)
#endif /* MAC_REPEATER_SUPPORT */
)
return;
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx == 0xFF)
#endif /* MAC_REPEATER_SUPPORT */
pAd->ApCfg.ApCliInfRunned--;
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx != 0xFF)
MacTabWCID = pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].MacTabWCID;
else
#endif /* MAC_REPEATER_SUPPORT */
MacTabWCID = pApCliEntry->MacTabWCID;
MacTableDeleteEntry(pAd, MacTabWCID, APCLI_ROOT_BSSID_GET(pAd, pApCliEntry->MacTabWCID));
#ifdef MAC_REPEATER_SUPPORT
if (CliIdx != 0xFF)
{
pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].CliValid = FALSE;
}
else
#endif /* MAC_REPEATER_SUPPORT */
pApCliEntry->Valid = FALSE; /* This link doesn't associated with any remote-AP */
#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
if (pApCliEntry->WpaSupplicantUP)
{
DBGPRINT(RT_DEBUG_TRACE, ("(%s) ApCli interface[%d] Send RT_DISASSOC_EVENT_FLAG.\n", __FUNCTION__, ifIndex));
RtmpOSWrielessEventSend(pAd->net_dev, RT_WLAN_EVENT_CUSTOM, RT_DISASSOC_EVENT_FLAG, NULL, NULL, 0);
}
#endif /* APCLI_WPA_SUPPLICANT_SUPPORT */
#ifdef APCLI_CERT_SUPPORT
if (pAd->bApCliCertTest == TRUE)
{
AsicSetEdcaParm(pAd, &pAd->CommonCfg.APEdcaParm); /* Restore AP's EDCA parameters. */
pAd->ApCfg.BssEdcaParm.EdcaUpdateCount++;
}
#endif /* APCLI_CERT_SUPPORT */
}
/*
==========================================================================
Description:
APCLI Interface Up.
==========================================================================
*/
VOID ApCliIfUp(
IN PRTMP_ADAPTER pAd)
{
UCHAR ifIndex;
PAPCLI_STRUCT pApCliEntry;
/* Reset is in progress, stop immediately */
if ( RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS) ||
RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS) ||
!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_START_UP))
return;
/* sanity check whether the interface is initialized. */
if (pAd->flg_apcli_init != TRUE)
return;
for(ifIndex = 0; ifIndex < MAX_APCLI_NUM; ifIndex++)
{
pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex];
if (APCLI_IF_UP_CHECK(pAd, ifIndex)
&& (pApCliEntry->Enable == TRUE)
&& (pApCliEntry->Valid == FALSE))
{
DBGPRINT(RT_DEBUG_TRACE, ("(%s) ApCli interface[%d] startup.\n", __FUNCTION__, ifIndex));
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_JOIN_REQ, 0, NULL, ifIndex);
}
}
return;
}
/*
==========================================================================
Description:
APCLI Interface Down.
==========================================================================
*/
VOID ApCliIfDown(
IN PRTMP_ADAPTER pAd)
{
UCHAR ifIndex;
PAPCLI_STRUCT pApCliEntry;
#ifdef MAC_REPEATER_SUPPORT
UCHAR CliIdx, idx;
INVAILD_TRIGGER_MAC_ENTRY *pEntry = NULL;
#endif /* MAC_REPEATER_SUPPORT */
for(ifIndex = 0; ifIndex < MAX_APCLI_NUM; ifIndex++)
{
pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex];
DBGPRINT(RT_DEBUG_TRACE, ("(%s) ApCli interface[%d] startdown.\n", __FUNCTION__, ifIndex));
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn)
{
for(CliIdx = 0; CliIdx < MAX_EXT_MAC_ADDR_SIZE; CliIdx++)
{
if (pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].CliEnable)
{
RTMPRemoveRepeaterDisconnectEntry(pAd, ifIndex, CliIdx);
RTMPRemoveRepeaterEntry(pAd, ifIndex, CliIdx);
}
}
}
#endif /* MAC_REPEATER_SUPPORT */
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_DISCONNECT_REQ, 0, NULL, ifIndex);
}
#ifdef MAC_REPEATER_SUPPORT
for (idx = 0; idx< 32; idx++)
{
pEntry = &pAd->ApCfg.ReptControl.RepeaterInvaildEntry[idx];
RTMPRepeaterRemoveInvaildMacEntry(pAd, idx, pEntry->MacAddr);
}
#endif /* MAC_REPEATER_SUPPORT */
return;
}
/*
==========================================================================
Description:
APCLI Interface Monitor.
==========================================================================
*/
VOID ApCliIfMonitor(
IN PRTMP_ADAPTER pAd)
{
UCHAR index;
PAPCLI_STRUCT pApCliEntry;
#ifdef MAC_REPEATER_SUPPORT
UCHAR CliIdx;
PREPEATER_CLIENT_ENTRY pReptCliEntry = NULL;
#endif /* MAC_REPEATER_SUPPORT */
/* Reset is in progress, stop immediately */
if ( RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS) ||
RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS) ||
!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_START_UP))
return;
/* sanity check whether the interface is initialized. */
if (pAd->flg_apcli_init != TRUE)
return;
for(index = 0; index < MAX_APCLI_NUM; index++)
{
UCHAR Wcid;
PMAC_TABLE_ENTRY pMacEntry;
BOOLEAN bForceBrocken = FALSE;
pApCliEntry = &pAd->ApCfg.ApCliTab[index];
#ifdef MAC_REPEATER_SUPPORT
if ((pAd->ApCfg.bMACRepeaterEn) && (pApCliEntry->Enable))
{
for(CliIdx = 0; CliIdx < MAX_EXT_MAC_ADDR_SIZE; CliIdx++)
{
pReptCliEntry = &pAd->ApCfg.ApCliTab[index].RepeaterCli[CliIdx];
if (pReptCliEntry->CliEnable)
{
if (pReptCliEntry->CliValid)
{
Wcid = pAd->ApCfg.ApCliTab[index].RepeaterCli[CliIdx].MacTabWCID;
if (!VALID_WCID(Wcid))
continue;
pMacEntry = &pAd->MacTab.Content[Wcid];
if ((pMacEntry->PortSecured != WPA_802_1X_PORT_SECURED) &&
RTMP_TIME_AFTER(pAd->Mlme.Now32 , (pReptCliEntry->CliTriggerTime + (5 * OS_HZ))))
{
RTMPRemoveRepeaterDisconnectEntry(pAd, index, CliIdx);
RTMPRemoveRepeaterEntry(pAd, index, CliIdx);
}
}
else
{
if (RTMP_TIME_AFTER(pAd->Mlme.Now32 , (pReptCliEntry->CliTriggerTime + (5 * OS_HZ))))
{
RTMPRemoveRepeaterEntry(pAd, index, CliIdx);
}
}
}
}
}
#endif /* MAC_REPEATER_SUPPORT */
if (pApCliEntry->Valid == TRUE)
{
Wcid = pAd->ApCfg.ApCliTab[index].MacTabWCID;
if (!VALID_WCID(Wcid))
continue;
pMacEntry = &pAd->MacTab.Content[Wcid];
if ((pMacEntry->AuthMode >= Ndis802_11AuthModeWPA)
&& (pMacEntry->PortSecured != WPA_802_1X_PORT_SECURED)
&& (RTMP_TIME_AFTER(pAd->Mlme.Now32 , (pApCliEntry->ApCliLinkUpTime + (30 * OS_HZ)))))
bForceBrocken = TRUE;
if (RTMP_TIME_AFTER(pAd->Mlme.Now32 , (pApCliEntry->ApCliRcvBeaconTime + (4 * OS_HZ))))
bForceBrocken = TRUE;
}
else
{
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn)
{
for(CliIdx = 0; CliIdx < MAX_EXT_MAC_ADDR_SIZE; CliIdx++)
{
if (pAd->ApCfg.ApCliTab[index].RepeaterCli[CliIdx].CliEnable)
{
RTMPRemoveRepeaterDisconnectEntry(pAd, index, CliIdx);
RTMPRemoveRepeaterEntry(pAd, index, CliIdx);
}
}
}
#endif /* MAC_REPEATER_SUPPORT */
continue;
}
if (bForceBrocken == TRUE)
{
DBGPRINT(RT_DEBUG_TRACE, ("ApCliIfMonitor: IF(apcli%d) - no Beancon is received from root-AP.\n", index));
DBGPRINT(RT_DEBUG_TRACE, ("ApCliIfMonitor: Reconnect the Root-Ap again.\n"));
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn)
{
for(CliIdx = 0; CliIdx < MAX_EXT_MAC_ADDR_SIZE; CliIdx++)
{
if (pAd->ApCfg.ApCliTab[index].RepeaterCli[CliIdx].CliEnable)
{
RTMPRemoveRepeaterDisconnectEntry(pAd, index, CliIdx);
RTMPRemoveRepeaterEntry(pAd, index, CliIdx);
}
}
}
#endif /* MAC_REPEATER_SUPPORT */
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_DISCONNECT_REQ, 0, NULL, index);
RTMP_MLME_HANDLER(pAd);
}
}
return;
}
/*! \brief To substitute the message type if the message is coming from external
* \param pFrame The frame received
* \param *Machine The state machine
* \param *MsgType the message type for the state machine
* \return TRUE if the substitution is successful, FALSE otherwise
* \pre
* \post
*/
BOOLEAN ApCliMsgTypeSubst(
IN PRTMP_ADAPTER pAd,
IN PFRAME_802_11 pFrame,
OUT INT *Machine,
OUT INT *MsgType)
{
USHORT Seq;
UCHAR EAPType;
BOOLEAN Return = FALSE;
#ifdef WSC_AP_SUPPORT
UCHAR EAPCode;
PMAC_TABLE_ENTRY pEntry;
#endif /* WSC_AP_SUPPORT */
/* only PROBE_REQ can be broadcast, all others must be unicast-to-me && is_mybssid; otherwise, */
/* ignore this frame */
/* WPA EAPOL PACKET */
if (pFrame->Hdr.FC.Type == BTYPE_DATA)
{
#ifdef WSC_AP_SUPPORT
/*WSC EAPOL PACKET */
pEntry = MacTableLookup(pAd, pFrame->Hdr.Addr2);
if (pEntry && IS_ENTRY_APCLI(pEntry) && pAd->ApCfg.ApCliTab[pEntry->apidx].WscControl.WscConfMode != WSC_DISABLE)
{
*Machine = WSC_STATE_MACHINE;
EAPType = *((UCHAR*)pFrame + LENGTH_802_11 + LENGTH_802_1_H + 1);
EAPCode = *((UCHAR*)pFrame + LENGTH_802_11 + LENGTH_802_1_H + 4);
Return = WscMsgTypeSubst(EAPType, EAPCode, MsgType);
}
if (!Return)
#endif /* WSC_AP_SUPPORT */
{
*Machine = WPA_STATE_MACHINE;
EAPType = *((UCHAR*)pFrame + LENGTH_802_11 + LENGTH_802_1_H + 1);
Return = WpaMsgTypeSubst(EAPType, MsgType);
}
return Return;
}
else if (pFrame->Hdr.FC.Type == BTYPE_MGMT)
{
switch (pFrame->Hdr.FC.SubType)
{
case SUBTYPE_ASSOC_RSP:
*Machine = APCLI_ASSOC_STATE_MACHINE;
*MsgType = APCLI_MT2_PEER_ASSOC_RSP;
break;
case SUBTYPE_DISASSOC:
*Machine = APCLI_ASSOC_STATE_MACHINE;
*MsgType = APCLI_MT2_PEER_DISASSOC_REQ;
break;
case SUBTYPE_DEAUTH:
*Machine = APCLI_AUTH_STATE_MACHINE;
*MsgType = APCLI_MT2_PEER_DEAUTH;
break;
case SUBTYPE_AUTH:
/* get the sequence number from payload 24 Mac Header + 2 bytes algorithm */
NdisMoveMemory(&Seq, &pFrame->Octet[2], sizeof(USHORT));
if (Seq == 2 || Seq == 4)
{
*Machine = APCLI_AUTH_STATE_MACHINE;
*MsgType = APCLI_MT2_PEER_AUTH_EVEN;
}
else
{
return FALSE;
}
break;
case SUBTYPE_ACTION:
*Machine = ACTION_STATE_MACHINE;
/* Sometimes Sta will return with category bytes with MSB = 1, if they receive catogory out of their support */
if ((pFrame->Octet[0]&0x7F) > MAX_PEER_CATE_MSG)
{
*MsgType = MT2_ACT_INVALID;
}
else
{
*MsgType = (pFrame->Octet[0]&0x7F);
}
break;
default:
return FALSE;
}
return TRUE;
}
return FALSE;
}
BOOLEAN preCheckMsgTypeSubset(
IN PRTMP_ADAPTER pAd,
IN PFRAME_802_11 pFrame,
OUT INT *Machine,
OUT INT *MsgType)
{
if (pFrame->Hdr.FC.Type == BTYPE_MGMT)
{
switch (pFrame->Hdr.FC.SubType)
{
/* Beacon must be processed be AP Sync state machine. */
case SUBTYPE_BEACON:
*Machine = AP_SYNC_STATE_MACHINE;
*MsgType = APMT2_PEER_BEACON;
break;
/* Only Sta have chance to receive Probe-Rsp. */
case SUBTYPE_PROBE_RSP:
*Machine = APCLI_SYNC_STATE_MACHINE;
*MsgType = APCLI_MT2_PEER_PROBE_RSP;
break;
default:
return FALSE;
}
return TRUE;
}
return FALSE;
}
/*
==========================================================================
Description:
MLME message sanity check
Return:
TRUE if all parameters are OK, FALSE otherwise
IRQL = DISPATCH_LEVEL
==========================================================================
*/
BOOLEAN ApCliPeerAssocRspSanity(
IN PRTMP_ADAPTER pAd,
IN VOID *pMsg,
IN ULONG MsgLen,
OUT PUCHAR pAddr2,
OUT USHORT *pCapabilityInfo,
OUT USHORT *pStatus,
OUT USHORT *pAid,
OUT UCHAR SupRate[],
OUT UCHAR *pSupRateLen,
OUT UCHAR ExtRate[],
OUT UCHAR *pExtRateLen,
OUT HT_CAPABILITY_IE *pHtCapability,
OUT ADD_HT_INFO_IE *pAddHtInfo, /* AP might use this additional ht info IE */
OUT UCHAR *pHtCapabilityLen,
OUT UCHAR *pAddHtInfoLen,
OUT UCHAR *pNewExtChannelOffset,
OUT PEDCA_PARM pEdcaParm,
OUT UCHAR *pCkipFlag)
{
CHAR IeType, *Ptr;
PFRAME_802_11 pFrame = (PFRAME_802_11)pMsg;
PEID_STRUCT pEid;
ULONG Length = 0;
*pNewExtChannelOffset = 0xff;
*pHtCapabilityLen = 0;
*pAddHtInfoLen = 0;
COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2);
Ptr = (CHAR *) pFrame->Octet;
Length += LENGTH_802_11;
NdisMoveMemory(pCapabilityInfo, &pFrame->Octet[0], 2);
Length += 2;
NdisMoveMemory(pStatus, &pFrame->Octet[2], 2);
Length += 2;
*pCkipFlag = 0;
*pExtRateLen = 0;
pEdcaParm->bValid = FALSE;
if (*pStatus != MLME_SUCCESS)
return TRUE;
NdisMoveMemory(pAid, &pFrame->Octet[4], 2);
Length += 2;
/* Aid already swaped byte order in RTMPFrameEndianChange() for big endian platform */
*pAid = (*pAid) & 0x3fff; /* AID is low 14-bit */
/* -- get supported rates from payload and advance the pointer */
IeType = pFrame->Octet[6];
*pSupRateLen = pFrame->Octet[7];
if ((IeType != IE_SUPP_RATES) || (*pSupRateLen > MAX_LEN_OF_SUPPORTED_RATES))
{
DBGPRINT(RT_DEBUG_TRACE, ("PeerAssocRspSanity fail - wrong SupportedRates IE\n"));
return FALSE;
}
else
NdisMoveMemory(SupRate, &pFrame->Octet[8], *pSupRateLen);
Length = Length + 2 + *pSupRateLen;
/* many AP implement proprietary IEs in non-standard order, we'd better */
/* tolerate mis-ordered IEs to get best compatibility */
pEid = (PEID_STRUCT) &pFrame->Octet[8 + (*pSupRateLen)];
/* get variable fields from payload and advance the pointer */
while ((Length + 2 + pEid->Len) <= MsgLen)
{
switch (pEid->Eid)
{
case IE_EXT_SUPP_RATES:
if (pEid->Len <= MAX_LEN_OF_SUPPORTED_RATES)
{
NdisMoveMemory(ExtRate, pEid->Octet, pEid->Len);
*pExtRateLen = pEid->Len;
}
break;
#ifdef DOT11_N_SUPPORT
case IE_HT_CAP:
case IE_HT_CAP2:
if (pEid->Len >= SIZE_HT_CAP_IE) /*Note: allow extension.!! */
{
NdisMoveMemory(pHtCapability, pEid->Octet, SIZE_HT_CAP_IE);
*(USHORT *) (&pHtCapability->HtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->HtCapInfo));
*(USHORT *) (&pHtCapability->ExtHtCapInfo) = cpu2le16(*(USHORT *)(&pHtCapability->ExtHtCapInfo));
*pHtCapabilityLen = SIZE_HT_CAP_IE;
}
else
{
DBGPRINT(RT_DEBUG_WARN, ("PeerAssocRspSanity - wrong IE_HT_CAP. \n"));
}
break;
case IE_ADD_HT:
case IE_ADD_HT2:
if (pEid->Len >= sizeof(ADD_HT_INFO_IE))
{
/* This IE allows extension, but we can ignore extra bytes beyond our knowledge , so only */
/* copy first sizeof(ADD_HT_INFO_IE) */
NdisMoveMemory(pAddHtInfo, pEid->Octet, sizeof(ADD_HT_INFO_IE));
*pAddHtInfoLen = SIZE_ADD_HT_INFO_IE;
}
else
{
DBGPRINT(RT_DEBUG_WARN, ("PeerAssocRspSanity - wrong IE_ADD_HT. \n"));
}
break;
case IE_SECONDARY_CH_OFFSET:
if (pEid->Len == 1)
{
*pNewExtChannelOffset = pEid->Octet[0];
}
else
{
DBGPRINT(RT_DEBUG_WARN, ("PeerAssocRspSanity - wrong IE_SECONDARY_CH_OFFSET. \n"));
}
break;
#endif /* DOT11_N_SUPPORT */
/* CCX2, WMM use the same IE value */
/* case IE_CCX_V2: */
case IE_VENDOR_SPECIFIC:
/* handle WME PARAMTER ELEMENT */
if (NdisEqualMemory(pEid->Octet, WME_PARM_ELEM, 6) && (pEid->Len == 24))
{
PUCHAR ptr;
int i;
/* parsing EDCA parameters */
pEdcaParm->bValid = TRUE;
pEdcaParm->bQAck = FALSE; /* pEid->Octet[0] & 0x10; */
pEdcaParm->bQueueRequest = FALSE; /* pEid->Octet[0] & 0x20; */
pEdcaParm->bTxopRequest = FALSE; /* pEid->Octet[0] & 0x40; */
/*pEdcaParm->bMoreDataAck = FALSE; // pEid->Octet[0] & 0x80; */
pEdcaParm->EdcaUpdateCount = pEid->Octet[6] & 0x0f;
pEdcaParm->bAPSDCapable = (pEid->Octet[6] & 0x80) ? 1 : 0;
ptr = (PUCHAR) &pEid->Octet[8];
for (i=0; i<4; i++)
{
UCHAR aci = (*ptr & 0x60) >> 5; /* b5~6 is AC INDEX */
pEdcaParm->bACM[aci] = (((*ptr) & 0x10) == 0x10); /* b5 is ACM */
pEdcaParm->Aifsn[aci] = (*ptr) & 0x0f; /* b0~3 is AIFSN */
pEdcaParm->Cwmin[aci] = *(ptr+1) & 0x0f; /* b0~4 is Cwmin */
pEdcaParm->Cwmax[aci] = *(ptr+1) >> 4; /* b5~8 is Cwmax */
pEdcaParm->Txop[aci] = *(ptr+2) + 256 * (*(ptr+3)); /* in unit of 32-us */
ptr += 4; /* point to next AC */
}
}
break;
default:
DBGPRINT(RT_DEBUG_TRACE, ("PeerAssocRspSanity - ignore unrecognized EID = %d\n", pEid->Eid));
break;
}
Length = Length + 2 + pEid->Len;
pEid = (PEID_STRUCT)((UCHAR*)pEid + 2 + pEid->Len);
}
return TRUE;
}
MAC_TABLE_ENTRY *ApCliTableLookUpByWcid(
IN PRTMP_ADAPTER pAd,
IN UCHAR wcid,
IN PUCHAR pAddrs)
{
ULONG ApCliIndex;
PMAC_TABLE_ENTRY pCurEntry = NULL;
PMAC_TABLE_ENTRY pEntry = NULL;
if (wcid <=0 || wcid >= MAX_LEN_OF_MAC_TABLE )
return NULL;
NdisAcquireSpinLock(&pAd->MacTabLock);
do
{
pCurEntry = &pAd->MacTab.Content[wcid];
ApCliIndex = 0xff;
if ((pCurEntry) && IS_ENTRY_APCLI(pCurEntry))
{
ApCliIndex = pCurEntry->MatchAPCLITabIdx;
}
if ((ApCliIndex == 0xff) || (ApCliIndex >= MAX_APCLI_NUM))
break;
if (pAd->ApCfg.ApCliTab[ApCliIndex].Valid != TRUE)
break;
if (MAC_ADDR_EQUAL(pCurEntry->Addr, pAddrs))
{
pEntry = pCurEntry;
break;
}
} while(FALSE);
NdisReleaseSpinLock(&pAd->MacTabLock);
return pEntry;
}
/*
==========================================================================
Description:
Check the Apcli Entry is valid or not.
==========================================================================
*/
static inline BOOLEAN ValidApCliEntry(
IN PRTMP_ADAPTER pAd,
IN INT apCliIdx)
{
BOOLEAN result;
PMAC_TABLE_ENTRY pMacEntry;
APCLI_STRUCT *pApCliEntry;
UINT32 MaxWcidNum = MAX_LEN_OF_MAC_TABLE;
do
{
if ((apCliIdx < 0) || (apCliIdx >= MAX_APCLI_NUM))
{
result = FALSE;
break;
}
pApCliEntry = (APCLI_STRUCT *)&pAd->ApCfg.ApCliTab[apCliIdx];
if (pApCliEntry->Valid != TRUE)
{
result = FALSE;
break;
}
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn)
MaxWcidNum = MAX_MAC_TABLE_SIZE_WITH_REPEATER;
#endif /* MAC_REPEATER_SUPPORT */
if ((pApCliEntry->MacTabWCID <= 0)
|| (pApCliEntry->MacTabWCID >= MaxWcidNum))
{
result = FALSE;
break;
}
pMacEntry = &pAd->MacTab.Content[pApCliEntry->MacTabWCID];
if (!IS_ENTRY_APCLI(pMacEntry))
{
result = FALSE;
break;
}
result = TRUE;
} while(FALSE);
return result;
}
BOOLEAN ApCliAllowToSendPacket(
IN RTMP_ADAPTER *pAd,
IN PNDIS_PACKET pPacket,
OUT UCHAR *pWcid)
{
UCHAR apCliIdx;
BOOLEAN allowed;
/*DBGPRINT(RT_DEBUG_TRACE, ("ApCliAllowToSendPacket():Packet to ApCli interface!\n")); */
apCliIdx = RTMP_GET_PACKET_NET_DEVICE(pPacket) - MIN_NET_DEVICE_FOR_APCLI;
if (ValidApCliEntry(pAd, apCliIdx))
{
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn == TRUE)
{
PUCHAR pSrcBufVA = NULL;
PACKET_INFO PacketInfo;
UINT SrcBufLen;
PMAC_TABLE_ENTRY pEntry = NULL;
REPEATER_CLIENT_ENTRY *pReptEntry = NULL;
RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pSrcBufVA, &SrcBufLen);
pReptEntry = RTMPLookupRepeaterCliEntry(pAd, TRUE, (pSrcBufVA + MAC_ADDR_LEN));
if (pReptEntry)
{
*pWcid = pReptEntry->MacTabWCID;
return TRUE;
}
else
{
if (RTMPRepeaterVaildMacEntry(pAd, pSrcBufVA + MAC_ADDR_LEN))
{
pEntry = &pAd->MacTab.Content[pAd->ApCfg.ApCliTab[apCliIdx].MacTabWCID];
if ((pEntry) && (pEntry->PortSecured == WPA_802_1X_PORT_SECURED))
{
RTMPInsertRepeaterEntry(pAd, apCliIdx, (pSrcBufVA + ETH_LENGTH_OF_ADDRESS));
DBGPRINT(RT_DEBUG_ERROR, (" Receive trigger packet !!!\n"));
return FALSE;
}
}
}
*pWcid = pAd->ApCfg.ApCliTab[apCliIdx].MacTabWCID;
}
else
#endif /* MAC_REPEATER_SUPPORT */
*pWcid = pAd->ApCfg.ApCliTab[apCliIdx].MacTabWCID;
allowed = TRUE;
}
else
{
allowed = FALSE;
}
return allowed;
}
/*
========================================================================
Routine Description:
Validate the security configuration against the RSN information
element
Arguments:
pAdapter Pointer to our adapter
eid_ptr Pointer to VIE
Return Value:
TRUE for configuration match
FALSE for otherwise
Note:
========================================================================
*/
BOOLEAN ApCliValidateRSNIE(
IN PRTMP_ADAPTER pAd,
IN PEID_STRUCT pEid_ptr,
IN USHORT eid_len,
IN USHORT idx)
{
PUCHAR pVIE;
PUCHAR pTmp;
UCHAR len;
PEID_STRUCT pEid;
CIPHER_SUITE WPA; /* AP announced WPA cipher suite */
CIPHER_SUITE WPA2; /* AP announced WPA2 cipher suite */
USHORT Count;
UCHAR Sanity;
PAPCLI_STRUCT pApCliEntry = NULL;
PRSN_IE_HEADER_STRUCT pRsnHeader;
NDIS_802_11_ENCRYPTION_STATUS TmpCipher;
NDIS_802_11_AUTHENTICATION_MODE TmpAuthMode;
NDIS_802_11_AUTHENTICATION_MODE WPA_AuthMode;
NDIS_802_11_AUTHENTICATION_MODE WPA_AuthModeAux;
NDIS_802_11_AUTHENTICATION_MODE WPA2_AuthMode;
NDIS_802_11_AUTHENTICATION_MODE WPA2_AuthModeAux;
pVIE = (PUCHAR) pEid_ptr;
len = eid_len;
/*if (len >= MAX_LEN_OF_RSNIE || len <= MIN_LEN_OF_RSNIE) */
/* return FALSE; */
/* Init WPA setting */
WPA.PairCipher = Ndis802_11WEPDisabled;
WPA.PairCipherAux = Ndis802_11WEPDisabled;
WPA.GroupCipher = Ndis802_11WEPDisabled;
WPA.RsnCapability = 0;
WPA.bMixMode = FALSE;
WPA_AuthMode = Ndis802_11AuthModeOpen;
WPA_AuthModeAux = Ndis802_11AuthModeOpen;
/* Init WPA2 setting */
WPA2.PairCipher = Ndis802_11WEPDisabled;
WPA2.PairCipherAux = Ndis802_11WEPDisabled;
WPA2.GroupCipher = Ndis802_11WEPDisabled;
WPA2.RsnCapability = 0;
WPA2.bMixMode = FALSE;
WPA2_AuthMode = Ndis802_11AuthModeOpen;
WPA2_AuthModeAux = Ndis802_11AuthModeOpen;
Sanity = 0;
/* 1. Parse Cipher this received RSNIE */
while (len > 0)
{
pTmp = pVIE;
pEid = (PEID_STRUCT) pTmp;
switch(pEid->Eid)
{
case IE_WPA:
if (NdisEqualMemory(pEid->Octet, WPA_OUI, 4) != 1)
{
/* if unsupported vendor specific IE */
break;
}
/* Skip OUI ,version and multicast suite OUI */
pTmp += 11;
/*
Cipher Suite Selectors from Spec P802.11i/D3.2 P26.
Value Meaning
0 None
1 WEP-40
2 Tkip
3 WRAP
4 AES
5 WEP-104
*/
/* Parse group cipher */
switch (*pTmp)
{
case 1:
case 5: /* Although WEP is not allowed in WPA related auth mode, we parse it anyway */
WPA.GroupCipher = Ndis802_11Encryption1Enabled;
break;
case 2:
WPA.GroupCipher = Ndis802_11Encryption2Enabled;
break;
case 4:
WPA.GroupCipher = Ndis802_11Encryption3Enabled;
break;
default:
break;
}
/* number of unicast suite */
pTmp += 1;
/* Store unicast cipher count */
NdisMoveMemory(&Count, pTmp, sizeof(USHORT));
Count = cpu2le16(Count);
/* pointer to unicast cipher */
pTmp += sizeof(USHORT);
/* Parsing all unicast cipher suite */
while (Count > 0)
{
/* Skip cipher suite OUI */
pTmp += 3;
TmpCipher = Ndis802_11WEPDisabled;
switch (*pTmp)
{
case 1:
case 5: /* Although WEP is not allowed in WPA related auth mode, we parse it anyway */
TmpCipher = Ndis802_11Encryption1Enabled;
break;
case 2:
TmpCipher = Ndis802_11Encryption2Enabled;
break;
case 4:
TmpCipher = Ndis802_11Encryption3Enabled;
break;
default:
break;
}
if (TmpCipher > WPA.PairCipher)
{
/* Move the lower cipher suite to PairCipherAux */
WPA.PairCipherAux = WPA.PairCipher;
WPA.PairCipher = TmpCipher;
}
else
{
WPA.PairCipherAux = TmpCipher;
}
pTmp++;
Count--;
}
/* Get AKM suite counts */
NdisMoveMemory(&Count, pTmp, sizeof(USHORT));
Count = cpu2le16(Count);
pTmp += sizeof(USHORT);
/* Parse AKM ciphers */
/* Parsing all AKM cipher suite */
while (Count > 0)
{
/* Skip cipher suite OUI */
pTmp += 3;
TmpAuthMode = Ndis802_11AuthModeOpen;
switch (*pTmp)
{
case 1:
/* WPA-enterprise */
TmpAuthMode = Ndis802_11AuthModeWPA;
break;
case 2:
/* WPA-personal */
TmpAuthMode = Ndis802_11AuthModeWPAPSK;
break;
default:
break;
}
if (TmpAuthMode > WPA_AuthMode)
{
/* Move the lower AKM suite to WPA_AuthModeAux */
WPA_AuthModeAux = WPA_AuthMode;
WPA_AuthMode = TmpAuthMode;
}
else
{
WPA_AuthModeAux = TmpAuthMode;
}
pTmp++;
Count--;
}
/* ToDo - Support WPA-None ? */
/* Check the Pair & Group, if different, turn on mixed mode flag */
if (WPA.GroupCipher != WPA.PairCipher)
WPA.bMixMode = TRUE;
DBGPRINT(RT_DEBUG_TRACE, ("ApCliValidateRSNIE - RSN-WPA1 PairWiseCipher(%s), GroupCipher(%s), AuthMode(%s)\n",
((WPA.bMixMode) ? "Mix" : GetEncryptType(WPA.PairCipher)),
GetEncryptType(WPA.GroupCipher),
GetAuthMode(WPA_AuthMode)));
Sanity |= 0x1;
break; /* End of case IE_WPA */
case IE_RSN:
pRsnHeader = (PRSN_IE_HEADER_STRUCT) pTmp;
/* 0. Version must be 1 */
/* The pRsnHeader->Version exists in native little-endian order, so we may need swap it for RT_BIG_ENDIAN systems. */
if (le2cpu16(pRsnHeader->Version) != 1)
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - RSN Version isn't 1(%d) \n", pRsnHeader->Version));
break;
}
pTmp += sizeof(RSN_IE_HEADER_STRUCT);
/* 1. Check cipher OUI */
if (!RTMPEqualMemory(pTmp, RSN_OUI, 3))
{
/* if unsupported vendor specific IE */
break;
}
/* Skip cipher suite OUI */
pTmp += 3;
/* Parse group cipher */
switch (*pTmp)
{
case 1:
case 5: /* Although WEP is not allowed in WPA related auth mode, we parse it anyway */
WPA2.GroupCipher = Ndis802_11Encryption1Enabled;
break;
case 2:
WPA2.GroupCipher = Ndis802_11Encryption2Enabled;
break;
case 4:
WPA2.GroupCipher = Ndis802_11Encryption3Enabled;
break;
default:
break;
}
/* number of unicast suite */
pTmp += 1;
/* Get pairwise cipher counts */
NdisMoveMemory(&Count, pTmp, sizeof(USHORT));
Count = cpu2le16(Count);
pTmp += sizeof(USHORT);
/* 3. Get pairwise cipher */
/* Parsing all unicast cipher suite */
while (Count > 0)
{
/* Skip OUI */
pTmp += 3;
TmpCipher = Ndis802_11WEPDisabled;
switch (*pTmp)
{
case 1:
case 5: /* Although WEP is not allowed in WPA related auth mode, we parse it anyway */
TmpCipher = Ndis802_11Encryption1Enabled;
break;
case 2:
TmpCipher = Ndis802_11Encryption2Enabled;
break;
case 4:
TmpCipher = Ndis802_11Encryption3Enabled;
break;
default:
break;
}
if (TmpCipher > WPA2.PairCipher)
{
/* Move the lower cipher suite to PairCipherAux */
WPA2.PairCipherAux = WPA2.PairCipher;
WPA2.PairCipher = TmpCipher;
}
else
{
WPA2.PairCipherAux = TmpCipher;
}
pTmp ++;
Count--;
}
/* Get AKM suite counts */
NdisMoveMemory(&Count, pTmp, sizeof(USHORT));
Count = cpu2le16(Count);
pTmp += sizeof(USHORT);
/* Parse AKM ciphers */
/* Parsing all AKM cipher suite */
while (Count > 0)
{
/* Skip cipher suite OUI */
pTmp += 3;
TmpAuthMode = Ndis802_11AuthModeOpen;
switch (*pTmp)
{
case 1:
/* WPA2-enterprise */
TmpAuthMode = Ndis802_11AuthModeWPA2;
break;
case 2:
/* WPA2-personal */
TmpAuthMode = Ndis802_11AuthModeWPA2PSK;
break;
default:
break;
}
if (TmpAuthMode > WPA2_AuthMode)
{
/* Move the lower AKM suite to WPA2_AuthModeAux */
WPA2_AuthModeAux = WPA2_AuthMode;
WPA2_AuthMode = TmpAuthMode;
}
else
{
WPA2_AuthModeAux = TmpAuthMode;
}
pTmp++;
Count--;
}
/* Check the Pair & Group, if different, turn on mixed mode flag */
if (WPA2.GroupCipher != WPA2.PairCipher)
WPA2.bMixMode = TRUE;
DBGPRINT(RT_DEBUG_TRACE, ("ApCliValidateRSNIE - RSN-WPA2 PairWiseCipher(%s), GroupCipher(%s), AuthMode(%s)\n",
(WPA2.bMixMode ? "Mix" : GetEncryptType(WPA2.PairCipher)), GetEncryptType(WPA2.GroupCipher),
GetAuthMode(WPA2_AuthMode)));
Sanity |= 0x2;
break; /* End of case IE_RSN */
default:
DBGPRINT(RT_DEBUG_WARN, ("ApCliValidateRSNIE - Unknown pEid->Eid(%d) \n", pEid->Eid));
break;
}
/* skip this Eid */
pVIE += (pEid->Len + 2);
len -= (pEid->Len + 2);
}
/* 2. Validate this RSNIE with mine */
pApCliEntry = &pAd->ApCfg.ApCliTab[idx];
/* Peer AP doesn't include WPA/WPA2 capable */
if (Sanity == 0)
{
/* Check the authenticaton mode */
if (pApCliEntry->AuthMode >= Ndis802_11AuthModeWPA)
{
DBGPRINT(RT_DEBUG_ERROR, ("%s - The authentication mode doesn't match \n", __FUNCTION__));
return FALSE;
}
else
{
DBGPRINT(RT_DEBUG_TRACE, ("%s - The pre-RSNA authentication mode is used. \n", __FUNCTION__));
return TRUE;
}
}
else if (pApCliEntry->AuthMode < Ndis802_11AuthModeWPA)
{
/* Peer AP has RSN capability, but our AP-Client is pre-RSNA. Discard this */
DBGPRINT(RT_DEBUG_ERROR, ("%s - The authentication mode doesn't match. AP is WPA security but APCLI is not. \n", __FUNCTION__));
return FALSE;
}
/* Recovery user-defined cipher suite */
pApCliEntry->PairCipher = pApCliEntry->WepStatus;
pApCliEntry->GroupCipher = pApCliEntry->WepStatus;
pApCliEntry->bMixCipher = FALSE;
Sanity = 0;
/* Check AuthMode and WPA_AuthModeAux for matching, in case AP support dual-AuthMode */
/* WPAPSK */
if ((WPA_AuthMode == pApCliEntry->AuthMode) ||
((WPA_AuthModeAux != Ndis802_11AuthModeOpen) && (WPA_AuthModeAux == pApCliEntry->AuthMode)))
{
/* Check cipher suite, AP must have more secured cipher than station setting */
if (WPA.bMixMode == FALSE)
{
if (pApCliEntry->WepStatus != WPA.GroupCipher)
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA validate cipher suite error \n"));
return FALSE;
}
}
/* check group cipher */
if (pApCliEntry->WepStatus < WPA.GroupCipher)
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA validate group cipher error \n"));
return FALSE;
}
/*
check pairwise cipher, skip if none matched
If profile set to AES, let it pass without question.
If profile set to TKIP, we must find one mateched
*/
if ((pApCliEntry->WepStatus == Ndis802_11Encryption2Enabled) &&
(pApCliEntry->WepStatus != WPA.PairCipher) &&
(pApCliEntry->WepStatus != WPA.PairCipherAux))
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA validate pairwise cipher error \n"));
return FALSE;
}
Sanity |= 0x1;
}
/* WPA2PSK */
else if ((WPA2_AuthMode == pApCliEntry->AuthMode) ||
((WPA2_AuthModeAux != Ndis802_11AuthModeOpen) && (WPA2_AuthModeAux == pApCliEntry->AuthMode)))
{
/* Check cipher suite, AP must have more secured cipher than station setting */
if (WPA2.bMixMode == FALSE)
{
if (pApCliEntry->WepStatus != WPA2.GroupCipher)
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA2 validate cipher suite error \n"));
return FALSE;
}
}
/* check group cipher */
if (pApCliEntry->WepStatus < WPA2.GroupCipher)
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA2 validate group cipher error \n"));
return FALSE;
}
/*
check pairwise cipher, skip if none matched
If profile set to AES, let it pass without question.
If profile set to TKIP, we must find one mateched
*/
if ((pApCliEntry->WepStatus == Ndis802_11Encryption2Enabled) &&
(pApCliEntry->WepStatus != WPA2.PairCipher) &&
(pApCliEntry->WepStatus != WPA2.PairCipherAux))
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA2 validate pairwise cipher error \n"));
return FALSE;
}
Sanity |= 0x2;
}
if (Sanity == 0)
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - Validate RSIE Failure \n"));
return FALSE;
}
/*Re-assign pairwise-cipher and group-cipher. Re-build RSNIE. */
if ((pApCliEntry->AuthMode == Ndis802_11AuthModeWPA) || (pApCliEntry->AuthMode == Ndis802_11AuthModeWPAPSK))
{
pApCliEntry->GroupCipher = WPA.GroupCipher;
if (pApCliEntry->WepStatus == WPA.PairCipher)
pApCliEntry->PairCipher = WPA.PairCipher;
else if (WPA.PairCipherAux != Ndis802_11WEPDisabled)
pApCliEntry->PairCipher = WPA.PairCipherAux;
else /* There is no PairCipher Aux, downgrade our capability to TKIP */
pApCliEntry->PairCipher = Ndis802_11Encryption2Enabled;
}
else if ((pApCliEntry->AuthMode == Ndis802_11AuthModeWPA2) || (pApCliEntry->AuthMode == Ndis802_11AuthModeWPA2PSK))
{
pApCliEntry->GroupCipher = WPA2.GroupCipher;
if (pApCliEntry->WepStatus == WPA2.PairCipher)
pApCliEntry->PairCipher = WPA2.PairCipher;
else if (WPA2.PairCipherAux != Ndis802_11WEPDisabled)
pApCliEntry->PairCipher = WPA2.PairCipherAux;
else /* There is no PairCipher Aux, downgrade our capability to TKIP */
pApCliEntry->PairCipher = Ndis802_11Encryption2Enabled;
}
/* Set Mix cipher flag */
if (pApCliEntry->PairCipher != pApCliEntry->GroupCipher)
{
pApCliEntry->bMixCipher = TRUE;
/* re-build RSNIE */
/*RTMPMakeRSNIE(pAd, pApCliEntry->AuthMode, pApCliEntry->WepStatus, (idx + MIN_NET_DEVICE_FOR_APCLI)); */
}
/* re-build RSNIE */
RTMPMakeRSNIE(pAd, pApCliEntry->AuthMode, pApCliEntry->WepStatus, (idx + MIN_NET_DEVICE_FOR_APCLI));
return TRUE;
}
/*
===================================================
Description:
Check the validation of Authentication mode and Security type between
entries in the Apcli table and the inputs.
Arguments:
pApcliTabEntry:
WPA_AuthMode
WPA_AuthModeAux
WPA: WPA cipher suite
Return Value:
TRUE: valid
FALSE: invalid
Note:
===================================================
*/
BOOLEAN ApCliValidateAuthEncryp(
IN PAPCLI_STRUCT pApCliEntry,
IN NDIS_802_11_AUTHENTICATION_MODE WPA_AuthMode,
IN NDIS_802_11_AUTHENTICATION_MODE WPA_AuthModeAux,
IN CIPHER_SUITE WPA)
{
CIPHER_SUITE tempWPA;
tempWPA.PairCipher = pApCliEntry->PairCipher;
tempWPA.GroupCipher = pApCliEntry->GroupCipher;
tempWPA.bMixMode = pApCliEntry->bMixCipher;
// Recovery user-defined cipher suite
pApCliEntry->PairCipher = pApCliEntry->WepStatus;
pApCliEntry->GroupCipher = pApCliEntry->WepStatus;
pApCliEntry->bMixCipher = FALSE;
// Check AuthMode and WPA_AuthModeAux for matching, in case AP support dual-AuthMode
// WPAPSK
if (WPA_AuthMode == pApCliEntry->AuthMode || WPA_AuthModeAux == pApCliEntry->AuthMode)
{
// Check cipher suite, AP must have more secured cipher than station setting
if (WPA.bMixMode == FALSE)
{
if (pApCliEntry->WepStatus != WPA.GroupCipher)
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA validate cipher suite error \n"));
return FALSE;
}
}
// check group cipher
if (pApCliEntry->WepStatus < WPA.GroupCipher)
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA validate group cipher error \n"));
return FALSE;
}
// check pairwise cipher, skip if none matched
// If profile set to AES, let it pass without question.
// If profile set to TKIP, we must find one mateched
if ((pApCliEntry->WepStatus == Ndis802_11Encryption2Enabled) &&
(pApCliEntry->WepStatus != WPA.PairCipher) &&
(pApCliEntry->WepStatus != WPA.PairCipherAux))
{
DBGPRINT(RT_DEBUG_ERROR, ("ApCliValidateRSNIE - WPA validate pairwise cipher error \n"));
return FALSE;
}
}
/*
restore previous cipher suite
*/
pApCliEntry->PairCipher = tempWPA.PairCipher;
pApCliEntry->GroupCipher = tempWPA.GroupCipher;
pApCliEntry->bMixCipher = tempWPA.bMixMode;
return TRUE;
}
BOOLEAN ApCliHandleRxBroadcastFrame(
IN PRTMP_ADAPTER pAd,
IN RX_BLK *pRxBlk,
IN MAC_TABLE_ENTRY *pEntry,
IN UCHAR FromWhichBSSID)
{
PRT28XX_RXD_STRUC pRxD = &(pRxBlk->RxD);
PHEADER_802_11 pHeader = pRxBlk->pHeader;
PRXWI_STRUC pRxWI = pRxBlk->pRxWI;
PAPCLI_STRUCT pApCliEntry = NULL;
#ifdef MAC_REPEATER_SUPPORT
REPEATER_CLIENT_ENTRY *pReptEntry = NULL;
#endif /* MAC_REPEATER_SUPPORT */
/*
It is possible to receive the multicast packet when in AP Client mode
ex: broadcast from remote AP to AP-client,
addr1=ffffff, addr2=remote AP's bssid, addr3=sta4_mac_addr
*/
pApCliEntry = &pAd->ApCfg.ApCliTab[pEntry->MatchAPCLITabIdx];
/* Filter out Bcast frame which AP relayed for us */
/* Multicast packet send from AP1 , received by AP2 and send back to AP1, drop this frame */
if (MAC_ADDR_EQUAL(pHeader->Addr3, pApCliEntry->CurrentAddress))
return FALSE; /* give up this frame */
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn)
{
pReptEntry = RTMPLookupRepeaterCliEntry(pAd, FALSE, pHeader->Addr3);
if (pReptEntry)
return FALSE; /* give up this frame */
}
#endif /* MAC_REPEATER_SUPPORT */
if (pEntry->PrivacyFilter != Ndis802_11PrivFilterAcceptAll)
return FALSE; /* give up this frame */
/* skip the 802.11 header */
pRxBlk->pData += LENGTH_802_11;
pRxBlk->DataSize -= LENGTH_802_11;
#ifndef MAC_APCLI_SUPPORT
/* Use software to decrypt the encrypted frame. */
/* Because this received frame isn't my BSS frame, Asic passed to driver without decrypting it. */
/* If receiving an "encrypted" unicast packet(its WEP bit as 1) and doesn't match my BSSID, it */
/* pass to driver with "Decrypted" marked as 0 in RxD. */
if ((pRxD->MyBss == 0) && (pRxD->Decrypted == 0) && (pHeader->FC.Wep == 1))
{
if (RTMPSoftDecryptionAction(pAd,
(PUCHAR)pHeader, 0,
&pApCliEntry->SharedKey[pRxWI->KeyIndex],
pRxBlk->pData,
&(pRxBlk->DataSize)) == NDIS_STATUS_FAILURE)
{
#ifdef APCLI_CERT_SUPPORT
ApCliRTMPReportMicError( pAd,&pApCliEntry->SharedKey[pRxWI->KeyIndex], pEntry->MatchAPCLITabIdx);
#endif /* APCLI_CERT_SUPPORT */
return FALSE; /* give up this frame */
}
}
#endif /* MAC_APCLI_SUPPORT */
pRxD->MyBss = 1;
Indicate_Legacy_Packet(pAd, pRxBlk, FromWhichBSSID);
return TRUE;
}
VOID APCliInstallPairwiseKey(
IN PRTMP_ADAPTER pAd,
IN MAC_TABLE_ENTRY *pEntry)
{
UCHAR IfIdx;
UINT8 BssIdx;
IfIdx = pEntry->MatchAPCLITabIdx;
BssIdx = pAd->ApCfg.BssidNum + MAX_MESH_NUM + IfIdx;
#ifdef MAC_APCLI_SUPPORT
BssIdx = APCLI_BSSID_IDX + IfIdx;
#endif /* MAC_APCLI_SUPPORT */
#ifdef APCLI_CERT_SUPPORT
NdisMoveMemory(pAd->ApCfg.ApCliTab[IfIdx].PTK, pEntry->PTK, LEN_PTK);
#endif /* APCLI_CERT_SUPPORT */
WPAInstallPairwiseKey(pAd,
BssIdx,
pEntry,
FALSE);
}
BOOLEAN APCliInstallSharedKey(
IN PRTMP_ADAPTER pAd,
IN PUCHAR pKey,
IN UCHAR KeyLen,
IN UCHAR DefaultKeyIdx,
IN MAC_TABLE_ENTRY *pEntry)
{
UCHAR IfIdx;
UCHAR GTK_len = 0;
if (!pEntry || !IS_ENTRY_APCLI(pEntry))
{
DBGPRINT(RT_DEBUG_ERROR, ("%s : This Entry doesn't exist!!! \n", __FUNCTION__));
return FALSE;
}
IfIdx = pEntry->MatchAPCLITabIdx;
if (pAd->ApCfg.ApCliTab[IfIdx].GroupCipher == Ndis802_11Encryption2Enabled && KeyLen >= LEN_TKIP_GTK)
{
GTK_len = LEN_TKIP_GTK;
}
else if (pAd->ApCfg.ApCliTab[IfIdx].GroupCipher == Ndis802_11Encryption3Enabled &&
KeyLen >= LEN_AES_GTK)
{
GTK_len = LEN_AES_GTK;
}
else
{
DBGPRINT(RT_DEBUG_ERROR, ("%s : GTK is invalid (GroupCipher=%d, DataLen=%d) !!! \n",
__FUNCTION__, pAd->ApCfg.ApCliTab[IfIdx].GroupCipher, KeyLen));
return FALSE;
}
/* Update GTK */
/* set key material, TxMic and RxMic for WPAPSK */
NdisMoveMemory(pAd->ApCfg.ApCliTab[IfIdx].GTK, pKey, GTK_len);
pAd->ApCfg.ApCliTab[IfIdx].DefaultKeyId = DefaultKeyIdx;
/* Update shared key table */
NdisZeroMemory(&pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx], sizeof(CIPHER_KEY));
pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx].KeyLen = GTK_len;
NdisMoveMemory(pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx].Key, pKey, LEN_TK);
if (GTK_len == LEN_TKIP_GTK)
{
NdisMoveMemory(pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx].RxMic, pKey + 16, LEN_TKIP_MIC);
NdisMoveMemory(pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx].TxMic, pKey + 24, LEN_TKIP_MIC);
}
/* Update Shared Key CipherAlg */
pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx].CipherAlg = CIPHER_NONE;
if (pAd->ApCfg.ApCliTab[IfIdx].GroupCipher == Ndis802_11Encryption2Enabled)
pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx].CipherAlg = CIPHER_TKIP;
else if (pAd->ApCfg.ApCliTab[IfIdx].GroupCipher == Ndis802_11Encryption3Enabled)
pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx].CipherAlg = CIPHER_AES;
#ifdef MAC_APCLI_SUPPORT
RTMP_ASIC_SHARED_KEY_TABLE(pAd,
APCLI_BSS_BASE + IfIdx,
DefaultKeyIdx,
&pAd->ApCfg.ApCliTab[IfIdx].SharedKey[DefaultKeyIdx]);
#endif /* MAC_APCLI_SUPPORT */
return TRUE;
}
/*
========================================================================
Routine Description:
Verify the support rate for different PHY type
Arguments:
pAd Pointer to our adapter
Return Value:
None
IRQL = PASSIVE_LEVEL
========================================================================
*/
VOID ApCliUpdateMlmeRate(
IN PRTMP_ADAPTER pAd,
IN USHORT ifIndex)
{
UCHAR MinimumRate;
UCHAR ProperMlmeRate; /*= RATE_54; */
UCHAR i, j, RateIdx = 12; /* 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */
BOOLEAN bMatch = FALSE;
PAPCLI_STRUCT pApCliEntry = NULL;
if (ifIndex >= MAX_APCLI_NUM)
return;
pApCliEntry = &pAd->ApCfg.ApCliTab[ifIndex];
switch (pAd->CommonCfg.PhyMode)
{
case PHY_11B:
ProperMlmeRate = RATE_11;
MinimumRate = RATE_1;
break;
case PHY_11BG_MIXED:
#ifdef DOT11_N_SUPPORT
case PHY_11ABGN_MIXED:
case PHY_11BGN_MIXED:
#endif /* DOT11_N_SUPPORT */
if ((pApCliEntry->ApCliMlmeAux.SupRateLen == 4) &&
(pApCliEntry->ApCliMlmeAux.ExtRateLen == 0))
/* B only AP */
ProperMlmeRate = RATE_11;
else
ProperMlmeRate = RATE_24;
if (pApCliEntry->ApCliMlmeAux.Channel <= 14)
MinimumRate = RATE_1;
else
MinimumRate = RATE_6;
break;
case PHY_11A:
#ifdef DOT11_N_SUPPORT
case PHY_11N_2_4G: /* rt2860 need to check mlmerate for 802.11n */
case PHY_11GN_MIXED:
case PHY_11AGN_MIXED:
case PHY_11AN_MIXED:
case PHY_11N_5G:
#endif /* DOT11_N_SUPPORT */
ProperMlmeRate = RATE_24;
MinimumRate = RATE_6;
break;
case PHY_11ABG_MIXED:
ProperMlmeRate = RATE_24;
if (pApCliEntry->ApCliMlmeAux.Channel <= 14)
MinimumRate = RATE_1;
else
MinimumRate = RATE_6;
break;
default: /* error */
ProperMlmeRate = RATE_1;
MinimumRate = RATE_1;
break;
}
for (i = 0; i < pApCliEntry->ApCliMlmeAux.SupRateLen; i++)
{
for (j = 0; j < RateIdx; j++)
{
if ((pApCliEntry->ApCliMlmeAux.SupRate[i] & 0x7f) == RateIdTo500Kbps[j])
{
if (j == ProperMlmeRate)
{
bMatch = TRUE;
break;
}
}
}
if (bMatch)
break;
}
if (bMatch == FALSE)
{
for (i = 0; i < pApCliEntry->ApCliMlmeAux.ExtRateLen; i++)
{
for (j = 0; j < RateIdx; j++)
{
if ((pApCliEntry->ApCliMlmeAux.ExtRate[i] & 0x7f) == RateIdTo500Kbps[j])
{
if (j == ProperMlmeRate)
{
bMatch = TRUE;
break;
}
}
}
if (bMatch)
break;
}
}
if (bMatch == FALSE)
{
ProperMlmeRate = MinimumRate;
}
if(!OPSTATUS_TEST_FLAG(pAd, fOP_AP_STATUS_MEDIA_STATE_CONNECTED))
{
pAd->CommonCfg.MlmeRate = MinimumRate;
pAd->CommonCfg.RtsRate = ProperMlmeRate;
if (pAd->CommonCfg.MlmeRate >= RATE_6)
{
pAd->CommonCfg.MlmeTransmit.field.MODE = MODE_OFDM;
pAd->CommonCfg.MlmeTransmit.field.MCS = OfdmRateToRxwiMCS[pAd->CommonCfg.MlmeRate];
pAd->MacTab.Content[BSS0Mcast_WCID].HTPhyMode.field.MODE = MODE_OFDM;
pAd->MacTab.Content[BSS0Mcast_WCID].HTPhyMode.field.MCS = OfdmRateToRxwiMCS[pAd->CommonCfg.MlmeRate];
}
else
{
pAd->CommonCfg.MlmeTransmit.field.MODE = MODE_CCK;
pAd->CommonCfg.MlmeTransmit.field.MCS = pAd->CommonCfg.MlmeRate;
pAd->MacTab.Content[BSS0Mcast_WCID].HTPhyMode.field.MODE = MODE_CCK;
pAd->MacTab.Content[BSS0Mcast_WCID].HTPhyMode.field.MCS = pAd->CommonCfg.MlmeRate;
}
}
DBGPRINT(RT_DEBUG_TRACE, ("RTMPUpdateMlmeRate ==> MlmeTransmit = 0x%x \n" , pAd->CommonCfg.MlmeTransmit.word));
}
VOID APCli_Init(
IN PRTMP_ADAPTER pAd,
IN RTMP_OS_NETDEV_OP_HOOK *pNetDevOps)
{
#define APCLI_MAX_DEV_NUM 32
PNET_DEV new_dev_p;
/* VIRTUAL_ADAPTER *apcli_pAd; */
INT apcli_index;
/* RTMP_OS_NETDEV_OP_HOOK netDevOpHook; */
APCLI_STRUCT *pApCliEntry;
/* sanity check to avoid redundant virtual interfaces are created */
if (pAd->flg_apcli_init != FALSE)
return;
/* init */
for(apcli_index = 0; apcli_index < MAX_APCLI_NUM; apcli_index++)
pAd->ApCfg.ApCliTab[apcli_index].dev = NULL;
/* create virtual network interface */
for(apcli_index = 0; apcli_index < MAX_APCLI_NUM; apcli_index++)
{
UINT32 MC_RowID = 0, IoctlIF = 0;
#ifdef MULTIPLE_CARD_SUPPORT
MC_RowID = pAd->MC_RowID;
#endif /* MULTIPLE_CARD_SUPPORT */
#ifdef HOSTAPD_SUPPORT
IoctlIF = pAd->IoctlIF;
#endif /* HOSTAPD_SUPPORT */
new_dev_p = RtmpOSNetDevCreate(MC_RowID, &IoctlIF, INT_APCLI, apcli_index, sizeof(PRTMP_ADAPTER), INF_APCLI_DEV_NAME);
#ifdef HOSTAPD_SUPPORT
pAd->IoctlIF = IoctlIF;
#endif /* HOSTAPD_SUPPORT */
RTMP_OS_NETDEV_SET_PRIV(new_dev_p, pAd);
pApCliEntry = &pAd->ApCfg.ApCliTab[apcli_index];
NdisZeroMemory(&pApCliEntry->ApCliCounter, sizeof(APCLI_COUNTER));
/* init MAC address of virtual network interface */
COPY_MAC_ADDR(pApCliEntry->CurrentAddress, pAd->CurrentAddress);
if (pAd->chipCap.MBSSIDMode >= MBSSID_MODE1)
{
if ((pAd->ApCfg.BssidNum > 0) || (MAX_MESH_NUM > 0))
{
UCHAR MacMask = 0;
if ((pAd->ApCfg.BssidNum + MAX_APCLI_NUM + MAX_MESH_NUM) <= 2)
MacMask = 0xFE;
else if ((pAd->ApCfg.BssidNum + MAX_APCLI_NUM + MAX_MESH_NUM) <= 4)
MacMask = 0xFC;
else if ((pAd->ApCfg.BssidNum + MAX_APCLI_NUM + MAX_MESH_NUM) <= 8)
MacMask = 0xF8;
#ifdef SPECIFIC_BCN_BUF_SUPPORT
else if ((pAd->ApCfg.BssidNum + MAX_APCLI_NUM + MAX_MESH_NUM) <= 16)
MacMask = 0xF0;
#endif /* SPECIFIC_BCN_BUF_SUPPORT */
if (pAd->chipCap.MBSSIDMode == MBSSID_MODE1)
{
/*
Refer to HW definition -
Bit1 of MAC address Byte0 is local administration bit
and should be set to 1 in extended multiple BSSIDs'
Bit3~ of MAC address Byte0 is extended multiple BSSID index.
*/
#ifdef ENHANCE_NEW_MBSSID_MODE
pApCliEntry->CurrentAddress[0] &= (MacMask << 2);
#endif /* ENHANCE_NEW_MBSSID_MODE */
pApCliEntry->CurrentAddress[0] |= 0x2;
pApCliEntry->CurrentAddress[0] += (((pAd->ApCfg.BssidNum + MAX_MESH_NUM) - 1) << 2);
}
#ifdef ENHANCE_NEW_MBSSID_MODE
else
{
pApCliEntry->CurrentAddress[0] |= 0x2;
pApCliEntry->CurrentAddress[pAd->chipCap.MBSSIDMode - 1] &= (MacMask);
pApCliEntry->CurrentAddress[pAd->chipCap.MBSSIDMode - 1] += ((pAd->ApCfg.BssidNum + MAX_MESH_NUM) - 1);
}
#endif /* ENHANCE_NEW_MBSSID_MODE */
}
}
else
{
pApCliEntry->CurrentAddress[ETH_LENGTH_OF_ADDRESS - 1] =
(pApCliEntry->CurrentAddress[ETH_LENGTH_OF_ADDRESS - 1] + pAd->ApCfg.BssidNum + MAX_MESH_NUM) & 0xFF;
}
pNetDevOps->priv_flags = INT_APCLI; /* we are virtual interface */
pNetDevOps->needProtcted = TRUE;
NdisMoveMemory(pNetDevOps->devAddr, &pApCliEntry->CurrentAddress[0], MAC_ADDR_LEN);
/* backup our virtual network interface */
pApCliEntry->dev = new_dev_p;
/* register this device to OS */
RtmpOSNetDevAttach(pAd->OpMode, new_dev_p, pNetDevOps);
} /* End of for */
pAd->flg_apcli_init = TRUE;
}
VOID ApCli_Remove(
IN PRTMP_ADAPTER pAd)
{
UINT index;
for(index = 0; index < MAX_APCLI_NUM; index++)
{
if (pAd->ApCfg.ApCliTab[index].dev)
{
RtmpOSNetDevDetach(pAd->ApCfg.ApCliTab[index].dev);
RtmpOSNetDevFree(pAd->ApCfg.ApCliTab[index].dev);
/* Clear it as NULL to prevent latter access error. */
pAd->flg_apcli_init = FALSE;
pAd->ApCfg.ApCliTab[index].dev = NULL;
}
}
}
BOOLEAN ApCli_Open(
IN PRTMP_ADAPTER pAd,
IN PNET_DEV dev_p)
{
UCHAR ifIndex;
for (ifIndex = 0; ifIndex < MAX_APCLI_NUM; ifIndex++)
{
if (pAd->ApCfg.ApCliTab[ifIndex].dev == dev_p)
{
RTMP_OS_NETDEV_START_QUEUE(dev_p);
ApCliIfUp(pAd);
#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
RtmpOSWrielessEventSend(pAd->net_dev, RT_WLAN_EVENT_CUSTOM, RT_INTERFACE_UP, NULL, NULL, 0);
#endif /* APCLI_WPA_SUPPLICANT_SUPPORT */
return TRUE;
}
}
return FALSE;
} /* End of ApCli_Open */
BOOLEAN ApCli_Close(
IN PRTMP_ADAPTER pAd,
IN PNET_DEV dev_p)
{
UCHAR ifIndex;
#ifdef MAC_REPEATER_SUPPORT
UCHAR CliIdx;
#endif /* MAC_REPEATER_SUPPORT */
for (ifIndex = 0; ifIndex < MAX_APCLI_NUM; ifIndex++)
{
if (pAd->ApCfg.ApCliTab[ifIndex].dev == dev_p)
{
#ifdef APCLI_WPA_SUPPLICANT_SUPPORT
RtmpOSWrielessEventSend(pAd->net_dev, RT_WLAN_EVENT_CUSTOM, RT_INTERFACE_DOWN, NULL, NULL, 0);
if (pAd->ApCfg.ApCliTab[ifIndex].pWpaAssocIe)
{
os_free_mem(NULL, pAd->ApCfg.ApCliTab[ifIndex].pWpaAssocIe);
pAd->ApCfg.ApCliTab[ifIndex].pWpaAssocIe = NULL;
pAd->ApCfg.ApCliTab[ifIndex].WpaAssocIeLen = 0;
}
#endif /* APCLI_WPA_SUPPLICANT_SUPPORT */
RTMP_OS_NETDEV_STOP_QUEUE(dev_p);
/* send disconnect-req to sta State Machine. */
if (pAd->ApCfg.ApCliTab[ifIndex].Enable)
{
#ifdef MAC_REPEATER_SUPPORT
if (pAd->ApCfg.bMACRepeaterEn)
{
for(CliIdx = 0; CliIdx < MAX_EXT_MAC_ADDR_SIZE; CliIdx++)
{
if (pAd->ApCfg.ApCliTab[ifIndex].RepeaterCli[CliIdx].CliEnable)
{
RTMPRemoveRepeaterDisconnectEntry(pAd, ifIndex, CliIdx);
RTMPRemoveRepeaterEntry(pAd, ifIndex, CliIdx);
}
}
}
#endif /* MAC_REPEATER_SUPPORT */
MlmeEnqueue(pAd, APCLI_CTRL_STATE_MACHINE, APCLI_CTRL_DISCONNECT_REQ, 0, NULL, ifIndex);
RTMP_MLME_HANDLER(pAd);
DBGPRINT(RT_DEBUG_TRACE, ("(%s) ApCli interface[%d] startdown.\n", __FUNCTION__, ifIndex));
}
return TRUE;
}
}
return FALSE;
} /* End of ApCli_Close */
int APC_PacketSend(
IN PNDIS_PACKET skb_p,
IN PNET_DEV dev_p,
IN RTMP_NET_PACKET_TRANSMIT Func)
{
RTMP_ADAPTER *pAd;
PAPCLI_STRUCT pApCli;
INT apcliIndex;
pAd = RTMP_OS_NETDEV_GET_PRIV(dev_p);
ASSERT(pAd);
#ifdef RALINK_ATE
if (ATE_ON(pAd))
{
RELEASE_NDIS_PACKET(pAd, skb_p, NDIS_STATUS_FAILURE);
return 0;
}
#endif /* RALINK_ATE */
if ((RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS)) ||
(RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF)) ||
(RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS)))
{
/* wlan is scanning/disabled/reset */
RELEASE_NDIS_PACKET(pAd, skb_p, NDIS_STATUS_FAILURE);
return 0;
}
pApCli = (PAPCLI_STRUCT)&pAd->ApCfg.ApCliTab;
for(apcliIndex = 0; apcliIndex < MAX_APCLI_NUM; apcliIndex++)
{
if (pApCli[apcliIndex].Valid != TRUE)
continue;
/* find the device in our ApCli list */
if (pApCli[apcliIndex].dev == dev_p)
{
/* ya! find it */
pAd->RalinkCounters.PendingNdisPacketCount ++;
RTMP_SET_PACKET_SOURCE(skb_p, PKTSRC_NDIS);
RTMP_SET_PACKET_MOREDATA(skb_p, FALSE);
RTMP_SET_PACKET_NET_DEVICE_APCLI(skb_p, apcliIndex);
SET_OS_PKT_NETDEV(skb_p, pAd->net_dev);
/* transmit the packet */
return Func(skb_p);
}
}
RELEASE_NDIS_PACKET(pAd, skb_p, NDIS_STATUS_FAILURE);
return 0;
}
BOOLEAN ApCli_StatsGet(
IN PRTMP_ADAPTER pAd,
IN RT_CMD_STATS *pStats)
{
INT ifIndex = 0, index;
/*struct net_device_stats stats; */
for(index = 0; index < MAX_APCLI_NUM; index++)
{
if (pAd->ApCfg.ApCliTab[index].dev == (PNET_DEV)(pStats->pNetDev))
{
ifIndex = index;
break;
}
}
if(index >= MAX_APCLI_NUM)
{
DBGPRINT(RT_DEBUG_ERROR, ("rt28xx_ioctl apcli_statsGet can not find apcli I/F\n"));
return FALSE;
}
pStats->pStats = pAd->stats;
pStats->rx_packets = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.ReceivedFragmentCount.QuadPart;
pStats->tx_packets = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.TransmittedFragmentCount.QuadPart;
pStats->rx_bytes = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.ReceivedByteCount;
pStats->tx_bytes = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.TransmittedByteCount;
pStats->rx_errors = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.RxErrors;
pStats->tx_errors = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.TxErrors;
pStats->multicast = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.MulticastReceivedFrameCount.QuadPart; /* multicast packets received */
pStats->collisions = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.OneCollision + pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.MoreCollisions; /* Collision packets */
pStats->rx_over_errors = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.RxNoBuffer; /* receiver ring buff overflow */
pStats->rx_crc_errors = 0;/*pAd->WlanCounters.FCSErrorCount; // recved pkt with crc error */
pStats->rx_frame_errors = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.RcvAlignmentErrors; /* recv'd frame alignment error */
pStats->rx_fifo_errors = pAd->ApCfg.ApCliTab[ifIndex].ApCliCounter.RxNoBuffer; /* recv'r fifo overrun */
return TRUE;
}
#ifdef APCLI_AUTO_CONNECT_SUPPORT
/*
===================================================
Description:
Find the AP that is configured in the ApcliTab, and switch to
the channel of that AP
Arguments:
pAd: pointer to our adapter
Return Value:
TRUE: no error occured
FALSE: otherwise
Note:
===================================================
*/
BOOLEAN ApCliAutoConnectExec(
IN PRTMP_ADAPTER pAd)
{
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
UCHAR ifIdx, CfgSsidLen, entryIdx;
STRING *pCfgSsid;
BSS_TABLE *pScanTab, *pSsidBssTab;
DBGPRINT(RT_DEBUG_TRACE, ("---> ApCliAutoConnectExec()\n"));
ifIdx = pObj->ioctl_if;
CfgSsidLen = pAd->ApCfg.ApCliTab[ifIdx].CfgSsidLen;
pCfgSsid = pAd->ApCfg.ApCliTab[ifIdx].CfgSsid;
pScanTab = &pAd->ScanTab;
pSsidBssTab = &pAd->MlmeAux.SsidBssTab;
pSsidBssTab->BssNr = 0;
/*
Find out APs with the desired SSID.
*/
for (entryIdx=0; entryIdx<pScanTab->BssNr;entryIdx++)
{
PBSS_ENTRY pBssEntry = &pScanTab->BssEntry[entryIdx];
if ( pBssEntry->Channel == 0)
break;
if (NdisEqualMemory(pCfgSsid, pBssEntry->Ssid, CfgSsidLen) &&
(pBssEntry->SsidLen) &&
(pSsidBssTab->BssNr < MAX_LEN_OF_BSS_TABLE))
{
if (ApcliCompareAuthEncryp(&pAd->ApCfg.ApCliTab[ifIdx],
pBssEntry->AuthMode,
pBssEntry->AuthModeAux,
pBssEntry->WepStatus,
pBssEntry->WPA) ||
ApcliCompareAuthEncryp(&pAd->ApCfg.ApCliTab[ifIdx],
pBssEntry->AuthMode,
pBssEntry->AuthModeAux,
pBssEntry->WepStatus,
pBssEntry->WPA2))
{
DBGPRINT(RT_DEBUG_TRACE,
("Found desired ssid in Entry %2d:\n", entryIdx));
DBGPRINT(RT_DEBUG_TRACE,
("I/F(apcli%d) ApCliAutoConnectExec:(Len=%d,Ssid=%s, Channel=%d, Rssi=%d)\n",
ifIdx, pBssEntry->SsidLen, pBssEntry->Ssid,
pBssEntry->Channel, pBssEntry->Rssi));
DBGPRINT(RT_DEBUG_TRACE,
("I/F(apcli%d) ApCliAutoConnectExec::(AuthMode=%s, EncrypType=%s)\n", ifIdx,
GetAuthMode(pBssEntry->AuthMode),
GetEncryptType(pBssEntry->WepStatus)) );
NdisMoveMemory(&pSsidBssTab->BssEntry[pSsidBssTab->BssNr++],
pBssEntry, sizeof(BSS_ENTRY));
}
}
}
NdisZeroMemory(&pSsidBssTab->BssEntry[pSsidBssTab->BssNr], sizeof(BSS_ENTRY));
/*
Sort by Rssi in the increasing order, and connect to
the last entry (strongest Rssi)
*/
BssTableSortByRssi(pSsidBssTab, TRUE);
if ((pSsidBssTab->BssNr == 0))
{
DBGPRINT(RT_DEBUG_TRACE, ("No match entry.\n"));
pAd->ApCfg.ApCliAutoConnectRunning = FALSE;
}
else if (pSsidBssTab->BssNr > 0 &&
pSsidBssTab->BssNr <=MAX_LEN_OF_BSS_TABLE)
{
/*
Switch to the channel of the candidate AP
*/
UCHAR tempBuf[20];
if (pAd->CommonCfg.Channel != pSsidBssTab->BssEntry[pSsidBssTab->BssNr -1].Channel)
{
sprintf(tempBuf, "%d", pSsidBssTab->BssEntry[pSsidBssTab->BssNr -1].Channel);
DBGPRINT(RT_DEBUG_TRACE, ("Switch to channel :%s\n", tempBuf));
Set_Channel_Proc(pAd, tempBuf);
}
sprintf(tempBuf, "%02X:%02X:%02X:%02X:%02X:%02X",
pSsidBssTab->BssEntry[pSsidBssTab->BssNr -1].Bssid[0],
pSsidBssTab->BssEntry[pSsidBssTab->BssNr -1].Bssid[1],
pSsidBssTab->BssEntry[pSsidBssTab->BssNr -1].Bssid[2],
pSsidBssTab->BssEntry[pSsidBssTab->BssNr -1].Bssid[3],
pSsidBssTab->BssEntry[pSsidBssTab->BssNr -1].Bssid[4],
pSsidBssTab->BssEntry[pSsidBssTab->BssNr -1].Bssid[5]);
Set_ApCli_Bssid_Proc(pAd, tempBuf);
}
else
{
DBGPRINT(RT_DEBUG_ERROR, ("Error! Out of table range: (BssNr=%d).\n", pSsidBssTab->BssNr) );
Set_ApCli_Enable_Proc(pAd, "1");
pAd->ApCfg.ApCliAutoConnectRunning = FALSE;
DBGPRINT(RT_DEBUG_TRACE, ("<--- ApCliAutoConnectExec()\n"));
return FALSE;
}
Set_ApCli_Enable_Proc(pAd, "1");
DBGPRINT(RT_DEBUG_TRACE, ("<--- ApCliAutoConnectExec()\n"));
return TRUE;
}
/*
===================================================
Description:
If the previous selected entry connected failed, this function will
choose next entry to connect. The previous entry will be deleted.
Arguments:
pAd: pointer to our adapter
Note:
Note that the table is sorted by Rssi in the "increasing" order, thus
the last entry in table has stringest Rssi.
===================================================
*/
VOID ApCliSwitchCandidateAP(
IN PRTMP_ADAPTER pAd)
{
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
BSS_TABLE *pSsidBssTab;
PAPCLI_STRUCT pApCliEntry;
UCHAR lastEntryIdx, ifIdx = pObj->ioctl_if;
DBGPRINT(RT_DEBUG_TRACE, ("---> ApCliSwitchCandidateAP()\n"));
pSsidBssTab = &pAd->MlmeAux.SsidBssTab;
pApCliEntry = &pAd->ApCfg.ApCliTab[ifIdx];
/*
delete (zero) the previous connected-failled entry and always
connect to the last entry in talbe until the talbe is empty.
*/
NdisZeroMemory(&pSsidBssTab->BssEntry[--pSsidBssTab->BssNr], sizeof(BSS_ENTRY));
lastEntryIdx = pSsidBssTab->BssNr -1;
if ((pSsidBssTab->BssNr > 0) && (pSsidBssTab->BssNr < MAX_LEN_OF_BSS_TABLE))
{
UCHAR tempBuf[20];
sprintf(tempBuf, "%02X:%02X:%02X:%02X:%02X:%02X",
pSsidBssTab->BssEntry[lastEntryIdx].Bssid[0],
pSsidBssTab->BssEntry[lastEntryIdx].Bssid[1],
pSsidBssTab->BssEntry[lastEntryIdx].Bssid[2],
pSsidBssTab->BssEntry[lastEntryIdx].Bssid[3],
pSsidBssTab->BssEntry[lastEntryIdx].Bssid[4],
pSsidBssTab->BssEntry[lastEntryIdx].Bssid[5]);
Set_ApCli_Bssid_Proc(pAd, tempBuf);
if (pAd->CommonCfg.Channel != pSsidBssTab->BssEntry[lastEntryIdx].Channel)
{
Set_ApCli_Enable_Proc(pAd, "0");
sprintf(tempBuf, "%d", pSsidBssTab->BssEntry[lastEntryIdx].Channel);
DBGPRINT(RT_DEBUG_TRACE, ("Switch to channel :%s\n", tempBuf));
Set_Channel_Proc(pAd, tempBuf);
}
}
else
{
DBGPRINT(RT_DEBUG_TRACE, ("No candidate AP, the process is about to stop.\n"));
pAd->ApCfg.ApCliAutoConnectRunning = FALSE;
}
Set_ApCli_Enable_Proc(pAd, "1");
DBGPRINT(RT_DEBUG_TRACE, ("---> ApCliSwitchCandidateAP()\n"));
}
BOOLEAN ApcliCompareAuthEncryp(
IN PAPCLI_STRUCT pApCliEntry,
IN NDIS_802_11_AUTHENTICATION_MODE AuthMode,
IN NDIS_802_11_AUTHENTICATION_MODE AuthModeAux,
IN NDIS_802_11_WEP_STATUS WEPstatus,
IN CIPHER_SUITE WPA)
{
NDIS_802_11_AUTHENTICATION_MODE tempAuthMode = pApCliEntry->AuthMode;
NDIS_802_11_WEP_STATUS tempWEPstatus = pApCliEntry->WepStatus;
DBGPRINT(RT_DEBUG_TRACE, ("ApcliAuthMode=%s, AuthMode=%s, AuthModeAux=%s, ApcliWepStatus=%s, WepStatus=%s, GroupCipher=%s, PairCipher=%s, \n",
GetAuthMode(pApCliEntry->AuthMode),
GetAuthMode(AuthMode),
GetAuthMode(AuthModeAux),
GetEncryptType(pApCliEntry->WepStatus),
GetEncryptType(WEPstatus),
GetEncryptType(WPA.GroupCipher),
GetEncryptType(WPA.PairCipher)));
if (tempAuthMode <= Ndis802_11AuthModeAutoSwitch)
{
tempAuthMode = Ndis802_11AuthModeOpen;
return ((tempAuthMode == AuthMode ||
tempAuthMode == AuthModeAux) &&
(tempWEPstatus == WEPstatus) );
}
else if (tempAuthMode <= Ndis802_11AuthModeWPA2PSK)
{
return ((tempAuthMode == AuthMode ||
tempAuthMode == AuthModeAux) &&
(tempWEPstatus == WPA.GroupCipher||
tempWEPstatus == WPA.PairCipher) );
}
else
{
/* not supported cases */
return FALSE;
}
}
#endif /* APCLI_AUTO_CONNECT_SUPPORT */
#endif /* APCLI_SUPPORT */
|
tianfy/openwrt-adkill
|
package/rt2860v2/files/rt2860v2/ap/ap_apcli.c
|
C
|
gpl-2.0
| 92,946
|
<?php
declare (strict_types = 1);
namespace Drupal\Tests\business\Kernel;
use Drupal\business\Tests\BusinessTestHelper;
use Drupal\invoices\Tests\BaseTestHelper;
use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
/**
* CRUD tests for the Business module.
*
* @group business
*/
class BusinessCrudTest extends EntityKernelTestBase {
use BaseTestHelper;
use BusinessTestHelper;
/**
* {@inheritdoc}
*/
public static $modules = [
'address',
'business',
'entity_reference_validators',
'libphonenumber',
'views',
];
/**
* The database connection.
*
* @var \Drupal\Core\Database\Connection
*/
protected $connection;
/**
* The entity type manager.
*
* @var \Drupal\core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->connection = $this->container->get('database');
$this->entityTypeManager = $this->container->get('entity_type.manager');
$this->installEntitySchema('business');
$this->installConfig(['business']);
}
/**
* Tests creating, reading, updating and deleting of businesses.
*/
public function testBusinessCrud() {
// Check that the database table exists and is empty.
$this->assertTrue($this->connection->schema()->tableExists('business'), 'The business database table exists.');
$this->assertBusinessTableEmpty('The business database is initially empty.');
// @todo Throw a failure when there are more fields available on the entity
// than are currently being tested - expand test coverage.
// Check if a new business can be saved to the database.
$values = $this->randomBusinessValues();
$business = $this->createBusiness($values);
$business->save();
$this->assertBusinessTableNotEmpty('The business database table is no longer empty after creating a business.');
// Check that the business data can be read from the database.
$reloaded_business = $this->reloadEntity($business);
$this->assertBusinessProperties($reloaded_business, $values, 'The business that was saved to the database can be read correctly.');
// Update the business and check that the new values were written to the
// database.
$new_values = $this->randomBusinessValues();
$this->updateEntity($business, $new_values);
$business->save();
$this->assertBusinessProperties($business, $new_values, 'The business has been updated correctly.');
$reloaded_business = $this->reloadEntity($business);
$this->assertBusinessProperties($reloaded_business, $new_values, 'The business has been updated correctly in the database.');
// Delete the business. The database should be empty again.
$business->delete();
$this->assertBusinessTableEmpty('The business can be deleted from the database.');
}
}
|
pfrenssen/invoices
|
web/modules/custom/business/tests/src/Kernel/BusinessCrudTest.php
|
PHP
|
gpl-2.0
| 2,893
|
#include "SparseDataLoader.h"
void SparseDataLoader::readSparseData(std::string filename){
std::ifstream file (filename);
std::string temp;
std::getline(file, temp);
while (std::getline(file, temp))
{
std::istringstream buffer(temp);
std::vector<int> tmpLine((std::istream_iterator<int>(buffer)), std::istream_iterator<int>());
std::vector<std::pair<int,float>> tmpVector;
for(std::vector<int>::iterator it = tmpLine.begin(); it != tmpLine.end();++it)
{
int index = *it;
if(index > maxIndex)
maxIndex = index;
++it;
tmpVector.push_back(std::make_pair(index,(float) *it));
}
this->rowVector.push_back(tmpVector);
}
file.close();
}
void SparseDataLoader::displayRow(){
for(SparseDataVector::iterator it = rowVector.begin(); it != rowVector.end(); ++it)
{
for(std::vector<std::pair<int,float>>::iterator rowIt = (*it).begin(); rowIt != (*it).end(); ++rowIt)
{
std::cout << "Index slowa: " << (*rowIt).first << " liczba wystapien " << (*rowIt).second <<" ";
}
std::cout << std::endl;
}
}
SparseDataVector SparseDataLoader::getRowVector()
{
return rowVector;
}
|
adam-andrzejczak/k_plus_triangle
|
SparseDataLoader.cpp
|
C++
|
gpl-2.0
| 1,281
|
#!/usr/bin/python
import sys
import csv
import json
import pycountry
import codecs
from collections import defaultdict
class Region(object):
def __init__(self, name, code=None, level=0, parent=None, verbose=False):
self.name = name
self.code = code
self.level = level
self.contains = []
self.parent = parent
try:
self.country = pycountry.countries.get(numeric='%03d' % (int(code)))
except:
self.country = None
if verbose:
print "Created region %s in parent %s" % (name, parent)
def add(self, region):
self.contains.append(region)
def get_countries(self):
'''
return list of countries (pycountry objects) in this region
'''
if self.country:
return [ self.country ]
clist = []
for region in self.contains:
clist += region.get_countries()
return clist
def includes_country(self, cc):
'''
Return True if this region has country with country code alpha2=cc
'''
if self.country is not None and self.country.alpha2==cc:
return True
for region in self.contains:
if region.includes_country(cc):
return True
return False
def __unicode__(self):
return ("<[%d] " % self.level) + self.name + " in " + str(self.parent or 'None') + " >"
__str__ = __unicode__
#cdat = csv.DictReader(codecs.open('un_world_geographic_regions.csv','rU', encoding='utf8'))
cdat = csv.DictReader(open('un_world_geographic_regions.csv','rU'))
regions = {}
regions_by_level = defaultdict(list)
current_region = Region("World", '001', 5)
verbose = True
stack = []
for cd in cdat:
level = int(cd.get('Level', 0) or 0)
inlevel = level
code = cd['Numerical_code']
name = cd['name']
if not name:
# skip blank
# print "skipping %s" % cd
continue
if not name in regions:
region = Region(name, code, level, parent=None)
regions[name] = region
regions_by_level[level].append(region)
else:
region = regions[name]
level = region.level
if level==0: # it's a country: always add to current_region
current_region.add(region)
if region.parent is None:
region.parent = current_region
elif inlevel < 0: # add to current_region, and don't change current_region
print "==> Adding to current_region"
print "Stack has %s" % map(str, stack)
current_region.add(region)
elif level < current_region.level: # subregion: add, then make region the current one
current_region.add(region)
if region.parent is None:
region.parent = current_region
stack.append(current_region) # use stack for parents
current_region = region
else: # go up until at right level
if verbose:
print "==> Going up tree"
print "Stack has %s" % map(str, stack)
while current_region.level <= level:
current_region = stack.pop()
current_region.add(region)
if region.parent is None:
region.parent = current_region
stack.append(current_region) # use stack for parents
current_region = region
if verbose:
print " added: " + str(region)
#-----------------------------------------------------------------------------
# output csv's of countries in each region, with alpha2 country code
print "-"*77
print "France: "
print regions['France']
print "Americas: "
print regions['Americas']
print "Haiti: "
print regions['Haiti']
print
print map(str, regions['Americas'].contains)
print regions['Asia']
print map(str, regions['Asia'].contains)
print regions['Europe']
print map(str, regions['Europe'].contains)
print regions['Africa']
print map(str, regions['Africa'].contains)
print "latin america:"
print regions['Latin America and the Caribbean']
print map(str, regions['Latin America and the Caribbean'].contains)
# sys.exit(0)
def dump_region(cset, name, verbose=True):
fn = "Countries_in_%s.csv" % name
fp = codecs.open(fn, 'w', encoding='utf8')
fp.write('cc, code, name\n')
for country in cset:
#fp.write(('%s,%s,' % (country.alpha2, country.numeric)) + country.name + '\n')
fp.write(('%s,%s,' % (country.alpha2, country.numeric)))
fp.write(country.name + '\n')
#fp.write(country.alpha2 + '\n')
fp.close()
if verbose:
print "Wrote %s" % fn
for level in range(4,0,-1):
print "Regions in Level %d: " % level
for r in regions_by_level[level]:
print " %s" % r
dump_region(r.get_countries(), r.name, verbose=False)
#-----------------------------------------------------------------------------
# Africa
print "-"*77
print "Countries in Africa:"
# cset = [ dict(name=x.name, cc=x.alpha2) for x in regions['Africa'].get_countries() ]
# print json.dumps(cset, indent=2)
dump_region(regions['Africa'].get_countries(), 'Africa')
#-----------------------------------------------------------------------------
# Least developed countries
print "-"*77
rname = "Least developed countries"
print "Countries in %s:" % rname
#cset = [ dict(name=x.name, cc=x.alpha2) for x in regions[rname].get_countries() ]
#print json.dumps(cset, indent=2)
dump_region(regions[rname].get_countries(), rname)
#-----------------------------------------------------------------------------
# developing nations
rnames = ['Africa', 'Americas', 'Caribbean', 'Central America', 'South America', 'Asia', 'Oceania']
rset = set()
for rname in rnames:
rset = rset.union(set(regions[rname].get_countries()))
dump_region(regions[rname].get_countries(), rname)
# remove northern america, Japan, Australia, New Zealand
northam = regions['Northern America'].get_countries()
rset = rset.difference(northam)
rset = rset.difference(regions['Japan'].get_countries())
rset = rset.difference(regions['Australia'].get_countries())
rset = rset.difference(regions['New Zealand'].get_countries())
dump_region(rset, 'Developing_Nations')
#-----------------------------------------------------------------------------
# sub-saharan africa = Africa - Northern Africa + Sudan
rnames = ['Africa']
rset = set()
for rname in rnames:
rset = rset.union(set(regions[rname].get_countries()))
rset = rset.difference(regions['Northern Africa'].get_countries())
rset = rset.union(set(regions['Sudan'].get_countries()))
dump_region(rset, 'Sub-Saharan-Africa')
|
mitodl/world_geographic_regions
|
CountriesByRegion.py
|
Python
|
gpl-2.0
| 6,565
|
# Created by Thomas Jones on 17/12/2015 - thomas@tomtecsolutions.com
# pingspec.py, a plugin for minqlx to spec players who have network latency over a certain amount.
# This plugin is released to everyone, for any purpose. It comes with no warranty, no guarantee it works, it's released AS IS.
# You can modify everything, except for lines 1-4 and the !tomtec_versions code. They're there to indicate I whacked this together originally. Please make it better :D
"""
This plugin requires Minqlx Core version v0.4.1 or greater.
The following cvars are used on this plugin:
qlx_pingSpecSecondsBetweenChecks: Specifies the seconds between checking every player's ping. Default: 15
qlx_pingSpecMaxPing: Specifies the maximum ping permitted on the server before the user is put to spec. Default: 125
"""
import minqlx
class pingspec(minqlx.Plugin):
def __init__(self):
self.add_hook("frame", self.process_frame, priority=minqlx.PRI_LOWEST)
self.add_command("tomtec_versions", self.cmd_showversion)
self.set_cvar_once("qlx_pingSpecSecondsBetweenChecks", "15")
self.set_cvar_once("qlx_pingSpecMaxPing", "125")
self.plugin_version = "1.3"
# Don't touch this:
self.frame_counter = 0
def process_frame(self):
self.frame_counter += 1
if self.frame_counter == (int(self.get_cvar("qlx_pingSpecSecondsBetweenChecks")) * int(minqlx.get_cvar("sv_fps"))):
self.frame_counter = 0
self.check_ping()
def check_ping(self):
for player in self.players():
if player.ping > int(self.get_cvar("qlx_pingSpecMaxPing")):
if self.game.state == "warmup":
player.tell("^1Your ping is over the maximum ping tolerated here ({}).".format(self.get_cvar("qlx_pingSpecMaxPing")))
player.tell("You will be put to spec when the game starts if it remains above the threshold.")
else:
if player.team != "spectator":
player.put("spectator")
self.msg("{} has been put in spec automatically for having a ping over {}.".format(player.clean_name, self.get_cvar("qlx_pingSpecMaxPing")))
player.tell("^1Your ping is over {}, the threshold.^7".format(self.get_cvar("qlx_pingSpecMaxPing")))
player.tell("You have been put in spec.")
def cmd_showversion(self, player, msg, channel):
channel.reply("^4pingspec.py^7 - version {}, created by Thomas Jones on 17/12/2015.".format(self.plugin_version))
|
tjone270/QuakeLiveDS_Scripts
|
minqlx-plugins/archive/beta/pingspec.py
|
Python
|
gpl-2.0
| 2,601
|
/*
* daemonlib
* Copyright (C) 2012-2014, 2018-2019 Matthias Bolte <matthias@tinkerforge.com>
* Copyright (C) 2014, 2018 Olaf Lüke <olaf@tinkerforge.com>
*
* packet.h: Packet definition for protocol version 2
*
* 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DAEMONLIB_PACKET_H
#define DAEMONLIB_PACKET_H
#include <stdbool.h>
#include <stdint.h>
typedef enum {
FUNCTION_DISCONNECT_PROBE = 128,
FUNCTION_GET_PROTOCOL1_BRICKLET_NAME = 241,
FUNCTION_GET_CHIP_TEMPERATURE = 242,
FUNCTION_RESET = 243,
FUNCTION_WRITE_BRICKLET_PLUGIN = 246,
FUNCTION_READ_BRICKLET_PLUGIN = 247,
FUNCTION_WRITE_BRICKLET_UID = 248,
FUNCTION_READ_BRICKLET_UID = 249,
FUNCTION_GET_ADC_CALIBRATION = 250,
FUNCTION_ADC_CALIBRATE = 251,
FUNCTION_STACK_ENUMERATE = 252,
CALLBACK_ENUMERATE = 253,
FUNCTION_ENUMERATE = 254,
FUNCTION_GET_IDENTITY = 255
} CommonBrickFunctionID;
typedef enum {
FUNCTION_GET_AUTHENTICATION_NONCE = 1,
FUNCTION_AUTHENTICATE
} BrickDaemonFunctionID;
typedef enum {
ENUMERATION_TYPE_AVAILABLE = 0,
ENUMERATION_TYPE_CONNECTED,
ENUMERATION_TYPE_DISCONNECTED
} EnumerationType;
typedef enum {
PACKET_E_SUCCESS = 0,
PACKET_E_INVALID_PARAMETER,
PACKET_E_FUNCTION_NOT_SUPPORTED,
PACKET_E_UNKNOWN_ERROR
} PacketE;
#define PACKET_MAX_DUMP_LENGTH ((int)sizeof(Packet) * 3 + 1)
#define PACKET_MAX_SIGNATURE_LENGTH (64 + PACKET_MAX_DUMP_LENGTH)
#define PACKET_MAX_STACK_ENUMERATE_UIDS 16
#define PACKET_NO_CONNECTED_UID_STR "0\0\0\0\0\0\0\0"
#define PACKET_NO_CONNECTED_UID_STR_LENGTH 8
#include "packed_begin.h"
typedef struct {
uint32_t uid; // always little endian
uint8_t length; // packet length including header
uint8_t function_id;
uint8_t sequence_number_and_options; // 4 bit sequence number, 1 bit response expected, 3 bit unused
uint8_t error_code_and_future_use; // 2 bit error code, 6 bit unused
} ATTRIBUTE_PACKED PacketHeader;
typedef struct {
PacketHeader header;
uint8_t payload[64];
union {
uint8_t optional_data[8];
#ifdef DAEMONLIB_WITH_PACKET_TRACE
uint64_t trace_id; // zero == invalid, even == request, odd == response
#endif
};
} ATTRIBUTE_PACKED Packet;
typedef struct {
PacketHeader header;
char uid[8];
char connected_uid[8];
char position;
uint8_t hardware_version[3];
uint8_t firmware_version[3];
uint16_t device_identifier; // always little endian
uint8_t enumeration_type;
} ATTRIBUTE_PACKED EnumerateCallback;
typedef struct {
PacketHeader header;
} ATTRIBUTE_PACKED EmptyResponse;
typedef struct {
PacketHeader header;
} ATTRIBUTE_PACKED GetAuthenticationNonceRequest;
typedef struct {
PacketHeader header;
uint8_t server_nonce[4];
} ATTRIBUTE_PACKED GetAuthenticationNonceResponse;
typedef struct {
PacketHeader header;
uint8_t client_nonce[4];
uint8_t digest[20];
} ATTRIBUTE_PACKED AuthenticateRequest;
typedef struct {
PacketHeader header;
} ATTRIBUTE_PACKED AuthenticateResponse;
typedef struct {
PacketHeader header;
} ATTRIBUTE_PACKED StackEnumerateRequest;
typedef struct {
PacketHeader header;
uint32_t uids[PACKET_MAX_STACK_ENUMERATE_UIDS];
} ATTRIBUTE_PACKED StackEnumerateResponse;
#include "packed_end.h"
bool packet_header_is_valid_request(PacketHeader *header, const char **message);
bool packet_header_is_valid_response(PacketHeader *header, const char **message);
uint8_t packet_header_get_sequence_number(PacketHeader *header);
void packet_header_set_sequence_number(PacketHeader *header, uint8_t sequence_number);
bool packet_header_get_response_expected(PacketHeader *header);
void packet_header_set_response_expected(PacketHeader *header, bool response_expected);
PacketE packet_header_get_error_code(PacketHeader *header);
void packet_header_set_error_code(PacketHeader *header, PacketE error_code);
const char *packet_get_response_type(Packet *packet);
char *packet_get_request_signature(char *signature, Packet *packet);
char *packet_get_response_signature(char *signature, Packet *packet);
char *packet_get_dump(char *dump, Packet *packet, int length);
bool packet_is_matching_response(Packet *packet, PacketHeader *pending_request);
#ifdef DAEMONLIB_WITH_PACKET_TRACE
#define packet_add_trace(packet) packet_add_trace_(packet, __FILE__, __LINE__)
uint64_t packet_get_next_request_trace_id(void);
uint64_t packet_get_next_response_trace_id(void);
void packet_add_trace_(Packet *packet, const char *filename, int line);
#else
#define packet_add_trace(packet) ((void)(packet))
#endif
#endif // DAEMONLIB_PACKET_H
|
Tinkerforge/daemonlib
|
packet.h
|
C
|
gpl-2.0
| 5,128
|
///////////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2006-2015 Esper Team. All rights reserved. /
// http://esper.codehaus.org /
// ---------------------------------------------------------------------------------- /
// The software in this package is published under the terms of the GPL license /
// a copy of which has been included with this distribution in the license.txt file. /
///////////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using com.espertech.esper.common.client;
using com.espertech.esper.common.@internal.epl.agg.core;
using com.espertech.esper.common.@internal.epl.enummethod.dot;
using com.espertech.esper.common.@internal.epl.expression.agg.accessagg;
using com.espertech.esper.common.@internal.epl.expression.chain;
using com.espertech.esper.common.@internal.epl.expression.core;
using com.espertech.esper.common.@internal.epl.expression.table;
using com.espertech.esper.common.@internal.epl.expression.visitor;
using com.espertech.esper.common.@internal.epl.index.advanced.index.quadtree;
using com.espertech.esper.common.@internal.epl.join.analyze;
using com.espertech.esper.common.@internal.epl.streamtype;
using com.espertech.esper.common.@internal.epl.table.compiletime;
using com.espertech.esper.common.@internal.epl.variable.compiletime;
using com.espertech.esper.common.@internal.@event.core;
using com.espertech.esper.common.@internal.@event.property;
using com.espertech.esper.common.@internal.@event.propertyparser;
using com.espertech.esper.common.@internal.rettype;
using com.espertech.esper.common.@internal.settings;
using com.espertech.esper.compat;
using com.espertech.esper.compat.collections;
namespace com.espertech.esper.common.@internal.epl.expression.dot.core
{
/// <summary>
/// Represents an Dot-operator expression, for use when "(expression).method(...).method(...)"
/// </summary>
public class ExprDotNodeImpl : ExprNodeBase,
ExprDotNode,
ExprStreamRefNode,
ExprNodeInnerNodeProvider
{
private IList<Chainable> _chainSpec;
private readonly bool _isDuckTyping;
private readonly bool _isUdfCache;
[NonSerialized] private ExprDotNodeForge _forge;
public ExprDotNodeImpl(
IList<Chainable> chainSpec,
bool isDuckTyping,
bool isUDFCache)
{
_chainSpec = chainSpec.AsReadOnlyList(); // for safety, make it unmodifiable the list
_isDuckTyping = isDuckTyping;
_isUdfCache = isUDFCache;
}
public override ExprNode Validate(ExprValidationContext validationContext)
{
// check for plannable methods: these are validated according to different rules
var appDotMethod = GetAppDotMethod(validationContext.IsFilterExpression);
if (appDotMethod != null) {
return appDotMethod;
}
// determine if there is an implied binding, replace first chain element with evaluation node if there is
if (validationContext.StreamTypeService.HasTableTypes &&
validationContext.TableCompileTimeResolver != null &&
_chainSpec.Count > 1 &&
_chainSpec[0] is ChainableName) {
var tableNode = TableCompileTimeUtil.GetTableNodeChainable(
validationContext.StreamTypeService,
_chainSpec,
validationContext.IsAllowTableAggReset,
validationContext.TableCompileTimeResolver);
if (tableNode != null) {
var node = ExprNodeUtilityValidate.GetValidatedSubtree(ExprNodeOrigin.DOTNODE, tableNode.First, validationContext);
if (tableNode.Second.IsEmpty()) {
return node;
}
IList<Chainable> modifiedChainX = new List<Chainable>(tableNode.Second);
ChainSpec = modifiedChainX;
AddChildNode(node);
}
}
// handle aggregation methods: method on aggregation state coming from certain aggregations or from table column (both table-access or table-in-from-clause)
// this is done here as a walker does not have the information that the validated child node has
var aggregationMethodNode = HandleAggregationMethod(validationContext);
if (aggregationMethodNode != null) {
if (aggregationMethodNode.Second.IsEmpty()) {
return aggregationMethodNode.First;
}
IList<Chainable> modifiedChainX = new List<Chainable>(aggregationMethodNode.Second);
ChainSpec = modifiedChainX;
ChildNodes[0] = aggregationMethodNode.First;
}
// validate all parameters
ExprNodeUtilityValidate.Validate(ExprNodeOrigin.DOTNODEPARAMETER, _chainSpec, validationContext);
// determine if there are enumeration method expressions in the chain
var hasEnumerationMethod = false;
foreach (var chain in _chainSpec) {
if (!(chain is ChainableCall)) {
continue;
}
var call = (ChainableCall) chain;
if (EnumMethodResolver.IsEnumerationMethod(call.Name, validationContext.ImportService)) {
hasEnumerationMethod = true;
break;
}
}
// The root node expression may provide the input value:
// Such as "window(*).DoIt(...)" or "(select * from Window).DoIt()" or "prevwindow(sb).DoIt(...)",
// in which case the expression to act on is a child expression
//
var streamTypeService = validationContext.StreamTypeService;
if (ChildNodes.Length != 0) {
// the root expression is the first child node
var rootNode = ChildNodes[0];
// the root expression may also provide a lambda-function input (Iterator<EventBean>)
// Determine collection-type and evaluator if any for root node
var enumSrc = ExprDotNodeUtility.GetEnumerationSource(
rootNode,
validationContext.StreamTypeService,
hasEnumerationMethod,
validationContext.IsDisablePropertyExpressionEventCollCache,
validationContext.StatementRawInfo,
validationContext.StatementCompileTimeService);
EPType typeInfoX;
if (enumSrc.ReturnType == null) {
typeInfoX = EPTypeHelper.SingleValue(rootNode.Forge.EvaluationType); // not a collection type, treat as scalar
}
else {
typeInfoX = enumSrc.ReturnType;
}
var evalsX = ExprDotNodeUtility.GetChainEvaluators(
enumSrc.StreamOfProviderIfApplicable,
typeInfoX,
_chainSpec,
validationContext,
_isDuckTyping,
new ExprDotNodeFilterAnalyzerInputExpr());
_forge = new ExprDotNodeForgeRootChild(
this,
null,
null,
null,
hasEnumerationMethod,
rootNode.Forge,
enumSrc.Enumeration,
typeInfoX,
evalsX.Chain,
evalsX.ChainWithUnpack,
false);
return null;
}
// No root node, and this is a 1-element chain i.e. "something(param,...)".
// Plug-in single-row methods are not handled here.
// Plug-in aggregation methods are not handled here.
if (_chainSpec.Count == 1) {
var chainable = _chainSpec[0];
if (!(chainable is ChainableCall)) {
throw new IllegalStateException("Unexpected chainable : " + chainable);
}
var call = (ChainableCall) chainable;
if (call.Parameters.IsEmpty()) {
throw HandleNotFound(call.Name);
}
// single-parameter can resolve to a property
Pair<PropertyResolutionDescriptor, string> propertyInfoPairX = null;
try {
propertyInfoPairX = ExprIdentNodeUtil.GetTypeFromStream(
streamTypeService,
call.Name,
streamTypeService.HasPropertyAgnosticType,
false,
validationContext.TableCompileTimeResolver);
}
catch (ExprValidationPropertyException) {
// fine
}
// if not a property then try built-in single-row non-grammar functions
if (propertyInfoPairX == null &&
call.Name.Equals(ImportServiceCompileTimeConstants.EXT_SINGLEROW_FUNCTION_TRANSPOSE, StringComparison.InvariantCultureIgnoreCase)) {
if (call.Parameters.Count != 1) {
throw new ExprValidationException(
"The " + ImportServiceCompileTimeConstants.EXT_SINGLEROW_FUNCTION_TRANSPOSE + " function requires a single parameter expression");
}
_forge = new ExprDotNodeForgeTransposeAsStream(this, call.Parameters[0].Forge);
}
else if (call.Parameters.Count != 1) {
throw HandleNotFound(call.Name);
}
else {
if (propertyInfoPairX == null) {
throw new ExprValidationException(
"Unknown single-row function, aggregation function or mapped or indexed property named '" + call.Name + "' could not be resolved");
}
_forge = GetPropertyPairEvaluator(call.Parameters[0].Forge, propertyInfoPairX, validationContext);
}
return null;
}
// handle the case where the first chain spec element is a stream name.
ExprValidationException prefixedStreamNumException = null;
var prefixedStreamNumber = PrefixedStreamName(_chainSpec, validationContext.StreamTypeService);
if (prefixedStreamNumber != -1) {
var first = (ChainableName) _chainSpec[0];
var specAfterStreamName = _chainSpec[1];
// Attempt to resolve as property
Pair<PropertyResolutionDescriptor, string> propertyInfoPairX = null;
try {
var propName = first.Name + "." + specAfterStreamName.GetRootNameOrEmptyString();
propertyInfoPairX = ExprIdentNodeUtil.GetTypeFromStream(
streamTypeService,
propName,
streamTypeService.HasPropertyAgnosticType,
true,
validationContext.TableCompileTimeResolver);
}
catch (ExprValidationPropertyException) {
// fine
}
if (propertyInfoPairX != null) {
IList<Chainable> chain = new List<Chainable>(_chainSpec);
// handle "property[x]" and "property(x)"
if (chain.Count == 2 && specAfterStreamName.GetParametersOrEmpty().Count == 1) {
_forge = GetPropertyPairEvaluator(specAfterStreamName.GetParametersOrEmpty()[0].Forge, propertyInfoPairX, validationContext);
return null;
}
chain.RemoveAt(0);
chain.RemoveAt(0);
var desc = HandlePropertyInfoPair(
true,
specAfterStreamName,
chain,
propertyInfoPairX,
hasEnumerationMethod,
validationContext,
this);
desc.Apply(this);
return null;
}
// Attempt to resolve as event-underlying object instance method
var eventType = validationContext.StreamTypeService.EventTypes[prefixedStreamNumber];
var type = eventType.UnderlyingType;
IList<Chainable> remainderChain = new List<Chainable>(_chainSpec);
remainderChain.RemoveAt(0);
ExprValidationException methodEx = null;
ExprDotForge[] underlyingMethodChain = null;
try {
var typeInfoX = EPTypeHelper.SingleValue(type);
if (validationContext.TableCompileTimeResolver.ResolveTableFromEventType(eventType) != null) {
typeInfoX = new ClassEPType(typeof(object[]));
}
underlyingMethodChain = ExprDotNodeUtility.GetChainEvaluators(
prefixedStreamNumber,
typeInfoX,
remainderChain,
validationContext,
false,
new ExprDotNodeFilterAnalyzerInputStream(prefixedStreamNumber))
.ChainWithUnpack;
}
catch (ExprValidationException ex) {
methodEx = ex;
// expected - may not be able to find the methods on the underlying
}
ExprDotForge[] eventTypeMethodChain = null;
ExprValidationException enumDatetimeEx = null;
FilterExprAnalyzerAffector filterExprAnalyzerAffector = null;
try {
var typeInfoX = EPTypeHelper.SingleEvent(eventType);
var chain = ExprDotNodeUtility.GetChainEvaluators(
prefixedStreamNumber,
typeInfoX,
remainderChain,
validationContext,
false,
new ExprDotNodeFilterAnalyzerInputStream(prefixedStreamNumber));
eventTypeMethodChain = chain.ChainWithUnpack;
filterExprAnalyzerAffector = chain.FilterAnalyzerDesc;
}
catch (ExprValidationException ex) {
enumDatetimeEx = ex;
// expected - may not be able to find the methods on the underlying
}
if (underlyingMethodChain != null) {
_forge = new ExprDotNodeForgeStream(
this, filterExprAnalyzerAffector, prefixedStreamNumber, eventType, underlyingMethodChain, true);
}
else if (eventTypeMethodChain != null) {
_forge = new ExprDotNodeForgeStream(
this, filterExprAnalyzerAffector, prefixedStreamNumber, eventType, eventTypeMethodChain, false);
}
if (_forge != null) {
return null;
}
else {
var remainerName = remainderChain[0].GetRootNameOrEmptyString();
if (ExprDotNodeUtility.IsDatetimeOrEnumMethod(remainerName, validationContext.ImportService)) {
prefixedStreamNumException = enumDatetimeEx;
}
else {
prefixedStreamNumException = new ExprValidationException(
"Failed to solve '" +
remainerName +
"' to either an date-time or enumeration method, an event property or a method on the event underlying object: " +
methodEx.Message,
methodEx);
}
}
}
// There no root node, in this case the classname or property name is provided as part of the chain.
// Such as "MyClass.myStaticLib(...)" or "mycollectionproperty.DoIt(...)"
//
IList<Chainable> modifiedChain = new List<Chainable>(_chainSpec);
var firstItem = modifiedChain.DeleteAt(0);
var firstItemName = firstItem.GetRootNameOrEmptyString();
Pair<PropertyResolutionDescriptor, string> propertyInfoPair = null;
try {
propertyInfoPair = ExprIdentNodeUtil.GetTypeFromStream(
streamTypeService,
firstItemName,
streamTypeService.HasPropertyAgnosticType,
true,
validationContext.TableCompileTimeResolver);
}
catch (ExprValidationPropertyException) {
// not a property
}
// If property then treat it as such
if (propertyInfoPair != null) {
var desc = HandlePropertyInfoPair(
false,
firstItem,
modifiedChain,
propertyInfoPair,
hasEnumerationMethod,
validationContext,
this);
desc.Apply(this);
return null;
}
// If variable then resolve as such
var variable = validationContext.VariableCompileTimeResolver.Resolve(firstItemName);
if (variable != null) {
if (variable.OptionalContextName != null) {
throw new ExprValidationException("Method invocation on context-specific variable is not supported");
}
EPType typeInfoX;
ExprDotStaticMethodWrap wrap;
if (variable.Type.IsArray) {
typeInfoX = EPTypeHelper.CollectionOfSingleValue(
variable.Type.GetElementType(),
variable.Type);
wrap = new ExprDotStaticMethodWrapArrayScalar(variable.VariableName, variable.Type);
}
else if (variable.EventType != null) {
typeInfoX = EPTypeHelper.SingleEvent(variable.EventType);
wrap = null;
}
else {
typeInfoX = EPTypeHelper.SingleValue(variable.Type);
wrap = null;
}
var evalsX = ExprDotNodeUtility.GetChainEvaluators(
null,
typeInfoX,
modifiedChain,
validationContext,
false,
new ExprDotNodeFilterAnalyzerInputStatic());
_forge = new ExprDotNodeForgeVariable(this, variable, wrap, evalsX.ChainWithUnpack);
return null;
}
// try resolve as enumeration class with value
var enumconstantDesc = ImportCompileTimeUtil.ResolveIdentAsEnumConst(
firstItemName,
validationContext.ImportService,
validationContext.ClassProvidedExtension,
false);
if (enumconstantDesc != null && modifiedChain[0] is ChainableCall) {
// try resolve method
var methodSpec = (ChainableCall) modifiedChain[0];
var enumvalue = firstItemName;
ExprNodeUtilResolveExceptionHandler handler = new ProxyExprNodeUtilResolveExceptionHandler() {
ProcHandle = (ex) => {
return new ExprValidationException(
"Failed to resolve method '" + methodSpec.Name + "' on enumeration value '" + enumvalue + "': " + ex.Message);
},
};
var wildcardType = validationContext.StreamTypeService.EventTypes.Length != 1 ? null : validationContext.StreamTypeService.EventTypes[0];
var methodDesc = ExprNodeUtilityResolve.ResolveMethodAllowWildcardAndStream(
enumconstantDesc.Value.GetType().Name,
enumconstantDesc.Value.GetType(),
methodSpec.Name,
methodSpec.Parameters,
wildcardType != null,
wildcardType,
handler,
methodSpec.Name,
validationContext.StatementRawInfo,
validationContext.StatementCompileTimeService);
// method resolved, hook up
modifiedChain.RemoveAt(0); // we identified this piece
var optionalLambdaWrapX = ExprDotStaticMethodWrapFactory.Make(
methodDesc.ReflectionMethod,
modifiedChain,
null,
validationContext);
var typeInfoX = optionalLambdaWrapX != null ? optionalLambdaWrapX.TypeInfo : EPTypeHelper.SingleValue(methodDesc.ReflectionMethod.ReturnType);
var evalsX = ExprDotNodeUtility.GetChainEvaluators(
null,
typeInfoX,
modifiedChain,
validationContext,
false,
new ExprDotNodeFilterAnalyzerInputStatic());
_forge = new ExprDotNodeForgeStaticMethod(
this,
false,
firstItemName,
methodDesc.ReflectionMethod,
methodDesc.ChildForges,
false,
evalsX.ChainWithUnpack,
optionalLambdaWrapX,
false,
enumconstantDesc,
validationContext.StatementName,
methodDesc.IsLocalInlinedClass);
return null;
}
// if prefixed by a stream name, we are giving up
if (prefixedStreamNumException != null) {
throw prefixedStreamNumException;
}
// If class then resolve as class
var secondItem = modifiedChain.DeleteAt(0);
var allowWildcard = validationContext.StreamTypeService.EventTypes.Length == 1;
EventType streamZeroType = null;
if (validationContext.StreamTypeService.EventTypes.Length > 0) {
streamZeroType = validationContext.StreamTypeService.EventTypes[0];
}
var secondItemName = secondItem.GetRootNameOrEmptyString();
var separator = string.IsNullOrWhiteSpace(secondItemName) ? "" : ".";
var msgHandler = new ExprNodeUtilResolveExceptionHandlerDefault(firstItemName + separator + secondItemName, false);
var method = ExprNodeUtilityResolve.ResolveMethodAllowWildcardAndStream(
firstItemName,
null,
secondItem.GetRootNameOrEmptyString(),
secondItem.GetParametersOrEmpty(),
allowWildcard,
streamZeroType,
msgHandler,
secondItem.GetRootNameOrEmptyString(),
validationContext.StatementRawInfo,
validationContext.StatementCompileTimeService);
var isConstantParameters = method.IsAllConstants && _isUdfCache;
var isReturnsConstantResult = isConstantParameters && modifiedChain.IsEmpty();
// this may return a pair of null if there is no lambda or the result cannot be wrapped for lambda-function use
var optionalLambdaWrap = ExprDotStaticMethodWrapFactory.Make(method.ReflectionMethod, modifiedChain, null, validationContext);
var typeInfo = optionalLambdaWrap != null ? optionalLambdaWrap.TypeInfo : EPTypeHelper.SingleValue(method.ReflectionMethod.ReturnType);
var evals = ExprDotNodeUtility.GetChainEvaluators(
null,
typeInfo,
modifiedChain,
validationContext,
false,
new ExprDotNodeFilterAnalyzerInputStatic());
_forge = new ExprDotNodeForgeStaticMethod(
this,
isReturnsConstantResult,
firstItemName,
method.ReflectionMethod,
method.ChildForges,
isConstantParameters,
evals.ChainWithUnpack,
optionalLambdaWrap,
false,
null,
validationContext.StatementName,
method.IsLocalInlinedClass);
return null;
}
private static PropertyInfoPairDesc HandlePropertyInfoPair(
bool nestedComplexProperty,
Chainable firstItem,
IList<Chainable> chain,
Pair<PropertyResolutionDescriptor, string> propertyInfoPair,
bool hasEnumerationMethod,
ExprValidationContext validationContext,
ExprDotNodeImpl myself)
{
var streamTypeService = validationContext.StreamTypeService;
var propertyName = propertyInfoPair.First.PropertyName;
var streamId = propertyInfoPair.First.StreamNum;
var streamType = (EventTypeSPI) streamTypeService.EventTypes[streamId];
ExprEnumerationForge enumerationForge = null;
EPType inputType;
ExprForge rootNodeForge = null;
EventPropertyGetterSPI getter;
var rootIsEventBean = false;
if (firstItem is ChainableName) {
getter = streamType.GetGetterSPI(propertyName);
// Handle first-chainable not an array
if (!(chain[0] is ChainableArray)) {
var allowEnum = nestedComplexProperty || hasEnumerationMethod;
var propertyEval = ExprDotNodeUtility.GetPropertyEnumerationSource(
propertyName,
streamId,
streamType,
allowEnum,
validationContext.IsDisablePropertyExpressionEventCollCache);
enumerationForge = propertyEval.Enumeration;
inputType = propertyEval.ReturnType;
rootNodeForge = new PropertyDotNonLambdaForge(streamId, getter, propertyInfoPair.First.PropertyType.GetBoxedType());
}
else {
// first-chainable is an array, use array-of-fragments or array-of-type
var array = (ChainableArray) chain[0];
var indexExpression = ChainableArray.ValidateSingleIndexExpr(array.Indexes, () => "property '" + propertyName + "'");
var propertyType = streamType.GetPropertyType(propertyName);
var fragmentEventType = streamType.GetFragmentType(propertyName);
if (fragmentEventType != null && fragmentEventType.IsIndexed) {
// handle array-of-fragment by including the array operation in the root
inputType = EPTypeHelper.SingleEvent(fragmentEventType.FragmentType);
chain = chain.SubList(1, chain.Count); // we remove the array operation from the chain as its handled by the forge
rootNodeForge = new PropertyDotNonLambdaFragmentIndexedForge(streamId, getter, indexExpression, propertyName);
rootIsEventBean = true;
}
else if (propertyType.IsArray) {
// handle array-of-type by simple property and array operation as part of chain
inputType = EPTypeHelper.SingleValue(propertyType);
rootNodeForge = new PropertyDotNonLambdaForge(streamId, getter, propertyInfoPair.First.PropertyType.GetBoxedType());
}
else {
throw new ExprValidationException("Invalid array operation for property '" + propertyName + "'");
}
}
}
else {
// property with parameter - mapped or indexed property
getter = null;
var call = (ChainableCall) firstItem;
var desc = EventTypeUtility.GetNestablePropertyDescriptor(
streamTypeService.EventTypes[propertyInfoPair.First.StreamNum],
call.Name);
if (call.Parameters.Count > 1) {
throw new ExprValidationException("Property '" + call.Name + "' may not be accessed passing 2 or more parameters");
}
var paramEval = call.Parameters[0].Forge;
inputType = EPTypeHelper.SingleValue(desc.PropertyComponentType);
if (desc.IsMapped) {
if (paramEval.EvaluationType != typeof(string)) {
throw new ExprValidationException(
"Parameter expression to mapped property '" +
propertyName +
"' is expected to return a string-type value but returns " +
paramEval.EvaluationType.CleanName());
}
var mappedGetter = ((EventTypeSPI) propertyInfoPair.First.StreamEventType).GetGetterMappedSPI(propertyName);
if (mappedGetter == null) {
throw new ExprValidationException("Mapped property named '" + propertyName + "' failed to obtain getter-object");
}
rootNodeForge = new PropertyDotNonLambdaMappedForge(streamId, mappedGetter, paramEval, desc.PropertyComponentType);
}
if (desc.IsIndexed) {
if (paramEval.EvaluationType.GetBoxedType() != typeof(int?)) {
throw new ExprValidationException(
"Parameter expression to mapped property '" +
propertyName +
"' is expected to return a Integer-type value but returns " +
paramEval.EvaluationType.CleanName());
}
var indexedGetter = ((EventTypeSPI) propertyInfoPair.First.StreamEventType).GetGetterIndexedSPI(propertyName);
if (indexedGetter == null) {
throw new ExprValidationException("Mapped property named '" + propertyName + "' failed to obtain getter-object");
}
rootNodeForge = new PropertyDotNonLambdaIndexedForge(streamId, indexedGetter, paramEval, desc.PropertyComponentType);
}
}
// try to build chain based on the input (non-fragment)
ExprDotNodeRealizedChain evals;
var filterAnalyzerInputProp = new ExprDotNodeFilterAnalyzerInputProp(propertyInfoPair.First.StreamNum, propertyName);
try {
evals = ExprDotNodeUtility.GetChainEvaluators(streamId, inputType, chain, validationContext, myself._isDuckTyping, filterAnalyzerInputProp);
}
catch (ExprValidationException) {
if (inputType is EventEPType || inputType is EventMultiValuedEPType) {
throw;
}
// try building the chain based on the fragment event type (i.e. A.after(B) based on A-configured start time where A is a fragment)
var fragment = propertyInfoPair.First.FragmentEventType;
if (fragment == null) {
throw;
}
rootIsEventBean = true;
EPType fragmentTypeInfo;
if (!fragment.IsIndexed) {
if (chain[0] is ChainableArray) {
throw new ExprValidationException("Cannot perform array operation as property '" + propertyName + "' does not return an array");
}
fragmentTypeInfo = EPTypeHelper.SingleEvent(fragment.FragmentType);
}
else {
fragmentTypeInfo = EPTypeHelper.ArrayOfEvents(fragment.FragmentType);
}
inputType = fragmentTypeInfo;
rootNodeForge = new PropertyDotNonLambdaFragmentForge(streamId, getter, fragment.IsIndexed);
evals = ExprDotNodeUtility.GetChainEvaluators(
propertyInfoPair.First.StreamNum,
fragmentTypeInfo,
chain,
validationContext,
myself._isDuckTyping,
filterAnalyzerInputProp);
}
var filterExprAnalyzerAffector = evals.FilterAnalyzerDesc;
var streamNumReferenced = propertyInfoPair.First.StreamNum;
var forge = new ExprDotNodeForgeRootChild(
myself,
filterExprAnalyzerAffector,
streamNumReferenced,
propertyName,
hasEnumerationMethod,
rootNodeForge,
enumerationForge,
inputType,
evals.Chain,
evals.ChainWithUnpack,
!rootIsEventBean);
return new PropertyInfoPairDesc(forge);
}
private Pair<ExprDotNodeAggregationMethodRootNode, IList<Chainable>> HandleAggregationMethod(ExprValidationContext validationContext)
{
if (_chainSpec.IsEmpty() || ChildNodes.Length == 0) {
return null;
}
var chainFirst = _chainSpec[0];
if (chainFirst is ChainableArray) {
return null;
}
var rootNode = ChildNodes[0];
var aggMethodParams = chainFirst.GetParametersOrEmpty().ToArray();
var aggMethodName = chainFirst.GetRootNameOrEmptyString();
// handle property, such as "sortedcolumn.floorKey('a')" since "floorKey" can also be a property
if (chainFirst is ChainableName) {
var prop = PropertyParserNoDep.ParseAndWalkLaxToSimple(chainFirst.GetRootNameOrEmptyString(), false);
if (prop is MappedProperty) {
var mappedProperty = (MappedProperty) prop;
aggMethodName = mappedProperty.PropertyNameAtomic;
aggMethodParams = new ExprNode[] {new ExprConstantNodeImpl(mappedProperty.Key)};
}
}
if (!(rootNode is ExprTableAccessNodeSubprop) &&
!(rootNode is ExprAggMultiFunctionNode) &&
!(rootNode is ExprTableIdentNode)) {
return null;
}
ExprDotNodeAggregationMethodForge aggregationMethodForge;
if (rootNode is ExprAggMultiFunctionNode) {
// handle local aggregation
var mf = (ExprAggMultiFunctionNode) rootNode;
if (!mf.AggregationForgeFactory.AggregationPortableValidation.IsAggregationMethod(aggMethodName, aggMethodParams, validationContext)) {
return null;
}
aggregationMethodForge = new ExprDotNodeAggregationMethodForgeLocal(
this,
aggMethodName,
aggMethodParams,
mf.AggregationForgeFactory.AggregationPortableValidation,
mf);
}
else if (rootNode is ExprTableIdentNode) {
// handle table-column via from-clause
var tableSubprop = (ExprTableIdentNode) rootNode;
var column = tableSubprop.TableMetadata.Columns.Get(tableSubprop.ColumnName);
if (!(column is TableMetadataColumnAggregation)) {
return null;
}
var columnAggregation = (TableMetadataColumnAggregation) column;
if (aggMethodName.ToLowerInvariant().Equals("reset")) {
if (!validationContext.IsAllowTableAggReset) {
throw new ExprValidationException(AggregationPortableValidationBase.INVALID_TABLE_AGG_RESET);
}
aggregationMethodForge = new ExprDotNodeAggregationMethodForgeTableReset(
this,
aggMethodName,
aggMethodParams,
columnAggregation.AggregationPortableValidation,
tableSubprop,
columnAggregation);
}
else {
if (columnAggregation.IsMethodAgg ||
!columnAggregation.AggregationPortableValidation.IsAggregationMethod(aggMethodName, aggMethodParams, validationContext)) {
return null;
}
aggregationMethodForge = new ExprDotNodeAggregationMethodForgeTableIdent(
this,
aggMethodName,
aggMethodParams,
columnAggregation.AggregationPortableValidation,
tableSubprop,
columnAggregation);
}
}
else if (rootNode is ExprTableAccessNodeSubprop) {
// handle table-column via table-access
var tableSubprop = (ExprTableAccessNodeSubprop) rootNode;
var column = tableSubprop.TableMeta.Columns.Get(tableSubprop.SubpropName);
if (!(column is TableMetadataColumnAggregation)) {
return null;
}
var columnAggregation = (TableMetadataColumnAggregation) column;
if (columnAggregation.IsMethodAgg ||
!columnAggregation.AggregationPortableValidation.IsAggregationMethod(aggMethodName, aggMethodParams, validationContext)) {
return null;
}
aggregationMethodForge = new ExprDotNodeAggregationMethodForgeTableAccess(
this,
aggMethodName,
aggMethodParams,
columnAggregation.AggregationPortableValidation,
tableSubprop,
columnAggregation);
}
else {
throw new IllegalStateException("Unhandled aggregation method root node");
}
// validate
aggregationMethodForge.Validate(validationContext);
var newChain = _chainSpec.Count == 1
? (IList<Chainable>) EmptyList<Chainable>.Instance
: new List<Chainable>(_chainSpec.SubList(1, _chainSpec.Count));
var root = new ExprDotNodeAggregationMethodRootNode(aggregationMethodForge);
root.AddChildNode(rootNode);
return new Pair<ExprDotNodeAggregationMethodRootNode, IList<Chainable>>(root, newChain);
}
public FilterExprAnalyzerAffector GetAffector(bool isOuterJoin)
{
CheckValidated(_forge);
return isOuterJoin ? null : _forge.FilterExprAnalyzerAffector;
}
private ExprDotNodeForge GetPropertyPairEvaluator(
ExprForge parameterForge,
Pair<PropertyResolutionDescriptor, string> propertyInfoPair,
ExprValidationContext validationContext)
{
var propertyName = propertyInfoPair.First.PropertyName;
var propertyDesc = EventTypeUtility.GetNestablePropertyDescriptor(propertyInfoPair.First.StreamEventType, propertyName);
if (propertyDesc == null || (!propertyDesc.IsMapped && !propertyDesc.IsIndexed)) {
throw new ExprValidationException(
"Unknown single-row function, aggregation function or mapped or indexed property named '" + propertyName + "' could not be resolved");
}
var streamNum = propertyInfoPair.First.StreamNum;
EventPropertyGetterMappedSPI mappedGetter = null;
EventPropertyGetterIndexedSPI indexedGetter = null;
var propertyType = typeof(object);
if (propertyDesc.IsMapped) {
if (parameterForge.EvaluationType != typeof(string)) {
throw new ExprValidationException(
"Parameter expression to mapped property '" +
propertyDesc.PropertyName +
"' is expected to return a string-type value but returns " +
parameterForge.EvaluationType.CleanName());
}
mappedGetter = ((EventTypeSPI) propertyInfoPair.First.StreamEventType).GetGetterMappedSPI(propertyInfoPair.First.PropertyName);
if (mappedGetter == null) {
throw new ExprValidationException("Mapped property named '" + propertyName + "' failed to obtain getter-object");
}
}
else {
if (parameterForge.EvaluationType.GetBoxedType() != typeof(int?)) {
throw new ExprValidationException(
"Parameter expression to indexed property '" +
propertyDesc.PropertyName +
"' is expected to return a Integer-type value but returns " +
parameterForge.EvaluationType.CleanName());
}
indexedGetter = ((EventTypeSPI) propertyInfoPair.First.StreamEventType).GetGetterIndexedSPI(propertyInfoPair.First.PropertyName);
if (indexedGetter == null) {
throw new ExprValidationException("Indexed property named '" + propertyName + "' failed to obtain getter-object");
}
}
if (propertyDesc.PropertyComponentType != null) {
propertyType = propertyDesc.PropertyComponentType.GetBoxedType();
}
return new ExprDotNodeForgePropertyExpr(
this,
validationContext.StatementName,
propertyDesc.PropertyName,
streamNum,
parameterForge,
propertyType,
indexedGetter,
mappedGetter);
}
private int PrefixedStreamName(
IList<Chainable> chainSpec,
StreamTypeService streamTypeService)
{
if (chainSpec.Count < 1) {
return -1;
}
var spec = chainSpec[0];
if (!(spec is ChainableName)) {
return -1;
}
var name = (ChainableName) spec;
return streamTypeService.GetStreamNumForStreamName(name.Name);
}
public override void Accept(ExprNodeVisitor visitor)
{
base.Accept(visitor);
ExprNodeUtilityQuery.AcceptChain(visitor, _chainSpec);
}
public override void Accept(ExprNodeVisitorWithParent visitor)
{
base.Accept(visitor);
ExprNodeUtilityQuery.AcceptChain(visitor, _chainSpec);
}
public override void AcceptChildnodes(
ExprNodeVisitorWithParent visitor,
ExprNode parent)
{
base.AcceptChildnodes(visitor, parent);
ExprNodeUtilityQuery.AcceptChain(visitor, _chainSpec, this);
}
public override void ReplaceUnlistedChildNode(
ExprNode nodeToReplace,
ExprNode newNode)
{
ExprNodeUtilityModify.ReplaceChainChildNode(nodeToReplace, newNode, _chainSpec);
}
public IList<Chainable> ChainSpec {
get => _chainSpec;
set => _chainSpec = value.AsReadOnlyList();
}
public ExprEvaluator ExprEvaluator {
get {
CheckValidated(_forge);
return _forge.ExprEvaluator;
}
}
public bool IsConstantResult {
get {
CheckValidated(_forge);
return _forge.IsReturnsConstantResult;
}
}
public override ExprForge Forge {
get {
CheckValidated(_forge);
return _forge;
}
}
public int? StreamReferencedIfAny {
get {
CheckValidated(_forge);
return _forge.StreamNumReferenced;
}
}
public string RootPropertyNameIfAny {
get {
CheckValidated(_forge);
return _forge.RootPropertyName;
}
}
public override void ToPrecedenceFreeEPL(
TextWriter writer,
ExprNodeRenderableFlags flags)
{
if (ChildNodes.Length != 0) {
writer.Write(ExprNodeUtilityPrint.ToExpressionStringMinPrecedenceSafe(ChildNodes[0]));
}
ExprNodeUtilityPrint.ToExpressionString(_chainSpec, writer, ChildNodes.Length != 0, null);
}
public override ExprPrecedenceEnum Precedence => ExprPrecedenceEnum.UNARY;
public IDictionary<string, object> EventType => null;
public override bool EqualsNode(
ExprNode node,
bool ignoreStreamPrefix)
{
if (!(node is ExprDotNodeImpl)) {
return false;
}
var other = (ExprDotNodeImpl) node;
if (other._chainSpec.Count != _chainSpec.Count) {
return false;
}
for (var i = 0; i < _chainSpec.Count; i++) {
if (!_chainSpec[i].Equals(other._chainSpec[i])) {
return false;
}
}
return true;
}
public IList<ExprNode> AdditionalNodes => ExprNodeUtilityQuery.CollectChainParameters(_chainSpec);
public VariableMetaData IsVariableOpGetName(VariableCompileTimeResolver variableCompileTimeResolver)
{
if (_chainSpec.Count > 0 && _chainSpec[0] is ChainableName) {
return variableCompileTimeResolver.Resolve(((ChainableName) _chainSpec[0]).Name);
}
return null;
}
private ExprValidationException HandleNotFound(string name)
{
var appDotMethodDidYouMean = GetAppDotMethodDidYouMean();
var message = "Unknown single-row function, expression declaration, script or aggregation function named '" + name + "' could not be resolved";
if (appDotMethodDidYouMean != null) {
message += " (did you mean '" + appDotMethodDidYouMean + "')";
}
return new ExprValidationException(message);
}
private string GetAppDotMethodDidYouMean()
{
var lhsName = _chainSpec[0].GetRootNameOrEmptyString().ToLowerInvariant();
if (lhsName.Equals("rectangle")) {
return "rectangle.intersects";
}
if (lhsName.Equals("point")) {
return "point.inside";
}
return null;
}
private ExprAppDotMethodImpl GetAppDotMethod(bool filterExpression)
{
if (_chainSpec.Count < 2) {
return null;
}
if (!(_chainSpec[1] is ChainableCall)) {
return null;
}
var call = (ChainableCall) _chainSpec[1];
var lhsName = _chainSpec[0].GetRootNameOrEmptyString();
var operationName = call.Name.ToLowerInvariant();
var pointInside = lhsName.Equals("point") && operationName.Equals("inside");
var rectangleIntersects = lhsName.Equals("rectangle") && operationName.Equals("intersects");
if (!pointInside && !rectangleIntersects) {
return null;
}
if (call.Parameters.Count != 1) {
throw GetAppDocMethodException(lhsName, operationName);
}
var param = call.Parameters[0];
if (!(param is ExprDotNode)) {
throw GetAppDocMethodException(lhsName, operationName);
}
var compared = (ExprDotNode) call.Parameters[0];
if (compared.ChainSpec.Count != 1) {
throw GetAppDocMethodException(lhsName, operationName);
}
var rhsName = compared.ChainSpec[0].GetRootNameOrEmptyString().ToLowerInvariant();
var pointInsideRectangle = pointInside && rhsName.Equals("rectangle");
var rectangleIntersectsRectangle = rectangleIntersects && rhsName.Equals("rectangle");
if (!pointInsideRectangle && !rectangleIntersectsRectangle) {
throw GetAppDocMethodException(lhsName, operationName);
}
var lhsExpressions = _chainSpec[0].GetParametersOrEmpty();
ExprNode[] indexNamedParameter = null;
IList<ExprNode> lhsExpressionsValues = new List<ExprNode>();
foreach (var lhsExpression in lhsExpressions) {
if (lhsExpression is ExprNamedParameterNode) {
var named = (ExprNamedParameterNode) lhsExpression;
if (named.ParameterName.Equals(ExprDotNodeConstants.FILTERINDEX_NAMED_PARAMETER, StringComparison.InvariantCultureIgnoreCase)) {
if (!filterExpression) {
throw new ExprValidationException("The '" + named.ParameterName + "' named parameter can only be used in in filter expressions");
}
indexNamedParameter = named.ChildNodes;
}
else {
throw new ExprValidationException(lhsName + " does not accept '" + named.ParameterName + "' as a named parameter");
}
}
else {
lhsExpressionsValues.Add(lhsExpression);
}
}
var lhs = ExprNodeUtilityQuery.ToArray(lhsExpressionsValues);
var rhs = ExprNodeUtilityQuery.ToArray(compared.ChainSpec[0].GetParametersOrEmpty());
SettingsApplicationDotMethod predefined;
if (pointInsideRectangle) {
predefined = new SettingsApplicationDotMethodPointInsideRectangle(this, lhsName, lhs, operationName, rhsName, rhs, indexNamedParameter);
}
else {
predefined = new SettingsApplicationDotMethodRectangeIntersectsRectangle(this, lhsName, lhs, operationName, rhsName, rhs, indexNamedParameter);
}
return new ExprAppDotMethodImpl(predefined);
}
public bool IsLocalInlinedClass => _forge.IsLocalInlinedClass;
private ExprValidationException GetAppDocMethodException(
string lhsName,
string operationName)
{
return new ExprValidationException(lhsName + "." + operationName + " requires a single rectangle as parameter");
}
private class PropertyInfoPairDesc
{
public PropertyInfoPairDesc(ExprDotNodeForgeRootChild forge)
{
Forge = forge;
}
public ExprDotNodeForgeRootChild Forge { get; }
public void Apply(ExprDotNodeImpl node)
{
node._forge = Forge;
}
}
}
} // end of namespace
|
espertechinc/nesper
|
src/NEsper.Common/common/internal/epl/expression/dot/core/ExprDotNodeImpl.cs
|
C#
|
gpl-2.0
| 41,544
|
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
void printvalues(int **data, int size)
{
int i, j;
for (i = 0; i < size; i++) {
for (j = 0; j < size; j++) {
printf("%d ", data[i][j]);
}
printf("\n");
}
}
int totalactivephones(int **data, int X1, int X2, int Y1, int Y2)
{
// printf("find total active phones: X1: %d X2: %d, Y1: %d Y2: %d\n", X1, X2, Y1, Y2);
int i, j;
int total = 0;
for (i = X1; i <= X2; i++) {
for (j = Y1; j <= Y2; j++) {
total += data[i][j];
}
}
return total;
}
int main ()
{
int I, S, X, Y, A, L, B, R, T;
int **data;
int i;
scanf("%d %d\n", &I, &S);
data = (int **) zalloc(S * sizeof(int *));
for (i = 0; i < S; i++) {
data[i] = (int *) zalloc(S * sizeof(int));
}
scanf("%d", &I);
while (I != 3) {
switch (I) {
case 1:
scanf("%d %d %d\n", &X, &Y, &A);
data[X][Y] += A;
//printf("%d %d %d %d\n", I, X, Y, A);
//printvalues(data, S);
break;
case 2:
scanf("%d %d %d %d\n", &L, &B, &R, &T);
//printf("%d %d %d %d %d\n", I, L, B, R, T);
//printvalues(data, S);
printf("%d\n", totalactivephones(data, L, R, B, T));
break;
}
scanf("%d", &I);
}
for (i = 0; i < S; i++)
free(data[i]);
free(data);
//printf("Terminating\n");
return 0;
}
|
pankajdube/practice
|
spoj/nkmobile_debug.c
|
C
|
gpl-2.0
| 1,308
|
package org.openymsg.legacy.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.openymsg.SlowTest;
import org.openymsg.legacy.network.FireEvent;
import org.openymsg.legacy.network.ServiceType;
import org.openymsg.legacy.network.Session;
import org.openymsg.legacy.network.Status;
import org.openymsg.legacy.network.YahooProtocol;
import org.openymsg.legacy.network.YahooUser;
import org.openymsg.legacy.network.event.SessionFriendEvent;
import org.openymsg.legacy.network.event.WaitListener;
import org.openymsg.legacy.roster.Roster;
import java.io.IOException;
import java.util.Collection;
import java.util.HashSet;
public class StatusIT extends YahooTestAbstract {
/**
* Checks if every Status long value is unique.
*/
@Test
public void testGetValue() {
final Collection<Long> checkedValues = new HashSet<Long>();
final Status[] types = Status.values();
for (int i = 0; i < types.length; i++) {
final Long statusLongValue = Long.valueOf(types[i].getValue());
assertFalse("Non-unique Status value " + types[i].getValue(), checkedValues.contains(statusLongValue));
checkedValues.add(statusLongValue);
}
}
// @Test
public void testChangeStatus() throws IllegalArgumentException, IOException {
final Roster roster = sess1.getRoster();
final boolean existinList = roster.containsUser(OTHERUSR);
if (!existinList) {
roster.add(new YahooUser(OTHERUSR, "group", YahooProtocol.YAHOO));
listener1.waitForEvent(5, ServiceType.FRIENDADD);
}
changeStatus(Status.BRB);
changeStatus(Status.BUSY);
changeStatus(Status.NOTATHOME);
changeStatus(Status.NOTATDESK);
changeStatus(Status.NOTINOFFICE);
changeStatus(Status.ONPHONE);
changeStatus(Status.ONVACATION);
changeStatus(Status.OUTTOLUNCH);
changeStatus(Status.STEPPEDOUT);
changeStatus(Status.INVISIBLE);
changeStatus(Status.OFFLINE);
changeStatus(Status.AVAILABLE);
}
// @Test
// TODO: this test fails because the two user are not subscribed to each
// other.
public void testReceiveLogoutStatus() throws Exception {
sess2.logout();
FireEvent event = listener1.waitForEvent(5, ServiceType.Y6_STATUS_UPDATE);
assertNotNull(event);
System.out.println(event);
SessionFriendEvent sfe = (SessionFriendEvent) event.getEvent();
assertEquals(sfe.getUser().getId(), OTHERUSR);
assertEquals(sfe.getUser().getStatus(), Status.OFFLINE);
sess2.login(OTHERUSR, OTHERPWD);
}
private void changeStatus(Status status) throws IllegalArgumentException, IOException {
listener1.clearEvents();
sess2.setStatus(status);
FireEvent event = listener1.waitForEvent(5, ServiceType.Y6_STATUS_UPDATE);
assertNotNull(event);
SessionFriendEvent sfe = (SessionFriendEvent) event.getEvent();
assertEquals(sfe.getUser().getId(), OTHERUSR);
assertEquals(sfe.getUser().getStatus(), status);
}
@Test
@Category(SlowTest.class)
public void testServerBanYouout4AnotherLoginWithSameUser() throws Exception {
Session sessKiller = new Session();
listener2.clearEvents();
Thread.sleep(500);
WaitListener sl = new WaitListener(sessKiller);
sessKiller.login(OTHERUSR, OTHERPWD);
sl.waitForEvent(5, ServiceType.LOGON);
FireEvent event = listener2.waitForEvent(5, ServiceType.LOGOFF);
assertNotNull(event);
sess2.login(OTHERUSR, OTHERPWD);
listener2.waitForEvent(5, ServiceType.LOGON);
}
}
|
OpenYMSG/openymsg
|
src/test/java/org/openymsg/legacy/test/StatusIT.java
|
Java
|
gpl-2.0
| 3,490
|
-- MySQL dump 10.13
--
-- Host: localhost Database: mangos
-- ------------------------------------------------------
-- Server version 5.5.32
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `db_version`
--
DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) DEFAULT NULL,
`creature_ai_version` varchar(120) DEFAULT NULL,
`cache_id` int(10) DEFAULT '0',
`required_c13077_01_mangos_spell_template` bit(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
-- Dumping data for table `db_version`
--
LOCK TABLES `db_version` WRITE;
/*!40000 ALTER TABLE `db_version` DISABLE KEYS */;
INSERT INTO `db_version` VALUES
('Mangos default database.','Creature EventAI not provided.',0,NULL);
/*!40000 ALTER TABLE `db_version` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `achievement_criteria_requirement`
--
DROP TABLE IF EXISTS `achievement_criteria_requirement`;
CREATE TABLE `achievement_criteria_requirement` (
`criteria_id` mediumint(8) NOT NULL,
`type` tinyint(3) unsigned NOT NULL DEFAULT '0',
`value1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`value2` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`criteria_id`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Achievment system';
--
-- Dumping data for table `achievement_criteria_requirement`
--
LOCK TABLES `achievement_criteria_requirement` WRITE;
/*!40000 ALTER TABLE `achievement_criteria_requirement` DISABLE KEYS */;
/*!40000 ALTER TABLE `achievement_criteria_requirement` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `achievement_reward`
--
DROP TABLE IF EXISTS `achievement_reward`;
CREATE TABLE `achievement_reward` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`gender` tinyint(3) NOT NULL DEFAULT '2',
`title_A` mediumint(8) unsigned NOT NULL DEFAULT '0',
`title_H` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) unsigned NOT NULL DEFAULT '0',
`sender` mediumint(8) unsigned NOT NULL DEFAULT '0',
`subject` varchar(255) DEFAULT NULL,
`text` text,
PRIMARY KEY (`entry`,`gender`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Achievment system';
--
-- Dumping data for table `achievement_reward`
--
LOCK TABLES `achievement_reward` WRITE;
/*!40000 ALTER TABLE `achievement_reward` DISABLE KEYS */;
/*!40000 ALTER TABLE `achievement_reward` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `areatrigger_involvedrelation`
--
DROP TABLE IF EXISTS `areatrigger_involvedrelation`;
CREATE TABLE `areatrigger_involvedrelation` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier',
`quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Trigger System';
--
-- Dumping data for table `areatrigger_involvedrelation`
--
LOCK TABLES `areatrigger_involvedrelation` WRITE;
/*!40000 ALTER TABLE `areatrigger_involvedrelation` DISABLE KEYS */;
/*!40000 ALTER TABLE `areatrigger_involvedrelation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `areatrigger_tavern`
--
DROP TABLE IF EXISTS `areatrigger_tavern`;
CREATE TABLE `areatrigger_tavern` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier',
`name` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Trigger System';
--
-- Dumping data for table `areatrigger_tavern`
--
LOCK TABLES `areatrigger_tavern` WRITE;
/*!40000 ALTER TABLE `areatrigger_tavern` DISABLE KEYS */;
/*!40000 ALTER TABLE `areatrigger_tavern` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `areatrigger_teleport`
--
DROP TABLE IF EXISTS `areatrigger_teleport`;
CREATE TABLE `areatrigger_teleport` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier',
`name` text,
`required_level` tinyint(3) unsigned NOT NULL DEFAULT '0',
`required_item` mediumint(8) unsigned NOT NULL DEFAULT '0',
`required_item2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`heroic_key` mediumint(8) unsigned NOT NULL DEFAULT '0',
`heroic_key2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`required_quest_done` int(11) unsigned NOT NULL DEFAULT '0',
`required_quest_done_heroic` int(11) unsigned NOT NULL DEFAULT '0',
`target_map` smallint(5) unsigned NOT NULL DEFAULT '0',
`target_position_x` float NOT NULL DEFAULT '0',
`target_position_y` float NOT NULL DEFAULT '0',
`target_position_z` float NOT NULL DEFAULT '0',
`target_orientation` float NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Trigger System';
--
-- Dumping data for table `areatrigger_teleport`
--
LOCK TABLES `areatrigger_teleport` WRITE;
/*!40000 ALTER TABLE `areatrigger_teleport` DISABLE KEYS */;
/*!40000 ALTER TABLE `areatrigger_teleport` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `battleground_events`
--
DROP TABLE IF EXISTS `battleground_events`;
CREATE TABLE `battleground_events` (
`map` smallint(5) NOT NULL,
`event1` tinyint(3) unsigned NOT NULL,
`event2` tinyint(3) unsigned NOT NULL,
`description` varchar(255) NOT NULL,
PRIMARY KEY (`map`,`event1`,`event2`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `battleground_events`
--
LOCK TABLES `battleground_events` WRITE;
/*!40000 ALTER TABLE `battleground_events` DISABLE KEYS */;
/*!40000 ALTER TABLE `battleground_events` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `battleground_template`
--
DROP TABLE IF EXISTS `battleground_template`;
CREATE TABLE `battleground_template` (
`id` mediumint(8) unsigned NOT NULL,
`MinPlayersPerTeam` smallint(5) unsigned NOT NULL DEFAULT '0',
`MaxPlayersPerTeam` smallint(5) unsigned NOT NULL DEFAULT '0',
`AllianceStartLoc` mediumint(8) unsigned NOT NULL,
`AllianceStartO` float NOT NULL,
`HordeStartLoc` mediumint(8) unsigned NOT NULL,
`HordeStartO` float NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `battleground_template`
--
LOCK TABLES `battleground_template` WRITE;
/*!40000 ALTER TABLE `battleground_template` DISABLE KEYS */;
INSERT INTO `battleground_template` VALUES
(1,40,40,611,2.72532,610,2.27452),
(2,10,10,769,3.14159,770,3.14159),
(3,15,15,890,3.40156,889,0.263892),
(4,5,5,929,0,936,3.14159),
(5,5,5,939,0,940,3.14159),
(6,5,5,0,0,0,0),
(7,15,15,1103,3.40156,1104,0.263892),
(8,5,5,1258,0,1259,3.14159),
(9,15,15,1367,0,1368,0),
(10,5,5,1362,0,1363,0),
(11,5,5,1364,0,1365,0),
(30,40,40,1485,0,1486,0),
(32,5,40,0,0,0,0);
/*!40000 ALTER TABLE `battleground_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `battlemaster_entry`
--
DROP TABLE IF EXISTS `battlemaster_entry`;
CREATE TABLE `battlemaster_entry` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Entry of a creature',
`bg_template` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Battleground template id',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `battlemaster_entry`
--
LOCK TABLES `battlemaster_entry` WRITE;
/*!40000 ALTER TABLE `battlemaster_entry` DISABLE KEYS */;
/*!40000 ALTER TABLE `battlemaster_entry` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `command`
--
DROP TABLE IF EXISTS `command`;
CREATE TABLE `command` (
`name` varchar(50) NOT NULL DEFAULT '',
`security` tinyint(3) unsigned NOT NULL DEFAULT '0',
`help` longtext,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Chat System';
--
-- Dumping data for table `command`
--
LOCK TABLES `command` WRITE;
/*!40000 ALTER TABLE `command` DISABLE KEYS */;
INSERT INTO `command` VALUES
('account',0,'Syntax: .account\r\n\r\nDisplay the access level of your account.'),
('account characters',3,'Syntax: .account characters [#accountId|$accountName]\r\n\r\nShow list all characters for account selected by provided #accountId or $accountName, or for selected player in game.'),
('account create',4,'Syntax: .account create $account $password [$expansion]\r\n\r\nCreate account and set password to it. Optionally, you may also set another expansion for this account than the defined default value.'),
('account delete',4,'Syntax: .account delete $account\r\n\r\nDelete account with all characters.'),
('account lock',0,'Syntax: .account lock [on|off]\r\n\r\nAllow login from account only from current used IP or remove this requirement.'),
('account onlinelist',4,'Syntax: .account onlinelist\r\n\r\nShow list of online accounts.'),
('account password',0,'Syntax: .account password $old_password $new_password $new_password\r\n\r\nChange your account password.'),
('account set addon',3,'Syntax: .account set addon [#accountId|$accountName] #addon\r\n\r\nSet user (possible targeted) expansion addon level allowed. Addon values: 0 - normal, 1 - tbc, 2 - wotlk.'),
('account set gmlevel',4,'Syntax: .account set gmlevel [#accountId|$accountName] #level\r\n\r\nSet the security level for targeted player (can\'t be used at self) or for #accountId or $accountName to a level of #level.\r\n\r\n#level may range from 0 to 3.'),
('account set password',4,'Syntax: .account set password (#accountId|$accountName) $password $password\r\n\r\nSet password for account.'),
('achievement',3,'Syntax: .achievement $playername #achivementid\r\n\r\nShow state achievment #achivmentid (can be shift link) and list of achievement criteria with progress data for selected player in game or by player name.'),
('achievement add',3,'Syntax: .achievement add $playername #achivementid\r\n\r\nComplete achievement and all it\'s criteria for selected player in game or by player name. Command can\'t be used for counter achievements.'),
('achievement criteria add',3,'Syntax: .achievement criteria add $playername #criteriaid #change\r\n\r\nIncrease progress for non-completed criteria at #change for selected player in game or by player name. If #chnage not provided then non-counter criteria progress set to completed state. For counter criteria increased at 1.'),
('achievement criteria remove',3,'Syntax: .achievement criteria remove $playername #criteriaid #change\r\n\r\necrease progress for criteria at #change for selected player in game or by player name. If #chnage not provided then criteria progress reset to 0.'),
('achievement remove',3,'Syntax: .achievement remove $playername #achivementid\r\n\r\nRemove complete state for achievement #achivmentid and reset all achievement\'s criteria for selected player in game or by player name. Also command can be used for reset counter achievements.'),
('additem',3,'Syntax: .additem #itemid/[#itemname]/#shift-click-item-link #itemcount\r\n\r\nAdds the specified number of items of id #itemid (or exact (!) name $itemname in brackets, or link created by shift-click at item in inventory or recipe) to your or selected character inventory. If #itemcount is omitted, only one item will be added.\r\n.'),
('additemset',3,'Syntax: .additemset #itemsetid\r\n\r\nAdd items from itemset of id #itemsetid to your or selected character inventory. Will add by one example each item from itemset.'),
('ahbot items amount',3,'Syntax: .ahbot items amount $GreyItems $WhiteItems $GreenItems $BlueItems $PurpleItems $OrangeItems $YellowItems\r\n\r\nSet amount of each items color be selled on auction.'),
('ahbot items amount blue',3,'Syntax: .ahbot items amount blue $BlueItems\r\n\r\nSet amount of Blue color items be selled on auction.'),
('ahbot items amount green',3,'Syntax: .ahbot items amount green $GreenItems\r\n\r\nSet amount of Green color items be selled on auction.'),
('ahbot items amount grey',3,'Syntax: .ahbot items amount grey $GreyItems\r\n\r\nSet amount of Grey color items be selled on auction.'),
('ahbot items amount orange',3,'Syntax: .ahbot items amount orange $OrangeItems\r\n\r\nSet amount of Orange color items be selled on auction.'),
('ahbot items amount purple',3,'Syntax: .ahbot items amount purple $PurpleItems\r\n\r\nSet amount of Purple color items be selled on auction.'),
('ahbot items amount white',3,'Syntax: .ahbot items amount white $WhiteItems\r\n\r\nSet amount of White color items be selled on auction.'),
('ahbot items amount yellow',3,'Syntax: .ahbot items amount yellow $YellowItems\r\n\r\nSet amount of Yellow color items be selled on auction.'),
('ahbot items ratio',3,'Syntax: .ahbot items ratio $allianceratio $horderatio $neutralratio\r\n\r\nSet ratio of items in 3 auctions house.'),
('ahbot items ratio alliance',3,'Syntax: .ahbot items ratio alliance $allianceratio\r\n\r\nSet ratio of items in alliance auction house.'),
('ahbot items ratio horde',3,'Syntax: .ahbot items ratio horde $horderatio\r\n\r\nSet ratio of items in horde auction house.'),
('ahbot items ratio neutral',3,'Syntax: .ahbot items ratio neutral $neutralratio\r\n\r\nSet ratio of items in $neutral auction house.'),
('ahbot rebuild',3,'Syntax: .ahbot rebuild [all]\r\n\r\nExpire all actual auction of ahbot except bided by player. Bided auctions could be forced to expire by using \"all\" option. AHBot will re-fill auctions using current settings.'),
('ahbot reload',3,'Syntax: .ahbot reload\r\n\r\nReload AHBot settings from configuration file.'),
('ahbot status',3,'Syntax: .ahbot status [all]\r\n\r\nShow current ahbot state data in short form, and with \"all\" with details.'),
('announce',1,'Syntax: .announce $MessageToBroadcast\r\n\r\nSend a global message to all players online in chat log.'),
('auction',3,'Syntax: .auction\r\n\r\nShow your team auction store.'),
('auction alliance',3,'Syntax: .auction alliance\r\n\r\nShow alliance auction store independent from your team.'),
('auction goblin',3,'Syntax: .auction goblin\r\n\r\nShow goblin auction store common for all teams.'),
('auction horde',3,'Syntax: .auction horde\r\n\r\nShow horde auction store independent from your team.'),
('auction item',3,'Syntax: .auction item (alliance|horde|goblin) #itemid[:#itemcount] [[[#minbid] #buyout] [short|long|verylong]\r\n\r\nAdd new item to an specific auction house at short|long|verylong periods. Periods are the same as the ones in the in-game dialog. Created auction does not have an owner.'),
('aura',3,'Syntax: .aura #spellid\r\n\r\nAdd the aura from spell #spellid to the selected Unit.'),
('ban account',3,'Syntax: .ban account $Name $bantime $reason\r\nBan account kick player.\r\n$bantime: negative value leads to permban, otherwise use a timestring like \"4d20h3s\".'),
('ban character',3,'Syntax: .ban character $Name $bantime $reason\r\nBan account and kick player.\r\n$bantime: negative value leads to permban, otherwise use a timestring like \"4d20h3s\".'),
('ban ip',3,'Syntax: .ban ip $Ip $bantime $reason\r\nBan IP.\r\n$bantime: negative value leads to permban, otherwise use a timestring like \"4d20h3s\".'),
('baninfo account',3,'Syntax: .baninfo account $accountid\r\nWatch full information about a specific ban.'),
('baninfo character',3,'Syntax: .baninfo character $charactername \r\nWatch full information about a specific ban.'),
('baninfo ip',3,'Syntax: .baninfo ip $ip\r\nWatch full information about a specific ban.'),
('bank',3,'Syntax: .bank\r\n\r\nShow your bank inventory.'),
('banlist account',3,'Syntax: .banlist account [$Name]\r\nSearches the banlist for a account name pattern or show full list account bans.'),
('banlist character',3,'Syntax: .banlist character $Name\r\nSearches the banlist for a character name pattern. Pattern required.'),
('banlist ip',3,'Syntax: .banlist ip [$Ip]\r\nSearches the banlist for a IP pattern or show full list of IP bans.'),
('cast',3,'Syntax: .cast #spellid [triggered]\r\n Cast #spellid to selected target. If no target selected cast to self. If \'trigered\' or part provided then spell casted with triggered flag.'),
('cast back',3,'Syntax: .cast back #spellid [triggered]\r\n Selected target will cast #spellid to your character. If \'trigered\' or part provided then spell casted with triggered flag.'),
('cast dist',3,'Syntax: .cast dist #spellid [#dist [triggered]]\r\n You will cast spell to pint at distance #dist. If \'trigered\' or part provided then spell casted with triggered flag. Not all spells can be casted as area spells.'),
('cast self',3,'Syntax: .cast self #spellid [triggered]\r\nCast #spellid by target at target itself. If \'trigered\' or part provided then spell casted with triggered flag.'),
('cast target',3,'Syntax: .cast target #spellid [triggered]\r\n Selected target will cast #spellid to his victim. If \'trigered\' or part provided then spell casted with triggered flag.'),
('character achievements',2,'Syntax: .character achievements [$player_name]\r\n\r\nShow completed achievments for selected player or player find by $player_name.'),
('character customize',2,'Syntax: .character customize [$name]\r\n\r\nMark selected in game or by $name in command character for customize at next login.'),
('character deleted delete',4,'Syntax: .character deleted delete #guid|$name\r\n\r\nCompletely deletes the selected characters.\r\nIf $name is supplied, only characters with that string in their name will be deleted, if #guid is supplied, only the character with that GUID will be deleted.'),
('character deleted list',3,'Syntax: .character deleted list [#guid|$name]\r\n\r\nShows a list with all deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be selected, if #guid is supplied, only the character with that GUID will be selected.'),
('character deleted old',4,'Syntax: .character deleted old [#keepDays]\r\n\r\nCompletely deletes all characters with deleted time longer #keepDays. If #keepDays not provided the used value from mangosd.conf option \'CharDelete.KeepDays\'. If referenced config option disabled (use 0 value) then command can\'t be used without #keepDays.'),
('character deleted restore',3,'Syntax: .character deleted restore #guid|$name [$newname] [#new account]\r\n\r\nRestores deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be restored, if $guid is supplied, only the character with that GUID will be restored.\r\nIf $newname is set, the character will be restored with that name instead of the original one. If #newaccount is set, the character will be restored to specific account character list. This works only with one character!'),
('character erase',4,'Syntax: .character erase $name\r\n\r\nDelete character $name. Character finally deleted in case any deleting options.'),
('character level',3,'Syntax: .character level [$playername] [#level]\r\n\r\nSet the level of character with $playername (or the selected if not name provided) by #numberoflevels Or +1 if no #numberoflevels provided). If #numberoflevels is omitted, the level will be increase by 1. If #numberoflevels is 0, the same level will be restarted. If no character is selected and name not provided, increase your level. Command can be used for offline character. All stats and dependent values recalculated. At level decrease talents can be reset if need. Also at level decrease equipped items with greater level requirement can be lost.'),
('character rename',2,'Syntax: .character rename [$name]\r\n\r\nMark selected in game or by $name in command character for rename at next login.'),
('character reputation',2,'Syntax: .character reputation [$player_name]\r\n\r\nShow reputation information for selected player or player find by $player_name.'),
('character titles',2,'Syntax: .character titles [$player_name]\r\n\r\nShow known titles list for selected player or player find by $player_name.'),
('combatstop',2,'Syntax: .combatstop [$playername]\r\nStop combat for selected character. If selected non-player then command applied to self. If $playername provided then attempt applied to online player $playername.'),
('commands',0,'Syntax: .commands\r\n\r\nDisplay a list of available commands for your account level.'),
('cooldown',3,'Syntax: .cooldown [#spell_id]\r\n\r\nRemove all (if spell_id not provided) or #spel_id spell cooldown from selected character or you (if no selection).'),
('damage',3,'Syntax: .damage $damage_amount [$school [$spellid]]\r\n\r\nApply $damage to target. If not $school and $spellid provided then this flat clean melee damage without any modifiers. If $school provided then damage modified by armor reduction (if school physical), and target absorbing modifiers and result applied as melee damage to target. If spell provided then damage modified and applied as spell damage. $spellid can be shift-link.'),
('debug anim',2,'Syntax: .debug anim #emoteid\r\n\r\nPlay emote #emoteid for your character.'),
('debug arena',3,'Syntax: .debug arena\r\n\r\nToggle debug mode for arenas. In debug mode GM can start arena with single player.'),
('debug bg',3,'Syntax: .debug bg\r\n\r\nToggle debug mode for battlegrounds. In debug mode GM can start battleground with single player.'),
('debug getitemvalue',3,'Syntax: .debug getitemvalue #itemguid #field [int|hex|bit|float]\r\n\r\nGet the field #field of the item #itemguid in your inventroy.\r\n\r\nUse type arg for set output format: int (decimal number), hex (hex value), bit (bitstring), float. By default use integer output.'),
('debug getvalue',3,'Syntax: .debug getvalue #field [int|hex|bit|float]\r\n\r\nGet the field #field of the selected target. If no target is selected, get the content of your field.\r\n\r\nUse type arg for set output format: int (decimal number), hex (hex value), bit (bitstring), float. By default use integer output.'),
('debug moditemvalue',3,'Syntax: .debug moditemvalue #guid #field [int|float| &= | |= | &=~ ] #value\r\n\r\nModify the field #field of the item #itemguid in your inventroy by value #value. \r\n\r\nUse type arg for set mode of modification: int (normal add/subtract #value as decimal number), float (add/subtract #value as float number), &= (bit and, set to 0 all bits in value if it not set to 1 in #value as hex number), |= (bit or, set to 1 all bits in value if it set to 1 in #value as hex number), &=~ (bit and not, set to 0 all bits in value if it set to 1 in #value as hex number). By default expect integer add/subtract.'),
('debug modvalue',3,'Syntax: .debug modvalue #field [int|float| &= | |= | &=~ ] #value\r\n\r\nModify the field #field of the selected target by value #value. If no target is selected, set the content of your field.\r\n\r\nUse type arg for set mode of modification: int (normal add/subtract #value as decimal number), float (add/subtract #value as float number), &= (bit and, set to 0 all bits in value if it not set to 1 in #value as hex number), |= (bit or, set to 1 all bits in value if it set to 1 in #value as hex number), &=~ (bit and not, set to 0 all bits in value if it set to 1 in #value as hex number). By default expect integer add/subtract.'),
('debug play cinematic',1,'Syntax: .debug play cinematic #cinematicid\r\n\r\nPlay cinematic #cinematicid for you. You stay at place while your mind fly.\r\n'),
('debug play movie',1,'Syntax: .debug play movie #movieid\r\n\r\nPlay movie #movieid for you.'),
('debug play sound',1,'Syntax: .debug play sound #soundid\r\n\r\nPlay sound with #soundid.\r\nSound will be play only for you. Other players do not hear this.\r\nWarning: client may have more 5000 sounds...'),
('debug setitemvalue',3,'Syntax: .debug setitemvalue #guid #field [int|hex|bit|float] #value\r\n\r\nSet the field #field of the item #itemguid in your inventroy to value #value.\r\n\r\nUse type arg for set input format: int (decimal number), hex (hex value), bit (bitstring), float. By default expect integer input format.'),
('debug setvalue',3,'Syntax: .debug setvalue #field [int|hex|bit|float] #value\r\n\r\nSet the field #field of the selected target to value #value. If no target is selected, set the content of your field.\r\n\r\nUse type arg for set input format: int (decimal number), hex (hex value), bit (bitstring), float. By default expect integer input format.'),
('debug spellcoefs',3,'Syntax: .debug spellcoefs #spellid\r\n\r\nShow default calculated and DB stored coefficients for direct/dot heal/damage.'),
('debug spellmods',3,'Syntax: .debug spellmods (flat|pct) #spellMaskBitIndex #spellModOp #value\r\n\r\nSet at client side spellmod affect for spell that have bit set with index #spellMaskBitIndex in spell family mask for values dependent from spellmod #spellModOp to #value.'),
('delticket',2,'Syntax: .delticket all\r\n .delticket #num\r\n .delticket $character_name\r\n\rall to dalete all tickets at server, $character_name to delete ticket of this character, #num to delete ticket #num.'),
('demorph',2,'Syntax: .demorph\r\n\r\nDemorph the selected player.'),
('die',3,'Syntax: .die\r\n\r\nKill the selected player. If no player is selected, it will kill you.'),
('dismount',0,'Syntax: .dismount\r\n\r\nDismount you, if you are mounted.'),
('distance',3,'Syntax: .distance [$name/$link]\r\n\r\nDisplay the distance from your character to the selected creature/player, or player with name $name, or player/creature/gameobject pointed to shift-link with guid.'),
('event',2,'Syntax: .event #event_id\r\nShow details about event with #event_id.'),
('event list',2,'Syntax: .event list\r\nShow list of currently active events.\r\nShow list of all events'),
('event start',2,'Syntax: .event start #event_id\r\nStart event #event_id. Set start time for event to current moment (change not saved in DB).'),
('event stop',2,'Syntax: .event stop #event_id\r\nStop event #event_id. Set start time for event to time in past that make current moment is event stop time (change not saved in DB).'),
('explorecheat',3,'Syntax: .explorecheat #flag\r\n\r\nReveal or hide all maps for the selected player. If no player is selected, hide or reveal maps to you.\r\n\r\nUse a #flag of value 1 to reveal, use a #flag value of 0 to hide all maps.'),
('flusharenapoints',3,'Syntax: .flusharenapoints\r\n\r\nUse it to distribute arena points based on arena team ratings, and start a new week.'),
('gearscore',3,'Syntax: .gearscore [#withBags] [#withBank]\r\n\r\nShow selected player\'s gear score. Check items in bags if #withBags != 0 and check items in Bank if #withBank != 0. Default: 1 for bags and 0 for bank'),
('gm',1,'Syntax: .gm [on/off]\r\n\r\nEnable or Disable in game GM MODE or show current state of on/off not provided.'),
('gm chat',1,'Syntax: .gm chat [on/off]\r\n\r\nEnable or disable chat GM MODE (show gm badge in messages) or show current state of on/off not provided.'),
('gm fly',3,'Syntax: .gm fly [on/off]\r\nEnable/disable gm fly mode.'),
('gm ingame',0,'Syntax: .gm ingame\r\n\r\nDisplay a list of available in game Game Masters.'),
('gm list',3,'Syntax: .gm list\r\n\r\nDisplay a list of all Game Masters accounts and security levels.'),
('gm setview',1,'Syntax: .gm setview\r\n\r\nSet farsight view on selected unit. Select yourself to set view back.'),
('gm visible',1,'Syntax: .gm visible on/off\r\n\r\nOutput current visibility state or make GM visible(on) and invisible(off) for other players.'),
('go',1,'Syntax: .go [$playername|pointlink|#x #y #z [#mapid]]\r\nTeleport your character to point with coordinates of player $playername, or coordinates of one from shift-link types: player, tele, taxinode, creature/creature_entry, gameobject/gameobject_entry, or explicit #x #y #z #mapid coordinates.'),
('go creature',1,'Syntax: .go creature (#creature_guid|$creature_name|id #creature_id)\r\nTeleport your character to creature with guid #creature_guid, or teleport your character to creature with name including as part $creature_name substring, or teleport your character to a creature that was spawned from the template with this entry #creature_id.'),
('go graveyard',1,'Syntax: .go graveyard #graveyardId\r\n Teleport to graveyard with the graveyardId specified.'),
('go grid',1,'Syntax: .go grid #gridX #gridY [#mapId]\r\n\r\nTeleport the gm to center of grid with provided indexes at map #mapId (or current map if it not provided).'),
('go object',1,'Syntax: .go object (#gameobject_guid|$gameobject_name|id #gameobject_id)\r\nTeleport your character to gameobject with guid #gameobject_guid, or teleport your character to gameobject with name including as part $gameobject_name substring, or teleport your character to a gameobject that was spawned from the template with this entry #gameobject_id.'),
('go taxinode',1,'Syntax: .go taxinode #taxinode\r\n\r\nTeleport player to taxinode coordinates. You can look up zone using .lookup taxinode $namepart'),
('go trigger',1,'Syntax: .go trigger (#trigger_id|$trigger_shift-link|$trigger_target_shift-link) [target]\r\n\r\nTeleport your character to areatrigger with id #trigger_id or trigger id associated with shift-link. If additional arg \"target\" provided then character will teleported to areatrigger target point.'),
('go xy',1,'Syntax: .go xy #x #y [#mapid]\r\n\r\nTeleport player to point with (#x,#y) coordinates at ground(water) level at map #mapid or same map if #mapid not provided.'),
('go xyz',1,'Syntax: .go xyz #x #y #z [#mapid]\r\n\r\nTeleport player to point with (#x,#y,#z) coordinates at ground(water) level at map #mapid or same map if #mapid not provided.'),
('go zonexy',1,'Syntax: .go zonexy #x #y [#zone]\r\n\r\nTeleport player to point with (#x,#y) client coordinates at ground(water) level in zone #zoneid or current zone if #zoneid not provided. You can look up zone using .lookup area $namepart'),
('gobject add',2,'Syntax: .gobject add #id <spawntimeSecs>\r\n\r\nAdd a game object from game object templates to the world at your current location using the #id.\r\nspawntimesecs sets the spawntime, it is optional.\r\n\r\nNote: this is a copy of .gameobject.'),
('gobject delete',2,'Syntax: .gobject delete #go_guid\r\nDelete gameobject with guid #go_guid.'),
('gobject move',2,'Syntax: .gobject move #goguid [#x #y #z]\r\n\r\nMove gameobject #goguid to character coordinates (or to (#x,#y,#z) coordinates if its provide).'),
('gobject near',2,'Syntax: .gobject near [#distance]\r\n\r\nOutput gameobjects at distance #distance from player. Output gameobject guids and coordinates sorted by distance from character. If #distance not provided use 10 as default value.'),
('gobject setphase',2,'Syntax: .gobject setphase #guid #phasemask\r\n\r\nGameobject with DB guid #guid phasemask changed to #phasemask with related world vision update for players. Gameobject state saved to DB and persistent.'),
('gobject target',2,'Syntax: .gobject target [#go_id|#go_name_part]\r\n\r\nLocate and show position nearest gameobject. If #go_id or #go_name_part provide then locate and show position of nearest gameobject with gameobject template id #go_id or name included #go_name_part as part.'),
('gobject turn',2,'Syntax: .gobject turn #goguid [#z_angle]\r\n\r\nChanges gameobject #goguid orientation (rotates gameobject around z axis). Optional parameters are (#y_angle,#x_angle) values that represents rotation angles around y and x axes.'),
('goname',1,'Syntax: .goname [$charactername]\r\n\r\nTeleport to the given character. Either specify the character name or click on the character\'s portrait, e.g. when you are in a group. Character can be offline.'),
('gps',1,'Syntax: .gps [$name|$shift-link]\r\n\r\nDisplay the position information for a selected character or creature (also if player name $name provided then for named player, or if creature/gameobject shift-link provided then pointed creature/gameobject if it loaded). Position information includes X, Y, Z, and orientation, map Id and zone Id'),
('groupgo',1,'Syntax: .groupgo [$charactername]\r\n\r\nTeleport the given character and his group to you. Teleported only online characters but original selected group member can be offline.'),
('guid',2,'Syntax: .guid\r\n\r\nDisplay the GUID for the selected character.'),
('guild create',2,'Syntax: .guild create [$GuildLeaderName] \"$GuildName\"\r\n\r\nCreate a guild named $GuildName with the player $GuildLeaderName (or selected) as leader. Guild name must in quotes.'),
('guild delete',2,'Syntax: .guild delete \"$GuildName\"\r\n\r\nDelete guild $GuildName. Guild name must in quotes.'),
('guild invite',2,'Syntax: .guild invite [$CharacterName] \"$GuildName\"\r\n\r\nAdd player $CharacterName (or selected) into a guild $GuildName. Guild name must in quotes.'),
('guild rank',2,'Syntax: .guild rank $CharacterName #Rank\r\n\r\nSet for $CharacterName rank #Rank in a guild.'),
('guild uninvite',2,'Syntax: .guild uninvite [$CharacterName]\r\n\r\nRemove player $CharacterName (or selected) from a guild.'),
('help',0,'Syntax: .help [$command]\r\n\r\nDisplay usage instructions for the given $command. If no $command provided show list available commands.'),
('hidearea',3,'Syntax: .hidearea #areaid\r\n\r\nHide the area of #areaid to the selected character. If no character is selected, hide this area to you.'),
('honor add',2,'Syntax: .honor add $amount\r\n\r\nAdd a certain amount of honor (gained today) to the selected player.'),
('honor addkill',2,'Syntax: .honor addkill\r\n\r\nAdd the targeted unit as one of your pvp kills today (you only get honor if it\'s a racial leader or a player)'),
('honor updatekills',2,'Syntax: .honor updatekills\r\n\r\nForce the yesterday\'s honor kill fields to be updated with today\'s data, which will get reset for the selected player.'),
('instance listbinds',3,'Syntax: .instance listbinds\r\n Lists the binds of the selected player.'),
('instance savedata',3,'Syntax: .instance savedata\r\n Save the InstanceData for the current player\'s map to the DB.'),
('instance stats',3,'Syntax: .instance stats\r\n Shows statistics about instances.'),
('instance unbind',3,'Syntax: .instance unbind all\r\n All of the selected player\'s binds will be cleared.\r\n.instance unbind #mapid\r\n Only the specified #mapid instance will be cleared.'),
('itemmove',2,'Syntax: .itemmove #sourceslotid #destinationslotid\r\n\r\nMove an item from slots #sourceslotid to #destinationslotid in your inventory\r\n\r\nNot yet implemented'),
('kick',2,'Syntax: .kick [$charactername]\r\n\r\nKick the given character name from the world. If no character name is provided then the selected player (except for yourself) will be kicked.'),
('learn',3,'Syntax: .learn #spell [all]\r\n\r\nSelected character learn a spell of id #spell. If \'all\' provided then all ranks learned.'),
('learn all',3,'Syntax: .learn all\r\n\r\nLearn all big set different spell maybe useful for Administaror.'),
('learn all_crafts',2,'Syntax: .learn crafts\r\n\r\nLearn all professions and recipes.'),
('learn all_default',1,'Syntax: .learn all_default [$playername]\r\n\r\nLearn for selected/$playername player all default spells for his race/class and spells rewarded by completed quests.'),
('learn all_gm',2,'Syntax: .learn all_gm\r\n\r\nLearn all default spells for Game Masters.'),
('learn all_lang',1,'Syntax: .learn all_lang\r\n\r\nLearn all languages'),
('learn all_myclass',3,'Syntax: .learn all_myclass\r\n\r\nLearn all spells and talents available for his class.'),
('learn all_mypettalents',3,'Syntax: .learn all_mypettalents\r\n\r\nLearn all talents for your pet available for his creature type (only for hunter pets).'),
('learn all_myspells',3,'Syntax: .learn all_myspells\r\n\r\nLearn all spells (except talents and spells with first rank learned as talent) available for his class.'),
('learn all_mytalents',3,'Syntax: .learn all_mytalents\r\n\r\nLearn all talents (and spells with first rank learned as talent) available for his class.'),
('learn all_recipes',2,'Syntax: .learn all_recipes [$profession]\r\rLearns all recipes of specified profession and sets skill level to max.\rExample: .learn all_recipes enchanting'),
('levelup',3,'Syntax: .levelup [$playername] [#numberoflevels]\r\n\r\nIncrease/decrease the level of character with $playername (or the selected if not name provided) by #numberoflevels Or +1 if no #numberoflevels provided). If #numberoflevels is omitted, the level will be increase by 1. If #numberoflevels is 0, the same level will be restarted. If no character is selected and name not provided, increase your level. Command can be used for offline character. All stats and dependent VALUESrecalculated. At level decrease talents can be reset if need. Also at level decrease equipped items with greater level requirement can be lost.'),
('linkgrave',3,'Syntax: .linkgrave #graveyard_id [alliance|horde]\r\n\r\nLink current zone to graveyard for any (or alliance/horde faction ghosts). This let character ghost from zone teleport to graveyard after die if graveyard is nearest from linked to zone and accept ghost of this faction. Add only single graveyard at another map and only if no graveyards linked (or planned linked at same map).'),
('list creature',3,'Syntax: .list creature #creature_id [#max_count]\r\n\r\nOutput creatures with creature id #creature_id found in world. Output creature guids and coordinates sorted by distance from character. Will be output maximum #max_count creatures. If #max_count not provided use 10 as default value.'),
('list item',3,'Syntax: .list item #item_id [#max_count]\r\n\r\nOutput items with item id #item_id found in all character inventories, mails, auctions, and guild banks. Output item guids, item owner guid, owner account and owner name (guild name and guid in case guild bank). Will be output maximum #max_count items. If #max_count not provided use 10 as default value.'),
('list object',3,'Syntax: .list object #gameobject_id [#max_count]\r\n\r\nOutput gameobjects with gameobject id #gameobject_id found in world. Output gameobject guids and coordinates sorted by distance from character. Will be output maximum #max_count gameobject. If #max_count not provided use 10 as default value.'),
('list talents',3,'Syntax: .list talents\r\n\r\nShow list all really known (as learned spells) talent rank spells for selected player or self.'),
('loadscripts',3,'Syntax: .loadscripts $scriptlibraryname\r\n\r\nUnload current and load the script library $scriptlibraryname or reload current if $scriptlibraryname omitted, in case you changed it while the server was running.'),
('lookup account email',2,'Syntax: .lookup account email $emailpart [#limit] \r\n\r\n Searchs accounts, which email including $emailpart with optional parametr #limit of results. If #limit not provided expected 100.'),
('lookup account ip',2,'Syntax: lookup account ip $ippart [#limit] \r\n\r\n Searchs accounts, which last used ip inluding $ippart (textual) with optional parametr #$limit of results. If #limit not provided expected 100.'),
('lookup account name',2,'Syntax: .lookup account name $accountpart [#limit] \r\n\r\n Searchs accounts, which username including $accountpart with optional parametr #limit of results. If #limit not provided expected 100.'),
('lookup achievement',2,'Syntax: .lookup $name\r\nLooks up a achievement by $namepart, and returns all matches with their quest ID\'s. Achievement shift-links generated with information about achievment state for selected player. Also for completed achievments in list show complete date.'),
('lookup area',1,'Syntax: .lookup area $namepart\r\n\r\nLooks up an area by $namepart, and returns all matches with their area ID\'s.'),
('lookup creature',3,'Syntax: .lookup creature $namepart\r\n\r\nLooks up a creature by $namepart, and returns all matches with their creature ID\'s.'),
('lookup currency',3,'Syntax: .lookup currency $namepart\r\n\r\nLooks up a currency by $namepart, and returns all matches.'),
('lookup event',2,'Syntax: .lookup event $name\r\nAttempts to find the ID of the event with the provided $name.'),
('lookup faction',3,'Syntax: .lookup faction $name\r\nAttempts to find the ID of the faction with the provided $name.'),
('lookup item',3,'Syntax: .lookup item $itemname\r\n\r\nLooks up an item by $itemname, and returns all matches with their Item ID\'s.'),
('lookup itemset',3,'Syntax: .lookup itemset $itemname\r\n\r\nLooks up an item set by $itemname, and returns all matches with their Item set ID\'s.'),
('lookup object',3,'Syntax: .lookup object $objname\r\n\r\nLooks up an gameobject by $objname, and returns all matches with their Gameobject ID\'s.'),
('lookup player account',2,'Syntax: .lookup player account $accountpart [#limit] \r\n\r\n Searchs players, which account username including $accountpart with optional parametr #limit of results. If #limit not provided expected 100.'),
('lookup player email',2,'Syntax: .lookup player email $emailpart [#limit] \r\n\r\n Searchs players, which account email including $emailpart with optional parametr #limit of results. If #limit not provided expected 100.'),
('lookup player ip',2,'Syntax: .lookup player ip $ippart [#limit] \r\n\r\n Searchs players, which account last used ip inluding $ippart (textual) with optional parametr #limit of results. If #limit not provided expected 100.'),
('lookup pool',2,'Syntax: .lookup pool $pooldescpart\r\n\r\nList of pools (anywhere) with substring in description.'),
('lookup quest',3,'Syntax: .lookup quest $namepart\r\n\r\nLooks up a quest by $namepart, and returns all matches with their quest ID\'s.'),
('lookup skill',3,'Syntax: .lookup skill $$namepart\r\n\r\nLooks up a skill by $namepart, and returns all matches with their skill ID\'s.'),
('lookup spell',3,'Syntax: .lookup spell $namepart\r\n\r\nLooks up a spell by $namepart, and returns all matches with their spell ID\'s.'),
('lookup taxinode',3,'Syntax: .lookup taxinode $substring\r\n\r\nSearch and output all taxinodes with provide $substring in name.'),
('lookup tele',1,'Syntax: .lookup tele $substring\r\n\r\nSearch and output all .tele command locations with provide $substring in name.'),
('lookup title',2,'Syntax: .lookup title $$namepart\r\n\r\nLooks up a title by $namepart, and returns all matches with their title ID\'s and index\'s.'),
('mailbox',3,'Syntax: .mailbox\r\n\r\nShow your mailbox content.'),
('maxskill',3,'Syntax: .maxskill\r\nSets all skills of the targeted player to their maximum VALUESfor its current level.'),
('modify aspeed',1,'Syntax: .modify aspeed #rate\r\n\r\nModify all speeds -run,swim,run back,swim back- of the selected player to \"normalbase speed for this move type\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'),
('modify bwalk',1,'Syntax: .modify bwalk #rate\r\n\r\nModify the speed of the selected player while running backwards to \"normal walk back speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'),
('modify currency',2,'Syntax: .modify currency $id $amount\r\n\r\nAdd $amount points of currency $id to the selected player.'),
('modify drunk',1,'Syntax: .modify drunk #value\r\n Set drunk level to #value (0..100). Value 0 remove drunk state, 100 is max drunked state.'),
('modify energy',1,'Syntax: .modify energy #energy\r\n\r\nModify the energy of the selected player. If no player is selected, modify your energy.'),
('modify faction',1,'Syntax: .modify faction #factionid #flagid #npcflagid #dynamicflagid\r\n\r\nModify the faction and flags of the selected creature. Without arguments, display the faction and flags of the selected creature.'),
('modify fly',1,'Syntax: .modify fly #rate\r\n.fly #rate\r\n\r\nModify the flying speed of the selected player to \"normal base fly speed\"*rate. If no player is selected, modify your fly.\r\n\r\n #rate may range from 0.1 to 10.'),
('modify gender',2,'Syntax: .modify gender male/female\r\n\r\nChange gender of selected player.'),
('modify hp',1,'Syntax: .modify hp #newhp\r\n\r\nModify the hp of the selected player. If no player is selected, modify your hp.'),
('modify mana',1,'Syntax: .modify mana #newmana\r\n\r\nModify the mana of the selected player. If no player is selected, modify your mana.'),
('modify money',1,'Syntax: .modify money #money\r\n.money #money\r\n\r\nAdd or remove money to the selected player. If no player is selected, modify your money.\r\n\r\n #gold can be negative to remove money.'),
('modify morph',2,'Syntax: .modify morph #displayid\r\n\r\nChange your current model id to #displayid.'),
('modify mount',1,'Syntax: .modify mount #id #speed\r\nDisplay selected player as mounted at #id creature and set speed to #speed value.'),
('modify phase',3,'Syntax: .modify phase #phasemask\r\n\r\nSelected character phasemask changed to #phasemask with related world vision update. Change active until in game phase changed, or GM-mode enable/disable, or re-login. Character pts pasemask update to same value.'),
('modify rage',1,'Syntax: .modify rage #newrage\r\n\r\nModify the rage of the selected player. If no player is selected, modify your rage.'),
('modify rep',2,'Syntax: .modify rep #repId (#repvalue | $rankname [#delta])\r\nSets the selected players reputation with faction #repId to #repvalue or to $reprank.\r\nIf the reputation rank name is provided, the resulting reputation will be the lowest reputation for that rank plus the delta amount, if specified.\r\nYou can use \'.pinfo rep\' to list all known reputation ids, or use \'.lookup faction $name\' to locate a specific faction id.'),
('modify runicpower',1,'Syntax: .modify runicpower #newrunicpower\r\n\r\nModify the runic power of the selected player. If no player is selected, modify your runic power.'),
('modify scale',1,'Syntax: .modify scale #scale\r\n\r\nChange model scale for targeted player (util relogin) or creature (until respawn).'),
('modify speed',1,'Syntax: .modify speed #rate\r\n.speed #rate\r\n\r\nModify the running speed of the selected player to \"normal base run speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'),
('modify standstate',2,'Syntax: .modify standstate #emoteid\r\n\r\nChange the emote of your character while standing to #emoteid.'),
('modify swim',1,'Syntax: .modify swim #rate\r\n\r\nModify the swim speed of the selected player to \"normal swim speed\"*rate. If no player is selected, modify your speed.\r\n\r\n #rate may range from 0.1 to 10.'),
('modify tp',1,'Syntax: .modify tp #amount\r\n\r\nSet free talent pointes for selected character or character\'s pet. It will be reset to default expected at next levelup/login/quest reward.'),
('movegens',3,'Syntax: .movegens\r\n Show movement generators stack for selected creature or player.'),
('mute',1,'Syntax: .mute [$playerName] $timeInMinutes\r\n\r\nDisible chat messaging for any character from account of character $playerName (or currently selected) at $timeInMinutes minutes. Player can be offline.'),
('namego',1,'Syntax: .namego [$charactername]\r\n\r\nTeleport the given character to you. Character can be offline.'),
('neargrave',3,'Syntax: .neargrave [alliance|horde]\r\n\r\nFind nearest graveyard linked to zone (or only nearest from accepts alliance or horde faction ghosts).'),
('notify',1,'Syntax: .notify $MessageToBroadcast\r\n\r\nSend a global message to all players online in screen.'),
('npc add',2,'Syntax: .npc add #creatureid\r\n\r\nSpawn a creature by the given template id of #creatureid.'),
('npc addcurrency',2,'Syntax: .npc addcurrency #currencyId #buycount #extendedcost\r\n\r\nAdd currency #currencyId to item list of selected vendor.'),
('npc additem',2,'Syntax: .npc additem #itemId <#maxcount><#incrtime><#extendedcost>r\r\n\r\nAdd item #itemid to item list of selected vendor. Also optionally set max count item in vendor item list and time to item count restoring and items ExtendedCost.'),
('npc addweapon',3,'Not yet implemented.'),
('npc aiinfo',2,'Syntax: .npc npc aiinfo\r\n\r\nShow npc AI and script information.'),
('npc allowmove',3,'Syntax: .npc allowmove\r\n\r\nEnable or disable movement creatures in world. Not implemented.'),
('npc changelevel',2,'Syntax: .npc changelevel #level\r\n\r\nChange the level of the selected creature to #level.\r\n\r\n#level may range from 1 to 63.'),
('npc delcurrency',2,'Syntax: .npc delcurrency #currencyId\r\n\r\nRemove currency #currencyId from item list of selected vendor.'),
('npc delete',2,'Syntax: .npc delete [#guid]\r\n\r\nDelete creature with guid #guid (or the selected if no guid is provided)'),
('npc delitem',2,'Syntax: .npc delitem #itemId\r\n\r\nRemove item #itemid from item list of selected vendor.'),
('npc factionid',2,'Syntax: .npc factionid #factionid\r\n\r\nSet the faction of the selected creature to #factionid.'),
('npc flag',2,'Syntax: .npc flag #npcflag\r\n\r\nSet the NPC flags of creature template of the selected creature and selected creature to #npcflag. NPC flags will applied to all creatures of selected creature template after server restart or grid unload/load.'),
('npc follow',2,'Syntax: .npc follow\r\n\r\nSelected creature start follow you until death/fight/etc.'),
('npc info',3,'Syntax: .npc info\r\n\r\nDisplay a list of details for the selected creature.\r\n\r\nThe list includes:\r\n- GUID, Faction, NPC flags, Entry ID, Model ID,\r\n- Level,\r\n- Health (current/maximum),\r\n\r\n- Field flags, dynamic flags, faction template, \r\n- Position information,\r\n- and the creature type, e.g. if the creature is a vendor.'),
('npc move',2,'Syntax: .npc move [#creature_guid]\r\n\r\nMove the targeted creature spawn point to your coordinates.'),
('npc name',2,'Syntax: .npc name $name\r\n\r\nChange the name of the selected creature or character to $name.\r\n\r\nCommand disabled.'),
('npc playemote',3,'Syntax: .npc playemote #emoteid\r\n\r\nMake the selected creature emote with an emote of id #emoteid.'),
('npc say',1,'Syntax: .npc say #text\r\nMake the selected npc says #text.'),
('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\r\n\r\nSet default death state (dead/alive) for npc at spawn.'),
('npc setmodel',2,'Syntax: .npc setmodel #displayid\r\n\r\nChange the model id of the selected creature to #displayid.'),
('npc setmovetype',2,'Syntax: .npc setmovetype [#creature_guid] stay/random/way [NODEL]\r\n\r\nSet for creature pointed by #creature_guid (or selected if #creature_guid not provided) movement type and move it to respawn position (if creature alive). Any existing waypoints for creature will be removed from the database if you do not use NODEL. If the creature is dead then movement type will applied at creature respawn.\r\nMake sure you use NODEL, if you want to keep the waypoints.'),
('npc setphase',2,'Syntax: .npc setphase #phasemask\r\n\r\nSelected unit or pet phasemask changed to #phasemask with related world vision update for players. In creature case state saved to DB and persistent. In pet case change active until in game phase changed for owner, owner re-login, or GM-mode enable/disable..'),
('npc spawndist',2,'Syntax: .npc spawndist #dist\r\n\r\nAdjust spawndistance of selected creature to dist.'),
('npc spawntime',2,'Syntax: .npc spawntime #time \r\n\r\nAdjust spawntime of selected creature to time.'),
('npc subname',2,'Syntax: .npc subname $Name\r\n\r\nChange the subname of the selected creature or player to $Name.\r\n\r\nCommand disabled.'),
('npc tame',2,'Syntax: .npc tame\r\n\r\nTame selected creature (tameable non pet creature). You don\'t must have pet.'),
('npc textemote',1,'Syntax: .npc textemote #emoteid\r\n\r\nMake the selected creature to do textemote with an emote of id #emoteid.'),
('npc unfollow',2,'Syntax: .npc unfollow\r\n\r\nSelected creature (non pet) stop follow you.'),
('npc whisper',1,'Syntax: .npc whisper #playerguid #text\r\nMake the selected npc whisper #text to #playerguid.'),
('npc yell',1,'Syntax: .npc yell #text\r\nMake the selected npc yells #text.'),
('pdump load',3,'Syntax: .pdump load $filename $account [$newname] [$newguid]\r\nLoad character dump from dump file into character list of $account with saved or $newname, with saved (or first free) or $newguid guid.'),
('pdump write',3,'Syntax: .pdump write $filename $playerNameOrGUID\r\nWrite character dump with name/guid $playerNameOrGUID to file $filename.'),
('pinfo',2,'Syntax: .pinfo [$player_name]\r\n\r\nOutput account information for selected player or player find by $player_name.'),
('pool',2,'Syntax: .pool #pool_id\r\n\r\nPool information and full list creatures/gameobjects included in pool.'),
('pool list',2,'Syntax: .pool list\r\n\r\nList of pools with spawn in current map (only work in instances. Non-instanceable maps share pool system state os useless attempt get all pols at all continents.'),
('pool spawns',2,'Syntax: .pool spawns #pool_id\r\n\r\nList current creatures/objects listed in pools (or in specific #pool_id) and spawned (added to grid data, not meaning show in world.'),
('quest add',3,'Syntax: .quest add #quest_id\r\n\r\nAdd to character quest log quest #quest_id. Quest started from item can\'t be added by this command but correct .additem call provided in command output.'),
('quest complete',3,'Syntax: .quest complete #questid\r\nMark all quest objectives as completed for target character active quest. After this target character can go and get quest reward.'),
('quest remove',3,'Syntax: .quest remove #quest_id\r\n\r\nSet quest #quest_id state to not completed and not active (and remove from active quest list) for selected player.'),
('quit',4,'Syntax: quit\r\n\r\nClose RA connection. Command must be typed fully (quit).'),
('recall',1,'Syntax: .recall [$playername]\r\n\r\nTeleport $playername or selected player to the place where he has been before last use of a teleportation command. If no $playername is entered and no player is selected, it will teleport you.'),
('reload all',3,'Syntax: .reload all\r\n\r\nReload all tables with reload support added and that can be _safe_ reloaded.'),
('reload all_achievement',3,'Syntax: .reload all_achievement\r\n\r\nReload all `achievement_*` tables if reload support added for this table and this table can be _safe_ reloaded.'),
('reload all_area',3,'Syntax: .reload all_area\r\n\r\nReload all `areatrigger_*` tables if reload support added for this table and this table can be _safe_ reloaded.'),
('reload all_eventai',3,'Syntax: .reload all_eventai\r\n\r\nReload `creature_ai_*` tables if reload support added for these tables and these tables can be _safe_ reloaded.'),
('reload all_item',3,'Syntax: .reload all_item\r\n\r\nReload `item_required_target`, `page_texts` and `item_enchantment_template` tables.'),
('reload all_locales',3,'Syntax: .reload all_locales\r\n\r\nReload all `locales_*` tables with reload support added and that can be _safe_ reloaded.'),
('reload all_loot',3,'Syntax: .reload all_loot\r\n\r\nReload all `*_loot_template` tables. This can be slow operation with lags for server run.'),
('reload all_npc',3,'Syntax: .reload all_npc\r\n\r\nReload `points_of_interest` and `npc_*` tables if reload support added for these tables and these tables can be _safe_ reloaded.'),
('reload all_quest',3,'Syntax: .reload all_quest\r\n\r\nReload all quest related tables if reload support added for this table and this table can be _safe_ reloaded.'),
('reload all_scripts',3,'Syntax: .reload all_scripts\r\n\r\nReload `dbscripts_on_*` tables.'),
('reload all_spell',3,'Syntax: .reload all_spell\r\n\r\nReload all `spell_*` tables with reload support added and that can be _safe_ reloaded.'),
('reload config',3,'Syntax: .reload config\r\n\r\nReload config settings (by default stored in mangosd.conf). Not all settings can be change at reload: some new setting values will be ignored until restart, some values will applied with delay or only to new objects/maps, some values will explicitly rejected to change at reload.'),
('repairitems',2,'Syntax: .repairitems\r\n\r\nRepair all selected player\'s items.'),
('reset achievements',3,'Syntax: .reset achievements [$playername]\r\n\r\nReset achievements data for selected or named (online or offline) character. Achievements for persistance progress data like completed quests/etc re-filled at reset. Achievements for events like kills/casts/etc will lost.'),
('reset all',3,'Syntax: .reset all spells\r\n\r\nSyntax: .reset all talents\r\n\r\nRequest reset spells or talents (including talents for all character\'s pets if any) at next login each existed character.'),
('reset honor',3,'Syntax: .reset honor [Playername]\r\n Reset all honor data for targeted character.'),
('reset level',3,'Syntax: .reset level [Playername]\r\n Reset level to 1 including reset stats and talents. Equipped items with greater level requirement can be lost.'),
('reset specs',3,'Syntax: .reset specs [Playername]\r\n Removes all talents (for all specs) of the targeted player or named player. Playername can be name of offline character. With player talents also will be reset talents for all character\'s pets if any.'),
('reset spells',3,'Syntax: .reset spells [Playername]\r\n Removes all non-original spells from spellbook.\r\n. Playername can be name of offline character.'),
('reset stats',3,'Syntax: .reset stats [Playername]\r\n Resets(recalculate) all stats of the targeted player to their original VALUESat current level.'),
('reset talents',3,'Syntax: .reset talents [Playername]\r\n Removes all talents (current spec) of the targeted player or pet or named player. With player talents also will be reset talents for all character\'s pets if any.'),
('respawn',3,'Syntax: .respawn\r\n\r\nRespawn selected creature or respawn all nearest creatures (if none selected) and GO without waiting respawn time expiration.'),
('revive',3,'Syntax: .revive\r\n\r\nRevive the selected player. If no player is selected, it will revive you.'),
('save',0,'Syntax: .save\r\n\r\nSaves your character.'),
('saveall',1,'Syntax: .saveall\r\n\r\nSave all characters in game.'),
('send items',3,'Syntax: .send items #playername \"#subject\" \"#text\" itemid1[:count1] itemid2[:count2] ... itemidN[:countN]\r\n\r\nSend a mail to a player. Subject and mail text must be in \"\". If for itemid not provided related count values then expected 1, if count > max items in stack then items will be send in required amount stacks. All stacks amount in mail limited to 12.'),
('send mail',1,'Syntax: .send mail #playername \"#subject\" \"#text\"\r\n\r\nSend a mail to a player. Subject and mail text must be in \"\".'),
('send mass items',3,'Syntax: .send mass items #racemask|$racename|alliance|horde|all \"#subject\" \"#text\" itemid1[:count1] itemid2[:count2] ... itemidN[:countN]\r\n\r\nSend a mail to players. Subject and mail text must be in \"\". If for itemid not provided related count values then expected 1, if count > max items in stack then items will be send in required amount stacks. All stacks amount in mail limited to 12.'),
('send mass mail',3,'Syntax: .send mass mail #racemask|$racename|alliance|horde|all \"#subject\" \"#text\"\r\n\r\nSend a mail to players. Subject and mail text must be in \"\".'),
('send mass money',3,'Syntax: .send mass money #racemask|$racename|alliance|horde|all \"#subject\" \"#text\" #money\r\n\r\nSend mail with money to players. Subject and mail text must be in \"\".'),
('send message',3,'Syntax: .send message $playername $message\r\n\r\nSend screen message to player from ADMINISTRATOR.'),
('send money',3,'Syntax: .send money #playername \"#subject\" \"#text\" #money\r\n\r\nSend mail with money to a player. Subject and mail text must be in \"\".'),
('server corpses',2,'Syntax: .server corpses\r\n\r\nTriggering corpses expire check in world.'),
('server exit',4,'Syntax: .server exit\r\n\r\nTerminate mangosd NOW. Exit code 0.'),
('server idlerestart',3,'Syntax: .server idlerestart #delay\r\n\r\nRestart the server after #delay seconds if no active connections are present (no players). Use #exist_code or 2 as program exist code.'),
('server idlerestart cancel',3,'Syntax: .server idlerestart cancel\r\n\r\nCancel the restart/shutdown timer if any.'),
('server idleshutdown',3,'Syntax: .server idleshutdown #delay [#exist_code]\r\n\r\nShut the server down after #delay seconds if no active connections are present (no players). Use #exist_code or 0 as program exist code.'),
('server idleshutdown cancel',3,'Syntax: .server idleshutdown cancel\r\n\r\nCancel the restart/shutdown timer if any.'),
('server info',0,'Syntax: .server info\r\n\r\nDisplay server version and the number of connected players.'),
('server log filter',4,'Syntax: .server log filter [($filtername|all) (on|off)]\r\n\r\nShow or set server log filters. If used \"all\" then all filters will be set to on/off state.'),
('server log level',4,'Syntax: .server log level [#level]\r\n\r\nShow or set server log level (0 - errors only, 1 - basic, 2 - detail, 3 - debug).'),
('server motd',0,'Syntax: .server motd\r\n\r\nShow server Message of the day.'),
('server plimit',3,'Syntax: .server plimit [#num|-1|-2|-3|reset|player|moderator|gamemaster|administrator]\r\n\r\nWithout arg show current player amount and security level limitations for login to server, with arg set player linit ($num > 0) or securiti limitation ($num < 0 or security leme name. With `reset` sets player limit to the one in the config file'),
('server restart',3,'Syntax: .server restart #delay\r\n\r\nRestart the server after #delay seconds. Use #exist_code or 2 as program exist code.'),
('server restart cancel',3,'Syntax: .server restart cancel\r\n\r\nCancel the restart/shutdown timer if any.'),
('server set motd',3,'Syntax: .server set motd $MOTD\r\n\r\nSet server Message of the day.'),
('server shutdown',3,'Syntax: .server shutdown #delay [#exit_code]\r\n\r\nShut the server down after #delay seconds. Use #exit_code or 0 as program exit code.'),
('server shutdown cancel',3,'Syntax: .server shutdown cancel\r\n\r\nCancel the restart/shutdown timer if any.'),
('setskill',3,'Syntax: .setskill #skill #level [#max]\r\n\r\nSet a skill of id #skill with a current skill value of #level and a maximum value of #max (or equal current maximum if not provide) for the selected character. If no character is selected, you learn the skill.'),
('showarea',3,'Syntax: .showarea #areaid\r\n\r\nReveal the area of #areaid to the selected character. If no character is selected, reveal this area to you.'),
('stable',3,'Syntax: .stable\r\n\r\nShow your pet stable.'),
('start',0,'Syntax: .start\r\n\r\nTeleport you to the starting area of your character.'),
('taxicheat',1,'Syntax: .taxicheat on/off\r\n\r\nTemporary grant access or remove to all taxi routes for the selected character. If no character is selected, hide or reveal all routes to you.\r\n\r\nVisited taxi nodes sill accessible after removing access.'),
('tele',1,'Syntax: .tele #location\r\n\r\nTeleport player to a given location.'),
('tele add',3,'Syntax: .tele add $name\r\n\r\nAdd current your position to .tele command target locations list with name $name.'),
('tele del',3,'Syntax: .tele del $name\r\n\r\nRemove location with name $name for .tele command locations list.'),
('tele group',1,'Syntax: .tele group#location\r\n\r\nTeleport a selected player and his group members to a given location.'),
('tele name',1,'Syntax: .tele name [#playername] #location\r\n\r\nTeleport the given character to a given location. Character can be offline.'),
('ticket',2,'Syntax: .ticket on\r\n .ticket off\r\n .ticket #num\r\n .ticket $character_name\r\n .ticket respond #num $response\r\n .ticket respond $character_name $response\r\n\r\non/off for GMs to show or not a new ticket directly, $character_name to show ticket of this character, #num to show ticket #num.'),
('titles add',2,'Syntax: .titles add #title\r\nAdd title #title (id or shift-link) to known titles list for selected player.'),
('titles current',2,'Syntax: .titles current #title\r\nSet title #title (id or shift-link) as current selected titl for selected player. If title not in known title list for player then it will be added to list.'),
('titles remove',2,'Syntax: .titles remove #title\r\nRemove title #title (id or shift-link) from known titles list for selected player.'),
('titles setmask',2,'Syntax: .titles setmask #mask\r\n\r\nAllows user to use all titles from #mask.\r\n\r\n #mask=0 disables the title-choose-field'),
('trigger',2,'Syntax: .trigger [#trigger_id|$trigger_shift-link|$trigger_target_shift-link]\r\n\r\nShow detail infor about areatrigger with id #trigger_id or trigger id associated with shift-link. If areatrigger id or shift-link not provided then selected nearest areatrigger at current map.'),
('trigger active',2,'Syntax: .trigger active\r\n\r\nShow list of areatriggers with activation zone including current character position.'),
('trigger near',2,'Syntax: .trigger near [#distance]\r\n\r\nOutput areatriggers at distance #distance from player. If #distance not provided use 10 as default value.'),
('unaura',3,'Syntax: .unaura #spellid\r\n\r\nRemove aura due to spell #spellid from the selected Unit.'),
('unban account',3,'Syntax: .unban account $Name\r\nUnban accounts for account name pattern.'),
('unban character',3,'Syntax: .unban character $Name\r\nUnban accounts for character name pattern.'),
('unban ip',3,'Syntax : .unban ip $Ip\r\nUnban accounts for IP pattern.'),
('unlearn',3,'Syntax: .unlearn #spell [all]\r\n\r\nUnlearn for selected player a spell #spell. If \'all\' provided then all ranks unlearned.'),
('unmute',1,'Syntax: .unmute $playerName\r\n\r\nRestore chat messaging for any character from account of character $playerName.'),
('waterwalk',2,'Syntax: .waterwalk on/off\r\n\r\nSet on/off waterwalk state for selected player.'),
('wchange',3,'Syntax: .wchange #weathertype #status\r\n\r\nSet current weather to #weathertype with an intensity of #status.\r\n\r\n#weathertype can be 1 for rain, 2 for snow, and 3 for sand. #status can be 0 for disabled, and 1 for enabled.'),
('whispers',1,'Syntax: .whispers on|off\r\nEnable/disable accepting whispers by GM from players. By default use mangosd.conf setting.'),
('wp add',2,'Syntax: .wp add [Selected Creature or dbGuid] [pathId [wpOrigin] ]'),
('wp export',3,'Syntax: .wp export [#creature_guid or Select a Creature] $filename'),
('wp modify',2,'Syntax: .wp modify command [dbGuid, id] [value]\r\nwhere command must be one of: waittime | scriptid | orientation | del | move\r\nIf no waypoint was selected, one can be chosen with dbGuid and id.\r\nThe commands have the following meaning:\r\n waittime (Set the time the npc will wait at a point (in ms))\r\n scriptid (Set the DB-Script that will be executed when the wp is reached)\r\n orientation (Set the orientation of this point) \r\n del (Remove the waypoint from the path)\r\n move (Move the wayoint to the current position of the player)'),
('wp show',2,'Syntax: .wp show command [dbGuid] [pathId [wpOrigin] ]\r\nwhere command can have one of the following values\r\non (to show all related wp)\r\nfirst (to see only first one)\r\nlast (to see only last one)\r\noff (to hide all related wp)\r\ninfo (to get more info about theses wp)\r\n\r\nFor using info you have to do first show on and than select a Visual-Waypoint and do the show info!\r\nwith pathId and wpOrigin you can specify which path to show (optional)');
/*!40000 ALTER TABLE `command` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `conditions`
--
DROP TABLE IF EXISTS `conditions`;
CREATE TABLE `conditions` (
`condition_entry` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`type` tinyint(3) NOT NULL DEFAULT '0' COMMENT 'Type of the condition',
`value1` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'data field one for the condition',
`value2` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'data field two for the condition',
PRIMARY KEY (`condition_entry`),
UNIQUE KEY `unique_conditions` (`type`,`value1`,`value2`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Condition System';
--
-- Dumping data for table `conditions`
--
LOCK TABLES `conditions` WRITE;
/*!40000 ALTER TABLE `conditions` DISABLE KEYS */;
/*!40000 ALTER TABLE `conditions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature`
--
DROP TABLE IF EXISTS `creature`;
CREATE TABLE `creature` (
`guid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier',
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Creature Identifier',
`map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
`spawnMask` tinyint(3) unsigned NOT NULL DEFAULT '1',
`phaseMask` int(11) unsigned NOT NULL DEFAULT '1',
`modelid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`equipment_id` mediumint(9) NOT NULL DEFAULT '0',
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
`spawntimesecs` int(10) unsigned NOT NULL DEFAULT '120',
`spawndist` float NOT NULL DEFAULT '5',
`currentwaypoint` mediumint(8) unsigned NOT NULL DEFAULT '0',
`curhealth` int(10) unsigned NOT NULL DEFAULT '1',
`curmana` int(10) unsigned NOT NULL DEFAULT '0',
`DeathState` tinyint(3) unsigned NOT NULL DEFAULT '0',
`MovementType` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`),
KEY `idx_map` (`map`),
KEY `index_id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature System';
--
-- Dumping data for table `creature`
--
LOCK TABLES `creature` WRITE;
/*!40000 ALTER TABLE `creature` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_addon`
--
DROP TABLE IF EXISTS `creature_addon`;
CREATE TABLE `creature_addon` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`mount` mediumint(8) unsigned NOT NULL DEFAULT '0',
`bytes1` int(10) unsigned NOT NULL DEFAULT '0',
`b2_0_sheath` tinyint(3) unsigned NOT NULL DEFAULT '0',
`b2_1_pvp_state` tinyint(3) unsigned NOT NULL DEFAULT '0',
`emote` int(10) unsigned NOT NULL DEFAULT '0',
`moveflags` int(10) unsigned NOT NULL DEFAULT '0',
`auras` text,
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `creature_addon`
--
LOCK TABLES `creature_addon` WRITE;
/*!40000 ALTER TABLE `creature_addon` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_addon` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_ai_scripts`
--
DROP TABLE IF EXISTS `creature_ai_scripts`;
CREATE TABLE `creature_ai_scripts` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`creature_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Creature Template Identifier',
`event_type` tinyint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Event Type',
`event_inverse_phase_mask` int(11) NOT NULL DEFAULT '0' COMMENT 'Mask which phases this event will not trigger in',
`event_chance` int(3) unsigned NOT NULL DEFAULT '100',
`event_flags` int(3) unsigned NOT NULL DEFAULT '0',
`event_param1` int(11) NOT NULL DEFAULT '0',
`event_param2` int(11) NOT NULL DEFAULT '0',
`event_param3` int(11) NOT NULL DEFAULT '0',
`event_param4` int(11) NOT NULL DEFAULT '0',
`action1_type` tinyint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Action Type',
`action1_param1` int(11) NOT NULL DEFAULT '0',
`action1_param2` int(11) NOT NULL DEFAULT '0',
`action1_param3` int(11) NOT NULL DEFAULT '0',
`action2_type` tinyint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Action Type',
`action2_param1` int(11) NOT NULL DEFAULT '0',
`action2_param2` int(11) NOT NULL DEFAULT '0',
`action2_param3` int(11) NOT NULL DEFAULT '0',
`action3_type` tinyint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Action Type',
`action3_param1` int(11) NOT NULL DEFAULT '0',
`action3_param2` int(11) NOT NULL DEFAULT '0',
`action3_param3` int(11) NOT NULL DEFAULT '0',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'Event Comment',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='EventAI Scripts';
--
-- Dumping data for table `creature_ai_scripts`
--
LOCK TABLES `creature_ai_scripts` WRITE;
/*!40000 ALTER TABLE `creature_ai_scripts` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_ai_scripts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_ai_summons`
--
DROP TABLE IF EXISTS `creature_ai_summons`;
CREATE TABLE `creature_ai_summons` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Location Identifier',
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
`spawntimesecs` int(11) unsigned NOT NULL DEFAULT '120',
`comment` varchar(255) NOT NULL DEFAULT '' COMMENT 'Summon Comment',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='EventAI Summoning Locations';
--
-- Dumping data for table `creature_ai_summons`
--
LOCK TABLES `creature_ai_summons` WRITE;
/*!40000 ALTER TABLE `creature_ai_summons` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_ai_summons` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_ai_texts`
--
DROP TABLE IF EXISTS `creature_ai_texts`;
CREATE TABLE `creature_ai_texts` (
`entry` mediumint(8) NOT NULL,
`content_default` text NOT NULL,
`content_loc1` text,
`content_loc2` text,
`content_loc3` text,
`content_loc4` text,
`content_loc5` text,
`content_loc6` text,
`content_loc7` text,
`content_loc8` text,
`sound` mediumint(8) unsigned NOT NULL DEFAULT '0',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0',
`language` tinyint(3) unsigned NOT NULL DEFAULT '0',
`emote` smallint(5) unsigned NOT NULL DEFAULT '0',
`comment` text,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Texts';
--
-- Dumping data for table `creature_ai_texts`
--
LOCK TABLES `creature_ai_texts` WRITE;
/*!40000 ALTER TABLE `creature_ai_texts` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_ai_texts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_battleground`
--
DROP TABLE IF EXISTS `creature_battleground`;
CREATE TABLE `creature_battleground` (
`guid` int(10) unsigned NOT NULL COMMENT 'Creature''s GUID',
`event1` tinyint(3) unsigned NOT NULL COMMENT 'main event',
`event2` tinyint(3) unsigned NOT NULL COMMENT 'sub event',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature battleground indexing system';
--
-- Dumping data for table `creature_battleground`
--
LOCK TABLES `creature_battleground` WRITE;
/*!40000 ALTER TABLE `creature_battleground` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_battleground` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_equip_template`
--
DROP TABLE IF EXISTS `creature_equip_template`;
CREATE TABLE `creature_equip_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Unique entry',
`equipentry1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`equipentry2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`equipentry3` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Creature System (Equipment)';
--
-- Dumping data for table `creature_equip_template`
--
LOCK TABLES `creature_equip_template` WRITE;
/*!40000 ALTER TABLE `creature_equip_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_equip_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_involvedrelation`
--
DROP TABLE IF EXISTS `creature_involvedrelation`;
CREATE TABLE `creature_involvedrelation` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier',
`quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier',
PRIMARY KEY (`id`,`quest`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System';
--
-- Dumping data for table `creature_involvedrelation`
--
LOCK TABLES `creature_involvedrelation` WRITE;
/*!40000 ALTER TABLE `creature_involvedrelation` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_involvedrelation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_linking`
--
DROP TABLE IF EXISTS `creature_linking`;
CREATE TABLE `creature_linking` (
`guid` int(10) unsigned NOT NULL COMMENT 'creature.guid of the slave mob that is linked',
`master_guid` int(10) unsigned NOT NULL COMMENT 'master to trigger events',
`flag` mediumint(8) unsigned NOT NULL COMMENT 'flag - describing what should happen when',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature Linking System';
--
-- Dumping data for table `creature_linking`
--
LOCK TABLES `creature_linking` WRITE;
/*!40000 ALTER TABLE `creature_linking` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_linking` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_linking_template`
--
DROP TABLE IF EXISTS `creature_linking_template`;
CREATE TABLE `creature_linking_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'creature_template.entry of the slave mob that is linked',
`map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Id of map of the mobs',
`master_entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'master to trigger events',
`flag` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'flag - describing what should happen when',
`search_range` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'search_range - describing in which range (spawn-coords) master and slave are linked together',
PRIMARY KEY (`entry`,`map`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature Linking System';
--
-- Dumping data for table `creature_linking_template`
--
LOCK TABLES `creature_linking_template` WRITE;
/*!40000 ALTER TABLE `creature_linking_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_linking_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_loot_template`
--
DROP TABLE IF EXISTS `creature_loot_template`;
CREATE TABLE `creature_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'entry 0 used for player insignia loot',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `creature_loot_template`
--
LOCK TABLES `creature_loot_template` WRITE;
/*!40000 ALTER TABLE `creature_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_model_info`
--
DROP TABLE IF EXISTS `creature_model_info`;
CREATE TABLE `creature_model_info` (
`modelid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`bounding_radius` float NOT NULL DEFAULT '0',
`combat_reach` float NOT NULL DEFAULT '0',
`gender` tinyint(3) unsigned NOT NULL DEFAULT '2',
`modelid_other_gender` mediumint(8) unsigned NOT NULL DEFAULT '0',
`modelid_alternative` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`modelid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Creature System (Model related info)';
--
-- Dumping data for table `creature_model_info`
--
LOCK TABLES `creature_model_info` WRITE;
/*!40000 ALTER TABLE `creature_model_info` DISABLE KEYS */;
INSERT INTO `creature_model_info` VALUES
(49,0.306,1.5,0,50,0),
(50,0.208,1.5,1,49,0),
(51,0.372,1.5,0,52,0),
(52,0.236,1.5,1,51,0),
(53,0.347,1.5,0,54,0),
(54,0.347,1.5,1,53,0),
(55,0.389,1.5,0,56,0),
(56,0.306,1.5,1,55,0),
(57,0.383,1.5,0,58,0),
(58,0.383,1.5,1,57,0),
(59,0.9747,1.5,0,60,0),
(60,0.8725,1.5,1,59,0),
(1478,0.306,1.5,0,1479,0),
(1479,0.306,1.5,1,1478,0),
(1563,0.3519,1.5,0,1564,0),
(1564,0.3519,1.5,1,1563,0),
(6894,0.389,1.5,0,6895,0),
(6895,0.389,1.5,1,6894,0),
(10045,1,1.5,2,0,0),
(15475,0.383,1.5,1,15476,0),
(15476,0.383,1.5,0,15475,0),
(16125,1,1.5,0,16126,0),
(16126,1,1.5,1,16125,0),
(29422,0.389,1.5,0,29423,0),
(29423,0.389,1.5,1,29422,0);
/*!40000 ALTER TABLE `creature_model_info` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_model_race`
--
DROP TABLE IF EXISTS `creature_model_race`;
CREATE TABLE `creature_model_race` (
`modelid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`racemask` mediumint(8) unsigned NOT NULL DEFAULT '0',
`creature_entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'option 1, modelid_N from creature_template',
`modelid_racial` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'option 2, explicit modelid',
PRIMARY KEY (`modelid`,`racemask`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Model system';
--
-- Dumping data for table `creature_model_race`
--
LOCK TABLES `creature_model_race` WRITE;
/*!40000 ALTER TABLE `creature_model_race` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_model_race` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_movement`
--
DROP TABLE IF EXISTS `creature_movement`;
CREATE TABLE `creature_movement` (
`id` int(10) unsigned NOT NULL COMMENT 'Creature GUID',
`point` mediumint(8) unsigned NOT NULL DEFAULT '0',
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`waittime` int(10) unsigned NOT NULL DEFAULT '0',
`script_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`textid1` int(11) NOT NULL DEFAULT '0',
`textid2` int(11) NOT NULL DEFAULT '0',
`textid3` int(11) NOT NULL DEFAULT '0',
`textid4` int(11) NOT NULL DEFAULT '0',
`textid5` int(11) NOT NULL DEFAULT '0',
`emote` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
`model1` mediumint(9) NOT NULL DEFAULT '0',
`model2` mediumint(9) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`,`point`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System';
--
-- Dumping data for table `creature_movement`
--
LOCK TABLES `creature_movement` WRITE;
/*!40000 ALTER TABLE `creature_movement` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_movement` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_movement_template`
--
DROP TABLE IF EXISTS `creature_movement_template`;
CREATE TABLE `creature_movement_template` (
`entry` mediumint(8) unsigned NOT NULL COMMENT 'Creature entry',
`point` mediumint(8) unsigned NOT NULL DEFAULT '0',
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`waittime` int(10) unsigned NOT NULL DEFAULT '0',
`script_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`textid1` int(11) NOT NULL DEFAULT '0',
`textid2` int(11) NOT NULL DEFAULT '0',
`textid3` int(11) NOT NULL DEFAULT '0',
`textid4` int(11) NOT NULL DEFAULT '0',
`textid5` int(11) NOT NULL DEFAULT '0',
`emote` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
`model1` mediumint(9) NOT NULL DEFAULT '0',
`model2` mediumint(9) NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`point`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature waypoint system';
--
-- Dumping data for table `creature_movement_template`
--
LOCK TABLES `creature_movement_template` WRITE;
/*!40000 ALTER TABLE `creature_movement_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_movement_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_onkill_reputation`
--
DROP TABLE IF EXISTS `creature_onkill_reputation`;
CREATE TABLE `creature_onkill_reputation` (
`creature_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Creature Identifier',
`RewOnKillRepFaction1` smallint(6) NOT NULL DEFAULT '0',
`RewOnKillRepFaction2` smallint(6) NOT NULL DEFAULT '0',
`MaxStanding1` tinyint(4) NOT NULL DEFAULT '0',
`IsTeamAward1` tinyint(4) NOT NULL DEFAULT '0',
`RewOnKillRepValue1` mediumint(9) NOT NULL DEFAULT '0',
`MaxStanding2` tinyint(4) NOT NULL DEFAULT '0',
`IsTeamAward2` tinyint(4) NOT NULL DEFAULT '0',
`RewOnKillRepValue2` mediumint(9) NOT NULL DEFAULT '0',
`TeamDependent` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`creature_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature OnKill Reputation gain';
--
-- Dumping data for table `creature_onkill_reputation`
--
LOCK TABLES `creature_onkill_reputation` WRITE;
/*!40000 ALTER TABLE `creature_onkill_reputation` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_onkill_reputation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_questrelation`
--
DROP TABLE IF EXISTS `creature_questrelation`;
CREATE TABLE `creature_questrelation` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier',
`quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier',
PRIMARY KEY (`id`,`quest`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System';
--
-- Dumping data for table `creature_questrelation`
--
LOCK TABLES `creature_questrelation` WRITE;
/*!40000 ALTER TABLE `creature_questrelation` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_questrelation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_template`
--
DROP TABLE IF EXISTS `creature_template`;
CREATE TABLE `creature_template` (
`Entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Name` char(100) NOT NULL DEFAULT '',
`SubName` char(100) DEFAULT NULL,
`IconName` char(100) DEFAULT NULL,
`MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '1',
`MaxLevel` tinyint(3) unsigned NOT NULL DEFAULT '1',
`DifficultyEntry1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`DifficultyEntry2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`DifficultyEntry3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ModelId1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ModelId2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ModelId3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ModelId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`FactionAlliance` smallint(5) unsigned NOT NULL DEFAULT '0',
`FactionHorde` smallint(5) unsigned NOT NULL DEFAULT '0',
`Scale` float NOT NULL DEFAULT '1',
`Family` tinyint(4) NOT NULL DEFAULT '0',
`CreatureType` tinyint(3) unsigned NOT NULL DEFAULT '0',
`InhabitType` tinyint(3) unsigned NOT NULL DEFAULT '3',
`RegenerateStats` tinyint(3) unsigned NOT NULL DEFAULT '3',
`RacialLeader` tinyint(3) unsigned NOT NULL DEFAULT '0',
`NpcFlags` int(10) unsigned NOT NULL DEFAULT '0',
`UnitFlags` int(10) unsigned NOT NULL DEFAULT '0',
`UnitFlags2` int(10) unsigned NOT NULL DEFAULT '0',
`DynamicFlags` int(10) unsigned NOT NULL DEFAULT '0',
`ExtraFlags` int(10) unsigned NOT NULL DEFAULT '0',
`CreatureTypeFlags` int(10) unsigned NOT NULL DEFAULT '0',
`SpeedWalk` float NOT NULL DEFAULT '1' COMMENT 'Result of 2.5/2.5, most common value',
`SpeedRun` float NOT NULL DEFAULT '1.14286' COMMENT 'Result of 8.0/7.0, most common value',
`UnitClass` tinyint(3) unsigned NOT NULL DEFAULT '0',
`Rank` tinyint(3) unsigned NOT NULL DEFAULT '0',
`Expansion` tinyint(3) NOT NULL DEFAULT '-1',
`HealthMultiplier` float NOT NULL DEFAULT '1',
`PowerMultiplier` float NOT NULL DEFAULT '1',
`DamageMultiplier` float NOT NULL DEFAULT '1',
`DamageVariance` float NOT NULL DEFAULT '1',
`ArmorMultiplier` float NOT NULL DEFAULT '1',
`ExperienceMultiplier` float NOT NULL DEFAULT '1',
`MinLevelHealth` int(10) unsigned NOT NULL DEFAULT '0',
`MaxLevelHealth` int(10) unsigned NOT NULL DEFAULT '0',
`MinLevelMana` int(10) unsigned NOT NULL DEFAULT '0',
`MaxLevelMana` int(10) unsigned NOT NULL DEFAULT '0',
`MinMeleeDmg` float NOT NULL DEFAULT '0',
`MaxMeleeDmg` float NOT NULL DEFAULT '0',
`MinRangedDmg` float NOT NULL DEFAULT '0',
`MaxRangedDmg` float NOT NULL DEFAULT '0',
`Armor` mediumint(8) unsigned NOT NULL DEFAULT '0',
`MeleeAttackPower` int(10) unsigned NOT NULL DEFAULT '0',
`RangedAttackPower` smallint(5) unsigned NOT NULL DEFAULT '0',
`MeleeBaseAttackTime` int(10) unsigned NOT NULL DEFAULT '0',
`RangedBaseAttackTime` int(10) unsigned NOT NULL DEFAULT '0',
`DamageSchool` tinyint(4) NOT NULL DEFAULT '0',
`MinLootGold` mediumint(8) unsigned NOT NULL DEFAULT '0',
`MaxLootGold` mediumint(8) unsigned NOT NULL DEFAULT '0',
`LootId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`PickpocketLootId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`SkinningLootId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`KillCredit1` int(11) unsigned NOT NULL DEFAULT '0',
`KillCredit2` int(11) unsigned NOT NULL DEFAULT '0',
`QuestItem1` int(11) unsigned NOT NULL DEFAULT '0',
`QuestItem2` int(11) unsigned NOT NULL DEFAULT '0',
`QuestItem3` int(11) unsigned NOT NULL DEFAULT '0',
`QuestItem4` int(11) unsigned NOT NULL DEFAULT '0',
`QuestItem5` int(11) unsigned NOT NULL DEFAULT '0',
`QuestItem6` int(11) unsigned NOT NULL DEFAULT '0',
`MechanicImmuneMask` int(10) unsigned NOT NULL DEFAULT '0',
`ResistanceHoly` smallint(5) NOT NULL DEFAULT '0',
`ResistanceFire` smallint(5) NOT NULL DEFAULT '0',
`ResistanceNature` smallint(5) NOT NULL DEFAULT '0',
`ResistanceFrost` smallint(5) NOT NULL DEFAULT '0',
`ResistanceShadow` smallint(5) NOT NULL DEFAULT '0',
`ResistanceArcane` smallint(5) NOT NULL DEFAULT '0',
`PetSpellDataId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`MovementType` tinyint(3) unsigned NOT NULL DEFAULT '0',
`MovementTemplateId` int(11) unsigned NOT NULL DEFAULT '0',
`TrainerType` tinyint(4) NOT NULL DEFAULT '0',
`TrainerSpell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`TrainerClass` tinyint(3) unsigned NOT NULL DEFAULT '0',
`TrainerRace` tinyint(3) unsigned NOT NULL DEFAULT '0',
`TrainerTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`VendorTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`EquipmentTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`VehicleTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`GossipMenuId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`AIName` char(64) NOT NULL DEFAULT '',
`ScriptName` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System';
--
-- Dumping data for table `creature_template`
--
LOCK TABLES `creature_template` WRITE;
/*!40000 ALTER TABLE `creature_template` DISABLE KEYS */;
INSERT INTO `creature_template` VALUES
(1,'Waypoint(Only GM can see it)','Visual',NULL,1,1,0,0,0,10045,0,0,0,35,35,1,0,8,7,1,0,0,4096,0,0,130,5242886,0.91,1.14286,8,0,-1,1,1,1,1,1,1,64,64,0,0,2,3,1,2,5,10,100,2000,2200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'','');
/*!40000 ALTER TABLE `creature_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_template_addon`
--
DROP TABLE IF EXISTS `creature_template_addon`;
CREATE TABLE `creature_template_addon` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`mount` mediumint(8) unsigned NOT NULL DEFAULT '0',
`bytes1` int(10) unsigned NOT NULL DEFAULT '0',
`b2_0_sheath` tinyint(3) unsigned NOT NULL DEFAULT '0',
`b2_1_pvp_state` tinyint(3) unsigned NOT NULL DEFAULT '0',
`emote` mediumint(8) unsigned NOT NULL DEFAULT '0',
`moveflags` int(10) unsigned NOT NULL DEFAULT '0',
`auras` text,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `creature_template_addon`
--
LOCK TABLES `creature_template_addon` WRITE;
/*!40000 ALTER TABLE `creature_template_addon` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_template_addon` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `creature_template_spells`
--
DROP TABLE IF EXISTS `creature_template_spells`;
CREATE TABLE `creature_template_spells` (
`entry` mediumint(8) unsigned NOT NULL,
`spell1` mediumint(8) unsigned NOT NULL,
`spell2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell5` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell6` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell7` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell8` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell9` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell10` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System (Spells used by creature)';
--
-- Dumping data for table `creature_template_spells`
--
LOCK TABLES `creature_template_spells` WRITE;
/*!40000 ALTER TABLE `creature_template_spells` DISABLE KEYS */;
/*!40000 ALTER TABLE `creature_template_spells` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `db_script_string`
--
DROP TABLE IF EXISTS `db_script_string`;
CREATE TABLE `db_script_string` (
`entry` int(11) unsigned NOT NULL DEFAULT '0',
`content_default` text NOT NULL,
`content_loc1` text,
`content_loc2` text,
`content_loc3` text,
`content_loc4` text,
`content_loc5` text,
`content_loc6` text,
`content_loc7` text,
`content_loc8` text,
`sound` mediumint(8) unsigned NOT NULL DEFAULT '0',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0',
`language` tinyint(3) unsigned NOT NULL DEFAULT '0',
`emote` smallint(5) unsigned NOT NULL DEFAULT '0',
`comment` text,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `db_script_string`
--
LOCK TABLES `db_script_string` WRITE;
/*!40000 ALTER TABLE `db_script_string` DISABLE KEYS */;
/*!40000 ALTER TABLE `db_script_string` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `dbscripts_on_creature_movement`
--
DROP TABLE IF EXISTS `dbscripts_on_creature_movement`;
CREATE TABLE `dbscripts_on_creature_movement` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`delay` int(10) unsigned NOT NULL DEFAULT '0',
`command` mediumint(8) unsigned NOT NULL DEFAULT '0',
`datalong` mediumint(8) unsigned NOT NULL DEFAULT '0',
`datalong2` int(10) unsigned NOT NULL DEFAULT '0',
`buddy_entry` int(10) unsigned NOT NULL DEFAULT '0',
`search_radius` int(10) unsigned NOT NULL DEFAULT '0',
`data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0',
`dataint` int(11) NOT NULL DEFAULT '0',
`dataint2` int(11) NOT NULL DEFAULT '0',
`dataint3` int(11) NOT NULL DEFAULT '0',
`dataint4` int(11) NOT NULL DEFAULT '0',
`x` float NOT NULL DEFAULT '0',
`y` float NOT NULL DEFAULT '0',
`z` float NOT NULL DEFAULT '0',
`o` float NOT NULL DEFAULT '0',
`comments` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `dbscripts_on_creature_movement`
--
LOCK TABLES `dbscripts_on_creature_movement` WRITE;
/*!40000 ALTER TABLE `dbscripts_on_creature_movement` DISABLE KEYS */;
/*!40000 ALTER TABLE `dbscripts_on_creature_movement` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure of `dbscripts_on_event`, `dbscripts_on_go_use`, `dbscripts_on_go_template_use`,
-- `dbscripts_on_gossip`, `dbscripts_on_quest_end`, `dbscripts_on_quest_start`,
-- `dbscripts_on_spell`, `dbscripts_on_creature_death`
DROP TABLE IF EXISTS dbscripts_on_event;
CREATE TABLE dbscripts_on_event LIKE dbscripts_on_creature_movement;
DROP TABLE IF EXISTS dbscripts_on_go_use;
CREATE TABLE dbscripts_on_go_use LIKE dbscripts_on_creature_movement;
DROP TABLE IF EXISTS dbscripts_on_go_template_use;
CREATE TABLE dbscripts_on_go_template_use LIKE dbscripts_on_creature_movement;
DROP TABLE IF EXISTS dbscripts_on_gossip;
CREATE TABLE dbscripts_on_gossip LIKE dbscripts_on_creature_movement;
DROP TABLE IF EXISTS dbscripts_on_quest_end;
CREATE TABLE dbscripts_on_quest_end LIKE dbscripts_on_creature_movement;
DROP TABLE IF EXISTS dbscripts_on_quest_start;
CREATE TABLE dbscripts_on_quest_start LIKE dbscripts_on_creature_movement;
DROP TABLE IF EXISTS dbscripts_on_spell;
CREATE TABLE dbscripts_on_spell LIKE dbscripts_on_creature_movement;
DROP TABLE IF EXISTS dbscripts_on_creature_death;
CREATE TABLE dbscripts_on_creature_death LIKE dbscripts_on_creature_movement;
--
-- Table structure for table `disenchant_loot_template`
--
DROP TABLE IF EXISTS `disenchant_loot_template`;
CREATE TABLE `disenchant_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Recommended id selection: item_level*100 + item_quality',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `disenchant_loot_template`
--
LOCK TABLES `disenchant_loot_template` WRITE;
/*!40000 ALTER TABLE `disenchant_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `disenchant_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `exploration_basexp`
--
DROP TABLE IF EXISTS `exploration_basexp`;
CREATE TABLE `exploration_basexp` (
`level` tinyint(4) NOT NULL DEFAULT '0',
`basexp` mediumint(9) NOT NULL DEFAULT '0',
PRIMARY KEY (`level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Exploration System';
--
-- Dumping data for table `exploration_basexp`
--
LOCK TABLES `exploration_basexp` WRITE;
/*!40000 ALTER TABLE `exploration_basexp` DISABLE KEYS */;
INSERT INTO `exploration_basexp` VALUES
(0,0),
(1,5),
(2,15),
(3,25),
(4,35),
(5,45),
(6,55),
(7,65),
(8,70),
(9,80),
(10,85),
(11,90),
(12,90),
(13,90),
(14,100),
(15,105),
(16,115),
(17,125),
(18,135),
(19,145),
(20,155),
(21,165),
(22,175),
(23,185),
(24,195),
(25,200),
(26,210),
(27,220),
(28,230),
(29,240),
(30,245),
(31,250),
(32,255),
(33,265),
(34,270),
(35,275),
(36,280),
(37,285),
(38,285),
(39,300),
(40,315),
(41,330),
(42,345),
(43,360),
(44,375),
(45,390),
(46,405),
(47,420),
(48,440),
(49,455),
(50,470),
(51,490),
(52,510),
(53,530),
(54,540),
(55,560),
(56,580),
(57,600),
(58,620),
(59,640),
(60,660),
(61,970),
(62,1000),
(63,1050),
(64,1080),
(65,1100),
(66,1130),
(67,1160),
(68,1200),
(69,1230),
(70,1250);
/*!40000 ALTER TABLE `exploration_basexp` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `fishing_loot_template`
--
DROP TABLE IF EXISTS `fishing_loot_template`;
CREATE TABLE `fishing_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'entry 0 used for junk loot at fishing fail (if allowed by config option)',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `fishing_loot_template`
--
LOCK TABLES `fishing_loot_template` WRITE;
/*!40000 ALTER TABLE `fishing_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `fishing_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_event`
--
DROP TABLE IF EXISTS `game_event`;
CREATE TABLE `game_event` (
`entry` mediumint(8) unsigned NOT NULL COMMENT 'Entry of the game event',
`start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Absolute start date, the event will never start before',
`end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Absolute end date, the event will never start afler',
`occurence` bigint(20) unsigned NOT NULL DEFAULT '86400' COMMENT 'Delay in minutes between occurences of the event',
`length` bigint(20) unsigned NOT NULL DEFAULT '43200' COMMENT 'Length in minutes of the event',
`holiday` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Client side holiday id',
`description` varchar(255) DEFAULT NULL COMMENT 'Description of the event displayed in console',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `game_event`
--
LOCK TABLES `game_event` WRITE;
/*!40000 ALTER TABLE `game_event` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_event` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_event_creature`
--
DROP TABLE IF EXISTS `game_event_creature`;
CREATE TABLE `game_event_creature` (
`guid` int(10) unsigned NOT NULL,
`event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Negatives value to remove during event and ignore pool grouping, positive value for spawn during event and if guid is part of pool then al pool memebers must be listed as part of event spawn.',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `game_event_creature`
--
LOCK TABLES `game_event_creature` WRITE;
/*!40000 ALTER TABLE `game_event_creature` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_event_creature` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_event_creature_data`
--
DROP TABLE IF EXISTS `game_event_creature_data`;
CREATE TABLE `game_event_creature_data` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`entry_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`modelid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`equipment_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell_start` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell_end` mediumint(8) unsigned NOT NULL DEFAULT '0',
`event` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`,`event`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `game_event_creature_data`
--
LOCK TABLES `game_event_creature_data` WRITE;
/*!40000 ALTER TABLE `game_event_creature_data` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_event_creature_data` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_event_gameobject`
--
DROP TABLE IF EXISTS `game_event_gameobject`;
CREATE TABLE `game_event_gameobject` (
`guid` int(10) unsigned NOT NULL,
`event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Negatives value to remove during event and ignore pool grouping, positive value for spawn during event and if guid is part of pool then al pool memebers must be listed as part of event spawn.',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `game_event_gameobject`
--
LOCK TABLES `game_event_gameobject` WRITE;
/*!40000 ALTER TABLE `game_event_gameobject` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_event_gameobject` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_event_mail`
--
DROP TABLE IF EXISTS `game_event_mail`;
CREATE TABLE `game_event_mail` (
`event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Negatives value to send at event stop, positive value for send at event start.',
`raceMask` mediumint(8) unsigned NOT NULL DEFAULT '0',
`quest` mediumint(8) unsigned NOT NULL DEFAULT '0',
`mailTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`senderEntry` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`event`,`raceMask`,`quest`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Game event system';
--
-- Dumping data for table `game_event_mail`
--
LOCK TABLES `game_event_mail` WRITE;
/*!40000 ALTER TABLE `game_event_mail` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_event_mail` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_event_quest`
--
DROP TABLE IF EXISTS `game_event_quest`;
CREATE TABLE `game_event_quest` (
`quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'entry from quest_template',
`event` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'entry from game_event',
PRIMARY KEY (`quest`,`event`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Game event system';
--
-- Dumping data for table `game_event_quest`
--
LOCK TABLES `game_event_quest` WRITE;
/*!40000 ALTER TABLE `game_event_quest` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_event_quest` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_graveyard_zone`
--
DROP TABLE IF EXISTS `game_graveyard_zone`;
CREATE TABLE `game_graveyard_zone` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ghost_zone` mediumint(8) unsigned NOT NULL DEFAULT '0',
`faction` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`,`ghost_zone`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Trigger System';
--
-- Dumping data for table `game_graveyard_zone`
--
LOCK TABLES `game_graveyard_zone` WRITE;
/*!40000 ALTER TABLE `game_graveyard_zone` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_graveyard_zone` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_tele`
--
DROP TABLE IF EXISTS `game_tele`;
CREATE TABLE `game_tele` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
`map` smallint(5) unsigned NOT NULL DEFAULT '0',
`name` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tele Command';
--
-- Dumping data for table `game_tele`
--
LOCK TABLES `game_tele` WRITE;
/*!40000 ALTER TABLE `game_tele` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_tele` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_weather`
--
DROP TABLE IF EXISTS `game_weather`;
CREATE TABLE `game_weather` (
`zone` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spring_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`spring_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`spring_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`summer_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`summer_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`summer_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`fall_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`fall_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`fall_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`winter_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`winter_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
`winter_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25',
PRIMARY KEY (`zone`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Weather System';
--
-- Dumping data for table `game_weather`
--
LOCK TABLES `game_weather` WRITE;
/*!40000 ALTER TABLE `game_weather` DISABLE KEYS */;
/*!40000 ALTER TABLE `game_weather` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gameobject`
--
DROP TABLE IF EXISTS `gameobject`;
CREATE TABLE `gameobject` (
`guid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier',
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Gameobject Identifier',
`map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
`spawnMask` tinyint(3) unsigned NOT NULL DEFAULT '1',
`phaseMask` int(11) unsigned NOT NULL DEFAULT '1',
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
`rotation0` float NOT NULL DEFAULT '0',
`rotation1` float NOT NULL DEFAULT '0',
`rotation2` float NOT NULL DEFAULT '0',
`rotation3` float NOT NULL DEFAULT '0',
`spawntimesecs` int(11) NOT NULL DEFAULT '0',
`animprogress` tinyint(3) unsigned NOT NULL DEFAULT '0',
`state` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`),
KEY `idx_map` (`map`),
KEY `idx_id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Gameobject System';
--
-- Dumping data for table `gameobject`
--
LOCK TABLES `gameobject` WRITE;
/*!40000 ALTER TABLE `gameobject` DISABLE KEYS */;
/*!40000 ALTER TABLE `gameobject` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gameobject_addon`
--
DROP TABLE IF EXISTS `gameobject_addon`;
CREATE TABLE `gameobject_addon` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`path_rotation0` float NOT NULL DEFAULT '0',
`path_rotation1` float NOT NULL DEFAULT '0',
`path_rotation2` float NOT NULL DEFAULT '0',
`path_rotation3` float NOT NULL DEFAULT '1',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Gameobject System';
--
-- Dumping data for table `gameobject_addon`
--
LOCK TABLES `gameobject_addon` WRITE;
/*!40000 ALTER TABLE `gameobject_addon` DISABLE KEYS */;
/*!40000 ALTER TABLE `gameobject_addon` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gameobject_battleground`
--
DROP TABLE IF EXISTS `gameobject_battleground`;
CREATE TABLE `gameobject_battleground` (
`guid` int(10) unsigned NOT NULL COMMENT 'GameObject''s GUID',
`event1` tinyint(3) unsigned NOT NULL COMMENT 'main event',
`event2` tinyint(3) unsigned NOT NULL COMMENT 'sub event',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='GameObject battleground indexing system';
--
-- Dumping data for table `gameobject_battleground`
--
LOCK TABLES `gameobject_battleground` WRITE;
/*!40000 ALTER TABLE `gameobject_battleground` DISABLE KEYS */;
/*!40000 ALTER TABLE `gameobject_battleground` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gameobject_involvedrelation`
--
DROP TABLE IF EXISTS `gameobject_involvedrelation`;
CREATE TABLE `gameobject_involvedrelation` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier',
PRIMARY KEY (`id`,`quest`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `gameobject_involvedrelation`
--
LOCK TABLES `gameobject_involvedrelation` WRITE;
/*!40000 ALTER TABLE `gameobject_involvedrelation` DISABLE KEYS */;
/*!40000 ALTER TABLE `gameobject_involvedrelation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gameobject_loot_template`
--
DROP TABLE IF EXISTS `gameobject_loot_template`;
CREATE TABLE `gameobject_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `gameobject_loot_template`
--
LOCK TABLES `gameobject_loot_template` WRITE;
/*!40000 ALTER TABLE `gameobject_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `gameobject_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gameobject_questrelation`
--
DROP TABLE IF EXISTS `gameobject_questrelation`;
CREATE TABLE `gameobject_questrelation` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier',
PRIMARY KEY (`id`,`quest`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `gameobject_questrelation`
--
LOCK TABLES `gameobject_questrelation` WRITE;
/*!40000 ALTER TABLE `gameobject_questrelation` DISABLE KEYS */;
/*!40000 ALTER TABLE `gameobject_questrelation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gameobject_template`
--
DROP TABLE IF EXISTS `gameobject_template`;
CREATE TABLE `gameobject_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0',
`displayId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` varchar(100) NOT NULL DEFAULT '',
`IconName` varchar(100) NOT NULL DEFAULT '',
`castBarCaption` varchar(100) NOT NULL DEFAULT '',
`unk1` varchar(100) NOT NULL DEFAULT '',
`faction` smallint(5) unsigned NOT NULL DEFAULT '0',
`flags` int(10) unsigned NOT NULL DEFAULT '0',
`size` float NOT NULL DEFAULT '1',
`questItem1` int(11) unsigned NOT NULL DEFAULT '0',
`questItem2` int(11) unsigned NOT NULL DEFAULT '0',
`questItem3` int(11) unsigned NOT NULL DEFAULT '0',
`questItem4` int(11) unsigned NOT NULL DEFAULT '0',
`questItem5` int(11) unsigned NOT NULL DEFAULT '0',
`questItem6` int(11) unsigned NOT NULL DEFAULT '0',
`data0` int(10) unsigned NOT NULL DEFAULT '0',
`data1` int(10) unsigned NOT NULL DEFAULT '0',
`data2` int(10) unsigned NOT NULL DEFAULT '0',
`data3` int(10) unsigned NOT NULL DEFAULT '0',
`data4` int(10) unsigned NOT NULL DEFAULT '0',
`data5` int(10) unsigned NOT NULL DEFAULT '0',
`data6` int(10) unsigned NOT NULL DEFAULT '0',
`data7` int(10) unsigned NOT NULL DEFAULT '0',
`data8` int(10) unsigned NOT NULL DEFAULT '0',
`data9` int(10) unsigned NOT NULL DEFAULT '0',
`data10` int(10) unsigned NOT NULL DEFAULT '0',
`data11` int(10) unsigned NOT NULL DEFAULT '0',
`data12` int(10) unsigned NOT NULL DEFAULT '0',
`data13` int(10) unsigned NOT NULL DEFAULT '0',
`data14` int(10) unsigned NOT NULL DEFAULT '0',
`data15` int(10) unsigned NOT NULL DEFAULT '0',
`data16` int(10) unsigned NOT NULL DEFAULT '0',
`data17` int(10) unsigned NOT NULL DEFAULT '0',
`data18` int(10) unsigned NOT NULL DEFAULT '0',
`data19` int(10) unsigned NOT NULL DEFAULT '0',
`data20` int(10) unsigned NOT NULL DEFAULT '0',
`data21` int(10) unsigned NOT NULL DEFAULT '0',
`data22` int(10) unsigned NOT NULL DEFAULT '0',
`data23` int(10) unsigned NOT NULL DEFAULT '0',
`data24` int(10) unsigned NOT NULL DEFAULT '0',
`data25` int(10) unsigned NOT NULL DEFAULT '0',
`data26` int(10) unsigned NOT NULL DEFAULT '0',
`data27` int(10) unsigned NOT NULL DEFAULT '0',
`data28` int(10) unsigned NOT NULL DEFAULT '0',
`data29` int(10) unsigned NOT NULL DEFAULT '0',
`data30` int(10) unsigned NOT NULL DEFAULT '0',
`data31` int(10) unsigned NOT NULL DEFAULT '0',
`unk2` int(10) unsigned NOT NULL DEFAULT '0',
`mingold` mediumint(8) unsigned NOT NULL DEFAULT '0',
`maxgold` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ScriptName` varchar(64) NOT NULL DEFAULT '',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Gameobject System';
--
-- Dumping data for table `gameobject_template`
--
LOCK TABLES `gameobject_template` WRITE;
/*!40000 ALTER TABLE `gameobject_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `gameobject_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gossip_menu`
--
DROP TABLE IF EXISTS `gossip_menu`;
CREATE TABLE `gossip_menu` (
`entry` smallint(6) unsigned NOT NULL DEFAULT '0',
`text_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`script_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'script in `dbscripts_on_gossip` - will be executed on GossipHello',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`text_id`,`script_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `gossip_menu`
--
LOCK TABLES `gossip_menu` WRITE;
/*!40000 ALTER TABLE `gossip_menu` DISABLE KEYS */;
/*!40000 ALTER TABLE `gossip_menu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `gossip_menu_option`
--
DROP TABLE IF EXISTS `gossip_menu_option`;
CREATE TABLE `gossip_menu_option` (
`menu_id` smallint(6) unsigned NOT NULL DEFAULT '0',
`id` smallint(6) unsigned NOT NULL DEFAULT '0',
`option_icon` mediumint(8) unsigned NOT NULL DEFAULT '0',
`option_text` text,
`option_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
`npc_option_npcflag` int(10) unsigned NOT NULL DEFAULT '0',
`action_menu_id` mediumint(8) NOT NULL DEFAULT '0',
`action_poi_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`action_script_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`box_coded` tinyint(3) unsigned NOT NULL DEFAULT '0',
`box_money` int(11) unsigned NOT NULL DEFAULT '0',
`box_text` text,
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`menu_id`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `gossip_menu_option`
--
LOCK TABLES `gossip_menu_option` WRITE;
/*!40000 ALTER TABLE `gossip_menu_option` DISABLE KEYS */;
INSERT INTO `gossip_menu_option` VALUES
(0,0,0,'GOSSIP_OPTION_QUESTGIVER',2,2,0,0,0,0,0,NULL,0),
(0,1,1,'GOSSIP_OPTION_VENDOR',3,128,0,0,0,0,0,NULL,0),
(0,2,2,'GOSSIP_OPTION_TAXIVENDOR',4,8192,0,0,0,0,0,NULL,0),
(0,3,3,'GOSSIP_OPTION_TRAINER',5,16,0,0,0,0,0,NULL,0),
(0,4,4,'GOSSIP_OPTION_SPIRITHEALER',6,16384,0,0,0,0,0,NULL,0),
(0,5,4,'GOSSIP_OPTION_SPIRITGUIDE',7,32768,0,0,0,0,0,NULL,0),
(0,6,5,'GOSSIP_OPTION_INNKEEPER',8,65536,0,0,0,0,0,NULL,0),
(0,7,6,'GOSSIP_OPTION_BANKER',9,131072,0,0,0,0,0,NULL,0),
(0,8,7,'GOSSIP_OPTION_PETITIONER',10,262144,0,0,0,0,0,NULL,0),
(0,9,8,'GOSSIP_OPTION_TABARDDESIGNER',11,524288,0,0,0,0,0,NULL,0),
(0,10,9,'GOSSIP_OPTION_BATTLEFIELD',12,1048576,0,0,0,0,0,NULL,0),
(0,11,6,'GOSSIP_OPTION_AUCTIONEER',13,2097152,0,0,0,0,0,NULL,0),
(0,12,0,'GOSSIP_OPTION_STABLEPET',14,4194304,0,0,0,0,0,NULL,0),
(0,13,1,'GOSSIP_OPTION_ARMORER',15,4096,0,0,0,0,0,NULL,0),
(0,14,0,'GOSSIP_OPTION_UNLEARNTALENTS',16,16,0,0,0,0,0,NULL,0),
(0,15,2,'GOSSIP_OPTION_UNLEARNPETSKILLS',17,16,0,0,0,0,0,NULL,0);
/*!40000 ALTER TABLE `gossip_menu_option` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `hotfix_data`
--
DROP TABLE IF EXISTS `hotfix_data`;
CREATE TABLE `hotfix_data` (
`entry` int(10) unsigned NOT NULL,
`type` int(10) unsigned NOT NULL DEFAULT '0',
`hotfixDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`entry`,`type`,`hotfixDate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `hotfix_data`
--
LOCK TABLES `hotfix_data` WRITE;
/*!40000 ALTER TABLE `hotfix_data` DISABLE KEYS */;
INSERT INTO `hotfix_data` VALUES
(6948,1344507586,'2011-11-23 08:34:13'),
(44623,1344507586,'2011-11-23 08:34:04'),
(44625,1344507586,'2011-11-23 08:34:04'),
(44626,1344507586,'2011-11-23 08:34:04'),
(44632,1344507586,'2011-11-23 08:34:04'),
(44812,1344507586,'2011-11-23 08:34:00'),
(44834,1344507586,'2011-11-23 08:34:00'),
(44835,1344507586,'2011-11-23 08:34:00'),
(44836,1344507586,'2011-11-23 08:34:00'),
(44837,1344507586,'2011-11-23 08:34:00'),
(44838,1344507586,'2011-11-23 08:34:00'),
(44839,1344507586,'2011-11-23 08:34:00'),
(44840,1344507586,'2011-11-23 08:34:00'),
(44844,1344507586,'2011-11-23 08:34:00'),
(44853,1344507586,'2011-11-23 08:34:00'),
(44854,1344507586,'2011-11-23 08:34:00'),
(44855,1344507586,'2011-11-23 08:34:00'),
(44856,1344507586,'2011-11-23 08:34:00'),
(46784,1344507586,'2011-11-23 08:34:00'),
(46793,1344507586,'2011-11-23 08:34:00'),
(46796,1344507586,'2011-11-23 08:34:00'),
(46797,1344507586,'2011-11-23 08:34:00'),
(46887,1344507586,'2011-11-23 08:34:00'),
(46888,1344507586,'2011-11-23 08:34:00'),
(64488,1344507586,'2011-11-23 08:34:13'),
(69847,1344507586,'2011-11-23 08:34:03'),
(69847,1344507586,'2011-11-23 08:34:06'),
(72068,1344507586,'2011-11-23 08:34:03'),
(72068,1344507586,'2011-11-23 08:34:06');
/*!40000 ALTER TABLE `hotfix_data` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `instance_encounters`
--
DROP TABLE IF EXISTS `instance_encounters`;
CREATE TABLE `instance_encounters` (
`entry` int(10) unsigned NOT NULL COMMENT 'Unique entry from DungeonEncounter.dbc',
`creditType` tinyint(3) unsigned NOT NULL DEFAULT '0',
`creditEntry` int(10) unsigned NOT NULL DEFAULT '0',
`lastEncounterDungeon` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'If not 0, LfgDungeon.dbc entry for the instance it is last encounter in',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `instance_encounters`
--
LOCK TABLES `instance_encounters` WRITE;
/*!40000 ALTER TABLE `instance_encounters` DISABLE KEYS */;
/*!40000 ALTER TABLE `instance_encounters` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `instance_template`
--
DROP TABLE IF EXISTS `instance_template`;
CREATE TABLE `instance_template` (
`map` smallint(5) unsigned NOT NULL,
`parent` smallint(5) unsigned NOT NULL DEFAULT '0',
`levelMin` tinyint(3) unsigned NOT NULL DEFAULT '0',
`levelMax` tinyint(3) unsigned NOT NULL DEFAULT '0',
`ScriptName` varchar(128) NOT NULL DEFAULT '',
PRIMARY KEY (`map`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `instance_template`
--
LOCK TABLES `instance_template` WRITE;
/*!40000 ALTER TABLE `instance_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `instance_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `item_convert`
--
DROP TABLE IF EXISTS `item_convert`;
CREATE TABLE `item_convert` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item Convert System';
--
-- Dumping data for table `item_convert`
--
LOCK TABLES `item_convert` WRITE;
/*!40000 ALTER TABLE `item_convert` DISABLE KEYS */;
/*!40000 ALTER TABLE `item_convert` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `item_enchantment_template`
--
DROP TABLE IF EXISTS `item_enchantment_template`;
CREATE TABLE `item_enchantment_template` (
`entry` mediumint(8) NOT NULL DEFAULT '0',
`ench` mediumint(8) unsigned NOT NULL DEFAULT '0',
`chance` float unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`ench`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item Random Enchantment System';
--
-- Dumping data for table `item_enchantment_template`
--
LOCK TABLES `item_enchantment_template` WRITE;
/*!40000 ALTER TABLE `item_enchantment_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `item_enchantment_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `item_expire_convert`
--
DROP TABLE IF EXISTS `item_expire_convert`;
CREATE TABLE `item_expire_convert` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item Convert System';
--
-- Dumping data for table `item_expire_convert`
--
LOCK TABLES `item_expire_convert` WRITE;
/*!40000 ALTER TABLE `item_expire_convert` DISABLE KEYS */;
/*!40000 ALTER TABLE `item_expire_convert` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `item_loot_template`
--
DROP TABLE IF EXISTS `item_loot_template`;
CREATE TABLE `item_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `item_loot_template`
--
LOCK TABLES `item_loot_template` WRITE;
/*!40000 ALTER TABLE `item_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `item_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `item_required_target`
--
DROP TABLE IF EXISTS `item_required_target`;
CREATE TABLE `item_required_target` (
`entry` mediumint(8) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL DEFAULT '0',
`targetEntry` mediumint(8) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `entry_type_target` (`entry`,`type`,`targetEntry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED;
--
-- Dumping data for table `item_required_target`
--
LOCK TABLES `item_required_target` WRITE;
/*!40000 ALTER TABLE `item_required_target` DISABLE KEYS */;
/*!40000 ALTER TABLE `item_required_target` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `item_template`
--
DROP TABLE IF EXISTS `item_template`;
CREATE TABLE `item_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`class` tinyint(3) unsigned NOT NULL DEFAULT '0',
`subclass` tinyint(3) unsigned NOT NULL DEFAULT '0',
`unk0` int(11) NOT NULL DEFAULT '-1',
`name` varchar(255) NOT NULL DEFAULT '',
`displayid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Quality` tinyint(3) unsigned NOT NULL DEFAULT '0',
`Flags` int(10) unsigned NOT NULL DEFAULT '0',
`Flags2` int(10) unsigned NOT NULL DEFAULT '0',
`Unknown` float NOT NULL,
`Unknown1` float NOT NULL,
`Unknown2` int(10) NOT NULL,
`BuyCount` tinyint(3) unsigned NOT NULL DEFAULT '1',
`BuyPrice` int(10) unsigned NOT NULL DEFAULT '0',
`SellPrice` int(10) unsigned NOT NULL DEFAULT '0',
`InventoryType` tinyint(3) unsigned NOT NULL DEFAULT '0',
`AllowableClass` mediumint(9) NOT NULL DEFAULT '-1',
`AllowableRace` mediumint(9) NOT NULL DEFAULT '-1',
`ItemLevel` smallint(5) unsigned NOT NULL DEFAULT '0',
`RequiredLevel` tinyint(3) unsigned NOT NULL DEFAULT '0',
`RequiredSkill` smallint(5) unsigned NOT NULL DEFAULT '0',
`RequiredSkillRank` smallint(5) unsigned NOT NULL DEFAULT '0',
`requiredspell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`requiredhonorrank` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RequiredCityRank` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RequiredReputationFaction` smallint(5) unsigned NOT NULL DEFAULT '0',
`RequiredReputationRank` smallint(5) unsigned NOT NULL DEFAULT '0',
`maxcount` smallint(5) NOT NULL DEFAULT '-1',
`stackable` smallint(5) NOT NULL DEFAULT '1',
`ContainerSlots` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_type1` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value1` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_1` int(10) NOT NULL DEFAULT '0',
`stat_unk2_1` int(10) NOT NULL DEFAULT '0',
`stat_type2` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value2` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_2` int(10) NOT NULL DEFAULT '0',
`stat_unk2_2` int(10) NOT NULL DEFAULT '0',
`stat_type3` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value3` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_3` int(10) NOT NULL DEFAULT '0',
`stat_unk2_3` int(10) NOT NULL DEFAULT '0',
`stat_type4` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value4` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_4` int(10) NOT NULL DEFAULT '0',
`stat_unk2_4` int(10) NOT NULL DEFAULT '0',
`stat_type5` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value5` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_5` int(10) NOT NULL DEFAULT '0',
`stat_unk2_5` int(10) NOT NULL DEFAULT '0',
`stat_type6` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value6` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_6` int(10) NOT NULL DEFAULT '0',
`stat_unk2_6` int(10) NOT NULL DEFAULT '0',
`stat_type7` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value7` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_7` int(10) NOT NULL DEFAULT '0',
`stat_unk2_7` int(10) NOT NULL DEFAULT '0',
`stat_type8` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value8` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_8` int(10) NOT NULL DEFAULT '0',
`stat_unk2_8` int(10) NOT NULL DEFAULT '0',
`stat_type9` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value9` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_9` int(10) NOT NULL DEFAULT '0',
`stat_unk2_9` int(10) NOT NULL DEFAULT '0',
`stat_type10` tinyint(3) unsigned NOT NULL DEFAULT '0',
`stat_value10` smallint(6) NOT NULL DEFAULT '0',
`stat_unk1_10` int(10) NOT NULL DEFAULT '0',
`stat_unk2_10` int(10) NOT NULL DEFAULT '0',
`ScalingStatDistribution` smallint(6) NOT NULL DEFAULT '0',
`DamageType` tinyint(3) unsigned NOT NULL DEFAULT '0',
`delay` int(10) NOT NULL,
`RangedModRange` float NOT NULL DEFAULT '0',
`spellid_1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spelltrigger_1` tinyint(3) unsigned NOT NULL DEFAULT '0',
`spellcharges_1` smallint(5) NOT NULL DEFAULT '0',
`spellppmRate_1` float NOT NULL DEFAULT '0',
`spellcooldown_1` int(11) NOT NULL DEFAULT '-1',
`spellcategory_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`spellcategorycooldown_1` int(11) NOT NULL DEFAULT '-1',
`spellid_2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spelltrigger_2` tinyint(3) unsigned NOT NULL DEFAULT '0',
`spellcharges_2` smallint(5) NOT NULL DEFAULT '0',
`spellppmRate_2` float NOT NULL DEFAULT '0',
`spellcooldown_2` int(11) NOT NULL DEFAULT '-1',
`spellcategory_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`spellcategorycooldown_2` int(11) NOT NULL DEFAULT '-1',
`spellid_3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spelltrigger_3` tinyint(3) unsigned NOT NULL DEFAULT '0',
`spellcharges_3` smallint(5) NOT NULL DEFAULT '0',
`spellppmRate_3` float NOT NULL DEFAULT '0',
`spellcooldown_3` int(11) NOT NULL DEFAULT '-1',
`spellcategory_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`spellcategorycooldown_3` int(11) NOT NULL DEFAULT '-1',
`spellid_4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spelltrigger_4` tinyint(3) unsigned NOT NULL DEFAULT '0',
`spellcharges_4` smallint(5) NOT NULL DEFAULT '0',
`spellppmRate_4` float NOT NULL DEFAULT '0',
`spellcooldown_4` int(11) NOT NULL DEFAULT '-1',
`spellcategory_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`spellcategorycooldown_4` int(11) NOT NULL DEFAULT '-1',
`spellid_5` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spelltrigger_5` tinyint(3) unsigned NOT NULL DEFAULT '0',
`spellcharges_5` smallint(5) NOT NULL DEFAULT '0',
`spellppmRate_5` float NOT NULL DEFAULT '0',
`spellcooldown_5` int(11) NOT NULL DEFAULT '-1',
`spellcategory_5` smallint(5) unsigned NOT NULL DEFAULT '0',
`spellcategorycooldown_5` int(11) NOT NULL DEFAULT '-1',
`bonding` tinyint(3) unsigned NOT NULL DEFAULT '0',
`description` varchar(255) NOT NULL DEFAULT '',
`PageText` mediumint(8) unsigned NOT NULL DEFAULT '0',
`LanguageID` tinyint(3) unsigned NOT NULL DEFAULT '0',
`PageMaterial` tinyint(3) unsigned NOT NULL DEFAULT '0',
`startquest` mediumint(8) unsigned NOT NULL DEFAULT '0',
`lockid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Material` tinyint(4) NOT NULL DEFAULT '0',
`sheath` tinyint(3) unsigned NOT NULL DEFAULT '0',
`RandomProperty` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RandomSuffix` mediumint(8) unsigned NOT NULL DEFAULT '0',
`itemset` mediumint(8) unsigned NOT NULL DEFAULT '0',
`MaxDurability` smallint(5) unsigned NOT NULL DEFAULT '0',
`area` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Map` smallint(6) NOT NULL DEFAULT '0',
`BagFamily` mediumint(9) NOT NULL DEFAULT '0',
`TotemCategory` mediumint(9) NOT NULL DEFAULT '0',
`socketColor_1` tinyint(4) NOT NULL DEFAULT '0',
`socketContent_1` mediumint(9) NOT NULL DEFAULT '0',
`socketColor_2` tinyint(4) NOT NULL DEFAULT '0',
`socketContent_2` mediumint(9) NOT NULL DEFAULT '0',
`socketColor_3` tinyint(4) NOT NULL DEFAULT '0',
`socketContent_3` mediumint(9) NOT NULL DEFAULT '0',
`socketBonus` mediumint(9) NOT NULL DEFAULT '0',
`GemProperties` mediumint(9) NOT NULL DEFAULT '0',
`RequiredDisenchantSkill` smallint(6) NOT NULL DEFAULT '-1',
`ArmorDamageModifier` float NOT NULL DEFAULT '0',
`Duration` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Duration in seconds.',
`ItemLimitCategory` smallint(6) NOT NULL DEFAULT '0',
`HolidayId` int(11) unsigned NOT NULL DEFAULT '0',
`ScriptName` varchar(64) NOT NULL DEFAULT '',
`DisenchantID` mediumint(8) unsigned NOT NULL DEFAULT '0',
`FoodType` tinyint(3) unsigned NOT NULL DEFAULT '0',
`StatScalingFactor` float NOT NULL,
`Unknown400_1` int(10) unsigned NOT NULL DEFAULT '0',
`Unknown400_2` int(10) unsigned NOT NULL DEFAULT '0',
`minMoneyLoot` int(10) unsigned NOT NULL DEFAULT '0',
`maxMoneyLoot` int(10) unsigned NOT NULL DEFAULT '0',
`ExtraFlags` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`),
KEY `items_index` (`class`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item System';
--
-- Dumping data for table `item_template`
--
LOCK TABLES `item_template` WRITE;
/*!40000 ALTER TABLE `item_template` DISABLE KEYS */;
INSERT INTO `item_template` VALUES
(25,2,7,-1,'Worn Shortsword',1542,1,0,8192,0,0,0,1,18,3,21,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,1,0,0,0,1,3,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,1,0,0,0,0,0),
(35,2,10,-1,'Bent Staff',472,1,0,8192,0,0,0,1,24,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,2,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(36,2,4,-1,'Worn Mace',5194,1,0,8192,0,0,0,1,19,3,21,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,3,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,1,0,0,0,0,0),
(37,2,0,-1,'Worn Axe',8483,1,0,8192,0,0,0,1,19,3,21,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2000,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,3,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,1,0,0,0,0,0),
(39,4,1,-1,'Recruit\'s Pants',9892,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(40,4,1,-1,'Recruit\'s Boots',10141,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(43,4,1,-1,'Squire\'s Boots',9938,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(44,4,1,-1,'Squire\'s Pants',9937,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(47,4,1,-1,'Footpad\'s Shoes',9915,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(48,4,1,-1,'Footpad\'s Pants',9913,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(51,4,1,-1,'Neophyte\'s Boots',9946,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52,4,1,-1,'Neophyte\'s Pants',9945,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(55,4,1,-1,'Apprentice\'s Boots',9929,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(56,4,1,-1,'Apprentice\'s Robe',12647,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(57,4,1,-1,'Acolyte\'s Robe',12645,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(59,4,1,-1,'Acolyte\'s Shoes',3261,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(120,4,1,-1,'Thug Pants',10006,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(121,4,1,-1,'Thug Boots',10008,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(129,4,1,-1,'Rugged Trapper\'s Boots',9977,1,0,8192,1.0391,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(139,4,1,-1,'Brawler\'s Pants',9988,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(140,4,1,-1,'Brawler\'s Boots',65781,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(147,4,1,-1,'Rugged Trapper\'s Pants',9975,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(1395,4,1,-1,'Apprentice\'s Pants',1882,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(1396,4,1,-1,'Acolyte\'s Pants',2201,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(2092,2,15,-1,'Worn Dagger',2704,1,0,8192,0,0,0,1,18,3,13,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1600,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,3,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,1,0,0,0,0,0),
(2361,2,5,-1,'Battleworn Hammer',8688,1,0,8192,0,0,0,1,23,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,1,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(2362,4,6,-1,'Worn Wooden Shield',18730,1,0,8192,0,0,0,1,11,2,14,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,4,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(2504,2,2,-1,'Worn Shortbow',8106,1,0,8192,0,0,0,1,29,5,15,-1,-1,2,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2300,1120400000,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,1,0,0,0,0,0),
(2508,2,3,-1,'Old Blunderbuss',2409,1,0,8192,0,0,0,1,27,5,26,-1,-1,2,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2300,1120400000,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,1,0,0,0,0,0),
(3661,2,10,-1,'Handcrafted Staff',18530,1,0,8192,0,0,0,1,23,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,2,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6098,4,1,-1,'Neophyte\'s Robe',12679,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6119,4,1,-1,'Neophyte\'s Robe',12681,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6121,4,1,-1,'Recruit\'s Pants',9984,1,0,8192,0.9765,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6122,4,1,-1,'Recruit\'s Boots',9985,1,0,8192,0.9801,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6123,4,1,-1,'Novice\'s Robe',12683,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6124,4,1,-1,'Novice\'s Pants',9724,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6129,4,1,-1,'Acolyte\'s Robe',12646,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6137,4,1,-1,'Thug Pants',10114,1,0,8192,0.9616,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6138,4,1,-1,'Trapper\'s Boots',10115,1,0,8192,0.9653,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6139,4,1,-1,'Novice\'s Robe',12684,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6140,4,1,-1,'Apprentice\'s Robe',12649,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6144,4,1,-1,'Neophyte\'s Robe',12680,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(6948,15,0,-1,'Hearthstone',6418,1,64,8192,0,0,0,1,0,0,0,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8690,0,0,0,1800000,1176,1800000,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(12282,2,1,-1,'Worn Battleaxe',22291,1,0,8192,0,0,0,1,22,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,1,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20891,4,1,-1,'Neophyte\'s Robe',33256,1,0,8192,1.0082,1,1,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20892,4,1,-1,'Acolyte\'s Robe',33257,1,0,8192,1.0119,1,1,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20893,4,1,-1,'Apprentice\'s Robe',33258,1,0,8192,1.0155,1,1,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20894,4,1,-1,'Apprentice\'s Pants',33259,1,0,8192,1.0192,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20895,4,1,-1,'Apprentice\'s Boots',33260,1,0,8192,1.0494,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20896,4,1,-1,'Lookout\'s Pants',33342,1,0,8192,0.953,1,1,1,7,1,7,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20898,4,1,-1,'Lookout\'s Shoes',36764,1,0,8192,0.9603,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20899,4,1,-1,'Warder\'s Pants',33351,1,0,8192,0.964,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20900,4,1,-1,'Warder\'s Boots',33350,1,0,8192,0.9677,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20902,4,1,-1,'Recruit\'s Pants',33359,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20903,4,1,-1,'Recruit\'s Boots',33348,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20904,4,3,-1,'Recruit\'s Tunic',33346,1,0,8192,0,0,0,1,11,2,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(20977,2,7,-1,'Recruit\'s Shortsword',33304,1,0,8192,0.9826,1,1,1,18,3,21,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,1,0,0,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.6,0,0,0,0,0),
(20978,2,10,-1,'Apprentice\'s Staff',33299,1,0,8192,0.9863,1,1,1,23,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.4,0,0,0,0,0),
(20980,2,2,-1,'Warder\'s Shortbow',8106,1,0,8192,0.9936,1,1,1,27,5,15,-1,-1,2,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2300,100,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.6,0,0,0,0,0),
(23322,4,1,-1,'Acolyte\'s Robe',36138,1,0,8192,0.9533,1,1,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(23344,4,1,-1,'Scout\'s Pants',36120,1,0,8192,0.9605,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(23346,2,8,-1,'Battleworn Claymore',2380,1,0,8192,0.9679,1,1,1,22,4,17,262143,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.4,0,0,0,0,0),
(23347,2,18,-1,'Weathered Crossbow',10671,1,0,8192,0.9716,1,1,1,27,5,26,-1,-1,2,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2500,100,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.4,0,0,0,0,0),
(23348,4,1,-1,'Scout\'s Boots',36122,1,0,8192,0.9752,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(23474,4,1,-1,'Recruit\'s Pants',36125,1,0,8192,1.0495,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(23475,4,1,-1,'Recruit\'s Boots',36126,1,0,8192,0.9531,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(23477,4,1,-1,'Squire\'s Pants',36134,1,0,8192,0.9604,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(23478,4,1,-1,'Recruit\'s Pants',36125,1,0,8192,0.9641,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(23479,4,1,-1,'Recruit\'s Robe',36140,1,0,8192,0.9678,1,1,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(24145,4,1,-1,'Initiate\'s Pants',36790,1,0,8192,1.0238,1,1,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(24146,4,1,-1,'Initiate\'s Boots',36793,1,0,8192,1.0274,1,1,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(25861,2,16,-1,'Crude Throwing Axe',20777,1,4194304,8192,0,0,0,1,15,3,25,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1800,1120400000,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,1,0,0,0,0,0),
(28979,2,16,-1,'Light Throwing Knife',40187,1,4194304,8192,1.0055,1,1,1,15,3,25,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1600,100,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.6,0,0,0,0,0),
(34648,4,4,-1,'Acherus Knight\'s Greaves',51496,2,32768,8192,0,0,0,1,51,10,8,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,10,0,0,7,12,0,0,3,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,6,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34649,4,4,-1,'Acherus Knight\'s Gauntlets',51498,2,32768,8192,0,0,0,1,34,6,10,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,15,0,0,7,6,0,0,32,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,6,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34650,4,4,-1,'Acherus Knight\'s Tunic',51494,2,32768,8192,0,0,0,1,69,13,5,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,20,0,0,7,11,0,0,32,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,6,0,0,0,0,115,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34651,4,4,-1,'Acherus Knight\'s Girdle',51497,2,32768,8192,0,0,0,1,35,7,6,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,10,0,0,32,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,6,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34652,4,4,-1,'Acherus Knight\'s Hood',51495,2,32768,8192,0,0,0,1,52,10,1,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,15,0,0,7,15,0,0,32,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,6,0,0,0,0,70,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34653,4,4,-1,'Acherus Knight\'s Wristguard',51500,2,32768,8192,0,0,0,1,36,7,9,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,7,0,0,31,7,0,0,7,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,6,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34655,4,4,-1,'Acherus Knight\'s Pauldrons',51501,2,32768,8192,0,0,0,1,54,10,3,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,11,0,0,3,9,0,0,7,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,6,0,0,0,0,70,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34656,4,4,-1,'Acherus Knight\'s Legplates',51499,2,32768,8192,0,0,0,1,73,14,7,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,13,0,0,3,10,0,0,7,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,6,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34657,4,0,-1,'Choker of Damnation',6539,2,32768,8192,0,0,0,1,2303,575,2,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,9,0,0,7,8,0,0,31,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34658,4,0,-1,'Plague Band',224,2,32768,8192,0,0,0,1,534,133,11,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,11,0,0,3,6,0,0,7,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(34659,4,1,-1,'Acherus Knight\'s Shroud',49738,2,32768,8192,0,0,0,1,31,6,16,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,12,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(38145,1,0,-1,'Deathweave Bag',1282,1,32768,8192,0,0,0,1,0,0,18,-1,-1,35,0,0,0,0,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(38147,4,0,-1,'Corrupted Band',224,2,32768,8192,0,0,0,1,534,133,11,-1,-1,60,55,0,0,0,0,0,0,0,0,1,0,4,11,0,0,3,6,0,0,32,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,1,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,'',10,0,0,0,0,0,0,0),
(41751,0,5,-1,'Black Mushroom',36728,1,0,8192,0,0,0,5,100,5,0,-1,-1,65,55,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27094,0,-1,0,0,11,1000,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,5,0,0,0,0,0,0),
(49399,4,1,-1,'Gilnean Apprentice\'s Robe',62549,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49400,4,1,-1,'Gilnean Apprentice\'s Pants',62561,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49401,4,1,-1,'Gilnean Apprentice\'s Boots',62448,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49403,4,1,-1,'Gilnean Neophyte\'s Robe',62557,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49404,4,1,-1,'Gilnean Neophyte\'s Pants',62559,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49406,4,1,-1,'Gilnean Neophyte\'s Boots',62568,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49407,4,1,-1,'Gilnean Acolyte\'s Boots',68132,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49408,4,1,-1,'Gilnean Acolyte\'s Robe',62565,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49409,4,1,-1,'Gilnean Acolyte\'s Pants',62566,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49502,4,2,-1,'Goblin Trapper\'s Shirt',62614,1,0,8192,0,0,0,1,9,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49503,4,2,-1,'Goblin Trapper\'s Pants',69187,1,0,8192,0,0,0,1,9,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49504,4,2,-1,'Goblin Trapper\'s Boots',62617,1,0,8192,0,0,0,1,6,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49505,4,1,-1,'Goblin Apprentice\'s Robe',62618,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49506,4,1,-1,'Goblin Apprentice\'s Pants',62621,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49508,4,1,-1,'Goblin Apprentice\'s Boots',9929,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49510,4,1,-1,'Goblin Neophyte\'s Robe',65789,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49512,4,1,-1,'Goblin Neophyte\'s Pants',62598,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49514,4,2,-1,'Goblin Thug\'s Tunic',65799,1,0,8192,0,0,0,1,9,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49515,4,2,-1,'Goblin Thug\'s Pants',69188,1,0,8192,0,0,0,1,9,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49516,4,2,-1,'Goblin Thug\'s Boots',65798,1,0,8192,0,0,0,1,7,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49520,4,1,-1,'Goblin Acolyte\'s Robe',65787,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49521,4,1,-1,'Goblin Acolyte\'s Pants',62621,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49522,4,1,-1,'Goblin Acolyte\'s Shoes',4143,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49524,4,3,-1,'Goblin Brawler\'s Harness',69181,1,0,8192,0,0,0,1,10,2,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49527,4,3,-1,'Goblin Brawler\'s Boots',69185,1,0,8192,0,0,0,1,8,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49528,4,3,-1,'Goblin Brawler\'s Greaves',69183,1,0,8192,0,0,0,1,10,2,7,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49529,4,3,-1,'Goblin Brawler\'s Gauntlets',69182,1,0,8192,0,0,0,1,5,1,10,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49531,4,1,-1,'Goblin Neophyte\'s Shoes',6318,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49563,4,2,-1,'Gilnean Novice\'s Tunic',65854,1,0,8192,0,0,0,1,8,1,5,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49564,4,2,-1,'Gilnean Novice\'s Boots',65851,1,0,8192,0,0,0,1,6,1,8,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49565,4,2,-1,'Gilnean Novice\'s Gloves',65852,1,0,8192,0,0,0,1,4,1,10,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49566,4,2,-1,'Gilnean Novice\'s Pants',65853,1,0,8192,0,0,0,1,9,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49567,4,0,-1,'Gilnean Adventurer\'s Shirt',62558,1,0,8192,0,0,0,1,1,1,4,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49568,4,2,-1,'Gilnean Trapper\'s Pants',62706,1,0,8192,0,0,0,1,9,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49569,4,2,-1,'Gilnean Trapper\'s Boots',62707,1,0,8192,0,0,0,1,6,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49570,4,2,-1,'Gilnean Trapper\'s Tunic',98023,1,0,8192,0,0,0,1,9,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49571,4,2,-1,'Gilnean Trapper\'s Gloves',69176,1,0,8192,0,0,0,1,4,1,10,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49572,4,2,-1,'Gilnean Footpad\'s Pants',65849,1,0,8192,0,0,0,1,9,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49573,4,2,-1,'Gilnean Footpad\'s Gloves',69175,1,0,8192,0,0,0,1,4,1,10,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49574,4,2,-1,'Gilnean Footpad\'s Tunic',65850,1,0,8192,0,0,0,1,9,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49575,4,2,-1,'Gilnean Footpad\'s Boots',65847,1,0,8192,0,0,0,1,7,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49576,4,3,-1,'Gilnean Recruit\'s Pants',68130,1,0,8192,0,0,0,1,11,2,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49577,4,3,-1,'Gilnean Recruit\'s Belt',68129,1,0,8192,0,0,0,1,5,1,6,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49578,4,3,-1,'Gilnean Recruit\'s Tunic',68128,1,0,8192,0,0,0,1,11,2,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49579,4,3,-1,'Gilnean Recruit\'s Boots',68131,1,0,8192,0,0,0,1,8,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(49778,2,8,-1,'Worn Greatsword',2380,1,0,8192,1.0163,1,1,1,23,4,17,262143,8388607,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.4,0,0,0,0,0),
(50055,2,15,-1,'Worn Dirk',2704,1,0,8192,0.9829,1,1,1,18,3,22,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1600,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.6,0,0,0,0,0),
(50057,2,15,-1,'Sharp Dirk',37170,1,0,8192,0.9902,1,1,1,18,3,22,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1600,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0.6,0,0,0,0,0),
(52532,2,1,-1,'Worn Wood Chopper',65743,1,0,8192,0,0,0,1,24,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,1,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52533,4,1,-1,'Squire\'s Boots',65745,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52534,4,1,-1,'Primal Robe',65746,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52535,4,1,-1,'Primal Pants',36125,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52538,4,1,-1,'Primal Robe',12648,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52539,4,1,-1,'Primal Pants',9975,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52540,4,1,-1,'Primal Boots',9977,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52543,4,1,-1,'Acolyte\'s Robe',65782,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52544,4,1,-1,'Primal Robe',65777,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52545,4,1,-1,'Primal Pants',14247,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52546,4,1,-1,'Apprentice\'s Robe',65778,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52547,4,1,-1,'Neophyte\'s Robe',16514,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52549,4,1,-1,'Initiate\'s Pants',14247,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52550,4,2,-1,'Primal Shirt',65801,1,0,8192,0,0,0,1,9,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52551,4,2,-1,'Primal Pants',62573,1,0,8192,0,0,0,1,9,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52552,4,2,-1,'Primal Boots',65800,1,0,8192,0,0,0,1,7,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52553,4,1,-1,'Apprentice\'s Robe',65793,1,0,8192,0,0,0,1,7,1,20,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52554,4,1,-1,'Apprentice\'s Boots',65794,1,0,8192,0,0,0,1,5,1,8,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52557,2,5,-1,'Battleworn Hammer',8687,1,0,8192,0,0,0,1,22,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,2,1,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52679,4,1,-1,'Acolyte\'s Pants',65845,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52680,4,1,-1,'Neophyte\'s Pants',19030,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(52681,4,1,-1,'Apprentice\'s Pants',65846,1,0,8192,0,0,0,1,7,1,7,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(57243,2,6,-1,'Worn Spear',68667,1,0,8192,0,0,0,1,23,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,2,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(57244,2,6,-1,'Warder\'s Spear',68668,1,0,8192,0,0,0,1,23,4,17,-1,-1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2900,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,1,2,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58231,4,1,-1,'Recruit\'s Vest',33310,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58232,4,1,-1,'Rugged Trapper\'s Vest',9976,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58233,4,1,-1,'Squire\'s Vest',3265,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58234,4,1,-1,'Footpad\'s Vest',9906,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58235,4,1,-1,'Warder\'s Vest',33352,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58237,4,1,-1,'Initiate\'s Vest',36789,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58238,4,1,-1,'Lookout\'s Vest',33353,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58240,4,1,-1,'Scout\'s Vest',36118,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58242,4,1,-1,'Squire\'s Vest',36133,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58243,4,1,-1,'Recruit\'s Vest',36124,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58244,4,1,-1,'Recruit\'s Vest',9983,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58245,4,1,-1,'Brawler\'s Vest',9995,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58246,4,1,-1,'Thug Vest',10005,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58247,4,1,-1,'Trapper\'s Vest',10112,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0),
(58248,4,1,-1,'Initiate\'s Vest',65792,1,0,8192,0,0,0,1,7,1,5,-1,-1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,0,0,0,-1,0,-1,0,'',0,0,0,0,0,7,0,0,0,0,55,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,'',0,0,0,0,0,0,0,0);
/*!40000 ALTER TABLE `item_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_achievement_reward`
--
DROP TABLE IF EXISTS `locales_achievement_reward`;
CREATE TABLE `locales_achievement_reward` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`gender` tinyint(3) NOT NULL DEFAULT '2',
`subject_loc1` varchar(100) NOT NULL DEFAULT '',
`subject_loc2` varchar(100) NOT NULL DEFAULT '',
`subject_loc3` varchar(100) NOT NULL DEFAULT '',
`subject_loc4` varchar(100) NOT NULL DEFAULT '',
`subject_loc5` varchar(100) NOT NULL DEFAULT '',
`subject_loc6` varchar(100) NOT NULL DEFAULT '',
`subject_loc7` varchar(100) NOT NULL DEFAULT '',
`subject_loc8` varchar(100) NOT NULL DEFAULT '',
`text_loc1` text,
`text_loc2` text,
`text_loc3` text,
`text_loc4` text,
`text_loc5` text,
`text_loc6` text,
`text_loc7` text,
`text_loc8` text,
PRIMARY KEY (`entry`,`gender`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_achievement_reward`
--
LOCK TABLES `locales_achievement_reward` WRITE;
/*!40000 ALTER TABLE `locales_achievement_reward` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_achievement_reward` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_creature`
--
DROP TABLE IF EXISTS `locales_creature`;
CREATE TABLE `locales_creature` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name_loc1` varchar(100) NOT NULL DEFAULT '',
`name_loc2` varchar(100) NOT NULL DEFAULT '',
`name_loc3` varchar(100) NOT NULL DEFAULT '',
`name_loc4` varchar(100) NOT NULL DEFAULT '',
`name_loc5` varchar(100) NOT NULL DEFAULT '',
`name_loc6` varchar(100) NOT NULL DEFAULT '',
`name_loc7` varchar(100) NOT NULL DEFAULT '',
`name_loc8` varchar(100) NOT NULL DEFAULT '',
`subname_loc1` varchar(100) DEFAULT NULL,
`subname_loc2` varchar(100) DEFAULT NULL,
`subname_loc3` varchar(100) DEFAULT NULL,
`subname_loc4` varchar(100) DEFAULT NULL,
`subname_loc5` varchar(100) DEFAULT NULL,
`subname_loc6` varchar(100) DEFAULT NULL,
`subname_loc7` varchar(100) DEFAULT NULL,
`subname_loc8` varchar(100) DEFAULT NULL,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_creature`
--
LOCK TABLES `locales_creature` WRITE;
/*!40000 ALTER TABLE `locales_creature` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_creature` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_gameobject`
--
DROP TABLE IF EXISTS `locales_gameobject`;
CREATE TABLE `locales_gameobject` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name_loc1` varchar(100) NOT NULL DEFAULT '',
`name_loc2` varchar(100) NOT NULL DEFAULT '',
`name_loc3` varchar(100) NOT NULL DEFAULT '',
`name_loc4` varchar(100) NOT NULL DEFAULT '',
`name_loc5` varchar(100) NOT NULL DEFAULT '',
`name_loc6` varchar(100) NOT NULL DEFAULT '',
`name_loc7` varchar(100) NOT NULL DEFAULT '',
`name_loc8` varchar(100) NOT NULL DEFAULT '',
`castbarcaption_loc1` varchar(100) NOT NULL DEFAULT '',
`castbarcaption_loc2` varchar(100) NOT NULL DEFAULT '',
`castbarcaption_loc3` varchar(100) NOT NULL DEFAULT '',
`castbarcaption_loc4` varchar(100) NOT NULL DEFAULT '',
`castbarcaption_loc5` varchar(100) NOT NULL DEFAULT '',
`castbarcaption_loc6` varchar(100) NOT NULL DEFAULT '',
`castbarcaption_loc7` varchar(100) NOT NULL DEFAULT '',
`castbarcaption_loc8` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_gameobject`
--
LOCK TABLES `locales_gameobject` WRITE;
/*!40000 ALTER TABLE `locales_gameobject` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_gameobject` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_gossip_menu_option`
--
DROP TABLE IF EXISTS `locales_gossip_menu_option`;
CREATE TABLE `locales_gossip_menu_option` (
`menu_id` smallint(6) unsigned NOT NULL DEFAULT '0',
`id` smallint(6) unsigned NOT NULL DEFAULT '0',
`option_text_loc1` text,
`option_text_loc2` text,
`option_text_loc3` text,
`option_text_loc4` text,
`option_text_loc5` text,
`option_text_loc6` text,
`option_text_loc7` text,
`option_text_loc8` text,
`box_text_loc1` text,
`box_text_loc2` text,
`box_text_loc3` text,
`box_text_loc4` text,
`box_text_loc5` text,
`box_text_loc6` text,
`box_text_loc7` text,
`box_text_loc8` text,
PRIMARY KEY (`menu_id`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_gossip_menu_option`
--
LOCK TABLES `locales_gossip_menu_option` WRITE;
/*!40000 ALTER TABLE `locales_gossip_menu_option` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_gossip_menu_option` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_item`
--
DROP TABLE IF EXISTS `locales_item`;
CREATE TABLE `locales_item` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name_loc1` varchar(100) NOT NULL DEFAULT '',
`name_loc2` varchar(100) NOT NULL DEFAULT '',
`name_loc3` varchar(100) NOT NULL DEFAULT '',
`name_loc4` varchar(100) NOT NULL DEFAULT '',
`name_loc5` varchar(100) NOT NULL DEFAULT '',
`name_loc6` varchar(100) NOT NULL DEFAULT '',
`name_loc7` varchar(100) NOT NULL DEFAULT '',
`name_loc8` varchar(100) NOT NULL DEFAULT '',
`description_loc1` varchar(255) DEFAULT NULL,
`description_loc2` varchar(255) DEFAULT NULL,
`description_loc3` varchar(255) DEFAULT NULL,
`description_loc4` varchar(255) DEFAULT NULL,
`description_loc5` varchar(255) DEFAULT NULL,
`description_loc6` varchar(255) DEFAULT NULL,
`description_loc7` varchar(255) DEFAULT NULL,
`description_loc8` varchar(255) DEFAULT NULL,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_item`
--
LOCK TABLES `locales_item` WRITE;
/*!40000 ALTER TABLE `locales_item` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_npc_text`
--
DROP TABLE IF EXISTS `locales_npc_text`;
CREATE TABLE `locales_npc_text` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Text0_0_loc1` longtext,
`Text0_0_loc2` longtext,
`Text0_0_loc3` longtext,
`Text0_0_loc4` longtext,
`Text0_0_loc5` longtext,
`Text0_0_loc6` longtext,
`Text0_0_loc7` longtext,
`Text0_0_loc8` longtext,
`Text0_1_loc1` longtext,
`Text0_1_loc2` longtext,
`Text0_1_loc3` longtext,
`Text0_1_loc4` longtext,
`Text0_1_loc5` longtext,
`Text0_1_loc6` longtext,
`Text0_1_loc7` longtext,
`Text0_1_loc8` longtext,
`Text1_0_loc1` longtext,
`Text1_0_loc2` longtext,
`Text1_0_loc3` longtext,
`Text1_0_loc4` longtext,
`Text1_0_loc5` longtext,
`Text1_0_loc6` longtext,
`Text1_0_loc7` longtext,
`Text1_0_loc8` longtext,
`Text1_1_loc1` longtext,
`Text1_1_loc2` longtext,
`Text1_1_loc3` longtext,
`Text1_1_loc4` longtext,
`Text1_1_loc5` longtext,
`Text1_1_loc6` longtext,
`Text1_1_loc7` longtext,
`Text1_1_loc8` longtext,
`Text2_0_loc1` longtext,
`Text2_0_loc2` longtext,
`Text2_0_loc3` longtext,
`Text2_0_loc4` longtext,
`Text2_0_loc5` longtext,
`Text2_0_loc6` longtext,
`Text2_0_loc7` longtext,
`Text2_0_loc8` longtext,
`Text2_1_loc1` longtext,
`Text2_1_loc2` longtext,
`Text2_1_loc3` longtext,
`Text2_1_loc4` longtext,
`Text2_1_loc5` longtext,
`Text2_1_loc6` longtext,
`Text2_1_loc7` longtext,
`Text2_1_loc8` longtext,
`Text3_0_loc1` longtext,
`Text3_0_loc2` longtext,
`Text3_0_loc3` longtext,
`Text3_0_loc4` longtext,
`Text3_0_loc5` longtext,
`Text3_0_loc6` longtext,
`Text3_0_loc7` longtext,
`Text3_0_loc8` longtext,
`Text3_1_loc1` longtext,
`Text3_1_loc2` longtext,
`Text3_1_loc3` longtext,
`Text3_1_loc4` longtext,
`Text3_1_loc5` longtext,
`Text3_1_loc6` longtext,
`Text3_1_loc7` longtext,
`Text3_1_loc8` longtext,
`Text4_0_loc1` longtext,
`Text4_0_loc2` longtext,
`Text4_0_loc3` longtext,
`Text4_0_loc4` longtext,
`Text4_0_loc5` longtext,
`Text4_0_loc6` longtext,
`Text4_0_loc7` longtext,
`Text4_0_loc8` longtext,
`Text4_1_loc1` longtext,
`Text4_1_loc2` longtext,
`Text4_1_loc3` longtext,
`Text4_1_loc4` longtext,
`Text4_1_loc5` longtext,
`Text4_1_loc6` longtext,
`Text4_1_loc7` longtext,
`Text4_1_loc8` longtext,
`Text5_0_loc1` longtext,
`Text5_0_loc2` longtext,
`Text5_0_loc3` longtext,
`Text5_0_loc4` longtext,
`Text5_0_loc5` longtext,
`Text5_0_loc6` longtext,
`Text5_0_loc7` longtext,
`Text5_0_loc8` longtext,
`Text5_1_loc1` longtext,
`Text5_1_loc2` longtext,
`Text5_1_loc3` longtext,
`Text5_1_loc4` longtext,
`Text5_1_loc5` longtext,
`Text5_1_loc6` longtext,
`Text5_1_loc7` longtext,
`Text5_1_loc8` longtext,
`Text6_0_loc1` longtext,
`Text6_0_loc2` longtext,
`Text6_0_loc3` longtext,
`Text6_0_loc4` longtext,
`Text6_0_loc5` longtext,
`Text6_0_loc6` longtext,
`Text6_0_loc7` longtext,
`Text6_0_loc8` longtext,
`Text6_1_loc1` longtext,
`Text6_1_loc2` longtext,
`Text6_1_loc3` longtext,
`Text6_1_loc4` longtext,
`Text6_1_loc5` longtext,
`Text6_1_loc6` longtext,
`Text6_1_loc7` longtext,
`Text6_1_loc8` longtext,
`Text7_0_loc1` longtext,
`Text7_0_loc2` longtext,
`Text7_0_loc3` longtext,
`Text7_0_loc4` longtext,
`Text7_0_loc5` longtext,
`Text7_0_loc6` longtext,
`Text7_0_loc7` longtext,
`Text7_0_loc8` longtext,
`Text7_1_loc1` longtext,
`Text7_1_loc2` longtext,
`Text7_1_loc3` longtext,
`Text7_1_loc4` longtext,
`Text7_1_loc5` longtext,
`Text7_1_loc6` longtext,
`Text7_1_loc7` longtext,
`Text7_1_loc8` longtext,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_npc_text`
--
LOCK TABLES `locales_npc_text` WRITE;
/*!40000 ALTER TABLE `locales_npc_text` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_npc_text` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_page_text`
--
DROP TABLE IF EXISTS `locales_page_text`;
CREATE TABLE `locales_page_text` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Text_loc1` longtext,
`Text_loc2` longtext,
`Text_loc3` longtext,
`Text_loc4` longtext,
`Text_loc5` longtext,
`Text_loc6` longtext,
`Text_loc7` longtext,
`Text_loc8` longtext,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_page_text`
--
LOCK TABLES `locales_page_text` WRITE;
/*!40000 ALTER TABLE `locales_page_text` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_page_text` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_points_of_interest`
--
DROP TABLE IF EXISTS `locales_points_of_interest`;
CREATE TABLE `locales_points_of_interest` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`icon_name_loc1` text,
`icon_name_loc2` text,
`icon_name_loc3` text,
`icon_name_loc4` text,
`icon_name_loc5` text,
`icon_name_loc6` text,
`icon_name_loc7` text,
`icon_name_loc8` text,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_points_of_interest`
--
LOCK TABLES `locales_points_of_interest` WRITE;
/*!40000 ALTER TABLE `locales_points_of_interest` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_points_of_interest` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `locales_quest`
--
DROP TABLE IF EXISTS `locales_quest`;
CREATE TABLE `locales_quest` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Title_loc1` text,
`Title_loc2` text,
`Title_loc3` text,
`Title_loc4` text,
`Title_loc5` text,
`Title_loc6` text,
`Title_loc7` text,
`Title_loc8` text,
`Details_loc1` text,
`Details_loc2` text,
`Details_loc3` text,
`Details_loc4` text,
`Details_loc5` text,
`Details_loc6` text,
`Details_loc7` text,
`Details_loc8` text,
`Objectives_loc1` text,
`Objectives_loc2` text,
`Objectives_loc3` text,
`Objectives_loc4` text,
`Objectives_loc5` text,
`Objectives_loc6` text,
`Objectives_loc7` text,
`Objectives_loc8` text,
`OfferRewardText_loc1` text,
`OfferRewardText_loc2` text,
`OfferRewardText_loc3` text,
`OfferRewardText_loc4` text,
`OfferRewardText_loc5` text,
`OfferRewardText_loc6` text,
`OfferRewardText_loc7` text,
`OfferRewardText_loc8` text,
`RequestItemsText_loc1` text,
`RequestItemsText_loc2` text,
`RequestItemsText_loc3` text,
`RequestItemsText_loc4` text,
`RequestItemsText_loc5` text,
`RequestItemsText_loc6` text,
`RequestItemsText_loc7` text,
`RequestItemsText_loc8` text,
`EndText_loc1` text,
`EndText_loc2` text,
`EndText_loc3` text,
`EndText_loc4` text,
`EndText_loc5` text,
`EndText_loc6` text,
`EndText_loc7` text,
`EndText_loc8` text,
`CompletedText_loc1` text,
`CompletedText_loc2` text,
`CompletedText_loc3` text,
`CompletedText_loc4` text,
`CompletedText_loc5` text,
`CompletedText_loc6` text,
`CompletedText_loc7` text,
`CompletedText_loc8` text,
`ObjectiveText1_loc1` text,
`ObjectiveText1_loc2` text,
`ObjectiveText1_loc3` text,
`ObjectiveText1_loc4` text,
`ObjectiveText1_loc5` text,
`ObjectiveText1_loc6` text,
`ObjectiveText1_loc7` text,
`ObjectiveText1_loc8` text,
`ObjectiveText2_loc1` text,
`ObjectiveText2_loc2` text,
`ObjectiveText2_loc3` text,
`ObjectiveText2_loc4` text,
`ObjectiveText2_loc5` text,
`ObjectiveText2_loc6` text,
`ObjectiveText2_loc7` text,
`ObjectiveText2_loc8` text,
`ObjectiveText3_loc1` text,
`ObjectiveText3_loc2` text,
`ObjectiveText3_loc3` text,
`ObjectiveText3_loc4` text,
`ObjectiveText3_loc5` text,
`ObjectiveText3_loc6` text,
`ObjectiveText3_loc7` text,
`ObjectiveText3_loc8` text,
`ObjectiveText4_loc1` text,
`ObjectiveText4_loc2` text,
`ObjectiveText4_loc3` text,
`ObjectiveText4_loc4` text,
`ObjectiveText4_loc5` text,
`ObjectiveText4_loc6` text,
`ObjectiveText4_loc7` text,
`ObjectiveText4_loc8` text,
`PortraitGiverName_loc1` text,
`PortraitGiverName_loc2` text,
`PortraitGiverName_loc3` text,
`PortraitGiverName_loc4` text,
`PortraitGiverName_loc5` text,
`PortraitGiverName_loc6` text,
`PortraitGiverName_loc7` text,
`PortraitGiverName_loc8` text,
`PortraitGiverText_loc1` text,
`PortraitGiverText_loc2` text,
`PortraitGiverText_loc3` text,
`PortraitGiverText_loc4` text,
`PortraitGiverText_loc5` text,
`PortraitGiverText_loc6` text,
`PortraitGiverText_loc7` text,
`PortraitGiverText_loc8` text,
`PortraitTurnInName_loc1` text,
`PortraitTurnInName_loc2` text,
`PortraitTurnInName_loc3` text,
`PortraitTurnInName_loc4` text,
`PortraitTurnInName_loc5` text,
`PortraitTurnInName_loc6` text,
`PortraitTurnInName_loc7` text,
`PortraitTurnInName_loc8` text,
`PortraitTurnInText_loc1` text,
`PortraitTurnInText_loc2` text,
`PortraitTurnInText_loc3` text,
`PortraitTurnInText_loc4` text,
`PortraitTurnInText_loc5` text,
`PortraitTurnInText_loc6` text,
`PortraitTurnInText_loc7` text,
`PortraitTurnInText_loc8` text,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `locales_quest`
--
LOCK TABLES `locales_quest` WRITE;
/*!40000 ALTER TABLE `locales_quest` DISABLE KEYS */;
/*!40000 ALTER TABLE `locales_quest` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mail_level_reward`
--
DROP TABLE IF EXISTS `mail_level_reward`;
CREATE TABLE `mail_level_reward` (
`level` mediumint(8) unsigned NOT NULL DEFAULT '0',
`raceMask` mediumint(8) unsigned NOT NULL DEFAULT '0',
`mailTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`senderEntry` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`level`,`raceMask`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Mail System';
--
-- Dumping data for table `mail_level_reward`
--
LOCK TABLES `mail_level_reward` WRITE;
/*!40000 ALTER TABLE `mail_level_reward` DISABLE KEYS */;
/*!40000 ALTER TABLE `mail_level_reward` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mail_loot_template`
--
DROP TABLE IF EXISTS `mail_loot_template`;
CREATE TABLE `mail_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `mail_loot_template`
--
LOCK TABLES `mail_loot_template` WRITE;
/*!40000 ALTER TABLE `mail_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `mail_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `mangos_string`
--
DROP TABLE IF EXISTS `mangos_string`;
CREATE TABLE `mangos_string` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`content_default` text NOT NULL,
`content_loc1` text,
`content_loc2` text,
`content_loc3` text,
`content_loc4` text,
`content_loc5` text,
`content_loc6` text,
`content_loc7` text,
`content_loc8` text,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `mangos_string`
--
LOCK TABLES `mangos_string` WRITE;
/*!40000 ALTER TABLE `mangos_string` DISABLE KEYS */;
INSERT INTO `mangos_string` VALUES
(1,'You should select a character or a creature.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(2,'You should select a creature.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(3,'|cffff0000[System Message]: %s|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(4,'|cffff0000[Event Message]: %s|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(5,'There is no help for that command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(6,'There is no such command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(7,'There is no such subcommand',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(8,'Command %s have subcommands:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(9,'Commands available to you:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(10,'Incorrect syntax.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(11,'Your account level is: %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(12,'Online players: %u (max: %u) Queued players: %u (max: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(13,'Server uptime: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(14,'Player saved.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(15,'All players saved.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(16,'There are the following active GMs on this server:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(17,'There are no GMs currently logged in on this server.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(18,'Cannot do that while flying.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(19,'Cannot do that in Battlegrounds.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(20,'Target is flying you can\'t do that.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(21,'%s is flying command failed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(22,'You are not mounted so you can\'t dismount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(23,'Cannot do that while fighting.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(24,'You used it recently.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(25,'Password not changed (unknown error)!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(26,'The password was changed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(27,'The old password is wrong',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(28,'Your account is now locked.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(29,'Your account is now unlocked.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(30,', rank ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(31,' [known]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(32,' [learn]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(33,' [passive]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(34,' [talent]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(35,' [active]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(36,' [complete]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(37,' (offline)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(38,'on',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(39,'off',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(40,'You are: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(41,'visible',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(42,'invisible',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(43,'done',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(44,'You',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(45,' <unknown> ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(46,'<error>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(47,'<non-existing character>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(48,'UNKNOWN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(49,'You must be at least level %u to enter.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(50,'You must be at least level %u and have item %s to enter.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(51,'Hello! Ready for some training?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(52,'Invaid item count (%u) for item %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(53,'Mail can\'t have more %u item stacks',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(54,'The new passwords do not match',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(55,'Your password can\'t be longer than 16 characters (client limit), password not changed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(56,'Current Message of the day: \r\n%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(57,'Using World DB: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(58,'Using script library: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(59,'Using creature EventAI: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(61,'Username: ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(62,'Password: ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(63,'Accepts whispers',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(64,'Doesn\'t accept whispers',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(65,'Using script library: <Unknown Script Library>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(66,'Using script library: <No Script Library Loaded>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(100,'Global notify: ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(101,'Map: %u (%s) Zone: %u (%s) Area: %u (%s) Phase: %u\nX: %f Y: %f Z: %f Orientation: %f\ngrid[%u,%u]cell[%u,%u] InstanceID: %u\n ZoneX: %f ZoneY: %f\nGroundZ: %f FloorZ: %f Have height data (Map: %u VMap: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(102,'%s is already being teleported.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(103,'You can summon a player to your instance only if he is in your party with you as leader.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(104,'You cannot go to the player\'s instance because you are in a party now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(105,'You can go to the player\'s instance while not being in his party only if your GM mode is on.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(106,'You can not go to player %s from instance to instance.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(107,'You can not summon player %s from instance to instance.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(108,'You are summoning %s%s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(109,'You are being summoned by %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(110,'You are teleporting %s%s to %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(111,'You are being teleported by %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(112,'Player (%s) does not exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(113,'Appearing at %s\'s location.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(114,'%s is appearing to your location.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(115,'Incorrect values.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(116,'No character selected.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(117,'%s is not in a group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(118,'You changed HP of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(119,'%s changed your HP to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(120,'You changed MANA of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(121,'%s changed your MANA to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(122,'You changed ENERGY of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(123,'%s changed your ENERGY to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(124,'Current energy: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(125,'You changed rage of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(126,'%s changed your rage to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(127,'You changed level of %s to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(128,'GUID %i, faction is %i, flags is %i, npcflag is %i, DY flag is %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(129,'Wrong faction: %u (not found in factiontemplate.dbc).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(130,'You changed GUID=%i \'s Faction to %i, flags to %i, npcflag to %i, dyflag to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(131,'You changed the %s spellmod %u to value %i for spell with family bit %u for %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(132,'%s changed your spellmod %u to value %i for spell with family bit %u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(133,'%s has access to all taxi nodes now (until logout).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(134,'%s has no more access to all taxi nodes now (only visited accessible).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(135,'%s has given you access to all taxi nodes (until logout).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(136,'%s has removed access to all taxi nodes (only visited still accessible).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(137,'You set all speeds to %2.2f from normal of %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(138,'%s set all your speeds to %2.2f from normal.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(139,'You set the speed to %2.2f from normal of %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(140,'%s set your speed to %2.2f from normal.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(141,'You set the swim speed to %2.2f from normal of %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(142,'%s set your swim speed to %2.2f from normal.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(143,'You set the backwards run speed to %2.2f from normal of %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(144,'%s set your backwards run speed to %2.2f from normal.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(145,'You set the fly speed to %2.2f from normal of %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(146,'%s set your fly speed to %2.2f from normal.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(147,'You set the size %2.2f of %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(148,'%s set your size to %2.2f.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(149,'There is no such mount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(150,'You give a mount to %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(151,'%s gave you a mount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(153,'You take all copper of %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(154,'%s took you all of your copper.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(155,'You take %s from %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(156,'%s took %s from you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(157,'You give %s to %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(158,'%s gave you %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(159,'You hear sound %u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(161,'Removed bit %i in field %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(162,'Set bit %i in field %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(163,'Teleport location table is empty!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(164,'Teleport location not found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(165,'Requires search parameter.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(166,'There are no teleport locations matching your request.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(167,'%s changed your holy power to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(168,'Locations found are:\n %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(169,'Mail sent to %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(170,'You try to hear sound %u but it doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(171,'You can\'t teleport self to self!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(172,'server console command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(173,'You changed runic power of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(174,'%s changed your runic power to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(175,'Liquid level: %f, ground: %f, type flags %u, status: %d.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(176,'You changed holy power of %s to %i/%i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(200,'No selection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(201,'Object GUID is: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(202,'The name was too long by %i characters.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(203,'Error, name can only contain characters A-Z and a-z.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(204,'The subname was too long by %i characters.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(205,'Not yet implemented',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(206,'Item \'%i\' \'%s\' added to list with maxcount \'%i\' and incrtime \'%i\' and extendedcost \'%i\'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(207,'Item \'%i\' not found in database.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(208,'Item \'%i\' \'%s\' deleted from vendor list',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(209,'Item \'%i\' (isCurrency: %u) not found in vendor list.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(210,'Item \'%i\' (isCurrency: %u, with extended cost %i) already in vendor list.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(211,'Spells of %s reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(212,'Spells of %s will reset at next login.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(213,'Talents of %s reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(214,'Talents of %s will reset at next login.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(215,'Your spells have been reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(216,'Your talents have been reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(217,'Unknown case \'%s\' for .resetall command. Type full correct case name.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(218,'Spells will reset for all players at login. Strongly recommend re-login!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(219,'Talents will reset for all players at login. Strongly recommend re-login!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(220,'Cannot find waypoint id %u for %s (in path %i, loaded from %s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(221,'Last Waypoint not found for %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(222,'%s has no path or path empty, path-id %i (loaded from %s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(223,'Creature (GUID: %u) No waypoints found - This is a MaNGOS db problem (single float).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(224,'Cannot access %s on map, maybe you are too far away from its spawn location',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(225,'Creature (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(226,'You must select a visual waypoint.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(227,'No visual waypoints found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(228,'Could not create visual waypoint with creatureID: %d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(229,'All visual waypoints removed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(230,'Could not add waypoint %u to %s (pathId %i stored by %s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(231,'No GUID provided.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(232,'No waypoint number provided.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(233,'Argument required for \'%s\'.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(234,'Added Waypoint %u to %s (PathId %i, path stored by %s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(235,'UNUSED',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(236,'Waypoint changed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(237,'Waypoint %s modified.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(238,'WP export successfull.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(239,'No waypoints found inside the database.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(240,'File imported.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(241,'Waypoint removed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(242,'UNUSED',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(243,'UNUSED',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(244,'UNUSED',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(245,'UNUSED',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(246,'Waypoint %u for %s (from pathId %i, stored by %s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(247,' Waittime: %d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(248,' Orientation: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(249,' ScriptId: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(250,'ScriptID set to non-existing id %u, add it to DBScriptsEngine and reload the table.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(251,'UNUSED',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(252,'AIScriptName: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(253,'Forced rename for player %s will be requested at next login.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(254,'Forced rename for player %s (GUID #%u) will be requested at next login.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(255,'Waypoint-Creature (GUID: %u) Not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(256,'Could not find NPC...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(257,'Creature movement type set to \'%s\', waypoints removed (if any).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(258,'Creature movement type set to \'%s\', waypoints were not removed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(259,'Incorrect value, use on or off',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(260,'Value saved.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(261,'Value saved, you may need to rejoin or clean your client cache.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(262,'Areatrigger ID %u not found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(263,'Target map or coordinates is invalid (X: %f Y: %f MapId: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(264,'Zone coordinates is invalid (X: %f Y: %f AreaId: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(265,'Zone %u (%s) is part of instanceable map %u (%s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(266,'Nothing found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(267,'Object not found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(268,'Creature not found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(269,'Currency \'%i\' not found.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(270,'Creature Removed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(271,'Creature moved.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(272,'Creature (GUID:%u) must be on the same map as player!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(273,'Game Object (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(274,'Game Object (GUID: %u) has references in not found owner %s GO list, can\'t be deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(275,'Game Object (GUID: %u) removed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(276,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) turned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(277,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) moved',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(278,'You must select a vendor',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(279,'You must send id for item',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(280,'Vendor has too many items (max 128)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(281,'You can\'t kick self, logout instead',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(282,'Player %s kicked.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(283,'Meta currency \'%i\' is not allowed in vendors.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(284,'Accepting Whisper: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(285,'Accepting Whisper: ON',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(286,'Accepting Whisper: OFF',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(287,'Creature (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(288,'Tickets count: %i show new tickets: %s\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(289,'New ticket from %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(290,'Ticket of %s (Last updated: %s):\n%s ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(291,'New ticket show: ON',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(292,'New ticket show: OFF',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(293,'Ticket %i doesn\'t exist',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(294,'All tickets deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(295,'Character %s ticket deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(296,'Ticket deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(297,'Spawn distance changed to: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(298,'Spawn time changed to: %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(299,'The currency id %u of %s was set to %u!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(300,'Your chat has been disabled for %u minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(301,'You have disabled %s\'s chat for %u minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(302,'Player\'s chat is already enabled.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(303,'Your chat has been enabled.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(304,'You have enabled %s\'s chat.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(305,'Faction %s (%u) reputation of %s was set to %5d!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(306,'Amount',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(307,'No faction found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(308,'Faction %i unknown!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(309,'Invalid parameter %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(310,'delta must be between 0 and %d (inclusive)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(311,'%d - |cffffffff|Hfaction:%d|h[%s]|h|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(312,' [visible]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(313,' [at war]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(314,' [peace forced]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(315,' [hidden]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(316,' [invisible forced]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(317,' [inactive]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(318,'Hated',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(319,'Hostile',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(320,'Unfriendly',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(321,'Neutral',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(322,'Friendly',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(323,'Honored',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(324,'Revered',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(325,'Exalted',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(326,'Faction %s (%u) can\'not have reputation.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(327,' [no reputation]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(328,'Characters at account %s (Id: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(329,' %s (GUID %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(330,'No players found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(331,'Extended item cost %u not exist',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(332,'GM mode is ON',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(333,'GM mode is OFF',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(334,'GM Chat Badge is ON',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(335,'GM Chat Badge is OFF',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(336,'You repair all %s\'s items.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(337,'All your items repaired by %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(338,'You set waterwalk mode %s for %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(339,'Your waterwalk mode %s by %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(340,'%s is now following you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(341,'%s is not following you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(342,'%s is now not following you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(343,'Creature (Entry: %u) cannot be tamed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(344,'You already have pet.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(345,'Forced customize for player %s will be requested at next login.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(346,'Forced customize for player %s (GUID #%u) will be requested at next login.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(347,'TaxiNode ID %u not found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(348,'Game Object (Entry: %u) have invalid data and can\'t be spawned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(349,'%d (idx:%d) - |cffffffff|Htitle:%d|h[%s %s]|h|r %s %s ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(350,'%d (idx:%d) - [%s %s] %s %s ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(351,'No titles found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(352,'Invalid title id: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(353,'Title %u (%s) added to known titles list for player %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(354,'Title %u (%s) removed from known titles list for player %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(355,'Title %u (%s) set as current selected title for player %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(356,'Current selected title for player %s reset as not known now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(357,'Areatrigger %u not has target coordinates',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(358,'No areatriggers found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(359,'%s|cffffffff|Hareatrigger_target:%u|h[Trigger target %u]|h|r Map %u X:%f Y:%f Z:%f%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(360,'%s[Trigger target %u] Map %u X:%f Y:%f Z:%f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(361,'|cffffffff|Hareatrigger:%u|h[Trigger %u]|h|r Map %u X:%f Y:%f Z:%f%s%s%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(362,'[Trigger %u] Map %u X:%f Y:%f Z:%f%s%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(363,' (Dist %f)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(364,' [Tavern]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(365,' [Quest]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(366,'Explore quest:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(367,'Required level %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(368,'Required Items:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(369,'Required quest (normal difficulty):',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(370,'Required heroic keys:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(371,'Required quest (heroic difficulty):',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(372,'No achievement!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(373,'Response:\n%s ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(374,'Tickets count: %i\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(375,'Player %s not have tickets.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(376,'%u - |cffffffff|Hpool:%u|h[%s]|h|r AutoSpawn: %u MaxLimit: %u Creatures: %u GameObjecs: %u Pools %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(377,'No pools found for map \'%s\' (Id:%u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(378,'You can\'t use this command at non-instanceable map \'%s\' (Id:%u). Use .lookup pool command instead.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(379,'You can\'t use this command without args at non-instanceable map \'%s\' (Id:%u).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(380,'%d%s - |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r Chance:%f %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(381,'%d%s - [%s] X:%f Y:%f Z:%f MapId:%d Chance:%f %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(382,'%d%s - |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(383,'%d%s - [%s] X:%f Y:%f Z:%f MapId:%d %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(384,'%d%s - |cffffffff|Hgameobject:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r Chance:%f %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(385,'%d%s - [%s] X:%f Y:%f Z:%f MapId:%d Chance:%f %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(386,'%d%s - |cffffffff|Hgameobject:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(387,'%d%s - [%s] X:%f Y:%f Z:%f MapId:%d %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(388,'Creatures with explicitly chance:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(389,'Creatures with equal chance:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(390,'Gameobjects with explicitly chance:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(391,'Gameobjects with equal chance:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(392,'Pool %u - Mother pool: %u |cffffffff|Hpool:%u|h[%s]|h|r AutoSpawn: %u MaxLimit: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(393,'Pool %u - Mother pool: %u [%s] AutoSpawn: %u MaxLimit: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(394,'Pool %u - Mother pool: none AutoSpawn: %u MaxLimit: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(395,'No pools found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(396,'%u - [%s] AutoSpawn: %u MaxLimit: %u Creatures: %u GameObjecs: %u Pools %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(397,'Pools with explicitly chance:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(398,'Pools with equal chance:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(399,'%u - |cffffffff|Hpool:%u|h[%s]|h|r AutoSpawn: %u MaxLimit: %u Creatures: %u GameObjecs: %u Pools %u Chance: %f %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(400,'|cffff0000[System Message]:|rScripts reloaded',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(401,'You change security level of account %s to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(402,'%s changed your security level to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(403,'You have low security level for this.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(404,'Creature movement disabled.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(405,'Creature movement enabled.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(406,'Weather can\'t be changed for this zone.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(407,'Weather system disabled at server.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(408,'%s is banned for %s. Reason: %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(409,'%s is banned permanently for %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(410,'%s %s not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(411,'%s unbanned.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(412,'There was an error removing the ban on %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(413,'Account not exist: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(414,'There is no such character.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(415,'There is no such IP in banlist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(416,'Account %s has never been banned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(417,'Ban history for account %s:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(418,'Ban Date: %s Bantime: %s Still active: %s Reason: %s Set by: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(419,'Inf.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(420,'Never',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(421,'Yes',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(422,'No',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(423,'IP: %s\nBan Date: %s\nUnban Date: %s\nRemaining: %s\nReason: %s\nSet by: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(424,'There is no matching IPban.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(425,'There is no matching account.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(426,'There is no banned account owning a character matching this part.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(427,'The following IPs match your pattern:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(428,'The following accounts match your query:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(429,'You learned many spells/skills.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(430,'You learned all spells for class.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(431,'You learned all talents for class.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(432,'You learned all languages.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(433,'You learned all craft skills and recipes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(434,'Could not find \'%s\'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(435,'Invalid item id: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(436,'No items found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(437,'Invalid gameobject id: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(438,'Found items %u: %u ( inventory %u mail %u auction %u guild %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(439,'Found gameobjects %u: %u ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(440,'Invalid creature id: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(441,'Found creatures %u: %u ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(442,'No area found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(443,'No item sets found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(444,'No skills found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(445,'No spells found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(446,'No quests found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(447,'No creatures found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(448,'No gameobjects found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(449,'Graveyard #%u doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(450,'Graveyard #%u already linked to zone #%u (current).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(451,'Graveyard #%u linked to zone #%u (current).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(452,'Graveyard #%u can\'t be linked to subzone or not existed zone #%u (internal error).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(453,'No currencies found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(454,'No faction in Graveyard with id= #%u , fix your DB',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(455,'invalid team, please fix database',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(456,'any',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(457,'alliance',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(458,'horde',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(459,'Graveyard #%u (faction: %s) is nearest from linked to zone #%u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(460,'Zone #%u doesn\'t have linked graveyards.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(461,'Zone #%u doesn\'t have linked graveyards for faction: %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(462,'Teleport location already exists!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(463,'Teleport location added.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(464,'Teleport location NOT added: database error.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(465,'Teleport location deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(466,'No taxinodes found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(467,'Target unit has %d auras:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(468,'id: %d eff: %d type: %d duration: %d maxduration: %d name: %s%s%s caster: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(469,'Target unit has %d auras of type %d:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(470,'id: %d eff: %d name: %s%s%s caster: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(471,'Quest %u not found.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(472,'Quest %u started from item. For correct work, please, add item to inventory and start quest in normal way: .additem %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(473,'Quest removed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(474,' [rewarded]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(475,' [complete]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(476,' [active]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(477,'%s\'s Fly Mode %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(478,'Opcode %u sent to %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(479,'Character loaded successfully!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(480,'Failed to load the character!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(481,'Character dumped successfully!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(482,'Character dump failed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(483,'Spell %u broken and not allowed to cast or learn!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(484,'Skill %u (%s) for player %s set to %u and current maximum set to %u (without permanent (talent) bonuses).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(485,'Player %s must have skill %u (%s) before using this command.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(486,'Invalid skill id (%u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(487,'You learned default GM spells/skills.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(488,'You already know that spell.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(489,'Target(%s) already know that spell.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(490,'%s doesn\'t know that spell.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(491,'You already forgot that spell.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(492,'All spell cooldowns removed for %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(493,'Spell %u cooldown removed for %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(494,'Command : Additem, itemId = %i, amount = %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(495,'Command : Additemset, itemsetId = %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(496,'Removed itemID = %i, amount = %i from %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(497,'Cannot create item \'%i\' (amount: %i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(498,'You need to provide a guild name!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(499,'Player not found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(500,'Player already has a guild!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(501,'Guild not created! (already exists?)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(502,'No items from itemset \'%u\' found.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(503,'The distance is: (3D) %f (2D) %f - (3D, point-to-point) %f yards.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(504,'Item \'%i\' \'%s\' Item Slot %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(505,'Item \'%i\' doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(506,'Item \'%i\' \'%s\' Added to Slot %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(507,'Item save failed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(508,'%d - owner: %s (guid: %u account: %u ) %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(509,'%d - sender: %s (guid: %u account: %u ) receiver: %s (guid: %u account: %u ) %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(510,'%d - owner: %s (guid: %u account: %u ) %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(511,'Wrong link type!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(512,'%d - |cffffffff|Hitem:%d:0:0:0:0:0:0:0:0|h[%s]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(513,'%d - |cffffffff|Hquest:%d:%d|h[%s]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(514,'%d - |cffffffff|Hcreature_entry:%d|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(515,'%d%s - |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(516,'%d - |cffffffff|Hgameobject_entry:%d|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(517,'%d%s, Entry %d - |cffffffff|Hgameobject:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(518,'%d - |cffffffff|Hitemset:%d|h[%s %s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(519,'|cffffffff|Htele:%s|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(520,'%d - |cffffffff|Hspell:%d|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(521,'%d - |cffffffff|Hskill:%d|h[%s %s]|h|r %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(522,'Game Object (Entry: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(523,'>> Game Object %s (GUID: %u) at %f %f %f. Orientation %f.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(524,'Selected object:\n|cffffffff|Hgameobject:%d|h[%s]|h|r GUID: %u ID: %u\nX: %f Y: %f Z: %f MapId: %u\nOrientation: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(525,'>> Add Game Object \'%i\' (%s) (GUID: %i) added at \'%f %f %f\'.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(526,'%s (lowguid: %u) movement generators stack:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(527,' Idle',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(528,' Random',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(529,' Waypoint',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(530,' Animal random',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(531,' Confused',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(532,' Targeted to player %s (lowguid %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(533,' Targeted to creature %s (lowguid %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(534,' Targeted to <NULL>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(535,' Home movement to (X:%f Y:%f Z:%f)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(536,' Home movement used for player?!?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(537,' Taxi flight',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(538,' Unknown movement generator (%u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(539,'Player selected: %s.\nFaction: %u.\nnpcFlags: %u.\nEntry: %u.\nDisplayID: %u (Native: %u).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(540,'Level: %u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(541,'Health (base): %u. (max): %u. (current): %u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(542,'Unit Flags: %u.\nDynamic Flags: %u.\nFaction Template: %u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(543,'Loot: %u Pickpocket: %u Skinning: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(544,'Position: %f %f %f.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(545,'*** Is a vendor!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(546,'*** Is a trainer!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(547,'InstanceID: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(548,'Player%s %s (guid: %u) Account: %s (id: %u) GMLevel: %u Last IP: %s Last login: %s Latency: %ums',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(549,'Played time: %s Level: %u Money: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(550,'Command .pinfo doesn\'t support \'rep\' option for offline players.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(551,'%s has explored all zones now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(552,'%s has no more explored zones.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(553,'%s has explored all zones for you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(554,'%s has hidden all zones from you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(557,'%s level up you to (%i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(558,'%s level down you to (%i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(559,'%s reset your level progress.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(560,'The area has been set as explored.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(561,'The area has been set as not explored.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(564,'The value index %u is too big to %s (count: %u).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(565,'Set for %s field:%u to uint32 value:%u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(566,'You set for %s field:%u to uint32 value: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(567,'Set for %s field:%u to to float value:%f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(568,'You set for %s field:%u to float value: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(569,'Get %s uint32 value:[FIELD]:%u [VALUE]:%u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(570,'%s has uint32 value:[FIELD]:%u [VALUE]:%u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(571,'Get %s float value:[FIELD]:%u [VALUE]:%f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(572,'%s has float value:[FIELD]:%u [VALUE]:%f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(575,'Modify %s uint32 field:%u to sum with:%i = %u (%i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(576,'You modify for %s uint32 field:%u to sum with:%i = %u (%i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(577,'You are now invisible.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(578,'You are now visible.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(579,'Selected player or creature not have victim.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(580,'You learned all default spells for race/class and completed quests rewarded spells.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(581,'Found near gameobjects (distance %f): %u ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(582,'SpawnTime: Full:%s Remain:%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(583,'%d - |cffffffff|Hgameevent:%d|h[%s]|h|r%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(584,'No event found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(585,'Event not exist!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(586,'Event %u: %s%s\nStart: %s End: %s Occurence: %s Length: %s\nNext state change: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(587,'Event %u already active!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(588,'Event %u not active!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(589,' Point movement to (X:%f Y:%f Z:%f)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(590,' Fear movement',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(591,' Distract movement',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(592,'You have learned all spells in craft: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(593,'Currently Banned Accounts:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(594,'| Account | BanDate | UnbanDate | Banned By | Ban Reason |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(595,'Currently Banned IPs:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(596,'| IP | BanDate | UnbanDate | Banned By | Ban Reason |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(597,'Current gamemasters:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(598,'| Account | GM |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(599,'No gamemasters.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(600,'The Alliance wins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(601,'The Horde wins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(602,'The battle for Warsong Gulch begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(603,'The battle for Warsong Gulch begins in 30 seconds. Prepare yourselves!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(604,'Let the battle for Warsong Gulch begin!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(605,'$n captured the Horde flag!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(606,'$n captured the Alliance flag!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(607,'The Horde flag was dropped by $n!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(608,'The Alliance Flag was dropped by $n!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(609,'The Alliance Flag was returned to its base by $n!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(610,'The Horde flag was returned to its base by $n!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(611,'The Horde flag was picked up by $n!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(612,'The Alliance Flag was picked up by $n!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(613,'The flags are now placed at their bases.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(614,'The Alliance flag is now placed at its base.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(615,'The Horde flag is now placed at its base.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(636,'The battle begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(637,'The battle begins in 30 seconds.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(638,'The battle has begun!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(650,'Alliance',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(651,'Horde',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(652,'stables',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(653,'blacksmith',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(654,'farm',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(655,'lumber mill',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(656,'mine',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(657,'The %s has taken the %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(658,'$n has defended the %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(659,'$n has assaulted the %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(660,'$n claims the %s! If left unchallenged, the %s will control it in 1 minute!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(661,'The battle for Arathi Basin begins in 1 minute.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(662,'The battle for Arathi Basin begins in 30 seconds. Prepare yourselves!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(663,'The battle for Arathi Basin has begun!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(664,'The Alliance has gathered $1776W resources, and is near victory!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(665,'The Horde has gathered $1777W resources, and is near victory!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(666,'After your recent battle in %s our best attempts to award you a Mark of Honor failed. Enclosed you will find the Mark of Honor we were not able to deliver to you at the time. Thanks for fighting in %s!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(667,'The Alliance has taken control of the Mage Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(668,'The Horde has taken control of the Mage Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(669,'The Alliance has taken control of the Draenei Ruins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(670,'The Horde has taken control of the Draenei Ruins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(671,'The Alliance has taken control of the Blood Elf Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(672,'The Horde has taken control of the Blood Elf Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(673,'The Alliance has taken control of the Fel Reaver Ruins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(674,'The Horde has taken control of the Fel Reaver Ruins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(675,'The Alliance has lost control of the Mage Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(676,'The Horde has lost control of the Mage Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(677,'The Alliance has lost control of the Draenei Ruins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(678,'The Horde has lost control of the Draenei Ruins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(679,'The Alliance has lost control of the Blood Elf Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(680,'The Horde has lost control of the Blood Elf Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(681,'The Alliance has lost control of the Fel Reaver Ruins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(682,'The Horde has lost control of the Fel Reaver Ruins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(683,'%s has taken the flag!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(684,'The Alliance have captured the flag!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(685,'The Horde have captured the flag!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(686,'The flag has been dropped.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(687,'The flag has been reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(700,'You must be level %u to form an arena team',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(701,'One minute until the Arena battle begins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(702,'Thirty seconds until the Arena battle begins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(703,'Fifteen seconds until the Arena battle begins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(704,'The Arena battle has begun!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(705,'You must wait %s before speaking again.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(706,'This item(s) has problems with equipping/storing to inventory.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(707,'%s does not wish to be disturbed: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(708,'%s is Away from Keyboard: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(709,'Do not Disturb',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(710,'Away from Keyboard',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(711,'Queue status for %s (Lvl: %u to %u)\nQueued alliances: %u (Need at least %u more)\nQueued hordes: %u (Need at least %u more)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(712,'|cffff0000[BG Queue Announcer]:|r %s -- [%u-%u] A: %u/%u, H: %u/%u|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(713,'You must be level %u to join an arena team!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(715,'You don\'t meet Battleground level requirements',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(717,'|cffff0000[BG Queue Announcer]:|r %s -- [%u-%u] Started!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(718,'|cffff0000[Arena Queue Announcer]:|r All Arenas -- Joined : %ux%u : %u|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(719,'|cffff0000[Arena Queue Announcer]:|r All Arenas -- Exited : %ux%u : %u|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(720,'Your group is too large for this battleground. Please regroup to join.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(721,'Your group is too large for this arena. Please regroup to join.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(722,'Your group has members not in your arena team. Please regroup to join.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(723,'Your group does not have enough players to join this match.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(724,'The Gold Team wins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(725,'The Green Team wins!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(727,'Your group has an offline member. Please remove him before joining.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(728,'Your group has players from the opposing faction. You can\'t join the battleground as a group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(729,'Your group has players from different battleground brakets. You can\'t join as group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(730,'Someone in your party is already in this battleground queue. (S)he must leave it before joining as group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(731,'Someone in your party is Deserter. You can\'t join as group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(732,'Someone in your party is already in three battleground queues. You cannot join as group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(733,'You cannot teleport to a battleground or arena map.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(734,'You cannot summon players to a battleground or arena map.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(735,'You must be in GM mode to teleport to a player in a battleground.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(736,'You cannot teleport to a battleground from another battleground. Please leave the current battleground first.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(737,'Arenas are set to 1v1 for debugging. You cannot join as a group.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(738,'Arenas are set to normal playercount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(739,'Battlegrounds are set to 1v0 for debugging.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(740,'Battlegrounds are set to normal playercount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(750,'Not enough players. This game will close in %u mins.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(751,'Not enough players. This game will close in %u seconds.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(752,'Only the Alliance can use that portal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(753,'Only the Horde can use that portal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(759,'%s was destroyed by the %s!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(760,'The %s is under attack! If left unchecked, the %s will destroy it!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(761,'The %s was taken by the %s!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(762,'The %s was taken by the %s!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(763,'The %s was taken by the %s!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(764,'The %s is under attack! If left unchecked, the %s will capture it!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(765,'The %s has taken the %s! Its supplies will now be used for reinforcements!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(766,'Irondeep Mine',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(767,'Coldtooth Mine',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(768,'Stormpike Aid Station',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(769,'Dun Baldar South Bunker',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(770,'Dun Baldar North Bunker',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(771,'Stormpike Graveyard',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(772,'Icewing Bunker',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(773,'Stonehearth Graveyard',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(774,'Stonehearth Bunker',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(775,'Snowfall Graveyard',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(776,'Iceblood Tower',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(777,'Iceblood Graveyard',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(778,'Tower Point',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(779,'Frostwolf Graveyard',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(780,'East Frostwolf Tower',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(781,'West Frostwolf Tower',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(782,'Frostwolf Relief Hut',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(784,'1 minute until the battle for Alterac Valley begins.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(785,'30 seconds until the battle for Alterac Valley begins. Prepare yourselves!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(786,'The battle for Alterac Valley has begun!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(787,'The Alliance Team is running out of reinforcements!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(788,'The Horde Team is running out of reinforcements!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(789,'The Frostwolf General is Dead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(790,'The Stormpike General is Dead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(801,'You do not have enough gold',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(802,'You do not have enough free slots',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(803,'Your partner does not have enough free bag slots',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(804,'You do not have permission to perform that function',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(805,'Unknown language',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(806,'You don\'t know that language',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(807,'Please provide character name',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(808,'Player %s not found or offline',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(809,'Account for character %s not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(810,'|Hplayer:$N|h[$N]|h has earned the achievement $a!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(811,'Guild Master',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(812,'Officer',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(813,'Veteran',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(814,'Member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(815,'Initiate',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(816,'Your body is too exhausted to travel to the Spectral Realm.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(817,'Warning: You\'ve entered a no-fly zone and are about to be dismounted!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(818,'You can\'t enter Black Morass until you rescue Thrall from Durnholde Keep.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1000,'Exiting daemon...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1001,'Account deleted: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1002,'Account %s NOT deleted (probably sql file format was updated)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1003,'Account %s NOT deleted (unknown error)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1004,'Account created: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1005,'Account name cannot be longer than 16 characters (client limit), account not created!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1006,'Account with this name already exist!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1007,'Account %s NOT created (probably sql file format was updated)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1008,'Account %s NOT created (unknown error)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1009,'Player %s (Guid: %u) Account %s (Id: %u) deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1010,'| ID | Account | Character | IP | GM | Expansion |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1012,'========================================================================================',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1013,'| %10u |%15s| %20s | %15s |%4d| %9d |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1014,'No online players.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1015,'Can only quit from a Remote Admin console or the quit command was not entered in full (quit).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1016,'| GUID | Name | Account | Delete Date |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1017,'| %10u | %20s | %15s (%10u) | %19s |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1018,'==========================================================================================',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1019,'No characters found.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1020,'Restoring the following characters:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1021,'Deleting the following characters:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1022,'ERROR: You can only assign a new name for a single selected character!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1023,'Character \'%s\' (GUID: %u Account %u) can\'t be restored: account doesn\'t exist!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1024,'Character \'%s\' (GUID: %u Account %u) can\'t be restored: account character list full!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1025,'Character \'%s\' (GUID: %u Account %u) can\'t be restored: name already in use!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1026,'GUID: %u Name: %s Account: %s (%u) Date: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1027,'Log filters state:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1028,'All log filters set to: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1029,'Command can only be called from a Remote Admin console.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1100,'Account %s (Id: %u) has been granted %u expansion rights.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1101,'Message of the day changed to:\r\n%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1102,'Message sent to %s: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1103,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1104,'%d - %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1105,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1106,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1107,'%d - %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1108,'%d - %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1109,'%d - %s %s %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1110,'%d%s - %s X:%f Y:%f Z:%f MapId:%d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1111,'%d%s - %s X:%f Y:%f Z:%f MapId:%d',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1112,'Failed to open file: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1113,'Account %s (%u) have max amount allowed characters (client limit)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1114,'Dump file have broken data!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1115,'Invalid character name!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1116,'Invalid character guid!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1117,'Character guid %u in use!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1118,'%d - guild: %s (guid: %u) %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1119,'You must use male or female as gender.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1120,'You change gender of %s to %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1121,'Your gender changed to %s by %s.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1122,'(%u/%u +perm %u +temp %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1123,'Not pet found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1124,'Wrong pet type',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1125,'Your pet learned all talents',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1126,'Your pet talents have been reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1127,'Talents of %s\'s pet reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1128,'%d - |cffffffff|Htaxinode:%u|h[%s %s]|h|r (Map:%u X:%f Y:%f Z:%f)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1129,'%d - %s %s (Map:%u X:%f Y:%f Z:%f)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1130,'event started %u \"%s\"',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1131,'event stopped %u \"%s\"',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1132,' Follow player %s (lowguid %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1133,' Follow creature %s (lowguid %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1134,' Follow <NULL>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1135,'List known talents:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1136,' (Found talents: %u used talent points: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1137,'%d%s - |cffffffff|Hgameobject:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1138,'=================================================================================',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1139,'| GUID | Name | Race | Class | Level |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1140,'| %10u | %20s | %15s | %15s | %5u |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1141,'%u - |cffffffff|Hplayer:%s|h[%s]|h|r %s %s %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1142,'%u - %s (Online:%s IP:%s GM:%u Expansion:%u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1143,'Spawned by event %u (%s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1144,'Despawned by event %u (%s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1145,'Part of pool %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1146,'Part of pool %u, top pool %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1147,'The (top)pool %u is spawned by event %u (%s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1148,'The (top)pool %u is despawned by event %u (%s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1149,' (Pool %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1150,' (Event %i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1151,' (Pool %u Event %i)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1152,'[usable]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1153,'Get %s bitstr value:[FIELD]:%u [VALUE]:%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1154,'%s has bitstr value:[FIELD]:%u [VALUE]:%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1155,'Get %s hex value:[FIELD]:%u [VALUE]:%x',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1156,'%s has hex value:[FIELD]:%u [VALUE]:%x',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1157,'Modify %s hex field:%u %s %x = %x (hex)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1158,'You modify for %s hex field:%u %s %x = %x (hex)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1159,'Modify %s float field:%u to sum with:%f = %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1160,'You modify for %s float field:%u to sum with:%f = %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1161,'Criteria:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1162,' [counter]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1163,'Achievement %u doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1164,'Achievement criteria %u doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1165,'Spell %u not have auras.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1166,'Scripting library not found or not accessible.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1167,'Scripting library has wrong list functions (outdated?).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1168,'Scripting library reloaded.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1169,'Scripting library build for different mangosd revision.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1170,'Player selected: %s.\nFaction: %u.\nnpcFlags: %u.\nBase Entry: %u, Spawned Entry %u (Difficulty %u).\nDisplayID: %u (Native: %u).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1171,'All config are reloaded from ahbot configuration file.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1172,'Error while trying to reload ahbot config.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1173,'==========================================================',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1174,'|--------------------------------------------------------|',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1175,'| | Alliance | Horde | Neutral | Total |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1176,' Alliance/Horde/Neutral/Total',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1177,'| %-10s | %8u | %8u | %8u | %8u |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1178,'%-10s = %6u / %6u / %6u / %6u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1179,'Count',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1180,'Item Ratio',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1181,'| | Alliance | Horde | Neutral | Amount |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1182,' Alliance/Horde/Neutral/Amount',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1183,'Grey',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1184,'White',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1185,'Green',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1186,'Blue',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1187,'Purple',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1188,'Orange',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1189,'Yellow',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1190,'Amount of %s items is set to %u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1191,'Items ratio for %s is set to %u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1192,' Effect movement',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1193,'Gear Score of Player %s is %u.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1194,'Current State Information: GOState %u, LootState %u. Collision %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1195,'Current State Information: GOState %u, LootState %u. Collision %s, (door %s by default)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1200,'You try to view cinemitic %u but it doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1201,'You try to view movie %u but it doesn\'t exist.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1202,'Spell %u %s = %f (*1.88 = %f) DB = %f AP = %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1203,'direct heal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1204,'direct damage',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1205,'dot heal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1206,'dot damage',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1500,'%u - [%s] AutoSpawn: %u MaxLimit: %u Creatures: %u GameObjecs: %u Pools %u Chance: %f %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1501,'%u - |cffffffff|Hpool:%u|h[%s]|h|r AutoSpawn: %u MaxLimit: %u Creatures: %u GameObjecs: %u Pools %u %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1502,'%u - [%s] AutoSpawn: %u MaxLimit: %u Creatures: %u GameObjecs: %u Pools %u %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1503,'Cannot add spawn because no free guids for static spawn in reserved guids range. Server restart is required before command can be used. Also look GuidReserveSize.* config options.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1504,'AI-Information for Npc Entry %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1505,'AIName: %s (%s) ScriptName: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1506,'Current phase = %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1507,'Combat-Movement is %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1508,'Melee attacking is %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1509,'Pool %u not found (Maximal pool entry is %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1600,'|cffffff00Northpass Tower has been taken by the Horde!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1601,'|cffffff00Northpass Tower has been taken by the Alliance!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1602,'|cffffff00Crown Guard Tower has been taken by the Horde!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1603,'|cffffff00Crown Guard Tower has been taken by the Alliance!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1604,'|cffffff00Eastwall Tower has been taken by the Horde!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1605,'|cffffff00Eastwall Tower has been taken by the Alliance!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1606,'|cffffff00The Plaguewood Tower has been taken by the Horde!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1607,'|cffffff00The Plaguewood Tower has been taken by the Alliance!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1608,'|cffffff00The Overlook has been taken by the Horde!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1609,'|cffffff00The Overlook has been taken by the Alliance!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1610,'|cffffff00The Stadium has been taken by the Horde!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1611,'|cffffff00The Stadium has been taken by the Alliance!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1612,'|cffffff00Broken Hill has been taken by the Horde!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1613,'|cffffff00Broken Hill has been taken by the Alliance!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1614,'|cffffff00The Horde has taken control of the East Beacon!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1615,'|cffffff00The Alliance has taken control of the East Beacon!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1616,'|cffffff00The Horde has taken control of the West Beacon!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1617,'|cffffff00The Alliance has taken control of the West Beacon!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1618,'|cffffff00The Horde has taken control of both beacons!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1619,'|cffffff00The Alliance has taken control of both beacons!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1620,'|cffffff00The Horde Field Scout is now issuing battle standards.|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1621,'|cffffff00The Alliance Field Scout is now issuing battle standards.|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1622,'|cffffff00The Horde has taken control of Twin Spire Ruins!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1623,'|cffffff00The Alliance has taken control of Twin Spire Ruins!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1624,'|cffffff00The Horde has taken control of a Spirit Tower!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1625,'|cffffff00The Alliance has taken control of a Spirit Tower!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1626,'|cffffff00The Horde has lost control of a Spirit Tower!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1627,'|cffffff00The Alliance has lost control of a Spirit Tower!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1628,'|cffffff00The Horde has taken control of The Bone Wastes!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1629,'|cffffff00The Alliance has taken control of The Bone Wastes!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1630,'|cffffff00The Horde is gaining control of Halaa!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1631,'|cffffff00The Alliance is gaining control of Halaa!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1632,'|cffffff00The Horde has taken control of Halaa!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1633,'|cffffff00The Alliance has taken control of Halaa!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1634,'|cffffff00Halaa is defenseless!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1635,'|cffffff00The Horde has collected 200 silithyst!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1636,'|cffffff00The Alliance has collected 200 silithyst!|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1700,'Can\'t add item %u to vendor with unknown item type %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1701,'Currency %u has maxCount = 0, but for currencies maxCount = buyCount, so it can\'t be 0 or less than that\'s currency precision (%u).',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
/*!40000 ALTER TABLE `mangos_string` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `milling_loot_template`
--
DROP TABLE IF EXISTS `milling_loot_template`;
CREATE TABLE `milling_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `milling_loot_template`
--
LOCK TABLES `milling_loot_template` WRITE;
/*!40000 ALTER TABLE `milling_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `milling_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `npc_gossip`
--
DROP TABLE IF EXISTS `npc_gossip`;
CREATE TABLE `npc_gossip` (
`npc_guid` int(10) unsigned NOT NULL DEFAULT '0',
`textid` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`npc_guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `npc_gossip`
--
LOCK TABLES `npc_gossip` WRITE;
/*!40000 ALTER TABLE `npc_gossip` DISABLE KEYS */;
/*!40000 ALTER TABLE `npc_gossip` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `npc_spellclick_spells`
--
DROP TABLE IF EXISTS `npc_spellclick_spells`;
CREATE TABLE `npc_spellclick_spells` (
`npc_entry` int(10) unsigned NOT NULL COMMENT 'reference to creature_template',
`spell_id` int(10) unsigned NOT NULL COMMENT 'spell which should be casted ',
`quest_start` mediumint(8) unsigned NOT NULL COMMENT 'reference to quest_template',
`quest_start_active` tinyint(1) unsigned NOT NULL DEFAULT '0',
`quest_end` mediumint(8) unsigned NOT NULL DEFAULT '0',
`cast_flags` tinyint(3) unsigned NOT NULL COMMENT 'first bit defines caster: 1=player, 0=creature; second bit defines target, same mapping as caster bit',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `npc_spellclick_spells`
--
LOCK TABLES `npc_spellclick_spells` WRITE;
/*!40000 ALTER TABLE `npc_spellclick_spells` DISABLE KEYS */;
/*!40000 ALTER TABLE `npc_spellclick_spells` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `npc_text`
--
DROP TABLE IF EXISTS `npc_text`;
CREATE TABLE `npc_text` (
`ID` mediumint(8) unsigned NOT NULL DEFAULT '0',
`text0_0` longtext,
`text0_1` longtext,
`lang0` tinyint(3) unsigned NOT NULL DEFAULT '0',
`prob0` float NOT NULL DEFAULT '0',
`em0_0` smallint(5) unsigned NOT NULL DEFAULT '0',
`em0_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`em0_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`em0_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`em0_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`em0_5` smallint(5) unsigned NOT NULL DEFAULT '0',
`text1_0` longtext,
`text1_1` longtext,
`lang1` tinyint(3) unsigned NOT NULL DEFAULT '0',
`prob1` float NOT NULL DEFAULT '0',
`em1_0` smallint(5) unsigned NOT NULL DEFAULT '0',
`em1_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`em1_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`em1_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`em1_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`em1_5` smallint(5) unsigned NOT NULL DEFAULT '0',
`text2_0` longtext,
`text2_1` longtext,
`lang2` tinyint(3) unsigned NOT NULL DEFAULT '0',
`prob2` float NOT NULL DEFAULT '0',
`em2_0` smallint(5) unsigned NOT NULL DEFAULT '0',
`em2_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`em2_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`em2_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`em2_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`em2_5` smallint(5) unsigned NOT NULL DEFAULT '0',
`text3_0` longtext,
`text3_1` longtext,
`lang3` tinyint(3) unsigned NOT NULL DEFAULT '0',
`prob3` float NOT NULL DEFAULT '0',
`em3_0` smallint(5) unsigned NOT NULL DEFAULT '0',
`em3_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`em3_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`em3_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`em3_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`em3_5` smallint(5) unsigned NOT NULL DEFAULT '0',
`text4_0` longtext,
`text4_1` longtext,
`lang4` tinyint(3) unsigned NOT NULL DEFAULT '0',
`prob4` float NOT NULL DEFAULT '0',
`em4_0` smallint(5) unsigned NOT NULL DEFAULT '0',
`em4_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`em4_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`em4_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`em4_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`em4_5` smallint(5) unsigned NOT NULL DEFAULT '0',
`text5_0` longtext,
`text5_1` longtext,
`lang5` tinyint(3) unsigned NOT NULL DEFAULT '0',
`prob5` float NOT NULL DEFAULT '0',
`em5_0` smallint(5) unsigned NOT NULL DEFAULT '0',
`em5_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`em5_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`em5_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`em5_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`em5_5` smallint(5) unsigned NOT NULL DEFAULT '0',
`text6_0` longtext,
`text6_1` longtext,
`lang6` tinyint(3) unsigned NOT NULL DEFAULT '0',
`prob6` float NOT NULL DEFAULT '0',
`em6_0` smallint(5) unsigned NOT NULL DEFAULT '0',
`em6_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`em6_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`em6_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`em6_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`em6_5` smallint(5) unsigned NOT NULL DEFAULT '0',
`text7_0` longtext,
`text7_1` longtext,
`lang7` tinyint(3) unsigned NOT NULL DEFAULT '0',
`prob7` float NOT NULL DEFAULT '0',
`em7_0` smallint(5) unsigned NOT NULL DEFAULT '0',
`em7_1` smallint(5) unsigned NOT NULL DEFAULT '0',
`em7_2` smallint(5) unsigned NOT NULL DEFAULT '0',
`em7_3` smallint(5) unsigned NOT NULL DEFAULT '0',
`em7_4` smallint(5) unsigned NOT NULL DEFAULT '0',
`em7_5` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `npc_text`
--
LOCK TABLES `npc_text` WRITE;
/*!40000 ALTER TABLE `npc_text` DISABLE KEYS */;
/*!40000 ALTER TABLE `npc_text` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `npc_trainer`
--
DROP TABLE IF EXISTS `npc_trainer`;
CREATE TABLE `npc_trainer` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spellcost` int(10) unsigned NOT NULL DEFAULT '0',
`reqskill` smallint(5) unsigned NOT NULL DEFAULT '0',
`reqskillvalue` smallint(5) unsigned NOT NULL DEFAULT '0',
`reqlevel` tinyint(3) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `entry_spell` (`entry`,`spell`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `npc_trainer`
--
LOCK TABLES `npc_trainer` WRITE;
/*!40000 ALTER TABLE `npc_trainer` DISABLE KEYS */;
/*!40000 ALTER TABLE `npc_trainer` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `npc_trainer_template`
--
DROP TABLE IF EXISTS `npc_trainer_template`;
CREATE TABLE `npc_trainer_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`spellcost` int(10) unsigned NOT NULL DEFAULT '0',
`reqskill` smallint(5) unsigned NOT NULL DEFAULT '0',
`reqskillvalue` smallint(5) unsigned NOT NULL DEFAULT '0',
`reqlevel` tinyint(3) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `entry_spell` (`entry`,`spell`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `npc_trainer_template`
--
LOCK TABLES `npc_trainer_template` WRITE;
/*!40000 ALTER TABLE `npc_trainer_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `npc_trainer_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `npc_vendor`
--
DROP TABLE IF EXISTS `npc_vendor`;
CREATE TABLE `npc_vendor` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '0',
`incrtime` int(10) unsigned NOT NULL DEFAULT '0',
`ExtendedCost` mediumint(8) unsigned NOT NULL DEFAULT '0',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`,`ExtendedCost`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Npc System';
--
-- Dumping data for table `npc_vendor`
--
LOCK TABLES `npc_vendor` WRITE;
/*!40000 ALTER TABLE `npc_vendor` DISABLE KEYS */;
/*!40000 ALTER TABLE `npc_vendor` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `npc_vendor_template`
--
DROP TABLE IF EXISTS `npc_vendor_template`;
CREATE TABLE `npc_vendor_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`maxcount` smallint(3) unsigned NOT NULL DEFAULT '0',
`incrtime` int(10) unsigned NOT NULL DEFAULT '0',
`ExtendedCost` mediumint(8) unsigned NOT NULL DEFAULT '0',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`,`ExtendedCost`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Npc System';
--
-- Dumping data for table `npc_vendor_template`
--
LOCK TABLES `npc_vendor_template` WRITE;
/*!40000 ALTER TABLE `npc_vendor_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `npc_vendor_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `page_text`
--
DROP TABLE IF EXISTS `page_text`;
CREATE TABLE `page_text` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`text` longtext NOT NULL,
`next_page` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item System';
--
-- Dumping data for table `page_text`
--
LOCK TABLES `page_text` WRITE;
/*!40000 ALTER TABLE `page_text` DISABLE KEYS */;
/*!40000 ALTER TABLE `page_text` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pet_levelstats`
--
DROP TABLE IF EXISTS `pet_levelstats`;
CREATE TABLE `pet_levelstats` (
`creature_entry` mediumint(8) unsigned NOT NULL,
`level` tinyint(3) unsigned NOT NULL,
`hp` smallint(5) unsigned NOT NULL,
`mana` smallint(5) unsigned NOT NULL,
`armor` int(10) unsigned NOT NULL DEFAULT '0',
`str` smallint(5) unsigned NOT NULL,
`agi` smallint(5) unsigned NOT NULL,
`sta` smallint(5) unsigned NOT NULL,
`inte` smallint(5) unsigned NOT NULL,
`spi` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`creature_entry`,`level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores pet levels stats.';
--
-- Dumping data for table `pet_levelstats`
--
LOCK TABLES `pet_levelstats` WRITE;
/*!40000 ALTER TABLE `pet_levelstats` DISABLE KEYS */;
/*!40000 ALTER TABLE `pet_levelstats` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pet_name_generation`
--
DROP TABLE IF EXISTS `pet_name_generation`;
CREATE TABLE `pet_name_generation` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`word` tinytext NOT NULL,
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`half` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pet_name_generation`
--
LOCK TABLES `pet_name_generation` WRITE;
/*!40000 ALTER TABLE `pet_name_generation` DISABLE KEYS */;
INSERT INTO `pet_name_generation` (`word`,`entry`,`half`) VALUES
('Aba',416,0),
('Az',416,0),
('Bel',416,0),
('Biz',416,0),
('Cho',416,0),
('Dag',416,0),
('Gak',416,0),
('Gar',416,0),
('Gel',416,0),
('Gho',416,0),
('Gob',416,0),
('Gra',416,0),
('Jak',416,0),
('Jub',416,0),
('Kar',416,0),
('Kup',416,0),
('Laz',416,0),
('Nal',416,0),
('Nok',416,0),
('Pag',416,0),
('Pig',416,0),
('Pip',416,0),
('Piz',416,0),
('Quz',416,0),
('Rui',416,0),
('Rul',416,0),
('Rup',416,0),
('Tar',416,0),
('Vol',416,0),
('Yaz',416,0),
('Zep',416,0),
('Zig',416,0),
('Zil',416,0),
('Zor',416,0),
('bis',416,1),
('fip',416,1),
('gup',416,1),
('ham',416,1),
('jub',416,1),
('kin',416,1),
('kol',416,1),
('lop',416,1),
('loz',416,1),
('mat',416,1),
('mir',416,1),
('nam',416,1),
('nar',416,1),
('nik',416,1),
('nip',416,1),
('pad',416,1),
('pep',416,1),
('pit',416,1),
('qua',416,1),
('rai',416,1),
('rin',416,1),
('rot',416,1),
('tai',416,1),
('tal',416,1),
('tik',416,1),
('tip',416,1),
('tog',416,1),
('tuk',416,1),
('uri',416,1),
('yal',416,1),
('yap',416,1),
('Bhee',417,0),
('Bruu',417,0),
('Czaa',417,0),
('Droo',417,0),
('Flaa',417,0),
('Fzuu',417,0),
('Ghaa',417,0),
('Gree',417,0),
('Gzaa',417,0),
('Haa',417,0),
('Haad',417,0),
('Haag',417,0),
('Haap',417,0),
('Jhaa',417,0),
('Jhuu',417,0),
('Khaa',417,0),
('Khii',417,0),
('Khuu',417,0),
('Kree',417,0),
('Luu',417,0),
('Maa',417,0),
('Nhee',417,0),
('Phuu',417,0),
('Pryy',417,0),
('Rhuu',417,0),
('Shaa',417,0),
('Sloo',417,0),
('Sruu',417,0),
('Thoo',417,0),
('Traa',417,0),
('Wraa',417,0),
('Zhaa',417,0),
('dhon',417,1),
('dhum',417,1),
('dhun',417,1),
('dom',417,1),
('don',417,1),
('drom',417,1),
('dym',417,1),
('fenn',417,1),
('fum',417,1),
('fun',417,1),
('ghon',417,1),
('ghun',417,1),
('grom',417,1),
('grym',417,1),
('hom',417,1),
('hon',417,1),
('hun',417,1),
('jhom',417,1),
('kun',417,1),
('lum',417,1),
('mmon',417,1),
('mon',417,1),
('myn',417,1),
('nam',417,1),
('nem',417,1),
('nhym',417,1),
('nom',417,1),
('num',417,1),
('phom',417,1),
('roon',417,1),
('rym',417,1),
('shon',417,1),
('thun',417,1),
('tom',417,1),
('zhem',417,1),
('zhum',417,1),
('zun',417,1),
('Bar',1860,0),
('Bel',1860,0),
('Char',1860,0),
('Grak\'',1860,0),
('Graz\'',1860,0),
('Grim',1860,0),
('Hath',1860,0),
('Hel',1860,0),
('Hok',1860,0),
('Huk',1860,0),
('Jhaz',1860,0),
('Jhom',1860,0),
('Juk\'',1860,0),
('Kal\'',1860,0),
('Klath',1860,0),
('Kon',1860,0),
('Krag',1860,0),
('Krak',1860,0),
('Mak',1860,0),
('Mezz',1860,0),
('Orm',1860,0),
('Phan',1860,0),
('Sar',1860,0),
('Tang',1860,0),
('Than',1860,0),
('Thog',1860,0),
('Thok',1860,0),
('Thul',1860,0),
('Zag\'',1860,0),
('Zang',1860,0),
('Zhar\'',1860,0),
('kath',1860,1),
('doc',1860,1),
('dok',1860,1),
('gak',1860,1),
('garth',1860,1),
('gore',1860,1),
('gorg',1860,1),
('grave',1860,1),
('gron',1860,1),
('juk',1860,1),
('krast',1860,1),
('kresh',1860,1),
('krit',1860,1),
('los',1860,1),
('mon',1860,1),
('mos',1860,1),
('moth',1860,1),
('nagma',1860,1),
('nak',1860,1),
('nar',1860,1),
('nos',1860,1),
('nuz',1860,1),
('phog',1860,1),
('rath',1860,1),
('tast',1860,1),
('taz',1860,1),
('thak',1860,1),
('thang',1860,1),
('thyk',1860,1),
('vhug',1860,1),
('zazt',1860,1),
('Ael',1863,0),
('Aez',1863,0),
('Ang',1863,0),
('Ban',1863,0),
('Bet',1863,0),
('Bro',1863,0),
('Bry',1863,0),
('Cat',1863,0),
('Dir',1863,0),
('Dis',1863,0),
('Dom',1863,0),
('Drus',1863,0),
('Fie',1863,0),
('Fier',1863,0),
('Gly',1863,0),
('Hel',1863,0),
('Hes',1863,0),
('Kal',1863,0),
('Lyn',1863,0),
('Mir',1863,0),
('Nim',1863,0),
('Sar',1863,0),
('Sel',1863,0),
('Vil',1863,0),
('Zah',1863,0),
('aith',1863,1),
('anda',1863,1),
('antia',1863,1),
('evere',1863,1),
('lia',1863,1),
('lissa',1863,1),
('neri',1863,1),
('neth',1863,1),
('nia',1863,1),
('nlissa',1863,1),
('nora',1863,1),
('nva',1863,1),
('nys',1863,1),
('ola',1863,1),
('ona',1863,1),
('ora',1863,1),
('rah',1863,1),
('riana',1863,1),
('riel',1863,1),
('rona',1863,1),
('tai',1863,1),
('tevere',1863,1),
('thea',1863,1),
('vina',1863,1),
('wena',1863,1),
('wyn',1863,1),
('xia',1863,1),
('yla',1863,1),
('yssa',1863,1),
('Flaa',17252,0),
('Haa',17252,0),
('Jhuu',17252,0),
('Shaa',17252,0),
('Thoo',17252,0),
('dhun',17252,1),
('ghun',17252,1),
('roon',17252,1),
('thun',17252,1),
('tom',17252,1);
/*!40000 ALTER TABLE `pet_name_generation` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pickpocketing_loot_template`
--
DROP TABLE IF EXISTS `pickpocketing_loot_template`;
CREATE TABLE `pickpocketing_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `pickpocketing_loot_template`
--
LOCK TABLES `pickpocketing_loot_template` WRITE;
/*!40000 ALTER TABLE `pickpocketing_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `pickpocketing_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `player_levelstats`
--
DROP TABLE IF EXISTS `player_levelstats`;
CREATE TABLE `player_levelstats` (
`race` tinyint(3) unsigned NOT NULL,
`class` tinyint(3) unsigned NOT NULL,
`level` tinyint(3) unsigned NOT NULL,
`str` tinyint(3) unsigned NOT NULL,
`agi` tinyint(3) unsigned NOT NULL,
`sta` tinyint(3) unsigned NOT NULL,
`inte` tinyint(3) unsigned NOT NULL,
`spi` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`race`,`class`,`level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.';
--
-- Dumping data for table `player_levelstats`
--
LOCK TABLES `player_levelstats` WRITE;
/*!40000 ALTER TABLE `player_levelstats` DISABLE KEYS */;
INSERT INTO `player_levelstats` VALUES
(1,1,1,23,20,22,20,20),
(1,1,2,24,21,23,20,20),
(1,1,3,26,22,24,20,21),
(1,1,4,27,22,26,20,21),
(1,1,5,28,23,27,20,21),
(1,1,6,30,24,28,20,21),
(1,1,7,31,25,29,21,22),
(1,1,8,32,26,30,21,22),
(1,1,9,34,26,32,21,22),
(1,1,10,35,27,33,21,23),
(1,1,11,36,28,34,21,23),
(1,1,12,38,29,35,21,23),
(1,1,13,39,30,37,21,24),
(1,1,14,41,31,38,21,24),
(1,1,15,42,32,39,21,24),
(1,1,16,44,33,41,21,25),
(1,1,17,45,34,42,22,25),
(1,1,18,47,34,43,22,25),
(1,1,19,48,35,45,22,26),
(1,1,20,50,36,46,22,26),
(1,1,21,51,37,48,22,26),
(1,1,22,53,38,49,22,27),
(1,1,23,54,39,51,22,27),
(1,1,24,56,40,52,23,28),
(1,1,25,58,41,53,23,28),
(1,1,26,59,42,55,23,28),
(1,1,27,61,43,56,23,29),
(1,1,28,63,44,58,23,29),
(1,1,29,64,45,59,23,30),
(1,1,30,66,46,61,24,30),
(1,1,31,68,47,62,24,30),
(1,1,32,69,48,64,24,31),
(1,1,33,71,50,66,24,31),
(1,1,34,73,51,67,24,32),
(1,1,35,74,52,69,24,32),
(1,1,36,76,53,70,25,33),
(1,1,37,78,54,72,25,33),
(1,1,38,80,55,74,25,34),
(1,1,39,82,56,75,25,34),
(1,1,40,83,57,77,25,35),
(1,1,41,85,58,79,26,35),
(1,1,42,87,60,80,26,35),
(1,1,43,89,61,82,26,36),
(1,1,44,91,62,84,26,36),
(1,1,45,93,63,85,26,37),
(1,1,46,95,64,87,27,37),
(1,1,47,97,66,89,27,38),
(1,1,48,99,67,91,27,38),
(1,1,49,101,68,93,27,39),
(1,1,50,103,69,94,28,40),
(1,1,51,105,71,96,28,40),
(1,1,52,107,72,98,28,41),
(1,1,53,109,73,100,28,41),
(1,1,54,111,74,102,29,42),
(1,1,55,113,76,103,29,42),
(1,1,56,115,77,105,29,43),
(1,1,57,117,78,107,29,43),
(1,1,58,119,79,109,30,44),
(1,1,59,121,81,111,30,44),
(1,1,60,123,82,113,30,45),
(1,1,61,125,83,115,30,46),
(1,1,62,127,85,117,31,46),
(1,1,63,129,86,119,31,47),
(1,1,64,132,88,121,31,47),
(1,1,65,134,89,123,32,48),
(1,1,66,136,90,125,32,49),
(1,1,67,138,92,127,32,49),
(1,1,68,140,93,129,32,50),
(1,1,69,143,95,131,33,50),
(1,1,70,145,96,133,33,51),
(1,1,71,148,97,140,33,53),
(1,1,72,156,99,143,33,54),
(1,1,73,162,101,148,33,55),
(1,1,74,162,102,148,34,55),
(1,1,75,165,104,150,34,56),
(1,1,76,171,106,156,34,57),
(1,1,77,171,108,157,35,58),
(1,1,78,174,109,159,35,58),
(1,1,79,181,111,165,35,59),
(1,1,80,184,113,168,36,60),
(1,1,81,177,115,161,36,60),
(1,1,82,189,117,164,36,60),
(1,1,83,192,119,167,36,61),
(1,1,84,195,121,170,37,62),
(1,1,85,198,123,173,37,63),
(1,2,1,22,20,22,20,21),
(1,2,2,23,21,23,21,22),
(1,2,3,24,21,24,21,22),
(1,2,4,25,22,25,22,23),
(1,2,5,26,22,26,23,24),
(1,2,6,28,23,27,23,25),
(1,2,7,29,24,28,24,25),
(1,2,8,30,24,29,25,26),
(1,2,9,31,25,30,25,27),
(1,2,10,32,25,32,26,27),
(1,2,11,33,26,33,27,28),
(1,2,12,35,27,34,27,29),
(1,2,13,36,27,35,28,30),
(1,2,14,37,28,36,29,31),
(1,2,15,38,29,37,30,31),
(1,2,16,40,29,38,30,32),
(1,2,17,41,30,40,31,33),
(1,2,18,42,31,41,32,34),
(1,2,19,43,31,42,33,35),
(1,2,20,45,32,43,33,35),
(1,2,21,46,33,45,34,36),
(1,2,22,47,33,46,35,37),
(1,2,23,49,34,47,36,38),
(1,2,24,50,35,48,37,39),
(1,2,25,51,36,50,37,40),
(1,2,26,53,36,51,38,41),
(1,2,27,54,37,52,39,42),
(1,2,28,56,38,54,40,43),
(1,2,29,57,39,55,41,43),
(1,2,30,58,39,56,42,44),
(1,2,31,60,40,58,43,45),
(1,2,32,61,41,59,43,46),
(1,2,33,63,42,60,44,47),
(1,2,34,64,43,62,45,48),
(1,2,35,66,44,63,46,49),
(1,2,36,67,44,65,47,50),
(1,2,37,69,45,66,48,51),
(1,2,38,70,46,67,49,52),
(1,2,39,72,47,69,50,53),
(1,2,40,73,48,70,51,54),
(1,2,41,75,49,72,52,55),
(1,2,42,77,49,73,53,56),
(1,2,43,78,50,75,54,57),
(1,2,44,80,51,76,55,58),
(1,2,45,81,52,78,56,59),
(1,2,46,83,53,79,57,61),
(1,2,47,85,54,81,58,62),
(1,2,48,86,55,83,59,63),
(1,2,49,88,56,84,60,64),
(1,2,50,90,57,86,61,65),
(1,2,51,91,58,87,62,66),
(1,2,52,93,59,89,63,67),
(1,2,53,95,60,91,64,68),
(1,2,54,97,61,92,65,69),
(1,2,55,98,61,94,66,71),
(1,2,56,100,62,95,67,72),
(1,2,57,102,63,97,68,73),
(1,2,58,104,64,99,69,74),
(1,2,59,105,65,101,70,75),
(1,2,60,107,66,102,71,77),
(1,2,61,109,67,104,73,78),
(1,2,62,111,69,106,74,79),
(1,2,63,113,70,107,75,80),
(1,2,64,115,71,109,76,81),
(1,2,65,116,72,111,77,83),
(1,2,66,118,73,113,78,84),
(1,2,67,120,74,115,79,85),
(1,2,68,122,75,116,81,86),
(1,2,69,124,76,118,82,88),
(1,2,70,126,77,120,83,89),
(1,2,71,148,78,122,84,92),
(1,2,72,150,79,125,86,94),
(1,2,73,152,80,127,87,96),
(1,2,74,156,82,129,89,97),
(1,2,75,158,83,131,90,99),
(1,2,76,162,84,134,92,100),
(1,2,77,164,86,136,93,103),
(1,2,78,167,87,138,95,105),
(1,2,79,170,88,153,96,106),
(1,2,80,173,90,160,98,108),
(1,2,81,160,91,146,99,107),
(1,2,82,163,93,148,101,108),
(1,2,83,166,94,151,102,110),
(1,2,84,170,96,153,104,112),
(1,2,85,172,97,156,106,114),
(1,3,1,20,23,21,20,21),
(1,3,81,75,194,130,91,99),
(1,3,82,77,197,133,93,100),
(1,3,83,78,200,135,94,102),
(1,3,84,79,204,137,96,103),
(1,3,85,80,208,139,97,105),
(1,3,2,17,29,21,21,22),
(1,3,3,18,31,22,21,22),
(1,3,4,18,32,23,22,23),
(1,3,5,19,33,24,22,24),
(1,3,6,19,35,25,23,24),
(1,3,7,20,36,26,24,25),
(1,3,8,20,38,27,24,25),
(1,3,9,21,39,27,25,26),
(1,3,10,24,34,28,25,26),
(1,3,11,24,35,29,25,27),
(1,3,12,25,37,30,26,28),
(1,3,13,25,38,31,27,28),
(1,3,14,26,39,32,27,29),
(1,3,15,26,41,33,28,29),
(1,3,16,27,42,34,28,30),
(1,3,17,27,43,35,29,31),
(1,3,18,28,45,36,30,32),
(1,3,19,28,46,37,30,32),
(1,3,20,29,48,38,31,33),
(1,3,21,29,49,39,32,34),
(1,3,22,30,51,40,32,34),
(1,3,23,30,52,41,33,35),
(1,3,24,31,54,42,34,36),
(1,3,25,31,55,43,34,37),
(1,3,26,32,57,44,35,37),
(1,3,27,32,59,45,36,38),
(1,3,28,33,60,46,36,39),
(1,3,29,33,62,47,37,40),
(1,3,30,34,64,48,38,40),
(1,3,31,34,65,50,39,41),
(1,3,32,35,67,51,39,42),
(1,3,33,36,69,52,40,43),
(1,3,34,36,70,53,41,44),
(1,3,35,37,72,54,42,45),
(1,3,36,38,74,56,43,46),
(1,3,37,38,76,57,43,46),
(1,3,38,39,78,58,44,47),
(1,3,39,39,80,59,45,48),
(1,3,40,40,81,61,46,49),
(1,3,41,41,83,62,47,50),
(1,3,42,41,85,63,47,51),
(1,3,43,42,87,64,48,52),
(1,3,44,43,89,66,49,53),
(1,3,45,43,91,67,50,54),
(1,3,46,44,93,69,51,55),
(1,3,47,45,95,70,52,56),
(1,3,48,46,98,71,53,57),
(1,3,49,46,100,73,54,58),
(1,3,50,47,102,74,55,59),
(1,3,51,48,104,76,56,60),
(1,3,52,49,106,77,57,61),
(1,3,53,49,108,79,58,62),
(1,3,54,50,111,80,59,63),
(1,3,55,51,113,82,60,64),
(1,3,56,52,115,83,61,65),
(1,3,57,53,118,85,62,67),
(1,3,58,53,120,87,63,68),
(1,3,59,54,123,88,64,69),
(1,3,60,55,125,90,65,70),
(1,3,61,56,127,92,66,71),
(1,3,62,57,130,93,67,72),
(1,3,63,58,133,95,68,74),
(1,3,64,58,135,97,69,75),
(1,3,65,59,138,99,71,76),
(1,3,66,60,140,100,72,77),
(1,3,67,61,143,102,73,79),
(1,3,68,62,146,104,74,80),
(1,3,69,63,149,106,75,81),
(1,3,70,64,151,108,77,83),
(1,3,71,65,154,110,78,84),
(1,3,72,66,157,112,79,85),
(1,3,73,67,160,114,80,87),
(1,3,74,68,163,116,82,88),
(1,3,75,69,166,118,83,90),
(1,3,76,70,177,120,84,91),
(1,3,77,71,180,122,86,93),
(1,3,78,72,183,124,87,94),
(1,3,79,73,186,126,88,96),
(1,3,80,74,190,128,90,97),
(1,4,1,21,23,21,20,20),
(1,4,2,22,24,22,20,20),
(1,4,3,23,26,22,20,21),
(1,4,4,23,27,23,20,21),
(1,4,5,24,29,24,21,21),
(1,4,6,25,30,25,21,22),
(1,4,7,26,32,25,21,22),
(1,4,8,26,33,26,21,23),
(1,4,9,27,35,27,21,23),
(1,4,10,28,36,27,21,23),
(1,4,11,29,38,28,22,24),
(1,4,12,30,39,29,22,24),
(1,4,13,31,41,30,22,25),
(1,4,14,31,43,31,22,25),
(1,4,15,32,44,31,22,25),
(1,4,16,33,46,32,23,26),
(1,4,17,34,48,33,23,26),
(1,4,18,35,49,34,23,27),
(1,4,19,36,51,35,23,27),
(1,4,20,37,53,35,23,28),
(1,4,21,38,54,36,24,28),
(1,4,22,39,56,37,24,29),
(1,4,23,40,58,38,24,29),
(1,4,24,41,60,39,24,30),
(1,4,25,42,61,40,25,30),
(1,4,26,43,63,41,25,31),
(1,4,27,44,65,42,25,31),
(1,4,28,45,67,43,25,32),
(1,4,29,46,69,43,25,32),
(1,4,30,47,71,44,26,33),
(1,4,31,48,72,45,26,33),
(1,4,32,49,74,46,26,34),
(1,4,33,50,76,47,27,34),
(1,4,34,51,78,48,27,35),
(1,4,35,52,80,49,27,35),
(1,4,36,53,82,50,27,36),
(1,4,37,54,84,51,28,36),
(1,4,38,55,86,52,28,37),
(1,4,39,56,88,53,28,38),
(1,4,40,57,90,54,28,38),
(1,4,41,58,92,55,29,39),
(1,4,42,60,94,56,29,39),
(1,4,43,61,96,57,29,40),
(1,4,44,62,98,58,30,40),
(1,4,45,63,100,59,30,41),
(1,4,46,64,103,61,30,42),
(1,4,47,65,105,62,31,42),
(1,4,48,66,107,63,31,43),
(1,4,49,68,109,64,31,44),
(1,4,50,69,111,65,32,44),
(1,4,51,70,113,66,32,45),
(1,4,52,71,116,67,32,45),
(1,4,53,73,118,68,33,46),
(1,4,54,74,120,69,33,47),
(1,4,55,75,122,71,33,47),
(1,4,56,76,125,72,34,48),
(1,4,57,78,127,73,34,49),
(1,4,58,79,129,74,34,49),
(1,4,59,80,131,75,35,50),
(1,4,60,81,134,77,35,51),
(1,4,61,83,136,78,35,51),
(1,4,62,84,138,79,36,52),
(1,4,63,85,141,80,36,53),
(1,4,64,87,143,81,37,54),
(1,4,65,88,146,83,37,54),
(1,4,66,89,148,84,37,55),
(1,4,67,91,151,85,38,56),
(1,4,68,92,153,86,38,57),
(1,4,69,94,156,88,39,57),
(1,4,70,95,158,89,39,58),
(1,4,71,97,161,90,39,60),
(1,4,72,99,164,92,40,60),
(1,4,73,100,167,94,40,61),
(1,4,74,102,170,95,41,62),
(1,4,75,104,173,97,41,63),
(1,4,76,105,176,98,41,64),
(1,4,77,107,179,100,42,65),
(1,4,78,109,183,106,42,66),
(1,4,79,111,186,107,43,67),
(1,4,80,113,189,109,43,69),
(1,4,81,114,202,107,44,68),
(1,4,82,116,205,108,44,68),
(1,4,83,118,209,110,45,69),
(1,4,84,120,213,112,45,70),
(1,4,85,122,216,114,46,71),
(1,5,1,20,20,20,22,23),
(1,5,2,20,20,20,23,24),
(1,5,3,20,20,21,25,26),
(1,5,4,20,21,21,26,27),
(1,5,5,21,21,21,27,28),
(1,5,6,21,21,22,29,30),
(1,5,7,21,21,22,30,31),
(1,5,8,21,22,23,31,33),
(1,5,9,21,22,23,33,34),
(1,5,10,21,22,23,34,36),
(1,5,11,22,22,24,36,37),
(1,5,12,22,23,24,37,39),
(1,5,13,22,23,25,38,40),
(1,5,14,22,23,25,40,42),
(1,5,15,22,23,25,41,43),
(1,5,16,23,24,26,43,45),
(1,5,17,23,24,26,44,46),
(1,5,18,23,24,27,46,48),
(1,5,19,23,24,27,47,49),
(1,5,20,23,25,28,49,51),
(1,5,21,24,25,28,51,53),
(1,5,22,24,25,29,52,54),
(1,5,23,24,26,29,54,56),
(1,5,24,24,26,30,55,58),
(1,5,25,25,26,30,57,59),
(1,5,26,25,27,31,59,61),
(1,5,27,25,27,31,60,63),
(1,5,28,25,27,32,62,65),
(1,5,29,25,28,32,64,66),
(1,5,30,26,28,33,65,68),
(1,5,31,26,28,33,67,70),
(1,5,32,26,29,34,69,72),
(1,5,33,27,29,34,70,73),
(1,5,34,27,29,35,72,75),
(1,5,35,27,30,35,74,77),
(1,5,36,27,30,36,76,79),
(1,5,37,28,30,36,78,81),
(1,5,38,28,31,37,79,83),
(1,5,39,28,31,38,81,85),
(1,5,40,28,31,38,83,87),
(1,5,41,29,32,39,85,88),
(1,5,42,29,32,39,87,90),
(1,5,43,29,33,40,89,92),
(1,5,44,30,33,40,91,94),
(1,5,45,30,33,41,92,96),
(1,5,46,30,34,42,94,98),
(1,5,47,31,34,42,96,100),
(1,5,48,31,35,43,98,102),
(1,5,49,31,35,44,100,104),
(1,5,50,32,36,44,102,106),
(1,5,51,32,36,45,104,109),
(1,5,52,32,36,45,106,111),
(1,5,53,33,37,46,108,113),
(1,5,54,33,37,47,110,115),
(1,5,55,33,38,47,112,117),
(1,5,56,34,38,48,114,119),
(1,5,57,34,39,49,117,121),
(1,5,58,34,39,49,119,124),
(1,5,59,35,40,50,121,126),
(1,5,60,35,40,51,123,128),
(1,5,61,35,41,51,125,130),
(1,5,62,36,41,52,127,132),
(1,5,63,36,41,53,129,135),
(1,5,64,37,42,54,132,137),
(1,5,65,37,42,54,134,139),
(1,5,66,37,43,55,136,142),
(1,5,67,38,43,56,138,144),
(1,5,68,38,44,57,140,146),
(1,5,69,39,44,57,143,149),
(1,5,70,39,45,58,145,151),
(1,5,71,39,46,59,148,158),
(1,5,72,40,46,59,151,161),
(1,5,73,40,47,60,154,164),
(1,5,74,41,47,61,156,167),
(1,5,75,41,48,62,159,170),
(1,5,76,41,49,63,162,174),
(1,5,77,42,49,64,165,177),
(1,5,78,42,50,65,168,180),
(1,5,79,43,50,66,171,183),
(1,5,80,43,51,67,174,186),
(1,5,81,44,52,68,185,185),
(1,5,82,44,52,68,189,188),
(1,5,83,45,53,69,193,191),
(1,5,84,45,54,70,196,195),
(1,5,85,46,54,71,199,198),
(1,6,1,23,20,22,20,20),
(1,6,2,24,21,23,20,20),
(1,6,3,26,22,24,20,21),
(1,6,4,27,22,26,20,21),
(1,6,5,28,23,27,20,21),
(1,6,6,30,24,28,20,21),
(1,6,7,31,25,29,21,22),
(1,6,8,32,26,30,21,22),
(1,6,9,34,26,32,21,22),
(1,6,10,35,27,33,21,23),
(1,6,11,36,28,34,21,23),
(1,6,12,38,29,35,21,23),
(1,6,13,39,30,37,21,24),
(1,6,14,41,31,38,21,24),
(1,6,15,42,32,39,21,24),
(1,6,16,44,33,41,21,25),
(1,6,17,45,34,42,22,25),
(1,6,18,47,34,43,22,25),
(1,6,19,48,35,45,22,26),
(1,6,20,50,36,46,22,26),
(1,6,21,51,37,48,22,26),
(1,6,22,53,38,49,22,27),
(1,6,23,54,39,51,22,27),
(1,6,24,56,40,52,23,28),
(1,6,25,58,41,53,23,28),
(1,6,26,59,42,55,23,28),
(1,6,27,61,43,56,23,29),
(1,6,28,63,44,58,23,29),
(1,6,29,64,45,59,23,30),
(1,6,30,66,46,61,24,30),
(1,6,31,68,47,62,24,30),
(1,6,32,69,48,64,24,31),
(1,6,33,71,50,66,24,31),
(1,6,34,73,51,67,24,32),
(1,6,35,74,52,69,24,32),
(1,6,36,76,53,70,25,33),
(1,6,37,78,54,72,25,33),
(1,6,38,80,55,74,25,34),
(1,6,39,82,56,75,25,34),
(1,6,40,83,57,77,25,35),
(1,6,41,85,58,79,26,35),
(1,6,42,87,60,80,26,35),
(1,6,43,89,61,82,26,36),
(1,6,44,91,62,84,26,36),
(1,6,45,93,63,85,26,37),
(1,6,46,95,64,87,27,37),
(1,6,47,97,66,89,27,38),
(1,6,48,99,67,91,27,38),
(1,6,49,101,68,93,27,39),
(1,6,50,103,69,94,28,40),
(1,6,51,105,71,96,28,40),
(1,6,52,106,72,97,28,41),
(1,6,53,107,72,98,28,41),
(1,6,54,107,73,98,29,42),
(1,6,55,108,73,99,29,43),
(1,6,56,111,75,102,29,44),
(1,6,57,113,76,104,29,44),
(1,6,58,118,77,106,30,45),
(1,6,59,118,79,108,30,45),
(1,6,60,123,80,110,30,46),
(1,6,61,125,81,112,30,47),
(1,6,62,128,83,114,30,47),
(1,6,63,130,84,117,31,48),
(1,6,64,130,86,119,31,48),
(1,6,65,140,87,128,31,49),
(1,6,66,143,89,131,31,50),
(1,6,67,146,90,133,32,50),
(1,6,68,148,92,135,32,51),
(1,6,69,151,93,138,32,52),
(1,6,70,154,95,140,32,52),
(1,6,71,162,97,144,33,53),
(1,6,72,164,98,146,33,54),
(1,6,73,165,100,148,33,55),
(1,6,74,166,102,151,33,55),
(1,6,75,169,103,154,34,56),
(1,6,76,172,105,157,34,57),
(1,6,77,175,107,157,34,58),
(1,6,78,176,108,157,34,58),
(1,6,79,177,110,157,35,59),
(1,6,80,180,112,160,35,60),
(1,6,81,178,114,163,35,60),
(1,6,82,178,116,165,36,60),
(1,6,83,185,118,168,36,61),
(1,6,84,185,120,171,36,62),
(1,6,85,191,121,174,36,63),
(1,7,81,122,75,138,136,146),
(1,7,82,124,77,141,139,148),
(1,7,83,127,78,143,139,151),
(1,7,84,129,79,145,139,153),
(1,7,85,131,80,148,145,156),
(1,7,10,28,24,29,28,30),
(1,7,11,29,24,30,29,31),
(1,7,12,30,25,31,30,32),
(1,7,13,30,25,32,31,33),
(1,7,14,31,26,33,32,34),
(1,7,15,32,26,34,33,36),
(1,7,16,33,27,35,34,37),
(1,7,17,34,27,36,35,38),
(1,7,18,35,28,37,36,39),
(1,7,19,36,28,38,37,40),
(1,7,20,37,29,39,38,41),
(1,7,21,38,29,40,39,42),
(1,7,22,38,30,41,40,43),
(1,7,23,39,30,42,41,44),
(1,7,24,40,31,43,42,46),
(1,7,25,41,31,45,43,47),
(1,7,26,42,32,46,44,48),
(1,7,27,43,32,47,45,49),
(1,7,28,44,33,48,46,50),
(1,7,29,45,33,49,47,52),
(1,7,30,46,34,50,48,53),
(1,7,31,48,34,52,50,54),
(1,7,32,49,35,53,51,56),
(1,7,33,50,36,54,52,57),
(1,7,34,51,36,55,53,58),
(1,7,35,52,37,57,54,60),
(1,7,36,53,38,58,56,61),
(1,7,37,54,38,59,57,62),
(1,7,38,55,39,61,58,64),
(1,7,39,56,39,62,59,65),
(1,7,40,58,40,63,61,67),
(1,7,41,59,41,65,62,68),
(1,7,42,60,41,66,63,70),
(1,7,43,61,42,68,64,71),
(1,7,44,63,43,69,66,73),
(1,7,45,64,43,71,67,74),
(1,7,46,65,44,72,69,76),
(1,7,47,66,45,74,70,77),
(1,7,48,68,46,75,71,79),
(1,7,49,69,46,77,73,81),
(1,7,50,70,47,78,74,82),
(1,7,51,72,48,80,76,84),
(1,7,52,73,49,81,77,86),
(1,7,53,75,49,83,79,87),
(1,7,54,76,50,85,80,89),
(1,7,55,77,51,86,82,91),
(1,7,56,79,52,88,83,93),
(1,7,57,80,53,90,85,94),
(1,7,58,82,53,91,87,96),
(1,7,59,83,54,93,88,98),
(1,7,60,85,55,95,90,100),
(1,7,61,87,56,97,92,102),
(1,7,62,88,57,99,93,104),
(1,7,63,90,58,100,95,106),
(1,7,64,91,58,102,97,108),
(1,7,65,93,59,104,99,110),
(1,7,66,95,60,106,100,112),
(1,7,67,96,61,108,102,114),
(1,7,68,98,62,110,104,116),
(1,7,69,100,63,112,106,118),
(1,7,70,102,64,114,108,120),
(1,7,71,103,65,116,110,122),
(1,7,72,105,66,118,112,125),
(1,7,73,107,67,120,114,127),
(1,7,74,109,68,123,116,129),
(1,7,75,111,69,125,118,131),
(1,7,76,113,70,127,120,134),
(1,7,77,114,71,129,122,136),
(1,7,78,116,72,131,124,138),
(1,7,79,118,73,134,126,141),
(1,7,80,120,74,136,128,143),
(1,8,1,20,20,20,23,22),
(1,8,2,20,20,20,24,23),
(1,8,3,20,20,21,26,25),
(1,8,4,20,20,21,27,26),
(1,8,5,20,21,21,28,27),
(1,8,6,20,21,21,30,29),
(1,8,7,21,21,22,31,30),
(1,8,8,21,21,22,33,31),
(1,8,9,21,21,22,34,33),
(1,8,10,21,21,23,36,34),
(1,8,11,21,22,23,37,36),
(1,8,12,21,22,23,39,37),
(1,8,13,21,22,24,40,38),
(1,8,14,21,22,24,42,40),
(1,8,15,21,22,24,43,41),
(1,8,16,21,23,25,45,43),
(1,8,17,22,23,25,46,44),
(1,8,18,22,23,25,48,46),
(1,8,19,22,23,26,49,47),
(1,8,20,22,23,26,51,49),
(1,8,21,22,24,26,53,51),
(1,8,22,22,24,27,54,52),
(1,8,23,22,24,27,56,54),
(1,8,24,23,24,28,58,55),
(1,8,25,23,25,28,59,57),
(1,8,26,23,25,28,61,59),
(1,8,27,23,25,29,63,60),
(1,8,28,23,25,29,65,62),
(1,8,29,23,25,30,66,64),
(1,8,30,24,26,30,68,65),
(1,8,31,24,26,30,70,67),
(1,8,32,24,26,31,72,69),
(1,8,33,24,27,31,73,70),
(1,8,34,24,27,32,75,72),
(1,8,35,24,27,32,77,74),
(1,8,36,25,27,33,79,76),
(1,8,37,25,28,33,81,78),
(1,8,38,25,28,34,83,79),
(1,8,39,25,28,34,85,81),
(1,8,40,25,28,35,87,83),
(1,8,41,26,29,35,88,85),
(1,8,42,26,29,35,90,87),
(1,8,43,26,29,36,92,89),
(1,8,44,26,30,36,94,91),
(1,8,45,26,30,37,96,92),
(1,8,46,27,30,37,98,94),
(1,8,47,27,31,38,100,96),
(1,8,48,27,31,38,102,98),
(1,8,49,27,31,39,104,100),
(1,8,50,28,32,40,106,102),
(1,8,51,28,32,40,109,104),
(1,8,52,28,32,41,111,106),
(1,8,53,28,33,41,113,108),
(1,8,54,29,33,42,115,110),
(1,8,55,29,33,42,117,112),
(1,8,56,29,34,43,119,114),
(1,8,57,29,34,43,121,117),
(1,8,58,30,34,44,124,119),
(1,8,59,30,35,44,126,121),
(1,8,60,30,35,45,128,123),
(1,8,61,30,35,46,130,125),
(1,8,62,31,36,46,132,127),
(1,8,63,31,36,47,135,129),
(1,8,64,31,37,47,137,132),
(1,8,65,32,37,48,139,134),
(1,8,66,32,37,49,142,136),
(1,8,67,32,38,49,144,138),
(1,8,68,32,38,50,146,140),
(1,8,69,33,39,50,149,143),
(1,8,70,33,39,51,151,145),
(1,8,71,33,39,52,154,152),
(1,8,72,33,40,53,160,155),
(1,8,73,33,40,54,160,158),
(1,8,74,34,41,54,163,160),
(1,8,75,34,41,55,166,163),
(1,8,76,34,41,56,169,166),
(1,8,77,35,42,57,172,169),
(1,8,78,35,42,57,175,173),
(1,8,79,35,43,58,178,176),
(1,8,80,36,43,59,181,179),
(1,8,81,36,44,60,194,177),
(1,8,82,36,44,60,197,180),
(1,8,83,36,45,61,200,184),
(1,8,84,37,45,62,204,187),
(1,8,85,37,46,63,207,190),
(1,9,1,20,20,21,22,22),
(1,9,2,20,20,22,23,23),
(1,9,3,21,21,22,24,24),
(1,9,4,21,21,23,26,25),
(1,9,5,21,21,23,27,27),
(1,9,6,21,22,24,28,28),
(1,9,7,22,22,24,29,29),
(1,9,8,22,23,25,30,30),
(1,9,9,22,23,26,32,31),
(1,9,10,23,23,26,33,33),
(1,9,11,23,24,27,34,34),
(1,9,12,23,24,27,35,35),
(1,9,13,24,25,28,37,36),
(1,9,14,24,25,29,38,38),
(1,9,15,24,25,29,39,39),
(1,9,16,25,26,30,41,40),
(1,9,17,25,26,31,42,42),
(1,9,18,25,27,31,43,43),
(1,9,19,26,27,32,45,44),
(1,9,20,26,28,33,46,46),
(1,9,21,26,28,33,48,47),
(1,9,22,27,29,34,49,49),
(1,9,23,27,29,35,51,50),
(1,9,24,28,30,35,52,51),
(1,9,25,28,30,36,53,53),
(1,9,26,28,31,37,55,54),
(1,9,27,29,31,37,56,56),
(1,9,28,29,32,38,58,57),
(1,9,29,30,32,39,59,59),
(1,9,30,30,33,40,61,60),
(1,9,31,30,33,40,62,62),
(1,9,32,31,34,41,64,63),
(1,9,33,31,34,42,66,65),
(1,9,34,32,35,43,67,66),
(1,9,35,32,35,44,69,68),
(1,9,36,33,36,44,70,69),
(1,9,37,33,36,45,72,71),
(1,9,38,34,37,46,74,73),
(1,9,39,34,38,47,75,74),
(1,9,40,35,38,48,77,76),
(1,9,41,35,39,48,79,78),
(1,9,42,35,39,49,80,79),
(1,9,43,36,40,50,82,81),
(1,9,44,36,40,51,84,83),
(1,9,45,37,41,52,85,84),
(1,9,46,37,42,53,87,86),
(1,9,47,38,42,54,89,88),
(1,9,48,38,43,55,91,89),
(1,9,49,39,44,55,93,91),
(1,9,50,40,44,56,94,93),
(1,9,51,40,45,57,96,95),
(1,9,52,41,45,58,98,97),
(1,9,53,41,46,59,100,98),
(1,9,54,42,47,60,102,100),
(1,9,55,42,47,61,103,102),
(1,9,56,43,48,62,105,104),
(1,9,57,43,49,63,107,106),
(1,9,58,44,49,64,109,108),
(1,9,59,44,50,65,111,109),
(1,9,60,45,51,66,113,111),
(1,9,61,46,51,67,115,113),
(1,9,62,46,52,68,117,115),
(1,9,63,47,53,69,119,117),
(1,9,64,47,54,70,121,119),
(1,9,65,48,54,71,123,121),
(1,9,66,49,55,72,125,123),
(1,9,67,49,56,73,127,125),
(1,9,68,50,57,74,129,127),
(1,9,69,50,57,75,131,129),
(1,9,70,51,58,76,133,131),
(1,9,71,52,59,78,135,146),
(1,9,72,53,59,79,138,148),
(1,9,73,54,60,80,140,151),
(1,9,74,54,61,89,143,154),
(1,9,75,55,62,91,145,156),
(1,9,76,56,63,92,148,159),
(1,9,77,57,64,93,151,162),
(1,9,78,57,65,95,153,165),
(1,9,79,58,66,96,156,168),
(1,9,80,59,67,97,159,170),
(1,9,81,60,68,91,169,169),
(1,9,82,60,68,92,172,172),
(1,9,83,61,69,94,175,175),
(1,9,84,62,70,95,178,178),
(1,9,85,63,71,96,181,181),
(1,11,81,91,83,99,146,161),
(1,11,82,92,85,101,148,164),
(1,11,83,94,86,102,151,167),
(1,11,84,95,87,104,160,170),
(1,11,85,96,89,106,160,173),
(1,11,10,26,24,25,30,31),
(1,11,11,26,25,26,31,33),
(1,11,12,27,25,27,32,34),
(1,11,13,27,26,27,33,35),
(1,11,14,28,26,28,34,36),
(1,11,15,29,27,29,36,37),
(1,11,16,29,27,29,37,38),
(1,11,17,30,28,30,38,40),
(1,11,18,30,29,31,39,41),
(1,11,19,31,29,31,40,42),
(1,11,20,32,30,32,41,43),
(1,11,21,32,30,33,42,45),
(1,11,22,33,31,34,43,46),
(1,11,23,34,32,34,44,47),
(1,11,24,34,32,35,46,49),
(1,11,25,35,33,36,47,50),
(1,11,26,36,33,37,48,51),
(1,11,27,36,34,37,49,53),
(1,11,28,37,35,38,50,54),
(1,11,29,38,35,39,52,56),
(1,11,30,38,36,40,53,57),
(1,11,31,39,37,41,54,58),
(1,11,32,40,37,42,56,60),
(1,11,33,41,38,42,57,61),
(1,11,34,41,39,43,58,63),
(1,11,35,42,39,44,60,64),
(1,11,36,43,40,45,61,66),
(1,11,37,44,41,46,62,68),
(1,11,38,45,41,47,64,69),
(1,11,39,45,42,48,65,71),
(1,11,40,46,43,49,67,72),
(1,11,41,47,44,50,68,74),
(1,11,42,48,44,51,70,76),
(1,11,43,49,45,52,71,77),
(1,11,44,50,46,52,73,79),
(1,11,45,50,47,53,74,81),
(1,11,46,51,48,54,76,83),
(1,11,47,52,48,56,77,84),
(1,11,48,53,49,57,79,86),
(1,11,49,54,50,58,81,88),
(1,11,50,55,51,59,82,90),
(1,11,51,56,52,60,84,92),
(1,11,52,57,53,61,86,94),
(1,11,53,58,54,62,87,96),
(1,11,54,59,54,63,89,98),
(1,11,55,60,55,64,91,100),
(1,11,56,61,56,65,93,102),
(1,11,57,62,57,66,94,104),
(1,11,58,63,58,68,96,106),
(1,11,59,64,59,69,98,108),
(1,11,60,65,60,70,100,110),
(1,11,61,66,61,71,102,112),
(1,11,62,67,62,72,104,114),
(1,11,63,68,63,74,106,117),
(1,11,64,69,64,75,108,119),
(1,11,65,71,65,76,110,121),
(1,11,66,72,66,78,112,123),
(1,11,67,73,67,79,114,126),
(1,11,68,74,68,80,116,128),
(1,11,69,75,69,82,118,130),
(1,11,70,76,70,83,120,133),
(1,11,71,78,71,84,122,135),
(1,11,72,79,73,86,125,138),
(1,11,73,80,74,87,127,140),
(1,11,74,81,75,89,129,143),
(1,11,75,83,76,90,131,145),
(1,11,76,84,77,92,134,148),
(1,11,77,85,78,93,136,151),
(1,11,78,87,80,95,138,153),
(1,11,79,88,81,96,141,156),
(1,11,80,89,82,98,143,159),
(2,1,1,26,17,24,17,23),
(2,1,2,27,18,25,17,23),
(2,1,3,29,19,26,17,24),
(2,1,4,30,19,27,17,24),
(2,1,5,31,20,29,17,24),
(2,1,6,32,21,30,17,24),
(2,1,7,34,22,31,18,25),
(2,1,8,35,23,32,18,25),
(2,1,9,37,24,34,18,25),
(2,1,10,38,24,35,18,26),
(2,1,11,39,25,36,18,26),
(2,1,12,41,26,37,18,26),
(2,1,13,42,27,39,18,27),
(2,1,14,44,28,40,18,27),
(2,1,15,45,29,41,18,27),
(2,1,16,47,30,43,19,28),
(2,1,17,48,31,44,19,28),
(2,1,18,50,32,45,19,28),
(2,1,19,51,33,47,19,29),
(2,1,20,53,34,48,19,29),
(2,1,21,54,34,50,19,29),
(2,1,22,56,35,51,19,30),
(2,1,23,57,36,52,20,30),
(2,1,24,59,37,54,20,30),
(2,1,25,60,38,55,20,31),
(2,1,26,62,39,57,20,31),
(2,1,27,64,40,58,20,32),
(2,1,28,65,41,60,20,32),
(2,1,29,67,43,61,21,32),
(2,1,30,69,44,63,21,33),
(2,1,31,70,45,64,21,33),
(2,1,32,72,46,66,21,34),
(2,1,33,74,47,67,21,34),
(2,1,34,76,48,69,21,35),
(2,1,35,77,49,71,22,35),
(2,1,36,79,50,72,22,36),
(2,1,37,81,51,74,22,36),
(2,1,38,83,52,76,22,36),
(2,1,39,84,53,77,22,37),
(2,1,40,86,55,79,23,37),
(2,1,41,88,56,81,23,38),
(2,1,42,90,57,82,23,38),
(2,1,43,92,58,84,23,39),
(2,1,44,94,59,86,23,39),
(2,1,45,96,60,87,24,40),
(2,1,46,98,62,89,24,40),
(2,1,47,100,63,91,24,41),
(2,1,48,101,64,93,24,41),
(2,1,49,103,65,94,25,42),
(2,1,50,105,66,96,25,42),
(2,1,51,107,68,98,25,43),
(2,1,52,109,69,100,25,43),
(2,1,53,111,70,102,25,44),
(2,1,54,113,71,104,26,45),
(2,1,55,115,73,105,26,45),
(2,1,56,118,74,107,26,46),
(2,1,57,120,75,109,26,46),
(2,1,58,122,77,111,27,47),
(2,1,59,124,78,113,27,47),
(2,1,60,126,79,115,27,48),
(2,1,61,128,81,117,27,48),
(2,1,62,130,82,119,28,49),
(2,1,63,132,83,121,28,50),
(2,1,64,135,85,123,28,50),
(2,1,65,137,86,125,29,51),
(2,1,66,139,87,127,29,52),
(2,1,67,141,89,129,29,52),
(2,1,68,143,90,131,29,53),
(2,1,69,146,92,133,30,53),
(2,1,70,148,93,135,30,54),
(2,1,71,157,94,142,30,55),
(2,1,72,162,96,148,30,56),
(2,1,73,165,98,150,30,57),
(2,1,74,168,99,153,31,57),
(2,1,75,170,101,154,31,58),
(2,1,76,172,103,156,31,59),
(2,1,77,174,105,159,32,60),
(2,1,78,179,106,162,32,60),
(2,1,79,184,108,167,32,61),
(2,1,80,187,110,170,33,62),
(2,1,81,180,112,162,33,62),
(2,1,82,192,114,165,33,62),
(2,1,83,195,116,168,33,63),
(2,1,84,198,118,171,34,64),
(2,1,85,201,120,174,34,65),
(2,2,81,163,88,147,96,109),
(2,2,82,166,90,149,98,110),
(2,2,83,169,91,152,99,112),
(2,2,84,173,93,154,101,114),
(2,2,85,175,94,157,103,116),
(2,2,10,34,22,31,22,29),
(2,2,11,35,22,32,23,30),
(2,2,12,36,23,33,24,30),
(2,2,13,37,24,34,24,31),
(2,2,14,38,24,35,25,32),
(2,2,15,39,25,37,26,32),
(2,2,16,41,25,38,26,33),
(2,2,17,42,26,39,27,34),
(2,2,18,43,27,40,28,35),
(2,2,19,44,27,41,28,35),
(2,2,20,45,28,42,29,36),
(2,2,21,46,29,43,30,37),
(2,2,22,48,29,44,31,38),
(2,2,23,49,30,45,31,39),
(2,2,24,50,31,47,32,39),
(2,2,25,51,31,48,33,40),
(2,2,26,53,32,49,34,41),
(2,2,27,54,33,50,34,42),
(2,2,28,55,33,51,35,43),
(2,2,29,57,34,53,36,44),
(2,2,30,58,35,54,37,44),
(2,2,31,59,36,55,38,45),
(2,2,32,61,36,57,39,46),
(2,2,33,62,37,58,39,47),
(2,2,34,64,38,59,40,48),
(2,2,35,65,39,61,41,49),
(2,2,36,67,40,62,42,50),
(2,2,37,68,40,63,43,51),
(2,2,38,70,41,65,44,52),
(2,2,39,71,42,66,45,53),
(2,2,40,73,43,68,46,54),
(2,2,41,74,44,69,47,55),
(2,2,42,76,44,71,48,56),
(2,2,43,77,45,72,49,57),
(2,2,44,79,46,74,49,58),
(2,2,45,81,47,75,50,59),
(2,2,46,82,48,77,51,60),
(2,2,47,84,49,78,53,61),
(2,2,48,86,50,80,54,62),
(2,2,49,87,51,82,55,64),
(2,2,50,89,52,83,56,65),
(2,2,51,91,53,85,57,66),
(2,2,52,93,54,87,58,67),
(2,2,53,95,55,88,59,68),
(2,2,54,96,56,90,60,69),
(2,2,55,98,57,92,61,71),
(2,2,56,100,58,94,62,72),
(2,2,57,102,59,95,63,73),
(2,2,58,104,60,97,65,74),
(2,2,59,111,61,99,66,76),
(2,2,60,111,62,101,67,77),
(2,2,61,111,63,103,68,78),
(2,2,62,117,64,105,69,80),
(2,2,63,119,65,107,71,81),
(2,2,64,119,66,109,72,82),
(2,2,65,119,68,111,73,84),
(2,2,66,121,69,113,75,85),
(2,2,67,123,70,115,76,87),
(2,2,68,125,71,117,77,88),
(2,2,69,133,72,119,79,89),
(2,2,70,133,74,121,80,91),
(2,2,71,133,75,123,81,92),
(2,2,72,140,76,126,83,94),
(2,2,73,142,77,128,84,96),
(2,2,74,142,79,130,86,97),
(2,2,75,147,80,132,87,99),
(2,2,76,147,81,135,89,100),
(2,2,77,153,83,137,90,102),
(2,2,78,156,84,139,92,104),
(2,2,79,158,85,142,93,105),
(2,2,80,158,87,144,95,107),
(2,3,1,23,20,23,17,24),
(2,3,2,23,21,24,18,25),
(2,3,3,24,23,25,18,25),
(2,3,4,24,24,26,19,26),
(2,3,5,25,25,27,19,26),
(2,3,6,25,27,28,20,27),
(2,3,7,26,28,28,21,28),
(2,3,8,26,30,29,21,28),
(2,3,9,26,31,30,22,29),
(2,3,10,27,33,31,22,30),
(2,3,11,27,34,32,23,30),
(2,3,12,28,36,33,24,31),
(2,3,13,28,37,34,24,32),
(2,3,14,29,39,35,25,33),
(2,3,15,29,40,36,26,33),
(2,3,16,30,42,37,26,34),
(2,3,17,30,43,39,27,35),
(2,3,18,31,45,40,28,35),
(2,3,19,31,47,41,28,36),
(2,3,20,32,48,42,29,37),
(2,3,21,32,50,43,30,38),
(2,3,22,33,51,44,31,39),
(2,3,23,34,53,45,31,39),
(2,3,24,34,55,46,32,40),
(2,3,25,35,57,47,33,41),
(2,3,26,35,58,48,34,42),
(2,3,27,36,60,50,34,43),
(2,3,28,36,62,51,35,43),
(2,3,29,37,63,52,36,44),
(2,3,30,38,65,53,37,45),
(2,3,31,38,67,54,37,46),
(2,3,32,39,69,56,38,47),
(2,3,33,39,71,57,39,48),
(2,3,34,40,72,58,40,49),
(2,3,35,41,74,59,41,49),
(2,3,36,41,76,61,42,50),
(2,3,37,42,78,62,42,51),
(2,3,38,43,80,63,43,52),
(2,3,39,43,82,64,44,53),
(2,3,40,44,84,66,45,54),
(2,3,41,45,86,67,46,55),
(2,3,42,45,88,68,47,56),
(2,3,43,46,90,70,47,57),
(2,3,44,47,91,71,48,58),
(2,3,45,47,93,72,49,59),
(2,3,46,48,95,74,50,60),
(2,3,47,49,98,75,51,61),
(2,3,48,50,100,77,52,62),
(2,3,49,50,102,78,53,63),
(2,3,50,51,104,79,54,64),
(2,3,51,52,106,81,55,65),
(2,3,52,52,108,82,56,66),
(2,3,53,53,110,84,57,67),
(2,3,54,54,112,85,58,68),
(2,3,55,55,114,87,59,69),
(2,3,56,55,116,88,60,70),
(2,3,57,56,118,90,61,71),
(2,3,58,57,121,91,62,72),
(2,3,59,58,123,93,63,73),
(2,3,60,59,125,94,64,74),
(2,3,61,59,127,96,65,76),
(2,3,62,60,130,97,66,77),
(2,3,63,61,132,99,67,78),
(2,3,64,62,134,100,68,79),
(2,3,65,63,136,102,69,80),
(2,3,66,64,139,104,70,81),
(2,3,67,64,141,105,71,82),
(2,3,68,65,143,107,72,84),
(2,3,69,66,146,108,73,85),
(2,3,70,67,148,110,74,86),
(2,3,71,68,151,112,75,87),
(2,3,72,69,154,114,76,88),
(2,3,73,70,157,116,77,90),
(2,3,74,71,160,118,79,91),
(2,3,75,72,163,120,80,93),
(2,3,76,73,166,122,81,94),
(2,3,77,74,169,124,83,96),
(2,3,78,75,172,126,84,97),
(2,3,79,76,175,128,85,99),
(2,3,80,77,178,130,87,100),
(2,3,81,78,191,131,88,101),
(2,3,82,80,194,134,90,102),
(2,3,83,81,197,136,91,104),
(2,3,84,82,201,138,93,105),
(2,3,85,83,205,140,94,107),
(2,4,1,24,20,23,17,23),
(2,4,2,25,21,24,17,23),
(2,4,3,25,23,24,17,24),
(2,4,4,26,24,25,17,24),
(2,4,5,27,26,26,18,24),
(2,4,6,28,27,26,18,25),
(2,4,7,29,29,27,18,25),
(2,4,8,29,30,28,18,26),
(2,4,9,30,32,29,18,26),
(2,4,10,31,33,29,19,26),
(2,4,11,32,35,30,19,27),
(2,4,12,33,37,31,19,27),
(2,4,13,34,38,32,19,28),
(2,4,14,34,40,32,19,28),
(2,4,15,35,41,33,19,28),
(2,4,16,36,43,34,20,29),
(2,4,17,37,45,35,20,29),
(2,4,18,38,46,36,20,30),
(2,4,19,39,48,37,20,30),
(2,4,20,40,50,37,21,31),
(2,4,21,41,52,38,21,31),
(2,4,22,42,53,39,21,31),
(2,4,23,43,55,40,21,32),
(2,4,24,43,57,41,21,32),
(2,4,25,44,59,42,22,33),
(2,4,26,45,60,43,22,33),
(2,4,27,46,62,44,22,34),
(2,4,28,47,64,44,22,34),
(2,4,29,48,66,45,23,35),
(2,4,30,49,68,46,23,35),
(2,4,31,50,70,47,23,36),
(2,4,32,51,72,48,23,36),
(2,4,33,53,73,49,24,37),
(2,4,34,54,75,50,24,38),
(2,4,35,55,77,51,24,38),
(2,4,36,56,79,52,24,39),
(2,4,37,57,81,53,25,39),
(2,4,38,58,83,54,25,40),
(2,4,39,59,85,55,25,40),
(2,4,40,60,87,56,26,41),
(2,4,41,61,89,57,26,41),
(2,4,42,62,91,58,26,42),
(2,4,43,63,93,59,27,43),
(2,4,44,65,95,60,27,43),
(2,4,45,66,98,61,27,44),
(2,4,46,67,100,62,27,44),
(2,4,47,68,102,64,28,45),
(2,4,48,69,104,65,28,46),
(2,4,49,71,106,66,28,46),
(2,4,50,72,108,67,29,47),
(2,4,51,73,110,68,29,48),
(2,4,52,74,113,69,29,48),
(2,4,53,75,115,70,30,49),
(2,4,54,77,117,71,30,50),
(2,4,55,78,119,73,30,50),
(2,4,56,79,122,74,31,51),
(2,4,57,80,124,75,31,52),
(2,4,58,82,126,76,31,52),
(2,4,59,83,129,77,32,53),
(2,4,60,84,131,78,32,54),
(2,4,61,86,133,80,33,54),
(2,4,62,87,136,81,33,55),
(2,4,63,88,138,82,33,56),
(2,4,64,90,140,83,34,57),
(2,4,65,91,143,85,34,57),
(2,4,66,92,145,86,34,58),
(2,4,67,94,148,87,35,59),
(2,4,68,95,150,88,35,59),
(2,4,69,97,153,90,36,60),
(2,4,70,98,155,91,36,61),
(2,4,71,100,158,92,36,62),
(2,4,72,102,161,94,37,62),
(2,4,73,103,164,99,37,63),
(2,4,74,105,167,100,38,64),
(2,4,75,107,170,102,38,65),
(2,4,76,108,173,102,38,66),
(2,4,77,110,176,102,39,67),
(2,4,78,112,180,103,39,68),
(2,4,79,114,183,105,40,69),
(2,4,80,116,186,107,40,70),
(2,4,81,117,199,108,41,70),
(2,4,82,119,202,109,41,70),
(2,4,83,121,206,111,42,71),
(2,4,84,123,210,113,42,72),
(2,4,85,125,213,115,43,73),
(2,5,81,47,49,69,182,187),
(2,5,82,47,49,69,186,190),
(2,5,83,48,50,70,190,193),
(2,5,84,48,51,71,193,197),
(2,5,85,49,51,72,196,200),
(2,5,10,25,19,24,30,36),
(2,5,11,25,19,25,31,37),
(2,5,12,25,20,25,32,39),
(2,5,13,25,20,25,33,40),
(2,5,14,25,20,26,35,41),
(2,5,15,26,20,26,36,43),
(2,5,16,26,21,27,37,44),
(2,5,17,26,21,27,39,45),
(2,5,18,26,21,27,40,47),
(2,5,19,26,22,28,41,48),
(2,5,20,27,22,28,43,50),
(2,5,21,27,22,29,44,51),
(2,5,22,27,22,29,46,53),
(2,5,23,27,23,30,47,54),
(2,5,24,28,23,30,49,56),
(2,5,25,28,23,31,50,57),
(2,5,26,28,24,31,52,59),
(2,5,27,28,24,31,53,61),
(2,5,28,28,24,32,55,62),
(2,5,29,29,25,32,56,64),
(2,5,30,29,25,33,58,66),
(2,5,31,29,25,33,60,67),
(2,5,32,29,26,34,61,69),
(2,5,33,30,26,34,63,71),
(2,5,34,30,26,35,65,72),
(2,5,35,30,27,35,66,74),
(2,5,36,31,27,36,68,76),
(2,5,37,31,27,37,70,78),
(2,5,38,31,28,37,72,80),
(2,5,39,31,28,38,73,82),
(2,5,40,32,28,38,75,83),
(2,5,41,32,29,39,77,85),
(2,5,42,32,29,39,79,87),
(2,5,43,32,30,40,81,89),
(2,5,44,33,30,40,83,91),
(2,5,45,33,30,41,85,93),
(2,5,46,33,31,42,87,95),
(2,5,47,34,31,42,89,97),
(2,5,48,34,32,43,91,100),
(2,5,49,34,32,44,93,102),
(2,5,50,35,32,44,99,104),
(2,5,51,35,33,45,102,106),
(2,5,52,35,33,45,104,108),
(2,5,53,36,34,46,106,110),
(2,5,54,36,34,47,108,113),
(2,5,55,36,35,47,111,115),
(2,5,56,37,35,48,113,117),
(2,5,57,37,36,49,115,120),
(2,5,58,37,36,50,117,122),
(2,5,59,38,37,50,120,125),
(2,5,60,38,37,51,123,127),
(2,5,61,38,37,52,125,129),
(2,5,62,39,38,52,128,132),
(2,5,63,39,38,53,130,135),
(2,5,64,39,39,54,133,137),
(2,5,65,40,40,55,135,140),
(2,5,66,40,40,56,138,142),
(2,5,67,41,41,56,140,145),
(2,5,68,41,41,57,144,148),
(2,5,69,41,42,58,147,151),
(2,5,70,42,42,59,149,153),
(2,5,71,42,43,60,152,156),
(2,5,72,43,43,60,155,159),
(2,5,73,43,44,61,158,162),
(2,5,74,44,44,62,160,165),
(2,5,75,44,45,63,163,168),
(2,5,76,44,46,64,167,171),
(2,5,77,45,46,65,170,174),
(2,5,78,45,47,66,173,177),
(2,5,79,46,47,67,176,180),
(2,5,80,46,48,68,179,183),
(2,6,1,26,17,24,17,23),
(2,6,2,27,18,25,17,23),
(2,6,3,29,19,26,17,24),
(2,6,4,30,19,27,17,24),
(2,6,5,31,20,29,17,24),
(2,6,6,32,21,30,17,24),
(2,6,7,34,22,31,18,25),
(2,6,8,35,23,32,18,25),
(2,6,9,37,24,34,18,25),
(2,6,10,38,24,35,18,26),
(2,6,11,39,25,36,18,26),
(2,6,12,41,26,37,18,26),
(2,6,13,42,27,39,18,27),
(2,6,14,44,28,40,18,27),
(2,6,15,45,29,41,18,27),
(2,6,16,47,30,43,19,28),
(2,6,17,48,31,44,19,28),
(2,6,18,50,32,45,19,28),
(2,6,19,51,33,47,19,29),
(2,6,20,53,34,48,19,29),
(2,6,21,54,34,50,19,29),
(2,6,22,56,35,51,19,30),
(2,6,23,57,36,52,20,30),
(2,6,24,59,37,54,20,30),
(2,6,25,60,38,55,20,31),
(2,6,26,62,39,57,20,31),
(2,6,27,64,40,58,20,32),
(2,6,28,65,41,60,20,32),
(2,6,29,67,43,61,21,32),
(2,6,30,69,44,63,21,33),
(2,6,31,70,45,64,21,33),
(2,6,32,72,46,66,21,34),
(2,6,33,74,47,67,21,34),
(2,6,34,76,48,69,21,35),
(2,6,35,77,49,71,22,35),
(2,6,36,79,50,72,22,36),
(2,6,37,81,51,74,22,36),
(2,6,38,83,52,76,22,36),
(2,6,39,84,53,77,22,37),
(2,6,40,86,55,79,23,37),
(2,6,41,88,56,81,23,38),
(2,6,42,90,57,82,23,38),
(2,6,43,92,58,84,23,39),
(2,6,44,94,59,86,23,39),
(2,6,45,96,60,87,24,40),
(2,6,46,98,62,89,24,40),
(2,6,47,100,63,91,24,41),
(2,6,48,101,64,93,24,41),
(2,6,49,103,65,94,25,42),
(2,6,50,105,66,96,25,42),
(2,6,51,107,68,98,25,43),
(2,6,52,109,69,100,25,43),
(2,6,53,110,69,100,25,44),
(2,6,54,111,70,101,26,45),
(2,6,55,111,70,101,26,45),
(2,6,56,114,72,104,26,46),
(2,6,57,116,73,106,26,46),
(2,6,58,118,74,108,27,47),
(2,6,59,124,76,110,27,47),
(2,6,60,126,77,112,27,48),
(2,6,61,128,78,114,27,49),
(2,6,62,131,80,116,27,49),
(2,6,63,133,81,119,28,50),
(2,6,64,136,83,121,28,50),
(2,6,65,136,84,123,28,51),
(2,6,66,142,86,126,28,52),
(2,6,67,145,87,128,29,52),
(2,6,68,147,89,130,29,53),
(2,6,69,150,90,133,29,54),
(2,6,70,157,92,135,29,54),
(2,6,71,160,94,138,30,55),
(2,6,72,163,95,140,30,56),
(2,6,73,166,97,151,30,57),
(2,6,74,169,99,154,30,57),
(2,6,75,172,100,156,31,58),
(2,6,76,175,102,160,31,59),
(2,6,77,179,104,162,31,60),
(2,6,78,182,105,165,31,60),
(2,6,79,191,107,168,32,61),
(2,6,80,194,109,171,32,62),
(2,6,81,181,111,164,32,62),
(2,6,82,181,113,166,33,62),
(2,6,83,188,115,169,33,63),
(2,6,84,188,117,172,33,64),
(2,6,85,194,118,175,33,65),
(2,7,1,24,17,23,18,25),
(2,7,2,25,17,24,19,26),
(2,7,3,26,18,25,20,27),
(2,7,4,26,18,26,21,28),
(2,7,5,27,19,27,22,29),
(2,7,6,28,19,28,23,30),
(2,7,7,29,20,29,24,31),
(2,7,8,30,20,30,25,32),
(2,7,9,31,21,31,26,33),
(2,7,10,32,21,32,27,34),
(2,7,11,33,22,33,28,36),
(2,7,12,34,22,34,29,37),
(2,7,13,34,23,35,30,38),
(2,7,14,35,23,36,31,39),
(2,7,15,36,24,37,32,40),
(2,7,16,37,24,39,33,41),
(2,7,17,38,25,40,34,43),
(2,7,18,39,25,41,35,44),
(2,7,19,40,26,42,36,45),
(2,7,20,41,26,43,37,46),
(2,7,21,42,27,44,38,47),
(2,7,22,43,27,45,39,49),
(2,7,23,44,28,47,40,50),
(2,7,24,45,28,48,41,51),
(2,7,25,47,29,49,43,52),
(2,7,26,48,30,50,44,54),
(2,7,27,49,30,52,45,55),
(2,7,28,50,31,53,46,56),
(2,7,29,51,31,54,47,58),
(2,7,30,52,32,55,48,59),
(2,7,31,53,33,57,50,60),
(2,7,32,54,33,58,51,62),
(2,7,33,55,34,59,52,63),
(2,7,34,57,34,61,53,65),
(2,7,35,58,35,62,55,66),
(2,7,36,59,36,63,56,67),
(2,7,37,60,36,65,57,69),
(2,7,38,61,37,66,58,70),
(2,7,39,62,38,67,60,72),
(2,7,40,64,38,69,61,73),
(2,7,41,65,39,70,62,75),
(2,7,42,66,40,72,64,76),
(2,7,43,67,40,73,65,78),
(2,7,44,69,41,74,66,79),
(2,7,45,70,42,76,68,81),
(2,7,46,71,42,77,69,82),
(2,7,47,72,43,79,70,84),
(2,7,48,74,44,80,72,85),
(2,7,49,75,45,82,73,87),
(2,7,50,76,45,83,75,89),
(2,7,51,78,46,85,76,90),
(2,7,52,79,47,86,77,92),
(2,7,53,80,47,88,79,93),
(2,7,54,82,48,90,80,95),
(2,7,55,83,49,91,82,97),
(2,7,56,85,50,93,83,98),
(2,7,57,86,50,94,85,100),
(2,7,58,87,51,96,86,102),
(2,7,59,89,52,97,88,103),
(2,7,60,90,53,99,89,105),
(2,7,61,92,54,101,91,107),
(2,7,62,93,54,102,92,109),
(2,7,63,95,55,104,94,110),
(2,7,64,96,56,106,95,112),
(2,7,65,97,57,107,97,114),
(2,7,66,99,58,109,99,116),
(2,7,67,100,58,111,100,118),
(2,7,68,102,59,113,102,119),
(2,7,69,103,60,114,103,121),
(2,7,70,105,61,116,105,123),
(2,7,71,106,62,118,117,125),
(2,7,72,108,63,120,119,128),
(2,7,73,110,64,122,122,130),
(2,7,74,112,65,125,124,132),
(2,7,75,114,66,127,126,134),
(2,7,76,116,67,129,128,137),
(2,7,77,117,68,131,128,139),
(2,7,78,119,69,133,133,141),
(2,7,79,121,70,136,135,144),
(2,7,80,123,71,138,137,146),
(2,7,81,125,72,139,133,148),
(2,7,82,127,74,142,136,150),
(2,7,83,130,75,144,136,153),
(2,7,84,132,76,146,136,155),
(2,7,85,134,77,149,142,158),
(2,8,1,23,17,22,20,25),
(2,8,81,39,41,61,191,179),
(2,8,82,39,41,61,194,182),
(2,8,83,39,42,62,197,186),
(2,8,84,40,42,63,201,189),
(2,8,85,40,43,64,204,192),
(2,8,2,17,22,19,28,22),
(2,8,3,17,22,20,30,24),
(2,8,4,17,22,20,31,25),
(2,8,5,17,23,20,32,26),
(2,8,6,17,23,20,34,28),
(2,8,7,18,23,21,35,29),
(2,8,8,18,23,21,37,30),
(2,8,9,18,23,21,38,32),
(2,8,10,24,19,24,31,35),
(2,8,11,24,19,24,32,36),
(2,8,12,24,19,24,34,37),
(2,8,13,24,19,25,35,38),
(2,8,14,25,19,25,36,40),
(2,8,15,25,20,25,38,41),
(2,8,16,25,20,26,39,42),
(2,8,17,25,20,26,40,44),
(2,8,18,25,20,26,42,45),
(2,8,19,25,20,27,43,46),
(2,8,20,25,21,27,45,48),
(2,8,21,26,21,27,46,49),
(2,8,22,26,21,28,48,51),
(2,8,23,26,21,28,49,52),
(2,8,24,26,22,29,51,54),
(2,8,25,26,22,29,52,55),
(2,8,26,26,22,29,54,57),
(2,8,27,26,22,30,56,58),
(2,8,28,27,22,30,57,60),
(2,8,29,27,23,31,59,61),
(2,8,30,27,23,31,61,63),
(2,8,31,27,23,31,62,65),
(2,8,32,27,23,32,64,66),
(2,8,33,27,24,32,66,68),
(2,8,34,28,24,33,67,70),
(2,8,35,28,24,33,69,71),
(2,8,36,28,25,34,71,73),
(2,8,37,28,25,34,73,75),
(2,8,38,28,25,34,75,77),
(2,8,39,29,25,35,77,78),
(2,8,40,29,26,35,78,80),
(2,8,41,29,26,36,80,82),
(2,8,42,29,26,36,82,84),
(2,8,43,29,26,37,84,86),
(2,8,44,29,27,37,86,88),
(2,8,45,30,27,38,88,90),
(2,8,46,30,27,38,90,92),
(2,8,47,30,28,39,92,94),
(2,8,48,30,28,39,95,96),
(2,8,49,31,28,40,97,98),
(2,8,50,31,29,40,104,100),
(2,8,51,31,29,41,106,102),
(2,8,52,31,29,41,108,104),
(2,8,53,31,30,42,110,106),
(2,8,54,32,30,43,113,108),
(2,8,55,32,30,43,115,111),
(2,8,56,32,31,44,117,113),
(2,8,57,32,31,44,120,115),
(2,8,58,33,31,45,123,117),
(2,8,59,33,32,45,126,120),
(2,8,60,33,32,46,128,122),
(2,8,61,33,32,47,130,124),
(2,8,62,33,33,47,133,127),
(2,8,63,34,33,48,136,129),
(2,8,64,34,33,48,138,132),
(2,8,65,34,34,49,141,134),
(2,8,66,35,34,50,144,137),
(2,8,67,35,35,50,147,139),
(2,8,68,35,35,51,150,142),
(2,8,69,35,35,52,153,145),
(2,8,70,36,36,52,155,147),
(2,8,71,36,36,53,158,150),
(2,8,72,36,37,54,161,153),
(2,8,73,36,37,55,165,156),
(2,8,74,37,38,55,168,158),
(2,8,75,37,38,56,171,161),
(2,8,76,37,38,57,174,164),
(2,8,77,38,39,58,177,167),
(2,8,78,38,39,58,180,170),
(2,8,79,38,40,59,183,173),
(2,8,80,39,40,60,187,176),
(2,9,1,23,17,23,19,25),
(2,9,2,23,17,24,20,26),
(2,9,3,24,18,24,21,27),
(2,9,4,24,18,25,23,28),
(2,9,5,24,18,25,24,30),
(2,9,6,24,19,26,25,31),
(2,9,7,25,19,26,26,32),
(2,9,8,25,20,27,27,33),
(2,9,9,25,20,27,29,34),
(2,9,10,26,20,28,30,36),
(2,9,11,26,21,29,31,37),
(2,9,12,26,21,29,33,38),
(2,9,13,27,22,30,34,39),
(2,9,14,27,22,31,35,41),
(2,9,15,27,23,31,37,42),
(2,9,16,28,23,32,38,43),
(2,9,17,28,23,32,39,45),
(2,9,18,28,24,33,41,46),
(2,9,19,29,24,34,42,47),
(2,9,20,29,25,34,43,49),
(2,9,21,29,25,35,45,50),
(2,9,22,30,26,36,46,51),
(2,9,23,30,26,37,48,53),
(2,9,24,30,27,37,49,54),
(2,9,25,31,27,38,51,56),
(2,9,26,31,28,39,52,57),
(2,9,27,32,28,39,54,59),
(2,9,28,32,29,40,55,60),
(2,9,29,32,29,41,57,62),
(2,9,30,33,30,42,58,63),
(2,9,31,33,30,42,60,65),
(2,9,32,34,31,43,61,66),
(2,9,33,34,31,44,63,68),
(2,9,34,35,32,45,64,69),
(2,9,35,35,32,45,66,71),
(2,9,36,36,33,46,68,72),
(2,9,37,36,34,47,69,74),
(2,9,38,36,34,48,71,76),
(2,9,39,37,35,49,72,77),
(2,9,40,37,35,50,74,79),
(2,9,41,38,36,50,76,80),
(2,9,42,38,36,51,77,82),
(2,9,43,39,37,52,79,84),
(2,9,44,39,38,53,81,85),
(2,9,45,40,38,54,83,87),
(2,9,46,40,39,55,84,89),
(2,9,47,41,39,56,86,91),
(2,9,48,41,40,56,88,92),
(2,9,49,42,41,57,90,94),
(2,9,50,42,41,58,91,96),
(2,9,51,43,42,59,93,98),
(2,9,52,43,43,60,95,99),
(2,9,53,44,43,61,97,101),
(2,9,54,45,44,62,99,103),
(2,9,55,45,45,63,101,105),
(2,9,56,46,45,64,102,107),
(2,9,57,46,46,65,104,109),
(2,9,58,47,47,66,106,110),
(2,9,59,47,47,67,108,112),
(2,9,60,48,48,68,110,114),
(2,9,61,48,49,69,112,116),
(2,9,62,49,49,70,114,118),
(2,9,63,50,50,71,116,120),
(2,9,64,50,51,72,118,122),
(2,9,65,51,51,73,120,124),
(2,9,66,52,52,74,122,126),
(2,9,67,52,53,75,124,128),
(2,9,68,53,54,76,126,130),
(2,9,69,53,54,77,128,132),
(2,9,70,54,55,78,130,134),
(2,9,71,55,56,88,134,145),
(2,9,72,56,56,89,135,147),
(2,9,73,57,57,90,137,150),
(2,9,74,57,58,91,142,153),
(2,9,75,58,59,93,142,155),
(2,9,76,59,60,94,145,158),
(2,9,77,60,61,95,148,161),
(2,9,78,60,62,97,150,164),
(2,9,79,61,63,98,153,167),
(2,9,80,62,64,99,156,169),
(2,9,81,63,65,92,166,171),
(2,9,82,63,65,93,169,174),
(2,9,83,64,66,95,172,177),
(2,9,84,65,67,96,175,180),
(2,9,85,66,68,97,178,183),
(2,11,81,94,80,100,143,163),
(2,11,82,95,82,102,145,166),
(2,11,83,97,83,103,148,169),
(2,11,84,98,84,105,157,172),
(2,11,85,99,86,107,157,175),
(2,11,10,29,21,26,27,33),
(2,11,11,29,22,27,28,35),
(2,11,12,30,22,28,29,36),
(2,11,13,30,23,28,30,37),
(2,11,14,31,23,29,31,38),
(2,11,15,32,24,30,33,39),
(2,11,16,32,24,30,34,40),
(2,11,17,33,25,31,35,42),
(2,11,18,33,26,32,36,43),
(2,11,19,34,26,32,37,44),
(2,11,20,35,27,33,38,45),
(2,11,21,35,27,34,39,47),
(2,11,22,36,28,35,40,48),
(2,11,23,37,29,35,41,49),
(2,11,24,37,29,36,43,51),
(2,11,25,38,30,37,44,52),
(2,11,26,39,30,38,45,53),
(2,11,27,39,31,38,46,55),
(2,11,28,40,32,39,47,56),
(2,11,29,41,32,40,49,58),
(2,11,30,41,33,41,50,59),
(2,11,31,42,34,42,51,60),
(2,11,32,43,34,43,53,62),
(2,11,33,44,35,43,54,63),
(2,11,34,44,36,44,55,65),
(2,11,35,45,36,45,57,66),
(2,11,36,46,37,46,58,68),
(2,11,37,47,38,47,59,70),
(2,11,38,48,38,48,61,71),
(2,11,39,48,39,49,62,73),
(2,11,40,49,40,50,64,74),
(2,11,41,50,41,51,65,76),
(2,11,42,51,41,52,67,78),
(2,11,43,52,42,53,68,79),
(2,11,44,53,43,53,70,81),
(2,11,45,53,44,54,71,83),
(2,11,46,54,45,55,73,85),
(2,11,47,55,45,57,74,86),
(2,11,48,56,46,58,76,88),
(2,11,49,57,47,59,78,90),
(2,11,50,58,48,60,79,92),
(2,11,51,59,49,61,81,94),
(2,11,52,60,50,62,83,96),
(2,11,53,61,51,63,84,98),
(2,11,54,62,51,64,86,100),
(2,11,55,63,52,65,88,102),
(2,11,56,64,53,66,90,104),
(2,11,57,65,54,67,91,106),
(2,11,58,66,55,69,93,108),
(2,11,59,67,56,70,95,110),
(2,11,60,68,57,71,97,112),
(2,11,61,69,58,72,99,114),
(2,11,62,70,59,73,101,116),
(2,11,63,71,60,75,103,119),
(2,11,64,72,61,76,105,121),
(2,11,65,74,62,77,107,123),
(2,11,66,75,63,79,109,125),
(2,11,67,76,64,80,111,128),
(2,11,68,77,65,81,113,130),
(2,11,69,78,66,83,115,132),
(2,11,70,79,67,84,117,135),
(2,11,71,81,68,85,119,137),
(2,11,72,82,70,87,122,140),
(2,11,73,83,71,88,124,142),
(2,11,74,84,72,90,126,145),
(2,11,75,86,73,91,128,147),
(2,11,76,87,74,93,131,150),
(2,11,77,88,75,94,133,153),
(2,11,78,90,77,96,135,155),
(2,11,79,91,78,97,138,158),
(2,11,80,92,79,99,140,161),
(3,1,1,25,16,25,19,19),
(3,1,2,26,17,26,19,19),
(3,1,3,28,18,27,19,20),
(3,1,4,29,18,28,19,20),
(3,1,5,30,19,30,19,20),
(3,1,6,31,20,31,19,20),
(3,1,7,33,21,32,20,21),
(3,1,8,34,22,33,20,21),
(3,1,9,36,23,35,20,21),
(3,1,10,37,23,36,20,22),
(3,1,11,38,24,37,20,22),
(3,1,12,40,25,38,20,22),
(3,1,13,41,26,40,20,23),
(3,1,14,43,27,41,20,23),
(3,1,15,44,28,42,20,23),
(3,1,16,46,29,44,21,24),
(3,1,17,47,30,45,21,24),
(3,1,18,49,31,46,21,24),
(3,1,19,50,32,48,21,25),
(3,1,20,52,33,49,21,25),
(3,1,21,53,34,51,21,26),
(3,1,22,55,34,52,21,26),
(3,1,23,56,35,53,21,26),
(3,1,24,58,36,55,22,27),
(3,1,25,59,37,56,22,27),
(3,1,26,61,38,58,22,27),
(3,1,27,63,39,59,22,28),
(3,1,28,64,41,61,22,28),
(3,1,29,66,42,62,22,29),
(3,1,30,68,43,64,23,29),
(3,1,31,69,44,65,23,30),
(3,1,32,71,45,67,23,30),
(3,1,33,73,46,68,23,30),
(3,1,34,75,47,70,23,31),
(3,1,35,76,48,72,24,31),
(3,1,36,78,49,73,24,32),
(3,1,37,80,50,75,24,32),
(3,1,38,82,51,76,24,33),
(3,1,39,84,52,78,24,33),
(3,1,40,85,54,80,24,34),
(3,1,41,87,55,81,25,34),
(3,1,42,89,56,83,25,35),
(3,1,43,91,57,85,25,35),
(3,1,44,93,58,87,25,36),
(3,1,45,95,59,88,26,36),
(3,1,46,97,61,90,26,37),
(3,1,47,99,62,92,26,37),
(3,1,48,101,63,94,26,38),
(3,1,49,102,64,95,26,38),
(3,1,50,104,65,97,27,39),
(3,1,51,106,67,99,27,39),
(3,1,52,108,68,101,27,40),
(3,1,53,110,69,103,27,40),
(3,1,54,112,70,104,28,41),
(3,1,55,115,72,106,28,41),
(3,1,56,117,73,108,28,42),
(3,1,57,119,74,110,28,42),
(3,1,58,121,76,112,29,43),
(3,1,59,123,77,114,29,43),
(3,1,60,125,78,116,29,44),
(3,1,61,127,80,118,29,45),
(3,1,62,129,81,120,30,45),
(3,1,63,131,82,122,30,46),
(3,1,64,134,84,124,30,46),
(3,1,65,136,85,126,31,47),
(3,1,66,138,86,128,31,48),
(3,1,67,140,88,130,31,48),
(3,1,68,142,89,132,31,49),
(3,1,69,145,91,134,32,49),
(3,1,70,147,92,136,32,50),
(3,1,71,150,93,138,32,51),
(3,1,72,152,95,141,32,52),
(3,1,73,164,97,151,32,53),
(3,1,74,164,98,151,33,53),
(3,1,75,170,100,156,33,54),
(3,1,76,173,102,160,33,55),
(3,1,77,173,104,160,34,56),
(3,1,78,176,105,162,34,56),
(3,1,79,183,107,168,34,57),
(3,1,80,186,109,171,35,58),
(3,1,81,182,111,162,35,59),
(3,1,82,194,113,165,35,59),
(3,1,83,197,115,168,35,60),
(3,1,84,200,117,171,36,61),
(3,1,85,203,119,174,36,62),
(3,2,1,24,16,25,19,20),
(3,2,2,25,17,26,20,21),
(3,2,3,26,17,27,20,21),
(3,2,4,27,18,28,21,22),
(3,2,5,28,18,29,22,23),
(3,2,6,29,19,30,22,24),
(3,2,7,31,20,31,23,24),
(3,2,8,32,20,32,24,25),
(3,2,9,33,21,33,24,26),
(3,2,10,34,21,34,25,26),
(3,2,11,35,22,36,26,27),
(3,2,12,36,23,37,26,28),
(3,2,13,38,23,38,27,29),
(3,2,14,39,24,39,28,30),
(3,2,15,40,25,40,29,30),
(3,2,16,41,25,41,29,31),
(3,2,17,43,26,43,30,32),
(3,2,18,44,27,44,31,33),
(3,2,19,45,28,45,32,34),
(3,2,20,47,28,46,32,35),
(3,2,21,48,29,47,33,35),
(3,2,22,49,30,49,34,36),
(3,2,23,51,30,50,35,37),
(3,2,24,52,31,51,36,38),
(3,2,25,53,32,52,36,39),
(3,2,26,55,33,54,37,40),
(3,2,27,56,33,55,38,41),
(3,2,28,57,34,56,39,42),
(3,2,29,59,35,58,40,43),
(3,2,30,60,36,59,41,43),
(3,2,31,62,37,60,42,44),
(3,2,32,63,37,62,42,45),
(3,2,33,65,38,63,43,46),
(3,2,34,66,39,65,44,47),
(3,2,35,68,40,66,45,48),
(3,2,36,69,41,67,46,49),
(3,2,37,71,41,69,47,50),
(3,2,38,72,42,70,48,51),
(3,2,39,74,43,72,49,52),
(3,2,40,75,44,73,50,53),
(3,2,41,77,45,75,51,54),
(3,2,42,78,46,76,52,55),
(3,2,43,80,47,78,53,56),
(3,2,44,82,47,79,54,57),
(3,2,45,83,48,81,55,59),
(3,2,46,85,49,82,56,60),
(3,2,47,87,50,84,57,61),
(3,2,48,88,51,85,58,62),
(3,2,49,90,52,87,59,63),
(3,2,50,92,53,89,60,64),
(3,2,51,93,54,90,61,65),
(3,2,52,95,55,92,62,66),
(3,2,53,97,56,93,63,67),
(3,2,54,98,57,95,64,69),
(3,2,55,100,58,97,65,70),
(3,2,56,102,59,98,66,71),
(3,2,57,104,60,100,67,72),
(3,2,58,106,61,102,68,73),
(3,2,59,107,62,103,69,74),
(3,2,60,109,63,105,70,76),
(3,2,61,111,64,107,72,77),
(3,2,62,113,65,109,73,78),
(3,2,63,115,66,110,74,79),
(3,2,64,117,67,112,75,80),
(3,2,65,118,68,114,76,82),
(3,2,66,120,69,116,77,83),
(3,2,67,122,70,118,78,84),
(3,2,68,124,71,119,80,85),
(3,2,69,126,72,121,81,87),
(3,2,70,128,73,123,82,88),
(3,2,71,150,74,125,83,89),
(3,2,72,152,75,128,85,91),
(3,2,73,156,76,130,86,93),
(3,2,74,158,78,132,88,94),
(3,2,75,161,79,134,89,96),
(3,2,76,164,80,137,91,97),
(3,2,77,166,82,139,92,99),
(3,2,78,170,83,141,94,101),
(3,2,79,172,84,144,95,102),
(3,2,80,175,86,146,97,104),
(3,2,81,165,87,147,98,106),
(3,2,82,168,89,149,100,107),
(3,2,83,171,90,152,101,109),
(3,2,84,175,92,154,103,111),
(3,2,85,177,93,157,105,113),
(3,3,1,22,19,24,19,20),
(3,3,2,22,20,25,20,21),
(3,3,3,23,22,26,20,21),
(3,3,4,23,23,27,21,22),
(3,3,5,24,25,28,21,23),
(3,3,6,24,26,29,22,23),
(3,3,7,25,27,29,23,24),
(3,3,8,25,29,30,23,25),
(3,3,9,25,30,31,24,25),
(3,3,10,26,32,32,24,26),
(3,3,11,26,33,33,25,27),
(3,3,12,27,35,34,26,27),
(3,3,13,27,36,35,26,28),
(3,3,14,28,38,36,27,29),
(3,3,15,28,39,37,28,29),
(3,3,16,29,41,38,28,30),
(3,3,17,29,42,39,29,31),
(3,3,18,30,44,41,30,32),
(3,3,19,30,46,42,30,32),
(3,3,20,31,47,43,31,33),
(3,3,21,32,49,44,32,34),
(3,3,22,32,51,45,33,35),
(3,3,23,33,52,46,33,36),
(3,3,24,33,54,47,34,36),
(3,3,25,34,56,48,35,37),
(3,3,26,34,57,49,35,38),
(3,3,27,35,59,51,36,39),
(3,3,28,35,61,52,37,40),
(3,3,29,36,63,53,38,40),
(3,3,30,37,64,54,39,41),
(3,3,31,37,66,55,39,42),
(3,3,32,38,68,57,40,43),
(3,3,33,38,70,58,41,44),
(3,3,34,39,71,59,42,45),
(3,3,35,40,73,60,43,46),
(3,3,36,40,75,62,43,47),
(3,3,37,41,77,63,44,47),
(3,3,38,42,79,64,45,48),
(3,3,39,42,81,65,46,49),
(3,3,40,43,83,67,47,50),
(3,3,41,44,85,68,48,51),
(3,3,42,44,87,69,49,52),
(3,3,43,45,89,71,49,53),
(3,3,44,46,91,72,50,54),
(3,3,45,46,93,73,51,55),
(3,3,46,47,95,75,52,56),
(3,3,47,48,97,76,53,57),
(3,3,48,49,99,78,54,58),
(3,3,49,49,101,79,55,59),
(3,3,50,50,103,80,56,60),
(3,3,51,51,105,82,57,61),
(3,3,52,51,107,83,58,62),
(3,3,53,52,109,85,59,63),
(3,3,54,53,111,86,60,64),
(3,3,55,54,113,88,61,65),
(3,3,56,55,115,89,62,66),
(3,3,57,55,118,91,62,67),
(3,3,58,56,120,92,63,68),
(3,3,59,57,122,94,64,70),
(3,3,60,58,124,95,65,71),
(3,3,61,58,126,97,67,72),
(3,3,62,59,129,98,68,73),
(3,3,63,60,131,100,69,74),
(3,3,64,61,133,101,70,75),
(3,3,65,62,135,103,71,76),
(3,3,66,63,138,105,72,77),
(3,3,67,63,140,106,73,78),
(3,3,68,64,142,108,74,80),
(3,3,69,65,145,109,75,81),
(3,3,70,66,147,111,76,82),
(3,3,71,67,150,113,77,83),
(3,3,72,68,153,115,78,84),
(3,3,73,69,156,117,79,86),
(3,3,74,70,159,119,81,87),
(3,3,75,71,162,121,82,89),
(3,3,76,72,165,123,83,90),
(3,3,77,73,168,125,85,92),
(3,3,78,74,171,127,86,93),
(3,3,79,75,174,129,87,95),
(3,3,80,76,177,131,89,96),
(3,3,81,80,190,131,90,98),
(3,3,82,82,193,134,92,99),
(3,3,83,83,196,136,93,101),
(3,3,84,84,200,138,95,102),
(3,3,85,85,204,140,96,104),
(3,4,1,23,19,24,19,19),
(3,4,2,24,20,25,19,19),
(3,4,3,24,22,25,19,20),
(3,4,4,25,23,26,19,20),
(3,4,5,26,25,27,20,20),
(3,4,6,27,26,27,20,21),
(3,4,7,28,28,28,20,21),
(3,4,8,28,29,29,20,22),
(3,4,9,29,31,30,20,22),
(3,4,10,30,32,30,20,22),
(3,4,11,31,34,31,21,23),
(3,4,12,32,36,32,21,23),
(3,4,13,33,37,33,21,24),
(3,4,14,33,39,33,21,24),
(3,4,15,34,40,34,21,25),
(3,4,16,35,42,35,22,25),
(3,4,17,36,44,36,22,25),
(3,4,18,37,45,37,22,26),
(3,4,19,38,47,38,22,26),
(3,4,20,39,49,38,22,27),
(3,4,21,40,51,39,23,27),
(3,4,22,41,52,40,23,28),
(3,4,23,42,54,41,23,28),
(3,4,24,43,56,42,23,29),
(3,4,25,44,58,43,24,29),
(3,4,26,44,59,44,24,30),
(3,4,27,45,61,44,24,30),
(3,4,28,46,63,45,24,31),
(3,4,29,47,65,46,25,31),
(3,4,30,48,67,47,25,32),
(3,4,31,49,69,48,25,32),
(3,4,32,51,71,49,25,33),
(3,4,33,52,72,50,26,33),
(3,4,34,53,74,51,26,34),
(3,4,35,54,76,52,26,34),
(3,4,36,55,78,53,26,35),
(3,4,37,56,80,54,27,35),
(3,4,38,57,82,55,27,36),
(3,4,39,58,84,56,27,37),
(3,4,40,59,86,57,28,37),
(3,4,41,60,88,58,28,38),
(3,4,42,61,90,59,28,38),
(3,4,43,63,92,60,28,39),
(3,4,44,64,95,61,29,39),
(3,4,45,65,97,62,29,40),
(3,4,46,66,99,63,29,41),
(3,4,47,67,101,64,30,41),
(3,4,48,68,103,66,30,42),
(3,4,49,70,105,67,30,43),
(3,4,50,71,107,68,31,43),
(3,4,51,72,110,69,31,44),
(3,4,52,73,112,70,31,44),
(3,4,53,74,114,71,32,45),
(3,4,54,76,116,72,32,46),
(3,4,55,77,118,73,32,46),
(3,4,56,78,121,75,33,47),
(3,4,57,80,123,76,33,48),
(3,4,58,81,125,77,33,48),
(3,4,59,82,128,78,34,49),
(3,4,60,83,130,79,34,50),
(3,4,61,85,132,81,34,51),
(3,4,62,86,135,82,35,51),
(3,4,63,87,137,83,35,52),
(3,4,64,89,139,84,36,53),
(3,4,65,90,142,86,36,53),
(3,4,66,91,144,87,36,54),
(3,4,67,93,147,88,37,55),
(3,4,68,94,149,89,37,56),
(3,4,69,96,152,91,38,56),
(3,4,70,97,154,92,38,57),
(3,4,71,99,157,93,38,58),
(3,4,72,101,160,96,39,58),
(3,4,73,102,163,97,39,59),
(3,4,74,104,166,98,40,60),
(3,4,75,106,169,100,40,61),
(3,4,76,107,172,101,40,62),
(3,4,77,109,175,103,41,63),
(3,4,78,111,179,105,41,64),
(3,4,79,113,182,106,42,65),
(3,4,80,115,185,108,42,66),
(3,4,81,119,198,108,43,67),
(3,4,82,121,201,109,43,67),
(3,4,83,123,205,111,44,68),
(3,4,84,125,209,113,44,69),
(3,4,85,127,212,115,45,70),
(3,5,1,22,16,23,21,22),
(3,5,2,22,16,23,22,23),
(3,5,3,22,16,24,24,25),
(3,5,4,22,17,24,25,26),
(3,5,5,23,17,24,26,27),
(3,5,6,23,17,25,28,29),
(3,5,7,23,17,25,29,30),
(3,5,8,23,18,26,30,32),
(3,5,9,23,18,26,32,33),
(3,5,10,23,18,26,33,35),
(3,5,11,24,18,27,35,36),
(3,5,12,24,19,27,36,38),
(3,5,13,24,19,28,37,39),
(3,5,14,24,19,28,39,41),
(3,5,15,24,19,28,40,42),
(3,5,16,24,20,29,42,44),
(3,5,17,25,20,29,43,45),
(3,5,18,25,20,30,45,47),
(3,5,19,25,21,30,46,49),
(3,5,20,25,21,31,48,50),
(3,5,21,25,21,31,50,52),
(3,5,22,26,22,31,51,53),
(3,5,23,26,22,32,53,55),
(3,5,24,26,22,32,54,57),
(3,5,25,26,22,33,56,58),
(3,5,26,27,23,33,58,60),
(3,5,27,27,23,34,59,62),
(3,5,28,27,23,34,61,64),
(3,5,29,27,24,35,63,65),
(3,5,30,28,24,35,64,67),
(3,5,31,28,24,36,66,69),
(3,5,32,28,25,36,68,71),
(3,5,33,28,25,37,70,72),
(3,5,34,29,26,38,71,74),
(3,5,35,29,26,38,73,76),
(3,5,36,29,26,39,75,78),
(3,5,37,29,27,39,77,80),
(3,5,38,30,27,40,78,82),
(3,5,39,30,27,40,80,84),
(3,5,40,30,28,41,82,86),
(3,5,41,31,28,41,84,88),
(3,5,42,31,29,42,86,89),
(3,5,43,31,29,43,88,91),
(3,5,44,32,29,43,90,93),
(3,5,45,32,30,44,92,95),
(3,5,46,32,30,44,93,97),
(3,5,47,32,30,45,95,99),
(3,5,48,33,31,46,97,101),
(3,5,49,33,31,46,99,103),
(3,5,50,33,32,47,101,106),
(3,5,51,34,32,48,103,108),
(3,5,52,34,33,48,105,110),
(3,5,53,35,33,49,107,112),
(3,5,54,35,33,50,109,114),
(3,5,55,35,34,50,111,116),
(3,5,56,36,34,51,113,118),
(3,5,57,36,35,52,116,120),
(3,5,58,36,35,52,118,123),
(3,5,59,37,36,53,120,125),
(3,5,60,37,36,54,122,127),
(3,5,61,37,37,54,124,129),
(3,5,62,38,37,55,126,131),
(3,5,63,38,38,56,128,134),
(3,5,64,39,38,57,131,136),
(3,5,65,39,39,57,133,138),
(3,5,66,39,39,58,135,141),
(3,5,67,40,40,59,137,143),
(3,5,68,40,40,59,139,145),
(3,5,69,41,40,60,142,148),
(3,5,70,41,41,61,144,150),
(3,5,71,41,42,62,147,153),
(3,5,72,42,42,62,150,163),
(3,5,73,42,43,63,153,166),
(3,5,74,43,43,64,155,170),
(3,5,75,43,44,65,158,173),
(3,5,76,43,45,66,161,176),
(3,5,77,44,45,67,164,179),
(3,5,78,44,46,68,167,182),
(3,5,79,45,46,69,170,184),
(3,5,80,45,47,70,173,189),
(3,5,81,49,48,69,184,184),
(3,5,82,49,48,69,188,187),
(3,5,83,50,49,70,192,190),
(3,5,84,50,50,71,195,194),
(3,5,85,51,50,72,198,197),
(3,6,1,25,16,25,19,19),
(3,6,2,26,17,26,19,19),
(3,6,3,28,18,27,19,20),
(3,6,4,29,18,28,19,20),
(3,6,5,30,19,30,19,20),
(3,6,6,31,20,31,19,20),
(3,6,7,33,21,32,20,21),
(3,6,8,34,22,33,20,21),
(3,6,9,36,23,35,20,21),
(3,6,10,37,23,36,20,22),
(3,6,11,38,24,37,20,22),
(3,6,12,40,25,38,20,22),
(3,6,13,41,26,40,20,23),
(3,6,14,43,27,41,20,23),
(3,6,15,44,28,42,20,23),
(3,6,16,46,29,44,21,24),
(3,6,17,47,30,45,21,24),
(3,6,18,49,31,46,21,24),
(3,6,19,50,32,48,21,25),
(3,6,20,52,33,49,21,25),
(3,6,21,53,34,51,21,26),
(3,6,22,55,34,52,21,26),
(3,6,23,56,35,53,21,26),
(3,6,24,58,36,55,22,27),
(3,6,25,59,37,56,22,27),
(3,6,26,61,38,58,22,27),
(3,6,27,63,39,59,22,28),
(3,6,28,64,41,61,22,28),
(3,6,29,66,42,62,22,29),
(3,6,30,68,43,64,23,29),
(3,6,31,69,44,65,23,30),
(3,6,32,71,45,67,23,30),
(3,6,33,73,46,68,23,30),
(3,6,34,75,47,70,23,31),
(3,6,35,76,48,72,24,31),
(3,6,36,78,49,73,24,32),
(3,6,37,80,50,75,24,32),
(3,6,38,82,51,76,24,33),
(3,6,39,84,52,78,24,33),
(3,6,40,85,54,80,24,34),
(3,6,41,87,55,81,25,34),
(3,6,42,89,56,83,25,35),
(3,6,43,91,57,85,25,35),
(3,6,44,93,58,87,25,36),
(3,6,45,95,59,88,26,36),
(3,6,46,97,61,90,26,37),
(3,6,47,99,62,92,26,37),
(3,6,48,101,63,94,26,38),
(3,6,49,102,64,95,26,38),
(3,6,50,104,65,97,27,39),
(3,6,51,106,67,99,27,39),
(3,6,52,108,68,99,27,40),
(3,6,53,109,68,101,27,40),
(3,6,54,110,69,101,28,41),
(3,6,55,110,69,102,28,41),
(3,6,56,113,71,105,28,42),
(3,6,57,118,72,107,28,42),
(3,6,58,120,73,109,29,43),
(3,6,59,123,75,111,29,43),
(3,6,60,125,76,113,29,44),
(3,6,61,126,77,115,29,45),
(3,6,62,127,79,117,29,45),
(3,6,63,129,80,120,30,46),
(3,6,64,132,82,122,30,46),
(3,6,65,135,83,124,30,47),
(3,6,66,137,85,127,30,48),
(3,6,67,144,86,129,31,48),
(3,6,68,146,88,131,31,49),
(3,6,69,149,89,133,31,50),
(3,6,70,152,91,136,31,50),
(3,6,71,154,93,139,32,51),
(3,6,72,157,94,141,32,52),
(3,6,73,160,96,144,32,53),
(3,6,74,163,98,146,32,53),
(3,6,75,166,99,150,33,54),
(3,6,76,169,101,152,33,55),
(3,6,77,172,103,155,33,56),
(3,6,78,176,104,157,33,56),
(3,6,79,179,106,160,34,57),
(3,6,80,182,108,163,34,58),
(3,6,81,183,110,164,34,59),
(3,6,82,183,112,166,35,59),
(3,6,83,190,114,169,35,60),
(3,6,84,190,116,172,35,61),
(3,6,85,196,117,175,35,62),
(3,7,1,22,16,23,22,21),
(3,7,81,127,71,139,135,145),
(3,7,82,129,73,142,138,147),
(3,7,83,132,74,144,138,150),
(3,7,84,134,75,146,138,152),
(3,7,85,136,76,149,144,155),
(3,7,2,20,20,20,23,24),
(3,7,3,20,20,21,25,26),
(3,7,4,20,21,21,26,27),
(3,7,5,21,21,21,27,28),
(3,7,6,21,21,22,29,30),
(3,7,7,21,21,22,30,31),
(3,7,8,21,22,23,31,33),
(3,7,9,21,22,23,33,34),
(3,7,10,33,20,30,27,29),
(3,7,11,34,20,31,28,30),
(3,7,12,35,21,32,29,31),
(3,7,13,35,21,33,30,32),
(3,7,14,36,22,34,31,33),
(3,7,15,37,22,35,32,35),
(3,7,16,38,23,36,33,36),
(3,7,17,39,23,37,34,37),
(3,7,18,40,24,38,35,38),
(3,7,19,41,24,39,36,39),
(3,7,20,42,25,40,37,40),
(3,7,21,43,25,41,38,41),
(3,7,22,43,26,42,39,42),
(3,7,23,44,26,43,40,43),
(3,7,24,45,27,44,41,45),
(3,7,25,46,27,46,42,46),
(3,7,26,47,28,47,43,47),
(3,7,27,48,28,48,44,48),
(3,7,28,49,29,49,45,49),
(3,7,29,50,29,50,46,51),
(3,7,30,51,30,51,47,52),
(3,7,31,53,30,53,49,53),
(3,7,32,54,31,54,50,55),
(3,7,33,55,32,55,51,56),
(3,7,34,56,32,56,52,57),
(3,7,35,57,33,58,53,59),
(3,7,36,58,34,59,55,60),
(3,7,37,59,34,60,56,61),
(3,7,38,60,35,62,57,63),
(3,7,39,61,35,63,58,64),
(3,7,40,63,36,64,60,66),
(3,7,41,64,37,66,61,67),
(3,7,42,65,37,67,62,69),
(3,7,43,66,38,69,63,70),
(3,7,44,68,39,70,65,72),
(3,7,45,69,39,72,66,73),
(3,7,46,70,40,73,68,75),
(3,7,47,71,41,75,69,76),
(3,7,48,73,42,76,70,78),
(3,7,49,74,42,78,72,80),
(3,7,50,75,43,79,73,81),
(3,7,51,77,44,81,75,83),
(3,7,52,78,45,82,76,85),
(3,7,53,80,45,84,78,86),
(3,7,54,81,46,86,79,88),
(3,7,55,82,47,87,81,90),
(3,7,56,84,48,89,82,92),
(3,7,57,85,49,91,84,93),
(3,7,58,87,49,92,86,95),
(3,7,59,88,50,94,87,97),
(3,7,60,90,51,96,89,99),
(3,7,61,92,52,98,91,101),
(3,7,62,93,53,100,92,103),
(3,7,63,95,54,101,94,105),
(3,7,64,96,54,103,96,107),
(3,7,65,98,55,105,98,109),
(3,7,66,100,56,107,99,111),
(3,7,67,101,57,109,101,113),
(3,7,68,103,58,111,103,115),
(3,7,69,105,59,113,105,117),
(3,7,70,107,60,115,107,119),
(3,7,71,108,61,117,109,121),
(3,7,72,110,62,119,111,124),
(3,7,73,112,63,121,113,126),
(3,7,74,114,64,124,115,128),
(3,7,75,116,65,126,117,130),
(3,7,76,118,66,128,119,133),
(3,7,77,119,67,130,121,135),
(3,7,78,121,68,132,123,137),
(3,7,79,123,69,135,125,140),
(3,7,80,125,70,137,127,142),
(3,8,1,22,16,23,22,21),
(3,8,81,41,40,61,193,176),
(3,8,82,41,40,61,196,179),
(3,8,83,41,41,62,199,183),
(3,8,84,42,41,63,203,186),
(3,8,85,42,42,64,206,189),
(3,8,2,20,20,20,24,23),
(3,8,3,20,20,21,26,25),
(3,8,4,20,20,21,27,26),
(3,8,5,20,21,21,28,27),
(3,8,6,20,21,21,30,29),
(3,8,7,21,21,22,31,30),
(3,8,8,21,21,22,33,31),
(3,8,9,21,21,22,34,33),
(3,8,10,26,18,24,33,32),
(3,8,11,26,18,24,34,33),
(3,8,12,26,18,24,36,34),
(3,8,13,26,18,25,37,35),
(3,8,14,27,18,25,38,37),
(3,8,15,27,19,25,40,38),
(3,8,16,27,19,26,41,39),
(3,8,17,27,19,26,42,41),
(3,8,18,27,19,26,44,42),
(3,8,19,27,19,27,45,43),
(3,8,20,27,20,27,47,45),
(3,8,21,28,20,27,48,46),
(3,8,22,28,20,28,50,48),
(3,8,23,28,20,28,51,49),
(3,8,24,28,21,29,53,51),
(3,8,25,28,21,29,54,52),
(3,8,26,28,21,29,56,54),
(3,8,27,28,21,30,58,55),
(3,8,28,29,21,30,59,57),
(3,8,29,29,22,31,61,58),
(3,8,30,29,22,31,63,60),
(3,8,31,29,22,31,64,62),
(3,8,32,29,22,32,66,63),
(3,8,33,29,23,32,68,65),
(3,8,34,30,23,33,69,67),
(3,8,35,30,23,33,71,68),
(3,8,36,30,24,34,73,70),
(3,8,37,30,24,34,75,72),
(3,8,38,30,24,34,77,74),
(3,8,39,31,24,35,79,75),
(3,8,40,31,25,35,80,77),
(3,8,41,31,25,36,82,79),
(3,8,42,31,25,36,84,81),
(3,8,43,31,25,37,86,83),
(3,8,44,31,26,37,88,85),
(3,8,45,32,26,38,90,87),
(3,8,46,32,26,38,92,89),
(3,8,47,32,27,39,94,91),
(3,8,48,32,27,39,97,93),
(3,8,49,33,27,40,99,95),
(3,8,50,33,28,40,106,97),
(3,8,51,33,28,41,108,99),
(3,8,52,33,28,41,110,101),
(3,8,53,33,29,42,112,103),
(3,8,54,34,29,43,115,105),
(3,8,55,34,29,43,117,108),
(3,8,56,34,30,44,119,110),
(3,8,57,34,30,44,122,112),
(3,8,58,35,30,45,125,114),
(3,8,59,35,31,45,128,117),
(3,8,60,35,31,46,130,119),
(3,8,61,35,31,47,132,121),
(3,8,62,35,32,47,135,124),
(3,8,63,36,32,48,138,126),
(3,8,64,36,32,48,140,129),
(3,8,65,36,33,49,143,131),
(3,8,66,37,33,50,146,134),
(3,8,67,37,34,50,149,136),
(3,8,68,37,34,51,152,139),
(3,8,69,37,34,52,155,142),
(3,8,70,38,35,52,157,144),
(3,8,71,38,35,53,160,147),
(3,8,72,38,36,54,163,150),
(3,8,73,38,36,55,167,153),
(3,8,74,39,37,55,170,155),
(3,8,75,39,37,56,173,158),
(3,8,76,39,37,57,176,161),
(3,8,77,40,38,58,179,164),
(3,8,78,40,38,58,182,167),
(3,8,79,40,39,59,185,170),
(3,8,80,41,39,60,189,173),
(3,9,1,22,16,24,21,21),
(3,9,81,65,64,92,168,168),
(3,9,82,65,64,93,171,171),
(3,9,83,66,65,95,174,174),
(3,9,84,67,66,96,177,177),
(3,9,85,68,67,97,180,180),
(3,9,2,19,18,23,21,28),
(3,9,3,20,19,23,22,29),
(3,9,4,20,19,24,24,30),
(3,9,5,20,19,24,25,32),
(3,9,6,20,20,25,26,33),
(3,9,7,21,20,25,27,34),
(3,9,8,21,21,26,28,35),
(3,9,9,21,21,26,30,36),
(3,9,10,28,19,27,30,31),
(3,9,11,28,20,27,32,32),
(3,9,12,28,20,28,33,33),
(3,9,13,29,20,28,34,35),
(3,9,14,29,21,29,35,36),
(3,9,15,29,21,30,36,37),
(3,9,16,30,22,30,37,38),
(3,9,17,30,22,31,39,40),
(3,9,18,30,22,31,40,41),
(3,9,19,31,23,32,41,42),
(3,9,20,31,23,33,42,44),
(3,9,21,31,24,33,44,45),
(3,9,22,32,24,34,45,46),
(3,9,23,32,25,35,46,48),
(3,9,24,33,25,35,48,49),
(3,9,25,33,26,36,49,51),
(3,9,26,33,26,37,50,52),
(3,9,27,34,26,37,52,53),
(3,9,28,34,27,38,53,55),
(3,9,29,35,27,39,55,56),
(3,9,30,35,28,39,56,58),
(3,9,31,35,28,40,57,60),
(3,9,32,36,29,41,59,61),
(3,9,33,36,29,42,60,63),
(3,9,34,37,30,42,62,64),
(3,9,35,37,30,43,63,66),
(3,9,36,38,31,44,65,68),
(3,9,37,38,32,45,67,69),
(3,9,38,38,32,46,68,71),
(3,9,39,39,33,46,70,73),
(3,9,40,39,33,47,71,74),
(3,9,41,40,34,48,73,76),
(3,9,42,40,34,49,75,78),
(3,9,43,41,35,50,76,80),
(3,9,44,41,35,51,78,81),
(3,9,45,42,36,51,80,83),
(3,9,46,42,37,52,82,85),
(3,9,47,43,37,53,83,87),
(3,9,48,43,38,54,85,89),
(3,9,49,44,39,55,87,91),
(3,9,50,44,39,56,93,93),
(3,9,51,45,40,57,95,95),
(3,9,52,45,40,58,97,97),
(3,9,53,46,41,59,99,99),
(3,9,54,47,42,60,101,101),
(3,9,55,47,42,61,104,103),
(3,9,56,48,43,62,106,105),
(3,9,57,48,44,63,108,107),
(3,9,58,49,45,64,110,110),
(3,9,59,49,45,65,112,112),
(3,9,60,50,46,66,114,114),
(3,9,61,51,47,67,116,116),
(3,9,62,51,47,68,118,119),
(3,9,63,52,48,69,121,121),
(3,9,64,52,49,70,123,123),
(3,9,65,53,50,72,126,126),
(3,9,66,54,51,73,128,128),
(3,9,67,54,51,74,131,131),
(3,9,68,55,52,75,133,133),
(3,9,69,56,53,76,135,135),
(3,9,70,56,54,77,138,138),
(3,9,71,57,55,79,140,141),
(3,9,72,58,55,80,143,143),
(3,9,73,59,56,81,146,146),
(3,9,74,59,57,82,149,149),
(3,9,75,60,58,84,151,151),
(3,9,76,61,59,85,154,154),
(3,9,77,62,60,86,157,157),
(3,9,78,62,61,88,159,160),
(3,9,79,63,62,89,162,163),
(3,9,80,64,63,90,165,165),
(3,11,81,96,79,100,145,160),
(3,11,82,97,81,102,147,163),
(3,11,83,99,82,103,150,166),
(3,11,84,100,83,105,159,169),
(3,11,85,101,85,107,159,172),
(3,11,10,31,20,26,29,30),
(3,11,11,31,21,27,30,32),
(3,11,12,32,21,28,31,33),
(3,11,13,32,22,28,32,34),
(3,11,14,33,22,29,33,35),
(3,11,15,34,23,30,35,36),
(3,11,16,34,23,30,36,37),
(3,11,17,35,24,31,37,39),
(3,11,18,35,25,32,38,40),
(3,11,19,36,25,32,39,41),
(3,11,20,37,26,33,40,42),
(3,11,21,37,26,34,41,44),
(3,11,22,38,27,35,42,45),
(3,11,23,39,28,35,43,46),
(3,11,24,39,28,36,45,48),
(3,11,25,40,29,37,46,49),
(3,11,26,41,29,38,47,50),
(3,11,27,41,30,38,48,52),
(3,11,28,42,31,39,49,53),
(3,11,29,43,31,40,51,55),
(3,11,30,43,32,41,52,56),
(3,11,31,44,33,42,53,57),
(3,11,32,45,33,43,55,59),
(3,11,33,46,34,43,56,60),
(3,11,34,46,35,44,57,62),
(3,11,35,47,35,45,59,63),
(3,11,36,48,36,46,60,65),
(3,11,37,49,37,47,61,67),
(3,11,38,50,37,48,63,68),
(3,11,39,50,38,49,64,70),
(3,11,40,51,39,50,66,71),
(3,11,41,52,40,51,67,73),
(3,11,42,53,40,52,69,75),
(3,11,43,54,41,53,70,76),
(3,11,44,55,42,53,72,78),
(3,11,45,55,43,54,73,80),
(3,11,46,56,44,55,75,82),
(3,11,47,57,44,57,76,83),
(3,11,48,58,45,58,78,85),
(3,11,49,59,46,59,80,87),
(3,11,50,60,47,60,81,89),
(3,11,51,61,48,61,83,91),
(3,11,52,62,49,62,85,93),
(3,11,53,63,50,63,86,95),
(3,11,54,64,50,64,88,97),
(3,11,55,65,51,65,90,99),
(3,11,56,66,52,66,92,101),
(3,11,57,67,53,67,93,103),
(3,11,58,68,54,69,95,105),
(3,11,59,69,55,70,97,107),
(3,11,60,70,56,71,99,109),
(3,11,61,71,57,72,101,111),
(3,11,62,72,58,73,103,113),
(3,11,63,73,59,75,105,116),
(3,11,64,74,60,76,107,118),
(3,11,65,76,61,77,109,120),
(3,11,66,77,62,79,111,122),
(3,11,67,78,63,80,113,125),
(3,11,68,79,64,81,115,127),
(3,11,69,80,65,83,117,129),
(3,11,70,81,66,84,119,132),
(3,11,71,83,67,85,121,134),
(3,11,72,84,69,87,124,137),
(3,11,73,85,70,88,126,139),
(3,11,74,86,71,90,128,142),
(3,11,75,88,72,91,130,144),
(3,11,76,89,73,93,133,147),
(3,11,77,90,74,94,135,150),
(3,11,78,92,76,96,137,152),
(3,11,79,93,77,97,140,155),
(3,11,80,94,78,99,142,158),
(4,1,1,20,25,21,20,20),
(4,1,2,21,26,22,20,20),
(4,1,3,23,27,23,20,21),
(4,1,4,24,27,25,20,21),
(4,1,5,25,28,26,20,21),
(4,1,6,27,29,27,20,21),
(4,1,7,28,30,28,21,22),
(4,1,8,29,31,29,21,22),
(4,1,9,31,31,31,21,22),
(4,1,10,32,32,32,21,23),
(4,1,11,33,33,33,21,23),
(4,1,12,35,34,34,21,23),
(4,1,13,36,35,36,21,24),
(4,1,14,38,36,37,21,24),
(4,1,15,39,37,38,21,24),
(4,1,16,41,37,40,21,25),
(4,1,17,42,38,41,22,25),
(4,1,18,44,39,43,22,25),
(4,1,19,45,40,44,22,26),
(4,1,20,47,41,45,22,26),
(4,1,21,48,42,47,22,26),
(4,1,22,50,43,48,22,27),
(4,1,23,52,44,50,22,27),
(4,1,24,53,45,51,23,28),
(4,1,25,55,46,52,23,28),
(4,1,26,56,47,54,23,28),
(4,1,27,58,48,55,23,29),
(4,1,28,60,49,57,23,29),
(4,1,29,61,50,58,23,30),
(4,1,30,63,51,60,24,30),
(4,1,31,65,52,62,24,30),
(4,1,32,66,53,63,24,31),
(4,1,33,68,54,65,24,31),
(4,1,34,70,55,66,24,32),
(4,1,35,72,56,68,24,32),
(4,1,36,73,58,69,25,33),
(4,1,37,75,59,71,25,33),
(4,1,38,77,60,73,25,34),
(4,1,39,79,61,74,25,34),
(4,1,40,81,62,76,25,35),
(4,1,41,82,63,78,26,35),
(4,1,42,84,64,79,26,35),
(4,1,43,86,66,81,26,36),
(4,1,44,88,67,83,26,36),
(4,1,45,90,68,85,26,37),
(4,1,46,92,69,86,27,37),
(4,1,47,94,70,88,27,38),
(4,1,48,96,72,90,27,38),
(4,1,49,98,73,92,27,39),
(4,1,50,100,74,93,28,40),
(4,1,51,102,75,95,28,40),
(4,1,52,104,77,97,28,41),
(4,1,53,106,78,99,28,41),
(4,1,54,108,79,101,29,42),
(4,1,55,110,80,103,29,42),
(4,1,56,112,82,104,29,43),
(4,1,57,114,83,106,29,43),
(4,1,58,116,84,108,30,44),
(4,1,59,118,86,110,30,44),
(4,1,60,120,87,112,30,45),
(4,1,61,122,88,114,30,46),
(4,1,62,124,90,116,31,46),
(4,1,63,127,91,118,31,47),
(4,1,64,129,92,120,31,47),
(4,1,65,131,94,122,32,48),
(4,1,66,133,95,124,32,49),
(4,1,67,135,97,126,32,49),
(4,1,68,138,98,128,32,50),
(4,1,69,140,100,130,33,50),
(4,1,70,142,101,132,33,51),
(4,1,71,145,102,134,33,52),
(4,1,72,147,104,137,33,53),
(4,1,73,150,106,139,33,54),
(4,1,74,153,107,142,34,54),
(4,1,75,156,109,144,34,55),
(4,1,76,159,111,148,34,56),
(4,1,77,162,113,150,35,57),
(4,1,78,165,114,152,35,57),
(4,1,79,178,116,164,35,58),
(4,1,80,181,118,167,36,59),
(4,1,81,173,119,161,36,60),
(4,1,82,185,121,164,36,60),
(4,1,83,188,123,167,36,61),
(4,1,84,191,125,170,37,62),
(4,1,85,194,127,173,37,63),
(4,2,81,156,95,146,99,107),
(4,2,82,159,97,148,101,108),
(4,2,83,162,98,151,102,110),
(4,2,84,166,100,153,104,112),
(4,2,85,168,101,156,106,114),
(4,2,10,27,29,30,25,27),
(4,2,11,28,29,31,26,28),
(4,2,12,29,30,32,27,28),
(4,2,13,30,31,33,27,29),
(4,2,14,31,31,34,28,30),
(4,2,15,32,32,36,29,30),
(4,2,16,34,32,37,29,31),
(4,2,17,35,33,38,30,32),
(4,2,18,36,34,39,31,33),
(4,2,19,37,34,40,31,33),
(4,2,20,38,35,41,32,34),
(4,2,21,39,36,42,33,35),
(4,2,22,41,36,43,34,36),
(4,2,23,42,37,44,34,37),
(4,2,24,43,38,46,35,37),
(4,2,25,44,38,47,36,38),
(4,2,26,46,39,48,37,39),
(4,2,27,47,40,49,37,40),
(4,2,28,48,40,50,38,41),
(4,2,29,50,41,52,39,42),
(4,2,30,51,42,53,40,42),
(4,2,31,52,43,54,41,43),
(4,2,32,54,43,56,42,44),
(4,2,33,55,44,57,42,45),
(4,2,34,57,45,58,43,46),
(4,2,35,58,46,60,44,47),
(4,2,36,60,47,61,45,48),
(4,2,37,61,47,62,46,49),
(4,2,38,63,48,64,47,50),
(4,2,39,64,49,65,48,51),
(4,2,40,66,50,67,49,52),
(4,2,41,67,51,68,50,53),
(4,2,42,69,51,70,51,54),
(4,2,43,70,52,71,52,55),
(4,2,44,72,53,73,52,56),
(4,2,45,74,54,74,53,57),
(4,2,46,75,55,76,54,58),
(4,2,47,77,56,77,56,59),
(4,2,48,79,57,79,57,60),
(4,2,49,80,58,81,58,62),
(4,2,50,82,59,82,59,63),
(4,2,51,84,60,84,60,64),
(4,2,52,86,61,86,61,65),
(4,2,53,88,62,87,62,66),
(4,2,54,89,63,89,63,67),
(4,2,55,91,64,91,64,69),
(4,2,56,93,65,93,65,70),
(4,2,57,95,66,94,66,71),
(4,2,58,97,67,96,68,72),
(4,2,59,104,68,98,69,74),
(4,2,60,104,69,100,70,75),
(4,2,61,104,70,102,71,76),
(4,2,62,110,71,104,72,78),
(4,2,63,112,72,106,74,79),
(4,2,64,112,73,108,75,80),
(4,2,65,112,75,110,76,82),
(4,2,66,114,76,112,78,83),
(4,2,67,116,77,114,79,85),
(4,2,68,118,78,116,80,86),
(4,2,69,126,79,118,82,87),
(4,2,70,126,81,120,83,89),
(4,2,71,126,82,122,84,90),
(4,2,72,133,83,125,86,92),
(4,2,73,135,84,127,87,94),
(4,2,74,135,86,129,89,95),
(4,2,75,140,87,131,90,97),
(4,2,76,140,88,134,92,98),
(4,2,77,146,90,136,93,100),
(4,2,78,149,91,138,95,102),
(4,2,79,151,92,141,96,103),
(4,2,80,151,94,143,98,105),
(4,3,1,17,28,20,20,21),
(4,3,2,17,29,21,21,22),
(4,3,3,18,31,22,21,22),
(4,3,4,18,32,23,22,23),
(4,3,5,19,33,24,22,24),
(4,3,6,19,35,25,23,24),
(4,3,7,20,36,26,24,25),
(4,3,8,20,38,27,24,25),
(4,3,9,21,39,27,25,26),
(4,3,10,21,40,28,25,27),
(4,3,11,22,42,29,26,28),
(4,3,12,22,43,30,27,28),
(4,3,13,23,45,31,27,29),
(4,3,14,23,46,32,28,30),
(4,3,15,24,48,34,29,30),
(4,3,16,24,50,35,29,31),
(4,3,17,25,51,36,30,32),
(4,3,18,25,53,37,31,33),
(4,3,19,26,54,38,31,33),
(4,3,20,26,56,39,32,34),
(4,3,21,27,57,40,33,35),
(4,3,22,27,59,41,33,36),
(4,3,23,28,61,42,34,36),
(4,3,24,28,62,43,35,37),
(4,3,25,29,64,44,36,38),
(4,3,26,30,66,46,36,39),
(4,3,27,30,68,47,37,40),
(4,3,28,31,69,48,38,41),
(4,3,29,31,71,49,39,41),
(4,3,30,32,73,50,39,42),
(4,3,31,33,75,52,40,43),
(4,3,32,33,76,53,41,44),
(4,3,33,34,78,54,42,45),
(4,3,34,34,80,55,43,46),
(4,3,35,35,82,57,44,47),
(4,3,36,36,84,58,44,48),
(4,3,37,36,86,59,45,48),
(4,3,38,37,87,60,46,49),
(4,3,39,38,89,62,47,50),
(4,3,40,38,91,63,48,51),
(4,3,41,39,93,64,49,52),
(4,3,42,40,95,66,49,53),
(4,3,43,40,97,67,50,54),
(4,3,44,41,99,68,51,55),
(4,3,45,42,101,70,52,56),
(4,3,46,42,103,71,53,57),
(4,3,47,43,105,72,54,58),
(4,3,48,44,107,74,55,59),
(4,3,49,45,109,75,56,60),
(4,3,50,45,111,77,57,61),
(4,3,51,46,113,78,58,62),
(4,3,52,47,115,79,59,63),
(4,3,53,47,118,81,60,64),
(4,3,54,48,120,82,61,65),
(4,3,55,49,122,84,61,66),
(4,3,56,50,124,85,62,67),
(4,3,57,50,126,87,63,68),
(4,3,58,51,128,88,64,69),
(4,3,59,52,131,90,65,70),
(4,3,60,53,133,91,66,72),
(4,3,61,54,135,93,67,73),
(4,3,62,54,137,94,69,74),
(4,3,63,55,140,96,70,75),
(4,3,64,56,142,97,71,76),
(4,3,65,57,144,99,72,77),
(4,3,66,58,147,101,73,78),
(4,3,67,58,149,102,74,79),
(4,3,68,59,151,104,75,81),
(4,3,69,60,154,105,76,82),
(4,3,70,61,156,107,77,83),
(4,3,71,62,159,109,78,84),
(4,3,72,63,162,111,79,85),
(4,3,73,64,165,113,80,87),
(4,3,74,65,168,115,82,88),
(4,3,75,66,171,117,83,90),
(4,3,76,67,174,119,84,91),
(4,3,77,68,177,121,86,93),
(4,3,78,69,180,123,87,94),
(4,3,79,70,190,125,91,96),
(4,3,80,71,193,127,93,97),
(4,3,81,71,198,130,91,99),
(4,3,82,73,201,133,93,100),
(4,3,83,74,204,135,94,102),
(4,3,84,75,208,137,96,103),
(4,3,85,76,212,139,97,105),
(4,4,1,18,28,20,20,20),
(4,4,2,19,29,21,20,20),
(4,4,3,20,31,21,20,21),
(4,4,4,20,32,22,20,21),
(4,4,5,21,34,23,21,21),
(4,4,6,22,35,24,21,22),
(4,4,7,23,37,24,21,22),
(4,4,8,24,38,25,21,23),
(4,4,9,24,40,26,21,23),
(4,4,10,25,41,26,21,23),
(4,4,11,26,43,27,22,24),
(4,4,12,27,44,28,22,24),
(4,4,13,28,46,29,22,25),
(4,4,14,29,48,30,22,25),
(4,4,15,29,49,30,22,25),
(4,4,16,30,51,31,23,26),
(4,4,17,31,52,32,23,26),
(4,4,18,32,54,33,23,27),
(4,4,19,33,56,34,23,27),
(4,4,20,34,57,35,23,28),
(4,4,21,35,59,35,24,28),
(4,4,22,36,61,36,24,29),
(4,4,23,37,63,37,24,29),
(4,4,24,38,64,38,24,30),
(4,4,25,39,66,39,25,30),
(4,4,26,40,68,40,25,31),
(4,4,27,41,70,41,25,31),
(4,4,28,42,72,42,25,32),
(4,4,29,43,73,43,25,32),
(4,4,30,44,75,43,26,33),
(4,4,31,45,77,44,26,33),
(4,4,32,46,79,45,26,34),
(4,4,33,47,81,46,27,34),
(4,4,34,48,83,47,27,35),
(4,4,35,49,85,48,27,35),
(4,4,36,50,87,49,27,36),
(4,4,37,51,89,50,28,36),
(4,4,38,52,91,51,28,37),
(4,4,39,53,93,52,28,38),
(4,4,40,54,95,53,28,38),
(4,4,41,56,97,54,29,39),
(4,4,42,57,99,55,29,39),
(4,4,43,58,101,56,29,40),
(4,4,44,59,103,57,30,40),
(4,4,45,60,105,59,30,41),
(4,4,46,61,107,60,30,42),
(4,4,47,62,109,61,31,42),
(4,4,48,64,112,62,31,43),
(4,4,49,65,114,63,31,44),
(4,4,50,66,116,64,32,44),
(4,4,51,67,118,65,32,45),
(4,4,52,68,120,66,32,45),
(4,4,53,70,123,67,33,46),
(4,4,54,71,125,69,33,47),
(4,4,55,72,127,70,33,47),
(4,4,56,73,129,71,34,48),
(4,4,57,75,132,72,34,49),
(4,4,58,76,134,73,34,49),
(4,4,59,77,136,74,35,50),
(4,4,60,79,139,76,35,51),
(4,4,61,80,141,77,35,51),
(4,4,62,81,143,78,36,52),
(4,4,63,82,146,79,36,53),
(4,4,64,84,148,80,37,54),
(4,4,65,85,151,82,37,54),
(4,4,66,87,153,83,37,55),
(4,4,67,88,156,84,38,56),
(4,4,68,89,158,85,38,57),
(4,4,69,91,160,87,39,57),
(4,4,70,92,163,88,39,58),
(4,4,71,94,166,90,39,59),
(4,4,72,96,169,91,40,59),
(4,4,73,97,172,93,40,60),
(4,4,74,99,175,94,41,61),
(4,4,75,101,178,96,41,62),
(4,4,76,102,181,97,41,63),
(4,4,77,104,184,99,42,64),
(4,4,78,106,188,101,42,65),
(4,4,79,108,191,102,43,66),
(4,4,80,110,194,104,43,67),
(4,4,81,110,206,107,44,68),
(4,4,82,112,209,108,44,68),
(4,4,83,114,213,110,45,69),
(4,4,84,116,217,112,45,70),
(4,4,85,118,220,114,46,71),
(4,5,1,17,25,19,22,23),
(4,5,2,17,25,19,23,24),
(4,5,3,17,25,20,25,26),
(4,5,4,17,26,20,26,27),
(4,5,5,18,26,20,27,28),
(4,5,6,18,26,21,29,30),
(4,5,7,18,26,21,30,31),
(4,5,8,18,26,22,31,33),
(4,5,9,18,27,22,33,34),
(4,5,10,19,27,22,34,36),
(4,5,11,19,27,23,36,37),
(4,5,12,19,27,23,37,39),
(4,5,13,19,28,24,38,40),
(4,5,14,19,28,24,40,42),
(4,5,15,19,28,25,41,43),
(4,5,16,20,28,25,43,45),
(4,5,17,20,29,25,44,46),
(4,5,18,20,29,26,46,48),
(4,5,19,20,29,26,47,49),
(4,5,20,21,30,27,49,51),
(4,5,21,21,30,27,51,53),
(4,5,22,21,30,28,52,54),
(4,5,23,21,30,28,54,56),
(4,5,24,21,31,29,55,58),
(4,5,25,22,31,29,57,59),
(4,5,26,22,31,30,59,61),
(4,5,27,22,32,30,60,63),
(4,5,28,22,32,31,62,65),
(4,5,29,23,32,31,64,66),
(4,5,30,23,33,32,65,68),
(4,5,31,23,33,32,67,70),
(4,5,32,23,33,33,69,72),
(4,5,33,24,34,33,70,73),
(4,5,34,24,34,34,72,75),
(4,5,35,24,34,34,74,77),
(4,5,36,24,35,35,76,79),
(4,5,37,25,35,35,78,81),
(4,5,38,25,35,36,79,83),
(4,5,39,25,36,37,81,85),
(4,5,40,26,36,37,83,87),
(4,5,41,26,37,38,85,88),
(4,5,42,26,37,38,87,90),
(4,5,43,27,37,39,89,92),
(4,5,44,27,38,39,91,94),
(4,5,45,27,38,40,92,96),
(4,5,46,27,39,41,94,98),
(4,5,47,28,39,41,96,100),
(4,5,48,28,39,42,98,102),
(4,5,49,28,40,43,100,104),
(4,5,50,29,40,43,102,106),
(4,5,51,29,41,44,104,109),
(4,5,52,29,41,44,106,111),
(4,5,53,30,42,45,108,113),
(4,5,54,30,42,46,110,115),
(4,5,55,30,43,46,112,117),
(4,5,56,31,43,47,114,119),
(4,5,57,31,43,48,117,121),
(4,5,58,31,44,48,119,124),
(4,5,59,32,44,49,121,126),
(4,5,60,32,45,50,123,128),
(4,5,61,33,45,51,125,130),
(4,5,62,33,46,51,127,132),
(4,5,63,33,46,52,129,135),
(4,5,64,34,47,53,132,137),
(4,5,65,34,47,53,134,139),
(4,5,66,34,48,54,136,142),
(4,5,67,35,48,55,138,144),
(4,5,68,35,49,56,140,146),
(4,5,69,36,49,56,143,149),
(4,5,70,36,50,57,145,151),
(4,5,71,36,51,58,148,161),
(4,5,72,37,51,58,151,164),
(4,5,73,37,52,59,154,168),
(4,5,74,38,52,60,156,171),
(4,5,75,38,53,61,159,174),
(4,5,76,38,54,62,162,177),
(4,5,77,39,54,63,165,180),
(4,5,78,39,55,64,168,183),
(4,5,79,40,55,65,171,186),
(4,5,80,40,56,66,200,191),
(4,5,81,40,56,68,185,185),
(4,5,82,40,56,68,189,188),
(4,5,83,41,57,69,193,191),
(4,5,84,41,58,70,196,195),
(4,5,85,42,58,71,199,198),
(4,6,1,20,25,21,20,20),
(4,6,2,21,26,22,20,20),
(4,6,3,23,27,23,20,21),
(4,6,4,24,27,25,20,21),
(4,6,5,25,28,26,20,21),
(4,6,6,27,29,27,20,21),
(4,6,7,28,30,28,21,22),
(4,6,8,29,31,29,21,22),
(4,6,9,31,31,31,21,22),
(4,6,10,32,32,32,21,23),
(4,6,11,33,33,33,21,23),
(4,6,12,35,34,34,21,23),
(4,6,13,36,35,36,21,24),
(4,6,14,38,36,37,21,24),
(4,6,15,39,37,38,21,24),
(4,6,16,41,37,40,21,25),
(4,6,17,42,38,41,22,25),
(4,6,18,44,39,43,22,25),
(4,6,19,45,40,44,22,26),
(4,6,20,47,41,45,22,26),
(4,6,21,48,42,47,22,26),
(4,6,22,50,43,48,22,27),
(4,6,23,52,44,50,22,27),
(4,6,24,53,45,51,23,28),
(4,6,25,55,46,52,23,28),
(4,6,26,56,47,54,23,28),
(4,6,27,58,48,55,23,29),
(4,6,28,60,49,57,23,29),
(4,6,29,61,50,58,23,30),
(4,6,30,63,51,60,24,30),
(4,6,31,65,52,62,24,30),
(4,6,32,66,53,63,24,31),
(4,6,33,68,54,65,24,31),
(4,6,34,70,55,66,24,32),
(4,6,35,72,56,68,24,32),
(4,6,36,73,58,69,25,33),
(4,6,37,75,59,71,25,33),
(4,6,38,77,60,73,25,34),
(4,6,39,79,61,74,25,34),
(4,6,40,81,62,76,25,35),
(4,6,41,82,63,78,26,35),
(4,6,42,84,64,79,26,35),
(4,6,43,86,66,81,26,36),
(4,6,44,88,67,83,26,36),
(4,6,45,90,68,85,26,37),
(4,6,46,92,69,86,27,37),
(4,6,47,94,70,88,27,38),
(4,6,48,96,72,90,27,38),
(4,6,49,98,73,92,27,39),
(4,6,50,100,74,93,28,40),
(4,6,51,101,75,94,28,40),
(4,6,52,102,76,95,28,41),
(4,6,53,103,77,96,28,41),
(4,6,54,104,77,97,29,42),
(4,6,55,105,78,98,29,42),
(4,6,56,108,80,101,29,43),
(4,6,57,113,81,103,29,43),
(4,6,58,115,82,105,30,44),
(4,6,59,115,84,107,30,44),
(4,6,60,120,85,109,30,45),
(4,6,61,122,86,111,30,46),
(4,6,62,122,88,113,30,46),
(4,6,63,127,89,116,31,47),
(4,6,64,127,91,118,31,47),
(4,6,65,133,92,120,31,48),
(4,6,66,135,94,123,31,49),
(4,6,67,136,95,125,32,49),
(4,6,68,137,97,127,32,50),
(4,6,69,140,98,130,32,51),
(4,6,70,147,100,132,32,51),
(4,6,71,154,102,135,33,52),
(4,6,72,156,103,137,33,53),
(4,6,73,157,105,140,33,54),
(4,6,74,158,107,142,33,54),
(4,6,75,161,108,145,34,55),
(4,6,76,164,110,148,34,56),
(4,6,77,167,112,150,34,57),
(4,6,78,170,113,153,34,57),
(4,6,79,172,115,156,35,58),
(4,6,80,177,117,159,35,59),
(4,6,81,174,118,163,35,60),
(4,6,82,174,120,165,36,60),
(4,6,83,181,122,168,36,61),
(4,6,84,181,124,171,36,62),
(4,6,85,187,125,174,36,63),
(4,7,81,118,79,138,136,146),
(4,7,82,120,81,141,139,148),
(4,7,83,123,82,143,139,151),
(4,7,84,125,83,145,139,153),
(4,7,85,127,84,148,145,156),
(4,7,10,24,28,29,28,30),
(4,7,11,25,28,30,29,31),
(4,7,12,26,29,31,30,32),
(4,7,13,26,29,32,31,33),
(4,7,14,27,30,33,32,34),
(4,7,15,28,30,34,33,36),
(4,7,16,29,31,35,34,37),
(4,7,17,30,31,36,35,38),
(4,7,18,31,32,37,36,39),
(4,7,19,32,32,38,37,40),
(4,7,20,33,33,39,38,41),
(4,7,21,34,33,40,39,42),
(4,7,22,34,34,41,40,43),
(4,7,23,35,34,42,41,44),
(4,7,24,36,35,43,42,46),
(4,7,25,37,35,45,43,47),
(4,7,26,38,36,46,44,48),
(4,7,27,39,36,47,45,49),
(4,7,28,40,37,48,46,50),
(4,7,29,41,37,49,47,52),
(4,7,30,42,38,50,48,53),
(4,7,31,44,38,52,50,54),
(4,7,32,45,39,53,51,56),
(4,7,33,46,40,54,52,57),
(4,7,34,47,40,55,53,58),
(4,7,35,48,41,57,54,60),
(4,7,36,49,42,58,56,61),
(4,7,37,50,42,59,57,62),
(4,7,38,51,43,61,58,64),
(4,7,39,52,43,62,59,65),
(4,7,40,54,44,63,61,67),
(4,7,41,55,45,65,62,68),
(4,7,42,56,45,66,63,70),
(4,7,43,57,46,68,64,71),
(4,7,44,59,47,69,66,73),
(4,7,45,60,47,71,67,74),
(4,7,46,61,48,72,69,76),
(4,7,47,62,49,74,70,77),
(4,7,48,64,50,75,71,79),
(4,7,49,65,50,77,73,81),
(4,7,50,66,51,78,74,82),
(4,7,51,68,52,80,76,84),
(4,7,52,69,53,81,77,86),
(4,7,53,71,53,83,79,87),
(4,7,54,72,54,85,80,89),
(4,7,55,73,55,86,82,91),
(4,7,56,75,56,88,83,93),
(4,7,57,76,57,90,85,94),
(4,7,58,78,57,91,87,96),
(4,7,59,79,58,93,88,98),
(4,7,60,81,59,95,90,100),
(4,7,61,83,60,97,92,102),
(4,7,62,84,61,99,93,104),
(4,7,63,86,62,100,95,106),
(4,7,64,87,62,102,97,108),
(4,7,65,89,63,104,99,110),
(4,7,66,91,64,106,100,112),
(4,7,67,92,65,108,102,114),
(4,7,68,94,66,110,104,116),
(4,7,69,96,67,112,106,118),
(4,7,70,98,68,114,108,120),
(4,7,71,99,69,116,110,122),
(4,7,72,101,70,118,112,125),
(4,7,73,103,71,120,114,127),
(4,7,74,105,72,123,116,129),
(4,7,75,107,73,125,118,131),
(4,7,76,109,74,127,120,134),
(4,7,77,110,75,129,122,136),
(4,7,78,112,76,131,124,138),
(4,7,79,114,77,134,126,141),
(4,7,80,116,78,136,128,143),
(4,8,1,17,25,19,23,22),
(4,8,81,32,48,60,194,177),
(4,8,82,32,48,60,197,180),
(4,8,83,32,49,61,200,184),
(4,8,84,33,49,62,204,187),
(4,8,85,33,50,63,207,190),
(4,8,2,20,20,20,24,23),
(4,8,3,20,20,21,26,25),
(4,8,4,20,20,21,27,26),
(4,8,5,20,21,21,28,27),
(4,8,6,20,21,21,30,29),
(4,8,7,21,21,22,31,30),
(4,8,8,21,21,22,33,31),
(4,8,9,21,21,22,34,33),
(4,8,10,17,26,23,34,33),
(4,8,11,17,26,23,35,34),
(4,8,12,17,26,23,37,35),
(4,8,13,17,26,24,38,36),
(4,8,14,18,26,24,39,38),
(4,8,15,18,27,24,41,39),
(4,8,16,18,27,25,42,40),
(4,8,17,18,27,25,43,42),
(4,8,18,18,27,25,45,43),
(4,8,19,18,27,26,46,44),
(4,8,20,18,28,26,48,46),
(4,8,21,19,28,26,49,47),
(4,8,22,19,28,27,51,49),
(4,8,23,19,28,27,52,50),
(4,8,24,19,29,28,54,52),
(4,8,25,19,29,28,55,53),
(4,8,26,19,29,28,57,55),
(4,8,27,19,29,29,59,56),
(4,8,28,20,29,29,60,58),
(4,8,29,20,30,30,62,59),
(4,8,30,20,30,30,64,61),
(4,8,31,20,30,30,65,63),
(4,8,32,20,30,31,67,64),
(4,8,33,20,31,31,69,66),
(4,8,34,21,31,32,70,68),
(4,8,35,21,31,32,72,69),
(4,8,36,21,32,33,74,71),
(4,8,37,21,32,33,76,73),
(4,8,38,21,32,33,78,75),
(4,8,39,22,32,34,80,76),
(4,8,40,22,33,34,81,78),
(4,8,41,22,33,35,83,80),
(4,8,42,22,33,35,85,82),
(4,8,43,22,33,36,87,84),
(4,8,44,22,34,36,89,86),
(4,8,45,23,34,37,91,88),
(4,8,46,23,34,37,93,90),
(4,8,47,23,35,38,95,92),
(4,8,48,23,35,38,98,94),
(4,8,49,24,35,39,100,96),
(4,8,50,24,36,39,107,98),
(4,8,51,24,36,40,109,100),
(4,8,52,24,36,40,111,102),
(4,8,53,24,37,41,113,104),
(4,8,54,25,37,42,116,106),
(4,8,55,25,37,42,118,109),
(4,8,56,25,38,43,120,111),
(4,8,57,25,38,43,123,113),
(4,8,58,26,38,44,126,115),
(4,8,59,26,39,44,129,118),
(4,8,60,26,39,45,131,120),
(4,8,61,26,39,46,133,122),
(4,8,62,26,40,46,136,125),
(4,8,63,27,40,47,139,127),
(4,8,64,27,40,47,141,130),
(4,8,65,27,41,48,144,132),
(4,8,66,28,41,49,147,135),
(4,8,67,28,42,49,150,137),
(4,8,68,28,42,50,153,140),
(4,8,69,28,42,51,156,143),
(4,8,70,29,43,51,158,145),
(4,8,71,29,43,52,161,148),
(4,8,72,29,44,53,164,151),
(4,8,73,29,44,54,168,154),
(4,8,74,30,45,54,171,156),
(4,8,75,30,45,55,174,159),
(4,8,76,30,45,56,177,162),
(4,8,77,31,46,57,180,165),
(4,8,78,31,46,57,183,168),
(4,8,79,31,47,58,186,171),
(4,8,80,32,47,59,190,174),
(4,9,81,56,72,91,169,169),
(4,9,82,56,72,92,172,172),
(4,9,83,57,73,94,175,175),
(4,9,84,58,74,95,178,178),
(4,9,85,59,75,96,181,181),
(4,9,10,19,27,26,31,32),
(4,9,11,19,28,26,33,33),
(4,9,12,19,28,27,34,34),
(4,9,13,20,28,27,35,36),
(4,9,14,20,29,28,36,37),
(4,9,15,20,29,29,37,38),
(4,9,16,21,30,29,38,39),
(4,9,17,21,30,30,40,41),
(4,9,18,21,30,30,41,42),
(4,9,19,22,31,31,42,43),
(4,9,20,22,31,32,43,45),
(4,9,21,22,32,32,45,46),
(4,9,22,23,32,33,46,47),
(4,9,23,23,33,34,47,49),
(4,9,24,24,33,34,49,50),
(4,9,25,24,34,35,50,52),
(4,9,26,24,34,36,51,53),
(4,9,27,25,34,36,53,54),
(4,9,28,25,35,37,54,56),
(4,9,29,26,35,38,56,57),
(4,9,30,26,36,38,57,59),
(4,9,31,26,36,39,58,61),
(4,9,32,27,37,40,60,62),
(4,9,33,27,37,41,61,64),
(4,9,34,28,38,41,63,65),
(4,9,35,28,38,42,64,67),
(4,9,36,29,39,43,66,69),
(4,9,37,29,40,44,68,70),
(4,9,38,29,40,45,69,72),
(4,9,39,30,41,45,71,74),
(4,9,40,30,41,46,72,75),
(4,9,41,31,42,47,74,77),
(4,9,42,31,42,48,76,79),
(4,9,43,32,43,49,77,81),
(4,9,44,32,43,50,79,82),
(4,9,45,33,44,50,81,84),
(4,9,46,33,45,51,83,86),
(4,9,47,34,45,52,84,88),
(4,9,48,34,46,53,86,90),
(4,9,49,35,47,54,88,92),
(4,9,50,35,47,55,94,94),
(4,9,51,36,48,56,96,96),
(4,9,52,36,48,57,98,98),
(4,9,53,37,49,58,100,100),
(4,9,54,38,50,59,102,102),
(4,9,55,38,50,60,105,104),
(4,9,56,39,51,61,107,106),
(4,9,57,39,52,62,109,108),
(4,9,58,40,53,63,111,111),
(4,9,59,40,53,64,113,113),
(4,9,60,41,54,65,115,115),
(4,9,61,42,55,66,117,117),
(4,9,62,42,55,67,119,120),
(4,9,63,43,56,68,122,122),
(4,9,64,43,57,69,124,124),
(4,9,65,44,58,71,127,127),
(4,9,66,45,59,72,129,129),
(4,9,67,45,59,73,132,132),
(4,9,68,46,60,74,134,134),
(4,9,69,47,61,75,136,136),
(4,9,70,47,62,76,139,139),
(4,9,71,48,63,78,141,142),
(4,9,72,49,63,79,144,144),
(4,9,73,50,64,80,147,147),
(4,9,74,50,65,81,150,150),
(4,9,75,51,66,83,152,152),
(4,9,76,52,67,84,155,155),
(4,9,77,53,68,85,158,158),
(4,9,78,53,69,87,160,161),
(4,9,79,54,70,88,163,164),
(4,9,80,55,71,89,166,166),
(4,11,1,18,25,19,22,22),
(4,11,2,19,25,20,23,23),
(4,11,3,19,26,20,24,24),
(4,11,4,20,26,21,25,26),
(4,11,5,20,27,22,26,27),
(4,11,6,21,27,22,27,28),
(4,11,7,21,28,23,28,29),
(4,11,8,22,28,24,29,30),
(4,11,9,23,29,24,30,32),
(4,11,10,23,29,25,32,33),
(4,11,11,24,30,26,33,34),
(4,11,12,24,31,26,34,35),
(4,11,13,25,31,27,35,37),
(4,11,14,26,32,28,36,38),
(4,11,15,26,32,29,37,39),
(4,11,16,27,33,29,38,41),
(4,11,17,28,33,30,40,42),
(4,11,18,28,34,31,41,43),
(4,11,19,29,35,32,42,45),
(4,11,20,30,35,32,43,46),
(4,11,21,30,36,33,45,48),
(4,11,22,31,36,34,46,49),
(4,11,23,32,37,35,47,51),
(4,11,24,32,38,36,48,52),
(4,11,25,33,38,36,50,53),
(4,11,26,34,39,37,51,55),
(4,11,27,35,40,38,52,56),
(4,11,28,35,40,39,54,58),
(4,11,29,36,41,40,55,59),
(4,11,30,37,42,41,56,61),
(4,11,31,38,42,42,58,62),
(4,11,32,38,43,42,59,64),
(4,11,33,39,44,43,60,66),
(4,11,34,40,44,44,62,67),
(4,11,35,41,45,45,63,69),
(4,11,36,42,46,46,65,70),
(4,11,37,42,47,47,66,72),
(4,11,38,43,47,48,67,74),
(4,11,39,44,48,49,69,75),
(4,11,40,45,49,50,70,77),
(4,11,41,46,50,51,72,79),
(4,11,42,46,50,52,73,80),
(4,11,43,47,51,53,75,82),
(4,11,44,48,52,54,76,84),
(4,11,45,49,53,55,78,85),
(4,11,46,50,54,56,79,87),
(4,11,47,51,54,57,81,89),
(4,11,48,52,55,58,83,91),
(4,11,49,53,56,59,84,93),
(4,11,50,53,57,60,86,94),
(4,11,51,54,58,61,87,96),
(4,11,52,55,59,62,89,98),
(4,11,53,56,59,63,91,100),
(4,11,54,57,60,64,92,102),
(4,11,55,58,61,65,94,103),
(4,11,56,59,62,66,95,105),
(4,11,57,60,63,67,97,107),
(4,11,58,61,64,68,99,109),
(4,11,59,62,65,69,101,111),
(4,11,60,63,66,70,102,113),
(4,11,61,64,66,72,104,115),
(4,11,62,65,67,73,106,117),
(4,11,63,66,68,74,107,119),
(4,11,64,67,69,75,109,121),
(4,11,65,68,70,76,111,123),
(4,11,66,69,71,77,113,125),
(4,11,67,70,72,78,115,127),
(4,11,68,71,73,80,116,129),
(4,11,69,72,74,81,118,131),
(4,11,70,73,75,82,120,133),
(4,11,71,75,76,83,122,135),
(4,11,72,76,78,85,125,138),
(4,11,73,77,79,86,127,140),
(4,11,74,78,80,88,131,143),
(4,11,75,80,81,89,133,145),
(4,11,76,81,82,91,134,148),
(4,11,77,82,83,92,136,151),
(4,11,78,84,85,94,138,153),
(4,11,79,85,86,95,141,156),
(4,11,80,86,87,97,143,159),
(4,11,81,87,87,99,146,161),
(4,11,82,88,89,101,148,164),
(4,11,83,90,90,102,151,167),
(4,11,84,91,91,104,160,170),
(4,11,85,92,93,106,160,173),
(5,1,1,22,18,23,18,25),
(5,1,2,23,19,24,18,25),
(5,1,3,25,20,25,18,26),
(5,1,4,26,20,26,18,26),
(5,1,5,27,21,28,18,26),
(5,1,6,29,22,29,18,26),
(5,1,7,30,23,30,19,27),
(5,1,8,31,24,31,19,27),
(5,1,9,33,25,33,19,27),
(5,1,10,34,25,34,19,28),
(5,1,11,35,26,35,19,28),
(5,1,12,37,27,36,19,28),
(5,1,13,38,28,38,19,28),
(5,1,14,40,29,39,19,29),
(5,1,15,41,30,40,19,29),
(5,1,16,43,31,42,20,29),
(5,1,17,44,32,43,20,30),
(5,1,18,46,33,44,20,30),
(5,1,19,47,34,46,20,31),
(5,1,20,49,34,47,20,31),
(5,1,21,50,35,49,20,31),
(5,1,22,52,36,50,20,32),
(5,1,23,53,37,51,21,32),
(5,1,24,55,38,53,21,32),
(5,1,25,57,39,54,21,33),
(5,1,26,58,40,56,21,33),
(5,1,27,60,41,57,21,34),
(5,1,28,62,42,59,21,34),
(5,1,29,63,43,60,21,34),
(5,1,30,65,44,62,22,35),
(5,1,31,67,46,63,22,35),
(5,1,32,68,47,65,22,36),
(5,1,33,70,48,67,22,36),
(5,1,34,72,49,68,22,36),
(5,1,35,74,50,70,23,37),
(5,1,36,75,51,71,23,37),
(5,1,37,77,52,73,23,38),
(5,1,38,79,53,75,23,38),
(5,1,39,81,54,76,23,39),
(5,1,40,83,55,78,24,39),
(5,1,41,84,57,80,24,40),
(5,1,42,86,58,81,24,40),
(5,1,43,88,59,83,24,41),
(5,1,44,90,60,85,24,41),
(5,1,45,92,61,86,25,42),
(5,1,46,94,62,88,25,42),
(5,1,47,96,64,90,25,43),
(5,1,48,98,65,92,25,43),
(5,1,49,100,66,93,25,44),
(5,1,50,102,67,95,26,44),
(5,1,51,104,69,97,26,45),
(5,1,52,106,70,99,26,45),
(5,1,53,108,71,101,26,46),
(5,1,54,110,72,103,27,46),
(5,1,55,112,74,104,27,47),
(5,1,56,114,75,106,27,48),
(5,1,57,116,76,108,27,48),
(5,1,58,118,78,110,28,49),
(5,1,59,120,79,112,28,49),
(5,1,60,122,80,114,28,50),
(5,1,61,124,82,116,28,50),
(5,1,62,126,83,118,29,51),
(5,1,63,128,84,120,29,52),
(5,1,64,131,86,122,29,52),
(5,1,65,133,87,124,30,53),
(5,1,66,135,88,126,30,53),
(5,1,67,137,90,128,30,54),
(5,1,68,139,91,130,30,55),
(5,1,69,142,93,132,31,55),
(5,1,70,144,94,134,31,56),
(5,1,71,147,95,136,31,57),
(5,1,72,150,97,139,31,58),
(5,1,73,152,99,141,31,59),
(5,1,74,155,100,144,32,59),
(5,1,75,158,102,146,32,60),
(5,1,76,163,104,149,32,61),
(5,1,77,167,106,152,33,62),
(5,1,78,167,107,154,33,62),
(5,1,79,170,109,157,33,63),
(5,1,80,173,111,160,34,64),
(5,1,81,176,113,161,34,65),
(5,1,82,188,115,164,34,65),
(5,1,83,191,117,167,34,66),
(5,1,84,194,119,170,35,67),
(5,1,85,197,121,173,35,68),
(5,2,81,159,89,146,97,112),
(5,2,82,162,91,148,99,113),
(5,2,83,165,92,151,100,115),
(5,2,84,169,94,153,102,117),
(5,2,85,171,95,156,104,119),
(5,2,10,30,23,30,23,32),
(5,2,11,31,23,31,24,33),
(5,2,12,32,24,32,25,33),
(5,2,13,33,25,33,25,34),
(5,2,14,34,25,34,26,35),
(5,2,15,35,26,36,27,35),
(5,2,16,37,26,37,27,36),
(5,2,17,38,27,38,28,37),
(5,2,18,39,28,39,29,38),
(5,2,19,40,28,40,29,38),
(5,2,20,41,29,41,30,39),
(5,2,21,42,30,42,31,40),
(5,2,22,44,30,43,32,41),
(5,2,23,45,31,44,32,42),
(5,2,24,46,32,46,33,42),
(5,2,25,47,32,47,34,43),
(5,2,26,49,33,48,35,44),
(5,2,27,50,34,49,35,45),
(5,2,28,51,34,50,36,46),
(5,2,29,53,35,52,37,47),
(5,2,30,54,36,53,38,47),
(5,2,31,55,37,54,39,48),
(5,2,32,57,37,56,40,49),
(5,2,33,58,38,57,40,50),
(5,2,34,60,39,58,41,51),
(5,2,35,61,40,60,42,52),
(5,2,36,63,41,61,43,53),
(5,2,37,64,41,62,44,54),
(5,2,38,66,42,64,45,55),
(5,2,39,67,43,65,46,56),
(5,2,40,69,44,67,47,57),
(5,2,41,70,45,68,48,58),
(5,2,42,72,45,70,49,59),
(5,2,43,73,46,71,50,60),
(5,2,44,75,47,73,50,61),
(5,2,45,77,48,74,51,62),
(5,2,46,78,49,76,52,63),
(5,2,47,80,50,77,54,64),
(5,2,48,82,51,79,55,65),
(5,2,49,83,52,81,56,67),
(5,2,50,85,53,82,57,68),
(5,2,51,87,54,84,58,69),
(5,2,52,89,55,86,59,70),
(5,2,53,91,56,87,60,71),
(5,2,54,92,57,89,61,72),
(5,2,55,94,58,91,62,74),
(5,2,56,96,59,93,63,75),
(5,2,57,98,60,94,64,76),
(5,2,58,100,61,96,66,77),
(5,2,59,107,62,98,67,79),
(5,2,60,107,63,100,68,80),
(5,2,61,107,64,102,69,81),
(5,2,62,113,65,104,70,83),
(5,2,63,115,66,106,72,84),
(5,2,64,115,67,108,73,85),
(5,2,65,115,69,110,74,87),
(5,2,66,117,70,112,76,88),
(5,2,67,119,71,114,77,90),
(5,2,68,121,72,116,78,91),
(5,2,69,129,73,118,80,92),
(5,2,70,129,75,120,81,94),
(5,2,71,129,76,122,82,95),
(5,2,72,136,77,125,84,97),
(5,2,73,138,78,127,85,99),
(5,2,74,138,80,129,87,100),
(5,2,75,143,81,131,88,102),
(5,2,76,143,82,134,90,103),
(5,2,77,149,84,136,91,105),
(5,2,78,152,85,138,93,107),
(5,2,79,154,86,141,94,108),
(5,2,80,154,88,143,96,110),
(5,3,1,19,21,22,18,26),
(5,3,81,74,192,130,89,104),
(5,3,82,76,195,133,91,105),
(5,3,83,77,198,135,92,107),
(5,3,84,78,202,137,94,108),
(5,3,85,79,206,139,95,110),
(5,3,2,17,26,21,25,21),
(5,3,3,18,28,22,25,21),
(5,3,4,18,29,23,26,22),
(5,3,5,19,30,24,26,23),
(5,3,6,19,32,25,27,23),
(5,3,7,20,33,26,27,24),
(5,3,8,20,35,27,28,25),
(5,3,9,21,36,27,29,25),
(5,3,10,23,32,28,23,31),
(5,3,11,23,33,29,23,32),
(5,3,12,24,35,30,24,33),
(5,3,13,24,36,31,25,33),
(5,3,14,25,37,32,25,34),
(5,3,15,25,39,33,26,34),
(5,3,16,26,40,34,26,35),
(5,3,17,26,41,35,27,36),
(5,3,18,27,43,36,28,37),
(5,3,19,27,44,37,28,37),
(5,3,20,28,46,38,29,38),
(5,3,21,28,47,39,30,39),
(5,3,22,29,49,40,30,39),
(5,3,23,29,50,41,31,40),
(5,3,24,30,52,42,32,41),
(5,3,25,30,53,43,32,42),
(5,3,26,31,55,44,33,42),
(5,3,27,31,57,45,34,43),
(5,3,28,32,58,46,34,44),
(5,3,29,32,60,47,35,45),
(5,3,30,33,62,48,36,45),
(5,3,31,33,63,50,37,46),
(5,3,32,34,65,51,37,47),
(5,3,33,35,67,52,38,48),
(5,3,34,35,68,53,39,49),
(5,3,35,36,70,54,40,50),
(5,3,36,37,72,56,41,51),
(5,3,37,37,74,57,41,51),
(5,3,38,38,76,58,42,52),
(5,3,39,38,78,59,43,53),
(5,3,40,39,79,61,44,54),
(5,3,41,40,81,62,45,55),
(5,3,42,40,83,63,45,56),
(5,3,43,41,85,64,46,57),
(5,3,44,42,87,66,47,58),
(5,3,45,42,89,67,48,59),
(5,3,46,43,91,69,49,60),
(5,3,47,44,93,70,50,61),
(5,3,48,45,96,71,51,62),
(5,3,49,45,98,73,52,63),
(5,3,50,46,100,74,53,64),
(5,3,51,47,102,76,54,65),
(5,3,52,48,104,77,55,66),
(5,3,53,48,106,79,56,67),
(5,3,54,49,109,80,57,68),
(5,3,55,50,111,82,58,69),
(5,3,56,51,113,83,59,70),
(5,3,57,52,116,85,60,72),
(5,3,58,52,118,87,61,73),
(5,3,59,53,121,88,62,74),
(5,3,60,54,123,90,63,75),
(5,3,61,55,125,92,64,76),
(5,3,62,56,128,93,65,77),
(5,3,63,57,131,95,66,79),
(5,3,64,57,133,97,67,80),
(5,3,65,58,136,99,69,81),
(5,3,66,59,138,100,70,82),
(5,3,67,60,141,102,71,84),
(5,3,68,61,144,104,72,85),
(5,3,69,62,147,106,73,86),
(5,3,70,63,149,108,75,88),
(5,3,71,64,152,110,76,89),
(5,3,72,65,155,112,77,90),
(5,3,73,66,158,114,78,92),
(5,3,74,67,161,116,80,93),
(5,3,75,68,164,118,81,95),
(5,3,76,69,175,120,82,96),
(5,3,77,70,178,122,84,98),
(5,3,78,71,181,124,85,99),
(5,3,79,72,184,126,86,101),
(5,3,80,73,188,128,88,102),
(5,4,1,20,21,22,18,25),
(5,4,2,21,22,23,18,25),
(5,4,3,22,24,23,18,26),
(5,4,4,22,25,24,18,26),
(5,4,5,23,27,25,19,26),
(5,4,6,24,28,25,19,27),
(5,4,7,25,30,26,19,27),
(5,4,8,25,31,27,19,27),
(5,4,9,26,33,28,19,28),
(5,4,10,27,34,28,19,28),
(5,4,11,28,36,29,20,29),
(5,4,12,29,38,30,20,29),
(5,4,13,30,39,31,20,29),
(5,4,14,31,41,32,20,30),
(5,4,15,31,42,32,20,30),
(5,4,16,32,44,33,21,31),
(5,4,17,33,46,34,21,31),
(5,4,18,34,47,35,21,32),
(5,4,19,35,49,36,21,32),
(5,4,20,36,51,36,21,32),
(5,4,21,37,52,37,22,33),
(5,4,22,38,54,38,22,33),
(5,4,23,39,56,39,22,34),
(5,4,24,40,58,40,22,34),
(5,4,25,41,60,41,23,35),
(5,4,26,42,61,42,23,35),
(5,4,27,43,63,43,23,36),
(5,4,28,44,65,44,23,36),
(5,4,29,45,67,44,24,37),
(5,4,30,46,69,45,24,37),
(5,4,31,47,71,46,24,38),
(5,4,32,48,72,47,24,38),
(5,4,33,49,74,48,25,39),
(5,4,34,50,76,49,25,39),
(5,4,35,51,78,50,25,40),
(5,4,36,52,80,51,25,41),
(5,4,37,53,82,52,26,41),
(5,4,38,54,84,53,26,42),
(5,4,39,55,86,54,26,42),
(5,4,40,56,88,55,27,43),
(5,4,41,57,90,56,27,43),
(5,4,42,59,92,57,27,44),
(5,4,43,60,94,58,27,45),
(5,4,44,61,96,59,28,45),
(5,4,45,62,99,60,28,46),
(5,4,46,63,101,61,28,46),
(5,4,47,64,103,63,29,47),
(5,4,48,66,105,64,29,48),
(5,4,49,67,107,65,29,48),
(5,4,50,68,109,66,30,49),
(5,4,51,69,111,67,30,50),
(5,4,52,70,114,68,30,50),
(5,4,53,72,116,69,31,51),
(5,4,54,73,118,70,31,52),
(5,4,55,74,120,72,31,52),
(5,4,56,75,123,73,32,53),
(5,4,57,77,125,74,32,54),
(5,4,58,78,127,75,32,54),
(5,4,59,79,130,76,33,55),
(5,4,60,81,132,77,33,56),
(5,4,61,82,134,79,34,56),
(5,4,62,83,137,80,34,57),
(5,4,63,84,139,81,34,58),
(5,4,64,86,141,82,35,59),
(5,4,65,87,144,84,35,59),
(5,4,66,88,146,85,35,60),
(5,4,67,90,149,86,36,61),
(5,4,68,91,151,87,36,61),
(5,4,69,93,154,89,37,62),
(5,4,70,94,156,90,37,63),
(5,4,71,96,159,91,37,64),
(5,4,72,98,162,93,38,64),
(5,4,73,99,165,95,38,65),
(5,4,74,101,168,96,39,66),
(5,4,75,103,171,98,39,67),
(5,4,76,104,174,99,39,68),
(5,4,77,106,177,101,40,69),
(5,4,78,108,181,103,40,70),
(5,4,79,110,184,104,41,71),
(5,4,80,112,187,106,41,72),
(5,4,81,113,200,107,42,73),
(5,4,82,115,203,108,42,73),
(5,4,83,117,207,110,43,74),
(5,4,84,119,211,112,43,75),
(5,4,85,121,214,114,44,76),
(5,5,1,19,18,21,20,28),
(5,5,2,19,18,21,21,29),
(5,5,3,19,18,22,23,31),
(5,5,4,19,19,22,24,32),
(5,5,5,20,19,22,25,33),
(5,5,6,20,19,23,27,35),
(5,5,7,20,19,23,28,36),
(5,5,8,20,20,24,29,38),
(5,5,9,20,20,24,31,39),
(5,5,10,20,20,24,32,40),
(5,5,11,21,20,25,34,42),
(5,5,12,21,21,25,35,43),
(5,5,13,21,21,26,37,45),
(5,5,14,21,21,26,38,46),
(5,5,15,21,21,26,39,48),
(5,5,16,22,22,27,41,50),
(5,5,17,22,22,27,42,51),
(5,5,18,22,22,28,44,53),
(5,5,19,22,23,28,46,54),
(5,5,20,22,23,29,47,56),
(5,5,21,23,23,29,49,57),
(5,5,22,23,23,30,50,59),
(5,5,23,23,24,30,52,61),
(5,5,24,23,24,31,53,62),
(5,5,25,24,24,31,55,64),
(5,5,26,24,25,32,57,66),
(5,5,27,24,25,32,58,68),
(5,5,28,24,25,33,60,69),
(5,5,29,25,26,33,62,71),
(5,5,30,25,26,34,63,73),
(5,5,31,25,26,34,65,75),
(5,5,32,25,27,35,67,76),
(5,5,33,26,27,35,69,78),
(5,5,34,26,27,36,70,80),
(5,5,35,26,28,36,72,82),
(5,5,36,26,28,37,74,84),
(5,5,37,27,28,37,76,86),
(5,5,38,27,29,38,77,87),
(5,5,39,27,29,38,79,89),
(5,5,40,28,30,39,81,91),
(5,5,41,28,30,40,83,93),
(5,5,42,28,30,40,85,95),
(5,5,43,28,31,41,87,97),
(5,5,44,29,31,41,89,99),
(5,5,45,29,32,42,91,101),
(5,5,46,29,32,43,92,103),
(5,5,47,30,32,43,94,105),
(5,5,48,30,33,44,96,107),
(5,5,49,30,33,44,98,109),
(5,5,50,31,34,45,100,111),
(5,5,51,31,34,46,102,113),
(5,5,52,31,35,46,104,115),
(5,5,53,32,35,47,106,118),
(5,5,54,32,35,48,108,120),
(5,5,55,32,36,48,110,122),
(5,5,56,33,36,49,113,124),
(5,5,57,33,37,50,115,126),
(5,5,58,33,37,50,117,128),
(5,5,59,34,38,51,119,131),
(5,5,60,34,38,52,121,133),
(5,5,61,34,39,52,123,135),
(5,5,62,35,39,53,125,137),
(5,5,63,35,40,54,127,140),
(5,5,64,36,40,55,130,142),
(5,5,65,36,41,55,132,144),
(5,5,66,36,41,56,134,147),
(5,5,67,37,41,57,136,149),
(5,5,68,37,42,58,138,151),
(5,5,69,38,42,58,141,154),
(5,5,70,38,43,59,143,156),
(5,5,71,38,44,60,146,159),
(5,5,72,39,44,60,149,162),
(5,5,73,39,45,61,152,165),
(5,5,74,40,45,62,157,168),
(5,5,75,40,46,63,157,171),
(5,5,76,40,47,64,160,174),
(5,5,77,41,47,65,163,177),
(5,5,78,41,48,66,166,180),
(5,5,79,42,48,67,169,183),
(5,5,80,42,49,68,172,186),
(5,5,81,43,50,68,183,190),
(5,5,82,43,50,68,187,193),
(5,5,83,44,51,69,191,196),
(5,5,84,44,52,70,194,200),
(5,5,85,45,52,71,197,203),
(5,6,1,22,18,23,18,25),
(5,6,2,23,19,24,18,25),
(5,6,3,25,20,25,18,26),
(5,6,4,26,20,26,18,26),
(5,6,5,27,21,28,18,26),
(5,6,6,29,22,29,18,26),
(5,6,7,30,23,30,19,27),
(5,6,8,31,24,31,19,27),
(5,6,9,33,25,33,19,27),
(5,6,10,34,25,34,19,28),
(5,6,11,35,26,35,19,28),
(5,6,12,37,27,36,19,28),
(5,6,13,38,28,38,19,28),
(5,6,14,40,29,39,19,29),
(5,6,15,41,30,40,19,29),
(5,6,16,43,31,42,20,29),
(5,6,17,44,32,43,20,30),
(5,6,18,46,33,44,20,30),
(5,6,19,47,34,46,20,31),
(5,6,20,49,34,47,20,31),
(5,6,21,50,35,49,20,31),
(5,6,22,52,36,50,20,32),
(5,6,23,53,37,51,21,32),
(5,6,24,55,38,53,21,32),
(5,6,25,57,39,54,21,33),
(5,6,26,58,40,56,21,33),
(5,6,27,60,41,57,21,34),
(5,6,28,62,42,59,21,34),
(5,6,29,63,43,60,21,34),
(5,6,30,65,44,62,22,35),
(5,6,31,67,46,63,22,35),
(5,6,32,68,47,65,22,36),
(5,6,33,70,48,67,22,36),
(5,6,34,72,49,68,22,36),
(5,6,35,74,50,70,23,37),
(5,6,36,75,51,71,23,37),
(5,6,37,77,52,73,23,38),
(5,6,38,79,53,75,23,38),
(5,6,39,81,54,76,23,39),
(5,6,40,83,55,78,24,39),
(5,6,41,84,57,80,24,40),
(5,6,42,86,58,81,24,40),
(5,6,43,88,59,83,24,41),
(5,6,44,90,60,85,24,41),
(5,6,45,92,61,86,25,42),
(5,6,46,94,62,88,25,42),
(5,6,47,96,64,90,25,43),
(5,6,48,98,65,92,25,43),
(5,6,49,100,66,93,25,44),
(5,6,50,102,67,95,26,44),
(5,6,51,103,67,96,26,45),
(5,6,52,104,68,97,26,45),
(5,6,53,105,69,98,26,46),
(5,6,54,106,70,99,27,46),
(5,6,55,107,71,100,27,47),
(5,6,56,110,73,103,27,48),
(5,6,57,112,74,105,27,48),
(5,6,58,114,75,107,28,49),
(5,6,59,119,77,109,28,49),
(5,6,60,122,78,111,28,50),
(5,6,61,124,79,113,28,51),
(5,6,62,127,81,115,28,51),
(5,6,63,129,82,118,29,52),
(5,6,64,136,84,120,29,52),
(5,6,65,137,85,123,29,53),
(5,6,66,138,87,125,29,54),
(5,6,67,141,88,127,30,54),
(5,6,68,143,90,129,30,55),
(5,6,69,146,91,132,30,56),
(5,6,70,149,93,134,30,56),
(5,6,71,152,95,137,31,57),
(5,6,72,154,96,139,31,58),
(5,6,73,157,98,142,31,59),
(5,6,74,158,100,145,31,59),
(5,6,75,159,101,147,32,60),
(5,6,76,162,103,150,32,61),
(5,6,77,167,105,152,32,62),
(5,6,78,173,106,155,32,62),
(5,6,79,174,108,158,33,63),
(5,6,80,174,110,161,33,64),
(5,6,81,177,112,163,33,65),
(5,6,82,177,114,165,34,65),
(5,6,83,184,116,168,34,66),
(5,6,84,184,118,171,34,67),
(5,6,85,190,119,174,34,68),
(5,7,81,121,73,138,134,151),
(5,7,82,123,75,141,137,153),
(5,7,83,126,76,143,137,156),
(5,7,84,128,77,145,137,158),
(5,7,85,130,78,148,143,161),
(5,7,10,27,22,29,26,35),
(5,7,11,28,22,30,27,36),
(5,7,12,29,23,31,28,37),
(5,7,13,29,23,32,29,38),
(5,7,14,30,24,33,30,39),
(5,7,15,31,24,34,31,41),
(5,7,16,32,25,35,32,42),
(5,7,17,33,25,36,33,43),
(5,7,18,34,26,37,34,44),
(5,7,19,35,26,38,35,45),
(5,7,20,36,27,39,36,46),
(5,7,21,37,27,40,37,47),
(5,7,22,37,28,41,38,48),
(5,7,23,38,28,42,39,49),
(5,7,24,39,29,43,40,51),
(5,7,25,40,29,45,41,52),
(5,7,26,41,30,46,42,53),
(5,7,27,42,30,47,43,54),
(5,7,28,43,31,48,44,55),
(5,7,29,44,31,49,45,57),
(5,7,30,45,32,50,46,58),
(5,7,31,47,32,52,48,59),
(5,7,32,48,33,53,49,61),
(5,7,33,49,34,54,50,62),
(5,7,34,50,34,55,51,63),
(5,7,35,51,35,57,52,65),
(5,7,36,52,36,58,54,66),
(5,7,37,53,36,59,55,67),
(5,7,38,54,37,61,56,69),
(5,7,39,55,37,62,57,70),
(5,7,40,57,38,63,59,72),
(5,7,41,58,39,65,60,73),
(5,7,42,59,39,66,61,75),
(5,7,43,60,40,68,62,76),
(5,7,44,62,41,69,64,78),
(5,7,45,63,41,71,65,79),
(5,7,46,64,42,72,67,81),
(5,7,47,65,43,74,68,82),
(5,7,48,67,44,75,69,84),
(5,7,49,68,44,77,71,86),
(5,7,50,69,45,78,72,87),
(5,7,51,71,46,80,74,89),
(5,7,52,72,47,81,75,91),
(5,7,53,74,47,83,77,92),
(5,7,54,75,48,85,78,94),
(5,7,55,76,49,86,80,96),
(5,7,56,78,50,88,81,98),
(5,7,57,79,51,90,83,99),
(5,7,58,81,51,91,85,101),
(5,7,59,82,52,93,86,103),
(5,7,60,84,53,95,88,105),
(5,7,61,86,54,97,90,107),
(5,7,62,87,55,99,91,109),
(5,7,63,89,56,100,93,111),
(5,7,64,90,56,102,95,113),
(5,7,65,92,57,104,97,115),
(5,7,66,94,58,106,98,117),
(5,7,67,95,59,108,100,119),
(5,7,68,97,60,110,102,121),
(5,7,69,99,61,112,104,123),
(5,7,70,101,62,114,106,125),
(5,7,71,102,63,116,108,127),
(5,7,72,104,64,118,110,130),
(5,7,73,106,65,120,112,132),
(5,7,74,108,66,123,114,134),
(5,7,75,110,67,125,116,136),
(5,7,76,112,68,127,118,139),
(5,7,77,113,69,129,120,141),
(5,7,78,115,70,131,122,143),
(5,7,79,117,71,134,124,146),
(5,7,80,119,72,136,126,148),
(5,8,1,19,18,21,21,27),
(5,8,2,19,18,21,22,28),
(5,8,3,19,18,22,24,30),
(5,8,4,19,18,22,25,31),
(5,8,5,19,19,22,26,32),
(5,8,6,19,19,22,28,34),
(5,8,7,20,19,23,29,35),
(5,8,8,20,19,23,31,36),
(5,8,9,20,19,23,32,38),
(5,8,10,20,19,24,34,39),
(5,8,11,20,20,24,35,40),
(5,8,12,20,20,24,37,42),
(5,8,13,20,20,25,38,43),
(5,8,14,20,20,25,40,45),
(5,8,15,20,20,25,41,46),
(5,8,16,21,21,26,43,48),
(5,8,17,21,21,26,44,49),
(5,8,18,21,21,26,46,51),
(5,8,19,21,21,27,48,52),
(5,8,20,21,21,27,49,54),
(5,8,21,21,22,27,51,55),
(5,8,22,21,22,28,52,57),
(5,8,23,21,22,28,54,58),
(5,8,24,22,22,29,56,60),
(5,8,25,22,23,29,57,62),
(5,8,26,22,23,29,59,63),
(5,8,27,22,23,30,61,65),
(5,8,28,22,23,30,63,67),
(5,8,29,22,24,31,64,68),
(5,8,30,23,24,31,66,70),
(5,8,31,23,24,31,68,72),
(5,8,32,23,24,32,70,73),
(5,8,33,23,25,32,72,75),
(5,8,34,23,25,33,73,77),
(5,8,35,24,25,33,75,79),
(5,8,36,24,25,34,77,80),
(5,8,37,24,26,34,79,82),
(5,8,38,24,26,35,81,84),
(5,8,39,24,26,35,83,86),
(5,8,40,24,27,35,85,88),
(5,8,41,25,27,36,87,90),
(5,8,42,25,27,36,89,91),
(5,8,43,25,27,37,90,93),
(5,8,44,25,28,37,92,95),
(5,8,45,26,28,38,94,97),
(5,8,46,26,28,38,96,99),
(5,8,47,26,29,39,98,101),
(5,8,48,26,29,39,100,103),
(5,8,49,26,29,40,103,105),
(5,8,50,27,30,40,105,107),
(5,8,51,27,30,41,107,109),
(5,8,52,27,30,42,109,111),
(5,8,53,27,31,42,111,113),
(5,8,54,28,31,43,113,115),
(5,8,55,28,31,43,115,117),
(5,8,56,28,32,44,117,119),
(5,8,57,28,32,44,119,121),
(5,8,58,29,32,45,122,123),
(5,8,59,29,33,45,124,126),
(5,8,60,29,33,46,126,128),
(5,8,61,29,34,47,128,130),
(5,8,62,30,34,47,131,132),
(5,8,63,30,34,48,133,134),
(5,8,64,30,35,48,135,136),
(5,8,65,31,35,49,137,139),
(5,8,66,31,35,50,140,141),
(5,8,67,31,36,50,142,143),
(5,8,68,31,36,51,144,145),
(5,8,69,32,37,51,147,148),
(5,8,70,32,37,52,149,150),
(5,8,71,32,37,53,152,153),
(5,8,72,32,38,54,155,156),
(5,8,73,32,38,55,158,159),
(5,8,74,33,39,55,161,161),
(5,8,75,33,39,56,164,164),
(5,8,76,33,39,57,167,167),
(5,8,77,34,40,58,170,170),
(5,8,78,34,40,58,173,173),
(5,8,79,34,41,59,176,176),
(5,8,80,35,41,60,179,179),
(5,8,81,35,42,60,192,182),
(5,8,82,35,42,60,195,185),
(5,8,83,35,43,61,198,189),
(5,8,84,36,43,62,202,192),
(5,8,85,36,44,63,205,195),
(5,9,1,19,18,22,20,27),
(5,9,2,19,18,23,21,28),
(5,9,3,20,19,23,22,29),
(5,9,4,20,19,24,24,30),
(5,9,5,20,19,24,25,32),
(5,9,6,20,20,25,26,33),
(5,9,7,21,20,25,27,34),
(5,9,8,21,21,26,28,35),
(5,9,9,21,21,26,30,36),
(5,9,10,22,21,27,31,38),
(5,9,11,22,22,28,32,39),
(5,9,12,22,22,28,34,40),
(5,9,13,23,23,29,35,41),
(5,9,14,23,23,30,36,43),
(5,9,15,23,24,30,37,44),
(5,9,16,24,24,31,39,45),
(5,9,17,24,24,31,40,47),
(5,9,18,24,25,32,42,48),
(5,9,19,25,25,33,43,49),
(5,9,20,25,26,33,44,51),
(5,9,21,26,26,34,46,52),
(5,9,22,26,27,35,47,53),
(5,9,23,26,27,36,49,55),
(5,9,24,27,28,36,50,56),
(5,9,25,27,28,37,52,58),
(5,9,26,27,29,38,53,59),
(5,9,27,28,29,38,55,60),
(5,9,28,28,30,39,56,62),
(5,9,29,29,30,40,58,63),
(5,9,30,29,31,41,59,65),
(5,9,31,30,31,41,61,66),
(5,9,32,30,32,42,62,68),
(5,9,33,30,32,43,64,69),
(5,9,34,31,33,44,65,71),
(5,9,35,31,33,45,67,73),
(5,9,36,32,34,45,69,74),
(5,9,37,32,34,46,70,76),
(5,9,38,33,35,47,72,77),
(5,9,39,33,36,48,73,79),
(5,9,40,34,36,49,75,81),
(5,9,41,34,37,49,77,82),
(5,9,42,35,37,50,78,84),
(5,9,43,35,38,51,80,86),
(5,9,44,36,39,52,82,87),
(5,9,45,36,39,53,84,89),
(5,9,46,37,40,54,85,91),
(5,9,47,37,40,55,87,92),
(5,9,48,38,41,55,89,94),
(5,9,49,38,42,56,91,96),
(5,9,50,39,42,57,92,98),
(5,9,51,39,43,58,94,100),
(5,9,52,40,44,59,96,101),
(5,9,53,40,44,60,98,103),
(5,9,54,41,45,61,100,105),
(5,9,55,41,45,62,102,107),
(5,9,56,42,46,63,103,109),
(5,9,57,42,47,64,105,111),
(5,9,58,43,47,65,107,112),
(5,9,59,43,48,66,109,114),
(5,9,60,44,49,67,111,116),
(5,9,61,45,50,68,113,118),
(5,9,62,45,50,69,115,120),
(5,9,63,46,51,70,117,122),
(5,9,64,46,52,71,119,124),
(5,9,65,47,52,72,121,126),
(5,9,66,48,53,73,123,128),
(5,9,67,48,54,74,125,130),
(5,9,68,49,55,75,127,132),
(5,9,69,49,55,76,129,134),
(5,9,70,50,56,77,131,136),
(5,9,71,51,57,86,135,147),
(5,9,72,52,57,88,136,149),
(5,9,73,53,58,89,138,152),
(5,9,74,53,59,90,141,155),
(5,9,75,54,60,92,143,157),
(5,9,76,55,61,93,146,160),
(5,9,77,56,62,94,149,163),
(5,9,78,56,63,96,151,166),
(5,9,79,57,64,97,154,169),
(5,9,80,58,65,99,157,171),
(5,9,81,59,66,91,167,174),
(5,9,82,59,66,92,170,177),
(5,9,83,60,67,94,173,180),
(5,9,84,61,68,95,176,183),
(5,9,85,62,69,96,179,186),
(5,11,81,90,81,99,144,166),
(5,11,82,91,83,101,146,169),
(5,11,83,93,84,102,149,172),
(5,11,84,94,85,104,158,175),
(5,11,85,95,87,106,158,178),
(5,11,10,25,22,25,28,36),
(5,11,11,25,23,26,29,38),
(5,11,12,26,23,27,30,39),
(5,11,13,26,24,27,31,40),
(5,11,14,27,24,28,32,41),
(5,11,15,28,25,29,34,42),
(5,11,16,28,25,29,35,43),
(5,11,17,29,26,30,36,45),
(5,11,18,29,27,31,37,46),
(5,11,19,30,27,31,38,47),
(5,11,20,31,28,32,39,48),
(5,11,21,31,28,33,40,50),
(5,11,22,32,29,34,41,51),
(5,11,23,33,30,34,42,52),
(5,11,24,33,30,35,44,54),
(5,11,25,34,31,36,45,55),
(5,11,26,35,31,37,46,56),
(5,11,27,35,32,37,47,58),
(5,11,28,36,33,38,48,59),
(5,11,29,37,33,39,50,61),
(5,11,30,37,34,40,51,62),
(5,11,31,38,35,41,52,63),
(5,11,32,39,35,42,54,65),
(5,11,33,40,36,42,55,66),
(5,11,34,40,37,43,56,68),
(5,11,35,41,37,44,58,69),
(5,11,36,42,38,45,59,71),
(5,11,37,43,39,46,60,73),
(5,11,38,44,39,47,62,74),
(5,11,39,44,40,48,63,76),
(5,11,40,45,41,49,65,77),
(5,11,41,46,42,50,66,79),
(5,11,42,47,42,51,68,81),
(5,11,43,48,43,52,69,82),
(5,11,44,49,44,52,71,84),
(5,11,45,49,45,53,72,86),
(5,11,46,50,46,54,74,88),
(5,11,47,51,46,56,75,89),
(5,11,48,52,47,57,77,91),
(5,11,49,53,48,58,79,93),
(5,11,50,54,49,59,80,95),
(5,11,51,55,50,60,82,97),
(5,11,52,56,51,61,84,99),
(5,11,53,57,52,62,85,101),
(5,11,54,58,52,63,87,103),
(5,11,55,59,53,64,89,105),
(5,11,56,60,54,65,91,107),
(5,11,57,61,55,66,92,109),
(5,11,58,62,56,68,94,111),
(5,11,59,63,57,69,96,113),
(5,11,60,64,58,70,98,115),
(5,11,61,65,59,71,100,117),
(5,11,62,66,60,72,102,119),
(5,11,63,67,61,74,104,122),
(5,11,64,68,62,75,106,124),
(5,11,65,70,63,76,108,126),
(5,11,66,71,64,78,110,128),
(5,11,67,72,65,79,112,131),
(5,11,68,73,66,80,114,133),
(5,11,69,74,67,82,116,135),
(5,11,70,75,68,83,118,138),
(5,11,71,77,69,84,120,140),
(5,11,72,78,71,86,123,143),
(5,11,73,79,72,87,125,145),
(5,11,74,80,73,89,127,148),
(5,11,75,82,74,90,129,150),
(5,11,76,83,75,92,132,153),
(5,11,77,84,76,93,134,156),
(5,11,78,86,78,95,136,158),
(5,11,79,87,79,96,139,161),
(5,11,80,88,80,98,141,164),
(6,1,1,28,15,24,15,22),
(6,1,2,29,16,25,15,22),
(6,1,3,31,17,26,15,23),
(6,1,4,32,17,27,15,23),
(6,1,5,33,18,29,15,23),
(6,1,6,34,19,30,15,23),
(6,1,7,36,20,31,16,24),
(6,1,8,37,21,32,16,24),
(6,1,9,38,22,34,16,24),
(6,1,10,40,22,35,16,25),
(6,1,11,41,23,36,16,25),
(6,1,12,43,24,37,16,25),
(6,1,13,44,25,39,16,26),
(6,1,14,46,26,40,16,26),
(6,1,15,47,27,41,17,26),
(6,1,16,48,28,43,17,27),
(6,1,17,50,29,44,17,27),
(6,1,18,51,30,45,17,27),
(6,1,19,53,31,47,17,28),
(6,1,20,54,32,48,17,28),
(6,1,21,56,33,50,17,28),
(6,1,22,58,34,51,18,29),
(6,1,23,59,35,52,18,29),
(6,1,24,61,36,54,18,30),
(6,1,25,62,37,55,18,30),
(6,1,26,64,38,57,18,30),
(6,1,27,66,39,58,18,31),
(6,1,28,67,40,60,18,31),
(6,1,29,69,41,61,19,32),
(6,1,30,71,42,63,19,32),
(6,1,31,72,43,64,19,32),
(6,1,32,74,44,66,19,33),
(6,1,33,76,45,67,19,33),
(6,1,34,77,46,69,20,34),
(6,1,35,79,47,71,20,34),
(6,1,36,81,48,72,20,35),
(6,1,37,83,49,74,20,35),
(6,1,38,85,50,76,20,35),
(6,1,39,86,51,77,21,36),
(6,1,40,88,53,79,21,36),
(6,1,41,90,54,81,21,37),
(6,1,42,92,55,82,21,37),
(6,1,43,94,56,84,21,38),
(6,1,44,96,57,86,22,38),
(6,1,45,98,58,87,22,39),
(6,1,46,99,60,89,22,39),
(6,1,47,101,61,91,22,40),
(6,1,48,103,62,93,22,40),
(6,1,49,105,63,94,23,41),
(6,1,50,107,65,96,23,41),
(6,1,51,109,66,98,23,42),
(6,1,52,111,67,100,23,42),
(6,1,53,113,68,102,24,43),
(6,1,54,115,70,104,24,44),
(6,1,55,117,71,105,24,44),
(6,1,56,119,72,107,24,45),
(6,1,57,122,73,109,25,45),
(6,1,58,124,75,111,25,46),
(6,1,59,126,76,113,25,46),
(6,1,60,128,77,115,25,47),
(6,1,61,130,79,117,26,48),
(6,1,62,132,80,119,26,48),
(6,1,63,134,81,121,26,49),
(6,1,64,137,83,123,26,49),
(6,1,65,139,84,125,27,50),
(6,1,66,141,85,127,27,51),
(6,1,67,143,87,129,27,51),
(6,1,68,145,88,131,27,52),
(6,1,69,148,90,133,28,52),
(6,1,70,150,91,135,28,53),
(6,1,71,153,92,137,28,54),
(6,1,72,155,94,140,28,55),
(6,1,73,158,96,142,28,56),
(6,1,74,161,97,145,29,56),
(6,1,75,164,99,147,29,57),
(6,1,76,167,101,150,29,58),
(6,1,77,170,103,153,30,59),
(6,1,78,173,104,155,30,59),
(6,1,79,176,106,164,30,60),
(6,1,80,179,108,170,31,61),
(6,1,81,182,111,162,32,62),
(6,1,82,194,113,165,32,62),
(6,1,83,197,115,168,32,63),
(6,1,84,200,117,171,33,64),
(6,1,85,203,119,174,33,65),
(6,2,1,27,15,24,15,23),
(6,2,81,165,87,147,95,109),
(6,2,82,168,89,149,97,110),
(6,2,83,171,90,152,98,112),
(6,2,84,175,92,154,100,114),
(6,2,85,177,93,157,102,116),
(6,2,2,20,23,22,25,21),
(6,2,3,21,23,23,25,21),
(6,2,4,22,24,24,26,22),
(6,2,5,23,24,25,27,23),
(6,2,6,25,25,26,27,24),
(6,2,7,26,25,27,28,24),
(6,2,8,27,26,28,29,25),
(6,2,9,28,27,29,29,26),
(6,2,10,36,21,31,21,29),
(6,2,11,37,21,32,22,30),
(6,2,12,38,22,33,23,30),
(6,2,13,39,23,34,23,31),
(6,2,14,40,23,35,24,32),
(6,2,15,41,24,37,25,32),
(6,2,16,43,24,38,25,33),
(6,2,17,44,25,39,26,34),
(6,2,18,45,26,40,27,35),
(6,2,19,46,26,41,27,35),
(6,2,20,47,27,42,28,36),
(6,2,21,48,28,43,29,37),
(6,2,22,50,28,44,30,38),
(6,2,23,51,29,45,30,39),
(6,2,24,52,30,47,31,39),
(6,2,25,53,30,48,32,40),
(6,2,26,55,31,49,33,41),
(6,2,27,56,32,50,33,42),
(6,2,28,57,32,51,34,43),
(6,2,29,59,33,53,35,44),
(6,2,30,60,34,54,36,44),
(6,2,31,61,35,55,37,45),
(6,2,32,63,35,57,38,46),
(6,2,33,64,36,58,38,47),
(6,2,34,66,37,59,39,48),
(6,2,35,67,38,61,40,49),
(6,2,36,69,39,62,41,50),
(6,2,37,70,39,63,42,51),
(6,2,38,72,40,65,43,52),
(6,2,39,73,41,66,44,53),
(6,2,40,75,42,68,45,54),
(6,2,41,76,43,69,46,55),
(6,2,42,78,43,71,47,56),
(6,2,43,79,44,72,48,57),
(6,2,44,81,45,74,48,58),
(6,2,45,83,46,75,49,59),
(6,2,46,84,47,77,50,60),
(6,2,47,86,48,78,52,61),
(6,2,48,88,49,80,53,62),
(6,2,49,89,50,82,54,64),
(6,2,50,91,51,83,55,65),
(6,2,51,93,52,85,56,66),
(6,2,52,95,53,87,57,67),
(6,2,53,97,54,88,58,68),
(6,2,54,98,55,90,59,69),
(6,2,55,100,56,92,60,71),
(6,2,56,102,57,94,61,72),
(6,2,57,104,58,95,62,73),
(6,2,58,106,59,97,64,74),
(6,2,59,113,60,99,65,76),
(6,2,60,113,61,101,66,77),
(6,2,61,113,62,103,67,78),
(6,2,62,119,63,105,68,80),
(6,2,63,121,64,107,70,81),
(6,2,64,121,65,109,71,82),
(6,2,65,121,67,111,72,84),
(6,2,66,123,68,113,74,85),
(6,2,67,125,69,115,75,87),
(6,2,68,127,70,117,76,88),
(6,2,69,135,71,119,78,89),
(6,2,70,135,73,121,79,91),
(6,2,71,135,74,123,80,92),
(6,2,72,142,75,126,82,94),
(6,2,73,144,76,128,83,96),
(6,2,74,144,78,130,85,97),
(6,2,75,149,79,132,86,99),
(6,2,76,149,80,135,88,100),
(6,2,77,155,82,137,89,102),
(6,2,78,158,83,139,91,104),
(6,2,79,160,84,142,92,105),
(6,2,80,160,86,144,94,107),
(6,3,1,25,18,23,15,23),
(6,3,2,25,19,24,16,24),
(6,3,3,26,21,25,16,24),
(6,3,4,26,22,26,17,25),
(6,3,5,27,24,27,17,25),
(6,3,6,27,25,28,18,26),
(6,3,7,28,26,28,19,27),
(6,3,8,28,28,29,19,27),
(6,3,9,28,29,30,20,28),
(6,3,10,29,31,31,20,29),
(6,3,11,29,32,32,21,29),
(6,3,12,30,34,33,22,30),
(6,3,13,30,35,34,22,31),
(6,3,14,31,37,35,23,32),
(6,3,15,31,38,36,24,32),
(6,3,16,32,40,37,24,33),
(6,3,17,32,41,39,25,34),
(6,3,18,33,43,40,26,35),
(6,3,19,33,45,41,27,35),
(6,3,20,34,46,42,27,36),
(6,3,21,34,48,43,28,37),
(6,3,22,35,50,44,29,38),
(6,3,23,35,51,45,29,38),
(6,3,24,36,53,46,30,39),
(6,3,25,37,55,47,31,40),
(6,3,26,37,56,48,32,41),
(6,3,27,38,58,50,32,42),
(6,3,28,38,60,51,33,42),
(6,3,29,39,62,52,34,43),
(6,3,30,39,63,53,35,44),
(6,3,31,40,65,54,36,45),
(6,3,32,41,67,56,36,46),
(6,3,33,41,69,57,37,47),
(6,3,34,42,71,58,38,48),
(6,3,35,43,72,59,39,48),
(6,3,36,43,74,61,40,49),
(6,3,37,44,76,62,40,50),
(6,3,38,45,78,63,41,51),
(6,3,39,45,80,64,42,52),
(6,3,40,46,82,66,43,53),
(6,3,41,47,84,67,44,54),
(6,3,42,47,86,68,45,55),
(6,3,43,48,88,70,46,56),
(6,3,44,49,90,71,46,57),
(6,3,45,49,92,72,47,58),
(6,3,46,50,94,74,48,59),
(6,3,47,51,96,75,49,60),
(6,3,48,51,98,77,50,61),
(6,3,49,52,100,78,51,62),
(6,3,50,53,102,79,52,63),
(6,3,51,54,104,81,53,64),
(6,3,52,54,106,82,54,65),
(6,3,53,55,108,84,55,66),
(6,3,54,56,110,85,56,67),
(6,3,55,57,112,87,57,68),
(6,3,56,57,114,88,58,69),
(6,3,57,58,117,90,59,70),
(6,3,58,59,119,91,60,71),
(6,3,59,60,121,93,61,72),
(6,3,60,61,123,94,62,74),
(6,3,61,61,125,96,63,75),
(6,3,62,62,128,97,64,76),
(6,3,63,63,130,99,65,77),
(6,3,64,64,132,100,66,78),
(6,3,65,65,134,102,67,79),
(6,3,66,66,137,104,68,80),
(6,3,67,66,139,105,69,81),
(6,3,68,67,141,107,70,83),
(6,3,69,68,144,108,71,84),
(6,3,70,69,146,110,72,85),
(6,3,71,70,149,112,73,86),
(6,3,72,71,152,114,74,87),
(6,3,73,72,155,116,75,89),
(6,3,74,73,158,118,77,90),
(6,3,75,74,161,120,78,92),
(6,3,76,75,164,122,79,93),
(6,3,77,76,167,124,81,95),
(6,3,78,77,176,126,85,96),
(6,3,79,78,179,128,86,98),
(6,3,80,79,183,130,88,99),
(6,3,81,80,190,131,87,101),
(6,3,82,82,193,134,89,102),
(6,3,83,83,196,136,90,104),
(6,3,84,84,200,138,92,105),
(6,3,85,85,204,140,93,107),
(6,4,81,119,198,108,40,70),
(6,4,82,121,201,109,40,70),
(6,4,83,123,205,111,41,71),
(6,4,84,125,209,113,41,72),
(6,4,85,127,212,115,42,73),
(6,4,10,32,31,28,18,25),
(6,4,11,33,32,29,18,26),
(6,4,12,34,33,29,18,26),
(6,4,13,35,35,30,18,26),
(6,4,14,35,36,31,18,27),
(6,4,15,36,38,31,19,27),
(6,4,16,37,39,32,19,28),
(6,4,17,38,40,33,19,28),
(6,4,18,39,42,34,19,28),
(6,4,19,40,44,34,19,29),
(6,4,20,40,45,35,20,29),
(6,4,21,41,47,36,20,30),
(6,4,22,42,48,37,20,30),
(6,4,23,43,50,38,20,31),
(6,4,24,44,51,38,21,31),
(6,4,25,45,53,39,21,32),
(6,4,26,46,55,40,21,32),
(6,4,27,47,56,41,21,32),
(6,4,28,48,58,42,21,33),
(6,4,29,48,60,43,22,33),
(6,4,30,49,62,43,22,34),
(6,4,31,50,63,44,22,34),
(6,4,32,51,65,45,22,35),
(6,4,33,52,67,46,23,35),
(6,4,34,53,69,47,23,36),
(6,4,35,54,71,48,23,36),
(6,4,36,56,73,49,24,37),
(6,4,37,57,74,50,24,38),
(6,4,38,58,76,51,24,38),
(6,4,39,59,78,52,24,39),
(6,4,40,60,80,53,25,39),
(6,4,41,61,82,54,25,40),
(6,4,42,62,84,55,25,40),
(6,4,43,63,86,56,25,41),
(6,4,44,64,89,57,26,41),
(6,4,45,66,91,58,26,42),
(6,4,46,67,93,59,26,43),
(6,4,47,68,95,60,27,43),
(6,4,48,69,97,61,27,44),
(6,4,49,70,99,63,27,45),
(6,4,50,72,102,64,28,45),
(6,4,51,73,109,65,28,46),
(6,4,52,74,109,66,28,46),
(6,4,53,75,114,67,29,47),
(6,4,54,77,116,68,29,48),
(6,4,55,78,118,70,29,48),
(6,4,56,79,122,71,30,49),
(6,4,57,81,124,72,30,50),
(6,4,58,82,127,73,30,51),
(6,4,59,84,129,75,31,51),
(6,4,60,85,132,76,31,52),
(6,4,61,86,135,77,31,53),
(6,4,62,88,137,79,32,53),
(6,4,63,89,137,80,32,54),
(6,4,64,91,144,81,32,55),
(6,4,65,92,146,83,33,56),
(6,4,66,94,149,84,33,57),
(6,4,67,95,152,86,34,57),
(6,4,68,97,155,87,34,58),
(6,4,69,99,158,88,34,59),
(6,4,70,100,158,90,35,60),
(6,4,71,102,165,91,35,61),
(6,4,72,104,168,93,36,61),
(6,4,73,105,171,95,36,62),
(6,4,74,107,174,96,37,63),
(6,4,75,109,177,98,37,64),
(6,4,76,110,180,99,37,65),
(6,4,77,112,184,101,38,66),
(6,4,78,114,188,103,38,67),
(6,4,79,116,191,104,39,68),
(6,4,80,118,194,106,39,69),
(6,5,1,25,15,22,17,25),
(6,5,81,49,48,69,181,187),
(6,5,82,49,48,69,185,190),
(6,5,83,50,49,70,189,193),
(6,5,84,50,50,71,192,197),
(6,5,85,51,50,72,195,200),
(6,5,2,17,22,19,27,23),
(6,5,3,17,22,20,29,25),
(6,5,4,17,23,20,30,26),
(6,5,5,18,23,20,31,27),
(6,5,6,18,23,21,33,29),
(6,5,7,18,23,21,34,30),
(6,5,8,18,24,22,35,32),
(6,5,9,18,24,22,37,33),
(6,5,10,27,18,24,29,36),
(6,5,11,27,18,25,30,37),
(6,5,12,27,19,25,31,39),
(6,5,13,27,19,25,32,40),
(6,5,14,27,19,26,34,41),
(6,5,15,28,19,26,35,43),
(6,5,16,28,20,27,36,44),
(6,5,17,28,20,27,38,45),
(6,5,18,28,20,27,39,47),
(6,5,19,28,21,28,40,48),
(6,5,20,29,21,28,42,50),
(6,5,21,29,21,29,43,51),
(6,5,22,29,21,29,45,53),
(6,5,23,29,22,30,46,54),
(6,5,24,30,22,30,48,56),
(6,5,25,30,22,31,49,57),
(6,5,26,30,23,31,51,59),
(6,5,27,30,23,31,52,61),
(6,5,28,30,23,32,54,62),
(6,5,29,31,24,32,55,64),
(6,5,30,31,24,33,57,66),
(6,5,31,31,24,33,59,67),
(6,5,32,31,25,34,60,69),
(6,5,33,32,25,34,62,71),
(6,5,34,32,25,35,64,72),
(6,5,35,32,26,35,65,74),
(6,5,36,33,26,36,67,76),
(6,5,37,33,26,37,69,78),
(6,5,38,33,27,37,71,80),
(6,5,39,33,27,38,72,82),
(6,5,40,34,27,38,74,83),
(6,5,41,34,28,39,76,85),
(6,5,42,34,28,39,78,87),
(6,5,43,34,29,40,80,89),
(6,5,44,35,29,40,82,91),
(6,5,45,35,29,41,84,93),
(6,5,46,35,30,42,86,95),
(6,5,47,36,30,42,88,97),
(6,5,48,36,31,43,90,100),
(6,5,49,36,31,44,92,102),
(6,5,50,37,31,44,98,104),
(6,5,51,37,32,45,101,106),
(6,5,52,37,32,45,103,108),
(6,5,53,38,33,46,105,110),
(6,5,54,38,33,47,107,113),
(6,5,55,38,34,47,110,115),
(6,5,56,39,34,48,112,117),
(6,5,57,39,35,49,114,120),
(6,5,58,39,35,50,116,122),
(6,5,59,40,36,50,119,125),
(6,5,60,40,36,51,122,127),
(6,5,61,40,36,52,124,129),
(6,5,62,41,37,52,127,132),
(6,5,63,41,37,53,129,135),
(6,5,64,41,38,54,132,137),
(6,5,65,42,39,55,134,140),
(6,5,66,42,39,56,137,142),
(6,5,67,43,40,56,139,145),
(6,5,68,43,40,57,143,148),
(6,5,69,43,41,58,146,151),
(6,5,70,44,41,59,148,153),
(6,5,71,44,42,60,151,156),
(6,5,72,45,42,60,154,159),
(6,5,73,45,43,61,157,162),
(6,5,74,46,43,62,159,165),
(6,5,75,46,44,63,162,168),
(6,5,76,46,45,64,166,171),
(6,5,77,47,45,65,169,174),
(6,5,78,47,46,66,172,177),
(6,5,79,48,46,67,175,180),
(6,5,80,48,47,68,178,183),
(6,6,1,28,15,24,15,22),
(6,6,2,29,16,25,15,22),
(6,6,3,31,17,26,15,23),
(6,6,4,32,17,27,15,23),
(6,6,5,33,18,29,15,23),
(6,6,6,34,19,30,15,23),
(6,6,7,36,20,31,16,24),
(6,6,8,37,21,32,16,24),
(6,6,9,38,22,34,16,24),
(6,6,10,40,22,35,16,25),
(6,6,11,41,23,36,16,25),
(6,6,12,43,24,37,16,25),
(6,6,13,44,25,39,16,26),
(6,6,14,46,26,40,16,26),
(6,6,15,47,27,41,17,26),
(6,6,16,48,28,43,17,27),
(6,6,17,50,29,44,17,27),
(6,6,18,51,30,45,17,27),
(6,6,19,53,31,47,17,28),
(6,6,20,54,32,48,17,28),
(6,6,21,56,33,50,17,28),
(6,6,22,58,34,51,18,29),
(6,6,23,59,35,52,18,29),
(6,6,24,61,36,54,18,30),
(6,6,25,62,37,55,18,30),
(6,6,26,64,38,57,18,30),
(6,6,27,66,39,58,18,31),
(6,6,28,67,40,60,18,31),
(6,6,29,69,41,61,19,32),
(6,6,30,71,42,63,19,32),
(6,6,31,72,43,64,19,32),
(6,6,32,74,44,66,19,33),
(6,6,33,76,45,67,19,33),
(6,6,34,77,46,69,20,34),
(6,6,35,79,47,71,20,34),
(6,6,36,81,48,72,20,35),
(6,6,37,83,49,74,20,35),
(6,6,38,85,50,76,20,35),
(6,6,39,86,51,77,21,36),
(6,6,40,88,53,79,21,36),
(6,6,41,90,54,81,21,37),
(6,6,42,92,55,82,21,37),
(6,6,43,94,56,84,21,38),
(6,6,44,96,57,86,22,38),
(6,6,45,98,58,87,22,39),
(6,6,46,99,60,89,22,39),
(6,6,47,101,60,91,22,40),
(6,6,48,103,61,93,22,40),
(6,6,49,105,62,94,23,41),
(6,6,50,107,63,96,23,41),
(6,6,51,109,64,97,23,42),
(6,6,52,110,65,98,23,42),
(6,6,53,111,66,99,24,43),
(6,6,54,112,67,100,24,44),
(6,6,55,113,68,101,24,44),
(6,6,56,116,70,104,24,45),
(6,6,57,121,71,106,24,45),
(6,6,58,123,72,108,25,46),
(6,6,59,123,74,110,25,46),
(6,6,60,125,75,112,25,47),
(6,6,61,127,76,114,25,48),
(6,6,62,133,78,116,25,48),
(6,6,63,135,79,119,26,49),
(6,6,64,139,81,121,26,49),
(6,6,65,142,82,123,26,50),
(6,6,66,146,84,126,26,51),
(6,6,67,150,85,132,27,51),
(6,6,68,153,87,137,27,52),
(6,6,69,157,88,140,27,53),
(6,6,70,160,90,143,27,53),
(6,6,71,163,92,146,28,54),
(6,6,72,165,93,148,28,55),
(6,6,73,167,95,150,28,56),
(6,6,74,171,97,153,28,56),
(6,6,75,174,98,156,29,57),
(6,6,76,178,100,156,29,58),
(6,6,77,179,102,156,29,59),
(6,6,78,179,103,156,29,59),
(6,6,79,182,105,159,30,60),
(6,6,80,185,107,162,30,61),
(6,6,81,183,110,164,31,62),
(6,6,82,183,112,166,32,62),
(6,6,83,190,114,169,32,63),
(6,6,84,190,116,172,32,64),
(6,6,85,196,117,175,32,65),
(6,7,1,26,15,23,16,24),
(6,7,2,27,15,24,17,25),
(6,7,3,28,16,25,18,26),
(6,7,4,28,16,26,19,27),
(6,7,5,29,17,27,20,28),
(6,7,6,30,17,28,21,29),
(6,7,7,31,18,29,22,30),
(6,7,8,32,18,30,23,31),
(6,7,9,33,19,31,24,32),
(6,7,10,34,19,32,25,33),
(6,7,11,35,20,33,26,35),
(6,7,12,35,20,34,27,36),
(6,7,13,36,21,35,28,37),
(6,7,14,37,21,36,29,38),
(6,7,15,38,22,37,30,39),
(6,7,16,39,22,39,31,40),
(6,7,17,40,23,40,32,42),
(6,7,18,41,23,41,33,43),
(6,7,19,42,24,42,34,44),
(6,7,20,43,24,43,35,45),
(6,7,21,44,25,44,36,46),
(6,7,22,45,25,45,37,48),
(6,7,23,46,26,47,38,49),
(6,7,24,47,27,48,40,50),
(6,7,25,48,27,49,41,51),
(6,7,26,49,28,50,42,53),
(6,7,27,51,28,52,43,54),
(6,7,28,52,29,53,44,55),
(6,7,29,53,29,54,45,57),
(6,7,30,54,30,55,47,58),
(6,7,31,55,31,57,48,59),
(6,7,32,56,31,58,49,61),
(6,7,33,57,32,59,50,62),
(6,7,34,58,33,61,51,64),
(6,7,35,60,33,62,53,65),
(6,7,36,61,34,63,54,66),
(6,7,37,62,34,65,55,68),
(6,7,38,63,35,66,57,69),
(6,7,39,64,36,67,58,71),
(6,7,40,66,36,69,59,72),
(6,7,41,67,37,70,60,74),
(6,7,42,68,38,72,62,75),
(6,7,43,69,38,73,63,77),
(6,7,44,70,39,74,64,78),
(6,7,45,72,40,76,66,80),
(6,7,46,73,41,77,67,81),
(6,7,47,74,41,79,69,83),
(6,7,48,76,42,80,70,84),
(6,7,49,77,43,82,71,86),
(6,7,50,78,43,83,73,88),
(6,7,51,80,44,85,74,89),
(6,7,52,81,45,86,76,91),
(6,7,53,82,46,88,77,92),
(6,7,54,84,46,90,78,94),
(6,7,55,85,47,91,80,96),
(6,7,56,86,48,93,81,97),
(6,7,57,88,49,94,83,99),
(6,7,58,89,49,96,84,101),
(6,7,59,91,50,97,86,102),
(6,7,60,92,51,99,87,104),
(6,7,61,94,52,101,89,106),
(6,7,62,95,52,102,90,108),
(6,7,63,96,53,104,92,109),
(6,7,64,98,54,106,93,111),
(6,7,65,99,55,107,95,113),
(6,7,66,101,56,109,97,115),
(6,7,67,102,57,111,98,117),
(6,7,68,104,57,113,100,118),
(6,7,69,105,58,114,101,120),
(6,7,70,107,59,116,103,122),
(6,7,71,108,60,118,113,124),
(6,7,72,110,61,120,117,127),
(6,7,73,112,62,122,119,129),
(6,7,74,114,63,125,122,131),
(6,7,75,116,64,127,124,133),
(6,7,76,118,65,129,126,136),
(6,7,77,119,66,131,128,138),
(6,7,78,121,67,133,130,140),
(6,7,79,123,68,136,133,143),
(6,7,80,125,69,138,135,145),
(6,7,81,127,71,139,132,148),
(6,7,82,129,73,142,135,150),
(6,7,83,132,74,144,135,153),
(6,7,84,134,75,146,135,155),
(6,7,85,136,76,149,141,158),
(6,8,81,41,40,61,190,179),
(6,8,82,41,40,61,193,182),
(6,8,83,41,41,62,196,186),
(6,8,84,42,41,63,200,189),
(6,8,85,42,42,64,203,192),
(6,8,10,26,18,24,30,35),
(6,8,11,26,18,24,31,36),
(6,8,12,26,18,24,33,37),
(6,8,13,26,18,25,34,38),
(6,8,14,27,18,25,35,40),
(6,8,15,27,19,25,37,41),
(6,8,16,27,19,26,38,42),
(6,8,17,27,19,26,39,44),
(6,8,18,27,19,26,41,45),
(6,8,19,27,19,27,42,46),
(6,8,20,27,20,27,44,48),
(6,8,21,28,20,27,45,49),
(6,8,22,28,20,28,47,51),
(6,8,23,28,20,28,48,52),
(6,8,24,28,21,29,50,54),
(6,8,25,28,21,29,51,55),
(6,8,26,28,21,29,53,57),
(6,8,27,28,21,30,55,58),
(6,8,28,29,21,30,56,60),
(6,8,29,29,22,31,58,61),
(6,8,30,29,22,31,60,63),
(6,8,31,29,22,31,61,65),
(6,8,32,29,22,32,63,66),
(6,8,33,29,23,32,65,68),
(6,8,34,30,23,33,66,70),
(6,8,35,30,23,33,68,71),
(6,8,36,30,24,34,70,73),
(6,8,37,30,24,34,72,75),
(6,8,38,30,24,34,74,77),
(6,8,39,31,24,35,76,78),
(6,8,40,31,25,35,77,80),
(6,8,41,31,25,36,79,82),
(6,8,42,31,25,36,81,84),
(6,8,43,31,25,37,83,86),
(6,8,44,31,26,37,85,88),
(6,8,45,32,26,38,87,90),
(6,8,46,32,26,38,89,92),
(6,8,47,32,27,39,91,94),
(6,8,48,32,27,39,94,96),
(6,8,49,33,27,40,96,98),
(6,8,50,33,28,40,103,100),
(6,8,51,33,28,41,105,102),
(6,8,52,33,28,41,107,104),
(6,8,53,33,29,42,109,106),
(6,8,54,34,29,43,112,108),
(6,8,55,34,29,43,114,111),
(6,8,56,34,30,44,116,113),
(6,8,57,34,30,44,119,115),
(6,8,58,35,30,45,122,117),
(6,8,59,35,31,45,125,120),
(6,8,60,35,31,46,127,122),
(6,8,61,35,31,47,129,124),
(6,8,62,35,32,47,132,127),
(6,8,63,36,32,48,135,129),
(6,8,64,36,32,48,137,132),
(6,8,65,36,33,49,140,134),
(6,8,66,37,33,50,143,137),
(6,8,67,37,34,50,146,139),
(6,8,68,37,34,51,149,142),
(6,8,69,37,34,52,152,145),
(6,8,70,38,35,52,154,147),
(6,8,71,38,35,53,157,150),
(6,8,72,38,36,54,160,153),
(6,8,73,38,36,55,164,156),
(6,8,74,39,37,55,167,158),
(6,8,75,39,37,56,170,161),
(6,8,76,39,37,57,173,164),
(6,8,77,40,38,58,176,167),
(6,8,78,40,38,58,179,170),
(6,8,79,40,39,59,182,173),
(6,8,80,41,39,60,186,176),
(6,9,81,65,64,92,165,171),
(6,9,82,65,64,93,168,174),
(6,9,83,66,65,95,171,177),
(6,9,84,67,66,96,174,180),
(6,9,85,68,67,97,177,183),
(6,9,10,28,19,27,27,34),
(6,9,11,28,20,27,29,35),
(6,9,12,28,20,28,30,36),
(6,9,13,29,20,28,31,38),
(6,9,14,29,21,29,32,39),
(6,9,15,29,21,30,33,40),
(6,9,16,30,22,30,34,41),
(6,9,17,30,22,31,36,43),
(6,9,18,30,22,31,37,44),
(6,9,19,31,23,32,38,45),
(6,9,20,31,23,33,39,47),
(6,9,21,31,24,33,41,48),
(6,9,22,32,24,34,42,49),
(6,9,23,32,25,35,43,51),
(6,9,24,33,25,35,45,52),
(6,9,25,33,26,36,46,54),
(6,9,26,33,26,37,47,55),
(6,9,27,34,26,37,49,56),
(6,9,28,34,27,38,50,58),
(6,9,29,35,27,39,52,59),
(6,9,30,35,28,39,53,61),
(6,9,31,35,28,40,54,63),
(6,9,32,36,29,41,56,64),
(6,9,33,36,29,42,57,66),
(6,9,34,37,30,42,59,67),
(6,9,35,37,30,43,60,69),
(6,9,36,38,31,44,62,71),
(6,9,37,38,32,45,64,72),
(6,9,38,38,32,46,65,74),
(6,9,39,39,33,46,67,76),
(6,9,40,39,33,47,68,77),
(6,9,41,40,34,48,70,79),
(6,9,42,40,34,49,72,81),
(6,9,43,41,35,50,73,83),
(6,9,44,41,35,51,75,84),
(6,9,45,42,36,51,77,86),
(6,9,46,42,37,52,79,88),
(6,9,47,43,37,53,80,90),
(6,9,48,43,38,54,82,92),
(6,9,49,44,39,55,84,94),
(6,9,50,44,39,56,90,96),
(6,9,51,45,40,57,92,98),
(6,9,52,45,40,58,94,100),
(6,9,53,46,41,59,96,102),
(6,9,54,47,42,60,98,104),
(6,9,55,47,42,61,101,106),
(6,9,56,48,43,62,103,108),
(6,9,57,48,44,63,105,110),
(6,9,58,49,45,64,107,113),
(6,9,59,49,45,65,109,115),
(6,9,60,50,46,66,111,117),
(6,9,61,51,47,67,113,119),
(6,9,62,51,47,68,115,122),
(6,9,63,52,48,69,118,124),
(6,9,64,52,49,70,120,126),
(6,9,65,53,50,72,123,129),
(6,9,66,54,51,73,125,131),
(6,9,67,54,51,74,128,134),
(6,9,68,55,52,75,130,136),
(6,9,69,56,53,76,132,138),
(6,9,70,56,54,77,135,141),
(6,9,71,57,55,79,137,144),
(6,9,72,58,55,80,140,146),
(6,9,73,59,56,81,143,149),
(6,9,74,59,57,82,146,152),
(6,9,75,60,58,84,148,154),
(6,9,76,61,59,85,151,157),
(6,9,77,62,60,86,154,160),
(6,9,78,62,61,88,156,163),
(6,9,79,63,62,89,159,166),
(6,9,80,64,63,90,162,168),
(6,11,1,26,15,22,17,24),
(6,11,2,27,16,23,18,25),
(6,11,3,27,16,23,19,26),
(6,11,4,28,17,24,20,27),
(6,11,5,28,17,25,21,29),
(6,11,6,29,18,25,22,30),
(6,11,7,29,18,26,23,31),
(6,11,8,30,19,27,24,32),
(6,11,9,30,19,27,26,34),
(6,11,10,31,20,28,27,35),
(6,11,11,32,20,29,28,36),
(6,11,12,32,21,29,29,37),
(6,11,13,33,21,30,30,39),
(6,11,14,33,22,31,31,40),
(6,11,15,34,23,32,32,41),
(6,11,16,35,23,32,34,43),
(6,11,17,35,24,33,35,44),
(6,11,18,36,24,34,36,45),
(6,11,19,37,25,35,37,47),
(6,11,20,37,26,35,39,48),
(6,11,21,38,26,36,40,50),
(6,11,22,39,27,37,41,51),
(6,11,23,39,28,38,42,52),
(6,11,24,40,28,39,44,54),
(6,11,25,41,29,39,45,55),
(6,11,26,41,30,40,46,57),
(6,11,27,42,30,41,47,58),
(6,11,28,43,31,42,49,60),
(6,11,29,44,32,43,50,61),
(6,11,30,44,32,44,52,63),
(6,11,31,45,33,44,53,64),
(6,11,32,46,34,45,54,66),
(6,11,33,47,34,46,56,67),
(6,11,34,47,35,47,57,69),
(6,11,35,48,36,48,58,71),
(6,11,36,49,36,49,60,72),
(6,11,37,50,37,50,61,74),
(6,11,38,51,38,51,63,76),
(6,11,39,52,39,52,64,77),
(6,11,40,52,39,53,66,79),
(6,11,41,53,40,54,67,81),
(6,11,42,54,41,55,69,82),
(6,11,43,55,42,56,70,84),
(6,11,44,56,43,57,72,86),
(6,11,45,57,43,57,73,87),
(6,11,46,57,44,58,75,89),
(6,11,47,58,45,60,76,91),
(6,11,48,59,46,61,78,93),
(6,11,49,60,47,62,79,94),
(6,11,50,61,47,63,81,96),
(6,11,51,62,48,64,83,98),
(6,11,52,63,49,65,84,100),
(6,11,53,64,50,66,86,102),
(6,11,54,65,51,67,87,104),
(6,11,55,66,51,68,89,105),
(6,11,56,67,52,69,91,107),
(6,11,57,68,53,70,92,109),
(6,11,58,69,54,71,94,111),
(6,11,59,70,55,72,96,113),
(6,11,60,71,56,73,97,115),
(6,11,61,72,57,74,99,117),
(6,11,62,73,58,76,101,119),
(6,11,63,74,59,77,103,121),
(6,11,64,75,59,78,104,123),
(6,11,65,76,60,79,106,125),
(6,11,66,77,61,80,108,127),
(6,11,67,78,62,81,110,129),
(6,11,68,79,63,83,111,131),
(6,11,69,80,64,84,113,133),
(6,11,70,81,65,85,115,135),
(6,11,71,83,66,86,117,137),
(6,11,72,84,68,88,120,140),
(6,11,73,85,69,89,122,142),
(6,11,74,86,70,91,124,145),
(6,11,75,88,71,92,126,147),
(6,11,76,89,72,94,128,150),
(6,11,77,90,73,95,131,153),
(6,11,78,92,75,97,133,155),
(6,11,79,93,76,98,136,158),
(6,11,80,94,77,100,138,185),
(6,11,81,96,79,100,142,163),
(6,11,82,97,81,102,144,166),
(6,11,83,99,82,103,147,169),
(6,11,84,100,83,105,156,172),
(6,11,85,101,85,107,156,175),
(7,1,1,18,23,21,24,20),
(7,1,2,19,24,22,24,20),
(7,1,3,21,25,23,24,21),
(7,1,4,22,25,25,24,21),
(7,1,5,23,26,26,24,21),
(7,1,6,25,27,27,24,21),
(7,1,7,26,28,28,24,22),
(7,1,8,27,29,29,25,22),
(7,1,9,29,29,31,25,22),
(7,1,10,30,30,32,25,23),
(7,1,11,32,31,33,25,23),
(7,1,12,33,32,34,25,23),
(7,1,13,34,33,36,25,24),
(7,1,14,36,34,37,25,24),
(7,1,15,37,35,38,25,24),
(7,1,16,39,36,40,25,25),
(7,1,17,40,36,41,25,25),
(7,1,18,42,37,43,26,25),
(7,1,19,43,38,44,26,26),
(7,1,20,45,39,45,26,26),
(7,1,21,47,40,47,26,26),
(7,1,22,48,41,48,26,27),
(7,1,23,50,42,50,26,27),
(7,1,24,51,43,51,26,28),
(7,1,25,53,44,52,27,28),
(7,1,26,55,45,54,27,28),
(7,1,27,56,46,55,27,29),
(7,1,28,58,47,57,27,29),
(7,1,29,59,48,58,27,30),
(7,1,30,61,49,60,27,30),
(7,1,31,63,50,62,27,30),
(7,1,32,65,51,63,28,31),
(7,1,33,66,52,65,28,31),
(7,1,34,68,53,66,28,32),
(7,1,35,70,55,68,28,32),
(7,1,36,72,56,69,28,33),
(7,1,37,73,57,71,29,33),
(7,1,38,75,58,73,29,34),
(7,1,39,77,59,74,29,34),
(7,1,40,79,60,76,29,35),
(7,1,41,81,61,78,29,35),
(7,1,42,82,62,79,30,35),
(7,1,43,84,64,81,30,36),
(7,1,44,86,65,83,30,36),
(7,1,45,88,66,85,30,37),
(7,1,46,90,67,86,30,37),
(7,1,47,92,68,88,31,38),
(7,1,48,94,70,90,31,38),
(7,1,49,96,71,92,31,39),
(7,1,50,98,72,93,31,40),
(7,1,51,100,73,95,32,40),
(7,1,52,102,75,97,32,41),
(7,1,53,104,76,99,32,41),
(7,1,54,106,77,101,32,42),
(7,1,55,108,78,103,33,42),
(7,1,56,110,80,104,33,43),
(7,1,57,112,81,106,33,43),
(7,1,58,114,82,108,33,44),
(7,1,59,116,84,110,34,44),
(7,1,60,118,85,112,34,45),
(7,1,61,120,86,114,34,46),
(7,1,62,122,88,116,35,46),
(7,1,63,125,89,118,35,47),
(7,1,64,127,91,120,35,47),
(7,1,65,129,92,122,35,48),
(7,1,66,131,93,124,36,49),
(7,1,67,133,95,126,36,49),
(7,1,68,136,96,128,36,50),
(7,1,69,138,98,130,37,50),
(7,1,70,140,99,132,37,51),
(7,1,71,143,100,134,37,52),
(7,1,72,145,102,137,37,53),
(7,1,73,148,104,139,37,54),
(7,1,74,151,105,142,38,54),
(7,1,75,154,107,144,38,55),
(7,1,76,157,109,147,38,56),
(7,1,77,163,111,153,39,57),
(7,1,78,169,112,158,39,57),
(7,1,79,172,114,161,39,58),
(7,1,80,175,116,164,40,59),
(7,1,81,172,117,161,39,60),
(7,1,82,184,119,164,39,60),
(7,1,83,187,121,167,39,61),
(7,1,84,190,123,170,40,62),
(7,1,85,193,125,173,40,63),
(7,2,81,155,93,146,102,107),
(7,2,82,158,95,148,104,108),
(7,2,83,161,96,151,105,110),
(7,2,84,165,98,153,107,112),
(7,2,85,167,99,156,109,114),
(7,2,10,26,27,30,28,27),
(7,2,11,27,27,31,29,28),
(7,2,12,28,28,32,30,28),
(7,2,13,29,29,33,30,29),
(7,2,14,30,29,34,31,30),
(7,2,15,31,30,36,32,30),
(7,2,16,33,30,37,32,31),
(7,2,17,34,31,38,33,32),
(7,2,18,35,32,39,34,33),
(7,2,19,36,32,40,34,33),
(7,2,20,37,33,41,35,34),
(7,2,21,38,34,42,36,35),
(7,2,22,40,34,43,37,36),
(7,2,23,41,35,44,37,37),
(7,2,24,42,36,46,38,37),
(7,2,25,43,36,47,39,38),
(7,2,26,45,37,48,40,39),
(7,2,27,46,38,49,40,40),
(7,2,28,47,38,50,41,41),
(7,2,29,49,39,52,42,42),
(7,2,30,50,40,53,43,42),
(7,2,31,51,41,54,44,43),
(7,2,32,53,41,56,45,44),
(7,2,33,54,42,57,45,45),
(7,2,34,56,43,58,46,46),
(7,2,35,57,44,60,47,47),
(7,2,36,59,45,61,48,48),
(7,2,37,60,45,62,49,49),
(7,2,38,62,46,64,50,50),
(7,2,39,63,47,65,51,51),
(7,2,40,65,48,67,52,52),
(7,2,41,66,49,68,53,53),
(7,2,42,68,49,70,54,54),
(7,2,43,69,50,71,55,55),
(7,2,44,71,51,73,55,56),
(7,2,45,73,52,74,56,57),
(7,2,46,74,53,76,57,58),
(7,2,47,76,54,77,59,59),
(7,2,48,78,55,79,60,60),
(7,2,49,79,56,81,61,62),
(7,2,50,81,57,82,62,63),
(7,2,51,83,58,84,63,64),
(7,2,52,85,59,86,64,65),
(7,2,53,87,60,87,65,66),
(7,2,54,88,61,89,66,67),
(7,2,55,90,62,91,67,69),
(7,2,56,92,63,93,68,70),
(7,2,57,94,64,94,69,71),
(7,2,58,96,65,96,71,72),
(7,2,59,103,66,98,72,74),
(7,2,60,103,67,100,73,75),
(7,2,61,103,68,102,74,76),
(7,2,62,109,69,104,75,78),
(7,2,63,111,70,106,77,79),
(7,2,64,111,71,108,78,80),
(7,2,65,111,73,110,79,82),
(7,2,66,113,74,112,81,83),
(7,2,67,115,75,114,82,85),
(7,2,68,117,76,116,83,86),
(7,2,69,125,77,118,85,87),
(7,2,70,125,79,120,86,89),
(7,2,71,125,80,122,87,90),
(7,2,72,132,81,125,89,92),
(7,2,73,134,82,127,90,94),
(7,2,74,134,84,129,92,95),
(7,2,75,139,85,131,93,97),
(7,2,76,139,86,134,95,98),
(7,2,77,145,88,136,96,100),
(7,2,78,148,89,138,98,102),
(7,2,79,150,90,141,99,103),
(7,2,80,150,92,143,101,105),
(7,3,81,70,196,130,94,99),
(7,3,82,72,199,133,96,100),
(7,3,83,73,202,135,97,102),
(7,3,84,74,206,137,99,103),
(7,3,85,75,210,139,100,105),
(7,3,10,19,36,28,28,26),
(7,3,11,19,37,29,28,27),
(7,3,12,20,39,30,29,28),
(7,3,13,20,40,31,30,28),
(7,3,14,21,41,32,30,29),
(7,3,15,21,43,33,31,29),
(7,3,16,22,44,34,31,30),
(7,3,17,22,45,35,32,31),
(7,3,18,23,47,36,33,32),
(7,3,19,23,48,37,33,32),
(7,3,20,24,50,38,34,33),
(7,3,21,24,51,39,35,34),
(7,3,22,25,53,40,35,34),
(7,3,23,25,54,41,36,35),
(7,3,24,26,56,42,37,36),
(7,3,25,26,57,43,37,37),
(7,3,26,27,59,44,38,37),
(7,3,27,27,61,45,39,38),
(7,3,28,28,62,46,39,39),
(7,3,29,28,64,47,40,40),
(7,3,30,29,66,48,41,40),
(7,3,31,29,67,50,42,41),
(7,3,32,30,69,51,42,42),
(7,3,33,31,71,52,43,43),
(7,3,34,31,72,53,44,44),
(7,3,35,32,74,54,45,45),
(7,3,36,33,76,56,46,46),
(7,3,37,33,78,57,46,46),
(7,3,38,34,80,58,47,47),
(7,3,39,34,82,59,48,48),
(7,3,40,35,83,61,49,49),
(7,3,41,36,85,62,50,50),
(7,3,42,36,87,63,50,51),
(7,3,43,37,89,64,51,52),
(7,3,44,38,91,66,52,53),
(7,3,45,38,93,67,53,54),
(7,3,46,39,95,69,54,55),
(7,3,47,40,97,70,55,56),
(7,3,48,41,100,71,56,57),
(7,3,49,41,102,73,57,58),
(7,3,50,42,104,74,58,59),
(7,3,51,43,106,76,59,60),
(7,3,52,44,108,77,60,61),
(7,3,53,44,110,79,61,62),
(7,3,54,45,113,80,62,63),
(7,3,55,46,115,82,63,64),
(7,3,56,47,117,83,64,65),
(7,3,57,48,120,85,65,67),
(7,3,58,48,122,87,66,68),
(7,3,59,49,125,88,67,69),
(7,3,60,50,127,90,68,70),
(7,3,61,51,129,92,69,71),
(7,3,62,52,132,93,70,72),
(7,3,63,53,135,95,71,74),
(7,3,64,53,137,97,72,75),
(7,3,65,54,140,99,74,76),
(7,3,66,55,142,100,75,77),
(7,3,67,56,145,102,76,79),
(7,3,68,57,148,104,77,80),
(7,3,69,58,151,106,78,81),
(7,3,70,59,153,108,80,83),
(7,3,71,60,156,110,81,84),
(7,3,72,61,159,112,82,85),
(7,3,73,62,162,114,83,87),
(7,3,74,63,165,116,85,88),
(7,3,75,64,168,118,86,90),
(7,3,76,65,179,120,87,91),
(7,3,77,66,182,122,89,93),
(7,3,78,67,185,124,90,94),
(7,3,79,68,188,126,91,96),
(7,3,80,69,192,128,93,97),
(7,4,1,16,26,20,24,20),
(7,4,2,17,27,21,24,20),
(7,4,3,18,29,21,24,21),
(7,4,4,18,30,22,24,21),
(7,4,5,19,32,23,25,21),
(7,4,6,20,33,24,25,22),
(7,4,7,21,35,24,25,22),
(7,4,8,22,36,25,25,23),
(7,4,9,22,38,26,25,23),
(7,4,10,23,39,26,25,23),
(7,4,11,24,41,27,25,24),
(7,4,12,25,42,28,26,24),
(7,4,13,26,44,29,26,25),
(7,4,14,27,46,30,26,25),
(7,4,15,28,47,30,26,25),
(7,4,16,28,49,31,26,26),
(7,4,17,29,50,32,27,26),
(7,4,18,30,52,33,27,27),
(7,4,19,31,54,34,27,27),
(7,4,20,32,56,35,27,28),
(7,4,21,33,57,35,27,28),
(7,4,22,34,59,36,28,29),
(7,4,23,35,61,37,28,29),
(7,4,24,36,62,38,28,30),
(7,4,25,37,64,39,28,30),
(7,4,26,38,66,40,29,31),
(7,4,27,39,68,41,29,31),
(7,4,28,40,70,42,29,32),
(7,4,29,41,72,43,29,32),
(7,4,30,42,73,43,29,33),
(7,4,31,43,75,44,30,33),
(7,4,32,44,77,45,30,34),
(7,4,33,45,79,46,30,34),
(7,4,34,46,81,47,31,35),
(7,4,35,47,83,48,31,35),
(7,4,36,48,85,49,31,36),
(7,4,37,49,87,50,31,36),
(7,4,38,50,89,51,32,37),
(7,4,39,51,91,52,32,38),
(7,4,40,53,93,53,32,38),
(7,4,41,54,95,54,33,39),
(7,4,42,55,97,55,33,39),
(7,4,43,56,99,56,33,40),
(7,4,44,57,101,57,33,40),
(7,4,45,58,103,59,34,41),
(7,4,46,59,105,60,34,42),
(7,4,47,61,107,61,34,42),
(7,4,48,62,110,62,35,43),
(7,4,49,63,112,63,35,44),
(7,4,50,64,114,64,35,44),
(7,4,51,65,116,65,36,45),
(7,4,52,67,118,66,36,45),
(7,4,53,68,121,67,36,46),
(7,4,54,69,123,69,37,47),
(7,4,55,70,125,70,37,47),
(7,4,56,72,127,71,37,48),
(7,4,57,73,130,72,38,49),
(7,4,58,74,132,73,38,49),
(7,4,59,75,134,74,39,50),
(7,4,60,77,137,76,39,51),
(7,4,61,78,139,77,39,51),
(7,4,62,79,141,78,40,52),
(7,4,63,81,144,79,40,53),
(7,4,64,82,146,80,41,54),
(7,4,65,83,149,82,41,54),
(7,4,66,85,151,83,41,55),
(7,4,67,86,154,84,42,56),
(7,4,68,87,156,85,42,57),
(7,4,69,89,158,87,43,57),
(7,4,70,90,161,88,43,58),
(7,4,71,92,164,89,44,59),
(7,4,72,94,167,91,45,59),
(7,4,73,95,170,93,45,60),
(7,4,74,97,173,94,46,61),
(7,4,75,99,176,96,46,62),
(7,4,76,100,179,97,46,63),
(7,4,77,102,182,102,47,64),
(7,4,78,104,186,105,47,65),
(7,4,79,106,189,106,48,66),
(7,4,80,108,192,108,48,67),
(7,4,81,109,204,107,47,68),
(7,4,82,111,207,108,47,68),
(7,4,83,113,211,110,48,69),
(7,4,84,115,215,112,48,70),
(7,4,85,117,218,114,49,71),
(7,5,1,15,23,19,25,23),
(7,5,81,39,54,68,188,185),
(7,5,82,39,54,68,192,188),
(7,5,83,40,55,69,196,191),
(7,5,84,40,56,70,199,195),
(7,5,85,41,56,71,202,198),
(7,5,2,20,20,20,23,24),
(7,5,3,20,20,21,25,26),
(7,5,4,20,21,21,26,27),
(7,5,5,21,21,21,27,28),
(7,5,6,21,21,22,29,30),
(7,5,7,21,21,22,30,31),
(7,5,8,21,22,23,31,33),
(7,5,9,21,22,23,33,34),
(7,5,10,17,24,23,36,34),
(7,5,11,17,24,24,37,35),
(7,5,12,17,25,24,38,37),
(7,5,13,17,25,24,39,38),
(7,5,14,17,25,25,41,39),
(7,5,15,18,25,25,42,41),
(7,5,16,18,26,26,43,42),
(7,5,17,18,26,26,45,43),
(7,5,18,18,26,26,46,45),
(7,5,19,18,27,27,47,46),
(7,5,20,19,27,27,49,48),
(7,5,21,19,27,28,50,49),
(7,5,22,19,27,28,52,51),
(7,5,23,19,28,29,53,52),
(7,5,24,20,28,29,55,54),
(7,5,25,20,28,30,56,55),
(7,5,26,20,29,30,58,57),
(7,5,27,20,29,30,59,59),
(7,5,28,20,29,31,61,60),
(7,5,29,21,30,31,62,62),
(7,5,30,21,30,32,64,64),
(7,5,31,21,30,32,66,65),
(7,5,32,21,31,33,67,67),
(7,5,33,22,31,33,69,69),
(7,5,34,22,31,34,71,70),
(7,5,35,22,32,34,72,72),
(7,5,36,23,32,35,74,74),
(7,5,37,23,32,36,76,76),
(7,5,38,23,33,36,78,78),
(7,5,39,23,33,37,79,80),
(7,5,40,24,33,37,81,81),
(7,5,41,24,34,38,83,83),
(7,5,42,24,34,38,85,85),
(7,5,43,24,35,39,87,87),
(7,5,44,25,35,39,89,89),
(7,5,45,25,35,40,91,91),
(7,5,46,25,36,41,93,93),
(7,5,47,26,36,41,95,95),
(7,5,48,26,37,42,97,98),
(7,5,49,26,37,43,99,100),
(7,5,50,27,37,43,105,102),
(7,5,51,27,38,44,108,104),
(7,5,52,27,38,44,110,106),
(7,5,53,28,39,45,112,108),
(7,5,54,28,39,46,114,111),
(7,5,55,28,40,46,117,113),
(7,5,56,29,40,47,119,115),
(7,5,57,29,41,48,121,118),
(7,5,58,29,41,49,123,120),
(7,5,59,30,42,49,126,123),
(7,5,60,30,42,50,129,125),
(7,5,61,30,42,51,131,127),
(7,5,62,31,43,51,134,130),
(7,5,63,31,43,52,136,133),
(7,5,64,31,44,53,139,135),
(7,5,65,32,45,54,141,138),
(7,5,66,32,45,55,144,140),
(7,5,67,33,46,55,146,143),
(7,5,68,33,46,56,150,146),
(7,5,69,33,47,57,153,149),
(7,5,70,34,47,58,155,151),
(7,5,71,34,48,59,158,154),
(7,5,72,35,48,59,161,157),
(7,5,73,35,49,60,164,160),
(7,5,74,36,49,61,166,163),
(7,5,75,36,50,62,169,166),
(7,5,76,36,51,63,173,169),
(7,5,77,37,51,64,176,172),
(7,5,78,37,52,65,179,175),
(7,5,79,38,52,66,182,178),
(7,5,80,38,53,67,185,181),
(7,6,1,18,23,21,24,20),
(7,6,2,19,24,22,24,20),
(7,6,3,21,25,23,24,21),
(7,6,4,22,25,25,24,21),
(7,6,5,23,26,26,24,21),
(7,6,6,25,27,27,24,21),
(7,6,7,26,28,28,24,22),
(7,6,8,27,29,29,25,22),
(7,6,9,29,29,31,25,22),
(7,6,10,30,30,32,25,23),
(7,6,11,32,31,33,25,23),
(7,6,12,33,32,34,25,23),
(7,6,13,34,33,36,25,24),
(7,6,14,36,34,37,25,24),
(7,6,15,37,35,38,25,24),
(7,6,16,39,36,40,25,25),
(7,6,17,40,36,41,25,25),
(7,6,18,42,37,43,26,25),
(7,6,19,43,38,44,26,26),
(7,6,20,45,39,45,26,26),
(7,6,21,47,40,47,26,26),
(7,6,22,48,41,48,26,27),
(7,6,23,50,42,50,26,27),
(7,6,24,51,43,51,26,28),
(7,6,25,53,44,52,27,28),
(7,6,26,55,45,54,27,28),
(7,6,27,56,46,55,27,29),
(7,6,28,58,47,57,27,29),
(7,6,29,59,48,58,27,30),
(7,6,30,61,49,60,27,30),
(7,6,31,63,50,62,27,30),
(7,6,32,65,51,63,28,31),
(7,6,33,66,52,65,28,31),
(7,6,34,68,53,66,28,32),
(7,6,35,70,55,68,28,32),
(7,6,36,72,56,69,28,33),
(7,6,37,73,57,71,29,33),
(7,6,38,75,58,73,29,34),
(7,6,39,77,59,74,29,34),
(7,6,40,79,60,76,29,35),
(7,6,41,81,61,78,29,35),
(7,6,42,82,62,79,30,35),
(7,6,43,84,64,81,30,36),
(7,6,44,86,65,83,30,36),
(7,6,45,88,66,85,30,37),
(7,6,46,90,67,86,30,37),
(7,6,47,92,68,88,31,38),
(7,6,48,94,70,90,31,38),
(7,6,49,96,71,92,31,39),
(7,6,50,98,72,93,31,40),
(7,6,51,99,72,93,32,40),
(7,6,52,100,73,95,32,41),
(7,6,53,101,74,96,32,41),
(7,6,54,102,75,97,32,42),
(7,6,55,103,76,98,33,42),
(7,6,56,106,78,101,33,43),
(7,6,57,111,79,103,33,43),
(7,6,58,113,80,105,34,44),
(7,6,59,116,82,107,34,44),
(7,6,60,118,83,109,34,45),
(7,6,61,120,84,111,34,46),
(7,6,62,127,86,119,34,46),
(7,6,63,129,87,122,35,47),
(7,6,64,132,89,125,35,47),
(7,6,65,135,90,127,35,48),
(7,6,66,137,92,130,35,49),
(7,6,67,138,93,130,36,49),
(7,6,68,140,95,131,36,50),
(7,6,69,142,96,131,36,51),
(7,6,70,145,98,132,36,51),
(7,6,71,148,100,135,37,52),
(7,6,72,150,101,137,37,53),
(7,6,73,153,103,140,37,54),
(7,6,74,154,105,142,37,54),
(7,6,75,155,106,145,38,55),
(7,6,76,158,108,151,38,56),
(7,6,77,161,110,157,38,57),
(7,6,78,164,111,162,38,57),
(7,6,79,167,113,165,39,58),
(7,6,80,170,115,168,39,59),
(7,6,81,173,116,163,38,60),
(7,6,82,173,118,165,39,60),
(7,6,83,180,120,168,39,61),
(7,6,84,180,122,171,39,62),
(7,6,85,186,123,174,39,63),
(7,7,81,117,77,138,139,146),
(7,7,82,119,79,141,142,148),
(7,7,83,122,80,143,142,151),
(7,7,84,124,81,145,142,153),
(7,7,85,126,82,148,148,156),
(7,7,10,23,26,29,31,30),
(7,7,11,24,26,30,32,31),
(7,7,12,25,27,31,33,32),
(7,7,13,25,27,32,34,33),
(7,7,14,26,28,33,35,34),
(7,7,15,27,28,34,36,36),
(7,7,16,28,29,35,37,37),
(7,7,17,29,29,36,38,38),
(7,7,18,30,30,37,39,39),
(7,7,19,31,30,38,40,40),
(7,7,20,32,31,39,41,41),
(7,7,21,33,31,40,42,42),
(7,7,22,33,32,41,43,43),
(7,7,23,34,32,42,44,44),
(7,7,24,35,33,43,45,46),
(7,7,25,36,33,45,46,47),
(7,7,26,37,34,46,47,48),
(7,7,27,38,34,47,48,49),
(7,7,28,39,35,48,49,50),
(7,7,29,40,35,49,50,52),
(7,7,30,41,36,50,51,53),
(7,7,31,43,36,52,53,54),
(7,7,32,44,37,53,54,56),
(7,7,33,45,38,54,55,57),
(7,7,34,46,38,55,56,58),
(7,7,35,47,39,57,57,60),
(7,7,36,48,40,58,59,61),
(7,7,37,49,40,59,60,62),
(7,7,38,50,41,61,61,64),
(7,7,39,51,41,62,62,65),
(7,7,40,53,42,63,64,67),
(7,7,41,54,43,65,65,68),
(7,7,42,55,43,66,66,70),
(7,7,43,56,44,68,67,71),
(7,7,44,58,45,69,69,73),
(7,7,45,59,45,71,70,74),
(7,7,46,60,46,72,72,76),
(7,7,47,61,47,74,73,77),
(7,7,48,63,48,75,74,79),
(7,7,49,64,48,77,76,81),
(7,7,50,65,49,78,77,82),
(7,7,51,67,50,80,79,84),
(7,7,52,68,51,81,80,86),
(7,7,53,70,51,83,82,87),
(7,7,54,71,52,85,83,89),
(7,7,55,72,53,86,85,91),
(7,7,56,74,54,88,86,93),
(7,7,57,75,55,90,88,94),
(7,7,58,77,55,91,90,96),
(7,7,59,78,56,93,91,98),
(7,7,60,80,57,95,93,100),
(7,7,61,82,58,97,95,102),
(7,7,62,83,59,99,96,104),
(7,7,63,85,60,100,98,106),
(7,7,64,86,60,102,100,108),
(7,7,65,88,61,104,102,110),
(7,7,66,90,62,106,103,112),
(7,7,67,91,63,108,105,114),
(7,7,68,93,64,110,107,116),
(7,7,69,95,65,112,109,118),
(7,7,70,97,66,114,111,120),
(7,7,71,98,67,116,113,122),
(7,7,72,100,68,118,115,125),
(7,7,73,102,69,120,117,127),
(7,7,74,104,70,123,119,129),
(7,7,75,106,71,125,121,131),
(7,7,76,108,72,127,123,134),
(7,7,77,109,73,129,125,136),
(7,7,78,111,74,131,127,138),
(7,7,79,113,75,134,129,141),
(7,7,80,115,76,136,131,143),
(7,8,1,15,23,19,27,22),
(7,8,2,15,23,19,28,23),
(7,8,3,15,23,20,30,25),
(7,8,4,15,23,20,31,26),
(7,8,5,15,24,20,32,27),
(7,8,6,15,24,20,34,29),
(7,8,7,16,24,21,35,30),
(7,8,8,16,24,21,37,31),
(7,8,9,16,24,21,38,33),
(7,8,10,16,24,22,40,34),
(7,8,11,16,25,22,41,36),
(7,8,12,16,25,22,42,37),
(7,8,13,16,25,23,44,38),
(7,8,14,16,25,23,45,40),
(7,8,15,17,25,23,47,41),
(7,8,16,17,25,24,49,43),
(7,8,17,17,26,24,50,44),
(7,8,18,17,26,24,52,46),
(7,8,19,17,26,25,53,47),
(7,8,20,17,26,25,55,49),
(7,8,21,17,26,26,57,51),
(7,8,22,18,27,26,58,52),
(7,8,23,18,27,26,60,54),
(7,8,24,18,27,27,61,55),
(7,8,25,18,27,27,63,57),
(7,8,26,18,28,27,65,59),
(7,8,27,18,28,28,67,60),
(7,8,28,18,28,28,68,62),
(7,8,29,19,28,29,70,64),
(7,8,30,19,29,29,72,65),
(7,8,31,19,29,30,74,67),
(7,8,32,19,29,30,75,69),
(7,8,33,19,29,30,77,70),
(7,8,34,20,30,31,79,72),
(7,8,35,20,30,31,81,74),
(7,8,36,20,30,32,83,76),
(7,8,37,20,30,32,85,78),
(7,8,38,20,31,33,86,79),
(7,8,39,21,31,33,88,81),
(7,8,40,21,31,34,90,83),
(7,8,41,21,32,34,92,85),
(7,8,42,21,32,35,94,87),
(7,8,43,21,32,35,96,89),
(7,8,44,22,32,36,98,91),
(7,8,45,22,33,36,100,92),
(7,8,46,22,33,37,102,94),
(7,8,47,22,33,37,104,96),
(7,8,48,22,34,38,106,98),
(7,8,49,23,34,38,108,100),
(7,8,50,23,34,39,110,102),
(7,8,51,23,35,39,112,104),
(7,8,52,23,35,40,114,106),
(7,8,53,24,35,40,117,108),
(7,8,54,24,36,41,119,110),
(7,8,55,24,36,41,121,112),
(7,8,56,24,37,42,123,114),
(7,8,57,25,37,42,125,117),
(7,8,58,25,37,43,127,119),
(7,8,59,25,38,43,130,121),
(7,8,60,25,38,44,132,123),
(7,8,61,26,38,45,134,125),
(7,8,62,26,39,45,136,127),
(7,8,63,26,39,46,139,129),
(7,8,64,26,40,46,141,132),
(7,8,65,27,40,47,143,134),
(7,8,66,27,40,48,146,136),
(7,8,67,27,41,48,148,138),
(7,8,68,27,41,49,150,140),
(7,8,69,28,42,49,153,143),
(7,8,70,28,42,50,155,145),
(7,8,71,28,42,51,168,148),
(7,8,72,28,43,52,168,151),
(7,8,73,28,43,53,171,154),
(7,8,74,29,44,53,174,156),
(7,8,75,29,44,54,177,159),
(7,8,76,29,44,55,180,162),
(7,8,77,30,45,56,183,165),
(7,8,78,30,45,56,186,168),
(7,8,79,30,46,57,190,171),
(7,8,80,31,46,58,193,174),
(7,8,81,31,46,60,197,177),
(7,8,82,31,46,60,200,180),
(7,8,83,31,47,61,203,184),
(7,8,84,32,47,62,207,187),
(7,8,85,32,48,63,210,190),
(7,9,1,15,23,20,26,22),
(7,9,2,15,23,21,27,23),
(7,9,3,16,24,21,28,24),
(7,9,4,16,24,22,29,25),
(7,9,5,16,24,22,31,27),
(7,9,6,17,25,23,32,28),
(7,9,7,17,25,23,33,29),
(7,9,8,17,26,24,34,30),
(7,9,9,17,26,25,36,31),
(7,9,10,18,26,25,37,33),
(7,9,11,18,27,26,38,34),
(7,9,12,18,27,26,39,35),
(7,9,13,19,28,27,41,36),
(7,9,14,19,28,28,42,38),
(7,9,15,20,28,28,43,39),
(7,9,16,20,29,29,45,40),
(7,9,17,20,29,30,46,42),
(7,9,18,21,30,30,47,43),
(7,9,19,21,30,31,49,44),
(7,9,20,21,31,32,50,46),
(7,9,21,22,31,32,51,47),
(7,9,22,22,31,33,53,49),
(7,9,23,23,32,34,54,50),
(7,9,24,23,32,34,56,51),
(7,9,25,23,33,35,57,53),
(7,9,26,24,33,36,59,54),
(7,9,27,24,34,37,60,56),
(7,9,28,25,34,37,62,57),
(7,9,29,25,35,38,63,59),
(7,9,30,25,35,39,65,60),
(7,9,31,26,36,40,66,62),
(7,9,32,26,36,40,68,63),
(7,9,33,27,37,41,69,65),
(7,9,34,27,38,42,71,66),
(7,9,35,28,38,43,73,68),
(7,9,36,28,39,43,74,69),
(7,9,37,28,39,44,76,71),
(7,9,38,29,40,45,77,73),
(7,9,39,29,40,46,79,74),
(7,9,40,30,41,47,81,76),
(7,9,41,30,41,48,82,78),
(7,9,42,31,42,48,84,79),
(7,9,43,31,43,49,86,81),
(7,9,44,32,43,50,88,83),
(7,9,45,32,44,51,89,84),
(7,9,46,33,44,52,91,86),
(7,9,47,33,45,53,93,88),
(7,9,48,34,46,54,95,89),
(7,9,49,34,46,54,96,91),
(7,9,50,35,47,55,98,93),
(7,9,51,35,48,56,100,95),
(7,9,52,36,48,57,102,97),
(7,9,53,36,49,58,104,98),
(7,9,54,37,50,59,105,100),
(7,9,55,37,50,60,107,102),
(7,9,56,38,51,61,109,104),
(7,9,57,38,52,62,111,106),
(7,9,58,39,52,63,113,108),
(7,9,59,40,53,64,115,109),
(7,9,60,40,54,65,117,111),
(7,9,61,41,54,66,119,113),
(7,9,62,41,55,67,121,115),
(7,9,63,42,56,68,123,117),
(7,9,64,42,57,69,125,119),
(7,9,65,43,57,70,127,121),
(7,9,66,44,58,71,129,123),
(7,9,67,44,59,72,131,125),
(7,9,68,45,59,73,133,127),
(7,9,69,45,60,74,135,129),
(7,9,70,46,61,75,137,131),
(7,9,71,47,62,84,147,142),
(7,9,72,48,62,85,148,144),
(7,9,73,49,63,85,153,147),
(7,9,74,49,64,88,153,150),
(7,9,75,50,65,90,155,152),
(7,9,76,51,66,91,158,155),
(7,9,77,52,67,92,161,158),
(7,9,78,52,68,93,163,161),
(7,9,79,53,69,95,166,164),
(7,9,80,54,70,96,170,166),
(7,9,81,55,70,91,172,169),
(7,9,82,55,70,92,175,172),
(7,9,83,56,71,94,178,175),
(7,9,84,57,72,95,181,178),
(7,9,85,58,73,96,184,181),
(7,11,81,86,85,99,149,161),
(7,11,82,87,87,101,151,164),
(7,11,83,89,88,102,154,167),
(7,11,84,90,89,104,163,170),
(7,11,85,91,91,106,163,173),
(7,11,10,21,26,25,33,31),
(7,11,11,21,27,26,34,33),
(7,11,12,22,27,27,35,34),
(7,11,13,22,28,27,36,35),
(7,11,14,23,28,28,37,36),
(7,11,15,24,29,29,39,37),
(7,11,16,24,29,29,40,38),
(7,11,17,25,30,30,41,40),
(7,11,18,25,31,31,42,41),
(7,11,19,26,31,31,43,42),
(7,11,20,27,32,32,44,43),
(7,11,21,27,32,33,45,45),
(7,11,22,28,33,34,46,46),
(7,11,23,29,34,34,47,47),
(7,11,24,29,34,35,49,49),
(7,11,25,30,35,36,50,50),
(7,11,26,31,35,37,51,51),
(7,11,27,31,36,37,52,53),
(7,11,28,32,37,38,53,54),
(7,11,29,33,37,39,55,56),
(7,11,30,33,38,40,56,57),
(7,11,31,34,39,41,57,58),
(7,11,32,35,39,42,59,60),
(7,11,33,36,40,42,60,61),
(7,11,34,36,41,43,61,63),
(7,11,35,37,41,44,63,64),
(7,11,36,38,42,45,64,66),
(7,11,37,39,43,46,65,68),
(7,11,38,40,43,47,67,69),
(7,11,39,40,44,48,68,71),
(7,11,40,41,45,49,70,72),
(7,11,41,42,46,50,71,74),
(7,11,42,43,46,51,73,76),
(7,11,43,44,47,52,74,77),
(7,11,44,45,48,52,76,79),
(7,11,45,45,49,53,77,81),
(7,11,46,46,50,54,79,83),
(7,11,47,47,50,56,80,84),
(7,11,48,48,51,57,82,86),
(7,11,49,49,52,58,84,88),
(7,11,50,50,53,59,85,90),
(7,11,51,51,54,60,87,92),
(7,11,52,52,55,61,89,94),
(7,11,53,53,56,62,90,96),
(7,11,54,54,56,63,92,98),
(7,11,55,55,57,64,94,100),
(7,11,56,56,58,65,96,102),
(7,11,57,57,59,66,97,104),
(7,11,58,58,60,68,99,106),
(7,11,59,59,61,69,101,108),
(7,11,60,60,62,70,103,110),
(7,11,61,61,63,71,105,112),
(7,11,62,62,64,72,107,114),
(7,11,63,63,65,74,109,117),
(7,11,64,64,66,75,111,119),
(7,11,65,66,67,76,113,121),
(7,11,66,67,68,78,115,123),
(7,11,67,68,69,79,117,126),
(7,11,68,69,70,80,119,128),
(7,11,69,70,71,82,121,130),
(7,11,70,71,72,83,123,133),
(7,11,71,73,73,84,125,135),
(7,11,72,74,75,86,128,138),
(7,11,73,75,76,87,130,140),
(7,11,74,76,77,89,132,143),
(7,11,75,78,78,90,134,145),
(7,11,76,79,79,92,137,148),
(7,11,77,80,80,93,139,151),
(7,11,78,82,82,95,141,153),
(7,11,79,83,83,96,144,156),
(7,11,80,84,84,98,146,159),
(8,1,1,24,22,23,16,21),
(8,1,2,25,23,24,16,21),
(8,1,3,27,24,25,16,22),
(8,1,4,28,24,26,16,22),
(8,1,5,29,25,28,16,22),
(8,1,6,31,26,29,16,22),
(8,1,7,32,27,30,17,23),
(8,1,8,33,28,31,17,23),
(8,1,9,35,28,33,17,23),
(8,1,10,36,29,34,17,24),
(8,1,11,37,30,35,17,24),
(8,1,12,39,31,36,17,24),
(8,1,13,40,32,38,17,25),
(8,1,14,42,33,39,17,25),
(8,1,15,43,34,40,18,25),
(8,1,16,45,35,42,18,26),
(8,1,17,46,35,43,18,26),
(8,1,18,48,36,44,18,26),
(8,1,19,49,37,46,18,27),
(8,1,20,51,38,47,18,27),
(8,1,21,52,39,49,18,27),
(8,1,22,54,40,50,18,28),
(8,1,23,55,41,51,19,28),
(8,1,24,57,42,53,19,29),
(8,1,25,59,43,54,19,29),
(8,1,26,60,44,56,19,29),
(8,1,27,62,45,57,19,30),
(8,1,28,63,46,59,19,30),
(8,1,29,65,47,60,20,31),
(8,1,30,67,48,62,20,31),
(8,1,31,69,49,63,20,31),
(8,1,32,70,50,65,20,32),
(8,1,33,72,51,67,20,32),
(8,1,34,74,53,68,20,33),
(8,1,35,75,54,70,21,33),
(8,1,36,77,55,71,21,34),
(8,1,37,79,56,73,21,34),
(8,1,38,81,57,75,21,35),
(8,1,39,83,58,76,21,35),
(8,1,40,84,59,78,22,35),
(8,1,41,86,60,80,22,36),
(8,1,42,88,62,81,22,36),
(8,1,43,90,63,83,22,37),
(8,1,44,92,64,85,22,37),
(8,1,45,94,65,86,23,38),
(8,1,46,96,66,88,23,38),
(8,1,47,98,67,90,23,39),
(8,1,48,100,69,92,23,39),
(8,1,49,102,70,93,24,40),
(8,1,50,103,71,95,24,40),
(8,1,51,105,72,97,24,41),
(8,1,52,107,74,99,24,42),
(8,1,53,109,75,101,25,42),
(8,1,54,112,76,103,25,43),
(8,1,55,114,78,104,25,43),
(8,1,56,116,79,106,25,44),
(8,1,57,118,80,108,25,44),
(8,1,58,120,81,110,26,45),
(8,1,59,122,83,112,26,45),
(8,1,60,124,84,114,26,46),
(8,1,61,126,85,116,27,47),
(8,1,62,128,87,118,27,47),
(8,1,63,130,88,120,27,48),
(8,1,64,133,90,122,27,48),
(8,1,65,135,91,124,28,49),
(8,1,66,137,92,126,28,50),
(8,1,67,139,94,128,28,50),
(8,1,68,141,95,130,28,51),
(8,1,69,144,97,132,29,51),
(8,1,70,146,98,134,29,52),
(8,1,71,149,99,136,29,53),
(8,1,72,151,101,139,29,54),
(8,1,73,154,103,141,29,55),
(8,1,74,157,104,144,30,55),
(8,1,75,166,106,151,30,56),
(8,1,76,172,108,157,30,57),
(8,1,77,175,110,161,31,58),
(8,1,78,179,111,163,31,58),
(8,1,79,182,113,164,31,59),
(8,1,80,185,115,169,32,60),
(8,1,81,178,117,161,32,61),
(8,1,82,190,119,164,32,61),
(8,1,83,193,121,167,32,62),
(8,1,84,196,123,170,33,63),
(8,1,85,199,125,173,33,64),
(8,2,81,161,93,146,95,108),
(8,2,82,164,95,148,97,109),
(8,2,83,167,96,151,98,111),
(8,2,84,171,98,153,100,113),
(8,2,85,173,99,156,102,115),
(8,2,10,32,27,30,21,28),
(8,2,11,33,27,31,22,29),
(8,2,12,34,28,32,23,29),
(8,2,13,35,29,33,23,30),
(8,2,14,36,29,34,24,31),
(8,2,15,37,30,36,25,31),
(8,2,16,39,30,37,25,32),
(8,2,17,40,31,38,26,33),
(8,2,18,41,32,39,27,34),
(8,2,19,42,32,40,27,34),
(8,2,20,43,33,41,28,35),
(8,2,21,44,34,42,29,36),
(8,2,22,46,34,43,30,37),
(8,2,23,47,35,44,30,38),
(8,2,24,48,36,46,31,38),
(8,2,25,49,36,47,32,39),
(8,2,26,51,37,48,33,40),
(8,2,27,52,38,49,33,41),
(8,2,28,53,38,50,34,42),
(8,2,29,55,39,52,35,43),
(8,2,30,56,40,53,36,43),
(8,2,31,57,41,54,37,44),
(8,2,32,59,41,56,38,45),
(8,2,33,60,42,57,38,46),
(8,2,34,62,43,58,39,47),
(8,2,35,63,44,60,40,48),
(8,2,36,65,45,61,41,49),
(8,2,37,66,45,62,42,50),
(8,2,38,68,46,64,43,51),
(8,2,39,69,47,65,44,52),
(8,2,40,71,48,67,45,53),
(8,2,41,72,49,68,46,54),
(8,2,42,74,49,70,47,55),
(8,2,43,75,50,71,48,56),
(8,2,44,77,51,73,48,57),
(8,2,45,79,52,74,49,58),
(8,2,46,80,53,76,50,59),
(8,2,47,82,54,77,52,60),
(8,2,48,84,55,79,53,61),
(8,2,49,85,56,81,54,63),
(8,2,50,87,57,82,55,64),
(8,2,51,89,58,84,56,65),
(8,2,52,91,59,86,57,66),
(8,2,53,93,60,87,58,67),
(8,2,54,94,61,89,59,68),
(8,2,55,96,62,91,60,70),
(8,2,56,98,63,93,61,71),
(8,2,57,100,64,94,62,72),
(8,2,58,102,65,96,64,73),
(8,2,59,109,66,98,65,75),
(8,2,60,109,67,100,66,76),
(8,2,61,109,68,102,67,77),
(8,2,62,115,69,104,68,79),
(8,2,63,117,70,106,70,80),
(8,2,64,117,71,108,71,81),
(8,2,65,117,73,110,72,83),
(8,2,66,119,74,112,74,84),
(8,2,67,121,75,114,75,86),
(8,2,68,123,76,116,76,87),
(8,2,69,131,77,118,78,88),
(8,2,70,131,79,120,79,90),
(8,2,71,131,80,122,80,91),
(8,2,72,138,81,125,82,93),
(8,2,73,140,82,127,83,95),
(8,2,74,140,84,129,85,96),
(8,2,75,145,85,131,86,98),
(8,2,76,145,86,134,88,99),
(8,2,77,151,88,136,89,101),
(8,2,78,154,89,138,91,103),
(8,2,79,156,90,141,92,104),
(8,2,80,156,92,143,94,106),
(8,3,1,21,25,22,16,22),
(8,3,2,21,26,23,17,23),
(8,3,3,22,28,24,17,23),
(8,3,4,22,29,25,18,24),
(8,3,5,23,30,26,18,25),
(8,3,6,23,32,27,19,25),
(8,3,7,24,33,28,20,26),
(8,3,8,24,35,28,20,26),
(8,3,9,25,36,29,21,27),
(8,3,10,25,38,30,21,28),
(8,3,11,25,39,31,22,29),
(8,3,12,26,41,32,23,29),
(8,3,13,26,42,33,23,30),
(8,3,14,27,44,34,24,31),
(8,3,15,27,45,35,25,31),
(8,3,16,28,47,36,25,32),
(8,3,17,28,48,38,26,33),
(8,3,18,29,50,39,27,34),
(8,3,19,29,51,40,28,34),
(8,3,20,30,53,41,28,35),
(8,3,21,31,55,42,29,36),
(8,3,22,31,56,43,30,37),
(8,3,23,32,58,44,30,37),
(8,3,24,32,60,45,31,38),
(8,3,25,33,61,46,32,39),
(8,3,26,33,63,48,33,40),
(8,3,27,34,65,49,33,41),
(8,3,28,35,66,50,34,41),
(8,3,29,35,68,51,35,42),
(8,3,30,36,70,52,36,43),
(8,3,31,36,72,53,37,44),
(8,3,32,37,73,55,37,45),
(8,3,33,38,75,56,38,46),
(8,3,34,38,77,57,39,47),
(8,3,35,39,79,58,40,48),
(8,3,36,39,81,60,41,48),
(8,3,37,40,83,61,41,49),
(8,3,38,41,85,62,42,50),
(8,3,39,41,86,63,43,51),
(8,3,40,42,88,65,44,52),
(8,3,41,43,90,66,45,53),
(8,3,42,43,92,67,46,54),
(8,3,43,44,94,69,47,55),
(8,3,44,45,96,70,47,56),
(8,3,45,45,98,71,48,57),
(8,3,46,46,100,73,49,58),
(8,3,47,47,102,74,50,59),
(8,3,48,48,104,76,51,60),
(8,3,49,48,106,77,52,61),
(8,3,50,49,108,78,53,62),
(8,3,51,50,110,80,54,63),
(8,3,52,51,113,81,55,64),
(8,3,53,51,115,83,56,65),
(8,3,54,52,117,84,57,66),
(8,3,55,53,119,86,58,67),
(8,3,56,54,121,87,59,68),
(8,3,57,54,123,89,60,69),
(8,3,58,55,126,90,61,70),
(8,3,59,56,128,92,62,71),
(8,3,60,57,130,93,63,73),
(8,3,61,58,132,95,64,74),
(8,3,62,58,134,96,65,75),
(8,3,63,59,137,98,66,76),
(8,3,64,60,139,99,67,77),
(8,3,65,61,141,101,68,78),
(8,3,66,62,144,103,69,79),
(8,3,67,62,146,104,70,80),
(8,3,68,63,148,106,71,82),
(8,3,69,64,151,107,72,83),
(8,3,70,65,153,109,73,84),
(8,3,71,66,156,111,74,85),
(8,3,72,67,159,113,75,86),
(8,3,73,68,162,115,76,88),
(8,3,74,69,165,117,78,89),
(8,3,75,70,174,119,82,91),
(8,3,76,71,177,121,83,92),
(8,3,77,72,180,123,85,94),
(8,3,78,73,184,125,86,95),
(8,3,79,74,187,127,87,97),
(8,3,80,75,190,129,89,98),
(8,3,81,76,196,130,87,100),
(8,3,82,78,199,133,89,101),
(8,3,83,79,202,135,90,103),
(8,3,84,80,206,137,92,104),
(8,3,85,81,210,139,93,106),
(8,4,1,22,25,22,16,21),
(8,4,2,23,26,23,16,21),
(8,4,3,24,28,23,16,22),
(8,4,4,24,29,24,16,22),
(8,4,5,25,31,25,17,22),
(8,4,6,26,32,25,17,23),
(8,4,7,27,34,26,17,23),
(8,4,8,27,35,27,17,24),
(8,4,9,28,37,28,17,24),
(8,4,10,29,38,28,18,24),
(8,4,11,30,40,29,18,25),
(8,4,12,31,41,30,18,25),
(8,4,13,32,43,31,18,26),
(8,4,14,32,45,32,18,26),
(8,4,15,33,46,32,19,26),
(8,4,16,34,48,33,19,27),
(8,4,17,35,50,34,19,27),
(8,4,18,36,51,35,19,28),
(8,4,19,37,53,36,19,28),
(8,4,20,38,55,36,20,29),
(8,4,21,39,56,37,20,29),
(8,4,22,40,58,38,20,30),
(8,4,23,41,60,39,20,30),
(8,4,24,42,62,40,20,31),
(8,4,25,43,63,41,21,31),
(8,4,26,44,65,42,21,32),
(8,4,27,45,67,43,21,32),
(8,4,28,46,69,44,21,33),
(8,4,29,47,71,44,22,33),
(8,4,30,48,72,45,22,34),
(8,4,31,49,74,46,22,34),
(8,4,32,50,76,47,22,35),
(8,4,33,51,78,48,23,35),
(8,4,34,52,80,49,23,36),
(8,4,35,53,82,50,23,36),
(8,4,36,54,84,51,24,37),
(8,4,37,55,86,52,24,37),
(8,4,38,56,88,53,24,38),
(8,4,39,57,90,54,24,38),
(8,4,40,58,92,55,25,39),
(8,4,41,59,94,56,25,40),
(8,4,42,60,96,57,25,40),
(8,4,43,62,98,58,26,41),
(8,4,44,63,100,59,26,41),
(8,4,45,64,102,60,26,42),
(8,4,46,65,104,61,27,43),
(8,4,47,66,107,63,27,43),
(8,4,48,67,109,64,27,44),
(8,4,49,69,111,65,27,44),
(8,4,50,70,113,66,28,45),
(8,4,51,71,115,67,28,46),
(8,4,52,72,117,68,28,46),
(8,4,53,74,120,69,29,47),
(8,4,54,75,122,70,29,48),
(8,4,55,76,124,72,29,48),
(8,4,56,77,126,73,30,49),
(8,4,57,79,129,74,30,50),
(8,4,58,80,131,75,30,50),
(8,4,59,81,133,76,31,51),
(8,4,60,82,136,77,31,52),
(8,4,61,84,138,79,32,52),
(8,4,62,85,140,80,32,53),
(8,4,63,86,143,81,32,54),
(8,4,64,88,145,82,33,55),
(8,4,65,89,148,84,33,55),
(8,4,66,90,150,85,33,56),
(8,4,67,92,153,86,34,57),
(8,4,68,93,155,87,34,58),
(8,4,69,95,157,89,35,58),
(8,4,70,96,160,90,35,59),
(8,4,71,98,163,94,35,60),
(8,4,72,100,166,96,36,60),
(8,4,73,101,169,96,36,61),
(8,4,74,103,172,97,37,62),
(8,4,75,105,175,98,37,63),
(8,4,76,106,178,99,37,64),
(8,4,77,108,181,105,38,65),
(8,4,78,110,185,107,38,66),
(8,4,79,112,188,109,39,67),
(8,4,80,114,191,110,39,68),
(8,4,81,115,204,107,40,69),
(8,4,82,117,207,108,40,69),
(8,4,83,119,211,110,41,70),
(8,4,84,121,215,112,41,71),
(8,4,85,123,218,114,42,72),
(8,5,1,21,22,21,18,24),
(8,5,2,21,22,21,19,25),
(8,5,3,21,22,22,21,27),
(8,5,4,21,23,22,22,28),
(8,5,5,22,23,22,23,29),
(8,5,6,22,23,23,25,31),
(8,5,7,22,23,23,26,32),
(8,5,8,22,24,24,27,34),
(8,5,9,22,24,24,29,35),
(8,5,10,22,24,24,30,37),
(8,5,11,23,24,25,32,38),
(8,5,12,23,24,25,33,40),
(8,5,13,23,25,26,35,41),
(8,5,14,23,25,26,36,43),
(8,5,15,23,25,26,38,44),
(8,5,16,24,26,27,39,46),
(8,5,17,24,26,27,41,47),
(8,5,18,24,26,28,42,49),
(8,5,19,24,26,28,44,50),
(8,5,20,24,27,29,45,52),
(8,5,21,25,27,29,47,54),
(8,5,22,25,27,30,48,55),
(8,5,23,25,28,30,50,57),
(8,5,24,25,28,31,52,59),
(8,5,25,25,28,31,53,60),
(8,5,26,26,28,32,55,62),
(8,5,27,26,29,32,56,64),
(8,5,28,26,29,33,58,65),
(8,5,29,26,29,33,60,67),
(8,5,30,27,30,34,62,69),
(8,5,31,27,30,34,63,71),
(8,5,32,27,30,35,65,73),
(8,5,33,27,31,35,67,74),
(8,5,34,28,31,36,68,76),
(8,5,35,28,32,36,70,78),
(8,5,36,28,32,37,72,80),
(8,5,37,29,32,37,74,82),
(8,5,38,29,33,38,76,84),
(8,5,39,29,33,38,77,86),
(8,5,40,29,33,39,79,87),
(8,5,41,30,34,40,81,89),
(8,5,42,30,34,40,83,91),
(8,5,43,30,35,41,85,93),
(8,5,44,31,35,41,87,95),
(8,5,45,31,35,42,89,97),
(8,5,46,31,36,43,91,99),
(8,5,47,32,36,43,93,101),
(8,5,48,32,37,44,94,103),
(8,5,49,32,37,44,96,105),
(8,5,50,33,37,45,98,107),
(8,5,51,33,38,46,100,110),
(8,5,52,33,38,46,102,112),
(8,5,53,34,39,47,104,114),
(8,5,54,34,39,48,106,116),
(8,5,55,34,40,48,109,118),
(8,5,56,35,40,49,111,120),
(8,5,57,35,41,50,113,122),
(8,5,58,35,41,50,115,125),
(8,5,59,36,42,51,117,127),
(8,5,60,36,42,52,119,129),
(8,5,61,36,42,52,121,131),
(8,5,62,37,43,53,123,133),
(8,5,63,37,43,54,125,136),
(8,5,64,38,44,55,128,138),
(8,5,65,38,44,55,130,140),
(8,5,66,38,45,56,132,143),
(8,5,67,39,45,57,134,145),
(8,5,68,39,46,58,136,147),
(8,5,69,40,46,58,139,150),
(8,5,70,40,47,59,141,152),
(8,5,71,40,48,60,144,155),
(8,5,72,41,48,60,147,158),
(8,5,73,41,49,61,150,161),
(8,5,74,42,49,62,152,164),
(8,5,75,42,50,63,155,167),
(8,5,76,42,51,64,158,170),
(8,5,77,43,51,65,161,173),
(8,5,78,43,52,66,164,176),
(8,5,79,44,52,67,167,179),
(8,5,80,44,53,68,170,182),
(8,5,81,45,54,68,181,186),
(8,5,82,45,54,68,185,189),
(8,5,83,46,55,69,189,192),
(8,5,84,46,56,70,192,196),
(8,5,85,47,56,71,195,199),
(8,6,1,24,22,23,16,21),
(8,6,2,25,23,24,16,21),
(8,6,3,27,24,25,16,22),
(8,6,4,28,24,26,16,22),
(8,6,5,29,25,28,16,22),
(8,6,6,31,26,29,16,22),
(8,6,7,32,27,30,17,23),
(8,6,8,33,28,31,17,23),
(8,6,9,35,28,33,17,23),
(8,6,10,36,29,34,17,24),
(8,6,11,37,30,35,17,24),
(8,6,12,39,31,36,17,24),
(8,6,13,40,32,38,17,25),
(8,6,14,42,33,39,17,25),
(8,6,15,43,34,40,18,25),
(8,6,16,45,35,42,18,26),
(8,6,17,46,35,43,18,26),
(8,6,18,48,36,44,18,26),
(8,6,19,49,37,46,18,27),
(8,6,20,51,38,47,18,27),
(8,6,21,52,39,49,18,27),
(8,6,22,54,40,50,18,28),
(8,6,23,55,41,51,19,28),
(8,6,24,57,42,53,19,29),
(8,6,25,59,43,54,19,29),
(8,6,26,60,44,56,19,29),
(8,6,27,62,45,57,19,30),
(8,6,28,63,46,59,19,30),
(8,6,29,65,47,60,20,31),
(8,6,30,67,48,62,20,31),
(8,6,31,69,49,63,20,31),
(8,6,32,70,50,65,20,32),
(8,6,33,72,51,67,20,32),
(8,6,34,74,53,68,20,33),
(8,6,35,75,54,70,21,33),
(8,6,36,77,55,71,21,34),
(8,6,37,79,56,73,21,34),
(8,6,38,81,57,75,21,35),
(8,6,39,83,58,76,21,35),
(8,6,40,84,59,78,22,35),
(8,6,41,86,60,80,22,36),
(8,6,42,88,62,81,22,36),
(8,6,43,90,63,83,22,37),
(8,6,44,92,64,85,22,37),
(8,6,45,94,65,86,23,38),
(8,6,46,96,66,88,23,38),
(8,6,47,98,67,90,23,39),
(8,6,48,100,69,92,23,39),
(8,6,49,102,70,93,24,40),
(8,6,50,103,71,95,24,40),
(8,6,51,105,72,96,24,41),
(8,6,52,106,74,97,24,42),
(8,6,53,107,73,98,25,42),
(8,6,54,108,74,99,25,43),
(8,6,55,109,75,100,25,43),
(8,6,56,112,77,103,25,44),
(8,6,57,114,78,105,25,44),
(8,6,58,118,79,107,26,45),
(8,6,59,119,81,109,26,45),
(8,6,60,121,82,111,26,46),
(8,6,61,123,83,113,26,47),
(8,6,62,126,85,115,26,47),
(8,6,63,128,86,118,27,48),
(8,6,64,131,88,120,27,48),
(8,6,65,138,89,122,27,49),
(8,6,66,140,91,125,27,50),
(8,6,67,143,92,127,28,50),
(8,6,68,145,94,129,28,51),
(8,6,69,148,95,132,28,52),
(8,6,70,151,97,134,28,52),
(8,6,71,154,99,137,29,53),
(8,6,72,156,100,139,29,54),
(8,6,73,159,102,142,29,55),
(8,6,74,162,104,144,29,55),
(8,6,75,165,105,147,30,56),
(8,6,76,168,107,150,30,57),
(8,6,77,169,109,153,30,58),
(8,6,78,170,110,155,30,58),
(8,6,79,178,112,158,31,59),
(8,6,80,181,114,161,31,60),
(8,6,81,179,116,163,31,61),
(8,6,82,179,118,165,32,61),
(8,6,83,186,120,168,32,62),
(8,6,84,186,122,171,32,63),
(8,6,85,192,123,174,32,64),
(8,7,1,22,22,22,17,23),
(8,7,2,23,22,23,18,24),
(8,7,3,24,23,24,19,25),
(8,7,4,25,23,25,20,26),
(8,7,5,25,24,26,21,27),
(8,7,6,26,24,27,22,28),
(8,7,7,27,25,28,23,29),
(8,7,8,28,25,29,24,30),
(8,7,9,29,25,30,25,31),
(8,7,10,30,26,31,26,33),
(8,7,11,31,26,32,27,34),
(8,7,12,32,27,33,28,35),
(8,7,13,33,27,34,29,36),
(8,7,14,34,28,35,30,37),
(8,7,15,34,28,36,31,38),
(8,7,16,35,29,38,32,39),
(8,7,17,36,29,39,33,41),
(8,7,18,37,30,40,34,42),
(8,7,19,38,30,41,35,43),
(8,7,20,39,31,42,36,44),
(8,7,21,40,32,43,37,45),
(8,7,22,41,32,45,38,47),
(8,7,23,43,33,46,39,48),
(8,7,24,44,33,47,40,49),
(8,7,25,45,34,48,42,51),
(8,7,26,46,34,49,43,52),
(8,7,27,47,35,51,44,53),
(8,7,28,48,35,52,45,54),
(8,7,29,49,36,53,46,56),
(8,7,30,50,37,54,48,57),
(8,7,31,51,37,56,49,59),
(8,7,32,52,38,57,50,60),
(8,7,33,53,38,58,51,61),
(8,7,34,55,39,60,52,63),
(8,7,35,56,40,61,54,64),
(8,7,36,57,40,62,55,66),
(8,7,37,58,41,64,56,67),
(8,7,38,59,42,65,57,68),
(8,7,39,61,42,66,59,70),
(8,7,40,62,43,68,60,71),
(8,7,41,63,44,69,61,73),
(8,7,42,64,44,71,63,74),
(8,7,43,65,45,72,64,76),
(8,7,44,67,46,74,65,77),
(8,7,45,68,46,75,67,79),
(8,7,46,69,47,76,68,80),
(8,7,47,71,48,78,69,82),
(8,7,48,72,49,79,71,83),
(8,7,49,73,49,81,72,85),
(8,7,50,74,50,82,74,87),
(8,7,51,76,51,84,75,88),
(8,7,52,77,51,85,77,90),
(8,7,53,78,52,87,78,92),
(8,7,54,80,53,89,79,93),
(8,7,55,81,54,90,81,95),
(8,7,56,83,55,92,82,96),
(8,7,57,84,55,93,84,98),
(8,7,58,85,56,95,85,100),
(8,7,59,87,57,97,87,102),
(8,7,60,88,58,98,88,103),
(8,7,61,90,58,100,90,105),
(8,7,62,91,59,101,91,107),
(8,7,63,93,60,103,93,108),
(8,7,64,94,61,105,94,110),
(8,7,65,95,62,106,96,112),
(8,7,66,97,63,108,98,114),
(8,7,67,98,63,110,99,116),
(8,7,68,100,64,112,101,117),
(8,7,69,101,65,113,102,119),
(8,7,70,103,66,115,104,121),
(8,7,71,104,67,117,116,123),
(8,7,72,106,68,119,118,126),
(8,7,73,108,69,121,121,128),
(8,7,74,110,70,124,123,130),
(8,7,75,112,71,126,125,132),
(8,7,76,114,72,128,127,135),
(8,7,77,115,73,130,129,137),
(8,7,78,117,74,132,132,139),
(8,7,79,119,75,135,134,142),
(8,7,80,121,76,137,136,144),
(8,7,81,123,77,138,132,147),
(8,7,82,125,79,141,135,149),
(8,7,83,128,80,143,135,152),
(8,7,84,130,81,145,135,154),
(8,7,85,132,82,148,141,157),
(8,8,1,21,22,21,19,23),
(8,8,2,21,22,21,20,24),
(8,8,3,21,22,22,22,26),
(8,8,4,21,22,22,23,27),
(8,8,5,21,23,22,25,28),
(8,8,6,21,23,22,26,30),
(8,8,7,21,23,23,27,31),
(8,8,8,22,23,23,29,32),
(8,8,9,22,23,23,30,34),
(8,8,10,22,23,24,32,35),
(8,8,11,22,24,24,33,37),
(8,8,12,22,24,24,35,38),
(8,8,13,22,24,25,36,39),
(8,8,14,22,24,25,38,41),
(8,8,15,22,24,25,39,42),
(8,8,16,22,24,26,41,44),
(8,8,17,23,25,26,42,45),
(8,8,18,23,25,26,44,47),
(8,8,19,23,25,27,46,48),
(8,8,20,23,25,27,47,50),
(8,8,21,23,25,27,49,51),
(8,8,22,23,26,28,51,53),
(8,8,23,23,26,28,52,55),
(8,8,24,24,26,29,54,56),
(8,8,25,24,26,29,56,58),
(8,8,26,24,27,29,57,60),
(8,8,27,24,27,30,59,61),
(8,8,28,24,27,30,61,63),
(8,8,29,24,27,31,63,65),
(8,8,30,24,28,31,64,66),
(8,8,31,25,28,31,66,68),
(8,8,32,25,28,32,68,70),
(8,8,33,25,28,32,70,71),
(8,8,34,25,29,33,71,73),
(8,8,35,25,29,33,73,75),
(8,8,36,26,29,34,75,77),
(8,8,37,26,29,34,77,79),
(8,8,38,26,30,35,79,80),
(8,8,39,26,30,35,81,82),
(8,8,40,26,30,35,83,84),
(8,8,41,27,31,36,85,86),
(8,8,42,27,31,36,87,88),
(8,8,43,27,31,37,89,90),
(8,8,44,27,32,37,91,91),
(8,8,45,27,32,38,93,93),
(8,8,46,28,32,38,95,95),
(8,8,47,28,32,39,97,97),
(8,8,48,28,33,39,99,99),
(8,8,49,28,33,40,101,101),
(8,8,50,29,33,40,103,103),
(8,8,51,29,34,41,105,105),
(8,8,52,29,34,42,107,107),
(8,8,53,29,35,42,109,109),
(8,8,54,30,35,43,111,111),
(8,8,55,30,35,43,113,113),
(8,8,56,30,36,44,115,115),
(8,8,57,30,36,44,118,118),
(8,8,58,31,36,45,120,120),
(8,8,59,31,37,45,122,122),
(8,8,60,31,37,46,124,124),
(8,8,61,31,37,47,126,126),
(8,8,62,32,38,47,129,128),
(8,8,63,32,38,48,131,130),
(8,8,64,32,39,48,133,133),
(8,8,65,33,39,49,135,135),
(8,8,66,33,39,50,138,137),
(8,8,67,33,40,50,140,139),
(8,8,68,33,40,51,142,141),
(8,8,69,34,41,51,145,144),
(8,8,70,34,41,52,147,146),
(8,8,71,34,41,53,150,149),
(8,8,72,34,42,54,153,152),
(8,8,73,34,42,55,156,155),
(8,8,74,35,43,55,159,157),
(8,8,75,35,43,56,162,160),
(8,8,76,35,43,57,168,163),
(8,8,77,36,44,58,168,166),
(8,8,78,36,44,58,171,169),
(8,8,79,36,45,59,177,172),
(8,8,80,37,45,60,177,175),
(8,8,81,37,46,60,190,178),
(8,8,82,37,46,60,193,181),
(8,8,83,37,47,61,196,185),
(8,8,84,38,47,62,200,188),
(8,8,85,38,48,63,203,191),
(8,9,1,21,22,22,18,23),
(8,9,81,61,70,91,165,170),
(8,9,82,61,70,92,168,173),
(8,9,83,62,71,94,171,176),
(8,9,84,63,72,95,174,179),
(8,9,85,64,73,96,177,182),
(8,9,2,19,18,23,21,28),
(8,9,3,20,19,23,22,29),
(8,9,4,20,19,24,24,30),
(8,9,5,20,19,24,25,32),
(8,9,6,20,20,25,26,33),
(8,9,7,21,20,25,27,34),
(8,9,8,21,21,26,28,35),
(8,9,9,21,21,26,30,36),
(8,9,10,24,25,26,27,33),
(8,9,11,24,26,26,29,34),
(8,9,12,24,26,27,30,35),
(8,9,13,25,26,27,31,37),
(8,9,14,25,27,28,32,38),
(8,9,15,25,27,29,33,39),
(8,9,16,26,28,29,34,40),
(8,9,17,26,28,30,36,42),
(8,9,18,26,28,30,37,43),
(8,9,19,27,29,31,38,44),
(8,9,20,27,29,32,39,46),
(8,9,21,27,30,32,41,47),
(8,9,22,28,30,33,42,48),
(8,9,23,28,31,34,43,50),
(8,9,24,29,31,34,45,51),
(8,9,25,29,32,35,46,53),
(8,9,26,29,32,36,47,54),
(8,9,27,30,32,36,49,55),
(8,9,28,30,33,37,50,57),
(8,9,29,31,33,38,52,58),
(8,9,30,31,34,38,53,60),
(8,9,31,31,34,39,54,62),
(8,9,32,32,35,40,56,63),
(8,9,33,32,35,41,57,65),
(8,9,34,33,36,41,59,66),
(8,9,35,33,36,42,60,68),
(8,9,36,34,37,43,62,70),
(8,9,37,34,38,44,64,71),
(8,9,38,34,38,45,65,73),
(8,9,39,35,39,45,67,75),
(8,9,40,35,39,46,68,76),
(8,9,41,36,40,47,70,78),
(8,9,42,36,40,48,72,80),
(8,9,43,37,41,49,73,82),
(8,9,44,37,41,50,75,83),
(8,9,45,38,42,50,77,85),
(8,9,46,38,43,51,79,87),
(8,9,47,39,43,52,80,89),
(8,9,48,39,44,53,82,91),
(8,9,49,40,45,54,84,93),
(8,9,50,40,45,55,90,95),
(8,9,51,41,46,56,92,97),
(8,9,52,41,46,57,94,99),
(8,9,53,42,47,58,96,101),
(8,9,54,43,48,59,98,103),
(8,9,55,43,48,60,101,105),
(8,9,56,44,49,61,103,107),
(8,9,57,44,50,62,105,109),
(8,9,58,45,51,63,107,112),
(8,9,59,45,51,64,109,114),
(8,9,60,46,52,65,111,116),
(8,9,61,47,53,66,113,118),
(8,9,62,47,53,67,115,121),
(8,9,63,48,54,68,118,123),
(8,9,64,48,55,69,120,125),
(8,9,65,49,56,71,123,128),
(8,9,66,50,57,72,125,130),
(8,9,67,50,57,73,128,133),
(8,9,68,51,58,74,130,135),
(8,9,69,52,59,75,132,137),
(8,9,70,52,60,76,135,140),
(8,9,71,53,61,78,137,143),
(8,9,72,54,61,79,140,145),
(8,9,73,55,62,80,143,148),
(8,9,74,55,63,81,146,151),
(8,9,75,56,64,83,148,153),
(8,9,76,57,65,84,151,156),
(8,9,77,58,66,85,154,159),
(8,9,78,58,67,87,156,162),
(8,9,79,59,68,88,159,165),
(8,9,80,60,69,89,162,167),
(8,11,1,22,22,21,18,23),
(8,11,81,92,85,99,142,162),
(8,11,82,93,87,101,144,165),
(8,11,83,95,88,102,147,168),
(8,11,84,96,89,104,156,171),
(8,11,85,97,91,106,156,174),
(8,11,2,27,16,23,18,25),
(8,11,3,27,16,23,19,26),
(8,11,4,28,17,24,20,27),
(8,11,5,28,17,25,21,29),
(8,11,6,29,18,25,22,30),
(8,11,7,29,18,26,23,31),
(8,11,8,30,19,27,24,32),
(8,11,9,30,19,27,26,34),
(8,11,10,27,26,25,26,32),
(8,11,11,27,27,26,27,34),
(8,11,12,28,27,27,28,35),
(8,11,13,28,28,27,29,36),
(8,11,14,29,28,28,30,37),
(8,11,15,30,29,29,32,38),
(8,11,16,30,29,29,33,39),
(8,11,17,31,30,30,34,41),
(8,11,18,31,31,31,35,42),
(8,11,19,32,31,31,36,43),
(8,11,20,33,32,32,37,44),
(8,11,21,33,32,33,38,46),
(8,11,22,34,33,34,39,47),
(8,11,23,35,34,34,40,48),
(8,11,24,35,34,35,42,50),
(8,11,25,36,35,36,43,51),
(8,11,26,37,35,37,44,52),
(8,11,27,37,36,37,45,54),
(8,11,28,38,37,38,46,55),
(8,11,29,39,37,39,48,57),
(8,11,30,39,38,40,49,58),
(8,11,31,40,39,41,50,59),
(8,11,32,41,39,42,52,61),
(8,11,33,42,40,42,53,62),
(8,11,34,42,41,43,54,64),
(8,11,35,43,41,44,56,65),
(8,11,36,44,42,45,57,67),
(8,11,37,45,43,46,58,69),
(8,11,38,46,43,47,60,70),
(8,11,39,46,44,48,61,72),
(8,11,40,47,45,49,63,73),
(8,11,41,48,46,50,64,75),
(8,11,42,49,46,51,66,77),
(8,11,43,50,47,52,67,78),
(8,11,44,51,48,52,69,80),
(8,11,45,51,49,53,70,82),
(8,11,46,52,50,54,72,84),
(8,11,47,53,50,56,73,85),
(8,11,48,54,51,57,75,87),
(8,11,49,55,52,58,77,89),
(8,11,50,56,53,59,78,91),
(8,11,51,57,54,60,80,93),
(8,11,52,58,55,61,82,95),
(8,11,53,59,56,62,83,97),
(8,11,54,60,56,63,85,99),
(8,11,55,61,57,64,87,101),
(8,11,56,62,58,65,89,103),
(8,11,57,63,59,66,90,105),
(8,11,58,64,60,68,92,107),
(8,11,59,65,61,69,94,109),
(8,11,60,66,62,70,96,111),
(8,11,61,67,63,71,98,113),
(8,11,62,68,64,72,100,115),
(8,11,63,69,65,74,102,118),
(8,11,64,70,66,75,104,120),
(8,11,65,72,67,76,106,122),
(8,11,66,73,68,78,108,124),
(8,11,67,74,69,79,110,127),
(8,11,68,75,70,80,112,129),
(8,11,69,76,71,82,114,131),
(8,11,70,77,72,83,116,134),
(8,11,71,79,73,84,118,136),
(8,11,72,80,75,86,121,139),
(8,11,73,81,76,87,123,141),
(8,11,74,82,77,89,125,144),
(8,11,75,84,78,90,127,146),
(8,11,76,85,79,92,130,149),
(8,11,77,86,80,93,132,152),
(8,11,78,88,82,95,134,154),
(8,11,79,89,83,96,137,157),
(8,11,80,90,84,98,139,160),
(9,1,8,32,26,30,21,22),
(9,1,7,31,25,29,21,22),
(9,1,6,30,24,28,20,21),
(9,1,5,28,23,27,20,21),
(9,1,4,27,22,26,20,21),
(9,1,3,26,22,24,20,21),
(9,1,2,24,21,23,20,20),
(9,1,1,23,20,22,20,20),
(9,1,9,34,26,32,21,22),
(9,1,10,35,27,33,21,23),
(9,1,11,36,28,34,21,23),
(9,1,12,38,29,35,21,23),
(9,1,13,39,30,37,21,24),
(9,1,14,41,31,38,21,24),
(9,1,15,42,32,39,21,24),
(9,1,16,44,33,41,21,25),
(9,1,17,45,34,42,22,25),
(9,1,18,47,34,43,22,25),
(9,1,19,48,35,45,22,26),
(9,1,20,50,36,46,22,26),
(9,1,21,51,37,48,22,26),
(9,1,22,53,38,49,22,27),
(9,1,23,54,39,51,22,27),
(9,1,24,56,40,52,23,28),
(9,1,25,58,41,53,23,28),
(9,1,26,59,42,55,23,28),
(9,1,27,61,43,56,23,29),
(9,1,28,63,44,58,23,29),
(9,1,29,64,45,59,23,30),
(9,1,30,66,46,61,24,30),
(9,1,31,68,47,62,24,30),
(9,1,32,69,48,64,24,31),
(9,1,33,71,50,66,24,31),
(9,1,34,73,51,67,24,32),
(9,1,35,74,52,69,24,32),
(9,1,36,76,53,70,25,33),
(9,1,37,78,54,72,25,33),
(9,1,38,80,55,74,25,34),
(9,1,39,82,56,75,25,34),
(9,1,40,83,57,77,25,35),
(9,1,41,85,58,79,26,35),
(9,1,42,87,60,80,26,35),
(9,1,43,89,61,82,26,36),
(9,1,44,91,62,84,26,36),
(9,1,45,93,63,85,26,37),
(9,1,46,95,64,87,27,37),
(9,1,47,97,66,89,27,38),
(9,1,48,99,67,91,27,38),
(9,1,49,101,68,93,27,39),
(9,1,50,103,69,94,28,40),
(9,1,51,105,71,96,28,40),
(9,1,52,107,72,98,28,41),
(9,1,53,109,73,100,28,41),
(9,1,54,111,74,102,29,42),
(9,1,55,113,76,103,29,42),
(9,1,56,115,77,105,29,43),
(9,1,57,117,78,107,29,43),
(9,1,58,119,79,109,30,44),
(9,1,59,121,81,111,30,44),
(9,1,60,123,82,113,30,45),
(9,1,61,125,83,115,30,46),
(9,1,62,127,85,117,31,46),
(9,1,63,129,86,119,31,47),
(9,1,64,132,88,121,31,47),
(9,1,65,134,89,123,32,48),
(9,1,66,136,90,125,32,49),
(9,1,67,138,92,127,32,49),
(9,1,68,140,93,129,32,50),
(9,1,69,143,95,131,33,50),
(9,1,70,145,96,133,33,51),
(9,1,71,148,97,140,33,53),
(9,1,72,156,99,143,33,54),
(9,1,73,162,101,148,33,55),
(9,1,74,162,102,148,34,55),
(9,1,75,165,104,150,34,56),
(9,1,76,171,106,156,34,57),
(9,1,77,171,108,157,35,58),
(9,1,78,174,109,159,35,58),
(9,1,79,181,111,165,35,59),
(9,1,80,184,113,168,36,60),
(9,1,81,194,123,178,46,70),
(9,1,82,204,133,188,56,80),
(9,1,83,214,143,198,66,90),
(9,1,84,224,153,208,76,100),
(9,1,85,234,163,218,86,110),
(9,3,1,22,20,22,20,21),
(9,3,2,23,21,23,21,22),
(9,3,3,24,21,24,21,22),
(9,3,4,25,22,25,22,23),
(9,3,5,26,22,26,23,24),
(9,3,6,28,23,27,23,25),
(9,3,7,29,24,28,24,25),
(9,3,8,30,24,29,25,26),
(9,3,9,31,25,30,25,27),
(9,3,10,32,25,32,26,27),
(9,3,11,33,26,33,27,28),
(9,3,12,35,27,34,27,29),
(9,3,13,36,27,35,28,30),
(9,3,14,37,28,36,29,31),
(9,3,15,38,29,37,30,31),
(9,3,16,40,29,38,30,32),
(9,3,17,41,30,40,31,33),
(9,3,18,42,31,41,32,34),
(9,3,19,43,31,42,33,35),
(9,3,20,45,32,43,33,35),
(9,3,21,46,33,45,34,36),
(9,3,22,47,33,46,35,37),
(9,3,23,49,34,47,36,38),
(9,3,24,50,35,48,37,39),
(9,3,25,51,36,50,37,40),
(9,3,26,53,36,51,38,41),
(9,3,27,54,37,52,39,42),
(9,3,28,56,38,54,40,43),
(9,3,29,57,39,55,41,43),
(9,3,30,58,39,56,42,44),
(9,3,31,60,40,58,43,45),
(9,3,32,61,41,59,43,46),
(9,3,33,63,42,60,44,47),
(9,3,34,64,43,62,45,48),
(9,3,35,66,44,63,46,49),
(9,3,36,67,44,65,47,50),
(9,3,37,69,45,66,48,51),
(9,3,38,70,46,67,49,52),
(9,3,39,72,47,69,50,53),
(9,3,40,73,48,70,51,54),
(9,3,41,75,49,72,52,55),
(9,3,42,77,49,73,53,56),
(9,3,43,78,50,75,54,57),
(9,3,44,80,51,76,55,58),
(9,3,45,81,52,78,56,59),
(9,3,46,83,53,79,57,61),
(9,3,47,85,54,81,58,62),
(9,3,48,86,55,83,59,63),
(9,3,49,88,56,84,60,64),
(9,3,50,90,57,86,61,65),
(9,3,51,91,58,87,62,66),
(9,3,52,93,59,89,63,67),
(9,3,53,95,60,91,64,68),
(9,3,54,97,61,92,65,69),
(9,3,55,98,61,94,66,71),
(9,3,56,100,62,95,67,72),
(9,3,57,102,63,97,68,73),
(9,3,58,104,64,99,69,74),
(9,3,59,105,65,101,70,75),
(9,3,60,107,66,102,71,77),
(9,3,61,109,67,104,73,78),
(9,3,62,111,69,106,74,79),
(9,3,63,113,70,107,75,80),
(9,3,64,115,71,109,76,81),
(9,3,65,116,72,111,77,83),
(9,3,66,118,73,113,78,84),
(9,3,67,120,74,115,79,85),
(9,3,68,122,75,116,81,86),
(9,3,69,124,76,118,82,88),
(9,3,70,126,77,120,83,89),
(9,3,71,148,78,122,84,92),
(9,3,72,150,79,125,86,94),
(9,3,73,152,80,127,87,96),
(9,3,74,156,82,129,89,97),
(9,3,75,158,83,131,90,99),
(9,3,76,162,84,134,92,100),
(9,3,77,164,86,136,93,103),
(9,3,78,167,87,138,95,105),
(9,3,79,170,88,153,96,106),
(9,3,80,173,90,160,98,108),
(9,3,81,183,100,170,108,118),
(9,3,82,193,110,180,118,128),
(9,3,83,203,120,190,128,138),
(9,3,84,213,130,200,138,148),
(9,3,85,223,140,210,148,158),
(9,4,1,21,23,21,20,20),
(9,4,2,22,24,22,20,20),
(9,4,3,23,26,22,20,21),
(9,4,4,23,27,23,20,21),
(9,4,5,24,29,24,21,21),
(9,4,6,25,30,25,21,22),
(9,4,7,26,32,25,21,22),
(9,4,8,26,33,26,21,23),
(9,4,9,27,35,27,21,23),
(9,4,10,28,36,27,21,23),
(9,4,11,29,38,28,22,24),
(9,4,12,30,39,29,22,24),
(9,4,13,31,41,30,22,25),
(9,4,14,31,43,31,22,25),
(9,4,15,32,44,31,22,25),
(9,4,16,33,46,32,23,26),
(9,4,17,34,48,33,23,26),
(9,4,18,35,49,34,23,27),
(9,4,19,36,51,35,23,27),
(9,4,20,37,53,35,23,28),
(9,4,21,38,54,36,24,28),
(9,4,22,39,56,37,24,29),
(9,4,23,40,58,38,24,29),
(9,4,24,41,60,39,24,30),
(9,4,25,42,61,40,25,30),
(9,4,26,43,63,41,25,31),
(9,4,27,44,65,42,25,31),
(9,4,28,45,67,43,25,32),
(9,4,29,46,69,43,25,32),
(9,4,30,47,71,44,26,33),
(9,4,31,48,72,45,26,33),
(9,4,32,49,74,46,26,34),
(9,4,33,50,76,47,27,34),
(9,4,34,51,78,48,27,35),
(9,4,35,52,80,49,27,35),
(9,4,36,53,82,50,27,36),
(9,4,37,54,84,51,28,36),
(9,4,38,55,86,52,28,37),
(9,4,39,56,88,53,28,38),
(9,4,40,57,90,54,28,38),
(9,4,41,58,92,55,29,39),
(9,4,42,60,94,56,29,39),
(9,4,43,61,96,57,29,40),
(9,4,44,62,98,58,30,40),
(9,4,45,63,100,59,30,41),
(9,4,46,64,103,61,30,42),
(9,4,47,65,105,62,31,42),
(9,4,48,66,107,63,31,43),
(9,4,49,68,109,64,31,44),
(9,4,50,69,111,65,32,44),
(9,4,51,70,113,66,32,45),
(9,4,52,71,116,67,32,45),
(9,4,53,73,118,68,33,46),
(9,4,54,74,120,69,33,47),
(9,4,55,75,122,71,33,47),
(9,4,56,76,125,72,34,48),
(9,4,57,78,127,73,34,49),
(9,4,58,79,129,74,34,49),
(9,4,59,80,131,75,35,50),
(9,4,60,81,134,77,35,51),
(9,4,61,83,136,78,35,51),
(9,4,62,84,138,79,36,52),
(9,4,63,85,141,80,36,53),
(9,4,64,87,143,81,37,54),
(9,4,65,88,146,83,37,54),
(9,4,66,89,148,84,37,55),
(9,4,67,91,151,85,38,56),
(9,4,68,92,153,86,38,57),
(9,4,69,94,156,88,39,57),
(9,4,70,95,158,89,39,58),
(9,4,71,97,161,90,39,60),
(9,4,72,99,164,92,40,60),
(9,4,73,100,167,94,40,61),
(9,4,74,102,170,95,41,62),
(9,4,75,104,173,97,41,63),
(9,4,76,105,176,98,41,64),
(9,4,77,107,179,100,42,65),
(9,4,78,109,183,106,42,66),
(9,4,79,111,186,107,43,67),
(9,4,80,113,189,109,43,69),
(9,4,81,123,199,119,53,79),
(9,4,82,133,209,129,63,89),
(9,4,83,143,219,139,73,99),
(9,4,84,153,229,149,83,109),
(9,4,85,163,239,159,93,119),
(9,5,1,20,20,20,22,23),
(9,5,2,20,20,20,23,24),
(9,5,3,20,20,21,25,26),
(9,5,4,20,21,21,26,27),
(9,5,5,21,21,21,27,28),
(9,5,6,21,21,22,29,30),
(9,5,7,21,21,22,30,31),
(9,5,8,21,22,23,31,33),
(9,5,9,21,22,23,33,34),
(9,5,10,21,22,23,34,36),
(9,5,11,22,22,24,36,37),
(9,5,12,22,23,24,37,39),
(9,5,13,22,23,25,38,40),
(9,5,14,22,23,25,40,42),
(9,5,15,22,23,25,41,43),
(9,5,16,23,24,26,43,45),
(9,5,17,23,24,26,44,46),
(9,5,18,23,24,27,46,48),
(9,5,19,23,24,27,47,49),
(9,5,20,23,25,28,49,51),
(9,5,21,24,25,28,51,53),
(9,5,22,24,25,29,52,54),
(9,5,23,24,26,29,54,56),
(9,5,24,24,26,30,55,58),
(9,5,25,25,26,30,57,59),
(9,5,26,25,27,31,59,61),
(9,5,27,25,27,31,60,63),
(9,5,28,25,27,32,62,65),
(9,5,29,25,28,32,64,66),
(9,5,30,26,28,33,65,68),
(9,5,31,26,28,33,67,70),
(9,5,32,26,29,34,69,72),
(9,5,33,27,29,34,70,73),
(9,5,34,27,29,35,72,75),
(9,5,35,27,30,35,74,77),
(9,5,36,27,30,36,76,79),
(9,5,37,28,30,36,78,81),
(9,5,38,28,31,37,79,83),
(9,5,39,28,31,38,81,85),
(9,5,40,28,31,38,83,87),
(9,5,41,29,32,39,85,88),
(9,5,42,29,32,39,87,90),
(9,5,43,29,33,40,89,92),
(9,5,44,30,33,40,91,94),
(9,5,45,30,33,41,92,96),
(9,5,46,30,34,42,94,98),
(9,5,47,31,34,42,96,100),
(9,5,48,31,35,43,98,102),
(9,5,49,31,35,44,100,104),
(9,5,50,32,36,44,102,106),
(9,5,51,32,36,45,104,109),
(9,5,52,32,36,45,106,111),
(9,5,53,33,37,46,108,113),
(9,5,54,33,37,47,110,115),
(9,5,55,33,38,47,112,117),
(9,5,56,34,38,48,114,119),
(9,5,57,34,39,49,117,121),
(9,5,58,34,39,49,119,124),
(9,5,59,35,40,50,121,126),
(9,5,60,35,40,51,123,128),
(9,5,61,35,41,51,125,130),
(9,5,62,36,41,52,127,132),
(9,5,63,36,41,53,129,135),
(9,5,64,37,42,54,132,137),
(9,5,65,37,42,54,134,139),
(9,5,66,37,43,55,136,142),
(9,5,67,38,43,56,138,144),
(9,5,68,38,44,57,140,146),
(9,5,69,39,44,57,143,149),
(9,5,70,39,45,58,145,151),
(9,5,71,39,46,59,148,158),
(9,5,72,40,46,59,151,161),
(9,5,73,40,47,60,154,164),
(9,5,74,41,47,61,156,167),
(9,5,75,41,48,62,159,170),
(9,5,76,41,49,63,162,174),
(9,5,77,42,49,64,165,177),
(9,5,78,42,50,65,168,180),
(9,5,79,43,50,66,171,183),
(9,5,80,43,51,67,174,186),
(9,5,81,53,61,77,184,196),
(9,5,82,63,71,87,194,206),
(9,5,83,73,81,97,204,216),
(9,5,84,83,91,107,214,226),
(9,5,85,93,101,117,224,236),
(9,6,1,23,20,22,20,20),
(9,6,2,24,21,23,20,20),
(9,6,3,26,22,24,20,21),
(9,6,4,27,22,26,20,21),
(9,6,5,28,23,27,20,21),
(9,6,6,30,24,28,20,21),
(9,6,7,31,25,29,21,22),
(9,6,8,32,26,30,21,22),
(9,6,9,34,26,32,21,22),
(9,6,10,35,27,33,21,23),
(9,6,11,36,28,34,21,23),
(9,6,12,38,29,35,21,23),
(9,6,13,39,30,37,21,24),
(9,6,14,41,31,38,21,24),
(9,6,15,42,32,39,21,24),
(9,6,16,44,33,41,21,25),
(9,6,17,45,34,42,22,25),
(9,6,18,47,34,43,22,25),
(9,6,19,48,35,45,22,26),
(9,6,20,50,36,46,22,26),
(9,6,21,51,37,48,22,26),
(9,6,22,53,38,49,22,27),
(9,6,23,54,39,51,22,27),
(9,6,24,56,40,52,23,28),
(9,6,25,58,41,53,23,28),
(9,6,26,59,42,55,23,28),
(9,6,27,61,43,56,23,29),
(9,6,28,63,44,58,23,29),
(9,6,29,64,45,59,23,30),
(9,6,30,66,46,61,24,30),
(9,6,31,68,47,62,24,30),
(9,6,32,69,48,64,24,31),
(9,6,33,71,50,66,24,31),
(9,6,34,73,51,67,24,32),
(9,6,35,74,52,69,24,32),
(9,6,36,76,53,70,25,33),
(9,6,37,78,54,72,25,33),
(9,6,38,80,55,74,25,34),
(9,6,39,82,56,75,25,34),
(9,6,40,83,57,77,25,35),
(9,6,41,85,58,79,26,35),
(9,6,42,87,60,80,26,35),
(9,6,43,89,61,82,26,36),
(9,6,44,91,62,84,26,36),
(9,6,45,93,63,85,26,37),
(9,6,46,95,64,87,27,37),
(9,6,47,97,66,89,27,38),
(9,6,48,99,67,91,27,38),
(9,6,49,101,68,93,27,39),
(9,6,50,103,69,94,28,40),
(9,6,51,105,71,96,28,40),
(9,6,52,106,72,97,28,41),
(9,6,53,107,72,98,28,41),
(9,6,54,107,73,98,29,42),
(9,6,55,108,73,99,29,43),
(9,6,56,111,75,102,29,44),
(9,6,57,113,76,104,29,44),
(9,6,58,118,77,106,30,45),
(9,6,59,118,79,108,30,45),
(9,6,60,123,80,110,30,46),
(9,6,61,125,81,112,30,47),
(9,6,62,128,83,114,30,47),
(9,6,63,130,84,117,31,48),
(9,6,64,130,86,119,31,48),
(9,6,65,140,87,128,31,49),
(9,6,66,143,89,131,31,50),
(9,6,67,146,90,133,32,50),
(9,6,68,148,92,135,32,51),
(9,6,69,151,93,138,32,52),
(9,6,70,154,95,140,32,52),
(9,6,71,162,97,144,33,53),
(9,6,72,164,98,146,33,54),
(9,6,73,165,100,148,33,55),
(9,6,74,166,102,151,33,55),
(9,6,75,169,103,154,34,56),
(9,6,76,172,105,157,34,57),
(9,6,77,175,107,157,34,58),
(9,6,78,176,108,157,34,58),
(9,6,79,177,110,157,35,59),
(9,6,80,180,112,160,35,60),
(9,6,81,190,122,170,45,70),
(9,6,82,200,132,180,55,80),
(9,6,83,210,142,190,65,90),
(9,6,84,220,152,200,75,100),
(9,6,85,230,162,210,85,110),
(9,7,1,24,17,23,18,25),
(9,7,2,25,17,24,19,26),
(9,7,3,26,18,25,20,27),
(9,7,4,26,18,26,21,28),
(9,7,5,27,19,27,22,29),
(9,7,6,28,19,28,23,30),
(9,7,7,29,20,29,24,31),
(9,7,8,30,20,30,25,32),
(9,7,9,31,21,31,26,33),
(9,7,10,32,21,32,27,34),
(9,7,11,33,22,33,28,36),
(9,7,12,34,22,34,29,37),
(9,7,13,34,23,35,30,38),
(9,7,14,35,23,36,31,39),
(9,7,15,36,24,37,32,40),
(9,7,16,37,24,39,33,41),
(9,7,17,38,25,40,34,43),
(9,7,18,39,25,41,35,44),
(9,7,19,40,26,42,36,45),
(9,7,20,41,26,43,37,46),
(9,7,21,42,27,44,38,47),
(9,7,22,43,27,45,39,49),
(9,7,23,44,28,47,40,50),
(9,7,24,45,28,48,41,51),
(9,7,25,47,29,49,43,52),
(9,7,26,48,30,50,44,54),
(9,7,27,49,30,52,45,55),
(9,7,28,50,31,53,46,56),
(9,7,29,51,31,54,47,58),
(9,7,30,52,32,55,48,59),
(9,7,31,53,33,57,50,60),
(9,7,32,54,33,58,51,62),
(9,7,33,55,34,59,52,63),
(9,7,34,57,34,61,53,65),
(9,7,35,58,35,62,55,66),
(9,7,36,59,36,63,56,67),
(9,7,37,60,36,65,57,69),
(9,7,38,61,37,66,58,70),
(9,7,39,62,38,67,60,72),
(9,7,40,64,38,69,61,73),
(9,7,41,65,39,70,62,75),
(9,7,42,66,40,72,64,76),
(9,7,43,67,40,73,65,78),
(9,7,44,69,41,74,66,79),
(9,7,45,70,42,76,68,81),
(9,7,46,71,42,77,69,82),
(9,7,47,72,43,79,70,84),
(9,7,48,74,44,80,72,85),
(9,7,49,75,45,82,73,87),
(9,7,50,76,45,83,75,89),
(9,7,51,78,46,85,76,90),
(9,7,52,79,47,86,77,92),
(9,7,53,80,47,88,79,93),
(9,7,54,82,48,90,80,95),
(9,7,55,83,49,91,82,97),
(9,7,56,85,50,93,83,98),
(9,7,57,86,50,94,85,100),
(9,7,58,87,51,96,86,102),
(9,7,59,89,52,97,88,103),
(9,7,60,90,53,99,89,105),
(9,7,61,92,54,101,91,107),
(9,7,62,93,54,102,92,109),
(9,7,63,95,55,104,94,110),
(9,7,64,96,56,106,95,112),
(9,7,65,97,57,107,97,114),
(9,7,66,99,58,109,99,116),
(9,7,67,100,58,111,100,118),
(9,7,68,102,59,113,102,119),
(9,7,69,103,60,114,103,121),
(9,7,70,105,61,116,105,123),
(9,7,71,106,62,118,117,125),
(9,7,72,108,63,120,119,128),
(9,7,73,110,64,122,122,130),
(9,7,74,112,65,125,124,132),
(9,7,75,114,66,127,126,134),
(9,7,76,116,67,129,128,137),
(9,7,77,117,68,131,128,139),
(9,7,78,119,69,133,133,141),
(9,7,79,121,70,136,135,144),
(9,7,80,123,71,138,137,146),
(9,7,81,133,81,148,147,156),
(9,7,82,143,91,158,157,166),
(9,7,83,153,101,168,167,176),
(9,7,84,163,111,178,177,186),
(9,7,85,173,121,188,187,196),
(9,8,1,20,20,20,23,22),
(9,8,2,20,20,20,24,23),
(9,8,3,20,20,21,26,25),
(9,8,4,20,20,21,27,26),
(9,8,5,20,21,21,28,27),
(9,8,6,20,21,21,30,29),
(9,8,7,21,21,22,31,30),
(9,8,8,21,21,22,33,31),
(9,8,9,21,21,22,34,33),
(9,8,10,21,21,23,36,34),
(9,8,11,21,22,23,37,36),
(9,8,12,21,22,23,39,37),
(9,8,13,21,22,24,40,38),
(9,8,14,21,22,24,42,40),
(9,8,15,21,22,24,43,41),
(9,8,16,21,23,25,45,43),
(9,8,17,22,23,25,46,44),
(9,8,18,22,23,25,48,46),
(9,8,19,22,23,26,49,47),
(9,8,20,22,23,26,51,49),
(9,8,21,22,24,26,53,51),
(9,8,22,22,24,27,54,52),
(9,8,23,22,24,27,56,54),
(9,8,24,23,24,28,58,55),
(9,8,25,23,25,28,59,57),
(9,8,26,23,25,28,61,59),
(9,8,27,23,25,29,63,60),
(9,8,28,23,25,29,65,62),
(9,8,29,23,25,30,66,64),
(9,8,30,24,26,30,68,65),
(9,8,31,24,26,30,70,67),
(9,8,32,24,26,31,72,69),
(9,8,33,24,27,31,73,70),
(9,8,34,24,27,32,75,72),
(9,8,35,24,27,32,77,74),
(9,8,36,25,27,33,79,76),
(9,8,37,25,28,33,81,78),
(9,8,38,25,28,34,83,79),
(9,8,39,25,28,34,85,81),
(9,8,40,25,28,35,87,83),
(9,8,41,26,29,35,88,85),
(9,8,42,26,29,35,90,87),
(9,8,43,26,29,36,92,89),
(9,8,44,26,30,36,94,91),
(9,8,45,26,30,37,96,92),
(9,8,46,27,30,37,98,94),
(9,8,47,27,31,38,100,96),
(9,8,48,27,31,38,102,98),
(9,8,49,27,31,39,104,100),
(9,8,50,28,32,40,106,102),
(9,8,51,28,32,40,109,104),
(9,8,52,28,32,41,111,106),
(9,8,53,28,33,41,113,108),
(9,8,54,29,33,42,115,110),
(9,8,55,29,33,42,117,112),
(9,8,56,29,34,43,119,114),
(9,8,57,29,34,43,121,117),
(9,8,58,30,34,44,124,119),
(9,8,59,30,35,44,126,121),
(9,8,60,30,35,45,128,123),
(9,8,61,30,35,46,130,125),
(9,8,62,31,36,46,132,127),
(9,8,63,31,36,47,135,129),
(9,8,64,31,37,47,137,132),
(9,8,65,32,37,48,139,134),
(9,8,66,32,37,49,142,136),
(9,8,67,32,38,49,144,138),
(9,8,68,32,38,50,146,140),
(9,8,69,33,39,50,149,143),
(9,8,70,33,39,51,151,145),
(9,8,71,33,39,52,154,152),
(9,8,72,33,40,53,160,155),
(9,8,73,33,40,54,160,158),
(9,8,74,34,41,54,163,160),
(9,8,75,34,41,55,166,163),
(9,8,76,34,41,56,169,166),
(9,8,77,35,42,57,172,169),
(9,8,78,35,42,57,175,173),
(9,8,79,35,43,58,178,176),
(9,8,80,36,43,59,181,179),
(9,8,81,46,53,69,191,189),
(9,8,82,56,63,79,201,199),
(9,8,83,66,73,89,211,209),
(9,8,84,76,83,99,221,219),
(9,8,85,86,93,109,231,229),
(9,9,1,20,20,21,22,22),
(9,9,2,20,20,22,23,23),
(9,9,3,21,21,22,24,24),
(9,9,4,21,21,23,26,25),
(9,9,5,21,21,23,27,27),
(9,9,6,21,22,24,28,28),
(9,9,7,22,22,24,29,29),
(9,9,8,22,23,25,30,30),
(9,9,9,22,23,26,32,31),
(9,9,10,23,23,26,33,33),
(9,9,11,23,24,27,34,34),
(9,9,12,23,24,27,35,35),
(9,9,13,24,25,28,37,36),
(9,9,14,24,25,29,38,38),
(9,9,15,24,25,29,39,39),
(9,9,16,25,26,30,41,40),
(9,9,17,25,26,31,42,42),
(9,9,18,25,27,31,43,43),
(9,9,19,26,27,32,45,44),
(9,9,20,26,28,33,46,46),
(9,9,21,26,28,33,48,47),
(9,9,22,27,29,34,49,49),
(9,9,23,27,29,35,51,50),
(9,9,24,28,30,35,52,51),
(9,9,25,28,30,36,53,53),
(9,9,26,28,31,37,55,54),
(9,9,27,29,31,37,56,56),
(9,9,28,29,32,38,58,57),
(9,9,29,30,32,39,59,59),
(9,9,30,30,33,40,61,60),
(9,9,31,30,33,40,62,62),
(9,9,32,31,34,41,64,63),
(9,9,33,31,34,42,66,65),
(9,9,34,32,35,43,67,66),
(9,9,35,32,35,44,69,68),
(9,9,36,33,36,44,70,69),
(9,9,37,33,36,45,72,71),
(9,9,38,34,37,46,74,73),
(9,9,39,34,38,47,75,74),
(9,9,40,35,38,48,77,76),
(9,9,41,35,39,48,79,78),
(9,9,42,35,39,49,80,79),
(9,9,43,36,40,50,82,81),
(9,9,44,36,40,51,84,83),
(9,9,45,37,41,52,85,84),
(9,9,46,37,42,53,87,86),
(9,9,47,38,42,54,89,88),
(9,9,48,38,43,55,91,89),
(9,9,49,39,44,55,93,91),
(9,9,50,40,44,56,94,93),
(9,9,51,40,45,57,96,95),
(9,9,52,41,45,58,98,97),
(9,9,53,41,46,59,100,98),
(9,9,54,42,47,60,102,100),
(9,9,55,42,47,61,103,102),
(9,9,56,43,48,62,105,104),
(9,9,57,43,49,63,107,106),
(9,9,58,44,49,64,109,108),
(9,9,59,44,50,65,111,109),
(9,9,60,45,51,66,113,111),
(9,9,61,46,51,67,115,113),
(9,9,62,46,52,68,117,115),
(9,9,63,47,53,69,119,117),
(9,9,64,47,54,70,121,119),
(9,9,65,48,54,71,123,121),
(9,9,66,49,55,72,125,123),
(9,9,67,49,56,73,127,125),
(9,9,68,50,57,74,129,127),
(9,9,69,50,57,75,131,129),
(9,9,70,51,58,76,133,131),
(9,9,71,52,59,78,135,146),
(9,9,72,53,59,79,138,148),
(9,9,73,54,60,80,140,151),
(9,9,74,54,61,89,143,154),
(9,9,75,55,62,91,145,156),
(9,9,76,56,63,92,148,159),
(9,9,77,57,64,93,151,162),
(9,9,78,57,65,95,153,165),
(9,9,79,58,66,96,156,168),
(9,9,80,59,67,97,159,170),
(9,9,81,69,77,107,169,180),
(9,9,82,79,87,117,179,190),
(9,9,83,89,97,127,189,200),
(9,9,84,99,107,137,199,210),
(9,9,85,109,117,147,209,220),
(10,1,1,20,22,20,24,19),
(10,1,81,174,117,161,39,58),
(10,1,82,186,119,164,39,58),
(10,1,83,189,121,167,39,59),
(10,1,84,192,123,170,40,60),
(10,1,85,195,125,173,40,61),
(10,1,2,24,21,23,20,20),
(10,1,3,26,22,24,20,21),
(10,1,4,27,22,26,20,21),
(10,1,5,28,23,27,20,21),
(10,1,6,30,24,28,20,21),
(10,1,7,31,25,29,21,22),
(10,1,8,32,26,30,21,22),
(10,1,9,34,26,32,21,22),
(10,1,10,30,28,31,24,21),
(10,1,11,32,29,33,24,21),
(10,1,12,33,30,34,24,21),
(10,1,13,34,31,35,24,22),
(10,1,14,36,32,36,25,22),
(10,1,15,37,32,37,25,22),
(10,1,16,38,33,38,25,23),
(10,1,17,39,34,40,25,23),
(10,1,18,41,35,41,25,23),
(10,1,19,42,36,42,25,24),
(10,1,20,44,37,43,25,24),
(10,1,21,45,37,45,26,24),
(10,1,22,46,38,46,26,25),
(10,1,23,48,39,47,26,25),
(10,1,24,49,40,49,26,26),
(10,1,25,51,41,50,26,26),
(10,1,26,52,42,51,26,26),
(10,1,27,54,43,53,26,27),
(10,1,28,55,44,54,27,27),
(10,1,29,57,45,56,27,28),
(10,1,30,59,46,57,27,28),
(10,1,31,60,47,58,27,28),
(10,1,32,62,48,60,27,29),
(10,1,33,63,49,61,27,29),
(10,1,34,65,50,63,28,30),
(10,1,35,67,51,64,28,30),
(10,1,36,69,52,66,28,31),
(10,1,37,70,53,68,28,31),
(10,1,38,72,54,69,28,31),
(10,1,39,74,55,71,29,32),
(10,1,40,76,56,72,29,32),
(10,1,41,77,58,74,29,33),
(10,1,42,79,59,76,29,33),
(10,1,43,81,60,77,29,34),
(10,1,44,83,61,79,29,34),
(10,1,45,85,62,81,30,35),
(10,1,46,87,63,83,30,35),
(10,1,47,89,65,84,30,36),
(10,1,48,91,66,86,30,36),
(10,1,49,93,67,88,31,37),
(10,1,50,95,68,90,31,37),
(10,1,51,97,70,92,31,38),
(10,1,52,99,71,94,31,38),
(10,1,53,101,72,96,31,39),
(10,1,54,103,74,98,32,40),
(10,1,55,106,75,100,32,40),
(10,1,56,108,76,102,32,41),
(10,1,57,110,78,104,32,41),
(10,1,58,112,79,106,33,42),
(10,1,59,115,81,108,33,42),
(10,1,60,117,82,110,33,43),
(10,1,61,119,83,112,33,44),
(10,1,62,122,85,114,33,44),
(10,1,63,124,86,117,34,45),
(10,1,64,127,88,119,34,45),
(10,1,65,129,90,121,34,46),
(10,1,66,132,91,123,35,47),
(10,1,67,134,93,126,35,47),
(10,1,68,137,94,128,35,48),
(10,1,69,139,96,130,35,49),
(10,1,70,142,98,133,36,49),
(10,1,71,145,99,135,36,50),
(10,1,72,147,101,138,36,51),
(10,1,73,150,103,140,36,52),
(10,1,74,153,104,143,37,52),
(10,1,75,156,106,145,37,53),
(10,1,76,159,108,148,37,54),
(10,1,77,162,110,151,38,55),
(10,1,78,165,111,153,38,55),
(10,1,79,168,113,156,38,56),
(10,1,80,171,115,159,39,57),
(10,2,1,19,22,21,24,20),
(10,2,2,20,23,22,25,21),
(10,2,3,21,23,23,25,21),
(10,2,4,22,24,24,26,22),
(10,2,5,23,24,25,27,23),
(10,2,6,25,25,26,27,24),
(10,2,7,26,25,27,28,24),
(10,2,8,27,26,28,29,25),
(10,2,9,28,27,29,29,26),
(10,2,10,29,27,31,30,26),
(10,2,11,30,28,32,31,27),
(10,2,12,32,29,33,31,28),
(10,2,13,33,29,34,32,29),
(10,2,14,34,30,35,33,30),
(10,2,15,35,31,36,33,30),
(10,2,16,37,31,37,34,31),
(10,2,17,38,32,39,35,32),
(10,2,18,39,33,40,36,33),
(10,2,19,40,33,41,36,34),
(10,2,20,42,34,42,37,35),
(10,2,21,43,35,44,38,35),
(10,2,22,44,35,45,39,36),
(10,2,23,46,36,46,40,37),
(10,2,24,47,37,47,40,38),
(10,2,25,49,38,49,41,39),
(10,2,26,50,38,50,42,40),
(10,2,27,51,39,51,43,41),
(10,2,28,53,40,53,44,42),
(10,2,29,54,41,54,45,43),
(10,2,30,56,41,55,45,43),
(10,2,31,57,42,57,46,44),
(10,2,32,58,43,58,47,45),
(10,2,33,60,44,59,48,46),
(10,2,34,61,45,61,49,47),
(10,2,35,63,45,62,50,48),
(10,2,36,64,46,64,51,49),
(10,2,37,66,47,65,52,50),
(10,2,38,67,48,67,53,51),
(10,2,39,69,49,68,54,52),
(10,2,40,71,50,69,55,53),
(10,2,41,72,50,71,55,54),
(10,2,42,74,51,72,56,55),
(10,2,43,75,52,74,57,56),
(10,2,44,77,53,75,58,57),
(10,2,45,79,54,77,59,59),
(10,2,46,80,55,78,60,60),
(10,2,47,82,56,80,61,61),
(10,2,48,83,57,82,62,62),
(10,2,49,85,58,83,63,63),
(10,2,50,87,59,85,64,64),
(10,2,51,89,60,86,66,65),
(10,2,52,90,61,88,67,66),
(10,2,53,92,61,90,68,67),
(10,2,54,94,62,91,69,69),
(10,2,55,95,63,93,70,70),
(10,2,56,97,64,95,71,71),
(10,2,57,99,65,96,72,72),
(10,2,58,101,66,98,73,73),
(10,2,59,102,67,100,74,74),
(10,2,60,104,68,101,75,76),
(10,2,61,106,69,103,76,77),
(10,2,62,108,70,105,78,78),
(10,2,63,110,72,106,79,79),
(10,2,64,112,73,108,80,80),
(10,2,65,113,74,110,81,82),
(10,2,66,115,75,112,82,83),
(10,2,67,117,76,114,83,84),
(10,2,68,119,77,115,85,85),
(10,2,69,121,78,117,86,87),
(10,2,70,123,79,119,87,88),
(10,2,71,125,80,120,88,89),
(10,2,72,128,81,123,90,91),
(10,2,73,130,82,125,91,93),
(10,2,74,133,84,127,93,94),
(10,2,75,135,85,129,94,96),
(10,2,76,137,86,132,96,97),
(10,2,77,140,88,134,97,99),
(10,2,78,143,89,136,99,101),
(10,2,79,145,90,139,100,102),
(10,2,80,148,92,141,102,104),
(10,2,81,157,93,146,102,105),
(10,2,82,160,95,148,104,106),
(10,2,83,163,96,151,105,108),
(10,2,84,167,98,153,107,110),
(10,2,85,169,99,156,109,112),
(10,3,1,17,25,20,24,20),
(10,3,2,17,26,21,25,21),
(10,3,3,18,28,22,25,21),
(10,3,4,18,29,23,26,22),
(10,3,5,19,30,24,26,23),
(10,3,6,19,32,25,27,23),
(10,3,7,20,33,26,27,24),
(10,3,8,20,35,27,28,25),
(10,3,9,21,36,27,29,25),
(10,3,10,21,38,28,29,26),
(10,3,11,22,39,29,30,27),
(10,3,12,22,41,30,31,27),
(10,3,13,23,42,31,31,28),
(10,3,14,23,44,32,32,29),
(10,3,15,24,45,34,32,29),
(10,3,16,24,47,35,33,30),
(10,3,17,25,48,36,34,31),
(10,3,18,25,50,37,34,32),
(10,3,19,26,51,38,35,32),
(10,3,20,26,53,39,36,33),
(10,3,21,27,55,40,37,34),
(10,3,22,27,56,41,37,35),
(10,3,23,28,58,42,38,36),
(10,3,24,28,60,43,39,36),
(10,3,25,29,61,44,39,37),
(10,3,26,30,63,46,40,38),
(10,3,27,30,65,47,41,39),
(10,3,28,31,66,48,42,40),
(10,3,29,31,68,49,42,40),
(10,3,30,32,70,50,43,41),
(10,3,31,33,72,52,44,42),
(10,3,32,33,73,53,45,43),
(10,3,33,34,75,54,46,44),
(10,3,34,34,77,55,46,45),
(10,3,35,35,79,57,47,46),
(10,3,36,36,81,58,48,47),
(10,3,37,36,83,59,49,47),
(10,3,38,37,85,60,50,48),
(10,3,39,38,86,62,51,49),
(10,3,40,38,88,63,51,50),
(10,3,41,39,90,64,52,51),
(10,3,42,40,92,66,53,52),
(10,3,43,40,94,67,54,53),
(10,3,44,41,96,68,55,54),
(10,3,45,42,98,70,56,55),
(10,3,46,42,100,71,57,56),
(10,3,47,43,102,72,58,57),
(10,3,48,44,104,74,59,58),
(10,3,49,45,106,75,60,59),
(10,3,50,45,108,77,61,60),
(10,3,51,46,110,78,61,61),
(10,3,52,47,113,79,62,62),
(10,3,53,47,115,81,63,63),
(10,3,54,48,117,82,64,64),
(10,3,55,49,119,84,65,65),
(10,3,56,50,121,85,66,66),
(10,3,57,50,123,87,67,67),
(10,3,58,51,126,88,68,68),
(10,3,59,52,128,90,69,70),
(10,3,60,53,130,91,70,71),
(10,3,61,54,132,93,71,72),
(10,3,62,54,134,94,72,73),
(10,3,63,55,137,96,73,74),
(10,3,64,56,139,97,75,75),
(10,3,65,57,141,99,76,76),
(10,3,66,58,144,101,77,77),
(10,3,67,58,146,102,78,78),
(10,3,68,59,148,104,79,80),
(10,3,69,60,151,105,80,81),
(10,3,70,61,153,107,81,82),
(10,3,71,62,156,108,82,83),
(10,3,72,63,159,110,83,84),
(10,3,73,64,162,112,84,86),
(10,3,74,65,165,114,86,87),
(10,3,75,66,168,116,87,89),
(10,3,76,67,171,118,89,90),
(10,3,77,68,174,120,90,92),
(10,3,78,69,177,122,91,93),
(10,3,79,70,180,124,92,95),
(10,3,80,71,183,126,94,96),
(10,3,81,72,196,130,94,97),
(10,3,82,74,199,133,96,98),
(10,3,83,75,202,135,97,100),
(10,3,84,76,206,137,99,101),
(10,3,85,77,210,139,100,103),
(10,4,1,18,25,20,24,19),
(10,4,2,19,26,21,24,19),
(10,4,3,20,28,21,24,20),
(10,4,4,20,29,22,24,20),
(10,4,5,21,31,23,25,20),
(10,4,6,22,32,24,25,21),
(10,4,7,23,34,24,25,21),
(10,4,8,24,35,25,25,22),
(10,4,9,24,37,26,25,22),
(10,4,10,25,38,26,25,22),
(10,4,11,26,40,27,25,23),
(10,4,12,27,41,28,26,23),
(10,4,13,28,43,29,26,24),
(10,4,14,29,45,30,26,24),
(10,4,15,29,46,30,26,25),
(10,4,16,30,48,31,26,25),
(10,4,17,31,50,32,27,25),
(10,4,18,32,51,33,27,26),
(10,4,19,33,53,34,27,26),
(10,4,20,34,55,35,27,27),
(10,4,21,35,56,35,27,27),
(10,4,22,36,58,36,28,28),
(10,4,23,37,60,37,28,28),
(10,4,24,38,62,38,28,29),
(10,4,25,39,63,39,28,29),
(10,4,26,40,65,40,29,30),
(10,4,27,41,67,41,29,30),
(10,4,28,42,69,42,29,31),
(10,4,29,43,71,43,29,31),
(10,4,30,44,72,43,29,32),
(10,4,31,45,74,44,30,32),
(10,4,32,46,76,45,30,33),
(10,4,33,47,78,46,30,33),
(10,4,34,48,80,47,31,34),
(10,4,35,49,82,48,31,34),
(10,4,36,50,84,49,31,35),
(10,4,37,51,86,50,31,35),
(10,4,38,52,88,51,32,36),
(10,4,39,53,90,52,32,37),
(10,4,40,54,92,53,32,37),
(10,4,41,56,94,54,33,38),
(10,4,42,57,96,55,33,38),
(10,4,43,58,98,56,33,39),
(10,4,44,59,100,57,33,39),
(10,4,45,60,102,59,34,40),
(10,4,46,61,104,60,34,41),
(10,4,47,62,107,61,34,41),
(10,4,48,64,109,62,35,42),
(10,4,49,65,111,63,35,43),
(10,4,50,66,113,64,35,43),
(10,4,51,67,115,65,36,44),
(10,4,52,68,117,66,36,44),
(10,4,53,70,120,67,36,45),
(10,4,54,71,122,69,37,46),
(10,4,55,72,124,70,37,46),
(10,4,56,73,126,71,37,47),
(10,4,57,75,129,72,38,48),
(10,4,58,76,131,73,38,48),
(10,4,59,77,133,74,39,49),
(10,4,60,79,136,76,39,50),
(10,4,61,80,138,77,39,51),
(10,4,62,81,140,78,40,51),
(10,4,63,82,143,79,40,52),
(10,4,64,84,145,80,41,53),
(10,4,65,85,148,82,41,53),
(10,4,66,87,150,83,41,54),
(10,4,67,88,153,84,42,55),
(10,4,68,89,155,85,42,56),
(10,4,69,91,157,87,43,56),
(10,4,70,92,160,88,43,57),
(10,4,71,94,163,88,43,58),
(10,4,72,96,166,90,44,58),
(10,4,73,97,169,92,44,59),
(10,4,74,99,172,93,45,60),
(10,4,75,101,175,95,45,61),
(10,4,76,102,178,96,45,62),
(10,4,77,104,181,101,46,63),
(10,4,78,106,185,104,46,64),
(10,4,79,108,188,105,47,65),
(10,4,80,110,191,107,47,66),
(10,4,81,111,204,107,47,66),
(10,4,82,113,207,108,47,66),
(10,4,83,115,211,110,48,67),
(10,4,84,117,215,112,48,68),
(10,4,85,119,218,114,49,69),
(10,5,1,17,22,19,26,22),
(10,5,2,17,22,19,27,23),
(10,5,3,17,22,20,29,25),
(10,5,4,17,23,20,30,26),
(10,5,5,18,23,20,31,27),
(10,5,6,18,23,21,33,29),
(10,5,7,18,23,21,34,30),
(10,5,8,18,24,22,35,32),
(10,5,9,18,24,22,37,33),
(10,5,10,19,24,22,38,35),
(10,5,11,19,24,23,39,36),
(10,5,12,19,24,23,41,38),
(10,5,13,19,25,24,42,39),
(10,5,14,19,25,24,44,41),
(10,5,15,19,25,25,45,42),
(10,5,16,20,26,25,47,44),
(10,5,17,20,26,25,48,45),
(10,5,18,20,26,26,50,47),
(10,5,19,20,26,26,51,49),
(10,5,20,21,27,27,53,50),
(10,5,21,21,27,27,54,52),
(10,5,22,21,27,28,56,53),
(10,5,23,21,28,28,58,55),
(10,5,24,21,28,29,59,57),
(10,5,25,22,28,29,61,58),
(10,5,26,22,28,30,62,60),
(10,5,27,22,29,30,64,62),
(10,5,28,22,29,31,66,64),
(10,5,29,23,29,31,67,65),
(10,5,30,23,30,32,69,67),
(10,5,31,23,30,32,71,69),
(10,5,32,23,30,33,72,71),
(10,5,33,24,31,33,74,72),
(10,5,34,24,31,34,76,74),
(10,5,35,24,32,34,78,76),
(10,5,36,24,32,35,80,78),
(10,5,37,25,32,35,81,80),
(10,5,38,25,33,36,83,82),
(10,5,39,25,33,37,85,84),
(10,5,40,26,33,37,87,86),
(10,5,41,26,34,38,89,88),
(10,5,42,26,34,38,91,89),
(10,5,43,27,35,39,92,91),
(10,5,44,27,35,39,94,93),
(10,5,45,27,35,40,96,95),
(10,5,46,27,36,41,98,97),
(10,5,47,28,36,41,100,99),
(10,5,48,28,37,42,102,101),
(10,5,49,28,37,43,104,103),
(10,5,50,29,37,43,106,106),
(10,5,51,29,38,44,108,108),
(10,5,52,29,38,44,110,110),
(10,5,53,30,39,45,112,112),
(10,5,54,30,39,46,114,114),
(10,5,55,30,40,46,116,116),
(10,5,56,31,40,47,118,118),
(10,5,57,31,41,48,120,120),
(10,5,58,31,41,48,123,123),
(10,5,59,32,42,49,125,125),
(10,5,60,32,42,50,127,127),
(10,5,61,33,42,51,129,129),
(10,5,62,33,43,51,131,131),
(10,5,63,33,43,52,133,134),
(10,5,64,34,44,53,135,136),
(10,5,65,34,44,53,138,138),
(10,5,66,34,45,54,140,141),
(10,5,67,35,45,55,142,143),
(10,5,68,35,46,56,144,145),
(10,5,69,36,46,56,147,148),
(10,5,70,36,47,57,149,150),
(10,5,71,36,48,57,152,153),
(10,5,72,37,48,57,155,156),
(10,5,73,37,49,58,158,159),
(10,5,74,38,49,59,160,163),
(10,5,75,38,50,60,163,165),
(10,5,76,38,51,61,166,170),
(10,5,77,39,51,62,168,175),
(10,5,78,39,52,63,172,174),
(10,5,79,40,52,64,175,177),
(10,5,80,40,53,65,178,180),
(10,5,81,41,54,68,188,183),
(10,5,82,41,54,68,192,186),
(10,5,83,42,55,69,196,189),
(10,5,84,42,56,70,199,193),
(10,5,85,43,56,71,202,196),
(10,6,1,18,23,21,24,20),
(10,6,2,19,24,22,24,20),
(10,6,3,21,25,23,24,21),
(10,6,4,22,25,25,24,21),
(10,6,5,23,26,26,24,21),
(10,6,6,25,27,27,24,21),
(10,6,7,26,28,28,24,22),
(10,6,8,27,29,29,25,22),
(10,6,9,29,29,31,25,22),
(10,6,10,30,30,32,25,23),
(10,6,11,32,31,33,25,23),
(10,6,12,33,32,34,25,23),
(10,6,13,34,33,36,25,24),
(10,6,14,36,34,37,25,24),
(10,6,15,37,35,38,25,24),
(10,6,16,39,36,40,25,25),
(10,6,17,40,36,41,25,25),
(10,6,18,42,37,43,26,25),
(10,6,19,43,38,44,26,26),
(10,6,20,45,39,45,26,26),
(10,6,21,47,40,47,26,26),
(10,6,22,48,41,48,26,27),
(10,6,23,50,42,50,26,27),
(10,6,24,51,43,51,26,28),
(10,6,25,53,44,52,27,28),
(10,6,26,55,45,54,27,28),
(10,6,27,56,46,55,27,29),
(10,6,28,58,47,57,27,29),
(10,6,29,59,48,58,27,30),
(10,6,30,61,49,60,27,30),
(10,6,31,63,50,62,27,30),
(10,6,32,65,51,63,28,31),
(10,6,33,66,52,65,28,31),
(10,6,34,68,53,66,28,32),
(10,6,35,70,55,68,28,32),
(10,6,36,72,56,69,28,33),
(10,6,37,73,57,71,29,33),
(10,6,38,75,58,73,29,34),
(10,6,39,77,59,74,29,34),
(10,6,40,79,60,76,29,35),
(10,6,41,81,61,78,29,35),
(10,6,42,82,62,79,30,35),
(10,6,43,84,64,81,30,36),
(10,6,44,86,65,83,30,36),
(10,6,45,88,66,85,30,37),
(10,6,46,90,67,86,30,37),
(10,6,47,92,68,88,31,38),
(10,6,48,94,69,90,31,38),
(10,6,49,96,69,92,31,39),
(10,6,50,98,70,93,31,40),
(10,6,51,100,71,95,32,40),
(10,6,52,102,72,96,32,41),
(10,6,53,103,73,97,32,41),
(10,6,54,104,74,98,32,41),
(10,6,55,105,75,97,33,41),
(10,6,56,108,77,100,33,42),
(10,6,57,113,78,102,33,42),
(10,6,58,115,79,104,34,43),
(10,6,59,117,81,106,34,43),
(10,6,60,118,82,108,34,44),
(10,6,61,119,83,110,34,45),
(10,6,62,121,85,112,34,45),
(10,6,63,124,86,115,35,46),
(10,6,64,127,88,117,35,46),
(10,6,65,133,89,119,35,47),
(10,6,66,135,91,122,35,48),
(10,6,67,139,92,124,36,48),
(10,6,68,141,94,126,36,49),
(10,6,69,142,95,129,36,50),
(10,6,70,145,97,131,36,50),
(10,6,71,150,99,134,37,51),
(10,6,72,152,100,136,37,52),
(10,6,73,155,102,139,37,53),
(10,6,74,158,104,141,37,53),
(10,6,75,159,105,144,38,54),
(10,6,76,160,107,147,38,55),
(10,6,77,163,109,149,38,56),
(10,6,78,166,110,152,38,56),
(10,6,79,169,112,155,39,57),
(10,6,80,172,114,158,39,58),
(10,6,81,175,116,163,38,58),
(10,6,82,175,118,165,39,58),
(10,6,83,182,120,168,39,59),
(10,6,84,182,122,171,39,60),
(10,6,85,188,123,174,39,61),
(10,7,81,119,77,138,139,144),
(10,7,82,121,79,141,142,146),
(10,7,83,124,80,143,142,149),
(10,7,84,126,81,145,142,151),
(10,7,85,128,82,148,148,154),
(10,7,10,25,26,29,31,28),
(10,7,11,26,26,30,32,29),
(10,7,12,27,27,31,33,30),
(10,7,13,27,27,32,34,31),
(10,7,14,28,28,33,35,32),
(10,7,15,29,28,34,36,34),
(10,7,16,30,29,35,37,35),
(10,7,17,31,29,36,38,36),
(10,7,18,32,30,37,39,37),
(10,7,19,33,30,38,40,38),
(10,7,20,34,31,39,41,39),
(10,7,21,35,31,40,42,40),
(10,7,22,35,32,41,43,41),
(10,7,23,36,32,42,44,42),
(10,7,24,37,33,43,45,44),
(10,7,25,38,33,45,46,45),
(10,7,26,39,34,46,47,46),
(10,7,27,40,34,47,48,47),
(10,7,28,41,35,48,49,48),
(10,7,29,42,35,49,50,50),
(10,7,30,43,36,50,51,51),
(10,7,31,45,36,52,53,52),
(10,7,32,46,37,53,54,54),
(10,7,33,47,38,54,55,55),
(10,7,34,48,38,55,56,56),
(10,7,35,49,39,57,57,58),
(10,7,36,50,40,58,59,59),
(10,7,37,51,40,59,60,60),
(10,7,38,52,41,61,61,62),
(10,7,39,53,41,62,62,63),
(10,7,40,55,42,63,64,65),
(10,7,41,56,43,65,65,66),
(10,7,42,57,43,66,66,68),
(10,7,43,58,44,68,67,69),
(10,7,44,60,45,69,69,71),
(10,7,45,61,45,71,70,72),
(10,7,46,62,46,72,72,74),
(10,7,47,63,47,74,73,75),
(10,7,48,65,48,75,74,77),
(10,7,49,66,48,77,76,79),
(10,7,50,67,49,78,77,80),
(10,7,51,69,50,80,79,82),
(10,7,52,70,51,81,80,84),
(10,7,53,72,51,83,82,85),
(10,7,54,73,52,85,83,87),
(10,7,55,74,53,86,85,89),
(10,7,56,76,54,88,86,91),
(10,7,57,77,55,90,88,92),
(10,7,58,79,55,91,90,94),
(10,7,59,80,56,93,91,96),
(10,7,60,82,57,95,93,98),
(10,7,61,84,58,97,95,100),
(10,7,62,85,59,99,96,102),
(10,7,63,87,60,100,98,104),
(10,7,64,88,60,102,100,106),
(10,7,65,90,61,104,102,108),
(10,7,66,92,62,106,103,110),
(10,7,67,93,63,108,105,112),
(10,7,68,95,64,110,107,114),
(10,7,69,97,65,112,109,116),
(10,7,70,99,66,114,111,118),
(10,7,71,100,67,116,113,120),
(10,7,72,102,68,118,115,123),
(10,7,73,104,69,120,117,125),
(10,7,74,106,70,123,119,127),
(10,7,75,108,71,125,121,129),
(10,7,76,110,72,127,123,132),
(10,7,77,111,73,129,125,134),
(10,7,78,113,74,131,127,136),
(10,7,79,115,75,134,129,139),
(10,7,80,117,76,136,131,141),
(10,8,1,17,22,19,27,21),
(10,8,2,17,22,19,28,22),
(10,8,3,17,22,20,30,24),
(10,8,4,17,22,20,31,25),
(10,8,5,17,23,20,32,26),
(10,8,6,17,23,20,34,28),
(10,8,7,18,23,21,35,29),
(10,8,8,18,23,21,37,30),
(10,8,9,18,23,21,38,32),
(10,8,10,18,23,22,40,33),
(10,8,11,18,24,22,41,35),
(10,8,12,18,24,22,42,36),
(10,8,13,18,24,23,44,37),
(10,8,14,18,24,23,45,39),
(10,8,15,18,24,23,47,40),
(10,8,16,19,24,24,49,42),
(10,8,17,19,25,24,50,43),
(10,8,18,19,25,24,52,45),
(10,8,19,19,25,25,53,46),
(10,8,20,19,25,25,55,48),
(10,8,21,19,25,26,57,50),
(10,8,22,19,26,26,58,51),
(10,8,23,20,26,26,60,53),
(10,8,24,20,26,27,61,54),
(10,8,25,20,26,27,63,56),
(10,8,26,20,27,27,65,58),
(10,8,27,20,27,28,67,59),
(10,8,28,20,27,28,68,61),
(10,8,29,21,27,29,70,63),
(10,8,30,21,28,29,72,64),
(10,8,31,21,28,30,74,66),
(10,8,32,21,28,30,75,68),
(10,8,33,21,28,30,77,70),
(10,8,34,21,29,31,79,71),
(10,8,35,22,29,31,81,73),
(10,8,36,22,29,32,83,75),
(10,8,37,22,29,32,85,77),
(10,8,38,22,30,33,86,78),
(10,8,39,22,30,33,88,80),
(10,8,40,23,30,34,90,82),
(10,8,41,23,31,34,92,84),
(10,8,42,23,31,35,94,86),
(10,8,43,23,31,35,96,88),
(10,8,44,23,32,36,98,90),
(10,8,45,24,32,36,100,92),
(10,8,46,24,32,37,102,93),
(10,8,47,24,32,37,104,95),
(10,8,48,24,33,38,106,97),
(10,8,49,25,33,38,108,99),
(10,8,50,25,33,39,110,101),
(10,8,51,25,34,39,112,103),
(10,8,52,25,34,40,114,105),
(10,8,53,25,35,40,117,107),
(10,8,54,26,35,41,119,109),
(10,8,55,26,35,41,121,111),
(10,8,56,26,36,42,123,113),
(10,8,57,26,36,42,125,116),
(10,8,58,27,36,43,127,118),
(10,8,59,27,37,43,130,120),
(10,8,60,27,37,44,132,122),
(10,8,61,27,37,45,134,124),
(10,8,62,28,38,45,136,126),
(10,8,63,28,38,46,139,128),
(10,8,64,28,39,46,141,131),
(10,8,65,29,39,47,143,133),
(10,8,66,29,39,48,146,135),
(10,8,67,29,40,48,148,137),
(10,8,68,29,40,49,150,139),
(10,8,69,30,41,49,153,142),
(10,8,70,30,41,50,155,144),
(10,8,71,30,41,50,158,147),
(10,8,72,30,42,51,161,150),
(10,8,73,30,42,52,164,153),
(10,8,74,31,43,52,167,155),
(10,8,75,31,43,53,170,158),
(10,8,76,31,43,54,173,161),
(10,8,77,32,44,55,176,164),
(10,8,78,32,44,55,179,167),
(10,8,79,32,45,56,182,170),
(10,8,80,33,45,57,185,173),
(10,8,81,33,46,60,197,175),
(10,8,82,33,46,60,200,178),
(10,8,83,33,47,61,203,182),
(10,8,84,34,47,62,207,185),
(10,8,85,34,48,63,210,188),
(10,9,1,17,22,20,26,21),
(10,9,2,17,22,21,27,22),
(10,9,3,18,23,21,28,23),
(10,9,4,18,23,22,29,24),
(10,9,5,18,23,22,31,26),
(10,9,6,18,24,23,32,27),
(10,9,7,19,24,23,33,28),
(10,9,8,19,25,24,34,29),
(10,9,9,19,25,25,36,30),
(10,9,10,20,25,25,37,32),
(10,9,11,20,26,26,38,33),
(10,9,12,20,26,26,39,34),
(10,9,13,21,27,27,41,36),
(10,9,14,21,27,28,42,37),
(10,9,15,21,27,28,43,38),
(10,9,16,22,28,29,45,39),
(10,9,17,22,28,30,46,41),
(10,9,18,23,29,30,47,42),
(10,9,19,23,29,31,49,43),
(10,9,20,23,30,32,50,45),
(10,9,21,24,30,32,51,46),
(10,9,22,24,31,33,53,48),
(10,9,23,24,31,34,54,49),
(10,9,24,25,31,34,56,50),
(10,9,25,25,32,35,57,52),
(10,9,26,26,32,36,59,53),
(10,9,27,26,33,37,60,55),
(10,9,28,26,33,37,62,56),
(10,9,29,27,34,38,63,58),
(10,9,30,27,34,39,65,59),
(10,9,31,28,35,40,66,61),
(10,9,32,28,36,40,68,62),
(10,9,33,29,36,41,69,64),
(10,9,34,29,37,42,71,65),
(10,9,35,29,37,43,73,67),
(10,9,36,30,38,43,74,69),
(10,9,37,30,38,44,76,70),
(10,9,38,31,39,45,77,72),
(10,9,39,31,39,46,79,73),
(10,9,40,32,40,47,81,75),
(10,9,41,32,41,48,82,77),
(10,9,42,33,41,48,84,78),
(10,9,43,33,42,49,86,80),
(10,9,44,34,42,50,88,82),
(10,9,45,34,43,51,89,83),
(10,9,46,35,44,52,91,85),
(10,9,47,35,44,53,93,87),
(10,9,48,36,45,54,95,89),
(10,9,49,36,45,54,96,90),
(10,9,50,37,46,55,98,92),
(10,9,51,37,47,56,100,94),
(10,9,52,38,47,57,102,96),
(10,9,53,38,48,58,104,97),
(10,9,54,39,49,59,105,99),
(10,9,55,39,49,60,107,101),
(10,9,56,40,50,61,109,103),
(10,9,57,40,51,62,111,105),
(10,9,58,41,51,63,113,107),
(10,9,59,42,52,64,115,108),
(10,9,60,42,53,65,117,110),
(10,9,61,43,53,66,119,112),
(10,9,62,43,54,67,121,114),
(10,9,63,44,55,68,123,116),
(10,9,64,44,56,69,125,118),
(10,9,65,45,56,70,127,120),
(10,9,66,46,57,71,129,122),
(10,9,67,46,58,72,131,124),
(10,9,68,47,58,73,133,126),
(10,9,69,47,59,74,135,128),
(10,9,70,48,60,75,137,130),
(10,9,71,49,61,83,139,141),
(10,9,72,50,61,84,142,143),
(10,9,73,51,62,84,144,146),
(10,9,74,51,63,86,147,149),
(10,9,75,52,64,89,149,151),
(10,9,76,53,65,90,155,154),
(10,9,77,54,66,91,155,157),
(10,9,78,54,67,93,157,160),
(10,9,79,55,68,94,160,163),
(10,9,80,56,69,95,163,165),
(10,9,81,57,70,91,172,167),
(10,9,82,57,70,92,175,170),
(10,9,83,58,71,94,178,173),
(10,9,84,59,72,95,181,176),
(10,9,85,60,73,96,184,179),
(10,11,81,88,85,99,149,159),
(10,11,82,89,87,101,151,162),
(10,11,83,91,88,102,154,165),
(10,11,84,92,89,104,163,168),
(10,11,85,93,91,106,163,171),
(10,11,10,23,26,25,33,29),
(10,11,11,23,27,26,34,31),
(10,11,12,24,27,27,35,32),
(10,11,13,24,28,27,36,33),
(10,11,14,25,28,28,37,34),
(10,11,15,26,29,29,39,35),
(10,11,16,26,29,29,40,36),
(10,11,17,27,30,30,41,38),
(10,11,18,27,31,31,42,39),
(10,11,19,28,31,31,43,40),
(10,11,20,29,32,32,44,41),
(10,11,21,29,32,33,45,43),
(10,11,22,30,33,34,46,44),
(10,11,23,31,34,34,47,45),
(10,11,24,31,34,35,49,47),
(10,11,25,32,35,36,50,48),
(10,11,26,33,35,37,51,49),
(10,11,27,33,36,37,52,51),
(10,11,28,34,37,38,53,52),
(10,11,29,35,37,39,55,54),
(10,11,30,35,38,40,56,55),
(10,11,31,36,39,41,57,56),
(10,11,32,37,39,42,59,58),
(10,11,33,38,40,42,60,59),
(10,11,34,38,41,43,61,61),
(10,11,35,39,41,44,63,62),
(10,11,36,40,42,45,64,64),
(10,11,37,41,43,46,65,66),
(10,11,38,42,43,47,67,67),
(10,11,39,42,44,48,68,69),
(10,11,40,43,45,49,70,70),
(10,11,41,44,46,50,71,72),
(10,11,42,45,46,51,73,74),
(10,11,43,46,47,52,74,75),
(10,11,44,47,48,52,76,77),
(10,11,45,47,49,53,77,79),
(10,11,46,48,50,54,79,81),
(10,11,47,49,50,56,80,82),
(10,11,48,50,51,57,82,84),
(10,11,49,51,52,58,84,86),
(10,11,50,52,53,59,85,88),
(10,11,51,53,54,60,87,90),
(10,11,52,54,55,61,89,92),
(10,11,53,55,56,62,90,94),
(10,11,54,56,56,63,92,96),
(10,11,55,57,57,64,94,98),
(10,11,56,58,58,65,96,100),
(10,11,57,59,59,66,97,102),
(10,11,58,60,60,68,99,104),
(10,11,59,61,61,69,101,106),
(10,11,60,62,62,70,103,108),
(10,11,61,63,63,71,105,110),
(10,11,62,64,64,72,107,112),
(10,11,63,65,65,74,109,115),
(10,11,64,66,66,75,111,117),
(10,11,65,68,67,76,113,119),
(10,11,66,69,68,78,115,121),
(10,11,67,70,69,79,117,124),
(10,11,68,71,70,80,119,126),
(10,11,69,72,71,82,121,128),
(10,11,70,73,72,83,123,131),
(10,11,71,75,73,84,125,133),
(10,11,72,76,75,86,128,136),
(10,11,73,77,76,87,130,138),
(10,11,74,78,77,89,132,141),
(10,11,75,80,78,90,134,143),
(10,11,76,81,79,92,137,146),
(10,11,77,82,80,93,139,149),
(10,11,78,84,82,95,141,151),
(10,11,79,85,83,96,144,154),
(10,11,80,86,84,98,146,157),
(11,1,1,24,17,21,21,22),
(11,1,2,25,18,22,21,22),
(11,1,3,27,19,23,21,23),
(11,1,4,28,19,25,21,23),
(11,1,5,29,20,26,21,23),
(11,1,6,31,21,27,21,23),
(11,1,7,32,22,28,21,24),
(11,1,8,33,23,29,22,24),
(11,1,9,35,24,31,22,24),
(11,1,10,36,24,32,22,25),
(11,1,11,37,25,33,22,25),
(11,1,12,39,26,34,22,25),
(11,1,13,40,27,36,22,26),
(11,1,14,42,28,37,22,26),
(11,1,15,43,29,38,22,26),
(11,1,16,45,30,40,22,27),
(11,1,17,46,31,41,23,27),
(11,1,18,48,32,43,23,27),
(11,1,19,49,33,44,23,28),
(11,1,20,51,34,45,23,28),
(11,1,21,52,34,47,23,28),
(11,1,22,54,35,48,23,29),
(11,1,23,55,36,50,23,29),
(11,1,24,57,37,51,24,30),
(11,1,25,59,38,52,24,30),
(11,1,26,60,39,54,24,30),
(11,1,27,62,40,55,24,31),
(11,1,28,63,41,57,24,31),
(11,1,29,65,43,58,24,32),
(11,1,30,67,44,60,24,32),
(11,1,31,69,45,62,25,32),
(11,1,32,70,46,63,25,33),
(11,1,33,72,47,65,25,33),
(11,1,34,74,48,66,25,34),
(11,1,35,75,49,68,25,34),
(11,1,36,77,50,69,26,35),
(11,1,37,79,51,71,26,35),
(11,1,38,81,52,73,26,35),
(11,1,39,83,53,74,26,36),
(11,1,40,84,55,76,26,36),
(11,1,41,86,56,78,27,37),
(11,1,42,88,57,79,27,37),
(11,1,43,90,58,81,27,38),
(11,1,44,92,59,83,27,38),
(11,1,45,94,60,85,27,39),
(11,1,46,96,62,86,28,39),
(11,1,47,98,63,88,28,40),
(11,1,48,100,64,90,28,40),
(11,1,49,102,65,92,28,41),
(11,1,50,103,66,93,29,41),
(11,1,51,105,68,95,29,42),
(11,1,52,107,69,97,29,42),
(11,1,53,109,70,99,29,43),
(11,1,54,112,71,101,30,44),
(11,1,55,114,73,103,30,44),
(11,1,56,116,74,104,30,45),
(11,1,57,118,75,106,30,45),
(11,1,58,120,77,108,31,46),
(11,1,59,122,78,110,31,46),
(11,1,60,124,79,112,31,47),
(11,1,61,126,81,114,31,48),
(11,1,62,128,82,116,32,48),
(11,1,63,130,83,118,32,49),
(11,1,64,133,85,120,32,49),
(11,1,65,135,86,122,33,50),
(11,1,66,137,87,124,33,51),
(11,1,67,139,89,126,33,51),
(11,1,68,141,90,128,33,52),
(11,1,69,144,92,130,34,52),
(11,1,70,146,93,132,34,53),
(11,1,71,149,94,134,34,54),
(11,1,72,151,96,137,34,55),
(11,1,73,154,98,139,34,56),
(11,1,74,157,99,142,35,56),
(11,1,75,166,101,149,35,57),
(11,1,76,172,103,155,35,58),
(11,1,77,175,105,159,36,59),
(11,1,78,179,106,161,36,59),
(11,1,79,182,108,164,36,60),
(11,1,80,185,110,167,37,61),
(11,1,81,178,112,161,36,62),
(11,1,82,190,114,164,36,62),
(11,1,83,193,116,167,36,63),
(11,1,84,196,118,170,37,64),
(11,1,85,199,120,173,37,65),
(11,2,1,23,17,21,21,23),
(11,2,2,24,18,22,22,24),
(11,2,3,25,18,23,22,24),
(11,2,4,26,19,24,23,25),
(11,2,5,27,19,25,24,26),
(11,2,6,29,20,26,24,26),
(11,2,7,30,21,27,25,27),
(11,2,8,31,21,28,26,28),
(11,2,9,32,22,29,26,29),
(11,2,10,33,22,31,27,29),
(11,2,11,34,23,32,28,30),
(11,2,12,36,24,33,28,31),
(11,2,13,37,24,34,29,32),
(11,2,14,38,25,35,30,32),
(11,2,15,39,26,36,31,33),
(11,2,16,40,26,37,31,34),
(11,2,17,42,27,39,32,35),
(11,2,18,43,28,40,33,36),
(11,2,19,44,28,41,34,37),
(11,2,20,46,29,42,34,37),
(11,2,21,47,30,44,35,38),
(11,2,22,48,31,45,36,39),
(11,2,23,50,31,46,37,40),
(11,2,24,51,32,47,38,41),
(11,2,25,52,33,49,38,42),
(11,2,26,54,34,50,39,43),
(11,2,27,55,34,51,40,44),
(11,2,28,56,35,53,41,44),
(11,2,29,58,36,54,42,45),
(11,2,30,59,37,55,43,46),
(11,2,31,61,37,57,43,47),
(11,2,32,62,38,58,44,48),
(11,2,33,64,39,59,45,49),
(11,2,34,65,40,61,46,50),
(11,2,35,67,41,62,47,51),
(11,2,36,68,42,64,48,52),
(11,2,37,70,42,65,49,53),
(11,2,38,71,43,67,50,54),
(11,2,39,73,44,68,51,55),
(11,2,40,74,45,69,52,56),
(11,2,41,76,46,71,53,57),
(11,2,42,78,47,72,54,58),
(11,2,43,79,47,74,55,59),
(11,2,44,81,48,75,56,60),
(11,2,45,82,49,77,57,61),
(11,2,46,84,50,78,58,62),
(11,2,47,86,51,80,59,64),
(11,2,48,87,52,82,60,65),
(11,2,49,89,53,83,61,66),
(11,2,50,91,54,85,62,67),
(11,2,51,92,55,86,63,68),
(11,2,52,94,56,88,64,69),
(11,2,53,96,57,90,65,70),
(11,2,54,97,58,91,66,71),
(11,2,55,99,59,93,67,73),
(11,2,56,101,60,95,68,74),
(11,2,57,103,61,96,69,75),
(11,2,58,105,62,98,70,76),
(11,2,59,106,63,100,71,77),
(11,2,60,108,64,101,72,78),
(11,2,61,110,65,103,74,80),
(11,2,62,112,66,105,75,81),
(11,2,63,114,67,106,76,82),
(11,2,64,116,68,108,77,83),
(11,2,65,117,69,110,78,85),
(11,2,66,119,70,112,79,86),
(11,2,67,121,71,114,80,87),
(11,2,68,123,72,115,82,88),
(11,2,69,125,73,117,83,90),
(11,2,70,127,74,119,84,91),
(11,2,71,130,75,121,87,92),
(11,2,72,132,76,124,90,94),
(11,2,73,134,77,126,93,96),
(11,2,74,137,79,128,97,97),
(11,2,75,139,80,130,101,99),
(11,2,76,142,81,133,106,100),
(11,2,77,144,83,135,108,102),
(11,2,78,147,84,137,110,104),
(11,2,79,149,85,140,111,105),
(11,2,80,152,87,142,113,107),
(11,2,81,161,88,146,99,109),
(11,2,82,164,90,148,101,110),
(11,2,83,167,91,151,102,112),
(11,2,84,171,93,153,104,114),
(11,2,85,173,94,156,106,116),
(11,3,1,21,20,20,21,23),
(11,3,2,21,21,21,22,24),
(11,3,3,22,23,22,22,24),
(11,3,4,22,24,23,23,25),
(11,3,5,23,25,24,23,25),
(11,3,6,23,27,25,24,26),
(11,3,7,24,28,26,24,27),
(11,3,8,24,30,27,25,27),
(11,3,9,25,31,27,26,28),
(11,3,10,25,33,28,26,29),
(11,3,11,25,34,29,27,29),
(11,3,12,26,36,30,28,30),
(11,3,13,26,37,31,28,31),
(11,3,14,27,39,32,29,32),
(11,3,15,27,40,34,30,32),
(11,3,16,28,42,35,30,33),
(11,3,17,28,43,36,31,34),
(11,3,18,29,45,37,32,35),
(11,3,19,29,47,38,32,35),
(11,3,20,30,48,39,33,36),
(11,3,21,31,50,40,34,37),
(11,3,22,31,51,41,34,38),
(11,3,23,32,53,42,35,38),
(11,3,24,32,55,43,36,39),
(11,3,25,33,57,44,37,40),
(11,3,26,33,58,46,37,41),
(11,3,27,34,60,47,38,42),
(11,3,28,35,62,48,39,42),
(11,3,29,35,63,49,40,43),
(11,3,30,36,65,50,40,44),
(11,3,31,36,67,52,41,45),
(11,3,32,37,69,53,42,46),
(11,3,33,38,71,54,43,47),
(11,3,34,38,72,55,44,48),
(11,3,35,39,74,57,44,48),
(11,3,36,39,76,58,45,49),
(11,3,37,40,78,59,46,50),
(11,3,38,41,80,60,47,51),
(11,3,39,41,82,62,48,52),
(11,3,40,42,84,63,49,53),
(11,3,41,43,86,64,50,54),
(11,3,42,43,88,66,50,55),
(11,3,43,44,90,67,51,56),
(11,3,44,45,91,68,52,57),
(11,3,45,45,93,70,53,58),
(11,3,46,46,95,71,54,59),
(11,3,47,47,98,72,55,60),
(11,3,48,48,100,74,56,61),
(11,3,49,48,102,75,57,62),
(11,3,50,49,104,77,58,63),
(11,3,51,50,106,78,59,64),
(11,3,52,51,108,79,60,65),
(11,3,53,51,110,81,61,66),
(11,3,54,52,112,82,61,67),
(11,3,55,53,114,84,62,68),
(11,3,56,54,116,85,63,69),
(11,3,57,54,118,87,64,70),
(11,3,58,55,121,88,65,71),
(11,3,59,56,123,90,66,72),
(11,3,60,57,125,91,67,74),
(11,3,61,58,127,93,68,75),
(11,3,62,58,130,94,69,76),
(11,3,63,59,132,96,71,77),
(11,3,64,60,134,97,72,78),
(11,3,65,61,136,99,73,79),
(11,3,66,62,139,101,74,80),
(11,3,67,62,141,102,75,81),
(11,3,68,63,143,104,76,83),
(11,3,69,64,146,105,77,84),
(11,3,70,65,148,107,78,85),
(11,3,71,66,151,109,79,86),
(11,3,72,67,154,111,80,87),
(11,3,73,68,157,113,81,89),
(11,3,74,69,160,115,83,90),
(11,3,75,70,163,117,84,92),
(11,3,76,71,166,119,85,93),
(11,3,77,72,169,121,87,95),
(11,3,78,73,172,123,88,96),
(11,3,79,74,175,125,89,98),
(11,3,80,75,178,127,91,99),
(11,3,81,76,191,130,91,101),
(11,3,82,78,194,133,93,102),
(11,3,83,79,197,135,94,104),
(11,3,84,80,201,137,96,105),
(11,3,85,81,205,139,97,107),
(11,4,81,115,199,107,44,70),
(11,4,82,117,202,108,44,70),
(11,4,83,119,206,110,45,71),
(11,4,84,121,210,112,45,72),
(11,4,85,123,213,114,46,73),
(11,4,10,28,32,27,22,25),
(11,4,11,29,33,28,22,26),
(11,4,12,30,34,28,22,26),
(11,4,13,31,36,29,22,26),
(11,4,14,31,37,30,22,27),
(11,4,15,32,39,30,23,27),
(11,4,16,33,40,31,23,28),
(11,4,17,34,41,32,23,28),
(11,4,18,35,43,33,23,28),
(11,4,19,36,45,33,23,29),
(11,4,20,36,46,34,24,29),
(11,4,21,37,48,35,24,30),
(11,4,22,38,49,36,24,30),
(11,4,23,39,51,37,24,31),
(11,4,24,40,52,37,25,31),
(11,4,25,41,54,38,25,32),
(11,4,26,42,56,39,25,32),
(11,4,27,43,57,40,25,32),
(11,4,28,44,59,41,25,33),
(11,4,29,44,61,42,26,33),
(11,4,30,45,63,42,26,34),
(11,4,31,46,64,43,26,34),
(11,4,32,47,66,44,26,35),
(11,4,33,48,68,45,27,35),
(11,4,34,49,70,46,27,36),
(11,4,35,50,72,47,27,36),
(11,4,36,52,74,48,28,37),
(11,4,37,53,75,49,28,38),
(11,4,38,54,77,50,28,38),
(11,4,39,55,79,51,28,39),
(11,4,40,56,81,52,29,39),
(11,4,41,57,83,53,29,40),
(11,4,42,58,85,54,29,40),
(11,4,43,59,87,55,29,41),
(11,4,44,60,90,56,30,41),
(11,4,45,62,92,57,30,42),
(11,4,46,63,94,58,30,43),
(11,4,47,64,96,59,31,43),
(11,4,48,65,98,60,31,44),
(11,4,49,66,100,62,31,45),
(11,4,50,68,103,63,32,45),
(11,4,51,69,110,64,32,46),
(11,4,52,70,110,65,32,46),
(11,4,53,71,115,66,33,47),
(11,4,54,73,117,67,33,48),
(11,4,55,74,119,69,33,48),
(11,4,56,75,123,70,34,49),
(11,4,57,77,125,71,34,50),
(11,4,58,78,128,72,34,51),
(11,4,59,80,130,74,35,51),
(11,4,60,81,133,75,35,52),
(11,4,61,82,136,76,35,53),
(11,4,62,84,138,78,36,53),
(11,4,63,85,138,79,36,54),
(11,4,64,87,145,80,36,55),
(11,4,65,88,147,82,37,56),
(11,4,66,90,150,83,37,57),
(11,4,67,91,153,85,38,57),
(11,4,68,93,156,86,38,58),
(11,4,69,95,159,87,38,59),
(11,4,70,96,159,89,39,60),
(11,4,71,98,166,90,39,61),
(11,4,72,100,169,92,40,61),
(11,4,73,101,172,94,40,62),
(11,4,74,103,175,95,41,63),
(11,4,75,105,178,97,41,64),
(11,4,76,106,181,98,41,65),
(11,4,77,108,185,100,42,66),
(11,4,78,110,189,102,42,67),
(11,4,79,112,192,103,43,68),
(11,4,80,114,195,105,43,69),
(11,5,1,21,17,19,23,25),
(11,5,2,21,17,19,24,26),
(11,5,3,21,17,20,26,28),
(11,5,4,21,18,20,27,29),
(11,5,5,22,18,20,28,30),
(11,5,6,22,18,21,30,32),
(11,5,7,22,18,21,31,33),
(11,5,8,22,19,22,32,35),
(11,5,9,22,19,22,34,36),
(11,5,10,22,19,22,35,38),
(11,5,11,23,19,23,37,39),
(11,5,12,23,20,23,38,41),
(11,5,13,23,20,24,39,42),
(11,5,14,23,20,24,41,44),
(11,5,15,23,20,25,42,45),
(11,5,16,24,21,25,44,47),
(11,5,17,24,21,25,45,48),
(11,5,18,24,21,26,47,50),
(11,5,19,24,22,26,48,51),
(11,5,20,24,22,27,50,53),
(11,5,21,25,22,27,51,55),
(11,5,22,25,22,28,53,56),
(11,5,23,25,23,28,55,58),
(11,5,24,25,23,29,56,60),
(11,5,25,25,23,29,58,61),
(11,5,26,26,24,30,60,63),
(11,5,27,26,24,30,61,65),
(11,5,28,26,24,31,63,66),
(11,5,29,26,25,31,65,68),
(11,5,30,27,25,32,66,70),
(11,5,31,27,25,32,68,72),
(11,5,32,27,26,33,70,73),
(11,5,33,27,26,33,71,75),
(11,5,34,28,26,34,73,77),
(11,5,35,28,27,34,75,79),
(11,5,36,28,27,35,77,81),
(11,5,37,29,28,35,79,83),
(11,5,38,29,28,36,80,85),
(11,5,39,29,28,37,82,86),
(11,5,40,29,29,37,84,88),
(11,5,41,30,29,38,86,90),
(11,5,42,30,29,38,88,92),
(11,5,43,30,30,39,90,94),
(11,5,44,31,30,39,91,96),
(11,5,45,31,31,40,93,98),
(11,5,46,31,31,41,95,100),
(11,5,47,32,31,41,97,102),
(11,5,48,32,32,42,99,104),
(11,5,49,32,32,43,101,106),
(11,5,50,33,33,43,103,108),
(11,5,51,33,33,44,105,110),
(11,5,52,33,34,44,107,113),
(11,5,53,34,34,45,109,115),
(11,5,54,34,34,46,111,117),
(11,5,55,34,35,46,113,119),
(11,5,56,35,35,47,115,121),
(11,5,57,35,36,48,118,123),
(11,5,58,35,36,48,120,126),
(11,5,59,36,37,49,122,128),
(11,5,60,36,37,50,124,130),
(11,5,61,36,38,51,126,132),
(11,5,62,37,38,51,128,134),
(11,5,63,37,39,52,130,137),
(11,5,64,38,39,53,133,139),
(11,5,65,38,40,53,135,141),
(11,5,66,38,40,54,137,144),
(11,5,67,39,40,55,139,146),
(11,5,68,39,41,56,141,148),
(11,5,69,40,41,56,144,151),
(11,5,70,40,42,57,146,153),
(11,5,71,40,43,58,149,156),
(11,5,72,41,43,58,155,159),
(11,5,73,41,44,59,157,160),
(11,5,74,42,44,61,160,163),
(11,5,75,42,45,62,164,166),
(11,5,76,42,46,62,167,169),
(11,5,77,43,46,63,168,172),
(11,5,78,43,47,64,169,177),
(11,5,79,44,47,65,172,180),
(11,5,80,44,48,66,175,183),
(11,5,81,45,49,68,185,187),
(11,5,82,45,49,68,189,190),
(11,5,83,46,50,69,193,193),
(11,5,84,46,51,70,196,197),
(11,5,85,47,51,71,199,200),
(11,6,1,24,17,21,21,22),
(11,6,2,25,18,22,21,22),
(11,6,3,27,19,23,21,23),
(11,6,4,28,19,25,21,23),
(11,6,5,29,20,26,21,23),
(11,6,6,31,21,27,21,23),
(11,6,7,32,22,28,21,24),
(11,6,8,33,23,29,22,24),
(11,6,9,35,24,31,22,24),
(11,6,10,36,24,32,22,25),
(11,6,11,37,25,33,22,25),
(11,6,12,39,26,34,22,25),
(11,6,13,40,27,36,22,26),
(11,6,14,42,28,37,22,26),
(11,6,15,43,29,38,22,26),
(11,6,16,45,30,40,22,27),
(11,6,17,46,31,41,23,27),
(11,6,18,48,32,43,23,27),
(11,6,19,49,33,44,23,28),
(11,6,20,51,34,45,23,28),
(11,6,21,52,34,47,23,28),
(11,6,22,54,35,48,23,29),
(11,6,23,55,36,50,23,29),
(11,6,24,57,37,51,24,30),
(11,6,25,59,38,52,24,30),
(11,6,26,60,39,54,24,30),
(11,6,27,62,40,55,24,31),
(11,6,28,63,41,57,24,31),
(11,6,29,65,43,58,24,32),
(11,6,30,67,44,60,24,32),
(11,6,31,69,45,62,25,32),
(11,6,32,70,46,63,25,33),
(11,6,33,72,47,65,25,33),
(11,6,34,74,48,66,25,34),
(11,6,35,75,49,68,25,34),
(11,6,36,77,50,69,26,35),
(11,6,37,79,51,71,26,35),
(11,6,38,81,52,73,26,35),
(11,6,39,83,53,74,26,36),
(11,6,40,84,55,76,26,36),
(11,6,41,86,56,78,27,37),
(11,6,42,88,57,79,27,37),
(11,6,43,90,58,81,27,38),
(11,6,44,92,59,83,27,38),
(11,6,45,94,60,85,27,39),
(11,6,46,96,62,86,28,39),
(11,6,47,98,63,88,28,40),
(11,6,48,100,64,90,28,40),
(11,6,49,102,65,92,28,41),
(11,6,50,103,65,93,29,41),
(11,6,51,105,66,94,29,42),
(11,6,52,106,67,95,29,42),
(11,6,53,107,68,96,29,43),
(11,6,54,108,69,97,30,44),
(11,6,55,109,70,98,30,44),
(11,6,56,112,72,101,30,45),
(11,6,57,114,73,103,30,45),
(11,6,58,117,74,105,31,46),
(11,6,59,119,76,107,31,46),
(11,6,60,121,77,109,31,47),
(11,6,61,123,78,111,31,48),
(11,6,62,126,80,113,31,48),
(11,6,63,128,81,116,32,49),
(11,6,64,131,83,118,32,49),
(11,6,65,136,84,120,32,50),
(11,6,66,140,86,123,32,51),
(11,6,67,141,87,125,33,51),
(11,6,68,141,89,127,33,52),
(11,6,69,144,90,130,33,53),
(11,6,70,147,92,132,33,53),
(11,6,71,150,94,135,34,54),
(11,6,72,152,95,137,34,55),
(11,6,73,155,97,140,34,56),
(11,6,74,162,99,142,34,56),
(11,6,75,165,100,145,35,57),
(11,6,76,167,102,146,35,58),
(11,6,77,169,104,150,35,59),
(11,6,78,170,105,152,35,59),
(11,6,79,173,107,156,36,60),
(11,6,80,176,109,159,36,61),
(11,6,81,179,111,163,35,62),
(11,6,82,179,113,165,36,62),
(11,6,83,186,115,168,36,63),
(11,6,84,186,117,171,36,64),
(11,6,85,192,118,174,36,65),
(11,7,1,22,17,20,22,24),
(11,7,2,23,17,21,23,25),
(11,7,3,24,18,22,24,26),
(11,7,4,25,18,23,25,27),
(11,7,5,25,19,24,26,28),
(11,7,6,26,19,25,27,29),
(11,7,7,27,20,26,28,30),
(11,7,8,28,20,27,28,31),
(11,7,9,29,21,28,29,32),
(11,7,10,30,21,29,30,33),
(11,7,11,31,22,30,31,35),
(11,7,12,32,22,31,32,36),
(11,7,13,33,23,32,33,37),
(11,7,14,34,23,33,34,38),
(11,7,15,34,24,35,35,39),
(11,7,16,35,24,36,36,40),
(11,7,17,36,25,37,38,42),
(11,7,18,37,25,38,39,43),
(11,7,19,38,26,39,40,44),
(11,7,20,39,26,40,41,45),
(11,7,21,40,27,41,42,46),
(11,7,22,41,27,43,43,48),
(11,7,23,43,28,44,44,49),
(11,7,24,44,28,45,45,50),
(11,7,25,45,29,46,46,51),
(11,7,26,46,30,47,48,53),
(11,7,27,47,30,49,49,54),
(11,7,28,48,31,50,50,55),
(11,7,29,49,31,51,51,57),
(11,7,30,50,32,53,52,58),
(11,7,31,51,33,54,53,59),
(11,7,32,52,33,55,55,61),
(11,7,33,53,34,56,56,62),
(11,7,34,55,34,58,57,64),
(11,7,35,56,35,59,58,65),
(11,7,36,57,36,60,60,66),
(11,7,37,58,36,62,61,68),
(11,7,38,59,37,63,62,69),
(11,7,39,61,38,65,63,71),
(11,7,40,62,38,66,65,72),
(11,7,41,63,39,67,66,74),
(11,7,42,64,40,69,67,75),
(11,7,43,65,40,70,69,77),
(11,7,44,67,41,72,70,78),
(11,7,45,68,42,73,71,80),
(11,7,46,69,42,75,73,81),
(11,7,47,71,43,76,74,83),
(11,7,48,72,44,78,76,84),
(11,7,49,73,45,79,77,86),
(11,7,50,74,45,81,78,88),
(11,7,51,76,46,82,80,89),
(11,7,52,77,47,84,81,91),
(11,7,53,78,47,85,83,92),
(11,7,54,80,48,87,84,94),
(11,7,55,81,49,88,86,96),
(11,7,56,83,50,90,87,97),
(11,7,57,84,50,91,89,99),
(11,7,58,85,51,93,90,101),
(11,7,59,87,52,95,92,102),
(11,7,60,88,53,96,93,104),
(11,7,61,90,54,98,95,106),
(11,7,62,91,54,99,96,108),
(11,7,63,93,55,101,98,109),
(11,7,64,94,56,103,99,111),
(11,7,65,95,57,104,101,113),
(11,7,66,97,58,106,103,115),
(11,7,67,98,58,108,104,117),
(11,7,68,100,59,110,106,118),
(11,7,69,101,60,111,107,120),
(11,7,70,103,61,113,109,122),
(11,7,71,104,62,115,122,124),
(11,7,72,106,63,117,124,127),
(11,7,73,108,64,119,126,129),
(11,7,74,110,65,122,128,131),
(11,7,75,112,66,124,130,133),
(11,7,76,114,67,126,133,136),
(11,7,77,115,68,128,135,138),
(11,7,78,117,69,130,137,140),
(11,7,79,119,70,133,139,143),
(11,7,80,121,71,135,141,145),
(11,7,81,123,72,138,136,148),
(11,7,82,125,74,141,139,150),
(11,7,83,128,75,143,139,153),
(11,7,84,130,76,145,139,155),
(11,7,85,132,77,148,145,158),
(11,8,1,21,17,19,24,24),
(11,8,2,21,17,19,25,25),
(11,8,3,21,17,20,27,27),
(11,8,4,21,17,20,28,28),
(11,8,5,21,18,20,29,29),
(11,8,6,21,18,20,31,31),
(11,8,7,21,18,21,32,32),
(11,8,8,22,18,21,34,33),
(11,8,9,22,18,21,35,35),
(11,8,10,22,19,22,37,36),
(11,8,11,22,19,22,38,37),
(11,8,12,22,19,22,40,39),
(11,8,13,22,19,23,41,40),
(11,8,14,22,19,23,43,42),
(11,8,15,22,19,23,44,43),
(11,8,16,22,20,24,46,45),
(11,8,17,23,20,24,47,46),
(11,8,18,23,20,24,49,48),
(11,8,19,23,20,25,50,49),
(11,8,20,23,21,25,52,51),
(11,8,21,23,21,26,54,52),
(11,8,22,23,21,26,55,54),
(11,8,23,23,21,26,57,56),
(11,8,24,24,21,27,59,57),
(11,8,25,24,22,27,60,59),
(11,8,26,24,22,27,62,60),
(11,8,27,24,22,28,64,62),
(11,8,28,24,22,28,65,64),
(11,8,29,24,23,29,67,65),
(11,8,30,24,23,29,69,67),
(11,8,31,25,23,30,71,69),
(11,8,32,25,23,30,73,71),
(11,8,33,25,24,30,74,72),
(11,8,34,25,24,31,76,74),
(11,8,35,25,24,31,78,76),
(11,8,36,26,24,32,80,78),
(11,8,37,26,25,32,82,79),
(11,8,38,26,25,33,84,81),
(11,8,39,26,25,33,86,83),
(11,8,40,26,26,34,87,85),
(11,8,41,27,26,34,89,87),
(11,8,42,27,26,35,91,89),
(11,8,43,27,27,35,93,91),
(11,8,44,27,27,36,95,92),
(11,8,45,27,27,36,97,94),
(11,8,46,28,27,37,99,96),
(11,8,47,28,28,37,101,98),
(11,8,48,28,28,38,103,100),
(11,8,49,28,28,38,105,102),
(11,8,50,29,29,39,107,104),
(11,8,51,29,29,39,110,106),
(11,8,52,29,29,40,112,108),
(11,8,53,29,30,40,114,110),
(11,8,54,30,30,41,116,112),
(11,8,55,30,30,41,118,114),
(11,8,56,30,31,42,120,116),
(11,8,57,30,31,42,122,118),
(11,8,58,31,31,43,125,121),
(11,8,59,31,32,43,127,123),
(11,8,60,31,32,44,129,125),
(11,8,61,31,33,45,131,127),
(11,8,62,32,33,45,133,129),
(11,8,63,32,33,46,136,131),
(11,8,64,32,34,46,138,134),
(11,8,65,33,34,47,140,136),
(11,8,66,33,34,48,143,138),
(11,8,67,33,35,48,145,140),
(11,8,68,33,35,49,147,142),
(11,8,69,34,36,49,150,145),
(11,8,70,34,36,50,152,147),
(11,8,71,34,36,51,155,150),
(11,8,72,34,37,52,161,153),
(11,8,73,34,37,53,161,156),
(11,8,74,35,38,53,164,158),
(11,8,75,35,38,54,167,161),
(11,8,76,35,38,55,170,164),
(11,8,77,36,39,56,173,167),
(11,8,78,36,39,56,176,170),
(11,8,79,36,40,57,179,173),
(11,8,80,37,40,58,182,176),
(11,8,81,37,41,60,194,179),
(11,8,82,37,41,60,197,182),
(11,8,83,37,42,61,200,186),
(11,8,84,38,42,62,204,189),
(11,8,85,38,43,63,207,192),
(11,9,81,61,65,91,169,171),
(11,9,82,61,65,92,172,174),
(11,9,83,62,66,94,175,177),
(11,9,84,63,67,95,178,180),
(11,9,85,64,68,96,181,183),
(11,9,10,24,20,26,31,34),
(11,9,11,24,21,26,33,35),
(11,9,12,24,21,27,34,36),
(11,9,13,25,21,27,35,38),
(11,9,14,25,22,28,36,39),
(11,9,15,25,22,29,37,40),
(11,9,16,26,23,29,38,41),
(11,9,17,26,23,30,40,43),
(11,9,18,26,23,30,41,44),
(11,9,19,27,24,31,42,45),
(11,9,20,27,24,32,43,47),
(11,9,21,27,25,32,45,48),
(11,9,22,28,25,33,46,49),
(11,9,23,28,26,34,47,51),
(11,9,24,29,26,34,49,52),
(11,9,25,29,27,35,50,54),
(11,9,26,29,27,36,51,55),
(11,9,27,30,27,36,53,56),
(11,9,28,30,28,37,54,58),
(11,9,29,31,28,38,56,59),
(11,9,30,31,29,38,57,61),
(11,9,31,31,29,39,58,63),
(11,9,32,32,30,40,60,64),
(11,9,33,32,30,41,61,66),
(11,9,34,33,31,41,63,67),
(11,9,35,33,31,42,64,69),
(11,9,36,34,32,43,66,71),
(11,9,37,34,33,44,68,72),
(11,9,38,34,33,45,69,74),
(11,9,39,35,34,45,71,76),
(11,9,40,35,34,46,72,77),
(11,9,41,36,35,47,74,79),
(11,9,42,36,35,48,76,81),
(11,9,43,37,36,49,77,83),
(11,9,44,37,36,50,79,84),
(11,9,45,38,37,50,81,86),
(11,9,46,38,38,51,83,88),
(11,9,47,39,38,52,84,90),
(11,9,48,39,39,53,86,92),
(11,9,49,40,40,54,88,94),
(11,9,50,40,40,55,94,96),
(11,9,51,41,41,56,96,98),
(11,9,52,41,41,57,98,100),
(11,9,53,42,42,58,100,102),
(11,9,54,43,43,59,102,104),
(11,9,55,43,43,60,105,106),
(11,9,56,44,44,61,107,108),
(11,9,57,44,45,62,109,110),
(11,9,58,45,46,63,111,113),
(11,9,59,45,46,64,113,115),
(11,9,60,46,47,65,115,117),
(11,9,61,47,48,66,117,119),
(11,9,62,47,48,67,119,122),
(11,9,63,48,49,68,122,124),
(11,9,64,48,50,69,124,126),
(11,9,65,49,51,71,127,129),
(11,9,66,50,52,72,129,131),
(11,9,67,50,52,73,132,134),
(11,9,68,51,53,74,134,136),
(11,9,69,52,54,75,136,138),
(11,9,70,52,55,76,139,141),
(11,9,71,53,56,78,141,144),
(11,9,72,54,56,79,144,146),
(11,9,73,55,57,80,147,149),
(11,9,74,55,58,81,150,152),
(11,9,75,56,59,83,152,154),
(11,9,76,57,60,84,155,157),
(11,9,77,58,61,85,158,160),
(11,9,78,58,62,87,160,163),
(11,9,79,59,63,88,163,166),
(11,9,80,60,64,89,166,168),
(11,11,81,92,80,99,146,163),
(11,11,82,93,82,101,148,166),
(11,11,83,95,83,102,151,169),
(11,11,84,96,84,104,160,172),
(11,11,85,97,86,106,160,175),
(11,11,10,27,21,25,30,33),
(11,11,11,27,22,26,31,35),
(11,11,12,28,22,27,32,36),
(11,11,13,28,23,27,33,37),
(11,11,14,29,23,28,34,38),
(11,11,15,30,24,29,36,39),
(11,11,16,30,24,29,37,40),
(11,11,17,31,25,30,38,42),
(11,11,18,31,26,31,39,43),
(11,11,19,32,26,31,40,44),
(11,11,20,33,27,32,41,45),
(11,11,21,33,27,33,42,47),
(11,11,22,34,28,34,43,48),
(11,11,23,35,29,34,44,49),
(11,11,24,35,29,35,46,51),
(11,11,25,36,30,36,47,52),
(11,11,26,37,30,37,48,53),
(11,11,27,37,31,37,49,55),
(11,11,28,38,32,38,50,56),
(11,11,29,39,32,39,52,58),
(11,11,30,39,33,40,53,59),
(11,11,31,40,34,41,54,60),
(11,11,32,41,34,42,56,62),
(11,11,33,42,35,42,57,63),
(11,11,34,42,36,43,58,65),
(11,11,35,43,36,44,60,66),
(11,11,36,44,37,45,61,68),
(11,11,37,45,38,46,62,70),
(11,11,38,46,38,47,64,71),
(11,11,39,46,39,48,65,73),
(11,11,40,47,40,49,67,74),
(11,11,41,48,41,50,68,76),
(11,11,42,49,41,51,70,78),
(11,11,43,50,42,52,71,79),
(11,11,44,51,43,52,73,81),
(11,11,45,51,44,53,74,83),
(11,11,46,52,45,54,76,85),
(11,11,47,53,45,56,77,86),
(11,11,48,54,46,57,79,88),
(11,11,49,55,47,58,81,90),
(11,11,50,56,48,59,82,92),
(11,11,51,57,49,60,84,94),
(11,11,52,58,50,61,86,96),
(11,11,53,59,51,62,87,98),
(11,11,54,60,51,63,89,100),
(11,11,55,61,52,64,91,102),
(11,11,56,62,53,65,93,104),
(11,11,57,63,54,66,94,106),
(11,11,58,64,55,68,96,108),
(11,11,59,65,56,69,98,110),
(11,11,60,66,57,70,100,112),
(11,11,61,67,58,71,102,114),
(11,11,62,68,59,72,104,116),
(11,11,63,69,60,74,106,119),
(11,11,64,70,61,75,108,121),
(11,11,65,72,62,76,110,123),
(11,11,66,73,63,78,112,125),
(11,11,67,74,64,79,114,128),
(11,11,68,75,65,80,116,130),
(11,11,69,76,66,82,118,132),
(11,11,70,77,67,83,120,135),
(11,11,71,79,68,84,122,137),
(11,11,72,80,70,86,125,140),
(11,11,73,81,71,87,127,142),
(11,11,74,82,72,89,129,145),
(11,11,75,84,73,90,131,147),
(11,11,76,85,74,92,134,150),
(11,11,77,86,75,93,136,153),
(11,11,78,88,77,95,138,155),
(11,11,79,89,78,96,141,158),
(11,11,80,90,79,98,143,161),
(22,1,8,32,26,30,21,22),
(22,1,7,31,25,29,21,22),
(22,1,6,30,24,28,20,21),
(22,1,5,28,23,27,20,21),
(22,1,4,27,22,26,20,21),
(22,1,3,26,22,24,20,21),
(22,1,2,24,21,23,20,20),
(22,1,1,23,20,22,20,20),
(22,1,9,34,26,32,21,22),
(22,1,10,35,27,33,21,23),
(22,1,11,36,28,34,21,23),
(22,1,12,38,29,35,21,23),
(22,1,13,39,30,37,21,24),
(22,1,14,41,31,38,21,24),
(22,1,15,42,32,39,21,24),
(22,1,16,44,33,41,21,25),
(22,1,17,45,34,42,22,25),
(22,1,18,47,34,43,22,25),
(22,1,19,48,35,45,22,26),
(22,1,20,50,36,46,22,26),
(22,1,21,51,37,48,22,26),
(22,1,22,53,38,49,22,27),
(22,1,23,54,39,51,22,27),
(22,1,24,56,40,52,23,28),
(22,1,25,58,41,53,23,28),
(22,1,26,59,42,55,23,28),
(22,1,27,61,43,56,23,29),
(22,1,28,63,44,58,23,29),
(22,1,29,64,45,59,23,30),
(22,1,30,66,46,61,24,30),
(22,1,31,68,47,62,24,30),
(22,1,32,69,48,64,24,31),
(22,1,33,71,50,66,24,31),
(22,1,34,73,51,67,24,32),
(22,1,35,74,52,69,24,32),
(22,1,36,76,53,70,25,33),
(22,1,37,78,54,72,25,33),
(22,1,38,80,55,74,25,34),
(22,1,39,82,56,75,25,34),
(22,1,40,83,57,77,25,35),
(22,1,41,85,58,79,26,35),
(22,1,42,87,60,80,26,35),
(22,1,43,89,61,82,26,36),
(22,1,44,91,62,84,26,36),
(22,1,45,93,63,85,26,37),
(22,1,46,95,64,87,27,37),
(22,1,47,97,66,89,27,38),
(22,1,48,99,67,91,27,38),
(22,1,49,101,68,93,27,39),
(22,1,50,103,69,94,28,40),
(22,1,51,105,71,96,28,40),
(22,1,52,107,72,98,28,41),
(22,1,53,109,73,100,28,41),
(22,1,54,111,74,102,29,42),
(22,1,55,113,76,103,29,42),
(22,1,56,115,77,105,29,43),
(22,1,57,117,78,107,29,43),
(22,1,58,119,79,109,30,44),
(22,1,59,121,81,111,30,44),
(22,1,60,123,82,113,30,45),
(22,1,61,125,83,115,30,46),
(22,1,62,127,85,117,31,46),
(22,1,63,129,86,119,31,47),
(22,1,64,132,88,121,31,47),
(22,1,65,134,89,123,32,48),
(22,1,66,136,90,125,32,49),
(22,1,67,138,92,127,32,49),
(22,1,68,140,93,129,32,50),
(22,1,69,143,95,131,33,50),
(22,1,70,145,96,133,33,51),
(22,1,71,148,97,140,33,53),
(22,1,72,156,99,143,33,54),
(22,1,73,162,101,148,33,55),
(22,1,74,162,102,148,34,55),
(22,1,75,165,104,150,34,56),
(22,1,76,171,106,156,34,57),
(22,1,77,171,108,157,35,58),
(22,1,78,174,109,159,35,58),
(22,1,79,181,111,165,35,59),
(22,1,80,184,113,168,36,60),
(22,1,81,194,123,178,46,70),
(22,1,82,204,133,188,56,80),
(22,1,83,214,143,198,66,90),
(22,1,84,224,153,208,76,100),
(22,1,85,234,163,218,86,110),
(22,3,1,22,20,22,20,21),
(22,3,2,23,21,23,21,22),
(22,3,3,24,21,24,21,22),
(22,3,4,25,22,25,22,23),
(22,3,5,26,22,26,23,24),
(22,3,6,28,23,27,23,25),
(22,3,7,29,24,28,24,25),
(22,3,8,30,24,29,25,26),
(22,3,9,31,25,30,25,27),
(22,3,10,32,25,32,26,27),
(22,3,11,33,26,33,27,28),
(22,3,12,35,27,34,27,29),
(22,3,13,36,27,35,28,30),
(22,3,14,37,28,36,29,31),
(22,3,15,38,29,37,30,31),
(22,3,16,40,29,38,30,32),
(22,3,17,41,30,40,31,33),
(22,3,18,42,31,41,32,34),
(22,3,19,43,31,42,33,35),
(22,3,20,45,32,43,33,35),
(22,3,21,46,33,45,34,36),
(22,3,22,47,33,46,35,37),
(22,3,23,49,34,47,36,38),
(22,3,24,50,35,48,37,39),
(22,3,25,51,36,50,37,40),
(22,3,26,53,36,51,38,41),
(22,3,27,54,37,52,39,42),
(22,3,28,56,38,54,40,43),
(22,3,29,57,39,55,41,43),
(22,3,30,58,39,56,42,44),
(22,3,31,60,40,58,43,45),
(22,3,32,61,41,59,43,46),
(22,3,33,63,42,60,44,47),
(22,3,34,64,43,62,45,48),
(22,3,35,66,44,63,46,49),
(22,3,36,67,44,65,47,50),
(22,3,37,69,45,66,48,51),
(22,3,38,70,46,67,49,52),
(22,3,39,72,47,69,50,53),
(22,3,40,73,48,70,51,54),
(22,3,41,75,49,72,52,55),
(22,3,42,77,49,73,53,56),
(22,3,43,78,50,75,54,57),
(22,3,44,80,51,76,55,58),
(22,3,45,81,52,78,56,59),
(22,3,46,83,53,79,57,61),
(22,3,47,85,54,81,58,62),
(22,3,48,86,55,83,59,63),
(22,3,49,88,56,84,60,64),
(22,3,50,90,57,86,61,65),
(22,3,51,91,58,87,62,66),
(22,3,52,93,59,89,63,67),
(22,3,53,95,60,91,64,68),
(22,3,54,97,61,92,65,69),
(22,3,55,98,61,94,66,71),
(22,3,56,100,62,95,67,72),
(22,3,57,102,63,97,68,73),
(22,3,58,104,64,99,69,74),
(22,3,59,105,65,101,70,75),
(22,3,60,107,66,102,71,77),
(22,3,61,109,67,104,73,78),
(22,3,62,111,69,106,74,79),
(22,3,63,113,70,107,75,80),
(22,3,64,115,71,109,76,81),
(22,3,65,116,72,111,77,83),
(22,3,66,118,73,113,78,84),
(22,3,67,120,74,115,79,85),
(22,3,68,122,75,116,81,86),
(22,3,69,124,76,118,82,88),
(22,3,70,126,77,120,83,89),
(22,3,71,148,78,122,84,92),
(22,3,72,150,79,125,86,94),
(22,3,73,152,80,127,87,96),
(22,3,74,156,82,129,89,97),
(22,3,75,158,83,131,90,99),
(22,3,76,162,84,134,92,100),
(22,3,77,164,86,136,93,103),
(22,3,78,167,87,138,95,105),
(22,3,79,170,88,153,96,106),
(22,3,80,173,90,160,98,108),
(22,3,81,183,100,170,108,118),
(22,3,82,193,110,180,118,128),
(22,3,83,203,120,190,128,138),
(22,3,84,213,130,200,138,148),
(22,3,85,223,140,210,148,158),
(22,4,1,21,23,21,20,20),
(22,4,2,22,24,22,20,20),
(22,4,3,23,26,22,20,21),
(22,4,4,23,27,23,20,21),
(22,4,5,24,29,24,21,21),
(22,4,6,25,30,25,21,22),
(22,4,7,26,32,25,21,22),
(22,4,8,26,33,26,21,23),
(22,4,9,27,35,27,21,23),
(22,4,10,28,36,27,21,23),
(22,4,11,29,38,28,22,24),
(22,4,12,30,39,29,22,24),
(22,4,13,31,41,30,22,25),
(22,4,14,31,43,31,22,25),
(22,4,15,32,44,31,22,25),
(22,4,16,33,46,32,23,26),
(22,4,17,34,48,33,23,26),
(22,4,18,35,49,34,23,27),
(22,4,19,36,51,35,23,27),
(22,4,20,37,53,35,23,28),
(22,4,21,38,54,36,24,28),
(22,4,22,39,56,37,24,29),
(22,4,23,40,58,38,24,29),
(22,4,24,41,60,39,24,30),
(22,4,25,42,61,40,25,30),
(22,4,26,43,63,41,25,31),
(22,4,27,44,65,42,25,31),
(22,4,28,45,67,43,25,32),
(22,4,29,46,69,43,25,32),
(22,4,30,47,71,44,26,33),
(22,4,31,48,72,45,26,33),
(22,4,32,49,74,46,26,34),
(22,4,33,50,76,47,27,34),
(22,4,34,51,78,48,27,35),
(22,4,35,52,80,49,27,35),
(22,4,36,53,82,50,27,36),
(22,4,37,54,84,51,28,36),
(22,4,38,55,86,52,28,37),
(22,4,39,56,88,53,28,38),
(22,4,40,57,90,54,28,38),
(22,4,41,58,92,55,29,39),
(22,4,42,60,94,56,29,39),
(22,4,43,61,96,57,29,40),
(22,4,44,62,98,58,30,40),
(22,4,45,63,100,59,30,41),
(22,4,46,64,103,61,30,42),
(22,4,47,65,105,62,31,42),
(22,4,48,66,107,63,31,43),
(22,4,49,68,109,64,31,44),
(22,4,50,69,111,65,32,44),
(22,4,51,70,113,66,32,45),
(22,4,52,71,116,67,32,45),
(22,4,53,73,118,68,33,46),
(22,4,54,74,120,69,33,47),
(22,4,55,75,122,71,33,47),
(22,4,56,76,125,72,34,48),
(22,4,57,78,127,73,34,49),
(22,4,58,79,129,74,34,49),
(22,4,59,80,131,75,35,50),
(22,4,60,81,134,77,35,51),
(22,4,61,83,136,78,35,51),
(22,4,62,84,138,79,36,52),
(22,4,63,85,141,80,36,53),
(22,4,64,87,143,81,37,54),
(22,4,65,88,146,83,37,54),
(22,4,66,89,148,84,37,55),
(22,4,67,91,151,85,38,56),
(22,4,68,92,153,86,38,57),
(22,4,69,94,156,88,39,57),
(22,4,70,95,158,89,39,58),
(22,4,71,97,161,90,39,60),
(22,4,72,99,164,92,40,60),
(22,4,73,100,167,94,40,61),
(22,4,74,102,170,95,41,62),
(22,4,75,104,173,97,41,63),
(22,4,76,105,176,98,41,64),
(22,4,77,107,179,100,42,65),
(22,4,78,109,183,106,42,66),
(22,4,79,111,186,107,43,67),
(22,4,80,113,189,109,43,69),
(22,4,81,123,199,119,53,79),
(22,4,82,133,209,129,63,89),
(22,4,83,143,219,139,73,99),
(22,4,84,153,229,149,83,109),
(22,4,85,163,239,159,93,119),
(22,5,1,20,20,20,22,23),
(22,5,2,20,20,20,23,24),
(22,5,3,20,20,21,25,26),
(22,5,4,20,21,21,26,27),
(22,5,5,21,21,21,27,28),
(22,5,6,21,21,22,29,30),
(22,5,7,21,21,22,30,31),
(22,5,8,21,22,23,31,33),
(22,5,9,21,22,23,33,34),
(22,5,10,21,22,23,34,36),
(22,5,11,22,22,24,36,37),
(22,5,12,22,23,24,37,39),
(22,5,13,22,23,25,38,40),
(22,5,14,22,23,25,40,42),
(22,5,15,22,23,25,41,43),
(22,5,16,23,24,26,43,45),
(22,5,17,23,24,26,44,46),
(22,5,18,23,24,27,46,48),
(22,5,19,23,24,27,47,49),
(22,5,20,23,25,28,49,51),
(22,5,21,24,25,28,51,53),
(22,5,22,24,25,29,52,54),
(22,5,23,24,26,29,54,56),
(22,5,24,24,26,30,55,58),
(22,5,25,25,26,30,57,59),
(22,5,26,25,27,31,59,61),
(22,5,27,25,27,31,60,63),
(22,5,28,25,27,32,62,65),
(22,5,29,25,28,32,64,66),
(22,5,30,26,28,33,65,68),
(22,5,31,26,28,33,67,70),
(22,5,32,26,29,34,69,72),
(22,5,33,27,29,34,70,73),
(22,5,34,27,29,35,72,75),
(22,5,35,27,30,35,74,77),
(22,5,36,27,30,36,76,79),
(22,5,37,28,30,36,78,81),
(22,5,38,28,31,37,79,83),
(22,5,39,28,31,38,81,85),
(22,5,40,28,31,38,83,87),
(22,5,41,29,32,39,85,88),
(22,5,42,29,32,39,87,90),
(22,5,43,29,33,40,89,92),
(22,5,44,30,33,40,91,94),
(22,5,45,30,33,41,92,96),
(22,5,46,30,34,42,94,98),
(22,5,47,31,34,42,96,100),
(22,5,48,31,35,43,98,102),
(22,5,49,31,35,44,100,104),
(22,5,50,32,36,44,102,106),
(22,5,51,32,36,45,104,109),
(22,5,52,32,36,45,106,111),
(22,5,53,33,37,46,108,113),
(22,5,54,33,37,47,110,115),
(22,5,55,33,38,47,112,117),
(22,5,56,34,38,48,114,119),
(22,5,57,34,39,49,117,121),
(22,5,58,34,39,49,119,124),
(22,5,59,35,40,50,121,126),
(22,5,60,35,40,51,123,128),
(22,5,61,35,41,51,125,130),
(22,5,62,36,41,52,127,132),
(22,5,63,36,41,53,129,135),
(22,5,64,37,42,54,132,137),
(22,5,65,37,42,54,134,139),
(22,5,66,37,43,55,136,142),
(22,5,67,38,43,56,138,144),
(22,5,68,38,44,57,140,146),
(22,5,69,39,44,57,143,149),
(22,5,70,39,45,58,145,151),
(22,5,71,39,46,59,148,158),
(22,5,72,40,46,59,151,161),
(22,5,73,40,47,60,154,164),
(22,5,74,41,47,61,156,167),
(22,5,75,41,48,62,159,170),
(22,5,76,41,49,63,162,174),
(22,5,77,42,49,64,165,177),
(22,5,78,42,50,65,168,180),
(22,5,79,43,50,66,171,183),
(22,5,80,43,51,67,174,186),
(22,5,81,53,61,77,184,196),
(22,5,82,63,71,87,194,206),
(22,5,83,73,81,97,204,216),
(22,5,84,83,91,107,214,226),
(22,5,85,93,101,117,224,236),
(22,6,1,23,20,22,20,20),
(22,6,2,24,21,23,20,20),
(22,6,3,26,22,24,20,21),
(22,6,4,27,22,26,20,21),
(22,6,5,28,23,27,20,21),
(22,6,6,30,24,28,20,21),
(22,6,7,31,25,29,21,22),
(22,6,8,32,26,30,21,22),
(22,6,9,34,26,32,21,22),
(22,6,10,35,27,33,21,23),
(22,6,11,36,28,34,21,23),
(22,6,12,38,29,35,21,23),
(22,6,13,39,30,37,21,24),
(22,6,14,41,31,38,21,24),
(22,6,15,42,32,39,21,24),
(22,6,16,44,33,41,21,25),
(22,6,17,45,34,42,22,25),
(22,6,18,47,34,43,22,25),
(22,6,19,48,35,45,22,26),
(22,6,20,50,36,46,22,26),
(22,6,21,51,37,48,22,26),
(22,6,22,53,38,49,22,27),
(22,6,23,54,39,51,22,27),
(22,6,24,56,40,52,23,28),
(22,6,25,58,41,53,23,28),
(22,6,26,59,42,55,23,28),
(22,6,27,61,43,56,23,29),
(22,6,28,63,44,58,23,29),
(22,6,29,64,45,59,23,30),
(22,6,30,66,46,61,24,30),
(22,6,31,68,47,62,24,30),
(22,6,32,69,48,64,24,31),
(22,6,33,71,50,66,24,31),
(22,6,34,73,51,67,24,32),
(22,6,35,74,52,69,24,32),
(22,6,36,76,53,70,25,33),
(22,6,37,78,54,72,25,33),
(22,6,38,80,55,74,25,34),
(22,6,39,82,56,75,25,34),
(22,6,40,83,57,77,25,35),
(22,6,41,85,58,79,26,35),
(22,6,42,87,60,80,26,35),
(22,6,43,89,61,82,26,36),
(22,6,44,91,62,84,26,36),
(22,6,45,93,63,85,26,37),
(22,6,46,95,64,87,27,37),
(22,6,47,97,66,89,27,38),
(22,6,48,99,67,91,27,38),
(22,6,49,101,68,93,27,39),
(22,6,50,103,69,94,28,40),
(22,6,51,105,71,96,28,40),
(22,6,52,106,72,97,28,41),
(22,6,53,107,72,98,28,41),
(22,6,54,107,73,98,29,42),
(22,6,55,108,73,99,29,43),
(22,6,56,111,75,102,29,44),
(22,6,57,113,76,104,29,44),
(22,6,58,118,77,106,30,45),
(22,6,59,118,79,108,30,45),
(22,6,60,123,80,110,30,46),
(22,6,61,125,81,112,30,47),
(22,6,62,128,83,114,30,47),
(22,6,63,130,84,117,31,48),
(22,6,64,130,86,119,31,48),
(22,6,65,140,87,128,31,49),
(22,6,66,143,89,131,31,50),
(22,6,67,146,90,133,32,50),
(22,6,68,148,92,135,32,51),
(22,6,69,151,93,138,32,52),
(22,6,70,154,95,140,32,52),
(22,6,71,162,97,144,33,53),
(22,6,72,164,98,146,33,54),
(22,6,73,165,100,148,33,55),
(22,6,74,166,102,151,33,55),
(22,6,75,169,103,154,34,56),
(22,6,76,172,105,157,34,57),
(22,6,77,175,107,157,34,58),
(22,6,78,176,108,157,34,58),
(22,6,79,177,110,157,35,59),
(22,6,80,180,112,160,35,60),
(22,6,81,190,122,170,45,70),
(22,6,82,200,132,180,55,80),
(22,6,83,210,142,190,65,90),
(22,6,84,220,152,200,75,100),
(22,6,85,230,162,210,85,110),
(22,8,1,20,20,20,23,22),
(22,8,2,20,20,20,24,23),
(22,8,3,20,20,21,26,25),
(22,8,4,20,20,21,27,26),
(22,8,5,20,21,21,28,27),
(22,8,6,20,21,21,30,29),
(22,8,7,21,21,22,31,30),
(22,8,8,21,21,22,33,31),
(22,8,9,21,21,22,34,33),
(22,8,10,21,21,23,36,34),
(22,8,11,21,22,23,37,36),
(22,8,12,21,22,23,39,37),
(22,8,13,21,22,24,40,38),
(22,8,14,21,22,24,42,40),
(22,8,15,21,22,24,43,41),
(22,8,16,21,23,25,45,43),
(22,8,17,22,23,25,46,44),
(22,8,18,22,23,25,48,46),
(22,8,19,22,23,26,49,47),
(22,8,20,22,23,26,51,49),
(22,8,21,22,24,26,53,51),
(22,8,22,22,24,27,54,52),
(22,8,23,22,24,27,56,54),
(22,8,24,23,24,28,58,55),
(22,8,25,23,25,28,59,57),
(22,8,26,23,25,28,61,59),
(22,8,27,23,25,29,63,60),
(22,8,28,23,25,29,65,62),
(22,8,29,23,25,30,66,64),
(22,8,30,24,26,30,68,65),
(22,8,31,24,26,30,70,67),
(22,8,32,24,26,31,72,69),
(22,8,33,24,27,31,73,70),
(22,8,34,24,27,32,75,72),
(22,8,35,24,27,32,77,74),
(22,8,36,25,27,33,79,76),
(22,8,37,25,28,33,81,78),
(22,8,38,25,28,34,83,79),
(22,8,39,25,28,34,85,81),
(22,8,40,25,28,35,87,83),
(22,8,41,26,29,35,88,85),
(22,8,42,26,29,35,90,87),
(22,8,43,26,29,36,92,89),
(22,8,44,26,30,36,94,91),
(22,8,45,26,30,37,96,92),
(22,8,46,27,30,37,98,94),
(22,8,47,27,31,38,100,96),
(22,8,48,27,31,38,102,98),
(22,8,49,27,31,39,104,100),
(22,8,50,28,32,40,106,102),
(22,8,51,28,32,40,109,104),
(22,8,52,28,32,41,111,106),
(22,8,53,28,33,41,113,108),
(22,8,54,29,33,42,115,110),
(22,8,55,29,33,42,117,112),
(22,8,56,29,34,43,119,114),
(22,8,57,29,34,43,121,117),
(22,8,58,30,34,44,124,119),
(22,8,59,30,35,44,126,121),
(22,8,60,30,35,45,128,123),
(22,8,61,30,35,46,130,125),
(22,8,62,31,36,46,132,127),
(22,8,63,31,36,47,135,129),
(22,8,64,31,37,47,137,132),
(22,8,65,32,37,48,139,134),
(22,8,66,32,37,49,142,136),
(22,8,67,32,38,49,144,138),
(22,8,68,32,38,50,146,140),
(22,8,69,33,39,50,149,143),
(22,8,70,33,39,51,151,145),
(22,8,71,33,39,52,154,152),
(22,8,72,33,40,53,160,155),
(22,8,73,33,40,54,160,158),
(22,8,74,34,41,54,163,160),
(22,8,75,34,41,55,166,163),
(22,8,76,34,41,56,169,166),
(22,8,77,35,42,57,172,169),
(22,8,78,35,42,57,175,173),
(22,8,79,35,43,58,178,176),
(22,8,80,36,43,59,181,179),
(22,8,81,46,53,69,191,189),
(22,8,82,56,63,79,201,199),
(22,8,83,66,73,89,211,209),
(22,8,84,76,83,99,221,219),
(22,8,85,86,93,109,231,229),
(22,9,1,20,20,21,22,22),
(22,9,2,20,20,22,23,23),
(22,9,3,21,21,22,24,24),
(22,9,4,21,21,23,26,25),
(22,9,5,21,21,23,27,27),
(22,9,6,21,22,24,28,28),
(22,9,7,22,22,24,29,29),
(22,9,8,22,23,25,30,30),
(22,9,9,22,23,26,32,31),
(22,9,10,23,23,26,33,33),
(22,9,11,23,24,27,34,34),
(22,9,12,23,24,27,35,35),
(22,9,13,24,25,28,37,36),
(22,9,14,24,25,29,38,38),
(22,9,15,24,25,29,39,39),
(22,9,16,25,26,30,41,40),
(22,9,17,25,26,31,42,42),
(22,9,18,25,27,31,43,43),
(22,9,19,26,27,32,45,44),
(22,9,20,26,28,33,46,46),
(22,9,21,26,28,33,48,47),
(22,9,22,27,29,34,49,49),
(22,9,23,27,29,35,51,50),
(22,9,24,28,30,35,52,51),
(22,9,25,28,30,36,53,53),
(22,9,26,28,31,37,55,54),
(22,9,27,29,31,37,56,56),
(22,9,28,29,32,38,58,57),
(22,9,29,30,32,39,59,59),
(22,9,30,30,33,40,61,60),
(22,9,31,30,33,40,62,62),
(22,9,32,31,34,41,64,63),
(22,9,33,31,34,42,66,65),
(22,9,34,32,35,43,67,66),
(22,9,35,32,35,44,69,68),
(22,9,36,33,36,44,70,69),
(22,9,37,33,36,45,72,71),
(22,9,38,34,37,46,74,73),
(22,9,39,34,38,47,75,74),
(22,9,40,35,38,48,77,76),
(22,9,41,35,39,48,79,78),
(22,9,42,35,39,49,80,79),
(22,9,43,36,40,50,82,81),
(22,9,44,36,40,51,84,83),
(22,9,45,37,41,52,85,84),
(22,9,46,37,42,53,87,86),
(22,9,47,38,42,54,89,88),
(22,9,48,38,43,55,91,89),
(22,9,49,39,44,55,93,91),
(22,9,50,40,44,56,94,93),
(22,9,51,40,45,57,96,95),
(22,9,52,41,45,58,98,97),
(22,9,53,41,46,59,100,98),
(22,9,54,42,47,60,102,100),
(22,9,55,42,47,61,103,102),
(22,9,56,43,48,62,105,104),
(22,9,57,43,49,63,107,106),
(22,9,58,44,49,64,109,108),
(22,9,59,44,50,65,111,109),
(22,9,60,45,51,66,113,111),
(22,9,61,46,51,67,115,113),
(22,9,62,46,52,68,117,115),
(22,9,63,47,53,69,119,117),
(22,9,64,47,54,70,121,119),
(22,9,65,48,54,71,123,121),
(22,9,66,49,55,72,125,123),
(22,9,67,49,56,73,127,125),
(22,9,68,50,57,74,129,127),
(22,9,69,50,57,75,131,129),
(22,9,70,51,58,76,133,131),
(22,9,71,52,59,78,135,146),
(22,9,72,53,59,79,138,148),
(22,9,73,54,60,80,140,151),
(22,9,74,54,61,89,143,154),
(22,9,75,55,62,91,145,156),
(22,9,76,56,63,92,148,159),
(22,9,77,57,64,93,151,162),
(22,9,78,57,65,95,153,165),
(22,9,79,58,66,96,156,168),
(22,9,80,59,67,97,159,170),
(22,9,81,69,77,107,169,180),
(22,9,82,79,87,117,179,190),
(22,9,83,89,97,127,189,200),
(22,9,84,99,107,137,199,210),
(22,9,85,109,117,147,209,220),
(22,11,1,26,15,22,17,24),
(22,11,2,27,16,23,18,25),
(22,11,3,27,16,23,19,26),
(22,11,4,28,17,24,20,27),
(22,11,5,28,17,25,21,29),
(22,11,6,29,18,25,22,30),
(22,11,7,29,18,26,23,31),
(22,11,8,30,19,27,24,32),
(22,11,9,30,19,27,26,34),
(22,11,10,31,20,28,27,35),
(22,11,11,32,20,29,28,36),
(22,11,12,32,21,29,29,37),
(22,11,13,33,21,30,30,39),
(22,11,14,33,22,31,31,40),
(22,11,15,34,23,32,32,41),
(22,11,16,35,23,32,34,43),
(22,11,17,35,24,33,35,44),
(22,11,18,36,24,34,36,45),
(22,11,19,37,25,35,37,47),
(22,11,20,37,26,35,39,48),
(22,11,21,38,26,36,40,50),
(22,11,22,39,27,37,41,51),
(22,11,23,39,28,38,42,52),
(22,11,24,40,28,39,44,54),
(22,11,25,41,29,39,45,55),
(22,11,26,41,30,40,46,57),
(22,11,27,42,30,41,47,58),
(22,11,28,43,31,42,49,60),
(22,11,29,44,32,43,50,61),
(22,11,30,44,32,44,52,63),
(22,11,31,45,33,44,53,64),
(22,11,32,46,34,45,54,66),
(22,11,33,47,34,46,56,67),
(22,11,34,47,35,47,57,69),
(22,11,35,48,36,48,58,71),
(22,11,36,49,36,49,60,72),
(22,11,37,50,37,50,61,74),
(22,11,38,51,38,51,63,76),
(22,11,39,52,39,52,64,77),
(22,11,40,52,39,53,66,79),
(22,11,41,53,40,54,67,81),
(22,11,42,54,41,55,69,82),
(22,11,43,55,42,56,70,84),
(22,11,44,56,43,57,72,86),
(22,11,45,57,43,57,73,87),
(22,11,46,57,44,58,75,89),
(22,11,47,58,45,60,76,91),
(22,11,48,59,46,61,78,93),
(22,11,49,60,47,62,79,94),
(22,11,50,61,47,63,81,96),
(22,11,51,62,48,64,83,98),
(22,11,52,63,49,65,84,100),
(22,11,53,64,50,66,86,102),
(22,11,54,65,51,67,87,104),
(22,11,55,66,51,68,89,105),
(22,11,56,67,52,69,91,107),
(22,11,57,68,53,70,92,109),
(22,11,58,69,54,71,94,111),
(22,11,59,70,55,72,96,113),
(22,11,60,71,56,73,97,115),
(22,11,61,72,57,74,99,117),
(22,11,62,73,58,76,101,119),
(22,11,63,74,59,77,103,121),
(22,11,64,75,59,78,104,123),
(22,11,65,76,60,79,106,125),
(22,11,66,77,61,80,108,127),
(22,11,67,78,62,81,110,129),
(22,11,68,79,63,83,111,131),
(22,11,69,80,64,84,113,133),
(22,11,70,81,65,85,115,135),
(22,11,71,83,66,86,117,137),
(22,11,72,84,68,88,120,140),
(22,11,73,85,69,89,122,142),
(22,11,74,86,70,91,124,145),
(22,11,75,88,71,92,126,147),
(22,11,76,89,72,94,128,150),
(22,11,77,90,73,95,131,153),
(22,11,78,92,75,97,133,155),
(22,11,79,93,76,98,136,158),
(22,11,80,94,77,100,138,185),
(22,11,81,104,87,110,148,195),
(22,11,82,114,97,120,158,205),
(22,11,83,124,107,130,168,215),
(22,11,84,134,117,140,178,225),
(22,11,85,144,127,150,188,235);
/*!40000 ALTER TABLE `player_levelstats` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `player_xp_for_level`
--
DROP TABLE IF EXISTS `player_xp_for_level`;
CREATE TABLE `player_xp_for_level` (
`lvl` int(3) unsigned NOT NULL,
`xp_for_next_level` int(10) unsigned NOT NULL,
PRIMARY KEY (`lvl`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `player_xp_for_level`
--
LOCK TABLES `player_xp_for_level` WRITE;
/*!40000 ALTER TABLE `player_xp_for_level` DISABLE KEYS */;
INSERT INTO `player_xp_for_level` VALUES
(1,400),
(2,900),
(3,1400),
(4,2100),
(5,2800),
(6,3600),
(7,4500),
(8,5400),
(9,6500),
(10,7600),
(11,8700),
(12,9800),
(13,11000),
(14,12300),
(15,13600),
(16,15000),
(17,16400),
(18,17800),
(19,19300),
(20,20800),
(21,22400),
(22,24000),
(23,25500),
(24,27200),
(25,28900),
(26,30500),
(27,32200),
(28,33900),
(29,36300),
(30,38800),
(31,41600),
(32,44600),
(33,48000),
(34,51400),
(35,55000),
(36,58700),
(37,62400),
(38,66200),
(39,70200),
(40,74300),
(41,78500),
(42,82800),
(43,87100),
(44,91600),
(45,96300),
(46,101000),
(47,105800),
(48,110700),
(49,115700),
(50,120900),
(51,126100),
(52,131500),
(53,137000),
(54,142500),
(55,148200),
(56,154000),
(57,159900),
(58,165800),
(59,172000),
(60,290000),
(61,317000),
(62,349000),
(63,386000),
(64,428000),
(65,475000),
(66,527000),
(67,585000),
(68,648000),
(69,717000),
(70,1219040),
(71,1231680),
(72,1244560),
(73,1257440),
(74,1270320),
(75,1283360),
(76,1296560),
(77,1309920),
(78,1323120),
(79,1336640),
(80,1686300),
(81,2121500),
(82,4004000),
(83,5203400),
(84,9165100);
/*!40000 ALTER TABLE `player_xp_for_level` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `playercreateinfo`
--
DROP TABLE IF EXISTS `playercreateinfo`;
CREATE TABLE `playercreateinfo` (
`race` tinyint(3) unsigned NOT NULL DEFAULT '0',
`class` tinyint(3) unsigned NOT NULL DEFAULT '0',
`map` smallint(5) unsigned NOT NULL DEFAULT '0',
`zone` mediumint(8) unsigned NOT NULL DEFAULT '0',
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`orientation` float NOT NULL DEFAULT '0',
`phaseMap` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`race`,`class`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `playercreateinfo`
--
LOCK TABLES `playercreateinfo` WRITE;
/*!40000 ALTER TABLE `playercreateinfo` DISABLE KEYS */;
INSERT INTO `playercreateinfo` VALUES
(1,1,0,9,-8914.57,-133.909,80.5378,0,0),
(1,2,0,9,-8914.57,-133.909,80.5378,0,0),
(1,3,0,9,-8914.57,-133.909,80.5378,0,0),
(1,4,0,9,-8914.57,-133.909,80.5378,0,0),
(1,5,0,9,-8914.57,-133.909,80.5378,0,0),
(1,6,609,0,2355.84,-5664.77,426.028,0,0),
(1,8,0,9,-8914.57,-133.909,80.5378,0,0),
(1,9,0,9,-8914.57,-133.909,80.5378,0,0),
(2,1,1,14,-618.518,-4251.67,38.718,0,0),
(2,3,1,14,-618.518,-4251.67,38.718,0,0),
(2,4,1,14,-618.518,-4251.67,38.718,0,0),
(2,6,609,0,2358.44,-5666.9,426.023,0,0),
(2,7,1,14,-618.518,-4251.67,38.718,0,0),
(2,8,1,14,-618.518,-4251.67,38.718,0,0),
(2,9,1,14,-618.518,-4251.67,38.718,0,0),
(3,1,0,1,-6240.32,331.033,382.758,6.17716,0),
(3,2,0,1,-6240.32,331.033,382.758,6.17716,0),
(3,3,0,1,-6240.32,331.033,382.758,6.17716,0),
(3,4,0,1,-6240.32,331.033,382.758,6.17716,0),
(3,5,0,1,-6240.32,331.033,382.758,6.17716,0),
(3,6,609,0,2358.44,-5666.9,426.023,0,0),
(3,7,0,1,-6240.32,331.033,382.758,6.17716,0),
(3,8,0,1,-6240.32,331.033,382.758,6.17716,0),
(3,9,0,1,-6240.32,331.033,382.758,6.17716,0),
(4,1,1,141,10311.3,832.463,1326.41,5.69632,0),
(4,3,1,141,10311.3,832.463,1326.41,5.69632,0),
(4,4,1,141,10311.3,832.463,1326.41,5.69632,0),
(4,5,1,141,10311.3,832.463,1326.41,5.69632,0),
(4,6,609,0,2356.21,-5662.21,426.026,0,0),
(4,8,1,141,10311.3,832.463,1326.41,5.69632,0),
(4,11,1,141,10311.3,832.463,1326.41,5.69632,0),
(5,1,0,5692,1699.85,1706.56,135.928,0,0),
(5,3,0,5692,1699.85,1706.56,135.928,0,0),
(5,4,0,5692,1699.85,1706.56,135.928,0,0),
(5,5,0,5692,1699.85,1706.56,135.928,0,0),
(5,6,609,0,2356.21,-5662.21,426.026,0,0),
(5,8,0,5692,1699.85,1706.56,135.928,0,0),
(5,9,0,5692,1699.85,1706.56,135.928,0,0),
(6,1,1,221,-2915.55,-257.347,59.2693,0,0),
(6,2,1,221,-2915.55,-257.347,59.2693,0,0),
(6,3,1,221,-2915.55,-257.347,59.2693,0,0),
(6,5,1,221,-2915.55,-257.347,59.2693,0,0),
(6,6,609,0,2358.17,-5663.21,426.027,0,0),
(6,7,1,221,-2915.55,-257.347,59.2693,0,0),
(6,11,1,221,-2915.55,-257.347,59.2693,0,0),
(7,1,0,5495,-4983.42,877.7,274.31,0,0),
(7,4,0,5495,-4983.42,877.7,274.31,0,0),
(7,5,0,5495,-4983.42,877.7,274.31,0,0),
(7,6,609,0,2355.05,-5661.7,426.026,0,0),
(7,8,0,5495,-4983.42,877.7,274.31,0,0),
(7,9,0,5495,-4983.42,877.7,274.31,0,0),
(8,1,1,5691,-1171.45,-5263.65,0.847728,0,0),
(8,3,1,5691,-1171.45,-5263.65,0.847728,0,0),
(8,4,1,5691,-1171.45,-5263.65,0.847728,0,0),
(8,5,1,5691,-1171.45,-5263.65,0.847728,0,0),
(8,6,609,0,2355.05,-5661.7,426.026,0,0),
(8,7,1,5691,-1171.45,-5263.65,0.847728,0,0),
(8,8,1,5691,-1171.45,-5263.65,0.847728,0,0),
(8,9,1,5691,-1171.45,-5263.65,0.847728,0,0),
(8,11,1,5691,-1171.45,-5263.65,0.847728,0,0),
(9,1,648,4765,-8423.81,1361.3,104.671,0,0),
(9,3,648,4765,-8423.81,1361.3,104.671,0,0),
(9,4,648,4765,-8423.81,1361.3,104.671,0,0),
(9,5,648,4765,-8423.81,1361.3,104.671,0,0),
(9,6,609,0,2355.05,-5661.7,426.026,0,0),
(9,7,648,4765,-8423.81,1361.3,104.671,0,0),
(9,8,648,4765,-8423.81,1361.3,104.671,0,0),
(9,9,648,4765,-8423.81,1361.3,104.671,0,0),
(10,1,530,3431,10349.6,-6357.29,33.4026,5.31605,0),
(10,2,530,3431,10349.6,-6357.29,33.4026,5.31605,0),
(10,3,530,3431,10349.6,-6357.29,33.4026,5.31605,0),
(10,4,530,3431,10349.6,-6357.29,33.4026,5.31605,0),
(10,5,530,3431,10349.6,-6357.29,33.4026,5.31605,0),
(10,6,609,0,2355.84,-5664.77,426.028,0,0),
(10,8,530,3431,10349.6,-6357.29,33.4026,5.31605,0),
(10,9,530,3431,10349.6,-6357.29,33.4026,5.31605,0),
(11,1,530,3526,-3961.64,-13931.2,100.615,2.08364,0),
(11,2,530,3526,-3961.64,-13931.2,100.615,2.08364,0),
(11,3,530,3526,-3961.64,-13931.2,100.615,2.08364,0),
(11,5,530,3526,-3961.64,-13931.2,100.615,2.08364,0),
(11,6,609,0,2358.17,-5663.21,426.027,0,0),
(11,7,530,3526,-3961.64,-13931.2,100.615,2.08364,0),
(11,8,530,3526,-3961.64,-13931.2,100.615,2.08364,0),
(22,1,654,4756,-1451.53,1403.35,35.5561,0,638),
(22,3,654,4756,-1451.53,1403.35,35.5561,0,638),
(22,4,654,4756,-1451.53,1403.35,35.5561,0,638),
(22,5,654,4756,-1451.53,1403.35,35.5561,0,638),
(22,6,609,0,2356.21,-5662.21,426.026,0,0),
(22,8,654,4756,-1451.53,1403.35,35.5561,0,638),
(22,9,654,4756,-1451.53,1403.35,35.5561,0,638),
(22,11,654,4756,-1451.53,1403.35,35.5561,0,638);
/*!40000 ALTER TABLE `playercreateinfo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `playercreateinfo_action`
--
DROP TABLE IF EXISTS `playercreateinfo_action`;
CREATE TABLE `playercreateinfo_action` (
`race` tinyint(3) unsigned NOT NULL DEFAULT '0',
`class` tinyint(3) unsigned NOT NULL DEFAULT '0',
`button` smallint(5) unsigned NOT NULL DEFAULT '0',
`action` int(11) unsigned NOT NULL DEFAULT '0',
`type` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`race`,`class`,`button`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `playercreateinfo_action`
--
LOCK TABLES `playercreateinfo_action` WRITE;
/*!40000 ALTER TABLE `playercreateinfo_action` DISABLE KEYS */;
INSERT INTO `playercreateinfo_action` VALUES
(1,1,72,88163,0),
(1,1,73,88161,0),
(1,1,81,59752,0),
(1,1,84,6603,0),
(1,1,96,6603,0),
(1,1,108,6603,0),
(1,2,0,35395,0),
(1,2,9,59752,0),
(1,3,0,3044,0),
(1,3,9,59752,0),
(1,3,10,9,48),
(1,3,11,982,0),
(1,4,0,1752,0),
(1,4,9,59752,0),
(1,5,0,585,0),
(1,5,9,59752,0),
(1,8,0,133,0),
(1,8,9,59752,0),
(1,9,0,686,0),
(1,9,9,59752,0),
(1,9,10,10,48),
(1,6,0,6603,0),
(1,6,1,49576,0),
(1,6,2,45477,0),
(1,6,3,45462,0),
(1,6,4,45902,0),
(1,6,5,47541,0),
(1,6,11,59752,0),
(2,1,72,88163,0),
(2,1,73,88161,0),
(2,1,81,20572,0),
(2,1,84,6603,0),
(2,1,96,6603,0),
(2,1,108,6603,0),
(2,3,0,3044,0),
(2,3,9,20572,0),
(2,3,10,9,48),
(2,3,11,982,0),
(2,4,0,1752,0),
(2,4,9,20572,0),
(2,7,0,403,0),
(2,7,9,20572,0),
(2,7,72,403,0),
(2,8,0,133,0),
(2,8,9,33702,0),
(2,9,0,686,0),
(2,9,9,33702,0),
(2,9,10,10,48),
(2,6,0,6603,0),
(2,6,1,49576,0),
(2,6,2,45477,0),
(2,6,3,45462,0),
(2,6,4,45902,0),
(2,6,5,47541,0),
(2,6,10,20572,0),
(3,1,72,88163,0),
(3,1,73,88161,0),
(3,1,81,20594,0),
(3,1,84,6603,0),
(3,1,96,6603,0),
(3,1,108,6603,0),
(3,2,0,35395,0),
(3,2,9,20594,0),
(3,3,0,3044,0),
(3,3,9,20594,0),
(3,3,10,9,48),
(3,3,11,982,0),
(3,3,75,20594,0),
(3,4,0,1752,0),
(3,4,9,20594,0),
(3,5,0,585,0),
(3,5,9,20594,0),
(3,7,0,6603,0),
(3,7,1,403,0),
(3,7,9,20594,0),
(3,7,72,403,0),
(3,8,0,133,0),
(3,8,9,20594,0),
(3,9,0,686,0),
(3,9,9,20594,0),
(3,9,10,10,48),
(3,6,0,6603,0),
(3,6,1,49576,0),
(3,6,2,45477,0),
(3,6,3,45462,0),
(3,6,4,45902,0),
(3,6,5,47541,0),
(4,1,72,88163,0),
(4,1,73,88161,0),
(4,1,81,58984,0),
(4,1,84,6603,0),
(4,1,96,6603,0),
(4,1,108,6603,0),
(4,3,0,3044,0),
(4,3,9,58984,0),
(4,3,10,9,48),
(4,3,11,982,0),
(4,3,81,58984,0),
(4,4,0,1752,0),
(4,4,9,58984,0),
(4,4,81,58984,0),
(4,5,0,585,0),
(4,5,9,58984,0),
(4,5,81,58984,0),
(4,8,0,133,0),
(4,8,9,58984,0),
(4,11,0,5176,0),
(4,11,9,58984,0),
(4,11,72,6603,0),
(4,11,74,58984,0),
(4,11,84,6603,0),
(4,11,96,6603,0),
(4,11,108,6603,0),
(4,6,0,6603,0),
(4,6,1,49576,0),
(4,6,2,45477,0),
(4,6,3,45462,0),
(4,6,4,45902,0),
(4,6,5,47541,0),
(4,6,10,58984,0),
(4,6,83,58984,0),
(5,1,72,88163,0),
(5,1,73,88161,0),
(5,1,81,20577,0),
(5,1,84,6603,0),
(5,1,96,6603,0),
(5,1,108,6603,0),
(5,3,0,3044,0),
(5,3,9,20577,0),
(5,3,10,9,48),
(5,3,11,982,0),
(5,4,0,1752,0),
(5,4,9,20577,0),
(5,5,0,585,0),
(5,5,9,20577,0),
(5,8,0,133,0),
(5,8,9,20577,0),
(5,9,0,686,0),
(5,9,9,20577,0),
(5,9,10,10,48),
(5,6,0,6603,0),
(5,6,1,49576,0),
(5,6,2,45477,0),
(5,6,3,45462,0),
(5,6,4,45902,0),
(5,6,5,47541,0),
(5,6,10,20577,0),
(6,1,72,88163,0),
(6,1,73,88161,0),
(6,1,81,20549,0),
(6,1,84,6603,0),
(6,1,96,6603,0),
(6,1,108,6603,0),
(6,2,0,35395,0),
(6,2,9,20549,0),
(6,3,0,3044,0),
(6,3,9,20549,0),
(6,3,10,9,48),
(6,3,11,982,0),
(6,3,75,20549,0),
(6,5,0,585,0),
(6,5,9,20549,0),
(6,7,0,403,0),
(6,7,9,20549,0),
(6,7,75,20549,0),
(6,11,0,403,0),
(6,11,9,20549,0),
(6,11,72,6603,0),
(6,11,75,20549,0),
(6,11,84,6603,0),
(6,11,96,6603,0),
(6,11,108,6603,0),
(6,6,0,6603,0),
(6,6,1,49576,0),
(6,6,2,45477,0),
(6,6,3,45462,0),
(6,6,4,45902,0),
(6,6,5,47541,0),
(6,6,10,20549,0),
(6,6,75,20549,0),
(7,1,72,88163,0),
(7,1,73,88161,0),
(7,1,84,6603,0),
(7,1,96,6603,0),
(7,1,108,6603,0),
(7,4,0,1752,0),
(7,5,0,585,0),
(7,8,0,133,0),
(7,9,0,686,0),
(7,9,10,10,48),
(7,6,0,6603,0),
(7,6,1,49576,0),
(7,6,2,45477,0),
(7,6,3,45462,0),
(7,6,4,45902,0),
(7,6,5,47541,0),
(7,6,10,20589,0),
(7,6,72,6603,0),
(7,6,83,117,128),
(7,6,84,6603,0),
(7,6,96,6603,0),
(7,6,108,6603,0),
(8,1,72,88163,0),
(8,1,73,88161,0),
(8,1,81,26297,0),
(8,1,84,6603,0),
(8,1,96,6603,0),
(8,1,108,6603,0),
(8,3,0,3044,0),
(8,3,9,26297,0),
(8,3,10,9,48),
(8,3,11,982,0),
(8,4,0,1752,0),
(8,4,9,26297,0),
(8,4,76,26297,0),
(8,5,0,585,0),
(8,5,9,26297,0),
(8,7,0,403,0),
(8,7,9,26297,0),
(8,7,72,403,0),
(8,8,0,133,0),
(8,8,9,26297,0),
(8,9,0,686,0),
(8,9,9,26297,0),
(8,9,10,10,48),
(8,11,0,5176,0),
(8,11,9,26297,0),
(8,11,72,6603,0),
(8,11,84,6603,0),
(8,11,96,6603,0),
(8,6,0,6603,0),
(8,6,1,49576,0),
(8,6,2,45477,0),
(8,6,3,45462,0),
(8,6,4,45902,0),
(8,6,5,47541,0),
(8,6,10,26297,0),
(9,1,72,88163,0),
(9,1,73,88161,0),
(9,1,81,69070,0),
(9,1,82,69041,0),
(9,3,0,3044,0),
(9,3,8,982,0),
(9,3,9,69070,0),
(9,3,10,69041,0),
(9,3,11,9,48),
(9,4,0,1752,0),
(9,4,9,69070,0),
(9,4,10,69041,0),
(9,5,0,585,0),
(9,5,9,69070,0),
(9,5,10,69041,0),
(9,7,0,403,0),
(9,7,9,69070,0),
(9,7,10,69041,0),
(9,7,72,403,0),
(9,8,0,133,0),
(9,8,9,69070,0),
(9,8,10,69041,0),
(9,9,0,686,0),
(9,9,9,69070,0),
(9,9,10,69041,0),
(9,9,11,10,48),
(9,6,0,6603,0),
(9,6,1,49576,0),
(9,6,2,45477,0),
(9,6,3,45462,0),
(9,6,4,45902,0),
(9,6,5,47541,0),
(9,6,9,69070,0),
(9,6,10,69041,0),
(9,6,11,69046,0),
(10,1,72,88163,0),
(10,1,73,88161,0),
(10,1,81,69179,0),
(10,2,0,35395,0),
(10,2,9,28730,0),
(10,3,0,3044,0),
(10,3,9,80483,0),
(10,3,10,9,48),
(10,3,11,982,0),
(10,4,0,1752,0),
(10,4,9,25046,0),
(10,5,0,585,0),
(10,5,9,28730,0),
(10,8,0,133,0),
(10,8,9,28730,0),
(10,9,0,686,0),
(10,9,9,28730,0),
(10,9,10,10,48),
(10,6,0,6603,0),
(10,6,1,49576,0),
(10,6,2,45477,0),
(10,6,3,45462,0),
(10,6,4,45902,0),
(10,6,5,47541,0),
(10,6,6,50613,0),
(11,1,72,88163,0),
(11,1,73,88161,0),
(11,1,81,28880,0),
(11,1,84,6603,0),
(11,1,96,6603,0),
(11,1,108,6603,0),
(11,2,0,35395,0),
(11,2,9,59542,0),
(11,2,83,4540,128),
(11,3,0,3044,0),
(11,3,9,59543,0),
(11,3,10,9,48),
(11,3,11,982,0),
(11,3,72,6603,0),
(11,3,74,75,0),
(11,3,82,159,128),
(11,3,83,4540,128),
(11,5,0,585,0),
(11,5,9,59544,0),
(11,5,83,4540,128),
(11,7,0,403,0),
(11,7,9,59547,0),
(11,8,0,133,0),
(11,8,9,59548,0),
(11,8,83,4540,128),
(11,6,0,6603,0),
(11,6,1,49576,0),
(11,6,2,45477,0),
(11,6,3,45462,0),
(11,6,4,45902,0),
(11,6,5,47541,0),
(11,6,10,59545,0),
(22,1,72,88163,0),
(22,1,73,88161,0),
(22,3,0,3044,0),
(22,3,10,9,48),
(22,3,11,982,0),
(22,4,0,1752,0),
(22,5,0,585,0),
(22,8,0,133,0),
(22,9,0,686,0),
(22,9,10,10,48),
(22,11,0,5176,0),
(22,11,72,6603,0),
(22,11,84,6603,0),
(22,11,96,6603,0),
(22,6,0,6603,0),
(22,6,1,49576,0),
(22,6,2,45477,0),
(22,6,3,45462,0),
(22,6,4,45902,0),
(22,6,5,47541,0),
(22,6,9,68992,0),
(22,6,10,68996,0),
(22,6,11,87840,0);
/*!40000 ALTER TABLE `playercreateinfo_action` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `playercreateinfo_item`
--
DROP TABLE IF EXISTS `playercreateinfo_item`;
CREATE TABLE `playercreateinfo_item` (
`race` tinyint(3) unsigned NOT NULL DEFAULT '0',
`class` tinyint(3) unsigned NOT NULL DEFAULT '0',
`itemid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`amount` tinyint(3) unsigned NOT NULL DEFAULT '1',
KEY `playercreateinfo_race_class_index` (`race`,`class`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `playercreateinfo_item`
--
LOCK TABLES `playercreateinfo_item` WRITE;
/*!40000 ALTER TABLE `playercreateinfo_item` DISABLE KEYS */;
/*!40000 ALTER TABLE `playercreateinfo_item` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `playercreateinfo_spell`
--
DROP TABLE IF EXISTS `playercreateinfo_spell`;
CREATE TABLE `playercreateinfo_spell` (
`race` tinyint(3) unsigned NOT NULL DEFAULT '0',
`class` tinyint(3) unsigned NOT NULL DEFAULT '0',
`Spell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Note` varchar(255) DEFAULT NULL,
PRIMARY KEY (`race`,`class`,`Spell`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `playercreateinfo_spell`
--
LOCK TABLES `playercreateinfo_spell` WRITE;
/*!40000 ALTER TABLE `playercreateinfo_spell` DISABLE KEYS */;
INSERT INTO `playercreateinfo_spell` VALUES
(1,1,81,'Dodge'),
(1,1,107,'Block'),
(1,1,196,'One-Handed Axes'),
(1,1,197,'Two-Handed Axes'),
(1,1,198,'One-Handed Maces'),
(1,1,199,'Two-Handed Maces'),
(1,1,200,'Polearms'),
(1,1,201,'One-Handed Swords'),
(1,1,202,'Two-Handed Swords'),
(1,1,203,'Unarmed'),
(1,1,204,'Defense'),
(1,1,227,'Staves'),
(1,1,264,'Bows'),
(1,1,266,'Guns'),
(1,1,522,'SPELLDEFENSE (DND)'),
(1,1,668,'Language Common'),
(1,1,1180,'Daggers'),
(1,1,2382,'Generic'),
(1,1,2457,'Battle Stance'),
(1,1,2567,'Thrown'),
(1,1,2764,'Throw'),
(1,1,3018,'Shoot'),
(1,1,3050,'Detect'),
(1,1,3365,'Opening'),
(1,1,5011,'Crossbows'),
(1,1,5301,'Defensive State (DND)'),
(1,1,6233,'Closing'),
(1,1,6246,'Closing'),
(1,1,6247,'Opening'),
(1,1,6477,'Opening'),
(1,1,6478,'Opening'),
(1,1,6603,'Auto Attack'),
(1,1,7266,'Duel'),
(1,1,7267,'Grovel'),
(1,1,7355,'Stuck'),
(1,1,8386,'Attacking'),
(1,1,8737,'Mail'),
(1,1,9077,'Leather'),
(1,1,9078,'Cloth'),
(1,1,9116,'Shield'),
(1,1,9125,'Generic'),
(1,1,15590,'Fist Weapons'),
(1,1,20597,'Sword Specialization'),
(1,1,20598,'The Human Spirit'),
(1,1,20599,'Diplomacy'),
(1,1,20864,'Mace Specialization'),
(1,1,21651,'Opening'),
(1,1,21652,'Closing'),
(1,1,22027,'Remove Insignia'),
(1,1,22810,'Opening - No Text'),
(1,1,32215,'Victorious State'),
(1,1,45927,'Summon Friend'),
(1,1,49410,'Forceful Deflection'),
(1,1,59752,'Every Man for Himself'),
(1,1,61437,'Opening'),
(1,1,68398,'Opening'),
(1,1,76268,'Armor Skills'),
(1,1,76290,'Weapon Skills'),
(1,1,79738,'Languages'),
(1,1,88161,'Strike'),
(1,1,88163,'Attack'),
(1,1,96220,'Opening'),
(1,2,81,'Dodge'),
(1,2,107,'Block'),
(1,2,196,'One-Handed Axes'),
(1,2,197,'Two-Handed Axes'),
(1,2,198,'One-Handed Maces'),
(1,2,199,'Two-Handed Maces'),
(1,2,200,'Polearms'),
(1,2,201,'One-Handed Swords'),
(1,2,202,'Two-Handed Swords'),
(1,2,203,'Unarmed'),
(1,2,204,'Defense'),
(1,2,522,'SPELLDEFENSE (DND)'),
(1,2,668,'Language Common'),
(1,2,2382,'Generic'),
(1,2,3050,'Detect'),
(1,2,3365,'Opening'),
(1,2,6233,'Closing'),
(1,2,6246,'Closing'),
(1,2,6247,'Opening'),
(1,2,6477,'Opening'),
(1,2,6478,'Opening'),
(1,2,6603,'Auto Attack'),
(1,2,7266,'Duel'),
(1,2,7267,'Grovel'),
(1,2,7355,'Stuck'),
(1,2,8386,'Attacking'),
(1,2,8737,'Mail'),
(1,2,9077,'Leather'),
(1,2,9078,'Cloth'),
(1,2,9116,'Shield'),
(1,2,9125,'Generic'),
(1,2,20208,'Paladin pushback resistance'),
(1,2,20597,'Sword Specialization'),
(1,2,20598,'The Human Spirit'),
(1,2,20599,'Diplomacy'),
(1,2,20864,'Mace Specialization'),
(1,2,21651,'Opening'),
(1,2,21652,'Closing'),
(1,2,22027,'Remove Insignia'),
(1,2,22810,'Opening - No Text'),
(1,2,27762,'Relic'),
(1,2,35395,'Crusader Strike'),
(1,2,45927,'Summon Friend'),
(1,2,49410,'Forceful Deflection'),
(1,2,59752,'Every Man for Himself'),
(1,2,60091,'Judgement Anti-Parry/Dodge Passive'),
(1,2,61437,'Opening'),
(1,2,68398,'Opening'),
(1,2,76271,'Armor Skills'),
(1,2,76294,'Weapon Skills'),
(1,2,79738,'Languages'),
(1,2,96220,'Opening'),
(1,3,75,'Auto Shot'),
(1,3,81,'Dodge'),
(1,3,196,'One-Handed Axes'),
(1,3,197,'Two-Handed Axes'),
(1,3,200,'Polearms'),
(1,3,201,'One-Handed Swords'),
(1,3,202,'Two-Handed Swords'),
(1,3,203,'Unarmed'),
(1,3,204,'Defense'),
(1,3,227,'Staves'),
(1,3,264,'Bows'),
(1,3,266,'Guns'),
(1,3,522,'SPELLDEFENSE (DND)'),
(1,3,668,'Language Common'),
(1,3,883,'Call Pet 1'),
(1,3,982,'Revive Pet'),
(1,3,1180,'Daggers'),
(1,3,2382,'Generic'),
(1,3,3044,'Arcane Shot'),
(1,3,3050,'Detect'),
(1,3,3365,'Opening'),
(1,3,5011,'Crossbows'),
(1,3,6233,'Closing'),
(1,3,6246,'Closing'),
(1,3,6247,'Opening'),
(1,3,6477,'Opening'),
(1,3,6478,'Opening'),
(1,3,6603,'Auto Attack'),
(1,3,7266,'Duel'),
(1,3,7267,'Grovel'),
(1,3,7355,'Stuck'),
(1,3,8386,'Attacking'),
(1,3,9077,'Leather'),
(1,3,9078,'Cloth'),
(1,3,9125,'Generic'),
(1,3,13358,'Defensive State (DND)'),
(1,3,15590,'Fist Weapons'),
(1,3,20597,'Sword Specialization'),
(1,3,20598,'The Human Spirit'),
(1,3,20599,'Diplomacy'),
(1,3,20864,'Mace Specialization'),
(1,3,21651,'Opening'),
(1,3,21652,'Closing'),
(1,3,22027,'Remove Insignia'),
(1,3,22810,'Opening - No Text'),
(1,3,24949,'Defensive State 2 (DND)'),
(1,3,34082,'Hunter Passive Auras (DND)'),
(1,3,45927,'Summon Friend'),
(1,3,59752,'Every Man for Himself'),
(1,3,61437,'Opening'),
(1,3,68398,'Opening'),
(1,3,76249,'Weapon Skills'),
(1,3,76250,'Armor Skills'),
(1,3,77442,'Focus'),
(1,3,79738,'Languages'),
(1,3,82928,'Aimed Shot!'),
(1,3,87324,'Focused Aim'),
(1,3,87816,'General Hunter Passives'),
(1,3,96220,'Opening'),
(1,4,81,'Dodge'),
(1,4,196,'One-Handed Axes'),
(1,4,198,'One-Handed Maces'),
(1,4,201,'One-Handed Swords'),
(1,4,203,'Unarmed'),
(1,4,204,'Defense'),
(1,4,264,'Bows'),
(1,4,266,'Guns'),
(1,4,522,'SPELLDEFENSE (DND)'),
(1,4,668,'Language Common'),
(1,4,674,'Dual Wield'),
(1,4,1180,'Daggers'),
(1,4,1752,'Sinister Strike'),
(1,4,2382,'Generic'),
(1,4,2567,'Thrown'),
(1,4,2764,'Throw'),
(1,4,3018,'Shoot'),
(1,4,3050,'Detect'),
(1,4,3365,'Opening'),
(1,4,5011,'Crossbows'),
(1,4,6233,'Closing'),
(1,4,6246,'Closing'),
(1,4,6247,'Opening'),
(1,4,6477,'Opening'),
(1,4,6478,'Opening'),
(1,4,6603,'Auto Attack'),
(1,4,7266,'Duel'),
(1,4,7267,'Grovel'),
(1,4,7355,'Stuck'),
(1,4,8386,'Attacking'),
(1,4,9077,'Leather'),
(1,4,9078,'Cloth'),
(1,4,9125,'Generic'),
(1,4,15590,'Fist Weapons'),
(1,4,16092,'Defensive State (DND)'),
(1,4,20597,'Sword Specialization'),
(1,4,20598,'The Human Spirit'),
(1,4,20599,'Diplomacy'),
(1,4,20864,'Mace Specialization'),
(1,4,21651,'Opening'),
(1,4,21652,'Closing'),
(1,4,22027,'Remove Insignia'),
(1,4,22810,'Opening - No Text'),
(1,4,45927,'Summon Friend'),
(1,4,59752,'Every Man for Himself'),
(1,4,61437,'Opening'),
(1,4,68398,'Opening'),
(1,4,76273,'Armor Skills'),
(1,4,76297,'Weapon Skills'),
(1,4,79738,'Languages'),
(1,4,96220,'Opening'),
(1,5,81,'Dodge'),
(1,5,198,'One-Handed Maces'),
(1,5,203,'Unarmed'),
(1,5,204,'Defense'),
(1,5,227,'Staves'),
(1,5,522,'SPELLDEFENSE (DND)'),
(1,5,585,'Smite'),
(1,5,668,'Language Common'),
(1,5,1180,'Daggers'),
(1,5,2382,'Generic'),
(1,5,3050,'Detect'),
(1,5,3365,'Opening'),
(1,5,5009,'Wands'),
(1,5,5019,'Shoot'),
(1,5,6233,'Closing'),
(1,5,6246,'Closing'),
(1,5,6247,'Opening'),
(1,5,6477,'Opening'),
(1,5,6478,'Opening'),
(1,5,6603,'Auto Attack'),
(1,5,7266,'Duel'),
(1,5,7267,'Grovel'),
(1,5,7355,'Stuck'),
(1,5,8386,'Attacking'),
(1,5,9078,'Cloth'),
(1,5,9125,'Generic'),
(1,5,20597,'Sword Specialization'),
(1,5,20598,'The Human Spirit'),
(1,5,20599,'Diplomacy'),
(1,5,20864,'Mace Specialization'),
(1,5,21651,'Opening'),
(1,5,21652,'Closing'),
(1,5,22027,'Remove Insignia'),
(1,5,22810,'Opening - No Text'),
(1,5,45927,'Summon Friend'),
(1,5,59752,'Every Man for Himself'),
(1,5,61437,'Opening'),
(1,5,68398,'Opening'),
(1,5,76279,'Armor Skills'),
(1,5,76301,'Weapon Skills'),
(1,5,77486,'Shadow Orb Power'),
(1,5,79738,'Languages'),
(1,5,84733,'Holy Focus'),
(1,5,84734,'Dark Thoughts'),
(1,5,88684,'Holy Word: Serenity'),
(1,5,88685,'Holy Word: Sanctuary'),
(1,5,96220,'Opening'),
(1,5,101062,'Flash Heal'),
(1,6,81,'Dodge'),
(1,6,196,'One-Handed Axes'),
(1,6,197,'Two-Handed Axes'),
(1,6,198,'One-Handed Maces'),
(1,6,199,'Two-Handed Maces'),
(1,6,200,'Polearms'),
(1,6,201,'One-Handed Swords'),
(1,6,202,'Two-Handed Swords'),
(1,6,203,'Unarmed'),
(1,6,204,'Defense'),
(1,6,522,'SPELLDEFENSE (DND)'),
(1,6,668,'Language Common'),
(1,6,674,'Dual Wield'),
(1,6,750,'Plate Mail'),
(1,6,2382,'Generic'),
(1,6,3050,'Detect'),
(1,6,3275,'Linen Bandage'),
(1,6,3276,'Heavy Linen Bandage'),
(1,6,3277,'Wool Bandage'),
(1,6,3278,'Heavy Wool Bandage'),
(1,6,3365,'Opening'),
(1,6,6233,'Closing'),
(1,6,6246,'Closing'),
(1,6,6247,'Opening'),
(1,6,6477,'Opening'),
(1,6,6478,'Opening'),
(1,6,6603,'Auto Attack'),
(1,6,7266,'Duel'),
(1,6,7267,'Grovel'),
(1,6,7355,'Stuck'),
(1,6,7928,'Silk Bandage'),
(1,6,7929,'Heavy Silk Bandage'),
(1,6,7934,'Anti-Venom'),
(1,6,8386,'Attacking'),
(1,6,8737,'Mail'),
(1,6,9077,'Leather'),
(1,6,9078,'Cloth'),
(1,6,9125,'Generic'),
(1,6,10840,'Mageweave Bandage'),
(1,6,10841,'Heavy Mageweave Bandage'),
(1,6,10846,'First Aid'),
(1,6,18629,'Runecloth Bandage'),
(1,6,18630,'Heavy Runecloth Bandage'),
(1,6,20597,'Sword Specialization'),
(1,6,20598,'The Human Spirit'),
(1,6,20599,'Diplomacy'),
(1,6,20864,'Mace Specialization'),
(1,6,21651,'Opening'),
(1,6,21652,'Closing'),
(1,6,22027,'Remove Insignia'),
(1,6,22810,'Opening - No Text'),
(1,6,33391,'Journeyman Riding'),
(1,6,45462,'Plague Strike'),
(1,6,45477,'Icy Touch'),
(1,6,45902,'Blood Strike'),
(1,6,45903,'Offensive State (DND)'),
(1,6,45927,'Summon Friend'),
(1,6,47541,'Death Coil'),
(1,6,48266,'Frost Presence'),
(1,6,49410,'Forceful Deflection'),
(1,6,49576,'Death Grip'),
(1,6,52665,'Relic'),
(1,6,59752,'Every Man for Himself'),
(1,6,59879,'Blood Plague'),
(1,6,59921,'Frost Fever'),
(1,6,61437,'Opening'),
(1,6,61455,'Runic Focus'),
(1,6,63644,'Activating Secondary Spec'),
(1,6,63645,'Activating Primary Spec'),
(1,6,68398,'Opening'),
(1,6,76282,'Armor Skills'),
(1,6,76292,'Weapon Skills'),
(1,6,79738,'Languages'),
(1,6,82246,'Parry'),
(1,6,89832,'Death Strike Enabler'),
(1,6,89964,'Clear Glyph'),
(1,6,96220,'Opening'),
(1,8,81,'Dodge'),
(1,8,133,'Fireball'),
(1,8,201,'One-Handed Swords'),
(1,8,203,'Unarmed'),
(1,8,204,'Defense'),
(1,8,227,'Staves'),
(1,8,522,'SPELLDEFENSE (DND)'),
(1,8,668,'Language Common'),
(1,8,1180,'Daggers'),
(1,8,2382,'Generic'),
(1,8,3050,'Detect'),
(1,8,3365,'Opening'),
(1,8,5009,'Wands'),
(1,8,5019,'Shoot'),
(1,8,6233,'Closing'),
(1,8,6246,'Closing'),
(1,8,6247,'Opening'),
(1,8,6477,'Opening'),
(1,8,6478,'Opening'),
(1,8,6603,'Auto Attack'),
(1,8,7266,'Duel'),
(1,8,7267,'Grovel'),
(1,8,7355,'Stuck'),
(1,8,8386,'Attacking'),
(1,8,9078,'Cloth'),
(1,8,9125,'Generic'),
(1,8,20597,'Sword Specialization'),
(1,8,20598,'The Human Spirit'),
(1,8,20599,'Diplomacy'),
(1,8,20864,'Mace Specialization'),
(1,8,21651,'Opening'),
(1,8,21652,'Closing'),
(1,8,22027,'Remove Insignia'),
(1,8,22810,'Opening - No Text'),
(1,8,45927,'Summon Friend'),
(1,8,59752,'Every Man for Himself'),
(1,8,61437,'Opening'),
(1,8,68398,'Opening'),
(1,8,71761,'Deep Freeze Immunity State'),
(1,8,76276,'Armor Skills'),
(1,8,76298,'Weapon Skills'),
(1,8,79684,'Offensive State (DND)'),
(1,8,79738,'Languages'),
(1,8,85801,'DPS Caster Crit Damage Bonus'),
(1,8,92315,'Pyroblast!'),
(1,8,96220,'Opening'),
(1,9,81,'Dodge'),
(1,9,201,'One-Handed Swords'),
(1,9,203,'Unarmed'),
(1,9,204,'Defense'),
(1,9,227,'Staves'),
(1,9,522,'SPELLDEFENSE (DND)'),
(1,9,668,'Language Common'),
(1,9,686,'Shadow Bolt'),
(1,9,688,'Summon Imp'),
(1,9,1180,'Daggers'),
(1,9,2382,'Generic'),
(1,9,3050,'Detect'),
(1,9,3365,'Opening'),
(1,9,5009,'Wands'),
(1,9,5019,'Shoot'),
(1,9,6233,'Closing'),
(1,9,6246,'Closing'),
(1,9,6247,'Opening'),
(1,9,6477,'Opening'),
(1,9,6478,'Opening'),
(1,9,6603,'Auto Attack'),
(1,9,7266,'Duel'),
(1,9,7267,'Grovel'),
(1,9,7355,'Stuck'),
(1,9,8386,'Attacking'),
(1,9,9078,'Cloth'),
(1,9,9125,'Generic'),
(1,9,20597,'Sword Specialization'),
(1,9,20598,'The Human Spirit'),
(1,9,20599,'Diplomacy'),
(1,9,20864,'Mace Specialization'),
(1,9,21651,'Opening'),
(1,9,21652,'Closing'),
(1,9,22027,'Remove Insignia'),
(1,9,22810,'Opening - No Text'),
(1,9,45927,'Summon Friend'),
(1,9,58284,'Chaos Bolt Passive'),
(1,9,59752,'Every Man for Himself'),
(1,9,61437,'Opening'),
(1,9,68398,'Opening'),
(1,9,75445,'Demonic Immolate'),
(1,9,76277,'Armor Skills'),
(1,9,76299,'Weapon Skills'),
(1,9,79738,'Languages'),
(1,9,85801,'DPS Caster Crit Damage Bonus'),
(1,9,86213,'Soul Swap Exhale'),
(1,9,87330,'Suppression'),
(1,9,89420,'Drain Life'),
(1,9,96220,'Opening'),
(2,1,81,'Dodge'),
(2,1,107,'Block'),
(2,1,196,'One-Handed Axes'),
(2,1,197,'Two-Handed Axes'),
(2,1,198,'One-Handed Maces'),
(2,1,199,'Two-Handed Maces'),
(2,1,200,'Polearms'),
(2,1,201,'One-Handed Swords'),
(2,1,202,'Two-Handed Swords'),
(2,1,203,'Unarmed'),
(2,1,204,'Defense'),
(2,1,227,'Staves'),
(2,1,264,'Bows'),
(2,1,266,'Guns'),
(2,1,522,'SPELLDEFENSE (DND)'),
(2,1,669,'Language Orcish'),
(2,1,1180,'Daggers'),
(2,1,2382,'Generic'),
(2,1,2457,'Battle Stance'),
(2,1,2567,'Thrown'),
(2,1,2764,'Throw'),
(2,1,3018,'Shoot'),
(2,1,3050,'Detect'),
(2,1,3365,'Opening'),
(2,1,5011,'Crossbows'),
(2,1,5301,'Defensive State (DND)'),
(2,1,6233,'Closing'),
(2,1,6246,'Closing'),
(2,1,6247,'Opening'),
(2,1,6477,'Opening'),
(2,1,6478,'Opening'),
(2,1,6603,'Auto Attack'),
(2,1,7266,'Duel'),
(2,1,7267,'Grovel'),
(2,1,7355,'Stuck'),
(2,1,8386,'Attacking'),
(2,1,8737,'Mail'),
(2,1,9077,'Leather'),
(2,1,9078,'Cloth'),
(2,1,9116,'Shield'),
(2,1,9125,'Generic'),
(2,1,15590,'Fist Weapons'),
(2,1,20572,'Blood Fury'),
(2,1,20573,'Hardiness'),
(2,1,20574,'Axe Specialization'),
(2,1,21563,'Command'),
(2,1,21651,'Opening'),
(2,1,21652,'Closing'),
(2,1,22027,'Remove Insignia'),
(2,1,22810,'Opening - No Text'),
(2,1,32215,'Victorious State'),
(2,1,45927,'Summon Friend'),
(2,1,49410,'Forceful Deflection'),
(2,1,61437,'Opening'),
(2,1,68398,'Opening'),
(2,1,76268,'Armor Skills'),
(2,1,76290,'Weapon Skills'),
(2,1,79743,'Languages'),
(2,1,88161,'Strike'),
(2,1,88163,'Attack'),
(2,1,96220,'Opening'),
(2,3,75,'Auto Shot'),
(2,3,81,'Dodge'),
(2,3,196,'One-Handed Axes'),
(2,3,197,'Two-Handed Axes'),
(2,3,200,'Polearms'),
(2,3,201,'One-Handed Swords'),
(2,3,202,'Two-Handed Swords'),
(2,3,203,'Unarmed'),
(2,3,204,'Defense'),
(2,3,227,'Staves'),
(2,3,264,'Bows'),
(2,3,266,'Guns'),
(2,3,522,'SPELLDEFENSE (DND)'),
(2,3,669,'Language Orcish'),
(2,3,883,'Call Pet 1'),
(2,3,982,'Revive Pet'),
(2,3,1180,'Daggers'),
(2,3,2382,'Generic'),
(2,3,3044,'Arcane Shot'),
(2,3,3050,'Detect'),
(2,3,3365,'Opening'),
(2,3,5011,'Crossbows'),
(2,3,6233,'Closing'),
(2,3,6246,'Closing'),
(2,3,6247,'Opening'),
(2,3,6477,'Opening'),
(2,3,6478,'Opening'),
(2,3,6603,'Auto Attack'),
(2,3,7266,'Duel'),
(2,3,7267,'Grovel'),
(2,3,7355,'Stuck'),
(2,3,8386,'Attacking'),
(2,3,9077,'Leather'),
(2,3,9078,'Cloth'),
(2,3,9125,'Generic'),
(2,3,13358,'Defensive State (DND)'),
(2,3,15590,'Fist Weapons'),
(2,3,20572,'Blood Fury'),
(2,3,20573,'Hardiness'),
(2,3,20574,'Axe Specialization'),
(2,3,20576,'Command'),
(2,3,21651,'Opening'),
(2,3,21652,'Closing'),
(2,3,22027,'Remove Insignia'),
(2,3,22810,'Opening - No Text'),
(2,3,24949,'Defensive State 2 (DND)'),
(2,3,34082,'Hunter Passive Auras (DND)'),
(2,3,45927,'Summon Friend'),
(2,3,61437,'Opening'),
(2,3,68398,'Opening'),
(2,3,76249,'Weapon Skills'),
(2,3,76250,'Armor Skills'),
(2,3,77442,'Focus'),
(2,3,79743,'Languages'),
(2,3,82928,'Aimed Shot!'),
(2,3,87324,'Focused Aim'),
(2,3,87816,'General Hunter Passives'),
(2,3,96220,'Opening'),
(2,4,81,'Dodge'),
(2,4,196,'One-Handed Axes'),
(2,4,198,'One-Handed Maces'),
(2,4,201,'One-Handed Swords'),
(2,4,203,'Unarmed'),
(2,4,204,'Defense'),
(2,4,264,'Bows'),
(2,4,266,'Guns'),
(2,4,522,'SPELLDEFENSE (DND)'),
(2,4,669,'Language Orcish'),
(2,4,674,'Dual Wield'),
(2,4,1180,'Daggers'),
(2,4,1752,'Sinister Strike'),
(2,4,2382,'Generic'),
(2,4,2567,'Thrown'),
(2,4,2764,'Throw'),
(2,4,3018,'Shoot'),
(2,4,3050,'Detect'),
(2,4,3365,'Opening'),
(2,4,5011,'Crossbows'),
(2,4,6233,'Closing'),
(2,4,6246,'Closing'),
(2,4,6247,'Opening'),
(2,4,6477,'Opening'),
(2,4,6478,'Opening'),
(2,4,6603,'Auto Attack'),
(2,4,7266,'Duel'),
(2,4,7267,'Grovel'),
(2,4,7355,'Stuck'),
(2,4,8386,'Attacking'),
(2,4,9077,'Leather'),
(2,4,9078,'Cloth'),
(2,4,9125,'Generic'),
(2,4,15590,'Fist Weapons'),
(2,4,16092,'Defensive State (DND)'),
(2,4,20572,'Blood Fury'),
(2,4,20573,'Hardiness'),
(2,4,20574,'Axe Specialization'),
(2,4,21563,'Command'),
(2,4,21651,'Opening'),
(2,4,21652,'Closing'),
(2,4,22027,'Remove Insignia'),
(2,4,22810,'Opening - No Text'),
(2,4,45927,'Summon Friend'),
(2,4,61437,'Opening'),
(2,4,68398,'Opening'),
(2,4,76273,'Armor Skills'),
(2,4,76297,'Weapon Skills'),
(2,4,79743,'Languages'),
(2,4,96220,'Opening'),
(2,6,81,'Dodge'),
(2,6,196,'One-Handed Axes'),
(2,6,197,'Two-Handed Axes'),
(2,6,198,'One-Handed Maces'),
(2,6,199,'Two-Handed Maces'),
(2,6,200,'Polearms'),
(2,6,201,'One-Handed Swords'),
(2,6,202,'Two-Handed Swords'),
(2,6,203,'Unarmed'),
(2,6,204,'Defense'),
(2,6,522,'SPELLDEFENSE (DND)'),
(2,6,669,'Language Orcish'),
(2,6,674,'Dual Wield'),
(2,6,750,'Plate Mail'),
(2,6,2382,'Generic'),
(2,6,3050,'Detect'),
(2,6,3275,'Linen Bandage'),
(2,6,3276,'Heavy Linen Bandage'),
(2,6,3277,'Wool Bandage'),
(2,6,3278,'Heavy Wool Bandage'),
(2,6,3365,'Opening'),
(2,6,6233,'Closing'),
(2,6,6246,'Closing'),
(2,6,6247,'Opening'),
(2,6,6477,'Opening'),
(2,6,6478,'Opening'),
(2,6,6603,'Auto Attack'),
(2,6,7266,'Duel'),
(2,6,7267,'Grovel'),
(2,6,7355,'Stuck'),
(2,6,7928,'Silk Bandage'),
(2,6,7929,'Heavy Silk Bandage'),
(2,6,7934,'Anti-Venom'),
(2,6,8386,'Attacking'),
(2,6,8737,'Mail'),
(2,6,9077,'Leather'),
(2,6,9078,'Cloth'),
(2,6,9125,'Generic'),
(2,6,10840,'Mageweave Bandage'),
(2,6,10841,'Heavy Mageweave Bandage'),
(2,6,10846,'First Aid'),
(2,6,18629,'Runecloth Bandage'),
(2,6,18630,'Heavy Runecloth Bandage'),
(2,6,20572,'Blood Fury'),
(2,6,20573,'Hardiness'),
(2,6,20574,'Axe Specialization'),
(2,6,21651,'Opening'),
(2,6,21652,'Closing'),
(2,6,22027,'Remove Insignia'),
(2,6,22810,'Opening - No Text'),
(2,6,33391,'Journeyman Riding'),
(2,6,45462,'Plague Strike'),
(2,6,45477,'Icy Touch'),
(2,6,45902,'Blood Strike'),
(2,6,45903,'Offensive State (DND)'),
(2,6,45927,'Summon Friend'),
(2,6,47541,'Death Coil'),
(2,6,48266,'Frost Presence'),
(2,6,49410,'Forceful Deflection'),
(2,6,49576,'Death Grip'),
(2,6,52665,'Relic'),
(2,6,54562,'Command'),
(2,6,59879,'Blood Plague'),
(2,6,59921,'Frost Fever'),
(2,6,61437,'Opening'),
(2,6,61455,'Runic Focus'),
(2,6,63644,'Activating Secondary Spec'),
(2,6,63645,'Activating Primary Spec'),
(2,6,68398,'Opening'),
(2,6,76282,'Armor Skills'),
(2,6,76292,'Weapon Skills'),
(2,6,79743,'Languages'),
(2,6,82246,'Parry'),
(2,6,89832,'Death Strike Enabler'),
(2,6,89964,'Clear Glyph'),
(2,6,96220,'Opening'),
(2,7,81,'Dodge'),
(2,7,107,'Block'),
(2,7,196,'One-Handed Axes'),
(2,7,197,'Two-Handed Axes'),
(2,7,198,'One-Handed Maces'),
(2,7,199,'Two-Handed Maces'),
(2,7,203,'Unarmed'),
(2,7,204,'Defense'),
(2,7,227,'Staves'),
(2,7,403,'Lightning Bolt'),
(2,7,522,'SPELLDEFENSE (DND)'),
(2,7,669,'Language Orcish'),
(2,7,1180,'Daggers'),
(2,7,2382,'Generic'),
(2,7,3050,'Detect'),
(2,7,3365,'Opening'),
(2,7,6233,'Closing'),
(2,7,6246,'Closing'),
(2,7,6247,'Opening'),
(2,7,6477,'Opening'),
(2,7,6478,'Opening'),
(2,7,6603,'Auto Attack'),
(2,7,7266,'Duel'),
(2,7,7267,'Grovel'),
(2,7,7355,'Stuck'),
(2,7,8386,'Attacking'),
(2,7,9077,'Leather'),
(2,7,9078,'Cloth'),
(2,7,9116,'Shield'),
(2,7,9125,'Generic'),
(2,7,15590,'Fist Weapons'),
(2,7,20573,'Hardiness'),
(2,7,20574,'Axe Specialization'),
(2,7,21651,'Opening'),
(2,7,21652,'Closing'),
(2,7,22027,'Remove Insignia'),
(2,7,22810,'Opening - No Text'),
(2,7,27763,'Relic'),
(2,7,33697,'Blood Fury'),
(2,7,45927,'Summon Friend'),
(2,7,61437,'Opening'),
(2,7,65222,'Command'),
(2,7,68398,'Opening'),
(2,7,76272,'Armor Skills'),
(2,7,76296,'Weapon Skills'),
(2,7,79743,'Languages'),
(2,7,89920,'Ancestral Focus'),
(2,7,96220,'Opening'),
(2,8,81,'Dodge'),
(2,8,133,'Fireball'),
(2,8,201,'One-Handed Swords'),
(2,8,203,'Unarmed'),
(2,8,204,'Defense'),
(2,8,227,'Staves'),
(2,8,522,'SPELLDEFENSE (DND)'),
(2,8,669,'Language Orcish'),
(2,8,1180,'Daggers'),
(2,8,2382,'Generic'),
(2,8,3050,'Detect'),
(2,8,3365,'Opening'),
(2,8,5009,'Wands'),
(2,8,5019,'Shoot'),
(2,8,6233,'Closing'),
(2,8,6246,'Closing'),
(2,8,6247,'Opening'),
(2,8,6477,'Opening'),
(2,8,6478,'Opening'),
(2,8,6603,'Auto Attack'),
(2,8,7266,'Duel'),
(2,8,7267,'Grovel'),
(2,8,7355,'Stuck'),
(2,8,8386,'Attacking'),
(2,8,9078,'Cloth'),
(2,8,9125,'Generic'),
(2,8,20573,'Hardiness'),
(2,8,20574,'Axe Specialization'),
(2,8,21563,'Command'),
(2,8,21651,'Opening'),
(2,8,21652,'Closing'),
(2,8,22027,'Remove Insignia'),
(2,8,22810,'Opening - No Text'),
(2,8,33702,'Blood Fury'),
(2,8,45927,'Summon Friend'),
(2,8,61437,'Opening'),
(2,8,68398,'Opening'),
(2,8,71761,'Deep Freeze Immunity State'),
(2,8,76276,'Armor Skills'),
(2,8,76298,'Weapon Skills'),
(2,8,79684,'Offensive State (DND)'),
(2,8,79743,'Languages'),
(2,8,85801,'DPS Caster Crit Damage Bonus'),
(2,8,92315,'Pyroblast!'),
(2,8,96220,'Opening'),
(2,9,81,'Dodge'),
(2,9,201,'One-Handed Swords'),
(2,9,203,'Unarmed'),
(2,9,204,'Defense'),
(2,9,227,'Staves'),
(2,9,522,'SPELLDEFENSE (DND)'),
(2,9,669,'Language Common'),
(2,9,686,'Shadow Bolt'),
(2,9,688,'Summon Imp'),
(2,9,1180,'Daggers'),
(2,9,2382,'Generic'),
(2,9,3050,'Detect'),
(2,9,3365,'Opening'),
(2,9,5009,'Wands'),
(2,9,5019,'Shoot'),
(2,9,6233,'Closing'),
(2,9,6246,'Closing'),
(2,9,6247,'Opening'),
(2,9,6477,'Opening'),
(2,9,6478,'Opening'),
(2,9,6603,'Auto Attack'),
(2,9,7266,'Duel'),
(2,9,7267,'Grovel'),
(2,9,7355,'Stuck'),
(2,9,8386,'Attacking'),
(2,9,9078,'Cloth'),
(2,9,9125,'Generic'),
(2,9,20573,'Hardiness'),
(2,9,20574,'Axe Specialization'),
(2,9,21651,'Opening'),
(2,9,21652,'Closing'),
(2,9,22027,'Remove Insignia'),
(2,9,22810,'Opening - No Text'),
(2,9,33702,'Blood Fury'),
(2,9,45927,'Summon Friend'),
(2,9,58284,'Chaos Bolt Passive'),
(2,9,61437,'Opening'),
(2,9,68398,'Opening'),
(2,9,75445,'Demonic Immolate'),
(2,9,76277,'Armor Skills'),
(2,9,76299,'Weapon Skills'),
(2,9,79743,'Languages'),
(2,9,85801,'DPS Caster Crit Damage Bonus'),
(2,9,86213,'Soul Swap Exhale'),
(2,9,87330,'Suppression'),
(2,9,89420,'Drain Life'),
(2,9,96220,'Opening'),
(3,1,81,'Dodge'),
(3,1,107,'Block'),
(3,1,196,'One-Handed Axes'),
(3,1,197,'Two-Handed Axes'),
(3,1,198,'One-Handed Maces'),
(3,1,199,'Two-Handed Maces'),
(3,1,200,'Polearms'),
(3,1,201,'One-Handed Swords'),
(3,1,202,'Two-Handed Swords'),
(3,1,203,'Unarmed'),
(3,1,204,'Defense'),
(3,1,227,'Staves'),
(3,1,264,'Bows'),
(3,1,266,'Guns'),
(3,1,522,'SPELLDEFENSE (DND)'),
(3,1,668,'Language Common'),
(3,1,672,'Language Dwarven'),
(3,1,1180,'Daggers'),
(3,1,2382,'Generic'),
(3,1,2457,'Battle Stance'),
(3,1,2567,'Thrown'),
(3,1,2764,'Throw'),
(3,1,3018,'Shoot'),
(3,1,3050,'Detect'),
(3,1,3365,'Opening'),
(3,1,5011,'Crossbows'),
(3,1,5301,'Defensive State (DND)'),
(3,1,6233,'Closing'),
(3,1,6246,'Closing'),
(3,1,6247,'Opening'),
(3,1,6477,'Opening'),
(3,1,6478,'Opening'),
(3,1,6603,'Auto Attack'),
(3,1,7266,'Duel'),
(3,1,7267,'Grovel'),
(3,1,7355,'Stuck'),
(3,1,8386,'Attacking'),
(3,1,8737,'Mail'),
(3,1,9077,'Leather'),
(3,1,9078,'Cloth'),
(3,1,9116,'Shield'),
(3,1,9125,'Generic'),
(3,1,15590,'Fist Weapons'),
(3,1,20594,'Stoneform'),
(3,1,20595,'Gun Specialization'),
(3,1,20596,'Frost Resistance'),
(3,1,21651,'Opening'),
(3,1,21652,'Closing'),
(3,1,22027,'Remove Insignia'),
(3,1,22810,'Opening - No Text'),
(3,1,32215,'Victorious State'),
(3,1,45927,'Summon Friend'),
(3,1,49410,'Forceful Deflection'),
(3,1,59224,'Mace Specialization'),
(3,1,61437,'Opening'),
(3,1,68398,'Opening'),
(3,1,76268,'Armor Skills'),
(3,1,76290,'Weapon Skills'),
(3,1,79739,'Languages'),
(3,1,88161,'Strike'),
(3,1,88163,'Attack'),
(3,1,92682,'Explorer'),
(3,1,96220,'Opening'),
(3,2,81,'Dodge'),
(3,2,107,'Block'),
(3,2,196,'One-Handed Axes'),
(3,2,197,'Two-Handed Axes'),
(3,2,198,'One-Handed Maces'),
(3,2,199,'Two-Handed Maces'),
(3,2,200,'Polearms'),
(3,2,201,'One-Handed Swords'),
(3,2,202,'Two-Handed Swords'),
(3,2,203,'Unarmed'),
(3,2,204,'Defense'),
(3,2,522,'SPELLDEFENSE (DND)'),
(3,2,668,'Language Common'),
(3,2,672,'Language Dwarven'),
(3,2,2382,'Generic'),
(3,2,3050,'Detect'),
(3,2,3365,'Opening'),
(3,2,6233,'Closing'),
(3,2,6246,'Closing'),
(3,2,6247,'Opening'),
(3,2,6477,'Opening'),
(3,2,6478,'Opening'),
(3,2,6603,'Auto Attack'),
(3,2,7266,'Duel'),
(3,2,7267,'Grovel'),
(3,2,7355,'Stuck'),
(3,2,8386,'Attacking'),
(3,2,8737,'Mail'),
(3,2,9077,'Leather'),
(3,2,9078,'Cloth'),
(3,2,9116,'Shield'),
(3,2,9125,'Generic'),
(3,2,20208,'Paladin pushback resistance'),
(3,2,20594,'Stoneform'),
(3,2,20595,'Gun Specialization'),
(3,2,20596,'Frost Resistance'),
(3,2,21651,'Opening'),
(3,2,21652,'Closing'),
(3,2,22027,'Remove Insignia'),
(3,2,22810,'Opening - No Text'),
(3,2,27762,'Relic'),
(3,2,35395,'Crusader Strike'),
(3,2,45927,'Summon Friend'),
(3,2,49410,'Forceful Deflection'),
(3,2,59224,'Mace Specialization'),
(3,2,60091,'Judgement Anti-Parry/Dodge Passive'),
(3,2,61437,'Opening'),
(3,2,68398,'Opening'),
(3,2,76271,'Armor Skills'),
(3,2,76294,'Weapon Skills'),
(3,2,79739,'Languages'),
(3,2,92682,'Explorer'),
(3,2,96220,'Opening'),
(3,3,75,'Auto Shot'),
(3,3,81,'Dodge'),
(3,3,196,'One-Handed Axes'),
(3,3,197,'Two-Handed Axes'),
(3,3,200,'Polearms'),
(3,3,201,'One-Handed Swords'),
(3,3,202,'Two-Handed Swords'),
(3,3,203,'Unarmed'),
(3,3,204,'Defense'),
(3,3,227,'Staves'),
(3,3,264,'Bows'),
(3,3,266,'Guns'),
(3,3,522,'SPELLDEFENSE (DND)'),
(3,3,668,'Language Common'),
(3,3,672,'Language Dwarven'),
(3,3,883,'Call Pet 1'),
(3,3,982,'Revive Pet'),
(3,3,1180,'Daggers'),
(3,3,2382,'Generic'),
(3,3,3044,'Arcane Shot'),
(3,3,3050,'Detect'),
(3,3,3365,'Opening'),
(3,3,5011,'Crossbows'),
(3,3,6233,'Closing'),
(3,3,6246,'Closing'),
(3,3,6247,'Opening'),
(3,3,6477,'Opening'),
(3,3,6478,'Opening'),
(3,3,6603,'Auto Attack'),
(3,3,7266,'Duel'),
(3,3,7267,'Grovel'),
(3,3,7355,'Stuck'),
(3,3,8386,'Attacking'),
(3,3,9077,'Leather'),
(3,3,9078,'Cloth'),
(3,3,9125,'Generic'),
(3,3,13358,'Defensive State (DND)'),
(3,3,15590,'Fist Weapons'),
(3,3,20594,'Stoneform'),
(3,3,20595,'Gun Specialization'),
(3,3,20596,'Frost Resistance'),
(3,3,21651,'Opening'),
(3,3,21652,'Closing'),
(3,3,22027,'Remove Insignia'),
(3,3,22810,'Opening - No Text'),
(3,3,24949,'Defensive State 2 (DND)'),
(3,3,34082,'Hunter Passive Auras (DND)'),
(3,3,45927,'Summon Friend'),
(3,3,59224,'Mace Specialization'),
(3,3,61437,'Opening'),
(3,3,68398,'Opening'),
(3,3,76249,'Weapon Skills'),
(3,3,76250,'Armor Skills'),
(3,3,77442,'Focus'),
(3,3,79739,'Languages'),
(3,3,82928,'Aimed Shot!'),
(3,3,87324,'Focused Aim'),
(3,3,87816,'General Hunter Passives'),
(3,3,92682,'Explorer'),
(3,3,96220,'Opening'),
(3,4,81,'Dodge'),
(3,4,196,'One-Handed Axes'),
(3,4,198,'One-Handed Maces'),
(3,4,201,'One-Handed Swords'),
(3,4,203,'Unarmed'),
(3,4,204,'Defense'),
(3,4,264,'Bows'),
(3,4,266,'Guns'),
(3,4,522,'SPELLDEFENSE (DND)'),
(3,4,668,'Language Common'),
(3,4,672,'Language Dwarven'),
(3,4,674,'Dual Wield'),
(3,4,1180,'Daggers'),
(3,4,1752,'Sinister Strike'),
(3,4,2382,'Generic'),
(3,4,2567,'Thrown'),
(3,4,2764,'Throw'),
(3,4,3018,'Shoot'),
(3,4,3050,'Detect'),
(3,4,3365,'Opening'),
(3,4,5011,'Crossbows'),
(3,4,6233,'Closing'),
(3,4,6246,'Closing'),
(3,4,6247,'Opening'),
(3,4,6477,'Opening'),
(3,4,6478,'Opening'),
(3,4,6603,'Auto Attack'),
(3,4,7266,'Duel'),
(3,4,7267,'Grovel'),
(3,4,7355,'Stuck'),
(3,4,8386,'Attacking'),
(3,4,9077,'Leather'),
(3,4,9078,'Cloth'),
(3,4,9125,'Generic'),
(3,4,15590,'Fist Weapons'),
(3,4,16092,'Defensive State (DND)'),
(3,4,20594,'Stoneform'),
(3,4,20595,'Gun Specialization'),
(3,4,20596,'Frost Resistance'),
(3,4,21651,'Opening'),
(3,4,21652,'Closing'),
(3,4,22027,'Remove Insignia'),
(3,4,22810,'Opening - No Text'),
(3,4,45927,'Summon Friend'),
(3,4,59224,'Mace Specialization'),
(3,4,61437,'Opening'),
(3,4,68398,'Opening'),
(3,4,76273,'Armor Skills'),
(3,4,76297,'Weapon Skills'),
(3,4,79739,'Languages'),
(3,4,92682,'Explorer'),
(3,4,96220,'Opening'),
(3,5,81,'Dodge'),
(3,5,198,'One-Handed Maces'),
(3,5,203,'Unarmed'),
(3,5,204,'Defense'),
(3,5,227,'Staves'),
(3,5,522,'SPELLDEFENSE (DND)'),
(3,5,585,'Smite'),
(3,5,668,'Language Common'),
(3,5,672,'Language Dwarven'),
(3,5,1180,'Daggers'),
(3,5,2382,'Generic'),
(3,5,3050,'Detect'),
(3,5,3365,'Opening'),
(3,5,5009,'Wands'),
(3,5,5019,'Shoot'),
(3,5,6233,'Closing'),
(3,5,6246,'Closing'),
(3,5,6247,'Opening'),
(3,5,6477,'Opening'),
(3,5,6478,'Opening'),
(3,5,6603,'Auto Attack'),
(3,5,7266,'Duel'),
(3,5,7267,'Grovel'),
(3,5,7355,'Stuck'),
(3,5,8386,'Attacking'),
(3,5,9078,'Cloth'),
(3,5,9125,'Generic'),
(3,5,20594,'Stoneform'),
(3,5,20595,'Gun Specialization'),
(3,5,20596,'Frost Resistance'),
(3,5,21651,'Opening'),
(3,5,21652,'Closing'),
(3,5,22027,'Remove Insignia'),
(3,5,22810,'Opening - No Text'),
(3,5,45927,'Summon Friend'),
(3,5,59224,'Mace Specialization'),
(3,5,61437,'Opening'),
(3,5,68398,'Opening'),
(3,5,76279,'Armor Skills'),
(3,5,76301,'Weapon Skills'),
(3,5,77486,'Shadow Orb Power'),
(3,5,79739,'Languages'),
(3,5,84733,'Holy Focus'),
(3,5,84734,'Dark Thoughts'),
(3,5,88684,'Holy Word: Serenity'),
(3,5,88685,'Holy Word: Sanctuary'),
(3,5,92682,'Explorer'),
(3,5,96220,'Opening'),
(3,5,101062,'Flash Heal'),
(3,6,81,'Dodge'),
(3,6,196,'One-Handed Axes'),
(3,6,197,'Two-Handed Axes'),
(3,6,198,'One-Handed Maces'),
(3,6,199,'Two-Handed Maces'),
(3,6,200,'Polearms'),
(3,6,201,'One-Handed Swords'),
(3,6,202,'Two-Handed Swords'),
(3,6,203,'Unarmed'),
(3,6,204,'Defense'),
(3,6,522,'SPELLDEFENSE (DND)'),
(3,6,668,'Language Common'),
(3,6,672,'Language Dwarven'),
(3,6,674,'Dual Wield'),
(3,6,750,'Plate Mail'),
(3,6,2382,'Generic'),
(3,6,3050,'Detect'),
(3,6,3275,'Linen Bandage'),
(3,6,3276,'Heavy Linen Bandage'),
(3,6,3277,'Wool Bandage'),
(3,6,3278,'Heavy Wool Bandage'),
(3,6,3365,'Opening'),
(3,6,6233,'Closing'),
(3,6,6246,'Closing'),
(3,6,6247,'Opening'),
(3,6,6477,'Opening'),
(3,6,6478,'Opening'),
(3,6,6603,'Auto Attack'),
(3,6,7266,'Duel'),
(3,6,7267,'Grovel'),
(3,6,7355,'Stuck'),
(3,6,7928,'Silk Bandage'),
(3,6,7929,'Heavy Silk Bandage'),
(3,6,7934,'Anti-Venom'),
(3,6,8386,'Attacking'),
(3,6,8737,'Mail'),
(3,6,9077,'Leather'),
(3,6,9078,'Cloth'),
(3,6,9125,'Generic'),
(3,6,10840,'Mageweave Bandage'),
(3,6,10841,'Heavy Mageweave Bandage'),
(3,6,10846,'First Aid'),
(3,6,18629,'Runecloth Bandage'),
(3,6,18630,'Heavy Runecloth Bandage'),
(3,6,20594,'Stoneform'),
(3,6,20595,'Gun Specialization'),
(3,6,20596,'Frost Resistance'),
(3,6,21651,'Opening'),
(3,6,21652,'Closing'),
(3,6,22027,'Remove Insignia'),
(3,6,22810,'Opening - No Text'),
(3,6,33391,'Journeyman Riding'),
(3,6,45462,'Plague Strike'),
(3,6,45477,'Icy Touch'),
(3,6,45902,'Blood Strike'),
(3,6,45903,'Offensive State (DND)'),
(3,6,45927,'Summon Friend'),
(3,6,47541,'Death Coil'),
(3,6,48266,'Frost Presence'),
(3,6,49410,'Forceful Deflection'),
(3,6,49576,'Death Grip'),
(3,6,52665,'Relic'),
(3,6,59224,'Mace Specialization'),
(3,6,59879,'Blood Plague'),
(3,6,59921,'Frost Fever'),
(3,6,61437,'Opening'),
(3,6,61455,'Runic Focus'),
(3,6,63644,'Activating Secondary Spec'),
(3,6,63645,'Activating Primary Spec'),
(3,6,68398,'Opening'),
(3,6,76282,'Armor Skills'),
(3,6,76292,'Weapon Skills'),
(3,6,79739,'Languages'),
(3,6,82246,'Parry'),
(3,6,89832,'Death Strike Enabler'),
(3,6,89964,'Clear Glyph'),
(3,6,92682,'Explorer'),
(3,6,96220,'Opening'),
(3,7,81,'Dodge'),
(3,7,107,'Block'),
(3,7,196,'One-Handed Axes'),
(3,7,197,'Two-Handed Axes'),
(3,7,198,'One-Handed Maces'),
(3,7,199,'Two-Handed Maces'),
(3,7,203,'Unarmed'),
(3,7,204,'Defense'),
(3,7,227,'Staves'),
(3,7,403,'Lightning Bolt'),
(3,7,522,'SPELLDEFENSE (DND)'),
(3,7,668,'Language Common'),
(3,7,672,'Language Dwarven'),
(3,7,1180,'Daggers'),
(3,7,2382,'Generic'),
(3,7,3050,'Detect'),
(3,7,3365,'Opening'),
(3,7,6233,'Closing'),
(3,7,6246,'Closing'),
(3,7,6247,'Opening'),
(3,7,6477,'Opening'),
(3,7,6478,'Opening'),
(3,7,6603,'Auto Attack'),
(3,7,7266,'Duel'),
(3,7,7267,'Grovel'),
(3,7,7355,'Stuck'),
(3,7,8386,'Attacking'),
(3,7,9077,'Leather'),
(3,7,9078,'Cloth'),
(3,7,9116,'Shield'),
(3,7,9125,'Generic'),
(3,7,15590,'Fist Weapons'),
(3,7,20594,'Stoneform'),
(3,7,20595,'Gun Specialization'),
(3,7,20596,'Frost Resistance'),
(3,7,21651,'Opening'),
(3,7,21652,'Closing'),
(3,7,22027,'Remove Insignia'),
(3,7,22810,'Opening - No Text'),
(3,7,27763,'Relic'),
(3,7,45927,'Summon Friend'),
(3,7,59224,'Mace Specialization'),
(3,7,61437,'Opening'),
(3,7,68398,'Opening'),
(3,7,76272,'Armor Skills'),
(3,7,76296,'Weapon Skills'),
(3,7,79739,'Languages'),
(3,7,89920,'Ancestral Focus'),
(3,7,92682,'Explorer'),
(3,7,96220,'Opening'),
(3,8,81,'Dodge'),
(3,8,133,'Fireball'),
(3,8,201,'One-Handed Swords'),
(3,8,203,'Unarmed'),
(3,8,204,'Defense'),
(3,8,227,'Staves'),
(3,8,522,'SPELLDEFENSE (DND)'),
(3,8,668,'Language Common'),
(3,8,672,'Language Dwarven'),
(3,8,1180,'Daggers'),
(3,8,2382,'Generic'),
(3,8,3050,'Detect'),
(3,8,3365,'Opening'),
(3,8,5009,'Wands'),
(3,8,5019,'Shoot'),
(3,8,6233,'Closing'),
(3,8,6246,'Closing'),
(3,8,6247,'Opening'),
(3,8,6477,'Opening'),
(3,8,6478,'Opening'),
(3,8,6603,'Auto Attack'),
(3,8,7266,'Duel'),
(3,8,7267,'Grovel'),
(3,8,7355,'Stuck'),
(3,8,8386,'Attacking'),
(3,8,9078,'Cloth'),
(3,8,9125,'Generic'),
(3,8,20594,'Stoneform'),
(3,8,20595,'Gun Specialization'),
(3,8,20596,'Frost Resistance'),
(3,8,21651,'Opening'),
(3,8,21652,'Closing'),
(3,8,22027,'Remove Insignia'),
(3,8,22810,'Opening - No Text'),
(3,8,45927,'Summon Friend'),
(3,8,59224,'Mace Specialization'),
(3,8,61437,'Opening'),
(3,8,68398,'Opening'),
(3,8,71761,'Deep Freeze Immunity State'),
(3,8,76276,'Armor Skills'),
(3,8,76298,'Weapon Skills'),
(3,8,79684,'Offensive State (DND)'),
(3,8,79739,'Languages'),
(3,8,85801,'DPS Caster Crit Damage Bonus'),
(3,8,92315,'Pyroblast!'),
(3,8,92682,'Explorer'),
(3,8,96220,'Opening'),
(3,9,81,'Dodge'),
(3,9,201,'One-Handed Swords'),
(3,9,203,'Unarmed'),
(3,9,204,'Defense'),
(3,9,227,'Staves'),
(3,9,522,'SPELLDEFENSE (DND)'),
(3,9,668,'Language Common'),
(3,9,672,'Language Dwarven'),
(3,9,686,'Shadow Bolt'),
(3,9,688,'Summon Imp'),
(3,9,1180,'Daggers'),
(3,9,2382,'Generic'),
(3,9,3050,'Detect'),
(3,9,3365,'Opening'),
(3,9,5009,'Wands'),
(3,9,5019,'Shoot'),
(3,9,6233,'Closing'),
(3,9,6246,'Closing'),
(3,9,6247,'Opening'),
(3,9,6477,'Opening'),
(3,9,6478,'Opening'),
(3,9,6603,'Auto Attack'),
(3,9,7266,'Duel'),
(3,9,7267,'Grovel'),
(3,9,7355,'Stuck'),
(3,9,8386,'Attacking'),
(3,9,9078,'Cloth'),
(3,9,9125,'Generic'),
(3,9,20594,'Stoneform'),
(3,9,20595,'Gun Specialization'),
(3,9,20596,'Frost Resistance'),
(3,9,21651,'Opening'),
(3,9,21652,'Closing'),
(3,9,22027,'Remove Insignia'),
(3,9,22810,'Opening - No Text'),
(3,9,45927,'Summon Friend'),
(3,9,58284,'Chaos Bolt Passive'),
(3,9,59224,'Mace Specialization'),
(3,9,61437,'Opening'),
(3,9,68398,'Opening'),
(3,9,75445,'Demonic Immolate'),
(3,9,76277,'Armor Skills'),
(3,9,76299,'Weapon Skills'),
(3,9,79739,'Languages'),
(3,9,85801,'DPS Caster Crit Damage Bonus'),
(3,9,86213,'Soul Swap Exhale'),
(3,9,87330,'Suppression'),
(3,9,89420,'Drain Life'),
(3,9,92682,'Explorer'),
(3,9,96220,'Opening'),
(4,1,81,'Dodge'),
(4,1,107,'Block'),
(4,1,196,'One-Handed Axes'),
(4,1,197,'Two-Handed Axes'),
(4,1,198,'One-Handed Maces'),
(4,1,199,'Two-Handed Maces'),
(4,1,200,'Polearms'),
(4,1,201,'One-Handed Swords'),
(4,1,202,'Two-Handed Swords'),
(4,1,203,'Unarmed'),
(4,1,204,'Defense'),
(4,1,227,'Staves'),
(4,1,264,'Bows'),
(4,1,266,'Guns'),
(4,1,522,'SPELLDEFENSE (DND)'),
(4,1,668,'Language Common'),
(4,1,671,'Language Darnassian'),
(4,1,1180,'Daggers'),
(4,1,2382,'Generic'),
(4,1,2457,'Battle Stance'),
(4,1,2567,'Thrown'),
(4,1,2764,'Throw'),
(4,1,3018,'Shoot'),
(4,1,3050,'Detect'),
(4,1,3365,'Opening'),
(4,1,5011,'Crossbows'),
(4,1,5301,'Defensive State (DND)'),
(4,1,6233,'Closing'),
(4,1,6246,'Closing'),
(4,1,6247,'Opening'),
(4,1,6477,'Opening'),
(4,1,6478,'Opening'),
(4,1,6603,'Auto Attack'),
(4,1,7266,'Duel'),
(4,1,7267,'Grovel'),
(4,1,7355,'Stuck'),
(4,1,8386,'Attacking'),
(4,1,8737,'Mail'),
(4,1,9077,'Leather'),
(4,1,9078,'Cloth'),
(4,1,9116,'Shield'),
(4,1,9125,'Generic'),
(4,1,15590,'Fist Weapons'),
(4,1,20582,'Quickness'),
(4,1,20583,'Nature Resistance'),
(4,1,20585,'Wisp Spirit'),
(4,1,21009,'Elusiveness'),
(4,1,21651,'Opening'),
(4,1,21652,'Closing'),
(4,1,22027,'Remove Insignia'),
(4,1,22810,'Opening - No Text'),
(4,1,32215,'Victorious State'),
(4,1,45927,'Summon Friend'),
(4,1,49410,'Forceful Deflection'),
(4,1,58984,'Shadowmeld'),
(4,1,61437,'Opening'),
(4,1,68398,'Opening'),
(4,1,76252,'Languages'),
(4,1,76268,'Armor Skills'),
(4,1,76290,'Weapon Skills'),
(4,1,88161,'Strike'),
(4,1,88163,'Attack'),
(4,1,96220,'Opening'),
(4,3,75,'Auto Shot'),
(4,3,81,'Dodge'),
(4,3,196,'One-Handed Axes'),
(4,3,197,'Two-Handed Axes'),
(4,3,200,'Polearms'),
(4,3,201,'One-Handed Swords'),
(4,3,202,'Two-Handed Swords'),
(4,3,203,'Unarmed'),
(4,3,204,'Defense'),
(4,3,227,'Staves'),
(4,3,264,'Bows'),
(4,3,266,'Guns'),
(4,3,522,'SPELLDEFENSE (DND)'),
(4,3,668,'Language Common'),
(4,3,671,'Language Darnassian'),
(4,3,883,'Call Pet 1'),
(4,3,982,'Revive Pet'),
(4,3,1180,'Daggers'),
(4,3,2382,'Generic'),
(4,3,3044,'Arcane Shot'),
(4,3,3050,'Detect'),
(4,3,3365,'Opening'),
(4,3,5011,'Crossbows'),
(4,3,6233,'Closing'),
(4,3,6246,'Closing'),
(4,3,6247,'Opening'),
(4,3,6477,'Opening'),
(4,3,6478,'Opening'),
(4,3,6603,'Auto Attack'),
(4,3,7266,'Duel'),
(4,3,7267,'Grovel'),
(4,3,7355,'Stuck'),
(4,3,8386,'Attacking'),
(4,3,9077,'Leather'),
(4,3,9078,'Cloth'),
(4,3,9125,'Generic'),
(4,3,13358,'Defensive State (DND)'),
(4,3,15590,'Fist Weapons'),
(4,3,20582,'Quickness'),
(4,3,20583,'Nature Resistance'),
(4,3,20585,'Wisp Spirit'),
(4,3,21009,'Elusiveness'),
(4,3,21651,'Opening'),
(4,3,21652,'Closing'),
(4,3,22027,'Remove Insignia'),
(4,3,22810,'Opening - No Text'),
(4,3,24949,'Defensive State 2 (DND)'),
(4,3,34082,'Hunter Passive Auras (DND)'),
(4,3,45927,'Summon Friend'),
(4,3,58984,'Shadowmeld'),
(4,3,61437,'Opening'),
(4,3,68398,'Opening'),
(4,3,76249,'Weapon Skills'),
(4,3,76250,'Armor Skills'),
(4,3,76252,'Languages'),
(4,3,77442,'Focus'),
(4,3,82928,'Aimed Shot!'),
(4,3,87324,'Focused Aim'),
(4,3,87816,'General Hunter Passives'),
(4,3,96220,'Opening'),
(4,4,81,'Dodge'),
(4,4,196,'One-Handed Axes'),
(4,4,198,'One-Handed Maces'),
(4,4,201,'One-Handed Swords'),
(4,4,203,'Unarmed'),
(4,4,204,'Defense'),
(4,4,264,'Bows'),
(4,4,266,'Guns'),
(4,4,522,'SPELLDEFENSE (DND)'),
(4,4,668,'Language Common'),
(4,4,671,'Language Darnassian'),
(4,4,674,'Dual Wield'),
(4,4,1180,'Daggers'),
(4,4,1752,'Sinister Strike'),
(4,4,2382,'Generic'),
(4,4,2567,'Thrown'),
(4,4,2764,'Throw'),
(4,4,3018,'Shoot'),
(4,4,3050,'Detect'),
(4,4,3365,'Opening'),
(4,4,5011,'Crossbows'),
(4,4,6233,'Closing'),
(4,4,6246,'Closing'),
(4,4,6247,'Opening'),
(4,4,6477,'Opening'),
(4,4,6478,'Opening'),
(4,4,6603,'Auto Attack'),
(4,4,7266,'Duel'),
(4,4,7267,'Grovel'),
(4,4,7355,'Stuck'),
(4,4,8386,'Attacking'),
(4,4,9077,'Leather'),
(4,4,9078,'Cloth'),
(4,4,9125,'Generic'),
(4,4,15590,'Fist Weapons'),
(4,4,16092,'Defensive State (DND)'),
(4,4,20582,'Quickness'),
(4,4,20583,'Nature Resistance'),
(4,4,20585,'Elusiveness'),
(4,4,21009,'Wisp Spirit'),
(4,4,21651,'Opening'),
(4,4,21652,'Closing'),
(4,4,22027,'Remove Insignia'),
(4,4,22810,'Opening - No Text'),
(4,4,45927,'Summon Friend'),
(4,4,58984,'Shadowmeld'),
(4,4,61437,'Opening'),
(4,4,68398,'Opening'),
(4,4,76252,'Languages'),
(4,4,76273,'Armor Skills'),
(4,4,76297,'Weapon Skills'),
(4,4,96220,'Opening'),
(4,5,81,'Dodge'),
(4,5,198,'One-Handed Maces'),
(4,5,203,'Unarmed'),
(4,5,204,'Defense'),
(4,5,227,'Staves'),
(4,5,522,'SPELLDEFENSE (DND)'),
(4,5,585,'Smite'),
(4,5,668,'Language Common'),
(4,5,671,'Language Darnassian'),
(4,5,1180,'Daggers'),
(4,5,2382,'Generic'),
(4,5,3050,'Detect'),
(4,5,3365,'Opening'),
(4,5,5009,'Wands'),
(4,5,5019,'Shoot'),
(4,5,6233,'Closing'),
(4,5,6246,'Closing'),
(4,5,6247,'Opening'),
(4,5,6477,'Opening'),
(4,5,6478,'Opening'),
(4,5,6603,'Auto Attack'),
(4,5,7266,'Duel'),
(4,5,7267,'Grovel'),
(4,5,7355,'Stuck'),
(4,5,8386,'Attacking'),
(4,5,9078,'Cloth'),
(4,5,9125,'Generic'),
(4,5,20582,'Quickness'),
(4,5,20583,'Nature Resistance'),
(4,5,20585,'Wisp Spirit'),
(4,5,21009,'Elusiveness'),
(4,5,21651,'Opening'),
(4,5,21652,'Closing'),
(4,5,22027,'Remove Insignia'),
(4,5,22810,'Opening - No Text'),
(4,5,45927,'Summon Friend'),
(4,5,58984,'Shadowmeld'),
(4,5,61437,'Opening'),
(4,5,68398,'Opening'),
(4,5,76252,'Languages'),
(4,5,76279,'Armor Skills'),
(4,5,76301,'Weapon Skills'),
(4,5,77486,'Shadow Orb Power'),
(4,5,84733,'Holy Focus'),
(4,5,84734,'Dark Thoughts'),
(4,5,88684,'Holy Word: Serenity'),
(4,5,88685,'Holy Word: Sanctuary'),
(4,5,96220,'Opening'),
(4,5,101062,'Flash Heal'),
(4,6,81,'Dodge'),
(4,6,196,'One-Handed Axes'),
(4,6,197,'Two-Handed Axes'),
(4,6,198,'One-Handed Maces'),
(4,6,199,'Two-Handed Maces'),
(4,6,200,'Polearms'),
(4,6,201,'One-Handed Swords'),
(4,6,202,'Two-Handed Swords'),
(4,6,203,'Unarmed'),
(4,6,204,'Defense'),
(4,6,522,'SPELLDEFENSE (DND)'),
(4,6,668,'Language Common'),
(4,6,671,'Language Darnassian'),
(4,6,674,'Dual Wield'),
(4,6,750,'Plate Mail'),
(4,6,2382,'Generic'),
(4,6,3050,'Detect'),
(4,6,3275,'Linen Bandage'),
(4,6,3276,'Heavy Linen Bandage'),
(4,6,3277,'Wool Bandage'),
(4,6,3278,'Heavy Wool Bandage'),
(4,6,3365,'Opening'),
(4,6,6233,'Closing'),
(4,6,6246,'Closing'),
(4,6,6247,'Opening'),
(4,6,6477,'Opening'),
(4,6,6478,'Opening'),
(4,6,6603,'Auto Attack'),
(4,6,7266,'Duel'),
(4,6,7267,'Grovel'),
(4,6,7355,'Stuck'),
(4,6,7928,'Silk Bandage'),
(4,6,7929,'Heavy Silk Bandage'),
(4,6,7934,'Anti-Venom'),
(4,6,8386,'Attacking'),
(4,6,8737,'Mail'),
(4,6,9077,'Leather'),
(4,6,9078,'Cloth'),
(4,6,9125,'Generic'),
(4,6,10840,'Mageweave Bandage'),
(4,6,10841,'Heavy Mageweave Bandage'),
(4,6,10846,'First Aid'),
(4,6,18629,'Runecloth Bandage'),
(4,6,18630,'Heavy Runecloth Bandage'),
(4,6,20582,'Quickness'),
(4,6,20583,'Nature Resistance'),
(4,6,20585,'Wisp Spirit'),
(4,6,21009,'Elusiveness'),
(4,6,21651,'Opening'),
(4,6,21652,'Closing'),
(4,6,22027,'Remove Insignia'),
(4,6,22810,'Opening - No Text'),
(4,6,33391,'Journeyman Riding'),
(4,6,45462,'Plague Strike'),
(4,6,45477,'Icy Touch'),
(4,6,45902,'Blood Strike'),
(4,6,45903,'Offensive State (DND)'),
(4,6,45927,'Summon Friend'),
(4,6,47541,'Death Coil'),
(4,6,48266,'Frost Presence'),
(4,6,49410,'Forceful Deflection'),
(4,6,49576,'Death Grip'),
(4,6,52665,'Relic'),
(4,6,58984,'Shadowmeld'),
(4,6,59879,'Blood Plague'),
(4,6,59921,'Frost Fever'),
(4,6,61437,'Opening'),
(4,6,61455,'Runic Focus'),
(4,6,63644,'Activating Secondary Spec'),
(4,6,63645,'Activating Primary Spec'),
(4,6,68398,'Opening'),
(4,6,76252,'Languages'),
(4,6,76282,'Armor Skills'),
(4,6,76292,'Weapon Skills'),
(4,6,82246,'Parry'),
(4,6,89832,'Death Strike Enabler'),
(4,6,89964,'Clear Glyph'),
(4,6,96220,'Opening'),
(4,8,81,'Dodge'),
(4,8,133,'Fireball'),
(4,8,201,'One-Handed Swords'),
(4,8,203,'Unarmed'),
(4,8,204,'Defense'),
(4,8,227,'Staves'),
(4,8,522,'SPELLDEFENSE (DND)'),
(4,8,668,'Language Common'),
(4,8,671,'Language Darnassian'),
(4,8,1180,'Daggers'),
(4,8,2382,'Generic'),
(4,8,3050,'Detect'),
(4,8,3365,'Opening'),
(4,8,5009,'Wands'),
(4,8,5019,'Shoot'),
(4,8,6233,'Closing'),
(4,8,6246,'Closing'),
(4,8,6247,'Opening'),
(4,8,6477,'Opening'),
(4,8,6478,'Opening'),
(4,8,6603,'Auto Attack'),
(4,8,7266,'Duel'),
(4,8,7267,'Grovel'),
(4,8,7355,'Stuck'),
(4,8,8386,'Attacking'),
(4,8,9078,'Cloth'),
(4,8,9125,'Generic'),
(4,8,20582,'Quickness'),
(4,8,20583,'Nature Resistance'),
(4,8,20585,'Wisp Spirit'),
(4,8,21009,'Mace Specialization'),
(4,8,21651,'Opening'),
(4,8,21652,'Closing'),
(4,8,22027,'Remove Insignia'),
(4,8,22810,'Opening - No Text'),
(4,8,45927,'Summon Friend'),
(4,8,58984,'Shadowmeld'),
(4,8,61437,'Opening'),
(4,8,68398,'Opening'),
(4,8,71761,'Deep Freeze Immunity State'),
(4,8,76252,'Languages'),
(4,8,76276,'Armor Skills'),
(4,8,76298,'Weapon Skills'),
(4,8,79684,'Offensive State (DND)'),
(4,8,85801,'DPS Caster Crit Damage Bonus'),
(4,8,92315,'Pyroblast!'),
(4,8,96220,'Opening'),
(4,11,81,'Dodge'),
(4,11,198,'One-Handed Maces'),
(4,11,199,'Two-Handed Maces'),
(4,11,200,'Polearms'),
(4,11,203,'Unarmed'),
(4,11,204,'Defense'),
(4,11,227,'Staves'),
(4,11,522,'SPELLDEFENSE (DND)'),
(4,11,668,'Language Common'),
(4,11,671,'Language Darnassian'),
(4,11,1180,'Daggers'),
(4,11,2382,'Generic'),
(4,11,3050,'Detect'),
(4,11,3365,'Opening'),
(4,11,5176,'Wrath'),
(4,11,6233,'Closing'),
(4,11,6246,'Closing'),
(4,11,6247,'Opening'),
(4,11,6477,'Opening'),
(4,11,6478,'Opening'),
(4,11,6603,'Auto Attack'),
(4,11,7266,'Duel'),
(4,11,7267,'Grovel'),
(4,11,7355,'Stuck'),
(4,11,8386,'Attacking'),
(4,11,9077,'Leather'),
(4,11,9078,'Cloth'),
(4,11,9125,'Generic'),
(4,11,15590,'Fist Weapons'),
(4,11,20582,'Quickness'),
(4,11,20583,'Nature Resistance'),
(4,11,20585,'Wisp Spirit'),
(4,11,21009,'Mace Specialization'),
(4,11,21651,'Opening'),
(4,11,21652,'Closing'),
(4,11,22027,'Remove Insignia'),
(4,11,22810,'Opening - No Text'),
(4,11,45927,'Summon Friend'),
(4,11,58984,'Shadowmeld'),
(4,11,61437,'Opening'),
(4,11,68398,'Opening'),
(4,11,76252,'Languages'),
(4,11,76275,'Armor Skills'),
(4,11,76300,'Weapon Skills'),
(4,11,79577,'Eclipse Mastery Driver Passive'),
(4,11,81170,'Ravage!'),
(4,11,84736,'Nature\'s Focus'),
(4,11,84738,'Celestial Focus'),
(4,11,96220,'Opening'),
(5,1,81,'Dodge'),
(5,1,107,'Block'),
(5,1,196,'One-Handed Axes'),
(5,1,197,'Two-Handed Axes'),
(5,1,198,'One-Handed Maces'),
(5,1,199,'Two-Handed Maces'),
(5,1,200,'Polearms'),
(5,1,201,'One-Handed Swords'),
(5,1,202,'Two-Handed Swords'),
(5,1,203,'Unarmed'),
(5,1,204,'Defense'),
(5,1,227,'Staves'),
(5,1,264,'Bows'),
(5,1,266,'Guns'),
(5,1,522,'SPELLDEFENSE (DND)'),
(5,1,669,'Language Orcish'),
(5,1,1180,'Daggers'),
(5,1,2382,'Generic'),
(5,1,2457,'Battle Stance'),
(5,1,2567,'Thrown'),
(5,1,2764,'Throw'),
(5,1,3018,'Shoot'),
(5,1,3050,'Detect'),
(5,1,3365,'Opening'),
(5,1,5011,'Crossbows'),
(5,1,5227,'Underwater Breathing'),
(5,1,5301,'Defensive State (DND)'),
(5,1,6233,'Closing'),
(5,1,6246,'Closing'),
(5,1,6247,'Opening'),
(5,1,6477,'Opening'),
(5,1,6478,'Opening'),
(5,1,6603,'Auto Attack'),
(5,1,7266,'Duel'),
(5,1,7267,'Grovel'),
(5,1,7355,'Stuck'),
(5,1,7744,'Will of the Forsaken'),
(5,1,8386,'Attacking'),
(5,1,8737,'Mail'),
(5,1,9077,'Leather'),
(5,1,9078,'Cloth'),
(5,1,9116,'Shield'),
(5,1,9125,'Generic'),
(5,1,15590,'Fist Weapons'),
(5,1,17737,'Language Gutterspeak'),
(5,1,20577,'Cannibalize'),
(5,1,20579,'Shadow Resistance'),
(5,1,21651,'Opening'),
(5,1,21652,'Closing'),
(5,1,22027,'Remove Insignia'),
(5,1,22810,'Opening - No Text'),
(5,1,32215,'Victorious State'),
(5,1,45927,'Summon Friend'),
(5,1,49410,'Forceful Deflection'),
(5,1,61437,'Opening'),
(5,1,68398,'Opening'),
(5,1,76268,'Armor Skills'),
(5,1,76290,'Weapon Skills'),
(5,1,79747,'Languages'),
(5,1,88161,'Strike'),
(5,1,88163,'Attack'),
(5,1,96220,'Opening'),
(5,3,75,'Auto Shot'),
(5,3,81,'Dodge'),
(5,3,196,'One-Handed Axes'),
(5,3,197,'Two-Handed Axes'),
(5,3,200,'Polearms'),
(5,3,201,'One-Handed Swords'),
(5,3,202,'Two-Handed Swords'),
(5,3,203,'Unarmed'),
(5,3,204,'Defense'),
(5,3,227,'Staves'),
(5,3,264,'Bows'),
(5,3,266,'Guns'),
(5,3,522,'SPELLDEFENSE (DND)'),
(5,3,669,'Language Orcish'),
(5,3,883,'Call Pet 1'),
(5,3,982,'Revive Pet'),
(5,3,1180,'Daggers'),
(5,3,2382,'Generic'),
(5,3,3044,'Arcane Shot'),
(5,3,3050,'Detect'),
(5,3,3365,'Opening'),
(5,3,5011,'Crossbows'),
(5,3,5227,'Underwater Breathing'),
(5,3,6233,'Closing'),
(5,3,6246,'Closing'),
(5,3,6247,'Opening'),
(5,3,6477,'Opening'),
(5,3,6478,'Opening'),
(5,3,6603,'Auto Attack'),
(5,3,7266,'Duel'),
(5,3,7267,'Grovel'),
(5,3,7355,'Stuck'),
(5,3,7744,'Will of the Forsaken'),
(5,3,8386,'Attacking'),
(5,3,9077,'Leather'),
(5,3,9078,'Cloth'),
(5,3,9125,'Generic'),
(5,3,13358,'Defensive State (DND)'),
(5,3,15590,'Fist Weapons'),
(5,3,17737,'Language Gutterspeak'),
(5,3,20577,'Cannibalize'),
(5,3,20579,'Shadow Resistance'),
(5,3,21651,'Opening'),
(5,3,21652,'Closing'),
(5,3,22027,'Remove Insignia'),
(5,3,22810,'Opening - No Text'),
(5,3,24949,'Defensive State 2 (DND)'),
(5,3,34082,'Hunter Passive Auras (DND)'),
(5,3,45927,'Summon Friend'),
(5,3,61437,'Opening'),
(5,3,68398,'Opening'),
(5,3,76249,'Weapon Skills'),
(5,3,76250,'Armor Skills'),
(5,3,77442,'Focus'),
(5,3,79747,'Languages'),
(5,3,82928,'Aimed Shot!'),
(5,3,87324,'Focused Aim'),
(5,3,87816,'General Hunter Passives'),
(5,3,96220,'Opening'),
(5,4,81,'Dodge'),
(5,4,196,'One-Handed Axes'),
(5,4,198,'One-Handed Maces'),
(5,4,201,'One-Handed Swords'),
(5,4,203,'Unarmed'),
(5,4,204,'Defense'),
(5,4,264,'Bows'),
(5,4,266,'Guns'),
(5,4,522,'SPELLDEFENSE (DND)'),
(5,4,669,'Language Orcish'),
(5,4,674,'Dual Wield'),
(5,4,1180,'Daggers'),
(5,4,1752,'Sinister Strike'),
(5,4,2382,'Generic'),
(5,4,2567,'Thrown'),
(5,4,2764,'Throw'),
(5,4,3018,'Shoot'),
(5,4,3050,'Detect'),
(5,4,3365,'Opening'),
(5,4,5011,'Crossbows'),
(5,4,5227,'Underwater Breathing'),
(5,4,6233,'Closing'),
(5,4,6246,'Closing'),
(5,4,6247,'Opening'),
(5,4,6477,'Opening'),
(5,4,6478,'Opening'),
(5,4,6603,'Auto Attack'),
(5,4,7266,'Duel'),
(5,4,7267,'Grovel'),
(5,4,7355,'Stuck'),
(5,4,7744,'Will of the Forsaken'),
(5,4,8386,'Attacking'),
(5,4,9077,'Leather'),
(5,4,9078,'Cloth'),
(5,4,9125,'Generic'),
(5,4,15590,'Fist Weapons'),
(5,4,16092,'Defensive State (DND)'),
(5,4,17737,'Language Gutterspeak'),
(5,4,20577,'Cannibalize'),
(5,4,20579,'Shadow Resistance'),
(5,4,21651,'Opening'),
(5,4,21652,'Closing'),
(5,4,22027,'Remove Insignia'),
(5,4,22810,'Opening - No Text'),
(5,4,45927,'Summon Friend'),
(5,4,61437,'Opening'),
(5,4,68398,'Opening'),
(5,4,76273,'Armor Skills'),
(5,4,76297,'Weapon Skills'),
(5,4,79747,'Languages'),
(5,4,96220,'Opening'),
(5,5,81,'Dodge'),
(5,5,198,'One-Handed Maces'),
(5,5,203,'Unarmed'),
(5,5,204,'Defense'),
(5,5,227,'Staves'),
(5,5,522,'SPELLDEFENSE (DND)'),
(5,5,585,'Smite'),
(5,5,669,'Language Orcish'),
(5,5,1180,'Daggers'),
(5,5,2382,'Generic'),
(5,5,3050,'Detect'),
(5,5,3365,'Opening'),
(5,5,5009,'Wands'),
(5,5,5019,'Shoot'),
(5,5,5227,'Underwater Breathing'),
(5,5,6233,'Closing'),
(5,5,6246,'Closing'),
(5,5,6247,'Opening'),
(5,5,6477,'Opening'),
(5,5,6478,'Opening'),
(5,5,6603,'Auto Attack'),
(5,5,7266,'Duel'),
(5,5,7267,'Grovel'),
(5,5,7355,'Stuck'),
(5,5,7744,'Will of the Forsaken'),
(5,5,8386,'Attacking'),
(5,5,9078,'Cloth'),
(5,5,9125,'Generic'),
(5,5,17737,'Language Gutterspeak'),
(5,5,20577,'Cannibalize'),
(5,5,20579,'Shadow Resistance'),
(5,5,21651,'Opening'),
(5,5,21652,'Closing'),
(5,5,22027,'Remove Insignia'),
(5,5,22810,'Opening - No Text'),
(5,5,45927,'Summon Friend'),
(5,5,61437,'Opening'),
(5,5,68398,'Opening'),
(5,5,76279,'Armor Skills'),
(5,5,76301,'Weapon Skills'),
(5,5,77486,'Shadow Orb Power'),
(5,5,79747,'Languages'),
(5,5,84733,'Holy Focus'),
(5,5,84734,'Dark Thoughts'),
(5,5,88684,'Holy Word: Serenity'),
(5,5,88685,'Holy Word: Sanctuary'),
(5,5,96220,'Opening'),
(5,5,101062,'Flash Heal'),
(5,6,81,'Dodge'),
(5,6,196,'One-Handed Axes'),
(5,6,197,'Two-Handed Axes'),
(5,6,198,'One-Handed Maces'),
(5,6,199,'Two-Handed Maces'),
(5,6,200,'Polearms'),
(5,6,201,'One-Handed Swords'),
(5,6,202,'Two-Handed Swords'),
(5,6,203,'Unarmed'),
(5,6,204,'Defense'),
(5,6,522,'SPELLDEFENSE (DND)'),
(5,6,669,'Language Orcish'),
(5,6,674,'Dual Wield'),
(5,6,750,'Plate Mail'),
(5,6,2382,'Generic'),
(5,6,3050,'Detect'),
(5,6,3275,'Linen Bandage'),
(5,6,3276,'Heavy Linen Bandage'),
(5,6,3277,'Wool Bandage'),
(5,6,3278,'Heavy Wool Bandage'),
(5,6,3365,'Opening'),
(5,6,5227,'Underwater Breathing'),
(5,6,6233,'Closing'),
(5,6,6246,'Closing'),
(5,6,6247,'Opening'),
(5,6,6477,'Opening'),
(5,6,6478,'Opening'),
(5,6,6603,'Auto Attack'),
(5,6,7266,'Duel'),
(5,6,7267,'Grovel'),
(5,6,7355,'Stuck'),
(5,6,7744,'Will of the Forsaken'),
(5,6,7928,'Silk Bandage'),
(5,6,7929,'Heavy Silk Bandage'),
(5,6,7934,'Anti-Venom'),
(5,6,8386,'Attacking'),
(5,6,8737,'Mail'),
(5,6,9077,'Leather'),
(5,6,9078,'Cloth'),
(5,6,9125,'Generic'),
(5,6,10840,'Mageweave Bandage'),
(5,6,10841,'Heavy Mageweave Bandage'),
(5,6,10846,'First Aid'),
(5,6,17737,'Language Gutterspeak'),
(5,6,18629,'Runecloth Bandage'),
(5,6,18630,'Heavy Runecloth Bandage'),
(5,6,20577,'Cannibalize'),
(5,6,20579,'Shadow Resistance'),
(5,6,21651,'Opening'),
(5,6,21652,'Closing'),
(5,6,22027,'Remove Insignia'),
(5,6,22810,'Opening - No Text'),
(5,6,33391,'Journeyman Riding'),
(5,6,45462,'Plague Strike'),
(5,6,45477,'Icy Touch'),
(5,6,45902,'Blood Strike'),
(5,6,45903,'Offensive State (DND)'),
(5,6,45927,'Summon Friend'),
(5,6,47541,'Death Coil'),
(5,6,48266,'Frost Presence'),
(5,6,49410,'Forceful Deflection'),
(5,6,49576,'Death Grip'),
(5,6,52665,'Relic'),
(5,6,59879,'Blood Plague'),
(5,6,59921,'Frost Fever'),
(5,6,61437,'Opening'),
(5,6,61455,'Runic Focus'),
(5,6,63644,'Activating Secondary Spec'),
(5,6,63645,'Activating Primary Spec'),
(5,6,68398,'Opening'),
(5,6,76282,'Armor Skills'),
(5,6,76292,'Weapon Skills'),
(5,6,79747,'Languages'),
(5,6,82246,'Parry'),
(5,6,89832,'Death Strike Enabler'),
(5,6,89964,'Clear Glyph'),
(5,6,96220,'Opening'),
(5,8,81,'Dodge'),
(5,8,133,'Fireball'),
(5,8,201,'One-Handed Swords'),
(5,8,203,'Unarmed'),
(5,8,204,'Defense'),
(5,8,227,'Staves'),
(5,8,522,'SPELLDEFENSE (DND)'),
(5,8,669,'Language Orcish'),
(5,8,1180,'Daggers'),
(5,8,2382,'Generic'),
(5,8,3050,'Detect'),
(5,8,3365,'Opening'),
(5,8,5009,'Wands'),
(5,8,5019,'Shoot'),
(5,8,5227,'Underwater Breathing'),
(5,8,6233,'Closing'),
(5,8,6246,'Closing'),
(5,8,6247,'Opening'),
(5,8,6477,'Opening'),
(5,8,6478,'Opening'),
(5,8,6603,'Auto Attack'),
(5,8,7266,'Duel'),
(5,8,7267,'Grovel'),
(5,8,7355,'Stuck'),
(5,8,7744,'Will of the Forsaken'),
(5,8,8386,'Attacking'),
(5,8,9078,'Cloth'),
(5,8,9125,'Generic'),
(5,8,17737,'Language Gutterspeak'),
(5,8,20577,'Cannibalize'),
(5,8,20579,'Shadow Resistance'),
(5,8,21651,'Opening'),
(5,8,21652,'Closing'),
(5,8,22027,'Remove Insignia'),
(5,8,22810,'Opening - No Text'),
(5,8,45927,'Summon Friend'),
(5,8,61437,'Opening'),
(5,8,68398,'Opening'),
(5,8,71761,'Deep Freeze Immunity State'),
(5,8,76276,'Armor Skills'),
(5,8,76298,'Weapon Skills'),
(5,8,79684,'Offensive State (DND)'),
(5,8,79747,'Languages'),
(5,8,85801,'DPS Caster Crit Damage Bonus'),
(5,8,92315,'Pyroblast!'),
(5,8,96220,'Opening'),
(5,9,81,'Dodge'),
(5,9,201,'One-Handed Swords'),
(5,9,203,'Unarmed'),
(5,9,204,'Defense'),
(5,9,227,'Staves'),
(5,9,522,'SPELLDEFENSE (DND)'),
(5,9,669,'Language Common'),
(5,9,686,'Shadow Bolt'),
(5,9,688,'Summon Imp'),
(5,9,1180,'Daggers'),
(5,9,2382,'Generic'),
(5,9,3050,'Detect'),
(5,9,3365,'Opening'),
(5,9,5009,'Wands'),
(5,9,5019,'Shoot'),
(5,9,5227,'Underwater Breathing'),
(5,9,6233,'Closing'),
(5,9,6246,'Closing'),
(5,9,6247,'Opening'),
(5,9,6477,'Opening'),
(5,9,6478,'Opening'),
(5,9,6603,'Auto Attack'),
(5,9,7266,'Duel'),
(5,9,7267,'Grovel'),
(5,9,7355,'Stuck'),
(5,9,7744,'Will of the Forsaken'),
(5,9,8386,'Attacking'),
(5,9,9078,'Cloth'),
(5,9,9125,'Generic'),
(5,9,17747,'Language Gutterspeak'),
(5,9,20577,'Cannibalize'),
(5,9,20579,'Shadow Resistance'),
(5,9,21651,'Opening'),
(5,9,21652,'Closing'),
(5,9,22027,'Remove Insignia'),
(5,9,22810,'Opening - No Text'),
(5,9,45927,'Summon Friend'),
(5,9,58284,'Chaos Bolt Passive'),
(5,9,61437,'Opening'),
(5,9,68398,'Opening'),
(5,9,75445,'Demonic Immolate'),
(5,9,76277,'Armor Skills'),
(5,9,76299,'Weapon Skills'),
(5,9,79747,'Languages'),
(5,9,85801,'DPS Caster Crit Damage Bonus'),
(5,9,86213,'Soul Swap Exhale'),
(5,9,87330,'Suppression'),
(5,9,89420,'Drain Life'),
(5,9,96220,'Opening'),
(6,1,81,'Dodge'),
(6,1,107,'Block'),
(6,1,196,'One-Handed Axes'),
(6,1,197,'Two-Handed Axes'),
(6,1,198,'One-Handed Maces'),
(6,1,199,'Two-Handed Maces'),
(6,1,200,'Polearms'),
(6,1,201,'One-Handed Swords'),
(6,1,202,'Two-Handed Swords'),
(6,1,203,'Unarmed'),
(6,1,204,'Defense'),
(6,1,227,'Staves'),
(6,1,264,'Bows'),
(6,1,266,'Guns'),
(6,1,522,'SPELLDEFENSE (DND)'),
(6,1,669,'Language Orcish'),
(6,1,670,'Language Taurahe'),
(6,1,1180,'Daggers'),
(6,1,2382,'Generic'),
(6,1,2457,'Battle Stance'),
(6,1,2567,'Thrown'),
(6,1,2764,'Throw'),
(6,1,3018,'Shoot'),
(6,1,3050,'Detect'),
(6,1,3365,'Opening'),
(6,1,5011,'Crossbows'),
(6,1,5301,'Defensive State (DND)'),
(6,1,6233,'Closing'),
(6,1,6246,'Closing'),
(6,1,6247,'Opening'),
(6,1,6477,'Opening'),
(6,1,6478,'Opening'),
(6,1,6603,'Auto Attack'),
(6,1,7266,'Duel'),
(6,1,7267,'Grovel'),
(6,1,7355,'Stuck'),
(6,1,8386,'Attacking'),
(6,1,8737,'Mail'),
(6,1,9077,'Leather'),
(6,1,9078,'Cloth'),
(6,1,9116,'Shield'),
(6,1,9125,'Generic'),
(6,1,15590,'Fist Weapons'),
(6,1,20549,'War Stomp'),
(6,1,20550,'Endurance'),
(6,1,20551,'Nature Resistance'),
(6,1,20552,'Cultivation'),
(6,1,21651,'Opening'),
(6,1,21652,'Closing'),
(6,1,22027,'Remove Insignia'),
(6,1,22810,'Opening - No Text'),
(6,1,32215,'Victorious State'),
(6,1,45927,'Summon Friend'),
(6,1,49410,'Forceful Deflection'),
(6,1,61437,'Opening'),
(6,1,68398,'Opening'),
(6,1,76268,'Armor Skills'),
(6,1,76290,'Weapon Skills'),
(6,1,79746,'Languages'),
(6,1,88161,'Strike'),
(6,1,88163,'Attack'),
(6,1,96220,'Opening'),
(6,2,81,'Dodge'),
(6,2,107,'Block'),
(6,2,196,'One-Handed Axes'),
(6,2,197,'Two-Handed Axes'),
(6,2,198,'One-Handed Maces'),
(6,2,199,'Two-Handed Maces'),
(6,2,200,'Polearms'),
(6,2,201,'One-Handed Swords'),
(6,2,202,'Two-Handed Swords'),
(6,2,203,'Unarmed'),
(6,2,204,'Defense'),
(6,2,522,'SPELLDEFENSE (DND)'),
(6,2,669,'Language Orcish'),
(6,2,670,'Language Taurahe'),
(6,2,2382,'Generic'),
(6,2,3050,'Detect'),
(6,2,3365,'Opening'),
(6,2,6233,'Closing'),
(6,2,6246,'Closing'),
(6,2,6247,'Opening'),
(6,2,6477,'Opening'),
(6,2,6478,'Opening'),
(6,2,6603,'Auto Attack'),
(6,2,7266,'Duel'),
(6,2,7267,'Grovel'),
(6,2,7355,'Stuck'),
(6,2,8386,'Attacking'),
(6,2,8737,'Mail'),
(6,2,9077,'Leather'),
(6,2,9078,'Cloth'),
(6,2,9116,'Shield'),
(6,2,9125,'Generic'),
(6,2,20208,'Paladin pushback resistance'),
(6,2,20549,'War Stomp'),
(6,2,20550,'Endurance'),
(6,2,20551,'Nature Resistance'),
(6,2,20552,'Cultivation'),
(6,2,21651,'Opening'),
(6,2,21652,'Closing'),
(6,2,22027,'Remove Insignia'),
(6,2,22810,'Opening - No Text'),
(6,2,27762,'Relic'),
(6,2,35395,'Crusader Strike'),
(6,2,45927,'Summon Friend'),
(6,2,49410,'Forceful Deflection'),
(6,2,60091,'Judgement Anti-Parry/Dodge Passive'),
(6,2,61437,'Opening'),
(6,2,68398,'Opening'),
(6,2,76271,'Armor Skills'),
(6,2,76294,'Weapon Skills'),
(6,2,79746,'Languages'),
(6,2,96220,'Opening'),
(6,3,75,'Auto Shot'),
(6,3,81,'Dodge'),
(6,3,196,'One-Handed Axes'),
(6,3,197,'Two-Handed Axes'),
(6,3,200,'Polearms'),
(6,3,201,'One-Handed Swords'),
(6,3,202,'Two-Handed Swords'),
(6,3,203,'Unarmed'),
(6,3,204,'Defense'),
(6,3,227,'Staves'),
(6,3,264,'Bows'),
(6,3,266,'Guns'),
(6,3,522,'SPELLDEFENSE (DND)'),
(6,3,669,'Language Orcish'),
(6,3,670,'Language Taurahe'),
(6,3,883,'Call Pet 1'),
(6,3,982,'Revive Pet'),
(6,3,1180,'Daggers'),
(6,3,2382,'Generic'),
(6,3,3044,'Arcane Shot'),
(6,3,3050,'Detect'),
(6,3,3365,'Opening'),
(6,3,5011,'Crossbows'),
(6,3,6233,'Closing'),
(6,3,6246,'Closing'),
(6,3,6247,'Opening'),
(6,3,6477,'Opening'),
(6,3,6478,'Opening'),
(6,3,6603,'Auto Attack'),
(6,3,7266,'Duel'),
(6,3,7267,'Grovel'),
(6,3,7355,'Stuck'),
(6,3,8386,'Attacking'),
(6,3,9077,'Leather'),
(6,3,9078,'Cloth'),
(6,3,9125,'Generic'),
(6,3,13358,'Defensive State (DND)'),
(6,3,15590,'Fist Weapons'),
(6,3,20549,'War Stomp'),
(6,3,20550,'Endurance'),
(6,3,20551,'Nature Resistance'),
(6,3,20552,'Cultivation'),
(6,3,21651,'Opening'),
(6,3,21652,'Closing'),
(6,3,22027,'Remove Insignia'),
(6,3,22810,'Opening - No Text'),
(6,3,24949,'Defensive State 2 (DND)'),
(6,3,34082,'Hunter Passive Auras (DND)'),
(6,3,45927,'Summon Friend'),
(6,3,61437,'Opening'),
(6,3,68398,'Opening'),
(6,3,76249,'Weapon Skills'),
(6,3,76250,'Armor Skills'),
(6,3,77442,'Focus'),
(6,3,79746,'Languages'),
(6,3,82928,'Aimed Shot!'),
(6,3,87324,'Focused Aim'),
(6,3,87816,'General Hunter Passives'),
(6,3,96220,'Opening'),
(6,5,81,'Dodge'),
(6,5,198,'One-Handed Maces'),
(6,5,203,'Unarmed'),
(6,5,204,'Defense'),
(6,5,227,'Staves'),
(6,5,522,'SPELLDEFENSE (DND)'),
(6,5,585,'Smite'),
(6,5,669,'Language Orcish'),
(6,5,670,'Language Taurahe'),
(6,5,1180,'Daggers'),
(6,5,2382,'Generic'),
(6,5,3050,'Detect'),
(6,5,3365,'Opening'),
(6,5,5009,'Wands'),
(6,5,5019,'Shoot'),
(6,5,6233,'Closing'),
(6,5,6246,'Closing'),
(6,5,6247,'Opening'),
(6,5,6477,'Opening'),
(6,5,6478,'Opening'),
(6,5,6603,'Auto Attack'),
(6,5,7266,'Duel'),
(6,5,7267,'Grovel'),
(6,5,7355,'Stuck'),
(6,5,8386,'Attacking'),
(6,5,9078,'Cloth'),
(6,5,9125,'Generic'),
(6,5,20549,'War Stomp'),
(6,5,20550,'Endurance'),
(6,5,20551,'Nature Resistance'),
(6,5,20552,'Cultivation'),
(6,5,21651,'Opening'),
(6,5,21652,'Closing'),
(6,5,22027,'Remove Insignia'),
(6,5,22810,'Opening - No Text'),
(6,5,45927,'Summon Friend'),
(6,5,61437,'Opening'),
(6,5,68398,'Opening'),
(6,5,76279,'Armor Skills'),
(6,5,76301,'Weapon Skills'),
(6,5,77486,'Shadow Orb Power'),
(6,5,79746,'Languages'),
(6,5,84733,'Holy Focus'),
(6,5,84734,'Dark Thoughts'),
(6,5,88684,'Holy Word: Serenity'),
(6,5,88685,'Holy Word: Sanctuary'),
(6,5,96220,'Opening'),
(6,5,101062,'Flash Heal'),
(6,6,81,'Dodge'),
(6,6,196,'One-Handed Axes'),
(6,6,197,'Two-Handed Axes'),
(6,6,198,'One-Handed Maces'),
(6,6,199,'Two-Handed Maces'),
(6,6,200,'Polearms'),
(6,6,201,'One-Handed Swords'),
(6,6,202,'Two-Handed Swords'),
(6,6,203,'Unarmed'),
(6,6,204,'Defense'),
(6,6,522,'SPELLDEFENSE (DND)'),
(6,6,669,'Language Orcish'),
(6,6,670,'Language Taurahe'),
(6,6,674,'Dual Wield'),
(6,6,750,'Plate Mail'),
(6,6,2382,'Generic'),
(6,6,3050,'Detect'),
(6,6,3275,'Linen Bandage'),
(6,6,3276,'Heavy Linen Bandage'),
(6,6,3277,'Wool Bandage'),
(6,6,3278,'Heavy Wool Bandage'),
(6,6,3365,'Opening'),
(6,6,6233,'Closing'),
(6,6,6246,'Closing'),
(6,6,6247,'Opening'),
(6,6,6477,'Opening'),
(6,6,6478,'Opening'),
(6,6,6603,'Auto Attack'),
(6,6,7266,'Duel'),
(6,6,7267,'Grovel'),
(6,6,7355,'Stuck'),
(6,6,7928,'Silk Bandage'),
(6,6,7929,'Heavy Silk Bandage'),
(6,6,7934,'Anti-Venom'),
(6,6,8386,'Attacking'),
(6,6,8737,'Mail'),
(6,6,9077,'Leather'),
(6,6,9078,'Cloth'),
(6,6,9125,'Generic'),
(6,6,10840,'Mageweave Bandage'),
(6,6,10841,'Heavy Mageweave Bandage'),
(6,6,10846,'First Aid'),
(6,6,18629,'Runecloth Bandage'),
(6,6,18630,'Heavy Runecloth Bandage'),
(6,6,20549,'War Stomp'),
(6,6,20550,'Endurance'),
(6,6,20551,'Nature Resistance'),
(6,6,20552,'Cultivation'),
(6,6,21651,'Opening'),
(6,6,21652,'Closing'),
(6,6,22027,'Remove Insignia'),
(6,6,22810,'Opening - No Text'),
(6,6,33391,'Journeyman Riding'),
(6,6,45462,'Plague Strike'),
(6,6,45477,'Icy Touch'),
(6,6,45902,'Blood Strike'),
(6,6,45903,'Offensive State (DND)'),
(6,6,45927,'Summon Friend'),
(6,6,47541,'Death Coil'),
(6,6,48266,'Frost Presence'),
(6,6,49410,'Forceful Deflection'),
(6,6,49576,'Death Grip'),
(6,6,52665,'Relic'),
(6,6,59879,'Blood Plague'),
(6,6,59921,'Frost Fever'),
(6,6,61437,'Opening'),
(6,6,61455,'Runic Focus'),
(6,6,63644,'Activating Secondary Spec'),
(6,6,63645,'Activating Primary Spec'),
(6,6,68398,'Opening'),
(6,6,76282,'Armor Skills'),
(6,6,76292,'Weapon Skills'),
(6,6,79746,'Languages'),
(6,6,82246,'Parry'),
(6,6,89832,'Death Strike Enabler'),
(6,6,89964,'Clear Glyph'),
(6,6,96220,'Opening'),
(6,8,81,'Dodge'),
(6,8,133,'Fireball'),
(6,8,201,'One-Handed Swords'),
(6,8,203,'Unarmed'),
(6,8,204,'Defense'),
(6,8,227,'Staves'),
(6,8,522,'SPELLDEFENSE (DND)'),
(6,8,669,'Language Orcish'),
(6,8,670,'Language Taurahe'),
(6,8,1180,'Daggers'),
(6,8,2382,'Generic'),
(6,8,3050,'Detect'),
(6,8,3365,'Opening'),
(6,8,5009,'Wands'),
(6,8,5019,'Shoot'),
(6,8,6233,'Closing'),
(6,8,6246,'Closing'),
(6,8,6247,'Opening'),
(6,8,6477,'Opening'),
(6,8,6478,'Opening'),
(6,8,6603,'Auto Attack'),
(6,8,7266,'Duel'),
(6,8,7267,'Grovel'),
(6,8,7355,'Stuck'),
(6,8,8386,'Attacking'),
(6,8,9078,'Cloth'),
(6,8,9125,'Generic'),
(6,8,20549,'War Stomp'),
(6,8,20550,'Endurance'),
(6,8,20551,'Nature Resistance'),
(6,8,20552,'Cultivation'),
(6,8,21651,'Opening'),
(6,8,21652,'Closing'),
(6,8,22027,'Remove Insignia'),
(6,8,22810,'Opening - No Text'),
(6,8,45927,'Summon Friend'),
(6,8,61437,'Opening'),
(6,8,68398,'Opening'),
(6,8,71761,'Deep Freeze Immunity State'),
(6,8,76276,'Armor Skills'),
(6,8,76298,'Weapon Skills'),
(6,8,79684,'Offensive State (DND)'),
(6,8,79746,'Languages'),
(6,8,85801,'DPS Caster Crit Damage Bonus'),
(6,8,92315,'Pyroblast!'),
(6,8,96220,'Opening'),
(6,9,81,'Dodge'),
(6,9,201,'One-Handed Swords'),
(6,9,203,'Unarmed'),
(6,9,204,'Defense'),
(6,9,227,'Staves'),
(6,9,522,'SPELLDEFENSE (DND)'),
(6,9,669,'Language Common'),
(6,9,670,'Language Taurahe'),
(6,9,686,'Shadow Bolt'),
(6,9,688,'Summon Imp'),
(6,9,1180,'Daggers'),
(6,9,2382,'Generic'),
(6,9,3050,'Detect'),
(6,9,3365,'Opening'),
(6,9,5009,'Wands'),
(6,9,5019,'Shoot'),
(6,9,6233,'Closing'),
(6,9,6246,'Closing'),
(6,9,6247,'Opening'),
(6,9,6477,'Opening'),
(6,9,6478,'Opening'),
(6,9,6603,'Auto Attack'),
(6,9,7266,'Duel'),
(6,9,7267,'Grovel'),
(6,9,7355,'Stuck'),
(6,9,8386,'Attacking'),
(6,9,9078,'Cloth'),
(6,9,9125,'Generic'),
(6,9,20549,'War Stomp'),
(6,9,20550,'Endurance'),
(6,9,20551,'Nature Resistance'),
(6,9,20552,'Cultivation'),
(6,9,21651,'Opening'),
(6,9,21652,'Closing'),
(6,9,22027,'Remove Insignia'),
(6,9,22810,'Opening - No Text'),
(6,9,45927,'Summon Friend'),
(6,9,58284,'Chaos Bolt Passive'),
(6,9,61437,'Opening'),
(6,9,68398,'Opening'),
(6,9,75445,'Demonic Immolate'),
(6,9,76277,'Armor Skills'),
(6,9,76299,'Weapon Skills'),
(6,9,79746,'Languages'),
(6,9,85801,'DPS Caster Crit Damage Bonus'),
(6,9,86213,'Soul Swap Exhale'),
(6,9,87330,'Suppression'),
(6,9,89420,'Drain Life'),
(6,9,96220,'Opening'),
(6,11,81,'Dodge'),
(6,11,198,'One-Handed Maces'),
(6,11,199,'Two-Handed Maces'),
(6,11,200,'Polearms'),
(6,11,203,'Unarmed'),
(6,11,204,'Defense'),
(6,11,227,'Staves'),
(6,11,522,'SPELLDEFENSE (DND)'),
(6,11,669,'Language Orcish'),
(6,11,670,'Language Taurahe'),
(6,11,1180,'Daggers'),
(6,11,2382,'Generic'),
(6,11,3050,'Detect'),
(6,11,3365,'Opening'),
(6,11,5176,'Wrath'),
(6,11,6233,'Closing'),
(6,11,6246,'Closing'),
(6,11,6247,'Opening'),
(6,11,6477,'Opening'),
(6,11,6478,'Opening'),
(6,11,6603,'Auto Attack'),
(6,11,7266,'Duel'),
(6,11,7267,'Grovel'),
(6,11,7355,'Stuck'),
(6,11,8386,'Attacking'),
(6,11,9077,'Leather'),
(6,11,9078,'Cloth'),
(6,11,9125,'Generic'),
(6,11,15590,'Fist Weapons'),
(6,11,20549,'War Stomp'),
(6,11,20550,'Endurance'),
(6,11,20551,'Nature Resistance'),
(6,11,20552,'Cultivation'),
(6,11,21651,'Opening'),
(6,11,21652,'Closing'),
(6,11,22027,'Remove Insignia'),
(6,11,22810,'Opening - No Text'),
(6,11,45927,'Summon Friend'),
(6,11,61437,'Opening'),
(6,11,68398,'Opening'),
(6,11,76275,'Armor Skills'),
(6,11,76300,'Weapon Skills'),
(6,11,79577,'Eclipse Mastery Driver Passive'),
(6,11,79746,'Languages'),
(6,11,81170,'Ravage!'),
(6,11,84736,'Nature\'s Focus'),
(6,11,84738,'Celestial Focus'),
(6,11,96220,'Opening'),
(7,1,81,'Dodge'),
(7,1,107,'Block'),
(7,1,196,'One-Handed Axes'),
(7,1,197,'Two-Handed Axes'),
(7,1,198,'One-Handed Maces'),
(7,1,199,'Two-Handed Maces'),
(7,1,200,'Polearms'),
(7,1,201,'One-Handed Swords'),
(7,1,202,'Two-Handed Swords'),
(7,1,203,'Unarmed'),
(7,1,204,'Defense'),
(7,1,227,'Staves'),
(7,1,264,'Bows'),
(7,1,266,'Guns'),
(7,1,522,'SPELLDEFENSE (DND)'),
(7,1,668,'Language Common'),
(7,1,1180,'Daggers'),
(7,1,2382,'Generic'),
(7,1,2457,'Battle Stance'),
(7,1,2567,'Thrown'),
(7,1,2764,'Throw'),
(7,1,3018,'Shoot'),
(7,1,3050,'Detect'),
(7,1,3365,'Opening'),
(7,1,5011,'Crossbows'),
(7,1,5301,'Defensive State (DND)'),
(7,1,6233,'Closing'),
(7,1,6246,'Closing'),
(7,1,6247,'Opening'),
(7,1,6477,'Opening'),
(7,1,6478,'Opening'),
(7,1,6603,'Auto Attack'),
(7,1,7266,'Duel'),
(7,1,7267,'Grovel'),
(7,1,7340,'Language Gnomish'),
(7,1,7355,'Stuck'),
(7,1,8386,'Attacking'),
(7,1,8737,'Mail'),
(7,1,9077,'Leather'),
(7,1,9078,'Cloth'),
(7,1,9116,'Shield'),
(7,1,9125,'Generic'),
(7,1,15590,'Fist Weapons'),
(7,1,20591,'Expansive Mind'),
(7,1,20592,'Arcane Resistance'),
(7,1,20593,'Engineering Specialization'),
(7,1,21651,'Opening'),
(7,1,21652,'Closing'),
(7,1,22027,'Remove Insignia'),
(7,1,22810,'Opening - No Text'),
(7,1,32215,'Victorious State'),
(7,1,45927,'Summon Friend'),
(7,1,49410,'Forceful Deflection'),
(7,1,61437,'Opening'),
(7,1,68398,'Opening'),
(7,1,76268,'Armor Skills'),
(7,1,76290,'Weapon Skills'),
(7,1,79740,'Languages'),
(7,1,88161,'Strike'),
(7,1,88163,'Attack'),
(7,1,92680,'Shortblade Specialization'),
(7,1,96220,'Opening'),
(7,4,81,'Dodge'),
(7,4,196,'One-Handed Axes'),
(7,4,198,'One-Handed Maces'),
(7,4,201,'One-Handed Swords'),
(7,4,203,'Unarmed'),
(7,4,204,'Defense'),
(7,4,264,'Bows'),
(7,4,266,'Guns'),
(7,4,522,'SPELLDEFENSE (DND)'),
(7,4,668,'Language Common'),
(7,4,674,'Dual Wield'),
(7,4,1180,'Daggers'),
(7,4,1752,'Sinister Strike'),
(7,4,2382,'Generic'),
(7,4,2567,'Thrown'),
(7,4,2764,'Throw'),
(7,4,3018,'Shoot'),
(7,4,3050,'Detect'),
(7,4,3365,'Opening'),
(7,4,5011,'Crossbows'),
(7,4,6233,'Closing'),
(7,4,6246,'Closing'),
(7,4,6247,'Opening'),
(7,4,6477,'Opening'),
(7,4,6478,'Opening'),
(7,4,6603,'Auto Attack'),
(7,4,7266,'Duel'),
(7,4,7267,'Grovel'),
(7,4,7340,'Language Gnomish'),
(7,4,7355,'Stuck'),
(7,4,8386,'Attacking'),
(7,4,9077,'Leather'),
(7,4,9078,'Cloth'),
(7,4,9125,'Generic'),
(7,4,15590,'Fist Weapons'),
(7,4,16092,'Defensive State (DND)'),
(7,4,20591,'Expansive Mind'),
(7,4,20592,'Arcane Resistance'),
(7,4,20593,'Engineering Specialization'),
(7,4,21651,'Opening'),
(7,4,21652,'Closing'),
(7,4,22027,'Remove Insignia'),
(7,4,22810,'Opening - No Text'),
(7,4,45927,'Summon Friend'),
(7,4,61437,'Opening'),
(7,4,68398,'Opening'),
(7,4,76273,'Armor Skills'),
(7,4,76297,'Weapon Skills'),
(7,4,79740,'Languages'),
(7,4,92680,'Shortblade Specialization'),
(7,4,96220,'Opening'),
(7,5,81,'Dodge'),
(7,5,198,'One-Handed Maces'),
(7,5,203,'Unarmed'),
(7,5,204,'Defense'),
(7,5,227,'Staves'),
(7,5,522,'SPELLDEFENSE (DND)'),
(7,5,585,'Smite'),
(7,5,668,'Language Common'),
(7,5,1180,'Daggers'),
(7,5,2382,'Generic'),
(7,5,3050,'Detect'),
(7,5,3365,'Opening'),
(7,5,5009,'Wands'),
(7,5,5019,'Shoot'),
(7,5,6233,'Closing'),
(7,5,6246,'Closing'),
(7,5,6247,'Opening'),
(7,5,6477,'Opening'),
(7,5,6478,'Opening'),
(7,5,6603,'Auto Attack'),
(7,5,7266,'Duel'),
(7,5,7267,'Grovel'),
(7,5,7340,'Language Gnomish'),
(7,5,7355,'Stuck'),
(7,5,8386,'Attacking'),
(7,5,9078,'Cloth'),
(7,5,9125,'Generic'),
(7,5,20591,'Expansive Mind'),
(7,5,20592,'Arcane Resistance'),
(7,5,20593,'Engineering Specialization'),
(7,5,21651,'Opening'),
(7,5,21652,'Closing'),
(7,5,22027,'Remove Insignia'),
(7,5,22810,'Opening - No Text'),
(7,5,45927,'Summon Friend'),
(7,5,61437,'Opening'),
(7,5,68398,'Opening'),
(7,5,76279,'Armor Skills'),
(7,5,76301,'Weapon Skills'),
(7,5,77486,'Shadow Orb Power'),
(7,5,79740,'Languages'),
(7,5,84733,'Holy Focus'),
(7,5,84734,'Dark Thoughts'),
(7,5,88684,'Holy Word: Serenity'),
(7,5,88685,'Holy Word: Sanctuary'),
(7,5,92680,'Shortblade Specialization'),
(7,5,96220,'Opening'),
(7,5,101062,'Flash Heal'),
(7,6,81,'Dodge'),
(7,6,196,'One-Handed Axes'),
(7,6,197,'Two-Handed Axes'),
(7,6,198,'One-Handed Maces'),
(7,6,199,'Two-Handed Maces'),
(7,6,200,'Polearms'),
(7,6,201,'One-Handed Swords'),
(7,6,202,'Two-Handed Swords'),
(7,6,203,'Unarmed'),
(7,6,204,'Defense'),
(7,6,522,'SPELLDEFENSE (DND)'),
(7,6,668,'Language Common'),
(7,6,674,'Dual Wield'),
(7,6,750,'Plate Mail'),
(7,6,2382,'Generic'),
(7,6,3050,'Detect'),
(7,6,3275,'Linen Bandage'),
(7,6,3276,'Heavy Linen Bandage'),
(7,6,3277,'Wool Bandage'),
(7,6,3278,'Heavy Wool Bandage'),
(7,6,3365,'Opening'),
(7,6,6233,'Closing'),
(7,6,6246,'Closing'),
(7,6,6247,'Opening'),
(7,6,6477,'Opening'),
(7,6,6478,'Opening'),
(7,6,6603,'Auto Attack'),
(7,6,7266,'Duel'),
(7,6,7267,'Grovel'),
(7,6,7340,'Language Gnomish'),
(7,6,7355,'Stuck'),
(7,6,7928,'Silk Bandage'),
(7,6,7929,'Heavy Silk Bandage'),
(7,6,7934,'Anti-Venom'),
(7,6,8386,'Attacking'),
(7,6,8737,'Mail'),
(7,6,9077,'Leather'),
(7,6,9078,'Cloth'),
(7,6,9125,'Generic'),
(7,6,10840,'Mageweave Bandage'),
(7,6,10841,'Heavy Mageweave Bandage'),
(7,6,10846,'First Aid'),
(7,6,18629,'Runecloth Bandage'),
(7,6,18630,'Heavy Runecloth Bandage'),
(7,6,20589,'Escape Artist'),
(7,6,20591,'Expansive Mind'),
(7,6,20592,'Arcane Resistance'),
(7,6,20593,'Engineering Specialization'),
(7,6,21651,'Opening'),
(7,6,21652,'Closing'),
(7,6,22027,'Remove Insignia'),
(7,6,22810,'Opening - No Text'),
(7,6,33391,'Journeyman Riding'),
(7,6,45462,'Plague Strike'),
(7,6,45477,'Icy Touch'),
(7,6,45902,'Blood Strike'),
(7,6,45903,'Offensive State (DND)'),
(7,6,45927,'Summon Friend'),
(7,6,47541,'Death Coil'),
(7,6,48266,'Frost Presence'),
(7,6,49410,'Forceful Deflection'),
(7,6,49576,'Death Grip'),
(7,6,52665,'Relic'),
(7,6,59879,'Blood Plague'),
(7,6,59921,'Frost Fever'),
(7,6,61437,'Opening'),
(7,6,61455,'Runic Focus'),
(7,6,63644,'Activating Secondary Spec'),
(7,6,63645,'Activating Primary Spec'),
(7,6,68398,'Opening'),
(7,6,76282,'Armor Skills'),
(7,6,76292,'Weapon Skills'),
(7,6,79740,'Languages'),
(7,6,82246,'Parry'),
(7,6,89832,'Death Strike Enabler'),
(7,6,89964,'Clear Glyph'),
(7,6,92680,'Shortblade Specialization'),
(7,6,96220,'Opening'),
(7,8,81,'Dodge'),
(7,8,133,'Fireball'),
(7,8,201,'One-Handed Swords'),
(7,8,203,'Unarmed'),
(7,8,204,'Defense'),
(7,8,227,'Staves'),
(7,8,522,'SPELLDEFENSE (DND)'),
(7,8,668,'Language Common'),
(7,8,1180,'Daggers'),
(7,8,2382,'Generic'),
(7,8,3050,'Detect'),
(7,8,3365,'Opening'),
(7,8,5009,'Wands'),
(7,8,5019,'Shoot'),
(7,8,6233,'Closing'),
(7,8,6246,'Closing'),
(7,8,6247,'Opening'),
(7,8,6477,'Opening'),
(7,8,6478,'Opening'),
(7,8,6603,'Auto Attack'),
(7,8,7266,'Duel'),
(7,8,7267,'Grovel'),
(7,8,7340,'Language Gnomish'),
(7,8,7355,'Stuck'),
(7,8,8386,'Attacking'),
(7,8,9078,'Cloth'),
(7,8,9125,'Generic'),
(7,8,20591,'Expansive Mind'),
(7,8,20592,'Arcane Resistance'),
(7,8,20593,'Engineering Specialization'),
(7,8,21651,'Opening'),
(7,8,21652,'Closing'),
(7,8,22027,'Remove Insignia'),
(7,8,22810,'Opening - No Text'),
(7,8,45927,'Summon Friend'),
(7,8,61437,'Opening'),
(7,8,68398,'Opening'),
(7,8,71761,'Deep Freeze Immunity State'),
(7,8,76276,'Armor Skills'),
(7,8,76298,'Weapon Skills'),
(7,8,79684,'Offensive State (DND)'),
(7,8,79740,'Languages'),
(7,8,85801,'DPS Caster Crit Damage Bonus'),
(7,8,92315,'Pyroblast!'),
(7,8,92680,'Shortblade Specialization'),
(7,8,96220,'Opening'),
(7,9,81,'Dodge'),
(7,9,201,'One-Handed Swords'),
(7,9,203,'Unarmed'),
(7,9,204,'Defense'),
(7,9,227,'Staves'),
(7,9,522,'SPELLDEFENSE (DND)'),
(7,9,668,'Language Common'),
(7,9,686,'Shadow Bolt'),
(7,9,688,'Summon Imp'),
(7,9,1180,'Daggers'),
(7,9,2382,'Generic'),
(7,9,3050,'Detect'),
(7,9,3365,'Opening'),
(7,9,5009,'Wands'),
(7,9,5019,'Shoot'),
(7,9,6233,'Closing'),
(7,9,6246,'Closing'),
(7,9,6247,'Opening'),
(7,9,6477,'Opening'),
(7,9,6478,'Opening'),
(7,9,6603,'Auto Attack'),
(7,9,7266,'Duel'),
(7,9,7267,'Grovel'),
(7,9,7340,'Language Gnomish'),
(7,9,7355,'Stuck'),
(7,9,8386,'Attacking'),
(7,9,9078,'Cloth'),
(7,9,9125,'Generic'),
(7,9,20591,'Expansive Mind'),
(7,9,20592,'Arcane Resistance'),
(7,9,20593,'Engineering Specialization'),
(7,9,21651,'Opening'),
(7,9,21652,'Closing'),
(7,9,22027,'Remove Insignia'),
(7,9,22810,'Opening - No Text'),
(7,9,45927,'Summon Friend'),
(7,9,58284,'Chaos Bolt Passive'),
(7,9,61437,'Opening'),
(7,9,68398,'Opening'),
(7,9,75445,'Demonic Immolate'),
(7,9,76277,'Armor Skills'),
(7,9,76299,'Weapon Skills'),
(7,9,79740,'Languages'),
(7,9,85801,'DPS Caster Crit Damage Bonus'),
(7,9,86213,'Soul Swap Exhale'),
(7,9,87330,'Suppression'),
(7,9,89420,'Drain Life'),
(7,9,92680,'Shortblade Specialization'),
(7,9,96220,'Opening'),
(8,1,81,'Dodge'),
(8,1,107,'Block'),
(8,1,196,'One-Handed Axes'),
(8,1,197,'Two-Handed Axes'),
(8,1,198,'One-Handed Maces'),
(8,1,199,'Two-Handed Maces'),
(8,1,200,'Polearms'),
(8,1,201,'One-Handed Swords'),
(8,1,202,'Two-Handed Swords'),
(8,1,203,'Unarmed'),
(8,1,204,'Defense'),
(8,1,227,'Staves'),
(8,1,264,'Bows'),
(8,1,266,'Guns'),
(8,1,522,'SPELLDEFENSE (DND)'),
(8,1,669,'Language Orcish'),
(8,1,1180,'Daggers'),
(8,1,2382,'Generic'),
(8,1,2457,'Battle Stance'),
(8,1,2567,'Thrown'),
(8,1,2764,'Throw'),
(8,1,3018,'Shoot'),
(8,1,3050,'Detect'),
(8,1,3365,'Opening'),
(8,1,5011,'Crossbows'),
(8,1,5301,'Defensive State (DND)'),
(8,1,6233,'Closing'),
(8,1,6246,'Closing'),
(8,1,6247,'Opening'),
(8,1,6477,'Opening'),
(8,1,6478,'Opening'),
(8,1,6603,'Auto Attack'),
(8,1,7266,'Duel'),
(8,1,7267,'Grovel'),
(8,1,7341,'Language Troll'),
(8,1,7355,'Stuck'),
(8,1,8386,'Attacking'),
(8,1,8737,'Mail'),
(8,1,9077,'Leather'),
(8,1,9078,'Cloth'),
(8,1,9116,'Shield'),
(8,1,9125,'Generic'),
(8,1,15590,'Fist Weapons'),
(8,1,20555,'Regeneration'),
(8,1,20557,'Beast Slaying'),
(8,1,20558,'Throwing Specialization'),
(8,1,21651,'Opening'),
(8,1,21652,'Closing'),
(8,1,22027,'Remove Insignia'),
(8,1,22810,'Opening - No Text'),
(8,1,26290,'Bow Specialization'),
(8,1,26297,'Berserking'),
(8,1,32215,'Victorious State'),
(8,1,45927,'Summon Friend'),
(8,1,49410,'Forceful Deflection'),
(8,1,58943,'Da Voodoo Shuffle'),
(8,1,61437,'Opening'),
(8,1,68398,'Opening'),
(8,1,76268,'Armor Skills'),
(8,1,76290,'Weapon Skills'),
(8,1,79744,'Languages'),
(8,1,88161,'Strike'),
(8,1,88163,'Attack'),
(8,1,96220,'Opening'),
(8,3,75,'Auto Shot'),
(8,3,81,'Dodge'),
(8,3,196,'One-Handed Axes'),
(8,3,197,'Two-Handed Axes'),
(8,3,200,'Polearms'),
(8,3,201,'One-Handed Swords'),
(8,3,202,'Two-Handed Swords'),
(8,3,203,'Unarmed'),
(8,3,204,'Defense'),
(8,3,227,'Staves'),
(8,3,264,'Bows'),
(8,3,266,'Guns'),
(8,3,522,'SPELLDEFENSE (DND)'),
(8,3,669,'Language Orcish'),
(8,3,883,'Call Pet 1'),
(8,3,982,'Revive Pet'),
(8,3,1180,'Daggers'),
(8,3,2382,'Generic'),
(8,3,3044,'Arcane Shot'),
(8,3,3050,'Detect'),
(8,3,3365,'Opening'),
(8,3,5011,'Crossbows'),
(8,3,6233,'Closing'),
(8,3,6246,'Closing'),
(8,3,6247,'Opening'),
(8,3,6477,'Opening'),
(8,3,6478,'Opening'),
(8,3,6603,'Auto Attack'),
(8,3,7266,'Duel'),
(8,3,7267,'Grovel'),
(8,3,7341,'Language Troll'),
(8,3,7355,'Stuck'),
(8,3,8386,'Attacking'),
(8,3,9077,'Leather'),
(8,3,9078,'Cloth'),
(8,3,9125,'Generic'),
(8,3,13358,'Defensive State (DND)'),
(8,3,15590,'Fist Weapons'),
(8,3,20555,'Regeneration'),
(8,3,20557,'Beast Slaying'),
(8,3,20558,'Throwing Specialization'),
(8,3,21651,'Opening'),
(8,3,21652,'Closing'),
(8,3,22027,'Remove Insignia'),
(8,3,22810,'Opening - No Text'),
(8,3,24949,'Defensive State 2 (DND)'),
(8,3,26290,'Bow Specialization'),
(8,3,26297,'Berserking'),
(8,3,34082,'Hunter Passive Auras (DND)'),
(8,3,45927,'Summon Friend'),
(8,3,58943,'Da Voodoo Shuffle'),
(8,3,61437,'Opening'),
(8,3,68398,'Opening'),
(8,3,76249,'Weapon Skills'),
(8,3,76250,'Armor Skills'),
(8,3,77442,'Focus'),
(8,3,79744,'Languages'),
(8,3,82928,'Aimed Shot!'),
(8,3,87324,'Focused Aim'),
(8,3,87816,'General Hunter Passives'),
(8,3,96220,'Opening'),
(8,4,81,'Dodge'),
(8,4,196,'One-Handed Axes'),
(8,4,198,'One-Handed Maces'),
(8,4,201,'One-Handed Swords'),
(8,4,203,'Unarmed'),
(8,4,204,'Defense'),
(8,4,264,'Bows'),
(8,4,266,'Guns'),
(8,4,522,'SPELLDEFENSE (DND)'),
(8,4,669,'Language Orcish'),
(8,4,674,'Dual Wield'),
(8,4,1180,'Daggers'),
(8,4,1752,'Sinister Strike'),
(8,4,2382,'Generic'),
(8,4,2567,'Thrown'),
(8,4,2764,'Throw'),
(8,4,3018,'Shoot'),
(8,4,3050,'Detect'),
(8,4,3365,'Opening'),
(8,4,5011,'Crossbows'),
(8,4,6233,'Closing'),
(8,4,6246,'Closing'),
(8,4,6247,'Opening'),
(8,4,6477,'Opening'),
(8,4,6478,'Opening'),
(8,4,6603,'Auto Attack'),
(8,4,7266,'Duel'),
(8,4,7267,'Grovel'),
(8,4,7341,'Language Troll'),
(8,4,7355,'Stuck'),
(8,4,8386,'Attacking'),
(8,4,9077,'Leather'),
(8,4,9078,'Cloth'),
(8,4,9125,'Generic'),
(8,4,15590,'Fist Weapons'),
(8,4,16092,'Defensive State (DND)'),
(8,4,20555,'Regeneration'),
(8,4,20557,'Beast Slaying'),
(8,4,20558,'Throwing Specialization'),
(8,4,21651,'Opening'),
(8,4,21652,'Closing'),
(8,4,22027,'Remove Insignia'),
(8,4,22810,'Opening - No Text'),
(8,4,26290,'Bow Specialization'),
(8,4,26297,'Berserking'),
(8,4,45927,'Summon Friend'),
(8,4,58943,'Da Voodoo Shuffle'),
(8,4,61437,'Opening'),
(8,4,68398,'Opening'),
(8,4,76273,'Armor Skills'),
(8,4,76297,'Weapon Skills'),
(8,4,79744,'Languages'),
(8,4,96220,'Opening'),
(8,5,81,'Dodge'),
(8,5,198,'One-Handed Maces'),
(8,5,203,'Unarmed'),
(8,5,204,'Defense'),
(8,5,227,'Staves'),
(8,5,522,'SPELLDEFENSE (DND)'),
(8,5,585,'Smite'),
(8,5,669,'Language Orcish'),
(8,5,1180,'Daggers'),
(8,5,2382,'Generic'),
(8,5,3050,'Detect'),
(8,5,3365,'Opening'),
(8,5,5009,'Wands'),
(8,5,5019,'Shoot'),
(8,5,6233,'Closing'),
(8,5,6246,'Closing'),
(8,5,6247,'Opening'),
(8,5,6477,'Opening'),
(8,5,6478,'Opening'),
(8,5,6603,'Auto Attack'),
(8,5,7266,'Duel'),
(8,5,7267,'Grovel'),
(8,5,7341,'Language Troll'),
(8,5,7355,'Stuck'),
(8,5,8386,'Attacking'),
(8,5,9078,'Cloth'),
(8,5,9125,'Generic'),
(8,5,20555,'Regeneration'),
(8,5,20557,'Beast Slaying'),
(8,5,20558,'Throwing Specialization'),
(8,5,21651,'Opening'),
(8,5,21652,'Closing'),
(8,5,22027,'Remove Insignia'),
(8,5,22810,'Opening - No Text'),
(8,5,26290,'Bow Specialization'),
(8,5,26297,'Berserking'),
(8,5,45927,'Summon Friend'),
(8,5,58943,'Da Voodoo Shuffle'),
(8,5,61437,'Opening'),
(8,5,68398,'Opening'),
(8,5,76279,'Armor Skills'),
(8,5,76301,'Weapon Skills'),
(8,5,77486,'Shadow Orb Power'),
(8,5,79744,'Languages'),
(8,5,84733,'Holy Focus'),
(8,5,84734,'Dark Thoughts'),
(8,5,88684,'Holy Word: Serenity'),
(8,5,88685,'Holy Word: Sanctuary'),
(8,5,96220,'Opening'),
(8,5,101062,'Flash Heal'),
(8,6,81,'Dodge'),
(8,6,196,'One-Handed Axes'),
(8,6,197,'Two-Handed Axes'),
(8,6,198,'One-Handed Maces'),
(8,6,199,'Two-Handed Maces'),
(8,6,200,'Polearms'),
(8,6,201,'One-Handed Swords'),
(8,6,202,'Two-Handed Swords'),
(8,6,203,'Unarmed'),
(8,6,204,'Defense'),
(8,6,522,'SPELLDEFENSE (DND)'),
(8,6,669,'Language Orcish'),
(8,6,674,'Dual Wield'),
(8,6,750,'Plate Mail'),
(8,6,2382,'Generic'),
(8,6,3050,'Detect'),
(8,6,3275,'Linen Bandage'),
(8,6,3276,'Heavy Linen Bandage'),
(8,6,3277,'Wool Bandage'),
(8,6,3278,'Heavy Wool Bandage'),
(8,6,3365,'Opening'),
(8,6,6233,'Closing'),
(8,6,6246,'Closing'),
(8,6,6247,'Opening'),
(8,6,6477,'Opening'),
(8,6,6478,'Opening'),
(8,6,6603,'Auto Attack'),
(8,6,7266,'Duel'),
(8,6,7267,'Grovel'),
(8,6,7341,'Language Troll'),
(8,6,7355,'Stuck'),
(8,6,7928,'Silk Bandage'),
(8,6,7929,'Heavy Silk Bandage'),
(8,6,7934,'Anti-Venom'),
(8,6,8386,'Attacking'),
(8,6,8737,'Mail'),
(8,6,9077,'Leather'),
(8,6,9078,'Cloth'),
(8,6,9125,'Generic'),
(8,6,10840,'Mageweave Bandage'),
(8,6,10841,'Heavy Mageweave Bandage'),
(8,6,10846,'First Aid'),
(8,6,18629,'Runecloth Bandage'),
(8,6,18630,'Heavy Runecloth Bandage'),
(8,6,20555,'Regeneration'),
(8,6,20557,'Beast Slaying'),
(8,6,20558,'Throwing Specialization'),
(8,6,21651,'Opening'),
(8,6,21652,'Closing'),
(8,6,22027,'Remove Insignia'),
(8,6,22810,'Opening - No Text'),
(8,6,26290,'Bow Specialization'),
(8,6,26297,'Berserking'),
(8,6,33391,'Journeyman Riding'),
(8,6,45462,'Plague Strike'),
(8,6,45477,'Icy Touch'),
(8,6,45902,'Blood Strike'),
(8,6,45903,'Offensive State (DND)'),
(8,6,45927,'Summon Friend'),
(8,6,47541,'Death Coil'),
(8,6,48266,'Frost Presence'),
(8,6,49410,'Forceful Deflection'),
(8,6,49576,'Death Grip'),
(8,6,52665,'Relic'),
(8,6,58943,'Da Voodoo Shuffle'),
(8,6,59879,'Blood Plague'),
(8,6,59921,'Frost Fever'),
(8,6,61437,'Opening'),
(8,6,61455,'Runic Focus'),
(8,6,63644,'Activating Secondary Spec'),
(8,6,63645,'Activating Primary Spec'),
(8,6,68398,'Opening'),
(8,6,76282,'Armor Skills'),
(8,6,76292,'Weapon Skills'),
(8,6,79744,'Languages'),
(8,6,82246,'Parry'),
(8,6,89832,'Death Strike Enabler'),
(8,6,89964,'Clear Glyph'),
(8,6,96220,'Opening'),
(8,7,81,'Dodge'),
(8,7,107,'Block'),
(8,7,196,'One-Handed Axes'),
(8,7,197,'Two-Handed Axes'),
(8,7,198,'One-Handed Maces'),
(8,7,199,'Two-Handed Maces'),
(8,7,203,'Unarmed'),
(8,7,204,'Defense'),
(8,7,227,'Staves'),
(8,7,403,'Lightning Bolt'),
(8,7,522,'SPELLDEFENSE (DND)'),
(8,7,669,'Language Orcish'),
(8,7,1180,'Daggers'),
(8,7,2382,'Generic'),
(8,7,3050,'Detect'),
(8,7,3365,'Opening'),
(8,7,6233,'Closing'),
(8,7,6246,'Closing'),
(8,7,6247,'Opening'),
(8,7,6477,'Opening'),
(8,7,6478,'Opening'),
(8,7,6603,'Auto Attack'),
(8,7,7266,'Duel'),
(8,7,7267,'Grovel'),
(8,7,7341,'Language Troll'),
(8,7,7355,'Stuck'),
(8,7,8386,'Attacking'),
(8,7,9077,'Leather'),
(8,7,9078,'Cloth'),
(8,7,9116,'Shield'),
(8,7,9125,'Generic'),
(8,7,15590,'Fist Weapons'),
(8,7,20555,'Regeneration'),
(8,7,20557,'Beast Slaying'),
(8,7,20558,'Throwing Specialization'),
(8,7,21651,'Opening'),
(8,7,21652,'Closing'),
(8,7,22027,'Remove Insignia'),
(8,7,22810,'Opening - No Text'),
(8,7,26290,'Bow Specialization'),
(8,7,26297,'Berserking'),
(8,7,27763,'Relic'),
(8,7,45927,'Summon Friend'),
(8,7,58943,'Da Voodoo Shuffle'),
(8,7,61437,'Opening'),
(8,7,68398,'Opening'),
(8,7,76272,'Armor Skills'),
(8,7,76296,'Weapon Skills'),
(8,7,79744,'Languages'),
(8,7,89920,'Ancestral Focus'),
(8,7,96220,'Opening'),
(8,8,81,'Dodge'),
(8,8,133,'Fireball'),
(8,8,201,'One-Handed Swords'),
(8,8,203,'Unarmed'),
(8,8,204,'Defense'),
(8,8,227,'Staves'),
(8,8,522,'SPELLDEFENSE (DND)'),
(8,8,669,'Language Orcish'),
(8,8,1180,'Daggers'),
(8,8,2382,'Generic'),
(8,8,3050,'Detect'),
(8,8,3365,'Opening'),
(8,8,5009,'Wands'),
(8,8,5019,'Shoot'),
(8,8,6233,'Closing'),
(8,8,6246,'Closing'),
(8,8,6247,'Opening'),
(8,8,6477,'Opening'),
(8,8,6478,'Opening'),
(8,8,6603,'Auto Attack'),
(8,8,7266,'Duel'),
(8,8,7267,'Grovel'),
(8,8,7341,'Language Troll'),
(8,8,7355,'Stuck'),
(8,8,8386,'Attacking'),
(8,8,9078,'Cloth'),
(8,8,9125,'Generic'),
(8,8,20555,'Regeneration'),
(8,8,20557,'Beast Slaying'),
(8,8,20558,'Throwing Specialization'),
(8,8,21651,'Opening'),
(8,8,21652,'Closing'),
(8,8,22027,'Remove Insignia'),
(8,8,22810,'Opening - No Text'),
(8,8,26290,'Bow Specialization'),
(8,8,26297,'Berserking'),
(8,8,45927,'Summon Friend'),
(8,8,58943,'Da Voodoo Shuffle'),
(8,8,61437,'Opening'),
(8,8,68398,'Opening'),
(8,8,71761,'Deep Freeze Immunity State'),
(8,8,76276,'Armor Skills'),
(8,8,76298,'Weapon Skills'),
(8,8,79684,'Offensive State (DND)'),
(8,8,79744,'Languages'),
(8,8,85801,'DPS Caster Crit Damage Bonus'),
(8,8,92315,'Pyroblast!'),
(8,8,96220,'Opening'),
(8,9,81,'Dodge'),
(8,9,201,'One-Handed Swords'),
(8,9,203,'Unarmed'),
(8,9,204,'Defense'),
(8,9,227,'Staves'),
(8,9,522,'SPELLDEFENSE (DND)'),
(8,9,669,'Language Common'),
(8,9,686,'Shadow Bolt'),
(8,9,688,'Summon Imp'),
(8,9,1180,'Daggers'),
(8,9,2382,'Generic'),
(8,9,3050,'Detect'),
(8,9,3365,'Opening'),
(8,9,5009,'Wands'),
(8,9,5019,'Shoot'),
(8,9,6233,'Closing'),
(8,9,6246,'Closing'),
(8,9,6247,'Opening'),
(8,9,6477,'Opening'),
(8,9,6478,'Opening'),
(8,9,6603,'Auto Attack'),
(8,9,7266,'Duel'),
(8,9,7267,'Grovel'),
(8,9,7341,'Language Troll'),
(8,9,7355,'Stuck'),
(8,9,8386,'Attacking'),
(8,9,9078,'Cloth'),
(8,9,9125,'Generic'),
(8,9,20555,'Regeneration'),
(8,9,20557,'Beast Slaying'),
(8,9,20558,'Throwing Specialization'),
(8,9,21651,'Opening'),
(8,9,21652,'Closing'),
(8,9,22027,'Remove Insignia'),
(8,9,22810,'Opening - No Text'),
(8,9,26290,'Bow Specialization'),
(8,9,26297,'Berserking'),
(8,9,45927,'Summon Friend'),
(8,9,58284,'Chaos Bolt Passive'),
(8,9,58943,'Da Voodoo Shuffle'),
(8,9,61437,'Opening'),
(8,9,68398,'Opening'),
(8,9,75445,'Demonic Immolate'),
(8,9,76277,'Armor Skills'),
(8,9,76299,'Weapon Skills'),
(8,9,79744,'Languages'),
(8,9,85801,'DPS Caster Crit Damage Bonus'),
(8,9,86213,'Soul Swap Exhale'),
(8,9,87330,'Suppression'),
(8,9,89420,'Drain Life'),
(8,9,96220,'Opening'),
(8,11,81,'Dodge'),
(8,11,198,'One-Handed Maces'),
(8,11,199,'Two-Handed Maces'),
(8,11,200,'Polearms'),
(8,11,203,'Unarmed'),
(8,11,204,'Defense'),
(8,11,227,'Staves'),
(8,11,522,'SPELLDEFENSE (DND)'),
(8,11,669,'Language Orcish'),
(8,11,1180,'Daggers'),
(8,11,2382,'Generic'),
(8,11,3050,'Detect'),
(8,11,3365,'Opening'),
(8,11,5176,'Wrath'),
(8,11,6233,'Closing'),
(8,11,6246,'Closing'),
(8,11,6247,'Opening'),
(8,11,6477,'Opening'),
(8,11,6478,'Opening'),
(8,11,6603,'Auto Attack'),
(8,11,7266,'Duel'),
(8,11,7267,'Grovel'),
(8,11,7341,'Language Troll'),
(8,11,7355,'Stuck'),
(8,11,8386,'Attacking'),
(8,11,9077,'Leather'),
(8,11,9078,'Cloth'),
(8,11,9125,'Generic'),
(8,11,15590,'Fist Weapons'),
(8,11,20555,'Regeneration'),
(8,11,20557,'Beast Slaying'),
(8,11,20558,'Throwing Specialization'),
(8,11,21651,'Opening'),
(8,11,21652,'Closing'),
(8,11,22027,'Remove Insignia'),
(8,11,22810,'Opening - No Text'),
(8,11,26290,'Bow Specialization'),
(8,11,26297,'Berserking'),
(8,11,45927,'Summon Friend'),
(8,11,58943,'Da Voodoo Shuffle'),
(8,11,61437,'Opening'),
(8,11,68398,'Opening'),
(8,11,76275,'Armor Skills'),
(8,11,76300,'Weapon Skills'),
(8,11,79577,'Eclipse Mastery Driver Passive'),
(8,11,79744,'Languages'),
(8,11,81170,'Ravage!'),
(8,11,84736,'Nature\'s Focus'),
(8,11,84738,'Celestial Focus'),
(8,11,96220,'Opening'),
(9,1,81,'Dodge'),
(9,1,107,'Block'),
(9,1,196,'One-Handed Axes'),
(9,1,197,'Two-Handed Axes'),
(9,1,198,'One-Handed Maces'),
(9,1,199,'Two-Handed Maces'),
(9,1,200,'Polearms'),
(9,1,201,'One-Handed Swords'),
(9,1,202,'Two-Handed Swords'),
(9,1,203,'Unarmed'),
(9,1,204,'Defense'),
(9,1,227,'Staves'),
(9,1,264,'Bows'),
(9,1,266,'Guns'),
(9,1,522,'SPELLDEFENSE (DND)'),
(9,1,669,'Language Orcish'),
(9,1,1180,'Daggers'),
(9,1,2382,'Generic'),
(9,1,2457,'Battle Stance'),
(9,1,2567,'Thrown'),
(9,1,2764,'Throw'),
(9,1,3018,'Shoot'),
(9,1,3050,'Detect'),
(9,1,3365,'Opening'),
(9,1,5011,'Crossbows'),
(9,1,5301,'Defensive State (DND)'),
(9,1,6233,'Closing'),
(9,1,6246,'Closing'),
(9,1,6247,'Opening'),
(9,1,6477,'Opening'),
(9,1,6478,'Opening'),
(9,1,6603,'Auto Attack'),
(9,1,7266,'Duel'),
(9,1,7267,'Grovel'),
(9,1,7355,'Stuck'),
(9,1,8386,'Attacking'),
(9,1,8737,'Mail'),
(9,1,9077,'Leather'),
(9,1,9078,'Cloth'),
(9,1,9116,'Shield'),
(9,1,9125,'Generic'),
(9,1,15590,'Fist Weapons'),
(9,1,21651,'Opening'),
(9,1,21652,'Closing'),
(9,1,22027,'Remove Insignia'),
(9,1,22810,'Opening - No Text'),
(9,1,32215,'Victorious State'),
(9,1,45927,'Summon Friend'),
(9,1,49410,'Forceful Deflection'),
(9,1,61437,'Opening'),
(9,1,68398,'Opening'),
(9,1,69041,'Rocket Barrage'),
(9,1,69042,'Time is Money'),
(9,1,69044,'Best Deals Anywhere'),
(9,1,69045,'Better Living Through Chemistry'),
(9,1,69070,'Rocket Jump'),
(9,1,69269,'Language Goblin'),
(9,1,76268,'Armor Skills'),
(9,1,76290,'Weapon Skills'),
(9,1,79749,'Languages'),
(9,1,88161,'Strike'),
(9,1,88163,'Attack'),
(9,1,96220,'Opening'),
(9,3,75,'Auto Shot'),
(9,3,81,'Dodge'),
(9,3,196,'One-Handed Axes'),
(9,3,197,'Two-Handed Axes'),
(9,3,200,'Polearms'),
(9,3,201,'One-Handed Swords'),
(9,3,202,'Two-Handed Swords'),
(9,3,203,'Unarmed'),
(9,3,204,'Defense'),
(9,3,227,'Staves'),
(9,3,264,'Bows'),
(9,3,266,'Guns'),
(9,3,522,'SPELLDEFENSE (DND)'),
(9,3,669,'Language Orcish'),
(9,3,883,'Call Pet 1'),
(9,3,982,'Revive Pet'),
(9,3,1180,'Daggers'),
(9,3,2382,'Generic'),
(9,3,3044,'Arcane Shot'),
(9,3,3050,'Detect'),
(9,3,3365,'Opening'),
(9,3,5011,'Crossbows'),
(9,3,6233,'Closing'),
(9,3,6246,'Closing'),
(9,3,6247,'Opening'),
(9,3,6477,'Opening'),
(9,3,6478,'Opening'),
(9,3,6603,'Auto Attack'),
(9,3,7266,'Duel'),
(9,3,7267,'Grovel'),
(9,3,7355,'Stuck'),
(9,3,8386,'Attacking'),
(9,3,9077,'Leather'),
(9,3,9078,'Cloth'),
(9,3,9125,'Generic'),
(9,3,13358,'Defensive State (DND)'),
(9,3,15590,'Fist Weapons'),
(9,3,21651,'Opening'),
(9,3,21652,'Closing'),
(9,3,22027,'Remove Insignia'),
(9,3,22810,'Opening - No Text'),
(9,3,24949,'Defensive State 2 (DND)'),
(9,3,34082,'Hunter Passive Auras (DND)'),
(9,3,45927,'Summon Friend'),
(9,3,61437,'Opening'),
(9,3,68398,'Opening'),
(9,3,69041,'Rocket Barrage'),
(9,3,69042,'Time is Money'),
(9,3,69044,'Best Deals Anywhere'),
(9,3,69045,'Better Living Through Chemistry'),
(9,3,69070,'Rocket Jump'),
(9,3,69269,'Language Goblin'),
(9,3,76249,'Weapon Skills'),
(9,3,76250,'Armor Skills'),
(9,3,77442,'Focus'),
(9,3,79749,'Languages'),
(9,3,82928,'Aimed Shot!'),
(9,3,87324,'Focused Aim'),
(9,3,87816,'General Hunter Passives'),
(9,3,96220,'Opening'),
(9,4,81,'Dodge'),
(9,4,196,'One-Handed Axes'),
(9,4,198,'One-Handed Maces'),
(9,4,201,'One-Handed Swords'),
(9,4,203,'Unarmed'),
(9,4,204,'Defense'),
(9,4,264,'Bows'),
(9,4,266,'Guns'),
(9,4,522,'SPELLDEFENSE (DND)'),
(9,4,669,'Language Orcish'),
(9,4,674,'Dual Wield'),
(9,4,1180,'Daggers'),
(9,4,1752,'Sinister Strike'),
(9,4,2382,'Generic'),
(9,4,2567,'Thrown'),
(9,4,2764,'Throw'),
(9,4,3018,'Shoot'),
(9,4,3050,'Detect'),
(9,4,3365,'Opening'),
(9,4,5011,'Crossbows'),
(9,4,6233,'Closing'),
(9,4,6246,'Closing'),
(9,4,6247,'Opening'),
(9,4,6477,'Opening'),
(9,4,6478,'Opening'),
(9,4,6603,'Auto Attack'),
(9,4,7266,'Duel'),
(9,4,7267,'Grovel'),
(9,4,7355,'Stuck'),
(9,4,8386,'Attacking'),
(9,4,9077,'Leather'),
(9,4,9078,'Cloth'),
(9,4,9125,'Generic'),
(9,4,15590,'Fist Weapons'),
(9,4,16092,'Defensive State (DND)'),
(9,4,21651,'Opening'),
(9,4,21652,'Closing'),
(9,4,22027,'Remove Insignia'),
(9,4,22810,'Opening - No Text'),
(9,4,45927,'Summon Friend'),
(9,4,61437,'Opening'),
(9,4,68398,'Opening'),
(9,4,69041,'Rocket Barrage'),
(9,4,69042,'Time is Money'),
(9,4,69044,'Best Deals Anywhere'),
(9,4,69045,'Better Living Through Chemistry'),
(9,4,69070,'Rocket Jump'),
(9,4,69269,'Language Goblin'),
(9,4,76273,'Armor Skills'),
(9,4,76297,'Weapon Skills'),
(9,4,79749,'Languages'),
(9,4,96220,'Opening'),
(9,5,81,'Dodge'),
(9,5,198,'One-Handed Maces'),
(9,5,203,'Unarmed'),
(9,5,204,'Defense'),
(9,5,227,'Staves'),
(9,5,522,'SPELLDEFENSE (DND)'),
(9,5,585,'Smite'),
(9,5,669,'Language Orcish'),
(9,5,1180,'Daggers'),
(9,5,2382,'Generic'),
(9,5,3050,'Detect'),
(9,5,3365,'Opening'),
(9,5,5009,'Wands'),
(9,5,5019,'Shoot'),
(9,5,6233,'Closing'),
(9,5,6246,'Closing'),
(9,5,6247,'Opening'),
(9,5,6477,'Opening'),
(9,5,6478,'Opening'),
(9,5,6603,'Auto Attack'),
(9,5,7266,'Duel'),
(9,5,7267,'Grovel'),
(9,5,7355,'Stuck'),
(9,5,8386,'Attacking'),
(9,5,9078,'Cloth'),
(9,5,9125,'Generic'),
(9,5,21651,'Opening'),
(9,5,21652,'Closing'),
(9,5,22027,'Remove Insignia'),
(9,5,22810,'Opening - No Text'),
(9,5,45927,'Summon Friend'),
(9,5,61437,'Opening'),
(9,5,68398,'Opening'),
(9,5,69041,'Rocket Barrage'),
(9,5,69042,'Time is Money'),
(9,5,69044,'Best Deals Anywhere'),
(9,5,69045,'Better Living Through Chemistry'),
(9,5,69070,'Rocket Jump'),
(9,5,69269,'Language Goblin'),
(9,5,76279,'Armor Skills'),
(9,5,76301,'Weapon Skills'),
(9,5,77486,'Shadow Orb Power'),
(9,5,79749,'Languages'),
(9,5,84733,'Holy Focus'),
(9,5,84734,'Dark Thoughts'),
(9,5,88684,'Holy Word: Serenity'),
(9,5,88685,'Holy Word: Sanctuary'),
(9,5,96220,'Opening'),
(9,5,101062,'Flash Heal'),
(9,6,81,'Dodge'),
(9,6,196,'One-Handed Axes'),
(9,6,197,'Two-Handed Axes'),
(9,6,198,'One-Handed Maces'),
(9,6,199,'Two-Handed Maces'),
(9,6,200,'Polearms'),
(9,6,201,'One-Handed Swords'),
(9,6,202,'Two-Handed Swords'),
(9,6,203,'Unarmed'),
(9,6,204,'Defense'),
(9,6,522,'SPELLDEFENSE (DND)'),
(9,6,669,'Language Orcish'),
(9,6,674,'Dual Wield'),
(9,6,750,'Plate Mail'),
(9,6,2382,'Generic'),
(9,6,3050,'Detect'),
(9,6,3275,'Linen Bandage'),
(9,6,3276,'Heavy Linen Bandage'),
(9,6,3277,'Wool Bandage'),
(9,6,3278,'Heavy Wool Bandage'),
(9,6,3365,'Opening'),
(9,6,6233,'Closing'),
(9,6,6246,'Closing'),
(9,6,6247,'Opening'),
(9,6,6477,'Opening'),
(9,6,6478,'Opening'),
(9,6,6603,'Auto Attack'),
(9,6,7266,'Duel'),
(9,6,7267,'Grovel'),
(9,6,7355,'Stuck'),
(9,6,7928,'Silk Bandage'),
(9,6,7929,'Heavy Silk Bandage'),
(9,6,7934,'Anti-Venom'),
(9,6,8386,'Attacking'),
(9,6,8737,'Mail'),
(9,6,9077,'Leather'),
(9,6,9078,'Cloth'),
(9,6,9125,'Generic'),
(9,6,10840,'Mageweave Bandage'),
(9,6,10841,'Heavy Mageweave Bandage'),
(9,6,10846,'First Aid'),
(9,6,18629,'Runecloth Bandage'),
(9,6,18630,'Heavy Runecloth Bandage'),
(9,6,21651,'Opening'),
(9,6,21652,'Closing'),
(9,6,22027,'Remove Insignia'),
(9,6,22810,'Opening - No Text'),
(9,6,33391,'Journeyman Riding'),
(9,6,45462,'Plague Strike'),
(9,6,45477,'Icy Touch'),
(9,6,45902,'Blood Strike'),
(9,6,45903,'Offensive State (DND)'),
(9,6,45927,'Summon Friend'),
(9,6,47541,'Death Coil'),
(9,6,48266,'Frost Presence'),
(9,6,49410,'Forceful Deflection'),
(9,6,49576,'Death Grip'),
(9,6,52665,'Relic'),
(9,6,59879,'Blood Plague'),
(9,6,59921,'Frost Fever'),
(9,6,61437,'Opening'),
(9,6,61455,'Runic Focus'),
(9,6,63644,'Activating Secondary Spec'),
(9,6,63645,'Activating Primary Spec'),
(9,6,68398,'Opening'),
(9,6,69041,'Rocket Barrage'),
(9,6,69042,'Time is Money'),
(9,6,69044,'Best Deals Anywhere'),
(9,6,69045,'Better Living Through Chemistry'),
(9,6,69046,'Pack Hobgoblin'),
(9,6,69070,'Rocket Jump'),
(9,6,69269,'Language Goblin'),
(9,6,76282,'Armor Skills'),
(9,6,76292,'Weapon Skills'),
(9,6,79749,'Languages'),
(9,6,82246,'Parry'),
(9,6,89832,'Death Strike Enabler'),
(9,6,89964,'Clear Glyph'),
(9,6,96220,'Opening'),
(9,7,81,'Dodge'),
(9,7,107,'Block'),
(9,7,196,'One-Handed Axes'),
(9,7,197,'Two-Handed Axes'),
(9,7,198,'One-Handed Maces'),
(9,7,199,'Two-Handed Maces'),
(9,7,203,'Unarmed'),
(9,7,204,'Defense'),
(9,7,227,'Staves'),
(9,7,403,'Lightning Bolt'),
(9,7,522,'SPELLDEFENSE (DND)'),
(9,7,669,'Language Orcish'),
(9,7,1180,'Daggers'),
(9,7,2382,'Generic'),
(9,7,3050,'Detect'),
(9,7,3365,'Opening'),
(9,7,6233,'Closing'),
(9,7,6246,'Closing'),
(9,7,6247,'Opening'),
(9,7,6477,'Opening'),
(9,7,6478,'Opening'),
(9,7,6603,'Auto Attack'),
(9,7,7266,'Duel'),
(9,7,7267,'Grovel'),
(9,7,7355,'Stuck'),
(9,7,8386,'Attacking'),
(9,7,9077,'Leather'),
(9,7,9078,'Cloth'),
(9,7,9116,'Shield'),
(9,7,9125,'Generic'),
(9,7,15590,'Fist Weapons'),
(9,7,21651,'Opening'),
(9,7,21652,'Closing'),
(9,7,22027,'Remove Insignia'),
(9,7,22810,'Opening - No Text'),
(9,7,27763,'Relic'),
(9,7,45927,'Summon Friend'),
(9,7,61437,'Opening'),
(9,7,68398,'Opening'),
(9,7,69041,'Rocket Barrage'),
(9,7,69042,'Time is Money'),
(9,7,69044,'Best Deals Anywhere'),
(9,7,69045,'Better Living Through Chemistry'),
(9,7,69070,'Rocket Jump'),
(9,7,69269,'Language Goblin'),
(9,7,76272,'Armor Skills'),
(9,7,76296,'Weapon Skills'),
(9,7,79749,'Languages'),
(9,7,89920,'Ancestral Focus'),
(9,7,96220,'Opening'),
(9,8,81,'Dodge'),
(9,8,133,'Fireball'),
(9,8,201,'One-Handed Swords'),
(9,8,203,'Unarmed'),
(9,8,204,'Defense'),
(9,8,227,'Staves'),
(9,8,522,'SPELLDEFENSE (DND)'),
(9,8,669,'Language Orcish'),
(9,8,1180,'Daggers'),
(9,8,2382,'Generic'),
(9,8,3050,'Detect'),
(9,8,3365,'Opening'),
(9,8,5009,'Wands'),
(9,8,5019,'Shoot'),
(9,8,6233,'Closing'),
(9,8,6246,'Closing'),
(9,8,6247,'Opening'),
(9,8,6477,'Opening'),
(9,8,6478,'Opening'),
(9,8,6603,'Auto Attack'),
(9,8,7266,'Duel'),
(9,8,7267,'Grovel'),
(9,8,7355,'Stuck'),
(9,8,8386,'Attacking'),
(9,8,9078,'Cloth'),
(9,8,9125,'Generic'),
(9,8,21651,'Opening'),
(9,8,21652,'Closing'),
(9,8,22027,'Remove Insignia'),
(9,8,22810,'Opening - No Text'),
(9,8,45927,'Summon Friend'),
(9,8,61437,'Opening'),
(9,8,68398,'Opening'),
(9,8,69041,'Rocket Barrage'),
(9,8,69042,'Time is Money'),
(9,8,69044,'Best Deals Anywhere'),
(9,8,69045,'Better Living Through Chemistry'),
(9,8,69070,'Rocket Jump'),
(9,8,69269,'Language Goblin'),
(9,8,71761,'Deep Freeze Immunity State'),
(9,8,76276,'Armor Skills'),
(9,8,76298,'Weapon Skills'),
(9,8,79684,'Offensive State (DND)'),
(9,8,79749,'Languages'),
(9,8,85801,'DPS Caster Crit Damage Bonus'),
(9,8,92315,'Pyroblast!'),
(9,8,96220,'Opening'),
(9,9,81,'Dodge'),
(9,9,201,'One-Handed Swords'),
(9,9,203,'Unarmed'),
(9,9,204,'Defense'),
(9,9,227,'Staves'),
(9,9,522,'SPELLDEFENSE (DND)'),
(9,9,669,'Language Common'),
(9,9,686,'Shadow Bolt'),
(9,9,688,'Summon Imp'),
(9,9,1180,'Daggers'),
(9,9,2382,'Generic'),
(9,9,3050,'Detect'),
(9,9,3365,'Opening'),
(9,9,5009,'Wands'),
(9,9,5019,'Shoot'),
(9,9,6233,'Closing'),
(9,9,6246,'Closing'),
(9,9,6247,'Opening'),
(9,9,6477,'Opening'),
(9,9,6478,'Opening'),
(9,9,6603,'Auto Attack'),
(9,9,7266,'Duel'),
(9,9,7267,'Grovel'),
(9,9,7355,'Stuck'),
(9,9,8386,'Attacking'),
(9,9,9078,'Cloth'),
(9,9,9125,'Generic'),
(9,9,21651,'Opening'),
(9,9,21652,'Closing'),
(9,9,22027,'Remove Insignia'),
(9,9,22810,'Opening - No Text'),
(9,9,45927,'Summon Friend'),
(9,9,58284,'Chaos Bolt Passive'),
(9,9,61437,'Opening'),
(9,9,68398,'Opening'),
(9,9,69041,'Rocket Barrage'),
(9,9,69042,'Time is Money'),
(9,9,69044,'Best Deals Anywhere'),
(9,9,69045,'Better Living Through Chemistry'),
(9,9,69070,'Rocket Jump'),
(9,9,69269,'Language Goblin'),
(9,9,75445,'Demonic Immolate'),
(9,9,76277,'Armor Skills'),
(9,9,76299,'Weapon Skills'),
(9,9,79749,'Languages'),
(9,9,85801,'DPS Caster Crit Damage Bonus'),
(9,9,86213,'Soul Swap Exhale'),
(9,9,87330,'Suppression'),
(9,9,89420,'Drain Life'),
(9,9,96220,'Opening'),
(10,1,81,'Dodge'),
(10,1,107,'Block'),
(10,1,196,'One-Handed Axes'),
(10,1,197,'Two-Handed Axes'),
(10,1,198,'One-Handed Maces'),
(10,1,199,'Two-Handed Maces'),
(10,1,200,'Polearms'),
(10,1,201,'One-Handed Swords'),
(10,1,202,'Two-Handed Swords'),
(10,1,203,'Unarmed'),
(10,1,204,'Defense'),
(10,1,227,'Staves'),
(10,1,264,'Bows'),
(10,1,266,'Guns'),
(10,1,522,'SPELLDEFENSE (DND)'),
(10,1,669,'Language Orcish'),
(10,1,813,'Language Thalassian'),
(10,1,822,'Arcane Resistance'),
(10,1,1180,'Daggers'),
(10,1,2382,'Generic'),
(10,1,2457,'Battle Stance'),
(10,1,2567,'Thrown'),
(10,1,2764,'Throw'),
(10,1,3018,'Shoot'),
(10,1,3050,'Detect'),
(10,1,3365,'Opening'),
(10,1,5011,'Crossbows'),
(10,1,5301,'Defensive State (DND)'),
(10,1,6233,'Closing'),
(10,1,6246,'Closing'),
(10,1,6247,'Opening'),
(10,1,6477,'Opening'),
(10,1,6478,'Opening'),
(10,1,6603,'Auto Attack'),
(10,1,7266,'Duel'),
(10,1,7267,'Grovel'),
(10,1,7355,'Stuck'),
(10,1,8386,'Attacking'),
(10,1,8737,'Mail'),
(10,1,9077,'Leather'),
(10,1,9078,'Cloth'),
(10,1,9116,'Shield'),
(10,1,9125,'Generic'),
(10,1,15590,'Fist Weapons'),
(10,1,21651,'Opening'),
(10,1,21652,'Closing'),
(10,1,22027,'Remove Insignia'),
(10,1,22810,'Opening - No Text'),
(10,1,28877,'Arcane Affinity'),
(10,1,32215,'Victorious State'),
(10,1,45927,'Summon Friend'),
(10,1,49410,'Forceful Deflection'),
(10,1,61437,'Opening'),
(10,1,68398,'Opening'),
(10,1,69179,'Arcane Torrent'),
(10,1,76268,'Armor Skills'),
(10,1,76290,'Weapon Skills'),
(10,1,79748,'Languages'),
(10,1,88161,'Strike'),
(10,1,88163,'Attack'),
(10,1,96220,'Opening'),
(10,2,81,'Dodge'),
(10,2,107,'Block'),
(10,2,196,'One-Handed Axes'),
(10,2,197,'Two-Handed Axes'),
(10,2,198,'One-Handed Maces'),
(10,2,199,'Two-Handed Maces'),
(10,2,200,'Polearms'),
(10,2,201,'One-Handed Swords'),
(10,2,202,'Two-Handed Swords'),
(10,2,203,'Unarmed'),
(10,2,204,'Defense'),
(10,2,522,'SPELLDEFENSE (DND)'),
(10,2,669,'Language Orcish'),
(10,2,813,'Language Thalassian'),
(10,2,822,'Arcane Resistance'),
(10,2,2382,'Generic'),
(10,2,3050,'Detect'),
(10,2,3365,'Opening'),
(10,2,6233,'Closing'),
(10,2,6246,'Closing'),
(10,2,6247,'Opening'),
(10,2,6477,'Opening'),
(10,2,6478,'Opening'),
(10,2,6603,'Auto Attack'),
(10,2,7266,'Duel'),
(10,2,7267,'Grovel'),
(10,2,7355,'Stuck'),
(10,2,8386,'Attacking'),
(10,2,8737,'Mail'),
(10,2,9077,'Leather'),
(10,2,9078,'Cloth'),
(10,2,9116,'Shield'),
(10,2,9125,'Generic'),
(10,2,20208,'Paladin pushback resistance'),
(10,2,21651,'Opening'),
(10,2,21652,'Closing'),
(10,2,22027,'Remove Insignia'),
(10,2,22810,'Opening - No Text'),
(10,2,27762,'Relic'),
(10,2,28730,'Arcane Torrent'),
(10,2,28877,'Arcane Affinity'),
(10,2,35395,'Crusader Strike'),
(10,2,45927,'Summon Friend'),
(10,2,49410,'Forceful Deflection'),
(10,2,60091,'Judgement Anti-Parry/Dodge Passive'),
(10,2,61437,'Opening'),
(10,2,68398,'Opening'),
(10,2,76271,'Armor Skills'),
(10,2,76294,'Weapon Skills'),
(10,2,79748,'Languages'),
(10,2,96220,'Opening'),
(10,3,75,'Auto Shot'),
(10,3,81,'Dodge'),
(10,3,196,'One-Handed Axes'),
(10,3,197,'Two-Handed Axes'),
(10,3,200,'Polearms'),
(10,3,201,'One-Handed Swords'),
(10,3,202,'Two-Handed Swords'),
(10,3,203,'Unarmed'),
(10,3,204,'Defense'),
(10,3,227,'Staves'),
(10,3,264,'Bows'),
(10,3,266,'Guns'),
(10,3,522,'SPELLDEFENSE (DND)'),
(10,3,669,'Language Orcish'),
(10,3,813,'Language Thalassian'),
(10,3,822,'Arcane Resistance'),
(10,3,883,'Call Pet 1'),
(10,3,982,'Revive Pet'),
(10,3,1180,'Daggers'),
(10,3,2382,'Generic'),
(10,3,3044,'Arcane Shot'),
(10,3,3050,'Detect'),
(10,3,3365,'Opening'),
(10,3,5011,'Crossbows'),
(10,3,6233,'Closing'),
(10,3,6246,'Closing'),
(10,3,6247,'Opening'),
(10,3,6477,'Opening'),
(10,3,6478,'Opening'),
(10,3,6603,'Auto Attack'),
(10,3,7266,'Duel'),
(10,3,7267,'Grovel'),
(10,3,7355,'Stuck'),
(10,3,8386,'Attacking'),
(10,3,9077,'Leather'),
(10,3,9078,'Cloth'),
(10,3,9125,'Generic'),
(10,3,13358,'Defensive State (DND)'),
(10,3,15590,'Fist Weapons'),
(10,3,21651,'Opening'),
(10,3,21652,'Closing'),
(10,3,22027,'Remove Insignia'),
(10,3,22810,'Opening - No Text'),
(10,3,24949,'Defensive State 2 (DND)'),
(10,3,28877,'Arcane Affinity'),
(10,3,34082,'Hunter Passive Auras (DND)'),
(10,3,45927,'Summon Friend'),
(10,3,61437,'Opening'),
(10,3,68398,'Opening'),
(10,3,76249,'Weapon Skills'),
(10,3,76250,'Armor Skills'),
(10,3,77442,'Focus'),
(10,3,79748,'Languages'),
(10,3,80483,'Arcane Torrent'),
(10,3,82928,'Aimed Shot!'),
(10,3,87324,'Focused Aim'),
(10,3,87816,'General Hunter Passives'),
(10,3,96220,'Opening'),
(10,4,81,'Dodge'),
(10,4,196,'One-Handed Axes'),
(10,4,198,'One-Handed Maces'),
(10,4,201,'One-Handed Swords'),
(10,4,203,'Unarmed'),
(10,4,204,'Defense'),
(10,4,264,'Bows'),
(10,4,266,'Guns'),
(10,4,522,'SPELLDEFENSE (DND)'),
(10,4,669,'Language Orcish'),
(10,4,674,'Dual Wield'),
(10,4,813,'Language Thalassian'),
(10,4,822,'Arcane Resistance'),
(10,4,1180,'Daggers'),
(10,4,1752,'Sinister Strike'),
(10,4,2382,'Generic'),
(10,4,2567,'Thrown'),
(10,4,2764,'Throw'),
(10,4,3018,'Shoot'),
(10,4,3050,'Detect'),
(10,4,3365,'Opening'),
(10,4,5011,'Crossbows'),
(10,4,6233,'Closing'),
(10,4,6246,'Closing'),
(10,4,6247,'Opening'),
(10,4,6477,'Opening'),
(10,4,6478,'Opening'),
(10,4,6603,'Auto Attack'),
(10,4,7266,'Duel'),
(10,4,7267,'Grovel'),
(10,4,7355,'Stuck'),
(10,4,8386,'Attacking'),
(10,4,9077,'Leather'),
(10,4,9078,'Cloth'),
(10,4,9125,'Generic'),
(10,4,15590,'Fist Weapons'),
(10,4,16092,'Defensive State (DND)'),
(10,4,21651,'Opening'),
(10,4,21652,'Closing'),
(10,4,22027,'Remove Insignia'),
(10,4,22810,'Opening - No Text'),
(10,4,25046,'Arcane Torrent'),
(10,4,28877,'Arcane Affinity'),
(10,4,45927,'Summon Friend'),
(10,4,61437,'Opening'),
(10,4,68398,'Opening'),
(10,4,76273,'Armor Skills'),
(10,4,76297,'Weapon Skills'),
(10,4,79748,'Languages'),
(10,4,96220,'Opening'),
(10,5,81,'Dodge'),
(10,5,198,'One-Handed Maces'),
(10,5,203,'Unarmed'),
(10,5,204,'Defense'),
(10,5,227,'Staves'),
(10,5,522,'SPELLDEFENSE (DND)'),
(10,5,585,'Smite'),
(10,5,669,'Language Orcish'),
(10,5,813,'Language Thalassian'),
(10,5,822,'Arcane Resistance'),
(10,5,1180,'Daggers'),
(10,5,2382,'Generic'),
(10,5,3050,'Detect'),
(10,5,3365,'Opening'),
(10,5,5009,'Wands'),
(10,5,5019,'Shoot'),
(10,5,6233,'Closing'),
(10,5,6246,'Closing'),
(10,5,6247,'Opening'),
(10,5,6477,'Opening'),
(10,5,6478,'Opening'),
(10,5,6603,'Auto Attack'),
(10,5,7266,'Duel'),
(10,5,7267,'Grovel'),
(10,5,7355,'Stuck'),
(10,5,8386,'Attacking'),
(10,5,9078,'Cloth'),
(10,5,9125,'Generic'),
(10,5,21651,'Opening'),
(10,5,21652,'Closing'),
(10,5,22027,'Remove Insignia'),
(10,5,22810,'Opening - No Text'),
(10,5,28730,'Arcane Torrent'),
(10,5,28877,'Arcane Affinity'),
(10,5,45927,'Summon Friend'),
(10,5,61437,'Opening'),
(10,5,68398,'Opening'),
(10,5,76279,'Armor Skills'),
(10,5,76301,'Weapon Skills'),
(10,5,77486,'Shadow Orb Power'),
(10,5,79748,'Languages'),
(10,5,84733,'Holy Focus'),
(10,5,84734,'Dark Thoughts'),
(10,5,88684,'Holy Word: Serenity'),
(10,5,88685,'Holy Word: Sanctuary'),
(10,5,96220,'Opening'),
(10,5,101062,'Flash Heal'),
(10,6,81,'Dodge'),
(10,6,196,'One-Handed Axes'),
(10,6,197,'Two-Handed Axes'),
(10,6,198,'One-Handed Maces'),
(10,6,199,'Two-Handed Maces'),
(10,6,200,'Polearms'),
(10,6,201,'One-Handed Swords'),
(10,6,202,'Two-Handed Swords'),
(10,6,203,'Unarmed'),
(10,6,204,'Defense'),
(10,6,522,'SPELLDEFENSE (DND)'),
(10,6,669,'Language Orcish'),
(10,6,674,'Dual Wield'),
(10,6,750,'Plate Mail'),
(10,6,813,'Language Thalassian'),
(10,6,822,'Arcane Resistance'),
(10,6,2382,'Generic'),
(10,6,3050,'Detect'),
(10,6,3275,'Linen Bandage'),
(10,6,3276,'Heavy Linen Bandage'),
(10,6,3277,'Wool Bandage'),
(10,6,3278,'Heavy Wool Bandage'),
(10,6,3365,'Opening'),
(10,6,6233,'Closing'),
(10,6,6246,'Closing'),
(10,6,6247,'Opening'),
(10,6,6477,'Opening'),
(10,6,6478,'Opening'),
(10,6,6603,'Auto Attack'),
(10,6,7266,'Duel'),
(10,6,7267,'Grovel'),
(10,6,7355,'Stuck'),
(10,6,7928,'Silk Bandage'),
(10,6,7929,'Heavy Silk Bandage'),
(10,6,7934,'Anti-Venom'),
(10,6,8386,'Attacking'),
(10,6,8737,'Mail'),
(10,6,9077,'Leather'),
(10,6,9078,'Cloth'),
(10,6,9125,'Generic'),
(10,6,10840,'Mageweave Bandage'),
(10,6,10841,'Heavy Mageweave Bandage'),
(10,6,10846,'First Aid'),
(10,6,18629,'Runecloth Bandage'),
(10,6,18630,'Heavy Runecloth Bandage'),
(10,6,21651,'Opening'),
(10,6,21652,'Closing'),
(10,6,22027,'Remove Insignia'),
(10,6,22810,'Opening - No Text'),
(10,6,28877,'Arcane Affinity'),
(10,6,33391,'Journeyman Riding'),
(10,6,45462,'Plague Strike'),
(10,6,45477,'Icy Touch'),
(10,6,45902,'Blood Strike'),
(10,6,45903,'Offensive State (DND)'),
(10,6,45927,'Summon Friend'),
(10,6,47541,'Death Coil'),
(10,6,48266,'Frost Presence'),
(10,6,49410,'Forceful Deflection'),
(10,6,49576,'Death Grip'),
(10,6,50613,'Arcane Torrent'),
(10,6,52665,'Relic'),
(10,6,59879,'Blood Plague'),
(10,6,59921,'Frost Fever'),
(10,6,61437,'Opening'),
(10,6,61455,'Runic Focus'),
(10,6,63644,'Activating Secondary Spec'),
(10,6,63645,'Activating Primary Spec'),
(10,6,68398,'Opening'),
(10,6,76282,'Armor Skills'),
(10,6,76292,'Weapon Skills'),
(10,6,79748,'Languages'),
(10,6,82246,'Parry'),
(10,6,89832,'Death Strike Enabler'),
(10,6,89964,'Clear Glyph'),
(10,6,96220,'Opening'),
(10,8,81,'Dodge'),
(10,8,133,'Fireball'),
(10,8,201,'One-Handed Swords'),
(10,8,203,'Unarmed'),
(10,8,204,'Defense'),
(10,8,227,'Staves'),
(10,8,522,'SPELLDEFENSE (DND)'),
(10,8,669,'Language Orcish'),
(10,8,813,'Language Thalassian'),
(10,8,822,'Arcane Resistance'),
(10,8,1180,'Daggers'),
(10,8,2382,'Generic'),
(10,8,3050,'Detect'),
(10,8,3365,'Opening'),
(10,8,5009,'Wands'),
(10,8,5019,'Shoot'),
(10,8,6233,'Closing'),
(10,8,6246,'Closing'),
(10,8,6247,'Opening'),
(10,8,6477,'Opening'),
(10,8,6478,'Opening'),
(10,8,6603,'Auto Attack'),
(10,8,7266,'Duel'),
(10,8,7267,'Grovel'),
(10,8,7355,'Stuck'),
(10,8,8386,'Attacking'),
(10,8,9078,'Cloth'),
(10,8,9125,'Generic'),
(10,8,21651,'Opening'),
(10,8,21652,'Closing'),
(10,8,22027,'Remove Insignia'),
(10,8,22810,'Opening - No Text'),
(10,8,28730,'Arcane Torrent'),
(10,8,28877,'Arcane Affinity'),
(10,8,45927,'Summon Friend'),
(10,8,61437,'Opening'),
(10,8,68398,'Opening'),
(10,8,71761,'Deep Freeze Immunity State'),
(10,8,76276,'Armor Skills'),
(10,8,76298,'Weapon Skills'),
(10,8,79684,'Offensive State (DND)'),
(10,8,79748,'Languages'),
(10,8,85801,'DPS Caster Crit Damage Bonus'),
(10,8,92315,'Pyroblast!'),
(10,8,96220,'Opening'),
(10,9,81,'Dodge'),
(10,9,201,'One-Handed Swords'),
(10,9,203,'Unarmed'),
(10,9,204,'Defense'),
(10,9,227,'Staves'),
(10,9,522,'SPELLDEFENSE (DND)'),
(10,9,669,'Language Common'),
(10,9,686,'Shadow Bolt'),
(10,9,688,'Summon Imp'),
(10,9,813,'Language Thalassian'),
(10,9,822,'Arcane Resistance'),
(10,9,1180,'Daggers'),
(10,9,2382,'Generic'),
(10,9,3050,'Detect'),
(10,9,3365,'Opening'),
(10,9,5009,'Wands'),
(10,9,5019,'Shoot'),
(10,9,6233,'Closing'),
(10,9,6246,'Closing'),
(10,9,6247,'Opening'),
(10,9,6477,'Opening'),
(10,9,6478,'Opening'),
(10,9,6603,'Auto Attack'),
(10,9,7266,'Duel'),
(10,9,7267,'Grovel'),
(10,9,7355,'Stuck'),
(10,9,8386,'Attacking'),
(10,9,9078,'Cloth'),
(10,9,9125,'Generic'),
(10,9,21651,'Opening'),
(10,9,21652,'Closing'),
(10,9,22027,'Remove Insignia'),
(10,9,22810,'Opening - No Text'),
(10,9,28730,'Arcane Torrent'),
(10,9,28877,'Arcane Affinity'),
(10,9,45927,'Summon Friend'),
(10,9,58284,'Chaos Bolt Passive'),
(10,9,61437,'Opening'),
(10,9,68398,'Opening'),
(10,9,75445,'Demonic Immolate'),
(10,9,76277,'Armor Skills'),
(10,9,76299,'Weapon Skills'),
(10,9,79748,'Languages'),
(10,9,85801,'DPS Caster Crit Damage Bonus'),
(10,9,86213,'Soul Swap Exhale'),
(10,9,87330,'Suppression'),
(10,9,89420,'Drain Life'),
(10,9,96220,'Opening'),
(11,1,81,'Dodge'),
(11,1,107,'Block'),
(11,1,196,'One-Handed Axes'),
(11,1,197,'Two-Handed Axes'),
(11,1,198,'One-Handed Maces'),
(11,1,199,'Two-Handed Maces'),
(11,1,200,'Polearms'),
(11,1,201,'One-Handed Swords'),
(11,1,202,'Two-Handed Swords'),
(11,1,203,'Unarmed'),
(11,1,204,'Defense'),
(11,1,227,'Staves'),
(11,1,264,'Bows'),
(11,1,266,'Guns'),
(11,1,522,'SPELLDEFENSE (DND)'),
(11,1,668,'Language Common'),
(11,1,1180,'Daggers'),
(11,1,2382,'Generic'),
(11,1,2457,'Battle Stance'),
(11,1,2567,'Thrown'),
(11,1,2764,'Throw'),
(11,1,3018,'Shoot'),
(11,1,3050,'Detect'),
(11,1,3365,'Opening'),
(11,1,5011,'Crossbows'),
(11,1,5301,'Defensive State (DND)'),
(11,1,6233,'Closing'),
(11,1,6246,'Closing'),
(11,1,6247,'Opening'),
(11,1,6477,'Opening'),
(11,1,6478,'Opening'),
(11,1,6562,'Heroic Presence'),
(11,1,6603,'Auto Attack'),
(11,1,7266,'Duel'),
(11,1,7267,'Grovel'),
(11,1,7355,'Stuck'),
(11,1,8386,'Attacking'),
(11,1,8737,'Mail'),
(11,1,9077,'Leather'),
(11,1,9078,'Cloth'),
(11,1,9116,'Shield'),
(11,1,9125,'Generic'),
(11,1,15590,'Fist Weapons'),
(11,1,21651,'Opening'),
(11,1,21652,'Closing'),
(11,1,22027,'Remove Insignia'),
(11,1,22810,'Opening - No Text'),
(11,1,28875,'Gemcutting'),
(11,1,28880,'Gift of the Naaru'),
(11,1,29932,'Language Draenei'),
(11,1,32215,'Victorious State'),
(11,1,45927,'Summon Friend'),
(11,1,49410,'Forceful Deflection'),
(11,1,59221,'Shadow Resistance'),
(11,1,61437,'Opening'),
(11,1,68398,'Opening'),
(11,1,76268,'Armor Skills'),
(11,1,76290,'Weapon Skills'),
(11,1,79741,'Languages'),
(11,1,88161,'Strike'),
(11,1,88163,'Attack'),
(11,1,96220,'Opening'),
(11,2,81,'Dodge'),
(11,2,107,'Block'),
(11,2,196,'One-Handed Axes'),
(11,2,197,'Two-Handed Axes'),
(11,2,198,'One-Handed Maces'),
(11,2,199,'Two-Handed Maces'),
(11,2,200,'Polearms'),
(11,2,201,'One-Handed Swords'),
(11,2,202,'Two-Handed Swords'),
(11,2,203,'Unarmed'),
(11,2,204,'Defense'),
(11,2,522,'SPELLDEFENSE (DND)'),
(11,2,668,'Language Common'),
(11,2,2382,'Generic'),
(11,2,3050,'Detect'),
(11,2,3365,'Opening'),
(11,2,6233,'Closing'),
(11,2,6246,'Closing'),
(11,2,6247,'Opening'),
(11,2,6477,'Opening'),
(11,2,6478,'Opening'),
(11,2,6562,'Heroic Presence'),
(11,2,6603,'Auto Attack'),
(11,2,7266,'Duel'),
(11,2,7267,'Grovel'),
(11,2,7355,'Stuck'),
(11,2,8386,'Attacking'),
(11,2,8737,'Mail'),
(11,2,9077,'Leather'),
(11,2,9078,'Cloth'),
(11,2,9116,'Shield'),
(11,2,9125,'Generic'),
(11,2,20208,'Paladin pushback resistance'),
(11,2,21651,'Opening'),
(11,2,21652,'Closing'),
(11,2,22027,'Remove Insignia'),
(11,2,22810,'Opening - No Text'),
(11,2,27762,'Relic'),
(11,2,28875,'Gemcutting'),
(11,2,29932,'Language Draenei'),
(11,2,35395,'Crusader Strike'),
(11,2,45927,'Summon Friend'),
(11,2,49410,'Forceful Deflection'),
(11,2,59535,'Shadow Resistance'),
(11,2,59542,'Gift of the Naaru'),
(11,2,60091,'Judgement Anti-Parry/Dodge Passive'),
(11,2,61437,'Opening'),
(11,2,68398,'Opening'),
(11,2,76271,'Armor Skills'),
(11,2,76294,'Weapon Skills'),
(11,2,79741,'Languages'),
(11,2,96220,'Opening'),
(11,3,75,'Auto Shot'),
(11,3,81,'Dodge'),
(11,3,196,'One-Handed Axes'),
(11,3,197,'Two-Handed Axes'),
(11,3,200,'Polearms'),
(11,3,201,'One-Handed Swords'),
(11,3,202,'Two-Handed Swords'),
(11,3,203,'Unarmed'),
(11,3,204,'Defense'),
(11,3,227,'Staves'),
(11,3,264,'Bows'),
(11,3,266,'Guns'),
(11,3,522,'SPELLDEFENSE (DND)'),
(11,3,668,'Language Common'),
(11,3,883,'Call Pet 1'),
(11,3,982,'Revive Pet'),
(11,3,1180,'Daggers'),
(11,3,2382,'Generic'),
(11,3,3044,'Arcane Shot'),
(11,3,3050,'Detect'),
(11,3,3365,'Opening'),
(11,3,5011,'Crossbows'),
(11,3,6233,'Closing'),
(11,3,6246,'Closing'),
(11,3,6247,'Opening'),
(11,3,6477,'Opening'),
(11,3,6478,'Opening'),
(11,3,6562,'Heroic Presence'),
(11,3,6603,'Auto Attack'),
(11,3,7266,'Duel'),
(11,3,7267,'Grovel'),
(11,3,7355,'Stuck'),
(11,3,8386,'Attacking'),
(11,3,9077,'Leather'),
(11,3,9078,'Cloth'),
(11,3,9125,'Generic'),
(11,3,13358,'Defensive State (DND)'),
(11,3,15590,'Fist Weapons'),
(11,3,21651,'Opening'),
(11,3,21652,'Closing'),
(11,3,22027,'Remove Insignia'),
(11,3,22810,'Opening - No Text'),
(11,3,24949,'Defensive State 2 (DND)'),
(11,3,28875,'Gemcutting'),
(11,3,29932,'Language Draenei'),
(11,3,34082,'Hunter Passive Auras (DND)'),
(11,3,45927,'Summon Friend'),
(11,3,59536,'Shadow Resistance'),
(11,3,59543,'Gift of the Naaru'),
(11,3,61437,'Opening'),
(11,3,68398,'Opening'),
(11,3,76249,'Weapon Skills'),
(11,3,76250,'Armor Skills'),
(11,3,77442,'Focus'),
(11,3,79741,'Languages'),
(11,3,82928,'Aimed Shot!'),
(11,3,87324,'Focused Aim'),
(11,3,87816,'General Hunter Passives'),
(11,3,96220,'Opening'),
(11,5,81,'Dodge'),
(11,5,198,'One-Handed Maces'),
(11,5,203,'Unarmed'),
(11,5,204,'Defense'),
(11,5,227,'Staves'),
(11,5,522,'SPELLDEFENSE (DND)'),
(11,5,585,'Smite'),
(11,5,668,'Language Common'),
(11,5,1180,'Daggers'),
(11,5,2382,'Generic'),
(11,5,3050,'Detect'),
(11,5,3365,'Opening'),
(11,5,5009,'Wands'),
(11,5,5019,'Shoot'),
(11,5,6233,'Closing'),
(11,5,6246,'Closing'),
(11,5,6247,'Opening'),
(11,5,6477,'Opening'),
(11,5,6478,'Opening'),
(11,5,6603,'Auto Attack'),
(11,5,7266,'Duel'),
(11,5,7267,'Grovel'),
(11,5,7355,'Stuck'),
(11,5,8386,'Attacking'),
(11,5,9078,'Cloth'),
(11,5,9125,'Generic'),
(11,5,21651,'Opening'),
(11,5,21652,'Closing'),
(11,5,22027,'Remove Insignia'),
(11,5,22810,'Opening - No Text'),
(11,5,28875,'Gemcutting'),
(11,5,28878,'Heroic Presence'),
(11,5,29932,'Language Draenei'),
(11,5,45927,'Summon Friend'),
(11,5,59538,'Shadow Resistance'),
(11,5,59544,'Gift of the Naaru'),
(11,5,61437,'Opening'),
(11,5,68398,'Opening'),
(11,5,76279,'Armor Skills'),
(11,5,76301,'Weapon Skills'),
(11,5,77486,'Shadow Orb Power'),
(11,5,79741,'Languages'),
(11,5,84733,'Holy Focus'),
(11,5,84734,'Dark Thoughts'),
(11,5,88684,'Holy Word: Serenity'),
(11,5,88685,'Holy Word: Sanctuary'),
(11,5,96220,'Opening'),
(11,5,101062,'Flash Heal'),
(11,6,81,'Dodge'),
(11,6,196,'One-Handed Axes'),
(11,6,197,'Two-Handed Axes'),
(11,6,198,'One-Handed Maces'),
(11,6,199,'Two-Handed Maces'),
(11,6,200,'Polearms'),
(11,6,201,'One-Handed Swords'),
(11,6,202,'Two-Handed Swords'),
(11,6,203,'Unarmed'),
(11,6,204,'Defense'),
(11,6,522,'SPELLDEFENSE (DND)'),
(11,6,668,'Language Common'),
(11,6,674,'Dual Wield'),
(11,6,750,'Plate Mail'),
(11,6,2382,'Generic'),
(11,6,3050,'Detect'),
(11,6,3275,'Linen Bandage'),
(11,6,3276,'Heavy Linen Bandage'),
(11,6,3277,'Wool Bandage'),
(11,6,3278,'Heavy Wool Bandage'),
(11,6,3365,'Opening'),
(11,6,6233,'Closing'),
(11,6,6246,'Closing'),
(11,6,6247,'Opening'),
(11,6,6477,'Opening'),
(11,6,6478,'Opening'),
(11,6,6562,'Heroic Presence'),
(11,6,6603,'Auto Attack'),
(11,6,7266,'Duel'),
(11,6,7267,'Grovel'),
(11,6,7355,'Stuck'),
(11,6,7928,'Silk Bandage'),
(11,6,7929,'Heavy Silk Bandage'),
(11,6,7934,'Anti-Venom'),
(11,6,8386,'Attacking'),
(11,6,8737,'Mail'),
(11,6,9077,'Leather'),
(11,6,9078,'Cloth'),
(11,6,9125,'Generic'),
(11,6,10840,'Mageweave Bandage'),
(11,6,10841,'Heavy Mageweave Bandage'),
(11,6,10846,'First Aid'),
(11,6,18629,'Runecloth Bandage'),
(11,6,18630,'Heavy Runecloth Bandage'),
(11,6,21651,'Opening'),
(11,6,21652,'Closing'),
(11,6,22027,'Remove Insignia'),
(11,6,22810,'Opening - No Text'),
(11,6,28875,'Gemcutting'),
(11,6,29932,'Language Draenei'),
(11,6,33391,'Journeyman Riding'),
(11,6,45462,'Plague Strike'),
(11,6,45477,'Icy Touch'),
(11,6,45902,'Blood Strike'),
(11,6,45903,'Offensive State (DND)'),
(11,6,45927,'Summon Friend'),
(11,6,47541,'Death Coil'),
(11,6,48266,'Frost Presence'),
(11,6,49410,'Forceful Deflection'),
(11,6,49576,'Death Grip'),
(11,6,52665,'Relic'),
(11,6,59539,'Shadow Resistance'),
(11,6,59545,'Gift of the Naaru'),
(11,6,59879,'Blood Plague'),
(11,6,59921,'Frost Fever'),
(11,6,61437,'Opening'),
(11,6,61455,'Runic Focus'),
(11,6,63644,'Activating Secondary Spec'),
(11,6,63645,'Activating Primary Spec'),
(11,6,68398,'Opening'),
(11,6,76282,'Armor Skills'),
(11,6,76292,'Weapon Skills'),
(11,6,79741,'Languages'),
(11,6,82246,'Parry'),
(11,6,89832,'Death Strike Enabler'),
(11,6,89964,'Clear Glyph'),
(11,6,96220,'Opening'),
(11,7,81,'Dodge'),
(11,7,107,'Block'),
(11,7,196,'One-Handed Axes'),
(11,7,197,'Two-Handed Axes'),
(11,7,198,'One-Handed Maces'),
(11,7,199,'Two-Handed Maces'),
(11,7,203,'Unarmed'),
(11,7,204,'Defense'),
(11,7,227,'Staves'),
(11,7,403,'Lightning Bolt'),
(11,7,522,'SPELLDEFENSE (DND)'),
(11,7,668,'Language Common'),
(11,7,1180,'Daggers'),
(11,7,2382,'Generic'),
(11,7,3050,'Detect'),
(11,7,3365,'Opening'),
(11,7,6233,'Closing'),
(11,7,6246,'Closing'),
(11,7,6247,'Opening'),
(11,7,6477,'Opening'),
(11,7,6478,'Opening'),
(11,7,6603,'Auto Attack'),
(11,7,7266,'Duel'),
(11,7,7267,'Grovel'),
(11,7,7355,'Stuck'),
(11,7,8386,'Attacking'),
(11,7,9077,'Leather'),
(11,7,9078,'Cloth'),
(11,7,9116,'Shield'),
(11,7,9125,'Generic'),
(11,7,15590,'Fist Weapons'),
(11,7,21651,'Opening'),
(11,7,21652,'Closing'),
(11,7,22027,'Remove Insignia'),
(11,7,22810,'Opening - No Text'),
(11,7,27763,'Relic'),
(11,7,28875,'Gemcutting'),
(11,7,28878,'Heroic Presence'),
(11,7,29932,'Language Draenei'),
(11,7,45927,'Summon Friend'),
(11,7,59540,'Shadow Resistance'),
(11,7,59547,'Gift of the Naaru'),
(11,7,61437,'Opening'),
(11,7,68398,'Opening'),
(11,7,76272,'Armor Skills'),
(11,7,76296,'Weapon Skills'),
(11,7,79741,'Languages'),
(11,7,89920,'Ancestral Focus'),
(11,7,96220,'Opening'),
(11,8,81,'Dodge'),
(11,8,133,'Fireball'),
(11,8,201,'One-Handed Swords'),
(11,8,203,'Unarmed'),
(11,8,204,'Defense'),
(11,8,227,'Staves'),
(11,8,522,'SPELLDEFENSE (DND)'),
(11,8,668,'Language Common'),
(11,8,1180,'Daggers'),
(11,8,2382,'Generic'),
(11,8,3050,'Detect'),
(11,8,3365,'Opening'),
(11,8,5009,'Wands'),
(11,8,5019,'Shoot'),
(11,8,6233,'Closing'),
(11,8,6246,'Closing'),
(11,8,6247,'Opening'),
(11,8,6477,'Opening'),
(11,8,6478,'Opening'),
(11,8,6603,'Auto Attack'),
(11,8,7266,'Duel'),
(11,8,7267,'Grovel'),
(11,8,7355,'Stuck'),
(11,8,8386,'Attacking'),
(11,8,9078,'Cloth'),
(11,8,9125,'Generic'),
(11,8,21651,'Opening'),
(11,8,21652,'Closing'),
(11,8,22027,'Remove Insignia'),
(11,8,22810,'Opening - No Text'),
(11,8,28875,'Gemcutting'),
(11,8,28878,'Heroic Presence'),
(11,8,29932,'Language Draenei'),
(11,8,45927,'Summon Friend'),
(11,8,59541,'Shadow Resistance'),
(11,8,59548,'Gift of the Naaru'),
(11,8,61437,'Opening'),
(11,8,68398,'Opening'),
(11,8,71761,'Deep Freeze Immunity State'),
(11,8,76276,'Armor Skills'),
(11,8,76298,'Weapon Skills'),
(11,8,79684,'Offensive State (DND)'),
(11,8,79741,'Languages'),
(11,8,85801,'DPS Caster Crit Damage Bonus'),
(11,8,92315,'Pyroblast!'),
(11,8,96220,'Opening'),
(22,1,81,'Dodge'),
(22,1,107,'Block'),
(22,1,196,'One-Handed Axes'),
(22,1,197,'Two-Handed Axes'),
(22,1,198,'One-Handed Maces'),
(22,1,199,'Two-Handed Maces'),
(22,1,200,'Polearms'),
(22,1,201,'One-Handed Swords'),
(22,1,202,'Two-Handed Swords'),
(22,1,203,'Unarmed'),
(22,1,204,'Defense'),
(22,1,227,'Staves'),
(22,1,264,'Bows'),
(22,1,266,'Guns'),
(22,1,522,'SPELLDEFENSE (DND)'),
(22,1,668,'Language Common'),
(22,1,1180,'Daggers'),
(22,1,2382,'Generic'),
(22,1,2457,'Battle Stance'),
(22,1,2567,'Thrown'),
(22,1,2764,'Throw'),
(22,1,3018,'Shoot'),
(22,1,3050,'Detect'),
(22,1,3365,'Opening'),
(22,1,5011,'Crossbows'),
(22,1,5301,'Defensive State (DND)'),
(22,1,6233,'Closing'),
(22,1,6246,'Closing'),
(22,1,6247,'Opening'),
(22,1,6477,'Opening'),
(22,1,6478,'Opening'),
(22,1,6603,'Auto Attack'),
(22,1,7266,'Duel'),
(22,1,7267,'Grovel'),
(22,1,7355,'Stuck'),
(22,1,8386,'Attacking'),
(22,1,8737,'Mail'),
(22,1,9077,'Leather'),
(22,1,9078,'Cloth'),
(22,1,9116,'Shield'),
(22,1,9125,'Generic'),
(22,1,15590,'Fist Weapons'),
(22,1,21651,'Opening'),
(22,1,21652,'Closing'),
(22,1,22027,'Remove Insignia'),
(22,1,22810,'Opening - No Text'),
(22,1,32215,'Victorious State'),
(22,1,45927,'Summon Friend'),
(22,1,49410,'Forceful Deflection'),
(22,1,61437,'Opening'),
(22,1,68398,'Opening'),
(22,1,76268,'Armor Skills'),
(22,1,76290,'Weapon Skills'),
(22,1,79742,'Languages'),
(22,1,88161,'Strike'),
(22,1,88163,'Attack'),
(22,1,96220,'Opening'),
(22,3,75,'Auto Shot'),
(22,3,81,'Dodge'),
(22,3,196,'One-Handed Axes'),
(22,3,197,'Two-Handed Axes'),
(22,3,200,'Polearms'),
(22,3,201,'One-Handed Swords'),
(22,3,202,'Two-Handed Swords'),
(22,3,203,'Unarmed'),
(22,3,204,'Defense'),
(22,3,227,'Staves'),
(22,3,264,'Bows'),
(22,3,266,'Guns'),
(22,3,522,'SPELLDEFENSE (DND)'),
(22,3,668,'Language Common'),
(22,3,883,'Call Pet 1'),
(22,3,982,'Revive Pet'),
(22,3,1180,'Daggers'),
(22,3,2382,'Generic'),
(22,3,3044,'Arcane Shot'),
(22,3,3050,'Detect'),
(22,3,3365,'Opening'),
(22,3,5011,'Crossbows'),
(22,3,6233,'Closing'),
(22,3,6246,'Closing'),
(22,3,6247,'Opening'),
(22,3,6477,'Opening'),
(22,3,6478,'Opening'),
(22,3,6603,'Auto Attack'),
(22,3,7266,'Duel'),
(22,3,7267,'Grovel'),
(22,3,7355,'Stuck'),
(22,3,8386,'Attacking'),
(22,3,9077,'Leather'),
(22,3,9078,'Cloth'),
(22,3,9125,'Generic'),
(22,3,13358,'Defensive State (DND)'),
(22,3,15590,'Fist Weapons'),
(22,3,21651,'Opening'),
(22,3,21652,'Closing'),
(22,3,22027,'Remove Insignia'),
(22,3,22810,'Opening - No Text'),
(22,3,24949,'Defensive State 2 (DND)'),
(22,3,34082,'Hunter Passive Auras (DND)'),
(22,3,45927,'Summon Friend'),
(22,3,61437,'Opening'),
(22,3,68398,'Opening'),
(22,3,76249,'Weapon Skills'),
(22,3,76250,'Armor Skills'),
(22,3,77442,'Focus'),
(22,3,79742,'Languages'),
(22,3,82928,'Aimed Shot!'),
(22,3,87324,'Focused Aim'),
(22,3,87816,'General Hunter Passives'),
(22,3,96220,'Opening'),
(22,4,81,'Dodge'),
(22,4,196,'One-Handed Axes'),
(22,4,198,'One-Handed Maces'),
(22,4,201,'One-Handed Swords'),
(22,4,203,'Unarmed'),
(22,4,204,'Defense'),
(22,4,264,'Bows'),
(22,4,266,'Guns'),
(22,4,522,'SPELLDEFENSE (DND)'),
(22,4,668,'Language Common'),
(22,4,674,'Dual Wield'),
(22,4,1180,'Daggers'),
(22,4,1752,'Sinister Strike'),
(22,4,2382,'Generic'),
(22,4,2567,'Thrown'),
(22,4,2764,'Throw'),
(22,4,3018,'Shoot'),
(22,4,3050,'Detect'),
(22,4,3365,'Opening'),
(22,4,5011,'Crossbows'),
(22,4,6233,'Closing'),
(22,4,6246,'Closing'),
(22,4,6247,'Opening'),
(22,4,6477,'Opening'),
(22,4,6478,'Opening'),
(22,4,6603,'Auto Attack'),
(22,4,7266,'Duel'),
(22,4,7267,'Grovel'),
(22,4,7355,'Stuck'),
(22,4,8386,'Attacking'),
(22,4,9077,'Leather'),
(22,4,9078,'Cloth'),
(22,4,9125,'Generic'),
(22,4,15590,'Fist Weapons'),
(22,4,16092,'Defensive State (DND)'),
(22,4,21651,'Opening'),
(22,4,21652,'Closing'),
(22,4,22027,'Remove Insignia'),
(22,4,22810,'Opening - No Text'),
(22,4,45927,'Summon Friend'),
(22,4,61437,'Opening'),
(22,4,68398,'Opening'),
(22,4,76273,'Armor Skills'),
(22,4,76297,'Weapon Skills'),
(22,4,79742,'Languages'),
(22,4,96220,'Opening'),
(22,5,81,'Dodge'),
(22,5,198,'One-Handed Maces'),
(22,5,203,'Unarmed'),
(22,5,204,'Defense'),
(22,5,227,'Staves'),
(22,5,522,'SPELLDEFENSE (DND)'),
(22,5,585,'Smite'),
(22,5,668,'Language Common'),
(22,5,1180,'Daggers'),
(22,5,2382,'Generic'),
(22,5,3050,'Detect'),
(22,5,3365,'Opening'),
(22,5,5009,'Wands'),
(22,5,5019,'Shoot'),
(22,5,6233,'Closing'),
(22,5,6246,'Closing'),
(22,5,6247,'Opening'),
(22,5,6477,'Opening'),
(22,5,6478,'Opening'),
(22,5,6603,'Auto Attack'),
(22,5,7266,'Duel'),
(22,5,7267,'Grovel'),
(22,5,7355,'Stuck'),
(22,5,8386,'Attacking'),
(22,5,9078,'Cloth'),
(22,5,9125,'Generic'),
(22,5,21651,'Opening'),
(22,5,21652,'Closing'),
(22,5,22027,'Remove Insignia'),
(22,5,22810,'Opening - No Text'),
(22,5,45927,'Summon Friend'),
(22,5,61437,'Opening'),
(22,5,68398,'Opening'),
(22,5,76279,'Armor Skills'),
(22,5,76301,'Weapon Skills'),
(22,5,77486,'Shadow Orb Power'),
(22,5,79742,'Languages'),
(22,5,84733,'Holy Focus'),
(22,5,84734,'Dark Thoughts'),
(22,5,88684,'Holy Word: Serenity'),
(22,5,88685,'Holy Word: Sanctuary'),
(22,5,96220,'Opening'),
(22,5,101062,'Flash Heal'),
(22,6,81,'Dodge'),
(22,6,196,'One-Handed Axes'),
(22,6,197,'Two-Handed Axes'),
(22,6,198,'One-Handed Maces'),
(22,6,199,'Two-Handed Maces'),
(22,6,200,'Polearms'),
(22,6,201,'One-Handed Swords'),
(22,6,202,'Two-Handed Swords'),
(22,6,203,'Unarmed'),
(22,6,204,'Defense'),
(22,6,522,'SPELLDEFENSE (DND)'),
(22,6,668,'Language Common'),
(22,6,674,'Dual Wield'),
(22,6,750,'Plate Mail'),
(22,6,2382,'Generic'),
(22,6,3050,'Detect'),
(22,6,3275,'Linen Bandage'),
(22,6,3276,'Heavy Linen Bandage'),
(22,6,3277,'Wool Bandage'),
(22,6,3278,'Heavy Wool Bandage'),
(22,6,3365,'Opening'),
(22,6,6233,'Closing'),
(22,6,6246,'Closing'),
(22,6,6247,'Opening'),
(22,6,6477,'Opening'),
(22,6,6478,'Opening'),
(22,6,6603,'Auto Attack'),
(22,6,7266,'Duel'),
(22,6,7267,'Grovel'),
(22,6,7355,'Stuck'),
(22,6,7928,'Silk Bandage'),
(22,6,7929,'Heavy Silk Bandage'),
(22,6,7934,'Anti-Venom'),
(22,6,8386,'Attacking'),
(22,6,8737,'Mail'),
(22,6,9077,'Leather'),
(22,6,9078,'Cloth'),
(22,6,9125,'Generic'),
(22,6,10840,'Mageweave Bandage'),
(22,6,10841,'Heavy Mageweave Bandage'),
(22,6,10846,'First Aid'),
(22,6,18629,'Runecloth Bandage'),
(22,6,18630,'Heavy Runecloth Bandage'),
(22,6,21651,'Opening'),
(22,6,21652,'Closing'),
(22,6,22027,'Remove Insignia'),
(22,6,22810,'Opening - No Text'),
(22,6,33391,'Journeyman Riding'),
(22,6,45462,'Plague Strike'),
(22,6,45477,'Icy Touch'),
(22,6,45902,'Blood Strike'),
(22,6,45903,'Offensive State (DND)'),
(22,6,45927,'Summon Friend'),
(22,6,47541,'Death Coil'),
(22,6,48266,'Frost Presence'),
(22,6,49410,'Forceful Deflection'),
(22,6,49576,'Death Grip'),
(22,6,52665,'Relic'),
(22,6,59879,'Blood Plague'),
(22,6,59921,'Frost Fever'),
(22,6,61437,'Opening'),
(22,6,61455,'Runic Focus'),
(22,6,63644,'Activating Secondary Spec'),
(22,6,63645,'Activating Primary Spec'),
(22,6,68398,'Opening'),
(22,6,68975,'Viciousness'),
(22,6,68976,'Aberration'),
(22,6,68978,'Flayer'),
(22,6,68992,'Darkflight'),
(22,6,68996,'Two Forms'),
(22,6,76282,'Armor Skills'),
(22,6,76292,'Weapon Skills'),
(22,6,79742,'Languages'),
(22,6,82246,'Parry'),
(22,6,87840,'Running Wild'),
(22,6,89832,'Death Strike Enabler'),
(22,6,89964,'Clear Glyph'),
(22,6,94293,'Enable Worgen Altered Form'),
(22,6,96220,'Opening'),
(22,8,81,'Dodge'),
(22,8,133,'Fireball'),
(22,8,201,'One-Handed Swords'),
(22,8,203,'Unarmed'),
(22,8,204,'Defense'),
(22,8,227,'Staves'),
(22,8,522,'SPELLDEFENSE (DND)'),
(22,8,668,'Language Common'),
(22,8,1180,'Daggers'),
(22,8,2382,'Generic'),
(22,8,3050,'Detect'),
(22,8,3365,'Opening'),
(22,8,5009,'Wands'),
(22,8,5019,'Shoot'),
(22,8,6233,'Closing'),
(22,8,6246,'Closing'),
(22,8,6247,'Opening'),
(22,8,6477,'Opening'),
(22,8,6478,'Opening'),
(22,8,6603,'Auto Attack'),
(22,8,7266,'Duel'),
(22,8,7267,'Grovel'),
(22,8,7355,'Stuck'),
(22,8,8386,'Attacking'),
(22,8,9078,'Cloth'),
(22,8,9125,'Generic'),
(22,8,21651,'Opening'),
(22,8,21652,'Closing'),
(22,8,22027,'Remove Insignia'),
(22,8,22810,'Opening - No Text'),
(22,8,45927,'Summon Friend'),
(22,8,61437,'Opening'),
(22,8,68398,'Opening'),
(22,8,71761,'Deep Freeze Immunity State'),
(22,8,76276,'Armor Skills'),
(22,8,76298,'Weapon Skills'),
(22,8,79684,'Offensive State (DND)'),
(22,8,79742,'Languages'),
(22,8,85801,'DPS Caster Crit Damage Bonus'),
(22,8,92315,'Pyroblast!'),
(22,8,96220,'Opening'),
(22,9,81,'Dodge'),
(22,9,201,'One-Handed Swords'),
(22,9,203,'Unarmed'),
(22,9,204,'Defense'),
(22,9,227,'Staves'),
(22,9,522,'SPELLDEFENSE (DND)'),
(22,9,668,'Language Common'),
(22,9,686,'Shadow Bolt'),
(22,9,688,'Summon Imp'),
(22,9,1180,'Daggers'),
(22,9,2382,'Generic'),
(22,9,3050,'Detect'),
(22,9,3365,'Opening'),
(22,9,5009,'Wands'),
(22,9,5019,'Shoot'),
(22,9,6233,'Closing'),
(22,9,6246,'Closing'),
(22,9,6247,'Opening'),
(22,9,6477,'Opening'),
(22,9,6478,'Opening'),
(22,9,6603,'Auto Attack'),
(22,9,7266,'Duel'),
(22,9,7267,'Grovel'),
(22,9,7355,'Stuck'),
(22,9,8386,'Attacking'),
(22,9,9078,'Cloth'),
(22,9,9125,'Generic'),
(22,9,21651,'Opening'),
(22,9,21652,'Closing'),
(22,9,22027,'Remove Insignia'),
(22,9,22810,'Opening - No Text'),
(22,9,45927,'Summon Friend'),
(22,9,58284,'Chaos Bolt Passive'),
(22,9,61437,'Opening'),
(22,9,68398,'Opening'),
(22,9,75445,'Demonic Immolate'),
(22,9,76277,'Armor Skills'),
(22,9,76299,'Weapon Skills'),
(22,9,79742,'Languages'),
(22,9,85801,'DPS Caster Crit Damage Bonus'),
(22,9,86213,'Soul Swap Exhale'),
(22,9,87330,'Suppression'),
(22,9,89420,'Drain Life'),
(22,9,96220,'Opening'),
(22,11,81,'Dodge'),
(22,11,198,'One-Handed Maces'),
(22,11,199,'Two-Handed Maces'),
(22,11,200,'Polearms'),
(22,11,203,'Unarmed'),
(22,11,204,'Defense'),
(22,11,227,'Staves'),
(22,11,522,'SPELLDEFENSE (DND)'),
(22,11,668,'Language Common'),
(22,11,1180,'Daggers'),
(22,11,2382,'Generic'),
(22,11,3050,'Detect'),
(22,11,3365,'Opening'),
(22,11,5176,'Wrath'),
(22,11,6233,'Closing'),
(22,11,6246,'Closing'),
(22,11,6247,'Opening'),
(22,11,6477,'Opening'),
(22,11,6478,'Opening'),
(22,11,6603,'Auto Attack'),
(22,11,7266,'Duel'),
(22,11,7267,'Grovel'),
(22,11,7355,'Stuck'),
(22,11,8386,'Attacking'),
(22,11,9077,'Leather'),
(22,11,9078,'Cloth'),
(22,11,9125,'Generic'),
(22,11,15590,'Fist Weapons'),
(22,11,21651,'Opening'),
(22,11,21652,'Closing'),
(22,11,22027,'Remove Insignia'),
(22,11,22810,'Opening - No Text'),
(22,11,45927,'Summon Friend'),
(22,11,61437,'Opening'),
(22,11,68398,'Opening'),
(22,11,76275,'Armor Skills'),
(22,11,76300,'Weapon Skills'),
(22,11,79577,'Eclipse Mastery Driver Passive'),
(22,11,79742,'Languages'),
(22,11,81170,'Ravage!'),
(22,11,84736,'Nature\'s Focus'),
(22,11,84738,'Celestial Focus'),
(22,11,96220,'Opening');
/*!40000 ALTER TABLE `playercreateinfo_spell` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `points_of_interest`
--
DROP TABLE IF EXISTS `points_of_interest`;
CREATE TABLE `points_of_interest` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`x` float NOT NULL DEFAULT '0',
`y` float NOT NULL DEFAULT '0',
`icon` mediumint(8) unsigned NOT NULL DEFAULT '0',
`flags` mediumint(8) unsigned NOT NULL DEFAULT '0',
`data` mediumint(8) unsigned NOT NULL DEFAULT '0',
`icon_name` text NOT NULL,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `points_of_interest`
--
LOCK TABLES `points_of_interest` WRITE;
/*!40000 ALTER TABLE `points_of_interest` DISABLE KEYS */;
/*!40000 ALTER TABLE `points_of_interest` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pool_creature`
--
DROP TABLE IF EXISTS `pool_creature`;
CREATE TABLE `pool_creature` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`chance` float unsigned NOT NULL DEFAULT '0',
`description` varchar(255) NOT NULL,
PRIMARY KEY (`guid`),
KEY `pool_idx` (`pool_entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pool_creature`
--
LOCK TABLES `pool_creature` WRITE;
/*!40000 ALTER TABLE `pool_creature` DISABLE KEYS */;
/*!40000 ALTER TABLE `pool_creature` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pool_creature_template`
--
DROP TABLE IF EXISTS `pool_creature_template`;
CREATE TABLE `pool_creature_template` (
`id` int(10) unsigned NOT NULL DEFAULT '0',
`pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`chance` float unsigned NOT NULL DEFAULT '0',
`description` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `pool_idx` (`pool_entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pool_creature_template`
--
LOCK TABLES `pool_creature_template` WRITE;
/*!40000 ALTER TABLE `pool_creature_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `pool_creature_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pool_gameobject`
--
DROP TABLE IF EXISTS `pool_gameobject`;
CREATE TABLE `pool_gameobject` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`chance` float unsigned NOT NULL DEFAULT '0',
`description` varchar(255) NOT NULL,
PRIMARY KEY (`guid`),
KEY `pool_idx` (`pool_entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pool_gameobject`
--
LOCK TABLES `pool_gameobject` WRITE;
/*!40000 ALTER TABLE `pool_gameobject` DISABLE KEYS */;
/*!40000 ALTER TABLE `pool_gameobject` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pool_gameobject_template`
--
DROP TABLE IF EXISTS `pool_gameobject_template`;
CREATE TABLE `pool_gameobject_template` (
`id` int(10) unsigned NOT NULL DEFAULT '0',
`pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`chance` float unsigned NOT NULL DEFAULT '0',
`description` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `pool_idx` (`pool_entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pool_gameobject_template`
--
LOCK TABLES `pool_gameobject_template` WRITE;
/*!40000 ALTER TABLE `pool_gameobject_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `pool_gameobject_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pool_pool`
--
DROP TABLE IF EXISTS `pool_pool`;
CREATE TABLE `pool_pool` (
`pool_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`mother_pool` mediumint(8) unsigned NOT NULL DEFAULT '0',
`chance` float NOT NULL DEFAULT '0',
`description` varchar(255) NOT NULL,
PRIMARY KEY (`pool_id`),
KEY `pool_idx` (`mother_pool`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pool_pool`
--
LOCK TABLES `pool_pool` WRITE;
/*!40000 ALTER TABLE `pool_pool` DISABLE KEYS */;
/*!40000 ALTER TABLE `pool_pool` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pool_template`
--
DROP TABLE IF EXISTS `pool_template`;
CREATE TABLE `pool_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Pool entry',
`max_limit` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Max number of objects (0) is no limit',
`description` varchar(255) NOT NULL,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pool_template`
--
LOCK TABLES `pool_template` WRITE;
/*!40000 ALTER TABLE `pool_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `pool_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `prospecting_loot_template`
--
DROP TABLE IF EXISTS `prospecting_loot_template`;
CREATE TABLE `prospecting_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `prospecting_loot_template`
--
LOCK TABLES `prospecting_loot_template` WRITE;
/*!40000 ALTER TABLE `prospecting_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `prospecting_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `quest_phase_maps`
--
DROP TABLE IF EXISTS `quest_phase_maps`;
CREATE TABLE `quest_phase_maps` (
`questId` int(11) NOT NULL,
`map` smallint(6) NOT NULL,
`phase` int(11) NOT NULL,
PRIMARY KEY (`questId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `quest_phase_maps`
--
LOCK TABLES `quest_phase_maps` WRITE;
/*!40000 ALTER TABLE `quest_phase_maps` DISABLE KEYS */;
/*!40000 ALTER TABLE `quest_phase_maps` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `quest_poi`
--
DROP TABLE IF EXISTS `quest_poi`;
CREATE TABLE `quest_poi` (
`questId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`poiId` tinyint(3) NOT NULL DEFAULT '0',
`objIndex` int(11) NOT NULL DEFAULT '0',
`mapId` int(11) unsigned NOT NULL DEFAULT '0',
`mapAreaId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`floorId` tinyint(3) unsigned NOT NULL DEFAULT '0',
`unk3` int(11) unsigned NOT NULL DEFAULT '0',
`unk4` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`questId`,`poiId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `quest_poi`
--
LOCK TABLES `quest_poi` WRITE;
/*!40000 ALTER TABLE `quest_poi` DISABLE KEYS */;
/*!40000 ALTER TABLE `quest_poi` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `quest_poi_points`
--
DROP TABLE IF EXISTS `quest_poi_points`;
CREATE TABLE `quest_poi_points` (
`questId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`poiId` tinyint(3) NOT NULL DEFAULT '0',
`x` int(11) NOT NULL DEFAULT '0',
`y` int(11) NOT NULL DEFAULT '0',
KEY `idx_poip` (`questId`,`poiId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `quest_poi_points`
--
LOCK TABLES `quest_poi_points` WRITE;
/*!40000 ALTER TABLE `quest_poi_points` DISABLE KEYS */;
/*!40000 ALTER TABLE `quest_poi_points` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `quest_template`
--
DROP TABLE IF EXISTS `quest_template`;
CREATE TABLE `quest_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Method` tinyint(3) unsigned NOT NULL DEFAULT '2',
`ZoneOrSort` smallint(6) NOT NULL DEFAULT '0',
`MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0',
`QuestLevel` smallint(6) NOT NULL DEFAULT '0',
`Type` smallint(5) unsigned NOT NULL DEFAULT '0',
`RequiredClasses` smallint(5) unsigned NOT NULL DEFAULT '0',
`RequiredRaces` int(7) unsigned NOT NULL DEFAULT '0',
`RequiredSkill` smallint(5) unsigned NOT NULL DEFAULT '0',
`RequiredSkillValue` smallint(5) unsigned NOT NULL DEFAULT '0',
`RepObjectiveFaction` smallint(5) unsigned NOT NULL DEFAULT '0',
`RepObjectiveValue` mediumint(9) NOT NULL DEFAULT '0',
`RequiredMinRepFaction` smallint(5) unsigned NOT NULL DEFAULT '0',
`RequiredMinRepValue` mediumint(9) NOT NULL DEFAULT '0',
`RequiredMaxRepFaction` smallint(5) unsigned NOT NULL DEFAULT '0',
`RequiredMaxRepValue` mediumint(9) NOT NULL DEFAULT '0',
`SuggestedPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0',
`LimitTime` int(10) unsigned NOT NULL DEFAULT '0',
`QuestFlags` mediumint(8) unsigned NOT NULL DEFAULT '0',
`SpecialFlags` tinyint(3) unsigned NOT NULL DEFAULT '0',
`CharTitleId` tinyint(3) unsigned NOT NULL DEFAULT '0',
`PlayersSlain` tinyint(3) unsigned NOT NULL DEFAULT '0',
`BonusTalents` tinyint(3) unsigned NOT NULL DEFAULT '0',
`PortraitGiver` mediumint(9) NOT NULL DEFAULT '0',
`PortraitTurnIn` mediumint(9) NOT NULL DEFAULT '0',
`PrevQuestId` mediumint(9) NOT NULL DEFAULT '0',
`NextQuestId` mediumint(9) NOT NULL DEFAULT '0',
`ExclusiveGroup` mediumint(9) NOT NULL DEFAULT '0',
`NextQuestInChain` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewXPId` tinyint(3) unsigned NOT NULL DEFAULT '0',
`SrcItemId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`SrcItemCount` tinyint(3) unsigned NOT NULL DEFAULT '0',
`SrcSpell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Title` text,
`Details` text,
`Objectives` text,
`OfferRewardText` text,
`RequestItemsText` text,
`EndText` text,
`CompletedText` text,
`PortraitGiverName` text,
`PortraitGiverText` text,
`PortraitTurnInName` text,
`PortraitTurnInText` text,
`ObjectiveText1` text,
`ObjectiveText2` text,
`ObjectiveText3` text,
`ObjectiveText4` text,
`ReqItemId1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqItemId2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqItemId3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqItemId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqItemId5` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqItemId6` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqItemCount1` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqItemCount2` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqItemCount3` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqItemCount4` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqItemCount5` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqItemCount6` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqSourceId1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqSourceId2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqSourceId3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqSourceId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqSourceCount1` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqSourceCount2` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqSourceCount3` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqSourceCount4` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqCreatureOrGOId1` mediumint(9) NOT NULL DEFAULT '0',
`ReqCreatureOrGOId2` mediumint(9) NOT NULL DEFAULT '0',
`ReqCreatureOrGOId3` mediumint(9) NOT NULL DEFAULT '0',
`ReqCreatureOrGOId4` mediumint(9) NOT NULL DEFAULT '0',
`ReqCreatureOrGOCount1` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqCreatureOrGOCount2` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqCreatureOrGOCount3` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqCreatureOrGOCount4` smallint(5) unsigned NOT NULL DEFAULT '0',
`ReqCurrencyId1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqCurrencyId2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqCurrencyId3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqCurrencyId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqCurrencyCount1` mediumint(9) NOT NULL DEFAULT '0',
`ReqCurrencyCount2` mediumint(9) NOT NULL DEFAULT '0',
`ReqCurrencyCount3` mediumint(9) NOT NULL DEFAULT '0',
`ReqCurrencyCount4` mediumint(9) NOT NULL DEFAULT '0',
`ReqSpellCast1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqSpellCast2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqSpellCast3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqSpellCast4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ReqSpellLearned` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemId1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemId2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemId3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemId5` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemId6` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemCount1` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemCount2` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemCount3` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemCount4` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemCount5` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewChoiceItemCount6` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewItemId1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewItemId2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewItemId3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewItemId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewItemCount1` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewItemCount2` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewItemCount3` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewItemCount4` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewCurrencyId1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewCurrencyId2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewCurrencyId3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewCurrencyId4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewCurrencyCount1` mediumint(9) NOT NULL DEFAULT '0',
`RewCurrencyCount2` mediumint(9) NOT NULL DEFAULT '0',
`RewCurrencyCount3` mediumint(9) NOT NULL DEFAULT '0',
`RewCurrencyCount4` mediumint(9) NOT NULL DEFAULT '0',
`RewSkill` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewSkillValue` smallint(5) unsigned NOT NULL DEFAULT '0',
`RewRepFaction1` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case',
`RewRepFaction2` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case',
`RewRepFaction3` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case',
`RewRepFaction4` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case',
`RewRepFaction5` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case',
`RewRepValueId1` tinyint(3) NOT NULL DEFAULT '0',
`RewRepValueId2` tinyint(3) NOT NULL DEFAULT '0',
`RewRepValueId3` tinyint(3) NOT NULL DEFAULT '0',
`RewRepValueId4` tinyint(3) NOT NULL DEFAULT '0',
`RewRepValueId5` tinyint(3) NOT NULL DEFAULT '0',
`RewRepValue1` mediumint(9) NOT NULL DEFAULT '0',
`RewRepValue2` mediumint(9) NOT NULL DEFAULT '0',
`RewRepValue3` mediumint(9) NOT NULL DEFAULT '0',
`RewRepValue4` mediumint(9) NOT NULL DEFAULT '0',
`RewRepValue5` mediumint(9) NOT NULL DEFAULT '0',
`RewHonorAddition` int(10) unsigned NOT NULL DEFAULT '0',
`RewHonorMultiplier` float NOT NULL DEFAULT '0',
`RewOrReqMoney` int(11) NOT NULL DEFAULT '0',
`RewMoneyMaxLevel` int(10) unsigned NOT NULL DEFAULT '0',
`RewSpell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewSpellCast` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewMailTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0',
`RewMailDelaySecs` int(11) unsigned NOT NULL DEFAULT '0',
`PointMapId` smallint(5) unsigned NOT NULL DEFAULT '0',
`PointX` float NOT NULL DEFAULT '0',
`PointY` float NOT NULL DEFAULT '0',
`PointOpt` mediumint(8) unsigned NOT NULL DEFAULT '0',
`DetailsEmote1` smallint(5) unsigned NOT NULL DEFAULT '0',
`DetailsEmote2` smallint(5) unsigned NOT NULL DEFAULT '0',
`DetailsEmote3` smallint(5) unsigned NOT NULL DEFAULT '0',
`DetailsEmote4` smallint(5) unsigned NOT NULL DEFAULT '0',
`DetailsEmoteDelay1` int(11) unsigned NOT NULL DEFAULT '0',
`DetailsEmoteDelay2` int(11) unsigned NOT NULL DEFAULT '0',
`DetailsEmoteDelay3` int(11) unsigned NOT NULL DEFAULT '0',
`DetailsEmoteDelay4` int(11) unsigned NOT NULL DEFAULT '0',
`IncompleteEmote` smallint(5) unsigned NOT NULL DEFAULT '0',
`CompleteEmote` smallint(5) unsigned NOT NULL DEFAULT '0',
`OfferRewardEmote1` smallint(5) unsigned NOT NULL DEFAULT '0',
`OfferRewardEmote2` smallint(5) unsigned NOT NULL DEFAULT '0',
`OfferRewardEmote3` smallint(5) unsigned NOT NULL DEFAULT '0',
`OfferRewardEmote4` smallint(5) unsigned NOT NULL DEFAULT '0',
`OfferRewardEmoteDelay1` int(11) unsigned NOT NULL DEFAULT '0',
`OfferRewardEmoteDelay2` int(11) unsigned NOT NULL DEFAULT '0',
`OfferRewardEmoteDelay3` int(11) unsigned NOT NULL DEFAULT '0',
`OfferRewardEmoteDelay4` int(11) unsigned NOT NULL DEFAULT '0',
`SoundAccept` smallint(5) unsigned NOT NULL DEFAULT '0',
`SoundTurnIn` smallint(5) unsigned NOT NULL DEFAULT '0',
`StartScript` mediumint(8) unsigned NOT NULL DEFAULT '0',
`CompleteScript` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Quest System';
--
-- Dumping data for table `quest_template`
--
LOCK TABLES `quest_template` WRITE;
/*!40000 ALTER TABLE `quest_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `quest_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `reference_loot_template`
--
DROP TABLE IF EXISTS `reference_loot_template`;
CREATE TABLE `reference_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `reference_loot_template`
--
LOCK TABLES `reference_loot_template` WRITE;
/*!40000 ALTER TABLE `reference_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `reference_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `reputation_reward_rate`
--
DROP TABLE IF EXISTS `reputation_reward_rate`;
CREATE TABLE `reputation_reward_rate` (
`faction` mediumint(8) unsigned NOT NULL DEFAULT '0',
`quest_rate` float NOT NULL DEFAULT '1',
`creature_rate` float NOT NULL DEFAULT '1',
`spell_rate` float NOT NULL DEFAULT '1',
PRIMARY KEY (`faction`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `reputation_reward_rate`
--
LOCK TABLES `reputation_reward_rate` WRITE;
/*!40000 ALTER TABLE `reputation_reward_rate` DISABLE KEYS */;
/*!40000 ALTER TABLE `reputation_reward_rate` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `reputation_spillover_template`
--
DROP TABLE IF EXISTS `reputation_spillover_template`;
CREATE TABLE `reputation_spillover_template` (
`faction` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT 'faction entry',
`faction1` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT 'faction to give spillover for',
`rate_1` float NOT NULL DEFAULT '0' COMMENT 'the given rep points * rate',
`rank_1` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'max rank, above this will not give any spillover',
`faction2` smallint(6) unsigned NOT NULL DEFAULT '0',
`rate_2` float NOT NULL DEFAULT '0',
`rank_2` tinyint(3) unsigned NOT NULL DEFAULT '0',
`faction3` smallint(6) unsigned NOT NULL DEFAULT '0',
`rate_3` float NOT NULL DEFAULT '0',
`rank_3` tinyint(3) unsigned NOT NULL DEFAULT '0',
`faction4` smallint(6) unsigned NOT NULL DEFAULT '0',
`rate_4` float NOT NULL DEFAULT '0',
`rank_4` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`faction`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Reputation spillover reputation gain';
--
-- Dumping data for table `reputation_spillover_template`
--
LOCK TABLES `reputation_spillover_template` WRITE;
/*!40000 ALTER TABLE `reputation_spillover_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `reputation_spillover_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `reserved_name`
--
DROP TABLE IF EXISTS `reserved_name`;
CREATE TABLE `reserved_name` (
`name` varchar(12) NOT NULL DEFAULT '',
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player Reserved Names';
--
-- Dumping data for table `reserved_name`
--
LOCK TABLES `reserved_name` WRITE;
/*!40000 ALTER TABLE `reserved_name` DISABLE KEYS */;
/*!40000 ALTER TABLE `reserved_name` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `scripted_areatrigger`
--
DROP TABLE IF EXISTS `scripted_areatrigger`;
CREATE TABLE `scripted_areatrigger` (
`entry` mediumint(8) NOT NULL,
`ScriptName` char(64) NOT NULL,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `scripted_areatrigger`
--
LOCK TABLES `scripted_areatrigger` WRITE;
/*!40000 ALTER TABLE `scripted_areatrigger` DISABLE KEYS */;
/*!40000 ALTER TABLE `scripted_areatrigger` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `scripted_event_id`
--
DROP TABLE IF EXISTS `scripted_event_id`;
CREATE TABLE `scripted_event_id` (
`id` mediumint(8) NOT NULL,
`ScriptName` char(64) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Script library scripted events';
--
-- Dumping data for table `scripted_event_id`
--
LOCK TABLES `scripted_event_id` WRITE;
/*!40000 ALTER TABLE `scripted_event_id` DISABLE KEYS */;
/*!40000 ALTER TABLE `scripted_event_id` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `skill_discovery_template`
--
DROP TABLE IF EXISTS `skill_discovery_template`;
CREATE TABLE `skill_discovery_template` (
`spellId` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellId of the discoverable spell',
`reqSpell` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'spell requirement',
`reqSkillValue` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'skill points requirement',
`chance` float NOT NULL DEFAULT '0' COMMENT 'chance to discover',
PRIMARY KEY (`spellId`,`reqSpell`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Skill Discovery System';
--
-- Dumping data for table `skill_discovery_template`
--
LOCK TABLES `skill_discovery_template` WRITE;
/*!40000 ALTER TABLE `skill_discovery_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `skill_discovery_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `skill_extra_item_template`
--
DROP TABLE IF EXISTS `skill_extra_item_template`;
CREATE TABLE `skill_extra_item_template` (
`spellId` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellId of the item creation spell',
`requiredSpecialization` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Specialization spell id',
`additionalCreateChance` float NOT NULL DEFAULT '0' COMMENT 'chance to create add',
`additionalMaxNum` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'max num of adds',
PRIMARY KEY (`spellId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Skill Specialization System';
--
-- Dumping data for table `skill_extra_item_template`
--
LOCK TABLES `skill_extra_item_template` WRITE;
/*!40000 ALTER TABLE `skill_extra_item_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `skill_extra_item_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `skill_fishing_base_level`
--
DROP TABLE IF EXISTS `skill_fishing_base_level`;
CREATE TABLE `skill_fishing_base_level` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Area identifier',
`skill` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Base skill level requirement',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Fishing system';
--
-- Dumping data for table `skill_fishing_base_level`
--
LOCK TABLES `skill_fishing_base_level` WRITE;
/*!40000 ALTER TABLE `skill_fishing_base_level` DISABLE KEYS */;
/*!40000 ALTER TABLE `skill_fishing_base_level` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `skinning_loot_template`
--
DROP TABLE IF EXISTS `skinning_loot_template`;
CREATE TABLE `skinning_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `skinning_loot_template`
--
LOCK TABLES `skinning_loot_template` WRITE;
/*!40000 ALTER TABLE `skinning_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `skinning_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_area`
--
DROP TABLE IF EXISTS `spell_area`;
CREATE TABLE `spell_area` (
`spell` mediumint(8) unsigned NOT NULL DEFAULT '0',
`area` mediumint(8) unsigned NOT NULL DEFAULT '0',
`quest_start` mediumint(8) unsigned NOT NULL DEFAULT '0',
`quest_start_active` tinyint(1) unsigned NOT NULL DEFAULT '0',
`quest_end` mediumint(8) unsigned NOT NULL DEFAULT '0',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`aura_spell` mediumint(8) NOT NULL DEFAULT '0',
`racemask` mediumint(8) unsigned NOT NULL DEFAULT '0',
`gender` tinyint(1) unsigned NOT NULL DEFAULT '2',
`autocast` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`spell`,`area`,`quest_start`,`quest_start_active`,`aura_spell`,`racemask`,`gender`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `spell_area`
--
LOCK TABLES `spell_area` WRITE;
/*!40000 ALTER TABLE `spell_area` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_area` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_bonus_data`
--
DROP TABLE IF EXISTS `spell_bonus_data`;
CREATE TABLE `spell_bonus_data` (
`entry` mediumint(8) unsigned NOT NULL,
`direct_bonus` float NOT NULL DEFAULT '0',
`dot_bonus` float NOT NULL DEFAULT '0',
`ap_bonus` float NOT NULL DEFAULT '0',
`ap_dot_bonus` float NOT NULL DEFAULT '0',
`comments` varchar(255) DEFAULT NULL,
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `spell_bonus_data`
--
LOCK TABLES `spell_bonus_data` WRITE;
/*!40000 ALTER TABLE `spell_bonus_data` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_bonus_data` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_chain`
--
DROP TABLE IF EXISTS `spell_chain`;
CREATE TABLE `spell_chain` (
`spell_id` mediumint(9) NOT NULL DEFAULT '0',
`prev_spell` mediumint(9) NOT NULL DEFAULT '0',
`first_spell` mediumint(9) NOT NULL DEFAULT '0',
`rank` tinyint(4) NOT NULL DEFAULT '0',
`req_spell` mediumint(9) NOT NULL DEFAULT '0',
PRIMARY KEY (`spell_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell Additinal Data';
--
-- Dumping data for table `spell_chain`
--
LOCK TABLES `spell_chain` WRITE;
/*!40000 ALTER TABLE `spell_chain` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_chain` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_elixir`
--
DROP TABLE IF EXISTS `spell_elixir`;
CREATE TABLE `spell_elixir` (
`entry` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellId of potion',
`mask` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Mask 0x1 battle 0x2 guardian 0x3 flask 0x7 unstable flasks 0xB shattrath flasks',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell System';
--
-- Dumping data for table `spell_elixir`
--
LOCK TABLES `spell_elixir` WRITE;
/*!40000 ALTER TABLE `spell_elixir` DISABLE KEYS */;
INSERT INTO `spell_elixir` VALUES
( 673,0x2),
( 2367,0x1),
( 2374,0x1),
( 2378,0x2),
( 2380,0x2),
( 3160,0x1),
( 3164,0x1),
( 3166,0x2),
( 3219,0x2),
( 3220,0x2),
( 3222,0x2),
( 3223,0x2),
( 3593,0x2),
( 7844,0x1),
( 8212,0x1),
(10667,0x1),
(10668,0x2),
(10669,0x1),
(10692,0x2),
(10693,0x2),
(11319,0x2),
(11328,0x1),
(11334,0x1),
(11348,0x2),
(11349,0x2),
(11364,0x2),
(11371,0x2),
(11390,0x1),
(11396,0x2),
(11405,0x1),
(11406,0x1),
(11474,0x1),
(15231,0x2),
(15233,0x2),
(16321,0x2),
(16322,0x1),
(16323,0x1),
(16325,0x2),
(16326,0x2),
(16327,0x2),
(16329,0x1),
(17038,0x1),
(17535,0x2),
(17537,0x1),
(17538,0x1),
(17539,0x1),
(17626,0x3),
(17627,0x3),
(17628,0x3),
(17629,0x3),
(18191,0x10),
(18192,0x10),
(18193,0x10),
(18194,0x10),
(18222,0x10),
(21920,0x1),
(22730,0x10),
(24361,0x2),
(24363,0x2),
(24382,0x2),
(24383,0x2),
(24417,0x2),
(25661,0x10),
(26276,0x1),
(27652,0x2),
(27653,0x2),
(28486,0x1),
(28488,0x1),
(28490,0x1),
(28491,0x1),
(28493,0x1),
(28497,0x1),
(28501,0x1),
(28502,0x2),
(28503,0x1),
(28509,0x2),
(28514,0x2),
(28518,0x3),
(28519,0x3),
(28520,0x3),
(28521,0x3),
(28540,0x3),
(29348,0x2),
(33720,0x1),
(33721,0x1),
(33726,0x1),
(38954,0x1),
(39625,0x2),
(39626,0x2),
(39627,0x2),
(39628,0x2),
(40567,0x7),
(40568,0x7),
(40572,0x7),
(40573,0x7),
(40575,0x7),
(40576,0x7),
(41608,0xB),
(41609,0xB),
(41610,0xB),
(41611,0xB),
(42735,0x3),
(45373,0x1),
(46837,0xB),
(46839,0xB),
(53746,0x1),
(53747,0x2),
(53748,0x1),
(53749,0x1),
(53751,0x2),
(53752,0x3),
(53755,0x3),
(53758,0x3),
(53760,0x3),
(53763,0x2),
(53764,0x2),
(54212,0x3),
(54452,0x1),
(54494,0x1),
(54497,0x2),
(60340,0x1),
(60341,0x1),
(60343,0x2),
(60344,0x1),
(60345,0x1),
(60346,0x1),
(60347,0x2),
(62380,0x3),
(63729,0x1),
(67016,0x3),
(67017,0x3),
(67018,0x3),
(67019,0x3);
/*!40000 ALTER TABLE `spell_elixir` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_learn_spell`
--
DROP TABLE IF EXISTS `spell_learn_spell`;
CREATE TABLE `spell_learn_spell` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`SpellID` mediumint(8) unsigned NOT NULL DEFAULT '0',
`Active` tinyint(3) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`entry`,`SpellID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item System';
--
-- Dumping data for table `spell_learn_spell`
--
LOCK TABLES `spell_learn_spell` WRITE;
/*!40000 ALTER TABLE `spell_learn_spell` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_learn_spell` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_loot_template`
--
DROP TABLE IF EXISTS `spell_loot_template`;
CREATE TABLE `spell_loot_template` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`item` mediumint(8) NOT NULL DEFAULT '0',
`ChanceOrQuestChance` float NOT NULL DEFAULT '100',
`groupid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`mincountOrRef` mediumint(9) NOT NULL DEFAULT '1',
`maxcount` smallint(5) unsigned NOT NULL DEFAULT '1',
`condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
--
-- Dumping data for table `spell_loot_template`
--
LOCK TABLES `spell_loot_template` WRITE;
/*!40000 ALTER TABLE `spell_loot_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_loot_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_pet_auras`
--
DROP TABLE IF EXISTS `spell_pet_auras`;
CREATE TABLE `spell_pet_auras` (
`spell` mediumint(8) unsigned NOT NULL COMMENT 'dummy spell id',
`effectId` tinyint(3) unsigned NOT NULL DEFAULT '0',
`pet` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'pet id; 0 = all',
`aura` mediumint(8) unsigned NOT NULL COMMENT 'pet aura id',
PRIMARY KEY (`spell`,`effectId`,`pet`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `spell_pet_auras`
--
LOCK TABLES `spell_pet_auras` WRITE;
/*!40000 ALTER TABLE `spell_pet_auras` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_pet_auras` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_proc_event`
--
DROP TABLE IF EXISTS `spell_proc_event`;
CREATE TABLE `spell_proc_event` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`SchoolMask` tinyint(4) unsigned NOT NULL DEFAULT '0',
`SpellFamilyName` smallint(5) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskA0` int(10) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskA1` int(10) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskA2` int(10) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskB0` int(10) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskB1` int(10) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskB2` int(10) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskC0` int(10) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskC1` int(10) unsigned NOT NULL DEFAULT '0',
`SpellFamilyMaskC2` int(10) unsigned NOT NULL DEFAULT '0',
`procFlags` int(10) unsigned NOT NULL DEFAULT '0',
`procEx` int(10) unsigned NOT NULL DEFAULT '0',
`ppmRate` float NOT NULL DEFAULT '0',
`CustomChance` float NOT NULL DEFAULT '0',
`Cooldown` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `spell_proc_event`
--
LOCK TABLES `spell_proc_event` WRITE;
/*!40000 ALTER TABLE `spell_proc_event` DISABLE KEYS */;
INSERT INTO `spell_proc_event` VALUES
(67712, 0x7F, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 2),
(67758, 0x7F, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 2);
/*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_proc_item_enchant`
--
DROP TABLE IF EXISTS `spell_proc_item_enchant`;
CREATE TABLE `spell_proc_item_enchant` (
`entry` mediumint(8) unsigned NOT NULL,
`ppmRate` float NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `spell_proc_item_enchant`
--
LOCK TABLES `spell_proc_item_enchant` WRITE;
/*!40000 ALTER TABLE `spell_proc_item_enchant` DISABLE KEYS */;
INSERT INTO `spell_proc_item_enchant` VALUES
(8034, 9), -- Frostbrand Weapon
(8680, 8.5714), -- Instant Poison
(13218, 21.4286), -- Wound Poison
(13897, 6.0), -- Enchant Weapon - Fiery Weapon
(20004, 6.0), -- Enchant Weapon - Lifestealing
(20005, 1.6), -- Enchant Weapon - Icy Chill
(44525, 3.4), -- Enchant Weapon - Icebreaker
(44578, 3.4); -- Enchant Weapon - Lifeward
/*!40000 ALTER TABLE `spell_proc_item_enchant` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_script_target`
--
DROP TABLE IF EXISTS `spell_script_target`;
CREATE TABLE `spell_script_target` (
`entry` mediumint(8) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL DEFAULT '0',
`targetEntry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`inverseEffectMask` mediumint(8) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `entry_type_target` (`entry`,`type`,`targetEntry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Spell System';
--
-- Dumping data for table `spell_script_target`
--
LOCK TABLES `spell_script_target` WRITE;
/*!40000 ALTER TABLE `spell_script_target` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_script_target` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_target_position`
--
DROP TABLE IF EXISTS `spell_target_position`;
CREATE TABLE `spell_target_position` (
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier',
`target_map` smallint(5) unsigned NOT NULL DEFAULT '0',
`target_position_x` float NOT NULL DEFAULT '0',
`target_position_y` float NOT NULL DEFAULT '0',
`target_position_z` float NOT NULL DEFAULT '0',
`target_orientation` float NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell System';
--
-- Dumping data for table `spell_target_position`
--
LOCK TABLES `spell_target_position` WRITE;
/*!40000 ALTER TABLE `spell_target_position` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_target_position` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_template`
--
DROP TABLE IF EXISTS `spell_template`;
CREATE TABLE `spell_template` (
`id` int(11) unsigned NOT NULL DEFAULT '0',
`attr` int(11) unsigned NOT NULL DEFAULT '0',
`attr_ex` int(11) unsigned NOT NULL DEFAULT '0',
`attr_ex2` int(11) unsigned NOT NULL DEFAULT '0',
`attr_ex3` int(11) unsigned NOT NULL DEFAULT '0',
`proc_flags` int(11) unsigned NOT NULL DEFAULT '0',
`proc_chance` int(11) unsigned NOT NULL DEFAULT '0',
`duration_index` int(11) unsigned NOT NULL DEFAULT '0',
`effect0` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_implicit_target_a` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_implicit_target_b` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_radius_idx` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_apply_aura_name` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_misc_value` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_misc_value_b` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_trigger_spell` int(11) unsigned NOT NULL DEFAULT '0',
`comments` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='MaNGOS server side spells';
--
-- Dumping data for table `spell_template`
--
LOCK TABLES `spell_template` WRITE;
/*!40000 ALTER TABLE `spell_template` DISABLE KEYS */;
INSERT INTO `spell_template` VALUES
-- id attr attr_ex attr_ex2 attr_ex3 proc_flags chnce dur ef0 tarA0 tarB0 rad aur misc miscB, trigger
(11756, 0x00000180, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 101, 4, 76, 47, 0, 15, 0, 144064, 0, 0, 'Summon Gordunni chest (COBALT)'),
(19394, 0x00000180, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 101, 4, 76, 47, 0, 15, 0, 177681, 0, 0, 'Summon Gordunni chest (JUNK)'),
(21387, 0x00000140, 0x10000000, 0x00000000, 0x00000000, 0x00000028, 15, 21, 6, 1, 0, 0, 42, 0, 0, 21388, 'Melt-Weapon trigger aura related used by Ragnaros'),
(21883, 0x00000180, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 101, 225, 76, 22, 0, 0, 0, 178904, 0, 0, 'Summon Healed Celebrian Vine'),
(23363, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 76, 18, 0, 0, 0, 179804, 0, 0, 'Summon Drakonid Corpse Trigger'),
(23770, 0x24800100, 0x10000088, 0x00000001, 0x00100000, 0x00000000, 101, 367, 6, 25, 0, 0, 4, 0, 0, 0, 'Sayge''s timer - Darkmoon Faire'),
(25192, 0x00000100, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 101, 21, 76, 18, 0, 0, 0, 180619, 0, 0, 'Summon Ossirian Crystal'),
(26133, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 76, 18, 0, 0, 0, 180795, 0, 0, 'Summon Sandworm Base'),
(34810, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 42, 0, 8, 0, 20083, 64, 0, 'Summon Summoned Bloodwarder Mender behind of the caster'),
(34817, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 44, 0, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist right of the caster'),
(34818, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 43, 0, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist left of the caster'),
(34819, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 41, 0, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist front of the caster'),
(35153, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 42, 0, 8, 0, 20405, 64, 0, 'Summon Nether Charge behind of the caster'),
(35904, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 44, 0, 8, 0, 20405, 64, 0, 'Summon Nether Charge right of the caster'),
(35905, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 43, 0, 8, 0, 20405, 64, 0, 'Summon Nether Charge left of the caster'),
(35906, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 28, 41, 0, 8, 0, 20405, 64, 0, 'Summon Nether Charge front of the caster'),
(37264, 0x00000180, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 101, 21, 28, 18, 0, 7, 0, 21729, 64, 0, 'Power Converters: Summon Electromental (from cata)'),
(37278, 0x00000180, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 101, 21, 28, 18, 0, 1, 0, 21737, 64, 0, 'Power Converters: Summon Mini-Electromental (from cata)'),
(37365, 0x00000180, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 101, 21, 28, 18, 0, 1, 0, 21757, 64, 0, 'Power Converters: Summon Big Flavor Electromental (from cata)'),
(44920, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 24941, 0, 0, 'Model - Shattered Sun Marksman - BE Male Tier 4'),
(44924, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 24945, 0, 0, 'Model - Shattered Sun Marksman - BE Female Tier 4'),
(44928, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 24949, 0, 0, 'Model - Shattered Sun Marksman - Draenei Male Tier 4'),
(44932, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 24953, 0, 0, 'Model - Shattered Sun Marksman - Draenei Female Tier 4'),
(45158, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 25119, 0, 0, 'Model - Shattered Sun Warrior - BE Female Tier 4'),
(45162, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 25123, 0, 0, 'Model - Shattered Sun Warrior - BE Male Tier 4'),
(45166, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 25127, 0, 0, 'Model - Shattered Sun Warrior - Draenei Female Tier 4'),
(45170, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 56, 25131, 0, 0, 'Model - Shattered Sun Warrior - Draenei Male Tier 4'),
(50574, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 0, 90, 25, 0, 11, 0, 28042, 0, 0, 'Captain Brandon Kill Credit'),
(58630, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Mal\'Ganis'),
(59046, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Tribunal of Ages'),
(59450, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - The Four Horsemen'),
(62388, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 101, 21, 6, 1, 0, 0, 4, 0, 0, 0, 'Aura required for Demonic Circle 48020'),
(64899, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Hodir'),
(64985, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Thorim'),
(65074, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Freya'),
(65195, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Assembly of Iron'),
(68184, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Faction Champions'),
(68523, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Trial of the Crusader - Not One, But Two Jormungars'),
(68572, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Grand Champions'),
(68574, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Confessor Paletress'),
(68575, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Eadric the Pure'),
(68620, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Trial of the Crusader - Resilience Will Fix It'),
(72845, 0x00800180, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 101, 37, 6, 22, 7, 28, 4, 0, 0, 0, 'Achievement check - Pit of Saron - Don\'t Look Up');
/*!40000 ALTER TABLE `spell_template` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spell_threat`
--
DROP TABLE IF EXISTS `spell_threat`;
CREATE TABLE `spell_threat` (
`entry` mediumint(8) unsigned NOT NULL,
`Threat` smallint(6) NOT NULL,
`multiplier` float NOT NULL DEFAULT '1' COMMENT 'threat multiplier for damage/healing',
`ap_bonus` float NOT NULL DEFAULT '0' COMMENT 'additional threat bonus from attack power',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED;
--
-- Dumping data for table `spell_threat`
--
LOCK TABLES `spell_threat` WRITE;
/*!40000 ALTER TABLE `spell_threat` DISABLE KEYS */;
/*!40000 ALTER TABLE `spell_threat` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `transports`
--
DROP TABLE IF EXISTS `transports`;
CREATE TABLE `transports` (
`entry` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` text,
`period` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Transports';
--
-- Dumping data for table `transports`
--
LOCK TABLES `transports` WRITE;
/*!40000 ALTER TABLE `transports` DISABLE KEYS */;
/*!40000 ALTER TABLE `transports` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `vehicle_accessory`
--
DROP TABLE IF EXISTS `vehicle_accessory`;
CREATE TABLE `vehicle_accessory` (
`vehicle_entry` int(10) unsigned NOT NULL COMMENT 'entry of the npc who has some accessory as vehicle',
`seat` mediumint(8) unsigned NOT NULL COMMENT 'onto which seat shall the passenger be boarded',
`accessory_entry` int(10) unsigned NOT NULL COMMENT 'entry of the passenger that is to be boarded',
`comment` varchar(255) NOT NULL,
PRIMARY KEY (`vehicle_entry`,`seat`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Vehicle Accessory (passengers that are auto-boarded onto a v';
--
-- Dumping data for table `vehicle_accessory`
--
LOCK TABLES `vehicle_accessory` WRITE;
/*!40000 ALTER TABLE `vehicle_accessory` DISABLE KEYS */;
/*!40000 ALTER TABLE `vehicle_accessory` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `world_template`
--
DROP TABLE IF EXISTS `world_template`;
CREATE TABLE `world_template` (
`map` smallint(5) unsigned NOT NULL,
`ScriptName` varchar(128) NOT NULL DEFAULT '',
PRIMARY KEY (`map`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `world_template`
--
LOCK TABLES `world_template` WRITE;
/*!40000 ALTER TABLE `world_template` DISABLE KEYS */;
/*!40000 ALTER TABLE `world_template` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2013-09-10 0:00:00
|
alysher/mangos-cata-pb
|
sql/mangos.sql
|
SQL
|
gpl-2.0
| 751,377
|
package de.bitbrain.craft.graphics.shader;
import com.badlogic.gdx.graphics.g2d.Batch;
/**
* Handles multiple shaders for a single target
*
* @author Miguel Gonzalez <miguel-gonzalez@gmx.de>
* @since 0.1
* @version 0.1
*/
public interface ShadeArea {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
/**
*
*
* @param batch
* @param delta
* @param currentShader
*/
void draw(Batch batch, float delta);
}
|
bitbrain-gaming/craft
|
core/src/de/bitbrain/craft/graphics/shader/ShadeArea.java
|
Java
|
gpl-2.0
| 676
|
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<title>简历</title>
<style>
header {
background-color: #fcfcfc;
border-bottom: solid #dddfe3 1px;
}
header a{
display: block;
font-size: 20px;
text-align: center;
width: 100%;
height: 30px;
}
footer {
background-color: #fcfcfc;
border-top: solid #dddfe3 1px;
}
footer a{
display: block;
width: inherit;
height: 30px;
font-size: 20px;
text-align: center;
line-height: 30px;
}
h1 {
height: 50px;
line-height: 50px;
color: rgb(38, 38, 38);
font-size: 20px;
text-align: center;
}
table {
FONT-SIZE: 14px; LINE-HEIGHT: 150%; FONT-FAMILY: Arial, Helvetica, sans-serif,'宋体',tahoma, Srial, helvetica, sans-serif;
}
td {
FONT-SIZE: 14px; LINE-HEIGHT: 200%; FONT-FAMILY: Arial, Helvetica, sans-serif,'宋体',tahoma, Srial, helvetica, sans-serif;word-break:break-all;
}
P {
FONT-SIZE: 14px; LINE-HEIGHT: 150%; FONT-FAMILY:Arial, Helvetica, sans-serif,'宋体',tahoma, Srial, helvetica, sans-serif; margin:0px;
}
.blue {
COLOR: #256fb8
}
A:link {
COLOR: #296ebb; TEXT-DECORATION: none
}
A:visited {
COLOR: black; TEXT-DECORATION: none
}
.cvtitle {font-weight:700; color:#256fb8; font-size:14px; padding-top:5px;}
.blue1 { COLOR: #ff7400
}
.blue1 {color:#256fb8;}
.blue2 { COLOR: #ff7400
}
.font14 {font-size:14px;}
.graybutton {color:#676767;}
.v_table001{ width:710px; line-height:22px; margin:0 0 10px 10px; padding:0px; text-align:left; }
.titleLineB{ border-bottom:#256fb8 4px solid; height:32px; line-height:32px; margin:0px; padding:0px;}
.titleLineR{ border-bottom:#cbcdcc 4px solid; height:32px; line-height:32px; margin:0px; padding:0px;}
.traitLabel{ background-color:#ffdfc1; color:#5a5a5a; border:#f0f0f0 1px solid; font-size:12px; padding:2px 6px; height:22px; line-height:22px; margin-right:6px;
display:inline-block;
` box-shadow:1px 1px 1px #b8b8b8;
-moz-box-shadow:1px 1px 1px #b8b8b8;
-webkit-box-shadow:1px 1px 1px #b8b8b8;
}
.TextinTable{ line-height:32px;word-break:break-all;}
.textCard{ padding:4px 20px; margin: 10px auto 10px 0px; border:#ccc 1px solid;}
/*评价*/
.textComment{ border:#b8dcfe 1px solid; padding:10px; margin-top:0px auto 0px 0px;}
.textComment h4{ margin:0px; font-size:14px;}
.textComment h4 span{ color:#0275e8; font-size:14px; font-weight:normal;}
.textComment h4 img{ vertical-align:middle;}
.textComment p{ font-size:12px; line-height:20px; margin:0px;}
.textCommentLine{ border-bottom:#b8dcfe 1px dashed; height:1px; margin-top:6px; }
</style>
</head>
<body>
<header>
<h1>简历</h1>
<a href="http://olycloud.com/wx.html">添加微信</a>
</header>
<table width="778" border="0" cellpadding="0" align="center">
<tr>
<td>
<table style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 0px auto; BORDER-RIGHT-WIDTH: 0px" cellspacing="0" cellpadding="0" width="760" align="center" border="0">
<tbody>
<tr>
<td style="BORDER: #93B0ED 2px solid;" valign="top">
<table cellSpacing="0" cellpadding="0" width="760" align="center" border="0">
<tbody>
<tr>
<td valign="top">
<table style="BORDER: #3076BC 1px solid; PADDING-RIGHT: 0px; PADDING-LEFT: 8px; BACKGROUND: #F5FAFE; PADDING-BOTTOM: 0px; MARGIN: 8px auto; LINE-HEIGHT: 22px; PADDING-TOP: 8px; " cellspacing="0" cellPadding="0" width="97%" align="center" border="0">
<tbody>
<tr>
<td style="BORDER-BOTTOM: #88b4e0 1px dashed" height="30">
<span style="FLOAT: right">
<img height="1" src="http://img01.51jobcdn.com/im/2009/resumetemplate/space.gif" width="12" border="0"/>
</span>
<span style="FONT-SIZE: 25px; LINE-HEIGHT: 30px; HEIGHT: 30px">
<strong>范星</strong>
</span>
<img height="1" src="http://img01.51jobcdn.com/im/2009/resumetemplate/space.gif" width="15" border="0"/>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="26" colspan="4">
<span class="blue1">
<b>应届毕业生 | 男 | 21岁(1994年7月
29日
)
</b>
</span>
</td>
<td width="20%" rowspan="6" align="center" valign="middle">
<img src="http://olycloud.com/images/me.jpg" width="90" height="110"/>
</td>
</tr>
<tr>
<td width="10%" height="20">居住地:</td>
<td width="42%" height="20">长春-朝阳区</td>
<td width="11%" height="20">户 口:</td>
<td width="20%" height="20">荆门</td>
</tr>
<tr>
<td height="20">电 话:</td>
<td height="20" colspan="3">15764336108(手机)
</td>
</tr>
<tr>
<td height="20">E-mail:</td>
<td height="20" colspan="3"><a href= "mailto:felix0080@163.com
" class="blue1" >
felix0080@163.com
</a>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="90" align="left">
<div class="titleLineB"> 最近工作</div>
</th>
<th width="279" align="left">
<div class="titleLineR">
[ 未提供工作经验 ]
</div>
</th>
<th width="90" align="left">
<div class="titleLineB"> 学历</div>
</th>
<th align="left" width="279">
<div class="titleLineR"> </div>
</th>
</tr>
<tr>
<td width="50%" colspan="2">
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="90">公 司:</td>
<td/>
</tr>
<tr>
<td>行 业:</td>
<td/>
</tr>
<tr>
<td>职 位:</td>
<td/>
</tr>
</table>
</td>
<td width="50%" colspan="2">
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="90">学 历:</td>
<td>本科</td>
</tr>
<tr>
<td>专 业:</td>
<td>软件工程</td>
</tr>
<tr>
<td height="22">学 校:</td>
<td>长春工程学院</td>
</tr>
</table>
</td>
</tr>
</table>
<hr/>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0"/>
<table cellSpacing="0" cellPadding="0" width="97%" align="center" border="0">
<tbody>
<tr>
<th width="100" align="left">
<div class="titleLineB"> 求职意向</div>
</th>
<th align="left" width="690">
<div class="titleLineR"> </div>
</th>
</tr>
<tr>
<td width="90" align="left" valign="top">工作性质:</td>
<td align="left" width="700">全职</td>
</tr>
<tr>
<td width="90" align="left" valign="top">目标职能:</td>
<td align="left" width="700">软件工程师</td>
</tr>
<tr>
<td width="90" align="left" valign="top">求职状态:</td>
<td align="left" width="700">目前正在找工作</td>
</tr>
<tr>
<td vAlign="center" align="left" height="10" colspan="2"/>
</tr>
</tbody>
</table>
<table cellSpacing="0" cellPadding="0" width="97%" align="center" border="0">
<tbody>
<tr>
<th width="100" align="left">
<div class="titleLineB"> 教育经历</div>
</th>
<th align="left" width="690">
<div class="titleLineR"> </div>
</th>
</tr>
<tr>
<td align="left" valign="middle" colspan="2">
<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table_set">
<tr>
<td width="17%" class="text_left">2013
/6--2017
/6</td>
<td width="33%" class="text TextinTable">
<b>长春工程学院</b>
</td>
<td width="30%" class="text">软件工程</td>
<td width="20%" class="text">本科</td>
</tr>
<tr>
<td id="Cur_Val" colspan="4" valign="top" height="30" class="TextinTable">制作软件</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10" align="left" valign="middle" colspan="2"/>
</tr>
<tr>
<th width="100" align="left">
<div class="titleLineB"> 所获奖项</div>
</th>
<th align="left" width="690">
<div class="titleLineR"> </div>
</th>
</tr>
<tr>
<td height="20" align="left" valign="middle" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_set">
<tr>
<td width="33%" class="text_left">2015
/6</td>
<td width="33%" class="text">奖学金</td>
<td width="33%" class="text">3</td>
</tr>
<tr align="left">
<td colspan="3" valign="top">
<hr size="1" noshade="noshade"/>
</td>
</tr>
<tr>
<td width="33%" class="text_left">2014
/6</td>
<td width="33%" class="text">奖学金</td>
<td width="33%" class="text">3</td>
</tr>
<tr align="left">
<td colspan="3" valign="top">
<hr size="1" noshade="noshade"/>
</td>
</tr>
<tr>
<td width="33%" class="text_left">2014
/6</td>
<td width="33%" class="text">奖学金</td>
<td width="33%" class="text">3</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10" align="left" valign="middle" colspan="2"/>
</tr>
<tr>
<th width="100" align="left">
<div class="titleLineB"> 语言能力</div>
</th>
<th align="left" width="690">
<div class="titleLineR"> </div>
</th>
</tr>
<tr>
<td align="left" valign="middle" colspan="2">
<table border="0" cellspacing="0" cellpadding="0" style="width:99%">
<tr>
<td style="width:85%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_set">
<tr height="25">
<td width="127" class="text_left">英语(良好)
</td>
<td class="text">
听说(良好),读写(良好)
</td>
</tr>
<tr>
<td class="text_left">英语等级:</td>
<td class="text">英语四级</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10" align="left" valign="middle" colspan="2"/>
</tr>
<tr>
<th width="100" align="left">
<div class="titleLineB"> IT技能</div>
</th>
<th align="left" width="690">
<div class="titleLineR"> </div>
</th>
</tr>
<tr>
<td align="left" valign="middle" colspan="2">
<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table_set">
<tr>
<td width="30%" class="text_left">技能名称</td>
<td width="30%" class="text">熟练程度</td>
<td width="25%" class="text">使用时间</td>
<td width="15%" class="text"/>
</tr>
<tr>
<td colspan="4" align="center" valign="middle">
<hr size="1" noshade="noshade"/>
</td>
</tr>
<tr>
<td class="text_left">J2EE</td>
<td class="text">精通</td>
<td class="text">24月
</td>
<td rowspan="4"> </td>
</tr>
<tr>
<td class="text_left">HTML</td>
<td class="text">精通</td>
<td class="text">24月
</td>
</tr>
<tr>
<td class="text_left">JavaScript</td>
<td class="text">熟练</td>
<td class="text">24月
</td>
</tr>
<tr>
<td class="text_left">Java</td>
<td class="text">熟练</td>
<td class="text">24月
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10" align="left" valign="middle" colspan="2"/>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr style="HEIGHT: 10px">
<td style="HEIGHT: 10px"/>
</tr>
<tr>
<td style="WIDTH: 100%; HEIGHT: 10px" align="middle"/>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<footer>
<div class="back"></div>
<a href="http://olycloud.com">返回</a>
</footer>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
</script>
</html>
|
felix0080/felix0080.github.io
|
me.html
|
HTML
|
gpl-2.0
| 20,168
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package utilesFXAvisos.forms.util;
import ListDatos.IBusquedaListener;
import utilesFX.*;
import ListDatos.IFilaDatos;
import ListDatos.JListDatos;
import javafx.collections.ObservableList;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
/**
*
* @author eduardo
*/
public class JTableViewEventos extends JTableViewCZ {
private IBusquedaListener moListRecuperar;
public JTableViewEventos() {
super();
}
@Override
public void setModel(JListDatos poList, ObservableList<IFilaDatos> poListObservable) throws Exception {
moList = poList;
asignarEventos();
getColumns().clear();
layout();
TableColumn filaCol = new TableColumn("Tareas");
filaCol.setCellFactory(column -> {
return new TableCell<IFilaDatos, IFilaDatos>() {
private JPanelTableRender moRenderEventos = new JPanelTableRender();
private JTableRenderEventoParam moParam = new JTableRenderEventoParam();
@Override
protected void updateItem(IFilaDatos item, boolean empty) {
super.updateItem(item, empty);
if (item == null || empty) {
setText(null);
setStyle("");
} else {
moParam.setFila((IFilaDatos)item );
moRenderEventos.setValue(moParam, false);
setGraphic(moRenderEventos);
}
}
};
});
filaCol.setCellValueFactory(new TableCellValueEventos());
filaCol.setOnEditCommit(null);
filaCol.setId(String.valueOf(0));
filaCol.setEditable(poList.getFields(0).isEditable());
getColumns().add(filaCol);
reengancharTabla(poList, poListObservable);
}
}
|
Creativa3d/box3d
|
paquetesGUIFX/src/utilesFXAvisos/forms/util/JTableViewEventos.java
|
Java
|
gpl-2.0
| 2,135
|
<?php
defined('WYSIJA') or die('Restricted access');
class WYSIJA_control_front_confirm extends WYSIJA_control_front{
var $model='user';
var $view='confirm';
function WYSIJA_control_front_confirm(){
parent::WYSIJA_control_front();
}
function _testKeyuser(){
$this->helperUser=WYSIJA::get('user','helper');
$this->userData=$this->helperUser->checkUserKey();
add_action('init',array($this,'testsession'));
if(!$this->userData){
$this->title=__('Page does not exist.',WYSIJA);
$this->subtitle=__('Please verify your link to this page.',WYSIJA);
return false;
}
return true;
}
/**
* confirm subscription page
* return boolean
*/
function subscribe(){
$list_ids=array();
if(isset($_REQUEST['wysiconf'])) $list_ids= unserialize(base64_decode($_REQUEST['wysiconf']));
$model_list=WYSIJA::get('list','model');
$lists_names_res=$model_list->get(array('name'),array('list_id'=>$list_ids));
$names=array();
foreach($lists_names_res as $nameob) $names[]=$nameob['name'];
$model_config=WYSIJA::get('config','model');
// we need to call the translation otherwise it will not be loaded and translated
$model_config->add_translated_default();
$this->title=$model_config->getValue('subscribed_title');
if(!isset($model_config->values['subscribed_title'])) $this->title=__('You\'ve subscribed to: %1$s',WYSIJA);
$this->title=sprintf($this->title, implode(', ', $names));
$this->subtitle=$model_config->getValue('subscribed_subtitle');
if(!isset($model_config->values['subscribed_subtitle'])) $this->subtitle=__("Yup, we've added you to our list. You'll hear from us shortly.",WYSIJA);
if(!isset($_REQUEST['demo'])){
if($this->_testKeyuser()){
//user is not confirmed yet
if((int)$this->userData['details']['status']<1){
$this->helperUser->subscribe($this->userData['details']['user_id'],true, false,$list_ids);
$this->helperUser->uid=$this->userData['details']['user_id'];
// send a notification to the email specified in the settings if required to
if($model_config->getValue('emails_notified') && $model_config->getValue('emails_notified_when_sub')){
$this->helperUser->_notify($this->userData['details']['email']);
}
return true;
}else{
if(isset($_REQUEST['wysiconf'])){
$needs_subscription=false;
foreach($this->userData['lists'] as $list){
if(in_array($list['list_id'],$list_ids) && (int)$list['sub_date']<1){
$needs_subscription=true;
}
}
if($needs_subscription){
$this->helperUser->subscribe($this->userData['details']['user_id'],true,false,$list_ids);
$this->title=sprintf($model_config->getValue('subscribed_title'), implode(', ', $names));
$this->subtitle=$model_config->getValue('subscribed_subtitle');
// send a notification to the email specified in the settings if required to
if($model_config->getValue('emails_notified') && $model_config->getValue('emails_notified_when_sub')){
$this->helperUser->_notify($this->userData['details']['email'], true, $list_ids);
}
}else{
$this->title=sprintf(__('You are already subscribed to : %1$s',WYSIJA), implode(', ', $names));
}
}else{
$this->title=__('You are already subscribed.',WYSIJA);
}
return true;
}
}
}
return true;
}
function unsubscribe(){
$model_config=WYSIJA::get('config','model');
// we need to call the translation otherwise it will not be loaded and translated
$model_config->add_translated_default();
$this->title=$model_config->getValue('unsubscribed_title');
if(!isset($model_config->values['unsubscribed_title'])) $this->title=__("You've unsubscribed!",WYSIJA);
$this->subtitle=$model_config->getValue('unsubscribed_subtitle');
if(!isset($model_config->values['unsubscribed_subtitle'])) $this->subtitle=__("Great, you'll never hear from us again!",WYSIJA);
$undo_paramsurl=array(
'wysija-page'=>1,
'controller'=>'confirm',
'action'=>'undounsubscribe',
'wysija-key'=>$_REQUEST['wysija-key']
);
if(!isset($_REQUEST['demo'])){
if($this->_testKeyuser()){
$statusint=(int)$this->userData['details']['status'];
if( ($model_config->getValue('confirm_dbleoptin') && $statusint>0) || (!$model_config->getValue('confirm_dbleoptin') && $statusint>=0)){
$listids=$this->helperUser->unsubscribe($this->userData['details']['user_id']);
$this->helperUser->uid=$this->userData['details']['user_id'];
if($model_config->getValue('emails_notified') && $model_config->getValue('emails_notified_when_unsub')) $this->helperUser->_notify($this->userData['details']['email'],false,$listids);
}else{
$this->title=__('You are already unsubscribed.',WYSIJA);
return false;
}
}
}
else
$undo_paramsurl['demo'] = 1;
$this->subtitle .= str_replace(
array('[link]','[/link]'),
array('<a href="'.WYSIJA::get_permalink($model_config->getValue('confirm_email_link'),$undo_paramsurl).'">','</a>'),
'<p><b>'.__('You made a mistake? [link]Undo unsubscribe[/link].',WYSIJA)).'</b></p>';
return true;
}
function undounsubscribe(){
$model_config=WYSIJA::get('config','model');
// we need to call the translation otherwise it will not be loaded and translated
$model_config->add_translated_default();
$this->title =__("You've been subscribed!",WYSIJA);
$user_object = false;
if(!isset($_REQUEST['demo'])){
if($this->_testKeyuser()){
$user_object = (object)$this->userData['details'];
$this->helperUser->undounsubscribe($this->userData['details']['user_id']);
}
}
//manage subcription link
if(($model_config->getValue('manage_subscriptions'))){
$helper_user = WYSIJA::get('config','helper');
$model_user = WYSIJA::get('user','model');
$editsubscriptiontxt = $model_config->getValue('manage_subscriptions_linkname');
if(empty($editsubscriptiontxt)) $editsubscriptiontxt =__('Edit your subscription',WYSIJA);
$this->subtitle = '<p>'.$model_user->getEditsubLink($user_object,false,'').'.</p>';
}
return true;
}
function subscriptions(){
$data=array();
//get the user_id out of the params passed
if($this->_testKeyuser()){
$data['user']=$this->userData;
//get the list of user
$model_list=WYSIJA::get('list','model');
$model_list->orderBy('ordering','ASC');
$data['list']=$model_list->get(array('list_id','name','description'),array('is_enabled'=>true,'is_public'=>true));
$this->title=sprintf(__('Edit your subscriber profile: %1$s',WYSIJA),$data['user']['details']['email']);
$this->subtitle=$this->viewObj->subscriptions($data);
return true;
}
}
function resend(){
$this->title='The link you clicked has expired';
$this->subtitle=$this->viewObj->resend();
}
function resendconfirm(){
//make sure the user has the right to access this action
if($this->requireSecurity()){
//resend email
$helper_mailer=WYSIJA::get('mailer','helper');
$helper_mailer->sendOne((int)$_REQUEST['email_id'],(int)$_REQUEST['user_id']);
$this->title='Please check your inbox!';
$this->subtitle='<h3>A new email with working links has been sent to you.<h3/>';
}
}
function save(){
//get the user_id out of the params passed */
if($this->_testKeyuser()){
//update the general details */
$userid=$_REQUEST['wysija']['user']['user_id'];
unset($_REQUEST['wysija']['user']['user_id']);
$model_config=WYSIJA::get('config','model');
// we need to call the translation otherwise it will not be loaded and translated
$model_config->add_translated_default();
$this->helperUser->uid=$userid;
//if the status changed we might need to send notifications */
if((int)$_REQUEST['wysija']['user']['status'] !=(int)$this->userData['details']['status']){
if($_REQUEST['wysija']['user']['status']>0){
if($model_config->getValue('emails_notified_when_sub')) $this->helperUser->_notify($this->userData['details']['email']);
}else{
if($model_config->getValue('emails_notified_when_unsub')) $this->helperUser->_notify($this->userData['details']['email'],false);
}
}
//check whether the email address has changed if so then we should make sure that the new address doesnt exists already
if(isset($_REQUEST['wysija']['user']['email'])){
$_REQUEST['wysija']['user']['email']=trim($_REQUEST['wysija']['user']['email']);
if($this->userData['details']['email']!=$_REQUEST['wysija']['user']['email']){
$this->modelObj->reset();
$result=$this->modelObj->getOne(false,array('email'=>$_REQUEST['wysija']['user']['email']));
if($result){
$this->error(sprintf(__('Email %1$s already exists.',WYSIJA),$_REQUEST['wysija']['user']['email']),1);
unset($_REQUEST['wysija']['user']['email']);
}
}
}
$this->modelObj->update($_REQUEST['wysija']['user'],array('user_id'=>$userid));
$id=$userid;
$hUser=WYSIJA::get('user','helper');
//update the list subscriptions */
//run the unsubscribe process if needed
if((int)$_REQUEST['wysija']['user']['status']==-1){
$hUser->unsubscribe($id);
}
//update subscriptions */
$modelUL=WYSIJA::get('user_list','model');
$modelUL->backSave=true;
/* list of core list */
$modelLIST=WYSIJA::get('list','model');
$results=$modelLIST->get(array('list_id'),array('is_enabled'=>'0'));
$core_listids=array();
foreach($results as $res){
$core_listids[]=$res['list_id'];
}
//0 - get current lists of the user
$userlists=$modelUL->get(array('list_id','unsub_date'),array('user_id'=>$id));
$oldlistids=$newlistids=array();
foreach($userlists as $listdata) $oldlistids[$listdata['list_id']]=$listdata['unsub_date'];
$config=WYSIJA::get('config','model');
$dbloptin=$config->getValue('confirm_dbleoptin');
//1 - insert new user_list
if(isset($_POST['wysija']['user_list']) && $_POST['wysija']['user_list']){
$modelUL->reset();
$modelUL->update(array('sub_date'=>time()),array('user_id'=>$id));
foreach($_POST['wysija']['user_list']['list_id'] as $list_id){
//if the list is not already recorded for the user then we will need to insert it
if(!isset($oldlistids[$list_id])){
$modelUL->reset();
$newlistids[]=$list_id;
$dataul=array('user_id'=>$id,'list_id'=>$list_id,'sub_date'=>time());
//if double optin is on then we want to send a confirmation email for newly added subscription
if($dbloptin){
unset($dataul['sub_date']);
$modelUL->nohook=true;
}
$modelUL->insert($dataul);
//if the list is recorded already then let's check the status, if it is an unsubed one then we update it
}else{
if($oldlistids[$list_id]>0){
$modelUL->reset();
$modelUL->update(array('unsub_date'=>0,'sub_date'=>time()),array('user_id'=>$id,'list_id'=>$list_id));
}
//$alreadysubscribelistids[]=$list_id;
}
}
}
//if a confirmation email needs to be sent then we send it
if($dbloptin && !empty($newlistids)){
$hUser->sendConfirmationEmail($id,true,$newlistids);
}
// list ids
$list_ids = !empty($_POST['wysija']['user_list']['list_id']) ? $_POST['wysija']['user_list']['list_id'] : array();
if(is_array($list_ids) === false) $list_ids = array();
$notEqual = array_merge($core_listids, $list_ids);
//delete the lists from which you've removed yourself
$condiFirst = array('notequal'=>array('list_id'=> $notEqual), 'equal' => array('user_id' => $id, 'unsub_date' => 0));
$modelUL=WYSIJA::get('user_list','model');
$modelUL->update(array('unsub_date'=>time()),$condiFirst);
$modelUL->reset();
$this->notice(__('Newsletter profile has been updated.',WYSIJA));
$this->subscriptions();
//reset post otherwise wordpress will not recognise the post !!!
$_POST=array();
}
return true;
}
}
|
eyanai/hop
|
wp-content/plugins/wysija-newsletters/controllers/front/confirm.php
|
PHP
|
gpl-2.0
| 14,472
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="es">
<head>
<!-- Generated by javadoc (1.8.0_66) on Wed Jan 27 20:11:18 CET 2016 -->
<title>Asignatura</title>
<meta name="date" content="2016-01-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Asignatura";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Asignatura.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-files/index-1.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../modelo/Conflicto.html" title="class in modelo"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?modelo/Asignatura.html" target="_top">Frames</a></li>
<li><a href="Asignatura.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">modelo</div>
<h2 title="Class Asignatura" class="title">Class Asignatura</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>modelo.Asignatura</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">Asignatura</span>
extends java.lang.Object</pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#Asignatura-int-int-char-char-int-int-java.lang.String-">Asignatura</a></span>(int id,
int curso,
char grupo,
char dia,
int hora,
int cuatrimestre,
java.lang.String nombre)</code>
<div class="block">Constructor sin itinerario</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#Asignatura-int-int-char-char-int-int-java.lang.String-char-">Asignatura</a></span>(int id,
int curso,
char grupo,
char dia,
int hora,
int cuatrimestre,
java.lang.String nombre,
char itinerario)</code>
<div class="block">Constructor con itinerario</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#getCuatrimestre--">getCuatrimestre</a></span>()</code> </td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#getCurso--">getCurso</a></span>()</code> </td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#getDia--">getDia</a></span>()</code> </td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#getGrupo--">getGrupo</a></span>()</code> </td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#getHora--">getHora</a></span>()</code> </td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#getId--">getId</a></span>()</code> </td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#getItinerario--">getItinerario</a></span>()</code> </td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../modelo/Asignatura.html#getNombre--">getNombre</a></span>()</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Asignatura-int-int-char-char-int-int-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Asignatura</h4>
<pre>public Asignatura(int id,
int curso,
char grupo,
char dia,
int hora,
int cuatrimestre,
java.lang.String nombre)</pre>
<div class="block">Constructor sin itinerario</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - - ID de la asignatura</dd>
<dd><code>curso</code> - - Curos de la asignatura</dd>
<dd><code>grupo</code> - - Grupo de la asignatura</dd>
<dd><code>dia</code> - - Dia en el que se imparte</dd>
<dd><code>hora</code> - - Hora a la que se imparte</dd>
<dd><code>cuatrimestre</code> - - Cuatrimestre en el que se imparte</dd>
<dd><code>nombre</code> - - Nombre de la asignatura</dd>
</dl>
</li>
</ul>
<a name="Asignatura-int-int-char-char-int-int-java.lang.String-char-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Asignatura</h4>
<pre>public Asignatura(int id,
int curso,
char grupo,
char dia,
int hora,
int cuatrimestre,
java.lang.String nombre,
char itinerario)</pre>
<div class="block">Constructor con itinerario</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - - ID de la asignatura</dd>
<dd><code>curso</code> - - Curos de la asignatura</dd>
<dd><code>grupo</code> - - Grupo de la asignatura</dd>
<dd><code>dia</code> - - Dia en el que se imparte</dd>
<dd><code>hora</code> - - Hora a la que se imparte</dd>
<dd><code>cuatrimestre</code> - - Cuatrimestre en el que se imparte</dd>
<dd><code>nombre</code> - - Nombre de la asignatura</dd>
<dd><code>itinerario</code> - - Itinerario al que pertenece</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getId</h4>
<pre>public int getId()</pre>
</li>
</ul>
<a name="getCurso--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurso</h4>
<pre>public int getCurso()</pre>
</li>
</ul>
<a name="getGrupo--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGrupo</h4>
<pre>public char getGrupo()</pre>
</li>
</ul>
<a name="getDia--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDia</h4>
<pre>public char getDia()</pre>
</li>
</ul>
<a name="getHora--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHora</h4>
<pre>public int getHora()</pre>
</li>
</ul>
<a name="getCuatrimestre--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCuatrimestre</h4>
<pre>public int getCuatrimestre()</pre>
</li>
</ul>
<a name="getNombre--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNombre</h4>
<pre>public java.lang.String getNombre()</pre>
</li>
</ul>
<a name="getItinerario--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getItinerario</h4>
<pre>public char getItinerario()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Asignatura.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-files/index-1.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../modelo/Conflicto.html" title="class in modelo"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?modelo/Asignatura.html" target="_top">Frames</a></li>
<li><a href="Asignatura.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|
daster1324/enroll
|
doc/modelo/Asignatura.html
|
HTML
|
gpl-2.0
| 13,791
|
<?php
include("config_mynonprofit.php");
include("connect.php");
include("functions.php");
include("template_header.php"); ?>
<h1>A confirmation email has been sent</h1><p>Follow the enclosed link to activate your account.</p>
</body>
</html>
|
Enjabain/My-NP
|
register-success.php
|
PHP
|
gpl-2.0
| 244
|
package netdata.packet;
import netdata.Payload;
public class ARPpacket extends Packet{
public enum OPERATION{
REQUEST,
REPLY
};
private int type;
private OPERATION arpOp;
private String sourceMAC, destMAC = null;
public ARPpacket(String sourceip, String destip, String sourceMAC, String destMAC, int type, OPERATION op, short TTL) {
super(sourceip, destip, TTL, null);
this.sourceMAC = sourceMAC;
this.destMAC = destMAC;
this.type = type;
this.arpOp = op;
// TODO Auto-generated constructor stub
}
public int getProtocolType() { return type; }
public OPERATION getOperation() { return arpOp; }
public String getSourceMAC() { return sourceMAC; }
public String getDestinationMAC() { return destMAC; }
}
|
frawg/NetFramework
|
src/netdata/packet/ARPpacket.java
|
Java
|
gpl-2.0
| 768
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>tbb::tick_count Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="a00237.html">tbb</a></li><li class="navelem"><a class="el" href="a00168.html">tick_count</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#friends">Friends</a> |
<a href="a00322.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">tbb::tick_count Class Reference<div class="ingroups"><a class="el" href="a00256.html">Timing</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Absolute timestamp.
<a href="a00168.html#details">More...</a></p>
<p><code>#include <tick_count.h></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00067.html">interval_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Relative time interval. <a href="a00067.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9f1daa0b7a4feb800f802b4be1f1e497"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f1daa0b7a4feb800f802b4be1f1e497"></a>
 </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a9f1daa0b7a4feb800f802b4be1f1e497">tick_count</a> ()</td></tr>
<tr class="memdesc:a9f1daa0b7a4feb800f802b4be1f1e497"><td class="mdescLeft"> </td><td class="mdescRight">Construct an absolute timestamp initialized to zero. <br/></td></tr>
<tr class="separator:a9f1daa0b7a4feb800f802b4be1f1e497"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a74dcecde7431ff4591d7c46fc1d50d7e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74dcecde7431ff4591d7c46fc1d50d7e"></a>
static <a class="el" href="a00168.html">tick_count</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#a74dcecde7431ff4591d7c46fc1d50d7e">now</a> ()</td></tr>
<tr class="memdesc:a74dcecde7431ff4591d7c46fc1d50d7e"><td class="mdescLeft"> </td><td class="mdescRight">Return current time. <br/></td></tr>
<tr class="separator:a74dcecde7431ff4591d7c46fc1d50d7e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaf6a0d91e7d40f7d68e0ad6b79350e58"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf6a0d91e7d40f7d68e0ad6b79350e58"></a>
static double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#aaf6a0d91e7d40f7d68e0ad6b79350e58">resolution</a> ()</td></tr>
<tr class="memdesc:aaf6a0d91e7d40f7d68e0ad6b79350e58"><td class="mdescLeft"> </td><td class="mdescRight">Return the resolution of the clock in seconds per tick. <br/></td></tr>
<tr class="separator:aaf6a0d91e7d40f7d68e0ad6b79350e58"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ab5ceaed3ebf5a0d41088a5bc7c8dc653"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab5ceaed3ebf5a0d41088a5bc7c8dc653"></a>
<a class="el" href="a00067.html">interval_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00168.html#ab5ceaed3ebf5a0d41088a5bc7c8dc653">operator-</a> (const <a class="el" href="a00168.html">tick_count</a> &t1, const <a class="el" href="a00168.html">tick_count</a> &t0)</td></tr>
<tr class="memdesc:ab5ceaed3ebf5a0d41088a5bc7c8dc653"><td class="mdescLeft"> </td><td class="mdescRight">Subtract two timestamps to get the time interval between. <br/></td></tr>
<tr class="separator:ab5ceaed3ebf5a0d41088a5bc7c8dc653"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Absolute timestamp. </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>tick_count.h</li>
</ul>
</div><!-- contents -->
<hr>
<p></p>
Copyright © 2005-2016 Intel Corporation. All Rights Reserved.
<p></p>
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
<p></p>
* Other names and brands may be claimed as the property of others.
|
kypp/intel_tbb
|
doc/html/a00168.html
|
HTML
|
gpl-2.0
| 6,722
|
<?php
/**
* @version SVN: <svn_id>
* @package Quick2cart
* @author Techjoomla <extensions@techjoomla.com>
* @copyright Copyright (c) 2009-2016 TechJoomla. All rights reserved.
* @license GNU General Public License version 2 or later.
*/
// No direct access.
defined('_JEXEC') or die();
jimport('joomla.form.formfield');
/**
* Supports an HTML select list of gateways
*
* @since 1.6
*/
class JFormFieldBssetup extends JFormField
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
public $type = 'Bssetup';
/**
* Function to fetch elements
*
* @return STRING html
*/
public function getInput()
{
return $this->fetchElement($this->name, $this->value, $this->element, $this->options['control']);
}
/**
* Function to fetch elements
*
* @param STRING $name name
* @param STRING $value value
* @param STRING $node node
* @param STRING $control_name control_name
*
* @return STRING html
*/
public function fetchElement($name, $value, $node, $control_name)
{
$actionLink = JURI::base() . "index.php?option=com_quick2cart&view=dashboard&layout=setup";
// Show link for payment plugins.
$html = '<a
href="' . $actionLink . '" target="_blank"
class="btn btn-small btn-primary ">'
. JText::_('COM_QUICK2CART_CLICK_BS_SETUP_INSTRUCTION') .
'</a>';
return $html;
}
}
|
nitesh146/Motleymart
|
administrator/components/com_quick2cart/assets/elements/bssetup.php
|
PHP
|
gpl-2.0
| 1,407
|
#ifndef _LINUX_NFS_XDR_H
#define _LINUX_NFS_XDR_H
#include <linux/nfsacl.h>
#include <linux/nfs3.h>
<<<<<<< HEAD
#include <linux/sunrpc/gss_api.h>
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
/*
* To change the maximum rsize and wsize supported by the NFS client, adjust
* NFS_MAX_FILE_IO_SIZE. 64KB is a typical maximum, but some servers can
* support a megabyte or more. The default is left at 4096 bytes, which is
* reasonable for NFS over UDP.
*/
#define NFS_MAX_FILE_IO_SIZE (1048576U)
#define NFS_DEF_FILE_IO_SIZE (4096U)
#define NFS_MIN_FILE_IO_SIZE (1024U)
<<<<<<< HEAD
/* Forward declaration for NFS v3 */
struct nfs4_secinfo_flavors;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct nfs_fsid {
uint64_t major;
uint64_t minor;
};
/*
* Helper for checking equality between 2 fsids.
*/
static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b)
{
return a->major == b->major && a->minor == b->minor;
}
struct nfs_fattr {
unsigned int valid; /* which fields are valid */
umode_t mode;
__u32 nlink;
__u32 uid;
__u32 gid;
dev_t rdev;
__u64 size;
union {
struct {
__u32 blocksize;
__u32 blocks;
} nfs2;
struct {
__u64 used;
} nfs3;
} du;
struct nfs_fsid fsid;
__u64 fileid;
<<<<<<< HEAD
__u64 mounted_on_fileid;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct timespec atime;
struct timespec mtime;
struct timespec ctime;
__u64 change_attr; /* NFSv4 change attribute */
__u64 pre_change_attr;/* pre-op NFSv4 change attribute */
__u64 pre_size; /* pre_op_attr.size */
struct timespec pre_mtime; /* pre_op_attr.mtime */
struct timespec pre_ctime; /* pre_op_attr.ctime */
unsigned long time_start;
unsigned long gencount;
};
#define NFS_ATTR_FATTR_TYPE (1U << 0)
#define NFS_ATTR_FATTR_MODE (1U << 1)
#define NFS_ATTR_FATTR_NLINK (1U << 2)
#define NFS_ATTR_FATTR_OWNER (1U << 3)
#define NFS_ATTR_FATTR_GROUP (1U << 4)
#define NFS_ATTR_FATTR_RDEV (1U << 5)
#define NFS_ATTR_FATTR_SIZE (1U << 6)
#define NFS_ATTR_FATTR_PRESIZE (1U << 7)
#define NFS_ATTR_FATTR_BLOCKS_USED (1U << 8)
#define NFS_ATTR_FATTR_SPACE_USED (1U << 9)
#define NFS_ATTR_FATTR_FSID (1U << 10)
#define NFS_ATTR_FATTR_FILEID (1U << 11)
#define NFS_ATTR_FATTR_ATIME (1U << 12)
#define NFS_ATTR_FATTR_MTIME (1U << 13)
#define NFS_ATTR_FATTR_CTIME (1U << 14)
#define NFS_ATTR_FATTR_PREMTIME (1U << 15)
#define NFS_ATTR_FATTR_PRECTIME (1U << 16)
#define NFS_ATTR_FATTR_CHANGE (1U << 17)
#define NFS_ATTR_FATTR_PRECHANGE (1U << 18)
#define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */
<<<<<<< HEAD
#define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */
#define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 21)
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
#define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
| NFS_ATTR_FATTR_MODE \
| NFS_ATTR_FATTR_NLINK \
| NFS_ATTR_FATTR_OWNER \
| NFS_ATTR_FATTR_GROUP \
| NFS_ATTR_FATTR_RDEV \
| NFS_ATTR_FATTR_SIZE \
| NFS_ATTR_FATTR_FSID \
| NFS_ATTR_FATTR_FILEID \
| NFS_ATTR_FATTR_ATIME \
| NFS_ATTR_FATTR_MTIME \
| NFS_ATTR_FATTR_CTIME)
#define NFS_ATTR_FATTR_V2 (NFS_ATTR_FATTR \
| NFS_ATTR_FATTR_BLOCKS_USED)
#define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \
| NFS_ATTR_FATTR_SPACE_USED)
#define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \
| NFS_ATTR_FATTR_SPACE_USED \
| NFS_ATTR_FATTR_CHANGE)
/*
* Info on the file system
*/
struct nfs_fsinfo {
struct nfs_fattr *fattr; /* Post-op attributes */
__u32 rtmax; /* max. read transfer size */
__u32 rtpref; /* pref. read transfer size */
__u32 rtmult; /* reads should be multiple of this */
__u32 wtmax; /* max. write transfer size */
__u32 wtpref; /* pref. write transfer size */
__u32 wtmult; /* writes should be multiple of this */
__u32 dtpref; /* pref. readdir transfer size */
__u64 maxfilesize;
<<<<<<< HEAD
struct timespec time_delta; /* server time granularity */
__u32 lease_time; /* in seconds */
__u32 layouttype; /* supported pnfs layout driver */
=======
__u32 lease_time; /* in seconds */
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
};
struct nfs_fsstat {
struct nfs_fattr *fattr; /* Post-op attributes */
__u64 tbytes; /* total size in bytes */
__u64 fbytes; /* # of free bytes */
__u64 abytes; /* # of bytes available to user */
__u64 tfiles; /* # of files */
__u64 ffiles; /* # of free files */
__u64 afiles; /* # of files available to user */
};
struct nfs2_fsstat {
__u32 tsize; /* Server transfer size */
__u32 bsize; /* Filesystem block size */
__u32 blocks; /* No. of "bsize" blocks on filesystem */
__u32 bfree; /* No. of free "bsize" blocks */
__u32 bavail; /* No. of available "bsize" blocks */
};
struct nfs_pathconf {
struct nfs_fattr *fattr; /* Post-op attributes */
__u32 max_link; /* max # of hard links */
__u32 max_namelen; /* max name length */
};
struct nfs4_change_info {
u32 atomic;
u64 before;
u64 after;
};
struct nfs_seqid;
/* nfs41 sessions channel attributes */
struct nfs4_channel_attrs {
<<<<<<< HEAD
=======
u32 headerpadsz;
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
u32 max_rqst_sz;
u32 max_resp_sz;
u32 max_resp_sz_cached;
u32 max_ops;
u32 max_reqs;
};
/* nfs41 sessions slot seqid */
struct nfs4_slot {
u32 seq_nr;
};
struct nfs4_sequence_args {
struct nfs4_session *sa_session;
u8 sa_slotid;
u8 sa_cache_this;
};
struct nfs4_sequence_res {
struct nfs4_session *sr_session;
<<<<<<< HEAD
struct nfs4_slot *sr_slot; /* slot used to send request */
=======
u8 sr_slotid; /* slot used to send request */
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
int sr_status; /* sequence operation status */
unsigned long sr_renewal_time;
u32 sr_status_flags;
};
struct nfs4_get_lease_time_args {
struct nfs4_sequence_args la_seq_args;
};
struct nfs4_get_lease_time_res {
struct nfs_fsinfo *lr_fsinfo;
struct nfs4_sequence_res lr_seq_res;
};
<<<<<<< HEAD
#define PNFS_LAYOUT_MAXSIZE 4096
struct nfs4_layoutdriver_data {
struct page **pages;
__u32 pglen;
__u32 len;
};
struct pnfs_layout_range {
u32 iomode;
u64 offset;
u64 length;
};
struct nfs4_layoutget_args {
__u32 type;
struct pnfs_layout_range range;
__u64 minlength;
__u32 maxcount;
struct inode *inode;
struct nfs_open_context *ctx;
struct nfs4_sequence_args seq_args;
nfs4_stateid stateid;
struct nfs4_layoutdriver_data layout;
};
struct nfs4_layoutget_res {
__u32 return_on_close;
struct pnfs_layout_range range;
__u32 type;
nfs4_stateid stateid;
struct nfs4_sequence_res seq_res;
struct nfs4_layoutdriver_data *layoutp;
};
struct nfs4_layoutget {
struct nfs4_layoutget_args args;
struct nfs4_layoutget_res res;
struct pnfs_layout_segment **lsegpp;
gfp_t gfp_flags;
};
struct nfs4_getdeviceinfo_args {
struct pnfs_device *pdev;
struct nfs4_sequence_args seq_args;
};
struct nfs4_getdeviceinfo_res {
struct pnfs_device *pdev;
struct nfs4_sequence_res seq_res;
};
struct nfs4_layoutcommit_args {
nfs4_stateid stateid;
__u64 lastbytewritten;
struct inode *inode;
const u32 *bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_layoutcommit_res {
struct nfs_fattr *fattr;
const struct nfs_server *server;
struct nfs4_sequence_res seq_res;
};
struct nfs4_layoutcommit_data {
struct rpc_task task;
struct nfs_fattr fattr;
struct list_head lseg_list;
struct rpc_cred *cred;
struct nfs4_layoutcommit_args args;
struct nfs4_layoutcommit_res res;
};
struct nfs4_layoutreturn_args {
__u32 layout_type;
struct inode *inode;
nfs4_stateid stateid;
struct nfs4_sequence_args seq_args;
};
struct nfs4_layoutreturn_res {
struct nfs4_sequence_res seq_res;
u32 lrs_present;
nfs4_stateid stateid;
};
struct nfs4_layoutreturn {
struct nfs4_layoutreturn_args args;
struct nfs4_layoutreturn_res res;
struct rpc_cred *cred;
struct nfs_client *clp;
int rpc_status;
};
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
/*
* Arguments to the open call.
*/
struct nfs_openargs {
const struct nfs_fh * fh;
struct nfs_seqid * seqid;
int open_flags;
fmode_t fmode;
__u64 clientid;
__u64 id;
union {
<<<<<<< HEAD
struct {
struct iattr * attrs; /* UNCHECKED, GUARDED */
nfs4_verifier verifier; /* EXCLUSIVE */
};
=======
struct iattr * attrs; /* UNCHECKED, GUARDED */
nfs4_verifier verifier; /* EXCLUSIVE */
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
fmode_t delegation_type; /* CLAIM_PREVIOUS */
} u;
const struct qstr * name;
const struct nfs_server *server; /* Needed for ID mapping */
const u32 * bitmask;
__u32 claim;
struct nfs4_sequence_args seq_args;
};
struct nfs_openres {
nfs4_stateid stateid;
struct nfs_fh fh;
struct nfs4_change_info cinfo;
__u32 rflags;
struct nfs_fattr * f_attr;
struct nfs_fattr * dir_attr;
struct nfs_seqid * seqid;
const struct nfs_server *server;
fmode_t delegation_type;
nfs4_stateid delegation;
__u32 do_recall;
__u64 maxsize;
__u32 attrset[NFS4_BITMAP_SIZE];
struct nfs4_sequence_res seq_res;
};
/*
* Arguments to the open_confirm call.
*/
struct nfs_open_confirmargs {
const struct nfs_fh * fh;
nfs4_stateid * stateid;
struct nfs_seqid * seqid;
};
struct nfs_open_confirmres {
nfs4_stateid stateid;
struct nfs_seqid * seqid;
};
/*
* Arguments to the close call.
*/
struct nfs_closeargs {
struct nfs_fh * fh;
nfs4_stateid * stateid;
struct nfs_seqid * seqid;
fmode_t fmode;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs_closeres {
nfs4_stateid stateid;
struct nfs_fattr * fattr;
struct nfs_seqid * seqid;
const struct nfs_server *server;
struct nfs4_sequence_res seq_res;
};
/*
* * Arguments to the lock,lockt, and locku call.
* */
struct nfs_lowner {
__u64 clientid;
__u64 id;
<<<<<<< HEAD
dev_t s_dev;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
};
struct nfs_lock_args {
struct nfs_fh * fh;
struct file_lock * fl;
struct nfs_seqid * lock_seqid;
nfs4_stateid * lock_stateid;
struct nfs_seqid * open_seqid;
nfs4_stateid * open_stateid;
struct nfs_lowner lock_owner;
unsigned char block : 1;
unsigned char reclaim : 1;
unsigned char new_lock_owner : 1;
struct nfs4_sequence_args seq_args;
};
struct nfs_lock_res {
nfs4_stateid stateid;
struct nfs_seqid * lock_seqid;
struct nfs_seqid * open_seqid;
struct nfs4_sequence_res seq_res;
};
struct nfs_locku_args {
struct nfs_fh * fh;
struct file_lock * fl;
struct nfs_seqid * seqid;
nfs4_stateid * stateid;
struct nfs4_sequence_args seq_args;
};
struct nfs_locku_res {
nfs4_stateid stateid;
struct nfs_seqid * seqid;
struct nfs4_sequence_res seq_res;
};
struct nfs_lockt_args {
struct nfs_fh * fh;
struct file_lock * fl;
struct nfs_lowner lock_owner;
struct nfs4_sequence_args seq_args;
};
struct nfs_lockt_res {
struct file_lock * denied; /* LOCK, LOCKT failed */
struct nfs4_sequence_res seq_res;
};
<<<<<<< HEAD
struct nfs_release_lockowner_args {
struct nfs_lowner lock_owner;
};
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct nfs4_delegreturnargs {
const struct nfs_fh *fhandle;
const nfs4_stateid *stateid;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_delegreturnres {
struct nfs_fattr * fattr;
const struct nfs_server *server;
struct nfs4_sequence_res seq_res;
};
/*
* Arguments to the read call.
*/
struct nfs_readargs {
struct nfs_fh * fh;
struct nfs_open_context *context;
<<<<<<< HEAD
struct nfs_lock_context *lock_context;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
__u64 offset;
__u32 count;
unsigned int pgbase;
struct page ** pages;
struct nfs4_sequence_args seq_args;
};
struct nfs_readres {
struct nfs_fattr * fattr;
__u32 count;
int eof;
struct nfs4_sequence_res seq_res;
};
/*
* Arguments to the write call.
*/
struct nfs_writeargs {
struct nfs_fh * fh;
struct nfs_open_context *context;
<<<<<<< HEAD
struct nfs_lock_context *lock_context;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
__u64 offset;
__u32 count;
enum nfs3_stable_how stable;
unsigned int pgbase;
struct page ** pages;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs_writeverf {
enum nfs3_stable_how committed;
__be32 verifier[2];
};
struct nfs_writeres {
struct nfs_fattr * fattr;
struct nfs_writeverf * verf;
__u32 count;
const struct nfs_server *server;
struct nfs4_sequence_res seq_res;
};
/*
* Common arguments to the unlink call
*/
struct nfs_removeargs {
const struct nfs_fh *fh;
struct qstr name;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs_removeres {
const struct nfs_server *server;
struct nfs_fattr *dir_attr;
struct nfs4_change_info cinfo;
struct nfs4_sequence_res seq_res;
};
/*
<<<<<<< HEAD
* Common arguments to the rename call
*/
struct nfs_renameargs {
const struct nfs_fh *old_dir;
const struct nfs_fh *new_dir;
const struct qstr *old_name;
const struct qstr *new_name;
const u32 *bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs_renameres {
const struct nfs_server *server;
struct nfs4_change_info old_cinfo;
struct nfs_fattr *old_fattr;
struct nfs4_change_info new_cinfo;
struct nfs_fattr *new_fattr;
struct nfs4_sequence_res seq_res;
};
/*
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
* Argument struct for decode_entry function
*/
struct nfs_entry {
__u64 ino;
__u64 cookie,
prev_cookie;
const char * name;
unsigned int len;
int eof;
struct nfs_fh * fh;
struct nfs_fattr * fattr;
<<<<<<< HEAD
unsigned char d_type;
struct nfs_server * server;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
};
/*
* The following types are for NFSv2 only.
*/
struct nfs_sattrargs {
struct nfs_fh * fh;
struct iattr * sattr;
};
struct nfs_diropargs {
struct nfs_fh * fh;
const char * name;
unsigned int len;
};
struct nfs_createargs {
struct nfs_fh * fh;
const char * name;
unsigned int len;
struct iattr * sattr;
};
<<<<<<< HEAD
=======
struct nfs_renameargs {
struct nfs_fh * fromfh;
const char * fromname;
unsigned int fromlen;
struct nfs_fh * tofh;
const char * toname;
unsigned int tolen;
};
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct nfs_setattrargs {
struct nfs_fh * fh;
nfs4_stateid stateid;
struct iattr * iap;
const struct nfs_server * server; /* Needed for name mapping */
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs_setaclargs {
struct nfs_fh * fh;
size_t acl_len;
unsigned int acl_pgbase;
struct page ** acl_pages;
struct nfs4_sequence_args seq_args;
};
struct nfs_setaclres {
struct nfs4_sequence_res seq_res;
};
struct nfs_getaclargs {
struct nfs_fh * fh;
size_t acl_len;
unsigned int acl_pgbase;
struct page ** acl_pages;
struct nfs4_sequence_args seq_args;
};
struct nfs_getaclres {
size_t acl_len;
struct nfs4_sequence_res seq_res;
};
struct nfs_setattrres {
struct nfs_fattr * fattr;
const struct nfs_server * server;
struct nfs4_sequence_res seq_res;
};
struct nfs_linkargs {
struct nfs_fh * fromfh;
struct nfs_fh * tofh;
const char * toname;
unsigned int tolen;
};
struct nfs_symlinkargs {
struct nfs_fh * fromfh;
const char * fromname;
unsigned int fromlen;
struct page ** pages;
unsigned int pathlen;
struct iattr * sattr;
};
struct nfs_readdirargs {
struct nfs_fh * fh;
__u32 cookie;
unsigned int count;
struct page ** pages;
};
struct nfs3_getaclargs {
struct nfs_fh * fh;
int mask;
struct page ** pages;
};
struct nfs3_setaclargs {
struct inode * inode;
int mask;
struct posix_acl * acl_access;
struct posix_acl * acl_default;
size_t len;
unsigned int npages;
struct page ** pages;
};
struct nfs_diropok {
struct nfs_fh * fh;
struct nfs_fattr * fattr;
};
struct nfs_readlinkargs {
struct nfs_fh * fh;
unsigned int pgbase;
unsigned int pglen;
struct page ** pages;
};
struct nfs3_sattrargs {
struct nfs_fh * fh;
struct iattr * sattr;
unsigned int guard;
struct timespec guardtime;
};
struct nfs3_diropargs {
struct nfs_fh * fh;
const char * name;
unsigned int len;
};
struct nfs3_accessargs {
struct nfs_fh * fh;
__u32 access;
};
struct nfs3_createargs {
struct nfs_fh * fh;
const char * name;
unsigned int len;
struct iattr * sattr;
enum nfs3_createmode createmode;
__be32 verifier[2];
};
struct nfs3_mkdirargs {
struct nfs_fh * fh;
const char * name;
unsigned int len;
struct iattr * sattr;
};
struct nfs3_symlinkargs {
struct nfs_fh * fromfh;
const char * fromname;
unsigned int fromlen;
struct page ** pages;
unsigned int pathlen;
struct iattr * sattr;
};
struct nfs3_mknodargs {
struct nfs_fh * fh;
const char * name;
unsigned int len;
enum nfs3_ftype type;
struct iattr * sattr;
dev_t rdev;
};
<<<<<<< HEAD
=======
struct nfs3_renameargs {
struct nfs_fh * fromfh;
const char * fromname;
unsigned int fromlen;
struct nfs_fh * tofh;
const char * toname;
unsigned int tolen;
};
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct nfs3_linkargs {
struct nfs_fh * fromfh;
struct nfs_fh * tofh;
const char * toname;
unsigned int tolen;
};
struct nfs3_readdirargs {
struct nfs_fh * fh;
__u64 cookie;
__be32 verf[2];
int plus;
unsigned int count;
struct page ** pages;
};
struct nfs3_diropres {
struct nfs_fattr * dir_attr;
struct nfs_fh * fh;
struct nfs_fattr * fattr;
};
struct nfs3_accessres {
struct nfs_fattr * fattr;
__u32 access;
};
struct nfs3_readlinkargs {
struct nfs_fh * fh;
unsigned int pgbase;
unsigned int pglen;
struct page ** pages;
};
<<<<<<< HEAD
=======
struct nfs3_renameres {
struct nfs_fattr * fromattr;
struct nfs_fattr * toattr;
};
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct nfs3_linkres {
struct nfs_fattr * dir_attr;
struct nfs_fattr * fattr;
};
struct nfs3_readdirres {
struct nfs_fattr * dir_attr;
__be32 * verf;
int plus;
};
struct nfs3_getaclres {
struct nfs_fattr * fattr;
int mask;
unsigned int acl_access_count;
unsigned int acl_default_count;
struct posix_acl * acl_access;
struct posix_acl * acl_default;
};
#ifdef CONFIG_NFS_V4
typedef u64 clientid4;
struct nfs4_accessargs {
const struct nfs_fh * fh;
const u32 * bitmask;
u32 access;
struct nfs4_sequence_args seq_args;
};
struct nfs4_accessres {
const struct nfs_server * server;
struct nfs_fattr * fattr;
u32 supported;
u32 access;
struct nfs4_sequence_res seq_res;
};
struct nfs4_create_arg {
u32 ftype;
union {
struct {
struct page ** pages;
unsigned int len;
} symlink; /* NF4LNK */
struct {
u32 specdata1;
u32 specdata2;
} device; /* NF4BLK, NF4CHR */
} u;
const struct qstr * name;
const struct nfs_server * server;
const struct iattr * attrs;
const struct nfs_fh * dir_fh;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_create_res {
const struct nfs_server * server;
struct nfs_fh * fh;
struct nfs_fattr * fattr;
struct nfs4_change_info dir_cinfo;
struct nfs_fattr * dir_fattr;
struct nfs4_sequence_res seq_res;
};
struct nfs4_fsinfo_arg {
const struct nfs_fh * fh;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_fsinfo_res {
struct nfs_fsinfo *fsinfo;
struct nfs4_sequence_res seq_res;
};
struct nfs4_getattr_arg {
const struct nfs_fh * fh;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_getattr_res {
const struct nfs_server * server;
struct nfs_fattr * fattr;
struct nfs4_sequence_res seq_res;
};
struct nfs4_link_arg {
const struct nfs_fh * fh;
const struct nfs_fh * dir_fh;
const struct qstr * name;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_link_res {
const struct nfs_server * server;
struct nfs_fattr * fattr;
struct nfs4_change_info cinfo;
struct nfs_fattr * dir_attr;
struct nfs4_sequence_res seq_res;
};
struct nfs4_lookup_arg {
const struct nfs_fh * dir_fh;
const struct qstr * name;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_lookup_res {
const struct nfs_server * server;
struct nfs_fattr * fattr;
struct nfs_fh * fh;
struct nfs4_sequence_res seq_res;
};
struct nfs4_lookup_root_arg {
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_pathconf_arg {
const struct nfs_fh * fh;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_pathconf_res {
struct nfs_pathconf *pathconf;
struct nfs4_sequence_res seq_res;
};
struct nfs4_readdir_arg {
const struct nfs_fh * fh;
u64 cookie;
nfs4_verifier verifier;
u32 count;
struct page ** pages; /* zero-copy data */
unsigned int pgbase; /* zero-copy data */
const u32 * bitmask;
<<<<<<< HEAD
int plus;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct nfs4_sequence_args seq_args;
};
struct nfs4_readdir_res {
nfs4_verifier verifier;
unsigned int pgbase;
struct nfs4_sequence_res seq_res;
};
struct nfs4_readlink {
const struct nfs_fh * fh;
unsigned int pgbase;
unsigned int pglen; /* zero-copy data */
struct page ** pages; /* zero-copy data */
struct nfs4_sequence_args seq_args;
};
struct nfs4_readlink_res {
struct nfs4_sequence_res seq_res;
};
<<<<<<< HEAD
=======
struct nfs4_rename_arg {
const struct nfs_fh * old_dir;
const struct nfs_fh * new_dir;
const struct qstr * old_name;
const struct qstr * new_name;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_rename_res {
const struct nfs_server * server;
struct nfs4_change_info old_cinfo;
struct nfs_fattr * old_fattr;
struct nfs4_change_info new_cinfo;
struct nfs_fattr * new_fattr;
struct nfs4_sequence_res seq_res;
};
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
#define NFS4_SETCLIENTID_NAMELEN (127)
struct nfs4_setclientid {
const nfs4_verifier * sc_verifier;
unsigned int sc_name_len;
char sc_name[NFS4_SETCLIENTID_NAMELEN + 1];
u32 sc_prog;
unsigned int sc_netid_len;
char sc_netid[RPCBIND_MAXNETIDLEN + 1];
unsigned int sc_uaddr_len;
char sc_uaddr[RPCBIND_MAXUADDRLEN + 1];
u32 sc_cb_ident;
};
struct nfs4_setclientid_res {
u64 clientid;
nfs4_verifier confirm;
};
struct nfs4_statfs_arg {
const struct nfs_fh * fh;
const u32 * bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_statfs_res {
struct nfs_fsstat *fsstat;
struct nfs4_sequence_res seq_res;
};
struct nfs4_server_caps_arg {
struct nfs_fh *fhandle;
struct nfs4_sequence_args seq_args;
};
struct nfs4_server_caps_res {
u32 attr_bitmask[2];
u32 acl_bitmask;
u32 has_links;
u32 has_symlinks;
struct nfs4_sequence_res seq_res;
};
struct nfs4_string {
unsigned int len;
char *data;
};
#define NFS4_PATHNAME_MAXCOMPONENTS 512
struct nfs4_pathname {
unsigned int ncomponents;
struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS];
};
#define NFS4_FS_LOCATION_MAXSERVERS 10
struct nfs4_fs_location {
unsigned int nservers;
struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS];
struct nfs4_pathname rootpath;
};
#define NFS4_FS_LOCATIONS_MAXENTRIES 10
struct nfs4_fs_locations {
struct nfs_fattr fattr;
const struct nfs_server *server;
struct nfs4_pathname fs_path;
int nlocations;
struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES];
};
struct nfs4_fs_locations_arg {
const struct nfs_fh *dir_fh;
const struct qstr *name;
struct page *page;
const u32 *bitmask;
struct nfs4_sequence_args seq_args;
};
struct nfs4_fs_locations_res {
struct nfs4_fs_locations *fs_locations;
struct nfs4_sequence_res seq_res;
};
<<<<<<< HEAD
struct nfs4_secinfo_oid {
unsigned int len;
char data[GSS_OID_MAX_LEN];
};
struct nfs4_secinfo_gss {
struct nfs4_secinfo_oid sec_oid4;
unsigned int qop4;
unsigned int service;
};
struct nfs4_secinfo_flavor {
unsigned int flavor;
struct nfs4_secinfo_gss gss;
};
struct nfs4_secinfo_flavors {
unsigned int num_flavors;
struct nfs4_secinfo_flavor flavors[0];
};
struct nfs4_secinfo_arg {
const struct nfs_fh *dir_fh;
const struct qstr *name;
struct nfs4_sequence_args seq_args;
};
struct nfs4_secinfo_res {
struct nfs4_secinfo_flavors *flavors;
struct nfs4_sequence_res seq_res;
};
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
#endif /* CONFIG_NFS_V4 */
struct nfstime4 {
u64 seconds;
u32 nseconds;
};
#ifdef CONFIG_NFS_V4_1
struct nfs_impl_id4 {
u32 domain_len;
char *domain;
u32 name_len;
char *name;
struct nfstime4 date;
};
#define NFS4_EXCHANGE_ID_LEN (48)
struct nfs41_exchange_id_args {
struct nfs_client *client;
nfs4_verifier *verifier;
unsigned int id_len;
char id[NFS4_EXCHANGE_ID_LEN];
u32 flags;
};
struct server_owner {
uint64_t minor_id;
uint32_t major_id_sz;
char major_id[NFS4_OPAQUE_LIMIT];
};
struct server_scope {
uint32_t server_scope_sz;
char server_scope[NFS4_OPAQUE_LIMIT];
};
struct nfs41_exchange_id_res {
struct nfs_client *client;
u32 flags;
};
struct nfs41_create_session_args {
struct nfs_client *client;
uint32_t flags;
uint32_t cb_program;
struct nfs4_channel_attrs fc_attrs; /* Fore Channel */
struct nfs4_channel_attrs bc_attrs; /* Back Channel */
};
struct nfs41_create_session_res {
struct nfs_client *client;
};
struct nfs41_reclaim_complete_args {
/* In the future extend to include curr_fh for use with migration */
unsigned char one_fs:1;
struct nfs4_sequence_args seq_args;
};
struct nfs41_reclaim_complete_res {
struct nfs4_sequence_res seq_res;
};
#endif /* CONFIG_NFS_V4_1 */
struct nfs_page;
#define NFS_PAGEVEC_SIZE (8U)
struct nfs_read_data {
int flags;
struct rpc_task task;
struct inode *inode;
struct rpc_cred *cred;
struct nfs_fattr fattr; /* fattr storage */
struct list_head pages; /* Coalesced read requests */
struct nfs_page *req; /* multi ops per nfs_page */
struct page **pagevec;
unsigned int npages; /* Max length of pagevec */
struct nfs_readargs args;
struct nfs_readres res;
<<<<<<< HEAD
unsigned long timestamp; /* For lease renewal */
struct pnfs_layout_segment *lseg;
struct nfs_client *ds_clp; /* pNFS data server */
const struct rpc_call_ops *mds_ops;
int (*read_done_cb) (struct rpc_task *task, struct nfs_read_data *data);
__u64 mds_offset;
int pnfs_error;
=======
#ifdef CONFIG_NFS_V4
unsigned long timestamp; /* For lease renewal */
#endif
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct page *page_array[NFS_PAGEVEC_SIZE];
};
struct nfs_write_data {
int flags;
struct rpc_task task;
struct inode *inode;
struct rpc_cred *cred;
struct nfs_fattr fattr;
struct nfs_writeverf verf;
struct list_head pages; /* Coalesced requests we wish to flush */
struct nfs_page *req; /* multi ops per nfs_page */
struct page **pagevec;
unsigned int npages; /* Max length of pagevec */
struct nfs_writeargs args; /* argument struct */
struct nfs_writeres res; /* result struct */
<<<<<<< HEAD
struct pnfs_layout_segment *lseg;
struct nfs_client *ds_clp; /* pNFS data server */
int ds_commit_index;
const struct rpc_call_ops *mds_ops;
int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data);
#ifdef CONFIG_NFS_V4
unsigned long timestamp; /* For lease renewal */
#endif
__u64 mds_offset; /* Filelayout dense stripe */
int pnfs_error;
=======
#ifdef CONFIG_NFS_V4
unsigned long timestamp; /* For lease renewal */
#endif
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct page *page_array[NFS_PAGEVEC_SIZE];
};
struct nfs_access_entry;
<<<<<<< HEAD
struct nfs_client;
struct rpc_timeout;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
/*
* RPC procedure vector for NFSv2/NFSv3 demuxing
*/
struct nfs_rpc_ops {
u32 version; /* Protocol version */
const struct dentry_operations *dentry_ops;
const struct inode_operations *dir_inode_ops;
const struct inode_operations *file_inode_ops;
<<<<<<< HEAD
const struct file_operations *file_ops;
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
int (*getroot) (struct nfs_server *, struct nfs_fh *,
struct nfs_fsinfo *);
int (*lookupfh)(struct nfs_server *, struct nfs_fh *,
struct qstr *, struct nfs_fh *,
struct nfs_fattr *);
int (*getattr) (struct nfs_server *, struct nfs_fh *,
struct nfs_fattr *);
int (*setattr) (struct dentry *, struct nfs_fattr *,
struct iattr *);
<<<<<<< HEAD
int (*lookup) (struct rpc_clnt *clnt, struct inode *, struct qstr *,
=======
int (*lookup) (struct inode *, struct qstr *,
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
struct nfs_fh *, struct nfs_fattr *);
int (*access) (struct inode *, struct nfs_access_entry *);
int (*readlink)(struct inode *, struct page *, unsigned int,
unsigned int);
int (*create) (struct inode *, struct dentry *,
<<<<<<< HEAD
struct iattr *, int, struct nfs_open_context *);
=======
struct iattr *, int, struct nameidata *);
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
int (*remove) (struct inode *, struct qstr *);
void (*unlink_setup) (struct rpc_message *, struct inode *dir);
int (*unlink_done) (struct rpc_task *, struct inode *);
int (*rename) (struct inode *, struct qstr *,
struct inode *, struct qstr *);
<<<<<<< HEAD
void (*rename_setup) (struct rpc_message *msg, struct inode *dir);
int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir);
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
int (*link) (struct inode *, struct inode *, struct qstr *);
int (*symlink) (struct inode *, struct dentry *, struct page *,
unsigned int, struct iattr *);
int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
int (*rmdir) (struct inode *, struct qstr *);
int (*readdir) (struct dentry *, struct rpc_cred *,
<<<<<<< HEAD
u64, struct page **, unsigned int, int);
=======
u64, struct page *, unsigned int, int);
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
int (*mknod) (struct inode *, struct dentry *, struct iattr *,
dev_t);
int (*statfs) (struct nfs_server *, struct nfs_fh *,
struct nfs_fsstat *);
int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
struct nfs_fsinfo *);
int (*pathconf) (struct nfs_server *, struct nfs_fh *,
struct nfs_pathconf *);
int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
<<<<<<< HEAD
int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int);
=======
__be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus);
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
int (*read_done) (struct rpc_task *, struct nfs_read_data *);
void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
int (*write_done) (struct rpc_task *, struct nfs_write_data *);
void (*commit_setup) (struct nfs_write_data *, struct rpc_message *);
int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
int (*lock)(struct file *, int, struct file_lock *);
int (*lock_check_bounds)(const struct file_lock *);
void (*clear_acl_cache)(struct inode *);
void (*close_context)(struct nfs_open_context *ctx, int);
<<<<<<< HEAD
struct inode * (*open_context) (struct inode *dir,
struct nfs_open_context *ctx,
int open_flags,
struct iattr *iattr);
int (*init_client) (struct nfs_client *, const struct rpc_timeout *,
const char *, rpc_authflavor_t, int);
int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
=======
>>>>>>> 296c66da8a02d52243f45b80521febece5ed498a
};
/*
* NFS_CALL(getattr, inode, (fattr));
* into
* NFS_PROTO(inode)->getattr(fattr);
*/
#define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
/*
* Function vectors etc. for the NFS client
*/
extern const struct nfs_rpc_ops nfs_v2_clientops;
extern const struct nfs_rpc_ops nfs_v3_clientops;
extern const struct nfs_rpc_ops nfs_v4_clientops;
extern struct rpc_version nfs_version2;
extern struct rpc_version nfs_version3;
extern struct rpc_version nfs_version4;
extern struct rpc_version nfsacl_version3;
extern struct rpc_program nfsacl_program;
#endif
|
Core2idiot/Kernel-Samsung-3.0...-
|
include/linux/nfs_xdr.h
|
C
|
gpl-2.0
| 32,691
|
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#include <string>
#include "Spell.h"
#include "SpellAuras.h"
#include "SpellScript.h"
#include "SpellMgr.h"
bool _SpellScript::_Validate(SpellInfo const* entry)
{
if (!Validate(entry))
{
sLog->outError("TSCR: Spell `%u` did not pass Validate() function of script `%s` - script will be not added to the spell", entry->Id, m_scriptName->c_str());
return false;
}
return true;
}
void _SpellScript::_Register()
{
m_currentScriptState = SPELL_SCRIPT_STATE_REGISTRATION;
Register();
m_currentScriptState = SPELL_SCRIPT_STATE_NONE;
}
void _SpellScript::_Unload()
{
m_currentScriptState = SPELL_SCRIPT_STATE_UNLOADING;
Unload();
m_currentScriptState = SPELL_SCRIPT_STATE_NONE;
}
void _SpellScript::_Init(std::string const* scriptname, uint32 spellId)
{
m_currentScriptState = SPELL_SCRIPT_STATE_NONE;
m_scriptName = scriptname;
m_scriptSpellId = spellId;
}
std::string const* _SpellScript::_GetScriptName() const
{
return m_scriptName;
}
_SpellScript::EffectHook::EffectHook(uint8 _effIndex)
{
// effect index must be in range <0;2>, allow use of special effindexes
ASSERT(_effIndex == EFFECT_ALL || _effIndex == EFFECT_FIRST_FOUND || _effIndex < MAX_SPELL_EFFECTS);
effIndex = _effIndex;
}
uint8 _SpellScript::EffectHook::GetAffectedEffectsMask(SpellInfo const* spellEntry)
{
uint8 mask = 0;
if ((effIndex == EFFECT_ALL) || (effIndex == EFFECT_FIRST_FOUND))
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if ((effIndex == EFFECT_FIRST_FOUND) && mask)
return mask;
if (CheckEffect(spellEntry, i))
mask |= (uint8)1<<i;
}
}
else
{
if (CheckEffect(spellEntry, effIndex))
mask |= (uint8)1<<effIndex;
}
return mask;
}
bool _SpellScript::EffectHook::IsEffectAffected(SpellInfo const* spellEntry, uint8 effIndex)
{
return GetAffectedEffectsMask(spellEntry) & 1<<effIndex;
}
std::string _SpellScript::EffectHook::EffIndexToString()
{
switch (effIndex)
{
case EFFECT_ALL:
return "EFFECT_ALL";
case EFFECT_FIRST_FOUND:
return "EFFECT_FIRST_FOUND";
case EFFECT_0:
return "EFFECT_0";
case EFFECT_1:
return "EFFECT_1";
case EFFECT_2:
return "EFFECT_2";
}
return "Invalid Value";
}
bool _SpellScript::EffectNameCheck::Check(SpellInfo const* spellEntry, uint8 effIndex)
{
if (!spellEntry->Effects[effIndex].Effect && !effName)
return true;
if (!spellEntry->Effects[effIndex].Effect)
return false;
return (effName == SPELL_EFFECT_ANY) || (spellEntry->Effects[effIndex].Effect == effName);
}
std::string _SpellScript::EffectNameCheck::ToString()
{
switch (effName)
{
case SPELL_EFFECT_ANY:
return "SPELL_EFFECT_ANY";
default:
char num[10];
sprintf (num, "%u", effName);
return num;
}
}
bool _SpellScript::EffectAuraNameCheck::Check(SpellInfo const* spellEntry, uint8 effIndex)
{
if (!spellEntry->Effects[effIndex].ApplyAuraName && !effAurName)
return true;
if (!spellEntry->Effects[effIndex].ApplyAuraName)
return false;
return (effAurName == SPELL_EFFECT_ANY) || (spellEntry->Effects[effIndex].ApplyAuraName == effAurName);
}
std::string _SpellScript::EffectAuraNameCheck::ToString()
{
switch (effAurName)
{
case SPELL_AURA_ANY:
return "SPELL_AURA_ANY";
default:
char num[10];
sprintf (num, "%u", effAurName);
return num;
}
}
SpellScript::CastHandler::CastHandler(SpellCastFnType _pCastHandlerScript)
{
pCastHandlerScript = _pCastHandlerScript;
}
void SpellScript::CastHandler::Call(SpellScript* spellScript)
{
(spellScript->*pCastHandlerScript)();
}
SpellScript::CheckCastHandler::CheckCastHandler(SpellCheckCastFnType checkCastHandlerScript)
{
_checkCastHandlerScript = checkCastHandlerScript;
}
SpellCastResult SpellScript::CheckCastHandler::Call(SpellScript* spellScript)
{
return (spellScript->*_checkCastHandlerScript)();
}
SpellScript::EffectHandler::EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
: _SpellScript::EffectNameCheck(_effName), _SpellScript::EffectHook(_effIndex)
{
pEffectHandlerScript = _pEffectHandlerScript;
}
std::string SpellScript::EffectHandler::ToString()
{
return "Index: " + EffIndexToString() + " Name: " +_SpellScript::EffectNameCheck::ToString();
}
bool SpellScript::EffectHandler::CheckEffect(SpellInfo const* spellEntry, uint8 effIndex)
{
return _SpellScript::EffectNameCheck::Check(spellEntry, effIndex);
}
void SpellScript::EffectHandler::Call(SpellScript* spellScript, SpellEffIndex effIndex)
{
(spellScript->*pEffectHandlerScript)(effIndex);
}
SpellScript::HitHandler::HitHandler(SpellHitFnType _pHitHandlerScript)
{
pHitHandlerScript = _pHitHandlerScript;
}
void SpellScript::HitHandler::Call(SpellScript* spellScript)
{
(spellScript->*pHitHandlerScript)();
}
SpellScript::UnitTargetHandler::UnitTargetHandler(SpellUnitTargetFnType _pUnitTargetHandlerScript, uint8 _effIndex, uint16 _targetType)
: _SpellScript::EffectHook(_effIndex), targetType(_targetType)
{
pUnitTargetHandlerScript = _pUnitTargetHandlerScript;
}
std::string SpellScript::UnitTargetHandler::ToString()
{
std::ostringstream oss;
oss << "Index: " << EffIndexToString() << " Target: " << targetType;
return oss.str();
}
bool SpellScript::UnitTargetHandler::CheckEffect(SpellInfo const* spellEntry, uint8 effIndex)
{
if (!targetType)
return false;
return (effIndex == EFFECT_ALL) || (spellEntry->Effects[effIndex].TargetA.GetTarget() == targetType || spellEntry->Effects[effIndex].TargetB.GetTarget() == targetType);
}
void SpellScript::UnitTargetHandler::Call(SpellScript* spellScript, std::list<Unit*>& unitTargets)
{
(spellScript->*pUnitTargetHandlerScript)(unitTargets);
}
bool SpellScript::_Validate(SpellInfo const* entry)
{
for (std::list<EffectHandler>::iterator itr = OnEffectLaunch.begin(); itr != OnEffectLaunch.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectLaunchTarget.begin(); itr != OnEffectLaunchTarget.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectHit.begin(); itr != OnEffectHit.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectHitTarget.begin(); itr != OnEffectHitTarget.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<UnitTargetHandler>::iterator itr = OnUnitTargetSelect.begin(); itr != OnUnitTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnUnitTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
return _SpellScript::_Validate(entry);
}
bool SpellScript::_Load(Spell* spell)
{
m_spell = spell;
_PrepareScriptCall((SpellScriptHookType)SPELL_SCRIPT_STATE_LOADING);
bool load = Load();
_FinishScriptCall();
return load;
}
void SpellScript::_InitHit()
{
m_hitPreventEffectMask = 0;
m_hitPreventDefaultEffectMask = 0;
}
void SpellScript::_PrepareScriptCall(SpellScriptHookType hookType)
{
m_currentScriptState = hookType;
}
void SpellScript::_FinishScriptCall()
{
m_currentScriptState = SPELL_SCRIPT_STATE_NONE;
}
bool SpellScript::IsInCheckCastHook() const
{
return m_currentScriptState == SPELL_SCRIPT_HOOK_CHECK_CAST;
}
bool SpellScript::IsInTargetHook() const
{
switch (m_currentScriptState)
{
case SPELL_SCRIPT_HOOK_EFFECT_LAUNCH_TARGET:
case SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET:
case SPELL_SCRIPT_HOOK_BEFORE_HIT:
case SPELL_SCRIPT_HOOK_HIT:
case SPELL_SCRIPT_HOOK_AFTER_HIT:
return true;
}
return false;
}
bool SpellScript::IsInHitPhase() const
{
return (m_currentScriptState >= HOOK_SPELL_HIT_START && m_currentScriptState < HOOK_SPELL_HIT_END);
}
bool SpellScript::IsInEffectHook() const
{
return (m_currentScriptState >= SPELL_SCRIPT_HOOK_EFFECT_LAUNCH && m_currentScriptState <= SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET);
}
Unit* SpellScript::GetCaster()
{
return m_spell->GetCaster();
}
Unit* SpellScript::GetOriginalCaster()
{
return m_spell->GetOriginalCaster();
}
SpellInfo const* SpellScript::GetSpellInfo()
{
return m_spell->GetSpellInfo();
}
WorldLocation const* SpellScript::GetTargetDest()
{
if (m_spell->m_targets.HasDst())
return m_spell->m_targets.GetDstPos();
return NULL;
}
void SpellScript::SetTargetDest(WorldLocation& loc)
{
m_spell->m_targets.SetDst(loc);
}
Unit* SpellScript::GetTargetUnit()
{
return m_spell->m_targets.GetUnitTarget();
}
GameObject* SpellScript::GetTargetGObj()
{
return m_spell->m_targets.GetGOTarget();
}
Item* SpellScript::GetTargetItem()
{
return m_spell->m_targets.GetItemTarget();
}
Unit* SpellScript::GetHitUnit()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
return m_spell->unitTarget;
}
Creature* SpellScript::GetHitCreature()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
if (m_spell->unitTarget)
return m_spell->unitTarget->ToCreature();
else
return NULL;
}
Player* SpellScript::GetHitPlayer()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
if (m_spell->unitTarget)
return m_spell->unitTarget->ToPlayer();
else
return NULL;
}
Item* SpellScript::GetHitItem()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
return m_spell->itemTarget;
}
GameObject* SpellScript::GetHitGObj()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
return m_spell->gameObjTarget;
}
WorldLocation* SpellScript::GetHitDest()
{
if (!IsInEffectHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
return m_spell->destTarget;
}
int32 SpellScript::GetHitDamage()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->m_damage;
}
void SpellScript::SetHitDamage(int32 damage)
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->m_damage = damage;
}
int32 SpellScript::GetHitHeal()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->m_healing;
}
void SpellScript::SetHitHeal(int32 heal)
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->m_healing = heal;
}
Aura* SpellScript::GetHitAura()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
if (!m_spell->m_spellAura)
return NULL;
if (m_spell->m_spellAura->IsRemoved())
return NULL;
return m_spell->m_spellAura;
}
void SpellScript::PreventHitAura()
{
if (!IsInTargetHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
if (m_spell->m_spellAura)
m_spell->m_spellAura->Remove();
}
void SpellScript::PreventHitEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_hitPreventEffectMask |= 1 << effIndex;
PreventHitDefaultEffect(effIndex);
}
void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_hitPreventDefaultEffectMask |= 1 << effIndex;
}
int32 SpellScript::GetEffectValue()
{
if (!IsInEffectHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->damage;
}
Item* SpellScript::GetCastItem()
{
return m_spell->m_CastItem;
}
void SpellScript::CreateItem(uint32 effIndex, uint32 itemId)
{
m_spell->DoCreateItem(effIndex, itemId);
}
SpellInfo const* SpellScript::GetTriggeringSpell()
{
return m_spell->m_triggeredByAuraSpell;
}
void SpellScript::FinishCast(SpellCastResult result)
{
m_spell->SendCastResult(result);
m_spell->finish(result == SPELL_CAST_OK);
}
void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result)
{
if (!IsInCheckCastHook())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->m_customError = result;
}
SpellValue const* SpellScript::GetSpellValue()
{
return m_spell->m_spellValue;
}
bool AuraScript::_Validate(SpellInfo const* entry)
{
for (std::list<CheckAreaTargetHandler>::iterator itr = DoCheckAreaTarget.begin(); itr != DoCheckAreaTarget.end(); ++itr)
if (!entry->HasAreaAuraEffect())
sLog->outError("TSCR: Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraDispelHandler>::iterator itr = OnDispel.begin(); itr != OnDispel.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraDispelHandler>::iterator itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = OnEffectRemove.begin(); itr != OnEffectRemove.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectApply.begin(); itr != AfterEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectRemove.begin(); itr != AfterEffectRemove.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectPeriodicHandler>::iterator itr = OnEffectPeriodic.begin(); itr != OnEffectPeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectUpdatePeriodicHandler>::iterator itr = OnEffectUpdatePeriodic.begin(); itr != OnEffectUpdatePeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectCalcAmountHandler>::iterator itr = DoEffectCalcAmount.begin(); itr != DoEffectCalcAmount.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectCalcPeriodicHandler>::iterator itr = DoEffectCalcPeriodic.begin(); itr != DoEffectCalcPeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectCalcSpellModHandler>::iterator itr = DoEffectCalcSpellMod.begin(); itr != DoEffectCalcSpellMod.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectAbsorbHandler>::iterator itr = OnEffectAbsorb.begin(); itr != OnEffectAbsorb.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectAbsorbHandler>::iterator itr = AfterEffectAbsorb.begin(); itr != AfterEffectAbsorb.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectManaShieldHandler>::iterator itr = OnEffectManaShield.begin(); itr != OnEffectManaShield.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectManaShieldHandler>::iterator itr = AfterEffectManaShield.begin(); itr != AfterEffectManaShield.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
return _SpellScript::_Validate(entry);
}
AuraScript::CheckAreaTargetHandler::CheckAreaTargetHandler(AuraCheckAreaTargetFnType _pHandlerScript)
{
pHandlerScript = _pHandlerScript;
}
bool AuraScript::CheckAreaTargetHandler::Call(AuraScript* auraScript, Unit* _target)
{
return (auraScript->*pHandlerScript)(_target);
}
AuraScript::AuraDispelHandler::AuraDispelHandler(AuraDispelFnType _pHandlerScript)
{
pHandlerScript = _pHandlerScript;
}
void AuraScript::AuraDispelHandler::Call(AuraScript* auraScript, DispelInfo* _dispelInfo)
{
(auraScript->*pHandlerScript)(_dispelInfo);
}
AuraScript::EffectBase::EffectBase(uint8 _effIndex, uint16 _effName)
: _SpellScript::EffectAuraNameCheck(_effName), _SpellScript::EffectHook(_effIndex)
{
}
bool AuraScript::EffectBase::CheckEffect(SpellInfo const* spellEntry, uint8 effIndex)
{
return _SpellScript::EffectAuraNameCheck::Check(spellEntry, effIndex);
}
std::string AuraScript::EffectBase::ToString()
{
return "Index: " + EffIndexToString() + " AuraName: " +_SpellScript::EffectAuraNameCheck::ToString();
}
AuraScript::EffectPeriodicHandler::EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
: AuraScript::EffectBase(_effIndex, _effName)
{
pEffectHandlerScript = _pEffectHandlerScript;
}
void AuraScript::EffectPeriodicHandler::Call(AuraScript* auraScript, AuraEffect const* _aurEff)
{
(auraScript->*pEffectHandlerScript)(_aurEff);
}
AuraScript::EffectUpdatePeriodicHandler::EffectUpdatePeriodicHandler(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
: AuraScript::EffectBase(_effIndex, _effName)
{
pEffectHandlerScript = _pEffectHandlerScript;
}
void AuraScript::EffectUpdatePeriodicHandler::Call(AuraScript* auraScript, AuraEffect* aurEff)
{
(auraScript->*pEffectHandlerScript)(aurEff);
}
AuraScript::EffectCalcAmountHandler::EffectCalcAmountHandler(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
: AuraScript::EffectBase(_effIndex, _effName)
{
pEffectHandlerScript = _pEffectHandlerScript;
}
void AuraScript::EffectCalcAmountHandler::Call(AuraScript* auraScript, AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
{
(auraScript->*pEffectHandlerScript)(aurEff, amount, canBeRecalculated);
}
AuraScript::EffectCalcPeriodicHandler::EffectCalcPeriodicHandler(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
: AuraScript::EffectBase(_effIndex, _effName)
{
pEffectHandlerScript = _pEffectHandlerScript;
}
void AuraScript::EffectCalcPeriodicHandler::Call(AuraScript* auraScript, AuraEffect const* aurEff, bool& isPeriodic, int32& periodicTimer)
{
(auraScript->*pEffectHandlerScript)(aurEff, isPeriodic, periodicTimer);
}
AuraScript::EffectCalcSpellModHandler::EffectCalcSpellModHandler(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
: AuraScript::EffectBase(_effIndex, _effName)
{
pEffectHandlerScript = _pEffectHandlerScript;
}
void AuraScript::EffectCalcSpellModHandler::Call(AuraScript* auraScript, AuraEffect const* aurEff, SpellModifier*& spellMod)
{
(auraScript->*pEffectHandlerScript)(aurEff, spellMod);
}
AuraScript::EffectApplyHandler::EffectApplyHandler(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode)
: AuraScript::EffectBase(_effIndex, _effName)
{
pEffectHandlerScript = _pEffectHandlerScript;
mode = _mode;
}
void AuraScript::EffectApplyHandler::Call(AuraScript* auraScript, AuraEffect const* _aurEff, AuraEffectHandleModes _mode)
{
if (_mode & mode)
(auraScript->*pEffectHandlerScript)(_aurEff, _mode);
}
AuraScript::EffectAbsorbHandler::EffectAbsorbHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex)
: AuraScript::EffectBase(_effIndex, SPELL_AURA_SCHOOL_ABSORB)
{
pEffectHandlerScript = _pEffectHandlerScript;
}
void AuraScript::EffectAbsorbHandler::Call(AuraScript* auraScript, AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
{
(auraScript->*pEffectHandlerScript)(aurEff, dmgInfo, absorbAmount);
}
AuraScript::EffectManaShieldHandler::EffectManaShieldHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex)
: AuraScript::EffectBase(_effIndex, SPELL_AURA_MANA_SHIELD)
{
pEffectHandlerScript = _pEffectHandlerScript;
}
void AuraScript::EffectManaShieldHandler::Call(AuraScript* auraScript, AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
{
(auraScript->*pEffectHandlerScript)(aurEff, dmgInfo, absorbAmount);
}
bool AuraScript::_Load(Aura* aura)
{
m_aura = aura;
_PrepareScriptCall((AuraScriptHookType)SPELL_SCRIPT_STATE_LOADING, NULL);
bool load = Load();
_FinishScriptCall();
return load;
}
void AuraScript::_PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const* aurApp)
{
m_scriptStates.push(ScriptStateStore(m_currentScriptState, m_auraApplication, m_defaultActionPrevented));
m_currentScriptState = hookType;
m_defaultActionPrevented = false;
m_auraApplication = aurApp;
}
void AuraScript::_FinishScriptCall()
{
ScriptStateStore stateStore = m_scriptStates.top();
m_currentScriptState = stateStore._currentScriptState;
m_auraApplication = stateStore._auraApplication;
m_defaultActionPrevented = stateStore._defaultActionPrevented;
m_scriptStates.pop();
}
bool AuraScript::_IsDefaultActionPrevented()
{
switch (m_currentScriptState)
{
case AURA_SCRIPT_HOOK_EFFECT_APPLY:
case AURA_SCRIPT_HOOK_EFFECT_REMOVE:
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC:
case AURA_SCRIPT_HOOK_EFFECT_ABSORB:
return m_defaultActionPrevented;
default:
ASSERT(false && "AuraScript::_IsDefaultActionPrevented is called in a wrong place");
return false;
}
}
void AuraScript::PreventDefaultAction()
{
switch (m_currentScriptState)
{
case AURA_SCRIPT_HOOK_EFFECT_APPLY:
case AURA_SCRIPT_HOOK_EFFECT_REMOVE:
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC:
case AURA_SCRIPT_HOOK_EFFECT_ABSORB:
m_defaultActionPrevented = true;
break;
default:
sLog->outError("TSCR: Script: `%s` Spell: `%u` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
break;
}
}
SpellInfo const* AuraScript::GetSpellInfo() const
{
return m_aura->GetSpellInfo();
}
uint32 AuraScript::GetId() const
{
return m_aura->GetId();
}
uint64 AuraScript::GetCasterGUID() const
{
return m_aura->GetCasterGUID();
}
Unit* AuraScript::GetCaster() const
{
return m_aura->GetCaster();
}
WorldObject* AuraScript::GetOwner() const
{
return m_aura->GetOwner();
}
Unit* AuraScript::GetUnitOwner() const
{
return m_aura->GetUnitOwner();
}
DynamicObject* AuraScript::GetDynobjOwner() const
{
return m_aura->GetDynobjOwner();
}
void AuraScript::Remove(uint32 removeMode)
{
m_aura->Remove((AuraRemoveMode)removeMode);
}
Aura* AuraScript::GetAura() const
{
return m_aura;
}
AuraObjectType AuraScript::GetType() const
{
return m_aura->GetType();
}
int32 AuraScript::GetDuration() const
{
return m_aura->GetDuration();
}
void AuraScript::SetDuration(int32 duration, bool withMods)
{
m_aura->SetDuration(duration, withMods);
}
void AuraScript::RefreshDuration()
{
m_aura->RefreshDuration();
}
time_t AuraScript::GetApplyTime() const
{
return m_aura->GetApplyTime();
}
int32 AuraScript::GetMaxDuration() const
{
return m_aura->GetMaxDuration();
}
void AuraScript::SetMaxDuration(int32 duration)
{
m_aura->SetMaxDuration(duration);
}
int32 AuraScript::CalcMaxDuration() const
{
return m_aura->CalcMaxDuration();
}
bool AuraScript::IsExpired() const
{
return m_aura->IsExpired();
}
bool AuraScript::IsPermanent() const
{
return m_aura->IsPermanent();
}
uint8 AuraScript::GetCharges() const
{
return m_aura->GetCharges();
}
void AuraScript::SetCharges(uint8 charges)
{
m_aura->SetCharges(charges);
}
uint8 AuraScript::CalcMaxCharges() const
{
return m_aura->CalcMaxCharges();
}
bool AuraScript::ModCharges(int8 num, AuraRemoveMode removeMode /*= AURA_REMOVE_BY_DEFAULT*/)
{
return m_aura->ModCharges(num, removeMode);
}
bool AuraScript::DropCharge(AuraRemoveMode removeMode)
{
return m_aura->DropCharge(removeMode);
}
uint8 AuraScript::GetStackAmount() const
{
return m_aura->GetStackAmount();
}
void AuraScript::SetStackAmount(uint8 num)
{
m_aura->SetStackAmount(num);
}
bool AuraScript::ModStackAmount(int32 num, AuraRemoveMode removeMode)
{
return m_aura->ModStackAmount(num, removeMode);
}
bool AuraScript::IsPassive() const
{
return m_aura->IsPassive();
}
bool AuraScript::IsDeathPersistent() const
{
return m_aura->IsDeathPersistent();
}
bool AuraScript::HasEffect(uint8 effIndex) const
{
return m_aura->HasEffect(effIndex);
}
AuraEffect* AuraScript::GetEffect(uint8 effIndex) const
{
return m_aura->GetEffect(effIndex);
}
bool AuraScript::HasEffectType(AuraType type) const
{
return m_aura->HasEffectType(type);
}
Unit* AuraScript::GetTarget() const
{
switch (m_currentScriptState)
{
case AURA_SCRIPT_HOOK_EFFECT_APPLY:
case AURA_SCRIPT_HOOK_EFFECT_REMOVE:
case AURA_SCRIPT_HOOK_EFFECT_AFTER_APPLY:
case AURA_SCRIPT_HOOK_EFFECT_AFTER_REMOVE:
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC:
case AURA_SCRIPT_HOOK_EFFECT_ABSORB:
case AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB:
case AURA_SCRIPT_HOOK_EFFECT_MANASHIELD:
case AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD:
return m_auraApplication->GetTarget();
default:
sLog->outError("TSCR: Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
}
return NULL;
}
AuraApplication const* AuraScript::GetTargetApplication() const
{
return m_auraApplication;
}
|
BlackWolfsDen/Justicar-WoW
|
src/server/game/Spells/SpellScript.cpp
|
C++
|
gpl-2.0
| 34,032
|
#define MIKTEX_UTF8_WRAP_ALL 1
#include <miktex/utf8wrap.h>
#include <iostream>
#include <string>
using namespace std;
#if defined(_MSC_VER)
# define MAIN wmain
#else
# define MAIN main
#endif
void FatalError(const string & msg)
{
cerr << msg << endl;
throw 1;
}
void Run()
{
string test = u8"\U000000E4\U000000F6\U000000FC\U000000DF";
string dirname = test + ".dir";
string filename = dirname + "/" + test + ".txt";
if (_mkdir(dirname.c_str()) != 0)
{
FatalError("cannot _mkdir " + dirname);
}
FILE * stream = fopen(filename.c_str(), "wb");
if (stream == nullptr)
{
FatalError("cannot open " + filename);
}
for (const char & ch : test)
{
putc(ch, stream);
}
putc('\n', stream);
fclose(stream);
if (_access(filename.c_str(), 0) != 0)
{
FatalError("cannot _access " + filename);
}
struct stat statbuf;
if (stat(filename.c_str(), &statbuf) != 0)
{
FatalError("cannot stat " + filename);
}
cout << statbuf.st_size << " bytes written" << endl;
if (remove(filename.c_str()) != 0)
{
FatalError("cannot remove " + filename);
}
if (_rmdir(dirname.c_str()) != 0)
{
FatalError("cannot _rmdir " + dirname);
}
}
int MAIN()
{
try
{
Run();
return 0;
}
catch (int x)
{
return x;
}
}
|
drazenzadravec/nequeo
|
Tools/MikTex/Libraries/MiKTeX/UTF8Wrap/static/utf8wrap.cpp
|
C++
|
gpl-2.0
| 1,290
|
<?php
/**
* @copyright Ilch 2.0
* @package ilch
*/
return array
(
'menuCalendarList' => 'Calender',
'noCalendar' => 'no Entries available',
'term' => 'Term',
'title' => 'Title',
'text' => 'Text',
'color' => 'Term Color',
'place' => 'Place',
'start' => 'Start',
'end' => 'End',
'description' => 'Description',
'noDescription' => 'no Description available',
'at' => 'at',
'clock' => 'o\'clock',
);
|
jurri/Ilch-2.0
|
application/modules/calendar/translations/en.php
|
PHP
|
gpl-2.0
| 452
|
var interface_data_cell_phone =
[
[ "callButtonClicked:", "interface_data_cell_phone.html#abb91ce98f4b5920f486508bbf150c68a", null ],
[ "mainTextLabel", "interface_data_cell_phone.html#aefc998f3932ae7f2decba1eaaec427c0", null ],
[ "titleLabel", "interface_data_cell_phone.html#a0c3e159f8e753caaaa07fe67776faacb", null ]
];
|
BiCoR/RailsServer
|
public/doc/iphone_client/interface_data_cell_phone.js
|
JavaScript
|
gpl-2.0
| 334
|
/*!
* \file util.h
*
* \author Copyright (C) 2010 by Luis Matos <gass@otiliamatos.ath.cx>.
*
* \author Copyright (C) 2010, 2014, 2015, 2016, 2017, 2018, 2019
* by Bert Timmerman <bert.timmerman@xs4all.nl>.
*
* \brief Header file for libDXF coding utilities.
*
* <hr>
* <h1><b>Copyright Notices.</b></h1>\n
* 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.\n\n
* This program is distributed in the hope that it will be useful, but
* <b>WITHOUT ANY WARRANTY</b>; without even the implied warranty of
* <b>MERCHANTABILITY</b> or <b>FITNESS FOR A PARTICULAR PURPOSE</b>.\n
* See the GNU General Public License for more details.\n\n
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to:\n
* Free Software Foundation, Inc.,\n
* 59 Temple Place,\n
* Suite 330,\n
* Boston,\n
* MA 02111 USA.\n
* \n
* Drawing eXchange Format (DXF) is a defacto industry standard for the
* exchange of drawing files between various Computer Aided Drafting
* programs.\n
* DXF is an industry standard designed by Autodesk(TM).\n
* For more details see http://www.autodesk.com.
* <hr>
*/
#ifndef LIBDXF_SRC_UTIL_H
#define LIBDXF_SRC_UTIL_H
#include "global.h"
#include "file.h"
#ifdef __cplusplus
extern "C" {
#endif
/*! Macro to return if the expression is false */
#define dxf_return_val_if_fail(expr, val) if (!expr) return val;
/*! Macro to return according to the expression */
enum return_state { FAIL = 0, SUCCESS, FOUND };
#define dxf_return(expr) switch(expr) \
{ \
case FAIL: \
return FAIL; \
break; \
case FOUND: \
return FOUND; \
break; \
}
DxfChar *dxf_char_new ();
DxfChar *dxf_char_init (DxfChar *c);
char *dxf_char_get_value (DxfChar *c);
DxfChar *dxf_char_set_value (DxfChar *c, char *value);
int dxf_char_get_length (DxfChar *c);
DxfChar *dxf_char_set_length (DxfChar *c, int length);
DxfChar *dxf_char_get_next (DxfChar *c);
DxfChar *dxf_char_set_next (DxfChar *c, DxfChar *next);
DxfChar *dxf_char_get_last (DxfChar *c);
int dxf_char_free (DxfChar *c);
int dxf_char_free_list (DxfChar *chars);
DxfDouble *dxf_double_new ();
DxfDouble *dxf_double_init (DxfDouble *d);
double dxf_double_get_value (DxfDouble *d);
DxfDouble *dxf_double_set_value (DxfDouble *d, double value);
DxfDouble *dxf_double_get_next (DxfDouble *d);
DxfDouble *dxf_double_set_next (DxfDouble *d, DxfDouble *next);
DxfDouble *dxf_double_get_last (DxfDouble *d);
int dxf_double_free (DxfDouble *d);
int dxf_double_free_list (DxfDouble *doubles);
DxfInt *dxf_int_new ();
DxfInt *dxf_int_init (DxfInt *i);
int dxf_int_get_value (DxfInt *i);
DxfInt *dxf_int_set_value (DxfInt *i, int value);
DxfInt *dxf_int_get_next (DxfInt *i);
DxfInt *dxf_int_set_next (DxfInt *i, DxfInt *next);
DxfInt *dxf_int_get_last (DxfInt *i);
int dxf_int_free (DxfInt *i);
int dxf_int_free_list (DxfInt *ints);
DxfInt16 *dxf_int16_new ();
DxfInt16 *dxf_int16_init (DxfInt16 *i);
int16_t dxf_int16_get_value (DxfInt16 *i);
DxfInt16 *dxf_int16_set_value (DxfInt16 *i, int16_t value);
DxfInt16 *dxf_int16_get_next (DxfInt16 *i);
DxfInt16 *dxf_int16_set_next (DxfInt16 *i, DxfInt16 *next);
DxfInt16 *dxf_int16_get_last (DxfInt16 *i);
int dxf_int16_free (DxfInt16 *i);
int dxf_int16_free_list (DxfInt16 *ints);
DxfInt32 *dxf_int32_new ();
DxfInt32 *dxf_int32_init (DxfInt32 *i);
int32_t dxf_int32_get_value (DxfInt32 *i);
DxfInt32 *dxf_int32_set_value (DxfInt32 *i, int32_t value);
DxfInt32 *dxf_int32_get_next (DxfInt32 *i);
DxfInt32 *dxf_int32_set_next (DxfInt32 *i, DxfInt32 *next);
DxfInt32 *dxf_int32_get_last (DxfInt32 *i);
int dxf_int32_free (DxfInt32 *i);
int dxf_int32_free_list (DxfInt32 *ints);
DxfInt64 *dxf_int64_new ();
DxfInt64 *dxf_int64_init (DxfInt64 *i);
int64_t dxf_int64_get_value (DxfInt64 *i);
DxfInt64 *dxf_int64_set_value (DxfInt64 *i, int64_t value);
DxfInt64 *dxf_int64_get_next (DxfInt64 *i);
DxfInt64 *dxf_int64_set_next (DxfInt64 *i, DxfInt64 *next);
DxfInt64 *dxf_int64_get_last (DxfInt64 *i);
int dxf_read_is_double (int type);
int dxf_read_is_int (int type);
int dxf_read_is_int16_t (int type);
int dxf_read_is_int32_t (int type);
int dxf_read_is_int64_t (int type);
int dxf_read_is_string (int type);
int dxf_read_line (char * temp_string, DxfFile *fp);
int dxf_read_scanf (DxfFile *fp, const char *template, ...);
DxfFile *dxf_read_init (const char *filename);
void dxf_read_close (DxfFile *file);
#ifdef __cplusplus
}
#endif
#endif /* LIBDXF_SRC_UTIL_H */
/* EOF */
|
bert/libdxf
|
src/util.h
|
C
|
gpl-2.0
| 4,651
|
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
* *
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
#include "methods/icingachecktask.hpp"
#include "icinga/cib.hpp"
#include "icinga/service.hpp"
#include "icinga/icingaapplication.hpp"
#include "base/application.hpp"
#include "base/objectlock.hpp"
#include "base/utility.hpp"
#include "base/perfdatavalue.hpp"
#include "base/function.hpp"
#include "base/configtype.hpp"
using namespace icinga;
REGISTER_SCRIPTFUNCTION_NS(Internal, IcingaCheck, &IcingaCheckTask::ScriptFunc, "checkable:cr:resolvedMacros:useResolvedMacros");
void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr,
const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
{
if (resolvedMacros && !useResolvedMacros)
return;
double interval = Utility::GetTime() - Application::GetStartTime();
if (interval > 60)
interval = 60;
/* use feature stats perfdata */
std::pair<Dictionary::Ptr, Array::Ptr> feature_stats = CIB::GetFeatureStats();
Array::Ptr perfdata = feature_stats.second;
perfdata->Add(new PerfdataValue("active_host_checks", CIB::GetActiveHostChecksStatistics(interval) / interval));
perfdata->Add(new PerfdataValue("passive_host_checks", CIB::GetPassiveHostChecksStatistics(interval) / interval));
perfdata->Add(new PerfdataValue("active_host_checks_1min", CIB::GetActiveHostChecksStatistics(60)));
perfdata->Add(new PerfdataValue("passive_host_checks_1min", CIB::GetPassiveHostChecksStatistics(60)));
perfdata->Add(new PerfdataValue("active_host_checks_5min", CIB::GetActiveHostChecksStatistics(60 * 5)));
perfdata->Add(new PerfdataValue("passive_host_checks_5min", CIB::GetPassiveHostChecksStatistics(60 * 5)));
perfdata->Add(new PerfdataValue("active_host_checks_15min", CIB::GetActiveHostChecksStatistics(60 * 15)));
perfdata->Add(new PerfdataValue("passive_host_checks_15min", CIB::GetPassiveHostChecksStatistics(60 * 15)));
perfdata->Add(new PerfdataValue("active_service_checks", CIB::GetActiveServiceChecksStatistics(interval) / interval));
perfdata->Add(new PerfdataValue("passive_service_checks", CIB::GetPassiveServiceChecksStatistics(interval) / interval));
perfdata->Add(new PerfdataValue("active_service_checks_1min", CIB::GetActiveServiceChecksStatistics(60)));
perfdata->Add(new PerfdataValue("passive_service_checks_1min", CIB::GetPassiveServiceChecksStatistics(60)));
perfdata->Add(new PerfdataValue("active_service_checks_5min", CIB::GetActiveServiceChecksStatistics(60 * 5)));
perfdata->Add(new PerfdataValue("passive_service_checks_5min", CIB::GetPassiveServiceChecksStatistics(60 * 5)));
perfdata->Add(new PerfdataValue("active_service_checks_15min", CIB::GetActiveServiceChecksStatistics(60 * 15)));
perfdata->Add(new PerfdataValue("passive_service_checks_15min", CIB::GetPassiveServiceChecksStatistics(60 * 15)));
CheckableCheckStatistics scs = CIB::CalculateServiceCheckStats();
perfdata->Add(new PerfdataValue("min_latency", scs.min_latency));
perfdata->Add(new PerfdataValue("max_latency", scs.max_latency));
perfdata->Add(new PerfdataValue("avg_latency", scs.avg_latency));
perfdata->Add(new PerfdataValue("min_execution_time", scs.min_execution_time));
perfdata->Add(new PerfdataValue("max_execution_time", scs.max_execution_time));
perfdata->Add(new PerfdataValue("avg_execution_time", scs.avg_execution_time));
ServiceStatistics ss = CIB::CalculateServiceStats();
perfdata->Add(new PerfdataValue("num_services_ok", ss.services_ok));
perfdata->Add(new PerfdataValue("num_services_warning", ss.services_warning));
perfdata->Add(new PerfdataValue("num_services_critical", ss.services_critical));
perfdata->Add(new PerfdataValue("num_services_unknown", ss.services_unknown));
perfdata->Add(new PerfdataValue("num_services_pending", ss.services_pending));
perfdata->Add(new PerfdataValue("num_services_unreachable", ss.services_unreachable));
perfdata->Add(new PerfdataValue("num_services_flapping", ss.services_flapping));
perfdata->Add(new PerfdataValue("num_services_in_downtime", ss.services_in_downtime));
perfdata->Add(new PerfdataValue("num_services_acknowledged", ss.services_acknowledged));
double uptime = Utility::GetTime() - Application::GetStartTime();
perfdata->Add(new PerfdataValue("uptime", uptime));
HostStatistics hs = CIB::CalculateHostStats();
perfdata->Add(new PerfdataValue("num_hosts_up", hs.hosts_up));
perfdata->Add(new PerfdataValue("num_hosts_down", hs.hosts_down));
perfdata->Add(new PerfdataValue("num_hosts_pending", hs.hosts_pending));
perfdata->Add(new PerfdataValue("num_hosts_unreachable", hs.hosts_unreachable));
perfdata->Add(new PerfdataValue("num_hosts_flapping", hs.hosts_flapping));
perfdata->Add(new PerfdataValue("num_hosts_in_downtime", hs.hosts_in_downtime));
perfdata->Add(new PerfdataValue("num_hosts_acknowledged", hs.hosts_acknowledged));
std::vector<Endpoint::Ptr> endpoints = ConfigType::GetObjectsByType<Endpoint>();
double lastMessageSent = 0;
double lastMessageReceived = 0;
double messagesSentPerSecond = 0;
double messagesReceivedPerSecond = 0;
double bytesSentPerSecond = 0;
double bytesReceivedPerSecond = 0;
for (Endpoint::Ptr endpoint : endpoints)
{
if (endpoint->GetLastMessageSent() > lastMessageSent)
lastMessageSent = endpoint->GetLastMessageSent();
if (endpoint->GetLastMessageReceived() > lastMessageReceived)
lastMessageReceived = endpoint->GetLastMessageReceived();
messagesSentPerSecond += endpoint->GetMessagesSentPerSecond();
messagesReceivedPerSecond += endpoint->GetMessagesReceivedPerSecond();
bytesSentPerSecond += endpoint->GetBytesSentPerSecond();
bytesReceivedPerSecond += endpoint->GetBytesReceivedPerSecond();
}
perfdata->Add(new PerfdataValue("last_messages_sent", lastMessageSent));
perfdata->Add(new PerfdataValue("last_messages_received", lastMessageReceived));
perfdata->Add(new PerfdataValue("sum_messages_sent_per_second", messagesSentPerSecond));
perfdata->Add(new PerfdataValue("sum_messages_received_per_second", messagesReceivedPerSecond));
perfdata->Add(new PerfdataValue("sum_bytes_sent_per_second", bytesSentPerSecond));
perfdata->Add(new PerfdataValue("sum_bytes_received_per_second", bytesReceivedPerSecond));
cr->SetOutput("Icinga 2 has been running for " + Utility::FormatDuration(uptime) +
". Version: " + Application::GetAppVersion());
cr->SetPerformanceData(perfdata);
double lastReloadFailed = Application::GetLastReloadFailed();
if (lastReloadFailed > 0) {
cr->SetOutput(cr->GetOutput() + "; Last reload attempt failed at " + Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", lastReloadFailed));
cr->SetState(ServiceWarning);
} else
cr->SetState(ServiceOK);
service->ProcessCheckResult(cr);
}
|
Tontonitch/icinga2
|
lib/methods/icingachecktask.cpp
|
C++
|
gpl-2.0
| 8,065
|
////////////////////////////////////////////////////////////
//
// File: parser.cpp
// Author: Frank Boerman
// Parsers for files
///////////////////////////////////////////////////////////
//#pragma warning(disable : 4244) //converting double to int is needed when calculating gridsize, so disable that warning
//#pragma warning(disable : 4018)//same goes for signed/unsigned mismatch (due to if statements)
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
#include "drawtools.h"
#include <list>
#include "GameOfLife.h"
#include "List.h"
#include "Parser.h"
#include <limits>
#include <sstream>
#include "SharedGlobals.h"
#include "Colours.h"
using namespace std;
//the parser for .gol files
int* GOLParser(std::string filename, int maxwidht, int maxheight, list<item*>* DrawList, int* cell_dimension)
{
int gridsize[2];
ifstream file;
string fline;
file.open(filename);
if (file.fail()) //open the stream
{
cout << "Error reading file " << filename << endl;
return nullptr;
}
//due to rewriting parts of this procedure the code looks a bit silly and can be written more elogant. however there was no more time left for that
List<string>* parsedfile = new List<string>(); //list of strings that holds the
int leftline = numeric_limits<int>::max(); //holds the position of most left live cell
while (getline(file, fline)) //fetch line per line of the file
{
if (fline.find("O") != string::npos) //if there is an living cell in the line
{
stringstream parsedline;
for (int i = 0; i < (int)fline.size(); i++)//iterate through the line
{
//send the line to the stream, save the most left cell encountered in the file
if (fline[i] == 'O')
{
if (i < leftline)
{
leftline = i;
}
}
parsedline << fline[i];
//if (fline[i] == 'O' || parsedline.tellp() > 0)
//{
// parsedline << fline[i];
// //line_list->append(fline[i]);
//}
}
if (parsedline.tellp() > 0)
{
//parsedfile->append(*line_list);
parsedfile->append(parsedline.str());
}
}
}
//find the largest line and also correct the line to drop all not needed dead cells after last living one, and all not needed dead cells before the most left living cell in the figure
int maxsizex = 0;
for (int i = 0; i < parsedfile->len(); i++)
{
string line = parsedfile->Get_String(i);
//cut the line to only include the necesarry cells for the figure
string line_corrected = line.substr(0, line.find_last_of('O')+1).substr(leftline,string::npos);//NOTETOSELF: leave two substrings because of offset
parsedfile->Set(i, line_corrected); //save the corrected line
int line_length = line_corrected.size();
if (line_length > maxsizex) //save the biggest size of length
{
maxsizex = line_length;
}
}
//calculate minimal height and width
int minheight = (2 * WHITEBAND + parsedfile->len())* *cell_dimension;
int minwidth = (2 * WHITEBAND + maxsizex)* *cell_dimension;
//check against the constraints given
//if figure doesnt fit with the given whiteband, than resize the cell_dimension of all the cells
if (minheight > maxheight)
{
*cell_dimension = (int)floor(maxheight/parsedfile->len());
if (minwidth > maxwidht)
{
if (floor(maxwidht / maxsizex) < *cell_dimension)
{
*cell_dimension = (int)floor(maxwidht / maxsizex);
}
gridsize[0] = *cell_dimension * (2 * WHITEBAND + maxsizex);
}
else
{
gridsize[0] = maxwidht;
}
gridsize[1] = *cell_dimension * (2 * WHITEBAND + parsedfile->len());
}
else if (minwidth > maxwidht)
{
*cell_dimension = (int)floor(maxwidht / maxsizex);
gridsize[0] = *cell_dimension * (2 * WHITEBAND + maxsizex);
gridsize[1] = maxheight;
}
else
{
gridsize[0] = maxwidht;
gridsize[1] = maxheight;
}
//init the grid
gridheight = gridsize[1] / *cell_dimension;
gridwidth = (gridsize[0] / *cell_dimension);
GLOBAL_GRID = new cell**[gridsize[0] / *cell_dimension];
float p1[2], p2[2];
int gridy = gridsize[1] / *cell_dimension;
int gridx = gridsize[0] / *cell_dimension;
for (int x = 0; x < gridx;x++)//travers through the grid and create the cells, fill in the figure
{
p1[0] = x * (int)*cell_dimension;
p2[0] = (x + 1) * (int)*cell_dimension;
GLOBAL_GRID[x] = new cell*[gridsize[1] / *cell_dimension];//create the height row
for (int y = 0; y < gridy; y++)
{
p1[1] = y * (int)*cell_dimension;
p2[1] = (y + 1) * (int)*cell_dimension;
//create the new square
square* sqr = new square(DrawList, p1, p2, LINECOLOR, Blue);
//check if were outside the sidebands
if (x >= WHITEBAND && y >= WHITEBAND && (y-WHITEBAND) < parsedfile->len() && (x-WHITEBAND) < maxsizex){
//check if x is in reange of the parsed line
string line = parsedfile->Get_String((parsedfile->len() - 1) - (y - WHITEBAND));
if ((x - WHITEBAND) >= (int)line.size())
{
GLOBAL_GRID[x][y] = new cell(sqr, 0);
}
else
{
//create the new cell
//change the y because grid is drawn bottom up, while file is parsed top down
//cout << "DEBUG: x: " << x << " y:" << y << endl;
if (line[x - WHITEBAND] == 'O')
{
GLOBAL_GRID[x][y] = new cell(sqr, 1);
}
else
{
GLOBAL_GRID[x][y] = new cell(sqr, 0);
}
}
}
else
{
//if not than just insert empty cell
GLOBAL_GRID[x][y] = new cell(sqr, 0);
}
}
}
cout << "dimension calculated: " << *cell_dimension << " gridwidth: " << gridwidth << " gridheight: " << gridheight << endl;
//update the whitelines
for (int x = 0; x < gridwidth; x++)
{
for (int y = 0; y < gridheight; y++)
{
GLOBAL_GRID[x][y]->CheckNeighbors(x, y);
}
}
//return the size
return gridsize;
}
string findstring(string line)
{
int first = line.find_first_of("\"");
int last = line.find_last_of("\"");
return line.substr(first, last - first);
}
void readEDIF(string fname, string* windowname, list<item*>* DrawList) //old parser
{
ifstream file;
string fline;
file.open(fname);
if (file.fail())
{
cout << "Error reading file " << fname << endl;
return;
}
cout << "Parsing file " << fname << endl;
while (getline(file, fline))
{
stringstream sstream(fline);
string command, title, ftext;
float p1[2], p2[2], clr[3], width;
pixel* pxl;
line* ln;
text* txt;
if (fline[0] != '.' || fline == "")
{
//comment line
continue;
}
switch (fline[1])
{
case 'd': //change window title
*windowname = findstring(sstream.str());
cout << "Parsed windowname: " << windowname << endl;
break;
case 'p': //draw pixel
sstream >> command >> p1[0] >> p1[1] >> clr[0] >> clr[1] >> clr[2];
pxl = new pixel(DrawList, p1, clr);
cout << "Parsed a pixel: ";
pxl->print();
break;
case 't': //draw text
sstream >> command >> p1[0] >> p1[1] >> clr[0] >> clr[1] >> clr[2];
ftext = findstring(sstream.str());
txt = new text(DrawList, ftext, clr, p1[0], p1[1]);
cout << "Parsed a string: ";
txt->print();
break;
case 'l': //draw line
sstream >> command >> p1[0] >> p1[1] >> p2[0] >> p2[1] >> clr[0] >> clr[1] >> clr[2] >> width;
ln = new line(DrawList, p1, p2, clr, width);
cout << "Parsed a line: ";
ln->print();
break;
}
}
}
|
williewonka/computation2_C
|
Computation2_finaltask/GameOfLife/Parser.cpp
|
C++
|
gpl-2.0
| 7,205
|
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\CMS\Event\WebAsset;
\defined('JPATH_PLATFORM') or die;
use BadMethodCallException;
use Joomla\CMS\Event\AbstractImmutableEvent;
/**
* Event class for WebAsset events
*
* @since 4.0.0
*/
abstract class AbstractEvent extends AbstractImmutableEvent
{
/**
* Constructor.
*
* @param string $name The event name.
* @param array $arguments The event arguments.
*
* @throws BadMethodCallException
*
* @since 4.0.0
*/
public function __construct($name, array $arguments = array())
{
if (!\array_key_exists('subject', $arguments))
{
throw new BadMethodCallException("Argument 'subject' of event {$this->name} is required but has not been provided");
}
parent::__construct($name, $arguments);
}
}
|
twister65/joomla-cms
|
libraries/src/Event/WebAsset/AbstractEvent.php
|
PHP
|
gpl-2.0
| 979
|
<!--
IE 6 makes the page to wide with the following doctype. I accept
standards if they help me, not if they make anything even harder!
//-->
<!--<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN' 'http://www.w3.org/TR/REC-html40/loose.dtd'>//-->
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by PhpDoc date: 'Sun, 29 Jul 2012 11:23:55 +0400' -->
<TITLE>Docs for page all_our.php</TITLE>
<LINK REL ='stylesheet' TYPE='text/css' HREF='../media/stylesheet.css' TITLE='Style'>
</HEAD>
<BODY BGCOLOR='white'>
<a name="top"><!-- --></a><h3><SPAN class="type">File:</SPAN> /com_content/views/featured/tmpl/default/all_our.php<HR>
</h3>
<!-- ========== Info from phpDoc block ========= -->
<p class="label"><b>filesource</b></p>
<p class=indent><a href="../__filesource/fsource_default__com_contentviewsfeaturedtmpldefaultall_our.php.html">Source Code for this file</a></p>
Classes in this file:
<dl>
</dl>
<hr>
<!-- =========== INCLUDE SUMMARY =========== -->
<A NAME='include_summary'><!-- --></A>
<H3>Include Statements Summary</H3>
<UL>
</UL>
<hr>
<!-- =========== GLOBAL VARIABLE SUMMARY =========== -->
<A NAME='global_summary'><!-- --></A>
<H3>Global Variable Summary</H3>
<UL>
</UL>
<hr>
<!-- =========== CONSTANT SUMMARY =========== -->
<A NAME='constant_summary'><!-- --></A>
<H3>Constant Summary</H3>
<UL>
</UL>
<hr>
<!-- =========== FUNCTION SUMMARY =========== -->
<A NAME='function_summary'><!-- --></A>
<H3>Function Summary</H3>
<UL>
</UL>
<hr>
<!-- ============ INCLUDE DETAIL =========== -->
<A NAME='include_detail'></A>
<H3>Include Statements Detail</H3>
<UL>
</UL>
<hr>
<!-- ============ GLOBAL VARIABLE DETAIL =========== -->
<A NAME='global_detail'></A>
<H3>Global Variable Detail</H3>
<UL>
</UL>
<hr>
<!-- ============ CONSTANT DETAIL =========== -->
<A NAME='constant_detail'></A>
<H3>Constant Detail</H3>
<UL>
</UL>
<hr>
<!-- ============ FUNCTION DETAIL =========== -->
<A NAME='function_detail'></A>
<H3>Function Detail</H3>
<UL>
</UL>
<hr>
<div id="credit">
<hr>
Documentation generated on Sun, 29 Jul 2012 11:23:55 +0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
</div>
</body>
</html>
</HTML>
|
srgg6701/WebApps
|
.phpDocumentation/CHMdefaultConverter/default/_com_content---views---featured---tmpl---default---all_our.php.html
|
HTML
|
gpl-2.0
| 2,191
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欧式田园八角花</title>
<meta name="keywords" content="" />
<meta name="description" content="名称:欧式田园八角花<br />
型号:HD008" />
<meta name="author" content="哈德逊瓷砖网络营销部Chan,哈德逊瓷砖官网 - www.hudsonhome.cn" />
<link rel="stylesheet" type="text/css" href="http://www.hudson.com/skin/default/css/style.css" />
<script type="text/javascript" src="http://www.hudson.com/skin/default/js/jquery.js"></script>
<script type="text/javascript" src="http://www.hudson.com/skin/default/js/jqnav.js"></script>
<script src="http://www.hudson.com/skin/default/js/tab.js" type="text/javascript"></script>
<!--[if lte IE 6]>
<SCRIPT src="http://www.hudson.com/skin/default/js/iepng.js" type="text/javascript"></SCRIPT>
<script>
EvPNG.fix('div, ul, img, li, input');
</script>
<![endif]-->
</head>
<body class="bgmm">
<!-- 头部开始 -->
<script type="text/javascript">
function uaredirect(murl){
try {
if(document.getElementById("bdmark") != null){
return;
}
var urlhash = window.location.hash;
if (!urlhash.match("fromapp")){
if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) {
location.replace(murl);
}
}
} catch(err){}
}
uaredirect("http://www.hudson.com/wap/");
</script>
<a name="gotop"></a>
<div class="go">
<a title="返回顶部" class="top" href="#gotop">
<img src="http://www.hudson.com/skin/default/images/top2.png" width="50" height="50" /></a> <a class="top" href="#gotop">
<img src="http://www.hudson.com/skin/default/images/back2.png" width="50" height="50" /></a>
</div>
<div class="wrap">
<div name="gotop">
</div>
<div class="top">
<div class="topbox2">
<div class="searchcc">
<input name="txtSelAll" id="txtSelAll" type="text" class="in_sin" value="关键字" onblur="if (this.value=='')this.value='关键字';"
onclick="if (this.value=='关键字')this.value=''" /><input name="btnSearch" id="btnSearch"
type="button" value="" class="ins_b" onclick="checkAll();" />
</div>
<div class="lan2">
<img src="http://www.hudson.com/skin/default/images/icon_8.png" width="16" height="11" align="absmiddle" />
中国
</div>
</div>
<div class="topbox1">
<a target="_blank" href="http://hudson.tmall.com/shop/view_shop.htm?spm=a1z10.4.w5001-4530759858.6.yRhs4b&scene=taobao_shop">官方商城</a>
关注我们:<a target="_blank" rel="nofollow" href="http://weibo.com/1hudson">
<img src="http://www.hudson.com/skin/default/images/icon_4.png" width="16" height="16" align="absmiddle" alt="新浪微博" title="新浪微博" />
</a>
<a target="_blank" rel="nofollow" href="http://t.qq.com/hudson2006">
<img src="http://www.hudson.com/skin/default/images/icon_5.png" width="16" height="16" align="absmiddle" alt="腾讯微博" title="腾讯微博" />
</a>
<a rel="nofollow" href="http://www.jiathis.com/share/" class="jiathis" target="_blank">
<img src="http://www.hudson.com/skin/default/images/icon_6.png" width="16" height="16" align="absmiddle" />
</a>
</div>
</div>
</div>
<div class="head">
<div class="navbg" id="navbg">
</div>
<div class="wrap">
<div class="headone">
<h1>
<a href="http://www.hudson.com/">
<img src="http://www.hudson.com/skin/default/images/logo.png"/></a></h1>
<div class="nav">
<ul class="navlist">
<li><a href="http://www.hudson.com/">首 页</a></li>
</ul>
<ul class="navlist" id="nav">
<li class="lihover"><a href="http://www.hudson.com/zjhdx/2014-02-22/6.html">走进哈德逊</a>
<div class="navbox">
<p class="boxlist">
<span><a href="http://www.hudson.com/zjhdx/2014-02-22/6.html">企业简介</a></span>
<span><a href="http://www.hudson.com/zjhdx/2014-02-22/7.html">企业文化</a></span>
<span><a href="http://www.hudson.com/zjhdx/2014-02-22/8.html">发展历程</a></span>
<span><a href="http://www.hudson.com/zjhdx/2014-02-22/9.html">哈德逊在全球</a></span>
<span><a href="http://www.hudson.com/zjhdx/2014-02-22/10.html">哈德逊荣誉</a></span>
<span><a href="http://www.hudson.com/zjhdx/2014-02-22/11.html">联系我们</a></span>
</p>
</div>
</li>
<li class="lihover"><a href="http://www.hudson.com/xwzx/hdzq/">新闻资讯</a>
<div class="navbox">
<p class="boxlist" style="padding-left: 50px;">
<span><a href="http://www.hudson.com/xwzx/hdzq">活动专区</a></span>
<span><a href="http://www.hudson.com/xwzx/qyxw">企业新闻</a></span>
<span><a href="http://www.hudson.com/xwzx/axgy">爱心公益</a></span>
</p>
</div>
</li>
<li class="bg lihover"><a href="http://www.hudson.com/cpyfw/zxcp/">产品与服务</a>
<div class="navbox">
<p class="boxlist" style="padding-left: 180px;">
<span><a href="http://www.hudson.com/cpyfw/zxcp">最新产品</a></span>
<span><a href="http://www.hudson.com/cpyfw/cpfl">产品分类</a></span>
<span><a href="http://www.hudson.com/cpyfw/zszx">知识中心</a></span>
<span><a href="http://www.hudson.com/cpyfw/zxfk/2014-03-02/65.html">在线问答</a></span>
</p>
</div>
</li>
<li class="bg lihover"><a href="http://www.hudson.com/cptyg/alzs/">产品体验馆</a>
<div class="navbox">
<p class="boxlist" style="padding-left: 310px;">
<span><a href="http://www.hudson.com/cptyg/alzs">案例展示</a></span>
<span><a href="http://www.hudson.com/cptyg/shtyg/2014-03-07/24.html">生活体验馆</a></span>
</p>
</div>
</li>
<li class="bg lihover"><a href="http://www.hudson.com/rlzy/">人力资源</a>
<div class="navbox">
<p class="boxlist" style="padding-left: 280px;">
<span><a href="http://www.hudson.com/rlzy/rcg/2014-03-02/44.html">人才观</a></span>
<span><a href="http://www.hudson.com/rlzy/zwfz/2014-03-02/45.html">职位发展</a></span>
<span><a href="http://www.hudson.com/rlzy/xcfl/2014-03-02/46.html">薪酬福利</a></span>
<span><a href="http://www.hudson.com/rlzy/ypzn/2014-03-02/47.html">应聘指南</a></span>
<span><a href="http://www.hudson.com/rlzy/zwlb/">职位列表</a></span>
<span><a href="http://www.hudson.com/rlzy/wzhdx/">我在哈德逊</a></span>
</p>
</div>
</li>
<li class="lihover"><a href="http://hudson.tmall.com" style="font-weight:bold; color:#F00; font-size:20px;" target="_blank">逛商城</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- 头部结束 -->
<div class=" wrap">
<div class="home">当前位置:<a href="http://www.hudson.com/index.html">首页</a> > <a href="http://www.hudson.com/cpyfw/">产品与服务</a> > <a href="http://www.hudson.com/cpyfw/cpfl/">产品分类</a> > <a href="http://www.hudson.com/cpyfw/cpfl/czpj/">瓷砖配件</a></div>
</div>
<div class="cls">
</div>
<div class="main">
<div class="wrap">
<div class="bg_t">
</div>
<div class="bg_c">
<div class="mleft">
<div class="mlefttitle">
<h2>产品分类</h2>
</div>
<ul class="mleftlist">
<li id="about1" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/wjs" onclick="sethover('about',1,4)">微晶石</a></span></li>
<li id="about2" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/qpy" onclick="sethover('about',2,4)">全抛釉</a></span></li>
<li id="about3" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/bhz" onclick="sethover('about',3,4)">玻化砖</a></span></li>
<li id="about4" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/fangguz" onclick="sethover('about',4,4)">仿古砖</a></span></li>
<li id="about5" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/muwenz" onclick="sethover('about',5,4)">木纹砖</a></span></li>
<li id="about6" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/cp" onclick="sethover('about',6,4)">瓷片</a></span></li>
<li id="about7" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/whs" onclick="sethover('about',7,4)">文化石</a></span></li>
<li id="about8" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/dsbjq" onclick="sethover('about',8,4)">瓷砖背景墙</a></span></li>
<li id="about9" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/czpj" onclick="sethover('about',9,4)">瓷砖配件</a></span></li>
<li id="about10" class=""><span><a href="http://www.hudson.com/cpyfw/cpfl/msk" onclick="sethover('about',10,4)">马赛克</a></span></li>
</ul>
</div>
<div class="mright">
<div class="news">
<div class="n_detail">
<h3>
欧式田园八角花 <p>发布日期:2015-01-06 10:01:55</p>
</h3>
品牌:Hudson/哈德逊<br />
型号:HD008 HD015 HD016 HD018<br />
颜色分类:F08 F13 F15 F16 F18<br />
尺寸:80*80<br />
使用对象:内墙<br />
计价单位:片<br />
风格:田园</p>
<img src="http://img04.taobaocdn.com/imgextra/i4/737330099/T2afPNXhBaXXXXXXXX_!!737330099.jpg" width="700"/><img src="http://img02.taobaocdn.com/imgextra/i2/737330099/T2qQjNXitaXXXXXXXX_!!737330099.jpg" width="700"/><img src="http://img01.taobaocdn.com/imgextra/i1/737330099/T2gEiOXmXbXXXXXXXX_!!737330099.jpg" width="700"/><img src="http://img01.taobaocdn.com/imgextra/i1/737330099/T2lBTCXXpbXXXXXXXX_!!737330099.jpg" width="700"/><img src="http://img01.taobaocdn.com/imgextra/i1/737330099/T2iRTMXixaXXXXXXXX_!!737330099.jpg" width="700"/><img src="http://img02.taobaocdn.com/imgextra/i2/737330099/T2aFbOXiVXXXXXXXXX_!!737330099.jpg" width="700"/><img src="http://img03.taobaocdn.com/imgextra/i3/737330099/T2virNXcFaXXXXXXXX_!!737330099.jpg" width="700"/><img src="http://img03.taobaocdn.com/imgextra/i3/737330099/T2MOTMXixaXXXXXXXX_!!737330099.jpg" width="700"/>
<p style="text-align: center"><img src="http://gi4.md.alicdn.com/imgextra/i4/737330099/T2Dj32XdxaXXXXXXXX_!!737330099.jpg" width="500"/>
<img src="http://gi3.md.alicdn.com/bao/uploaded/i3/737330099/T2GI2GXm4aXXXXXXXX_!!737330099.jpg" width="500"/>
<img src="http://gi3.md.alicdn.com/bao/uploaded/i3/737330099/T2T09ZXjXbXXXXXXXX_!!737330099.jpg" width="500"/>
<img src="http://gi3.md.alicdn.com/bao/uploaded/i3/737330099/T2V91BXepcXXXXXXXX_!!737330099.jpg" width="500"/>
<img src="http://gi2.md.alicdn.com/bao/uploaded/i2/737330099/T2smuGXepcXXXXXXXX_!!737330099.jpg" width="500"/>
<img src="http://gi2.md.alicdn.com/bao/uploaded/i2/737330099/T2mPzNXgNXXXXXXXXX_!!737330099.jpg" width="500"/></p>
<img src="http://img03.taobaocdn.com/imgextra/i3/737330099/TB27vNGaXXXXXarXpXXXXXXXXXX-737330099.jpg" width="700"/>
<div class="dlbox">
<div class="sxpage">
<p>
<strong>上一篇:</strong><a href='http://www.hudsonhome.cn/cpyfw/cpfl/czpj/2014-09-23/600.html'>仿古配件</a></p>
<p>
<strong>下一篇:</strong><a href='http://www.hudsonhome.cn/cpyfw/cpfl/czpj/2014-09-23/602.html'>仿古角花</a></p>
</div>
<div class="cls">
</div>
<div class="fenxiang">
<!-- JiaThis Button BEGIN -->
<div id="ckepop">
<span class="jiathis_txt">分享到:
<!-- chan baidu begin -->
<a href="javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0" style="color:#000000;text-decoration:none;font-size:12px;font-weight:normal"><span style="padding: 5px 5px 0px; font-size: 12px; margin-left: 10px; cursor: pointer;"><img border="0" alt="添加到百度搜藏" align="absmiddle" src="http://help.baidu.com/resources_new/static/images/code_socang_fav1.jpg?qq-pf-to=pcqq.c2c"> 添加到百度搜藏</span></a>
<!-- chan baidu end-->
</span> <a class="jiathis_button_icons_1"></a><a class="jiathis_button_icons_2">
</a><a class="jiathis_button_icons_3"></a><a class="jiathis_button_icons_4"></a>
<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis"
target="_blank"></a><a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<!-- JiaThis Button END -->
</div>
<div class="cls">
</div>
<div class="fanhui2">
<a href="#">
<img src="http://www.hudson.com/skin/default/images/img_top.jpg" width="44" height="14" /></a> <a href="javascript:history.go(-1);">
<img src="http://www.hudson.com/skin/default/images/img_fanhui.jpg" /></a>
</div>
</div>
</div>
</div>
<div class="cls">
</div>
</div>
</div>
<div class="bg_f">
</div>
</div>
</div>
<div class="cls">
</div>
<!-- 尾部开始 -->
<div class="foot">
<div class="wrap">
<div class="fm_box">
<h3>公司动态</h3>
<ul>
<li><a href="http://www.hudson.com/xwzx/hdzq/">活动专区</a></li>
<li><a href="http://www.hudson.com/xwzx/qyxw/">企业新闻</a></li>
<li><a href="http://www.hudson.com/xwzx/axgy/">爱心公益</a></li>
</ul>
</div>
<div class="fm_box">
<h3>关于哈德逊</h3>
<ul>
<li><a href="http://www.hudson.com/">董事长介绍</a></li>
<li><a href="http://www.hudson.com/zjhdx/2014-02-22/6.html">企业简介</a></li>
<li><a href="http://www.hudson.com/zjhdx/2014-02-22/7.html">企业文化</a></li>
<li><a href="http://www.hudson.com/zjhdx/2014-02-22/8.html">发展历程</a></li>
<li><a href="http://www.hudson.com/zjhdx/2014-02-22/11.html">联系我们</a></li>
<li><a href="http://www.hudson.com/zjhdx/2014-02-22/10.html">哈德逊荣誉</a></li>
</ul>
</div>
<div class="fm_box">
<h3>最新职位</h3>
<ul>
<li><a href="http://www.hudson.com/rlzy/zwlb/2014-03-11/156.html" title="采购员">采购员</a></li>
<li><a href="http://www.hudson.com/rlzy/zwlb/2014-03-11/155.html" title="海外推广/外贸SEO推广">海外推广/外贸S</a></li>
<li><a href="http://www.hudson.com/rlzy/zwlb/2014-03-11/154.html" title="产品经理">产品经理</a></li>
<li><a href="http://www.hudson.com/rlzy/zwlb/2014-03-11/153.html" title="电商分销主管">电商分销主管</a></li>
<li><a href="http://www.hudson.com/rlzy/zwlb/2014-03-11/152.html" title="电商网络销售/工程单销售">电商网络销售/</a></li>
</ul>
</div>
<div class="fm_box">
<h3>人力资源</h3>
<ul>
<li><a href="http://www.hudson.com/rlzy/rcg/2014-03-02/44.html">人才观</a></li>
<li><a href="http://www.hudson.com/rlzy/zwfz/2014-03-02/45.html">职位发展</a></li>
<li><a href="http://www.hudson.com/rlzy/xcfl/2014-03-02/46.html">薪酬福利</a></li>
<li><a href="http://www.hudson.com/rlzy/ypzn/2014-03-02/47.html">应聘指南</a></li>
<li><a href="">职位列表</a></li>
<li><a href="http://www.hudson.com/rlzy/wzhdx/">我在哈德逊</a></li>
</ul>
</div>
<div class="fm_box" style="margin:0">
<h3>产品</h3>
<ul>
<li><a href="http://www.hudson.com/cpyfw/cpfl/msk">马赛克</a></li>
<li><a href="http://www.hudson.com/cpyfw/cpfl/czpj">瓷砖配件</a></li>
<li><a href="http://www.hudson.com/cpyfw/cpfl/dsbjq">瓷砖背景墙</a></li>
<li><a href="http://www.hudson.com/cpyfw/cpfl/whs">文化石</a></li>
<li><a href="http://www.hudson.com/cpyfw/cpfl/cp">瓷片</a></li>
<li><a href="http://www.hudson.com/cpyfw/cpfl/muwenz">木纹砖</a></li>
<li><a href="http://www.hudson.com/cpyfw/cpfl/fangguz">仿古砖</a></li>
</ul>
</div>
</div>
<div class="mfoot" style=" padding-top: 20px;">
<div class="warp" style=" text-align:center; border-bottom:#999 solid 1px;">
友情链接:
<a href="http://www.hudsonbuy.com/ " target="_blank">建材网上商城</a>
<a href="http://www.chinagzn.com" target="_blank">硅藻泥</a>
<a href="http://www.ganji.com/nuanqi" target="_blank">暖气</a>
<a href="http://www.china-lz.com" target="_blank">天津办公家具</a>
<a href="http://www.xuexi111.com/s/jiaju" target="_blank">家居装修设计</a>
<a href="http://www.reaz.com.cn" target="_blank">高端家居品牌</a>
<a href="http://xining.66zhuang.com" target="_blank">西宁装修网</a>
<a href="http://www.lejj.com/cizhuan/" target="_blank">瓷砖</a>
<a href="http://www.meilele.com/category-cizhuan/" target="_blank">瓷砖</a>
<a href="http://jxyczs.cn/" target="_blank">南昌装修公司</a>
<a href="http://beijing.kuyiso.com/jiancai/" target="_blank">北京建材加盟</a>
<a href="http://www.qianlima.com/zb/area_304/" target="_blank">佛山招标网</a>
<a href="http://www.whczs.com/" target="_blank">南宁装修公司</a>
<a href="http://huiz.pupuwang.com/" target="_blank">惠州商铺转让网</a>
<a href="http://world.fang.com/Singapore/" target="_blank">新加坡买房</a>
<a href="http://zz.huizhuang.com/" target="_blank">郑州装修网</a>
<a href="http://jiancai.11467.com/" target="_blank">中国建筑建材网</a>
<a href="http://bj.ganji.com/chuguijiancai/ " target="_blank">北京橱柜公司</a>
<a href="http://tj.ganji.com/dengshi/ " target="_blank">天津灯饰公司</a>
<a href="http://www.mfj95.com " target="_blank">瓷砖美缝剂</a>
<a href="http://www.zgdbw.cn/ " target="_blank">复合地板品牌 </a>
<script type="text/javascript" src="http://links.webscan.360.cn/index/index/b447b66a05b05015e513cd4b065ed8f6"></script>
</div>
<div class="wrap">
佛山哈德逊股份有限公司©版权所有 保留所有权利 <a href="http://www.hudson.com/wzdt.htm" target="_blank">网站地图</a> 展销中心:+86-757-82278159 客户服务中心:+86-757-82278159
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Faed9e7d575a1cc8a944631fa5314681e' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_5915010'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s19.cnzz.com/stat.php%3Fid%3D5915010%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script><br/>
</div>
</div>
</div>
<!-- 尾部结束 -->
</body>
</html>
|
306076197/hudson
|
cpyfw/cpfl/czpj/2014-09-23/601.html
|
HTML
|
gpl-2.0
| 23,776
|
# Copyright (C) 2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Author: Chris Lumens <clumens@redhat.com>
from dogtail.predicate import GenericPredicate
from dogtail.utils import doDelay
from . import UITestCase
# This test case handles the livecd case on the summary hub where everything
# works as intended. On this spoke, we are testing the following:
#
# * Clicking the Quit button brings up a dialog asking if you're sure, though
# we're not going to test that confirming actually quits.
# * The Begin Installation button is insensitive, since no disks have yet
# been selected.
# * Only the Date & Time, Keyboard, Installation Destination, and Network Config
# spoke selectors are visible.
class LiveCDSummaryTestCase(UITestCase):
def check_quit_button(self):
self.click_button("Quit")
self.check_dialog_displayed("Quit")
self.click_button("No")
def check_begin_installation_button(self):
button = self.find("Begin Installation", "push button")
self.assertIsNotNone(button, msg="Begin Installation button not found")
self.assertTrue(button.showing, msg="Begin Installation button should be displayed")
self.assertFalse(button.sensitive, msg="Begin Installation button should not be sensitive")
def check_shown_spoke_selectors(self):
# FIXME: This forces English.
validSelectors = ["DATE & TIME", "KEYBOARD", "INSTALLATION DESTINATION", "NETWORK & HOSTNAME"]
selectors = self.ana.findChildren(GenericPredicate(roleName="spoke selector"))
self.assertEqual(len(selectors), len(validSelectors), msg="Incorrect number of spoke selectors shown")
# Validate that only the spoke selectors we expect are shown. At the same time,
# we can also validate the status of each selector. This only validates the
# initial state of everything. Once we start clicking on spokes, things are
# going to change.
# FIXME: This encodes default information.
for selector in selectors:
if selector.name == "DATE & TIME":
self.assertEqual(selector.description, "Americas/New York timezone")
elif selector.name == "KEYBOARD":
self.assertEqual(selector.description, "English (US)")
elif selector.name == "INSTALLATION DESTINATION":
# We don't know how many disks are going to be involved - if there's
# just one, anaconda selects it by default. If there's more than
# one, it selects none.
self.assertIn(selector.description, ["Automatic partitioning selected",
"No disks selected"])
elif selector.name == "NETWORK & HOSTNAME":
self.assertRegexpMatches(selector.description, "Wired (.+) connected")
else:
self.fail("Invalid spoke selector shown on livecd: %s" % selector.name)
def _run(self):
# Before doing anything, verify we are on the right screen.
doDelay(5)
self.check_window_displayed("INSTALLATION SUMMARY")
# And now we can check everything else on the screen.
self.check_quit_button()
self.check_begin_installation_button()
self.check_shown_spoke_selectors()
self.check_warning_bar()
|
itoed/anaconda
|
tests/gui/inside/summary.py
|
Python
|
gpl-2.0
| 3,986
|
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( ' | ', true, 'right' ); ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_uri(); ?>" />
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<?php //wp_head(); ?>
<script>
/********** My functions **********/
$(document).ready(function() {
// The maximum supported horizontal resolution, cloud width, and banner height
var maxres = 1260;
var cloud_width = 256;
var banner_height = $("#banner").height;
// The current weather condition
var condition = "snow";
// The number of clouds and a helper variable (sorry)
var clouds = 10;
var range = (maxres + cloud_width) / clouds;
// Place all clouds dynamically
for (var i = 0; i < clouds; i++)
{
var offset = Math.floor(i * range + Math.random() * range - cloud_width)
$("#clouds").append(
"<div class='cloud' style='left: " + offset + "px;'> \
<img src='http://www.harvardrunningclub.com/wp-content/uploads/2014/05/cloud_tiny" + (i%4 + 1) + ".png' alt=''> \
</div>");
}
// If there is a weather condition
if (condition != "")
{
// Create a weather box under each cloud for displaying weather
$(".cloud").each(function() {
$(this).append("<div class='weather'></div>");
});
// Add the appropriate weather condition
$(".weather").each(function() {
var offset = Math.random() * 200 - 320;
$(this).append(
"<div class='condition' style='top: " + offset + "px;'> \
<img src='http://www.harvardrunningclub.com/wp-content/uploads/2014/05/" + condition + ".png'> \
</div>");
});
}
// This function is called every 40ms
setInterval(function() {
// Update cloud movement, wrapping around the screen
$("#clouds").width($("body").width());
$(".cloud").each(function() {
var pos = $(this).position().left - 1;
if (pos < -cloud_width || pos > maxres)
pos = maxres;
$(this).css("left", pos);
});
// Update weather condition movement
$(".condition").each(function() {
var pos = $(this).position().top + 2;
if (pos > 100)
pos = -120;
$(this).css("top", pos);
});
}, 40);
});
</script>
</head>
<body>
|
Koda1004/harvardrunningclub
|
wp-content/themes/simple and clean/header.php
|
PHP
|
gpl-2.0
| 2,330
|
<?php
/*
Plugin Name: Memcached
Description: Memcached backend for the WP Object Cache.
Version: 2.1.2
Plugin URI: http://wordpress.org/extend/plugins/memcached/
Author: Ryan Boren, Denis de Bernardy, Matt Martz, Km.Van
Install this file to wp-content/object-cache.php
*/
function wp_cache_add($key, $data, $group = '', $expire = 0) {
global $wp_object_cache;
return $wp_object_cache->add($key, $data, $group, $expire);
}
function wp_cache_incr($key, $n = 1, $group = '') {
global $wp_object_cache;
return $wp_object_cache->incr($key, $n, $group);
}
function wp_cache_decr($key, $n = 1, $group = '') {
global $wp_object_cache;
return $wp_object_cache->decr($key, $n, $group);
}
function wp_cache_close() {
global $wp_object_cache;
return $wp_object_cache->close();
}
function wp_cache_delete($key, $group = '') {
global $wp_object_cache;
return $wp_object_cache->delete($key, $group);
}
function wp_cache_flush() {
global $wp_object_cache;
return $wp_object_cache->flush();
}
function wp_cache_get($key, $group = '', $force = false) {
global $wp_object_cache;
return $wp_object_cache->get($key, $group, $force);
}
function wp_cache_init() {
global $wp_object_cache;
$wp_object_cache = new WP_Object_Cache();
}
function wp_cache_replace($key, $data, $group = '', $expire = 0) {
global $wp_object_cache;
return $wp_object_cache->replace($key, $data, $group, $expire);
}
function wp_cache_set($key, $data, $group = '', $expire = 0) {
global $wp_object_cache;
if ( defined('WP_INSTALLING') == false )
return $wp_object_cache->set($key, $data, $group, $expire);
else
return $wp_object_cache->delete($key, $group);
}
function wp_cache_add_global_groups( $groups ) {
global $wp_object_cache;
$wp_object_cache->add_global_groups($groups);
}
function wp_cache_add_non_persistent_groups( $groups ) {
global $wp_object_cache;
$wp_object_cache->add_non_persistent_groups($groups);
}
class WP_Object_Cache {
var $global_groups = [];
var $no_mc_groups = [];
var $cache = [];
var $mc = [];
var $stats = [];
var $group_ops = [];
var $cache_enabled = true;
var $default_expiration = 0; //29 days
var $ns_key = '';
var $ns_time = '';
function add($id, $data, $group = null, $expire = 0) {
if(!$group)
$group = 'default';
$key = $this->key($id, $group);
if ( is_object( $data ) )
$data = clone $data;
if ( in_array($group, $this->no_mc_groups) ) {
$this->cache[$key] = $data;
return true;
} elseif ( isset($this->cache[$key]) && $this->cache[$key] !== false ) {
return false;
}
$mc =& $this->get_mc($group);
if($expire === 0)
$expire = $this->default_expiration;
$result = $mc->add($key, $data, false, $expire);
if ( false !== $result ) {
@ ++$this->stats['add'];
$this->group_ops[$group][] = "add $id";
$this->cache[$key] = $data;
}
return $result;
}
function add_global_groups($groups) {
if ( ! is_array($groups) )
$groups = (array) $groups;
$this->global_groups = array_merge($this->global_groups, $groups);
$this->global_groups = array_unique($this->global_groups);
}
function add_non_persistent_groups($groups) {
if ( ! is_array($groups) )
$groups = (array) $groups;
$this->no_mc_groups = array_merge($this->no_mc_groups, $groups);
$this->no_mc_groups = array_unique($this->no_mc_groups);
}
function incr($id, $n = 1, $group = 'default' ) {
if(!$group)
$group = 'default';
$key = $this->key($id, $group);
$mc =& $this->get_mc($group);
$this->cache[ $key ] = $mc->increment( $key, $n );
return $this->cache[ $key ];
}
function decr($id, $n = 1, $group = 'default' ) {
if(!$group)
$group = 'default';
$key = $this->key($id, $group);
$mc =& $this->get_mc($group);
$this->cache[ $key ] = $mc->decrement( $key, $n );
return $this->cache[ $key ];
}
function close() {
foreach ( $this->mc as $bucket => $mc )
$mc->close();
}
function delete($id, $group = 'default') {
if(!$group)
$group = 'default';
$key = $this->key($id, $group);
if ( in_array($group, $this->no_mc_groups) ) {
unset($this->cache[$key]);
return true;
}
$mc =& $this->get_mc($group);
$result = $mc->delete($key);
@ ++$this->stats['delete'];
$this->group_ops[$group][] = "delete $id";
if ( false !== $result )
unset($this->cache[$key]);
return $result;
}
function flush() {
// Don't flush if multi-blog.
if ( function_exists('is_site_admin') || defined('CUSTOM_USER_TABLE') && defined('CUSTOM_USER_META_TABLE') )
return true;
$ret = true;
foreach ( array_keys($this->mc) as $group ){
if(strpos($group,WP_CACHE_KEY_SALT) !== false){
$mc =& $this->get_mc('default');
$this->ns_time = $_SERVER['REQUEST_TIME'];
$ret = $mc->set($this->ns_key,$_SERVER['REQUEST_TIME']);
//$ret &= $this->mc[$group]->flush();
return $ret;
}
}
return $ret;
}
function get($id, $group = null, $force = false) {
if(!$group)
$group = 'default';
$key = $this->key($id, $group);
$mc =& $this->get_mc($group);
if ( isset($this->cache[$key]) && ( !$force || in_array($group, $this->no_mc_groups) ) ) {
if ( is_object( $this->cache[$key] ) )
$value = clone $this->cache[$key];
else
$value = $this->cache[$key];
} else if ( in_array($group, $this->no_mc_groups) ) {
$this->cache[$key] = $value = false;
} else {
$value = $mc->get($key);
if ( NULL === $value ){
$value = false;
}
$this->cache[$key] = $value;
}
@ ++$this->stats['get'];
$this->group_ops[$group][] = "get $id";
if ( 'checkthedatabaseplease' === $value ) {
unset( $this->cache[$key] );
$value = false;
}
return $value;
}
function get_multi( $groups ) {
/*
format: $get['group-name'] = array( 'key1', 'key2' );
*/
$return = [];
foreach ( $groups as $group => $ids ) {
$mc =& $this->get_mc($group);
foreach ( $ids as $id ) {
$key = $this->key($id, $group);
if ( isset($this->cache[$key]) ) {
if ( is_object( $this->cache[$key] ) )
$return[$key] = clone $this->cache[$key];
else
$return[$key] = $this->cache[$key];
continue;
} else if ( in_array($group, $this->no_mc_groups) ) {
$return[$key] = false;
continue;
} else {
$return[$key] = $mc->get($key);
}
}
if ( $to_get ) {
$vals = $mc->get_multi( $to_get );
$return = array_merge( $return, $vals );
}
}
@ ++$this->stats['get_multi'];
$this->group_ops[$group][] = "get_multi $id";
$this->cache = array_merge( $this->cache, $return );
return $return;
}
function key($key, $group) {
if ( false !== array_search($group, $this->global_groups) )
$prefix = $this->global_prefix;
else
$prefix = $this->blog_prefix;
return $this->ns_time . $prefix . $group . ':' . $key;
}
function replace($id, $data, $group = null, $expire = 0) {
if(!$group)
$group = 'default';
$key = $this->key($id, $group);
if($expire === 0)
$expire = $this->default_expiration;
$mc =& $this->get_mc($group);
if ( is_object( $data ) )
$data = clone $data;
$result = $mc->replace($key, $data, false, $expire);
if ( false !== $result )
$this->cache[$key] = $data;
return $result;
}
function set($id, $data, $group = null, $expire = 0) {
if(!$group)
$group = 'default';
$key = $this->key($id, $group);
if ( isset($this->cache[$key]) && ('checkthedatabaseplease' === $this->cache[$key]) )
return false;
if ( is_object($data) )
$data = clone $data;
$this->cache[$key] = $data;
if ( in_array($group, $this->no_mc_groups) )
return true;
if($expire === 0)
$expire = $this->default_expiration;
$mc =& $this->get_mc($group);
$result = $mc->set($key, $data, false, $expire);
return $result;
}
function colorize_debug_line($line) {
$colors = array(
'get' => 'green',
'set' => 'purple',
'add' => 'blue',
'delete' => 'red');
$cmd = substr($line, 0, strpos($line, ' '));
$cmd2 = "<span style='color:{$colors[$cmd]}'>$cmd</span>";
return $cmd2 . substr($line, strlen($cmd)) . "\n";
}
function stats() {
echo "<p>\n";
foreach ( $this->stats as $stat => $n ) {
echo "<strong>$stat</strong> $n";
echo "<br/>\n";
}
echo "</p>\n";
echo "<h3>Memcached:</h3>";
foreach ( $this->group_ops as $group => $ops ) {
if ( !isset($_GET['debug_queries']) && 500 < count($ops) ) {
$ops = array_slice( $ops, 0, 500 );
echo "<big>Too many to show! <a href='" . add_query_arg( 'debug_queries', 'true' ) . "'>Show them anyway</a>.</big>\n";
}
echo "<h4>$group commands</h4>";
echo "<pre>\n";
$lines = [];
foreach ( $ops as $op ) {
$lines[] = $this->colorize_debug_line($op);
}
print_r($lines);
echo "</pre>\n";
}
if ( $this->debug )
var_dump($this->memcache_debug);
}
function &get_mc($group = null) {
if(!$group)
$group = 'default';
$group = WP_CACHE_KEY_SALT . $group;
if ( isset($this->mc[$group]) )
return $this->mc[$group];
return $this->mc[WP_CACHE_KEY_SALT . 'default'];
}
function failure_callback($host, $port) {
die('Can not connect memcache server.');
}
function __construct() {
if(!class_exists('Memcache')){
die('Your server is NOT support Memcache service, please delete "wp-content/object-cache.php" and refresh page.');
}
global $memcached_servers,$_wp_using_ext_object_cache;
if ( !defined( 'WP_CACHE_KEY_SALT' ) ){
define( 'WP_CACHE_KEY_SALT', md5(AUTH_KEY) );
}
$_wp_using_ext_object_cache = true;
if ( isset($memcached_servers) ){
$buckets = $memcached_servers;
}else{
$buckets = array('127.0.0.1');
}
$buckets = array(WP_CACHE_KEY_SALT . 'default' => $buckets);
foreach ( $buckets as $bucket => $servers) {
$this->mc[$bucket] = new Memcache();
foreach ( $servers as $server ) {
$node_port = explode(':', $server);
$node = $node_port[0];
$port = isset($node_port[1]) ? $node_port[1] : (int)ini_get('memcache.default_port');
if ( !$port )
$port = 11211;
$this->mc[$bucket]->addServer($node, $port, true, 1, 1, 15, true, array($this, 'failure_callback'));
$this->mc[$bucket]->setCompressThreshold(20000, 0.2);
}
}
global $blog_id, $table_prefix;
$this->global_prefix = '';
$this->blog_prefix = '';
if ( function_exists( 'is_multisite' ) ) {
$this->global_prefix = ( is_multisite() || defined('CUSTOM_USER_TABLE') && defined('CUSTOM_USER_META_TABLE') ) ? '' : $table_prefix;
$this->blog_prefix = ( is_multisite() ? $blog_id : $table_prefix ) . ':';
}
$this->cache_hits =& $this->stats['get'];
$this->cache_misses =& $this->stats['add'];
/**
* set nameplace time
*/
$mc =& $this->get_mc('default');
$this->ns_key = 'nskey_' . WP_CACHE_KEY_SALT;
$this->ns_time = $mc->get($this->ns_key);
if(!$this->ns_time){
$mc->set($this->ns_key,$_SERVER['REQUEST_TIME']);
$this->ns_time = $_SERVER['REQUEST_TIME'];
}
}
}
|
hensonvip/zzyzan
|
wp-content/themes/mx/addons/cache/object-cache.php
|
PHP
|
gpl-2.0
| 11,422
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_21) on Thu May 09 16:35:11 CST 2013 -->
<title>Uses of Interface GeDBIT.mckoi.store.Area</title>
<meta name="date" content="2013-05-09">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface GeDBIT.mckoi.store.Area";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?GeDBIT/mckoi/store/class-use/Area.html" target="_top">Frames</a></li>
<li><a href="Area.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Interface GeDBIT.mckoi.store.Area" class="title">Uses of Interface<br>GeDBIT.mckoi.store.Area</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#GeDBIT.mckoi.store">GeDBIT.mckoi.store</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="GeDBIT.mckoi.store">
<!-- -->
</a>
<h3>Uses of <a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a> in <a href="../../../../GeDBIT/mckoi/store/package-summary.html">GeDBIT.mckoi.store</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../GeDBIT/mckoi/store/package-summary.html">GeDBIT.mckoi.store</a> that return <a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#copyTo(GeDBIT.mckoi.store.Area, int)">copyTo</a></strong>(<a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a> destination,
int size)</code>
<div class="block">Copies 'size' bytes from the current position of this Area to the
destination Area (at the position set in the destination area).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#get(byte[], int, int)">get</a></strong>(byte[] buf,
int off,
int len)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">AbstractStore.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/AbstractStore.html#getArea(long)">getArea</a></strong>(long pointer)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Store.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Store.html#getArea(long)">getArea</a></strong>(long pointer)</code>
<div class="block">Returns an Area object that can be used to manipulate an area allocated
from the store.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">AbstractStore.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/AbstractStore.html#getFixedArea()">getFixedArea</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Store.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Store.html#getFixedArea()">getFixedArea</a></strong>()</code>
<div class="block">Returns an Area object that represents the 64 byte fixed area as can be
changed by the 'getFixedArea' and 'setFixedArea' methods.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#position(int)">position</a></strong>(int position)</code>
<div class="block">Sets the position within the area and returns this object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#put(byte)">put</a></strong>(byte b)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#put(byte[], int, int)">put</a></strong>(byte[] buf,
int off,
int len)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#putChar(char)">putChar</a></strong>(char c)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#putInt(int)">putInt</a></strong>(int i)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#putLong(long)">putLong</a></strong>(long l)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#putShort(short)">putShort</a></strong>(short s)</code> </td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../GeDBIT/mckoi/store/package-summary.html">GeDBIT.mckoi.store</a> with parameters of type <a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a></code></td>
<td class="colLast"><span class="strong">Area.</span><code><strong><a href="../../../../GeDBIT/mckoi/store/Area.html#copyTo(GeDBIT.mckoi.store.Area, int)">copyTo</a></strong>(<a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Area</a> destination,
int size)</code>
<div class="block">Copies 'size' bytes from the current position of this Area to the
destination Area (at the position set in the destination area).</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../GeDBIT/mckoi/store/Area.html" title="interface in GeDBIT.mckoi.store">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?GeDBIT/mckoi/store/class-use/Area.html" target="_top">Frames</a></li>
<li><a href="Area.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|
marknv/GeDBIT
|
doc/GeDBIT/mckoi/store/class-use/Area.html
|
HTML
|
gpl-2.0
| 11,960
|
#include <gst/gst.h>
int main(int argc, char *argv[]) {
GstElement *pipeline, *source, *sink;
GstBus *bus;
GstMessage *msg;
GstStateChangeReturn ret;
/* Initialize GStreamer */
gst_init (&argc, &argv);
/* Create the elements */
source = gst_element_factory_make ("videotestsrc", "source");
sink = gst_element_factory_make ("ximagesink", "sink");
/* Create the empty pipeline */
pipeline = gst_pipeline_new ("test-pipeline");
if (!pipeline || !source || !sink) {
g_printerr ("Not all elements could be created.\n");
return -1;
}
/* Build the pipeline */
gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
if (gst_element_link (source, sink) != TRUE) {
g_printerr ("Elements could not be linked.\n");
gst_object_unref (pipeline);
return -1;
}
/* Modify the source's properties */
g_object_set (source, "pattern", 0, NULL);
/* Start playing */
ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
if (ret == GST_STATE_CHANGE_FAILURE) {
g_printerr ("Unable to set the pipeline to the playing state.\n");
gst_object_unref (pipeline);
return -1;
}
/* Wait until error or EOS */
bus = gst_element_get_bus (pipeline);
msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
/* Parse message */
if (msg != NULL) {
GError *err;
gchar *debug_info;
switch (GST_MESSAGE_TYPE (msg)) {
case GST_MESSAGE_ERROR:
gst_message_parse_error (msg, &err, &debug_info);
g_printerr ("Error received from element %s: %s\n", GST_OBJECT_NAME (msg->src), err->message);
g_printerr ("Debugging information: %s\n", debug_info ? debug_info : "none");
g_clear_error (&err);
g_free (debug_info);
break;
case GST_MESSAGE_EOS:
g_print ("End-Of-Stream reached.\n");
break;
default:
/* We should not reach here because we only asked for ERRORs and EOS */
g_printerr ("Unexpected message received.\n");
break;
}
gst_message_unref (msg);
}
/* Free resources */
gst_object_unref (bus);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
return 0;
}
|
WilstonOreo/OmnidomeServer
|
src/main.c
|
C
|
gpl-2.0
| 2,269
|
/*********
*
* In the name of the Father, and of the Son, and of the Holy Spirit.
*
* This file is part of BibleTime's source code, http://www.bibletime.info/.
*
* Copyright 1999-2016 by the BibleTime developers.
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
*
**********/
#ifndef CSWORDBACKEND_H
#define CSWORDBACKEND_H
#include <QObject>
#include <QString>
#include <QStringList>
#include "../../util/btassert.h"
#include "../drivers/cswordmoduleinfo.h"
#include "../drivers/btconstmoduleset.h"
#include "../bookshelfmodel/btbookshelfmodel.h"
#include "../filters/gbftohtml.h"
#include "../filters/osistohtml.h"
#include "../filters/plaintohtml.h"
#include "../filters/teitohtml.h"
#include "../filters/thmltohtml.h"
#include "../rendering/cbookdisplay.h"
#include "../rendering/cchapterdisplay.h"
#include "../rendering/centrydisplay.h"
// Sword includes:
#include <swmgr.h>
#include <swbuf.h>
#include <swmodule.h>
#include <swversion.h>
#include <localemgr.h>
#include <utilstr.h>
/**
\brief The backend layer main class, a backend implementation of Sword.
This is the implementation of CBackend for Sword. It's additionally derived
from SWMgr to provide functions of Sword.
\note Mostly, only one instance of this class is used. This instance is
created by BibleTime::initBackends() and is destroyed by
BibleTimeApp::~BibleTimeApp(). Only when \ref BackendNotSingleton
"managing modules" separate backends are created.
*/
class CSwordBackend: public QObject, public sword::SWMgr {
Q_OBJECT
public: /* Types: */
/**
\brief The reason for the sigSwordSetupChanged signal, i.e. why the module
list has changed.
*/
enum SetupChangedReason {
AddedModules = 1,
RemovedModules = 2,
HidedModules = 4,
PathChanged = 8,
OtherChange = 16
};
/**
\brief The error codes which may be returned by the \ref Load() call.
\note These values exist to cast from the char return of SWMgr::Load().
*/
enum LoadError {
NoSwordConfig = -1,
NoError = 0,
NoModules = 1
};
public: /* Methods: */
/**
\note Used by BtInstallBackend only.
\note Using augmentHome=false can mess up the system because it is true
elsewhere.
\param[in] path The path which is used to load modules.
\param[in] augmentHome Whether $HOME/.sword/ modules should be augmented
with the other modules.
*/
CSwordBackend(const QString & path, const bool augmentHome = true);
~CSwordBackend();
/** \returns the CSwordBackend singleton instance (created if needed). */
static inline CSwordBackend * createInstance() {
BT_ASSERT(!m_instance);
m_instance = new CSwordBackend();
return m_instance;
}
/** \returns the singleton instance, creating it if one does not exist. */
static inline CSwordBackend * instance() { return m_instance; }
/** \brief Destroys the singleton instance, if one exists. */
static inline void destroyInstance() {
delete m_instance;
m_instance = nullptr;
}
/**
\warning You have to call initModules() first.
\note This method is equivalent to model()->modules().
\returns The list of modules managed by this backend.
*/
inline const QList<CSwordModuleInfo*> & moduleList() const {
return m_dataModel.moduleList();
}
BtModuleList moduleList(CSwordModuleInfo::ModuleType type) const;
inline BtBookshelfModel * model() {
return &m_dataModel;
}
/**
\brief Initializes the Sword modules.
\returns whether the initializiation was successful.
*/
CSwordBackend::LoadError initModules(const SetupChangedReason reason);
/**
\brief Deinitializes and frees the modules.
\returns whether the method succeeded.
*/
void shutdownModules();
/**
\brief Sets the state of the given filter option.
\param[in] type The filter type whose state to set.
\param[in] state The new filter option state.
*/
void setOption(const CSwordModuleInfo::FilterTypes type, const int state);
void setFilterOptions(const FilterOptions & options);
/**
\brief Sets the language for the international booknames of Sword.
\param[in] langName The abbreviation string which should be used for the
Sword backend.
*/
const QString booknameLanguage(const QString & langName = QString::null);
/**
\brief Searches for a module with the given description.
\param[in] description The description of the desired module.
\returns a pointer to the desired module or NULL if not found.
*/
CSwordModuleInfo * findModuleByDescription(const QString & description) const;
/**
\brief Searches for a module with the given name.
\param[in] name The name of the desired module.
\returns a pointer to the desired module or NULL if not found.
*/
CSwordModuleInfo * findModuleByName(const QString & name) const;
/**
\brief Searches for a module with the given sword module as module().
\param[in] swmodule The SWModule of the desired module.
\returns a pointer to the desired module or NULL if not found.
*/
CSwordModuleInfo * findSwordModuleByPointer(const sword::SWModule * const swmodule) const;
/**
\returns The global config object containing the configs of all modules
merged together.
*/
inline sword::SWConfig * getConfig() const {
return config;
}
/**
\param[in] option The option name to return.
\returns The name of the option given by the parameter.
*/
static QString optionName(const CSwordModuleInfo::FilterTypes option);
/**
\param[in] option The configuration option name to return.
\returns the text used for the configuration option given.
*/
static QString configOptionName(const CSwordModuleInfo::FilterTypes option);
/**
\param[in] option The translated option name.
\returns the translated name of the option given.
*/
static QString translatedOptionName(const CSwordModuleInfo::FilterTypes option);
/**
\brief Reloads all Sword modules.
\param[in] reason The reason for the reload.
*/
void reloadModules(const SetupChangedReason reason);
/**
\brief Uninstalls the given modules.
\param[in] modules The modules to uninstall.
*/
void uninstallModules(BtConstModuleSet const & modules);
/**
\param[in] names The names of the modules to return.
\returns a list of pointers to modules, created from a list of module
names.
*/
QList<CSwordModuleInfo*> getPointerList(const QStringList & names) const;
/**
\param[in] names The names of the modules to return.
\returns a list of pointers to const modules, created from a list of
module names.
*/
BtConstModuleList getConstPointerList(const QStringList & names) const;
/**
\brief Sword prefix list.
\returns A list of all known Sword prefix dirs
*/
QStringList swordDirList() const;
/**
Deletes all indices of modules where hasIndex() returns false (because of
wrong index version etc.) and deletes all orphaned indexes (no module
present) if autoDeleteOrphanedIndices is true.
*/
void deleteOrphanedIndices();
signals:
void sigSwordSetupChanged(CSwordBackend::SetupChangedReason reason);
protected: /* Methods: */
/**
Creates the SWModule objects using SWMgr's methods, it adds the
necessary filters for the module format.
*/
CSwordBackend();
/** Reimplemented from sword::SWMgr. */
void AddRenderFilters(sword::SWModule * module,
sword::ConfigEntMap & section) override;
QStringList getSharedSwordConfigFiles() const;
QString getPrivateSwordConfigPath() const;
QString getPrivateSwordConfigFile() const;
private: /* Fields: */
// Filters:
Filters::GbfToHtml m_gbfFilter;
Filters::OsisToHtml m_osisFilter;
Filters::PlainToHtml m_plainFilter;
Filters::TeiToHtml m_teiFilter;
Filters::ThmlToHtml m_thmlFilter;
// Displays:
Rendering::CChapterDisplay m_chapterDisplay;
Rendering::CEntryDisplay m_entryDisplay;
Rendering::CBookDisplay m_bookDisplay;
BtBookshelfModel m_dataModel;
static CSwordBackend * m_instance;
};
#endif
|
greg-hellings/bibletime
|
src/backend/managers/cswordbackend.h
|
C
|
gpl-2.0
| 8,611
|
using System;
using Server.Network;
using Server.Items;
namespace Server.Items
{
[FlipableAttribute( 0x27A8, 0x27F3 )]
public class Bokuto : BaseSword
{
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.CrushingBlow; } }
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }
public override int AosStrengthReq{ get{ return 20; } }
public override int AosMinDamage{ get{ return 9; } }
public override int AosMaxDamage{ get{ return 11; } }
public override int AosSpeed{ get{ return 53; } }
public override int OldStrengthReq{ get{ return 20; } }
public override int OldMinDamage{ get{ return 9; } }
public override int OldMaxDamage{ get{ return 11; } }
public override int OldSpeed{ get{ return 53; } }
public override int DefHitSound{ get{ return 0x536; } }
public override int DefMissSound{ get{ return 0x23A; } }
public override int InitMinHits{ get{ return 25; } }
public override int InitMaxHits{ get{ return 50; } }
[Constructable]
public Bokuto() : base( 0x27A8 )
{
Weight = 7.0;
}
public Bokuto( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
/*int version = */reader.ReadInt();
}
}
}
|
brodock/sunuo
|
scripts/legacy/Items/Weapons/SE Weapons/Bokuto.cs
|
C#
|
gpl-2.0
| 1,431
|
//
// --------------------------------------------------------------------------
// Gurux Ltd
//
//
//
//
// Version: $Revision: 9806 $,
// $Date: 2018-01-12 11:44:00 +0200 (pe, 12 tammi 2018) $
// $Author: gurux01 $
//
// Copyright (c) Gurux Ltd
//
//---------------------------------------------------------------------------
//
// DESCRIPTION
//
// This file is a part of Gurux Device Framework.
//
// Gurux Device Framework is Open Source 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; version 2 of the License.
// Gurux Device Framework 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.
//
// More information of Gurux DLMS/COSEM Director: https://www.gurux.org/GXDLMSDirector
//
// This code is licensed under the GNU General Public License v2.
// Full text may be retrieved at http://www.gnu.org/licenses/gpl-2.0.txt
//---------------------------------------------------------------------------
using System.Collections;
using System.ComponentModel;
namespace GXDLMSDirector
{
public class GXConformanceValueDescriptorCollection : PropertyDescriptorCollection
{
public GXConformanceValueDescriptorCollection(PropertyDescriptor[] properties) : base(properties)
{
}
public override PropertyDescriptorCollection Sort(IComparer comparer)
{
GXConformanceValue customComparer = new GXConformanceValue();
return base.Sort(customComparer);
}
}
}
|
Gurux/GXDLMSDirector
|
Development/ConformanceTests/Internal/GXConformanceValueDescriptorCollection.cs
|
C#
|
gpl-2.0
| 1,766
|
<?php
/**
* Test of authorisation object logic
*
* @author Stuart Prescott
* @copyright Copyright Stuart Prescott
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: auth.php,v 1.3 2006/01/05 02:32:07 stuart Exp $
* @package Bumblebee
* @subpackage Tests
*/
ini_set('error_reporting', E_ALL);
$validusers = array('stuartp', 'stup1', 'stuart_p', 'stu-p', 's1234', '123s',
'stu@p', 'stup@nano.net', 'stu.p', 'stu+p'
);
$invalidusers = array('stu/p', 'stu\'p', 'stu"p', 'stu!p', 'stu%p', 'stu#p', 'stu=p',
'stu\\p', '-stup', '@stup', '', ' ', ' stup', 'stup ', 'stu p'
);
$regexp = '/^[a-z0-9][a-z0-9@\-_.+]+$/';
foreach ($validusers as $name) {
printf("%-20s: %s\n", $name,
(preg_match($regexp, $name) ? 'OK, VALID' : 'ERROR, INVALID'));
}
foreach ($invalidusers as $name) {
printf("%-20s: %s\n", $name,
(preg_match($regexp, $name) ? 'ERROR, VALID' : 'OK, INVALID'));
}
?>
|
nausica/bumblebee
|
inc/bb/test/auth.php
|
PHP
|
gpl-2.0
| 1,056
|
#include "stdafx.h"
//
// this is the path to amplugin.h and all the plugin/libs
// by default all the libs, (debug/x64/x86) are copied to the /Plugins/ folder.
//
// If you want to copy them somewhere else
// 1) Make sure that the inlcude path below is valid
// 2) Make sure that the library path is valid
// Project > Properties > Linker > "Aditional Library properties"
// The path that was used is relative to the "Piger" project.
#include "../../amplugin.h"
PLUGIN_API
AM_RESPONSE am_Msg(AM_MSG msg, AM_UINT wParam, AM_INT lParam)
{
switch (msg)
{
case AM_MSG_INIT:
{
//
// the plugin manager.
AmPlugin* p = (AmPlugin*)(lParam);
//
// get the full path of this plugin
// call 'getCommand( 0, ... ) and it will return this file.
WCHAR szPath[MAX_PATH];
size_t l = p->GetCommand(0, MAX_PATH, szPath);
//
// This is the name of the action e will call
// the second param is who to call when this happens
// in this case, we want Piger to call us back here.
// but we could launch something else.
p->AddAction(L"OnTop", szPath);
}
break;
case AM_MSG_DEINIT:
break;
case AM_MSG_MAIN:
{
//
// Our action as called!
AmPlugin* p = (AmPlugin*)(lParam);
// get the window
HWND hWnd = (HWND)p->GetForegroundWindow();
// is it a valid handle?
if (NULL != hWnd)
{
if (::GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
{
// Revert back
::SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
else
{
// Make topmost
::SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
MessageBeep(MB_ICONINFORMATION);
}
else
{
MessageBeep(MB_ICONERROR);
}
}
break;
case AM_MSG_NAME:
// get the name of this action
// WPARAM is the size of the buffer.
// LPARAM is the buffer, (wchar_t*)
return AM_RESP_NOT_SUPPORTED;
break;
case AM_MSG_PATH_CMD: // this is the root path of the commands, %appdata%\myoddweb\ActionMonitor\RootCommands
case AM_MSG_PATH_IN: // this is the path of actions called on Piger start up, %appdata%\myoddweb\ActionMonitor\RootCommands\__in
case AM_MSG_PATH_OUT: // this is the path of actions called on Piger closing down, %appdata%\myoddweb\ActionMonitor\RootCommands\__out
case AM_MSG_PATH_TMP: // this is the path ignored by piger, %appdata%\myoddweb\ActionMonitor\RootCommands\__tmp
case AM_MSG_PATH_PLUGIN: // the path where the plugins are located, (also where _we_ are located).
// Paths - lParam is a pointer to const wchar_t*
// const wchar_t* path = (const wchar_t*)lParam
return AM_RESP_NOT_SUPPORTED;
break;
default:
break;
}
// not handled here.
return AM_RESP_NOT_SUPPORTED;
}
|
FFMG/myoddweb.piger
|
plugins/OnTop/OnTop/OnTop.cpp
|
C++
|
gpl-2.0
| 2,935
|
using System;
using System.Linq;
namespace BirthdayGreetings
{
public class BirthdayGreetingsEngine
{
private readonly PeopleRepository _peopleRepository;
private readonly GreetingsDeliveryService _greetingsDeliverService;
public BirthdayGreetingsEngine(PeopleRepository peopleRepository, GreetingsDeliveryService greetingsDeliverService)
{
_peopleRepository = peopleRepository;
_greetingsDeliverService = greetingsDeliverService;
}
public void SendGreetingsToPeopleBornInThis(DateTime date)
{
var people = _peopleRepository.GetAll().ToList();
if (!people.Any())
return;
var recipients = people.Where(p => p.Birthday.Month == date.Month && p.Birthday.Day == date.Day).ToList();
if (!recipients.Any())
return;
var greetings = recipients.Select(CreateGreetingDto);
_greetingsDeliverService.Deliver(greetings);
}
private static GreetingDto CreateGreetingDto(PersonDto p)
{
return new GreetingDto
{
Email = p.Email,
Text = string.Format("Dear {0} {1}, happy birthday!", p.FirstName, p.LastName)
};
}
}
}
|
PaoloLaurenti/BirthdayGreetingsKata
|
src/BirthdayGreetings/BirthdayGreetingsEngine.cs
|
C#
|
gpl-2.0
| 1,320
|
<script language="javascript">
function fncSubmit()
{
document.house.submit();
}
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
var lat = position.coords.latitude;
var lng = position.coords.longitude;
$("#ygis").val (lat);
$("#xgis").val (lng);
}
</script>
<?php
$pcucode = $data->GetStringData("select offid as cc from office where offid<>'0000x' limit 1");
if ($_POST['exec'] == 'true'):
$sqlupdate = "update house set hid='" . $_POST['hid'] . "',
hno='" . $_POST['hno'] . "',
road='" . $_POST['road'] . "',
telephonehouse='" . $_POST['telephonehouse'] . "',
area='" . $_POST['area'] . "',
communityno='" . $_POST['communityno'] . "',
housechar='" . $_POST['housechar'] . "',
housecharground='" . $_POST['housecharground'] . "',
xgis='" . $_POST['xgis'] . "',
ygis='" . $_POST['ygis'] . "',
pid='" . $_POST['pid'] . "',
pidvola='" . $_POST['pidvola'] . "',
usernamedoc='" . $_POST['usernamedoc'] . "',
pcucodeperson='" . $pcucode . "',
pcucodepersonvola='" . $pcucode . "' where hcode='" . $_POST['hcode'] . "'";
$db->exec($sqlupdate);
echo "<script> ";
echo"alert('บันทึกเสร็จเรียบร้อยครับ')";
echo "</script> ";
echo "<script>";
echo "window.location='index.php?url=" . $encode->encodeUrl('page/familyfolder/family_folder.php') . "&house_id=" .$_POST['hcode'] . "';";
echo "</script>";
endif;
?>
<form name="house" id="house" method="post">
<?php
$hcode = $encode->decodeUrl($_REQUEST['hcode']);
$sql = "select h.pcucodeperson,h.pid,h.pcucodepersonvola,h.pidvola,
h.area,h.pcucode,h.hcode,h.villcode,h.hid,h.hno,h.road,
h.telephonehouse,h.communityno,h.housechar,h.housecharground,
h.housepic,h.xgis,h.ygis,h.usernamedoc from house as h where h.hcode='" . $hcode . "'";
$result = $db->query($sql, PDO::FETCH_OBJ);
foreach ($result as $row) {
?>
<ul data-role="listview" data-theme="a" data-divider-theme="a" data-inset="true" >
<li data-role='list-divider'><h4>แก้ไขรายละเอียดบ้าน</h4></li>
<input type="hidden" name="exec" value="true">
<input type="hidden" name="hcode" value="<?= $hcode ?>">
<li>
<div class="ui-field-contain">
<label for="hid">รหัสทะเบียนบ้าน :</label>
<input type="text" data-mini="true" name="hid" id="hid" value="<?= $row->hid; ?>" placeholder="รหัสทะเบียนบ้าน">
</div>
<div class="ui-field-contain">
<label for="hno">บ้านเลขที่ :</label>
<input type="text" data-mini="true" name="hno" id="hno" value="<?= $row->hno; ?>" placeholder="บ้านเลขที่">
</div>
<div class="ui-field-contain">
<label for="road">ถนน :</label>
<input type="text" data-mini="true" name="road" id="road" value="<?= $row->road; ?>" placeholder="ถนน">
</div>
<div class="ui-field-contain">
<label for="telephonehouse">เบอร์โทรศัพท์ :</label>
<input type="text" data-mini="true" name="telephonehouse" id="telephonehouse" value="<?= $row->telephonehouse; ?>" placeholder="เบอร์โทรศัพท์">
</div>
<div class="ui-field-contain">
<label for="area">เขตที่ตั้ง :</label>
<select name="area" id="area" data-native-menu="false" data-mini="true" class="filterable-select">
<option value="<?= $row->area ?>"><?php
if ($row->area == 1):echo"อบต.";
else:echo"เทศบาล";
endif;
?></option>
<option value="1">อบต.</option>
<option value="2">เทศบาล</option>
</select>
</div>
<div class="ui-field-contain">
<label for="communityno">ลำดับที่ของชุมชน :</label>
<input type="text" data-mini="true" name="communityno" id="communityno" value="<?= $row->communityno; ?>" placeholder="ลำดับที่ของชุมชน">
</div>
<div class="ui-field-contain">
<label for="housechar">ลักษณะที่ตั้งของบ้าน :</label>
<select name="housechar" id="housechar" data-native-menu="false" data-mini="true" class="filterable-select">
<option value="<?= $row->housechar; ?>"><?= $data->GetStringData("select housechar_name as cc from chousechar where housechar='" . $row->housechar . "'"); ?></option>
<?php
$sqlhc = "select * from chousechar";
$hc = $db->query($sqlhc, PDO::FETCH_OBJ);
foreach ($hc as $h) {
?>
<option value="<?= $h->housechar ?>"><?= $h->housechar_name ?></option>
<?php
}
?>
</select>
</div>
<div class="ui-field-contain">
<label for="housecharground">ลักษณะพื้นที่ของบ้าน :</label>
<input type="text" data-mini="true" name="housecharground" id="housecharground" value="<?= $row->housecharground; ?>" placeholder="ลักษณะพื้นที่ที่ตั้งของบ้าน">
</div>
<div class="ui-field-contain">
<label for="ygis">ละติจูด :</label>
<input type="text" data-mini="true" name="ygis" id="ygis" value="<?= $row->ygis; ?>" placeholder="ละติจูด">
</div>
<div class="ui-field-contain">
<label for="xgis">ลองจิจูด :</label>
<input type="text" data-mini="true" name="xgis" id="xgis" value="<?= $row->xgis; ?>" placeholder="ลองจิจูด">
</div>
<div class="ui-field-contain">
<label>ระบุพิกัดอัตโนมัติ:</label>
<a href="#" class="ui-btn ui-mini ui-btn-f ui-icon-location ui-btn-icon-left" onclick="getLocation()">GPS</a>
</div>
<div class="ui-field-contain">
<label for="pid">หัวหน้าครอบครัว :</label>
<select name="pid" id="pid" data-native-menu="false" data-mini="true">
<option value="<?= $row->pid; ?>"><?= $data->GetStringData("select concat(t.titlename,p.fname,' ',p.lname) as cc from ctitle t, person p where t.titlecode=p.prename and p.pid='" . $row->pid . "'"); ?></option>
<?php
$sqlpid = "SELECT p.pid, concat(t.titlename,p.fname,' ',p.lname) as ptname from ctitle t, person p where t.titlecode=p.prename and p.hcode='" . $hcode . "' order by p.birth";
$rpid = $db->query($sqlpid, PDO::FETCH_OBJ);
foreach ($rpid as $p) {
?>
<option value="<?= $p->pid ?>"><?= $p->ptname ?></option>
<?php
}
?>
</select>
</div>
<div class="ui-field-contain">
<label for="pidvola">อสม. :</label>
<select name="pidvola" data-native-menu="true" data-mini="true">
<option value="<?= $row->pidvola; ?>"><?= $data->GetStringData("select concat(t.titlename,p.fname,' ',p.lname) as cc from ctitle t, person p where t.titlecode=p.prename and p.pid='" . $row->pidvola . "'"); ?></option>
<?php
$sqlpidvo = "select p.pid,concat(t.titlename,p.fname,' ',p.lname) as ptname
from person p, persontype pt, ctitle t,house h
where t.titlecode=p.prename and pt.typecode='09'
and p.pid=pt.pid and h.hcode=p.hcode and p.pcucodeperson=h.pcucode and h.villcode='" . $row->villcode . "'";
$rpidvo = $db->query($sqlpidvo, PDO::FETCH_OBJ);
foreach ($rpidvo as $pvo) {
?>
<option value="<?= $pvo->pid ?>"><?= $pvo->ptname ?></option>
<?php
}
?>
</select>
</div>
<div class="ui-field-contain">
<label for="usernamedoc">จนท.สธ :</label>
<select name="usernamedoc" data-native-menu="true" data-mini="true">
<option value="<?= $row->usernamedoc; ?>"><?= $data->GetStringData("select concat(fname,' ',lname) as cc from user where username='" . $row->usernamedoc . "'"); ?></option>
<?php
$sqldoc = "SELECT u.username,concat(fname,' ',lname) as dname from user u where u.markdelete is null and u.fname is not null ";
$doc = $db->query($sqldoc, PDO::FETCH_OBJ);
foreach ($doc as $d) {
?>
<option value="<?= $d->username ?>"><?= $d->dname ?></option>
<?php
}
?>
</select>
</div>
</li>
</ul>
<?php } ?>
<div data-role="footer" data-position="fixed" data-theme="d">
<div data-role="navbar">
<ul>
<li>
<a href="#menu" data-inline="true" data-mini="true" data-icon="check" onclick="fncSubmit();" >
บันทึก
</a>
</li>
</ul>
</div>
</div>
</form>
|
kukks205/jhhc
|
page/familyfolder/house_edt.php
|
PHP
|
gpl-2.0
| 10,864
|
/* Smooth scrolling
Changes links that link to other parts of this page to scroll
smoothly to those links rather than jump to them directly, which
can be a little disorienting.
sil, http://www.kryogenix.org/
v1.0 2003-11-11
v1.1 2005-06-16 wrap it up in an object
*/
var ss = {
fixAllLinks: function() {
// Get a list of all links in the page
var allLinks = document.getElementsByTagName('a');
// Walk through the list
for (var i=0;i<allLinks.length;i++) {
var lnk = allLinks[i];
if ((lnk.href && lnk.href.indexOf('#') != -1) &&
( (lnk.pathname == location.pathname) ||
('/'+lnk.pathname == location.pathname) ) &&
(lnk.search == location.search)) {
// If the link is internal to the page (begins in #)
// then attach the smoothScroll function as an onclick
// event handler
ss.addEvent(lnk,'click',ss.smoothScroll);
}
}
},
smoothScroll: function(e) {
// This is an event handler; get the clicked on element,
// in a cross-browser fashion
if (window.event) {
target = window.event.srcElement;
} else if (e) {
target = e.target;
} else return;
// Make sure that the target is an element, not a text node
// within an element
if (target.nodeName.toLowerCase() != 'a') {
target = target.parentNode;
}
// Paranoia; check this is an A tag
if (target.nodeName.toLowerCase() != 'a') return;
// Find the <a name> tag corresponding to this href
// First strip off the hash (first character)
anchor = target.hash.substr(1);
// Now loop all A tags until we find one with that name
var allLinks = document.getElementsByTagName('a');
var destinationLink = null;
for (var i=0;i<allLinks.length;i++) {
var lnk = allLinks[i];
if (lnk.name && (lnk.name == anchor)) {
destinationLink = lnk;
break;
}
}
if (!destinationLink) destinationLink = document.getElementById(anchor);
// If we didn't find a destination, give up and let the browser do
// its thing
if (!destinationLink) return true;
// Find the destination's position
var destx = destinationLink.offsetLeft;
var desty = destinationLink.offsetTop;
var thisNode = destinationLink;
while (thisNode.offsetParent &&
(thisNode.offsetParent != document.body)) {
thisNode = thisNode.offsetParent;
destx += thisNode.offsetLeft;
desty += thisNode.offsetTop;
}
// Stop any current scrolling
clearInterval(ss.INTERVAL);
cypos = ss.getCurrentYPos();
ss_stepsize = parseInt((desty-cypos)/ss.STEPS);
ss.INTERVAL =
setInterval('ss.scrollWindow('+ss_stepsize+','+desty+',"'+anchor+'")',10);
// And stop the actual click happening
if (window.event) {
window.event.cancelBubble = true;
window.event.returnValue = false;
}
if (e && e.preventDefault && e.stopPropagation) {
e.preventDefault();
e.stopPropagation();
}
},
scrollWindow: function(scramount,dest,anchor) {
wascypos = ss.getCurrentYPos();
isAbove = (wascypos < dest);
window.scrollTo(0,wascypos + scramount);
iscypos = ss.getCurrentYPos();
isAboveNow = (iscypos < dest);
if ((isAbove != isAboveNow) || (wascypos == iscypos)) {
// if we've just scrolled past the destination, or
// we haven't moved from the last scroll (i.e., we're at the
// bottom of the page) then scroll exactly to the link
window.scrollTo(0,dest);
// cancel the repeating timer
clearInterval(ss.INTERVAL);
// and jump to the link directly so the URL's right
location.hash = anchor;
}
},
getCurrentYPos: function() {
if (document.body && document.body.scrollTop)
return document.body.scrollTop;
if (document.documentElement && document.documentElement.scrollTop)
return document.documentElement.scrollTop;
if (window.pageYOffset)
return window.pageYOffset;
return 0;
},
addEvent: function(elm, evType, fn, useCapture) {
// addEvent and removeEvent
// cross-browser event handling for IE5+, NS6 and Mozilla
// By Scott Andrew
if (elm.addEventListener){
elm.addEventListener(evType, fn, useCapture);
return true;
} else if (elm.attachEvent){
var r = elm.attachEvent("on"+evType, fn);
return r;
} else {
alert("Handler could not be removed");
}
}
}
ss.STEPS = 20;
ss.addEvent(window,"load",ss.fixAllLinks);
|
tatematsu/tatematsu
|
common/js/scroll.js
|
JavaScript
|
gpl-2.0
| 4,557
|
// Combat Simulator Project - FlightSim Demo
// Copyright (C) 2004 The Combat Simulator Project
// http://csp.sourceforge.net
//
// 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.
/**
* @file LocalBattlefield.h
*
**/
#ifndef __CSPSIM_BATTLEFIELD_LOCALBATTLEFIELD_H__
#define __CSPSIM_BATTLEFIELD_LOCALBATTLEFIELD_H__
#include <csp/cspsim/battlefield/Battlefield.h>
#include <csp/cspsim/battlefield/BattlefieldMessages.h>
#include <csp/csplib/util/Callback.h>
#include <csp/csplib/util/Ref.h>
#include <csp/csplib/util/ScopedPointer.h>
#include <sigc++/signal.h>
namespace csp {
class Client;
class DataManager;
class DispatchHandler;
class MessageQueue;
class NetworkMessage;
class Path;
class SceneManager;
class UpdateMaster;
class CSPSIM_EXPORT LocalBattlefield: public Battlefield {
public:
LocalBattlefield(Ref<DataManager> const &data_manager);
~LocalBattlefield();
void update(double dt);
/** Specify the network client used to communicate with the global battlefield
* and other local battlefields. The client's external node, if set, will be
* used by the global battlefield to negotiate the initial connection between
* remote peers. If the peers are on the same LAN, the local ip address will
* be used. NB: in either case, only the port number specified in the local
* node will used---the port number in the external node is currently ignored.
*/
void setNetworkClient(Ref<Client> const &client);
void connectToServer(std::string const &name);
/** Attach a scene manager to the battlefield. Unless a scene manager is
* set, camera and object visibility updates will not be computed.
*/
void setSceneManager(Ref<SceneManager> const &manager);
/** Update the camera position.
*
* Adjusts the camera position and object visibility. Does nothing unless
* a SceneManager has been specified with setSceneManager(). Should be
* called everytime the camera moves (typically every frame).
*
* @param eye_point the position of the camera in global coordinates.
* @param look_pos the aim point of the camera in global coordinates.
* @param up_vec a vector fixing the camera orientation around the viewing direction.
*/
void setCamera(Vector3 const &eye_point, const Vector3& look_pos, const Vector3& up_vec);
// testing interface
void __test__addLocalHumanUnit(Unit const &unit, bool human);
inline bool isConnectionActive() const {
return m_ConnectionState == CONNECTION_ACTIVE;
}
void registerPlayerJoinCallback(callback<void, int, const std::string&> &callback);
void registerPlayerQuitCallback(callback<void, int, const std::string&> &callback);
private:
struct ObjectIdPool;
enum {
CONNECTION_DETACHED,
CONNECTION_JOIN,
CONNECTION_ACTIVE,
CONNECTION_ENDED
} m_ConnectionState;
// local-global messages
void onIdAllocationResponse(Ref<IdAllocationResponse> const &msg, Ref<MessageQueue> const &queue);
void onPlayerJoin(Ref<PlayerJoin> const &msg, Ref<MessageQueue> const &queue);
void onPlayerQuit(Ref<PlayerQuit> const &msg, Ref<MessageQueue> const &queue);
void onCommandUpdatePeer(Ref<CommandUpdatePeer> const &msg, Ref<MessageQueue> const &queue);
void onCommandAddUnit(Ref<CommandAddUnit> const &msg, Ref<MessageQueue> const &queue);
void onCommandRemoveUnit(Ref<CommandRemoveUnit> const &msg, Ref<MessageQueue> const &queue);
void onJoinResponse(Ref<JoinResponse> const &msg, Ref<MessageQueue> const &queue);
void bindCommandDispatch(Ref<DispatchHandler> const &dispatch);
// peer-peer messages from one object to another
void onUnitMessage(Ref<NetworkMessage> const &msg);
// peer-peer messages from a source object to its mirror on this host
void onUnitUpdate(Ref<NetworkMessage> const &msg);
// allocate an id from the pool
void assignNewId(Object const &object);
/** Add and remove objects from the scene as the camera moves.
*
* Called by setCamera() to update the scene when the camera grid position has
* changed. Although setCamera() may be called once for every frame, the grid
* position of the camera should change much more slowly (with hysteresis), so
* this method should not incur much overhead.
*
* @param old_camera_position the grid coordinates of the previous camera position.
* @param new_camera_position the grid coordinates of the new camera position.
*/
void updateVisibility(GridPoint old_camera_position, GridPoint new_camera_position);
virtual void moveUnit(UnitWrapper *wrapper, GridPoint const &old_position, GridPoint const &new_position);
bool updateUnitVisibility(UnitWrapper *wrapper, GridPoint const &old_position, GridPoint const &new_position);
void sendServerCommand(Ref<NetworkMessage> const &msg);
// Scene manager; used to add and remove units and static features from
// the scene (if present).
Ref<SceneManager> m_SceneManager;
Ref<DataManager> m_DataManager;
// The current position of the camera, in grid coordinates.
GridPoint m_CameraGridPosition;
Ref<Client> m_NetworkClient;
ScopedPointer<UpdateMaster> m_UnitUpdateMaster;
ScopedPointer<ObjectIdPool> m_LocalIdPool;
double m_ServerTimeOffset;
SimTime m_CurrentTime;
TimeStamp m_CurrentTimeStamp;
/// A helper class for sending unit updates to remote hosts.
class UpdateProxyConnection;
/// Wrapper for inserting dynamic objects into a quadtree index.
class LocalUnitWrapper;
/// A helper class for sending updates from a local unit to remote hosts.
class UnitUpdateProxy;
/// Information about remote players.
class PlayerInfo;
typedef Ref<PlayerInfo> PlayerInfoRef;
typedef std::map<PeerId, PlayerInfoRef> PlayerInfoMap;
PlayerInfoMap m_PlayerInfoMap;
Ref<UpdateProxyConnection> m_UpdateProxyConnection;
ScopedPointer<UpdateMaster> m_UnitRemoteUpdateMaster;
LocalUnitWrapper* findLocalUnitWrapper(ObjectId id);
// Data used for the slow iteration through local units, which performs
// a spatial query for nearby units (local and remote). The results of
// this query are used to construct contact lists and to adjust the
// the rate at which updates are sent to remote hosts.
double m_ScanElapsedTime;
double m_ScanRate;
unsigned m_ScanIndex;
int m_ScanSignature;
std::vector<Unit> m_ScanUnits;
// Perform a spatial query for objects near the specified unit. Updates
// the unit's contact list and the rate at which position messages are
// sent to peers. Called by continueUnitScan.
void scanUnit(LocalUnitWrapper *wrapper);
// Continue a slow iteration through all units in the battlefield, calling
// scanUnit on each. This method should be called once per time step.
void continueUnitScan(double dt);
ScopedPointer<sigc::signal<void, int, const std::string&> > m_PlayerJoinSignal;
ScopedPointer<sigc::signal<void, int, const std::string&> > m_PlayerQuitSignal;
};
} // namespace csp
#endif // __CSPSIM_BATTLEFIELD_LOCALBATTLEFIELD_H__
|
nsmoooose/csp
|
csp/cspsim/battlefield/LocalBattlefield.h
|
C
|
gpl-2.0
| 7,539
|
/*
body #main {
background: url(//essentialhotels.co.uk/wp-content/uploads/2014/08/Lowry-Hotel-Different-1200-x-Use.jpg) 50%;
text-align: center;
}
*/
body {
font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 300;
}
.typeahead,
.tt-query,
.tt-hint {
width: 420px;
height: 50px;
padding: 8px 12px;
font-size: 20px;
line-height: 30px;
border: 1px solid #ccc;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
outline: none;
margin-top: 10px;
}
.typeahead.smaller {
width: 200px;
height: 30px;
font-size: 1.2em;
}
.typeahead {
background-color: #fff;
}
.typeahead:focus {
border: 2px solid #0097cf;
}
.tt-query {
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.tt-hint {
color: #999
}
.tt-dropdown-menu {
font-size:1.5em;
width: 422px;
margin-top: 12px;
padding: 8px 0;
background-color: #fff !important;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
-moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
box-shadow: 0 5px 10px rgba(0,0,0,.2);
}
.hotels {
line-height: 16px;
background: url(https://essentialhotels.co.uk/wp-content/themes/listings-child/images/icons/bed-icon.jpg) no-repeat;
background-clip: padding-box;
}
.destinations {
line-height: 16px;
background: url(https://essentialhotels.co.uk/wp-content/themes/listings-child/images/icons/destination-pin-16x16.jpg) no-repeat;
background-clip: padding-box;
}
.attractions {
line-height: 16px;
background: url(https://essentialhotels.co.uk/wp-content/themes/listings-child/images/icons/attraction-icon.jpg) no-repeat;
background-clip: padding-box;
}
.tt-suggestion {
padding: 3px 20px;
font-size: 18px;
line-height: 24px;
}
.tt-suggestion.tt-cursor {
color: #fff;
background-color: #0097cf;
}
.tt-suggestion p {
margin: 0;
}
.col-centered {
float: none;
text-align:center;
}
.grid {
border: 1px #ccc;
padding: 0px 0px 0 0;
margin: auto;
}
.grid img {
min-width:100%;
min-height:100%;
}
.grid img.tall {
max-width: 120%;
margin: 0 -10%;
}
.grid img.wide {
max-height: 100%;
}
.grid li a {
display: block;
width: 200px;
height: 200px;
overflow:hidden;
}
.grid li {
display: inline-block;
width: 200px;
height: 200px;
margin: 8px;
background: #eee;
overflow:hidden;
}
.grid span.title {
display: block;
width: 180px;
opacity: .99;
margin: 53px 10px -183px 10px;
height: 40px;
color: white;
font-size: 25px;
line-height: 1.0;
font-weight: 900;
text-shadow: 0px 0px 3px rgba(150, 150, 150, 1);
}
.ng-pageslide {
background: #33cccc;
width: 250px;
opacity: 0.9;
}
#menu-button {
margin: 20px;
}
.btn-warning {
margin-top: 5px;
}
.jumbotron {
background-image: url('https://essentialhotels.co.uk/wp-content/uploads/2014/08/Lowry-Hotel-Uncut-Version-2.jpg');
text-align: center;
padding-top: 100px;
height: 500px;
background-position: 60% 0%;
background-size: cover;
}
#TitleOverSearch {
font-size:20px;
font-weight: 300;
font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
#TextUnderSearch {
font-size:40px;
color: #33cccc;
font-weight: 300;
font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
margin: 10px;
}
#telsmaller {
font-size: 35px;
margin: 0px 0px 0px 20px;
}
#titleLogoSmaller {
padding:0px;
margin: 0px 100px 0px 0px;
}
#WhiteBox {
background: #FFFFFF;
opacity: .9;
text-align: center;
min-height: 300px;
max-width: 500px;
margin: 0px auto;
padding: 10px;
}
.nav-justified {
width: 90%;
text-align: center;
margin: 0px auto;
padding-bottom: 20px;
font-size: 20px;
font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 300;
}
#TextUnUnSearch {
font-size: 20px;
font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 300;
text-align: center;
color: black;
}
#menu-list a {
color: #fff;
font-size: 20px;
font-weight: 300;
}
#menu-list ul {
margin-top: 35px;
text-align: right;
list-height: 1.6;
}
li {
list-style-type: none;
cursor: pointer;
cursor: hand;
}
#gridimage {
margin-top: 90px;
}
.navbar-nav {
width: 100%;
}
.navbar-nav li {
padding: 0px;
}
.navbar.slideup {
top: -51px;
transition: all 3s ease;
}
.navbar.slidedown {
top:0px;
transition: all 1.5s ease;
}
.row.slidedown {
padding-top: 70px;
transition: all 1s ease;
}
|
marcus7777/eh-theme
|
css/mainb.css
|
CSS
|
gpl-2.0
| 4,964
|
<?php
/**
* @version 2.0 +
* @package Open Source Excellence Security Suite
* @subpackage Centrora Security Firewall
* @subpackage Open Source Excellence WordPress Firewall
* @author Open Source Excellence {@link http://www.opensource-excellence.com}
* @author Created on 01-Jun-2013
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* @Copyright Copyright (C) 2008 - 2012- ... Open Source Excellence
*/
if (!defined('OSE_FRAMEWORK') && !defined('OSE_ADMINPATH') && !defined('_JEXEC'))
{
die('Direct Access Not Allowed');
}
require_once(dirname(__FILE__).ODS.'oseDB2.php');
class oseDB2Joomla extends oseDB2
{
public function __construct()
{
$this->dbo = $this->getConnection();
$this->setPrefix ();
}
protected function setPrefix()
{
$config = oseJoomla::getConfig();
$this->prefix = $config->prefix;
}
public function getConnection()
{
$config = oseJoomla::getConfig();
$host = explode(':', $config->host);
if (!empty($host[1]))
{
$connection = new CDbConnection('mysql:host='.$host[0].';port='.$host[1].';dbname='.$config->db, $config->user, $config->password);
}
else
{
$connection = new CDbConnection('mysql:host='.$host[0].';dbname='.$config->db, $config->user, $config->password);
}
return $connection;
}
public function getTableList()
{
$query = "SHOW TABLES ; ";
$this->setQuery($query);
$results = $this->loadResultArray();
$list = array();
$config = oseJoomla::getConfig();
$index = "Tables_in_".$config->db;
foreach ($results as $result)
{
if (!preg_match("/(ose_app_geoip)|(osefirewall_country)/", $result[$index]))
{
$tmp = array_values($result);
$list[] = $tmp[0];
}
}
return $list;
}
}
|
amang-cuelogic/wp_test
|
wp-content/plugins/ose-firewall/framework/oseframework/db/joomla.php
|
PHP
|
gpl-2.0
| 2,392
|
/*
* kernel/sched/core.c
*
* Kernel scheduler and related syscalls
*
* Copyright (C) 1991-2002 Linus Torvalds
*
* 1996-12-23 Modified by Dave Grothe to fix bugs in semaphores and
* make semaphores SMP safe
* 1998-11-19 Implemented schedule_timeout() and related stuff
* by Andrea Arcangeli
* 2002-01-04 New ultra-scalable O(1) scheduler by Ingo Molnar:
* hybrid priority-list and round-robin design with
* an array-switch method of distributing timeslices
* and per-CPU runqueues. Cleanups and useful suggestions
* by Davide Libenzi, preemptible kernel bits by Robert Love.
* 2003-09-03 Interactivity tuning by Con Kolivas.
* 2004-04-02 Scheduler domains code by Nick Piggin
* 2007-04-15 Work begun on replacing all interactivity tuning with a
* fair scheduling design by Con Kolivas.
* 2007-05-05 Load balancing (smp-nice) and other improvements
* by Peter Williams
* 2007-05-06 Interactivity improvements to CFS by Mike Galbraith
* 2007-07-01 Group scheduling enhancements by Srivatsa Vaddagiri
* 2007-11-29 RT balancing improvements by Steven Rostedt, Gregory Haskins,
* Thomas Gleixner, Mike Kravetz
*/
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/nmi.h>
#include <linux/init.h>
#include <linux/uaccess.h>
#include <linux/highmem.h>
#include <asm/mmu_context.h>
#include <linux/interrupt.h>
#include <linux/capability.h>
#include <linux/completion.h>
#include <linux/kernel_stat.h>
#include <linux/debug_locks.h>
#include <linux/perf_event.h>
#include <linux/security.h>
#include <linux/notifier.h>
#include <linux/profile.h>
#include <linux/freezer.h>
#include <linux/vmalloc.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/pid_namespace.h>
#include <linux/smp.h>
#include <linux/threads.h>
#include <linux/timer.h>
#include <linux/rcupdate.h>
#include <linux/cpu.h>
#include <linux/cpuset.h>
#include <linux/percpu.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/sysctl.h>
#include <linux/syscalls.h>
#include <linux/times.h>
#include <linux/tsacct_kern.h>
#include <linux/kprobes.h>
#include <linux/delayacct.h>
#include <linux/unistd.h>
#include <linux/pagemap.h>
#include <linux/hrtimer.h>
#include <linux/tick.h>
#include <linux/debugfs.h>
#include <linux/ctype.h>
#include <linux/ftrace.h>
#include <linux/slab.h>
#include <linux/init_task.h>
#include <linux/binfmts.h>
#include <asm/switch_to.h>
#include <asm/tlb.h>
#include <asm/irq_regs.h>
#include <asm/mutex.h>
#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
#endif
#include "sched.h"
#include "../workqueue_sched.h"
#define CREATE_TRACE_POINTS
#include <trace/events/sched.h>
ATOMIC_NOTIFIER_HEAD(migration_notifier_head);
void start_bandwidth_timer(struct hrtimer *period_timer, ktime_t period)
{
unsigned long delta;
ktime_t soft, hard, now;
for (;;) {
if (hrtimer_active(period_timer))
break;
now = hrtimer_cb_get_time(period_timer);
hrtimer_forward(period_timer, now, period);
soft = hrtimer_get_softexpires(period_timer);
hard = hrtimer_get_expires(period_timer);
delta = ktime_to_ns(ktime_sub(hard, soft));
__hrtimer_start_range_ns(period_timer, soft, delta,
HRTIMER_MODE_ABS_PINNED, 0);
}
}
DEFINE_MUTEX(sched_domains_mutex);
DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
#if defined(CONFIG_INTELLI_PLUG) || defined(CONFIG_FAST_HOTPLUG)
DEFINE_PER_CPU_SHARED_ALIGNED(struct nr_stats_s, runqueue_stats);
#endif
static void update_rq_clock_task(struct rq *rq, s64 delta);
void update_rq_clock(struct rq *rq)
{
s64 delta;
if (rq->skip_clock_update > 0)
return;
delta = sched_clock_cpu(cpu_of(rq)) - rq->clock;
rq->clock += delta;
update_rq_clock_task(rq, delta);
}
/*
* Debugging: various feature bits
*/
#define SCHED_FEAT(name, enabled) \
(1UL << __SCHED_FEAT_##name) * enabled |
const_debug unsigned int sysctl_sched_features =
#include "features.h"
0;
#undef SCHED_FEAT
#ifdef CONFIG_SCHED_DEBUG
#define SCHED_FEAT(name, enabled) \
#name ,
static __read_mostly char *sched_feat_names[] = {
#include "features.h"
NULL
};
#undef SCHED_FEAT
static int sched_feat_show(struct seq_file *m, void *v)
{
int i;
for (i = 0; i < __SCHED_FEAT_NR; i++) {
if (!(sysctl_sched_features & (1UL << i)))
seq_puts(m, "NO_");
seq_printf(m, "%s ", sched_feat_names[i]);
}
seq_puts(m, "\n");
return 0;
}
#ifdef HAVE_JUMP_LABEL
#define jump_label_key__true STATIC_KEY_INIT_TRUE
#define jump_label_key__false STATIC_KEY_INIT_FALSE
#define SCHED_FEAT(name, enabled) \
jump_label_key__##enabled ,
struct static_key sched_feat_keys[__SCHED_FEAT_NR] = {
#include "features.h"
};
#undef SCHED_FEAT
static void sched_feat_disable(int i)
{
if (static_key_enabled(&sched_feat_keys[i]))
static_key_slow_dec(&sched_feat_keys[i]);
}
static void sched_feat_enable(int i)
{
if (!static_key_enabled(&sched_feat_keys[i]))
static_key_slow_inc(&sched_feat_keys[i]);
}
#else
static void sched_feat_disable(int i) { };
static void sched_feat_enable(int i) { };
#endif /* HAVE_JUMP_LABEL */
static ssize_t
sched_feat_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
{
char buf[64];
char *cmp;
int neg = 0;
int i;
if (cnt > 63)
cnt = 63;
if (copy_from_user(&buf, ubuf, cnt))
return -EFAULT;
buf[cnt] = 0;
cmp = strstrip(buf);
if (strncmp(cmp, "NO_", 3) == 0) {
neg = 1;
cmp += 3;
}
for (i = 0; i < __SCHED_FEAT_NR; i++) {
if (strcmp(cmp, sched_feat_names[i]) == 0) {
if (neg) {
sysctl_sched_features &= ~(1UL << i);
sched_feat_disable(i);
} else {
sysctl_sched_features |= (1UL << i);
sched_feat_enable(i);
}
break;
}
}
if (i == __SCHED_FEAT_NR)
return -EINVAL;
*ppos += cnt;
return cnt;
}
static int sched_feat_open(struct inode *inode, struct file *filp)
{
return single_open(filp, sched_feat_show, NULL);
}
static const struct file_operations sched_feat_fops = {
.open = sched_feat_open,
.write = sched_feat_write,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static __init int sched_init_debug(void)
{
debugfs_create_file("sched_features", 0644, NULL, NULL,
&sched_feat_fops);
return 0;
}
late_initcall(sched_init_debug);
#endif /* CONFIG_SCHED_DEBUG */
/*
* Number of tasks to iterate in a single balance run.
* Limited because this is done with IRQs disabled.
*/
const_debug unsigned int sysctl_sched_nr_migrate = 32;
/*
* period over which we average the RT time consumption, measured
* in ms.
*
* default: 1s
*/
const_debug unsigned int sysctl_sched_time_avg = MSEC_PER_SEC;
/*
* period over which we measure -rt task cpu usage in us.
* default: 1s
*/
unsigned int sysctl_sched_rt_period = 1000000;
__read_mostly int scheduler_running;
/*
* part of the period that we allow rt tasks to run in us.
* default: 0.95s
*/
int sysctl_sched_rt_runtime = 950000;
/*
* __task_rq_lock - lock the rq @p resides on.
*/
static inline struct rq *__task_rq_lock(struct task_struct *p)
__acquires(rq->lock)
{
struct rq *rq;
lockdep_assert_held(&p->pi_lock);
for (;;) {
rq = task_rq(p);
raw_spin_lock(&rq->lock);
if (likely(rq == task_rq(p)))
return rq;
raw_spin_unlock(&rq->lock);
}
}
/*
* task_rq_lock - lock p->pi_lock and lock the rq @p resides on.
*/
static struct rq *task_rq_lock(struct task_struct *p, unsigned long *flags)
__acquires(p->pi_lock)
__acquires(rq->lock)
{
struct rq *rq;
for (;;) {
raw_spin_lock_irqsave(&p->pi_lock, *flags);
rq = task_rq(p);
raw_spin_lock(&rq->lock);
if (likely(rq == task_rq(p)))
return rq;
raw_spin_unlock(&rq->lock);
raw_spin_unlock_irqrestore(&p->pi_lock, *flags);
}
}
static void __task_rq_unlock(struct rq *rq)
__releases(rq->lock)
{
raw_spin_unlock(&rq->lock);
}
static inline void
task_rq_unlock(struct rq *rq, struct task_struct *p, unsigned long *flags)
__releases(rq->lock)
__releases(p->pi_lock)
{
raw_spin_unlock(&rq->lock);
raw_spin_unlock_irqrestore(&p->pi_lock, *flags);
}
/*
* this_rq_lock - lock this runqueue and disable interrupts.
*/
static struct rq *this_rq_lock(void)
__acquires(rq->lock)
{
struct rq *rq;
local_irq_disable();
rq = this_rq();
raw_spin_lock(&rq->lock);
return rq;
}
#ifdef CONFIG_SCHED_HRTICK
/*
* Use HR-timers to deliver accurate preemption points.
*
* Its all a bit involved since we cannot program an hrt while holding the
* rq->lock. So what we do is store a state in in rq->hrtick_* and ask for a
* reschedule event.
*
* When we get rescheduled we reprogram the hrtick_timer outside of the
* rq->lock.
*/
static void hrtick_clear(struct rq *rq)
{
if (hrtimer_active(&rq->hrtick_timer))
hrtimer_cancel(&rq->hrtick_timer);
}
/*
* High-resolution timer tick.
* Runs from hardirq context with interrupts disabled.
*/
static enum hrtimer_restart hrtick(struct hrtimer *timer)
{
struct rq *rq = container_of(timer, struct rq, hrtick_timer);
WARN_ON_ONCE(cpu_of(rq) != smp_processor_id());
raw_spin_lock(&rq->lock);
update_rq_clock(rq);
rq->curr->sched_class->task_tick(rq, rq->curr, 1);
raw_spin_unlock(&rq->lock);
return HRTIMER_NORESTART;
}
#ifdef CONFIG_SMP
/*
* called from hardirq (IPI) context
*/
static void __hrtick_start(void *arg)
{
struct rq *rq = arg;
struct hrtimer *timer = &rq->hrtick_timer;
ktime_t soft, hard;
unsigned long delta;
soft = hrtimer_get_softexpires(timer);
hard = hrtimer_get_expires(timer);
delta = ktime_to_ns(ktime_sub(hard, soft));
raw_spin_lock(&rq->lock);
__hrtimer_start_range_ns(timer, soft, delta, HRTIMER_MODE_ABS, 0);
rq->hrtick_csd_pending = 0;
raw_spin_unlock(&rq->lock);
}
/*
* Called to set the hrtick timer state.
*
* called with rq->lock held and irqs disabled
*/
void hrtick_start(struct rq *rq, u64 delay)
{
struct hrtimer *timer = &rq->hrtick_timer;
ktime_t time = ktime_add_ns(timer->base->get_time(), delay);
hrtimer_set_expires(timer, time);
if (rq == this_rq()) {
__hrtimer_start_range_ns(timer, ns_to_ktime(delay), 0,
HRTIMER_MODE_REL_PINNED, 0);
} else if (!rq->hrtick_csd_pending) {
__smp_call_function_single(cpu_of(rq), &rq->hrtick_csd, 0);
rq->hrtick_csd_pending = 1;
}
}
static int
hotplug_hrtick(struct notifier_block *nfb, unsigned long action, void *hcpu)
{
int cpu = (int)(long)hcpu;
switch (action) {
case CPU_UP_CANCELED:
case CPU_UP_CANCELED_FROZEN:
case CPU_DOWN_PREPARE:
case CPU_DOWN_PREPARE_FROZEN:
case CPU_DEAD:
case CPU_DEAD_FROZEN:
hrtick_clear(cpu_rq(cpu));
return NOTIFY_OK;
}
return NOTIFY_DONE;
}
static __init void init_hrtick(void)
{
hotcpu_notifier(hotplug_hrtick, 0);
}
#else
/*
* Called to set the hrtick timer state.
*
* called with rq->lock held and irqs disabled
*/
void hrtick_start(struct rq *rq, u64 delay)
{
__hrtimer_start_range_ns(&rq->hrtick_timer, ns_to_ktime(delay), 0,
HRTIMER_MODE_REL_PINNED, 0);
}
static inline void init_hrtick(void)
{
}
#endif /* CONFIG_SMP */
static void init_rq_hrtick(struct rq *rq)
{
#ifdef CONFIG_SMP
rq->hrtick_csd_pending = 0;
rq->hrtick_csd.flags = 0;
rq->hrtick_csd.func = __hrtick_start;
rq->hrtick_csd.info = rq;
#endif
hrtimer_init(&rq->hrtick_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
rq->hrtick_timer.function = hrtick;
}
#else /* CONFIG_SCHED_HRTICK */
static inline void hrtick_clear(struct rq *rq)
{
}
static inline void init_rq_hrtick(struct rq *rq)
{
}
static inline void init_hrtick(void)
{
}
#endif /* CONFIG_SCHED_HRTICK */
/*
* resched_task - mark a task 'to be rescheduled now'.
*
* On UP this means the setting of the need_resched flag, on SMP it
* might also involve a cross-CPU call to trigger the scheduler on
* the target CPU.
*/
#ifdef CONFIG_SMP
#ifndef tsk_is_polling
#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
#endif
void resched_task(struct task_struct *p)
{
int cpu;
assert_raw_spin_locked(&task_rq(p)->lock);
if (test_tsk_need_resched(p))
return;
set_tsk_need_resched(p);
cpu = task_cpu(p);
if (cpu == smp_processor_id())
return;
/* NEED_RESCHED must be visible before we test polling */
smp_mb();
if (!tsk_is_polling(p))
smp_send_reschedule(cpu);
}
void resched_cpu(int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long flags;
if (!raw_spin_trylock_irqsave(&rq->lock, flags))
return;
resched_task(cpu_curr(cpu));
raw_spin_unlock_irqrestore(&rq->lock, flags);
}
#ifdef CONFIG_NO_HZ
/*
* In the semi idle case, use the nearest busy cpu for migrating timers
* from an idle cpu. This is good for power-savings.
*
* We don't do similar optimization for completely idle system, as
* selecting an idle cpu will add more delays to the timers than intended
* (as that cpu's timer base may not be uptodate wrt jiffies etc).
*/
int get_nohz_timer_target(void)
{
int cpu = smp_processor_id();
int i;
struct sched_domain *sd;
rcu_read_lock();
for_each_domain(cpu, sd) {
for_each_cpu(i, sched_domain_span(sd)) {
if (!idle_cpu(i)) {
cpu = i;
goto unlock;
}
}
}
unlock:
rcu_read_unlock();
return cpu;
}
/*
* When add_timer_on() enqueues a timer into the timer wheel of an
* idle CPU then this timer might expire before the next timer event
* which is scheduled to wake up that CPU. In case of a completely
* idle system the next event might even be infinite time into the
* future. wake_up_idle_cpu() ensures that the CPU is woken up and
* leaves the inner idle loop so the newly added timer is taken into
* account when the CPU goes back to idle and evaluates the timer
* wheel for the next timer event.
*/
void wake_up_idle_cpu(int cpu)
{
struct rq *rq = cpu_rq(cpu);
if (cpu == smp_processor_id())
return;
/*
* This is safe, as this function is called with the timer
* wheel base lock of (cpu) held. When the CPU is on the way
* to idle and has not yet set rq->curr to idle then it will
* be serialized on the timer wheel base lock and take the new
* timer into account automatically.
*/
if (rq->curr != rq->idle)
return;
/*
* We can set TIF_RESCHED on the idle task of the other CPU
* lockless. The worst case is that the other CPU runs the
* idle task through an additional NOOP schedule()
*/
set_tsk_need_resched(rq->idle);
/* NEED_RESCHED must be visible before we test polling */
smp_mb();
if (!tsk_is_polling(rq->idle))
smp_send_reschedule(cpu);
}
static inline bool got_nohz_idle_kick(void)
{
int cpu = smp_processor_id();
if (!test_bit(NOHZ_BALANCE_KICK, nohz_flags(cpu)))
return false;
if (idle_cpu(cpu) && !need_resched())
return true;
/*
* We can't run Idle Load Balance on this CPU for this time so we
* cancel it and clear NOHZ_BALANCE_KICK
*/
clear_bit(NOHZ_BALANCE_KICK, nohz_flags(cpu));
return false;
}
#else /* CONFIG_NO_HZ */
static inline bool got_nohz_idle_kick(void)
{
return false;
}
#endif /* CONFIG_NO_HZ */
void sched_avg_update(struct rq *rq)
{
s64 period = sched_avg_period();
while ((s64)(rq->clock - rq->age_stamp) > period) {
/*
* Inline assembly required to prevent the compiler
* optimising this loop into a divmod call.
* See __iter_div_u64_rem() for another example of this.
*/
asm("" : "+rm" (rq->age_stamp));
rq->age_stamp += period;
rq->rt_avg /= 2;
}
}
#else /* !CONFIG_SMP */
void resched_task(struct task_struct *p)
{
assert_raw_spin_locked(&task_rq(p)->lock);
set_tsk_need_resched(p);
}
#endif /* CONFIG_SMP */
#if defined(CONFIG_RT_GROUP_SCHED) || (defined(CONFIG_FAIR_GROUP_SCHED) && \
(defined(CONFIG_SMP) || defined(CONFIG_CFS_BANDWIDTH)))
/*
* Iterate task_group tree rooted at *from, calling @down when first entering a
* node and @up when leaving it for the final time.
*
* Caller must hold rcu_lock or sufficient equivalent.
*/
int walk_tg_tree_from(struct task_group *from,
tg_visitor down, tg_visitor up, void *data)
{
struct task_group *parent, *child;
int ret;
parent = from;
down:
ret = (*down)(parent, data);
if (ret)
goto out;
list_for_each_entry_rcu(child, &parent->children, siblings) {
parent = child;
goto down;
up:
continue;
}
ret = (*up)(parent, data);
if (ret || parent == from)
goto out;
child = parent;
parent = parent->parent;
if (parent)
goto up;
out:
return ret;
}
int tg_nop(struct task_group *tg, void *data)
{
return 0;
}
#endif
static void set_load_weight(struct task_struct *p)
{
int prio = p->static_prio - MAX_RT_PRIO;
struct load_weight *load = &p->se.load;
/*
* SCHED_IDLE tasks get minimal weight:
*/
if (p->policy == SCHED_IDLE) {
load->weight = scale_load(WEIGHT_IDLEPRIO);
load->inv_weight = WMULT_IDLEPRIO;
return;
}
load->weight = scale_load(prio_to_weight[prio]);
load->inv_weight = prio_to_wmult[prio];
}
static void enqueue_task(struct rq *rq, struct task_struct *p, int flags)
{
update_rq_clock(rq);
sched_info_queued(p);
p->sched_class->enqueue_task(rq, p, flags);
trace_sched_enq_deq_task(p, 1);
}
static void dequeue_task(struct rq *rq, struct task_struct *p, int flags)
{
update_rq_clock(rq);
sched_info_dequeued(p);
p->sched_class->dequeue_task(rq, p, flags);
trace_sched_enq_deq_task(p, 0);
}
void activate_task(struct rq *rq, struct task_struct *p, int flags)
{
if (task_contributes_to_load(p))
rq->nr_uninterruptible--;
enqueue_task(rq, p, flags);
}
void deactivate_task(struct rq *rq, struct task_struct *p, int flags)
{
if (task_contributes_to_load(p))
rq->nr_uninterruptible++;
dequeue_task(rq, p, flags);
}
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
/*
* There are no locks covering percpu hardirq/softirq time.
* They are only modified in account_system_vtime, on corresponding CPU
* with interrupts disabled. So, writes are safe.
* They are read and saved off onto struct rq in update_rq_clock().
* This may result in other CPU reading this CPU's irq time and can
* race with irq/account_system_vtime on this CPU. We would either get old
* or new value with a side effect of accounting a slice of irq time to wrong
* task when irq is in progress while we read rq->clock. That is a worthy
* compromise in place of having locks on each irq in account_system_time.
*/
static DEFINE_PER_CPU(u64, cpu_hardirq_time);
static DEFINE_PER_CPU(u64, cpu_softirq_time);
static DEFINE_PER_CPU(u64, irq_start_time);
static int sched_clock_irqtime;
void enable_sched_clock_irqtime(void)
{
sched_clock_irqtime = 1;
}
void disable_sched_clock_irqtime(void)
{
sched_clock_irqtime = 0;
}
#ifndef CONFIG_64BIT
static DEFINE_PER_CPU(seqcount_t, irq_time_seq);
static inline void irq_time_write_begin(void)
{
__this_cpu_inc(irq_time_seq.sequence);
smp_wmb();
}
static inline void irq_time_write_end(void)
{
smp_wmb();
__this_cpu_inc(irq_time_seq.sequence);
}
static inline u64 irq_time_read(int cpu)
{
u64 irq_time;
unsigned seq;
do {
seq = read_seqcount_begin(&per_cpu(irq_time_seq, cpu));
irq_time = per_cpu(cpu_softirq_time, cpu) +
per_cpu(cpu_hardirq_time, cpu);
} while (read_seqcount_retry(&per_cpu(irq_time_seq, cpu), seq));
return irq_time;
}
#else /* CONFIG_64BIT */
static inline void irq_time_write_begin(void)
{
}
static inline void irq_time_write_end(void)
{
}
static inline u64 irq_time_read(int cpu)
{
return per_cpu(cpu_softirq_time, cpu) + per_cpu(cpu_hardirq_time, cpu);
}
#endif /* CONFIG_64BIT */
/*
* Called before incrementing preempt_count on {soft,}irq_enter
* and before decrementing preempt_count on {soft,}irq_exit.
*/
void account_system_vtime(struct task_struct *curr)
{
unsigned long flags;
s64 delta;
int cpu;
if (!sched_clock_irqtime)
return;
local_irq_save(flags);
cpu = smp_processor_id();
delta = sched_clock_cpu(cpu) - __this_cpu_read(irq_start_time);
__this_cpu_add(irq_start_time, delta);
irq_time_write_begin();
/*
* We do not account for softirq time from ksoftirqd here.
* We want to continue accounting softirq time to ksoftirqd thread
* in that case, so as not to confuse scheduler with a special task
* that do not consume any time, but still wants to run.
*/
if (hardirq_count())
__this_cpu_add(cpu_hardirq_time, delta);
else if (in_serving_softirq() && curr != this_cpu_ksoftirqd())
__this_cpu_add(cpu_softirq_time, delta);
irq_time_write_end();
local_irq_restore(flags);
}
EXPORT_SYMBOL_GPL(account_system_vtime);
#endif /* CONFIG_IRQ_TIME_ACCOUNTING */
#ifdef CONFIG_PARAVIRT
static inline u64 steal_ticks(u64 steal)
{
if (unlikely(steal > NSEC_PER_SEC))
return div_u64(steal, TICK_NSEC);
return __iter_div_u64_rem(steal, TICK_NSEC, &steal);
}
#endif
static void update_rq_clock_task(struct rq *rq, s64 delta)
{
/*
* In theory, the compile should just see 0 here, and optimize out the call
* to sched_rt_avg_update. But I don't trust it...
*/
#if defined(CONFIG_IRQ_TIME_ACCOUNTING) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING)
s64 steal = 0, irq_delta = 0;
#endif
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
irq_delta = irq_time_read(cpu_of(rq)) - rq->prev_irq_time;
/*
* Since irq_time is only updated on {soft,}irq_exit, we might run into
* this case when a previous update_rq_clock() happened inside a
* {soft,}irq region.
*
* When this happens, we stop ->clock_task and only update the
* prev_irq_time stamp to account for the part that fit, so that a next
* update will consume the rest. This ensures ->clock_task is
* monotonic.
*
* It does however cause some slight miss-attribution of {soft,}irq
* time, a more accurate solution would be to update the irq_time using
* the current rq->clock timestamp, except that would require using
* atomic ops.
*/
if (irq_delta > delta)
irq_delta = delta;
rq->prev_irq_time += irq_delta;
delta -= irq_delta;
#endif
#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
if (static_key_false((¶virt_steal_rq_enabled))) {
u64 st;
steal = paravirt_steal_clock(cpu_of(rq));
steal -= rq->prev_steal_time_rq;
if (unlikely(steal > delta))
steal = delta;
st = steal_ticks(steal);
steal = st * TICK_NSEC;
rq->prev_steal_time_rq += steal;
delta -= steal;
}
#endif
rq->clock_task += delta;
#if defined(CONFIG_IRQ_TIME_ACCOUNTING) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING)
if ((irq_delta + steal) && sched_feat(NONTASK_POWER))
sched_rt_avg_update(rq, irq_delta + steal);
#endif
}
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
static int irqtime_account_hi_update(void)
{
u64 *cpustat = kcpustat_this_cpu->cpustat;
unsigned long flags;
u64 latest_ns;
int ret = 0;
local_irq_save(flags);
latest_ns = this_cpu_read(cpu_hardirq_time);
if (nsecs_to_cputime64(latest_ns) > cpustat[CPUTIME_IRQ])
ret = 1;
local_irq_restore(flags);
return ret;
}
static int irqtime_account_si_update(void)
{
u64 *cpustat = kcpustat_this_cpu->cpustat;
unsigned long flags;
u64 latest_ns;
int ret = 0;
local_irq_save(flags);
latest_ns = this_cpu_read(cpu_softirq_time);
if (nsecs_to_cputime64(latest_ns) > cpustat[CPUTIME_SOFTIRQ])
ret = 1;
local_irq_restore(flags);
return ret;
}
#else /* CONFIG_IRQ_TIME_ACCOUNTING */
#define sched_clock_irqtime (0)
#endif
void sched_set_stop_task(int cpu, struct task_struct *stop)
{
struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
struct task_struct *old_stop = cpu_rq(cpu)->stop;
if (stop) {
/*
* Make it appear like a SCHED_FIFO task, its something
* userspace knows about and won't get confused about.
*
* Also, it will make PI more or less work without too
* much confusion -- but then, stop work should not
* rely on PI working anyway.
*/
sched_setscheduler_nocheck(stop, SCHED_FIFO, ¶m);
stop->sched_class = &stop_sched_class;
}
cpu_rq(cpu)->stop = stop;
if (old_stop) {
/*
* Reset it back to a normal scheduling class so that
* it can die in pieces.
*/
old_stop->sched_class = &rt_sched_class;
}
}
/*
* __normal_prio - return the priority that is based on the static prio
*/
static inline int __normal_prio(struct task_struct *p)
{
return p->static_prio;
}
/*
* Calculate the expected normal priority: i.e. priority
* without taking RT-inheritance into account. Might be
* boosted by interactivity modifiers. Changes upon fork,
* setprio syscalls, and whenever the interactivity
* estimator recalculates.
*/
static inline int normal_prio(struct task_struct *p)
{
int prio;
if (task_has_rt_policy(p))
prio = MAX_RT_PRIO-1 - p->rt_priority;
else
prio = __normal_prio(p);
return prio;
}
/*
* Calculate the current priority, i.e. the priority
* taken into account by the scheduler. This value might
* be boosted by RT tasks, or might be boosted by
* interactivity modifiers. Will be RT if the task got
* RT-boosted. If not then it returns p->normal_prio.
*/
static int effective_prio(struct task_struct *p)
{
p->normal_prio = normal_prio(p);
/*
* If we are RT tasks or we were boosted to RT priority,
* keep the priority unchanged. Otherwise, update priority
* to the normal priority:
*/
if (!rt_prio(p->prio))
return p->normal_prio;
return p->prio;
}
/**
* task_curr - is this task currently executing on a CPU?
* @p: the task in question.
*/
inline int task_curr(const struct task_struct *p)
{
return cpu_curr(task_cpu(p)) == p;
}
static inline void check_class_changed(struct rq *rq, struct task_struct *p,
const struct sched_class *prev_class,
int oldprio)
{
if (prev_class != p->sched_class) {
if (prev_class->switched_from)
prev_class->switched_from(rq, p);
p->sched_class->switched_to(rq, p);
} else if (oldprio != p->prio)
p->sched_class->prio_changed(rq, p, oldprio);
}
void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags)
{
const struct sched_class *class;
if (p->sched_class == rq->curr->sched_class) {
rq->curr->sched_class->check_preempt_curr(rq, p, flags);
} else {
for_each_class(class) {
if (class == rq->curr->sched_class)
break;
if (class == p->sched_class) {
resched_task(rq->curr);
break;
}
}
}
/*
* A queue event has occurred, and we're going to schedule. In
* this case, we can save a useless back to back clock update.
*/
if (rq->curr->on_rq && test_tsk_need_resched(rq->curr))
rq->skip_clock_update = 1;
}
#ifdef CONFIG_SMP
void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
{
#ifdef CONFIG_SCHED_DEBUG
/*
* We should never call set_task_cpu() on a blocked task,
* ttwu() will sort out the placement.
*/
WARN_ON_ONCE(p->state != TASK_RUNNING && p->state != TASK_WAKING &&
!(task_thread_info(p)->preempt_count & PREEMPT_ACTIVE));
#ifdef CONFIG_LOCKDEP
/*
* The caller should hold either p->pi_lock or rq->lock, when changing
* a task's CPU. ->pi_lock for waking tasks, rq->lock for runnable tasks.
*
* sched_move_task() holds both and thus holding either pins the cgroup,
* see task_group().
*
* Furthermore, all task_rq users should acquire both locks, see
* task_rq_lock().
*/
WARN_ON_ONCE(debug_locks && !(lockdep_is_held(&p->pi_lock) ||
lockdep_is_held(&task_rq(p)->lock)));
#endif
#endif
trace_sched_migrate_task(p, new_cpu);
if (task_cpu(p) != new_cpu) {
p->se.nr_migrations++;
perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, NULL, 0);
}
__set_task_cpu(p, new_cpu);
}
struct migration_arg {
struct task_struct *task;
int dest_cpu;
};
static int migration_cpu_stop(void *data);
/*
* wait_task_inactive - wait for a thread to unschedule.
*
* If @match_state is nonzero, it's the @p->state value just checked and
* not expected to change. If it changes, i.e. @p might have woken up,
* then return zero. When we succeed in waiting for @p to be off its CPU,
* we return a positive number (its total switch count). If a second call
* a short while later returns the same number, the caller can be sure that
* @p has remained unscheduled the whole time.
*
* The caller must ensure that the task *will* unschedule sometime soon,
* else this function might spin for a *long* time. This function can't
* be called with interrupts off, or it may introduce deadlock with
* smp_call_function() if an IPI is sent by the same process we are
* waiting to become inactive.
*/
unsigned long wait_task_inactive(struct task_struct *p, long match_state)
{
unsigned long flags;
int running, on_rq;
unsigned long ncsw;
struct rq *rq;
for (;;) {
/*
* We do the initial early heuristics without holding
* any task-queue locks at all. We'll only try to get
* the runqueue lock when things look like they will
* work out!
*/
rq = task_rq(p);
/*
* If the task is actively running on another CPU
* still, just relax and busy-wait without holding
* any locks.
*
* NOTE! Since we don't hold any locks, it's not
* even sure that "rq" stays as the right runqueue!
* But we don't care, since "task_running()" will
* return false if the runqueue has changed and p
* is actually now running somewhere else!
*/
while (task_running(rq, p)) {
if (match_state && unlikely(p->state != match_state))
return 0;
cpu_relax();
}
/*
* Ok, time to look more closely! We need the rq
* lock now, to be *sure*. If we're wrong, we'll
* just go back and repeat.
*/
rq = task_rq_lock(p, &flags);
trace_sched_wait_task(p);
running = task_running(rq, p);
on_rq = p->on_rq;
ncsw = 0;
if (!match_state || p->state == match_state)
ncsw = p->nvcsw | LONG_MIN; /* sets MSB */
task_rq_unlock(rq, p, &flags);
/*
* If it changed from the expected state, bail out now.
*/
if (unlikely(!ncsw))
break;
/*
* Was it really running after all now that we
* checked with the proper locks actually held?
*
* Oops. Go back and try again..
*/
if (unlikely(running)) {
cpu_relax();
continue;
}
/*
* It's not enough that it's not actively running,
* it must be off the runqueue _entirely_, and not
* preempted!
*
* So if it was still runnable (but just not actively
* running right now), it's preempted, and we should
* yield - it could be a while.
*/
if (unlikely(on_rq)) {
ktime_t to = ktime_set(0, NSEC_PER_MSEC);
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_hrtimeout(&to, HRTIMER_MODE_REL);
continue;
}
/*
* Ahh, all good. It wasn't running, and it wasn't
* runnable, which means that it will never become
* running in the future either. We're all done!
*/
break;
}
return ncsw;
}
/***
* kick_process - kick a running thread to enter/exit the kernel
* @p: the to-be-kicked thread
*
* Cause a process which is running on another CPU to enter
* kernel-mode, without any delay. (to get signals handled.)
*
* NOTE: this function doesn't have to take the runqueue lock,
* because all it wants to ensure is that the remote task enters
* the kernel. If the IPI races and the task has been migrated
* to another CPU then no harm is done and the purpose has been
* achieved as well.
*/
void kick_process(struct task_struct *p)
{
int cpu;
preempt_disable();
cpu = task_cpu(p);
if ((cpu != smp_processor_id()) && task_curr(p))
smp_send_reschedule(cpu);
preempt_enable();
}
EXPORT_SYMBOL_GPL(kick_process);
#endif /* CONFIG_SMP */
#ifdef CONFIG_SMP
/*
* ->cpus_allowed is protected by both rq->lock and p->pi_lock
*/
static int select_fallback_rq(int cpu, struct task_struct *p)
{
const struct cpumask *nodemask = cpumask_of_node(cpu_to_node(cpu));
enum { cpuset, possible, fail } state = cpuset;
int dest_cpu;
/* Look for allowed, online CPU in same node. */
for_each_cpu(dest_cpu, nodemask) {
if (!cpu_online(dest_cpu))
continue;
if (!cpu_active(dest_cpu))
continue;
if (cpumask_test_cpu(dest_cpu, tsk_cpus_allowed(p)))
return dest_cpu;
}
for (;;) {
/* Any allowed, online CPU? */
for_each_cpu(dest_cpu, tsk_cpus_allowed(p)) {
if (!cpu_online(dest_cpu))
continue;
if (!cpu_active(dest_cpu))
continue;
goto out;
}
switch (state) {
case cpuset:
/* No more Mr. Nice Guy. */
cpuset_cpus_allowed_fallback(p);
state = possible;
break;
case possible:
do_set_cpus_allowed(p, cpu_possible_mask);
state = fail;
break;
case fail:
BUG();
break;
}
}
out:
if (state != cpuset) {
/*
* Don't tell them about moving exiting tasks or
* kernel threads (both mm NULL), since they never
* leave kernel.
*/
if (p->mm && printk_ratelimit()) {
printk_sched("process %d (%s) no longer affine to cpu%d\n",
task_pid_nr(p), p->comm, cpu);
}
}
return dest_cpu;
}
/*
* The caller (fork, wakeup) owns p->pi_lock, ->cpus_allowed is stable.
*/
static inline
int select_task_rq(struct task_struct *p, int sd_flags, int wake_flags)
{
int cpu = p->sched_class->select_task_rq(p, sd_flags, wake_flags);
/*
* In order not to call set_task_cpu() on a blocking task we need
* to rely on ttwu() to place the task on a valid ->cpus_allowed
* cpu.
*
* Since this is common to all placement strategies, this lives here.
*
* [ this allows ->select_task() to simply return task_cpu(p) and
* not worry about this generic constraint ]
*/
if (unlikely(!cpumask_test_cpu(cpu, tsk_cpus_allowed(p)) ||
!cpu_online(cpu)))
cpu = select_fallback_rq(task_cpu(p), p);
return cpu;
}
static void update_avg(u64 *avg, u64 sample)
{
s64 diff = sample - *avg;
*avg += diff >> 3;
}
#endif
static void
ttwu_stat(struct task_struct *p, int cpu, int wake_flags)
{
#ifdef CONFIG_SCHEDSTATS
struct rq *rq = this_rq();
#ifdef CONFIG_SMP
int this_cpu = smp_processor_id();
if (cpu == this_cpu) {
schedstat_inc(rq, ttwu_local);
schedstat_inc(p, se.statistics.nr_wakeups_local);
} else {
struct sched_domain *sd;
schedstat_inc(p, se.statistics.nr_wakeups_remote);
rcu_read_lock();
for_each_domain(this_cpu, sd) {
if (cpumask_test_cpu(cpu, sched_domain_span(sd))) {
schedstat_inc(sd, ttwu_wake_remote);
break;
}
}
rcu_read_unlock();
}
if (wake_flags & WF_MIGRATED)
schedstat_inc(p, se.statistics.nr_wakeups_migrate);
#endif /* CONFIG_SMP */
schedstat_inc(rq, ttwu_count);
schedstat_inc(p, se.statistics.nr_wakeups);
if (wake_flags & WF_SYNC)
schedstat_inc(p, se.statistics.nr_wakeups_sync);
#endif /* CONFIG_SCHEDSTATS */
}
static void ttwu_activate(struct rq *rq, struct task_struct *p, int en_flags)
{
activate_task(rq, p, en_flags);
p->on_rq = 1;
/* if a worker is waking up, notify workqueue */
if (p->flags & PF_WQ_WORKER)
wq_worker_waking_up(p, cpu_of(rq));
}
/*
* Mark the task runnable and perform wakeup-preemption.
*/
static void
ttwu_do_wakeup(struct rq *rq, struct task_struct *p, int wake_flags)
{
trace_sched_wakeup(p, true);
check_preempt_curr(rq, p, wake_flags);
p->state = TASK_RUNNING;
#ifdef CONFIG_SMP
if (p->sched_class->task_woken)
p->sched_class->task_woken(rq, p);
if (rq->idle_stamp) {
u64 delta = rq->clock - rq->idle_stamp;
u64 max = 2*sysctl_sched_migration_cost;
update_avg(&rq->avg_idle, delta);
if (rq->avg_idle > max)
rq->avg_idle = max;
rq->idle_stamp = 0;
}
#endif
}
static void
ttwu_do_activate(struct rq *rq, struct task_struct *p, int wake_flags)
{
#ifdef CONFIG_SMP
if (p->sched_contributes_to_load)
rq->nr_uninterruptible--;
#endif
ttwu_activate(rq, p, ENQUEUE_WAKEUP | ENQUEUE_WAKING);
ttwu_do_wakeup(rq, p, wake_flags);
}
/*
* Called in case the task @p isn't fully descheduled from its runqueue,
* in this case we must do a remote wakeup. Its a 'light' wakeup though,
* since all we need to do is flip p->state to TASK_RUNNING, since
* the task is still ->on_rq.
*/
static int ttwu_remote(struct task_struct *p, int wake_flags)
{
struct rq *rq;
int ret = 0;
rq = __task_rq_lock(p);
if (p->on_rq) {
ttwu_do_wakeup(rq, p, wake_flags);
ret = 1;
}
__task_rq_unlock(rq);
return ret;
}
#ifdef CONFIG_SMP
static void sched_ttwu_pending(void)
{
struct rq *rq = this_rq();
struct llist_node *llist = llist_del_all(&rq->wake_list);
struct task_struct *p;
raw_spin_lock(&rq->lock);
while (llist) {
p = llist_entry(llist, struct task_struct, wake_entry);
llist = llist_next(llist);
ttwu_do_activate(rq, p, 0);
}
raw_spin_unlock(&rq->lock);
}
void scheduler_ipi(void)
{
if (llist_empty(&this_rq()->wake_list) && !got_nohz_idle_kick())
return;
/*
* Not all reschedule IPI handlers call irq_enter/irq_exit, since
* traditionally all their work was done from the interrupt return
* path. Now that we actually do some work, we need to make sure
* we do call them.
*
* Some archs already do call them, luckily irq_enter/exit nest
* properly.
*
* Arguably we should visit all archs and update all handlers,
* however a fair share of IPIs are still resched only so this would
* somewhat pessimize the simple resched case.
*/
irq_enter();
sched_ttwu_pending();
/*
* Check if someone kicked us for doing the nohz idle load balance.
*/
if (unlikely(got_nohz_idle_kick())) {
this_rq()->idle_balance = 1;
raise_softirq_irqoff(SCHED_SOFTIRQ);
}
irq_exit();
}
static void ttwu_queue_remote(struct task_struct *p, int cpu)
{
if (llist_add(&p->wake_entry, &cpu_rq(cpu)->wake_list))
smp_send_reschedule(cpu);
}
#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
static int ttwu_activate_remote(struct task_struct *p, int wake_flags)
{
struct rq *rq;
int ret = 0;
rq = __task_rq_lock(p);
if (p->on_cpu) {
ttwu_activate(rq, p, ENQUEUE_WAKEUP);
ttwu_do_wakeup(rq, p, wake_flags);
ret = 1;
}
__task_rq_unlock(rq);
return ret;
}
#endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */
bool cpus_share_cache(int this_cpu, int that_cpu)
{
return per_cpu(sd_llc_id, this_cpu) == per_cpu(sd_llc_id, that_cpu);
}
#endif /* CONFIG_SMP */
static void ttwu_queue(struct task_struct *p, int cpu)
{
struct rq *rq = cpu_rq(cpu);
#if defined(CONFIG_SMP)
if (sched_feat(TTWU_QUEUE) && !cpus_share_cache(smp_processor_id(), cpu)) {
sched_clock_cpu(cpu); /* sync clocks x-cpu */
ttwu_queue_remote(p, cpu);
return;
}
#endif
raw_spin_lock(&rq->lock);
ttwu_do_activate(rq, p, 0);
raw_spin_unlock(&rq->lock);
}
/**
* try_to_wake_up - wake up a thread
* @p: the thread to be awakened
* @state: the mask of task states that can be woken
* @wake_flags: wake modifier flags (WF_*)
*
* Put it on the run-queue if it's not already there. The "current"
* thread is always on the run-queue (except when the actual
* re-schedule is in progress), and as such you're allowed to do
* the simpler "current->state = TASK_RUNNING" to mark yourself
* runnable without the overhead of this.
*
* Returns %true if @p was woken up, %false if it was already running
* or @state didn't match @p's state.
*/
static int
try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
{
unsigned long flags;
int cpu, success = 0;
unsigned long src_cpu;
int notify = 0;
smp_wmb();
raw_spin_lock_irqsave(&p->pi_lock, flags);
src_cpu = cpu = task_cpu(p);
if (!(p->state & state))
goto out;
success = 1; /* we're going to change ->state */
if (p->on_rq && ttwu_remote(p, wake_flags))
goto stat;
#ifdef CONFIG_SMP
/*
* If the owning (remote) cpu is still in the middle of schedule() with
* this task as prev, wait until its done referencing the task.
*/
while (p->on_cpu) {
#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
/*
* In case the architecture enables interrupts in
* context_switch(), we cannot busy wait, since that
* would lead to deadlocks when an interrupt hits and
* tries to wake up @prev. So bail and do a complete
* remote wakeup.
*/
if (ttwu_activate_remote(p, wake_flags))
goto stat;
#else
cpu_relax();
#endif
}
/*
* Pairs with the smp_wmb() in finish_lock_switch().
*/
smp_rmb();
p->sched_contributes_to_load = !!task_contributes_to_load(p);
p->state = TASK_WAKING;
if (p->sched_class->task_waking)
p->sched_class->task_waking(p);
cpu = select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
/* Refresh src_cpu as it could have changed since we last read it */
src_cpu = task_cpu(p);
if (src_cpu != cpu) {
wake_flags |= WF_MIGRATED;
set_task_cpu(p, cpu);
}
#endif /* CONFIG_SMP */
ttwu_queue(p, cpu);
stat:
ttwu_stat(p, cpu, wake_flags);
if (src_cpu != cpu && task_notify_on_migrate(p))
notify = 1;
out:
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
if (notify)
atomic_notifier_call_chain(&migration_notifier_head,
cpu, (void *)src_cpu);
return success;
}
/**
* try_to_wake_up_local - try to wake up a local task with rq lock held
* @p: the thread to be awakened
*
* Put @p on the run-queue if it's not already there. The caller must
* ensure that this_rq() is locked, @p is bound to this_rq() and not
* the current task.
*/
static void try_to_wake_up_local(struct task_struct *p)
{
struct rq *rq = task_rq(p);
if (rq != this_rq() || p == current) {
printk_sched("%s: Failed to wakeup task %d (%s), rq = %p, this_rq = %p, p = %p, current = %p\n",
__func__, task_pid_nr(p), p->comm, rq,
this_rq(), p, current);
return;
}
lockdep_assert_held(&rq->lock);
if (!raw_spin_trylock(&p->pi_lock)) {
raw_spin_unlock(&rq->lock);
raw_spin_lock(&p->pi_lock);
raw_spin_lock(&rq->lock);
}
if (!(p->state & TASK_NORMAL))
goto out;
if (!p->on_rq)
ttwu_activate(rq, p, ENQUEUE_WAKEUP);
ttwu_do_wakeup(rq, p, 0);
ttwu_stat(p, smp_processor_id(), 0);
out:
raw_spin_unlock(&p->pi_lock);
}
/**
* wake_up_process - Wake up a specific process
* @p: The process to be woken up.
*
* Attempt to wake up the nominated process and move it to the set of runnable
* processes. Returns 1 if the process was woken up, 0 if it was already
* running.
*
* It may be assumed that this function implies a write memory barrier before
* changing the task state if and only if any tasks are woken up.
*/
int wake_up_process(struct task_struct *p)
{
return try_to_wake_up(p, TASK_ALL, 0);
}
EXPORT_SYMBOL(wake_up_process);
int wake_up_state(struct task_struct *p, unsigned int state)
{
return try_to_wake_up(p, state, 0);
}
/*
* Perform scheduler related setup for a newly forked process p.
* p is forked by current.
*
* __sched_fork() is basic setup used by init_idle() too:
*/
static void __sched_fork(struct task_struct *p)
{
p->on_rq = 0;
p->se.on_rq = 0;
p->se.exec_start = 0;
p->se.sum_exec_runtime = 0;
p->se.prev_sum_exec_runtime = 0;
p->se.nr_migrations = 0;
p->se.vruntime = 0;
INIT_LIST_HEAD(&p->se.group_node);
#ifdef CONFIG_SCHEDSTATS
memset(&p->se.statistics, 0, sizeof(p->se.statistics));
#endif
INIT_LIST_HEAD(&p->rt.run_list);
#ifdef CONFIG_PREEMPT_NOTIFIERS
INIT_HLIST_HEAD(&p->preempt_notifiers);
#endif
}
/*
* fork()/clone()-time setup:
*/
void sched_fork(struct task_struct *p)
{
unsigned long flags;
int cpu = get_cpu();
__sched_fork(p);
/*
* We mark the process as running here. This guarantees that
* nobody will actually run it, and a signal or other external
* event cannot wake it up and insert it on the runqueue either.
*/
p->state = TASK_RUNNING;
/*
* Make sure we do not leak PI boosting priority to the child.
*/
p->prio = current->normal_prio;
/*
* Revert to default priority/policy on fork if requested.
*/
if (unlikely(p->sched_reset_on_fork)) {
if (task_has_rt_policy(p)) {
p->policy = SCHED_NORMAL;
p->static_prio = NICE_TO_PRIO(0);
p->rt_priority = 0;
} else if (PRIO_TO_NICE(p->static_prio) < 0)
p->static_prio = NICE_TO_PRIO(0);
p->prio = p->normal_prio = __normal_prio(p);
set_load_weight(p);
/*
* We don't need the reset flag anymore after the fork. It has
* fulfilled its duty:
*/
p->sched_reset_on_fork = 0;
}
if (!rt_prio(p->prio))
p->sched_class = &fair_sched_class;
if (p->sched_class->task_fork)
p->sched_class->task_fork(p);
/*
* The child is not yet in the pid-hash so no cgroup attach races,
* and the cgroup is pinned to this child due to cgroup_fork()
* is ran before sched_fork().
*
* Silence PROVE_RCU.
*/
raw_spin_lock_irqsave(&p->pi_lock, flags);
set_task_cpu(p, cpu);
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
if (likely(sched_info_on()))
memset(&p->sched_info, 0, sizeof(p->sched_info));
#endif
#if defined(CONFIG_SMP)
p->on_cpu = 0;
#endif
#ifdef CONFIG_PREEMPT_COUNT
/* Want to start with kernel preemption disabled. */
task_thread_info(p)->preempt_count = 1;
#endif
#ifdef CONFIG_SMP
plist_node_init(&p->pushable_tasks, MAX_PRIO);
#endif
put_cpu();
}
/*
* wake_up_new_task - wake up a newly created task for the first time.
*
* This function will do some initial scheduler statistics housekeeping
* that must be done for every newly created context, then puts the task
* on the runqueue and wakes it.
*/
void wake_up_new_task(struct task_struct *p)
{
unsigned long flags;
struct rq *rq;
raw_spin_lock_irqsave(&p->pi_lock, flags);
#ifdef CONFIG_SMP
/*
* Fork balancing, do it here and not earlier because:
* - cpus_allowed can change in the fork path
* - any previously selected cpu might disappear through hotplug
*/
set_task_cpu(p, select_task_rq(p, SD_BALANCE_FORK, 0));
#endif
rq = __task_rq_lock(p);
activate_task(rq, p, 0);
p->on_rq = 1;
trace_sched_wakeup_new(p, true);
check_preempt_curr(rq, p, WF_FORK);
#ifdef CONFIG_SMP
if (p->sched_class->task_woken)
p->sched_class->task_woken(rq, p);
#endif
task_rq_unlock(rq, p, &flags);
}
#ifdef CONFIG_PREEMPT_NOTIFIERS
/**
* preempt_notifier_register - tell me when current is being preempted & rescheduled
* @notifier: notifier struct to register
*/
void preempt_notifier_register(struct preempt_notifier *notifier)
{
hlist_add_head(¬ifier->link, ¤t->preempt_notifiers);
}
EXPORT_SYMBOL_GPL(preempt_notifier_register);
/**
* preempt_notifier_unregister - no longer interested in preemption notifications
* @notifier: notifier struct to unregister
*
* This is safe to call from within a preemption notifier.
*/
void preempt_notifier_unregister(struct preempt_notifier *notifier)
{
hlist_del(¬ifier->link);
}
EXPORT_SYMBOL_GPL(preempt_notifier_unregister);
static void fire_sched_in_preempt_notifiers(struct task_struct *curr)
{
struct preempt_notifier *notifier;
struct hlist_node *node;
hlist_for_each_entry(notifier, node, &curr->preempt_notifiers, link)
notifier->ops->sched_in(notifier, raw_smp_processor_id());
}
static void
fire_sched_out_preempt_notifiers(struct task_struct *curr,
struct task_struct *next)
{
struct preempt_notifier *notifier;
struct hlist_node *node;
hlist_for_each_entry(notifier, node, &curr->preempt_notifiers, link)
notifier->ops->sched_out(notifier, next);
}
#else /* !CONFIG_PREEMPT_NOTIFIERS */
static void fire_sched_in_preempt_notifiers(struct task_struct *curr)
{
}
static void
fire_sched_out_preempt_notifiers(struct task_struct *curr,
struct task_struct *next)
{
}
#endif /* CONFIG_PREEMPT_NOTIFIERS */
/**
* prepare_task_switch - prepare to switch tasks
* @rq: the runqueue preparing to switch
* @prev: the current task that is being switched out
* @next: the task we are going to switch to.
*
* This is called with the rq lock held and interrupts off. It must
* be paired with a subsequent finish_task_switch after the context
* switch.
*
* prepare_task_switch sets up locking and calls architecture specific
* hooks.
*/
static inline void
prepare_task_switch(struct rq *rq, struct task_struct *prev,
struct task_struct *next)
{
sched_info_switch(prev, next);
perf_event_task_sched_out(prev, next);
fire_sched_out_preempt_notifiers(prev, next);
prepare_lock_switch(rq, next);
prepare_arch_switch(next);
trace_sched_switch(prev, next);
}
/**
* finish_task_switch - clean up after a task-switch
* @rq: runqueue associated with task-switch
* @prev: the thread we just switched away from.
*
* finish_task_switch must be called after the context switch, paired
* with a prepare_task_switch call before the context switch.
* finish_task_switch will reconcile locking set up by prepare_task_switch,
* and do any other architecture-specific cleanup actions.
*
* Note that we may have delayed dropping an mm in context_switch(). If
* so, we finish that here outside of the runqueue lock. (Doing it
* with the lock held can cause deadlocks; see schedule() for
* details.)
*/
static void finish_task_switch(struct rq *rq, struct task_struct *prev)
__releases(rq->lock)
{
struct mm_struct *mm = rq->prev_mm;
long prev_state;
rq->prev_mm = NULL;
/*
* A task struct has one reference for the use as "current".
* If a task dies, then it sets TASK_DEAD in tsk->state and calls
* schedule one last time. The schedule call will never return, and
* the scheduled task must drop that reference.
* The test for TASK_DEAD must occur while the runqueue locks are
* still held, otherwise prev could be scheduled on another cpu, die
* there before we look at prev->state, and then the reference would
* be dropped twice.
* Manfred Spraul <manfred@colorfullife.com>
*/
prev_state = prev->state;
finish_arch_switch(prev);
#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
local_irq_disable();
#endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */
perf_event_task_sched_in(prev, current);
#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
local_irq_enable();
#endif /* __ARCH_WANT_INTERRUPTS_ON_CTXSW */
finish_lock_switch(rq, prev);
finish_arch_post_lock_switch();
fire_sched_in_preempt_notifiers(current);
if (mm)
mmdrop(mm);
if (unlikely(prev_state == TASK_DEAD)) {
/*
* Remove function-return probe instances associated with this
* task and put them back on the free list.
*/
kprobe_flush_task(prev);
put_task_struct(prev);
}
}
#ifdef CONFIG_SMP
/* assumes rq->lock is held */
static inline void pre_schedule(struct rq *rq, struct task_struct *prev)
{
if (prev->sched_class->pre_schedule)
prev->sched_class->pre_schedule(rq, prev);
}
/* rq->lock is NOT held, but preemption is disabled */
static inline void post_schedule(struct rq *rq)
{
if (rq->post_schedule) {
unsigned long flags;
raw_spin_lock_irqsave(&rq->lock, flags);
if (rq->curr->sched_class->post_schedule)
rq->curr->sched_class->post_schedule(rq);
raw_spin_unlock_irqrestore(&rq->lock, flags);
rq->post_schedule = 0;
}
}
#else
static inline void pre_schedule(struct rq *rq, struct task_struct *p)
{
}
static inline void post_schedule(struct rq *rq)
{
}
#endif
/**
* schedule_tail - first thing a freshly forked thread must call.
* @prev: the thread we just switched away from.
*/
asmlinkage void schedule_tail(struct task_struct *prev)
__releases(rq->lock)
{
struct rq *rq = this_rq();
finish_task_switch(rq, prev);
/*
* FIXME: do we need to worry about rq being invalidated by the
* task_switch?
*/
post_schedule(rq);
#ifdef __ARCH_WANT_UNLOCKED_CTXSW
/* In this case, finish_task_switch does not reenable preemption */
preempt_enable();
#endif
if (current->set_child_tid)
put_user(task_pid_vnr(current), current->set_child_tid);
}
/*
* context_switch - switch to the new MM and the new
* thread's register state.
*/
static inline void
context_switch(struct rq *rq, struct task_struct *prev,
struct task_struct *next)
{
struct mm_struct *mm, *oldmm;
prepare_task_switch(rq, prev, next);
mm = next->mm;
oldmm = prev->active_mm;
/*
* For paravirt, this is coupled with an exit in switch_to to
* combine the page table reload and the switch backend into
* one hypercall.
*/
arch_start_context_switch(prev);
if (!mm) {
next->active_mm = oldmm;
atomic_inc(&oldmm->mm_count);
enter_lazy_tlb(oldmm, next);
} else
switch_mm(oldmm, mm, next);
if (!prev->mm) {
prev->active_mm = NULL;
rq->prev_mm = oldmm;
}
/*
* Since the runqueue lock will be released by the next
* task (which is an invalid locking op but in the case
* of the scheduler it's an obvious special-case), so we
* do an early lockdep release here:
*/
#ifndef __ARCH_WANT_UNLOCKED_CTXSW
spin_release(&rq->lock.dep_map, 1, _THIS_IP_);
#endif
/* Here we just switch the register state and the stack. */
switch_to(prev, next, prev);
barrier();
/*
* this_rq must be evaluated again because prev may have moved
* CPUs since it called schedule(), thus the 'rq' on its stack
* frame will be invalid.
*/
finish_task_switch(this_rq(), prev);
}
/*
* nr_running, nr_uninterruptible and nr_context_switches:
*
* externally visible scheduler statistics: current number of runnable
* threads, current number of uninterruptible-sleeping threads, total
* number of context switches performed since bootup.
*/
unsigned long nr_running(void)
{
unsigned long i, sum = 0;
for_each_online_cpu(i)
sum += cpu_rq(i)->nr_running;
return sum;
}
unsigned long nr_uninterruptible(void)
{
unsigned long i, sum = 0;
for_each_possible_cpu(i)
sum += cpu_rq(i)->nr_uninterruptible;
/*
* Since we read the counters lockless, it might be slightly
* inaccurate. Do not allow it to go below zero though:
*/
if (unlikely((long)sum < 0))
sum = 0;
return sum;
}
unsigned long long nr_context_switches(void)
{
int i;
unsigned long long sum = 0;
for_each_possible_cpu(i)
sum += cpu_rq(i)->nr_switches;
return sum;
}
unsigned long nr_iowait(void)
{
unsigned long i, sum = 0;
for_each_possible_cpu(i)
sum += atomic_read(&cpu_rq(i)->nr_iowait);
return sum;
}
unsigned long nr_iowait_cpu(int cpu)
{
struct rq *this = cpu_rq(cpu);
return atomic_read(&this->nr_iowait);
}
unsigned long this_cpu_load(void)
{
struct rq *this = this_rq();
return this->cpu_load[0];
}
#if defined(CONFIG_INTELLI_PLUG) || defined(CONFIG_FAST_HOTPLUG)
unsigned long avg_nr_running(void)
{
unsigned long i, sum = 0;
unsigned int seqcnt, ave_nr_running;
for_each_online_cpu(i) {
struct nr_stats_s *stats = &per_cpu(runqueue_stats, i);
struct rq *q = cpu_rq(i);
/*
* Update average to avoid reading stalled value if there were
* no run-queue changes for a long time. On the other hand if
* the changes are happening right now, just read current value
* directly.
*/
seqcnt = read_seqcount_begin(&stats->ave_seqcnt);
ave_nr_running = do_avg_nr_running(q);
if (read_seqcount_retry(&stats->ave_seqcnt, seqcnt)) {
read_seqcount_begin(&stats->ave_seqcnt);
ave_nr_running = stats->ave_nr_running;
}
sum += ave_nr_running;
}
return sum;
}
EXPORT_SYMBOL(avg_nr_running);
unsigned long avg_cpu_nr_running(unsigned int cpu)
{
unsigned int seqcnt, ave_nr_running;
struct nr_stats_s *stats = &per_cpu(runqueue_stats, cpu);
struct rq *q = cpu_rq(cpu);
/*
* Update average to avoid reading stalled value if there were
* no run-queue changes for a long time. On the other hand if
* the changes are happening right now, just read current value
* directly.
*/
seqcnt = read_seqcount_begin(&stats->ave_seqcnt);
ave_nr_running = do_avg_nr_running(q);
if (read_seqcount_retry(&stats->ave_seqcnt, seqcnt)) {
read_seqcount_begin(&stats->ave_seqcnt);
ave_nr_running = stats->ave_nr_running;
}
return ave_nr_running;
}
EXPORT_SYMBOL(avg_cpu_nr_running);
#endif
/* Variables and functions for calc_load */
static atomic_long_t calc_load_tasks;
static unsigned long calc_load_update;
unsigned long avenrun[3];
EXPORT_SYMBOL(avenrun);
static long calc_load_fold_active(struct rq *this_rq)
{
long nr_active, delta = 0;
nr_active = this_rq->nr_running;
nr_active += (long) this_rq->nr_uninterruptible;
if (nr_active != this_rq->calc_load_active) {
delta = nr_active - this_rq->calc_load_active;
this_rq->calc_load_active = nr_active;
}
return delta;
}
static unsigned long
calc_load(unsigned long load, unsigned long exp, unsigned long active)
{
load *= exp;
load += active * (FIXED_1 - exp);
load += 1UL << (FSHIFT - 1);
return load >> FSHIFT;
}
#ifdef CONFIG_NO_HZ
/*
* For NO_HZ we delay the active fold to the next LOAD_FREQ update.
*
* When making the ILB scale, we should try to pull this in as well.
*/
static atomic_long_t calc_load_tasks_idle;
void calc_load_account_idle(struct rq *this_rq)
{
long delta;
delta = calc_load_fold_active(this_rq);
if (delta)
atomic_long_add(delta, &calc_load_tasks_idle);
}
static long calc_load_fold_idle(void)
{
long delta = 0;
/*
* Its got a race, we don't care...
*/
if (atomic_long_read(&calc_load_tasks_idle))
delta = atomic_long_xchg(&calc_load_tasks_idle, 0);
return delta;
}
/**
* fixed_power_int - compute: x^n, in O(log n) time
*
* @x: base of the power
* @frac_bits: fractional bits of @x
* @n: power to raise @x to.
*
* By exploiting the relation between the definition of the natural power
* function: x^n := x*x*...*x (x multiplied by itself for n times), and
* the binary encoding of numbers used by computers: n := \Sum n_i * 2^i,
* (where: n_i \elem {0, 1}, the binary vector representing n),
* we find: x^n := x^(\Sum n_i * 2^i) := \Prod x^(n_i * 2^i), which is
* of course trivially computable in O(log_2 n), the length of our binary
* vector.
*/
static unsigned long
fixed_power_int(unsigned long x, unsigned int frac_bits, unsigned int n)
{
unsigned long result = 1UL << frac_bits;
if (n) for (;;) {
if (n & 1) {
result *= x;
result += 1UL << (frac_bits - 1);
result >>= frac_bits;
}
n >>= 1;
if (!n)
break;
x *= x;
x += 1UL << (frac_bits - 1);
x >>= frac_bits;
}
return result;
}
/*
* a1 = a0 * e + a * (1 - e)
*
* a2 = a1 * e + a * (1 - e)
* = (a0 * e + a * (1 - e)) * e + a * (1 - e)
* = a0 * e^2 + a * (1 - e) * (1 + e)
*
* a3 = a2 * e + a * (1 - e)
* = (a0 * e^2 + a * (1 - e) * (1 + e)) * e + a * (1 - e)
* = a0 * e^3 + a * (1 - e) * (1 + e + e^2)
*
* ...
*
* an = a0 * e^n + a * (1 - e) * (1 + e + ... + e^n-1) [1]
* = a0 * e^n + a * (1 - e) * (1 - e^n)/(1 - e)
* = a0 * e^n + a * (1 - e^n)
*
* [1] application of the geometric series:
*
* n 1 - x^(n+1)
* S_n := \Sum x^i = -------------
* i=0 1 - x
*/
static unsigned long
calc_load_n(unsigned long load, unsigned long exp,
unsigned long active, unsigned int n)
{
return calc_load(load, fixed_power_int(exp, FSHIFT, n), active);
}
/*
* NO_HZ can leave us missing all per-cpu ticks calling
* calc_load_account_active(), but since an idle CPU folds its delta into
* calc_load_tasks_idle per calc_load_account_idle(), all we need to do is fold
* in the pending idle delta if our idle period crossed a load cycle boundary.
*
* Once we've updated the global active value, we need to apply the exponential
* weights adjusted to the number of cycles missed.
*/
static void calc_global_nohz(void)
{
long delta, active, n;
/*
* If we crossed a calc_load_update boundary, make sure to fold
* any pending idle changes, the respective CPUs might have
* missed the tick driven calc_load_account_active() update
* due to NO_HZ.
*/
delta = calc_load_fold_idle();
if (delta)
atomic_long_add(delta, &calc_load_tasks);
/*
* It could be the one fold was all it took, we done!
*/
if (time_before(jiffies, calc_load_update + 10))
return;
/*
* Catch-up, fold however many we are behind still
*/
delta = jiffies - calc_load_update - 10;
n = 1 + (delta / LOAD_FREQ);
active = atomic_long_read(&calc_load_tasks);
active = active > 0 ? active * FIXED_1 : 0;
avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n);
avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n);
avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n);
calc_load_update += n * LOAD_FREQ;
}
#else
void calc_load_account_idle(struct rq *this_rq)
{
}
static inline long calc_load_fold_idle(void)
{
return 0;
}
static void calc_global_nohz(void)
{
}
#endif
/**
* get_avenrun - get the load average array
* @loads: pointer to dest load array
* @offset: offset to add
* @shift: shift count to shift the result left
*
* These values are estimates at best, so no need for locking.
*/
void get_avenrun(unsigned long *loads, unsigned long offset, int shift)
{
loads[0] = (avenrun[0] + offset) << shift;
loads[1] = (avenrun[1] + offset) << shift;
loads[2] = (avenrun[2] + offset) << shift;
}
/*
* calc_load - update the avenrun load estimates 10 ticks after the
* CPUs have updated calc_load_tasks.
*/
void calc_global_load(unsigned long ticks)
{
long active;
if (time_before(jiffies, calc_load_update + 10))
return;
active = atomic_long_read(&calc_load_tasks);
active = active > 0 ? active * FIXED_1 : 0;
avenrun[0] = calc_load(avenrun[0], EXP_1, active);
avenrun[1] = calc_load(avenrun[1], EXP_5, active);
avenrun[2] = calc_load(avenrun[2], EXP_15, active);
calc_load_update += LOAD_FREQ;
/*
* Account one period with whatever state we found before
* folding in the nohz state and ageing the entire idle period.
*
* This avoids loosing a sample when we go idle between
* calc_load_account_active() (10 ticks ago) and now and thus
* under-accounting.
*/
calc_global_nohz();
}
/*
* Called from update_cpu_load() to periodically update this CPU's
* active count.
*/
static void calc_load_account_active(struct rq *this_rq)
{
long delta;
if (time_before(jiffies, this_rq->calc_load_update))
return;
delta = calc_load_fold_active(this_rq);
delta += calc_load_fold_idle();
if (delta)
atomic_long_add(delta, &calc_load_tasks);
this_rq->calc_load_update += LOAD_FREQ;
}
/*
* The exact cpuload at various idx values, calculated at every tick would be
* load = (2^idx - 1) / 2^idx * load + 1 / 2^idx * cur_load
*
* If a cpu misses updates for n-1 ticks (as it was idle) and update gets called
* on nth tick when cpu may be busy, then we have:
* load = ((2^idx - 1) / 2^idx)^(n-1) * load
* load = (2^idx - 1) / 2^idx) * load + 1 / 2^idx * cur_load
*
* decay_load_missed() below does efficient calculation of
* load = ((2^idx - 1) / 2^idx)^(n-1) * load
* avoiding 0..n-1 loop doing load = ((2^idx - 1) / 2^idx) * load
*
* The calculation is approximated on a 128 point scale.
* degrade_zero_ticks is the number of ticks after which load at any
* particular idx is approximated to be zero.
* degrade_factor is a precomputed table, a row for each load idx.
* Each column corresponds to degradation factor for a power of two ticks,
* based on 128 point scale.
* Example:
* row 2, col 3 (=12) says that the degradation at load idx 2 after
* 8 ticks is 12/128 (which is an approximation of exact factor 3^8/4^8).
*
* With this power of 2 load factors, we can degrade the load n times
* by looking at 1 bits in n and doing as many mult/shift instead of
* n mult/shifts needed by the exact degradation.
*/
#define DEGRADE_SHIFT 7
static const unsigned char
degrade_zero_ticks[CPU_LOAD_IDX_MAX] = {0, 8, 32, 64, 128};
static const unsigned char
degrade_factor[CPU_LOAD_IDX_MAX][DEGRADE_SHIFT + 1] = {
{0, 0, 0, 0, 0, 0, 0, 0},
{64, 32, 8, 0, 0, 0, 0, 0},
{96, 72, 40, 12, 1, 0, 0},
{112, 98, 75, 43, 15, 1, 0},
{120, 112, 98, 76, 45, 16, 2} };
/*
* Update cpu_load for any missed ticks, due to tickless idle. The backlog
* would be when CPU is idle and so we just decay the old load without
* adding any new load.
*/
static unsigned long
decay_load_missed(unsigned long load, unsigned long missed_updates, int idx)
{
int j = 0;
if (!missed_updates)
return load;
if (missed_updates >= degrade_zero_ticks[idx])
return 0;
if (idx == 1)
return load >> missed_updates;
while (missed_updates) {
if (missed_updates % 2)
load = (load * degrade_factor[idx][j]) >> DEGRADE_SHIFT;
missed_updates >>= 1;
j++;
}
return load;
}
/*
* Update rq->cpu_load[] statistics. This function is usually called every
* scheduler tick (TICK_NSEC). With tickless idle this will not be called
* every tick. We fix it up based on jiffies.
*/
static void __update_cpu_load(struct rq *this_rq, unsigned long this_load,
unsigned long pending_updates)
{
int i, scale;
this_rq->nr_load_updates++;
/* Update our load: */
this_rq->cpu_load[0] = this_load; /* Fasttrack for idx 0 */
for (i = 1, scale = 2; i < CPU_LOAD_IDX_MAX; i++, scale += scale) {
unsigned long old_load, new_load;
/* scale is effectively 1 << i now, and >> i divides by scale */
old_load = this_rq->cpu_load[i];
old_load = decay_load_missed(old_load, pending_updates - 1, i);
new_load = this_load;
/*
* Round up the averaging division if load is increasing. This
* prevents us from getting stuck on 9 if the load is 10, for
* example.
*/
if (new_load > old_load)
new_load += scale - 1;
this_rq->cpu_load[i] = (old_load * (scale - 1) + new_load) >> i;
}
sched_avg_update(this_rq);
}
#ifdef CONFIG_NO_HZ
/*
* There is no sane way to deal with nohz on smp when using jiffies because the
* cpu doing the jiffies update might drift wrt the cpu doing the jiffy reading
* causing off-by-one errors in observed deltas; {0,2} instead of {1,1}.
*
* Therefore we cannot use the delta approach from the regular tick since that
* would seriously skew the load calculation. However we'll make do for those
* updates happening while idle (nohz_idle_balance) or coming out of idle
* (tick_nohz_idle_exit).
*
* This means we might still be one tick off for nohz periods.
*/
/*
* Called from nohz_idle_balance() to update the load ratings before doing the
* idle balance.
*/
void update_idle_cpu_load(struct rq *this_rq)
{
unsigned long curr_jiffies = ACCESS_ONCE(jiffies);
unsigned long load = this_rq->load.weight;
unsigned long pending_updates;
/*
* bail if there's load or we're actually up-to-date.
*/
if (load || curr_jiffies == this_rq->last_load_update_tick)
return;
pending_updates = curr_jiffies - this_rq->last_load_update_tick;
this_rq->last_load_update_tick = curr_jiffies;
__update_cpu_load(this_rq, load, pending_updates);
}
/*
* Called from tick_nohz_idle_exit() -- try and fix up the ticks we missed.
*/
void update_cpu_load_nohz(void)
{
struct rq *this_rq = this_rq();
unsigned long curr_jiffies = ACCESS_ONCE(jiffies);
unsigned long pending_updates;
if (curr_jiffies == this_rq->last_load_update_tick)
return;
raw_spin_lock(&this_rq->lock);
pending_updates = curr_jiffies - this_rq->last_load_update_tick;
if (pending_updates) {
this_rq->last_load_update_tick = curr_jiffies;
/*
* We were idle, this means load 0, the current load might be
* !0 due to remote wakeups and the sort.
*/
__update_cpu_load(this_rq, 0, pending_updates);
}
raw_spin_unlock(&this_rq->lock);
}
#endif /* CONFIG_NO_HZ */
/*
* Called from scheduler_tick()
*/
static void update_cpu_load_active(struct rq *this_rq)
{
/*
* See the mess around update_idle_cpu_load() / update_cpu_load_nohz().
*/
this_rq->last_load_update_tick = jiffies;
__update_cpu_load(this_rq, this_rq->load.weight, 1);
calc_load_account_active(this_rq);
}
#ifdef CONFIG_SMP
/*
* sched_exec - execve() is a valuable balancing opportunity, because at
* this point the task has the smallest effective memory and cache footprint.
*/
void sched_exec(void)
{
struct task_struct *p = current;
unsigned long flags;
int dest_cpu;
raw_spin_lock_irqsave(&p->pi_lock, flags);
dest_cpu = p->sched_class->select_task_rq(p, SD_BALANCE_EXEC, 0);
if (dest_cpu == smp_processor_id())
goto unlock;
if (likely(cpu_active(dest_cpu))) {
struct migration_arg arg = { p, dest_cpu };
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
stop_one_cpu(task_cpu(p), migration_cpu_stop, &arg);
return;
}
unlock:
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
}
#endif
DEFINE_PER_CPU(struct kernel_stat, kstat);
DEFINE_PER_CPU(struct kernel_cpustat, kernel_cpustat);
EXPORT_PER_CPU_SYMBOL(kstat);
EXPORT_PER_CPU_SYMBOL(kernel_cpustat);
/*
* Return any ns on the sched_clock that have not yet been accounted in
* @p in case that task is currently running.
*
* Called with task_rq_lock() held on @rq.
*/
static u64 do_task_delta_exec(struct task_struct *p, struct rq *rq)
{
u64 ns = 0;
if (task_current(rq, p)) {
update_rq_clock(rq);
ns = rq->clock_task - p->se.exec_start;
if ((s64)ns < 0)
ns = 0;
}
return ns;
}
unsigned long long task_delta_exec(struct task_struct *p)
{
unsigned long flags;
struct rq *rq;
u64 ns = 0;
rq = task_rq_lock(p, &flags);
ns = do_task_delta_exec(p, rq);
task_rq_unlock(rq, p, &flags);
return ns;
}
/*
* Return accounted runtime for the task.
* In case the task is currently running, return the runtime plus current's
* pending runtime that have not been accounted yet.
*/
unsigned long long task_sched_runtime(struct task_struct *p)
{
unsigned long flags;
struct rq *rq;
u64 ns = 0;
rq = task_rq_lock(p, &flags);
ns = p->se.sum_exec_runtime + do_task_delta_exec(p, rq);
task_rq_unlock(rq, p, &flags);
return ns;
}
#ifdef CONFIG_CGROUP_CPUACCT
struct cgroup_subsys cpuacct_subsys;
struct cpuacct root_cpuacct;
#endif
static inline void task_group_account_field(struct task_struct *p, int index,
u64 tmp)
{
#ifdef CONFIG_CGROUP_CPUACCT
struct kernel_cpustat *kcpustat;
struct cpuacct *ca;
#endif
/*
* Since all updates are sure to touch the root cgroup, we
* get ourselves ahead and touch it first. If the root cgroup
* is the only cgroup, then nothing else should be necessary.
*
*/
__get_cpu_var(kernel_cpustat).cpustat[index] += tmp;
#ifdef CONFIG_CGROUP_CPUACCT
if (unlikely(!cpuacct_subsys.active))
return;
rcu_read_lock();
ca = task_ca(p);
while (ca && (ca != &root_cpuacct)) {
kcpustat = this_cpu_ptr(ca->cpustat);
kcpustat->cpustat[index] += tmp;
ca = parent_ca(ca);
}
rcu_read_unlock();
#endif
}
/*
* Account user cpu time to a process.
* @p: the process that the cpu time gets accounted to
* @cputime: the cpu time spent in user space since the last update
* @cputime_scaled: cputime scaled by cpu frequency
*/
void account_user_time(struct task_struct *p, cputime_t cputime,
cputime_t cputime_scaled)
{
int index;
/* Add user time to process. */
p->utime += cputime;
p->utimescaled += cputime_scaled;
account_group_user_time(p, cputime);
index = (TASK_NICE(p) > 0) ? CPUTIME_NICE : CPUTIME_USER;
/* Add user time to cpustat. */
task_group_account_field(p, index, (__force u64) cputime);
/* Account for user time used */
acct_update_integrals(p);
}
/*
* Account guest cpu time to a process.
* @p: the process that the cpu time gets accounted to
* @cputime: the cpu time spent in virtual machine since the last update
* @cputime_scaled: cputime scaled by cpu frequency
*/
static void account_guest_time(struct task_struct *p, cputime_t cputime,
cputime_t cputime_scaled)
{
u64 *cpustat = kcpustat_this_cpu->cpustat;
/* Add guest time to process. */
p->utime += cputime;
p->utimescaled += cputime_scaled;
account_group_user_time(p, cputime);
p->gtime += cputime;
/* Add guest time to cpustat. */
if (TASK_NICE(p) > 0) {
cpustat[CPUTIME_NICE] += (__force u64) cputime;
cpustat[CPUTIME_GUEST_NICE] += (__force u64) cputime;
} else {
cpustat[CPUTIME_USER] += (__force u64) cputime;
cpustat[CPUTIME_GUEST] += (__force u64) cputime;
}
}
/*
* Account system cpu time to a process and desired cpustat field
* @p: the process that the cpu time gets accounted to
* @cputime: the cpu time spent in kernel space since the last update
* @cputime_scaled: cputime scaled by cpu frequency
* @target_cputime64: pointer to cpustat field that has to be updated
*/
static inline
void __account_system_time(struct task_struct *p, cputime_t cputime,
cputime_t cputime_scaled, int index)
{
/* Add system time to process. */
p->stime += cputime;
p->stimescaled += cputime_scaled;
account_group_system_time(p, cputime);
/* Add system time to cpustat. */
task_group_account_field(p, index, (__force u64) cputime);
/* Account for system time used */
acct_update_integrals(p);
}
/*
* Account system cpu time to a process.
* @p: the process that the cpu time gets accounted to
* @hardirq_offset: the offset to subtract from hardirq_count()
* @cputime: the cpu time spent in kernel space since the last update
* @cputime_scaled: cputime scaled by cpu frequency
*/
void account_system_time(struct task_struct *p, int hardirq_offset,
cputime_t cputime, cputime_t cputime_scaled)
{
int index;
if ((p->flags & PF_VCPU) && (irq_count() - hardirq_offset == 0)) {
account_guest_time(p, cputime, cputime_scaled);
return;
}
if (hardirq_count() - hardirq_offset)
index = CPUTIME_IRQ;
else if (in_serving_softirq())
index = CPUTIME_SOFTIRQ;
else
index = CPUTIME_SYSTEM;
__account_system_time(p, cputime, cputime_scaled, index);
}
/*
* Account for involuntary wait time.
* @cputime: the cpu time spent in involuntary wait
*/
void account_steal_time(cputime_t cputime)
{
u64 *cpustat = kcpustat_this_cpu->cpustat;
cpustat[CPUTIME_STEAL] += (__force u64) cputime;
}
/*
* Account for idle time.
* @cputime: the cpu time spent in idle wait
*/
void account_idle_time(cputime_t cputime)
{
u64 *cpustat = kcpustat_this_cpu->cpustat;
struct rq *rq = this_rq();
if (atomic_read(&rq->nr_iowait) > 0)
cpustat[CPUTIME_IOWAIT] += (__force u64) cputime;
else
cpustat[CPUTIME_IDLE] += (__force u64) cputime;
}
static __always_inline bool steal_account_process_tick(void)
{
#ifdef CONFIG_PARAVIRT
if (static_key_false(¶virt_steal_enabled)) {
u64 steal, st = 0;
steal = paravirt_steal_clock(smp_processor_id());
steal -= this_rq()->prev_steal_time;
st = steal_ticks(steal);
this_rq()->prev_steal_time += st * TICK_NSEC;
account_steal_time(st);
return st;
}
#endif
return false;
}
#ifndef CONFIG_VIRT_CPU_ACCOUNTING
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
/*
* Account a tick to a process and cpustat
* @p: the process that the cpu time gets accounted to
* @user_tick: is the tick from userspace
* @rq: the pointer to rq
*
* Tick demultiplexing follows the order
* - pending hardirq update
* - pending softirq update
* - user_time
* - idle_time
* - system time
* - check for guest_time
* - else account as system_time
*
* Check for hardirq is done both for system and user time as there is
* no timer going off while we are on hardirq and hence we may never get an
* opportunity to update it solely in system time.
* p->stime and friends are only updated on system time and not on irq
* softirq as those do not count in task exec_runtime any more.
*/
static void irqtime_account_process_tick(struct task_struct *p, int user_tick,
struct rq *rq)
{
cputime_t one_jiffy_scaled = cputime_to_scaled(cputime_one_jiffy);
u64 *cpustat = kcpustat_this_cpu->cpustat;
if (steal_account_process_tick())
return;
if (irqtime_account_hi_update()) {
cpustat[CPUTIME_IRQ] += (__force u64) cputime_one_jiffy;
} else if (irqtime_account_si_update()) {
cpustat[CPUTIME_SOFTIRQ] += (__force u64) cputime_one_jiffy;
} else if (this_cpu_ksoftirqd() == p) {
/*
* ksoftirqd time do not get accounted in cpu_softirq_time.
* So, we have to handle it separately here.
* Also, p->stime needs to be updated for ksoftirqd.
*/
__account_system_time(p, cputime_one_jiffy, one_jiffy_scaled,
CPUTIME_SOFTIRQ);
} else if (user_tick) {
account_user_time(p, cputime_one_jiffy, one_jiffy_scaled);
} else if (p == rq->idle) {
account_idle_time(cputime_one_jiffy);
} else if (p->flags & PF_VCPU) { /* System time or guest time */
account_guest_time(p, cputime_one_jiffy, one_jiffy_scaled);
} else {
__account_system_time(p, cputime_one_jiffy, one_jiffy_scaled,
CPUTIME_SYSTEM);
}
}
static void irqtime_account_idle_ticks(int ticks)
{
int i;
struct rq *rq = this_rq();
for (i = 0; i < ticks; i++)
irqtime_account_process_tick(current, 0, rq);
}
#else /* CONFIG_IRQ_TIME_ACCOUNTING */
static void irqtime_account_idle_ticks(int ticks) {}
static void irqtime_account_process_tick(struct task_struct *p, int user_tick,
struct rq *rq) {}
#endif /* CONFIG_IRQ_TIME_ACCOUNTING */
/*
* Account a single tick of cpu time.
* @p: the process that the cpu time gets accounted to
* @user_tick: indicates if the tick is a user or a system tick
*/
void account_process_tick(struct task_struct *p, int user_tick)
{
cputime_t one_jiffy_scaled = cputime_to_scaled(cputime_one_jiffy);
struct rq *rq = this_rq();
if (sched_clock_irqtime) {
irqtime_account_process_tick(p, user_tick, rq);
return;
}
if (steal_account_process_tick())
return;
if (user_tick)
account_user_time(p, cputime_one_jiffy, one_jiffy_scaled);
else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET))
account_system_time(p, HARDIRQ_OFFSET, cputime_one_jiffy,
one_jiffy_scaled);
else
account_idle_time(cputime_one_jiffy);
}
/*
* Account multiple ticks of steal time.
* @p: the process from which the cpu time has been stolen
* @ticks: number of stolen ticks
*/
void account_steal_ticks(unsigned long ticks)
{
account_steal_time(jiffies_to_cputime(ticks));
}
/*
* Account multiple ticks of idle time.
* @ticks: number of stolen ticks
*/
void account_idle_ticks(unsigned long ticks)
{
if (sched_clock_irqtime) {
irqtime_account_idle_ticks(ticks);
return;
}
account_idle_time(jiffies_to_cputime(ticks));
}
#endif
/*
* Use precise platform statistics if available:
*/
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
{
*ut = p->utime;
*st = p->stime;
}
void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
{
struct task_cputime cputime;
thread_group_cputime(p, &cputime);
*ut = cputime.utime;
*st = cputime.stime;
}
#else
#ifndef nsecs_to_cputime
# define nsecs_to_cputime(__nsecs) nsecs_to_jiffies(__nsecs)
#endif
void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
{
cputime_t rtime, utime = p->utime, total = utime + p->stime;
/*
* Use CFS's precise accounting:
*/
rtime = nsecs_to_cputime(p->se.sum_exec_runtime);
if (total) {
u64 temp = (__force u64) rtime;
temp *= (__force u64) utime;
do_div(temp, (__force u32) total);
utime = (__force cputime_t) temp;
} else
utime = rtime;
/*
* Compare with previous values, to keep monotonicity:
*/
p->prev_utime = max(p->prev_utime, utime);
p->prev_stime = max(p->prev_stime, rtime - p->prev_utime);
*ut = p->prev_utime;
*st = p->prev_stime;
}
/*
* Must be called with siglock held.
*/
void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
{
struct signal_struct *sig = p->signal;
struct task_cputime cputime;
cputime_t rtime, utime, total;
thread_group_cputime(p, &cputime);
total = cputime.utime + cputime.stime;
rtime = nsecs_to_cputime(cputime.sum_exec_runtime);
if (total) {
u64 temp = (__force u64) rtime;
temp *= (__force u64) cputime.utime;
do_div(temp, (__force u32) total);
utime = (__force cputime_t) temp;
} else
utime = rtime;
sig->prev_utime = max(sig->prev_utime, utime);
sig->prev_stime = max(sig->prev_stime, rtime - sig->prev_utime);
*ut = sig->prev_utime;
*st = sig->prev_stime;
}
#endif
/*
* This function gets called by the timer code, with HZ frequency.
* We call it with interrupts disabled.
*/
void scheduler_tick(void)
{
int cpu = smp_processor_id();
struct rq *rq = cpu_rq(cpu);
struct task_struct *curr = rq->curr;
sched_clock_tick();
raw_spin_lock(&rq->lock);
update_rq_clock(rq);
update_cpu_load_active(rq);
curr->sched_class->task_tick(rq, curr, 0);
raw_spin_unlock(&rq->lock);
perf_event_task_tick();
#ifdef CONFIG_SMP
rq->idle_balance = idle_cpu(cpu);
trigger_load_balance(rq, cpu);
#endif
}
notrace unsigned long get_parent_ip(unsigned long addr)
{
if (in_lock_functions(addr)) {
addr = CALLER_ADDR2;
if (in_lock_functions(addr))
addr = CALLER_ADDR3;
}
return addr;
}
#if defined(CONFIG_PREEMPT) && (defined(CONFIG_DEBUG_PREEMPT) || \
defined(CONFIG_PREEMPT_TRACER))
void __kprobes add_preempt_count(int val)
{
#ifdef CONFIG_DEBUG_PREEMPT
/*
* Underflow?
*/
if (DEBUG_LOCKS_WARN_ON((preempt_count() < 0)))
return;
#endif
preempt_count() += val;
#ifdef CONFIG_DEBUG_PREEMPT
/*
* Spinlock count overflowing soon?
*/
DEBUG_LOCKS_WARN_ON((preempt_count() & PREEMPT_MASK) >=
PREEMPT_MASK - 10);
#endif
if (preempt_count() == val)
trace_preempt_off(CALLER_ADDR0, get_parent_ip(CALLER_ADDR1));
}
EXPORT_SYMBOL(add_preempt_count);
void __kprobes sub_preempt_count(int val)
{
#ifdef CONFIG_DEBUG_PREEMPT
/*
* Underflow?
*/
if (DEBUG_LOCKS_WARN_ON(val > preempt_count()))
return;
/*
* Is the spinlock portion underflowing?
*/
if (DEBUG_LOCKS_WARN_ON((val < PREEMPT_MASK) &&
!(preempt_count() & PREEMPT_MASK)))
return;
#endif
if (preempt_count() == val)
trace_preempt_on(CALLER_ADDR0, get_parent_ip(CALLER_ADDR1));
preempt_count() -= val;
}
EXPORT_SYMBOL(sub_preempt_count);
#endif
/*
* Print scheduling while atomic bug:
*/
static noinline void __schedule_bug(struct task_struct *prev)
{
if (oops_in_progress)
return;
printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n",
prev->comm, prev->pid, preempt_count());
debug_show_held_locks(prev);
print_modules();
if (irqs_disabled())
print_irqtrace_events(prev);
dump_stack();
}
/*
* Various schedule()-time debugging checks and statistics:
*/
static inline void schedule_debug(struct task_struct *prev)
{
/*
* Test if we are atomic. Since do_exit() needs to call into
* schedule() atomically, we ignore that path for now.
* Otherwise, whine if we are scheduling when we should not be.
*/
if (unlikely(in_atomic_preempt_off() && !prev->exit_state))
__schedule_bug(prev);
rcu_sleep_check();
profile_hit(SCHED_PROFILING, __builtin_return_address(0));
schedstat_inc(this_rq(), sched_count);
}
static void put_prev_task(struct rq *rq, struct task_struct *prev)
{
if (prev->on_rq || rq->skip_clock_update < 0)
update_rq_clock(rq);
prev->sched_class->put_prev_task(rq, prev);
}
/*
* Pick up the highest-prio task:
*/
static inline struct task_struct *
pick_next_task(struct rq *rq)
{
const struct sched_class *class;
struct task_struct *p;
/*
* Optimization: we know that if all tasks are in
* the fair class we can call that function directly:
*/
if (likely(rq->nr_running == rq->cfs.h_nr_running)) {
p = fair_sched_class.pick_next_task(rq);
if (likely(p))
return p;
}
for_each_class(class) {
p = class->pick_next_task(rq);
if (p)
return p;
}
BUG(); /* the idle class will always have a runnable task */
}
/*
* __schedule() is the main scheduler function.
*/
static void __sched __schedule(void)
{
struct task_struct *prev, *next;
unsigned long *switch_count;
struct rq *rq;
int cpu;
need_resched:
preempt_disable();
cpu = smp_processor_id();
rq = cpu_rq(cpu);
rcu_note_context_switch(cpu);
prev = rq->curr;
schedule_debug(prev);
if (sched_feat(HRTICK))
hrtick_clear(rq);
raw_spin_lock_irq(&rq->lock);
switch_count = &prev->nivcsw;
if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
if (unlikely(signal_pending_state(prev->state, prev))) {
prev->state = TASK_RUNNING;
} else {
deactivate_task(rq, prev, DEQUEUE_SLEEP);
prev->on_rq = 0;
/*
* If a worker went to sleep, notify and ask workqueue
* whether it wants to wake up a task to maintain
* concurrency.
*/
if (prev->flags & PF_WQ_WORKER) {
struct task_struct *to_wakeup;
to_wakeup = wq_worker_sleeping(prev, cpu);
if (to_wakeup)
try_to_wake_up_local(to_wakeup);
}
}
switch_count = &prev->nvcsw;
}
pre_schedule(rq, prev);
if (unlikely(!rq->nr_running))
idle_balance(cpu, rq);
put_prev_task(rq, prev);
next = pick_next_task(rq);
clear_tsk_need_resched(prev);
rq->skip_clock_update = 0;
if (likely(prev != next)) {
rq->nr_switches++;
rq->curr = next;
++*switch_count;
context_switch(rq, prev, next); /* unlocks the rq */
/*
* The context switch have flipped the stack from under us
* and restored the local variables which were saved when
* this task called schedule() in the past. prev == current
* is still correct, but it can be moved to another cpu/rq.
*/
cpu = smp_processor_id();
rq = cpu_rq(cpu);
} else
raw_spin_unlock_irq(&rq->lock);
post_schedule(rq);
sched_preempt_enable_no_resched();
if (need_resched())
goto need_resched;
}
static inline void sched_submit_work(struct task_struct *tsk)
{
if (!tsk->state || tsk_is_pi_blocked(tsk))
return;
/*
* If we are going to sleep and we have plugged IO queued,
* make sure to submit it to avoid deadlocks.
*/
if (blk_needs_flush_plug(tsk))
blk_schedule_flush_plug(tsk);
}
asmlinkage void __sched schedule(void)
{
struct task_struct *tsk = current;
sched_submit_work(tsk);
__schedule();
}
EXPORT_SYMBOL(schedule);
/**
* schedule_preempt_disabled - called with preemption disabled
*
* Returns with preemption disabled. Note: preempt_count must be 1
*/
void __sched schedule_preempt_disabled(void)
{
sched_preempt_enable_no_resched();
schedule();
preempt_disable();
}
#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
static inline bool owner_running(struct mutex *lock, struct task_struct *owner)
{
if (lock->owner != owner)
return false;
/*
* Ensure we emit the owner->on_cpu, dereference _after_ checking
* lock->owner still matches owner, if that fails, owner might
* point to free()d memory, if it still matches, the rcu_read_lock()
* ensures the memory stays valid.
*/
barrier();
return owner->on_cpu;
}
/*
* Look out! "owner" is an entirely speculative pointer
* access and not reliable.
*/
int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner)
{
if (!sched_feat(OWNER_SPIN))
return 0;
rcu_read_lock();
while (owner_running(lock, owner)) {
if (need_resched())
break;
arch_mutex_cpu_relax();
}
rcu_read_unlock();
/*
* We break out the loop above on need_resched() and when the
* owner changed, which is a sign for heavy contention. Return
* success only when lock->owner is NULL.
*/
return lock->owner == NULL;
}
#endif
#ifdef CONFIG_PREEMPT
/*
* this is the entry point to schedule() from in-kernel preemption
* off of preempt_enable. Kernel preemptions off return from interrupt
* occur there and call schedule directly.
*/
asmlinkage void __sched notrace preempt_schedule(void)
{
struct thread_info *ti = current_thread_info();
/*
* If there is a non-zero preempt_count or interrupts are disabled,
* we do not want to preempt the current task. Just return..
*/
if (likely(ti->preempt_count || irqs_disabled()))
return;
do {
add_preempt_count_notrace(PREEMPT_ACTIVE);
__schedule();
sub_preempt_count_notrace(PREEMPT_ACTIVE);
/*
* Check again in case we missed a preemption opportunity
* between schedule and now.
*/
barrier();
} while (need_resched());
}
EXPORT_SYMBOL(preempt_schedule);
/*
* this is the entry point to schedule() from kernel preemption
* off of irq context.
* Note, that this is called and return with irqs disabled. This will
* protect us against recursive calling from irq.
*/
asmlinkage void __sched preempt_schedule_irq(void)
{
struct thread_info *ti = current_thread_info();
/* Catch callers which need to be fixed */
BUG_ON(ti->preempt_count || !irqs_disabled());
do {
add_preempt_count(PREEMPT_ACTIVE);
local_irq_enable();
__schedule();
local_irq_disable();
sub_preempt_count(PREEMPT_ACTIVE);
/*
* Check again in case we missed a preemption opportunity
* between schedule and now.
*/
barrier();
} while (need_resched());
}
#endif /* CONFIG_PREEMPT */
int default_wake_function(wait_queue_t *curr, unsigned mode, int wake_flags,
void *key)
{
return try_to_wake_up(curr->private, mode, wake_flags);
}
EXPORT_SYMBOL(default_wake_function);
/*
* The core wakeup function. Non-exclusive wakeups (nr_exclusive == 0) just
* wake everything up. If it's an exclusive wakeup (nr_exclusive == small +ve
* number) then we wake all the non-exclusive tasks and one exclusive task.
*
* There are circumstances in which we can try to wake a task which has already
* started to run but is not in state TASK_RUNNING. try_to_wake_up() returns
* zero in this (rare) case, and we handle it by continuing to scan the queue.
*/
static void __wake_up_common(wait_queue_head_t *q, unsigned int mode,
int nr_exclusive, int wake_flags, void *key)
{
wait_queue_t *curr, *next;
list_for_each_entry_safe(curr, next, &q->task_list, task_list) {
unsigned flags = curr->flags;
if (curr->func(curr, mode, wake_flags, key) &&
(flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive)
break;
}
}
/**
* __wake_up - wake up threads blocked on a waitqueue.
* @q: the waitqueue
* @mode: which threads
* @nr_exclusive: how many wake-one or wake-many threads to wake up
* @key: is directly passed to the wakeup function
*
* It may be assumed that this function implies a write memory barrier before
* changing the task state if and only if any tasks are woken up.
*/
void __wake_up(wait_queue_head_t *q, unsigned int mode,
int nr_exclusive, void *key)
{
unsigned long flags;
spin_lock_irqsave(&q->lock, flags);
__wake_up_common(q, mode, nr_exclusive, 0, key);
spin_unlock_irqrestore(&q->lock, flags);
}
EXPORT_SYMBOL(__wake_up);
/*
* Same as __wake_up but called with the spinlock in wait_queue_head_t held.
*/
void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr)
{
__wake_up_common(q, mode, nr, 0, NULL);
}
EXPORT_SYMBOL_GPL(__wake_up_locked);
void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key)
{
__wake_up_common(q, mode, 1, 0, key);
}
EXPORT_SYMBOL_GPL(__wake_up_locked_key);
/**
* __wake_up_sync_key - wake up threads blocked on a waitqueue.
* @q: the waitqueue
* @mode: which threads
* @nr_exclusive: how many wake-one or wake-many threads to wake up
* @key: opaque value to be passed to wakeup targets
*
* The sync wakeup differs that the waker knows that it will schedule
* away soon, so while the target thread will be woken up, it will not
* be migrated to another CPU - ie. the two threads are 'synchronized'
* with each other. This can prevent needless bouncing between CPUs.
*
* On UP it can prevent extra preemption.
*
* It may be assumed that this function implies a write memory barrier before
* changing the task state if and only if any tasks are woken up.
*/
void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode,
int nr_exclusive, void *key)
{
unsigned long flags;
int wake_flags = WF_SYNC;
if (unlikely(!q))
return;
if (unlikely(!nr_exclusive))
wake_flags = 0;
spin_lock_irqsave(&q->lock, flags);
__wake_up_common(q, mode, nr_exclusive, wake_flags, key);
spin_unlock_irqrestore(&q->lock, flags);
}
EXPORT_SYMBOL_GPL(__wake_up_sync_key);
/*
* __wake_up_sync - see __wake_up_sync_key()
*/
void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr_exclusive)
{
__wake_up_sync_key(q, mode, nr_exclusive, NULL);
}
EXPORT_SYMBOL_GPL(__wake_up_sync); /* For internal use only */
/**
* complete: - signals a single thread waiting on this completion
* @x: holds the state of this particular completion
*
* This will wake up a single thread waiting on this completion. Threads will be
* awakened in the same order in which they were queued.
*
* See also complete_all(), wait_for_completion() and related routines.
*
* It may be assumed that this function implies a write memory barrier before
* changing the task state if and only if any tasks are woken up.
*/
void complete(struct completion *x)
{
unsigned long flags;
spin_lock_irqsave(&x->wait.lock, flags);
x->done++;
__wake_up_common(&x->wait, TASK_NORMAL, 1, 0, NULL);
spin_unlock_irqrestore(&x->wait.lock, flags);
}
EXPORT_SYMBOL(complete);
/**
* complete_all: - signals all threads waiting on this completion
* @x: holds the state of this particular completion
*
* This will wake up all threads waiting on this particular completion event.
*
* It may be assumed that this function implies a write memory barrier before
* changing the task state if and only if any tasks are woken up.
*/
void complete_all(struct completion *x)
{
unsigned long flags;
spin_lock_irqsave(&x->wait.lock, flags);
x->done += UINT_MAX/2;
__wake_up_common(&x->wait, TASK_NORMAL, 0, 0, NULL);
spin_unlock_irqrestore(&x->wait.lock, flags);
}
EXPORT_SYMBOL(complete_all);
static inline long __sched
do_wait_for_common(struct completion *x, long timeout, int state, int iowait)
{
if (!x->done) {
DECLARE_WAITQUEUE(wait, current);
__add_wait_queue_tail_exclusive(&x->wait, &wait);
do {
if (signal_pending_state(state, current)) {
timeout = -ERESTARTSYS;
break;
}
__set_current_state(state);
spin_unlock_irq(&x->wait.lock);
if (iowait)
timeout = io_schedule_timeout(timeout);
else
timeout = schedule_timeout(timeout);
spin_lock_irq(&x->wait.lock);
} while (!x->done && timeout);
__remove_wait_queue(&x->wait, &wait);
if (!x->done)
return timeout;
}
x->done--;
return timeout ?: 1;
}
static long __sched
wait_for_common(struct completion *x, long timeout, int state, int iowait)
{
might_sleep();
spin_lock_irq(&x->wait.lock);
timeout = do_wait_for_common(x, timeout, state, iowait);
spin_unlock_irq(&x->wait.lock);
return timeout;
}
/**
* wait_for_completion: - waits for completion of a task
* @x: holds the state of this particular completion
*
* This waits to be signaled for completion of a specific task. It is NOT
* interruptible and there is no timeout.
*
* See also similar routines (i.e. wait_for_completion_timeout()) with timeout
* and interrupt capability. Also see complete().
*/
void __sched wait_for_completion(struct completion *x)
{
wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_UNINTERRUPTIBLE, 0);
}
EXPORT_SYMBOL(wait_for_completion);
/**
* wait_for_completion_io: - waits for completion of a task
* @x: holds the state of this particular completion
*
* This waits for completion of a specific task to be signaled. Treats any
* sleeping as waiting for IO for the purposes of process accounting.
*/
void __sched wait_for_completion_io(struct completion *x)
{
wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_UNINTERRUPTIBLE, 1);
}
EXPORT_SYMBOL(wait_for_completion_io);
/**
* wait_for_completion_timeout: - waits for completion of a task (w/timeout)
* @x: holds the state of this particular completion
* @timeout: timeout value in jiffies
*
* This waits for either a completion of a specific task to be signaled or for a
* specified timeout to expire. The timeout is in jiffies. It is not
* interruptible.
*
* The return value is 0 if timed out, and positive (at least 1, or number of
* jiffies left till timeout) if completed.
*/
unsigned long __sched
wait_for_completion_timeout(struct completion *x, unsigned long timeout)
{
return wait_for_common(x, timeout, TASK_UNINTERRUPTIBLE, 0);
}
EXPORT_SYMBOL(wait_for_completion_timeout);
/**
* wait_for_completion_interruptible: - waits for completion of a task (w/intr)
* @x: holds the state of this particular completion
*
* This waits for completion of a specific task to be signaled. It is
* interruptible.
*
* The return value is -ERESTARTSYS if interrupted, 0 if completed.
*/
int __sched wait_for_completion_interruptible(struct completion *x)
{
long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT,
TASK_INTERRUPTIBLE, 0);
if (t == -ERESTARTSYS)
return t;
return 0;
}
EXPORT_SYMBOL(wait_for_completion_interruptible);
/**
* wait_for_completion_interruptible_timeout: - waits for completion (w/(to,intr))
* @x: holds the state of this particular completion
* @timeout: timeout value in jiffies
*
* This waits for either a completion of a specific task to be signaled or for a
* specified timeout to expire. It is interruptible. The timeout is in jiffies.
*
* The return value is -ERESTARTSYS if interrupted, 0 if timed out,
* positive (at least 1, or number of jiffies left till timeout) if completed.
*/
long __sched
wait_for_completion_interruptible_timeout(struct completion *x,
unsigned long timeout)
{
return wait_for_common(x, timeout, TASK_INTERRUPTIBLE, 0);
}
EXPORT_SYMBOL(wait_for_completion_interruptible_timeout);
/**
* wait_for_completion_killable: - waits for completion of a task (killable)
* @x: holds the state of this particular completion
*
* This waits to be signaled for completion of a specific task. It can be
* interrupted by a kill signal.
*
* The return value is -ERESTARTSYS if interrupted, 0 if completed.
*/
int __sched wait_for_completion_killable(struct completion *x)
{
long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_KILLABLE, 0);
if (t == -ERESTARTSYS)
return t;
return 0;
}
EXPORT_SYMBOL(wait_for_completion_killable);
/**
* wait_for_completion_killable_timeout: - waits for completion of a task (w/(to,killable))
* @x: holds the state of this particular completion
* @timeout: timeout value in jiffies
*
* This waits for either a completion of a specific task to be
* signaled or for a specified timeout to expire. It can be
* interrupted by a kill signal. The timeout is in jiffies.
*
* The return value is -ERESTARTSYS if interrupted, 0 if timed out,
* positive (at least 1, or number of jiffies left till timeout) if completed.
*/
long __sched
wait_for_completion_killable_timeout(struct completion *x,
unsigned long timeout)
{
return wait_for_common(x, timeout, TASK_KILLABLE, 0);
}
EXPORT_SYMBOL(wait_for_completion_killable_timeout);
/**
* try_wait_for_completion - try to decrement a completion without blocking
* @x: completion structure
*
* Returns: 0 if a decrement cannot be done without blocking
* 1 if a decrement succeeded.
*
* If a completion is being used as a counting completion,
* attempt to decrement the counter without blocking. This
* enables us to avoid waiting if the resource the completion
* is protecting is not available.
*/
bool try_wait_for_completion(struct completion *x)
{
unsigned long flags;
int ret = 1;
spin_lock_irqsave(&x->wait.lock, flags);
if (!x->done)
ret = 0;
else
x->done--;
spin_unlock_irqrestore(&x->wait.lock, flags);
return ret;
}
EXPORT_SYMBOL(try_wait_for_completion);
/**
* completion_done - Test to see if a completion has any waiters
* @x: completion structure
*
* Returns: 0 if there are waiters (wait_for_completion() in progress)
* 1 if there are no waiters.
*
*/
bool completion_done(struct completion *x)
{
unsigned long flags;
int ret = 1;
spin_lock_irqsave(&x->wait.lock, flags);
if (!x->done)
ret = 0;
spin_unlock_irqrestore(&x->wait.lock, flags);
return ret;
}
EXPORT_SYMBOL(completion_done);
static long __sched
sleep_on_common(wait_queue_head_t *q, int state, long timeout)
{
unsigned long flags;
wait_queue_t wait;
init_waitqueue_entry(&wait, current);
__set_current_state(state);
spin_lock_irqsave(&q->lock, flags);
__add_wait_queue(q, &wait);
spin_unlock(&q->lock);
timeout = schedule_timeout(timeout);
spin_lock_irq(&q->lock);
__remove_wait_queue(q, &wait);
spin_unlock_irqrestore(&q->lock, flags);
return timeout;
}
void __sched interruptible_sleep_on(wait_queue_head_t *q)
{
sleep_on_common(q, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
}
EXPORT_SYMBOL(interruptible_sleep_on);
long __sched
interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout)
{
return sleep_on_common(q, TASK_INTERRUPTIBLE, timeout);
}
EXPORT_SYMBOL(interruptible_sleep_on_timeout);
void __sched sleep_on(wait_queue_head_t *q)
{
sleep_on_common(q, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
}
EXPORT_SYMBOL(sleep_on);
long __sched sleep_on_timeout(wait_queue_head_t *q, long timeout)
{
return sleep_on_common(q, TASK_UNINTERRUPTIBLE, timeout);
}
EXPORT_SYMBOL(sleep_on_timeout);
#ifdef CONFIG_RT_MUTEXES
/*
* rt_mutex_setprio - set the current priority of a task
* @p: task
* @prio: prio value (kernel-internal form)
*
* This function changes the 'effective' priority of a task. It does
* not touch ->normal_prio like __setscheduler().
*
* Used by the rt_mutex code to implement priority inheritance logic.
*/
void rt_mutex_setprio(struct task_struct *p, int prio)
{
int oldprio, on_rq, running;
struct rq *rq;
const struct sched_class *prev_class;
BUG_ON(prio < 0 || prio > MAX_PRIO);
rq = __task_rq_lock(p);
/*
* Idle task boosting is a nono in general. There is one
* exception, when PREEMPT_RT and NOHZ is active:
*
* The idle task calls get_next_timer_interrupt() and holds
* the timer wheel base->lock on the CPU and another CPU wants
* to access the timer (probably to cancel it). We can safely
* ignore the boosting request, as the idle CPU runs this code
* with interrupts disabled and will complete the lock
* protected section without being interrupted. So there is no
* real need to boost.
*/
if (unlikely(p == rq->idle)) {
WARN_ON(p != rq->curr);
WARN_ON(p->pi_blocked_on);
goto out_unlock;
}
trace_sched_pi_setprio(p, prio);
oldprio = p->prio;
prev_class = p->sched_class;
on_rq = p->on_rq;
running = task_current(rq, p);
if (on_rq)
dequeue_task(rq, p, 0);
if (running)
p->sched_class->put_prev_task(rq, p);
if (rt_prio(prio))
p->sched_class = &rt_sched_class;
else
p->sched_class = &fair_sched_class;
p->prio = prio;
if (running)
p->sched_class->set_curr_task(rq);
if (on_rq)
enqueue_task(rq, p, oldprio < prio ? ENQUEUE_HEAD : 0);
check_class_changed(rq, p, prev_class, oldprio);
out_unlock:
__task_rq_unlock(rq);
}
#endif
void set_user_nice(struct task_struct *p, long nice)
{
int old_prio, delta, on_rq;
unsigned long flags;
struct rq *rq;
if (TASK_NICE(p) == nice || nice < -20 || nice > 19)
return;
/*
* We have to be careful, if called from sys_setpriority(),
* the task might be in the middle of scheduling on another CPU.
*/
rq = task_rq_lock(p, &flags);
/*
* The RT priorities are set via sched_setscheduler(), but we still
* allow the 'normal' nice value to be set - but as expected
* it wont have any effect on scheduling until the task is
* SCHED_FIFO/SCHED_RR:
*/
if (task_has_rt_policy(p)) {
p->static_prio = NICE_TO_PRIO(nice);
goto out_unlock;
}
on_rq = p->on_rq;
if (on_rq)
dequeue_task(rq, p, 0);
p->static_prio = NICE_TO_PRIO(nice);
set_load_weight(p);
old_prio = p->prio;
p->prio = effective_prio(p);
delta = p->prio - old_prio;
if (on_rq) {
enqueue_task(rq, p, 0);
/*
* If the task increased its priority or is running and
* lowered its priority, then reschedule its CPU:
*/
if (delta < 0 || (delta > 0 && task_running(rq, p)))
resched_task(rq->curr);
}
out_unlock:
task_rq_unlock(rq, p, &flags);
}
EXPORT_SYMBOL(set_user_nice);
/*
* can_nice - check if a task can reduce its nice value
* @p: task
* @nice: nice value
*/
int can_nice(const struct task_struct *p, const int nice)
{
/* convert nice value [19,-20] to rlimit style value [1,40] */
int nice_rlim = 20 - nice;
return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
capable(CAP_SYS_NICE));
}
#ifdef __ARCH_WANT_SYS_NICE
/*
* sys_nice - change the priority of the current process.
* @increment: priority increment
*
* sys_setpriority is a more generic, but much slower function that
* does similar things.
*/
SYSCALL_DEFINE1(nice, int, increment)
{
long nice, retval;
/*
* Setpriority might change our priority at the same moment.
* We don't have to worry. Conceptually one call occurs first
* and we have a single winner.
*/
if (increment < -40)
increment = -40;
if (increment > 40)
increment = 40;
nice = TASK_NICE(current) + increment;
if (nice < -20)
nice = -20;
if (nice > 19)
nice = 19;
if (increment < 0 && !can_nice(current, nice))
return -EPERM;
retval = security_task_setnice(current, nice);
if (retval)
return retval;
set_user_nice(current, nice);
return 0;
}
#endif
/**
* task_prio - return the priority value of a given task.
* @p: the task in question.
*
* This is the priority value as seen by users in /proc.
* RT tasks are offset by -200. Normal tasks are centered
* around 0, value goes from -16 to +15.
*/
int task_prio(const struct task_struct *p)
{
return p->prio - MAX_RT_PRIO;
}
/**
* task_nice - return the nice value of a given task.
* @p: the task in question.
*/
int task_nice(const struct task_struct *p)
{
return TASK_NICE(p);
}
EXPORT_SYMBOL(task_nice);
/**
* idle_cpu - is a given cpu idle currently?
* @cpu: the processor in question.
*/
int idle_cpu(int cpu)
{
struct rq *rq = cpu_rq(cpu);
if (rq->curr != rq->idle)
return 0;
if (rq->nr_running)
return 0;
#ifdef CONFIG_SMP
if (!llist_empty(&rq->wake_list))
return 0;
#endif
return 1;
}
/**
* idle_task - return the idle task for a given cpu.
* @cpu: the processor in question.
*/
struct task_struct *idle_task(int cpu)
{
return cpu_rq(cpu)->idle;
}
/**
* find_process_by_pid - find a process with a matching PID value.
* @pid: the pid in question.
*/
static struct task_struct *find_process_by_pid(pid_t pid)
{
return pid ? find_task_by_vpid(pid) : current;
}
/* Actually do priority change: must hold rq lock. */
static void
__setscheduler(struct rq *rq, struct task_struct *p, int policy, int prio)
{
p->policy = policy;
p->rt_priority = prio;
p->normal_prio = normal_prio(p);
/* we are holding p->pi_lock already */
p->prio = rt_mutex_getprio(p);
if (rt_prio(p->prio))
p->sched_class = &rt_sched_class;
else
p->sched_class = &fair_sched_class;
set_load_weight(p);
}
/*
* check the target process has a UID that matches the current process's
*/
static bool check_same_owner(struct task_struct *p)
{
const struct cred *cred = current_cred(), *pcred;
bool match;
rcu_read_lock();
pcred = __task_cred(p);
if (cred->user->user_ns == pcred->user->user_ns)
match = (cred->euid == pcred->euid ||
cred->euid == pcred->uid);
else
match = false;
rcu_read_unlock();
return match;
}
static int __sched_setscheduler(struct task_struct *p, int policy,
const struct sched_param *param, bool user)
{
int retval, oldprio, oldpolicy = -1, on_rq, running;
unsigned long flags;
const struct sched_class *prev_class;
struct rq *rq;
int reset_on_fork;
/* may grab non-irq protected spin_locks */
BUG_ON(in_interrupt());
recheck:
/* double check policy once rq lock held */
if (policy < 0) {
reset_on_fork = p->sched_reset_on_fork;
policy = oldpolicy = p->policy;
} else {
reset_on_fork = !!(policy & SCHED_RESET_ON_FORK);
policy &= ~SCHED_RESET_ON_FORK;
if (policy != SCHED_FIFO && policy != SCHED_RR &&
policy != SCHED_NORMAL && policy != SCHED_BATCH &&
policy != SCHED_IDLE)
return -EINVAL;
}
/*
* Valid priorities for SCHED_FIFO and SCHED_RR are
* 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL,
* SCHED_BATCH and SCHED_IDLE is 0.
*/
if (param->sched_priority < 0 ||
(p->mm && param->sched_priority > MAX_USER_RT_PRIO-1) ||
(!p->mm && param->sched_priority > MAX_RT_PRIO-1))
return -EINVAL;
if (rt_policy(policy) != (param->sched_priority != 0))
return -EINVAL;
/*
* Allow unprivileged RT tasks to decrease priority:
*/
if (user && !capable(CAP_SYS_NICE)) {
if (rt_policy(policy)) {
unsigned long rlim_rtprio =
task_rlimit(p, RLIMIT_RTPRIO);
/* can't set/change the rt policy */
if (policy != p->policy && !rlim_rtprio)
return -EPERM;
/* can't increase priority */
if (param->sched_priority > p->rt_priority &&
param->sched_priority > rlim_rtprio)
return -EPERM;
}
/*
* Treat SCHED_IDLE as nice 20. Only allow a switch to
* SCHED_NORMAL if the RLIMIT_NICE would normally permit it.
*/
if (p->policy == SCHED_IDLE && policy != SCHED_IDLE) {
if (!can_nice(p, TASK_NICE(p)))
return -EPERM;
}
/* can't change other user's priorities */
if (!check_same_owner(p))
return -EPERM;
/* Normal users shall not reset the sched_reset_on_fork flag */
if (p->sched_reset_on_fork && !reset_on_fork)
return -EPERM;
}
if (user) {
retval = security_task_setscheduler(p);
if (retval)
return retval;
}
/*
* make sure no PI-waiters arrive (or leave) while we are
* changing the priority of the task:
*
* To be able to change p->policy safely, the appropriate
* runqueue lock must be held.
*/
rq = task_rq_lock(p, &flags);
/*
* Changing the policy of the stop threads its a very bad idea
*/
if (p == rq->stop) {
task_rq_unlock(rq, p, &flags);
return -EINVAL;
}
/*
* If not changing anything there's no need to proceed further:
*/
if (unlikely(policy == p->policy && (!rt_policy(policy) ||
param->sched_priority == p->rt_priority))) {
__task_rq_unlock(rq);
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
return 0;
}
#ifdef CONFIG_RT_GROUP_SCHED
if (user) {
/*
* Do not allow realtime tasks into groups that have no runtime
* assigned.
*/
if (rt_bandwidth_enabled() && rt_policy(policy) &&
task_group(p)->rt_bandwidth.rt_runtime == 0 &&
!task_group_is_autogroup(task_group(p))) {
task_rq_unlock(rq, p, &flags);
return -EPERM;
}
}
#endif
/* recheck policy now with rq lock held */
if (unlikely(oldpolicy != -1 && oldpolicy != p->policy)) {
policy = oldpolicy = -1;
task_rq_unlock(rq, p, &flags);
goto recheck;
}
on_rq = p->on_rq;
running = task_current(rq, p);
if (on_rq)
dequeue_task(rq, p, 0);
if (running)
p->sched_class->put_prev_task(rq, p);
p->sched_reset_on_fork = reset_on_fork;
oldprio = p->prio;
prev_class = p->sched_class;
__setscheduler(rq, p, policy, param->sched_priority);
if (running)
p->sched_class->set_curr_task(rq);
if (on_rq) {
/*
* We enqueue to tail when the priority of a task is
* increased (user space view).
*/
enqueue_task(rq, p, oldprio <= p->prio ? ENQUEUE_HEAD : 0);
}
check_class_changed(rq, p, prev_class, oldprio);
task_rq_unlock(rq, p, &flags);
rt_mutex_adjust_pi(p);
return 0;
}
/**
* sched_setscheduler - change the scheduling policy and/or RT priority of a thread.
* @p: the task in question.
* @policy: new policy.
* @param: structure containing the new RT priority.
*
* NOTE that the task may be already dead.
*/
int sched_setscheduler(struct task_struct *p, int policy,
const struct sched_param *param)
{
return __sched_setscheduler(p, policy, param, true);
}
EXPORT_SYMBOL_GPL(sched_setscheduler);
/**
* sched_setscheduler_nocheck - change the scheduling policy and/or RT priority of a thread from kernelspace.
* @p: the task in question.
* @policy: new policy.
* @param: structure containing the new RT priority.
*
* Just like sched_setscheduler, only don't bother checking if the
* current context has permission. For example, this is needed in
* stop_machine(): we create temporary high priority worker threads,
* but our caller might not have that capability.
*/
int sched_setscheduler_nocheck(struct task_struct *p, int policy,
const struct sched_param *param)
{
return __sched_setscheduler(p, policy, param, false);
}
static int
do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
{
struct sched_param lparam;
struct task_struct *p;
int retval;
if (!param || pid < 0)
return -EINVAL;
if (copy_from_user(&lparam, param, sizeof(struct sched_param)))
return -EFAULT;
rcu_read_lock();
retval = -ESRCH;
p = find_process_by_pid(pid);
if (p != NULL)
retval = sched_setscheduler(p, policy, &lparam);
rcu_read_unlock();
return retval;
}
/**
* sys_sched_setscheduler - set/change the scheduler policy and RT priority
* @pid: the pid in question.
* @policy: new policy.
* @param: structure containing the new RT priority.
*/
SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy,
struct sched_param __user *, param)
{
/* negative values for policy are not valid */
if (policy < 0)
return -EINVAL;
return do_sched_setscheduler(pid, policy, param);
}
/**
* sys_sched_setparam - set/change the RT priority of a thread
* @pid: the pid in question.
* @param: structure containing the new RT priority.
*/
SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param)
{
return do_sched_setscheduler(pid, -1, param);
}
/**
* sys_sched_getscheduler - get the policy (scheduling class) of a thread
* @pid: the pid in question.
*/
SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid)
{
struct task_struct *p;
int retval;
if (pid < 0)
return -EINVAL;
retval = -ESRCH;
rcu_read_lock();
p = find_process_by_pid(pid);
if (p) {
retval = security_task_getscheduler(p);
if (!retval)
retval = p->policy
| (p->sched_reset_on_fork ? SCHED_RESET_ON_FORK : 0);
}
rcu_read_unlock();
return retval;
}
/**
* sys_sched_getparam - get the RT priority of a thread
* @pid: the pid in question.
* @param: structure containing the RT priority.
*/
SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
{
struct sched_param lp;
struct task_struct *p;
int retval;
if (!param || pid < 0)
return -EINVAL;
rcu_read_lock();
p = find_process_by_pid(pid);
retval = -ESRCH;
if (!p)
goto out_unlock;
retval = security_task_getscheduler(p);
if (retval)
goto out_unlock;
lp.sched_priority = p->rt_priority;
rcu_read_unlock();
/*
* This one might sleep, we cannot do it with a spinlock held ...
*/
retval = copy_to_user(param, &lp, sizeof(*param)) ? -EFAULT : 0;
return retval;
out_unlock:
rcu_read_unlock();
return retval;
}
long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
{
cpumask_var_t cpus_allowed, new_mask;
struct task_struct *p;
int retval;
get_online_cpus();
rcu_read_lock();
p = find_process_by_pid(pid);
if (!p) {
rcu_read_unlock();
put_online_cpus();
return -ESRCH;
}
/* Prevent p going away */
get_task_struct(p);
rcu_read_unlock();
if (!alloc_cpumask_var(&cpus_allowed, GFP_KERNEL)) {
retval = -ENOMEM;
goto out_put_task;
}
if (!alloc_cpumask_var(&new_mask, GFP_KERNEL)) {
retval = -ENOMEM;
goto out_free_cpus_allowed;
}
retval = -EPERM;
if (!check_same_owner(p) && !ns_capable(task_user_ns(p), CAP_SYS_NICE))
goto out_unlock;
retval = security_task_setscheduler(p);
if (retval)
goto out_unlock;
cpuset_cpus_allowed(p, cpus_allowed);
cpumask_and(new_mask, in_mask, cpus_allowed);
again:
retval = set_cpus_allowed_ptr(p, new_mask);
if (!retval) {
cpuset_cpus_allowed(p, cpus_allowed);
if (!cpumask_subset(new_mask, cpus_allowed)) {
/*
* We must have raced with a concurrent cpuset
* update. Just reset the cpus_allowed to the
* cpuset's cpus_allowed
*/
cpumask_copy(new_mask, cpus_allowed);
goto again;
}
}
out_unlock:
free_cpumask_var(new_mask);
out_free_cpus_allowed:
free_cpumask_var(cpus_allowed);
out_put_task:
put_task_struct(p);
put_online_cpus();
return retval;
}
static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len,
struct cpumask *new_mask)
{
if (len < cpumask_size())
cpumask_clear(new_mask);
else if (len > cpumask_size())
len = cpumask_size();
return copy_from_user(new_mask, user_mask_ptr, len) ? -EFAULT : 0;
}
/**
* sys_sched_setaffinity - set the cpu affinity of a process
* @pid: pid of the process
* @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to the new cpu mask
*/
SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len,
unsigned long __user *, user_mask_ptr)
{
cpumask_var_t new_mask;
int retval;
if (!alloc_cpumask_var(&new_mask, GFP_KERNEL))
return -ENOMEM;
retval = get_user_cpu_mask(user_mask_ptr, len, new_mask);
if (retval == 0)
retval = sched_setaffinity(pid, new_mask);
free_cpumask_var(new_mask);
return retval;
}
long sched_getaffinity(pid_t pid, struct cpumask *mask)
{
struct task_struct *p;
unsigned long flags;
int retval;
get_online_cpus();
rcu_read_lock();
retval = -ESRCH;
p = find_process_by_pid(pid);
if (!p)
goto out_unlock;
retval = security_task_getscheduler(p);
if (retval)
goto out_unlock;
raw_spin_lock_irqsave(&p->pi_lock, flags);
cpumask_and(mask, &p->cpus_allowed, cpu_online_mask);
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
out_unlock:
rcu_read_unlock();
put_online_cpus();
return retval;
}
/**
* sys_sched_getaffinity - get the cpu affinity of a process
* @pid: pid of the process
* @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to hold the current cpu mask
*/
SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
unsigned long __user *, user_mask_ptr)
{
int ret;
cpumask_var_t mask;
if ((len * BITS_PER_BYTE) < nr_cpu_ids)
return -EINVAL;
if (len & (sizeof(unsigned long)-1))
return -EINVAL;
if (!alloc_cpumask_var(&mask, GFP_KERNEL))
return -ENOMEM;
ret = sched_getaffinity(pid, mask);
if (ret == 0) {
size_t retlen = min_t(size_t, len, cpumask_size());
if (copy_to_user(user_mask_ptr, mask, retlen))
ret = -EFAULT;
else
ret = retlen;
}
free_cpumask_var(mask);
return ret;
}
/**
* sys_sched_yield - yield the current processor to other threads.
*
* This function yields the current CPU to other tasks. If there are no
* other threads running on this CPU then this function will return.
*/
SYSCALL_DEFINE0(sched_yield)
{
struct rq *rq = this_rq_lock();
schedstat_inc(rq, yld_count);
current->sched_class->yield_task(rq);
/*
* Since we are going to call schedule() anyway, there's
* no need to preempt or enable interrupts:
*/
__release(rq->lock);
spin_release(&rq->lock.dep_map, 1, _THIS_IP_);
do_raw_spin_unlock(&rq->lock);
sched_preempt_enable_no_resched();
schedule();
return 0;
}
static inline int should_resched(void)
{
return need_resched() && !(preempt_count() & PREEMPT_ACTIVE);
}
static void __cond_resched(void)
{
add_preempt_count(PREEMPT_ACTIVE);
__schedule();
sub_preempt_count(PREEMPT_ACTIVE);
}
int __sched _cond_resched(void)
{
if (should_resched()) {
__cond_resched();
return 1;
}
return 0;
}
EXPORT_SYMBOL(_cond_resched);
/*
* __cond_resched_lock() - if a reschedule is pending, drop the given lock,
* call schedule, and on return reacquire the lock.
*
* This works OK both with and without CONFIG_PREEMPT. We do strange low-level
* operations here to prevent schedule() from being called twice (once via
* spin_unlock(), once by hand).
*/
int __cond_resched_lock(spinlock_t *lock)
{
int resched = should_resched();
int ret = 0;
lockdep_assert_held(lock);
if (spin_needbreak(lock) || resched) {
spin_unlock(lock);
if (resched)
__cond_resched();
else
cpu_relax();
ret = 1;
spin_lock(lock);
}
return ret;
}
EXPORT_SYMBOL(__cond_resched_lock);
int __sched __cond_resched_softirq(void)
{
BUG_ON(!in_softirq());
if (should_resched()) {
local_bh_enable();
__cond_resched();
local_bh_disable();
return 1;
}
return 0;
}
EXPORT_SYMBOL(__cond_resched_softirq);
/**
* yield - yield the current processor to other threads.
*
* Do not ever use this function, there's a 99% chance you're doing it wrong.
*
* The scheduler is at all times free to pick the calling task as the most
* eligible task to run, if removing the yield() call from your code breaks
* it, its already broken.
*
* Typical broken usage is:
*
* while (!event)
* yield();
*
* where one assumes that yield() will let 'the other' process run that will
* make event true. If the current task is a SCHED_FIFO task that will never
* happen. Never use yield() as a progress guarantee!!
*
* If you want to use yield() to wait for something, use wait_event().
* If you want to use yield() to be 'nice' for others, use cond_resched().
* If you still want to use yield(), do not!
*/
void __sched yield(void)
{
set_current_state(TASK_RUNNING);
sys_sched_yield();
}
EXPORT_SYMBOL(yield);
/**
* yield_to - yield the current processor to another thread in
* your thread group, or accelerate that thread toward the
* processor it's on.
* @p: target task
* @preempt: whether task preemption is allowed or not
*
* It's the caller's job to ensure that the target task struct
* can't go away on us before we can do any checks.
*
* Returns true if we indeed boosted the target task.
*/
bool __sched yield_to(struct task_struct *p, bool preempt)
{
struct task_struct *curr = current;
struct rq *rq, *p_rq;
unsigned long flags;
bool yielded = 0;
local_irq_save(flags);
rq = this_rq();
again:
p_rq = task_rq(p);
double_rq_lock(rq, p_rq);
while (task_rq(p) != p_rq) {
double_rq_unlock(rq, p_rq);
goto again;
}
if (!curr->sched_class->yield_to_task)
goto out;
if (curr->sched_class != p->sched_class)
goto out;
if (task_running(p_rq, p) || p->state)
goto out;
yielded = curr->sched_class->yield_to_task(rq, p, preempt);
if (yielded) {
schedstat_inc(rq, yld_count);
/*
* Make p's CPU reschedule; pick_next_entity takes care of
* fairness.
*/
if (preempt && rq != p_rq)
resched_task(p_rq->curr);
} else {
/*
* We might have set it in task_yield_fair(), but are
* not going to schedule(), so don't want to skip
* the next update.
*/
rq->skip_clock_update = 0;
}
out:
double_rq_unlock(rq, p_rq);
local_irq_restore(flags);
if (yielded)
schedule();
return yielded;
}
EXPORT_SYMBOL_GPL(yield_to);
/*
* This task is about to go to sleep on IO. Increment rq->nr_iowait so
* that process accounting knows that this is a task in IO wait state.
*/
void __sched io_schedule(void)
{
struct rq *rq = raw_rq();
delayacct_blkio_start();
atomic_inc(&rq->nr_iowait);
blk_flush_plug(current);
current->in_iowait = 1;
schedule();
current->in_iowait = 0;
atomic_dec(&rq->nr_iowait);
delayacct_blkio_end();
}
EXPORT_SYMBOL(io_schedule);
long __sched io_schedule_timeout(long timeout)
{
struct rq *rq = raw_rq();
long ret;
delayacct_blkio_start();
atomic_inc(&rq->nr_iowait);
blk_flush_plug(current);
current->in_iowait = 1;
ret = schedule_timeout(timeout);
current->in_iowait = 0;
atomic_dec(&rq->nr_iowait);
delayacct_blkio_end();
return ret;
}
EXPORT_SYMBOL(io_schedule_timeout);
/**
* sys_sched_get_priority_max - return maximum RT priority.
* @policy: scheduling class.
*
* this syscall returns the maximum rt_priority that can be used
* by a given scheduling class.
*/
SYSCALL_DEFINE1(sched_get_priority_max, int, policy)
{
int ret = -EINVAL;
switch (policy) {
case SCHED_FIFO:
case SCHED_RR:
ret = MAX_USER_RT_PRIO-1;
break;
case SCHED_NORMAL:
case SCHED_BATCH:
case SCHED_IDLE:
ret = 0;
break;
}
return ret;
}
/**
* sys_sched_get_priority_min - return minimum RT priority.
* @policy: scheduling class.
*
* this syscall returns the minimum rt_priority that can be used
* by a given scheduling class.
*/
SYSCALL_DEFINE1(sched_get_priority_min, int, policy)
{
int ret = -EINVAL;
switch (policy) {
case SCHED_FIFO:
case SCHED_RR:
ret = 1;
break;
case SCHED_NORMAL:
case SCHED_BATCH:
case SCHED_IDLE:
ret = 0;
}
return ret;
}
/**
* sys_sched_rr_get_interval - return the default timeslice of a process.
* @pid: pid of the process.
* @interval: userspace pointer to the timeslice value.
*
* this syscall writes the default timeslice value of a given process
* into the user-space timespec buffer. A value of '0' means infinity.
*/
SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
struct timespec __user *, interval)
{
struct task_struct *p;
unsigned int time_slice;
unsigned long flags;
struct rq *rq;
int retval;
struct timespec t;
if (pid < 0)
return -EINVAL;
retval = -ESRCH;
rcu_read_lock();
p = find_process_by_pid(pid);
if (!p)
goto out_unlock;
retval = security_task_getscheduler(p);
if (retval)
goto out_unlock;
rq = task_rq_lock(p, &flags);
time_slice = p->sched_class->get_rr_interval(rq, p);
task_rq_unlock(rq, p, &flags);
rcu_read_unlock();
jiffies_to_timespec(time_slice, &t);
retval = copy_to_user(interval, &t, sizeof(t)) ? -EFAULT : 0;
return retval;
out_unlock:
rcu_read_unlock();
return retval;
}
static const char stat_nam[] = TASK_STATE_TO_CHAR_STR;
void sched_show_task(struct task_struct *p)
{
unsigned long free = 0;
unsigned state;
state = p->state ? __ffs(p->state) + 1 : 0;
printk(KERN_INFO "%-15.15s %c", p->comm,
state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?');
#if BITS_PER_LONG == 32
if (state == TASK_RUNNING)
printk(KERN_CONT " running ");
else
printk(KERN_CONT " %08lx ", thread_saved_pc(p));
#else
if (state == TASK_RUNNING)
printk(KERN_CONT " running task ");
else
printk(KERN_CONT " %016lx ", thread_saved_pc(p));
#endif
#ifdef CONFIG_DEBUG_STACK_USAGE
free = stack_not_used(p);
#endif
printk(KERN_CONT "%5lu %5d %6d 0x%08lx\n", free,
task_pid_nr(p), task_pid_nr(rcu_dereference(p->real_parent)),
(unsigned long)task_thread_info(p)->flags);
show_stack(p, NULL);
}
void show_state_filter(unsigned long state_filter)
{
struct task_struct *g, *p;
#if BITS_PER_LONG == 32
printk(KERN_INFO
" task PC stack pid father\n");
#else
printk(KERN_INFO
" task PC stack pid father\n");
#endif
rcu_read_lock();
do_each_thread(g, p) {
/*
* reset the NMI-timeout, listing all files on a slow
* console might take a lot of time:
*/
touch_nmi_watchdog();
if (!state_filter || (p->state & state_filter))
sched_show_task(p);
} while_each_thread(g, p);
touch_all_softlockup_watchdogs();
#ifdef CONFIG_SYSRQ_SCHED_DEBUG
sysrq_sched_debug_show();
#endif
rcu_read_unlock();
/*
* Only show locks if all tasks are dumped:
*/
if (!state_filter)
debug_show_all_locks();
}
void __cpuinit init_idle_bootup_task(struct task_struct *idle)
{
idle->sched_class = &idle_sched_class;
}
/**
* init_idle - set up an idle thread for a given CPU
* @idle: task in question
* @cpu: cpu the idle task belongs to
*
* NOTE: this function does not set the idle thread's NEED_RESCHED
* flag, to make booting more robust.
*/
void __cpuinit init_idle(struct task_struct *idle, int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long flags;
raw_spin_lock_irqsave(&rq->lock, flags);
__sched_fork(idle);
idle->state = TASK_RUNNING;
idle->se.exec_start = sched_clock();
do_set_cpus_allowed(idle, cpumask_of(cpu));
/*
* We're having a chicken and egg problem, even though we are
* holding rq->lock, the cpu isn't yet set to this cpu so the
* lockdep check in task_group() will fail.
*
* Similar case to sched_fork(). / Alternatively we could
* use task_rq_lock() here and obtain the other rq->lock.
*
* Silence PROVE_RCU
*/
rcu_read_lock();
__set_task_cpu(idle, cpu);
rcu_read_unlock();
rq->curr = rq->idle = idle;
#if defined(CONFIG_SMP)
idle->on_cpu = 1;
#endif
raw_spin_unlock_irqrestore(&rq->lock, flags);
/* Set the preempt count _outside_ the spinlocks! */
task_thread_info(idle)->preempt_count = 0;
/*
* The idle tasks have their own, simple scheduling class:
*/
idle->sched_class = &idle_sched_class;
ftrace_graph_init_idle_task(idle, cpu);
#if defined(CONFIG_SMP)
sprintf(idle->comm, "%s/%d", INIT_TASK_COMM, cpu);
#endif
}
#ifdef CONFIG_SMP
void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
{
if (p->sched_class && p->sched_class->set_cpus_allowed)
p->sched_class->set_cpus_allowed(p, new_mask);
cpumask_copy(&p->cpus_allowed, new_mask);
p->rt.nr_cpus_allowed = cpumask_weight(new_mask);
}
/*
* This is how migration works:
*
* 1) we invoke migration_cpu_stop() on the target CPU using
* stop_one_cpu().
* 2) stopper starts to run (implicitly forcing the migrated thread
* off the CPU)
* 3) it checks whether the migrated task is still in the wrong runqueue.
* 4) if it's in the wrong runqueue then the migration thread removes
* it and puts it into the right queue.
* 5) stopper completes and stop_one_cpu() returns and the migration
* is done.
*/
/*
* Change a given task's CPU affinity. Migrate the thread to a
* proper CPU and schedule it away if the CPU it's executing on
* is removed from the allowed bitmask.
*
* NOTE: the caller must have a valid reference to the task, the
* task must not exit() & deallocate itself prematurely. The
* call is not atomic; no spinlocks may be held.
*/
int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
{
unsigned long flags;
struct rq *rq;
unsigned int dest_cpu;
int ret = 0;
rq = task_rq_lock(p, &flags);
if (cpumask_equal(&p->cpus_allowed, new_mask))
goto out;
if (!cpumask_intersects(new_mask, cpu_active_mask)) {
ret = -EINVAL;
goto out;
}
if (unlikely((p->flags & PF_THREAD_BOUND) && p != current)) {
ret = -EINVAL;
goto out;
}
do_set_cpus_allowed(p, new_mask);
/* Can the task run on the task's current CPU? If so, we're done */
if (cpumask_test_cpu(task_cpu(p), new_mask))
goto out;
dest_cpu = cpumask_any_and(cpu_active_mask, new_mask);
if (p->on_rq) {
struct migration_arg arg = { p, dest_cpu };
/* Need help from migration thread: drop lock and wait. */
task_rq_unlock(rq, p, &flags);
stop_one_cpu(cpu_of(rq), migration_cpu_stop, &arg);
tlb_migrate_finish(p->mm);
return 0;
}
out:
task_rq_unlock(rq, p, &flags);
return ret;
}
EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr);
/*
* Move (not current) task off this cpu, onto dest cpu. We're doing
* this because either it can't run here any more (set_cpus_allowed()
* away from this CPU, or CPU going down), or because we're
* attempting to rebalance this task on exec (sched_exec).
*
* So we race with normal scheduler movements, but that's OK, as long
* as the task is no longer on this CPU.
*
* Returns non-zero if task was successfully migrated.
*/
static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu)
{
struct rq *rq_dest, *rq_src;
bool moved = false;
int ret = 0;
if (unlikely(!cpu_active(dest_cpu)))
return ret;
rq_src = cpu_rq(src_cpu);
rq_dest = cpu_rq(dest_cpu);
raw_spin_lock(&p->pi_lock);
double_rq_lock(rq_src, rq_dest);
/* Already moved. */
if (task_cpu(p) != src_cpu)
goto done;
/* Affinity changed (again). */
if (!cpumask_test_cpu(dest_cpu, tsk_cpus_allowed(p)))
goto fail;
/*
* If we're not on a rq, the next wake-up will ensure we're
* placed properly.
*/
if (p->on_rq) {
dequeue_task(rq_src, p, 0);
set_task_cpu(p, dest_cpu);
enqueue_task(rq_dest, p, 0);
check_preempt_curr(rq_dest, p, 0);
moved = true;
}
done:
ret = 1;
fail:
double_rq_unlock(rq_src, rq_dest);
raw_spin_unlock(&p->pi_lock);
if (moved && task_notify_on_migrate(p)) {
unsigned long _src_cpu;
_src_cpu = src_cpu;
atomic_notifier_call_chain(&migration_notifier_head,
dest_cpu, (void *)_src_cpu);
}
return ret;
}
/*
* migration_cpu_stop - this will be executed by a highprio stopper thread
* and performs thread migration by bumping thread off CPU then
* 'pushing' onto another runqueue.
*/
static int migration_cpu_stop(void *data)
{
struct migration_arg *arg = data;
/*
* The original target cpu might have gone down and we might
* be on another cpu but it doesn't matter.
*/
local_irq_disable();
__migrate_task(arg->task, raw_smp_processor_id(), arg->dest_cpu);
local_irq_enable();
return 0;
}
#ifdef CONFIG_HOTPLUG_CPU
/*
* Ensures that the idle task is using init_mm right before its cpu goes
* offline.
*/
void idle_task_exit(void)
{
struct mm_struct *mm = current->active_mm;
BUG_ON(cpu_online(smp_processor_id()));
if (mm != &init_mm)
switch_mm(mm, &init_mm, current);
mmdrop(mm);
}
/*
* While a dead CPU has no uninterruptible tasks queued at this point,
* it might still have a nonzero ->nr_uninterruptible counter, because
* for performance reasons the counter is not stricly tracking tasks to
* their home CPUs. So we just add the counter to another CPU's counter,
* to keep the global sum constant after CPU-down:
*/
static void migrate_nr_uninterruptible(struct rq *rq_src)
{
struct rq *rq_dest = cpu_rq(cpumask_any(cpu_active_mask));
rq_dest->nr_uninterruptible += rq_src->nr_uninterruptible;
rq_src->nr_uninterruptible = 0;
}
/*
* remove the tasks which were accounted by rq from calc_load_tasks.
*/
static void calc_global_load_remove(struct rq *rq)
{
atomic_long_sub(rq->calc_load_active, &calc_load_tasks);
rq->calc_load_active = 0;
}
/*
* Migrate all tasks from the rq, sleeping tasks will be migrated by
* try_to_wake_up()->select_task_rq().
*
* Called with rq->lock held even though we'er in stop_machine() and
* there's no concurrency possible, we hold the required locks anyway
* because of lock validation efforts.
*/
static void migrate_tasks(unsigned int dead_cpu)
{
struct rq *rq = cpu_rq(dead_cpu);
struct task_struct *next, *stop = rq->stop;
int dest_cpu;
/*
* Fudge the rq selection such that the below task selection loop
* doesn't get stuck on the currently eligible stop task.
*
* We're currently inside stop_machine() and the rq is either stuck
* in the stop_machine_cpu_stop() loop, or we're executing this code,
* either way we should never end up calling schedule() until we're
* done here.
*/
rq->stop = NULL;
for ( ; ; ) {
/*
* There's this thread running, bail when that's the only
* remaining thread.
*/
if (rq->nr_running == 1)
break;
next = pick_next_task(rq);
BUG_ON(!next);
next->sched_class->put_prev_task(rq, next);
/* Find suitable destination for @next, with force if needed. */
dest_cpu = select_fallback_rq(dead_cpu, next);
raw_spin_unlock(&rq->lock);
__migrate_task(next, dead_cpu, dest_cpu);
raw_spin_lock(&rq->lock);
}
rq->stop = stop;
}
#endif /* CONFIG_HOTPLUG_CPU */
#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
static struct ctl_table sd_ctl_dir[] = {
{
.procname = "sched_domain",
.mode = 0555,
},
{}
};
static struct ctl_table sd_ctl_root[] = {
{
.procname = "kernel",
.mode = 0555,
.child = sd_ctl_dir,
},
{}
};
static struct ctl_table *sd_alloc_ctl_entry(int n)
{
struct ctl_table *entry =
kcalloc(n, sizeof(struct ctl_table), GFP_KERNEL);
return entry;
}
static void sd_free_ctl_entry(struct ctl_table **tablep)
{
struct ctl_table *entry;
/*
* In the intermediate directories, both the child directory and
* procname are dynamically allocated and could fail but the mode
* will always be set. In the lowest directory the names are
* static strings and all have proc handlers.
*/
for (entry = *tablep; entry->mode; entry++) {
if (entry->child)
sd_free_ctl_entry(&entry->child);
if (entry->proc_handler == NULL)
kfree(entry->procname);
}
kfree(*tablep);
*tablep = NULL;
}
static int min_load_idx = 0;
static int max_load_idx = CPU_LOAD_IDX_MAX-1;
static void
set_table_entry(struct ctl_table *entry,
const char *procname, void *data, int maxlen,
umode_t mode, proc_handler *proc_handler,
bool load_idx)
{
entry->procname = procname;
entry->data = data;
entry->maxlen = maxlen;
entry->mode = mode;
entry->proc_handler = proc_handler;
if (load_idx) {
entry->extra1 = &min_load_idx;
entry->extra2 = &max_load_idx;
}
}
static struct ctl_table *
sd_alloc_ctl_domain_table(struct sched_domain *sd)
{
struct ctl_table *table = sd_alloc_ctl_entry(13);
if (table == NULL)
return NULL;
set_table_entry(&table[0], "min_interval", &sd->min_interval,
sizeof(long), 0644, proc_doulongvec_minmax, false);
set_table_entry(&table[1], "max_interval", &sd->max_interval,
sizeof(long), 0644, proc_doulongvec_minmax, false);
set_table_entry(&table[2], "busy_idx", &sd->busy_idx,
sizeof(int), 0644, proc_dointvec_minmax, true);
set_table_entry(&table[3], "idle_idx", &sd->idle_idx,
sizeof(int), 0644, proc_dointvec_minmax, true);
set_table_entry(&table[4], "newidle_idx", &sd->newidle_idx,
sizeof(int), 0644, proc_dointvec_minmax, true);
set_table_entry(&table[5], "wake_idx", &sd->wake_idx,
sizeof(int), 0644, proc_dointvec_minmax, true);
set_table_entry(&table[6], "forkexec_idx", &sd->forkexec_idx,
sizeof(int), 0644, proc_dointvec_minmax, true);
set_table_entry(&table[7], "busy_factor", &sd->busy_factor,
sizeof(int), 0644, proc_dointvec_minmax, false);
set_table_entry(&table[8], "imbalance_pct", &sd->imbalance_pct,
sizeof(int), 0644, proc_dointvec_minmax, false);
set_table_entry(&table[9], "cache_nice_tries",
&sd->cache_nice_tries,
sizeof(int), 0644, proc_dointvec_minmax, false);
set_table_entry(&table[10], "flags", &sd->flags,
sizeof(int), 0644, proc_dointvec_minmax, false);
set_table_entry(&table[11], "name", sd->name,
CORENAME_MAX_SIZE, 0444, proc_dostring, false);
/* &table[12] is terminator */
return table;
}
static ctl_table *sd_alloc_ctl_cpu_table(int cpu)
{
struct ctl_table *entry, *table;
struct sched_domain *sd;
int domain_num = 0, i;
char buf[32];
for_each_domain(cpu, sd)
domain_num++;
entry = table = sd_alloc_ctl_entry(domain_num + 1);
if (table == NULL)
return NULL;
i = 0;
for_each_domain(cpu, sd) {
snprintf(buf, 32, "domain%d", i);
entry->procname = kstrdup(buf, GFP_KERNEL);
entry->mode = 0555;
entry->child = sd_alloc_ctl_domain_table(sd);
entry++;
i++;
}
return table;
}
static struct ctl_table_header *sd_sysctl_header;
static void register_sched_domain_sysctl(void)
{
int i, cpu_num = num_possible_cpus();
struct ctl_table *entry = sd_alloc_ctl_entry(cpu_num + 1);
char buf[32];
WARN_ON(sd_ctl_dir[0].child);
sd_ctl_dir[0].child = entry;
if (entry == NULL)
return;
for_each_possible_cpu(i) {
snprintf(buf, 32, "cpu%d", i);
entry->procname = kstrdup(buf, GFP_KERNEL);
entry->mode = 0555;
entry->child = sd_alloc_ctl_cpu_table(i);
entry++;
}
WARN_ON(sd_sysctl_header);
sd_sysctl_header = register_sysctl_table(sd_ctl_root);
}
/* may be called multiple times per register */
static void unregister_sched_domain_sysctl(void)
{
if (sd_sysctl_header)
unregister_sysctl_table(sd_sysctl_header);
sd_sysctl_header = NULL;
if (sd_ctl_dir[0].child)
sd_free_ctl_entry(&sd_ctl_dir[0].child);
}
#else
static void register_sched_domain_sysctl(void)
{
}
static void unregister_sched_domain_sysctl(void)
{
}
#endif
static void set_rq_online(struct rq *rq)
{
if (!rq->online) {
const struct sched_class *class;
cpumask_set_cpu(rq->cpu, rq->rd->online);
rq->online = 1;
for_each_class(class) {
if (class->rq_online)
class->rq_online(rq);
}
}
}
static void set_rq_offline(struct rq *rq)
{
if (rq->online) {
const struct sched_class *class;
for_each_class(class) {
if (class->rq_offline)
class->rq_offline(rq);
}
cpumask_clear_cpu(rq->cpu, rq->rd->online);
rq->online = 0;
}
}
/*
* migration_call - callback that gets triggered when a CPU is added.
* Here we can start up the necessary migration thread for the new CPU.
*/
static int __cpuinit
migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
{
int cpu = (long)hcpu;
unsigned long flags;
struct rq *rq = cpu_rq(cpu);
switch (action & ~CPU_TASKS_FROZEN) {
case CPU_UP_PREPARE:
rq->calc_load_update = calc_load_update;
break;
case CPU_ONLINE:
/* Update our root-domain */
raw_spin_lock_irqsave(&rq->lock, flags);
if (rq->rd) {
BUG_ON(!cpumask_test_cpu(cpu, rq->rd->span));
set_rq_online(rq);
}
raw_spin_unlock_irqrestore(&rq->lock, flags);
break;
#ifdef CONFIG_HOTPLUG_CPU
case CPU_DYING:
sched_ttwu_pending();
/* Update our root-domain */
raw_spin_lock_irqsave(&rq->lock, flags);
if (rq->rd) {
BUG_ON(!cpumask_test_cpu(cpu, rq->rd->span));
set_rq_offline(rq);
}
migrate_tasks(cpu);
BUG_ON(rq->nr_running != 1); /* the migration thread */
raw_spin_unlock_irqrestore(&rq->lock, flags);
migrate_nr_uninterruptible(rq);
calc_global_load_remove(rq);
break;
#endif
}
update_max_interval();
return NOTIFY_OK;
}
/*
* Register at high priority so that task migration (migrate_all_tasks)
* happens before everything else. This has to be lower priority than
* the notifier in the perf_event subsystem, though.
*/
static struct notifier_block __cpuinitdata migration_notifier = {
.notifier_call = migration_call,
.priority = CPU_PRI_MIGRATION,
};
static int __cpuinit sched_cpu_active(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
switch (action & ~CPU_TASKS_FROZEN) {
case CPU_DOWN_FAILED:
set_cpu_active((long)hcpu, true);
return NOTIFY_OK;
default:
return NOTIFY_DONE;
}
}
static int __cpuinit sched_cpu_inactive(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
switch (action & ~CPU_TASKS_FROZEN) {
case CPU_DOWN_PREPARE:
set_cpu_active((long)hcpu, false);
return NOTIFY_OK;
default:
return NOTIFY_DONE;
}
}
static int __init migration_init(void)
{
void *cpu = (void *)(long)smp_processor_id();
int err;
/* Initialize migration for the boot CPU */
err = migration_call(&migration_notifier, CPU_UP_PREPARE, cpu);
BUG_ON(err == NOTIFY_BAD);
migration_call(&migration_notifier, CPU_ONLINE, cpu);
register_cpu_notifier(&migration_notifier);
/* Register cpu active notifiers */
cpu_notifier(sched_cpu_active, CPU_PRI_SCHED_ACTIVE);
cpu_notifier(sched_cpu_inactive, CPU_PRI_SCHED_INACTIVE);
return 0;
}
early_initcall(migration_init);
#endif
#ifdef CONFIG_SMP
static cpumask_var_t sched_domains_tmpmask; /* sched_domains_mutex */
#ifdef CONFIG_SCHED_DEBUG
static __read_mostly int sched_domain_debug_enabled;
static int __init sched_domain_debug_setup(char *str)
{
sched_domain_debug_enabled = 1;
return 0;
}
early_param("sched_debug", sched_domain_debug_setup);
static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
struct cpumask *groupmask)
{
struct sched_group *group = sd->groups;
char str[256];
cpulist_scnprintf(str, sizeof(str), sched_domain_span(sd));
cpumask_clear(groupmask);
printk(KERN_DEBUG "%*s domain %d: ", level, "", level);
if (!(sd->flags & SD_LOAD_BALANCE)) {
printk("does not load-balance\n");
if (sd->parent)
printk(KERN_ERR "ERROR: !SD_LOAD_BALANCE domain"
" has parent");
return -1;
}
printk(KERN_CONT "span %s level %s\n", str, sd->name);
if (!cpumask_test_cpu(cpu, sched_domain_span(sd))) {
printk(KERN_ERR "ERROR: domain->span does not contain "
"CPU%d\n", cpu);
}
if (!cpumask_test_cpu(cpu, sched_group_cpus(group))) {
printk(KERN_ERR "ERROR: domain->groups does not contain"
" CPU%d\n", cpu);
}
printk(KERN_DEBUG "%*s groups:", level + 1, "");
do {
if (!group) {
printk("\n");
printk(KERN_ERR "ERROR: group is NULL\n");
break;
}
if (!group->sgp->power) {
printk(KERN_CONT "\n");
printk(KERN_ERR "ERROR: domain->cpu_power not "
"set\n");
break;
}
if (!cpumask_weight(sched_group_cpus(group))) {
printk(KERN_CONT "\n");
printk(KERN_ERR "ERROR: empty group\n");
break;
}
if (cpumask_intersects(groupmask, sched_group_cpus(group))) {
printk(KERN_CONT "\n");
printk(KERN_ERR "ERROR: repeated CPUs\n");
break;
}
cpumask_or(groupmask, groupmask, sched_group_cpus(group));
cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
printk(KERN_CONT " %s", str);
if (group->sgp->power != SCHED_POWER_SCALE) {
printk(KERN_CONT " (cpu_power = %d)",
group->sgp->power);
}
group = group->next;
} while (group != sd->groups);
printk(KERN_CONT "\n");
if (!cpumask_equal(sched_domain_span(sd), groupmask))
printk(KERN_ERR "ERROR: groups don't span domain->span\n");
if (sd->parent &&
!cpumask_subset(groupmask, sched_domain_span(sd->parent)))
printk(KERN_ERR "ERROR: parent span is not a superset "
"of domain->span\n");
return 0;
}
static void sched_domain_debug(struct sched_domain *sd, int cpu)
{
int level = 0;
if (!sched_domain_debug_enabled)
return;
if (!sd) {
printk(KERN_DEBUG "CPU%d attaching NULL sched-domain.\n", cpu);
return;
}
printk(KERN_DEBUG "CPU%d attaching sched-domain:\n", cpu);
for (;;) {
if (sched_domain_debug_one(sd, cpu, level, sched_domains_tmpmask))
break;
level++;
sd = sd->parent;
if (!sd)
break;
}
}
#else /* !CONFIG_SCHED_DEBUG */
# define sched_domain_debug(sd, cpu) do { } while (0)
#endif /* CONFIG_SCHED_DEBUG */
static int sd_degenerate(struct sched_domain *sd)
{
if (cpumask_weight(sched_domain_span(sd)) == 1)
return 1;
/* Following flags need at least 2 groups */
if (sd->flags & (SD_LOAD_BALANCE |
SD_BALANCE_NEWIDLE |
SD_BALANCE_FORK |
SD_BALANCE_EXEC |
SD_SHARE_CPUPOWER |
SD_SHARE_PKG_RESOURCES)) {
if (sd->groups != sd->groups->next)
return 0;
}
/* Following flags don't use groups */
if (sd->flags & (SD_WAKE_AFFINE))
return 0;
return 1;
}
static int
sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent)
{
unsigned long cflags = sd->flags, pflags = parent->flags;
if (sd_degenerate(parent))
return 1;
if (!cpumask_equal(sched_domain_span(sd), sched_domain_span(parent)))
return 0;
/* Flags needing groups don't count if only 1 group in parent */
if (parent->groups == parent->groups->next) {
pflags &= ~(SD_LOAD_BALANCE |
SD_BALANCE_NEWIDLE |
SD_BALANCE_FORK |
SD_BALANCE_EXEC |
SD_SHARE_CPUPOWER |
SD_SHARE_PKG_RESOURCES);
if (nr_node_ids == 1)
pflags &= ~SD_SERIALIZE;
}
if (~cflags & pflags)
return 0;
return 1;
}
static void free_rootdomain(struct rcu_head *rcu)
{
struct root_domain *rd = container_of(rcu, struct root_domain, rcu);
cpupri_cleanup(&rd->cpupri);
free_cpumask_var(rd->rto_mask);
free_cpumask_var(rd->online);
free_cpumask_var(rd->span);
kfree(rd);
}
static void rq_attach_root(struct rq *rq, struct root_domain *rd)
{
struct root_domain *old_rd = NULL;
unsigned long flags;
raw_spin_lock_irqsave(&rq->lock, flags);
if (rq->rd) {
old_rd = rq->rd;
if (cpumask_test_cpu(rq->cpu, old_rd->online))
set_rq_offline(rq);
cpumask_clear_cpu(rq->cpu, old_rd->span);
/*
* If we dont want to free the old_rt yet then
* set old_rd to NULL to skip the freeing later
* in this function:
*/
if (!atomic_dec_and_test(&old_rd->refcount))
old_rd = NULL;
}
atomic_inc(&rd->refcount);
rq->rd = rd;
cpumask_set_cpu(rq->cpu, rd->span);
if (cpumask_test_cpu(rq->cpu, cpu_active_mask))
set_rq_online(rq);
raw_spin_unlock_irqrestore(&rq->lock, flags);
if (old_rd)
call_rcu_sched(&old_rd->rcu, free_rootdomain);
}
static int init_rootdomain(struct root_domain *rd)
{
memset(rd, 0, sizeof(*rd));
if (!alloc_cpumask_var(&rd->span, GFP_KERNEL))
goto out;
if (!alloc_cpumask_var(&rd->online, GFP_KERNEL))
goto free_span;
if (!alloc_cpumask_var(&rd->rto_mask, GFP_KERNEL))
goto free_online;
if (cpupri_init(&rd->cpupri) != 0)
goto free_rto_mask;
return 0;
free_rto_mask:
free_cpumask_var(rd->rto_mask);
free_online:
free_cpumask_var(rd->online);
free_span:
free_cpumask_var(rd->span);
out:
return -ENOMEM;
}
/*
* By default the system creates a single root-domain with all cpus as
* members (mimicking the global state we have today).
*/
struct root_domain def_root_domain;
static void init_defrootdomain(void)
{
init_rootdomain(&def_root_domain);
atomic_set(&def_root_domain.refcount, 1);
}
static struct root_domain *alloc_rootdomain(void)
{
struct root_domain *rd;
rd = kmalloc(sizeof(*rd), GFP_KERNEL);
if (!rd)
return NULL;
if (init_rootdomain(rd) != 0) {
kfree(rd);
return NULL;
}
return rd;
}
static void free_sched_groups(struct sched_group *sg, int free_sgp)
{
struct sched_group *tmp, *first;
if (!sg)
return;
first = sg;
do {
tmp = sg->next;
if (free_sgp && atomic_dec_and_test(&sg->sgp->ref))
kfree(sg->sgp);
kfree(sg);
sg = tmp;
} while (sg != first);
}
static void free_sched_domain(struct rcu_head *rcu)
{
struct sched_domain *sd = container_of(rcu, struct sched_domain, rcu);
/*
* If its an overlapping domain it has private groups, iterate and
* nuke them all.
*/
if (sd->flags & SD_OVERLAP) {
free_sched_groups(sd->groups, 1);
} else if (atomic_dec_and_test(&sd->groups->ref)) {
kfree(sd->groups->sgp);
kfree(sd->groups);
}
kfree(sd);
}
static void destroy_sched_domain(struct sched_domain *sd, int cpu)
{
call_rcu(&sd->rcu, free_sched_domain);
}
static void destroy_sched_domains(struct sched_domain *sd, int cpu)
{
for (; sd; sd = sd->parent)
destroy_sched_domain(sd, cpu);
}
/*
* Keep a special pointer to the highest sched_domain that has
* SD_SHARE_PKG_RESOURCE set (Last Level Cache Domain) for this
* allows us to avoid some pointer chasing select_idle_sibling().
*
* Also keep a unique ID per domain (we use the first cpu number in
* the cpumask of the domain), this allows us to quickly tell if
* two cpus are in the same cache domain, see cpus_share_cache().
*/
DEFINE_PER_CPU(struct sched_domain *, sd_llc);
DEFINE_PER_CPU(int, sd_llc_size);
DEFINE_PER_CPU(int, sd_llc_id);
static void update_top_cache_domain(int cpu)
{
struct sched_domain *sd;
int id = cpu;
int size = 1;
sd = highest_flag_domain(cpu, SD_SHARE_PKG_RESOURCES);
if (sd) {
id = cpumask_first(sched_domain_span(sd));
size = cpumask_weight(sched_domain_span(sd));
}
rcu_assign_pointer(per_cpu(sd_llc, cpu), sd);
per_cpu(sd_llc_size, cpu) = size;
per_cpu(sd_llc_id, cpu) = id;
}
/*
* Attach the domain 'sd' to 'cpu' as its base domain. Callers must
* hold the hotplug lock.
*/
static void
cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
{
struct rq *rq = cpu_rq(cpu);
struct sched_domain *tmp;
unsigned long next_balance = rq->next_balance;
/* Remove the sched domains which do not contribute to scheduling. */
for (tmp = sd; tmp; ) {
struct sched_domain *parent = tmp->parent;
if (!parent)
break;
if (sd_parent_degenerate(tmp, parent)) {
tmp->parent = parent->parent;
if (parent->parent)
parent->parent->child = tmp;
destroy_sched_domain(parent, cpu);
} else
tmp = tmp->parent;
}
if (sd && sd_degenerate(sd)) {
tmp = sd;
sd = sd->parent;
destroy_sched_domain(tmp, cpu);
if (sd)
sd->child = NULL;
}
for (tmp = sd; tmp; ) {
unsigned long interval;
interval = msecs_to_jiffies(tmp->balance_interval);
if (time_after(next_balance, tmp->last_balance + interval))
next_balance = tmp->last_balance + interval;
tmp = tmp->parent;
}
rq->next_balance = next_balance;
sched_domain_debug(sd, cpu);
rq_attach_root(rq, rd);
tmp = rq->sd;
rcu_assign_pointer(rq->sd, sd);
destroy_sched_domains(tmp, cpu);
update_top_cache_domain(cpu);
}
/* cpus with isolated domains */
static cpumask_var_t cpu_isolated_map;
/* Setup the mask of cpus configured for isolated domains */
static int __init isolated_cpu_setup(char *str)
{
alloc_bootmem_cpumask_var(&cpu_isolated_map);
cpulist_parse(str, cpu_isolated_map);
return 1;
}
__setup("isolcpus=", isolated_cpu_setup);
#ifdef CONFIG_NUMA
/**
* find_next_best_node - find the next node to include in a sched_domain
* @node: node whose sched_domain we're building
* @used_nodes: nodes already in the sched_domain
*
* Find the next node to include in a given scheduling domain. Simply
* finds the closest node not already in the @used_nodes map.
*
* Should use nodemask_t.
*/
static int find_next_best_node(int node, nodemask_t *used_nodes)
{
int i, n, val, min_val, best_node = -1;
min_val = INT_MAX;
for (i = 0; i < nr_node_ids; i++) {
/* Start at @node */
n = (node + i) % nr_node_ids;
if (!nr_cpus_node(n))
continue;
/* Skip already used nodes */
if (node_isset(n, *used_nodes))
continue;
/* Simple min distance search */
val = node_distance(node, n);
if (val < min_val) {
min_val = val;
best_node = n;
}
}
if (best_node != -1)
node_set(best_node, *used_nodes);
return best_node;
}
/**
* sched_domain_node_span - get a cpumask for a node's sched_domain
* @node: node whose cpumask we're constructing
* @span: resulting cpumask
*
* Given a node, construct a good cpumask for its sched_domain to span. It
* should be one that prevents unnecessary balancing, but also spreads tasks
* out optimally.
*/
static void sched_domain_node_span(int node, struct cpumask *span)
{
nodemask_t used_nodes;
int i;
cpumask_clear(span);
nodes_clear(used_nodes);
cpumask_or(span, span, cpumask_of_node(node));
node_set(node, used_nodes);
for (i = 1; i < SD_NODES_PER_DOMAIN; i++) {
int next_node = find_next_best_node(node, &used_nodes);
if (next_node < 0)
break;
cpumask_or(span, span, cpumask_of_node(next_node));
}
}
static const struct cpumask *cpu_node_mask(int cpu)
{
lockdep_assert_held(&sched_domains_mutex);
sched_domain_node_span(cpu_to_node(cpu), sched_domains_tmpmask);
return sched_domains_tmpmask;
}
static const struct cpumask *cpu_allnodes_mask(int cpu)
{
return cpu_possible_mask;
}
#endif /* CONFIG_NUMA */
static const struct cpumask *cpu_cpu_mask(int cpu)
{
return cpumask_of_node(cpu_to_node(cpu));
}
int sched_smt_power_savings = 0, sched_mc_power_savings = 1;
struct sd_data {
struct sched_domain **__percpu sd;
struct sched_group **__percpu sg;
struct sched_group_power **__percpu sgp;
};
struct s_data {
struct sched_domain ** __percpu sd;
struct root_domain *rd;
};
enum s_alloc {
sa_rootdomain,
sa_sd,
sa_sd_storage,
sa_none,
};
struct sched_domain_topology_level;
typedef struct sched_domain *(*sched_domain_init_f)(struct sched_domain_topology_level *tl, int cpu);
typedef const struct cpumask *(*sched_domain_mask_f)(int cpu);
#define SDTL_OVERLAP 0x01
struct sched_domain_topology_level {
sched_domain_init_f init;
sched_domain_mask_f mask;
int flags;
struct sd_data data;
};
static int
build_overlap_sched_groups(struct sched_domain *sd, int cpu)
{
struct sched_group *first = NULL, *last = NULL, *groups = NULL, *sg;
const struct cpumask *span = sched_domain_span(sd);
struct cpumask *covered = sched_domains_tmpmask;
struct sd_data *sdd = sd->private;
struct sched_domain *child;
int i;
cpumask_clear(covered);
for_each_cpu(i, span) {
struct cpumask *sg_span;
if (cpumask_test_cpu(i, covered))
continue;
sg = kzalloc_node(sizeof(struct sched_group) + cpumask_size(),
GFP_KERNEL, cpu_to_node(cpu));
if (!sg)
goto fail;
sg_span = sched_group_cpus(sg);
child = *per_cpu_ptr(sdd->sd, i);
if (child->child) {
child = child->child;
cpumask_copy(sg_span, sched_domain_span(child));
} else
cpumask_set_cpu(i, sg_span);
cpumask_or(covered, covered, sg_span);
sg->sgp = *per_cpu_ptr(sdd->sgp, cpumask_first(sg_span));
atomic_inc(&sg->sgp->ref);
if (cpumask_test_cpu(cpu, sg_span))
groups = sg;
if (!first)
first = sg;
if (last)
last->next = sg;
last = sg;
last->next = first;
}
sd->groups = groups;
return 0;
fail:
free_sched_groups(first, 0);
return -ENOMEM;
}
static int get_group(int cpu, struct sd_data *sdd, struct sched_group **sg)
{
struct sched_domain *sd = *per_cpu_ptr(sdd->sd, cpu);
struct sched_domain *child = sd->child;
if (child)
cpu = cpumask_first(sched_domain_span(child));
if (sg) {
*sg = *per_cpu_ptr(sdd->sg, cpu);
(*sg)->sgp = *per_cpu_ptr(sdd->sgp, cpu);
atomic_set(&(*sg)->sgp->ref, 1); /* for claim_allocations */
}
return cpu;
}
/*
* build_sched_groups will build a circular linked list of the groups
* covered by the given span, and will set each group's ->cpumask correctly,
* and ->cpu_power to 0.
*
* Assumes the sched_domain tree is fully constructed
*/
static int
build_sched_groups(struct sched_domain *sd, int cpu)
{
struct sched_group *first = NULL, *last = NULL;
struct sd_data *sdd = sd->private;
const struct cpumask *span = sched_domain_span(sd);
struct cpumask *covered;
int i;
get_group(cpu, sdd, &sd->groups);
atomic_inc(&sd->groups->ref);
if (cpu != cpumask_first(sched_domain_span(sd)))
return 0;
lockdep_assert_held(&sched_domains_mutex);
covered = sched_domains_tmpmask;
cpumask_clear(covered);
for_each_cpu(i, span) {
struct sched_group *sg;
int group = get_group(i, sdd, &sg);
int j;
if (cpumask_test_cpu(i, covered))
continue;
cpumask_clear(sched_group_cpus(sg));
sg->sgp->power = 0;
for_each_cpu(j, span) {
if (get_group(j, sdd, NULL) != group)
continue;
cpumask_set_cpu(j, covered);
cpumask_set_cpu(j, sched_group_cpus(sg));
}
if (!first)
first = sg;
if (last)
last->next = sg;
last = sg;
}
last->next = first;
return 0;
}
/*
* Initialize sched groups cpu_power.
*
* cpu_power indicates the capacity of sched group, which is used while
* distributing the load between different sched groups in a sched domain.
* Typically cpu_power for all the groups in a sched domain will be same unless
* there are asymmetries in the topology. If there are asymmetries, group
* having more cpu_power will pickup more load compared to the group having
* less cpu_power.
*/
static void init_sched_groups_power(int cpu, struct sched_domain *sd)
{
struct sched_group *sg = sd->groups;
WARN_ON(!sd || !sg);
do {
sg->group_weight = cpumask_weight(sched_group_cpus(sg));
sg = sg->next;
} while (sg != sd->groups);
if (cpu != group_first_cpu(sg))
return;
update_group_power(sd, cpu);
atomic_set(&sg->sgp->nr_busy_cpus, sg->group_weight);
}
int __weak arch_sd_sibling_asym_packing(void)
{
return 0*SD_ASYM_PACKING;
}
/*
* Initializers for schedule domains
* Non-inlined to reduce accumulated stack pressure in build_sched_domains()
*/
#ifdef CONFIG_SCHED_DEBUG
# define SD_INIT_NAME(sd, type) sd->name = #type
#else
# define SD_INIT_NAME(sd, type) do { } while (0)
#endif
#define SD_INIT_FUNC(type) \
static noinline struct sched_domain * \
sd_init_##type(struct sched_domain_topology_level *tl, int cpu) \
{ \
struct sched_domain *sd = *per_cpu_ptr(tl->data.sd, cpu); \
*sd = SD_##type##_INIT; \
SD_INIT_NAME(sd, type); \
sd->private = &tl->data; \
return sd; \
}
SD_INIT_FUNC(CPU)
#ifdef CONFIG_NUMA
SD_INIT_FUNC(ALLNODES)
SD_INIT_FUNC(NODE)
#endif
#ifdef CONFIG_SCHED_SMT
SD_INIT_FUNC(SIBLING)
#endif
#ifdef CONFIG_SCHED_MC
SD_INIT_FUNC(MC)
#endif
#ifdef CONFIG_SCHED_BOOK
SD_INIT_FUNC(BOOK)
#endif
static int default_relax_domain_level = -1;
int sched_domain_level_max;
static int __init setup_relax_domain_level(char *str)
{
unsigned long val;
val = simple_strtoul(str, NULL, 0);
if (val < sched_domain_level_max)
default_relax_domain_level = val;
return 1;
}
__setup("relax_domain_level=", setup_relax_domain_level);
static void set_domain_attribute(struct sched_domain *sd,
struct sched_domain_attr *attr)
{
int request;
if (!attr || attr->relax_domain_level < 0) {
if (default_relax_domain_level < 0)
return;
else
request = default_relax_domain_level;
} else
request = attr->relax_domain_level;
if (request < sd->level) {
/* turn off idle balance on this domain */
sd->flags &= ~(SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE);
} else {
/* turn on idle balance on this domain */
sd->flags |= (SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE);
}
}
static void __sdt_free(const struct cpumask *cpu_map);
static int __sdt_alloc(const struct cpumask *cpu_map);
static void __free_domain_allocs(struct s_data *d, enum s_alloc what,
const struct cpumask *cpu_map)
{
switch (what) {
case sa_rootdomain:
if (!atomic_read(&d->rd->refcount))
free_rootdomain(&d->rd->rcu); /* fall through */
case sa_sd:
free_percpu(d->sd); /* fall through */
case sa_sd_storage:
__sdt_free(cpu_map); /* fall through */
case sa_none:
break;
}
}
static enum s_alloc __visit_domain_allocation_hell(struct s_data *d,
const struct cpumask *cpu_map)
{
memset(d, 0, sizeof(*d));
if (__sdt_alloc(cpu_map))
return sa_sd_storage;
d->sd = alloc_percpu(struct sched_domain *);
if (!d->sd)
return sa_sd_storage;
d->rd = alloc_rootdomain();
if (!d->rd)
return sa_sd;
return sa_rootdomain;
}
/*
* NULL the sd_data elements we've used to build the sched_domain and
* sched_group structure so that the subsequent __free_domain_allocs()
* will not free the data we're using.
*/
static void claim_allocations(int cpu, struct sched_domain *sd)
{
struct sd_data *sdd = sd->private;
WARN_ON_ONCE(*per_cpu_ptr(sdd->sd, cpu) != sd);
*per_cpu_ptr(sdd->sd, cpu) = NULL;
if (atomic_read(&(*per_cpu_ptr(sdd->sg, cpu))->ref))
*per_cpu_ptr(sdd->sg, cpu) = NULL;
if (atomic_read(&(*per_cpu_ptr(sdd->sgp, cpu))->ref))
*per_cpu_ptr(sdd->sgp, cpu) = NULL;
}
#ifdef CONFIG_SCHED_SMT
static const struct cpumask *cpu_smt_mask(int cpu)
{
return topology_thread_cpumask(cpu);
}
#endif
/*
* Topology list, bottom-up.
*/
static struct sched_domain_topology_level default_topology[] = {
#ifdef CONFIG_SCHED_SMT
{ sd_init_SIBLING, cpu_smt_mask, },
#endif
#ifdef CONFIG_SCHED_MC
{ sd_init_MC, cpu_coregroup_mask, },
#endif
#ifdef CONFIG_SCHED_BOOK
{ sd_init_BOOK, cpu_book_mask, },
#endif
{ sd_init_CPU, cpu_cpu_mask, },
#ifdef CONFIG_NUMA
{ sd_init_NODE, cpu_node_mask, SDTL_OVERLAP, },
{ sd_init_ALLNODES, cpu_allnodes_mask, },
#endif
{ NULL, },
};
static struct sched_domain_topology_level *sched_domain_topology = default_topology;
static int __sdt_alloc(const struct cpumask *cpu_map)
{
struct sched_domain_topology_level *tl;
int j;
for (tl = sched_domain_topology; tl->init; tl++) {
struct sd_data *sdd = &tl->data;
sdd->sd = alloc_percpu(struct sched_domain *);
if (!sdd->sd)
return -ENOMEM;
sdd->sg = alloc_percpu(struct sched_group *);
if (!sdd->sg)
return -ENOMEM;
sdd->sgp = alloc_percpu(struct sched_group_power *);
if (!sdd->sgp)
return -ENOMEM;
for_each_cpu(j, cpu_map) {
struct sched_domain *sd;
struct sched_group *sg;
struct sched_group_power *sgp;
sd = kzalloc_node(sizeof(struct sched_domain) + cpumask_size(),
GFP_KERNEL, cpu_to_node(j));
if (!sd)
return -ENOMEM;
*per_cpu_ptr(sdd->sd, j) = sd;
sg = kzalloc_node(sizeof(struct sched_group) + cpumask_size(),
GFP_KERNEL, cpu_to_node(j));
if (!sg)
return -ENOMEM;
sg->next = sg;
*per_cpu_ptr(sdd->sg, j) = sg;
sgp = kzalloc_node(sizeof(struct sched_group_power),
GFP_KERNEL, cpu_to_node(j));
if (!sgp)
return -ENOMEM;
*per_cpu_ptr(sdd->sgp, j) = sgp;
}
}
return 0;
}
static void __sdt_free(const struct cpumask *cpu_map)
{
struct sched_domain_topology_level *tl;
int j;
for (tl = sched_domain_topology; tl->init; tl++) {
struct sd_data *sdd = &tl->data;
for_each_cpu(j, cpu_map) {
struct sched_domain *sd;
if (sdd->sd) {
sd = *per_cpu_ptr(sdd->sd, j);
if (sd && (sd->flags & SD_OVERLAP))
free_sched_groups(sd->groups, 0);
kfree(*per_cpu_ptr(sdd->sd, j));
}
if (sdd->sg)
kfree(*per_cpu_ptr(sdd->sg, j));
if (sdd->sgp)
kfree(*per_cpu_ptr(sdd->sgp, j));
}
free_percpu(sdd->sd);
sdd->sd = NULL;
free_percpu(sdd->sg);
sdd->sg = NULL;
free_percpu(sdd->sgp);
sdd->sgp = NULL;
}
}
struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,
struct s_data *d, const struct cpumask *cpu_map,
struct sched_domain_attr *attr, struct sched_domain *child,
int cpu)
{
struct sched_domain *sd = tl->init(tl, cpu);
if (!sd)
return child;
set_domain_attribute(sd, attr);
cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
if (child) {
sd->level = child->level + 1;
sched_domain_level_max = max(sched_domain_level_max, sd->level);
child->parent = sd;
}
sd->child = child;
return sd;
}
/*
* Build sched domains for a given set of cpus and attach the sched domains
* to the individual cpus
*/
static int build_sched_domains(const struct cpumask *cpu_map,
struct sched_domain_attr *attr)
{
enum s_alloc alloc_state = sa_none;
struct sched_domain *sd;
struct s_data d;
int i, ret = -ENOMEM;
alloc_state = __visit_domain_allocation_hell(&d, cpu_map);
if (alloc_state != sa_rootdomain)
goto error;
/* Set up domains for cpus specified by the cpu_map. */
for_each_cpu(i, cpu_map) {
struct sched_domain_topology_level *tl;
sd = NULL;
for (tl = sched_domain_topology; tl->init; tl++) {
sd = build_sched_domain(tl, &d, cpu_map, attr, sd, i);
if (tl->flags & SDTL_OVERLAP || sched_feat(FORCE_SD_OVERLAP))
sd->flags |= SD_OVERLAP;
if (cpumask_equal(cpu_map, sched_domain_span(sd)))
break;
}
while (sd->child)
sd = sd->child;
*per_cpu_ptr(d.sd, i) = sd;
}
/* Build the groups for the domains */
for_each_cpu(i, cpu_map) {
for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
sd->span_weight = cpumask_weight(sched_domain_span(sd));
if (sd->flags & SD_OVERLAP) {
if (build_overlap_sched_groups(sd, i))
goto error;
} else {
if (build_sched_groups(sd, i))
goto error;
}
}
}
/* Calculate CPU power for physical packages and nodes */
for (i = nr_cpumask_bits-1; i >= 0; i--) {
if (!cpumask_test_cpu(i, cpu_map))
continue;
for (sd = *per_cpu_ptr(d.sd, i); sd; sd = sd->parent) {
claim_allocations(i, sd);
init_sched_groups_power(i, sd);
}
}
/* Attach the domains */
rcu_read_lock();
for_each_cpu(i, cpu_map) {
sd = *per_cpu_ptr(d.sd, i);
cpu_attach_domain(sd, d.rd, i);
}
rcu_read_unlock();
ret = 0;
error:
__free_domain_allocs(&d, alloc_state, cpu_map);
return ret;
}
static cpumask_var_t *doms_cur; /* current sched domains */
static int ndoms_cur; /* number of sched domains in 'doms_cur' */
static struct sched_domain_attr *dattr_cur;
/* attribues of custom domains in 'doms_cur' */
/*
* Special case: If a kmalloc of a doms_cur partition (array of
* cpumask) fails, then fallback to a single sched domain,
* as determined by the single cpumask fallback_doms.
*/
static cpumask_var_t fallback_doms;
/*
* arch_update_cpu_topology lets virtualized architectures update the
* cpu core maps. It is supposed to return 1 if the topology changed
* or 0 if it stayed the same.
*/
int __attribute__((weak)) arch_update_cpu_topology(void)
{
return 0;
}
cpumask_var_t *alloc_sched_domains(unsigned int ndoms)
{
int i;
cpumask_var_t *doms;
doms = kmalloc(sizeof(*doms) * ndoms, GFP_KERNEL);
if (!doms)
return NULL;
for (i = 0; i < ndoms; i++) {
if (!alloc_cpumask_var(&doms[i], GFP_KERNEL)) {
free_sched_domains(doms, i);
return NULL;
}
}
return doms;
}
void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms)
{
unsigned int i;
for (i = 0; i < ndoms; i++)
free_cpumask_var(doms[i]);
kfree(doms);
}
/*
* Set up scheduler domains and groups. Callers must hold the hotplug lock.
* For now this just excludes isolated cpus, but could be used to
* exclude other special cases in the future.
*/
static int init_sched_domains(const struct cpumask *cpu_map)
{
int err;
arch_update_cpu_topology();
ndoms_cur = 1;
doms_cur = alloc_sched_domains(ndoms_cur);
if (!doms_cur)
doms_cur = &fallback_doms;
cpumask_andnot(doms_cur[0], cpu_map, cpu_isolated_map);
dattr_cur = NULL;
err = build_sched_domains(doms_cur[0], NULL);
register_sched_domain_sysctl();
return err;
}
/*
* Detach sched domains from a group of cpus specified in cpu_map
* These cpus will now be attached to the NULL domain
*/
static void detach_destroy_domains(const struct cpumask *cpu_map)
{
int i;
rcu_read_lock();
for_each_cpu(i, cpu_map)
cpu_attach_domain(NULL, &def_root_domain, i);
rcu_read_unlock();
}
/* handle null as "default" */
static int dattrs_equal(struct sched_domain_attr *cur, int idx_cur,
struct sched_domain_attr *new, int idx_new)
{
struct sched_domain_attr tmp;
/* fast path */
if (!new && !cur)
return 1;
tmp = SD_ATTR_INIT;
return !memcmp(cur ? (cur + idx_cur) : &tmp,
new ? (new + idx_new) : &tmp,
sizeof(struct sched_domain_attr));
}
/*
* Partition sched domains as specified by the 'ndoms_new'
* cpumasks in the array doms_new[] of cpumasks. This compares
* doms_new[] to the current sched domain partitioning, doms_cur[].
* It destroys each deleted domain and builds each new domain.
*
* 'doms_new' is an array of cpumask_var_t's of length 'ndoms_new'.
* The masks don't intersect (don't overlap.) We should setup one
* sched domain for each mask. CPUs not in any of the cpumasks will
* not be load balanced. If the same cpumask appears both in the
* current 'doms_cur' domains and in the new 'doms_new', we can leave
* it as it is.
*
* The passed in 'doms_new' should be allocated using
* alloc_sched_domains. This routine takes ownership of it and will
* free_sched_domains it when done with it. If the caller failed the
* alloc call, then it can pass in doms_new == NULL && ndoms_new == 1,
* and partition_sched_domains() will fallback to the single partition
* 'fallback_doms', it also forces the domains to be rebuilt.
*
* If doms_new == NULL it will be replaced with cpu_online_mask.
* ndoms_new == 0 is a special case for destroying existing domains,
* and it will not create the default domain.
*
* Call with hotplug lock held
*/
void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[],
struct sched_domain_attr *dattr_new)
{
int i, j, n;
int new_topology;
mutex_lock(&sched_domains_mutex);
/* always unregister in case we don't destroy any domains */
unregister_sched_domain_sysctl();
/* Let architecture update cpu core mappings. */
new_topology = arch_update_cpu_topology();
n = doms_new ? ndoms_new : 0;
/* Destroy deleted domains */
for (i = 0; i < ndoms_cur; i++) {
for (j = 0; j < n && !new_topology; j++) {
if (cpumask_equal(doms_cur[i], doms_new[j])
&& dattrs_equal(dattr_cur, i, dattr_new, j))
goto match1;
}
/* no match - a current sched domain not in new doms_new[] */
detach_destroy_domains(doms_cur[i]);
match1:
;
}
if (doms_new == NULL) {
ndoms_cur = 0;
doms_new = &fallback_doms;
cpumask_andnot(doms_new[0], cpu_active_mask, cpu_isolated_map);
WARN_ON_ONCE(dattr_new);
}
/* Build new domains */
for (i = 0; i < ndoms_new; i++) {
for (j = 0; j < ndoms_cur && !new_topology; j++) {
if (cpumask_equal(doms_new[i], doms_cur[j])
&& dattrs_equal(dattr_new, i, dattr_cur, j))
goto match2;
}
/* no match - add a new doms_new */
build_sched_domains(doms_new[i], dattr_new ? dattr_new + i : NULL);
match2:
;
}
/* Remember the new sched domains */
if (doms_cur != &fallback_doms)
free_sched_domains(doms_cur, ndoms_cur);
kfree(dattr_cur); /* kfree(NULL) is safe */
doms_cur = doms_new;
dattr_cur = dattr_new;
ndoms_cur = ndoms_new;
register_sched_domain_sysctl();
mutex_unlock(&sched_domains_mutex);
}
#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
static void reinit_sched_domains(void)
{
get_online_cpus();
/* Destroy domains first to force the rebuild */
partition_sched_domains(0, NULL, NULL);
rebuild_sched_domains();
put_online_cpus();
}
static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
{
unsigned int level = 0;
if (sscanf(buf, "%u", &level) != 1)
return -EINVAL;
/*
* level is always be positive so don't check for
* level < POWERSAVINGS_BALANCE_NONE which is 0
* What happens on 0 or 1 byte write,
* need to check for count as well?
*/
if (level >= MAX_POWERSAVINGS_BALANCE_LEVELS)
return -EINVAL;
if (smt)
sched_smt_power_savings = level;
else
sched_mc_power_savings = level;
reinit_sched_domains();
return count;
}
#ifdef CONFIG_SCHED_MC
static ssize_t sched_mc_power_savings_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "%u\n", sched_mc_power_savings);
}
static ssize_t sched_mc_power_savings_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
return sched_power_savings_store(buf, count, 0);
}
static DEVICE_ATTR(sched_mc_power_savings, 0644,
sched_mc_power_savings_show,
sched_mc_power_savings_store);
#endif
#ifdef CONFIG_SCHED_SMT
static ssize_t sched_smt_power_savings_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "%u\n", sched_smt_power_savings);
}
static ssize_t sched_smt_power_savings_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
return sched_power_savings_store(buf, count, 1);
}
static DEVICE_ATTR(sched_smt_power_savings, 0644,
sched_smt_power_savings_show,
sched_smt_power_savings_store);
#endif
int __init sched_create_sysfs_power_savings_entries(struct device *dev)
{
int err = 0;
#ifdef CONFIG_SCHED_SMT
if (smt_capable())
err = device_create_file(dev, &dev_attr_sched_smt_power_savings);
#endif
#ifdef CONFIG_SCHED_MC
if (!err && mc_capable())
err = device_create_file(dev, &dev_attr_sched_mc_power_savings);
#endif
return err;
}
#endif /* CONFIG_SCHED_MC || CONFIG_SCHED_SMT */
static int num_cpus_frozen; /* used to mark begin/end of suspend/resume */
/*
* Update cpusets according to cpu_active mask. If cpusets are
* disabled, cpuset_update_active_cpus() becomes a simple wrapper
* around partition_sched_domains().
*
* If we come here as part of a suspend/resume, don't touch cpusets because we
* want to restore it back to its original state upon resume anyway.
*/
static int cpuset_cpu_active(struct notifier_block *nfb, unsigned long action,
void *hcpu)
{
switch (action) {
case CPU_ONLINE_FROZEN:
case CPU_DOWN_FAILED_FROZEN:
/*
* num_cpus_frozen tracks how many CPUs are involved in suspend
* resume sequence. As long as this is not the last online
* operation in the resume sequence, just build a single sched
* domain, ignoring cpusets.
*/
num_cpus_frozen--;
if (likely(num_cpus_frozen)) {
partition_sched_domains(1, NULL, NULL);
break;
}
/*
* This is the last CPU online operation. So fall through and
* restore the original sched domains by considering the
* cpuset configurations.
*/
case CPU_ONLINE:
case CPU_DOWN_FAILED:
cpuset_update_active_cpus();
break;
default:
return NOTIFY_DONE;
}
return NOTIFY_OK;
}
static int cpuset_cpu_inactive(struct notifier_block *nfb, unsigned long action,
void *hcpu)
{
switch (action) {
case CPU_DOWN_PREPARE:
cpuset_update_active_cpus();
break;
case CPU_DOWN_PREPARE_FROZEN:
num_cpus_frozen++;
partition_sched_domains(1, NULL, NULL);
break;
default:
return NOTIFY_DONE;
}
return NOTIFY_OK;
}
void __init sched_init_smp(void)
{
cpumask_var_t non_isolated_cpus;
alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL);
alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
get_online_cpus();
mutex_lock(&sched_domains_mutex);
init_sched_domains(cpu_active_mask);
cpumask_andnot(non_isolated_cpus, cpu_possible_mask, cpu_isolated_map);
if (cpumask_empty(non_isolated_cpus))
cpumask_set_cpu(smp_processor_id(), non_isolated_cpus);
mutex_unlock(&sched_domains_mutex);
put_online_cpus();
hotcpu_notifier(cpuset_cpu_active, CPU_PRI_CPUSET_ACTIVE);
hotcpu_notifier(cpuset_cpu_inactive, CPU_PRI_CPUSET_INACTIVE);
init_hrtick();
/* Move init over to a non-isolated CPU */
if (set_cpus_allowed_ptr(current, non_isolated_cpus) < 0)
BUG();
sched_init_granularity();
free_cpumask_var(non_isolated_cpus);
init_sched_rt_class();
}
#else
void __init sched_init_smp(void)
{
sched_init_granularity();
}
#endif /* CONFIG_SMP */
const_debug unsigned int sysctl_timer_migration = 1;
int in_sched_functions(unsigned long addr)
{
return in_lock_functions(addr) ||
(addr >= (unsigned long)__sched_text_start
&& addr < (unsigned long)__sched_text_end);
}
#ifdef CONFIG_CGROUP_SCHED
struct task_group root_task_group;
LIST_HEAD(task_groups);
#endif
DECLARE_PER_CPU(cpumask_var_t, load_balance_tmpmask);
void __init sched_init(void)
{
int i, j;
unsigned long alloc_size = 0, ptr;
#ifdef CONFIG_FAIR_GROUP_SCHED
alloc_size += 2 * nr_cpu_ids * sizeof(void **);
#endif
#ifdef CONFIG_RT_GROUP_SCHED
alloc_size += 2 * nr_cpu_ids * sizeof(void **);
#endif
#ifdef CONFIG_CPUMASK_OFFSTACK
alloc_size += num_possible_cpus() * cpumask_size();
#endif
if (alloc_size) {
ptr = (unsigned long)kzalloc(alloc_size, GFP_NOWAIT);
#ifdef CONFIG_FAIR_GROUP_SCHED
root_task_group.se = (struct sched_entity **)ptr;
ptr += nr_cpu_ids * sizeof(void **);
root_task_group.cfs_rq = (struct cfs_rq **)ptr;
ptr += nr_cpu_ids * sizeof(void **);
#endif /* CONFIG_FAIR_GROUP_SCHED */
#ifdef CONFIG_RT_GROUP_SCHED
root_task_group.rt_se = (struct sched_rt_entity **)ptr;
ptr += nr_cpu_ids * sizeof(void **);
root_task_group.rt_rq = (struct rt_rq **)ptr;
ptr += nr_cpu_ids * sizeof(void **);
#endif /* CONFIG_RT_GROUP_SCHED */
#ifdef CONFIG_CPUMASK_OFFSTACK
for_each_possible_cpu(i) {
per_cpu(load_balance_tmpmask, i) = (void *)ptr;
ptr += cpumask_size();
}
#endif /* CONFIG_CPUMASK_OFFSTACK */
}
#ifdef CONFIG_SMP
init_defrootdomain();
#endif
init_rt_bandwidth(&def_rt_bandwidth,
global_rt_period(), global_rt_runtime());
#ifdef CONFIG_RT_GROUP_SCHED
init_rt_bandwidth(&root_task_group.rt_bandwidth,
global_rt_period(), global_rt_runtime());
#endif /* CONFIG_RT_GROUP_SCHED */
#ifdef CONFIG_CGROUP_SCHED
list_add(&root_task_group.list, &task_groups);
INIT_LIST_HEAD(&root_task_group.children);
INIT_LIST_HEAD(&root_task_group.siblings);
autogroup_init(&init_task);
#endif /* CONFIG_CGROUP_SCHED */
#ifdef CONFIG_CGROUP_CPUACCT
root_cpuacct.cpustat = &kernel_cpustat;
root_cpuacct.cpuusage = alloc_percpu(u64);
/* Too early, not expected to fail */
BUG_ON(!root_cpuacct.cpuusage);
#endif
for_each_possible_cpu(i) {
struct rq *rq;
rq = cpu_rq(i);
raw_spin_lock_init(&rq->lock);
rq->nr_running = 0;
rq->calc_load_active = 0;
rq->calc_load_update = jiffies + LOAD_FREQ;
init_cfs_rq(&rq->cfs);
init_rt_rq(&rq->rt, rq);
#ifdef CONFIG_FAIR_GROUP_SCHED
root_task_group.shares = ROOT_TASK_GROUP_LOAD;
INIT_LIST_HEAD(&rq->leaf_cfs_rq_list);
/*
* How much cpu bandwidth does root_task_group get?
*
* In case of task-groups formed thr' the cgroup filesystem, it
* gets 100% of the cpu resources in the system. This overall
* system cpu resource is divided among the tasks of
* root_task_group and its child task-groups in a fair manner,
* based on each entity's (task or task-group's) weight
* (se->load.weight).
*
* In other words, if root_task_group has 10 tasks of weight
* 1024) and two child groups A0 and A1 (of weight 1024 each),
* then A0's share of the cpu resource is:
*
* A0's bandwidth = 1024 / (10*1024 + 1024 + 1024) = 8.33%
*
* We achieve this by letting root_task_group's tasks sit
* directly in rq->cfs (i.e root_task_group->se[] = NULL).
*/
init_cfs_bandwidth(&root_task_group.cfs_bandwidth);
init_tg_cfs_entry(&root_task_group, &rq->cfs, NULL, i, NULL);
#endif /* CONFIG_FAIR_GROUP_SCHED */
rq->rt.rt_runtime = def_rt_bandwidth.rt_runtime;
#ifdef CONFIG_RT_GROUP_SCHED
INIT_LIST_HEAD(&rq->leaf_rt_rq_list);
init_tg_rt_entry(&root_task_group, &rq->rt, NULL, i, NULL);
#endif
for (j = 0; j < CPU_LOAD_IDX_MAX; j++)
rq->cpu_load[j] = 0;
rq->last_load_update_tick = jiffies;
#ifdef CONFIG_SMP
rq->sd = NULL;
rq->rd = NULL;
rq->cpu_power = SCHED_POWER_SCALE;
rq->post_schedule = 0;
rq->active_balance = 0;
rq->next_balance = jiffies;
rq->push_cpu = 0;
rq->cpu = i;
rq->online = 0;
rq->idle_stamp = 0;
rq->avg_idle = 2*sysctl_sched_migration_cost;
INIT_LIST_HEAD(&rq->cfs_tasks);
rq_attach_root(rq, &def_root_domain);
#ifdef CONFIG_NO_HZ
rq->nohz_flags = 0;
#endif
#endif
init_rq_hrtick(rq);
atomic_set(&rq->nr_iowait, 0);
}
set_load_weight(&init_task);
#ifdef CONFIG_PREEMPT_NOTIFIERS
INIT_HLIST_HEAD(&init_task.preempt_notifiers);
#endif
#ifdef CONFIG_RT_MUTEXES
plist_head_init(&init_task.pi_waiters);
#endif
/*
* The boot idle thread does lazy MMU switching as well:
*/
atomic_inc(&init_mm.mm_count);
enter_lazy_tlb(&init_mm, current);
/*
* Make us the idle thread. Technically, schedule() should not be
* called from this thread, however somewhere below it might be,
* but because we are the idle thread, we just pick up running again
* when this runqueue becomes "idle".
*/
init_idle(current, smp_processor_id());
calc_load_update = jiffies + LOAD_FREQ;
/*
* During early bootup we pretend to be a normal task:
*/
current->sched_class = &fair_sched_class;
#ifdef CONFIG_SMP
zalloc_cpumask_var(&sched_domains_tmpmask, GFP_NOWAIT);
/* May be allocated at isolcpus cmdline parse time */
if (cpu_isolated_map == NULL)
zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT);
#endif
init_sched_fair_class();
scheduler_running = 1;
}
#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
static inline int preempt_count_equals(int preempt_offset)
{
int nested = (preempt_count() & ~PREEMPT_ACTIVE) + rcu_preempt_depth();
return (nested == preempt_offset);
}
static int __might_sleep_init_called;
int __init __might_sleep_init(void)
{
__might_sleep_init_called = 1;
return 0;
}
early_initcall(__might_sleep_init);
void __might_sleep(const char *file, int line, int preempt_offset)
{
static unsigned long prev_jiffy; /* ratelimiting */
rcu_sleep_check(); /* WARN_ON_ONCE() by default, no rate limit reqd. */
if ((preempt_count_equals(preempt_offset) && !irqs_disabled()) ||
oops_in_progress)
return;
if (system_state != SYSTEM_RUNNING &&
(!__might_sleep_init_called || system_state != SYSTEM_BOOTING))
return;
if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
return;
prev_jiffy = jiffies;
printk(KERN_ERR
"BUG: sleeping function called from invalid context at %s:%d\n",
file, line);
printk(KERN_ERR
"in_atomic(): %d, irqs_disabled(): %d, pid: %d, name: %s\n",
in_atomic(), irqs_disabled(),
current->pid, current->comm);
debug_show_held_locks(current);
if (irqs_disabled())
print_irqtrace_events(current);
dump_stack();
}
EXPORT_SYMBOL(__might_sleep);
#endif
#ifdef CONFIG_MAGIC_SYSRQ
static void normalize_task(struct rq *rq, struct task_struct *p)
{
const struct sched_class *prev_class = p->sched_class;
int old_prio = p->prio;
int on_rq;
on_rq = p->on_rq;
if (on_rq)
dequeue_task(rq, p, 0);
__setscheduler(rq, p, SCHED_NORMAL, 0);
if (on_rq) {
enqueue_task(rq, p, 0);
resched_task(rq->curr);
}
check_class_changed(rq, p, prev_class, old_prio);
}
void normalize_rt_tasks(void)
{
struct task_struct *g, *p;
unsigned long flags;
struct rq *rq;
read_lock_irqsave(&tasklist_lock, flags);
do_each_thread(g, p) {
/*
* Only normalize user tasks:
*/
if (!p->mm)
continue;
p->se.exec_start = 0;
#ifdef CONFIG_SCHEDSTATS
p->se.statistics.wait_start = 0;
p->se.statistics.sleep_start = 0;
p->se.statistics.block_start = 0;
#endif
if (!rt_task(p)) {
/*
* Renice negative nice level userspace
* tasks back to 0:
*/
if (TASK_NICE(p) < 0 && p->mm)
set_user_nice(p, 0);
continue;
}
raw_spin_lock(&p->pi_lock);
rq = __task_rq_lock(p);
normalize_task(rq, p);
__task_rq_unlock(rq);
raw_spin_unlock(&p->pi_lock);
} while_each_thread(g, p);
read_unlock_irqrestore(&tasklist_lock, flags);
}
#endif /* CONFIG_MAGIC_SYSRQ */
#if defined(CONFIG_IA64) || defined(CONFIG_KGDB_KDB)
/*
* These functions are only useful for the IA64 MCA handling, or kdb.
*
* They can only be called when the whole system has been
* stopped - every CPU needs to be quiescent, and no scheduling
* activity can take place. Using them for anything else would
* be a serious bug, and as a result, they aren't even visible
* under any other configuration.
*/
/**
* curr_task - return the current task for a given cpu.
* @cpu: the processor in question.
*
* ONLY VALID WHEN THE WHOLE SYSTEM IS STOPPED!
*/
struct task_struct *curr_task(int cpu)
{
return cpu_curr(cpu);
}
#endif /* defined(CONFIG_IA64) || defined(CONFIG_KGDB_KDB) */
#ifdef CONFIG_IA64
/**
* set_curr_task - set the current task for a given cpu.
* @cpu: the processor in question.
* @p: the task pointer to set.
*
* Description: This function must only be used when non-maskable interrupts
* are serviced on a separate stack. It allows the architecture to switch the
* notion of the current task on a cpu in a non-blocking manner. This function
* must be called with all CPU's synchronized, and interrupts disabled, the
* and caller must save the original value of the current task (see
* curr_task() above) and restore that value before reenabling interrupts and
* re-starting the system.
*
* ONLY VALID WHEN THE WHOLE SYSTEM IS STOPPED!
*/
void set_curr_task(int cpu, struct task_struct *p)
{
cpu_curr(cpu) = p;
}
#endif
#ifdef CONFIG_CGROUP_SCHED
/* task_group_lock serializes the addition/removal of task groups */
static DEFINE_SPINLOCK(task_group_lock);
static void free_sched_group(struct task_group *tg)
{
free_fair_sched_group(tg);
free_rt_sched_group(tg);
autogroup_free(tg);
kfree(tg);
}
/* allocate runqueue etc for a new task group */
struct task_group *sched_create_group(struct task_group *parent)
{
struct task_group *tg;
unsigned long flags;
tg = kzalloc(sizeof(*tg), GFP_KERNEL);
if (!tg)
return ERR_PTR(-ENOMEM);
if (!alloc_fair_sched_group(tg, parent))
goto err;
if (!alloc_rt_sched_group(tg, parent))
goto err;
spin_lock_irqsave(&task_group_lock, flags);
list_add_rcu(&tg->list, &task_groups);
WARN_ON(!parent); /* root should already exist */
tg->parent = parent;
INIT_LIST_HEAD(&tg->children);
list_add_rcu(&tg->siblings, &parent->children);
spin_unlock_irqrestore(&task_group_lock, flags);
return tg;
err:
free_sched_group(tg);
return ERR_PTR(-ENOMEM);
}
/* rcu callback to free various structures associated with a task group */
static void free_sched_group_rcu(struct rcu_head *rhp)
{
/* now it should be safe to free those cfs_rqs */
free_sched_group(container_of(rhp, struct task_group, rcu));
}
/* Destroy runqueue etc associated with a task group */
void sched_destroy_group(struct task_group *tg)
{
unsigned long flags;
int i;
/* end participation in shares distribution */
for_each_possible_cpu(i)
unregister_fair_sched_group(tg, i);
spin_lock_irqsave(&task_group_lock, flags);
list_del_rcu(&tg->list);
list_del_rcu(&tg->siblings);
spin_unlock_irqrestore(&task_group_lock, flags);
/* wait for possible concurrent references to cfs_rqs complete */
call_rcu(&tg->rcu, free_sched_group_rcu);
}
/* change task's runqueue when it moves between groups.
* The caller of this function should have put the task in its new group
* by now. This function just updates tsk->se.cfs_rq and tsk->se.parent to
* reflect its new group.
*/
void sched_move_task(struct task_struct *tsk)
{
struct task_group *tg;
int on_rq, running;
unsigned long flags;
struct rq *rq;
rq = task_rq_lock(tsk, &flags);
running = task_current(rq, tsk);
on_rq = tsk->on_rq;
if (on_rq)
dequeue_task(rq, tsk, 0);
if (unlikely(running))
tsk->sched_class->put_prev_task(rq, tsk);
tg = container_of(task_subsys_state_check(tsk, cpu_cgroup_subsys_id,
lockdep_is_held(&tsk->sighand->siglock)),
struct task_group, css);
tg = autogroup_task_group(tsk, tg);
tsk->sched_task_group = tg;
#ifdef CONFIG_FAIR_GROUP_SCHED
if (tsk->sched_class->task_move_group)
tsk->sched_class->task_move_group(tsk, on_rq);
else
#endif
set_task_rq(tsk, task_cpu(tsk));
if (unlikely(running))
tsk->sched_class->set_curr_task(rq);
if (on_rq)
enqueue_task(rq, tsk, 0);
task_rq_unlock(rq, tsk, &flags);
}
#endif /* CONFIG_CGROUP_SCHED */
#if defined(CONFIG_RT_GROUP_SCHED) || defined(CONFIG_CFS_BANDWIDTH)
static unsigned long to_ratio(u64 period, u64 runtime)
{
if (runtime == RUNTIME_INF)
return 1ULL << 20;
return div64_u64(runtime << 20, period);
}
#endif
#ifdef CONFIG_RT_GROUP_SCHED
/*
* Ensure that the real time constraints are schedulable.
*/
static DEFINE_MUTEX(rt_constraints_mutex);
/* Must be called with tasklist_lock held */
static inline int tg_has_rt_tasks(struct task_group *tg)
{
struct task_struct *g, *p;
do_each_thread(g, p) {
if (rt_task(p) && task_rq(p)->rt.tg == tg)
return 1;
} while_each_thread(g, p);
return 0;
}
struct rt_schedulable_data {
struct task_group *tg;
u64 rt_period;
u64 rt_runtime;
};
static int tg_rt_schedulable(struct task_group *tg, void *data)
{
struct rt_schedulable_data *d = data;
struct task_group *child;
unsigned long total, sum = 0;
u64 period, runtime;
period = ktime_to_ns(tg->rt_bandwidth.rt_period);
runtime = tg->rt_bandwidth.rt_runtime;
if (tg == d->tg) {
period = d->rt_period;
runtime = d->rt_runtime;
}
/*
* Cannot have more runtime than the period.
*/
if (runtime > period && runtime != RUNTIME_INF)
return -EINVAL;
/*
* Ensure we don't starve existing RT tasks.
*/
if (rt_bandwidth_enabled() && !runtime && tg_has_rt_tasks(tg))
return -EBUSY;
total = to_ratio(period, runtime);
/*
* Nobody can have more than the global setting allows.
*/
if (total > to_ratio(global_rt_period(), global_rt_runtime()))
return -EINVAL;
/*
* The sum of our children's runtime should not exceed our own.
*/
list_for_each_entry_rcu(child, &tg->children, siblings) {
period = ktime_to_ns(child->rt_bandwidth.rt_period);
runtime = child->rt_bandwidth.rt_runtime;
if (child == d->tg) {
period = d->rt_period;
runtime = d->rt_runtime;
}
sum += to_ratio(period, runtime);
}
if (sum > total)
return -EINVAL;
return 0;
}
static int __rt_schedulable(struct task_group *tg, u64 period, u64 runtime)
{
int ret;
struct rt_schedulable_data data = {
.tg = tg,
.rt_period = period,
.rt_runtime = runtime,
};
rcu_read_lock();
ret = walk_tg_tree(tg_rt_schedulable, tg_nop, &data);
rcu_read_unlock();
return ret;
}
static int tg_set_rt_bandwidth(struct task_group *tg,
u64 rt_period, u64 rt_runtime)
{
int i, err = 0;
mutex_lock(&rt_constraints_mutex);
read_lock(&tasklist_lock);
err = __rt_schedulable(tg, rt_period, rt_runtime);
if (err)
goto unlock;
raw_spin_lock_irq(&tg->rt_bandwidth.rt_runtime_lock);
tg->rt_bandwidth.rt_period = ns_to_ktime(rt_period);
tg->rt_bandwidth.rt_runtime = rt_runtime;
for_each_possible_cpu(i) {
struct rt_rq *rt_rq = tg->rt_rq[i];
raw_spin_lock(&rt_rq->rt_runtime_lock);
rt_rq->rt_runtime = rt_runtime;
raw_spin_unlock(&rt_rq->rt_runtime_lock);
}
raw_spin_unlock_irq(&tg->rt_bandwidth.rt_runtime_lock);
unlock:
read_unlock(&tasklist_lock);
mutex_unlock(&rt_constraints_mutex);
return err;
}
int sched_group_set_rt_runtime(struct task_group *tg, long rt_runtime_us)
{
u64 rt_runtime, rt_period;
rt_period = ktime_to_ns(tg->rt_bandwidth.rt_period);
rt_runtime = (u64)rt_runtime_us * NSEC_PER_USEC;
if (rt_runtime_us < 0)
rt_runtime = RUNTIME_INF;
return tg_set_rt_bandwidth(tg, rt_period, rt_runtime);
}
long sched_group_rt_runtime(struct task_group *tg)
{
u64 rt_runtime_us;
if (tg->rt_bandwidth.rt_runtime == RUNTIME_INF)
return -1;
rt_runtime_us = tg->rt_bandwidth.rt_runtime;
do_div(rt_runtime_us, NSEC_PER_USEC);
return rt_runtime_us;
}
int sched_group_set_rt_period(struct task_group *tg, long rt_period_us)
{
u64 rt_runtime, rt_period;
rt_period = (u64)rt_period_us * NSEC_PER_USEC;
rt_runtime = tg->rt_bandwidth.rt_runtime;
if (rt_period == 0)
return -EINVAL;
return tg_set_rt_bandwidth(tg, rt_period, rt_runtime);
}
long sched_group_rt_period(struct task_group *tg)
{
u64 rt_period_us;
rt_period_us = ktime_to_ns(tg->rt_bandwidth.rt_period);
do_div(rt_period_us, NSEC_PER_USEC);
return rt_period_us;
}
static int sched_rt_global_constraints(void)
{
u64 runtime, period;
int ret = 0;
if (sysctl_sched_rt_period <= 0)
return -EINVAL;
runtime = global_rt_runtime();
period = global_rt_period();
/*
* Sanity check on the sysctl variables.
*/
if (runtime > period && runtime != RUNTIME_INF)
return -EINVAL;
mutex_lock(&rt_constraints_mutex);
read_lock(&tasklist_lock);
ret = __rt_schedulable(NULL, 0, 0);
read_unlock(&tasklist_lock);
mutex_unlock(&rt_constraints_mutex);
return ret;
}
int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk)
{
/* Don't accept realtime tasks when there is no way for them to run */
if (rt_task(tsk) && tg->rt_bandwidth.rt_runtime == 0)
return 0;
return 1;
}
#else /* !CONFIG_RT_GROUP_SCHED */
static int sched_rt_global_constraints(void)
{
unsigned long flags;
int i;
if (sysctl_sched_rt_period <= 0)
return -EINVAL;
/*
* There's always some RT tasks in the root group
* -- migration, kstopmachine etc..
*/
if (sysctl_sched_rt_runtime == 0)
return -EBUSY;
raw_spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags);
for_each_possible_cpu(i) {
struct rt_rq *rt_rq = &cpu_rq(i)->rt;
raw_spin_lock(&rt_rq->rt_runtime_lock);
rt_rq->rt_runtime = global_rt_runtime();
raw_spin_unlock(&rt_rq->rt_runtime_lock);
}
raw_spin_unlock_irqrestore(&def_rt_bandwidth.rt_runtime_lock, flags);
return 0;
}
#endif /* CONFIG_RT_GROUP_SCHED */
int sched_rt_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
int ret;
int old_period, old_runtime;
static DEFINE_MUTEX(mutex);
mutex_lock(&mutex);
old_period = sysctl_sched_rt_period;
old_runtime = sysctl_sched_rt_runtime;
ret = proc_dointvec(table, write, buffer, lenp, ppos);
if (!ret && write) {
ret = sched_rt_global_constraints();
if (ret) {
sysctl_sched_rt_period = old_period;
sysctl_sched_rt_runtime = old_runtime;
} else {
def_rt_bandwidth.rt_runtime = global_rt_runtime();
def_rt_bandwidth.rt_period =
ns_to_ktime(global_rt_period());
}
}
mutex_unlock(&mutex);
return ret;
}
#ifdef CONFIG_CGROUP_SCHED
/* return corresponding task_group object of a cgroup */
static inline struct task_group *cgroup_tg(struct cgroup *cgrp)
{
return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id),
struct task_group, css);
}
static struct cgroup_subsys_state *cpu_cgroup_create(struct cgroup *cgrp)
{
struct task_group *tg, *parent;
if (!cgrp->parent) {
/* This is early initialization for the top cgroup */
return &root_task_group.css;
}
parent = cgroup_tg(cgrp->parent);
tg = sched_create_group(parent);
if (IS_ERR(tg))
return ERR_PTR(-ENOMEM);
return &tg->css;
}
static void cpu_cgroup_destroy(struct cgroup *cgrp)
{
struct task_group *tg = cgroup_tg(cgrp);
sched_destroy_group(tg);
}
static int
cpu_cgroup_allow_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
{
const struct cred *cred = current_cred(), *tcred;
struct task_struct *task;
cgroup_taskset_for_each(task, cgrp, tset) {
tcred = __task_cred(task);
if ((current != task) && !capable(CAP_SYS_NICE) &&
cred->euid != tcred->uid && cred->euid != tcred->suid)
return -EACCES;
}
return 0;
}
static int cpu_cgroup_can_attach(struct cgroup *cgrp,
struct cgroup_taskset *tset)
{
struct task_struct *task;
cgroup_taskset_for_each(task, cgrp, tset) {
#ifdef CONFIG_RT_GROUP_SCHED
if (!sched_rt_can_attach(cgroup_tg(cgrp), task))
return -EINVAL;
#else
/* We don't support RT-tasks being in separate groups */
if (task->sched_class != &fair_sched_class)
return -EINVAL;
#endif
}
return 0;
}
static void cpu_cgroup_attach(struct cgroup *cgrp,
struct cgroup_taskset *tset)
{
struct task_struct *task;
cgroup_taskset_for_each(task, cgrp, tset)
sched_move_task(task);
}
static void
cpu_cgroup_exit(struct cgroup *cgrp, struct cgroup *old_cgrp,
struct task_struct *task)
{
/*
* cgroup_exit() is called in the copy_process() failure path.
* Ignore this case since the task hasn't ran yet, this avoids
* trying to poke a half freed task state from generic code.
*/
if (!(task->flags & PF_EXITING))
return;
sched_move_task(task);
}
static u64 cpu_notify_on_migrate_read_u64(struct cgroup *cgrp,
struct cftype *cft)
{
struct task_group *tg = cgroup_tg(cgrp);
return tg->notify_on_migrate;
}
static int cpu_notify_on_migrate_write_u64(struct cgroup *cgrp,
struct cftype *cft, u64 notify)
{
struct task_group *tg = cgroup_tg(cgrp);
tg->notify_on_migrate = (notify > 0);
return 0;
}
#ifdef CONFIG_FAIR_GROUP_SCHED
static int cpu_shares_write_u64(struct cgroup *cgrp, struct cftype *cftype,
u64 shareval)
{
return sched_group_set_shares(cgroup_tg(cgrp), scale_load(shareval));
}
static u64 cpu_shares_read_u64(struct cgroup *cgrp, struct cftype *cft)
{
struct task_group *tg = cgroup_tg(cgrp);
return (u64) scale_load_down(tg->shares);
}
#ifdef CONFIG_CFS_BANDWIDTH
static DEFINE_MUTEX(cfs_constraints_mutex);
const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota)
{
int i, ret = 0, runtime_enabled, runtime_was_enabled;
struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
if (tg == &root_task_group)
return -EINVAL;
/*
* Ensure we have at some amount of bandwidth every period. This is
* to prevent reaching a state of large arrears when throttled via
* entity_tick() resulting in prolonged exit starvation.
*/
if (quota < min_cfs_quota_period || period < min_cfs_quota_period)
return -EINVAL;
/*
* Likewise, bound things on the otherside by preventing insane quota
* periods. This also allows us to normalize in computing quota
* feasibility.
*/
if (period > max_cfs_quota_period)
return -EINVAL;
mutex_lock(&cfs_constraints_mutex);
ret = __cfs_schedulable(tg, period, quota);
if (ret)
goto out_unlock;
runtime_enabled = quota != RUNTIME_INF;
runtime_was_enabled = cfs_b->quota != RUNTIME_INF;
/*
* If we need to toggle cfs_bandwidth_used, off->on must occur
* before making related changes, and on->off must occur afterwards
*/
if (runtime_enabled && !runtime_was_enabled)
cfs_bandwidth_usage_inc();
raw_spin_lock_irq(&cfs_b->lock);
cfs_b->period = ns_to_ktime(period);
cfs_b->quota = quota;
__refill_cfs_bandwidth_runtime(cfs_b);
/* restart the period timer (if active) to handle new period expiry */
if (runtime_enabled && cfs_b->timer_active) {
/* force a reprogram */
cfs_b->timer_active = 0;
__start_cfs_bandwidth(cfs_b);
}
raw_spin_unlock_irq(&cfs_b->lock);
for_each_possible_cpu(i) {
struct cfs_rq *cfs_rq = tg->cfs_rq[i];
struct rq *rq = cfs_rq->rq;
raw_spin_lock_irq(&rq->lock);
cfs_rq->runtime_enabled = runtime_enabled;
cfs_rq->runtime_remaining = 0;
if (cfs_rq->throttled)
unthrottle_cfs_rq(cfs_rq);
raw_spin_unlock_irq(&rq->lock);
}
if (runtime_was_enabled && !runtime_enabled)
cfs_bandwidth_usage_dec();
out_unlock:
mutex_unlock(&cfs_constraints_mutex);
return ret;
}
int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
{
u64 quota, period;
period = ktime_to_ns(tg->cfs_bandwidth.period);
if (cfs_quota_us < 0)
quota = RUNTIME_INF;
else
quota = (u64)cfs_quota_us * NSEC_PER_USEC;
return tg_set_cfs_bandwidth(tg, period, quota);
}
long tg_get_cfs_quota(struct task_group *tg)
{
u64 quota_us;
if (tg->cfs_bandwidth.quota == RUNTIME_INF)
return -1;
quota_us = tg->cfs_bandwidth.quota;
do_div(quota_us, NSEC_PER_USEC);
return quota_us;
}
int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
{
u64 quota, period;
period = (u64)cfs_period_us * NSEC_PER_USEC;
quota = tg->cfs_bandwidth.quota;
return tg_set_cfs_bandwidth(tg, period, quota);
}
long tg_get_cfs_period(struct task_group *tg)
{
u64 cfs_period_us;
cfs_period_us = ktime_to_ns(tg->cfs_bandwidth.period);
do_div(cfs_period_us, NSEC_PER_USEC);
return cfs_period_us;
}
static s64 cpu_cfs_quota_read_s64(struct cgroup *cgrp, struct cftype *cft)
{
return tg_get_cfs_quota(cgroup_tg(cgrp));
}
static int cpu_cfs_quota_write_s64(struct cgroup *cgrp, struct cftype *cftype,
s64 cfs_quota_us)
{
return tg_set_cfs_quota(cgroup_tg(cgrp), cfs_quota_us);
}
static u64 cpu_cfs_period_read_u64(struct cgroup *cgrp, struct cftype *cft)
{
return tg_get_cfs_period(cgroup_tg(cgrp));
}
static int cpu_cfs_period_write_u64(struct cgroup *cgrp, struct cftype *cftype,
u64 cfs_period_us)
{
return tg_set_cfs_period(cgroup_tg(cgrp), cfs_period_us);
}
struct cfs_schedulable_data {
struct task_group *tg;
u64 period, quota;
};
/*
* normalize group quota/period to be quota/max_period
* note: units are usecs
*/
static u64 normalize_cfs_quota(struct task_group *tg,
struct cfs_schedulable_data *d)
{
u64 quota, period;
if (tg == d->tg) {
period = d->period;
quota = d->quota;
} else {
period = tg_get_cfs_period(tg);
quota = tg_get_cfs_quota(tg);
}
/* note: these should typically be equivalent */
if (quota == RUNTIME_INF || quota == -1)
return RUNTIME_INF;
return to_ratio(period, quota);
}
static int tg_cfs_schedulable_down(struct task_group *tg, void *data)
{
struct cfs_schedulable_data *d = data;
struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
s64 quota = 0, parent_quota = -1;
if (!tg->parent) {
quota = RUNTIME_INF;
} else {
struct cfs_bandwidth *parent_b = &tg->parent->cfs_bandwidth;
quota = normalize_cfs_quota(tg, d);
parent_quota = parent_b->hierarchal_quota;
/*
* ensure max(child_quota) <= parent_quota, inherit when no
* limit is set
*/
if (quota == RUNTIME_INF)
quota = parent_quota;
else if (parent_quota != RUNTIME_INF && quota > parent_quota)
return -EINVAL;
}
cfs_b->hierarchal_quota = quota;
return 0;
}
static int __cfs_schedulable(struct task_group *tg, u64 period, u64 quota)
{
int ret;
struct cfs_schedulable_data data = {
.tg = tg,
.period = period,
.quota = quota,
};
if (quota != RUNTIME_INF) {
do_div(data.period, NSEC_PER_USEC);
do_div(data.quota, NSEC_PER_USEC);
}
rcu_read_lock();
ret = walk_tg_tree(tg_cfs_schedulable_down, tg_nop, &data);
rcu_read_unlock();
return ret;
}
static int cpu_stats_show(struct cgroup *cgrp, struct cftype *cft,
struct cgroup_map_cb *cb)
{
struct task_group *tg = cgroup_tg(cgrp);
struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
cb->fill(cb, "nr_periods", cfs_b->nr_periods);
cb->fill(cb, "nr_throttled", cfs_b->nr_throttled);
cb->fill(cb, "throttled_time", cfs_b->throttled_time);
return 0;
}
#endif /* CONFIG_CFS_BANDWIDTH */
#endif /* CONFIG_FAIR_GROUP_SCHED */
#ifdef CONFIG_RT_GROUP_SCHED
static int cpu_rt_runtime_write(struct cgroup *cgrp, struct cftype *cft,
s64 val)
{
return sched_group_set_rt_runtime(cgroup_tg(cgrp), val);
}
static s64 cpu_rt_runtime_read(struct cgroup *cgrp, struct cftype *cft)
{
return sched_group_rt_runtime(cgroup_tg(cgrp));
}
static int cpu_rt_period_write_uint(struct cgroup *cgrp, struct cftype *cftype,
u64 rt_period_us)
{
return sched_group_set_rt_period(cgroup_tg(cgrp), rt_period_us);
}
static u64 cpu_rt_period_read_uint(struct cgroup *cgrp, struct cftype *cft)
{
return sched_group_rt_period(cgroup_tg(cgrp));
}
#endif /* CONFIG_RT_GROUP_SCHED */
static struct cftype cpu_files[] = {
{
.name = "notify_on_migrate",
.read_u64 = cpu_notify_on_migrate_read_u64,
.write_u64 = cpu_notify_on_migrate_write_u64,
},
#ifdef CONFIG_FAIR_GROUP_SCHED
{
.name = "shares",
.read_u64 = cpu_shares_read_u64,
.write_u64 = cpu_shares_write_u64,
},
#endif
#ifdef CONFIG_CFS_BANDWIDTH
{
.name = "cfs_quota_us",
.read_s64 = cpu_cfs_quota_read_s64,
.write_s64 = cpu_cfs_quota_write_s64,
},
{
.name = "cfs_period_us",
.read_u64 = cpu_cfs_period_read_u64,
.write_u64 = cpu_cfs_period_write_u64,
},
{
.name = "stat",
.read_map = cpu_stats_show,
},
#endif
#ifdef CONFIG_RT_GROUP_SCHED
{
.name = "rt_runtime_us",
.read_s64 = cpu_rt_runtime_read,
.write_s64 = cpu_rt_runtime_write,
},
{
.name = "rt_period_us",
.read_u64 = cpu_rt_period_read_uint,
.write_u64 = cpu_rt_period_write_uint,
},
#endif
};
static int cpu_cgroup_populate(struct cgroup_subsys *ss, struct cgroup *cont)
{
return cgroup_add_files(cont, ss, cpu_files, ARRAY_SIZE(cpu_files));
}
struct cgroup_subsys cpu_cgroup_subsys = {
.name = "cpu",
.create = cpu_cgroup_create,
.destroy = cpu_cgroup_destroy,
.can_attach = cpu_cgroup_can_attach,
.attach = cpu_cgroup_attach,
.allow_attach = cpu_cgroup_allow_attach,
.exit = cpu_cgroup_exit,
.populate = cpu_cgroup_populate,
.subsys_id = cpu_cgroup_subsys_id,
.early_init = 1,
};
#endif /* CONFIG_CGROUP_SCHED */
#ifdef CONFIG_CGROUP_CPUACCT
/*
* CPU accounting code for task groups.
*
* Based on the work by Paul Menage (menage@google.com) and Balbir Singh
* (balbir@in.ibm.com).
*/
/* create a new cpu accounting group */
static struct cgroup_subsys_state *cpuacct_create(struct cgroup *cgrp)
{
struct cpuacct *ca;
if (!cgrp->parent)
return &root_cpuacct.css;
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca)
goto out;
ca->cpuusage = alloc_percpu(u64);
if (!ca->cpuusage)
goto out_free_ca;
ca->cpustat = alloc_percpu(struct kernel_cpustat);
if (!ca->cpustat)
goto out_free_cpuusage;
return &ca->css;
out_free_cpuusage:
free_percpu(ca->cpuusage);
out_free_ca:
kfree(ca);
out:
return ERR_PTR(-ENOMEM);
}
/* destroy an existing cpu accounting group */
static void cpuacct_destroy(struct cgroup *cgrp)
{
struct cpuacct *ca = cgroup_ca(cgrp);
free_percpu(ca->cpustat);
free_percpu(ca->cpuusage);
kfree(ca);
}
static u64 cpuacct_cpuusage_read(struct cpuacct *ca, int cpu)
{
u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
u64 data;
#ifndef CONFIG_64BIT
/*
* Take rq->lock to make 64-bit read safe on 32-bit platforms.
*/
raw_spin_lock_irq(&cpu_rq(cpu)->lock);
data = *cpuusage;
raw_spin_unlock_irq(&cpu_rq(cpu)->lock);
#else
data = *cpuusage;
#endif
return data;
}
static void cpuacct_cpuusage_write(struct cpuacct *ca, int cpu, u64 val)
{
u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
#ifndef CONFIG_64BIT
/*
* Take rq->lock to make 64-bit write safe on 32-bit platforms.
*/
raw_spin_lock_irq(&cpu_rq(cpu)->lock);
*cpuusage = val;
raw_spin_unlock_irq(&cpu_rq(cpu)->lock);
#else
*cpuusage = val;
#endif
}
/* return total cpu usage (in nanoseconds) of a group */
static u64 cpuusage_read(struct cgroup *cgrp, struct cftype *cft)
{
struct cpuacct *ca = cgroup_ca(cgrp);
u64 totalcpuusage = 0;
int i;
for_each_present_cpu(i)
totalcpuusage += cpuacct_cpuusage_read(ca, i);
return totalcpuusage;
}
static int cpuusage_write(struct cgroup *cgrp, struct cftype *cftype,
u64 reset)
{
struct cpuacct *ca = cgroup_ca(cgrp);
int err = 0;
int i;
if (reset) {
err = -EINVAL;
goto out;
}
for_each_present_cpu(i)
cpuacct_cpuusage_write(ca, i, 0);
out:
return err;
}
static int cpuacct_percpu_seq_read(struct cgroup *cgroup, struct cftype *cft,
struct seq_file *m)
{
struct cpuacct *ca = cgroup_ca(cgroup);
u64 percpu;
int i;
for_each_present_cpu(i) {
percpu = cpuacct_cpuusage_read(ca, i);
seq_printf(m, "%llu ", (unsigned long long) percpu);
}
seq_printf(m, "\n");
return 0;
}
static const char *cpuacct_stat_desc[] = {
[CPUACCT_STAT_USER] = "user",
[CPUACCT_STAT_SYSTEM] = "system",
};
static int cpuacct_stats_show(struct cgroup *cgrp, struct cftype *cft,
struct cgroup_map_cb *cb)
{
struct cpuacct *ca = cgroup_ca(cgrp);
int cpu;
s64 val = 0;
for_each_online_cpu(cpu) {
struct kernel_cpustat *kcpustat = per_cpu_ptr(ca->cpustat, cpu);
val += kcpustat->cpustat[CPUTIME_USER];
val += kcpustat->cpustat[CPUTIME_NICE];
}
val = cputime64_to_clock_t(val);
cb->fill(cb, cpuacct_stat_desc[CPUACCT_STAT_USER], val);
val = 0;
for_each_online_cpu(cpu) {
struct kernel_cpustat *kcpustat = per_cpu_ptr(ca->cpustat, cpu);
val += kcpustat->cpustat[CPUTIME_SYSTEM];
val += kcpustat->cpustat[CPUTIME_IRQ];
val += kcpustat->cpustat[CPUTIME_SOFTIRQ];
}
val = cputime64_to_clock_t(val);
cb->fill(cb, cpuacct_stat_desc[CPUACCT_STAT_SYSTEM], val);
return 0;
}
static struct cftype files[] = {
{
.name = "usage",
.read_u64 = cpuusage_read,
.write_u64 = cpuusage_write,
},
{
.name = "usage_percpu",
.read_seq_string = cpuacct_percpu_seq_read,
},
{
.name = "stat",
.read_map = cpuacct_stats_show,
},
};
static int cpuacct_populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
{
return cgroup_add_files(cgrp, ss, files, ARRAY_SIZE(files));
}
/*
* charge this task's execution time to its accounting group.
*
* called with rq->lock held.
*/
void cpuacct_charge(struct task_struct *tsk, u64 cputime)
{
struct cpuacct *ca;
int cpu;
if (unlikely(!cpuacct_subsys.active))
return;
cpu = task_cpu(tsk);
rcu_read_lock();
ca = task_ca(tsk);
for (; ca; ca = parent_ca(ca)) {
u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
*cpuusage += cputime;
}
rcu_read_unlock();
}
struct cgroup_subsys cpuacct_subsys = {
.name = "cpuacct",
.create = cpuacct_create,
.destroy = cpuacct_destroy,
.populate = cpuacct_populate,
.subsys_id = cpuacct_subsys_id,
};
#endif /* CONFIG_CGROUP_CPUACCT */
|
AOSP-Jaguar/android_kernel_sony_msm8974
|
kernel/sched/core.c
|
C
|
gpl-2.0
| 208,663
|
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for
# the Earth and Planetary Sciences
# Copyright (C) 2012 - 2022 by the BurnMan team, released under the GNU
# GPL v2 or later.
"""
example_fit_solution
--------------------
This example demonstrates how to fit parameters
for solution models using a range of compositionally-variable
experimental data.
The example in this file deals with finding optimized parameters
for the forsterite-fayalite binary using a mixture of volume
and seismic velocity data.
teaches:
- least squares fitting for solution data
"""
import numpy as np
import matplotlib.pyplot as plt
from numpy import random
import burnman
from burnman.utils.misc import pretty_print_values
from burnman.optimize.eos_fitting import fit_XPTp_data
from burnman.optimize.nonlinear_fitting import plot_residuals, extreme_values
from burnman.optimize.nonlinear_fitting import corner_plot
from burnman.optimize.nonlinear_fitting import weighted_residual_plot
if __name__ == "__main__":
# Set np.array printing precision to be low
# (for more readable covariance matrices)
np.set_printoptions(precision=1)
# First, let's create a solution to optimise.
# In this case, we choose a solution model that exists in
# the BurnMan repository; the Mg-Fe olivine from
# the Stixrude and Lithgow-Bertelloni dataset
solution = burnman.minerals.SLB_2011.mg_fe_olivine()
solution.set_state(1.e5, 300.)
print('Names of endmembers in the olivine solution:')
print(solution.endmember_names)
print('')
# Fit parameters are provided via a list of lists.
# The first element of each list is a string that corresponds
# either to one of the keys in an endmember parameter dictionary,
# or to an excess property for a binary join in the solution.
# The next parameters correspond to the indices of the endmembers
# to which the parameter corresponds.
# Here, we choose to fit he standard state volume, isothermal
# bulk modulus and its first derivative for both endmembers.
# Endmember 0 is forsterite, and Endmember 1 is fayalite.
# We also choose to fit the excess volume on the binary join.
fit_params = [['V_0', 0],
['V_0', 1],
['K_0', 0],
['K_0', 1],
['Kprime_0', 0],
['Kprime_0', 1],
['G_0', 0],
['G_0', 1],
['V', 0, 1]]
# Next, we make some synthetic data
n_data = 100
data = []
data_covariances = []
flags = []
# For this example, we add some Gaussian noise
# to the volumes of olivines on the binary between
# 0-10 GPa and 300-1300 K.
# Here 1 standard deviation is set as 0.1% of the
# volume at P and T
f_Verror = 1.e-3
# Choose a specific seed for the random number generator
# so that this example is reproducible.
random.seed(10)
for i in range(n_data):
x_fa = random.random()
P = random.random() * 1.e10
T = random.random() * 1000. + 300.
X = [1.-x_fa, x_fa]
solution.set_composition(X)
solution.set_state(P, T)
f = (1. + (random.normal() - 0.5)*f_Verror)
V = solution.V * f
data.append([1.-x_fa, x_fa, P, T, V])
data_covariances.append(np.zeros((5, 5)))
data_covariances[-1][4, 4] = np.power(solution.V*f_Verror, 2.)
flags.append('V')
# Here, we add one awful data point in the middle of the domain
# We do this to demonstrate the semi-automatic removal of bad data
# using extreme value theory.
solution.set_composition([0.5, 0.5])
solution.set_state(5.e9, 800.)
data.append([0.5, 0.5, 5.e9, 800., solution.V + 3.e-7])
data_covariances.append(np.zeros((5, 5)))
data_covariances[-1][4, 4] = np.power(solution.V*f_Verror, 2.)
flags.append('V')
# Now create some velocity data, again adding
# some Gaussian noise.
# Here 1 standard deviation is set as 1% of the
# P wave velocity at P and T
n_data = 20
f_Vperror = 1.e-2
for i in range(n_data):
x_fa = random.random()
P = random.random() * 1.e10
T = random.random() * 1000. + 300.
X = [1.-x_fa, x_fa]
solution.set_composition(X)
solution.set_state(P, T)
f = (1. + (random.normal() - 0.5)*f_Vperror)
Vp = solution.p_wave_velocity * f
data.append([1.-x_fa, x_fa, P, T, Vp])
data_covariances.append(np.zeros((5, 5)))
data_covariances[-1][4, 4] = np.power(solution.p_wave_velocity
* f_Vperror, 2.)
flags.append('p_wave_velocity')
data = np.array(data)
data_covariances = np.array(data_covariances)
flags = np.array(flags)
# Here are some (optional) initial step sizes for the optimizer.
delta_params = np.array([1.e-8, 1.e-8, 1.e7, 1.e7,
1.e-1, 1.e-1, 1.e-1, 1.e-1, 1.e-8])
# And some bounds. For this example the bounds are not necessary,
# but if the data is somewhat shaky it can be useful to provide some
# guidance for the least squares minimizer.
bounds = np.array([[0, np.inf],
[0, np.inf],
[0, np.inf],
[0, np.inf],
[3.5, 6.],
[3.5, 6.],
[0, np.inf],
[0, np.inf],
[-np.inf, np.inf]])
param_tolerance = 1.e-5
# Finally, some post-processing options
confidence_interval = 0.95
remove_outliers = True
good_data_confidence_interval = 0.99
properties_for_data_comparison_plots = [('V', 1.e6, 'Volume (cm^3/mol)'),
('p_wave_velocity', 1.e-3,
'$V_P$ (km/s)')]
# The following line fits the parameters to the data we defined above.
print('Starting to fit user-defined data. Please be patient.')
fitted_eos = fit_XPTp_data(solution=solution,
flags=flags,
fit_params=fit_params,
data=data,
data_covariances=data_covariances,
delta_params=delta_params,
bounds=bounds,
param_tolerance=param_tolerance,
verbose=False)
# Print the optimized parameters
print('Optimized equation of state:')
pretty_print_values(fitted_eos.popt, fitted_eos.pcov,
fitted_eos.fit_params_strings)
print('\nParameters:')
print(fitted_eos.popt)
print('\nFull covariance matrix:')
print(fitted_eos.pcov)
print('\nGoodness of fit:')
print(fitted_eos.goodness_of_fit)
print('\n')
# Create a plot of the residuals
fig, ax = plt.subplots()
plot_residuals(ax=ax,
weighted_residuals=fitted_eos.weighted_residuals,
flags=fitted_eos.flags)
plt.show()
val_extreme = extreme_values(fitted_eos.weighted_residuals,
good_data_confidence_interval)
confidence_bound, indices, probabilities = val_extreme
if indices != [] and remove_outliers is True:
print(f'Removing {len(indices):d} outliers'
f' (at the {good_data_confidence_interval*100.:.1f}% '
'confidence interval) and refitting. '
'Please wait just a little longer.')
mask = [i for i in range(len(fitted_eos.weighted_residuals))
if i not in indices]
data = data[mask]
flags = flags[mask]
data_covariances = data_covariances[mask]
fitted_eos = fit_XPTp_data(solution=solution,
flags=flags,
fit_params=fit_params,
data=data,
data_covariances=data_covariances,
param_tolerance=param_tolerance,
verbose=False)
# Print the optimized parameters
print('Optimized equation of state:')
pretty_print_values(fitted_eos.popt, fitted_eos.pcov,
fitted_eos.fit_params_strings)
print('\nParameters:')
print(fitted_eos.popt)
print('\nFull covariance matrix:')
print(fitted_eos.pcov)
print('\nGoodness of fit:')
print(fitted_eos.goodness_of_fit)
print('\n')
# Create a plot of the residuals
fig, ax = plt.subplots()
plot_residuals(ax=ax,
weighted_residuals=fitted_eos.weighted_residuals,
flags=fitted_eos.flags)
plt.show()
# Create a corner plot of the covariances
fig, ax_array = corner_plot(popt=fitted_eos.popt,
pcov=fitted_eos.pcov,
param_names=fitted_eos.fit_params_strings)
plt.show()
# Create plots for the weighted residuals of each type of measurement
enum_prps = enumerate(properties_for_data_comparison_plots)
for i, (material_property, scaling, name) in enum_prps:
fig, ax = plt.subplots()
weighted_residual_plot(ax=ax,
model=fitted_eos,
flag=material_property,
sd_limit=3,
cmap=plt.cm.RdYlBu,
plot_axes=[2, 3],
scale_axes=[1.e-9, 1.])
ax.set_title(f'Weighted residual plot for {name:s}')
ax.set_xlabel('Pressure (GPa)')
ax.set_ylabel('Temperature (K)')
plt.show()
|
geodynamics/burnman
|
examples/example_fit_solution.py
|
Python
|
gpl-2.0
| 9,817
|
/* Control over an attribute of a line
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath 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, or (at your option)
any later version.
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package ddf.minim.javax.sound.sampled;
/**
* A control provides the ability to affect some attribute of a line, for
* instance its volume.
*
* @since 1.3
*/
public abstract class Control {
/**
* This describes a single control.
*
* @since 1.3
*/
public static class Type {
private String name;
/**
* Create a new Type given its name.
*
* @param name
* the name of the type
*/
protected Type(String name) {
this.name = name;
}
public final boolean equals(Object o) {
return super.equals(o);
}
public final int hashCode() {
return super.hashCode();
}
/**
* Return the name of this Type.
*/
public final String toString() {
return name;
}
}
private Type type;
/**
* Create a new Control given its Type.
*
* @param type
* the type
*/
protected Control(Type type) {
this.type = type;
}
/**
* Return the Type of this Control.
*/
public Type getType() {
return type;
}
/**
* Return a String descrsibing this control. In particular the value will
* include the name of the associated Type.
*/
public String toString() {
return type.toString();
}
}
|
DASAR/Minim-Android
|
src/ddf/minim/javax/sound/sampled/Control.java
|
Java
|
gpl-2.0
| 3,000
|
<?php
// The Query
$args = array(
'post_type'=> 'pizza',
'cat' => 2,
'p' => 50
);
$the_query = new WP_Query( $args);
// The Loop
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
$theme_options = ifne( $GLOBALS, 'theme_options', array() );
$page_fields = get_fields();
// Content goes here ?>
<a href="#"><?php the_title(); ?></a>
<div class="menu-item">
<div class="fb-like" data-href="http://herospizza.com.au" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>
<?php $image = ifne( $page_fields, 'pizza_banner' ); ?>
<img src="<?php echo $image['url']; ?>" alt="<?php the_title(); ?>" class="pizza-banner" />
<?php $image = ifne( $page_fields, 'pizza_thumbnail' ); ?>
<div class="pizza-thumb-wrap" style="background-image: url(<?php echo $image['url'];?>)">
<span class="price-overlay"></span>
<span class="price"><?php echo ifne( $page_fields, 'price' ); ?></span>
</div><!-- .pizza-thumb-wrap -->
<div class="menu-content">
<h3 class="menu-title"><?php the_title(); ?> (<?php echo ifne( $page_fields, 'alternate' ); ?>)</h3>
<p><?php the_content(); ?></p>
<h5>Ingredients:</h5>
<p><?php echo ifne( $page_fields, 'ingredients' ); ?></p>
</div><!-- .menu-content -->
<table>
<thead>
<tr>
<td width="14%">Energy /100g</td>
<td width="14%">Calories /100g</td>
<td width="14%">Protein /100g</td>
<td width="14%">Fat total /100g</td>
<td width="14%">Fat sat /100g</td>
<td width="14%">Carbs /100g</td>
<td width="14%">Sodium /100g</td>
</tr>
</thead>
<tbody>
<tr>
<td width="14%"><?php echo ifne( $page_fields, 'energy' ); ?></td>
<td width="14%"><?php echo ifne( $page_fields, 'calories' ); ?></td>
<td width="14%"><?php echo ifne( $page_fields, 'protein' ); ?></td>
<td width="14%"><?php echo ifne( $page_fields, 'fat_total' ); ?></td>
<td width="14%"><?php echo ifne( $page_fields, 'fat_sat' ); ?></td>
<td width="14%"><?php echo ifne( $page_fields, 'carbs' ); ?></td>
<td width="14%"><?php echo ifne( $page_fields, 'sodium' ); ?></td>
</tr>
</tbody>
</table>
</div><!-- .menu-item -->
<?php }
}
/* Restore original Post Data */
wp_reset_postdata();
?>
|
guardiancomics/Heros-Pizza
|
wp-content/themes/herospizza/parts/pizzas/sides_superhumanSpinach.php
|
PHP
|
gpl-2.0
| 2,274
|
using System;
using Newtonsoft.Json;
namespace Ombi.Settings.Settings.Models.Notifications
{
public class DiscordNotificationSettings : Settings
{
public bool Enabled { get; set; }
public string WebhookUrl { get; set; }
public string Username { get; set; }
public string Icon { get; set; }
public bool HideUser { get; set; }
[JsonIgnore]
public string WebHookId => SplitWebUrl(4);
[JsonIgnore]
public string Token => SplitWebUrl(5);
private string SplitWebUrl(int index)
{
if (!WebhookUrl.StartsWith("http", StringComparison.CurrentCulture))
{
WebhookUrl = "https://" + WebhookUrl;
}
var split = WebhookUrl.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
return split.Length < index
? string.Empty
: split[index];
}
}
}
|
tidusjar/Ombi
|
src/Ombi.Settings/Settings/Models/Notifications/DiscordNotificationSettings.cs
|
C#
|
gpl-2.0
| 956
|
<?php
/**
* Openinghtml Module class file
*
* @category Markup
* @package Xiphe\HTML
* @author Hannes Diercks <xiphe@gmx.de>
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE
* @link https://github.com/Xiphe/-HTML/blob/master/modules/Openinghtml.php
*/
namespace Xiphe\HTML\modules;
use Xiphe\HTML\core as Core;
/**
* Openinghtml Module class
*
* @category Markup
* @package Xiphe\HTML
* @author Hannes Diercks <xiphe@gmx.de>
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE
* @link https://github.com/Xiphe/-HTML
*/
class Openinghtml extends Core\BasicModule implements Core\ModuleInterface
{
/**
* Module Logic
*
* @return void
*/
public function execute()
{
$this->htmlattrs = array('class' => 'no-js'.$this->ieClass(' ').$this->browserClass(' '));
$this->headattrs = array();
if ($this->called == 'xhtml') {
$this->xhtml();
} else {
$this->html5();
}
}
/**
* Generate a XHTML header.
*
* @return void
*/
public function xhtml()
{
$this->htmlattrs['xmlns'] = 'http://www.w3.org/1999/xhtml';
echo '<?xml version="1.0" ?>';
Core\Generator::lineBreak();
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"';
Core\Generator::lineBreak();
Core\Config::set('tabs', '++');
Core\Generator::tabs();
echo '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
Core\Generator::lineBreak();
Core\Config::set('tabs', '--');
echo $this->getHtml();
echo $this->getHead();
}
/**
* Generate a HTML5 header.
*
* @return void
*/
public function html5()
{
echo '<!DOCTYPE HTML>';
Core\Generator::lineBreak();
echo $this->getHtml();
echo $this->getHead();
\Xiphe\HTML::get()->utf8()
->meta('http-equiv=X-UA-Compatible|content=IE\=edge,chrome\=1');
}
/**
* Returns the actual html tag.
*
* @return Tag
*/
public function getHtml()
{
$html = new Core\Tag(
'html',
array((isset($this->args[1]) ? $this->args[1] : null)),
array('generate', 'start')
);
$html->setAttrs($this->htmlattrs);
return $html;
}
/**
* Returns the head tag.
*
* @return Tag
*/
public function getHead()
{
$head = new Core\Tag(
'head',
array((isset($this->args[0]) ? $this->args[0] : null)),
array('generate', 'start')
);
$head->setAttrs($this->headattrs);
return $head;
}
/**
* Checks if \Xiphe\THETOOLS exists and append ie classes.
*
* @param string $before separator.
*
* @return string
*/
public function ieClass($before = '')
{
$sIeClass = '';
if (class_exists('Xiphe\THEMASTER\core\THEMASTER')) {
if (\Xiphe\THETOOLS::is_browser('ie')) {
if (\Xiphe\THETOOLS::is_browser('ie6x')) {
$sIeClass = $before.'lt-ie10 lt-ie9 lt-ie8 lt-ie7';
} elseif (\Xiphe\THETOOLS::is_browser('ie7x')) {
$sIeClass = $before.'lt-ie10 lt-ie9 lt-ie8';
} elseif (\Xiphe\THETOOLS::is_browser('ie8x')) {
$sIeClass = $before.'lt-ie10 lt-ie9';
} elseif (\Xiphe\THETOOLS::is_browser('ie9x')) {
$sIeClass = $before.'lt-ie10';
}
}
}
return $sIeClass;
}
/**
* Checks if \Xiphe\THETOOLS exists and appends browser classes.
*
* @param string $before separator.
*
* @return string
*/
public function browserClass($before = '')
{
if (class_exists('Xiphe\THEMASTER\core\THEMASTER')) {
$browser = str_replace(' ', '_', strtolower(\Xiphe\THETOOLS::get_browser()));
$version = str_replace('.', '-', \Xiphe\THETOOLS::get_browserVersion());
$engine = strtolower(\Xiphe\THETOOLS::get_layoutEngine());
if (!empty($engine)) {
$engine .=' ';
}
return "$before$engine$browser $browser-$version";
}
return '';
}
}
|
Xiphe/DropboxConflictMerger
|
src/Xiphe/HTML/modules/Openinghtml.php
|
PHP
|
gpl-2.0
| 4,576
|
/*
* Copyright (C) 2013 David Graeff <david.graeff@udo.edu>
* Based on Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
* Released under the terms of the GNU GPL v2.0.
*/
#include "qconf.h"
#include "mainwindow.h"
#include <qglobal.h>
#include <QApplication>
#include <QDebug>
#include "../expr.h"
#include "../lkc.h"
void fixup_rootmenu(struct menu *menu)
{
struct menu *child;
static int menu_cnt = 0;
menu->flags |= MENU_ROOT;
for (child = menu->list; child; child = child->next) {
if (child->prompt && child->prompt->type == P_MENU) {
menu_cnt++;
fixup_rootmenu(child);
menu_cnt--;
} else if (!menu_cnt)
fixup_rootmenu(child);
}
}
static const char *progname;
static void usage(void)
{
qDebug() << QApplication::tr("%s <config>\n").arg(progname);
exit(0);
}
int main(int ac, char** av)
{
const char *name;
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
progname = av[0];
QApplication configApp(ac, av);
// Important for QSetting to store settings in .config/kernel.org/qconf
configApp.setApplicationName("qconf");
configApp.setOrganizationDomain("kernel.org");
if (ac > 1 && av[1][0] == '-') {
switch (av[1][1]) {
case 'h':
case '?':
usage();
}
}
if (ac > 2 && av[1][0] == '-') {
name = av[2];
} else if(ac>1) {
name = av[1];
} else {
printf("No config file!\n");
usage();
exit(0);
}
conf_parse(name);
fixup_rootmenu(&rootmenu);
conf_read(NULL);
//zconfdump(stdout);
qconf_MainWindow v;
configApp.setQuitOnLastWindowClosed(true);
v.show();
configApp.exec();
return 0;
}
|
davidgraeff/linux
|
scripts/kconfig/qconfig/qconf.cc
|
C++
|
gpl-2.0
| 1,598
|
/*
Kopete Oscar Protocol
connection.cpp - independent protocol encapsulation
Copyright (c) 2004-2005 by Matt Rogers <mattr@kde.org>
Based on code Copyright (c) 2004 SuSE Linux AG <http://www.suse.com>
Based on Iris, Copyright (C) 2003 Justin Karneges
Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
#include "connection.h"
#include "client.h"
#include "connector.h"
#include "oscarclientstream.h"
#include "rateclassmanager.h"
#include "task.h"
#include "transfer.h"
#include <kapplication.h>
#include <kdebug.h>
#include "oscartypeclasses.h"
const Oscar::WORD StarSequences[] = {
5695, 23595, 23620, 23049, 0x2886, 0x2493, 23620, 23049, 2853, 17372, 1255, 1796, 1657, 13606, 1930, 23918, 31234, 30120, 0x1BEA, 0x5342, 0x30CC, 0x2294, 0x5697, 0x25FA, 0x3C26, 0x3303, 0x078A, 0x0FC5, 0x25D6, 0x26EE,0x7570, 0x7F33, 0x4E94, 0x07C9, 0x7339, 0x42A8
//0x39B1, 0x1F07
};
class ConnectionPrivate
{
public:
DWORD snacSequence;
WORD flapSequence;
QValueList<int> familyList;
RateClassManager* rateClassManager;
ClientStream* clientStream;
Connector* connector;
Client* client;
Task* root;
};
Connection::Connection( Connector* connector, ClientStream* cs, const char* name )
: QObject( 0, name )
{
d = new ConnectionPrivate();
d->clientStream = cs;
d->client = 0;
d->connector = connector;
d->rateClassManager = new RateClassManager( this );
d->root = new Task( this, true /* isRoot */ );
m_loggedIn = false;
initSequence();
}
Connection::~Connection()
{
delete d->rateClassManager;
delete d->clientStream;
delete d->connector;
delete d->root;
delete d;
}
void Connection::setClient( Client* c )
{
d->client = c;
connect( c, SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) );
}
void Connection::connectToServer( const QString& host, bool auth )
{
connect( d->clientStream, SIGNAL( error( int ) ), this, SLOT( streamSocketError( int ) ) );
connect( d->clientStream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) );
connect( d->clientStream, SIGNAL( connected() ), this, SIGNAL( connected() ) );
d->clientStream->connectToServer( host, auth );
}
void Connection::close()
{
d->clientStream->close();
reset();
}
bool Connection::isSupported( int family ) const
{
return ( d->familyList.findIndex( family ) != -1 );
}
QValueList<int> Connection::supportedFamilies() const
{
return d->familyList;
}
void Connection::addToSupportedFamilies( const QValueList<int>& familyList )
{
d->familyList += familyList;
}
void Connection::addToSupportedFamilies( int family )
{
d->familyList.append( family );
}
void Connection::taskError( const Oscar::SNAC& s, int errCode )
{
d->client->notifyTaskError( s, errCode, false /*fatal*/ );
}
void Connection::fatalTaskError( const Oscar::SNAC& s, int errCode )
{
d->client->notifyTaskError( s, errCode, true /* fatal */ );
}
Oscar::Settings* Connection::settings() const
{
return d->client->clientSettings();
}
Q_UINT16 Connection::flapSequence()
{
d->flapSequence++;
if ( d->flapSequence >= 0x8000 ) //the max flap sequence is 0x8000 ( HEX )
d->flapSequence = 1;
return d->flapSequence;
}
Q_UINT32 Connection::snacSequence()
{
d->snacSequence++;
return d->snacSequence;
}
QString Connection::userId() const
{
return d->client->userId();
}
QString Connection::password() const
{
return d->client->password();
}
bool Connection::isIcq() const
{
return d->client->isIcq();
}
Task* Connection::rootTask() const
{
return d->root;
}
SSIManager* Connection::ssiManager() const
{
return d->client->ssiManager();
}
const Oscar::ClientVersion* Connection::version() const
{
return d->client->version();
}
bool Connection::isLoggedIn() const
{
return m_loggedIn;
}
RateClassManager* Connection::rateManager() const
{
return d->rateClassManager;
}
void Connection::send( Transfer* request ) const
{
if( !d->clientStream )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No stream to write on!" << endl;
return;
}
d->rateClassManager->queue( request );
}
void Connection::forcedSend( Transfer* request ) const
{
if ( !d->clientStream )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "No stream to write on" << endl;
return;
}
d->clientStream->write( request );
}
void Connection::initSequence()
{
d->snacSequence = ( KApplication::random() & 0xFFFF );
int startSequencesIndex = KApplication::random() % ((sizeof StarSequences) / (sizeof StarSequences[0]));
d->flapSequence = StarSequences[startSequencesIndex] - 1;
}
void Connection::distribute( Transfer * transfer ) const
{
//d->rateClassManager->recalcRateLevels();
if( !rootTask()->take( transfer ) )
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "root task refused transfer" << endl;
delete transfer;
}
void Connection::reset()
{
//clear the family list
d->familyList.clear();
d->rateClassManager->reset();
}
void Connection::streamReadyRead()
{
// take the incoming transfer and distribute it to the task tree
Transfer * transfer = d->clientStream->read();
distribute( transfer );
}
void Connection::loggedIn()
{
m_loggedIn = true;
}
void Connection::streamSocketError( int code )
{
emit socketError( code, d->clientStream->errorText() );
}
#include "connection.moc"
//kate: tab-width 4; indent-mode csands;
|
iegor/kdenetwork
|
kopete/protocols/oscar/liboscar/connection.cpp
|
C++
|
gpl-2.0
| 5,832
|
// DO NOT EDIT
// generated from qop_pc.h
#ifndef _QOP_D3_H
#define _QOP_D3_H
#include <qdp.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct QOP_D3_ColorVector_struct QOP_D3_ColorVector;
typedef struct QOP_D3_DiracFermion_struct QOP_D3_DiracFermion;
typedef struct QOP_D3_GaugeField_struct QOP_D3_GaugeField;
typedef struct QOP_D3_Force_struct QOP_D3_Force;
typedef struct QOP_D3_FermionLinksAsqtad_struct QOP_D3_FermionLinksAsqtad;
typedef struct QOP_D3_FermionLinksHisq_struct QOP_D3_FermionLinksHisq;
typedef struct QOP_D3_FermionLinksWilson_struct QOP_D3_FermionLinksWilson;
typedef struct QOP_D3_FermionLinksDW_struct QOP_D3_FermionLinksDW;
/**********************/
/* General routines */
/**********************/
#define QOP_D3_qla_type_V QLA_D3_ColorVector
#define QOP_D3_qla_type_D QLA_D3_DiracFermion
#define QOP_D3_qla_type_M QLA_D3_ColorMatrix
#define QOP_D3_raw_size(T) (QDP_sites_on_node*sizeof(QOP_D3_qla_type_##T))
#define QOP_D3_raw_size_V(evenodd) QOP_D3_raw_size(V)
#define QOP_D3_raw_size_D(evenodd) QOP_D3_raw_size(D)
#define QOP_D3_raw_size_G(evenodd) QOP_D3_raw_size(M)
#define QOP_D3_raw_size_F(evenodd) QOP_D3_raw_size(M)
#define QOP_D3_elem(T, raw, i, ...) QLA_D3_elem_##T(((QOP_D3_qla_type_##T *)raw)[i], __ARGV__)
#define QOP_D3_set(T, raw, i, re, im, ...) QLA_c_eq_r_plus_ir(QOP_D3_elem(T, raw, i, __ARGV__), re, im)
#define QOP_D3_raw_set_V(raw, evenodd, i, ic, re, im) QOP_D3_set(V, raw, i, re, im, ic)
#define QOP_D3_raw_set_D(raw, evenodd, i, ic, is, re, im) QOP_D3_set(D, raw, i, re, im, ic, is)
#define QOP_D3_raw_set_G(raw, evenodd, i, ic, jc, re, im) QOP_D3_set(M, raw, i, re, im, ic, jc)
#define QOP_D3_raw_set_F(raw, evenodd, i, ic, jc, re, im) QOP_D3_set(M, raw, i, re, im, ic, jc)
#define QOP_D3_get(T, re, im, raw, i, ...) { \
QLA_D_Complex _c = QOP_D3_elem(T, raw, i, __ARGV__); \
re = QLA_real(_c); im = QLA_imag(_c); \
}
#define QOP_D3_raw_get_V(re, im, raw, evenodd, i, ic) QOP_D3_set(V, re, im, raw, i, ic)
#define QOP_D3_raw_get_D(re, im, raw, evenodd, i, ic, is) QOP_D3_set(D, re, im, raw, i, ic, is)
#define QOP_D3_raw_get_M(re, im, raw, evenodd, i, ic, jc) QOP_D3_set(M, re, im, raw, i, ic, jc)
#define QOP_D3_raw_get_G(re, im, raw, evenodd, i, ic, jc) QOP_D3_set(M, re, im, raw, i, ic, jc)
/* create a QOP field with a copy of the raw source field */
QOP_D3_ColorVector *QOP_D3_create_V_from_raw( QOP_D_Real *src, QOP_evenodd_t evenodd);
QOP_D3_DiracFermion *QOP_D3_create_D_from_raw( QOP_D_Real *src, QOP_evenodd_t evenodd);
QOP_D3_GaugeField *QOP_D3_create_G_from_raw( QOP_D_Real *links[], QOP_evenodd_t evenodd);
QOP_D3_Force *QOP_D3_create_F_from_raw( QOP_D_Real *force[], QOP_evenodd_t evenodd);
/* copy QOP field into a raw field */
void QOP_D3_extract_V_to_raw(QOP_D_Real *dest, QOP_D3_ColorVector *src, QOP_evenodd_t evenodd);
void QOP_D3_extract_D_to_raw(QOP_D_Real *dest, QOP_D3_DiracFermion *src, QOP_evenodd_t evenodd);
void QOP_D3_extract_G_to_raw(QOP_D_Real *dest[], QOP_D3_GaugeField *src, QOP_evenodd_t evenodd);
void QOP_D3_extract_F_to_raw(QOP_D_Real *dest[], QOP_D3_Force *src, QOP_evenodd_t evenodd);
/* destroy a QOP field */
/* if the QOP field was created with a convert from raw function then
the user must still free the original raw field themself */
void QOP_D3_destroy_V(QOP_D3_ColorVector *field);
void QOP_D3_destroy_D(QOP_D3_DiracFermion *field);
void QOP_D3_destroy_G(QOP_D3_GaugeField *field);
void QOP_D3_destroy_F(QOP_D3_Force *field);
/* create a QOP field using the raw source field */
/* the raw source is not freed and the user must not change or free it until
the QOP field has been converted back to raw or destroyed */
QOP_D3_ColorVector *QOP_D3_convert_V_from_raw( QOP_D_Real *src, QOP_evenodd_t evenodd);
QOP_D3_DiracFermion *QOP_D3_convert_D_from_raw( QOP_D_Real *src, QOP_evenodd_t evenodd);
QOP_D3_GaugeField *QOP_D3_convert_G_from_raw( QOP_D_Real *links[], QOP_evenodd_t evenodd);
QOP_D3_Force *QOP_D3_convert_F_from_raw( QOP_D_Real *force[], QOP_evenodd_t evenodd);
/* create a raw field from the data in the QOP field and destroy it */
/* if the QOP field was created with a convert from raw function then
this will return the same raw source used as input */
QOP_D_Real *QOP_D3_convert_V_to_raw(QOP_D3_ColorVector *src, QOP_evenodd_t evenodd);
QOP_D_Real *QOP_D3_convert_D_to_raw(QOP_D3_DiracFermion *src, QOP_evenodd_t evenodd);
QOP_D_Real **QOP_D3_convert_G_to_raw(QOP_D3_GaugeField *src, QOP_evenodd_t evenodd);
QOP_D_Real **QOP_D3_convert_F_to_raw(QOP_D3_Force *src, QOP_evenodd_t evenodd);
QOP_D3_ColorVector *QOP_D3_create_V_from_qdp(QDP_D3_ColorVector *src);
QOP_D3_DiracFermion *QOP_D3_create_D_from_qdp(QDP_D3_DiracFermion *src);
QOP_D3_GaugeField *QOP_D3_create_G_from_qdp(QDP_D3_ColorMatrix *src[]);
QOP_D3_Force *QOP_D3_create_F_from_qdp(QDP_D3_ColorMatrix *src[]);
void QOP_D3_extract_V_to_qdp(QDP_D3_ColorVector *d, QOP_D3_ColorVector *src);
void QOP_D3_extract_D_to_qdp(QDP_D3_DiracFermion *d, QOP_D3_DiracFermion *src);
void QOP_D3_extract_G_to_qdp(QDP_D3_ColorMatrix *d[], QOP_D3_GaugeField *src);
void QOP_D3_extract_F_to_qdp(QDP_D3_ColorMatrix *d[], QOP_D3_Force *src);
QOP_D3_ColorVector *QOP_D3_convert_V_from_qdp(QDP_D3_ColorVector *src);
QOP_D3_DiracFermion *QOP_D3_convert_D_from_qdp(QDP_D3_DiracFermion *src);
QOP_D3_GaugeField *QOP_D3_convert_G_from_qdp(QDP_D3_ColorMatrix *src[]);
QOP_D3_Force *QOP_D3_convert_F_from_qdp(QDP_D3_ColorMatrix *src[]);
QDP_D3_ColorVector *QOP_D3_convert_V_to_qdp(QOP_D3_ColorVector *src);
QDP_D3_DiracFermion *QOP_D3_convert_D_to_qdp(QOP_D3_DiracFermion *src);
QDP_D3_ColorMatrix **QOP_D3_convert_G_to_qdp(QOP_D3_GaugeField *src);
QDP_D3_ColorMatrix **QOP_D3_convert_F_to_qdp(QOP_D3_Force *src);
/********************/
/* Gauge routines */
/********************/
/* puts in boundary condition and staggered phases in place */
/* if either bc or ksphase is NULL those phases are ignored */
/* see the corresponding structure definitions for conventions */
void QOP_D3_rephase_G(QOP_D3_GaugeField *links,
int *r0,
QOP_bc_t *bc,
QOP_staggered_sign_t *sign);
void QOP_D3_rephase_G_qdp(QDP_D3_ColorMatrix *links[],
int *r0,
QOP_bc_t *bc,
QOP_staggered_sign_t *sign);
void QOP_D3_smear_fat7l_qdp(QOP_info_t *info, QDP_D3_ColorMatrix *sg[],
QDP_D3_ColorMatrix *g[],
QOP_asqtad_coeffs_t *coeffs);
void QOP_D3_gauge_deriv_multi_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *deriv[],
QOP_D3_GaugeField *g[],
QDP_D3_ColorMatrix **chain[],
int n, int doLastScale);
void QOP_D3_gauge_force_multi_qdp(QOP_info_t *info, QDP_D3_ColorMatrix *f[],
QOP_D3_GaugeField *g[],
QDP_D3_ColorMatrix **chain[], int n);
void QOP_D3_symanzik_1loop_gauge_action(QOP_info_t *info,
QOP_D3_GaugeField *gauge,
QOP_D_Real *acts, QOP_D_Real *actt,
QOP_gauge_coeffs_t *coeffs);
void QOP_D3_symanzik_1loop_gauge_action_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *links[],
QOP_D_Real *acts, QOP_D_Real *actt,
QOP_gauge_coeffs_t *coeffs);
void QOP_D3_symanzik_1loop_gauge_force(QOP_info_t *info,
QOP_D3_GaugeField *gauge,
QOP_D3_Force *force,
QOP_gauge_coeffs_t *coeffs,
QOP_D_Real eps);
void QOP_D3_symanzik_1loop_gauge_force_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *links[],
QDP_D3_ColorMatrix *force[],
QOP_gauge_coeffs_t *coeffs,
QOP_D_Real eps);
void QOP_D3_symanzik_1loop_gauge_deriv_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *links[],
QDP_D3_ColorMatrix *deriv[],
QOP_gauge_coeffs_t *coeffs,
QOP_D_Real eps, int doLastScale);
void QOP_D3_symanzik_1loop_gauge_heatbath_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *links[],
QLA_D_Real beta,
QOP_gauge_coeffs_t *coeffs,
QDP_RandomState *rs0,
int nup, int nhb, int nover);
void QOP_D3_symanzik_1loop_gauge_staple_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *links[],
QDP_D3_ColorMatrix *staple,
int mu,
QOP_gauge_coeffs_t *coeffs,
QDP_Subset subs[], int subi);
void QOP_D3_projectU_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *pU,
QDP_D3_ColorMatrix *U);
void QOP_D3_projectU_deriv_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *f,
QDP_D3_ColorMatrix *pU,
QDP_D3_ColorMatrix *U,
QDP_D3_ColorMatrix *chain);
void QOP_D3_u3reunit(QOP_info_t *info, QDP_D3_ColorMatrix *U,
QDP_D3_ColorMatrix *V);
void QOP_D3_su3reunit(QOP_info_t *info, QDP_D3_ColorMatrix *U,
QDP_D3_ColorMatrix *Ur);
void QOP_D3_hisq_force_multi_reunit(QOP_info_t *info,
QDP_D3_ColorMatrix *gf[4],
QDP_D3_ColorMatrix *force_accum[4],
QDP_D3_ColorMatrix *force_accum_old[4]);
void QOP_D3_staples(QOP_info_t *info, int nout, int nin,
QDP_D3_ColorMatrix *out[], QDP_D3_ColorMatrix *in[],
int nstaples[], int *topdir[], int *sidedir[],
int *toplinknum[], int *sidelinknum[], QOP_D_Real *coef[]);
void QOP_D3_staples_deriv(QOP_info_t *info, int nout, int nin,
QDP_D3_ColorMatrix *deriv[],
QDP_D3_ColorMatrix *chain[],
QDP_D3_ColorMatrix *in[],
int nstaples[], int *topdir[], int *sidedir[],
int *toplinknum[], int *sidelinknum[],
QOP_D_Real *coef[]);
/*********************/
/* Asqtad routines */
/*********************/
/* fermion matrix link routines */
QOP_D3_FermionLinksAsqtad *
QOP_D3_asqtad_create_L_from_raw( QOP_D_Real *fatlinks[],
QOP_D_Real *longlinks[],
QOP_evenodd_t evenodd);
QOP_D3_FermionLinksAsqtad *
QOP_D3_asqtad_create_L_from_G(QOP_info_t *info,
QOP_asqtad_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
QOP_D3_FermionLinksAsqtad *
QOP_D3_asqtad_create_L_from_G2(QOP_info_t *info,
QOP_asqtad_coeffs_t *coeffs,
QOP_D3_GaugeField *gFat,
QOP_D3_GaugeField *gLong);
void QOP_D3_asqtad_extract_L_to_raw(QOP_D_Real *fatlinks[],
QOP_D_Real *longlinks[],
QOP_D3_FermionLinksAsqtad *src,
QOP_evenodd_t evenodd);
void QOP_D3_asqtad_destroy_L(QOP_D3_FermionLinksAsqtad *field);
QOP_D3_FermionLinksAsqtad *
QOP_D3_asqtad_convert_L_from_raw( QOP_D_Real *fatlinks[],
QOP_D_Real *longlinks[],
QOP_evenodd_t evenodd);
void QOP_D3_asqtad_convert_L_to_raw(QOP_D_Real ***fatlinks,
QOP_D_Real ***longlinks,
QOP_D3_FermionLinksAsqtad *,
QOP_evenodd_t evenodd);
void QOP_D3_asqtad_load_L_from_raw(QOP_D3_FermionLinksAsqtad *asqtad,
QOP_D_Real *fatlinks[],
QOP_D_Real *longlinks[],
QOP_evenodd_t evenodd);
void QOP_D3_asqtad_load_L_from_G(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_asqtad_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
void QOP_D3_asqtad_load_L_from_G2(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_asqtad_coeffs_t *coeffs,
QOP_D3_GaugeField *gFat,
QOP_D3_GaugeField *gLong);
void QOP_D3_asqtad_rephase_L(QOP_D3_FermionLinksAsqtad *fla,
int *r0,
QOP_bc_t *bc,
QOP_staggered_sign_t *sign);
QOP_D3_FermionLinksAsqtad *
QOP_D3_asqtad_create_L_from_qdp(QDP_D3_ColorMatrix *fatlinks[],
QDP_D3_ColorMatrix *longlinks[]);
void QOP_D3_asqtad_extract_L_to_qdp(QDP_D3_ColorMatrix *fatlinks[],
QDP_D3_ColorMatrix *longlinks[],
QOP_D3_FermionLinksAsqtad *src);
QOP_D3_FermionLinksAsqtad *
QOP_D3_asqtad_convert_L_from_qdp(QDP_D3_ColorMatrix *fatlinks[],
QDP_D3_ColorMatrix *longlinks[]);
void QOP_D3_asqtad_convert_L_to_qdp(QDP_D3_ColorMatrix ***fatlinks,
QDP_D3_ColorMatrix ***longlinks,
QOP_D3_FermionLinksAsqtad *src);
void QOP_D3_asqtad_load_L_from_qdp(QOP_D3_FermionLinksAsqtad *asqtad,
QDP_D3_ColorMatrix *fatlinks[],
QDP_D3_ColorMatrix *longlinks[]);
void QOP_D3_asqtad_rephase_field_L_qdp(QOP_D3_FermionLinksAsqtad *fla,
QDP_D_Complex *fatphase[],
QDP_D_Complex *longphase[]);
/* inverter routines */
void QOP_D3_asqtad_dslash(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_D_Real mass,
QOP_D3_ColorVector *out,
QOP_D3_ColorVector *in,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_asqtad_dslash_dir(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
int dir, int fb,
double wtfat, double wtlong,
QOP_D3_ColorVector *out,
QOP_D3_ColorVector *in,
QOP_evenodd_t eo_out);
void QOP_D3_asqtad_diaginv(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_D_Real mass,
QOP_D3_ColorVector *out,
QOP_D3_ColorVector *in,
QOP_evenodd_t eo);
void QOP_D3_asqtad_ddagd(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_D_Real mass,
QDP_D3_ColorVector *out,
QDP_D3_ColorVector *in,
QOP_evenodd_t eo);
QOP_D_Real QOP_D3_asqtad_ddagd_norm2(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_D_Real mass,
QDP_D3_ColorVector *out,
QDP_D3_ColorVector *in,
QOP_evenodd_t eo);
void QOP_D3_asqtad_solve_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *fla,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg[],
QOP_D_Real masses[],
QDP_D3_ColorVector *out[],
QDP_D3_ColorVector *in[],
int nsolve);
void QOP_D3_asqtad_invert(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real mass,
QOP_D3_ColorVector *out_pt,
QOP_D3_ColorVector *in_pt);
void QOP_D3_asqtad_invert_threaded(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real mass,
QOP_D3_ColorVector *out_pt,
QOP_D3_ColorVector *in_pt,
int nthreads);
void QOP_D3_asqtad_invert_multi(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t **res_arg[],
QOP_D_Real *masses[],
int nmass[],
QOP_D3_ColorVector **out_pt[],
QOP_D3_ColorVector *in_pt[],
int nsrc);
void QOP_D3_asqtad_dslash_qdp(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_D_Real mass,
QDP_D3_ColorVector *out,
QDP_D3_ColorVector *in,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_asqtad_dslash_dir_qdp(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
int dir, int fb,
double wtfat, double wtlong,
QDP_D3_ColorVector *out,
QDP_D3_ColorVector *in,
QOP_evenodd_t eo_out);
void QOP_D3_asqtad_diaginv_qdp(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_D_Real mass,
QDP_D3_ColorVector *out,
QDP_D3_ColorVector *in,
QOP_evenodd_t eo);
void QOP_D3_asqtad_invert_qdp(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real mass,
QDP_D3_ColorVector *out,
QDP_D3_ColorVector *in);
void QOP_D3_asqtad_invert_threaded_qdp(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real mass,
QDP_D3_ColorVector *out,
QDP_D3_ColorVector *in,
int nthreads);
void QOP_D3_asqtad_invert_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksAsqtad *asqtad,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t **res_arg[],
QOP_D_Real *masses[],
int nmass[],
QDP_D3_ColorVector **out[],
QDP_D3_ColorVector *in[],
int nsrc);
void QOP_D3_asqtad_get_eigcg(QOP_D3_FermionLinksAsqtad *asqtad,
QDP_D3_ColorVector **evecs,
QLA_F_Real *evals, int *nv);
/* fermion force routines */
void QOP_D3_asqtad_deriv(QOP_info_t *info, QDP_D3_ColorMatrix *gauge[],
QDP_D3_ColorMatrix *force[],
QOP_asqtad_coeffs_t *coef,
QDP_D3_ColorMatrix *mid_fat[],
QDP_D3_ColorMatrix *mid_naik[]);
void QOP_D3_asqtad_force(QOP_info_t *info,
QOP_D3_GaugeField *gauge,
QOP_D3_Force *force,
QOP_asqtad_coeffs_t *coeffs,
QOP_D_Real eps,
QOP_D3_ColorVector *in_pt);
void QOP_D3_asqtad_force_multi(QOP_info_t *info,
QOP_D3_GaugeField *gauge,
QOP_D3_Force *force,
QOP_asqtad_coeffs_t *coef,
QOP_D_Real eps[],
QOP_D3_ColorVector *in_pt[],
int nsrc);
void QOP_D3_asqtad_force_multi_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *links[],
QDP_D3_ColorMatrix *force[],
QOP_asqtad_coeffs_t *coef,
QOP_D_Real eps[],
QDP_D3_ColorVector *in_pt[],
int nsrc);
void QOP_D3_asqtad_deriv_multi_qdp(QOP_info_t *info,
QDP_D3_ColorMatrix *links[],
QDP_D3_ColorMatrix *force[],
QOP_asqtad_coeffs_t *coef,
QOP_D_Real eps[],
QDP_D3_ColorVector *in_pt[],
int nsrc);
/*********************/
/* HISQ routines */
/*********************/
/* single precision */
QOP_D3_FermionLinksHisq *
QOP_D3_hisq_create_L_from_G(QOP_info_t *info,
QOP_hisq_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
void QOP_D3_hisq_destroy_L(QOP_D3_FermionLinksHisq *field);
QOP_D3_FermionLinksAsqtad **
QOP_D3_get_asqtad_links_from_hisq(QOP_D3_FermionLinksHisq *hl);
QOP_D3_FermionLinksAsqtad *
QOP_D3_get_asqtad_deps_links_from_hisq(QOP_D3_FermionLinksHisq *hl);
/* fermion force routines */
void QOP_D3_hisq_force_multi(QOP_info_t *info,
QOP_D3_FermionLinksHisq *flh,
QOP_D3_Force *force,
QOP_hisq_coeffs_t *coef,
QOP_D_Real eps[],
QOP_D3_ColorVector *in_pt[],
int *n_orders_naik);
void QOP_D3_hisq_deriv_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksHisq *flh,
QDP_D3_ColorMatrix *deriv[],
QOP_hisq_coeffs_t *coef,
QOP_D_Real eps[],
QDP_D3_ColorVector *in_pt[],
int *n_orders_naik,
int doLastScale);
void QOP_D3_hisq_force_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksHisq *flh,
QDP_D3_ColorMatrix *force[],
QOP_hisq_coeffs_t *coef,
QOP_D_Real eps[],
QDP_D3_ColorVector *in_pt[],
int *n_orders_naik);
/*********************/
/* Wilson routines */
/*********************/
/* fermion matrix link routines */
QOP_D3_FermionLinksWilson *
QOP_D3_wilson_create_L_from_raw( QOP_D_Real *links[], QOP_D_Real *clov,
QOP_evenodd_t evenodd);
QOP_D3_FermionLinksWilson *
QOP_D3_wilson_create_L_from_G(QOP_info_t *info,
QOP_wilson_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
void QOP_D3_wilson_extract_L_to_raw(QOP_D_Real *links[], QOP_D_Real *clov,
QOP_D3_FermionLinksWilson *src,
QOP_evenodd_t evenodd);
void QOP_D3_wilson_destroy_L(QOP_D3_FermionLinksWilson *field);
QOP_D3_FermionLinksWilson *
QOP_D3_wilson_convert_L_from_raw( QOP_D_Real *links[],
QOP_D_Real *clov,
QOP_evenodd_t evenodd);
void QOP_D3_wilson_convert_L_to_raw(QOP_D_Real ***links, QOP_D_Real **clov,
QOP_D3_FermionLinksWilson *src,
QOP_evenodd_t evenodd);
QOP_D3_FermionLinksWilson *
QOP_D3_wilson_convert_L_from_G(QOP_info_t *info,
QOP_wilson_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
QOP_D3_GaugeField *
QOP_D3_wilson_convert_L_to_G(QOP_D3_FermionLinksWilson *links);
void QOP_D3_wilson_load_L_from_raw(QOP_D3_FermionLinksWilson *wilson,
QOP_D_Real *links[], QOP_D_Real *clov,
QOP_evenodd_t evenodd);
void QOP_D3_wilson_load_L_from_G(QOP_info_t *info,
QOP_D3_FermionLinksWilson *wilson,
QOP_wilson_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
QOP_D3_FermionLinksWilson *
QOP_D3_wilson_create_L_from_qdp(QDP_D3_ColorMatrix *links[],
QDP_D3_DiracPropagator *clov);
void QOP_D3_wilson_extract_L_to_qdp(QDP_D3_ColorMatrix *links[],
QDP_D3_DiracPropagator *clov,
QOP_D3_FermionLinksWilson *src);
QOP_D3_FermionLinksWilson *
QOP_D3_wilson_convert_L_from_qdp(QDP_D3_ColorMatrix *links[],
QDP_D3_DiracPropagator *clov);
void QOP_D3_wilson_convert_L_to_qdp(QDP_D3_ColorMatrix ***links,
QDP_D3_DiracPropagator **clov,
QOP_D3_FermionLinksWilson *src);
void QOP_D3_wilson_load_L_from_qdp(QOP_D3_FermionLinksWilson *wilson,
QDP_D3_ColorMatrix *links[],
QDP_D3_DiracPropagator *clov);
/* inverter routines */
void QOP_D3_wilson_dslash(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QOP_D_Real kappa,
int sign,
QOP_D3_DiracFermion *out,
QOP_D3_DiracFermion *in,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_wilson_diaginv(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QOP_D_Real kappa,
QOP_D3_DiracFermion *out,
QOP_D3_DiracFermion *in,
QOP_evenodd_t eo);
void QOP_D3_wilson_invert(QOP_info_t *info,
QOP_D3_FermionLinksWilson *links,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real kappa,
QOP_D3_DiracFermion *out_pt,
QOP_D3_DiracFermion *in_pt);
void QOP_D3_wilson_invert_multi(QOP_info_t *info,
QOP_D3_FermionLinksWilson *links,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t **res_arg[],
QOP_D_Real *kappas[],
int nkappa[],
QOP_D3_DiracFermion **out_pt[],
QOP_D3_DiracFermion *in_pt[],
int nsrc);
void QOP_D3_wilson_dslash_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QOP_D_Real kappa,
int sign,
QDP_D3_DiracFermion *out,
QDP_D3_DiracFermion *in,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_wilson_diaginv_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QOP_D_Real kappa,
QDP_D3_DiracFermion *out,
QDP_D3_DiracFermion *in,
QOP_evenodd_t eo);
void QOP_D3_wilson_invert_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *links,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real kappa,
QDP_D3_DiracFermion *out_pt,
QDP_D3_DiracFermion *in_pt);
void QOP_D3_wilson_invert_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *links,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t **res_arg[],
QOP_D_Real *kappas[],
int nkappa[],
QDP_D3_DiracFermion **out_pt[],
QDP_D3_DiracFermion *in_pt[],
int nsrc);
void QOP_D3_wilson_invert_ne_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real kappa,
QDP_D3_DiracFermion *out,
QDP_D3_DiracFermion *in);
/* fermion force routines */
void QOP_D3_wilson_deriv_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QDP_D3_ColorMatrix *deriv[],
QOP_D_Real eps[],
QDP_D3_DiracFermion *x[],
QDP_D3_DiracFermion *y[],
int n);
void QOP_D3_wilson_force_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QDP_D3_ColorMatrix *force[],
QOP_D_Real eps[],
QDP_D3_DiracFermion *x[],
QDP_D3_DiracFermion *y[],
int n);
void QOP_D3_wilson_deriv_prec_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QDP_D3_ColorMatrix *deriv[],
QOP_D_Real kappa[],
QOP_D_Real eps[],
QDP_D3_DiracFermion *x[],
QDP_D3_DiracFermion *y[],
int n);
void QOP_D3_wilson_force_prec_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QDP_D3_ColorMatrix *force[],
QOP_D_Real kappa[],
QOP_D_Real eps[],
QDP_D3_DiracFermion *x[],
QDP_D3_DiracFermion *y[],
int n);
// new fermilab action IFLA -- added by bugra --------------- :
void QOP_D3_wilson_ifla_dslash(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QOP_D_Real kappa,
int sign,
QOP_wilson_ifla_coeffs_t *coeffs,
QOP_D3_DiracFermion *out,
QOP_D3_DiracFermion *in,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_wilson_ifla_dslash_qdp(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QOP_D_Real kappa,
int sign,
QOP_wilson_ifla_coeffs_t *coeffs,
QDP_D3_DiracFermion *out,
QDP_D3_DiracFermion *in,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_wilson_ifla_invert(QOP_info_t *info,
QOP_D3_FermionLinksWilson *flw,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real kappa,
QOP_wilson_ifla_coeffs_t *coeffs,
QOP_D3_DiracFermion *out,
QOP_D3_DiracFermion *in);
// MULTIGRID STUFF
#ifndef _QOP_3_MG
#define _QOP_3_MG
typedef struct QOP_3_WilsonMgStruct QOP_3_WilsonMg;
QOP_3_WilsonMg *QOP_3_wilsonMgNew(void);
void QOP_3_wilsonMgFree(QOP_3_WilsonMg *wmg);
void QOP_3_wilsonMgSet(QOP_3_WilsonMg *wmg, int l, char *s, double val);
void QOP_3_wilsonMgSetArray(QOP_3_WilsonMg *wmg, int l, char *s, double *vals, int nval);
void QOP_3_wilsonMgSetup(QOP_3_WilsonMg *wmg);
#endif // _QOP_3_MG
void QOP_D3_wilsonMgSetLinks(QOP_3_WilsonMg *wmg, QOP_D3_FermionLinksWilson *wil);
void QOP_D3_wilsonMgSolve(QOP_info_t *info, QOP_3_WilsonMg *wmg,
QOP_D3_FermionLinksWilson *flw,
QOP_invert_arg_t *inv_arg, QOP_resid_arg_t *res_arg,
QLA_Real kappa, QDP_DiracFermion *out, QDP_DiracFermion *in);
/**************************/
/* Domain Wall routines */
/**************************/
/* fermion matrix link routines */
QOP_D3_FermionLinksDW *
QOP_D3_dw_create_L_from_raw( QOP_D_Real *links[],
QOP_evenodd_t evenodd);
QOP_D3_FermionLinksDW *
QOP_D3_dw_create_L_from_G(QOP_info_t *info,
QOP_dw_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
void QOP_D3_dw_extract_L_to_raw(QOP_D_Real *links[],
QOP_D3_FermionLinksDW *src,
QOP_evenodd_t evenodd);
void QOP_D3_dw_destroy_L(QOP_D3_FermionLinksDW *field);
QOP_D3_FermionLinksDW *
QOP_D3_dw_convert_L_from_raw( QOP_D_Real *links[],
QOP_evenodd_t evenodd);
void QOP_D3_dw_convert_L_to_raw(QOP_D_Real ***links,
QOP_D3_FermionLinksDW *src,
QOP_evenodd_t evenodd);
QOP_D3_FermionLinksDW *
QOP_D3_dw_convert_L_from_G(QOP_info_t *info,
QOP_dw_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
QOP_D3_GaugeField *
QOP_D3_dw_convert_L_to_G(QOP_D3_FermionLinksDW *links);
void QOP_D3_dw_load_L_from_raw(QOP_D3_FermionLinksDW *dw,
QOP_D_Real *links[], QOP_evenodd_t evenodd);
void QOP_D3_dw_load_L_from_G(QOP_info_t *info,
QOP_D3_FermionLinksDW *dw,
QOP_dw_coeffs_t *coeffs,
QOP_D3_GaugeField *gauge);
QOP_D3_FermionLinksDW *
QOP_D3_dw_create_L_from_qdp(QDP_D3_ColorMatrix *links[]);
void QOP_D3_dw_extract_L_to_qdp(QDP_D3_ColorMatrix *links[],
QOP_D3_FermionLinksDW *src);
QOP_D3_FermionLinksDW *
QOP_D3_dw_convert_L_from_qdp(QDP_D3_ColorMatrix *links[]);
void QOP_D3_dw_convert_L_to_qdp(QDP_D3_ColorMatrix ***links,
QOP_D3_FermionLinksDW *src);
void QOP_D3_dw_load_L_from_qdp(QOP_D3_FermionLinksDW *dw,
QDP_D3_ColorMatrix *links[]);
/* inverter routines */
void QOP_D3_dw_dslash(QOP_info_t *info,
QOP_D3_FermionLinksDW *links,
QOP_D_Real M5,
QOP_D_Real m,
int sign,
QOP_D3_DiracFermion *out_pt[],
QOP_D3_DiracFermion *in_pt[],
int Ls,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_dw_dslash2(QOP_info_t *info,
QOP_D3_FermionLinksDW *links,
QOP_D_Real M5,
QOP_D_Real m,
QOP_D3_DiracFermion *out_pt[],
QOP_D3_DiracFermion *in_pt[],
int Ls,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_dw_invert(QOP_info_t *info,
QOP_D3_FermionLinksDW *links,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real M5,
QOP_D_Real m,
QOP_D3_DiracFermion *out_pt[],
QOP_D3_DiracFermion *in_pt[],
int Ls);
void QOP_D3_dw_invert_multi(QOP_info_t *info,
QOP_D3_FermionLinksDW *links,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t **res_arg[],
QOP_D_Real *M5[],
QOP_D_Real *m[],
int nmass[],
QOP_D3_DiracFermion ***out_pt[],
QOP_D3_DiracFermion **in_pt[],
int nsrc,
int Ls);
void QOP_D3_dw_dslash_qdp(QOP_info_t *info,
QOP_D3_FermionLinksDW *links,
QOP_D_Real M5,
QOP_D_Real m,
int sign,
QDP_D3_DiracFermion *out_pt[],
QDP_D3_DiracFermion *in_pt[],
int Ls,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_dw_dslash2_qdp(QOP_info_t *info,
QOP_D3_FermionLinksDW *links,
QOP_D_Real M5,
QOP_D_Real m,
QDP_D3_DiracFermion *out_pt[],
QDP_D3_DiracFermion *in_pt[],
int Ls,
QOP_evenodd_t eo_out,
QOP_evenodd_t eo_in);
void QOP_D3_dw_diaginv_qdp(QOP_info_t *info,
QOP_D3_FermionLinksDW *fldw,
QOP_D_Real M5,
QOP_D_Real m,
QDP_D3_DiracFermion **out,
QDP_D3_DiracFermion **in,
int ls,
QOP_evenodd_t eo);
void QOP_D3_dw_invert_qdp(QOP_info_t *info,
QOP_D3_FermionLinksDW *links,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t *res_arg,
QOP_D_Real M5,
QOP_D_Real m,
QDP_D3_DiracFermion *out[],
QDP_D3_DiracFermion *in[],
int Ls);
void QOP_D3_dw_invert_multi_qdp(QOP_info_t *info,
QOP_D3_FermionLinksDW *links,
QOP_invert_arg_t *inv_arg,
QOP_resid_arg_t **res_arg[],
QOP_D_Real *M5[],
QOP_D_Real *m[],
int nmass[],
QDP_D3_DiracFermion ***out[],
QDP_D3_DiracFermion **in[],
int nsrc,
int Ls);
/* fermion force routines */
void QOP_D3_dw_force(QOP_info_t *info,
QOP_D3_GaugeField *gauge,
QOP_D3_Force *force,
QOP_dw_coeffs_t *coeffs,
QOP_D_Real eps,
QOP_D3_DiracFermion *in_pt);
void QOP_D3_dw_force_multi(QOP_info_t *info,
QOP_D3_GaugeField *gauge,
QOP_D3_Force *force,
QOP_dw_coeffs_t *coef,
QOP_D_Real eps[],
QOP_D3_DiracFermion *in_pt[],
int nsrc);
/**************************************************/
/* Mapping of generic names to specific precision */
/**************************************************/
#if QOP_Precision == 'D'
# if QOP_Colors == 3
# include <qop_d3_generic.h>
# endif
# include <qop_d3_precision_generic.h>
#endif
#if QOP_Colors == 3
# include <qop_d3_color_generic.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* _QOP_D3_H */
|
usqcd-software/qopqdp
|
include/qop_d3.h
|
C
|
gpl-2.0
| 30,669
|
MomentPicker
============
Project to create a date and time picker based on MomentJS
|
jpobley/MomentPicker
|
README.md
|
Markdown
|
gpl-2.0
| 86
|
using GraphPlugins;
namespace GraphCodec
{
class CustomCodecConfig : ICodecConfig
{
public IGraphCodec CreateGraphCodec()
{
return new CustomGraphCodec();
}
public string GetCodecName()
{
return "Custom";
}
}
}
|
imefGames/GraphViewer
|
GraphCodec/CustomCodecConfig.cs
|
C#
|
gpl-2.0
| 300
|
<!--
* The Shell that holds all other templates in place
* Copyright (C) 2014-2015 Forfuture LLC <we@forfuture.co.ke>
*
* 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<ion-side-menus enable-menu-with-back-views="false">
<!-- Main Content -->
<ion-side-menu-content>
<!-- Top Navigation Bar -->
<ion-nav-bar class="bar-stable">
<ion-nav-back-button></ion-nav-back-button>
<ion-nav-buttons side="left">
<button class="button button-icon button-clear ion-more" menu-toggle="left">
</button>
</ion-nav-buttons>
</ion-nav-bar>
<!-- /Top Navigation Bar -->
<!-- Main View -->
<ion-nav-view name="mainContent"></ion-nav-view>
</ion-side-menu-content>
<!-- Left Side-Menu -->
<ion-side-menu side="left">
<ion-header-bar class="bar-stable">
<h1 class="title">menu</h1>
</ion-header-bar>
<ion-content>
<ion-list>
<ion-item nav-clear menu-close href="#/app/home">
<i class="ion-email"></i>
Timeline
</ion-item>
<ion-item nav-clear menu-close href="#/app/post">
<i class="ion-paper-airplane"></i>
New Post
</ion-item>
<ion-item nav-clear menu-close href="#/app/browse">
<i class="ion-grid"></i>
Browse
</ion-item>
<ion-item nav-clear menu-close href="#/app/settings">
<i class="ion-gear-a"></i>
Settings
</ion-item>
<ion-item nav-clear menu-close ng-click="loginHandle.func()">
<i class="ion-person"></i>
{{ loginHandle.label }}
</ion-item>
</ion-list>
</ion-content>
</ion-side-menu>
<!-- /Left Side-Menu -->
</ion-side-menus>
|
forfuturellc/naijav
|
www/templates/shell.html
|
HTML
|
gpl-2.0
| 2,380
|
PvP-Pay
=======
_Light Weight PvP Payment System_
PvP-Pay is a bukkit running on Vault designed for PvP servers that rewards players with cash for each kill.
Permissions
--------------
Permission | Description
------------- | -------------
pvppay.pay.1 | Allows a player to be rewarded with pay level 1
pvppay.pay.2 | Allows a player to be rewarded with pay level 2
pvppay.pay.3 | Allows a player to be rewarded with pay level 3
pvppay.pay.4 | Allows a player to be rewarded with pay level 4
pvppay.pay.5 | Allows a player to be rewarded with pay level 5
Configuration
--------------
```
kill-level-1-amount: 100
#permission: pvppay.pay.1
#default: true
kill-level-2-amount: 200
#permission: pvppay.pay.2
kill-level-3-amount: 300
#permission: pvppay.pay.3
kill-level-4-amount: 400
#permission: pvppay.pay.4
kill-level-5-amount: 500
#permission: pvppay.pay.5
#default: op
```
Version History
--------------
Plugin Build | Craftbukkit Build
------------- | -------------
Beta v0.2 | Craftbukkit 1.7.9-R0.2 Beta Build #3092
Beta v0.1 | Craftbukkit 1.7.2-R0.3 Beta Build #3020
Dependancies
--------------
Vault | http://dev.bukkit.org/bukkit-plugins/vault/
|
blobic123/PvP-Pay
|
README.md
|
Markdown
|
gpl-2.0
| 1,164
|
package Arboles;
/**
* Esta clase crea una lista y Nodos
*
* @author Christian A. Rodriguez
* @version 1.0
* @since 25octubre2015
*/
public class Funciones {
Mensajes mensajes = new Mensajes();
Nodo raiz;
int cantidad = 0;
int altura = 0;
Nodo izquierda, derecha;
public Funciones() {
raiz = null;
}
/**
* Método permite crear la lista desde el inicio ingresado cada nodo por
* parte de la clase Estudiante
*
* @param dato Numero
*/
public void adicionarNodoArbol(int dato) {
Nodo nuevo;
nuevo = new Nodo();
nuevo.dato = dato;
nuevo.izquierda = null;
nuevo.derecha = null;
if (raiz == null) {
raiz = nuevo;
} else {
Nodo anterior = null, nodo;
nodo = raiz;
while (nodo != null) {
anterior = nodo;
if (dato < nodo.dato) {
nodo = nodo.izquierda;
} else {
nodo = nodo.derecha;
}
}
if (dato < anterior.dato) {
anterior.izquierda = nuevo;
} else {
anterior.derecha = nuevo;
}
}
}
private void imprimirPre(Nodo nodo) {
if (nodo != null) {
System.out.print(nodo.dato + " ");
mensajes.mostrarInformacion(nodo.dato + " ");
imprimirPre(nodo.izquierda);
imprimirPre(nodo.derecha);
}
}
public void imprimirPre() {
imprimirPre(raiz);
System.out.println();
}
private void imprimirEntre(Nodo nodo) {
if (nodo != null) {
imprimirEntre(nodo.izquierda);
System.out.print(nodo.dato + " ");
mensajes.mostrarInformacion(nodo.dato + " ");
imprimirEntre(nodo.derecha);
}
}
public void imprimirEntre() {
imprimirEntre(raiz);
System.out.println();
}
private void imprimirPost(Nodo nodo) {
if (nodo != null) {
imprimirPost(nodo.izquierda);
imprimirPost(nodo.derecha);
System.out.print(nodo.dato + " ");
mensajes.mostrarInformacion(nodo.dato + " ");
}
}
public void imprimirPost() {
imprimirPost(raiz);
System.out.println();
}
public void cantidad(Nodo reco) {
if (reco != null) {
cantidad++;
cantidad(reco.izquierda);
cantidad(reco.derecha);
}
}
public int cantidad() {
cantidad = 0;
cantidad(raiz);
return cantidad;
}
private void cantidadNodosHoja(Nodo reco) {
if (reco != null) {
if (reco.izquierda == null && reco.derecha == null) {
cantidad++;
}
cantidadNodosHoja(reco.izquierda);
cantidadNodosHoja(reco.derecha);
}
}
public int cantidadNodosHoja() {
cantidad = 0;
cantidadNodosHoja(raiz);
return cantidad;
}
private void imprimirEntreConNivel(Nodo reco, int nivel) {
if (reco != null) {
imprimirEntreConNivel(reco.izquierda, nivel + 1);
System.out.print(reco.dato + " (" + nivel + ") - ");
imprimirEntreConNivel(reco.derecha, nivel + 1);
}
}
public void imprimirEntreConNivel() {
imprimirEntreConNivel(raiz, 1);
System.out.println();
}
private void retornarAltura(Nodo reco, int nivel) {
if (reco != null) {
retornarAltura(reco.izquierda, nivel + 1);
if (nivel > altura) {
altura = nivel;
}
retornarAltura(reco.derecha, nivel + 1);
}
}
public int retornarAltura() {
altura = 0;
retornarAltura(raiz, 1);
return altura;
}
public void mayorValor() {
if (raiz != null) {
Nodo reco = raiz;
while (reco.derecha != null) {
reco = reco.derecha;
}
mensajes.mostrarInformacion("Mayor valor del árbol:" + reco.dato);
}
}
}
|
cristian0193/EstructuraDatos
|
EstructuraDatos1/src/Arboles/Funciones.java
|
Java
|
gpl-2.0
| 4,396
|
'use strict';
var config = require('./config')
function init(opts) {
Object.assign(config, opts)
}
module.exports = {
init: init,
routes: require('./routes'),
models: require('./models'),
entry: require('./entry'),
channel: require('./channel'),
user: require('./user'),
security: require('./security'),
wpml: require('../common/wpml'),
riot: require('../common/riot'),
config: config,
webmention: require('./webmention'),
store: require('./store')
}
|
dogada/coect-umedia
|
server/index.js
|
JavaScript
|
gpl-2.0
| 480
|
package com.github.acme.tests.transfer;
import java.io.IOException;
/**
* @author alex.dobjanschi
* @since 9:36 AM 10/24/14
*/
public interface FileTransfer {
void transferBetweenAAndB(FileSystem fileSystemA, FileSystem fileSystemB) throws IOException;
}
|
djalexd/test-25
|
file-transfer/src/main/java/com/github/acme/tests/transfer/FileTransfer.java
|
Java
|
gpl-2.0
| 266
|
define("ace/theme/yesterday",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-yesterday";
exports.cssText = ".ace-yesterday .ace_gutter {\
background: #fff;\
border-right: 1px solid #ddd;\
color: #999;\
font-size: 10pt\
}\
.ace-yesterday .ace_print-margin {\
width: 1px;\
background: #f6f6f6\
}\
.ace-yesterday {\
background-color: #FFFFFF;\
color: #4D4D4C\
}\
.ace-yesterday .ace_cursor {\
color: #AEAFAD\
}\
.ace_scroller.ace_scroll-left {\
box-shadow: none\
}\
.ace-yesterday .ace_marker-layer .ace_selection {\
background: #D6D6D6\
}\
.ace-yesterday.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #FFFFFF;\
border-radius: 2px\
}\
.ace-yesterday .ace_marker-layer .ace_step {\
background: rgb(255, 255, 0)\
}\
.ace-yesterday .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #D1D1D1\
}\
.ace-yesterday .ace_marker-layer .ace_active-line {\
background: #EFEFEF\
}\
.ace-yesterday .ace_gutter-active-line {\
background-color : #dcdcdc\
}\
.ace-yesterday .ace_marker-layer .ace_selected-word {\
border: 1px solid #D6D6D6\
}\
.ace-yesterday .ace_invisible {\
color: #D1D1D1\
}\
.ace-yesterday .ace_keyword,\
.ace-yesterday .ace_meta,\
.ace-yesterday .ace_storage,\
.ace-yesterday .ace_storage.ace_type,\
.ace-yesterday .ace_support.ace_type {\
color: #8959A8\
}\
.ace-yesterday .ace_keyword.ace_operator {\
color: #3E999F\
}\
.ace-yesterday .ace_constant.ace_character,\
.ace-yesterday .ace_constant.ace_language,\
.ace-yesterday .ace_constant.ace_numeric,\
.ace-yesterday .ace_keyword.ace_other.ace_unit,\
.ace-yesterday .ace_support.ace_constant,\
.ace-yesterday .ace_variable.ace_parameter {\
color: #F5871F\
}\
.ace-yesterday .ace_constant.ace_other {\
color: #666969\
}\
.ace-yesterday .ace_invalid {\
color: #FFFFFF;\
background-color: #C82829\
}\
.ace-yesterday .ace_invalid.ace_deprecated {\
color: #FFFFFF;\
background-color: #8959A8\
}\
.ace-yesterday .ace_fold {\
background-color: #4271AE;\
border-color: #4D4D4C\
}\
.ace-yesterday .ace_entity.ace_name.ace_function,\
.ace-yesterday .ace_support.ace_function,\
.ace-yesterday .ace_variable {\
color: #4271AE\
}\
.ace-yesterday .ace_support.ace_class,\
.ace-yesterday .ace_support.ace_type {\
color: #C99E00\
}\
.ace-yesterday .ace_heading,\
.ace-yesterday .ace_markup.ace_heading,\
.ace-yesterday .ace_string {\
color: #718C00\
}\
.ace-yesterday .ace_entity.ace_name.ace_tag,\
.ace-yesterday .ace_entity.ace_other.ace_attribute-name,\
.ace-yesterday .ace_meta.ace_tag,\
.ace-yesterday .ace_string.ace_regexp,\
.ace-yesterday .ace_variable {\
color: #C82829\
}\
.ace-yesterday .ace_comment {\
color: #8E908C\
}\
.ace-yesterday .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});
|
DHUers/rigidoj
|
lib/assets/javascripts/ace/theme-yesterday.js
|
JavaScript
|
gpl-2.0
| 3,006
|
//
// ProductDetailViewController.h
// Dafiti-ObjC
//
// Created by Jhonathan Wyterlin on 03/11/15.
// Copyright © 2015 Jhonathan Wyterlin. All rights reserved.
//
#import "GenericViewController.h"
// Model
#import "ProductModel.h"
@interface ProductDetailViewController : GenericViewController
@property(nonatomic,strong) ProductModel *product;
@end
|
jwyterlin/Dafiti-App-ObjC
|
Dafiti-ObjC/Dafiti-ObjC/Controller/ProductDetailViewController.h
|
C
|
gpl-2.0
| 361
|
package clustering.results;
public class ResultadoMerge {
public int[][] merge;
public final int length;
public ResultadoMerge(int size) {
merge=new int[2][size];
length=size;
}
public int[] getId1(){
return merge[0];
}
public int[] getId2(){
return merge[1];
}
}
|
LBAB-Humboldt/JavaHierarchicalClustering
|
HierarchicalClustering/src/clustering/results/ResultadoMerge.java
|
Java
|
gpl-2.0
| 281
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2014 Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
*
* Licensed under the GNU General Public License Version 2
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __URF_OFONO_MANAGER_H
#define __URF_OFONO_MANAGER_H
#include <glib-object.h>
#include "urf-arbitrator.h"
G_BEGIN_DECLS
#define URF_TYPE_OFONO_MANAGER (urf_ofono_manager_get_type ())
#define URF_OFONO_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), URF_TYPE_OFONO_MANAGER, UrfOfonoManager))
#define URF_IS_OFONO_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), URF_TYPE_OFONO_MANAGER))
typedef struct _UrfOfonoManager UrfOfonoManager;
GType urf_ofono_manager_get_type (void);
UrfOfonoManager* urf_ofono_manager_new (void);
gboolean urf_ofono_manager_startup (UrfOfonoManager *ofono,
UrfArbitrator *arbitrator);
G_END_DECLS
#endif /* __URF_OFONO_MANAGER_H */
|
lcp/urfkill
|
src/urf-ofono-manager.h
|
C
|
gpl-2.0
| 1,653
|
/* ErrAbort.h - our error handler.
*
* This maintains two stacks - a warning message printer
* stack, and a "abort handler" stack.
*
* By default the warnings will go to stderr, and
* aborts will exit the program. You can push a
* function on to the appropriate stack to change
* this behavior. The top function on the stack
* gets called.
*
* Most functions in this library will call errAbort()
* if they run out of memory.
*
* This file is copyright 2002 Jim Kent, but license is hereby
* granted for all use - public, private or commercial. */
#ifndef ERRABORT_H
#define ERRABORT_H
void errAbort(char *format, ...)
/* Abort function, with optional (printf formatted) error message. */
#ifdef __GNUC__
__attribute__ ((noreturn))
#endif
;
void vaErrAbort(char *format, va_list args)
/* Abort function, with optional (vprintf formatted) error message. */
#ifdef __GNUC__
__attribute__ ((noreturn))
#endif
;
void errnoAbort(char *format, ...)
/* Prints error message from UNIX errno first, then does errAbort. */
#ifdef __GNUC__
__attribute__ ((noreturn))
#endif
;
typedef void (*AbortHandler)();
/* Function that can abort. */
void pushAbortHandler(AbortHandler handler);
/* Set abort handler */
void popAbortHandler();
/* Revert to old abort handler. */
void noWarnAbort()
/* Abort without message. */
#ifdef __GNUC__
__attribute__ ((noreturn))
#endif
;
void pushDebugAbort();
/* Push abort handler that will invoke debugger. */
void vaWarn(char *format, va_list args);
/* Call top of warning stack to issue warning. */
void warn(char *format, ...);
/* Issue a warning message. */
void errnoWarn(char *format, ...);
/* Prints error message from UNIX errno first, then does rest of warning. */
typedef void (*WarnHandler)(char *format, va_list args);
/* Function that can warn. */
void pushWarnHandler(WarnHandler handler);
/* Set warning handler */
void popWarnHandler();
/* Revert to old warn handler. */
#endif /* ERRABORT_H */
|
avilella/variscan
|
src/errabort.h
|
C
|
gpl-2.0
| 2,044
|
<?php
/**
* Class FieldTypesService
*
* @package ModelFramework\FieldTypesService
* @author Vladimir Pasechnik vladimir.pasechnik@gmail.com
* @author Stanislav Burikhin stanislav.burikhin@gmail.com
*/
namespace ModelFramework\FieldTypesService;
use ModelFramework\ConfigService\ConfigAwareInterface;
use ModelFramework\ConfigService\ConfigAwareTrait;
class FiledTypesService
implements FieldTypesServiceInterface, ConfigAwareInterface
{
use ConfigAwareTrait;
/**
* @param string $type
* @param string $part
*
* @return array
* @throws \Exception
*/
public function getFieldPart( $type, $part )
{
return $this->getConfigDomainPart( 'fieldTypes', $type, $part );
// $_config = $this->getConfigPart( $type );
// if ( !isset( $_config[ $part ] ) )
// {
// throw new \Exception( 'Unknown type "' . $type . '" for ' . $part );
// }
//
// return $_config[ $part ];
}
/**
* @param string $type
*
* @return array
* @throws \Exception
*/
public function getInputFilter( $type )
{
return $this->getFieldPart( $type, 'filter' );
}
/**
* @param string $type
*
* @return array
* @throws \Exception
*/
public function getField( $type )
{
return $this->getFieldPart( $type, 'field' );
}
/**
* @param string $type
*
* @return array
* @throws \Exception
*/
public function getFormElement( $type )
{
return $this->getFieldPart( $type, 'element' );
}
/**
* @param string $modelName
*
* @return array
*/
public function getUtilityFields( $modelName = '' )
{
return [
'fields' => [
'_id' => [
'type' => 'pk',
'fieldtype' => '_id',
'datatype' => 'string',
'default' => '',
'label' => 'ID',
'source' => '_id',
],
'_acl' => [
'type' => 'field',
'fieldtype' => 'array',
'datatype' => 'array',
'default' => [ ],
'label' => 'acl',
'source' => '_acl',
],
],
'filters' => [ '_id' => $this->getInputFilter( 'text' ) ],
];
}
}
|
modelframework/modelframework
|
src/ModelFramework/FieldTypesService/FiledTypesService.php
|
PHP
|
gpl-2.0
| 2,494
|
#!/usr/bin/env bash
# This is a test
###CLEAR VARIABLES
DOWNLOAD_SET=""
DOWNLOADER=""
PKGMAN=""
TEST="0"
# !!!TEST copy this line wherever you need the script to stop in a test
if [ "$TEST" == "1" ] ; then return 0 ; fi
DOWNLOAD_SELECTION=""
UNKNOWN_OPT=""
###SET VARIABLES
DOWNLOAD_DATE="`date +%Y-%m`"
WORKINGDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
###CONFIGURATION
DOWNLOAD_DIRECTORY="$WORKINGDIR/downloads"
mkdir $DOWNLOAD_DIRECTORY
mkdir $DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE
LOGFILE="$DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/download_progress.log"
touch $LOGFILE
printlog () {
echo $1
if [ "$2" == "failed" ] ; then
echo "FAIL: $1" >> $LOGFILE
else
echo $1 >> $LOGFILE
fi
}
###OPTIONS PROCESSING
SKIP_ARG="0"
for ARG ; do
if [ -n != "$ARG" ] ; then
UNKNOWN_OPT="1"
if [ "$SKIP_ARG" == "1" ] ; then
SKIP_ARG="0"
UNKNOWN_OPT="0"
fi
if [ "$ARG" == "-h" ] || [ "$ARG" == "--help" ] ; then
echo "Usage: pdu.sh -i [USER'S INITIALS]... -s [DOWNLOAD SET]... -c -h"
echo " -h, --help prints this help message"
echo " -i, --initials Specifies initials to be appended to file names"
echo " -s, --set allows you to choose from a predefined set of downloads"
echo " -c, --configure walks you through the configuration process"
echo " -r, --reset resets all logs"
echo "Welcome to the Program Downloader Utility (PDU). This program was created to automatically download programs from the internet using the terminal-based Lynx web browser."
echo "Configuration files can be found in the support/ directory. Every URL given in the categories will be downloaded into a matching subfolder. At this time, only websites from majorgeeks.com are supported, and you will want to put the download page in line, NOT the general information page. This allows you to choose which mirror you'd like to download. For all other direct downloads, you can put them in 'unsorted', and they will be downloaded via wget."
return 0
fi
if [ "$ARG" == "-c" ] || [ "$ARG" == "--configure" ] ; then
echo "Please enter the path to the folder you would like your new downloads to be dropped off:"
read DOWNLOAD_DIRECTORY
UNKNOWN_OPT="0"
shift
fi
if [ "$ARG" == "-i" ] || [ "$ARG" == "--initials" ] ; then
if [ -z "$2" ] ; then
echo "Please specify initials to be placed on downloads" && return 1
else
DOWNLOADER="$2"
echo "$DOWNLOADER will be appended to filenames."
UNKNOWN_OPT="0"
SKIP_ARG="1"
fi
fi
if [ "$ARG" == "-s" ] || [ "$ARG" == "--set" ] ; then
if [ -z "$2" ] ; then
echo "Please specify set to download" && return 1
else
echo "Downloading $2..."
DOWNLOAD_SET="$2"
UNKNOWN_OPT="0"
SKIP_ARG="1"
fi
fi
if [ "$ARG" == "-r" ] || [ "$ARG" == "--reset" ] ; then
UNKNOWN_OPT="0"
printlog "renaming download_progress.log to download_progress_`date`.log"
mv $DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/download_progress.log "$DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/download_progress_`date`.log"
printlog "logs cleared: renamed download_progress.log to download_progress_`date`.log"
if [ -n != "`ls $DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/badfiles/`" ] ; then
rm -f $WORKINGDIR/logs/badfiles/* && printlog "files cleared"
else printlog "no files to clear"
fi
fi
if [ "$ARG" == "-t" ] || [ "$ARG" == "--test" ] ; then
echo "Test mode!"
TEST="1"
UNKNOWN_OPT="0"
fi
if [ "$UNKNOWN_OPT" == "1" ] ; then
echo "unkown option!" && return 1
fi
fi
done
###FUNCTIONS
pckmgrchk () {
which rpm
if [ "$?" == "0" ] ; then
PKGMAN="rpm"
printlog "Package Manager: $PKGMAN"
fi
which apt
if [ "$?" == "0" ] ; then
PKGMAN="apt"
printlog "Package Manager: $PKGMAN"
fi
if [ -z "$PKGMAN" ] ; then
printlog "Package manager not recognized! Please make sure rpm or apt are installed and working!" && return 1
fi
}
depcheck () {
which "$1" >> /dev/null
if [ "$?" != "0" ] ; then
printlog "This program requires $1 to be installed in order to run properly. You can install it by typing:"
if [ "$PKGMAN" == "apt" ] ; then
printlog "sudo apt-get install $1"
INSACTN="apt-get"
elif [ "$PKGMAN" == "rpm" ] ; then
printlog "yum install $1"
INSACTN="yum"
else printlog "Package manager not recognized! Please make sure rpm or apt are installed and working!" && return 1
fi
printlog "Or we can try to install it right now. Would you like to? (Y/N)"
UINPUT=0
read UINPUT # grab first letter of input, upper or lower it, and check for THAT input. Shorter.
until [ $UINPUT == "exit" ] ; do
if [ $UINPUT == "Y" ] || [ $UINPUT == "y" ] || [ $UINPUT == "yes" ] || [ $UINPUT == "Yes" ] || [ $UINPUT == "YES" ] ; then
printlog "Installing $1..."
sudo $INSACTN install $1
UINPUT="exit"
elif [ $UINPUT == "N" ] || [ $UINPUT == "n" ] || [ $UINPUT == "no" ] || [ $UINPUT == "No" ] || [ $UINPUT == "NO" ] ; then
printlog "Package install cancelled." && return 0
else echo "I beg your pardon?"
fi
done
else printlog "Dependency check of $1 success"
fi }
progupdatechk () {
if [ -f "$2" ] ; then
printlog "File already in download directory! Deleting new file and skipping..."
rm -f $1
else
printlog "Moving $1 to $2..."
mv "$1" "$2"
fi
}
progdownload () {
mkdir "$DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/$2"
NOW=$(date +"%Y_%m_%d") && printlog "$DOWNLOAD_SET started at $NOW"
MYNUM="0"
until [ "$URL" == "exit" ] ; do
echo "" >> $LOGFILE
MYNUM=$((MYNUM + 1))
URL="$(sed ''$MYNUM'q;d' $1)" && printlog "$MYNUM) downloading $URL"
mkdir "$WORKINGDIR/tmp" 2> /dev/null
cd "$WORKINGDIR/tmp"
lynx -cmd_script="$WORKINGDIR/support/mgcmd.txt" --accept-all-cookies $URL
FILE=`(ls | head -n 1)`
if [ -z "$FILE" ] ; then
printlog "Download incomplete: $URL" "failed"
else
EXT=`echo -n $FILE | tail -c 3`
BAD=`cat "$WORKINGDIR/support/whiteexts.txt" | grep -v "#" | grep -cim1 "$EXT"`
until [ -z "$FILE" ] ; do
if [ $BAD == "0" ] ; then
progupdatechk "$FILE" "$DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/badfiles/$FILE"
printlog "Download $FILE is of unknown type. $URL" "failed"
else
if [ -z $DOWNLOADER ] ; then
progupdatechk "$FILE" "$DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/$DOWNLOAD_SET/$FILE"
else
progupdatechk "$FILE" "$DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/$DOWNLOAD_SET/${FILE%%.*}($DOWNLOADER).${FILE#*.}"
fi
printlog "Download success of $FILE from $URL"
fi
FILE=`(ls | head -n 1)`
done
fi
cd "$WORKINGDIR"
done
}
###PROGRAM START
cd $WORKINGDIR
echo "" >> $LOGFILE
printlog "lpd started at `date`"
###DEPENDENCY CHECK
pckmgrchk
depcheck wget
depcheck lynx
###MENU
mkdir "$DOWNLOAD_DIRECTORY/`date +%Y-%m`"
mkdir "$DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/badfiles"
if [ -z $DOWNLOAD_SET ] ; then
until [ "$DOWNLOAD_SET" == "exit" ] ; do
UNKNOWN_OPT="1"
echo "Which batch would you like to download?"
echo "all antivirus creative utilities office clear_logs configure help exit"
# DOWNLOAD_SELECTION="All Majorgeeks Wgets Antivirus Creative Utilities Office Clear_logs Configure Exit"
# select opt in $DOWNLOAD_SELECTION; do
# DOWNLOAD_SET="$opt"
# done
read DOWNLOAD_SET
if [ "$DOWNLOAD_SET" == "all" ] ; then
UNKNOWN_OPT="0"
printlog "Downloading $DOWNLOAD_SET ..."
progdownload "$WORKINGDIR/wgetadrs.txt" "unsorted"
progdownload "$WORKINGDIR/support/antivirus.txt" "antivirus"
progdownload "$WORKINGDIR/support/creative.txt" "creative"
progdownload "$WORKINGDIR/support/utilities.txt" "utilities"
progdownload "$WORKINGDIR/support/office.txt" "office"
fi
if [ "$DOWNLOAD_SET" == "antivirus" ]; then
UNKNOWN_OPT="0"
printlog "Downloading $DOWNLOAD_SET ..."
progdownload "$WORKINGDIR/support/antivirus.txt" "antivirus"
fi
if [ "$DOWNLOAD_SET" == "creative" ]; then
UNKNOWN_OPT="0"
printlog "Downloading $DOWNLOAD_SET ..."
progdownload "$WORKINGDIR/support/creative.txt" "creative"
fi
if [ "$DOWNLOAD_SET" == "utilities" ]; then
UNKNOWN_OPT="0"
printlog "Downloading $DOWNLOAD_SET ..."
progdownload "$WORKINGDIR/support/utilities.txt" "utilities"
fi
if [ "$DOWNLOAD_SET" == "office" ]; then
UNKNOWN_OPT="0"
printlog "Downloading $DOWNLOAD_SET ..."
progdownload "$WORKINGDIR/support/office.txt" "office"
fi
if [ "$DOWNLOAD_SET" == "clear_logs" ]; then
UNKNOWN_OPT="0"
printlog "renaming download_progress.log to download_progress_`date`.log"
mv $DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/download_progress.log "$DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/download_progress_`date`.log"
printlog "logs cleared: renamed download_progress.log to download_progress_`date`.log"
if [ -n != "`ls $DOWNLOAD_DIRECTORY/$DOWNLOAD_DATE/badfiles/`" ] ; then
rm -f $WORKINGDIR/logs/badfiles/* && printlog "files cleared"
else printlog "no files to clear"
fi
fi
if [ "$DOWNLOAD_SET" == "configure" ]; then
UNKNOWN_OPT="0"
echo "Please enter the path to the folder you would like your new downloads to be dropped off:"
read DOWNLOAD_DIRECTORY
export DOWNLOAD_DIRECTORY
fi
if [ "$DOWNLOAD_SET" == "help" ]; then
UNKNOWN_OPT="0"
echo "Usage: pdu.sh -i [USER'S INITIALS]... -s [DOWNLOAD SET]... -c -h"
echo " -h, --help prints this help message"
echo " -i, --initials Specifies initials to be appended to file names"
echo " -s, --set allows you to choose from a predefined set of downloads"
echo " -c, --configure walks you through the configuration process"
echo " -r, --reset resets all logs"
echo "Welcome to the Program Downloader Utility (PDU). This program was created to automatically download programs from the internet using the terminal-based Lynx web browser."
echo "Configuration files can be found in the support/ directory. Every URL given in the categories will be downloaded into a matching subfolder. At this time, only websites from majorgeeks.com are supported, and you will want to put the download page in line, NOT the general information page. This allows you to choose which mirror you'd like to download. For all other direct downloads, you can put them in 'unsorted', and they will be downloaded via wget."
fi
if [ "$DOWNLOAD_SET" == "exit" ]; then
UNKNOWN_OPT="0"
printlog "Goodbye!"
DOWNLOAD_SET="exit"
fi
if [ "$UNKNOWN_OPT" == "1" ] ; then
echo "I beg your pardon?"
fi
done
else
printlog "Downloading $DOWNLOAD_SET ..."
progdownload "$WORKINGDIR/support/$DOWNLOAD_SET.txt" "$DOWNLOAD_SET"
fi
|
qbit/Lynx-Program-Downloader
|
lpd.sh
|
Shell
|
gpl-2.0
| 11,074
|
<?php
/**
* glFusion CMS
*
* UTF-8 Language File for Links Plugin
*
* @license GNU General Public License version 2 or later
* http://www.opensource.org/licenses/gpl-license.php
*
* Copyright (C) 2008-2018 by the following authors:
* Mark R. Evans mark AT glfusion DOT org
*
* Based on prior work Copyright (C) 2001-2007 by the following authors:
* Tony Bibbs - tony AT tonybibbs DOT com
* Trinity Bays - trinity93 AT gmail DOT com
* Tom Willett - twillett AT users DOT sourceforge DOT net
*
*/
if (!defined ('GVERSION')) {
die ('This file cannot be used on its own.');
}
global $LANG32;
###############################################################################
# Array Format:
# $LANGXX[YY]: $LANG - variable name
# XX - file id number
# YY - phrase id number
###############################################################################
/**
* the link plugin's lang array
*
* @global array $LANG_LINKS
*/
$LANG_LINKS = array(
10 => 'Submissions',
14 => 'Links',
84 => 'Links',
88 => 'No new links',
114 => 'Links',
116 => 'Add A Link',
117 => 'Report Broken Link',
118 => 'Broken Link Report',
119 => 'The following link has been reported to be broken: ',
120 => 'To edit the link, click here: ',
121 => 'The broken Link was reported by: ',
122 => 'Thank you for reporting this broken link. The administrator will correct the problem as soon as possible',
123 => 'Thank you',
124 => 'Go',
125 => 'Categories',
126 => 'You are here:',
'root' => 'Root',
'error_header' => 'Link Submission Error',
'verification_failed' => 'The URL specified does not appear to be a valid URL',
'category_not_found' => 'The Category does not appear to be valid',
'no_links' => 'No links have been entered.',
);
###############################################################################
# for stats
/**
* the link plugin's lang stats array
*
* @global array $LANG_LINKS_STATS
*/
$LANG_LINKS_STATS = array(
'links' => 'Links (Clicks) in the System',
'stats_headline' => 'Top Ten Links',
'stats_page_title' => 'Links',
'stats_hits' => 'Hits',
'stats_no_hits' => 'It appears that there are no links on this site or no one has ever clicked on one.',
);
###############################################################################
# for the search
/**
* the link plugin's lang search array
*
* @global array $LANG_LINKS_SEARCH
*/
$LANG_LINKS_SEARCH = array(
'results' => 'Link Results',
'title' => 'Title',
'date' => 'Date Added',
'author' => 'Submited by',
'hits' => 'Clicks'
);
###############################################################################
# for the submission form
/**
* the link plugin's lang submit form array
*
* @global array $LANG_LINKS_SUBMIT
*/
$LANG_LINKS_SUBMIT = array(
1 => 'Submit a Link',
2 => 'Link',
3 => 'Category',
4 => 'Other',
5 => 'If other, please specify',
6 => 'Error: Missing Category',
7 => 'When selecting "Other" please also provide a category name',
8 => 'Title',
9 => 'URL',
10 => 'Category',
11 => 'Link Submissions',
12 => 'Submitted By',
);
###############################################################################
# autotag description
$LANG_LI_AUTOTAG = array(
'desc_link' => 'Link: to the detail page for a Link on this site; link_text defaults to the link name. usage: [link:<i>link_id</i> {link_text}]',
);
###############################################################################
# Messages for COM_showMessage the submission form
$PLG_links_MESSAGE1 = "Thank-you for submitting a link to {$_CONF['site_name']}. It has been submitted to our staff for approval. If approved, your link will be seen in the <a href={$_CONF['site_url']}/links/index.php>links</a> section.";
$PLG_links_MESSAGE2 = 'Your link has been successfully saved.';
$PLG_links_MESSAGE3 = 'The link has been successfully deleted.';
$PLG_links_MESSAGE4 = "Thank-you for submitting a link to {$_CONF['site_name']}. You can see it now in the <a href={$_CONF['site_url']}/links/index.php>links</a> section.";
$PLG_links_MESSAGE5 = "You do not have sufficient access rights to view this category.";
$PLG_links_MESSAGE6 = 'You do not have sufficient rights to edit this category.';
$PLG_links_MESSAGE7 = 'Please enter a Category Name and Description.';
$PLG_links_MESSAGE10 = 'Your category has been successfully saved.';
$PLG_links_MESSAGE11 = 'You are not allowed to set the id of a category to "site" or "user" - these are reserved for internal use.';
$PLG_links_MESSAGE12 = 'You are trying to make a parent category the child of it\'s own subcategory. This would create an orphan category, so please first move the child category or categories up to a higher level.';
$PLG_links_MESSAGE13 = 'The category has been successfully deleted.';
$PLG_links_MESSAGE14 = 'Category contains links and/or categories. Please remove these first.';
$PLG_links_MESSAGE15 = 'You do not have sufficient rights to delete this category.';
$PLG_links_MESSAGE16 = 'No such category exists.';
$PLG_links_MESSAGE17 = 'This category id is already in use.';
// Messages for the plugin upgrade
$PLG_links_MESSAGE3001 = 'Plugin upgrade not supported.';
$PLG_links_MESSAGE3002 = $LANG32[9];
###############################################################################
# admin/link.php
/**
* the link plugin's lang admin array
*
* @global array $LANG_LINKS_ADMIN
*/
$LANG_LINKS_ADMIN = array(
1 => 'Link Editor',
2 => 'Link ID',
3 => 'Link Title',
4 => 'Link URL',
5 => 'Category',
6 => '(include http://)',
7 => 'Other',
8 => 'Link Hits',
9 => 'Link Description',
10 => 'You need to provide a link Title, URL and Description.',
11 => 'Link Administration',
12 => 'To modify or delete a link, click on that link\'s edit icon below. To create a new link or a new category, click on "New link" or "New category" above. To edit multiple categories, click on "Edit categories" above.',
14 => 'Link Category',
16 => 'Access Denied',
17 => "You are trying to access a link that you don't have rights to. This attempt has been logged. Please <a href=\"{$_CONF['site_admin_url']}/plugins/links/index.php\">go back to the link administration screen</a>.",
20 => 'If other, specify',
21 => 'save',
22 => 'cancel',
23 => 'delete',
24 => 'Link not found',
25 => 'The link you selected for editing could not be found.',
26 => 'Validate Links',
27 => 'HTML Status',
28 => 'Edit category',
29 => 'Enter or edit the details below.',
30 => 'Category',
31 => 'Description',
32 => 'Category ID',
33 => 'Topic',
34 => 'Parent',
35 => 'All',
40 => 'Edit this category',
41 => 'Add',
42 => 'Delete this category',
43 => 'Site categories',
44 => 'Add Subcategory',
46 => 'User %s tried to delete a category to which they do not have access rights',
50 => 'Category Admin',
51 => 'New Link',
52 => 'New Root Category',
53 => 'Links Admin',
54 => 'Link Category Administration',
55 => 'Edit categories below. Note that you cannot delete a category that contains other categories or links - you should delete these first, or move them to another category.',
56 => 'Category Editor',
57 => 'Not validated yet',
58 => 'Validate now',
59 => '<br /><br />To validate all links displayed, please click on the "Validate now" link below. The validation process may take some time depending on the amount of links displayed.',
60 => 'User %s tried illegally to edit category %s.',
61 => 'Owner',
62 => 'Last Updated',
63 => 'Are you sure you want to delete this link?',
64 => 'Are you sure you want to delete this category?',
65 => 'Moderate Link',
66 => 'This screen allows you to create / edit links.',
67 => 'This screen allows you to create / edit a links category.',
);
$LANG_LINKS_STATUS = array(
100 => "Continue",
101 => "Switching Protocols",
200 => "OK",
201 => "Created",
202 => "Accepted",
203 => "Non-Authoritative Information",
204 => "No Content",
205 => "Reset Content",
206 => "Partial Content",
300 => "Multiple Choices",
301 => "Moved Permanently",
302 => "Found",
303 => "See Other",
304 => "Not Modified",
305 => "Use Proxy",
307 => "Temporary Redirect",
400 => "Bad Request",
401 => "Unauthorized",
402 => "Payment Required",
403 => "Forbidden",
404 => "Not Found",
405 => "Method Not Allowed",
406 => "Not Acceptable",
407 => "Proxy Authentication Required",
408 => "Request Timeout",
409 => "Conflict",
410 => "Gone",
411 => "Length Required",
412 => "Precondition Failed",
413 => "Request Entity Too Large",
414 => "Request-URI Too Long",
415 => "Unsupported Media Type",
416 => "Requested Range Not Satisfiable",
417 => "Expectation Failed",
500 => "Internal Server Error",
501 => "Not Implemented",
502 => "Bad Gateway",
503 => "Service Unavailable",
504 => "Gateway Timeout",
505 => "HTTP Version Not Supported",
999 => "Connection Timed out"
);
// Localization of the Admin Configuration UI
$LANG_configsections['links'] = array(
'label' => 'Links',
'title' => 'Links Configuration'
);
$LANG_confignames['links'] = array(
'linksloginrequired' => 'Links Login Required',
'linksubmission' => 'Enable Link Submission Queue',
'newlinksinterval' => 'New Links Interval',
'hidenewlinks' => 'Hide New Links',
'hidelinksmenu' => 'Hide Links Menu Entry',
'linkcols' => 'Categories per Column',
'linksperpage' => 'Links per Page',
'show_top10' => 'Show Top 10 Links',
'notification' => 'Notification Email',
'delete_links' => 'Delete Links with Owner',
'aftersave' => 'After Saving Link',
'show_category_descriptions' => 'Show Category Description',
'root' => 'ID of Root Category',
'default_permissions' => 'Link Default Permissions',
'target_blank' => 'Open Links in New Window',
'displayblocks' => 'Display glFusion Blocks',
'submission' => 'Link Submission',
);
$LANG_configsubgroups['links'] = array(
'sg_main' => 'Main Settings'
);
$LANG_fs['links'] = array(
'fs_public' => 'Public Links List Settings',
'fs_admin' => 'Links Admin Settings',
'fs_permissions' => 'Default Permissions'
);
$LANG_configSelect['links'] = array(
0 => array(1=>'True', 0=>'False'),
1 => array(true=>'True', false=>'False'),
9 => array('item'=>'Forward to Linked Site', 'list'=>'Display Admin List', 'plugin'=>'Display Public List', 'home'=>'Display Home', 'admin'=>'Display Admin'),
12 => array(0=>'No access', 2=>'Read-Only', 3=>'Read-Write'),
13 => array(0=>'Left Blocks', 1=>'Right Blocks', 2=>'Left & Right Blocks', 3=>'None'),
14 => array(0=>'None', 1=>'Logged-in Only', 2=>'Anyone', 3=>'None')
);
?>
|
glFusion/glfusion
|
private/plugins/links/language/english_utf-8.php
|
PHP
|
gpl-2.0
| 11,040
|