blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 201 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 7 100 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 260
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 11.4k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 80
values | src_encoding stringclasses 28
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 8 9.86M | extension stringclasses 52
values | content stringlengths 8 9.86M | authors listlengths 1 1 | author stringlengths 0 119 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6d0d01c66e19e2b077e482f915c4107adecd1abb | 4edc21dc12cb5948ca6800b641924a091387b25f | /TokenExtensions/TokenExtensions.h | 084aabb06d1a5db6f2647bad01b5bfbc6a17be4e | [] | no_license | Relz/Token-Library | db8a61ab82d08b2e05deaa3099c8a16410696fde | ed7217212978e047a1160b6f56cf98f8516989cc | refs/heads/master | 2020-03-17T05:10:02.895646 | 2019-01-02T23:01:29 | 2019-01-02T23:01:29 | 133,304,916 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,237 | h | #ifndef TOKEN_TOKENEXTENSIONS_H
#define TOKEN_TOKENEXTENSIONS_H
#include "../Token.h"
#include "../TokenConstant/TokenConstant.h"
#include <string>
#include <unordered_map>
#include <unordered_set>
class TokenExtensions
{
public:
static bool CreateFromString(std::string const & str, Token & token);
static bool TryToGetDelimiterToken(std::string const & str, Token & token);
static bool TryToGetKeywordToken(std::string const & str, Token & token);
static bool TryToGetBooleanLiteralToken(std::string const & str, Token & token);
static bool TryToGetTypeToken(
std::string const & str, Token & token, std::unordered_set<std::string> const & customTypes);
static std::string ToString(Token token);
static bool TryToGetPredefinedFunctionToken(std::string const & str, Token & token);
private:
static std::unordered_map<std::string, Token> const STRING_TO_DELIMITER_TOKEN;
static std::unordered_map<std::string, Token> const STRING_TO_KEYWORD_TOKEN;
static std::unordered_set<std::string> const TYPES;
static std::unordered_map<std::string, Token> const PREDEFINED_FUNCTIONS;
static std::unordered_map<Token, std::string> const TOKEN_TO_NAME;
static std::unordered_map<std::string, Token> const NAME_TO_TOKEN;
};
#endif
| [
"relz0071@gmail.com"
] | relz0071@gmail.com |
ecd9af5909d0144d91f7ec9e0116aef1190a217c | c618bbf2719431999b1007461df0865bab60c883 | /dali/operators/math/expressions/math_overloads.h | 3d44837a0427fa335ef535fa4712e2eb7d256905 | [
"Apache-2.0"
] | permissive | NVIDIA/DALI | 3d0d061135d19e092647e6522046b2ff23d4ef03 | 92ebbe5c20e460050abd985acb590e6c27199517 | refs/heads/main | 2023-09-04T01:53:59.033608 | 2023-09-01T13:45:03 | 2023-09-01T13:45:03 | 135,768,037 | 4,851 | 648 | Apache-2.0 | 2023-09-12T18:00:22 | 2018-06-01T22:18:01 | C++ | UTF-8 | C++ | false | false | 5,960 | h | // Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef DALI_OPERATORS_MATH_EXPRESSIONS_MATH_OVERLOADS_H_
#define DALI_OPERATORS_MATH_EXPRESSIONS_MATH_OVERLOADS_H_
#include <cstdint>
#include <map>
#include <string>
#include <type_traits>
#include <utility>
#include "dali/core/cuda_utils.h"
#include "dali/core/math_util.h"
#include "dali/core/small_vector.h"
#include "dali/core/static_switch.h"
#include "dali/core/tensor_shape.h"
#ifdef __CUDA_ARCH__
#include <cuda_runtime.h>
#else
#include <cmath>
#endif
namespace dali {
namespace expr {
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_sqrt(T x) {
#ifdef __CUDA_ARCH__
return ::sqrt(x);
#else
return std::sqrt(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_rsqrt(T x) {
return rsqrt(x);
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_cbrt(T x) {
#ifdef __CUDA_ARCH__
return ::cbrt(x);
#else
return std::cbrt(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_exp(T x) {
#ifdef __CUDA_ARCH__
return ::exp(x);
#else
return std::exp(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_log(T x) {
#ifdef __CUDA_ARCH__
return ::log(x);
#else
return std::log(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_log2(T x) {
#ifdef __CUDA_ARCH__
return ::log2(x);
#else
return std::log2(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_log10(T x) {
#ifdef __CUDA_ARCH__
return ::log10(x);
#else
return std::log10(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline std::enable_if_t<std::is_signed<T>::value, T> math_abs(T x) {
return x < 0 ? -x : x;
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline std::enable_if_t<!std::is_signed<T>::value, T> math_abs(T x) {
return x;
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_fabs(T x) {
#ifdef __CUDA_ARCH__
return ::fabs(x);
#else
return std::fabs(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_floor(T x) {
#ifdef __CUDA_ARCH__
return ::floor(x);
#else
return std::floor(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_ceil(T x) {
#ifdef __CUDA_ARCH__
return ::ceil(x);
#else
return std::ceil(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_sin(T x) {
#ifdef __CUDA_ARCH__
return ::sin(x);
#else
return std::sin(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_cos(T x) {
#ifdef __CUDA_ARCH__
return ::cos(x);
#else
return std::cos(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_tan(T x) {
#ifdef __CUDA_ARCH__
return ::tan(x);
#else
return std::tan(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_asin(T x) {
#ifdef __CUDA_ARCH__
return ::asin(x);
#else
return std::asin(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_acos(T x) {
#ifdef __CUDA_ARCH__
return ::acos(x);
#else
return std::acos(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_atan(T x) {
#ifdef __CUDA_ARCH__
return ::atan(x);
#else
return std::atan(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_sinh(T x) {
#ifdef __CUDA_ARCH__
return ::sinh(x);
#else
return std::sinh(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_cosh(T x) {
#ifdef __CUDA_ARCH__
return ::cosh(x);
#else
return std::cosh(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_tanh(T x) {
#ifdef __CUDA_ARCH__
return ::tanh(x);
#else
return std::tanh(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_asinh(T x) {
#ifdef __CUDA_ARCH__
return ::asinh(x);
#else
return std::asinh(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_acosh(T x) {
#ifdef __CUDA_ARCH__
return ::acosh(x);
#else
return std::acosh(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename T>
DALI_HOST_DEV inline T math_atanh(T x) {
#ifdef __CUDA_ARCH__
return ::atanh(x);
#else
return std::atanh(x);
#endif
}
DALI_NO_EXEC_CHECK
template <typename X, typename Y>
DALI_HOST_DEV inline auto math_pow(
X x, Y y,
std::enable_if_t<!std::is_integral<X>::value || !std::is_integral<Y>::value>* = nullptr) {
#ifdef __CUDA_ARCH__
return ::pow(x, y);
#else
return std::pow(x, y);
#endif
}
DALI_NO_EXEC_CHECK
template <typename X, typename Y>
DALI_HOST_DEV std::enable_if_t<std::is_integral<X>::value && std::is_integral<Y>::value,
decltype(std::declval<X>() * std::declval<X>())>
math_pow(X x, Y y) {
return ipow(x, y);
}
// Template special case
DALI_NO_EXEC_CHECK
template <typename X>
DALI_HOST_DEV std::enable_if_t<std::is_integral<X>::value, X>
math_pow(X x, bool y) {
if (y) {
return x;
}
return 1;
}
DALI_NO_EXEC_CHECK
template <typename X, typename Y>
DALI_HOST_DEV inline auto math_atan2(X x, Y y) {
#ifdef __CUDA_ARCH__
return ::atan2(x, y);
#else
return std::atan2(x, y);
#endif
}
} // namespace expr
} // namespace dali
#endif // DALI_OPERATORS_MATH_EXPRESSIONS_MATH_OVERLOADS_H_
| [
"noreply@github.com"
] | noreply@github.com |
3aea585815ada83733b0ba77a135f69661832c39 | 31ac07ecd9225639bee0d08d00f037bd511e9552 | /externals/OCCTLib/inc/StepGeom_QuasiUniformSurface.hxx | 51ab93e1550b8878d0f260fe0767b11357592dc9 | [] | no_license | litao1009/SimpleRoom | 4520e0034e4f90b81b922657b27f201842e68e8e | 287de738c10b86ff8f61b15e3b8afdfedbcb2211 | refs/heads/master | 2021-01-20T19:56:39.507899 | 2016-07-29T08:01:57 | 2016-07-29T08:01:57 | 64,462,604 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,073 | hxx | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _StepGeom_QuasiUniformSurface_HeaderFile
#define _StepGeom_QuasiUniformSurface_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_StepGeom_QuasiUniformSurface_HeaderFile
#include <Handle_StepGeom_QuasiUniformSurface.hxx>
#endif
#ifndef _StepGeom_BSplineSurface_HeaderFile
#include <StepGeom_BSplineSurface.hxx>
#endif
class StepGeom_QuasiUniformSurface : public StepGeom_BSplineSurface {
public:
//! Returns a QuasiUniformSurface <br>
Standard_EXPORT StepGeom_QuasiUniformSurface();
DEFINE_STANDARD_RTTI(StepGeom_QuasiUniformSurface)
protected:
private:
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
| [
"litao1009@gmail.com"
] | litao1009@gmail.com |
4b3d3e65239edd48ee874865b5c9cc13378deaac | 67664d16d4b338f61384b49c7d65ca49f073571d | /miscellaneous/array-vector-function.cpp | 3d97018db3dd160a1576afe0cd1ae3989ffe0aa3 | [] | no_license | DravitLochan/DS | 28482c0c9a65893bc93c2b60a8879ec99a56c270 | eb81a5c1ce05e1c4a61600490556cbfb302a5430 | refs/heads/master | 2021-11-28T10:15:35.285113 | 2021-09-05T09:50:24 | 2021-09-05T09:50:24 | 71,032,909 | 0 | 2 | null | 2017-10-09T18:08:38 | 2016-10-16T05:52:58 | C++ | UTF-8 | C++ | false | false | 235 | cpp | #include<iostream>
#include<vector>
using namespace std;
void func(int a[], vector<int> b){
a[0] = -1;
b[0] = -1;
}
int main(){
int a[5] = {0, 0, 0, 0, 0};
vector<int> b(5, 0);
func(a, b);
cout<<a[0]<<b[0];
}
| [
"dlochangupta@gmail.com"
] | dlochangupta@gmail.com |
235632f18ffe7f4b518bf15ddca4740650f489bc | fded81a37e53d5fc31cacb9a0be86377825757b3 | /buhg_g/dok_doverw.cpp | a20e31b10609f9f8c6d32ca2d44f30a536fc259c | [] | no_license | iceblinux/iceBw_GTK | 7bf28cba9d994e95bab0f5040fea1a54a477b953 | a4f76e1fee29baa7dce79e8a4a309ae98ba504c2 | refs/heads/main | 2023-04-02T21:45:49.500587 | 2021-04-12T03:51:53 | 2021-04-12T03:51:53 | 356,744,886 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 24,825 | cpp | /*$Id: dok_doverw.c,v 1.30 2014/02/28 05:20:58 sasa Exp $*/
/*16.04.2017 18.03.2004 Белых А.И. dok_doverw.c
Печать доверенности
*/
#include <errno.h>
#include <ctype.h>
#include "buhg_g.h"
enum
{
FK2,
FK4,
FK10,
KOL_F_KL
};
enum
{
E_DATAV,
E_DATA_DO,
E_TABNOM,
E_POSTAVHIK,
E_DOKUM,
E_NOMER_DOV,
KOLENTER
};
class dok_doverw_data
{
public:
GtkWidget *entry[KOLENTER];
GtkWidget *knopka[KOL_F_KL];
GtkWidget *knopka_enter[KOLENTER];
GtkWidget *window;
GtkWidget *label_fio;
short kl_shift;
class iceb_u_str datav;
class iceb_u_str data_do;
class iceb_u_str tabnom;
class iceb_u_str postavhik;
class iceb_u_str dokum;
class iceb_u_str nomer_dov;
class iceb_u_str fio;
//реквизиты организации
class iceb_u_str inn;
class iceb_u_str nsv;
class iceb_u_str naim;
class iceb_u_str naimbank;
class iceb_u_str adres;
class iceb_u_str adresban;
class iceb_u_str kod;
class iceb_u_str rasshet;
class iceb_u_str mfo;
class iceb_u_str telefon;
dok_doverw_data() //Конструктор
{
clear_data();
kl_shift=0;
inn.plus("");
nsv.plus("");
naim.plus("");
adres.plus("");
adresban.plus("");
naimbank.plus("");
kod.plus("");
rasshet.plus("");
mfo.plus("");
telefon.new_plus("");
}
void clear_data()
{
datav.new_plus("");
data_do.new_plus("");
tabnom.new_plus("");
postavhik.new_plus("");
dokum.new_plus("");
nomer_dov.new_plus("");
}
void read_rek()
{
for(int i=0; i < KOLENTER; i++)
g_signal_emit_by_name(entry[i],"activate");
}
void clear_rek()
{
for(int i=0; i < KOLENTER; i++)
gtk_entry_set_text(GTK_ENTRY(entry[i]),"");
clear_data();
gtk_label_set_text(GTK_LABEL(label_fio),"");
}
};
gboolean dok_doverw_v_key_press(GtkWidget *widget,GdkEventKey *event,class dok_doverw_data *data);
void dok_doverw_v_vvod(GtkWidget *widget,class dok_doverw_data *data);
void dok_doverw_v_knopka(GtkWidget *widget,class dok_doverw_data *data);
void dok_doverw_v_e_knopka(GtkWidget *widget,class dok_doverw_data *data);
void dok_doverw_ras(class dok_doverw_data *data);
void dok_dover_rl(const char *nomer_dov,short dv,short mv,short gv,short dd,short md,short gd,short dvd,short mvd,short gvd,const char *fio,
const char *seriq,const char *nomer,const char *vid,const char *naim,const char *naimbank,const char *kod,const char *adres,const char *rasshet,const char *mfo,const char *post,const char *inn,
const char *nsv,const char *telefon,const char *ndok,const char *imaf,GtkWidget *wpredok);
extern SQL_baza bd;
void dok_doverw()
{
SQL_str row;
SQLCURSOR cur;
char strsql[512];
class dok_doverw_data data;
data.datav.poltekdat();
sprintf(strsql,"select * from Kontragent where kodkon='00'");
if(sql_readkey(&bd,strsql,&row,&cur) == 1)
{
data.naim.new_plus(row[1]);
data.adres.new_plus(row[3]);
data.kod.new_plus(row[5]);
data.inn.new_plus(row[8]);
data.nsv.new_plus(row[9]);
data.mfo.new_plus(row[6]);
data.rasshet.new_plus(row[7]);
data.naimbank.new_plus(row[2]);
data.adresban.new_plus(row[4]);
if(iceb_u_polen(row[10],&data.telefon,1,' ') != 0)
data.telefon.new_plus(row[10]);
}
data.window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_position( GTK_WINDOW(data.window),ICEB_POS_CENTER);
gtk_window_set_modal(GTK_WINDOW(data.window),TRUE);
sprintf(strsql,"%s %s",iceb_get_namesystem(),gettext("Выписка доверенностей"));
gtk_window_set_title (GTK_WINDOW (data.window),strsql);
gtk_container_set_border_width (GTK_CONTAINER (data.window), 5);
g_signal_connect(data.window,"delete_event",G_CALLBACK(gtk_widget_destroy),NULL);
g_signal_connect(data.window,"destroy",G_CALLBACK(gtk_main_quit),NULL);
g_signal_connect_after(data.window,"key_press_event",G_CALLBACK(dok_doverw_v_key_press),&data);
data.label_fio=gtk_label_new("");
GtkWidget *label=gtk_label_new(gettext("Выписка доверенностей"));
GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_set_homogeneous (GTK_BOX(vbox),FALSE); //Устанавливает одинакоый ли размер будут иметь упакованные виджеты-TRUE-одинаковые FALSE-нет
GtkWidget *hbox[KOLENTER];
for(int i=0; i < KOLENTER; i++)
{
hbox[i] = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX( hbox[i]),FALSE); //Устанавливает одинакоый ли размер будут иметь упакованные виджеты-TRUE-одинаковые FALSE-нет
}
GtkWidget *hboxknop = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX(hboxknop),FALSE); //Устанавливает одинакоый ли размер будут иметь упакованные виджеты-TRUE-одинаковые FALSE-нет
gtk_container_add (GTK_CONTAINER (data.window), vbox);
gtk_container_add (GTK_CONTAINER (vbox), label);
for(int i=0; i < KOLENTER; i++)
gtk_container_add (GTK_CONTAINER (vbox), hbox[i]);
gtk_container_add (GTK_CONTAINER (vbox), hboxknop);
sprintf(strsql,"%s (%s)",gettext("Дата выдачи доверенности"),gettext("д.м.г"));
data.knopka_enter[E_DATAV]=gtk_button_new_with_label(strsql);
gtk_box_pack_start (GTK_BOX (hbox[E_DATAV]), data.knopka_enter[E_DATAV], FALSE, FALSE, 0);
g_signal_connect(data.knopka_enter[E_DATAV],"clicked",G_CALLBACK(dok_doverw_v_e_knopka),&data);
gtk_widget_set_name(data.knopka_enter[E_DATAV],iceb_u_inttochar(E_DATAV));
gtk_widget_set_tooltip_text(data.knopka_enter[E_DATAV],gettext("Выбор даты"));
data.entry[E_DATAV] = gtk_entry_new ();
gtk_entry_set_max_length(GTK_ENTRY(data.entry[E_DATAV]),10);
gtk_box_pack_start (GTK_BOX (hbox[E_DATAV]), data.entry[E_DATAV], TRUE, TRUE, 0);
g_signal_connect(data.entry[E_DATAV], "activate",G_CALLBACK(dok_doverw_v_vvod),&data);
gtk_entry_set_text(GTK_ENTRY(data.entry[E_DATAV]),data.datav.ravno());
gtk_widget_set_name(data.entry[E_DATAV],iceb_u_inttochar(E_DATAV));
sprintf(strsql,"%s (%s)",gettext("Действительно до"),gettext("д.м.г"));
data.knopka_enter[E_DATA_DO]=gtk_button_new_with_label(strsql);
gtk_box_pack_start (GTK_BOX (hbox[E_DATA_DO]), data.knopka_enter[E_DATA_DO], FALSE, FALSE, 0);
g_signal_connect(data.knopka_enter[E_DATA_DO],"clicked",G_CALLBACK(dok_doverw_v_e_knopka),&data);
gtk_widget_set_name(data.knopka_enter[E_DATA_DO],iceb_u_inttochar(E_DATA_DO));
gtk_widget_set_tooltip_text(data.knopka_enter[E_DATA_DO],gettext("Выбор даты"));
data.entry[E_DATA_DO] = gtk_entry_new ();
gtk_entry_set_max_length(GTK_ENTRY(data.entry[E_DATA_DO]),10);
gtk_box_pack_start (GTK_BOX (hbox[E_DATA_DO]), data.entry[E_DATA_DO], TRUE, TRUE, 0);
g_signal_connect(data.entry[E_DATA_DO], "activate",G_CALLBACK(dok_doverw_v_vvod),&data);
gtk_entry_set_text(GTK_ENTRY(data.entry[E_DATA_DO]),data.data_do.ravno());
gtk_widget_set_name(data.entry[E_DATA_DO],iceb_u_inttochar(E_DATA_DO));
sprintf(strsql,"%s",gettext("Табельный номер"));
data.knopka_enter[E_TABNOM]=gtk_button_new_with_label(strsql);
gtk_box_pack_start (GTK_BOX (hbox[E_TABNOM]), data.knopka_enter[E_TABNOM], FALSE, FALSE, 0);
g_signal_connect(data.knopka_enter[E_TABNOM],"clicked",G_CALLBACK(dok_doverw_v_e_knopka),&data);
gtk_widget_set_name(data.knopka_enter[E_TABNOM],iceb_u_inttochar(E_TABNOM));
gtk_widget_set_tooltip_text(data.knopka_enter[E_TABNOM],gettext("Выбор табельного номера"));
data.entry[E_TABNOM] = gtk_entry_new();
gtk_box_pack_start (GTK_BOX (hbox[E_TABNOM]), data.entry[E_TABNOM], TRUE, TRUE, 0);
g_signal_connect(data.entry[E_TABNOM], "activate",G_CALLBACK(dok_doverw_v_vvod),&data);
gtk_entry_set_text(GTK_ENTRY(data.entry[E_TABNOM]),data.tabnom.ravno());
gtk_widget_set_name(data.entry[E_TABNOM],iceb_u_inttochar(E_TABNOM));
gtk_box_pack_start (GTK_BOX (hbox[E_TABNOM]), data.label_fio, TRUE, TRUE, 0);
sprintf(strsql,"%s",gettext("Поставщик"));
data.knopka_enter[E_POSTAVHIK]=gtk_button_new_with_label(strsql);
gtk_box_pack_start (GTK_BOX (hbox[E_POSTAVHIK]), data.knopka_enter[E_POSTAVHIK], FALSE, FALSE, 0);
g_signal_connect(data.knopka_enter[E_POSTAVHIK],"clicked",G_CALLBACK(dok_doverw_v_e_knopka),&data);
gtk_widget_set_name(data.knopka_enter[E_POSTAVHIK],iceb_u_inttochar(E_POSTAVHIK));
gtk_widget_set_tooltip_text(data.knopka_enter[E_POSTAVHIK],gettext("Выбор поставщика"));
data.entry[E_POSTAVHIK] = gtk_entry_new();
gtk_box_pack_start (GTK_BOX (hbox[E_POSTAVHIK]), data.entry[E_POSTAVHIK], TRUE, TRUE, 0);
g_signal_connect(data.entry[E_POSTAVHIK], "activate",G_CALLBACK(dok_doverw_v_vvod),&data);
gtk_entry_set_text(GTK_ENTRY(data.entry[E_POSTAVHIK]),data.postavhik.ravno());
gtk_widget_set_name(data.entry[E_POSTAVHIK],iceb_u_inttochar(E_POSTAVHIK));
sprintf(strsql,"%s",gettext("По документу"));
label=gtk_label_new(strsql);
gtk_box_pack_start (GTK_BOX (hbox[E_DOKUM]), label, FALSE, FALSE, 0);
data.entry[E_DOKUM] = gtk_entry_new();
gtk_box_pack_start (GTK_BOX (hbox[E_DOKUM]), data.entry[E_DOKUM], TRUE, TRUE, 0);
g_signal_connect(data.entry[E_DOKUM], "activate",G_CALLBACK(dok_doverw_v_vvod),&data);
gtk_entry_set_text(GTK_ENTRY(data.entry[E_DOKUM]),data.dokum.ravno());
gtk_widget_set_name(data.entry[E_DOKUM],iceb_u_inttochar(E_DOKUM));
sprintf(strsql,"%s",gettext("Номер доверенности"));
label=gtk_label_new(strsql);
gtk_box_pack_start (GTK_BOX (hbox[E_NOMER_DOV]), label, FALSE, FALSE, 0);
data.entry[E_NOMER_DOV] = gtk_entry_new();
gtk_box_pack_start (GTK_BOX (hbox[E_NOMER_DOV]), data.entry[E_NOMER_DOV], TRUE, TRUE, 0);
g_signal_connect(data.entry[E_NOMER_DOV], "activate",G_CALLBACK(dok_doverw_v_vvod),&data);
gtk_entry_set_text(GTK_ENTRY(data.entry[E_NOMER_DOV]),data.dokum.ravno());
gtk_widget_set_name(data.entry[E_NOMER_DOV],iceb_u_inttochar(E_NOMER_DOV));
sprintf(strsql,"F2 %s",gettext("Печать"));
data.knopka[FK2]=gtk_button_new_with_label(strsql);
gtk_widget_set_tooltip_text(data.knopka[FK2],gettext("Распечатать доверенность"));
g_signal_connect(data.knopka[FK2],"clicked",G_CALLBACK(dok_doverw_v_knopka),&data);
gtk_widget_set_name(data.knopka[FK2],iceb_u_inttochar(FK2));
gtk_box_pack_start(GTK_BOX(hboxknop), data.knopka[FK2], TRUE, TRUE, 0);
sprintf(strsql,"F4 %s",gettext("Очистить"));
data.knopka[FK4]=gtk_button_new_with_label(strsql);
gtk_widget_set_tooltip_text(data.knopka[FK4],gettext("Очистить меню от введенной информации"));
g_signal_connect(data.knopka[FK4],"clicked",G_CALLBACK(dok_doverw_v_knopka),&data);
gtk_widget_set_name(data.knopka[FK4],iceb_u_inttochar(FK4));
gtk_box_pack_start(GTK_BOX(hboxknop), data.knopka[FK4], TRUE, TRUE, 0);
sprintf(strsql,"F10 %s",gettext("Выход"));
data.knopka[FK10]=gtk_button_new_with_label(strsql);
gtk_widget_set_tooltip_text(data.knopka[FK10],gettext("Завершение работы в этом окне"));
g_signal_connect(data.knopka[FK10],"clicked",G_CALLBACK(dok_doverw_v_knopka),&data);
gtk_widget_set_name(data.knopka[FK10],iceb_u_inttochar(FK10));
gtk_box_pack_start(GTK_BOX(hboxknop), data.knopka[FK10], TRUE, TRUE, 0);
gtk_widget_grab_focus(data.entry[1]);
gtk_widget_show_all (data.window);
gtk_main();
}
/*****************************/
/*Обработчик нажатия enter кнопок */
/*****************************/
void dok_doverw_v_e_knopka(GtkWidget *widget,class dok_doverw_data *data)
{
class iceb_u_str kod("");
class iceb_u_str fio("");
char strsql[512];
SQL_str row;
SQLCURSOR cur;
int knop=atoi(gtk_widget_get_name(widget));
switch (knop)
{
case E_DATAV:
if(iceb_calendar(&data->datav,data->window) == 0)
gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAV]),data->datav.ravno());
return;
case E_DATA_DO:
if(iceb_calendar(&data->data_do,data->window) == 0)
gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA_DO]),data->data_do.ravno());
return;
case E_TABNOM:
if(l_sptbn1(&kod,&fio,0,data->window) == 0)
{
data->tabnom.new_plus(kod.ravno());
gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->tabnom.ravno());
gtk_label_set_text(GTK_LABEL(data->label_fio),fio.ravno(20));
}
return;
case E_POSTAVHIK:
if(iceb_vibrek(1,"Kontragent",&kod,data->window) == 0)
{
sprintf(strsql,"select naikon from Kontragent where kodkon='%s'",kod.ravno());
if(iceb_sql_readkey(strsql,&row,&cur,data->window) == 1)
{
data->postavhik.new_plus(row[0]);
gtk_entry_set_text(GTK_ENTRY(data->entry[E_POSTAVHIK]),data->postavhik.ravno());
}
}
return;
}
}
/*********************************/
/*Обработка нажатия клавиш */
/*********************************/
gboolean dok_doverw_v_key_press(GtkWidget *widget,GdkEventKey *event,class dok_doverw_data *data)
{
//printf("dok_doverw_v_key_press\n");
switch(event->keyval)
{
case GDK_KEY_F2:
g_signal_emit_by_name(data->knopka[FK2],"clicked");
return(TRUE);
case GDK_KEY_F3:
// g_signal_emit_by_name(data->knopka[FK3],"clicked");
return(TRUE);
case GDK_KEY_F4:
g_signal_emit_by_name(data->knopka[FK4],"clicked");
return(TRUE);
case GDK_KEY_Escape:
case GDK_KEY_F10:
g_signal_emit_by_name(data->knopka[FK10],"clicked");
return(FALSE);
case ICEB_REG_L:
case ICEB_REG_R:
// printf("Нажата клавиша Shift\n");
data->kl_shift=1;
return(TRUE);
}
return(TRUE);
}
/*****************************/
/*Обработчик нажатия кнопок */
/*****************************/
void dok_doverw_v_knopka(GtkWidget *widget,class dok_doverw_data *data)
{
int knop=atoi(gtk_widget_get_name(widget));
//g_print("dok_doverw_v_knopka knop=%d\n",knop);
switch (knop)
{
case FK2:
data->read_rek(); //Читаем реквизиты меню
dok_doverw_ras(data);
return;
case FK4:
data->clear_rek();
return;
case FK10:
gtk_widget_destroy(data->window);
return;
}
}
/********************************/
/*Перевод чтение текста и перевод фокуса на следующюю строку ввода*/
/******************************************/
void dok_doverw_v_vvod(GtkWidget *widget,class dok_doverw_data *data)
{
char strsql[512];
SQL_str row;
SQLCURSOR cur;
int enter=atoi(gtk_widget_get_name(widget));
//g_print("dok_doverw_v_vvod enter=%d\n",enter);
switch (enter)
{
case E_DATAV:
data->datav.new_plus(gtk_entry_get_text(GTK_ENTRY(widget)));
break;
case E_DATA_DO:
data->data_do.new_plus(gtk_entry_get_text(GTK_ENTRY(widget)));
break;
case E_TABNOM:
data->tabnom.new_plus(gtk_entry_get_text(GTK_ENTRY(widget)));
if(data->tabnom.getdlinna() > 1)
{
sprintf(strsql,"select fio from Kartb where tabn=%d",data->tabnom.ravno_atoi());
if(iceb_sql_readkey(strsql,&row,&cur,data->window) == 1)
gtk_label_set_text(GTK_LABEL(data->label_fio),row[0]);
}
break;
case E_POSTAVHIK:
data->postavhik.new_plus(gtk_entry_get_text(GTK_ENTRY(widget)));
if(isdigit(data->postavhik.ravno()[0]) != 0)
{
sprintf(strsql,"select naikon from Kontragent where kodkon='%s'",data->postavhik.ravno());
if(iceb_sql_readkey(strsql,&row,&cur,data->window) == 1)
{
data->postavhik.new_plus(row[0]);
gtk_entry_set_text(GTK_ENTRY(data->entry[E_POSTAVHIK]),data->postavhik.ravno());
}
}
break;
case E_DOKUM:
data->dokum.new_plus(gtk_entry_get_text(GTK_ENTRY(widget)));
break;
case E_NOMER_DOV:
data->nomer_dov.new_plus(gtk_entry_get_text(GTK_ENTRY(widget)));
break;
}
enter+=1;
if(enter >= KOLENTER)
enter=0;
gtk_widget_grab_focus(data->entry[enter]);
}
/*******************************************/
/*Печать доверенности*/
/*********************************/
void dok_doverw_ras(class dok_doverw_data *data)
{
short d1,m1,g1;
short d2,m2,g2;
short d3,m3,g3;
if(iceb_u_rsdat(&d1,&m1,&g1,data->datav.ravno(),1) != 0)
{
iceb_menu_soob(gettext("Не правильно введена дата выдачи доверенности !"),data->window);
return;
}
if(iceb_u_rsdat(&d2,&m2,&g2,data->data_do.ravno(),1) != 0)
{
iceb_menu_soob(gettext("Не правильно введена дата действительно до !"),data->window);
return;
}
if(data->tabnom.getdlinna() <= 1)
{
iceb_menu_soob(gettext("Не введён табельный номер!"),data->window);
return;
}
SQL_str row;
SQLCURSOR cur;
class iceb_u_str mesqc("");
class iceb_u_str mesd("");
iceb_mesc(m1,1,&mesqc);
iceb_mesc(m2,1,&mesd);
class iceb_u_str fio("");
class iceb_u_str vid("");
class iceb_u_str dvd("");
class iceb_u_str seriq("");
class iceb_u_str nomer("");
char strsql[512];
sprintf(strsql,"select * from Kartb where tabn=%d",data->tabnom.ravno_atoi());
if(iceb_sql_readkey(strsql,&row,&cur,data->window) != 1)
{
sprintf(strsql,"%s %s !",gettext("Не найден табельный номер"),data->tabnom.ravno());
iceb_menu_soob(strsql,data->window);
return;
}
else
{
fio.new_plus(row[1]);
iceb_u_polen(row[12],&seriq,1,' ');
iceb_u_polen(row[12],&nomer,2,' ');
vid.new_plus(row[13]);
dvd.new_plus(row[19]);
}
//sprintf(iff,"dow%d.tmp",getpid());
char imaf[64];
sprintf(imaf,"dov%d.lst",getpid());
FILE *ff;
if((ff = fopen(imaf,"w")) == NULL)
{
iceb_er_op_fil(imaf,"",errno,data->window);
return;
}
iceb_u_startfil(ff);
char str[1024];
fprintf(ff,"\x1b\x6C%c",8); /*Установка левого поля*/
fprintf(ff,"\x1B\x4D"); //12 знаков на дюйм
//fprintf(ff,"\x1B\x45"); /*Включение режима выделенной печати*/
fprintf(ff," IПH - %s NCB - %s тел.%.*s",
data->inn.ravno(),data->nsv.ravno(),
iceb_u_kolbait(15,data->telefon.ravno()),data->telefon.ravno());
fprintf(ff,"\x1B\x33%c\n",25);
fprintf(ff,"\n");
fprintf(ff," %s",data->naim.ravno());
fprintf(ff,"\x1B\x33%c\n",33);
fprintf(ff,"\n");
if(strlen(data->adres.ravno()) > 50)
{
fprintf(ff,"\x0F"); /*Ужатый режим*/
fprintf(ff," %s",data->adres.ravno());
fprintf(ff,"\x12\n"); /*Нормальный режим печати*/
}
else
fprintf(ff," %s\n",data->adres.ravno());
fprintf(ff,"%s%s\n"," ",data->kod.ravno());
fprintf(ff," %s\n",data->naim.ravno());
fprintf(ff,"\n");
if(strlen(data->adres.ravno()) > 50)
{
fprintf(ff,"\x0F"); //Ужатый режим
fprintf(ff," %s",data->adres.ravno());
fprintf(ff,"\x12\n"); //Нормальный режим печати
}
else
fprintf(ff," %s",data->adres.ravno());
fprintf(ff,"\x1B\x33%c\n",34);
fprintf(ff," %s %s\n",data->rasshet.ravno(),data->mfo.ravno());
sprintf(str,"%s %s",data->naimbank.ravno(),data->adresban.ravno());
fprintf(ff," %-*s %02d %-*s %02d\n",
iceb_u_kolbait(57,str),str,
d2,
iceb_u_kolbait(12,mesd.ravno()),mesd.ravno(),
g2-2000);
fprintf(ff,"\x1B\x33%c\n",44);
fprintf(ff,"\n");
fprintf(ff,"\n");
fprintf(ff,"\n");
sprintf(str," %02d %-*s %02d",d1,iceb_u_kolbait(13,mesqc.ravno()),mesqc.ravno(),g1-2000);
fprintf(ff,"%s\n",str);
fprintf(ff,"\n");
sprintf(str," %s",fio.ravno());
fprintf(ff,"%s",str);
fprintf(ff,"\x1B\x33%c\n",40);
fprintf(ff,"\n");
sprintf(str," Паcпорт");
fprintf(ff,"%s",str);
fprintf(ff,"\x1B\x33%c\n",40);
fprintf(ff,"\n");
iceb_u_rsdat(&d3,&m3,&g3,dvd.ravno(),2);
class iceb_u_str naz_m("");
iceb_mesc(m3,1,&naz_m);
fprintf(ff," %s %s %02d %s %04d\n",seriq.ravno(),nomer.ravno(),d3,naz_m.ravno(),g3);
fprintf(ff,"\n");
sprintf(str," %s",vid.ravno());
fprintf(ff,"%s\n",str);
fprintf(ff,"\x1B\x33%c\n",30);
sprintf(str," %s",data->postavhik.ravno());
fprintf(ff,"%s\n",str);
fprintf(ff,"\n");
// fprintf(ff,"\x1B\x33%c\n",28);
sprintf(str," %s",data->dokum.ravno());
fprintf(ff,"%s\n",str);
fprintf(ff,"\x1B\x48"); /*Выключение режима двойного удара*/
fclose(ff);
char imaf_l[64];
sprintf(imaf_l,"dovl%d.lst",getpid());
dok_dover_rl(data->nomer_dov.ravno(),d1,m1,g1,d2,m2,g2,d3,m3,g3,fio.ravno(),seriq.ravno(),nomer.ravno(),vid.ravno(),
data->naim.ravno(),data->naimbank.ravno(),data->kod.ravno(),data->adres.ravno(),data->rasshet.ravno(),data->mfo.ravno(),
data->postavhik.ravno(),data->inn.ravno(),data->nsv.ravno(),data->telefon.ravno(),data->dokum.ravno(),imaf_l,data->window);
class iceb_u_spisok imaf_r;
class iceb_u_spisok naimf_r;
imaf_r.plus(imaf_l);
naimf_r.plus(gettext("Распечатка доверенности"));
imaf_r.plus(imaf);
naimf_r.plus(gettext("Распечатка доверенности на бланке строгой отчётности"));
iceb_rabfil(&imaf_r,&naimf_r,data->window);
}
/************************/
/*Печать доверенности на листе бумаги*/
/***********************************/
void dok_dover_rl(const char *nomer_dov,
short dv,short mv,short gv,
short dd,short md,short gd,
short dvd,short mvd,short gvd,
const char *fio,
const char *seriq,
const char *nomer,
const char *vid,
const char *naim,
const char *naimbank,
const char *kod,
const char *adres,
const char *rasshet,
const char *mfo,
const char *post,
const char *inn,const char *nsv,const char *telefon,
const char *ndok,
const char *imaf,
GtkWidget *wpredok)
{
class iceb_u_str mesqc("");
SQL_str row_alx;
class SQLCURSOR cur_alx;
int kolstr=0;
char strsql[512];
sprintf(strsql,"select str from Alx where fil='dok_dover_r.alx' order by ns asc");
if((kolstr=cur_alx.make_cursor(&bd,strsql)) < 0)
{
iceb_msql_error(&bd,gettext("Ошибка создания курсора !"),strsql,wpredok);
return;
}
if(kolstr == 0)
{
sprintf(strsql,"%s %s!",gettext("Не найдена настройка"),"dok_dover_r.alx");
iceb_menu_soob(strsql,wpredok);
return;
}
FILE *ff;
if((ff = fopen(imaf,"w")) == NULL)
{
iceb_er_op_fil(imaf,"",errno,wpredok);
return;
}
iceb_u_startfil(ff);
fprintf(ff,"\x1b\x6C%c",6); /*Установка левого поля*/
fprintf(ff,"\x1B\x4D"); /*12-знаков*/
fprintf(ff," IПH - %s NCB - %s тел.%.*s\n",inn,nsv,iceb_u_kolbait(15,telefon),telefon);
char bros[512];
class iceb_u_str stroka("");
int nomer_str=0;
while(cur_alx.read_cursor(&row_alx) != 0)
{
if(row_alx[0][0] == '#')
continue;
nomer_str++;
stroka.new_plus(row_alx[0]);
switch(nomer_str)
{
case 1:
iceb_u_vstav(&stroka,naim,0,53,1);
break;
case 3:
iceb_u_vstav(&stroka,adres,0,46,1);
if(strlen(adres) > 47)
{
fprintf(ff,"%s",stroka.ravno());
stroka.new_plus("");
for(int kk=47; kk < (int) strlen(adres); kk+=47)
{
fprintf(ff,"%s\n",&adres[kk]);
}
continue;
}
break;
case 4:
iceb_u_vstav(&stroka,kod,28,53,1);
break;
case 5:
iceb_u_vstav(&stroka,naim,0,53,1);
break;
case 7:
iceb_u_vstav(&stroka,adres,0,46,1);
if(strlen(adres) > 47)
{
fprintf(ff,"%s",stroka.ravno());
stroka.new_plus("");
for(int kk=47; kk < (int) strlen(adres); kk+=47)
{
fprintf(ff,"%s\n",&adres[kk]);
}
continue;
}
break;
case 8:
iceb_u_vstav(&stroka,rasshet,8,28,1);
iceb_u_vstav(&stroka,mfo,33,41,1);
break;
case 9:
iceb_u_vstav(&stroka,naimbank,0,53,1);
iceb_mesc(md,1,&mesqc);
sprintf(bros,"%02d %s %d %s",dd,mesqc.ravno(),gd,gettext("г."));
iceb_u_vstav(&stroka,bros,67,90,1);
break;
case 13:
iceb_u_vstav(&stroka,nomer_dov,43,63,1);
break;
case 14:
iceb_mesc(mv,1,&mesqc);
sprintf(bros,"%02d %s %d %s",dv,mesqc.ravno(),gv,gettext("г."));
iceb_u_vstav(&stroka,bros,34,69,1);
break;
case 16:
iceb_u_vstav(&stroka,fio,7,91,1);
break;
case 20:
iceb_u_vstav(&stroka,seriq,6,16,1);
iceb_u_vstav(&stroka,nomer,19,36,1);
sprintf(bros,"%02d.%02d.%d %s",dvd,mvd,gvd,gettext("г."));
iceb_u_vstav(&stroka,bros,41,91,1);
break;
case 22:
iceb_u_vstav(&stroka,vid,8,91,1);
break;
case 24:
iceb_u_vstav(&stroka,post,17,91,1);
break;
case 26:
iceb_u_vstav(&stroka,ndok,13,91,1);
break;
}
fprintf(ff,"%s",stroka.ravno());
}
fclose(ff);
}
| [
"root@calculate.local"
] | root@calculate.local |
06fa446344b2117243f2647e3a5d1a453bebc7ab | 450ca59e2671a37c0aef9da0bf73667e60bb76ee | /Userland/DevTools/HackStudio/ClassViewWidget.cpp | bfd98ee39a654634a2a2f7e4e3e3135421c91129 | [
"BSD-2-Clause"
] | permissive | mathias234/serenity | 13e65b657e67f8d0119dcc5507f2eb93f67ebd0b | e4412f1f599bea034dea608b8c7dcc4408d90066 | refs/heads/master | 2023-04-13T14:32:25.164610 | 2021-04-16T12:03:24 | 2021-04-16T20:26:52 | 244,063,274 | 0 | 0 | BSD-2-Clause | 2020-03-01T13:51:01 | 2020-03-01T00:36:07 | null | UTF-8 | C++ | false | false | 6,657 | cpp | /*
* Copyright (c) 2021, Itamar S. <itamar8910@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ClassViewWidget.h"
#include "HackStudio.h"
#include "ProjectDeclarations.h"
#include <LibGUI/BoxLayout.h>
namespace HackStudio {
ClassViewWidget::ClassViewWidget()
{
set_layout<GUI::VerticalBoxLayout>();
m_class_tree = add<GUI::TreeView>();
m_class_tree->on_selection = [this](auto& index) {
if (!index.is_valid())
return;
auto* node = static_cast<const ClassViewNode*>(index.internal_data());
if (!node->declaration)
return;
open_file(node->declaration->position.file, node->declaration->position.line, node->declaration->position.column);
};
}
RefPtr<ClassViewModel> ClassViewModel::create()
{
return adopt(*new ClassViewModel());
}
int ClassViewModel::row_count(const GUI::ModelIndex& index) const
{
if (!index.is_valid())
return m_root_scope.size();
auto* node = static_cast<ClassViewNode*>(index.internal_data());
return node->children.size();
}
GUI::Variant ClassViewModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
{
auto* node = static_cast<const ClassViewNode*>(index.internal_data());
switch (role) {
case GUI::ModelRole::Display: {
return node->name;
}
case GUI::ModelRole::Icon: {
if (!node->declaration)
return {};
auto icon = ProjectDeclarations::get_icon_for(node->declaration->type);
if (icon.has_value())
return icon.value();
return {};
}
default:
return {};
}
}
GUI::ModelIndex ClassViewModel::parent_index(const GUI::ModelIndex& index) const
{
if (!index.is_valid())
return {};
auto* child = static_cast<const ClassViewNode*>(index.internal_data());
auto* parent = child->parent;
if (parent == nullptr)
return {};
if (parent->parent == nullptr) {
for (size_t row = 0; row < m_root_scope.size(); row++) {
if (m_root_scope.ptr_at(row).ptr() == parent)
return create_index(row, 0, parent);
}
VERIFY_NOT_REACHED();
}
for (size_t row = 0; row < parent->parent->children.size(); row++) {
ClassViewNode* child_at_row = parent->parent->children.ptr_at(row).ptr();
if (child_at_row == parent)
return create_index(row, 0, parent);
}
VERIFY_NOT_REACHED();
}
GUI::ModelIndex ClassViewModel::index(int row, int column, const GUI::ModelIndex& parent_index) const
{
if (!parent_index.is_valid())
return create_index(row, column, &m_root_scope[row]);
auto* parent = static_cast<const ClassViewNode*>(parent_index.internal_data());
auto* child = &parent->children[row];
return create_index(row, column, child);
}
ClassViewModel::ClassViewModel()
{
m_root_scope.clear();
ProjectDeclarations::the().for_each_declared_symbol([this](auto& decl) {
if (decl.type == GUI::AutocompleteProvider::DeclarationType::Class
|| decl.type == GUI::AutocompleteProvider::DeclarationType::Struct
|| decl.type == GUI::AutocompleteProvider::DeclarationType::Member
|| decl.type == GUI::AutocompleteProvider::DeclarationType::Namespace) {
add_declaration(decl);
}
});
}
void ClassViewModel::add_declaration(const GUI::AutocompleteProvider::Declaration& decl)
{
ClassViewNode* parent = nullptr;
auto scope_parts = decl.scope.view().split_view("::");
if (!scope_parts.is_empty()) {
// Traverse declarations tree to the parent of 'decl'
for (auto& node : m_root_scope) {
if (node.name == scope_parts.first())
parent = &node;
}
if (parent == nullptr) {
m_root_scope.append(make<ClassViewNode>(scope_parts.first()));
parent = &m_root_scope.last();
}
for (size_t i = 1; i < scope_parts.size(); ++i) {
auto& scope = scope_parts[i];
ClassViewNode* next { nullptr };
for (auto& child : parent->children) {
VERIFY(child.declaration);
if (child.declaration->name == scope) {
next = &child;
break;
}
}
if (next) {
parent = next;
continue;
}
parent->children.append(make<ClassViewNode>(scope));
parent->children.last().parent = parent;
parent = &parent->children.last();
}
}
NonnullOwnPtrVector<ClassViewNode>* children_of_parent = nullptr;
if (parent) {
children_of_parent = &parent->children;
} else {
children_of_parent = &m_root_scope;
}
bool already_exists = false;
for (auto& child : *children_of_parent) {
if (child.name == decl.name) {
already_exists = true;
if (!child.declaration) {
child.declaration = &decl;
}
break;
}
}
if (!already_exists) {
children_of_parent->append(make<ClassViewNode>(decl.name));
children_of_parent->last().declaration = &decl;
children_of_parent->last().parent = parent;
}
}
void ClassViewWidget::refresh()
{
m_class_tree->set_model(ClassViewModel::create());
}
}
| [
"kling@serenityos.org"
] | kling@serenityos.org |
97fafa9237cb05376122d2d807b1883d3fdba445 | 514729469005ed4e1bedef6cefae498a637344c6 | /C++Genie_finalV2/Headers/Timecl.h | 63ed8f9e766a44e708f25c9bec4ce9a94e94fdca | [] | no_license | 0000Blaze/Cpp-Genie | 7ebafd84c3b4eae3b9a559cf01cbd1278ab5bf26 | 6c96eedc2c1ae5c4fa68a66c0ca2f4107af79f3e | refs/heads/master | 2023-04-26T06:34:22.287997 | 2023-04-17T16:00:01 | 2023-04-17T16:00:01 | 239,980,650 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,293 | h | #include <iostream>
#include <ctime>
class Showtime
{
private:
float x_pos;
float y_pos;
float redn;
float greenn;
float bluen;
public:
Showtime()
{
x_pos=100;
y_pos=100;
}
Showtime(float x,float y,float r=1,float g=0,float b=0)
{
x_pos=x;
y_pos=y;
redn=r;
greenn=g;
bluen=b;
}
void displayClock(void *font)
{
time_t tim;
tim =time(NULL);
struct tm *local;
local =localtime(&tim);
int hr = local->tm_hour;
if(hr>12)
hr-=12;
int hr1 =hr/10;
int hr2 =hr%10;
int mi = local->tm_min;
int mi1 =mi/10;
int mi2 =mi%10;
int se = local->tm_sec;
int se1=se/10;
int se2=se%10;
glColor3f(redn,greenn,bluen);
glRasterPos2f(x_pos,y_pos);
glutBitmapCharacter(font,static_cast<char>(hr1+48));
glRasterPos2f(x_pos+1.35,y_pos);
glutBitmapCharacter(font,static_cast<char>(hr2+48));
glRasterPos2f(x_pos+2.72,y_pos);
glutBitmapCharacter(font,static_cast<char>(58));
glRasterPos2f(x_pos+3.5,y_pos);
glutBitmapCharacter(font,static_cast<char>(mi1+48));
glRasterPos2f(x_pos+4.75,y_pos);
glutBitmapCharacter(font,static_cast<char>(mi2+48));
glRasterPos2f(x_pos+5.8,y_pos);
glutBitmapCharacter(font,static_cast<char>(58));
glRasterPos2f(x_pos+6.5,y_pos);
glutBitmapCharacter(font,static_cast<char>(se1+48));
glRasterPos2f(x_pos+8.15,y_pos);
glutBitmapCharacter(font,static_cast<char>(se2+48));
glColor3f(1.0,1.0,0.0);
}
void displayCalendar(float calX,float calY,void *font)
{
time_t cal;
cal =time(NULL);
struct tm *local;
local =localtime(&cal);
int year =(local->tm_year)+1900;
int y[2];
y[2]=year%10;
year/=10;
y[1]=year%10;
year/=10;
y[0]=year%10;
year/=10;
int month =(local->tm_mon)+1;
int m1=month/10;
int m2=month%10;
int day=local->tm_mday;
int d1=day/10;
int d2=day%10;
glColor3f(redn,greenn,bluen);
//YEAR
glRasterPos2f(calX,calY);
glutBitmapCharacter(font,static_cast<char>(y[2]+48));
glRasterPos2f(calX-1.35,calY);
glutBitmapCharacter(font,static_cast<char>(y[1]+48));
glRasterPos2f(calX-2.7,calY);
glutBitmapCharacter(font,static_cast<char>(y[0]+48));
glRasterPos2f(calX-4,calY);
glutBitmapCharacter(font,static_cast<char>(year+48));
glRasterPos2f(calX+1.5,calY);
glutBitmapCharacter(font,static_cast<char>(47));
//MONTH
glRasterPos2f(calX+2.5,calY);
glutBitmapCharacter(font,static_cast<char>(m1+48));
glRasterPos2f(calX+3.65,calY);
glutBitmapCharacter(font,static_cast<char>(m2+48));
glRasterPos2f(calX+5.05,calY);
glutBitmapCharacter(font,static_cast<char>(47));
//DAY
glRasterPos2f(calX+5.65,calY);
glutBitmapCharacter(font,static_cast<char>(d1+48));
glRasterPos2f(calX+7.2,calY);
glutBitmapCharacter(font,static_cast<char>(d2+48));
}
};
| [
"noreply@github.com"
] | noreply@github.com |
5201ea00bf85f34d6264911d17bd726fd2a43490 | 4897b9d75d851a81606d19a0e046b32eb16aa1bd | /problemset-new/007/00747-largest-number-at-least-twice-of-others/747.cpp | fe4e2662e4cc898f4584a40931b9fbf36f105f42 | [] | no_license | tiankonguse/leetcode-solutions | 0b5e3a5b3f7063374e9543b5f516e9cecee0ad1f | a36269c861bd5797fe3835fc179a19559fac8655 | refs/heads/master | 2023-09-04T11:01:00.787559 | 2023-09-03T04:26:25 | 2023-09-03T04:26:25 | 33,770,209 | 83 | 38 | null | 2020-05-12T15:13:59 | 2015-04-11T09:31:39 | C++ | UTF-8 | C++ | false | false | 3,096 | cpp | #include <bits/stdc++.h>
#include "base.h"
using namespace std;
typedef __int128_t int128;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<pll> vpll;
typedef long double ld;
typedef vector<ld> vld;
typedef vector<bool> vb;
typedef vector<string> vs;
// const int mod = 1e9 + 7;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rep1(i, n) for (ll i = 1; i <= (n); i++)
#define rrep(i, n) for (ll i = (n)-1; i >= 0; i--)
#define rrep1(i, n) for (ll i = (n); i >= 1; i--)
#define all(v) (v).begin(), (v).end()
template <class T>
using min_queue = priority_queue<T, vector<T>, greater<T>>;
template <class T>
using max_queue = priority_queue<T>;
int dir4[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
int dir8[8][2] = {{0, 1}, {1, 1}, {1, 0}, {1, -1},
{0, -1}, {-1, -1}, {-1, 0}, {-1, 1}};
template <class T>
void chmin(T& a, T b) {
if (a == -1) {
a = b;
} else {
a = min(a, b);
}
}
template <class T>
void chmax(T& a, T b) {
if (a == -1) {
a = b;
} else {
a = max(a, b);
}
}
constexpr int INF = 1 << 30;
constexpr ll INFL = 1LL << 60;
constexpr ll MOD = 1000000007;
constexpr ld EPS = 1e-12;
ld PI = acos(-1.0);
const double pi = acos(-1.0), eps = 1e-7;
const int inf = 0x3f3f3f3f, ninf = 0xc0c0c0c0, mod = 1000000007;
const int max3 = 2010, max4 = 20010, max5 = 200010, max6 = 2000010;
// LONG_MIN, LONG_MAX
/*
unordered_map / unordered_set
lower_bound 大于等于
upper_bound 大于
reserve 预先分配内存
reverse(all(vec)) 反转
sum = accumulate(a.begin(), a.end(), 0ll);
__builtin_popcount 一的个数
vector / array : upper_bound(all(vec), v)
map: m.upper_bound(v)
区间个数: std::distance(v.begin(), it)
map/set distance 复杂度 O(N)
vector/数组 distance 复杂度 O(1)
size_t found=str.find(string/char/char*);
std::string::npos
排序,小于是升序:[](auto&a, auto&b){ return a < b; })
优先队列 priority_queue<Node>:top/pop/push/empty
struct Node {
Node(int t = 0) : t(t) {}
int t;
// 小于是最大堆,大于是最小堆
bool operator<(const Node& that) const { return this->t < that.t; }
};
*/
class Solution {
public:
int dominantIndex(vector<int>& nums) {
int maxNum = nums[0];
int maxIndex = 0;
for (int i = 0; i < nums.size(); i++) {
if (nums[i] > maxNum) {
maxNum = nums[i];
maxIndex = i;
}
}
for (int i = 0; i < nums.size(); i++) {
if (i == maxIndex) {
continue;
}
if (nums[i] * 2 > maxNum) {
return -1;
}
}
return maxIndex;
}
};
int main() {
printf("hello ");
// vector<double> ans = {1.00000,-1.00000,3.00000,-1.00000};
// vector<vector<int>> cars = {{1, 2}, {2, 1}, {4, 3}, {7, 2}};
// TEST_SMP1(Solution, getCollisionTimes, ans, cars);
return 0;
}
| [
"i@tiankonguse.com"
] | i@tiankonguse.com |
1b5bdcc97233648fe52167c9108cd2024d4cf5d5 | ce2c5f3a634b59d257e9b94494edba279ca2497f | /include/shader_s.h | 8476e5af82e21b496cf3e18886dcf99258444311 | [] | no_license | K1ngArtes/BasicRenderer | 6c20b506771bf175813adab7279676aa9fcc0a2c | 4ec5290faceedadf7716bdabcc00e9dea4208b2f | refs/heads/master | 2020-04-08T21:12:15.439834 | 2018-12-16T18:11:27 | 2018-12-16T18:11:27 | 159,734,364 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,373 | h | #ifndef SHADER_H
#define SHADER_H
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <OpenGL/gl3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
class Shader {
public:
// the program id
unsigned int ID;
// constructor reads and builds the shader
Shader(const char* vertexPath, const char* fragmentPath) {
// 1) retrieve the vertex/fragment source code from filePath
std::string vertexCode;
std::string fragmentCode;
std::ifstream vShaderFile;
std::ifstream fShaderFile;
// ensure ifstream objects can throw exceptions:
vShaderFile.exceptions(std::ifstream::failbit | std::ifstream::badbit);
fShaderFile.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try {
// open files
vShaderFile.open(vertexPath);
fShaderFile.open(fragmentPath);
std::stringstream vShaderStream, fShaderStream;
// read files buffer contents into streams
vShaderStream << vShaderFile.rdbuf();
fShaderStream << fShaderFile.rdbuf();
// close file handlers
vShaderFile.close();
fShaderFile.close();
// convert stream into string
vertexCode = vShaderStream.str();
fragmentCode = fShaderStream.str();
} catch(std::ifstream::failure e) {
std::cout << "ERROR::SHADER::FILE_NOT_SUCCESFULLY_READ" << std::endl;
std::cerr << e.what() << std::endl;
}
const char *vShaderCode = vertexCode.c_str();
const char *fShaderCode = fragmentCode.c_str();
// 2) Compile shaders
unsigned int vertex, fragment;
int success;
char infoLog[512];
// vertex shader
vertex = glCreateShader(GL_VERTEX_SHADER);
glShaderSource(vertex, 1, &vShaderCode, NULL);
glCompileShader(vertex);
// print compile errors if any
glGetShaderiv(vertex, GL_COMPILE_STATUS, &success);
if(!success)
{
glGetShaderInfoLog(vertex, 512, NULL, infoLog);
std::cout << "ERROR::SHADER::VERTEX::COMPILATION_FAILED\n" << infoLog << std::endl;
};
// fragment shader
fragment = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(fragment, 1, &fShaderCode, NULL);
glCompileShader(fragment);
// print compile errors if any
glGetShaderiv(fragment, GL_COMPILE_STATUS, &success);
if(!success)
{
glGetShaderInfoLog(fragment, 512, NULL, infoLog);
std::cout << "ERROR::SHADER::FRAGMENT::COMPILATION_FAILED\n" << infoLog << std::endl;
};
// shader program
ID = glCreateProgram();
glAttachShader(ID, vertex);
glAttachShader(ID, fragment);
glLinkProgram(ID);
glGetProgramiv(ID, GL_LINK_STATUS, &success);
if(!success) {
glGetProgramInfoLog(ID, 512, NULL, infoLog);
std::cout << "ERROR::SHADER::PROGRAM::LINKING_FAILED\n" << infoLog << std::endl;
}
// delete shaders because they are not nneded
glDeleteShader(vertex);
glDeleteShader(fragment);
}
// use, activate this shader
void use() {
glUseProgram(ID);
}
// utility uniform functions
void setBool(const std::string &name, bool value) const {
glUniform1i(glGetUniformLocation(ID, name.c_str()), (int)value);
}
void setInt(const std::string &name, int value) const {
glUniform1i(glGetUniformLocation(ID, name.c_str()), (int)value);
}
void setFloat(const std::string &name, float value) const {
glUniform1f(glGetUniformLocation(ID, name.c_str()), (float)value);
}
void setMat4(const std::string &name, glm::mat4 value) const {
glUniformMatrix4fv(glGetUniformLocation(ID, name.c_str()), 1, GL_FALSE, glm::value_ptr(value));
}
};
#endif | [
"arthurslife@ymail.com"
] | arthurslife@ymail.com |
06558128d2d13de29547bac447fadc5a2fb7455b | 2c3d596da726a64759c6c27d131c87c33a4e0bf4 | /Src/Qt/kwt/src/kwidget.h | 89a51a93217061d46d3cf2bc4c22219d21bd398b | [
"MIT"
] | permissive | iclosure/smartsoft | 8edd8e5471d0e51b81fc1f6c09239cd8722000c0 | 62eaed49efd8306642b928ef4f2d96e36aca6527 | refs/heads/master | 2021-09-03T01:11:29.778290 | 2018-01-04T12:09:25 | 2018-01-04T12:09:25 | 116,255,998 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 346 | h | #ifndef KWIDGET_H
#define KWIDGET_H
#include <QWidget>
#include "kwt_global.h"
class KWT_EXPORT KWidget : public QWidget
{
Q_OBJECT
public:
explicit KWidget(QWidget *parent = 0, Qt::WindowFlags f = 0);
public:
KWidget* parentWidget() const { return reinterpret_cast<KWidget*>(QWidget::parentWidget()); }
};
#endif // KWIDGET_H
| [
"iclosure@163.com"
] | iclosure@163.com |
5d477f3bc64edba693df5100b1db51f68859e50c | 344ac46ae0377398078a38defda891fb2e82ed6a | /Cell.cc | 4d32759e48c613b47ba2b800326b23cc44c1d475 | [
"MIT"
] | permissive | lemrobotry/thesis | a94d346cd511e8bba08f3f3d9f956c908c6be6c2 | 14ad489e8f04cb957707b89c454ee7d81ec672ad | refs/heads/master | 2021-01-23T22:15:58.521071 | 2015-05-12T04:48:33 | 2015-05-12T04:48:33 | 35,466,923 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,136 | cc | #include "Cell.hh"
namespace Permute {
// Connects each pair of paths in the left and right cells such that the left
// path's end state matches the right path's start state, and the right path
// is of the given type.
void Cell::build (CellRef parent, ConstCellRef left, ConstCellRef right, double score, bool swap, Path::Type type) {
for (PathIterator leftPath = left -> begin (); leftPath != left -> end (); ++ leftPath) {
Fsa::StateId middle = (* leftPath) -> getEnd ();
for (PathIterator rightPath = right -> begin (middle, type);
rightPath != right -> end ();
rightPath = right -> next (rightPath, middle, type)) {
parent -> add (Path::connect (* leftPath, * rightPath, score, swap));
}
}
}
// Iterates over all paths in the given cell and returns the one with the
// highest score.
ConstPathRef Cell::getBestPath (ConstCellRef cell) {
ConstPathRef best = Path::nullPath ();
for (PathIterator path = cell -> begin (); path != cell -> end (); ++path) {
if ((* path) -> getScore () > best -> getScore ()) {
best = (* path);
}
}
return best;
}
/**********************************************************************/
CellImpl::CellImpl () :
paths_ ()
{}
bool CellImpl::empty () const {
return paths_.empty ();
}
size_t CellImpl::size () const {
return paths_.size ();
}
void CellImpl::clear () {
paths_.clear ();
}
Cell::PathIterator CellImpl::begin () const {
return paths_.begin ();
}
Cell::PathIterator CellImpl::end () const {
return paths_.end ();
}
Cell::PathIterator CellImpl::begin (Fsa::StateId start, Path::Type type) const {
return paths_.lower_bound (start, type);
}
Cell::PathIterator CellImpl::next (PathIterator i, Fsa::StateId start, Path::Type type) const {
return paths_.next (i, start, type);
}
Cell::PathIterator CellImpl::find (Fsa::StateId start, Fsa::StateId end, Path::Type type) const {
return paths_.find (start, end, type);
}
/**********************************************************************/
CellDecorator::CellDecorator (CellRef decorated) :
decorated_ (decorated)
{}
bool CellDecorator::empty () const {
return decorated_ -> empty ();
}
size_t CellDecorator::size () const {
return decorated_ -> size ();
}
void CellDecorator::clear () {
decorated_ -> clear ();
}
Cell::PathIterator CellDecorator::begin () const {
return decorated_ -> begin ();
}
Cell::PathIterator CellDecorator::end () const {
return decorated_ -> end ();
}
Cell::PathIterator CellDecorator::begin (Fsa::StateId start, Path::Type type) const {
return decorated_ -> begin (start, type);
}
Cell::PathIterator CellDecorator::next (PathIterator i, Fsa::StateId start, Path::Type type) const {
return decorated_ -> next (i, start, type);
}
Cell::PathIterator CellDecorator::find (Fsa::StateId start, Fsa::StateId end, Path::Type type) const {
return decorated_ -> find (start, end, type);
}
bool CellDecorator::add (ConstPathRef path) {
return decorated_ -> add (path);
}
}
| [
"lemrobotry@gmail.com"
] | lemrobotry@gmail.com |
667061f7b3b1c17484a9021ccef8673321d3d0e7 | 9112d6748b791c8a34c9694b5004bd7623031237 | /War/card.cpp | aa01169d22ebd56159a66cf788cd8c4dd5bf3a3f | [] | no_license | rjcallahan6/OOP | 058d0e4cd089889ca324c95e8c7460bf210d7843 | 6df223646e754ab3c661402484245657eb795e54 | refs/heads/master | 2020-03-29T16:36:04.045830 | 2018-09-25T04:24:40 | 2018-09-25T04:24:40 | 148,492,109 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,036 | cpp | #include "card.hpp"
#include <iostream>
Card::Card(Rank r, Suit s) : m_rank(r), m_suit(s)
{
}
std::ostream& operator << (std::ostream& output, Card card)
{
switch (card.m_rank)
{
case 0:
output << "2";
break;
case 1:
output << "3";
break;
case 2:
output << "4";
break;
case 3:
output << "5";
break;
case 4:
output << "6";
break;
case 5:
output << "7";
break;
case 6:
output << "8";
break;
case 7:
output << "9";
break;
case 8:
output << "T";
break;
case 9:
output << "J";
break;
case 10:
output << "Q";
break;
case 11:
output << "K";
break;
case 12:
output << "A";
break;
}
switch (card.m_suit)
{
case 0:
output << "S";
break;
case 1:
output << "C";
break;
case 2:
output << "H";
break;
case 3:
output << "D";
break;
}
return output;
| [
"noreply@github.com"
] | noreply@github.com |
06de461eb5264f2a2527c7037ce71e7862afbaaf | 8cd6f2ac51d11cd87a0bebe38d8938070d640fd4 | /inst/executables/spatial_dfa_v12.cpp | 1a9071106d753fb7c8fe002065f602dc8b73f66b | [] | no_license | James-Thorson/spatial_DFA | 289e2b7cd30246fef660fdbb5691366a684a9d41 | 763b7e888338c9661222e840c3c9b127e2bdc5be | refs/heads/master | 2021-07-10T08:37:18.124375 | 2020-06-30T16:06:50 | 2020-06-30T16:06:50 | 32,428,942 | 8 | 6 | null | null | null | null | UTF-8 | C++ | false | false | 12,902 | cpp | // Space time
#include <TMB.hpp>
// 2nd power of a number
template<class Type>
Type square(Type x){ return pow(x,2.0); }
// Function for detecting NAs
template<class Type>
bool isNA(Type x){
return R_IsNA(asDouble(x));
}
// function for logistic transform
template<class Type>
Type plogis(Type x){
return 1.0 / (1.0 + exp(-x));
}
// dlognorm
template<class Type>
Type dlognorm(Type x, Type meanlog, Type sdlog, int give_log=false){
Type Return;
if(give_log==false) Return = dnorm( log(x), meanlog, sdlog, false) / x;
if(give_log==true) Return = dnorm( log(x), meanlog, sdlog, true) - log(x);
return Return;
}
// dzinflognorm
template<class Type>
Type dzinflognorm(Type x, Type meanlog, Type encounter_prob, Type log_notencounter_prob, Type sdlog, int give_log=false){
Type Return;
if(x==0){
if(give_log==false) Return = 1.0 - encounter_prob;
if(give_log==true){
if( isNA(log_notencounter_prob) ) Return = log(1.0 - encounter_prob);
if( !isNA(log_notencounter_prob) ) Return = log_notencounter_prob;
}
}else{
if(give_log==false) Return = encounter_prob * dlognorm( x, meanlog, sdlog, false );
if(give_log==true) Return = log(encounter_prob) + dlognorm( x, meanlog, sdlog, true );
}
return Return;
}
// dzinfgamma, shape = 1/CV^2, scale = mean*CV^2
template<class Type>
Type dzinfgamma(Type x, Type posmean, Type encounter_prob, Type log_notencounter_prob, Type cv, int give_log=false){
Type Return;
if(x==0){
if(give_log==false) Return = 1.0 - encounter_prob;
if(give_log==true){
if( isNA(log_notencounter_prob) ) Return = log(1.0 - encounter_prob);
if( !isNA(log_notencounter_prob) ) Return = log_notencounter_prob;
}
}else{
if(give_log==false) Return = encounter_prob * dgamma( x, pow(cv,-2), posmean*pow(cv,2), false );
if(give_log==true) Return = log(encounter_prob) + dgamma( x, pow(cv,-2), posmean*pow(cv,2), true );
}
return Return;
}
// dzinfnorm
template<class Type>
Type dzinfnorm(Type x, Type posmean, Type encounter_prob, Type log_notencounter_prob, Type cv, int give_log=false){
Type Return;
if(x==0){
if(give_log==false) Return = 1.0 - encounter_prob;
if(give_log==true){
if( isNA(log_notencounter_prob) ) Return = log(1.0 - encounter_prob);
if( !isNA(log_notencounter_prob) ) Return = log_notencounter_prob;
}
}else{
if(give_log==false) Return = encounter_prob * dnorm( x, posmean, posmean*cv, false );
if(give_log==true) Return = log(encounter_prob) + dnorm( x, posmean, posmean*cv, true );
}
return Return;
}
// Main function
template<class Type>
Type objective_function<Type>::operator() ()
{
// Settings
DATA_FACTOR( Options_vec );
// Slot 0 -- distribution of data (0=Lognormal-Poisson; 1=delta-lognormal; 2=delta-gamma; 3=Poisson)
// Slot 1 -- Include Omega? (0=No, 1=Yes)
// Slot 2 -- Include Epsilon? (0=No, 1=Yes)
// Slot 3 -- Form for encounter probability
// Slot 4 -- Include observation-level overdispersion with multispecies correlation (0=No, 1=Yes)
// Indices
DATA_INTEGER(n_obs); // Total number of observations (i)
DATA_INTEGER(n_samples); // Total number of samples (elements in observation-level overdispersion)
DATA_INTEGER(n_obsfactors);// Number of overdispersion factors (b)
DATA_INTEGER(n_sites); // Number of stations (s)
DATA_INTEGER(n_years); // Number of years (t)
DATA_INTEGER(n_knots); // Number of stations (n)
DATA_INTEGER(n_species); // Number of species (p)
DATA_INTEGER(n_factors); // Number of dynamic factors (j)
DATA_INTEGER(n_cov); // Number of covariates (k)
// Data
DATA_VECTOR( c_i ); // Count for observation
DATA_FACTOR( m_i ); // sample for observation
DATA_FACTOR( p_i ); // Species for observation
DATA_FACTOR( s_i ); // Site for observation
DATA_FACTOR( t_i ); // Year for observation
DATA_MATRIX( X_ik ); // Covariate design matrix
DATA_VECTOR( a_n ); // Area associated with each knot
// Rotation matrix
DATA_MATRIX( Rotation_jj );
// SPDE objects
DATA_SPARSE_MATRIX(G0);
DATA_SPARSE_MATRIX(G1);
DATA_SPARSE_MATRIX(G2);
// Fixed effects
PARAMETER_MATRIX(logkappa_jz); // Controls range of spatial variation (0=Omega, 1=Epsilon)
PARAMETER_VECTOR(alpha_j); // Mean of Gompertz-drift field
PARAMETER_VECTOR(phi_j); // Offset of beginning from equilibrium
PARAMETER_VECTOR(loglambda_j); // ratio of temporal and spatial variance for dynamic-factor j
PARAMETER_VECTOR(rho_j); // Autocorrelation (i.e. density dependence)
PARAMETER_VECTOR(L_val); // Values in loadings matrix
PARAMETER_VECTOR(L2_val); // Values in loadings matrix
PARAMETER_VECTOR(gamma_k);
PARAMETER_VECTOR(log_sigma_p);
PARAMETER_MATRIX(zinfl_pz);
// Random effects
PARAMETER_ARRAY(Epsilon_input); // Spatial process variation
PARAMETER_MATRIX(Omega_input); // Spatial variation in carrying capacity
PARAMETER_VECTOR(delta_i);
PARAMETER_MATRIX(eta_mb);
// Global stuff
using namespace density;
Type pi = 3.141592;
Type jnll = 0;
vector<Type> jnll_c(5);
jnll_c.setZero();
// Calculate tau (space: O, time: E) for dynamics factors
vector<Type> lambda_j(n_factors);
vector<Type> VarSpace_j(n_factors);
vector<Type> VarTime_j(n_factors);
array<Type> logtau_jz(n_factors,2); // log-inverse SD of Epsilon
array<Type> Range_jz(n_factors,2);
for(int j=0; j<n_factors; j++){
lambda_j(j) = exp( loglambda_j(j) );
for(int z=0; z<2; z++) Range_jz(j,z) = sqrt(8.0) / exp( logkappa_jz(j,z) );
logtau_jz(j,0) = 0.5*( log(1.0+lambda_j(j)) - log(4.0*pi*exp(2.0*logkappa_jz(j,0))*square(1-rho_j(j))) );
logtau_jz(j,1) = logtau_jz(j,0) + log(1-rho_j(j)) + logkappa_jz(j,0) - logkappa_jz(j,1) - 0.5*log( lambda_j(j) * (1-square(rho_j(j))) );
VarSpace_j(j) = 1.0 / ( 4.0*pi*exp(2.0*logtau_jz(j,0))*exp(2.0*logkappa_jz(j,0)) * square(1-rho_j(j)) );
VarTime_j(j) = 1.0 / ( 4.0*pi*exp(2.0*logtau_jz(j,1))*exp(2.0*logkappa_jz(j,1)) * (1-square(rho_j(j))) );
}
// Assemble the loadings matrix
matrix<Type> L_pj(n_species,n_factors);
matrix<Type> L_pj_rotated(n_species,n_factors);
int Count = 0;
for(int j=0; j<n_factors; j++){
for(int p=0; p<n_species; p++){
if(p>=j){
L_pj(p,j) = L_val(Count);
Count++;
}else{
L_pj(p,j) = 0.0;
}
}}
L_pj_rotated = L_pj * Rotation_jj;
// Assemble the loadings matrix
matrix<Type> L_pb(n_species,n_obsfactors);
Count = 0;
for(int b=0; b<n_obsfactors; b++){
for(int p=0; p<n_species; p++){
if(p>=b){
L_pb(p,b) = L2_val(Count);
Count++;
}else{
L_pb(p,b) = 0.0;
}
}}
// Multiply out overdispersion
matrix<Type> eta_mp(n_samples,n_species);
eta_mp = eta_mb * L_pb.transpose();
// Derived quantities related to GMRF
Eigen::SparseMatrix<Type> Q;
// Spatial field reporting
//GMRF_t<Type> nll_gmrf_spatial(Q)
// Probability of random fields
array<Type> Epsilon_tmp(n_knots,n_years);
vector<Type> pen_epsilon_j(n_factors);
vector<Type> pen_omega_j(n_factors);
for(int j=0; j<n_factors; j++){
// Omega
Q = exp(4.0*logkappa_jz(j,0))*G0 + 2.0*exp(2.0*logkappa_jz(j,0))*G1 + G2;
pen_omega_j(j) += GMRF(Q)(Omega_input.col(j));
// Epsilon
for(int n=0; n<n_knots; n++){
for(int t=0; t<n_years; t++){
Epsilon_tmp(n,t) = Epsilon_input(n,j,t);
}}
Q = exp(4.0*logkappa_jz(j,1))*G0 + 2.0*exp(2.0*logkappa_jz(j,1))*G1 + G2;
pen_epsilon_j(j) += SEPARABLE(AR1(rho_j(j)),GMRF(Q))(Epsilon_tmp);
}
if( Options_vec(1)==1 ) jnll_c(0) = pen_omega_j.sum();
if( Options_vec(2)==1 ) jnll_c(1) = pen_epsilon_j.sum();
// Probability of overdispersion
if( Options_vec(0)==0 ){
vector<Type> prob_delta_i( n_obs );
for(int i=0; i<n_obs; i++){
prob_delta_i(i) = dnorm( delta_i(i), Type(0.0), Type(1.0), true );
}
jnll_c(2) = -1 * prob_delta_i.sum();
}
// Probability of correlated overdispersion
if( Options_vec(4)==1 ){
matrix<Type> prob_eta_mb( n_samples, n_obsfactors);
for(int m=0; m<n_samples; m++){
for(int b=0; b<n_obsfactors; b++){
prob_eta_mb(m,b) = dnorm( eta_mb(m,b), Type(0.0), Type(1.0), true );
}}
jnll_c(3) = -1 * prob_eta_mb.sum();
}
// Transform random fields
array<Type> Epsilon_njt(n_knots,n_factors,n_years);
array<Type> Omega_nj(n_knots,n_factors);
for(int n=0; n<n_knots; n++){
for(int j=0; j<n_factors; j++){
Omega_nj(n,j) = Omega_input(n,j) / exp(logtau_jz(j,0));
for(int t=0; t<n_years; t++){
Epsilon_njt(n,j,t) = Epsilon_input(n,j,t) / exp(logtau_jz(j,1));
}
}}
// Declare derived quantities
vector<Type> logchat_i(n_obs);
array<Type> psi_njt(n_knots,n_factors,n_years);
vector<Type> eta_i(n_obs);
array<Type> theta_npt(n_knots,n_species,n_years);
// Computate factors
for(int n=0; n<n_knots; n++){
for(int j=0; j<n_factors; j++){
for(int t=0; t<n_years; t++){
psi_njt(n,j,t) = phi_j(j)*pow(rho_j(j),t) + Epsilon_njt(n,j,t) + alpha_j(j)/(1-rho_j(j)) + Omega_nj(n,j)/(1-rho_j(j));
}}}
eta_i = X_ik * gamma_k.matrix();
// Computate expected log-densities
theta_npt.setZero();
for(int n=0; n<n_knots; n++){
for(int p=0; p<n_species; p++){
for(int t=0; t<n_years; t++){
for(int j=0; j<n_factors; j++){
theta_npt(n,p,t) += psi_njt(n,j,t) * L_pj(p,j);
}
}}}
// Probability of observations
vector<Type> nll_i(n_obs);
vector<Type> encounterprob_i(n_obs);
Type log_notencounterprob = NA_REAL;
for(int i=0; i<n_obs; i++){
// Expectation
logchat_i(i) = eta_i(i) + theta_npt(s_i(i),p_i(i),t_i(i));
// Overdispersion
if( Options_vec(0)==0 ) logchat_i(i) += delta_i(i) * exp(log_sigma_p(p_i(i)));
if( Options_vec(4)==1 ) logchat_i(i) += eta_mp(m_i(i),p_i(i));
// Likelihood
if( !isNA(c_i(i)) ){
if( Options_vec(0)==0 ) nll_i(i) = -1 * dpois( c_i(i), exp(logchat_i(i)), true );
if( Options_vec(0)!=0 ){
// Calculate encounter probability (only used for delta-lognormal model)
if( Options_vec(3)==0 ) encounterprob_i(i) = plogis( zinfl_pz(p_i(i),0) + zinfl_pz(p_i(i),1)*logchat_i(i) );
if( Options_vec(3)==1 ) encounterprob_i(i) = plogis(zinfl_pz(p_i(i),1)) * ( 1.0 - exp(-1 * exp(logchat_i(i)) * exp(zinfl_pz(p_i(i),0))) );
if( Options_vec(3)==2 ){
encounterprob_i(i) = ( 1.0 - exp(-1 * exp(logchat_i(i)) * exp(zinfl_pz(p_i(i),0))) );
log_notencounterprob = -1 * exp(logchat_i(i)) * exp(zinfl_pz(p_i(i),0));
}
// probability of data
if( Options_vec(0)==1 ) nll_i(i) = -1 * dzinflognorm(c_i(i), logchat_i(i)-log(encounterprob_i(i)), encounterprob_i(i), log_notencounterprob, exp(log_sigma_p(p_i(i))), true);
if( Options_vec(0)==2 ) nll_i(i) = -1 * dzinfgamma(c_i(i), exp(logchat_i(i))/encounterprob_i(i), encounterprob_i(i), log_notencounterprob, exp(log_sigma_p(p_i(i))), true);
if( Options_vec(0)==3 ) nll_i(i) = -1 * dzinfnorm(c_i(i), exp(logchat_i(i))/encounterprob_i(i), encounterprob_i(i), log_notencounterprob, exp(logchat_i(i))/encounterprob_i(i)*exp(log_sigma_p(p_i(i))), true);
}
}
}
jnll_c(4) = nll_i.sum();
jnll = jnll_c.sum();
// Calculate indices
if( a_n.sum() > 0 ){
array<Type> Index_npt(n_knots, n_species, n_years);
matrix<Type> Index_pt(n_species, n_years);
matrix<Type> ln_Index_pt(n_species, n_years);
Index_pt.setZero();
for(int t=0; t<n_years; t++){
for(int p=0; p<n_species; p++){
for(int n=0; n<n_knots; n++){
Index_npt(n,p,t) = exp(theta_npt(n,p,t)) * a_n(n) / 1000; // Convert from kg to metric tonnes
Index_pt(p,t) += Index_npt(n,p,t);
}
ln_Index_pt(p,t) = log( Index_pt(p,t) );
}}
REPORT( Index_pt );
REPORT( ln_Index_pt );
REPORT( Index_npt );
}
// Spatial field summaries
REPORT( Range_jz );
REPORT( logtau_jz );
REPORT( VarSpace_j );
REPORT( VarTime_j );
REPORT( lambda_j );
REPORT( Q );
// Penalties
REPORT( pen_epsilon_j );
REPORT( pen_omega_j );
REPORT( nll_i );
REPORT( jnll_c );
REPORT( jnll );
// Loadings
REPORT( L_pj );
REPORT( L_pj_rotated );
// Fields
REPORT( Epsilon_njt );
REPORT( Omega_nj );
REPORT( Epsilon_input );
REPORT( Omega_input );
// Predictions
REPORT( logchat_i );
REPORT( eta_i );
REPORT( delta_i );
REPORT( encounterprob_i );
// Derived fields
REPORT( theta_npt );
REPORT( psi_njt );
// Parameters
REPORT( logkappa_jz );
REPORT( alpha_j );
REPORT( phi_j );
REPORT( loglambda_j );
REPORT( rho_j );
REPORT( gamma_k );
REPORT( log_sigma_p );
REPORT( zinfl_pz );
// Overdispersion
REPORT( eta_mp );
REPORT( eta_mb );
REPORT( L_pb );
// SEs
ADREPORT( L_pj_rotated );
// Return objective function
return jnll;
}
| [
"JamesT.esq@gmail.com"
] | JamesT.esq@gmail.com |
296e6b6e7f2f2fd78e1896599d821584d8646efa | 0d960058ead3b9d1c55aa2156db3476dfca2abec | /Stack_Queue_Deque/2493.cpp | 19f9d4c60f8ef4c7f48daddfe09c3de87bb4ae0f | [] | no_license | repusjh/BOJ | 97da7f391e124c8dda4c65127a75a28d16bf081d | e7effc52b4f9bc102a93209f8846ecb873a5b9a2 | refs/heads/master | 2020-07-23T05:37:55.605420 | 2019-10-08T04:50:22 | 2019-10-08T04:50:22 | 207,460,136 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 596 | cpp | #include <stack>
#include <iostream>
#include <utility>
using namespace std;
stack<pair<int, int>> height;
int n, temp;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i = 1; i <= n; i++){
cin >> temp;
if (height.empty()){
cout << 0 << ' ';
height.push(make_pair(i, temp));
}
else{
if (height.top().second <= temp){
while(!height.empty() && height.top().second <= temp){
height.pop();
}
}
if(height.empty())
cout << 0 << ' ';
else
cout << height.top().first << ' ';
height.push(make_pair(i, temp));
}
}
return 0;
} | [
"repusjh@gmail.com"
] | repusjh@gmail.com |
aa7927b25a02999ef989a87de41aff83ed3d8cc0 | 3952c08558205432aa5f39a01706fc6aec5bfbb7 | /Graph/Connectivity/StrongComponents/Tarjan.cpp | bdd4441be5fcf522fdd666cab5ca879a77e58124 | [] | no_license | jhtan/AlgoLib | 828c304b38ede8b91718a1075fafac2364619f0f | b86edd9ca80987206e01f79c01737cdb068698f6 | refs/heads/master | 2020-04-07T14:22:16.987981 | 2013-06-16T17:55:08 | 2013-06-16T17:55:08 | 10,723,867 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,224 | cpp | #include <stack>
#include <vector>
#include <algorithm>
using namespace std;
template<int MAXN>
struct SCCTarjan {
int n;
vector<int> e[MAXN];
int id[MAXN];
vector<vector<int> > scc;
void init(int n) {
this->n = n;
for (int i = 0; i < n; ++i) {
e[i].clear();
}
}
void add(int a, int b) {
e[a].push_back(b);
}
int dfn[MAXN], low[MAXN];
int timestamp;
stack<int> s;
void dfs(int v) {
dfn[v] = timestamp++;
low[v] = dfn[v];
s.push(v);
for (vector<int>::const_iterator w = e[v].begin(); w != e[v].end(); ++w) {
if (dfn[*w] == -1) {
dfs(*w);
low[v] = min(low[v], low[*w]);
} else if (dfn[*w] != -2) {
low[v] = min(low[v], dfn[*w]);
}
}
if (low[v] == dfn[v]) {
vector<int> t;
do {
int w = s.top();
s.pop();
id[w] = (int)scc.size();
t.push_back(w);
dfn[w] = -2;
} while (t.back() != v);
scc.push_back(t);
}
}
int gao() {
scc.clear();
stack<int>().swap(s);
timestamp = 0;
fill(dfn, dfn + n, -1);
for (int i = 0; i < n; ++i) {
if (dfn[i] == -1) {
dfs(i);
}
}
return (int)scc.size();
}
};
| [
"zejun.wu@gmail.com"
] | zejun.wu@gmail.com |
df16c249d2f2d1d3b6d5df4ab05189af26c3c57d | 7d45eb564600310102724cade7c4300b8066b3cc | /ClassWork/Orig/main.cpp | 25f1146b11860c8167b9a8bbf50c152eee84e843 | [] | no_license | itstepP21014/VinogradovDZ | cd442fc0af49e2d83e5024fbd1345495a6940ed9 | e009d78407eb6e2f7f70fce328eeb459fed77e67 | refs/heads/master | 2020-06-04T07:56:10.136741 | 2015-06-22T06:50:35 | 2015-06-22T06:50:35 | 27,079,150 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 736 | cpp | #include <iostream>
#include <exception>
#include "sdlwrapper.h"
using namespace std;
int main()
{
try
{
SDLWrapper sdlWrapper;
SDLWindowWrapper win("The Dark Force", 100, 100, 640, 480, SDL_WINDOW_SHOWN);
SDLRendererWrapper ren (win.win(), -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
SDL_RenderClear (ren.ren());
SDL_SetRenderDrawColor (ren.ren(), 0xFF, 0xFF, 0xFF, 0xFF);
SDL_RenderDrawLine(ren.ren(), 0, 0, 640, 480);
SDL_RenderPresent (ren.ren());
SDL_Delay(5000);
}
catch (exception &e)
{
cerr << "ERROR: " << e.what()<<endl;
}
catch (...)
{
cerr << "ERROR: something heppend\n";
}
return 0;
}
| [
"Arsen_Vinogradoff@tut.by"
] | Arsen_Vinogradoff@tut.by |
04a8522fc07414f59dd6f021c74802986e96bea7 | 089152eee1815e34f119a47bbf488d61f0cc4454 | /shared-cpp/src/plane/math/Vec2.hpp | 2d1ecca388a5c44fe07a0dd4e83c81e12ff356b0 | [
"MIT"
] | permissive | fwcd/plane | e62a30be25734efa3f0ad087e0f47253e2e23e3a | 739143c51b053030e250e62506731439abcfefe7 | refs/heads/master | 2020-03-07T11:31:42.624533 | 2018-05-15T14:29:29 | 2018-05-15T14:29:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 985 | hpp | /*
* Vec2.hpp
*
* Created on: 28.03.2018
*/
#ifndef SRC_PLANE_MATH_VEC2_HPP_
#define SRC_PLANE_MATH_VEC2_HPP_
#include <cmath>
namespace plane {
/**
* Immutable, two-dimensional vector.
*/
template <typename T> class Vec2 {
public:
Vec2() {
x = T();
y = T();
}
Vec2(T x, T y) {
this->x = x;
this->y = y;
}
Vec2(const Vec2& other) {
x = other.x;
y = other.y;
}
virtual ~Vec2() {}
Vec2 add(const Vec2& other) const { return Vec2(x + other.x, y + other.y); }
Vec2 sub(const Vec2& other) const { return Vec2(x - other.x, y - other.y); }
Vec2 scale(double factor) const { return Vec2(x * factor, y * factor); }
Vec2 normalize() const {
double len = length();
return Vec2(x / len, y / len);
}
double length() const { return std::sqrt((x * x) + (y * y)); }
T getX() const { return x; }
T getY() const { return y; }
private:
T x;
T y;
};
}
#endif /* SRC_PLANE_MATH_VEC2_HPP_ */
| [
"fwcdmail@gmail.com"
] | fwcdmail@gmail.com |
221579d8dae731368bb8921286ecbf2cdb65496f | 136ea9ffab2108e5a301d73e06c0706f806774aa | /Sort/Merge_Sort.cpp | 060fef152f7111ebb2fe0adf5d1376c938ac6bef | [] | no_license | jc5121/TargetOffer | ed2b5c8c8d84f0d590084a20774f450c4f7d6214 | 9592c1bacd21b58e5929650c1aa526d869f6d092 | refs/heads/master | 2020-04-03T09:52:49.986342 | 2019-09-03T09:20:30 | 2019-09-03T09:20:30 | 155,178,753 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 965 | cpp | #include <stdio.h>
// 辅助数组 auxiliary
void merge(int* a, int low, int mid, int high, int* aux){
int i = low;
int j = mid + 1;
// 复制至辅助数组
for(int k = low; k <= high; k++)
aux[k] = a[k];
// 回归
for(int k = low; k <= high; k++){
// 左或右用尽时直接复制另一边
if(i > mid) a[k] = aux[j++];
else if(j > high) a[k] = aux[i++];
// 找到比较小的,在aux中比!!!
else if(aux[j] < aux[i]) a[k] = aux[j++];
else a[k] = aux[i++];
}
}
// 自顶向下,递归;如果自底向上就不用递归了
void sort(int* a, int low, int high, int* aux){
if(high <= low) return;
int mid = low + (high - low) / 2;
sort(a, low, mid, aux);
sort(a, mid+1, high, aux);
merge(a, low, mid, high, aux);
}
int main(int argc, char** argv){
int a[13] = {0, 4, 2, 5, 12, 23, 4, 3, 6, 1, 10, 11, 15};
int aux[13];
// high = n - 1
sort(a, 0, 12, aux);
for(int i = 0; i<13; i++)
printf("%d\n", a[i]);
}
| [
"844751258@qq.com"
] | 844751258@qq.com |
df66362f4569b29e1e1027559285045ef7e89cdc | 2c4c827f38412e6d01f0b2c7ead80371e793ac2c | /agui/bezier.h | 2fdf39f5206765cc15195b63170a42ca75eaca72 | [
"BSD-3-Clause"
] | permissive | chuxuewen/Avocado | 1df0fb4af165638fae3113026bc5fa94dfc4cefd | 8ab3614f690c4ca62d360bdbd32fcf65af204327 | refs/heads/master | 2020-12-02T10:08:34.379994 | 2017-07-09T15:01:54 | 2017-07-09T15:01:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,848 | h | /* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2015, louis.chu
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of louis.chu nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL louis.chu BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __avocado__gui__bezier__
#define __avocado__gui__bezier__
#include "mathe.h"
#include "autil/buffer.h"
/**
* @ns avocado::gui
*/
av_gui_begin
/**
* @class QuadraticBezier # 二次贝塞尔曲线
*/
class QuadraticBezier {
public:
/**
* @constructor
*/
QuadraticBezier(Vec2 p0, Vec2 p1, Vec2 p2);
/**
* @func sample_curve_x
*/
float sample_curve_x(float t) const;
/**
* @func sample_curve_y
*/
float sample_curve_y(float t) const;
/**
* @func compute_bezier_points
*/
void sample_curve_points(uint sample_count, float* out) const;
/**
* @func sample_curve_points
*/
ArrayBuffer<Vec2> sample_curve_points(uint sample_count) const;
private:
float p0x, p0y;
float p1x, p1y;
float p2x, p2y;
};
/**
* @class CubicBezier # 三次贝塞尔曲线
*/
class CubicBezier {
public:
/**
* @constructor
*/
inline CubicBezier() { }
/**
* @constructor
*/
CubicBezier(Vec2 p0, Vec2 p1, Vec2 p2, Vec2 p3);
/**
* @func sample_curve_x
*/
inline float sample_curve_x(float t) const {
// `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.
return ((ax * t + bx) * t + cx) * t + p0x;
}
/**
* @func sample_curve_y
*/
inline float sample_curve_y(float t) const {
return ((ay * t + by) * t + cy) * t + p0y;
}
/**
* @func compute_bezier_points
*/
void sample_curve_points(uint sample_count, float* out) const;
/**
* @func sample_curve_points
*/
ArrayBuffer<Vec2> sample_curve_points(uint sample_count) const;
protected:
float ax, bx, cx;
float ay, by, cy;
float p0x, p0y;
};
/**
* @class FixedCubicBezier
* @bases CubicBezier
*/
class FixedCubicBezier: public CubicBezier {
public:
/**
* @constructor
*/
FixedCubicBezier();
/**
* Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).
* @constructor
*/
FixedCubicBezier(Vec2 p1, Vec2 p2);
/**
* @constructor
*/
inline FixedCubicBezier(float p1x, float p1y, float p2x, float p2y)
: FixedCubicBezier(Vec2(p1x, p1y), Vec2(p2x, p2y))
{ }
/**
* @func p1
*/
inline Vec2 p1() const { return m_p1; }
/**
* @func p2
*/
inline Vec2 p2() const { return m_p2; }
/**
* @func sample_curve_derivative_x
*/
inline float sample_curve_derivative_x(float t) const {
return (3.0 * ax * t + 2.0 * bx) * t + cx;
}
/**
* @func solve_curve_x # Given an x value, find a parametric value it came from.
*/
float solve_curve_x(float x, float epsilon) const;
/**
* @func solve
*/
inline float solve(float x, float epsilon) const {
return (this->*m_solve)(x, epsilon);
}
private:
typedef float (FixedCubicBezier::*Solve)(float x, float epsilon) const;
Solve m_solve;
Vec2 m_p1;
Vec2 m_p2;
av_def_inl_cls(Inl);
};
typedef FixedCubicBezier Curve;
typedef const Curve cCurve;
extern const FixedCubicBezier LINEAR;
extern const FixedCubicBezier EASE;
extern const FixedCubicBezier EASE_IN;
extern const FixedCubicBezier EASE_OUT;
extern const FixedCubicBezier EASE_IN_OUT;
av_gui_end
#endif
| [
"chuxuewen@gochinatv.com"
] | chuxuewen@gochinatv.com |
06cb3138a09a38ab44003953b24fc95337b1c137 | f98bda90298a03753e5d859f9ded4d62c2f9387c | /app/include/configuration.h | 0612aac850199400d07abe6356e125e7162834dc | [
"MIT"
] | permissive | glocklueng/vectorcontrol | 30b5e01ed7cc5750a8ea22f1175f2ba99136c3b3 | 031a20fd07bf83e9f6074cbdcd12ee7908e48e9d | refs/heads/master | 2021-01-16T20:02:28.190863 | 2015-11-20T10:56:15 | 2015-11-20T10:56:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,217 | h | /*
Copyright (C) 2014-2015 Thiemar Pty Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#pragma once
/*
64 KiB of flash:
* 8 KiB bootloader region (stubbed out in default image) at 0x08000000
* 52 KiB main application area starting at 0x08002000
* 4 KiB parameter area starting at 0x0800F000
*/
#define FLASH_PARAM_ADDRESS 0x0800F000
#define FLASH_PARAM_LENGTH 0x00001000
#define FLASH_PARAM_VERSION 4u
#define PARAM_NAME_MAX_LEN 92u
#include <limits>
#include "fixed.h"
struct bootloader_app_descriptor {
uint64_t signature;
uint64_t image_crc;
uint32_t image_size;
uint32_t vcs_commit;
uint8_t major_version;
uint8_t minor_version;
uint8_t reserved[6];
} __attribute__((packed));
/* Up to */
enum param_index_t {
PARAM_UAVCAN_ESC_INDEX = 0,
PARAM_UAVCAN_ESCSTATUS_INTERVAL,
PARAM_THIEMAR_STATUS_INTERVAL,
PARAM_THIEMAR_STATUS_ID,
PARAM_MOTOR_NUM_POLES,
PARAM_MOTOR_I_MAX,
PARAM_MOTOR_V_MAX,
PARAM_MOTOR_V_ACCEL,
PARAM_MOTOR_RS,
PARAM_MOTOR_LS,
PARAM_MOTOR_KV,
PARAM_CONTROL_BANDWIDTH,
PARAM_CONTROL_GAIN,
PARAM_CONTROL_HZ_IDLE,
PARAM_CONTROL_SPINUP_RATE,
PARAM_CONTROL_DIRECTION,
PARAM_CONTROL_BRAKING,
NUM_PARAMS
};
enum param_type_t {
PARAM_TYPE_INT = 0,
PARAM_TYPE_FLOAT
};
struct param_t {
uint8_t index;
uint8_t public_type;
const char* name;
float default_value;
float min_value;
float max_value;
};
class Configuration {
private:
float params_[NUM_PARAMS];
public:
Configuration(void);
void read_motor_params(struct motor_params_t& params);
void read_control_params(struct control_params_t& params);
bool get_param_by_name(struct param_t& out_param, const char* name);
bool get_param_by_index(struct param_t& out_param, uint8_t index);
bool set_param_value_by_name(const char* name, float value);
bool set_param_value_by_index(uint8_t index, float value);
float get_param_value_by_index(uint8_t index) {
if (index >= NUM_PARAMS) {
return std::numeric_limits<float>::signaling_NaN();
} else {
return params_[index];
}
}
void reset_params(void);
void write_params(void);
};
| [
"ben.dyer@taguchimail.com"
] | ben.dyer@taguchimail.com |
bbcad6c65693d1ac169128fd38ded3a21ed92a34 | 98d5359997160e58d199da8ebcfd3345c81fc174 | /lib/NECIRrcv/NECIRrcv.h | fd9dd22633efe661f7a736ddbede9c02f5d9d972 | [] | no_license | meishild/magiccar | 38b2a052a07f14f304cd1463186ad788de74fca1 | 43b4c4c20ceec29cd849fc3f91a96d14fcfbf602 | refs/heads/master | 2020-03-21T12:24:15.235705 | 2018-07-13T06:17:23 | 2018-07-13T06:17:23 | 138,550,845 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,272 | h | #ifndef NECIRrcv_h
#define NECIRrcv_h
//#include "WConstants.h"
#define USECPERTICK 50 // microseconds per clock interrupt tick
#define CLKFUDGE 5 // fudge factor for clock interrupt overhead
#define CLKMAX 256 // max value for clock (timer 2)
#define PRESCALE 8 // timer2 clock prescale
#define SYSCLOCK 16000000 // main Arduino clock
#define CLKSPERUSEC (SYSCLOCK/PRESCALE/1000000) // timer clocks per microsecond
#define MAXBUF 8 // IR command code buffer length (circular buffer)
// IR detector output is active low
#define MARK 0
#define SPACE 1
#define NBITS 32 // bits in IR code
#define BLINKLED 13
// defines for setting and clearing register bits
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif
// clock timer reset value
#define INIT_TIMER_COUNT2 (CLKMAX - USECPERTICK*CLKSPERUSEC + CLKFUDGE)
#define RESET_TIMER2 TCNT2 = INIT_TIMER_COUNT2
// pulse parameters -- nominal usec
#define STARTNOM 9000
#define SPACENOM 4500
#define BITMARKNOM 620
#define ONESPACENOM 1600
#define ZEROSPACENOM 480
#define RPTSPACENOM 2180
#define TOLERANCE 20 // percent
#define LTOL (1.0 - TOLERANCE/100.)
#define UTOL (1.0 + TOLERANCE/100.)
// pulse parameters (tick counts)
#define STARTMIN (int)((STARTNOM/USECPERTICK)*LTOL) // start MARK
#define STARTMAX (int)((STARTNOM/USECPERTICK)*UTOL)
#define SPACEMIN (int)((SPACENOM/USECPERTICK)*LTOL)
#define SPACEMAX (int)((SPACENOM/USECPERTICK)*UTOL)
#define BITMARKMIN (int)((BITMARKNOM/USECPERTICK)*LTOL-2) // extra tolerance for low counts
#define BITMARKMAX (int)((BITMARKNOM/USECPERTICK)*UTOL+2)
#define ONESPACEMIN (int)((ONESPACENOM/USECPERTICK)*LTOL)
#define ONESPACEMAX (int)((ONESPACENOM/USECPERTICK)*UTOL)
#define ZEROSPACEMIN (int)((ZEROSPACENOM/USECPERTICK)*LTOL-2)
#define ZEROSPACEMAX (int)((ZEROSPACENOM/USECPERTICK)*UTOL+2)
#define RPTSPACEMIN (int)((RPTSPACENOM/USECPERTICK)*LTOL)
#define RPTSPACEMAX (int)((RPTSPACENOM/USECPERTICK)*UTOL)
// receiver states
#define IDLE 1
#define STARTH 2
#define STARTL 3
#define BIT 4
#define ONE 5
#define ZERO 6
#define STOP 7
#define BITMARK 8
#define RPTMARK 9
// macros
#define GETIR(X) ((byte)digitalRead(X)) // used to read IR pin
#define nextstate(X) (irparams.rcvstate = X)
// state machine variables irparams
static volatile struct {
byte rcvstate ; // IR receiver state
byte bitcounter ; // bit counter
byte irdata ; // MARK or SPACE read from IR input pin
byte fptr ; // irbuf front pointer
byte rptr ; // irbuf rear pointer
byte irpin ; // pin for IR data from detector
byte blinkflag ; // TRUE to enable blinking of pin 13 on IR processing
unsigned int timer ; // state timer
unsigned long irmask ; // one-bit mask for constructing IR code
unsigned long ircode ; // IR code
unsigned long irbuf[MAXBUF] ; // circular buffer for IR codes
} irparams ;
// main class
class NECIRrcv
{
public:
NECIRrcv(int irpin);
unsigned long read();
void begin();
int available() ;
void flush() ;
void blink13(int blinkflag) ;
private:
} ;
#endif
| [
"haiyang.song@xhzy.com"
] | haiyang.song@xhzy.com |
5be3fd134820ad649ac8ee5893d28fb65d08d6ac | 3bcfd059eacfdd9fd6e26721585330da954a860c | /problem2/TAMoreThan.hpp | 8bab14ce5ad8c51f6014a3daba3ca565218006f3 | [] | no_license | ritaaoun/437_Assignment1 | 96d2259787d183bc3d55e75b289877f322339104 | ac5321c5a045a0f17c36d82cbbb10273b1b55d6d | refs/heads/master | 2021-01-22T03:18:31.167319 | 2017-02-20T18:58:51 | 2017-02-20T18:58:51 | 81,114,795 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 444 | hpp | #ifndef TAMORETHAN_HPP
#define TAMORETHAN_HPP
#include "TABool.hpp"
#include "TAOperation.hpp"
#include "TAInt.hpp"
#include "TADouble.hpp"
class TAMoreThan : public TABool, public TAOperation {
public:
TAMoreThan(const TAInt& lhs, const TAInt& rhs);
TAMoreThan(const TADouble& lhs, const TADouble& rhs);
void list() const;
void evaluate();
void printState() const;
private:
using TABool::set;
const TANumber &m_lhs, &m_rhs;
};
#endif | [
"rita-aoun@hotmail.com"
] | rita-aoun@hotmail.com |
4fb9cc0622d0647ee46da98a390146a1430138f3 | 8a30a1fd1b9ba6b4e44ad009e30809b65cbbc9b6 | /nametable.cpp | 7570429d9a6e7dd7fe7a80f90b5cc084513bd670 | [] | no_license | huaiwen/C0Compiler | 7a9e3d655d881068d5aaefc1cdb37634c5ff81a2 | 478579ee288ff113757ce9ef7837b94e42356145 | refs/heads/master | 2021-05-28T11:05:51.144003 | 2015-02-17T12:39:59 | 2015-02-17T12:39:59 | 30,915,890 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 404 | cpp | #include "nametable.h"
nametable::nametable()
{
//val = -99999999;
adr = -99999999;
name = "";
}
nametable::~nametable(void)
{
}
nametable::nametable(string s1, int a, int b, string s2)
{
name = s1;
//val = a;
level = b;
belongto = s2;
kind = var;
adr = -1;
}
nametable::nametable(string s1, int a, string s2)
{
name = s1;
level = a;
belongto = s2;
kind = procedur;
adr = -1;
size = -1;
}
| [
"zppzhw@gmail.com"
] | zppzhw@gmail.com |
38ac5e96d76a2ca4b70d3cb1e60ca5e5eacf87ac | 47a75dd6e7f891ec42e92b355cc9f29baa9ee71c | /build/px4_sitl_default/msg/topics_sources/gps_dump.cpp | 4af17744bbb45b264f4c9ab6816f9cc95e85d80e | [
"BSD-3-Clause"
] | permissive | rohan-na/Av-platform | 3017fd2026620fd7e9a411a5f7ed7aa5f85a646f | 274b2ee41acbf89e4b337a233af7658fd9dfcbe0 | refs/heads/master | 2022-12-16T05:16:23.782829 | 2020-09-25T14:05:07 | 2020-09-25T14:05:07 | 295,496,875 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,361 | cpp | /****************************************************************************
*
* Copyright (C) 2013-2016 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* Auto-generated by genmsg_cpp from file gps_dump.msg */
#include <inttypes.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/defines.h>
#include <uORB/topics/gps_dump.h>
#include <uORB/topics/uORBTopics.hpp>
#include <drivers/drv_hrt.h>
#include <lib/drivers/device/Device.hpp>
constexpr char __orb_gps_dump_fields[] = "uint64_t timestamp;uint8_t len;uint8_t[79] data;";
ORB_DEFINE(gps_dump, struct gps_dump_s, 88, __orb_gps_dump_fields, static_cast<uint8_t>(ORB_ID::gps_dump));
void print_message(const gps_dump_s &message)
{
PX4_INFO_RAW(" gps_dump_s\n");
const hrt_abstime now = hrt_absolute_time();
if (message.timestamp != 0) {
PX4_INFO_RAW("\ttimestamp: %" PRIu64 " (%.6f seconds ago)\n", message.timestamp, (now - message.timestamp) / 1e6);
} else {
PX4_INFO_RAW("\n");
}
PX4_INFO_RAW("\tlen: %u\n", message.len);
PX4_INFO_RAW("\tdata: [%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u]\n", message.data[0], message.data[1], message.data[2], message.data[3], message.data[4], message.data[5], message.data[6], message.data[7], message.data[8], message.data[9], message.data[10], message.data[11], message.data[12], message.data[13], message.data[14], message.data[15], message.data[16], message.data[17], message.data[18], message.data[19], message.data[20], message.data[21], message.data[22], message.data[23], message.data[24], message.data[25], message.data[26], message.data[27], message.data[28], message.data[29], message.data[30], message.data[31], message.data[32], message.data[33], message.data[34], message.data[35], message.data[36], message.data[37], message.data[38], message.data[39], message.data[40], message.data[41], message.data[42], message.data[43], message.data[44], message.data[45], message.data[46], message.data[47], message.data[48], message.data[49], message.data[50], message.data[51], message.data[52], message.data[53], message.data[54], message.data[55], message.data[56], message.data[57], message.data[58], message.data[59], message.data[60], message.data[61], message.data[62], message.data[63], message.data[64], message.data[65], message.data[66], message.data[67], message.data[68], message.data[69], message.data[70], message.data[71], message.data[72], message.data[73], message.data[74], message.data[75], message.data[76], message.data[77], message.data[78]);
}
| [
"rohanpn@umich.edu"
] | rohanpn@umich.edu |
6be1fda739e9e40e3d18a6545069dad08d56a5e7 | b11f99ad53b2f9392464b44dda12f91f4cda4206 | /src/BasisPolynomial.cpp | 67ceefd9bb5f886bd5202f1afa149d5c749ac512 | [
"MIT"
] | permissive | junaidrahim/program-homework-solver | 6a2a6f4f841bfdbfc256157c951ab6f64ede1534 | aa4d49006fc74b8df81944444e61f56a86594304 | refs/heads/master | 2021-06-27T11:15:09.883884 | 2019-06-22T10:48:37 | 2019-06-22T10:48:37 | 148,015,797 | 8 | 2 | MIT | 2020-10-02T06:41:11 | 2018-09-09T10:43:19 | C++ | UTF-8 | C++ | false | false | 1,084 | cpp | //
// Created by junaidrahim on 9/9/18.
//
#include "../include/BasisPolynomial.h"
/*
what this class does is it takes the x values as input in the constructor and then returns all the basis polynomials in the as a `vector<poly>`
Read more about it in /include/readme.md file
*/
BasisPolynomial::BasisPolynomial(vector<int> data) { // constructor
BasisPolynomial::data_points = data;
}
vector<poly> BasisPolynomial::get_all_basis_polynomials() {
vector<poly> b_polynomials;
int data_points_size = BasisPolynomial::data_points.size();
for(int j=0; j<data_points_size; j++){
poly p;
for(int m=0; m<data_points_size; m++){
if(m==j){ continue; } // according to definition
else {
string num = "x" + to_string(-data_points[m]); // eg => "x-4"
int den = data_points[j] - data_points[m]; // denominator
p.add_to_numerator(num); // appending
p.add_to_denominator(den);
}
}
b_polynomials.push_back(p);
}
return b_polynomials;
}
| [
"junaidrahim8d@gmail.com"
] | junaidrahim8d@gmail.com |
ee18cf299ff6df391ce367e2784b18de5444dbbb | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /third_party/blink/renderer/bindings/core/v8/v8_extras_test_utils.cc | 16a021bdf2a5dab821f9e4d2af912dac13699dc7 | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | C++ | false | false | 1,813 | cc | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/bindings/core/v8/v8_extras_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
namespace blink {
TryCatchScope::TryCatchScope(v8::Isolate* isolate) : trycatch_(isolate) {}
TryCatchScope::~TryCatchScope() {
EXPECT_FALSE(trycatch_.HasCaught());
}
ScriptValue Eval(V8TestingScope* scope, const char* script_as_string) {
v8::Local<v8::String> source;
v8::Local<v8::Script> script;
v8::MicrotasksScope microtasks(scope->GetIsolate(),
v8::MicrotasksScope::kDoNotRunMicrotasks);
// TODO(ricea): Can this actually fail? Should it be a DCHECK?
if (!v8::String::NewFromUtf8(scope->GetIsolate(), script_as_string,
v8::NewStringType::kNormal)
.ToLocal(&source)) {
ADD_FAILURE();
return ScriptValue();
}
if (!v8::Script::Compile(scope->GetContext(), source).ToLocal(&script)) {
ADD_FAILURE() << "Compilation fails";
return ScriptValue();
}
return ScriptValue(scope->GetIsolate(), script->Run(scope->GetContext()));
}
ScriptValue EvalWithPrintingError(V8TestingScope* scope, const char* script) {
v8::TryCatch block(scope->GetIsolate());
ScriptValue r = Eval(scope, script);
if (block.HasCaught()) {
ADD_FAILURE() << ToCoreString(
block.Exception()->ToString(scope->GetContext()).ToLocalChecked());
block.ReThrow();
}
return r;
}
} // namespace blink
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
0830d60bec7e10ad0034dce7904c9eab685a69c3 | e3ec5d56e4e988cc0921d255325227bab73cf86c | /projects/CUDA-Engine/source/ScreenTexture.h | 85dec7cc093d3f15d0ff0a229aa213a5aea9531b | [] | no_license | nuno-tiago-reis/ray-tracer | f2bf3670a66a8868f35a4730cd5691b46e7a0923 | e77a064c17d5beecae77e7e263222f296a41a88c | refs/heads/master | 2021-09-06T22:39:25.639969 | 2018-02-12T17:50:57 | 2018-02-12T17:51:01 | 85,834,609 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,251 | h | #ifndef SCREEN_TEXTURE_H
#define SCREEN_TEXTURE_H
#ifdef MEMORY_LEAK
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif
/* OpenGL definitions */
#include "GL/glew.h"
#include "GL/glut.h"
/* CUDA definitions */
#include "cuda.h"
#include "cuda_runtime.h"
#include "cuda_gl_interop.h"
/* Texture Library */
#include "soil.h"
/* C++ Includes */
#include <string>
/* Error Check */
#include "Utility.h"
class ScreenTexture {
protected:
/* Texture Name */
string name;
/* OpenGL Texture Handler */
unsigned int handler;
/* Texture Dimensions */
unsigned int width;
unsigned int height;
public:
/* Constructors & Destructors */
ScreenTexture(string name, unsigned int width, unsigned int height);
~ScreenTexture();
/* Loading Methods */
void createTexture();
void deleteTexture();
/* Getters */
string getName();
unsigned int getHandler();
unsigned int getWidth();
unsigned int getHeight();
/* Setters */
void setName(string name);
void setHandler(unsigned int handler);
void setWidth(unsigned int width);
void setHeight(unsigned int height);
/* Debug Methods */
void dump();
};
#endif | [
"g_tiago_1991@hotmail.com"
] | g_tiago_1991@hotmail.com |
7bcc8318b20e8f575e6eeab925d0d15f0c0824b7 | 1668d6717c90d5607939c342840761ad04a352fb | /src/8_motion.cpp | a1c6a3da827139b9289a9eca1c0fdf7ebee4bdce | [] | no_license | daivikswarup/swarm | b8c46a93194a17e75ab93de646d879164b88bee3 | 94bdd806ad08bb8ad1a0c9b93fdc69866d292cbe | refs/heads/master | 2016-09-05T14:49:07.329914 | 2015-04-13T16:53:51 | 2015-04-13T16:53:51 | 31,668,186 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,086 | cpp | #include "ros/ros.h"
#include <math.h>
#include "geometry_msgs/Twist.h"
#include "std_msgs/String.h"
#include "gazebo_msgs/ModelState.h"
#include <gazebo_msgs/GetModelState.h>
#include <gazebo_msgs/GetWorldProperties.h>
#define desx 0
#define desy 0
#define cordx getmodelstate.response.pose.position.x-desx
#define cordy getmodelstate.response.pose.position.y-desy
/**
* To execute an 8 motion. The parameters v and w can be taken from the command line.
*/
int signbit(double x)
{
if(x>=0)
return 0;
else
return 1;
}
double abs(double x)
{
if(x>=0)
return x;
return -x;
}
int main(int argc, char **argv)
{
std::string name;
double v,w;
ros::init(argc, argv, "SwarmSimu");
//TO ACCEPT PARAMETERS FROM THE COMMAND LINE
ros::NodeHandle private_node_handle_("~");
private_node_handle_.param("name", name, std::string("swarmbot0"));
private_node_handle_.param("v", v, double(1));//DEFAULT v=1
private_node_handle_.param("w", w, double(1));//DEFAULT w=1
//DECLARING CLIENT AND PUBLISHER
ros::NodeHandle n;
ros::ServiceClient client = n.serviceClient<gazebo_msgs::GetWorldProperties>("/gazebo/get_world_properties");
gazebo_msgs::GetWorldProperties prop;
ros::Publisher vel_pub_0 = n.advertise<geometry_msgs::Twist>("/swarmbot0/cmd_vel", 1);
std::string s=name;
ros::ServiceClient serv_client = n.serviceClient<gazebo_msgs::GetModelState>("/gazebo/get_model_state");
gazebo_msgs::GetModelState getmodelstate;
gazebo_msgs::ModelState modelstate;
ros::Rate loop_rate(5);
int count = 0;
geometry_msgs::Twist cmd_vel;
getmodelstate.request.model_name=s;//ENABLES serv_client.call() TO FETCH THE CORRECT MODEL DATA.
//1ST LOOP
cmd_vel.linear.x = v;
cmd_vel.linear.y = 0;
cmd_vel.linear.z = 0;
cmd_vel.angular.x = 0;
cmd_vel.angular.y = 0;
cmd_vel.angular.z = -w;
vel_pub_0.publish(cmd_vel);
serv_client.call(getmodelstate);
ROS_INFO("Loop#1");
count=0;
int flag=0;
while(ros::ok())
{
if(getmodelstate.response.pose.orientation.w<-0.99)//CHECK IF 1 LOOP IS COMPLETED
{
break;
}
serv_client.call(getmodelstate);
ROS_INFO("%lf %lf %lf",cordx,cordy,getmodelstate.response.pose.orientation.w);
vel_pub_0.publish(cmd_vel);//NOT NESSECARY
ros::spinOnce();
loop_rate.sleep();
++count;
}
//LOOP 2
cmd_vel.linear.x = v;
cmd_vel.linear.y = 0;
cmd_vel.linear.z = 0;
cmd_vel.angular.x = 0;
cmd_vel.angular.y = 0;
cmd_vel.angular.z = w;
vel_pub_0.publish(cmd_vel);
serv_client.call(getmodelstate);
ROS_INFO("Loop#2");
count=0;
while(ros::ok())
{
if(getmodelstate.response.pose.orientation.w>0.99)
{
break;
}
serv_client.call(getmodelstate);
vel_pub_0.publish(cmd_vel);
ROS_INFO("%lf %lf %lf",cordx,cordy,getmodelstate.response.pose.orientation.w);
ros::spinOnce();
loop_rate.sleep();
++count;
}
//STOP THE BOT
cmd_vel.linear.x = 0;
cmd_vel.linear.y = 0;
cmd_vel.linear.z = 0;
cmd_vel.angular.x = 0;
cmd_vel.angular.y = 0;
cmd_vel.angular.z = 0;
vel_pub_0.publish(cmd_vel);
return 0;
}
| [
"daivik.the.great@gmail.com"
] | daivik.the.great@gmail.com |
235c9191241d1078fb642599d48a88ff79c3bf90 | 60bb67415a192d0c421719de7822c1819d5ba7ac | /blazetest/src/mathtest/dvecdvecadd/V2aV2a.cpp | 8d488926ae96a140762c39eac6e5d95fcfa0f83b | [
"BSD-3-Clause"
] | permissive | rtohid/blaze | 48decd51395d912730add9bc0d19e617ecae8624 | 7852d9e22aeb89b907cb878c28d6ca75e5528431 | refs/heads/master | 2020-04-16T16:48:03.915504 | 2018-12-19T20:29:42 | 2018-12-19T20:29:42 | 165,750,036 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,521 | cpp | //=================================================================================================
/*!
// \file src/mathtest/dvecdvecadd/V2aV2a.cpp
// \brief Source file for the V2aV2a dense vector/dense vector addition math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// This file is part of the Blaze library. You can redistribute it and/or modify it under
// the terms of the New (Revised) BSD License. Redistribution and use in source and binary
// forms, with or without modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other materials
// provided with the distribution.
// 3. Neither the names of the Blaze development group nor the names of its contributors
// may be used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
// SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
*/
//=================================================================================================
//*************************************************************************************************
// Includes
//*************************************************************************************************
#include <cstdlib>
#include <iostream>
#include <blaze/math/StaticVector.h>
#include <blazetest/mathtest/Creator.h>
#include <blazetest/mathtest/dvecdvecadd/OperationTest.h>
#include <blazetest/system/MathTest.h>
//=================================================================================================
//
// MAIN FUNCTION
//
//=================================================================================================
//*************************************************************************************************
int main()
{
std::cout << " Running 'V2aV2a'..." << std::endl;
using blazetest::mathtest::TypeA;
try
{
// Vector type definitions
using V2a = blaze::StaticVector<TypeA,2UL>;
// Creator type definitions
using CV2a = blazetest::Creator<V2a>;
// Running the tests
RUN_DVECDVECADD_OPERATION_TEST( CV2a(), CV2a() );
}
catch( std::exception& ex ) {
std::cerr << "\n\n ERROR DETECTED during dense vector/dense vector addition:\n"
<< ex.what() << "\n";
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
//*************************************************************************************************
| [
"klaus.iglberger@gmail.com"
] | klaus.iglberger@gmail.com |
b18fd4935fea0bcaacdd829a0f404be051af348d | edd2b0f00389c3910997501864436b793a7b0730 | /ch10/exec10_30.cpp | 4fcc48dd27be45f4819c0e6740324c45d4c33dfc | [] | no_license | hys2015/CppPrimer5thExerciseAnswers | 6fafe04c57111bbe8d833c0cdbc92f2602f4450b | a9ef88c6d5baa0b345d780a6156c4d02e888e2e5 | refs/heads/master | 2020-07-07T02:04:43.547304 | 2017-09-02T07:31:46 | 2017-09-02T07:31:46 | 67,513,173 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 491 | cpp | #include <iostream>
#include <iterator>
#include <algorithm>
#include <vector>
int main()
{
std::cout << "enter integers ctrl+z to end: " << std::endl;
std::istream_iterator<int> in_it(std::cin), eof;
std::vector<int> vec(in_it, eof);
std::sort(vec.begin(), vec.end());
std::ostream_iterator<int> out_it(std::cout, " ");
std::cout << "***OUT***" << std::endl;
std::copy(vec.begin(), vec.end(), out_it);
std::cout << std::endl;
return 0;
} | [
"markheng2014@gmail.com"
] | markheng2014@gmail.com |
3fa6b1d42a1e835f92cc3c99ccf80161f4786415 | b804aefdfef21cc56b786036112425136c7cdb77 | /CF.STL_Containers_Queue/queues.cpp | ca4b082e51f2e2363a6060e3cdde3bc943319f4e | [] | no_license | alansam/CF.STL_Containers_Queue | 52211d33972540b1654f39b8681c1a25962db58b | 4f2911cf966753b8e486d0eba1024eb0c4fa110c | refs/heads/main | 2023-04-14T13:52:28.423632 | 2021-04-15T23:55:24 | 2021-04-15T23:55:24 | 358,423,721 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,616 | cpp | //
// queues.cpp
// CF.STL_Containers_Queue
//
// Created by Alan Sampson on 4/10/21.
//
#include <iostream>
#include <iomanip>
#include <string>
#include <string_view>
#include <algorithm>
#include <numeric>
#include <compare>
#include <memory>
#include <type_traits>
#include <queue>
#include <deque>
#include <array>
#include <map>
#include <vector>
#include <stdexcept>
#include <cassert>
#include <cstddef>
using namespace std::literals::string_literals;
using namespace std::literals::string_view_literals;
// MARK: - Definitions
// MARK: - Local Constants.
// ....+....!....+....!....+....!....+....!....+....!....+....!....+....!....+....!
// MARK: namespace konst
namespace konst {
auto delimiter(char const dc = '-', size_t sl = 80) -> std::string const {
auto const dlm = std::string(sl, dc);
return dlm;
}
static
auto const dlm = delimiter();
static
auto const dot = delimiter('.');
} /* namespace konst */
#if (__cplusplus > 201707L)
#endif /* (__cplusplus > 201707L) */
// MARK: - Function Prototype.
auto C_queue(int argc, char const * argv[]) -> decltype(argc);
auto C_queue_deduction_guides(int argc, char const * argv[]) -> decltype(argc);
// MARK: - Implementation.
// ....+....!....+....!....+....!....+....!....+....!....+....!....+....!....+....!
/*
* MARK: main()
*/
int main(int argc, char const * argv[]) {
std::cout << "CF.STL_Containers_Queue\n"sv;
std::cout << "C++ Version: "s << __cplusplus << std::endl;
std::cout << '\n' << konst::dlm << std::endl;
C_queue(argc, argv);
std::cout << '\n' << konst::dlm << std::endl;
C_queue_deduction_guides(argc, argv);
return 0;
}
// MARK: - C_queue
// ....+....!....+....!....+....!....+....!....+....!....+....!....+....!....+....!
// ================================================================================
// ....+....!....+....!....+....!....+....!....+....!....+....!....+....!....+....!
/*
* MARK: C_queue()
*/
auto C_queue(int argc, char const * argv[]) -> decltype(argc) {
std::cout << "In "s << __func__ << std::endl;
/// Member functions
// ....+....!....+....!....+....!....+....!....+....!....+....!
std::cout << konst::dot << '\n';
std::cout << "std::queue - constructor"s << '\n';
{
std::queue<int> c1;
c1.push(5);
std::cout << c1.size() << '\n';
std::queue<int> c2(c1);
std::cout << c2.size() << '\n';
std::deque<int> deq { 3, 1, 4, 1, 5, };
std::queue<int> c3(deq);
std::cout << c3.size() << '\n';
std::cout << '\n';
};
/// Element access
// ....+....!....+....!....+....!....+....!....+....!....+....!
std::cout << konst::dot << '\n';
std::cout << "std::queue - first, last"s << '\n';
{
auto prime = std::deque { 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', };
auto que = std::queue(prime);
auto trigger { 0ul };
while (!que.empty()) {
auto qval = (trigger++ % 2 == 0) ? que.front() : que.back();
std::cout << qval << ' ';
que.pop();
}
std::cout << '\n';
std::cout << '\n';
};
/// Capacity
// ....+....!....+....!....+....!....+....!....+....!....+....!
std::cout << konst::dot << '\n';
std::cout << "std::queue - empty"s << '\n';
{
std::cout << std::boolalpha;
std::queue<int> container;
std::cout << "Initially, container.empty(): "s
<< container.empty() << '\n';
container.push(42);
std::cout << "After adding elements, container.empty(): "s
<< container.empty() << '\n';
container.pop();
std::cout << "Initially, container.size(): "s
<< container.size() << '\n';
for (int i_ = 0; i_ < 7; ++i_) {
container.push(i_);
}
std::cout << "After adding elements, container.size(): "s
<< container.size() << '\n';
std::cout << std::noboolalpha;
std::cout << '\n';
};
/// Modifiers
// ....+....!....+....!....+....!....+....!....+....!....+....!
std::cout << konst::dot << '\n';
std::cout << "std::queue - swap"s << '\n';
{
std::queue<int> qi1;
std::queue<int> qi2;
auto show = [](auto collection) {
while (!collection.empty()) {
auto nr = collection.front();
collection.pop();
std::cout << std::setw(2) << nr;
}
};
for (auto x_ : { 0, 1, 2, }) {
qi1.push(x_);
}
show(qi1);
std::cout << '\n';
for (auto x_ : { 3, 4, 5, 6, }) {
qi2.push(x_);
}
show(qi2);
std::cout << '\n';
std::cout << "qi1 size="sv << qi1.size() << '\n'
<< "qi2 size="sv << qi2.size() << '\n';
qi1.swap(qi2);
show(qi1);
std::cout << '\n';
show(qi2);
std::cout << '\n';
std::cout << "qi1 size="sv << qi1.size() << '\n'
<< "qi2 size="sv << qi2.size() << '\n';
std::cout << '\n';
};
std::cout << std::endl; // make sure cout is flushed.
return 0;
}
// MARK: - C_queue_deduction_guides
// ....+....!....+....!....+....!....+....!....+....!....+....!....+....!....+....!
// ================================================================================
// ....+....!....+....!....+....!....+....!....+....!....+....!....+....!....+....!
/*
* MARK: C_queue_deduction_guides()
*/
auto C_queue_deduction_guides(int argc, char const * argv[]) -> decltype(argc) {
std::cout << "In "s << __func__ << std::endl;
// ....+....!....+....!....+....!....+....!....+....!....+....!
std::cout << konst::dot << '\n';
std::cout << "std::queue = deduction guides"s << '\n';
{
std::cout << '\n';
};
std::cout << std::endl; // make sure cout is flushed.
return 0;
}
| [
"alansamps@gmail.com"
] | alansamps@gmail.com |
60edcb7a8744e98c7726bccd4af717bb512625e6 | 734709fa2df456f70ef1882aedde14b59997a958 | /src/views/playback/LPlaybackWidget.h | 1fe93f24bc01d55016c5336d103c7f7c478bb1af | [
"MIT",
"Apache-2.0"
] | permissive | wuwuzhazha/Lobster | a3d90f5db2d5ac4a2a4076acc5e857548af5343f | ceb5ec720fdbbd5eddba5eeccc2f875a62d4332e | refs/heads/main | 2023-05-28T01:56:27.686014 | 2021-06-08T09:41:04 | 2021-06-08T09:41:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,409 | h | #ifndef LPLAYBACKWIDGET_H
#define LPLAYBACKWIDGET_H
#include <QWidget>
#include <QMap>
#include <QThread>
#include <QMenu>
#include "LPlaybackWidgetTableItem.h"
#include "LLogFileParser.h"
namespace Ui {
class LPlaybackWidget;
}
class LPlaybackWidget : public QWidget
{
Q_OBJECT
public:
explicit LPlaybackWidget(QWidget *parent = nullptr);
~LPlaybackWidget();
signals:
void sendFileToParse(QString filePath);
private slots:
void receiveCurveColorChangedByItem(QString name);
void receiveDataValue(QString name, LDataValue value);
void receiveErrors(QString errorMessage);
void receiveNames(QStringList valueNames);
void receiveProcessFinished();
void receiveProcessPercent(int percent);
void handleCustomContextMenu(const QPoint &pos);
void handleMergeValueAxis();
void handleDemergeValueAxis();
void on_browseButton_clicked();
void on_loadButton_clicked();
void on_tableWidget_cellClicked(int row, int column);
private:
Ui::LPlaybackWidget *ui;
unsigned int m_uRowCount;
qint64 m_iScopeStartTime;
qreal m_dMaxX;
qreal m_dMinY;
qreal m_dMaxY;
QString m_strSelectedName;
QMap<QString, LPlaybackWidgetTableItem*> m_mapItems; //!< a map of all items shown
QMenu *m_pNameContextMenu;
QThread *m_pParserThread;
LLogFileParser m_logFileParser;
};
#endif // LPLAYBACKWIDGET_H
| [
"caizhuping@glbpower.com"
] | caizhuping@glbpower.com |
a87c8a3e549b3817d8a4514a481a1cebbc52475c | 650b45dc73f6e11db663c58e71bbf1c3da3ddb8c | /libvast/vast/concept/parseable/vast/address.hpp | aedcbc41389cf5b915f815bc8d3a090d83203ebe | [
"BSD-3-Clause"
] | permissive | sbilly/vast | 82e4d5a16e6c6bc40d1d19a4f7b1b1f7dea17645 | 9c39ac2edd0acd36c501805b55951704d42a938e | refs/heads/master | 2021-01-17T23:45:39.633710 | 2016-04-22T02:22:29 | 2016-04-22T02:22:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,337 | hpp | #ifndef VAST_CONCEPT_PARSEABLE_VAST_ADDRESS_HPP
#define VAST_CONCEPT_PARSEABLE_VAST_ADDRESS_HPP
#include <cstring>
#include <arpa/inet.h> // inet_pton
#include <sys/socket.h> // AF_INET*
#include "vast/access.hpp"
#include "vast/address.hpp"
#include "vast/util/assert.hpp"
#include "vast/concept/parseable/core.hpp"
#include "vast/concept/parseable/numeric/integral.hpp"
#include "vast/concept/parseable/string/char_class.hpp"
namespace vast {
/// An IP address parser which accepts addresses according to [SIP IPv6
/// ABNF](http://tools.ietf.org/html/draft-ietf-sip-ipv6-abnf-fix-05).
/// This IETF draft defines the grammar as follows:
///
/// IPv6address = 6( h16 ":" ) ls32
/// / "::" 5( h16 ":" ) ls32
/// / [ h16 ] "::" 4( h16 ":" ) ls32
/// / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
/// / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
/// / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
/// / [ *4( h16 ":" ) h16 ] "::" ls32
/// / [ *5( h16 ":" ) h16 ] "::" h16
/// / [ *6( h16 ":" ) h16 ] "::"
///
/// h16 = 1*4HEXDIG
/// ls32 = ( h16 ":" h16 ) / IPv4address
/// IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
/// dec-octet = DIGIT ; 0-9
/// / %x31-39 DIGIT ; 10-99
/// / "1" 2DIGIT ; 100-199
/// / "2" %x30-34 DIGIT ; 200-249
/// / "25" %x30-35 ; 250-255
struct address_parser : vast::parser<address_parser> {
using attribute = address;
static auto make_v4() {
using namespace parsers;
auto dec
= integral_parser<uint16_t, 3, 1>{}.with([](auto i) { return i < 256; });
;
auto v4
= dec >> '.' >> dec >> '.' >> dec >> '.' >> dec
;
return v4;
}
static auto make_v6() {
using namespace parsers;
auto h16
= rep<1, 4>(xdigit)
;
// Matches a 1-4 hex digits followed by a *single* colon. If we did not have
// this parser, the input "f00::" would not be detected correctly, since a
// rule of the form
//
// -(repeat<0, *>{h16 >> ':'} >> h16) >> "::"
//
// already consumes the input "f00:" after the first repitition parser, thus
// erroneously leaving only ":" for next rule `>> h16` to consume.
auto h16_colon
= h16 >> ':' >> ! ':'_p
;
auto ls32
= h16 >> ':' >> h16
| make_v4();
;
auto v6
= rep<6>(h16 >> ':') >> ls32
| "::" >> rep<5>(h16 >> ':') >> ls32
| -( h16) >> "::" >> rep<4>(h16 >> ':') >> ls32
| -(rep<0, 1>(h16_colon) >> h16) >> "::" >> rep<3>(h16 >> ':') >> ls32
| -(rep<0, 2>(h16_colon) >> h16) >> "::" >> rep<2>(h16 >> ':') >> ls32
| -(rep<0, 3>(h16_colon) >> h16) >> "::" >> h16 >> ':' >> ls32
| -(rep<0, 4>(h16_colon) >> h16) >> "::" >> ls32
| -(rep<0, 5>(h16_colon) >> h16) >> "::" >> h16
| -(rep<0, 6>(h16_colon) >> h16) >> "::"
;
return v6;
}
template <typename Iterator>
bool parse(Iterator& f, Iterator const& l, unused_type) const {
static auto v4 = make_v4();
static auto v6 = make_v6();
if (v4.parse(f, l, unused))
return true;
if (v6.parse(f, l, unused))
return true;
return false;
}
};
template <>
struct access::parser<address> : vast::parser<access::parser<address>> {
using attribute = address;
template <typename Iterator>
bool parse(Iterator& f, Iterator const& l, unused_type) const {
static auto const p = address_parser{};
return p.parse(f, l, unused);
}
template <typename Iterator>
bool parse(Iterator& f, Iterator const& l, address& a) const {
static auto const v4 = address_parser::make_v4();
auto a4 = std::tie(a.bytes_[12], a.bytes_[13], a.bytes_[14], a.bytes_[15]);
auto begin = f;
if (v4.parse(f, l, a4)) {
std::copy(address::v4_mapped_prefix.begin(),
address::v4_mapped_prefix.end(), a.bytes_.begin());
return true;
}
static auto const v6 = address_parser::make_v6();
if (v6.parse(f, l, unused)) {
// We still need to enhance the parseable concept with a few more tools
// so that we can transparently parse into 16-byte sequence. Until
// then, we rely on inet_pton. Unfortunately this incurs an extra copy
// because inet_pton needs a NUL-terminated string of the address *only*,
// i.e., it does not work when other characters follow the address.
char buf[INET6_ADDRSTRLEN];
std::memset(buf, 0, sizeof(buf));
VAST_ASSERT(f - begin < INET6_ADDRSTRLEN);
std::copy(begin, f, buf);
return ::inet_pton(AF_INET6, buf, &a.bytes_) == 1;
}
return false;
}
};
template <>
struct parser_registry<address> {
using type = access::parser<address>;
};
namespace parsers {
static auto const addr = make_parser<vast::address>();
} // namespace parsers
} // namespace vast
#endif
| [
"vallentin@icir.org"
] | vallentin@icir.org |
1c97c522b088058e3ca53bb4baab084c98fc9cba | 7d4e986704942d95ad06a2684439fa4cfcff950b | /vendor/mediatek/proprietary/system/core/xflash/xflash-lib/logic/connection.h | bc18dfdbfb7e1ee4cf2c9faf0f834d43983cde84 | [] | no_license | carlitros900/96Boards_mediatek-x20-sla-16.10 | 55c16062f7df3a7a25a13226e63c5fa4ccd4ff65 | 4f98957401249499f19102691a6e3ce13fe47d42 | refs/heads/master | 2021-01-04T01:26:47.443633 | 2020-02-13T17:53:31 | 2020-02-13T17:53:31 | 240,322,130 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,163 | h | #pragma once
#include "xflash_struct.h"
#include "common/common_include.h"
#include <boost/thread/recursive_mutex.hpp>
class connection
{
public:
connection(void);
~connection(void);
public:
static HSESSION create_session(HSESSION prefer = INVALID_HSESSION_VALUE);
static status_t destroy_session(HSESSION hs);
static status_t connect_brom(HSESSION hs, string port_name, string auth, string cert);
static status_t download_loader(HSESSION hs,
string preloader_name);
static status_t connect_loader(HSESSION hs, string port_name);
static status_t skip_loader_stage(HSESSION hs);
static status_t waitfor_com(char8** filter, uint32 count, STD_::string& port_name);
static status_t device_control(HSESSION hs,
uint32 ctrl_code,
void* inbuffer,
uint32 inbuffer_size,
void* outbuffer,
uint32 outbuffer_size,
uint32* bytes_returned);
private:
static boost::recursive_mutex com_mtx;
};
| [
"carlitros900@gmail.com"
] | carlitros900@gmail.com |
a398cea23f257cc029fc158a78a17da9127396ed | f987adbe43b00477f2d438f4995fad5461c12d51 | /Shared/UIThemeFile.cpp | 1e1350dddb793e4ef285bee9755cf5a83211e39a | [] | no_license | thaobktin/CnCPP | bbd1d04c6fc9b707616888068642b937ed62ba95 | 212c0cc03cb7e4bda6a5bbc2e61dd449257f1622 | refs/heads/master | 2021-04-26T23:13:58.422298 | 2018-03-05T17:27:09 | 2018-03-05T17:27:09 | 123,951,323 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,779 | cpp | // UIThemeFile.cpp: implementation of the CUIThemeFile class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "UIThemeFile.h"
#include "xmlfile.h"
#include "filemisc.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
CUIThemeFile::UITOOLBAR::UITOOLBAR(LPCTSTR szFile, COLORREF crTrans)
:
sToolbarImageFile(szFile), crToolbarTransparency(crTrans)
{
}
BOOL CUIThemeFile::UITOOLBAR::operator== (const UITOOLBAR& uitb) const
{
return ((crToolbarTransparency == uitb.crToolbarTransparency) &&
FileMisc::IsSameFile(sToolbarImageFile, uitb.sToolbarImageFile));
}
BOOL CUIThemeFile::UITOOLBAR::operator!= (const UITOOLBAR& uitb) const
{
return !(*this == uitb);
}
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CUIThemeFile::CUIThemeFile()
{
Reset();
}
CUIThemeFile::CUIThemeFile(const CUIThemeFile& theme)
{
*this = theme;
}
CUIThemeFile::~CUIThemeFile()
{
}
CUIThemeFile& CUIThemeFile::operator=(const CUIThemeFile& theme)
{
nRenderStyle = theme.nRenderStyle;
crAppBackDark = theme.crAppBackDark;
crAppBackLight = theme.crAppBackLight;
crAppLinesDark = theme.crAppLinesDark;
crAppLinesLight = theme.crAppLinesLight;
crAppText = theme.crAppText;
crMenuBack = theme.crMenuBack;
crToolbarDark = theme.crToolbarDark;
crToolbarLight = theme.crToolbarLight;
crStatusBarDark = theme.crStatusBarDark;
crStatusBarLight = theme.crStatusBarLight;
crStatusBarText = theme.crStatusBarText;
// toolbars
m_mapToolbars.RemoveAll();
POSITION pos = theme.m_mapToolbars.GetStartPosition();
CString sKey;
UITOOLBAR uitb;
while (pos)
{
theme.m_mapToolbars.GetNextAssoc(pos, sKey, uitb);
m_mapToolbars[sKey] = uitb;
}
return *this;
}
BOOL CUIThemeFile::operator== (const CUIThemeFile& theme) const
{
// test colors first
if ((nRenderStyle != theme.nRenderStyle) ||
(crAppBackDark != theme.crAppBackDark) ||
(crAppBackLight != theme.crAppBackLight) ||
(crAppLinesDark != theme.crAppLinesDark) ||
(crAppLinesLight != theme.crAppLinesLight) ||
(crAppText != theme.crAppText) ||
(crMenuBack != theme.crMenuBack) ||
(crToolbarDark != theme.crToolbarDark) ||
(crToolbarLight != theme.crToolbarLight) ||
(crStatusBarDark != theme.crStatusBarDark) ||
(crStatusBarLight != theme.crStatusBarLight) ||
(crStatusBarText != theme.crStatusBarText))
{
return FALSE;
}
// then toolbars
if (m_mapToolbars.GetCount() != theme.m_mapToolbars.GetCount())
return FALSE;
POSITION pos = m_mapToolbars.GetStartPosition();
CString sKey;
UITOOLBAR uitb, uitbOther;
while (pos)
{
m_mapToolbars.GetNextAssoc(pos, sKey, uitb);
if (!theme.m_mapToolbars.Lookup(sKey, uitbOther) || (uitb != uitbOther))
return FALSE;
}
// all good
return TRUE;
}
BOOL CUIThemeFile::operator!= (const CUIThemeFile& theme) const
{
return !(*this == theme);
}
BOOL CUIThemeFile::LoadThemeFile(LPCTSTR szThemeFile)
{
CXmlFile xiFile;
if (!xiFile.Load(szThemeFile, _T("TODOLIST")))
return FALSE;
const CXmlItem* pXITheme = xiFile.GetItem(_T("UITHEME"));
if (!pXITheme)
return FALSE;
// else
Reset();
nRenderStyle = GetRenderStyle(pXITheme);
crAppBackDark = GetColor(pXITheme, _T("APPBACKDARK"));
crAppBackLight = GetColor(pXITheme, _T("APPBACKLIGHT"));
crAppLinesDark = GetColor(pXITheme, _T("APPLINESDARK"), COLOR_3DSHADOW);
crAppLinesLight = GetColor(pXITheme, _T("APPLINESLIGHT"), COLOR_3DHIGHLIGHT);
crAppText = GetColor(pXITheme, _T("APPTEXT"), COLOR_WINDOWTEXT);
crMenuBack = GetColor(pXITheme, _T("MENUBACK"), COLOR_3DFACE);
crToolbarDark = GetColor(pXITheme, _T("TOOLBARDARK"));
crToolbarLight = GetColor(pXITheme, _T("TOOLBARLIGHT"));
crStatusBarDark = GetColor(pXITheme, _T("STATUSBARDARK"));
crStatusBarLight = GetColor(pXITheme, _T("STATUSBARLIGHT"));
crStatusBarText = GetColor(pXITheme, _T("STATUSBARTEXT"), COLOR_WINDOWTEXT);
// toolbars
CString sFolder = FileMisc::GetFolderFromFilePath(szThemeFile);
const CXmlItem* pTBImage = pXITheme->GetItem(_T("TOOLBARIMAGES"));
if (pTBImage)
{
while (pTBImage)
{
CString sKey = pTBImage->GetItemValue(_T("KEY"));
CString sFile = pTBImage->GetItemValue(_T("FILE"));
if (!sKey.IsEmpty() && !sFile.IsEmpty())
{
COLORREF crTrans = GetColor(pTBImage, _T("TRANSPARENCY"));
UITOOLBAR uitb(FileMisc::MakeFullPath(sFile, sFolder), crTrans);
sKey.MakeUpper();
m_mapToolbars[sKey] = uitb;
}
pTBImage = pTBImage->GetSibling();
}
}
else // go looking for the images
{
// look in folder of same name as theme
CString sImageFolder(szThemeFile);
FileMisc::RemoveExtension(sImageFolder);
CStringArray aImages;
int nImage = FileMisc::FindFiles(sImageFolder, aImages, FALSE, _T("*.gif"));
while (nImage--)
{
CString sImageFile = aImages[nImage];
CString sKey = FileMisc::GetFileNameFromPath(sImageFile, FALSE);
sKey.MakeUpper();
m_mapToolbars[sKey] = UITOOLBAR(sImageFile, 255);
}
}
return TRUE;
}
void CUIThemeFile::Reset()
{
Reset(*this);
m_mapToolbars.RemoveAll();
}
void CUIThemeFile::Reset(UITHEME& theme)
{
theme.nRenderStyle = UIRS_GRADIENT;
theme.crAppBackDark = GetSysColor(COLOR_3DFACE);
theme.crAppBackLight = GetSysColor(COLOR_3DFACE);
theme.crAppLinesDark = GetSysColor(COLOR_3DSHADOW);
theme.crAppLinesLight = GetSysColor(COLOR_3DHIGHLIGHT);
theme.crAppText = GetSysColor(COLOR_WINDOWTEXT);
theme.crMenuBack = GetSysColor(COLOR_3DFACE);
theme.crToolbarDark = GetSysColor(COLOR_3DFACE);
theme.crToolbarLight = GetSysColor(COLOR_3DFACE);
theme.crStatusBarDark = GetSysColor(COLOR_3DFACE);
theme.crStatusBarLight = GetSysColor(COLOR_3DFACE);
theme.crStatusBarText = GetSysColor(COLOR_WINDOWTEXT);
theme.szToolbarImage[0] = 0;
theme.crToolbarTransparency = CLR_NONE;
}
COLORREF CUIThemeFile::GetColor(const CXmlItem* pXITheme, LPCTSTR szName, int nColorID)
{
const CXmlItem* pXIColor = pXITheme->GetItem(_T("COLOR"));
while (pXIColor)
{
if (pXIColor->GetItemValue(_T("NAME")).CompareNoCase(szName) == 0)
{
BYTE bRed = (BYTE)pXIColor->GetItemValueI(_T("R"));
BYTE bGreen = (BYTE)pXIColor->GetItemValueI(_T("G"));
BYTE bBlue = (BYTE)pXIColor->GetItemValueI(_T("B"));
return RGB(bRed, bGreen, bBlue);
}
pXIColor = pXIColor->GetSibling();
}
// not found
if (nColorID != -1)
return GetSysColor(nColorID);
// else
return CLR_NONE;
}
UI_RENDER_STYLE CUIThemeFile::GetRenderStyle(const CXmlItem* pXITheme)
{
CString sStyle = pXITheme->GetItemValue(_T("STYLE"));
if (sStyle == _T("GLASS"))
return UIRS_GLASS;
else if (sStyle == _T("GLASSWITHGRADIENT"))
return UIRS_GLASSWITHGRADIENT;
// else
return UIRS_GRADIENT;
}
CString CUIThemeFile::GetToolbarImageFile(LPCTSTR szKey, COLORREF& crTrans) const
{
UITOOLBAR uitb;
CString sKey(szKey);
sKey.MakeUpper();
if (m_mapToolbars.Lookup(sKey, uitb))
{
crTrans = uitb.crToolbarTransparency;
return uitb.sToolbarImageFile;
}
return _T("");
}
CString CUIThemeFile::GetToolbarImageFile(LPCTSTR szKey) const
{
COLORREF crTrans;
return GetToolbarImageFile(szKey, crTrans);
}
BOOL CUIThemeFile::HasToolbarImageFile(LPCTSTR szKey) const
{
return FileMisc::FileExists(GetToolbarImageFile(szKey));
}
BOOL CUIThemeFile::SetToolbarImageFile(LPCTSTR szKey)
{
UITOOLBAR uitb;
CString sKey(szKey);
sKey.MakeUpper();
if (m_mapToolbars.Lookup(sKey, uitb))
{
lstrcpy(szToolbarImage, uitb.sToolbarImageFile);
crToolbarTransparency = uitb.crToolbarTransparency;
return TRUE;
}
// else
szToolbarImage[0] = 0;
crToolbarTransparency = CLR_NONE;
return FALSE;
}
| [
"treviettreviet@gmail.com"
] | treviettreviet@gmail.com |
ef1647393cc1a4025ff040f1bcc1663d23eac4bd | f02f77a8cbddad64ae33481b2d624e1367d88ed7 | /STJ/virtual/SubProcesses/P1_ub_tdg/coef_specs.inc | 0589eb64f54e6a65c8211c64d089fc97815dc63a | [] | no_license | hep-mirrors/POWHEG-BOX-V2-User-Processes | 18ece749256f2fefa561e2524a5144552cb5542d | 33ce3ee7b7b1bbc340618b0e18def5c38b7e3178 | refs/heads/master | 2023-05-31T12:46:45.189691 | 2021-04-30T12:31:45 | 2021-04-30T12:31:45 | 377,273,819 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 34 | inc | ../../Source/DHELAS/coef_specs.inc | [
"carrazza@9e129b38-c2c0-4eec-9301-dc54fda404de"
] | carrazza@9e129b38-c2c0-4eec-9301-dc54fda404de |
8810d4eab43892cbdb363c1610ce16539258256f | 9a506dbc769c87b919371bfb7991639014990ae5 | /funcin friend.cpp | b3a8dca3818d96b2e79ab8f9af527cd99b20344c | [] | no_license | leandro1623/Todos-los-proyectos-que-hice-mientras-aprendia-cpp | 0cedf88d35ae3838aaa308cea8e02c45e6a4ebb6 | ab3a61390316423ca8a30dd1fe29bdeb2be0f0aa | refs/heads/master | 2023-08-29T12:36:55.130015 | 2021-10-09T19:30:11 | 2021-10-09T19:30:11 | 415,401,544 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 285 | cpp | #include<iostream>
#include<iomanip>
class hola{
friend void cambio(hola &,int);
private:
int x=34;
public:
void show(){
std::cout<<std::setw(5)<<x<<"\n";
}
~hola(){
}
};
void cambio(hola &y,int x){
y.x=x;
}
int main(){
hola x;
x.show();
return 0;
} | [
"leandrobritocomtreras17@gmail.com"
] | leandrobritocomtreras17@gmail.com |
c2fbd1a18b40c9cbb84fe79b105ab105e7ac6702 | 5adb34b9ab3303fa1fa3643e0462be33d0207605 | /containers_test/srcs/deque/push_pop_front.cpp | 4bfe928dd29aee33a74865c6a66f95370f605524 | [] | no_license | hyeonski/ft_containers | 3cea2183c087f34b1d6c2c4deebb3976d4524d16 | 217b820fc4e95380b8a42ac801a952f2d1c9d3c7 | refs/heads/master | 2023-06-10T19:50:11.913309 | 2021-07-02T06:31:41 | 2021-07-02T06:31:41 | 374,257,770 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 606 | cpp | #include "common.hpp"
#define TESTED_TYPE std::string
int main(void)
{
TESTED_NAMESPACE::deque<TESTED_TYPE> deq(8);
TESTED_NAMESPACE::deque<TESTED_TYPE> deq2;
TESTED_NAMESPACE::deque<TESTED_TYPE>::iterator it = deq.begin();
for (unsigned long int i = 0; i < deq.size(); ++i)
it[i] = std::string((deq.size() - i), i + 65);
printSize(deq, true);
std::cout << "push_front():\n" << std::endl;
deq.push_front("One long string");
deq2.push_front("Another long string");
printSize(deq);
printSize(deq2);
deq.pop_front();
deq2.pop_front();
printSize(deq);
printSize(deq2);
return (0);
}
| [
"hyeonski@student.42seoul.kr"
] | hyeonski@student.42seoul.kr |
de6e10794c7e8c76781914feb5e530c2434214b6 | 2aad21460b2aa836721bc211ef9b1e7727dcf824 | /3rdparty/OpenCV-2.3.0/modules/gpu/src/opencv2/gpu/device/vecmath.hpp | 2f915f3a917450aac15e0527d20b295fe29331df | [
"BSD-3-Clause"
] | permissive | chazix/frayer | 4b38c9d378ce8b3b50d66d1e90426792b2196e5b | ec0a671bc6df3c5f0fe3a94d07b6748a14a8ba91 | refs/heads/master | 2020-03-16T20:28:34.440698 | 2018-01-09T15:13:03 | 2018-01-09T15:13:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 54,564 | hpp | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_GPU_VECMATH_HPP__
#define __OPENCV_GPU_VECMATH_HPP__
#include "internal_shared.hpp"
#include "saturate_cast.hpp"
namespace cv
{
namespace gpu
{
namespace device
{
template<typename T, int N> struct TypeVec;
template<> struct TypeVec<uchar, 1> { typedef uchar vec_t; };
template<> struct TypeVec<uchar1, 1> { typedef uchar1 vec_t; };
template<> struct TypeVec<uchar, 2> { typedef uchar2 vec_t; };
template<> struct TypeVec<uchar2, 2> { typedef uchar2 vec_t; };
template<> struct TypeVec<uchar, 3> { typedef uchar3 vec_t; };
template<> struct TypeVec<uchar3, 3> { typedef uchar3 vec_t; };
template<> struct TypeVec<uchar, 4> { typedef uchar4 vec_t; };
template<> struct TypeVec<uchar4, 4> { typedef uchar4 vec_t; };
template<> struct TypeVec<char, 1> { typedef char vec_t; };
template<> struct TypeVec<schar, 1> { typedef char vec_t; };
template<> struct TypeVec<char1, 1> { typedef char1 vec_t; };
template<> struct TypeVec<char, 2> { typedef char2 vec_t; };
template<> struct TypeVec<schar, 2> { typedef char2 vec_t; };
template<> struct TypeVec<char2, 2> { typedef char2 vec_t; };
template<> struct TypeVec<char, 3> { typedef char3 vec_t; };
template<> struct TypeVec<schar, 3> { typedef char3 vec_t; };
template<> struct TypeVec<char3, 3> { typedef char3 vec_t; };
template<> struct TypeVec<char, 4> { typedef char4 vec_t; };
template<> struct TypeVec<schar, 4> { typedef char4 vec_t; };
template<> struct TypeVec<char4, 4> { typedef char4 vec_t; };
template<> struct TypeVec<ushort, 1> { typedef ushort vec_t; };
template<> struct TypeVec<ushort1, 1> { typedef ushort1 vec_t; };
template<> struct TypeVec<ushort, 2> { typedef ushort2 vec_t; };
template<> struct TypeVec<ushort2, 2> { typedef ushort2 vec_t; };
template<> struct TypeVec<ushort, 3> { typedef ushort3 vec_t; };
template<> struct TypeVec<ushort3, 3> { typedef ushort3 vec_t; };
template<> struct TypeVec<ushort, 4> { typedef ushort4 vec_t; };
template<> struct TypeVec<ushort4, 4> { typedef ushort4 vec_t; };
template<> struct TypeVec<short, 1> { typedef short vec_t; };
template<> struct TypeVec<short1, 1> { typedef short1 vec_t; };
template<> struct TypeVec<short, 2> { typedef short2 vec_t; };
template<> struct TypeVec<short2, 2> { typedef short2 vec_t; };
template<> struct TypeVec<short, 3> { typedef short3 vec_t; };
template<> struct TypeVec<short3, 3> { typedef short3 vec_t; };
template<> struct TypeVec<short, 4> { typedef short4 vec_t; };
template<> struct TypeVec<short4, 4> { typedef short4 vec_t; };
template<> struct TypeVec<uint, 1> { typedef uint vec_t; };
template<> struct TypeVec<uint1, 1> { typedef uint1 vec_t; };
template<> struct TypeVec<uint, 2> { typedef uint2 vec_t; };
template<> struct TypeVec<uint2, 2> { typedef uint2 vec_t; };
template<> struct TypeVec<uint, 3> { typedef uint3 vec_t; };
template<> struct TypeVec<uint3, 3> { typedef uint3 vec_t; };
template<> struct TypeVec<uint, 4> { typedef uint4 vec_t; };
template<> struct TypeVec<uint4, 4> { typedef uint4 vec_t; };
template<> struct TypeVec<int, 1> { typedef int vec_t; };
template<> struct TypeVec<int1, 1> { typedef int1 vec_t; };
template<> struct TypeVec<int, 2> { typedef int2 vec_t; };
template<> struct TypeVec<int2, 2> { typedef int2 vec_t; };
template<> struct TypeVec<int, 3> { typedef int3 vec_t; };
template<> struct TypeVec<int3, 3> { typedef int3 vec_t; };
template<> struct TypeVec<int, 4> { typedef int4 vec_t; };
template<> struct TypeVec<int4, 4> { typedef int4 vec_t; };
template<> struct TypeVec<float, 1> { typedef float vec_t; };
template<> struct TypeVec<float1, 1> { typedef float1 vec_t; };
template<> struct TypeVec<float, 2> { typedef float2 vec_t; };
template<> struct TypeVec<float2, 2> { typedef float2 vec_t; };
template<> struct TypeVec<float, 3> { typedef float3 vec_t; };
template<> struct TypeVec<float3, 3> { typedef float3 vec_t; };
template<> struct TypeVec<float, 4> { typedef float4 vec_t; };
template<> struct TypeVec<float4, 4> { typedef float4 vec_t; };
template<> struct TypeVec<double, 1> { typedef double vec_t; };
template<> struct TypeVec<double1, 1> { typedef double1 vec_t; };
template<> struct TypeVec<double, 2> { typedef double2 vec_t; };
template<> struct TypeVec<double2, 2> { typedef double2 vec_t; };
template<> struct TypeVec<double, 3> { typedef double3 vec_t; };
template<> struct TypeVec<double3, 3> { typedef double3 vec_t; };
template<> struct TypeVec<double, 4> { typedef double4 vec_t; };
template<> struct TypeVec<double4, 4> { typedef double4 vec_t; };
template<typename T> struct VecTraits;
template<> struct VecTraits<uchar>
{
typedef uchar elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ uchar all(uchar v) {return v;}
static __device__ __forceinline__ __host__ uchar make(uchar x) {return x;}
};
template<> struct VecTraits<uchar1>
{
typedef uchar elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ uchar1 all(uchar v) {return make_uchar1(v);}
static __device__ __forceinline__ __host__ uchar1 make(uchar x) {return make_uchar1(x);}
};
template<> struct VecTraits<uchar2>
{
typedef uchar elem_t;
enum {cn=2};
static __device__ __forceinline__ __host__ uchar2 all(uchar v) {return make_uchar2(v, v);}
static __device__ __forceinline__ __host__ uchar2 make(uchar x, uchar y) {return make_uchar2(x, y);}
};
template<> struct VecTraits<uchar3>
{
typedef uchar elem_t;
enum {cn=3};
static __device__ __forceinline__ __host__ uchar3 all(uchar v) {return make_uchar3(v, v, v);}
static __device__ __forceinline__ __host__ uchar3 make(uchar x, uchar y, uchar z) {return make_uchar3(x, y, z);}
};
template<> struct VecTraits<uchar4>
{
typedef uchar elem_t;
enum {cn=4};
static __device__ __forceinline__ __host__ uchar4 all(uchar v) {return make_uchar4(v, v, v, v);}
static __device__ __forceinline__ __host__ uchar4 make(uchar x, uchar y, uchar z, uchar w) {return make_uchar4(x, y, z, w);}
};
template<> struct VecTraits<char>
{
typedef char elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ char all(char v) {return v;}
static __device__ __forceinline__ __host__ char make(char x) {return x;}
};
template<> struct VecTraits<schar>
{
typedef schar elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ schar all(schar v) {return v;}
static __device__ __forceinline__ __host__ schar make(schar x) {return x;}
};
template<> struct VecTraits<char1>
{
typedef schar elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ char1 all(schar v) {return make_char1(v);}
static __device__ __forceinline__ __host__ char1 make(schar x) {return make_char1(x);}
};
template<> struct VecTraits<char2>
{
typedef schar elem_t;
enum {cn=2};
static __device__ __forceinline__ __host__ char2 all(schar v) {return make_char2(v, v);}
static __device__ __forceinline__ __host__ char2 make(schar x, schar y) {return make_char2(x, y);}
};
template<> struct VecTraits<char3>
{
typedef schar elem_t;
enum {cn=3};
static __device__ __forceinline__ __host__ char3 all(schar v) {return make_char3(v, v, v);}
static __device__ __forceinline__ __host__ char3 make(schar x, schar y, schar z) {return make_char3(x, y, z);}
};
template<> struct VecTraits<char4>
{
typedef schar elem_t;
enum {cn=4};
static __device__ __forceinline__ __host__ char4 all(schar v) {return make_char4(v, v, v, v);}
static __device__ __forceinline__ __host__ char4 make(schar x, schar y, schar z, schar w) {return make_char4(x, y, z, w);}
};
template<> struct VecTraits<ushort>
{
typedef ushort elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ ushort all(ushort v) {return v;}
static __device__ __forceinline__ __host__ ushort make(ushort x) {return x;}
};
template<> struct VecTraits<ushort1>
{
typedef ushort elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ ushort1 all(ushort v) {return make_ushort1(v);}
static __device__ __forceinline__ __host__ ushort1 make(ushort x) {return make_ushort1(x);}
};
template<> struct VecTraits<ushort2>
{
typedef ushort elem_t;
enum {cn=2};
static __device__ __forceinline__ __host__ ushort2 all(ushort v) {return make_ushort2(v, v);}
static __device__ __forceinline__ __host__ ushort2 make(ushort x, ushort y) {return make_ushort2(x, y);}
};
template<> struct VecTraits<ushort3>
{
typedef ushort elem_t;
enum {cn=3};
static __device__ __forceinline__ __host__ ushort3 all(ushort v) {return make_ushort3(v, v, v);}
static __device__ __forceinline__ __host__ ushort3 make(ushort x, ushort y, ushort z) {return make_ushort3(x, y, z);}
};
template<> struct VecTraits<ushort4>
{
typedef ushort elem_t;
enum {cn=4};
static __device__ __forceinline__ __host__ ushort4 all(ushort v) {return make_ushort4(v, v, v, v);}
static __device__ __forceinline__ __host__ ushort4 make(ushort x, ushort y, ushort z, ushort w) {return make_ushort4(x, y, z, w);}
};
template<> struct VecTraits<short>
{
typedef short elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ short all(short v) {return v;}
static __device__ __forceinline__ __host__ short make(short x) {return x;}
};
template<> struct VecTraits<short1>
{
typedef short elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ short1 all(short v) {return make_short1(v);}
static __device__ __forceinline__ __host__ short1 make(short x) {return make_short1(x);}
};
template<> struct VecTraits<short2>
{
typedef short elem_t;
enum {cn=2};
static __device__ __forceinline__ __host__ short2 all(short v) {return make_short2(v, v);}
static __device__ __forceinline__ __host__ short2 make(short x, short y) {return make_short2(x, y);}
};
template<> struct VecTraits<short3>
{
typedef short elem_t;
enum {cn=3};
static __device__ __forceinline__ __host__ short3 all(short v) {return make_short3(v, v, v);}
static __device__ __forceinline__ __host__ short3 make(short x, short y, short z) {return make_short3(x, y, z);}
};
template<> struct VecTraits<short4>
{
typedef short elem_t;
enum {cn=4};
static __device__ __forceinline__ __host__ short4 all(short v) {return make_short4(v, v, v, v);}
static __device__ __forceinline__ __host__ short4 make(short x, short y, short z, short w) {return make_short4(x, y, z, w);}
};
template<> struct VecTraits<uint>
{
typedef uint elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ uint all(uint v) {return v;}
static __device__ __forceinline__ __host__ uint make(uint x) {return x;}
};
template<> struct VecTraits<uint1>
{
typedef uint elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ uint1 all(uint v) {return make_uint1(v);}
static __device__ __forceinline__ __host__ uint1 make(uint x) {return make_uint1(x);}
};
template<> struct VecTraits<uint2>
{
typedef uint elem_t;
enum {cn=2};
static __device__ __forceinline__ __host__ uint2 all(uint v) {return make_uint2(v, v);}
static __device__ __forceinline__ __host__ uint2 make(uint x, uint y) {return make_uint2(x, y);}
};
template<> struct VecTraits<uint3>
{
typedef uint elem_t;
enum {cn=3};
static __device__ __forceinline__ __host__ uint3 all(uint v) {return make_uint3(v, v, v);}
static __device__ __forceinline__ __host__ uint3 make(uint x, uint y, uint z) {return make_uint3(x, y, z);}
};
template<> struct VecTraits<uint4>
{
typedef uint elem_t;
enum {cn=4};
static __device__ __forceinline__ __host__ uint4 all(uint v) {return make_uint4(v, v, v, v);}
static __device__ __forceinline__ __host__ uint4 make(uint x, uint y, uint z, uint w) {return make_uint4(x, y, z, w);}
};
template<> struct VecTraits<int>
{
typedef int elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ int all(int v) {return v;}
static __device__ __forceinline__ __host__ int make(int x) {return x;}
};
template<> struct VecTraits<int1>
{
typedef int elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ int1 all(int v) {return make_int1(v);}
static __device__ __forceinline__ __host__ int1 make(int x) {return make_int1(x);}
};
template<> struct VecTraits<int2>
{
typedef int elem_t;
enum {cn=2};
static __device__ __forceinline__ __host__ int2 all(int v) {return make_int2(v, v);}
static __device__ __forceinline__ __host__ int2 make(int x, int y) {return make_int2(x, y);}
};
template<> struct VecTraits<int3>
{
typedef int elem_t;
enum {cn=3};
static __device__ __forceinline__ __host__ int3 all(int v) {return make_int3(v, v, v);}
static __device__ __forceinline__ __host__ int3 make(int x, int y, int z) {return make_int3(x, y, z);}
};
template<> struct VecTraits<int4>
{
typedef int elem_t;
enum {cn=4};
static __device__ __forceinline__ __host__ int4 all(int v) {return make_int4(v, v, v, v);}
static __device__ __forceinline__ __host__ int4 make(int x, int y, int z, int w) {return make_int4(x, y, z, w);}
};
template<> struct VecTraits<float>
{
typedef float elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ float all(float v) {return v;}
static __device__ __forceinline__ __host__ float make(float x) {return x;}
};
template<> struct VecTraits<float1>
{
typedef float elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ float1 all(float v) {return make_float1(v);}
static __device__ __forceinline__ __host__ float1 make(float x) {return make_float1(x);}
};
template<> struct VecTraits<float2>
{
typedef float elem_t;
enum {cn=2};
static __device__ __forceinline__ __host__ float2 all(float v) {return make_float2(v, v);}
static __device__ __forceinline__ __host__ float2 make(float x, float y) {return make_float2(x, y);}
};
template<> struct VecTraits<float3>
{
typedef float elem_t;
enum {cn=3};
static __device__ __forceinline__ __host__ float3 all(float v) {return make_float3(v, v, v);}
static __device__ __forceinline__ __host__ float3 make(float x, float y, float z) {return make_float3(x, y, z);}
};
template<> struct VecTraits<float4>
{
typedef float elem_t;
enum {cn=4};
static __device__ __forceinline__ __host__ float4 all(float v) {return make_float4(v, v, v, v);}
static __device__ __forceinline__ __host__ float4 make(float x, float y, float z, float w) {return make_float4(x, y, z, w);}
};
template<> struct VecTraits<double>
{
typedef double elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ double all(double v) {return v;}
static __device__ __forceinline__ __host__ double make(double x) {return x;}
};
template<> struct VecTraits<double1>
{
typedef double elem_t;
enum {cn=1};
static __device__ __forceinline__ __host__ double1 all(double v) {return make_double1(v);}
static __device__ __forceinline__ __host__ double1 make(double x) {return make_double1(x);}
};
template<> struct VecTraits<double2>
{
typedef double elem_t;
enum {cn=2};
static __device__ __forceinline__ __host__ double2 all(double v) {return make_double2(v, v);}
static __device__ __forceinline__ __host__ double2 make(double x, double y) {return make_double2(x, y);}
};
template<> struct VecTraits<double3>
{
typedef double elem_t;
enum {cn=3};
static __device__ __forceinline__ __host__ double3 all(double v) {return make_double3(v, v, v);}
static __device__ __forceinline__ __host__ double3 make(double x, double y, double z) {return make_double3(x, y, z);}
};
template<> struct VecTraits<double4>
{
typedef double elem_t;
enum {cn=4};
static __device__ __forceinline__ __host__ double4 all(double v) {return make_double4(v, v, v, v);}
static __device__ __forceinline__ __host__ double4 make(double x, double y, double z, double w) {return make_double4(x, y, z, w);}
};
template <int cn, typename VecD> struct SatCast;
template <typename VecD> struct SatCast<1, VecD>
{
template <typename VecS>
static __device__ __forceinline__ VecD cast(const VecS& v)
{
typedef typename VecTraits<VecD>::elem_t D;
return VecTraits<VecD>::make(saturate_cast<D>(v.x));
}
};
template <typename VecD> struct SatCast<2, VecD>
{
template <typename VecS>
static __device__ __forceinline__ VecD cast(const VecS& v)
{
typedef typename VecTraits<VecD>::elem_t D;
return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y));
}
};
template <typename VecD> struct SatCast<3, VecD>
{
template <typename VecS>
static __device__ __forceinline__ VecD cast(const VecS& v)
{
typedef typename VecTraits<VecD>::elem_t D;
return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y), saturate_cast<D>(v.z));
}
};
template <typename VecD> struct SatCast<4, VecD>
{
template <typename VecS>
static __device__ __forceinline__ VecD cast(const VecS& v)
{
typedef typename VecTraits<VecD>::elem_t D;
return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y), saturate_cast<D>(v.z), saturate_cast<D>(v.w));
}
};
template <typename VecD, typename VecS> static __device__ __forceinline__ VecD saturate_cast_caller(const VecS& v)
{
return SatCast<VecTraits<VecD>::cn, VecD>::cast(v);
}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const uchar1& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const char1& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const ushort1& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const short1& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const uint1& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const int1& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const float1& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const uchar2& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const char2& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const ushort2& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const short2& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const uint2& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const int2& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const float2& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const uchar3& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const char3& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const ushort3& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const short3& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const uint3& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const int3& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const float3& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const uchar4& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const char4& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const ushort4& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const short4& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const uint4& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const int4& v) {return saturate_cast_caller<_Tp>(v);}
template<typename _Tp> static __device__ __forceinline__ _Tp saturate_cast(const float4& v) {return saturate_cast_caller<_Tp>(v);}
static __device__ __forceinline__ uchar1 operator+(const uchar1& a, const uchar1& b)
{
return make_uchar1(a.x + b.x);
}
static __device__ __forceinline__ uchar1 operator-(const uchar1& a, const uchar1& b)
{
return make_uchar1(a.x - b.x);
}
static __device__ __forceinline__ uchar1 operator*(const uchar1& a, const uchar1& b)
{
return make_uchar1(a.x * b.x);
}
static __device__ __forceinline__ uchar1 operator/(const uchar1& a, const uchar1& b)
{
return make_uchar1(a.x / b.x);
}
static __device__ __forceinline__ float1 operator*(const uchar1& a, float s)
{
return make_float1(a.x * s);
}
static __device__ __forceinline__ uchar2 operator+(const uchar2& a, const uchar2& b)
{
return make_uchar2(a.x + b.x, a.y + b.y);
}
static __device__ __forceinline__ uchar2 operator-(const uchar2& a, const uchar2& b)
{
return make_uchar2(a.x - b.x, a.y - b.y);
}
static __device__ __forceinline__ uchar2 operator*(const uchar2& a, const uchar2& b)
{
return make_uchar2(a.x * b.x, a.y * b.y);
}
static __device__ __forceinline__ uchar2 operator/(const uchar2& a, const uchar2& b)
{
return make_uchar2(a.x / b.x, a.y / b.y);
}
static __device__ __forceinline__ float2 operator*(const uchar2& a, float s)
{
return make_float2(a.x * s, a.y * s);
}
static __device__ __forceinline__ uchar3 operator+(const uchar3& a, const uchar3& b)
{
return make_uchar3(a.x + b.x, a.y + b.y, a.z + b.z);
}
static __device__ __forceinline__ uchar3 operator-(const uchar3& a, const uchar3& b)
{
return make_uchar3(a.x - b.x, a.y - b.y, a.z - b.z);
}
static __device__ __forceinline__ uchar3 operator*(const uchar3& a, const uchar3& b)
{
return make_uchar3(a.x * b.x, a.y * b.y, a.z * b.z);
}
static __device__ __forceinline__ uchar3 operator/(const uchar3& a, const uchar3& b)
{
return make_uchar3(a.x / b.x, a.y / b.y, a.z / b.z);
}
static __device__ __forceinline__ float3 operator*(const uchar3& a, float s)
{
return make_float3(a.x * s, a.y * s, a.z * s);
}
static __device__ __forceinline__ uchar4 operator+(const uchar4& a, const uchar4& b)
{
return make_uchar4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
}
static __device__ __forceinline__ uchar4 operator-(const uchar4& a, const uchar4& b)
{
return make_uchar4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
}
static __device__ __forceinline__ uchar4 operator*(const uchar4& a, const uchar4& b)
{
return make_uchar4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
}
static __device__ __forceinline__ uchar4 operator/(const uchar4& a, const uchar4& b)
{
return make_uchar4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
}
static __device__ __forceinline__ float4 operator*(const uchar4& a, float s)
{
return make_float4(a.x * s, a.y * s, a.z * s, a.w * s);
}
static __device__ __forceinline__ char1 operator+(const char1& a, const char1& b)
{
return make_char1(a.x + b.x);
}
static __device__ __forceinline__ char1 operator-(const char1& a, const char1& b)
{
return make_char1(a.x - b.x);
}
static __device__ __forceinline__ char1 operator*(const char1& a, const char1& b)
{
return make_char1(a.x * b.x);
}
static __device__ __forceinline__ char1 operator/(const char1& a, const char1& b)
{
return make_char1(a.x / b.x);
}
static __device__ __forceinline__ float1 operator*(const char1& a, float s)
{
return make_float1(a.x * s);
}
static __device__ __forceinline__ char2 operator+(const char2& a, const char2& b)
{
return make_char2(a.x + b.x, a.y + b.y);
}
static __device__ __forceinline__ char2 operator-(const char2& a, const char2& b)
{
return make_char2(a.x - b.x, a.y - b.y);
}
static __device__ __forceinline__ char2 operator*(const char2& a, const char2& b)
{
return make_char2(a.x * b.x, a.y * b.y);
}
static __device__ __forceinline__ char2 operator/(const char2& a, const char2& b)
{
return make_char2(a.x / b.x, a.y / b.y);
}
static __device__ __forceinline__ float2 operator*(const char2& a, float s)
{
return make_float2(a.x * s, a.y * s);
}
static __device__ __forceinline__ char3 operator+(const char3& a, const char3& b)
{
return make_char3(a.x + b.x, a.y + b.y, a.z + b.z);
}
static __device__ __forceinline__ char3 operator-(const char3& a, const char3& b)
{
return make_char3(a.x - b.x, a.y - b.y, a.z - b.z);
}
static __device__ __forceinline__ char3 operator*(const char3& a, const char3& b)
{
return make_char3(a.x * b.x, a.y * b.y, a.z * b.z);
}
static __device__ __forceinline__ char3 operator/(const char3& a, const char3& b)
{
return make_char3(a.x / b.x, a.y / b.y, a.z / b.z);
}
static __device__ __forceinline__ float3 operator*(const char3& a, float s)
{
return make_float3(a.x * s, a.y * s, a.z * s);
}
static __device__ __forceinline__ char4 operator+(const char4& a, const char4& b)
{
return make_char4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
}
static __device__ __forceinline__ char4 operator-(const char4& a, const char4& b)
{
return make_char4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
}
static __device__ __forceinline__ char4 operator*(const char4& a, const char4& b)
{
return make_char4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
}
static __device__ __forceinline__ char4 operator/(const char4& a, const char4& b)
{
return make_char4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
}
static __device__ __forceinline__ float4 operator*(const char4& a, float s)
{
return make_float4(a.x * s, a.y * s, a.z * s, a.w * s);
}
static __device__ __forceinline__ ushort1 operator+(const ushort1& a, const ushort1& b)
{
return make_ushort1(a.x + b.x);
}
static __device__ __forceinline__ ushort1 operator-(const ushort1& a, const ushort1& b)
{
return make_ushort1(a.x - b.x);
}
static __device__ __forceinline__ ushort1 operator*(const ushort1& a, const ushort1& b)
{
return make_ushort1(a.x * b.x);
}
static __device__ __forceinline__ ushort1 operator/(const ushort1& a, const ushort1& b)
{
return make_ushort1(a.x / b.x);
}
static __device__ __forceinline__ float1 operator*(const ushort1& a, float s)
{
return make_float1(a.x * s);
}
static __device__ __forceinline__ ushort2 operator+(const ushort2& a, const ushort2& b)
{
return make_ushort2(a.x + b.x, a.y + b.y);
}
static __device__ __forceinline__ ushort2 operator-(const ushort2& a, const ushort2& b)
{
return make_ushort2(a.x - b.x, a.y - b.y);
}
static __device__ __forceinline__ ushort2 operator*(const ushort2& a, const ushort2& b)
{
return make_ushort2(a.x * b.x, a.y * b.y);
}
static __device__ __forceinline__ ushort2 operator/(const ushort2& a, const ushort2& b)
{
return make_ushort2(a.x / b.x, a.y / b.y);
}
static __device__ __forceinline__ float2 operator*(const ushort2& a, float s)
{
return make_float2(a.x * s, a.y * s);
}
static __device__ __forceinline__ ushort3 operator+(const ushort3& a, const ushort3& b)
{
return make_ushort3(a.x + b.x, a.y + b.y, a.z + b.z);
}
static __device__ __forceinline__ ushort3 operator-(const ushort3& a, const ushort3& b)
{
return make_ushort3(a.x - b.x, a.y - b.y, a.z - b.z);
}
static __device__ __forceinline__ ushort3 operator*(const ushort3& a, const ushort3& b)
{
return make_ushort3(a.x * b.x, a.y * b.y, a.z * b.z);
}
static __device__ __forceinline__ ushort3 operator/(const ushort3& a, const ushort3& b)
{
return make_ushort3(a.x / b.x, a.y / b.y, a.z / b.z);
}
static __device__ __forceinline__ float3 operator*(const ushort3& a, float s)
{
return make_float3(a.x * s, a.y * s, a.z * s);
}
static __device__ __forceinline__ ushort4 operator+(const ushort4& a, const ushort4& b)
{
return make_ushort4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
}
static __device__ __forceinline__ ushort4 operator-(const ushort4& a, const ushort4& b)
{
return make_ushort4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
}
static __device__ __forceinline__ ushort4 operator*(const ushort4& a, const ushort4& b)
{
return make_ushort4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
}
static __device__ __forceinline__ ushort4 operator/(const ushort4& a, const ushort4& b)
{
return make_ushort4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
}
static __device__ __forceinline__ float4 operator*(const ushort4& a, float s)
{
return make_float4(a.x * s, a.y * s, a.z * s, a.w * s);
}
static __device__ __forceinline__ short1 operator+(const short1& a, const short1& b)
{
return make_short1(a.x + b.x);
}
static __device__ __forceinline__ short1 operator-(const short1& a, const short1& b)
{
return make_short1(a.x - b.x);
}
static __device__ __forceinline__ short1 operator*(const short1& a, const short1& b)
{
return make_short1(a.x * b.x);
}
static __device__ __forceinline__ short1 operator/(const short1& a, const short1& b)
{
return make_short1(a.x / b.x);
}
static __device__ __forceinline__ float1 operator*(const short1& a, float s)
{
return make_float1(a.x * s);
}
static __device__ __forceinline__ short2 operator+(const short2& a, const short2& b)
{
return make_short2(a.x + b.x, a.y + b.y);
}
static __device__ __forceinline__ short2 operator-(const short2& a, const short2& b)
{
return make_short2(a.x - b.x, a.y - b.y);
}
static __device__ __forceinline__ short2 operator*(const short2& a, const short2& b)
{
return make_short2(a.x * b.x, a.y * b.y);
}
static __device__ __forceinline__ short2 operator/(const short2& a, const short2& b)
{
return make_short2(a.x / b.x, a.y / b.y);
}
static __device__ __forceinline__ float2 operator*(const short2& a, float s)
{
return make_float2(a.x * s, a.y * s);
}
static __device__ __forceinline__ short3 operator+(const short3& a, const short3& b)
{
return make_short3(a.x + b.x, a.y + b.y, a.z + b.z);
}
static __device__ __forceinline__ short3 operator-(const short3& a, const short3& b)
{
return make_short3(a.x - b.x, a.y - b.y, a.z - b.z);
}
static __device__ __forceinline__ short3 operator*(const short3& a, const short3& b)
{
return make_short3(a.x * b.x, a.y * b.y, a.z * b.z);
}
static __device__ __forceinline__ short3 operator/(const short3& a, const short3& b)
{
return make_short3(a.x / b.x, a.y / b.y, a.z / b.z);
}
static __device__ __forceinline__ float3 operator*(const short3& a, float s)
{
return make_float3(a.x * s, a.y * s, a.z * s);
}
static __device__ __forceinline__ short4 operator+(const short4& a, const short4& b)
{
return make_short4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
}
static __device__ __forceinline__ short4 operator-(const short4& a, const short4& b)
{
return make_short4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
}
static __device__ __forceinline__ short4 operator*(const short4& a, const short4& b)
{
return make_short4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
}
static __device__ __forceinline__ short4 operator/(const short4& a, const short4& b)
{
return make_short4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
}
static __device__ __forceinline__ float4 operator*(const short4& a, float s)
{
return make_float4(a.x * s, a.y * s, a.z * s, a.w * s);
}
static __device__ __forceinline__ int1 operator+(const int1& a, const int1& b)
{
return make_int1(a.x + b.x);
}
static __device__ __forceinline__ int1 operator-(const int1& a, const int1& b)
{
return make_int1(a.x - b.x);
}
static __device__ __forceinline__ int1 operator*(const int1& a, const int1& b)
{
return make_int1(a.x * b.x);
}
static __device__ __forceinline__ int1 operator/(const int1& a, const int1& b)
{
return make_int1(a.x / b.x);
}
static __device__ __forceinline__ float1 operator*(const int1& a, float s)
{
return make_float1(a.x * s);
}
static __device__ __forceinline__ int2 operator+(const int2& a, const int2& b)
{
return make_int2(a.x + b.x, a.y + b.y);
}
static __device__ __forceinline__ int2 operator-(const int2& a, const int2& b)
{
return make_int2(a.x - b.x, a.y - b.y);
}
static __device__ __forceinline__ int2 operator*(const int2& a, const int2& b)
{
return make_int2(a.x * b.x, a.y * b.y);
}
static __device__ __forceinline__ int2 operator/(const int2& a, const int2& b)
{
return make_int2(a.x / b.x, a.y / b.y);
}
static __device__ __forceinline__ float2 operator*(const int2& a, float s)
{
return make_float2(a.x * s, a.y * s);
}
static __device__ __forceinline__ int3 operator+(const int3& a, const int3& b)
{
return make_int3(a.x + b.x, a.y + b.y, a.z + b.z);
}
static __device__ __forceinline__ int3 operator-(const int3& a, const int3& b)
{
return make_int3(a.x - b.x, a.y - b.y, a.z - b.z);
}
static __device__ __forceinline__ int3 operator*(const int3& a, const int3& b)
{
return make_int3(a.x * b.x, a.y * b.y, a.z * b.z);
}
static __device__ __forceinline__ int3 operator/(const int3& a, const int3& b)
{
return make_int3(a.x / b.x, a.y / b.y, a.z / b.z);
}
static __device__ __forceinline__ float3 operator*(const int3& a, float s)
{
return make_float3(a.x * s, a.y * s, a.z * s);
}
static __device__ __forceinline__ int4 operator+(const int4& a, const int4& b)
{
return make_int4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
}
static __device__ __forceinline__ int4 operator-(const int4& a, const int4& b)
{
return make_int4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
}
static __device__ __forceinline__ int4 operator*(const int4& a, const int4& b)
{
return make_int4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
}
static __device__ __forceinline__ int4 operator/(const int4& a, const int4& b)
{
return make_int4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
}
static __device__ __forceinline__ float4 operator*(const int4& a, float s)
{
return make_float4(a.x * s, a.y * s, a.z * s, a.w * s);
}
static __device__ __forceinline__ uint1 operator+(const uint1& a, const uint1& b)
{
return make_uint1(a.x + b.x);
}
static __device__ __forceinline__ uint1 operator-(const uint1& a, const uint1& b)
{
return make_uint1(a.x - b.x);
}
static __device__ __forceinline__ uint1 operator*(const uint1& a, const uint1& b)
{
return make_uint1(a.x * b.x);
}
static __device__ __forceinline__ uint1 operator/(const uint1& a, const uint1& b)
{
return make_uint1(a.x / b.x);
}
static __device__ __forceinline__ float1 operator*(const uint1& a, float s)
{
return make_float1(a.x * s);
}
static __device__ __forceinline__ uint2 operator+(const uint2& a, const uint2& b)
{
return make_uint2(a.x + b.x, a.y + b.y);
}
static __device__ __forceinline__ uint2 operator-(const uint2& a, const uint2& b)
{
return make_uint2(a.x - b.x, a.y - b.y);
}
static __device__ __forceinline__ uint2 operator*(const uint2& a, const uint2& b)
{
return make_uint2(a.x * b.x, a.y * b.y);
}
static __device__ __forceinline__ uint2 operator/(const uint2& a, const uint2& b)
{
return make_uint2(a.x / b.x, a.y / b.y);
}
static __device__ __forceinline__ float2 operator*(const uint2& a, float s)
{
return make_float2(a.x * s, a.y * s);
}
static __device__ __forceinline__ uint3 operator+(const uint3& a, const uint3& b)
{
return make_uint3(a.x + b.x, a.y + b.y, a.z + b.z);
}
static __device__ __forceinline__ uint3 operator-(const uint3& a, const uint3& b)
{
return make_uint3(a.x - b.x, a.y - b.y, a.z - b.z);
}
static __device__ __forceinline__ uint3 operator*(const uint3& a, const uint3& b)
{
return make_uint3(a.x * b.x, a.y * b.y, a.z * b.z);
}
static __device__ __forceinline__ uint3 operator/(const uint3& a, const uint3& b)
{
return make_uint3(a.x / b.x, a.y / b.y, a.z / b.z);
}
static __device__ __forceinline__ float3 operator*(const uint3& a, float s)
{
return make_float3(a.x * s, a.y * s, a.z * s);
}
static __device__ __forceinline__ uint4 operator+(const uint4& a, const uint4& b)
{
return make_uint4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
}
static __device__ __forceinline__ uint4 operator-(const uint4& a, const uint4& b)
{
return make_uint4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
}
static __device__ __forceinline__ uint4 operator*(const uint4& a, const uint4& b)
{
return make_uint4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
}
static __device__ __forceinline__ uint4 operator/(const uint4& a, const uint4& b)
{
return make_uint4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
}
static __device__ __forceinline__ float4 operator*(const uint4& a, float s)
{
return make_float4(a.x * s, a.y * s, a.z * s, a.w * s);
}
static __device__ __forceinline__ float1 operator+(const float1& a, const float1& b)
{
return make_float1(a.x + b.x);
}
static __device__ __forceinline__ float1 operator-(const float1& a, const float1& b)
{
return make_float1(a.x - b.x);
}
static __device__ __forceinline__ float1 operator*(const float1& a, const float1& b)
{
return make_float1(a.x * b.x);
}
static __device__ __forceinline__ float1 operator/(const float1& a, const float1& b)
{
return make_float1(a.x / b.x);
}
static __device__ __forceinline__ float1 operator*(const float1& a, float s)
{
return make_float1(a.x * s);
}
static __device__ __forceinline__ float2 operator+(const float2& a, const float2& b)
{
return make_float2(a.x + b.x, a.y + b.y);
}
static __device__ __forceinline__ float2 operator-(const float2& a, const float2& b)
{
return make_float2(a.x - b.x, a.y - b.y);
}
static __device__ __forceinline__ float2 operator*(const float2& a, const float2& b)
{
return make_float2(a.x * b.x, a.y * b.y);
}
static __device__ __forceinline__ float2 operator/(const float2& a, const float2& b)
{
return make_float2(a.x / b.x, a.y / b.y);
}
static __device__ __forceinline__ float2 operator*(const float2& a, float s)
{
return make_float2(a.x * s, a.y * s);
}
static __device__ __forceinline__ float3 operator+(const float3& a, const float3& b)
{
return make_float3(a.x + b.x, a.y + b.y, a.z + b.z);
}
static __device__ __forceinline__ float3 operator-(const float3& a, const float3& b)
{
return make_float3(a.x - b.x, a.y - b.y, a.z - b.z);
}
static __device__ __forceinline__ float3 operator*(const float3& a, const float3& b)
{
return make_float3(a.x * b.x, a.y * b.y, a.z * b.z);
}
static __device__ __forceinline__ float3 operator/(const float3& a, const float3& b)
{
return make_float3(a.x / b.x, a.y / b.y, a.z / b.z);
}
static __device__ __forceinline__ float3 operator*(const float3& a, float s)
{
return make_float3(a.x * s, a.y * s, a.z * s);
}
static __device__ __forceinline__ float4 operator+(const float4& a, const float4& b)
{
return make_float4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
}
static __device__ __forceinline__ float4 operator-(const float4& a, const float4& b)
{
return make_float4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w);
}
static __device__ __forceinline__ float4 operator*(const float4& a, const float4& b)
{
return make_float4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
}
static __device__ __forceinline__ float4 operator/(const float4& a, const float4& b)
{
return make_float4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w);
}
static __device__ __forceinline__ float4 operator*(const float4& a, float s)
{
return make_float4(a.x * s, a.y * s, a.z * s, a.w * s);
}
}
}
}
#endif // __OPENCV_GPU_VECMATH_HPP__ | [
"key0note@gmail.com"
] | key0note@gmail.com |
66b13947c249a710585594ccc1b04d79bd14044a | b65ac2bf7cc46d132fb6c3c28a5a750bad2a46c1 | /Tests/QuicksortTest.cpp | e68a547f030e9a31919d96591bf68d7a80750c23 | [
"MIT"
] | permissive | Acamol/Algorithms-in-CPP | 080fe3059fc9c6c4a5fd4f2bfb279f0278fccf73 | 3c890a53078971653b13bf2bfd0aeb9efc05fe44 | refs/heads/master | 2020-03-22T14:48:26.119208 | 2018-09-12T13:24:21 | 2018-09-12T13:24:21 | 140,206,795 | 0 | 0 | MIT | 2018-09-12T12:46:56 | 2018-07-08T22:25:13 | C++ | UTF-8 | C++ | false | false | 578 | cpp | #include <gtest/gtest.h>
#include <list>
#include <vector>
#include "quick_sort.hpp"
using namespace Acamol;
TEST(quick_sort, various_containers) {
std::vector<int> vec{ 4, 3, 5, 2, 1 };
quick_sort(vec.begin(), vec.end());
ASSERT_TRUE(std::is_sorted(vec.begin(), vec.end()));
std::list<int> list{ 4, 3, 5, 2, 1 };
quick_sort(list.begin(), list.end());
ASSERT_TRUE(std::is_sorted(list.begin(), list.end()));
int array[] = { 4, 3, 5, 2, 1 };
quick_sort(std::begin(array), std::end(array));
ASSERT_TRUE(std::is_sorted(std::begin(array), std::end(array)));
} | [
"noreply@github.com"
] | noreply@github.com |
3577cbffc472e8afb29a40d15d96fab53f6682e7 | 12a5bd0f1bb76ea202b0cfc7527972ef1de6c210 | /others/set/set find and erase and insert.cpp | 23737ef5e8b0f68215960b3172610c8c01dd78d8 | [] | no_license | SumonKantiDey/snippet-of-programming | 74bbca3edb24c9b99a5ae9ce2f638e1f01473a2d | 21d22e8e5b6e1324b2e42688225ee40f4035ef87 | refs/heads/master | 2020-03-21T10:05:38.600393 | 2018-08-27T12:08:36 | 2018-08-27T12:08:36 | 138,432,883 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 353 | cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
scanf("%d", &n);
set<int> s;
for(int i = 0; i < n; i++){
int c;
scanf("%d", &c);
while(s.find(c) != s.end()){
cout<<"erase"<<c<<endl;
s.erase(c++);
}
s.insert(c);
cout<<"insert"<<c<<endl;
}
cout<<endl;
cout <<"s.size===" << s.size()<<endl;
return 0;
}
| [
"noreply@github.com"
] | noreply@github.com |
a49f153d1c0d8b3b8828547f99dfa4b4fb72d071 | 2972e02ca90fdc1dc8b2edd2e49ed1496d7da25f | /OpenCV图像处理视频教程/VideoLesson/VideoLesson/main_03.cpp | e063bbbb5c758ec9043f54bf8e5a6a179d37ac33 | [] | no_license | Neilliume/OpenCV_Continue_Learning | 50c6f425d17a2b3b82cbfc09dd8da34775fa2f6f | 806b4dbe5f02335241dd11e61ff632256dc16073 | refs/heads/master | 2022-03-03T23:51:49.306084 | 2019-09-10T03:47:15 | 2019-09-10T03:47:15 | 115,923,752 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,343 | cpp | #include <opencv2\opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char* argv[])
{
Mat src, dst;
src = imread("E:/repo/opencv/OpenCV_Continue_Learning/OpenCV图像处理视频教程/VideoLesson/VideoLesson/1.jpg");
if (!src.data)
{
printf("Could not load image...\n");
return -1;
}
namedWindow("Input Image", CV_WINDOW_AUTOSIZE);
imshow("Input Image", src);
/*
int cols = (src.cols - 1) * src.channels();
int offsetx = src.channels();
int rows = src.rows;
dst = Mat::zeros(src.size(), src.type());
for (int row = 1; row < rows - 1; row++)
{
const uchar* current = src.ptr<uchar>(row);
const uchar* previous = src.ptr<uchar>(row - 1);
const uchar* next = src.ptr<uchar>(row + 1);
uchar* output = dst.ptr<uchar>(row);
for (int col = offsetx; col < cols; col++)
{
output[col] = saturate_cast<uchar>(5 * current[col] - (current[col - offsetx] + current[col + offsetx] + previous[col] + next[col]));
}
}
*/
double start = getTickCount();
Mat kernel = (Mat_<char>(3, 3) << 0, -1, 0, -1, 5, -1, 0, -1, 0);
filter2D(src, dst, src.depth(), kernel);
double end = (getTickCount() - start) / getTickFrequency();
printf("Time Consume:%.2fs\n", end);
namedWindow("contrast image demo", CV_WINDOW_AUTOSIZE);
imshow("contrast image demo", dst);
waitKey(0);
return 0;
} | [
"liuzhang50118@gmail.com"
] | liuzhang50118@gmail.com |
cbf01b2dc7079958409adcd070e34aa3ac04660a | 5ea33d3e72fb94d9b27404973aabbad0274f0d08 | /oactobjs/piadataproj/WageBase.cpp | 02ef344e5b79fb98bc17d51711aa0f47cbd622b5 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | permissive | bslabs/anypiamac | d99538ea35732dc6804a4f1d231d6034bb8f68c1 | 199a118e4feffbafde2007c326d9b1c774e9c4ff | refs/heads/master | 2021-06-24T08:21:34.583844 | 2020-11-21T07:37:01 | 2020-11-21T07:37:01 | 36,282,920 | 5 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,014 | cpp | // Functions for the <see cref="WageBase"/>, <see cref="WageBaseHI"/>,
// and <see cref="WageBaseOldLaw"/> classes to manage wage base projections.
// $Id: WageBase.cpp 1.11 2011/08/11 13:55:35EDT 044579 Development $
#include "WageBase.h"
/// <summary>Initializes type of projection to present law, first year is
/// 1937.</summary>
///
/// <param name="newLastYear">Last year of projection.</param>
WageBase::WageBase( int newLastYear ) : WageBaseGeneral(0, newLastYear)
{ }
/// <summary>Initializes type of projection to present law, first year is
/// specified.</summary>
///
/// <param name="newLastYear">Last year of projection.</param>
/// <param name="newBaseYear">First year of data.</param>
WageBase::WageBase( int newBaseYear, int newLastYear ) :
WageBaseGeneral(0, newBaseYear, newLastYear)
{ }
/// <summary>Initializes type of projection to HI, first year is 1937.
/// </summary>
///
/// <param name="newLastYear">Last year of projection.</param>
WageBaseHI::WageBaseHI( int newLastYear ) : WageBaseGeneral(3, newLastYear)
{ }
/// <summary>Initializes type of projection to HI, first year is specified.
/// </summary>
///
/// <param name="newLastYear">Last year of projection.</param>
/// <param name="newBaseYear">First year of data.</param>
WageBaseHI::WageBaseHI( int newBaseYear, int newLastYear ) :
WageBaseGeneral(3, newBaseYear, newLastYear)
{ }
/// <summary>Initializes type of projection to old law, first year is 1937.
/// </summary>
///
/// <param name="newLastYear">Last year of projection.</param>
WageBaseOldLaw::WageBaseOldLaw( int newLastYear ) :
WageBaseGeneral(2, newLastYear)
{ }
/// <summary>Initializes type of projection to old law, first year is
/// specified.</summary>
///
/// <param name="newLastYear">Last year of projection.</param>
/// <param name="newBaseYear">First year of data.</param>
WageBaseOldLaw::WageBaseOldLaw( int newBaseYear, int newLastYear ) :
WageBaseGeneral(2, newBaseYear, newLastYear)
{ }
| [
"brendan@bslabs.net"
] | brendan@bslabs.net |
fa3e6d9c6af2ffc4bf547616c7d3eb878220549e | 179853e2e14257fbfbc5b9429bdac936e74c0dfd | /ProjektPK4/BankAccount.h | 110e058ea77a226094b4beb1e2cb8db1969606d7 | [] | no_license | TomaszGol/BankSystem | a7b2c9e02e44dbb68cf891456675c767fc2dfc17 | 9417db524306c182572ad87b094bf5b9d1942c68 | refs/heads/main | 2023-05-12T22:20:12.515696 | 2021-05-27T18:39:00 | 2021-05-27T18:39:00 | 371,469,632 | 1 | 0 | null | null | null | null | WINDOWS-1250 | C++ | false | false | 2,716 | h | /** @file */
#pragma once
#include <iostream>
#ifndef _BankAccount_H_
#define _BankAccount_H_
using namespace std;
/**Klasa BankAccount zawiera wszystkie informacje o koncie bankowym*/
class BankAccount {
string name; /**< zmienna zawierająca imie właściciela konta*/
string lastName; /**< zmienna zawierająca nazwisko właściciela konta*/
long accountNumber; /**< Zmienna long zawierająca numer konta*/
float balance; /**< zmienna zawierająca balans konta*/
static long NextAccountNumber; /**< zmienna statyczna zawierająca numer następnego konta*/
public:
/**Konstruktor bezargumentowy*/
BankAccount();
/**Konstruktor argumentowy, ustawiający dane konta*/
BankAccount(string fname, string lname, float balance);
/**Metoda getName zwraca imie osoby
@return imie osoby
*/
string getName() { return name; }
/**Metoda getLastName zwraca nazwisko osoby
@return nazwisko osoby
*/
string getLastName() { return lastName; }
/**Metoda getAccountNumber zwraca numer konta
@return numer konta
*/
long getAccountNumber() { return accountNumber; }
/**Metoda getBalance zwraca aktualny balans konta
@return aktualny balans konta
*/
float getBalance() { return balance; }
/**Metoda statyczna getLastAccountNumber zwraca numer następnego konta
@return zwraca następny numer konta
*/
static long getLastAccountNumber() { return NextAccountNumber; }
/**Metoda statyczna setAccountNumber ustawia zmienną NextAccountNumber na aktualny numer
@param accountNumber numer konta
*/
static void setAccountNumber(long accountNumber) { NextAccountNumber = accountNumber; }
/**Metoda Deposit dodaje do aktualnego balansu określoną wartość
@param ammount kwota, którą dodajemy do aktualnego balansu.
*/
void Deposit(float ammount);
/**Metoda Withdraw odejmuje od aktualnego balansu okreśolną wartość
@param ammount kwota, którą odejmujemy od aktualnego balansu.
*/
void Withdraw(float ammount);
/**Zaprzyjaźniony operator przeładowania ułatwiający czytanie danych z pliku
@param &ifs źródło strumienia pliku
@param &acc obiekt klasy do którego wpisujemy z pliku
*/
friend std::fstream& operator>>(std::fstream& ifs, BankAccount& acc);
/**Zaprzyjaźniony operator przeładowania ułatwiający wpisanie danych do pliku
@param &outfile źródło strumienia pliku
@param &acc obiekt klasy wpisywany do pliku
*/
friend std::fstream& operator<<(std::fstream& outfile, BankAccount& acc);
/**Zaprzyjaźniony operator przeładowania ułatwiający wypisywanie obiektu na ekran
@param &os źródło strumienia wypisania
@param &acc obiekt klasy, który chcemy wypisać
*/
friend std::ostream& operator<<(std::ostream& os, BankAccount& acc);
};
#endif
| [
"oplane2000@gmail.com"
] | oplane2000@gmail.com |
86b0eff0ad050878bbd77972ea896a5dec5ffd28 | 736590f0f8de74aa0b35add683b512c08744743f | /src/source/generator/PinkNoiseGenerator.h | 5f6cae7d64a059e3f24f46edcf1136fc2af53f14 | [
"MIT"
] | permissive | sequoiar/aquila | 6da3c91006fa5b6785b9620828d41fe2de32a339 | 7c90031e01cfe4b810b6b8e9b2055244aa67b995 | refs/heads/master | 2021-01-23T22:52:45.773844 | 2011-01-10T18:09:45 | 2011-01-10T18:09:45 | 1,490,005 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,327 | h | /**
* @file PinkNoiseGenerator.h
*
* Pink noise generator.
*
* This file is part of the Aquila DSP library.
* Aquila is free software, licensed under the MIT/X11 License. A copy of
* the license is provided with the library in the LICENSE file.
*
* @package Aquila
* @version 3.0.0-dev
* @author Zbigniew Siciarz
* @date 2007-2011
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @since 3.0.0
*/
#ifndef PINKNOISEGENERATOR_H
#define PINKNOISEGENERATOR_H
#include "Generator.h"
namespace Aquila
{
/**
* Pink noise generator using Voss algorithm.
*/
class AQUILA_EXPORT PinkNoiseGenerator : public Generator
{
public:
PinkNoiseGenerator(FrequencyType sampleFrequency);
virtual void generate(std::size_t samplesCount);
private:
double pinkSample();
/**
* Number of white noise samples to use in Voss algorithm.
*/
enum { whiteSamplesNum = 20 };
/**
* An internal buffer for white noise samples.
*/
double whiteSamples[whiteSamplesNum];
/**
* A key marking which of the white noise samples should change.
*/
int key;
/**
* Maximum key value.
*/
int maxKey;
};
}
#endif // PINKNOISEGENERATOR_H
| [
"antyqjon@gmail.com"
] | antyqjon@gmail.com |
c9810d1c83a5bb190c21f5cb2c191487fedf0fe9 | 63d48403e3bea28e719b0a76ad759182aa0ab736 | /ConstructorsandDestructords/main.cpp | 4371db6e52f134810f2c4e0f442dc724654d6373 | [] | no_license | HarshitAditya27/My-Cpp-Notes | c830aaad571355a36b96a65eb2fe7c87237cd659 | bf199e554cf07187b73e534525b312f0b611f455 | refs/heads/master | 2023-08-23T18:36:32.791489 | 2021-10-07T14:52:52 | 2021-10-07T14:52:52 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,320 | cpp | #include <iostream>
#include <string>
using namespace std;
class Player
{
private:
std::string name;
int health;
int xp;
public:
void set_name(std::string name_val){
name=name_val;
}
//Overloaded Constructors
Player(){
cout<<"No args constructor called"<<endl;
}
Player(std::string name){
cout<<"String arg constructor called"<<endl;
}
Player(std::string name, int health, int xp){
cout<<"There args constructor called"<<endl;
}
~Player(){
cout<<"Destructor called for"<<name<<endl;
}
};
int main() {
{
Player slayer;
slayer.set_name("Slayer");
}
{
Player frank;
frank.set_name("Frank");
Player hero("Hero");
hero.set_name("Hero");
Player villain("Villain",100,12);
villain.set_name("Villan");
}
Player *enemy = new Player;
enemy->set_name("Enemy");
Player *level_boss = new Player("Level Boss",1000,300);
level_boss->set_name("Level Boss");
delete enemy;
delete level_boss;
return 0;
} | [
"harshitaditya27@gmail.com"
] | harshitaditya27@gmail.com |
9839062d75868ef0c9f491c1909ac283b305bf16 | c3782a52da4479a5ca3d0131cbacd3ff23cea572 | /Codeforces/contest/872/a/31380211.cpp | b8682a45a55d824d01467cae3a74d42572032bdd | [] | no_license | misclicked/Codes | 5def6d488bfd028d415f3dc6f18ff6d904226e6f | 1aa53cf585abf0eed1a47e0a95d894d34942e3b1 | refs/heads/master | 2021-07-16T00:28:05.717259 | 2020-05-25T06:20:37 | 2020-05-25T06:20:37 | 142,436,632 | 6 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,444 | cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<pii> vii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,char> pic;
typedef vector<pic> vpic;
typedef vector<pll> vll;
template<class T>
class disjoint_set{
public:
int *arr;
int *member;
int N, groups;
disjoint_set(int N){
this->N = N;
arr = new int[N+5];
member = new int[N+5];
}
void init(){
for(int i=0;i<=N;i++){
arr[i] = i;
member[i] = 1;
}
groups = N;
}
int find(int x){
return x == arr[x] ? x : (arr[x] = find(arr[x]));
}
void uni(int x,int y){
x = find(x); y = find(y);
if(x==y) return;
groups--;
member[y] += member[x];
member[x] = 0;
arr[x] = y;
}
bool isgroup(int x,int y){
return find(x) == find(y);
}
int cardinality(int x){
return member[find(x)];
}
};
map<int,int> ma,mb;
int main(){
ios_base::sync_with_stdio(false);
cin.tie();cout.tie();
int n,m;
cin>>n>>m;
int a=10,b=10;
int data;
for(int i=0;i<n;i++){
cin>>data;
ma[data]++;
a=min(a,data);
}
for(int i=0;i<m;i++){
cin>>data;
mb[data]++;
b=min(b,data);
}
for(int i=1;i<=9;i++){
if(ma[i]&&mb[i]){
cout<<i<<endl;
return 0;
}
}
if(a>b){
cout<<b*10+a<<endl;
}else if(a<b){
cout<<a*10+b<<endl;
}else
cout<<a<<endl;
}
| [
"lspss92189@gmail.com"
] | lspss92189@gmail.com |
c6a0dcbf4e82d33f44a1aa003ea01db54289224f | dd80a584130ef1a0333429ba76c1cee0eb40df73 | /external/chromium_org/third_party/WebKit/Source/core/dom/DecodedDataDocumentParser.cpp | 7f3c01f23d888588788284487ead384a0f4ef704 | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-only",
"BSD-2-Clause",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"Apache-2.0"
] | permissive | karunmatharu/Android-4.4-Pay-by-Data | 466f4e169ede13c5835424c78e8c30ce58f885c1 | fcb778e92d4aad525ef7a995660580f948d40bc9 | refs/heads/master | 2021-03-24T13:33:01.721868 | 2017-02-18T17:48:49 | 2017-02-18T17:48:49 | 81,847,777 | 0 | 2 | MIT | 2020-03-09T00:02:12 | 2017-02-13T16:47:00 | null | UTF-8 | C++ | false | false | 3,689 | cpp | /*
* Copyright (C) 2010 Google, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "core/dom/DecodedDataDocumentParser.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentEncodingData.h"
#include "core/fetch/TextResourceDecoder.h"
namespace WebCore {
DecodedDataDocumentParser::DecodedDataDocumentParser(Document* document)
: DocumentParser(document)
, m_hasAppendedData(false)
{
}
DecodedDataDocumentParser::~DecodedDataDocumentParser()
{
}
void DecodedDataDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder)
{
m_decoder = decoder;
}
TextResourceDecoder* DecodedDataDocumentParser::decoder()
{
return m_decoder.get();
}
void DecodedDataDocumentParser::setHasAppendedData()
{
m_hasAppendedData = true;
}
void DecodedDataDocumentParser::appendBytes(const char* data, size_t length)
{
if (!length)
return;
// This should be checking isStopped(), but XMLDocumentParser prematurely
// stops parsing when handling an XSLT processing instruction and still
// needs to receive decoded bytes.
if (isDetached())
return;
String decoded = m_decoder->decode(data, length);
updateDocument(decoded);
}
void DecodedDataDocumentParser::flush()
{
// This should be checking isStopped(), but XMLDocumentParser prematurely
// stops parsing when handling an XSLT processing instruction and still
// needs to receive decoded bytes.
if (isDetached())
return;
// null decoder indicates there is no data received.
// We have nothing to do in that case.
if (!m_decoder)
return;
String remainingData = m_decoder->flush();
updateDocument(remainingData);
}
void DecodedDataDocumentParser::updateDocument(String& decodedData)
{
DocumentEncodingData encodingData;
encodingData.encoding = m_decoder->encoding();
encodingData.wasDetectedHeuristically = m_decoder->encodingWasDetectedHeuristically();
encodingData.sawDecodingError = m_decoder->sawError();
document()->setEncodingData(encodingData);
if (decodedData.isEmpty())
return;
append(decodedData.releaseImpl());
// FIXME: Should be removed as part of https://code.google.com/p/chromium/issues/detail?id=319643
if (!m_hasAppendedData) {
m_hasAppendedData = true;
if (m_decoder->encoding().usesVisualOrdering())
document()->setVisuallyOrdered();
}
}
};
| [
"karun.matharu@gmail.com"
] | karun.matharu@gmail.com |
556e71d9ce87fb619af6f07ef4837422d043bf0f | b3c47795e8b6d95ae5521dcbbb920ab71851a92f | /Google Code Jam/Round 2 2018/B.cc | e16e577bdb4b34cc16472359be27759ae2b9a953 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | Wizmann/ACM-ICPC | 6afecd0fd09918c53a2a84c4d22c244de0065710 | 7c30454c49485a794dcc4d1c09daf2f755f9ecc1 | refs/heads/master | 2023-07-15T02:46:21.372860 | 2023-07-09T15:30:27 | 2023-07-09T15:30:27 | 3,009,276 | 51 | 23 | null | null | null | null | UTF-8 | C++ | false | false | 851 | cc | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define print(x) cout << x << endl
#define input(x) cin >> x
const int SIZE = 555;
const int SQRTSIZE = 55;
int dp[SIZE][SIZE];
void init() {
memset(dp, -1, sizeof(dp));
dp[0][0] = -1;
for (int i = 0; i < SQRTSIZE; i++) {
for (int j = 0; j < SQRTSIZE; j++) {
for (int rr = SIZE - 1; rr >= i; rr--) {
for (int bb = SIZE - 1; bb >= j; bb--) {
dp[rr][bb] = max(dp[rr][bb], dp[rr - i][bb - j] + 1);
}
}
}
}
}
int main() {
init();
int T;
input(T);
int r, b;
for (int case_ = 0; case_ < T; case_++) {
input(r >> b);
printf("Case #%d: %d\n", case_ + 1, dp[r][b]);
}
return 0;
}
| [
"noreply@github.com"
] | noreply@github.com |
8aa147cd83b8243d45558fb7cc2212e26ae20432 | d6f4fe10f2b06486f166e8610a59f668c7a41186 | /Base/cxx/vtkImageGraph.h | e466bcfb3f3829779b890ebb5447d45f83127977 | [] | no_license | nagyistge/slicer2-nohistory | 8a765097be776cbaa4ed1a4dbc297b12b0f8490e | 2e3a0018010bf5ce9416aed5b5554868b24e9295 | refs/heads/master | 2021-01-18T10:55:51.892791 | 2011-02-23T16:49:01 | 2011-02-23T16:49:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,920 | h | /*=auto=========================================================================
Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
See Doc/copyright/copyright.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Program: 3D Slicer
Module: $RCSfile: vtkImageGraph.h,v $
Date: $Date: 2006/02/23 01:43:33 $
Version: $Revision: 1.9 $
=========================================================================auto=*/
// .NAME vtkImageGraph - Abstract Filter used in slicer to plot graphs
#ifndef __vtkImageGraph_h
#define __vtkImageGraph_h
#include "vtkImageSource.h"
#include "vtkSlicer.h"
// From vtkImagePlot
#define SET_PIXEL(x,y,color){ ptr =&outPtr[y*NumXScalar+x*3]; memcpy(ptr,color,3);}
//BTX
class VTK_SLICER_BASE_EXPORT GraphList {
public:
vtkFloatingPointType* GetColor() {return this->Color;}
void SetColor (vtkFloatingPointType value[3]) {memcpy(this->Color,value,sizeof(vtkFloatingPointType)*3);}
void SetType(int val) {this->Type = val; }
int GetType() {return this->Type; }
int GetID() {return this->ID;}
~GraphList() {this->ID = -1;}
GraphList();
vtkFloatingPointType Color[3];
int ID;
int Type;
};
// Description:
// Type of curve:
// 0 = curve representing contious data (e.g. /)
// 1 = curve representing discrete data (e.g. _|)
class VTK_SLICER_BASE_EXPORT GraphEntryList : public GraphList{
public:
vtkImageData* GetGraphEntry() {return this->GraphEntry;}
void SetGraphEntry(vtkImageData* value) {this->GraphEntry = value;}
GraphEntryList* GetNext() {return this->Next;}
void SetIgnoreGraphMinGraphMax(bool flag) {this->IgnoreGraphMinGraphMax = flag;}
bool GetIgnoreGraphMinGraphMax() {return this->IgnoreGraphMinGraphMax;}
int AddEntry(vtkImageData* plot, vtkFloatingPointType col[3],int type, bool ignore);
int DeleteEntry(int delID);
GraphEntryList* MatchGraphEntry(vtkImageData* value);
int GetNumFollowingEntries();
GraphEntryList();
~GraphEntryList();
protected:
vtkImageData* GraphEntry;
bool IgnoreGraphMinGraphMax;
GraphEntryList* Next;
};
//ETX
class vtkScalarsToColors;
class vtkIndirectLookupTable;
class vtkLookupTable;
class VTK_SLICER_BASE_EXPORT vtkImageGraph : public vtkImageSource
{
public:
static vtkImageGraph *New();
vtkTypeMacro(vtkImageGraph,vtkImageSource);
void PrintSelf(ostream& os, vtkIndent indent);
vtkSetMacro(Dimension, int);
vtkGetMacro(Dimension, int);
// Description:
// Length of canvas/graph in X direction
vtkSetMacro(Xlength, int);
vtkGetMacro(Xlength, int);
// Description:
// Length of canvas/graph in Y direction
vtkSetMacro(Ylength, int);
vtkGetMacro(Ylength, int);
// Description:
// Global extrema over all the curves/regions
vtkGetMacro(GraphMax, vtkFloatingPointType);
vtkGetMacro(GraphMin, vtkFloatingPointType);
// Description:
// Define the value range of the background (i.e. LookupTable)
vtkSetVector2Macro(DataBackRange, int);
vtkGetVector2Macro(DataBackRange, int);
// Defines Background of Graph
virtual void SetLookupTable(vtkScalarsToColors*);
vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
// Description:
// Thickness for the curve
vtkSetMacro(CurveThickness, int);
vtkGetMacro(CurveThickness, int);
// Description:
// Ignore the GraphMin - GraphMax setting of the graph
// This only makes sense in 1D when we plot two curves with independent output range
// e.g. histogram and gaussian curve.
void SetIgnoreGraphMinGraphMax(vtkImageData *plot, int flag);
int GetIgnoreGraphMinGraphMax(vtkImageData *plot);
// Description:
// Set the color of a curve
void SetColor(vtkImageData *plot, vtkFloatingPointType color0, vtkFloatingPointType color1,vtkFloatingPointType color2);
vtkFloatingPointType* GetColor(vtkImageData *plot);
GraphEntryList* GetGraphList() { return &this->GraphList;}
// Description:
// Add a curve or region to the graph. It returns the ID of the data entry back
int AddCurveRegion(vtkImageData *plot,vtkFloatingPointType color0,vtkFloatingPointType color1,vtkFloatingPointType color2, int type, int ignore);
// Description:
// Delete a curve/region from the list -> if successfull returns 1 - otherwise 0;
int DeleteCurveRegion(int id);
// Description:
// Creates a Indirect Lookup Table just with white color => needed to genereate a simple background
vtkIndirectLookupTable* CreateUniformIndirectLookupTable();
// Description:
// Creates a Lookup Table - if you want to change the color of the IndirectLookupTable
// you first have to delete the old LookupTable and than recreate it with this function
// and assign it again to the IndirectLookupTable
vtkLookupTable* CreateLookupTable(vtkFloatingPointType SatMin, vtkFloatingPointType SatMax, vtkFloatingPointType ValMin, vtkFloatingPointType ValMax, vtkFloatingPointType HueMin, vtkFloatingPointType HueMax);
// Description:
// Change the color of the Indirect Table
void ChangeColorOfIndirectLookupTable(vtkIndirectLookupTable* Table, vtkFloatingPointType SatMin, vtkFloatingPointType SatMax, vtkFloatingPointType ValMin, vtkFloatingPointType ValMax, vtkFloatingPointType HueMin, vtkFloatingPointType HueMax);
unsigned long GetMTime();
protected:
vtkImageGraph();
void DeleteVariables();
~vtkImageGraph() {this->DeleteVariables();};
virtual void ExecuteInformation();
virtual void ExecuteData(vtkDataObject *data);
void Draw1DGraph(vtkImageData *data);
void Draw2DGraph(vtkImageData *data,int NumRegion, vtkFloatingPointType* CurveRegionMin, vtkFloatingPointType* CurveRegionMax);
void CalculateGraphMinGraphMax (vtkFloatingPointType* CurveRegionMin, vtkFloatingPointType* CurveRegionMax);
void DrawBackground(unsigned char *outPtr, int outIncY);
int Dimension;
int CurveThickness;
int Xlength;
int Ylength;
vtkFloatingPointType GraphMin;
vtkFloatingPointType GraphMax;
GraphEntryList GraphList;
vtkScalarsToColors *LookupTable;
int DataBackRange[2];
private:
vtkImageGraph(const vtkImageGraph&); // Not implemented.
void operator=(const vtkImageGraph&); // Not implemented.
};
//----------------------------------------------------------------------------
// from vtkImagePlot
inline void ConvertColor(vtkFloatingPointType *f, unsigned char *c)
{
c[0] = (int)(f[0] * 255.0);
c[1] = (int)(f[1] * 255.0);
c[2] = (int)(f[2] * 255.0);
}
//----------------------------------------------------------------------------
inline void DrawThickPoint (int Xpos, int Ypos, unsigned char color[3], unsigned char *outPtr,
int NumXScalar, int radius) {
unsigned char *ptr;
int x ,y;
Xpos -= radius;
for (x = -radius; x <= radius; x++) {
for (y = -radius; y <= radius; y++) SET_PIXEL(Xpos, y+Ypos, color);
Xpos ++;
}
}
//----------------------------------------------------------------------------
inline void DrawContinousLine(int xx1, int yy1, int xx2, int yy2, unsigned char color[3],
unsigned char *outPtr, int NumXScalar, int radius) {
vtkFloatingPointType slope;
int Yold = yy1, Ynew, x,y;
if (xx2 != xx1) {
slope = vtkFloatingPointType(yy2 - yy1)/vtkFloatingPointType(xx2 - xx1);
DrawThickPoint(xx1, yy1, color, outPtr, NumXScalar, radius);
for(x=xx1+1; x <= xx2; x++) {
Ynew = (int) slope*(x - xx1) + yy1;
if (slope < 0) for (y = Yold; y >= Ynew; y --) DrawThickPoint(x, y, color, outPtr, NumXScalar, radius);
else for (y = Yold; y <= Ynew; y ++) DrawThickPoint(x, y, color, outPtr, NumXScalar, radius);
Yold = Ynew;
}
} else {
if (yy1 > yy2) {
for (y = yy2; y <= yy1; y++) DrawThickPoint(xx1, y, color, outPtr, NumXScalar, radius);
} else for (y = yy1; y <= yy2; y++) DrawThickPoint(xx1, y, color, outPtr, NumXScalar, radius);
}
}
#endif
| [
"pieper@bwh.harvard.edu"
] | pieper@bwh.harvard.edu |
53b2e0749cb676c371d812fb7049b75757fa9f54 | 22a164b5b33f492ce109d640a906a94a5505b854 | /src/snackis/libs/db.hpp | d125df260781cd23b943bf676cfc0e02eaa2e9cb | [
"MIT"
] | permissive | codr4life/snackis | be6ccf784e04840b203e350b7052c69f03702226 | 936f663c919cd110757b9284fc9500001ebfe55a | refs/heads/master | 2020-04-01T05:51:56.214647 | 2018-10-24T15:59:03 | 2018-10-24T15:59:03 | 152,922,854 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 414 | hpp | #ifndef SNACKIS_LIB_DB_HPP
#define SNACKIS_LIB_DB_HPP
#include <snabl/lib.hpp>
#include "snackis/std.hpp"
namespace snackis::db {
struct ContextType;
struct TableType;
struct ColumnType;
}
namespace snackis::libs {
struct DB: snabl::Lib {
db::ContextType &context_type;
db::TableType &table_type;
db::ColumnType &column_type;
DB(snabl::Env &env);
void init();
};
}
#endif
| [
"codr4life@gmail.com"
] | codr4life@gmail.com |
dfd059ee1b982ea4b7373fc0357c90c0426315f4 | 78590c60dac38e9b585d0a277ea76944544e9bd8 | /src/was/Input.hxx | ed9a0280b7a55a1219b23dac2bd9b65fcc6d4512 | [] | no_license | sandeshdevadiga/beng-proxy | 05adedcf28c31ad5fbaa073f85e5d2d420e5b3ca | 436e8de75a28aa8c7b09f6ed97c1a1dfcf0fcfc4 | refs/heads/master | 2023-03-02T09:04:20.466704 | 2021-02-11T17:05:38 | 2021-02-11T17:10:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,783 | hxx | /*
* Copyright 2007-2021 CM4all GmbH
* All rights reserved.
*
* author: Max Kellermann <mk@cm4all.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include "util/Compiler.h"
#include <exception>
#include <stdint.h>
struct pool;
class FileDescriptor;
class EventLoop;
class UnusedIstreamPtr;
class WasInput;
class WasInputHandler {
public:
/**
* Istream::Close() has been called.
*
* The #Istream will be destroyed right after returning from this
* method; the method should abandon all pointers to it, and not
* call it.
*
* @param received the number of bytes received so far (includes
* data that hasn't been delivered to the #IstreamHandler yet)
*/
virtual void WasInputClose(uint64_t received) noexcept = 0;
/**
* All data was received from the pipe to the input buffer; we
* don't need the pipe anymore for this request.
*
* @return false if the #WasInput has been destroyed by this
* method
*/
virtual bool WasInputRelease() noexcept = 0;
/**
* Called right before reporting end-of-file to the #IstreamHandler.
*
* The #Istream will be destroyed right after returning from this
* method; the method should abandon all pointers to it, and not
* call it.
*/
virtual void WasInputEof() noexcept = 0;
/**
* There was an I/O error on the pipe. Called right before
* reporting the error to the #IstreamHandler.
*
* The #Istream will be destroyed right after returning from this
* method; the method should abandon all pointers to it, and not
* call it.
*/
virtual void WasInputError() noexcept = 0;
};
/**
* Web Application Socket protocol, input data channel library.
*/
WasInput *
was_input_new(struct pool &pool, EventLoop &event_loop, FileDescriptor fd,
WasInputHandler &handler) noexcept;
/**
* @param error the error reported to the istream handler
*/
void
was_input_free(WasInput *input, std::exception_ptr ep) noexcept;
static inline void
was_input_free_p(WasInput **input_p, std::exception_ptr ep) noexcept
{
WasInput *input = *input_p;
*input_p = nullptr;
was_input_free(input, ep);
}
/**
* Like was_input_free(), but assumes that was_input_enable() has not
* been called yet (no istream handler).
*/
void
was_input_free_unused(WasInput *input) noexcept;
static inline void
was_input_free_unused_p(WasInput **input_p) noexcept
{
WasInput *input = *input_p;
*input_p = nullptr;
was_input_free_unused(input);
}
UnusedIstreamPtr
was_input_enable(WasInput &input) noexcept;
/**
* Cancel the SocketEvent. This is sometimes necessary, because the
* destructor may do it too late (after the pipe lease has been
* released already).
*/
void
was_input_disable(WasInput &input) noexcept;
/**
* Set the new content length of this entity.
*
* @return false if the value is invalid (callback "abort" has been
* invoked in this case)
*/
bool
was_input_set_length(WasInput *input, uint64_t length) noexcept;
/**
* Signals premature end of this stream. This method attempts to
* recover and invokes the appropriate WasInputHandler method
* (WasInputRelease()+WasInputEof() or WasInputError()).
*
* @param length the total number of bytes the peer has written to the
* pipe
*/
void
was_input_premature(WasInput *input, uint64_t length) noexcept;
/**
* Same as above, but throw exception instead of reporting the error
* to the #IstreamHandler.
*/
gcc_noreturn
void
was_input_premature_throw(WasInput *input, uint64_t length);
void
was_input_enable_timeout(WasInput *input) noexcept;
| [
"mk@cm4all.com"
] | mk@cm4all.com |
4a920d7040fcaa9be2841fc53689d6ed3b79d39c | e91fba95d560650d0aa528ecc886f01ff7b6021a | /main.cpp | bf32f37931f1b82d2b1c53c70d561af260549b49 | [] | no_license | justinr636/sudoku-solver | 5249f5aa53b32c2b210447850951ea10d0194987 | aa0b1c48d37e075955d433d9dcf4d2cbcf53e184 | refs/heads/master | 2021-01-13T01:40:11.730837 | 2015-03-17T05:46:10 | 2015-03-17T05:46:10 | 32,373,893 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,881 | cpp | // Project 3B
//
// by Justin Ratra and Eric Dusel
//
// main.cpp
// main program file
//
#include <iostream>
#include <limits.h>
#include "d_matrix.h"
#include "d_except.h"
#include <list>
#include <fstream>
using namespace std;
// Declarations and functions for project #4
typedef int ValueType; // The type of the value in a cell
const int Blank = -1; // Indicates that a cell is blank
const int SquareSize = 3; // The number of cells in a small square
// (usually 3). The board has
// SquareSize^2 rows and SquareSize^2
// columns.
const int BoardSize = SquareSize * SquareSize;
const int MinValue = 1;
const int MaxValue = 9;
int numSolutions = 0;
#include "board.h"
int main()
{
ifstream fin;
// Read the sample grid from the file.
//string fileName = "sudoku.txt";
string fileName = "/Users/Justin/Documents/NEU/Optimization/Project 3/Project3B/project3b/sudoku3.txt";
//string fileName = "sudoku3.txt";
fin.open(fileName.c_str());
if (!fin)
{
cerr << "Cannot open " << fileName << endl;
exit(1);
}
try
{
board b1(SquareSize);
while (fin && fin.peek() != 'Z')
{
b1.initialize(fin);
b1.print();
b1.printConflicts(0); // print Row Conflicts
b1.printConflicts(1); // print Col Conflicts
b1.printConflicts(2); // print Sqr Conflicts
b1.solve();
// Check if board is solved
if(b1.isSolved())
{
cout << "Sudoku Solved" << endl;
//b1.printNumberOfRecursions();
b1.print();
}
else
{
cout << "Impossible to find Sudoku Solution" << endl;
}
}
}
catch (indexRangeError &ex)
{
cout << ex.what() << endl;
exit(1);
}
system("pause");
exit(0);
}
| [
"justinr636@gmail.com"
] | justinr636@gmail.com |
b7d4d664cb386cbcbe112421dfefcf89de0dda1d | decd67d133659ad03e0b8ba2ce3b75042a8a6275 | /Sidious/src/main/cpp/Subsystems/Vision.cpp | 1107bb5b7288da054d7c828a5dbe05106fea4987 | [] | no_license | SteelRidgeRobotics/2021Build | 7e5fe0f2caa608cdde476046e3d90b20f57a146e | 9f10527e245532595d6c1376427f68de095b47d9 | refs/heads/master | 2023-05-11T23:43:53.476740 | 2021-05-26T18:37:47 | 2021-05-26T18:37:47 | 371,134,365 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,341 | cpp | // RobotBuilder Version: 2.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// C++ from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
#include "Subsystems/Vision.h"
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=INCLUDES
#include "Commands/LimelightOff.h"
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=INCLUDES
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTANTS
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTANTS
Vision::Vision() : frc::Subsystem("Vision") {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
table = nt::NetworkTableInstance::GetDefault().GetTable("limelight");
}
void Vision::InitDefaultCommand() {
// Set the default command for a subsystem here.
// SetDefaultCommand(new MySpecialCommand());
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
SetDefaultCommand(new LimelightOff());
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
}
void Vision::Periodic() {
// Put code here to be run every loop
double tx = table->GetNumber("tx",0.0);
double ty = table->GetNumber("ty",0.0);
double ta = table->GetNumber("ta",0.0);
double ts = table->GetNumber("ts",0.0);
double tv = table->GetNumber("tv", 0.0);
}
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CMDPIDGETTERS
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CMDPIDGETTERS
// Put methods for controlling this subsystem
// here. Call these from Commands.
bool Vision::getTv()
{
double tv = table->GetNumber("tv", 0.0);
if (tv != 0.0)
{
return true;
}
else
{
return false;
}
}
double Vision::getTx()
{
double tx = table->GetNumber("tx", 0.0);
return tx;
}
double Vision::getTy()
{
double ty = table->GetNumber("ty", 0.0);
return ty;
}
double Vision::getTa()
{
double ta = table->GetNumber("ta", 0.0);
return ta;
}
double Vision::getTs()
{
double ts = table->GetNumber("ts", 0.0);
return ts;
}
double Vision::getDistance() //d = (h2(height of obj)-h1(height of camera)) / tan(a1(ang above)+a2(ang below to ground))
{
double h1 = CAMERAHEIGHT;
double h2 = TARGETHEIGHT;
double hDif = h2 - h1;
double a1 = CAMERAANGOFFSET;
double a2 = getTy();
double aSum = a1 + a2;
double distance = (hDif) / tan(aSum);
return distance;
}
void Vision::setCameraMode(int input)
{
table->PutNumber("cameraMode", input);
/*
Camera mode:
0 = use the LED Mode set in the current pipeline
1 = Driver Camera (Increase exposure, dsables vision procesesing)
*/
}
void Vision::setLedMode(int input)
{
table->PutNumber("ledMode", input);
/*
Led Mode:
1 = force off
2 = force blink
3 force on
*/
}
void Vision::setPipeline(int input)
{
table->PutNumber("pipeline", input);
/*
sets the pipeline, (0-9)
*/
}
void Vision::setStream(int input)
{
table->PutNumber("stream", input);
}
| [
"Nerf12402@users.noreply.github.com"
] | Nerf12402@users.noreply.github.com |
ee2c832853e31da7fd6bae1ba2acc0e392b467b7 | 3f9ffaf92c27b65b1a6eddd26d813dc784e36695 | /koom-common/kwai-unwind/src/main/cpp/libbacktrace/BacktraceCurrent.h | c8f5104321585235523786976a36677c7e5dc9ff | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"BSD-2-Clause"
] | permissive | KwaiAppTeam/KOOM | 7302d5a837a6fe2928077149ea323f18a81994dd | a5430e2db995fb67435936bb2bddf1b42f690578 | refs/heads/master | 2023-09-04T09:30:22.907004 | 2023-05-03T11:39:54 | 2023-05-03T11:39:54 | 285,517,634 | 2,900 | 388 | NOASSERTION | 2023-07-24T09:50:58 | 2020-08-06T08:34:04 | C++ | UTF-8 | C++ | false | false | 1,706 | h | /*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _LIBBACKTRACE_BACKTRACE_CURRENT_H
#define _LIBBACKTRACE_BACKTRACE_CURRENT_H
#include <stdint.h>
#include <sys/types.h>
#include <backtrace/Backtrace.h>
// The signal used to cause a thread to dump the stack.
#if defined(__GLIBC__)
// In order to run the backtrace_tests on the host, we can't use
// the internal real time signals used by GLIBC. To avoid this,
// use SIGRTMIN for the signal to dump the stack.
#define THREAD_SIGNAL SIGRTMIN
#else
#define THREAD_SIGNAL (__SIGRTMIN + 1)
#endif
class BacktraceMap;
class BacktraceCurrent : public Backtrace {
public:
BacktraceCurrent(pid_t pid, pid_t tid, BacktraceMap *map) : Backtrace(pid, tid, map) {}
virtual ~BacktraceCurrent() {}
size_t Read(uint64_t addr, uint8_t *buffer, size_t bytes) override;
bool ReadWord(uint64_t ptr, word_t *out_value) override;
bool Unwind(size_t num_ignore_frames, void *ucontext) override;
private:
bool UnwindThread(size_t num_ignore_frames);
virtual bool UnwindFromContext(size_t num_ignore_frames, void *ucontext) = 0;
};
#endif // _LIBBACKTRACE_BACKTRACE_CURRENT_H
| [
"wanglianbao@kuaishou.com"
] | wanglianbao@kuaishou.com |
76a9f19c7e0cda099bd111167606036c2f381363 | 8465159705a71cede7f2e9970904aeba83e4fc6c | /src_change_the_layout/modules/IEC61131-3/Conversion/DWORD/F_DWORD_TO_ULINT.cpp | 63ff8ea65ebda2c26ff7136ad70189b8f433d741 | [] | no_license | TuojianLYU/forte_IO_OPCUA_Integration | 051591b61f902258e3d0d6608bf68e2302f67ac1 | 4a3aed7b89f8a7d5f9554ac5937cf0a93607a4c6 | refs/heads/main | 2023-08-20T16:17:58.147635 | 2021-10-27T05:34:43 | 2021-10-27T05:34:43 | 419,704,624 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,138 | cpp | /*******************************************************************************
* Copyright (c) 2011 - 2013 ACIN, fortiss GmbH
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Monika Wenger
* - initial API and implementation and/or initial documentation
*******************************************************************************/
#include "F_DWORD_TO_ULINT.h"
#ifdef FORTE_ENABLE_GENERATED_SOURCE_CPP
#include "F_DWORD_TO_ULINT_gen.cpp"
#endif
DEFINE_FIRMWARE_FB(FORTE_F_DWORD_TO_ULINT, g_nStringIdF_DWORD_TO_ULINT)
const CStringDictionary::TStringId FORTE_F_DWORD_TO_ULINT::scm_anDataInputNames[] = {g_nStringIdIN};
const CStringDictionary::TStringId FORTE_F_DWORD_TO_ULINT::scm_anDataInputTypeIds[] = {g_nStringIdDWORD};
const CStringDictionary::TStringId FORTE_F_DWORD_TO_ULINT::scm_anDataOutputNames[] = {g_nStringIdOUT};
const CStringDictionary::TStringId FORTE_F_DWORD_TO_ULINT::scm_anDataOutputTypeIds[] = {g_nStringIdULINT};
const TForteInt16 FORTE_F_DWORD_TO_ULINT::scm_anEIWithIndexes[] = {0};
const TDataIOID FORTE_F_DWORD_TO_ULINT::scm_anEIWith[] = {0, 255};
const CStringDictionary::TStringId FORTE_F_DWORD_TO_ULINT::scm_anEventInputNames[] = {g_nStringIdREQ};
const TDataIOID FORTE_F_DWORD_TO_ULINT::scm_anEOWith[] = {0, 255};
const TForteInt16 FORTE_F_DWORD_TO_ULINT::scm_anEOWithIndexes[] = {0, -1};
const CStringDictionary::TStringId FORTE_F_DWORD_TO_ULINT::scm_anEventOutputNames[] = {g_nStringIdCNF};
const SFBInterfaceSpec FORTE_F_DWORD_TO_ULINT::scm_stFBInterfaceSpec = {
1, scm_anEventInputNames, scm_anEIWith, scm_anEIWithIndexes,
1, scm_anEventOutputNames, scm_anEOWith, scm_anEOWithIndexes, 1, scm_anDataInputNames, scm_anDataInputTypeIds,
1, scm_anDataOutputNames, scm_anDataOutputTypeIds,
0, 0
};
void FORTE_F_DWORD_TO_ULINT::executeEvent(int pa_nEIID){
if(scm_nEventREQID == pa_nEIID){
st_OUT() = DWORD_TO_ULINT(st_IN());
sendOutputEvent(scm_nEventCNFID);
}
}
| [
"tuojianlyu@gmail.com"
] | tuojianlyu@gmail.com |
133facfd77006de859be03c42c87a7d2c2b8f827 | 5d5a214f8433ceeb0a90712bfe8b61116b95267f | /Kha/Kinc/Sources/Kore/System.h | 51e81a05d6312fb603aa5959bebfef999dfb5cf6 | [
"Zlib",
"MIT"
] | permissive | 5Mixer/GGJ20 | 86cc3f42f29671889dddf6f25bfe641927cfa998 | a12a14d596ab150e8d96dda5a21defcd176f251f | refs/heads/master | 2022-12-09T09:55:03.928292 | 2020-02-02T03:52:50 | 2020-02-02T03:52:50 | 237,372,388 | 0 | 0 | MIT | 2022-12-05T06:26:15 | 2020-01-31T06:19:23 | C++ | UTF-8 | C++ | false | false | 1,980 | h | #pragma once
#include <Kore/Math/Vector.h>
#include <Kore/Window.h>
namespace Kore {
enum Orientation { OrientationLandscapeLeft, OrientationLandscapeRight, OrientationPortrait, OrientationPortraitUpsideDown, OrientationUnknown };
namespace System {
Window* init(const char* name, int width, int height, WindowOptions* win = nullptr, FramebufferOptions* frame = nullptr);
const char* name();
int windowWidth(int id = 0);
int windowHeight(int id = 0);
bool handleMessages();
vec2i mousePos();
void showKeyboard();
void hideKeyboard();
bool showsKeyboard();
void loadURL(const char* title);
const char* language();
void vibrate(int ms);
const char* systemId();
const char* savePath();
const char** videoFormats();
float safeZone();
bool automaticSafeZone();
void setSafeZone(float value);
typedef u64 ticks;
double frequency();
ticks timestamp();
double time();
void start();
bool frame();
void stop();
void setKeepScreenOn(bool on);
void login();
void unlockAchievement(int id);
void setCallback(void (*value)());
void setForegroundCallback(void (*value)());
void setResumeCallback(void (*value)());
void setPauseCallback(void (*value)());
void setBackgroundCallback(void (*value)());
void setShutdownCallback(void (*value)());
void setOrientationCallback(void (*value)(Orientation));
void setDropFilesCallback(void (*value)(wchar_t*));
void setCutCallback(char* (*value)());
void setCopyCallback(char* (*value)());
void setPasteCallback(void (*value)(char*));
void setLoginCallback(void (*value)());
void setLogoutCallback(void (*value)());
void _shutdown();
void _callback();
void _foregroundCallback();
void _resumeCallback();
void _pauseCallback();
void _backgroundCallback();
void _shutdownCallback();
void _orientationCallback(Orientation);
void _dropFilesCallback(wchar_t*);
char* _cutCallback();
char* _copyCallback();
void _pasteCallback(char*);
}
}
| [
"danielblaker@protonmail.com"
] | danielblaker@protonmail.com |
a3f81098777a7c7d969c5e292ea917ebd9a11091 | 88d10dc97e31391fb66f4c44f462d8efd9762aa4 | /include/hud/utils.h | 586880872a2ce5915da3d275d8a00b7c7d7dedbf | [
"MIT"
] | permissive | XanxusCrypto/hud | 31a5d8ef2641461e50c07771d703fbb88fe809ba | 379dab526041ab844f4d306aa6df2d708419a298 | refs/heads/master | 2023-04-29T10:03:02.510747 | 2021-05-12T16:18:19 | 2021-05-12T16:18:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 305 | h | #ifndef H_UTILS
#define H_UTILS
#include <hud/geometry.h>
namespace hud::utils {
bool intersects(const Point& p, const Rect&rect);
Point toNormalizedDeviceCoordinates(const Point& p, const Rect& rect);
Point scaleToView(const Point& p, const Rect& source, const Rect& target);
void shutdown();
}
#endif
| [
"kekeblom@gmail.com"
] | kekeblom@gmail.com |
5725ff5861306da7be675a00665e4e4fbf0381f2 | 2966091170e6075386c9a6e8de8967b5d224875f | /pp5/mips.cc | d56d2e38dd88377a4ee241eb8b3998ea388c1991 | [] | no_license | alfonsokim/compilers | 0c060aa527f28a887c82abdb64b42256a92f70a6 | 56c7f150fb9a27a93184482f0a9e36ed2e66b48c | refs/heads/master | 2021-01-02T08:40:15.971953 | 2015-09-18T22:25:04 | 2015-09-18T22:25:04 | 16,387,525 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 26,305 | cc | /* File: mips.cc
* -------------
* Implementation of Mips class, which is responsible for TAC->MIPS
* translation, register allocation, etc.
*
* Julie Zelenski academic year 2001-02 for CS143
* Loosely based on some earlier work by Steve Freund
*
* A simple final code generator to translate Tac to MIPS.
* It uses simplistic algorithms, in particular, its register handling
* and spilling strategy is inefficient to the point of begin mocked
* by elementary school children.
*/
#include "mips.h"
#include <stdarg.h>
#include <string.h>
/* Method: GetRegister
* -------------------
* Given a location for a current var, a reason (ForRead or ForWrite)
* and up to two registers to avoid, this method will assign
* to a var to register trying these alternatives in order:
* 1) if that var is already in a register ("same" is determined
* by matching name and same scope), we use that one
* 2) find an empty register to use for the var
* 3) find an in-use register that is not dirty. We don't need
* to write value back to memory since it's clean, so we just
* replace with the new var
* 4) spill an in-use, dirty register, by writing its contents to
* memory and then replace with the new var
* For steps 3 & 4, we respect the registers given to avoid (ie the
* other operands in this operation). The register descriptors are
* updated to show the new state of the world. If for read, we
* load the current value from memory into the register. If for
* write, we mark the register as dirty (since it is getting a
* new value).
*/
Mips::Register Mips::GetRegister(Location *var,
Reason reason,
Register avoid1,
Register avoid2)
{
Register reg;
if (!FindRegisterWithContents(var, reg)) {
if (!FindRegisterWithContents(NULL, reg)) {
reg = SelectRegisterToSpill(avoid1, avoid2);
SpillRegister(reg);
}
regs[reg].var = var;
if (reason == ForRead) { // load current value
Assert(var->GetOffset() % 4 == 0); // all variables are 4 bytes
const char *offsetFromWhere = var->GetSegment() == fpRelative? regs[fp].name : regs[gp].name;
Emit("lw %s, %d(%s)\t# load %s from %s%+d into %s", regs[reg].name,
var->GetOffset(), offsetFromWhere, var->GetName(),
offsetFromWhere, var->GetOffset(), regs[reg].name);
regs[reg].isDirty = false;
}
}
if (reason == ForWrite){
regs[reg].isDirty = true;
}
return reg;
}
// Two covers for the above method to make it slightly more
// convenient to call it
Mips::Register Mips::GetRegister(Location *var, Register avoid1)
{
return GetRegister(var, ForRead, avoid1, zero);
}
Mips::Register Mips::GetRegisterForWrite(Location *var, Register avoid1,
Register avoid2)
{
return GetRegister(var, ForWrite, avoid1, avoid2);
}
// Helper to check if two variable locations are one and the same
// (same name, segment, and offset)
static bool LocationsAreSame(Location *var1, Location *var2)
{
return (var1 == var2 ||
(var1 && var2
&& !strcmp(var1->GetName(), var2->GetName())
&& var1->GetSegment() == var2->GetSegment()
&& var1->GetOffset() == var2->GetOffset())
);
}
/* Method: FindRegisterWithContents
* --------------------------------
* Searches the descriptors for one with contents var. Assigns
* register by reference, and returns true/false on whether match found.
*/
bool Mips::FindRegisterWithContents(Location *var, Register& reg)
{
for (reg = zero; reg < NumRegs; reg = Register(reg+1)){
if (regs[reg].isGeneralPurpose && LocationsAreSame(var, regs[reg].var)) {
return true;
}
}
return false;
}
/* Method: SelectRegisterToSpill
* -----------------------------
* Chooses an in-use register to replace with a new variable. We
* prefer to replace a non-dirty once since we would not have to
* write its contents back to memory, so the first loop searches
* for a clean one. If none found, we take a dirty one. In both
* loops we deliberately won't choose either of the registers we
* were asked to avoid. We track the last dirty register spilled
* and advance on each subsequent spill as a primitive means of
* trying to not throw out things we just loaded and thus are likely
* to need.
*/
Mips::Register Mips::SelectRegisterToSpill(Register avoid1, Register avoid2)
{
// first hunt for a non-dirty one, since no work to spill
for (Register i = zero; i < NumRegs; i = (Register)(i+1)) {
if (i != avoid1 &&
i != avoid2 &&
regs[i].isGeneralPurpose &&
!regs[i].isDirty) {
return i;
}
}
do { // otherwise just pick the next usuable register
lastUsed = (Register)((lastUsed + 1) % NumRegs);
} while (lastUsed == avoid1 || lastUsed == avoid2 ||
!regs[lastUsed].isGeneralPurpose);
return lastUsed;
}
/* Method: SpillRegister
* ---------------------
* "Empties" register. If variable is currently slaved in this register
* and its contents are out of synch with memory (isDirty), we write back
* the current contents to memory. We then clear the descriptor so we
* realize the register is empty.
*/
void Mips::SpillRegister(Register reg)
{
Location *var = regs[reg].var;
if (var && regs[reg].isDirty) {
const char *offsetFromWhere = var->GetSegment() == fpRelative? regs[fp].name : regs[gp].name;
Assert(var->GetOffset() % 4 == 0); // all variables are 4 bytes in size
Emit("# En SpillRegister");
Emit("sw %s, %d(%s)\t# spill %s from %s to %s%+d", regs[reg].name,
var->GetOffset(), offsetFromWhere, var->GetName(), regs[reg].name,
offsetFromWhere,var->GetOffset()
);
}
regs[reg].var = NULL;
}
/* Method: SpillAllDirtyRegisters
* ------------------------------
* Used before flow of control change (branch, label, jump, etc.) to
* save contents of all dirty registers. This synchs the contents of
* the registers with the memory locations for the variables.
*/
void Mips::SpillAllDirtyRegisters()
{
Register i;
for (i = zero; i < NumRegs; i = Register(i+1)) {
if (regs[i].var && regs[i].isDirty) break;
}
for (i = zero; i < NumRegs; i = Register(i+1)) {
SpillRegister(i);
}
}
/* Method: SpillForEndFunction
* ---------------------------
* Slight optimization on the above method used when spilling for
* end of function (return/fall off). In such a case, we do not
* need to save values for locals, temps, and parameters because the
* function is about to exit and those variables are going away
* immediately, so no need to bother with updating contents.
*/
void Mips::SpillForEndFunction()
{
for (Register i = zero; i < NumRegs; i = Register(i+1)) {
if (regs[i].isGeneralPurpose && regs[i].var) {
if (regs[i].var->GetSegment() == gpRelative)
SpillRegister(i);
} else {
regs[i].var = NULL;
}
}
}
/* Method: Emit
* ------------
* General purpose helper used to emit assembly instructions in
* a reasonable tidy manner. Takes printf-style formatting strings
* and variable arguments.
*/
void Mips::Emit(const char *fmt, ...)
{
va_list args;
char buf[1024];
va_start(args, fmt);
vsprintf(buf, fmt, args);
va_end(args);
if (buf[strlen(buf) - 1] != ':') printf("\t"); // don't tab in labels
printf("%s", buf);
if (buf[strlen(buf)-1] != '\n') printf("\n"); // end with a newline
}
/* Method: EmitLoadConstant
* ------------------------
* Used to assign variable an integer constant value. Slaves dst into
* a register (using GetRegister above) and then emits an li (load
* immediate) instruction with the constant value.
*/
void Mips::EmitLoadConstant(Location *dst, int val)
{
Register reg = GetRegisterForWrite(dst);
Emit("li %s, %d\t\t# load constant value %d into %s", regs[reg].name,
val, val, regs[reg].name);
}
/* Method: EmitLoadStringConstant
* ------------------------------
* Used to assign a variable a pointer to string constant. Emits
* assembly directives to create a new null-terminated string in the
* data segment and assigns it a unique label. Slaves dst into a register
* and loads that label address into the register.
*/
void Mips::EmitLoadStringConstant(Location *dst, const char *str)
{
static int strNum = 1;
char label[16];
sprintf(label, "_string%d", strNum++);
Emit(".data\t\t\t# create string constant marked with label");
Emit("%s: .asciiz %s", label, str);
Emit(".text");
EmitLoadLabel(dst, label);
}
/* Method: EmitLoadLabel
* ---------------------
* Used to load a label (ie address in text/data segment) into a variable.
* Slaves dst into a register and emits an la (load address) instruction
*/
void Mips::EmitLoadLabel(Location *dst, const char *label)
{
Register reg = GetRegisterForWrite(dst);
Emit("la %s, %s\t# load label", regs[reg].name, label);
}
/* Method: EmitCopy
* ----------------
* Used to copy the value of one variable to another. Slaves both
* src and dst into registers and then emits a move instruction to
* copy the contents from src to dst.
*/
void Mips::EmitCopy(Location *dst, Location *src)
{
Register rSrc = GetRegister(src), rDst = GetRegisterForWrite(dst, rSrc);
Emit("move %s, %s\t\t# copy value", regs[rDst].name, regs[rSrc].name);
}
/* Method: EmitLoad
* ----------------
* Used to assign dst the contents of memory at the address in reference,
* potentially with some positive/negative offset (defaults to 0).
* Slaves both ref and dst to registers, then emits a lw instruction
* using constant-offset addressing mode y(rx) which accesses the address
* at an offset of y bytes from the address currently contained in rx.
*/
void Mips::EmitLoad(Location *dst, Location *reference, int offset)
{
Register rSrc = GetRegister(reference), rDst = GetRegisterForWrite(dst, rSrc);
Emit("lw %s, %d(%s) \t# load with offset", regs[rDst].name,
offset, regs[rSrc].name);
}
/* Method: EmitStore
* -----------------
* Used to write value to memory at the address in reference,
* potentially with some positive/negative offset (defaults to 0).
* Slaves both ref and dst to registers, then emits a sw instruction
* using constant-offset addressing mode y(rx) which writes to the address
* at an offset of y bytes from the address currently contained in rx.
*/
void Mips::EmitStore(Location *reference, Location *value, int offset)
{
Register rVal = GetRegister(value), rRef = GetRegister(reference, rVal);
Emit("sw %s, %d(%s) \t# store with offset",
regs[rVal].name, offset, regs[rRef].name);
}
/* Method: EmitBinaryOp
* --------------------
* Used to perform a binary operation on 2 operands and store result
* in dst. All binary forms for arithmetic, logical, relational, equality
* use this method. Slaves both operands and dst to registers, then
* emits the appropriate instruction by looking up the mips name
* for the particular op code.
*/
void Mips::EmitBinaryOp(BinaryOp::OpCode code, Location *dst,
Location *op1, Location *op2)
{
Register rLeft = GetRegister(op1), rRight = GetRegister(op2, rLeft);
Register rDst = GetRegisterForWrite(dst, rLeft, rRight);
Emit("%s %s, %s, %s\t", NameForTac(code), regs[rDst].name,
regs[rLeft].name, regs[rRight].name);
}
/* Method: EmitLabel
* -----------------
* Used to emit label marker. Before a label, we spill all registers since
* we can't be sure what the situation upon arriving at this label (ie
* starts new basic block), and rather than try to be clever, we just
* wipe the slate clean.
*/
void Mips::EmitLabel(const char *label)
{
SpillAllDirtyRegisters();
Emit("# En EmitLabel");
Emit("%s:", label);
}
/* Method: EmitGoto
* ----------------
* Used for an unconditional transfer to a named label. Before a goto,
* we spill all registers, since we don't know what the situation is
* we are heading to (ie this ends current basic block) and rather than
* try to be clever, we just wipe slate clean.
*/
void Mips::EmitGoto(const char *label)
{
SpillAllDirtyRegisters();
Emit("b %s\t\t# unconditional branch", label);
}
/* Method: EmitIfZ
* ---------------
* Used for a conditional branch based on value of test variable.
* We slave test var to register and use in the emitted test instruction,
* either beqz. See comments above on Goto for why we spill
* all registers here.
*/
void Mips::EmitIfZ(Location *test, const char *label)
{
Register testReg = GetRegister(test);
SpillAllDirtyRegisters();
Emit("beqz %s, %s\t# branch if %s is zero ", regs[testReg].name, label,
test->GetName());
}
/* Method: EmitParam
* -----------------
* Used to push a parameter on the stack in anticipation of upcoming
* function call. Decrements the stack pointer by 4. Slaves argument into
* register and then stores contents to location just made at end of
* stack.
*/
void Mips::EmitParam(Location *arg)
{
Emit("subu $sp, $sp, 4\t# decrement sp to make space for param");
Register reg = GetRegister(arg);
Emit("sw %s, 4($sp)\t# copy param value to stack", regs[reg].name);
}
/* Method: EmitCallInstr
* ---------------------
* Used to effect a function call. All necessary arguments should have
* already been pushed on the stack, this is the last step that
* transfers control from caller to callee. See comments on Goto method
* above for why we spill all registers before making the jump. We issue
* jal for a label, a jalr if address in register. Both will save the
* return address in $ra. If there is an expected result passed, we slave
* the var to a register and copy function return value from $v0 into that
* register.
*/
void Mips::EmitCallInstr(Location *result, const char *fn, bool isLabel)
{
Emit("# Antes de vaciar registros");
SpillAllDirtyRegisters();
Emit("# Despues de vaciar registros");
Emit("%s %-15s\t# jump to function", isLabel? "jal": "jalr", fn);
if (result != NULL) {
Register r1 = GetRegisterForWrite(result);
Emit("move %s, %s\t\t# copy function return value from $v0", regs[r1].name, regs[v0].name);
}
}
// Two covers for the above method for specific LCall/ACall variants
void Mips::EmitLCall(Location *dst, const char *label)
{
EmitCallInstr(dst, label, true);
}
void Mips::EmitACall(Location *dst, Location *fn)
{
EmitCallInstr(dst, regs[GetRegister(fn)].name, false);
}
/*
* We remove all parameters from the stack after a completed call
* by adjusting the stack pointer upwards.
*/
void Mips::EmitPopParams(int bytes)
{
if (bytes != 0) {
Emit("add $sp, $sp, %d\t# pop params off stack", bytes);
}
}
/* Method: EmitReturn
* ------------------
* Used to emit code for returning from a function (either from an
* explicit return or falling off the end of the function body).
* If there is an expression to return, we slave that variable into
* a register and move its contents to $v0 (the standard register for
* function result). Before exiting, we spill dirty registers (to
* commit contents of slaved registers to memory, necessary for
* consistency, see comments at SpillForEndFunction above). We also
* do the last part of the callee's job in function call protocol,
* which is to remove our locals/temps from the stack, remove
* saved registers ($fp and $ra) and restore previous values of
* $fp and $ra so everything is returned to the state we entered.
* We then emit jr to jump to the saved $ra.
*/
void Mips::EmitReturn(Location *returnVal)
{
if (returnVal != NULL) {
Emit("move $v0, %s\t\t# assign return value into $v0",
regs[GetRegister(returnVal)].name);
}
SpillForEndFunction();
Emit("move $sp, $fp\t\t# pop callee frame off stack");
Emit("lw $ra, -4($fp)\t# restore saved ra");
Emit("lw $fp, 0($fp)\t# restore saved fp");
Emit("jr $ra\t\t# return from function");
}
/* Method: EmitBeginFunction
* -------------------------
* Used to handle the callee's part of the function call protocol
* upon entering a new function. We decrement the $sp to make space
* and then save the current values of $fp and $ra (since we are
* going to change them), then set up the $fp and bump the $sp down
* to make space for all our locals/temps.
*/
void Mips::EmitBeginFunction(int stackFrameSize)
{
Assert(stackFrameSize >= 0);
Emit("subu $sp, $sp, 8\t# decrement sp to make space to save ra, fp");
Emit("sw $fp, 8($sp)\t# save fp");
Emit("sw $ra, 4($sp)\t# save ra");
Emit("addiu $fp, $sp, 8\t# set up new fp");
if (stackFrameSize != 0){
Emit("subu $sp, $sp, %d\t# decrement sp to make space for locals/temps",
stackFrameSize);
}
}
/* Method: EmitEndFunction
* -----------------------
* Used to end the body of a function. Does an implicit return in fall off
* case to clean up stack frame, return to caller etc. See comments on
* EmitReturn above.
*/
void Mips::EmitEndFunction()
{
Emit("# (below handles reaching end of fn body with no explicit return)");
EmitReturn(NULL);
}
/* Method: EmitVTable
* ------------------
* Used to layout a vtable. Uses assembly directives to set up new
* entry in data segment, emits label, and lays out the function
* labels one after another.
*/
void Mips::EmitVTable(const char *label, List<const char*> *methodLabels)
{
Emit(".data");
Emit(".align 2");
Emit("%s:\t\t# label for class %s vtable", label, label);
for (int i = 0; i < methodLabels->NumElements(); i++) {
Emit(".word %s\n", methodLabels->Nth(i));
}
Emit(".text");
}
/* Method: EmitPreamble
* --------------------
* Used to emit the starting sequence needed for a program. Not much
* here, but need to indicate what follows is in text segment and
* needs to be aligned on word boundary. main is our only global symbol.
*/
void Mips::EmitPreamble()
{
Emit("# standard Decaf preamble ");
Emit(".data");
Emit("%s:", "TRUE");
Emit(".asciiz \"true\"");
Emit("%s:", "FALSE");
Emit(".asciiz \"false\"");
Emit("\n");
Emit(".text");
Emit(".align 2");
Emit(".globl main");
Emit(".globl _PrintInt");
Emit(".globl _PrintString");
Emit(".globl _PrintBool");
Emit(".globl _Alloc");
Emit(".globl _StringEqual");
Emit(".globl _Halt");
Emit(".globl _ReadInteger");
Emit(".globl _ReadLine");
Emit("# Fin EmitPreamble\n");
}
void Mips::EmitPrintInt()
{
Emit("%s:", "_PrintInt");
Emit("subu $sp, $sp, 8 \t# decrement so to make space to save ra, fp");
Emit("sw $fp, 8($sp) \t# save fp");
Emit("sw $ra, 4($sp) \t# save ra");
Emit("addiu $fp, $sp, 8 \t# set up new fp");
Emit("li $v0, 1 \t# system call code for print_int");
Emit("lw $a0, 4($fp)");
Emit("syscall");
Emit("move $sp, $fp");
Emit("lw $ra, -4($fp)");
Emit("lw $fp, 0($fp)");
Emit("jr $ra");
Emit("\n");
}
void Mips::EmitPrintString()
{
Emit("%s:", "_PrintString");
Emit("subu $sp, $sp, 8");
Emit("sw $fp, 8($sp)");
Emit("sw $ra, 4($sp)");
Emit("addiu $fp, $sp, 8");
Emit("li $v0, 4 \t# system call for print_str");
Emit("lw $a0, 4($fp)");
Emit("syscall");
Emit("move $sp, $fp");
Emit("lw $ra, -4($fp)");
Emit("lw $fp, 0($fp)");
Emit("jr $ra");
Emit("\n");
}
void Mips::EmitPrintBool()
{
Emit("%s:", "_PrintBool");
Emit("subu $sp, $sp, 8");
Emit("sw $fp, 8($sp)");
Emit("sw $ra, 4($sp)");
Emit("addiu $fp, $sp, 8");
Emit("lw $t1, 4($fp)");
Emit("blez $t1, fbr");
Emit("li $v0, 4 \t# system call for print_str");
Emit("la $a0, TRUE");
Emit("syscall");
Emit("b end");
Emit("%s:", "fbr");
Emit("li $v0, 4 \t# system call for print_str");
Emit("la $a0, FALSE");
Emit("syscall");
Emit("%s:", "end");
Emit("move $sp, $fp");
Emit("lw $ra, -4($fp)");
Emit("lw $fp, 0($fp)");
Emit("jr $ra");
Emit("\n");
}
void Mips::EmitAlloc()
{
Emit("%s:", "_Alloc");
Emit("subu $sp, $sp, 8");
Emit("sw $fp, 8($sp)");
Emit("sw $ra, 4($sp)");
Emit("addiu $fp, $sp, 8");
Emit("li $v0, 9 \t# system call for sbrk");
Emit("lw $a0, 4($fp)");
Emit("syscall");
Emit("move $sp, $fp");
Emit("lw $ra, -4($fp)");
Emit("lw $fp, 0($fp)");
Emit("jr $ra");
Emit("\n");
}
void Mips::EmitStringEqual()
{
Emit("%s:", "_StringEqual");
Emit("subu $sp, $sp, 8");
Emit("sw $fp, 8($sp)");
Emit("sw $ra, 4($sp)");
Emit("addiu $fp, $sp, 8");
Emit("subu $sp, $sp, 4\t# decrement sp to make space for return value");
Emit("li $v0, 0");
Emit("#Determine length string 1");
Emit("lw $t0, 4($fp)");
Emit("li $t3, 0");
Emit("%s:", "bloop1");
Emit("lb $t5, ($t0)");
Emit("beqz $t5, eloop1");
Emit("addi $t0, 1");
Emit("addi $t3, 1");
Emit("b bloop1");
Emit("%s:", "eloop1");
Emit("#Determine length string 2");
Emit("lw $t1, 8($fp)");
Emit("li $t4, 0");
Emit("%s:", "bloop2");
Emit("lb $t5, ($t1)");
Emit("beqz $t5, eloop2");
Emit("addi $t1, 1");
Emit("addi $t4, 1");
Emit("b bloop2");
Emit("%s:", "eloop2");
Emit("bne $t3, $t4, end1\t# check if string lengths are the same");
Emit("lw $t0, 4($fp)");
Emit("lw $t1, 8($fp)");
Emit("li $t3, 0");
Emit("%s:", "bloop3");
Emit("lb $t5, ($t0)");
Emit("lb $t6, ($t1)");
Emit("bne $t5, $t6, end1");
Emit("addi $t3, 1");
Emit("addi $t0, 1");
Emit("addi $t1, 1");
Emit("bne $t3, $t4, bloop3");
Emit("%s:", "eloop3");
Emit("li $v0, 1");
Emit("%s:", "end1");
Emit("move $sp, $fp");
Emit("lw $ra, -4($fp)");
Emit("lw $fp, 0($fp)");
Emit("jr $ra");
Emit("\n");
}
void Mips::EmitHalt()
{
Emit("%s:", "_Halt");
Emit("li $v0, 10");
Emit("syscall");
Emit("\n");
}
void Mips::EmitReadInteger()
{
Emit("%s:", "_ReadInteger");
Emit("subu $sp, $sp, 8");
Emit("sw $fp, 8($sp)");
Emit("sw $ra, 4($sp)");
Emit("addiu $fp, $sp, 8");
Emit("subu $sp, $sp, 4");
Emit("li $v0, 5");
Emit("syscall");
Emit("move $sp, $fp");
Emit("lw $ra, -4($fp)");
Emit("lw $fp, 0($fp)");
Emit("jr $ra");
Emit("\n");
}
void Mips::EmitReadLine()
{
Emit("%s:", "_ReadLine");
Emit("subu $sp, $sp, 8");
Emit("sw $fp, 8($sp)");
Emit("sw $ra, 4($sp)");
Emit("addiu $fp, $sp, 8");
Emit("li $t0, 40");
Emit("subu $sp, $sp, 4");
Emit("sw $t0, 4($sp)");
Emit("jal _Alloc");
Emit("move $t0, $v0");
Emit("li $a1, 40");
Emit("move $a0, $t0");
Emit("li $v0, 8");
Emit("syscall");
Emit("move $t1, $t0");
Emit("%s:", "bloop4");
Emit("lb $t5, ($t1)");
Emit("beqz $t5, eloop4");
Emit("addi $t1, 1");
Emit("b bloop4");
Emit("%s:", "eloop4");
Emit("addi $t1, -1"); // erase newline
Emit("li $t6, 0");
Emit("sb $t6, ($t1)");
Emit("move $v0, $t0");
Emit("move $sp, $fp");
Emit("lw $ra, -4($fp)");
Emit("lw $fp, 0($fp)");
Emit("jr $ra");
Emit("\n");
}
/* Method: NameForTac
* ------------------
* Returns the appropriate MIPS instruction (add, seq, etc.) for
* a given BinaryOp:OpCode (BinaryOp::Add, BinaryOp:Equals, etc.).
* Asserts if asked for name of an unset/out of bounds code.
*/
const char *Mips::NameForTac(BinaryOp::OpCode code)
{
Assert(code >=0 && code < BinaryOp::NumOps);
const char *name = mipsName[code];
Assert(name != NULL);
return name;
}
/* Constructor
* ----------
* Constructor sets up the mips names and register descriptors to
* the initial starting state.
*/
Mips::Mips() {
mipsName[BinaryOp::Add] = "add";
mipsName[BinaryOp::Sub] = "sub";
mipsName[BinaryOp::Mul] = "mul";
mipsName[BinaryOp::Div] = "div";
mipsName[BinaryOp::Mod] = "rem";
mipsName[BinaryOp::Eq] = "seq";
mipsName[BinaryOp::Less] = "slt";
mipsName[BinaryOp::And] = "and";
mipsName[BinaryOp::Or] = "or";
regs[zero] = (RegContents){false, NULL, "$zero", false};
regs[at] = (RegContents){false, NULL, "$at", false};
regs[v0] = (RegContents){false, NULL, "$v0", false};
regs[v1] = (RegContents){false, NULL, "$v1", false};
regs[a0] = (RegContents){false, NULL, "$a0", false};
regs[a1] = (RegContents){false, NULL, "$a1", false};
regs[a2] = (RegContents){false, NULL, "$a2", false};
regs[a3] = (RegContents){false, NULL, "$a3", false};
regs[k0] = (RegContents){false, NULL, "$k0", false};
regs[k1] = (RegContents){false, NULL, "$k1", false};
regs[gp] = (RegContents){false, NULL, "$gp", false};
regs[sp] = (RegContents){false, NULL, "$sp", false};
regs[fp] = (RegContents){false, NULL, "$fp", false};
regs[ra] = (RegContents){false, NULL, "$ra", false};
regs[t0] = (RegContents){false, NULL, "$t0", true};
regs[t1] = (RegContents){false, NULL, "$t1", true};
regs[t2] = (RegContents){false, NULL, "$t2", true};
regs[t3] = (RegContents){false, NULL, "$t3", true};
regs[t4] = (RegContents){false, NULL, "$t4", true};
regs[t5] = (RegContents){false, NULL, "$t5", true};
regs[t6] = (RegContents){false, NULL, "$t6", true};
regs[t7] = (RegContents){false, NULL, "$t7", true};
regs[t8] = (RegContents){false, NULL, "$t8", true};
regs[t9] = (RegContents){false, NULL, "$t9", true};
regs[s0] = (RegContents){false, NULL, "$s0", true};
regs[s1] = (RegContents){false, NULL, "$s1", true};
regs[s2] = (RegContents){false, NULL, "$s2", true};
regs[s3] = (RegContents){false, NULL, "$s3", true};
regs[s4] = (RegContents){false, NULL, "$s4", true};
regs[s5] = (RegContents){false, NULL, "$s5", true};
regs[s6] = (RegContents){false, NULL, "$s6", true};
regs[s7] = (RegContents){false, NULL, "$s7", true};
lastUsed = zero;
}
const char *Mips::mipsName[BinaryOp::NumOps];
| [
"alfonsokim84@gmail.com"
] | alfonsokim84@gmail.com |
e7f04561dcb51375d55039f947e867432a89e730 | b1c4be5357d95a8bef78dab271189a4161ffbd2c | /Practice Contests/Practice Contest 1/Conservation.cpp | e0324b2672dd9fbac10087dc763e8ce7de2f90f7 | [] | no_license | Shaker2001/Algorithms-Library | faa0434ce01ad55d4b335c109f4f85736a6869ed | 1aa09469ca434f6138547592ce49060d4400e349 | refs/heads/master | 2023-03-16T04:41:27.367439 | 2017-11-13T00:41:55 | 2017-11-13T00:41:55 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,566 | cpp | #include<stdio.h>
#include<string.h>
#include<vector>
using namespace std;
int N, M;
int lab[100001];
vector<int> graph[100001];
int depend[100001];
int vis[100001];
vector<int> init1, init2, cur1, cur2;
int counter(int turn){
memset(vis,0,sizeof vis);
if (!turn)
cur1 = vector<int> (init1);
else cur2 = vector<int> (init2);
int num = 0, lps = 0;
while(num<N){
lps++;
if (!turn){
if (cur1.empty())
return 1000000000;
cur2.clear();
for (int i=0;i<cur1.size();i++) vis[cur1[i]] = 1, num++;
for (int i=0;i<cur1.size();i++){
//printf("PROCESS %d: %d %d\n", lps,num,cur1[i]);
for (int j=0;j<graph[cur1[i]].size();j++){
int v = graph[cur1[i]][j];
depend[v]--;
if (!vis[v]&&depend[v]<=0){
if (lab[v]==1){
cur1.push_back(v);
vis[v] = 1;
num++;
}
else cur2.push_back(v);
}
}
}
}
else {
if (cur2.empty())
return 1000000000;
cur1.clear();
for (int i=0;i<cur2.size();i++) vis[cur2[i]] = 1, num++;
for (int i=0;i<cur2.size();i++){
for (int j=0;j<graph[cur2[i]].size();j++){
int v = graph[cur2[i]][j];
depend[v]--;
if (!vis[v]&&depend[v]<=0){
if (lab[v]==2){
cur2.push_back(v);
vis[v] = 1;
num++;
}
else cur1.push_back(v);
}
}
}
}
}
return lps;
}
int main(){
int t, a, b;
scanf("%d", &t);
while(t--){
memset(depend,0,sizeof depend);
scanf("%d %d", &N, &M);
for (int i=0;i<N;i++){
scanf("%d", &lab[i]);
graph[i].clear();
}
for (int i=0;i<M;i++){
scanf("%d %d", &a, &b);a--;b--;
depend[b]++;
graph[a].push_back(b);
}
for (int i=0;i<N;i++){
if (depend[i]==0){
if (lab[i]==1)
init1.push_back(i);
else init2.push_back(i);
}
}
printf("%d\n", min(counter(0), counter(1)));
}
}
| [
"malatawy15@gmail.com"
] | malatawy15@gmail.com |
4381c0a7d871d77bc79e8e9bf1ba6ecac3be5647 | 77170cbcd2c87952763f770d50abd2d8b671f9d2 | /aws-cpp-sdk-email/include/aws/email/model/DeleteVerifiedEmailAddressRequest.h | 85479ac9896d59ff1fe202b0f989b032b1190a32 | [
"JSON",
"MIT",
"Apache-2.0"
] | permissive | bittorrent/aws-sdk-cpp | 795f1cdffb92f6fccb4396d8f885f7bf99829ce7 | 3f84fee22a0f4d5926aadf8d3303ea15a76421fd | refs/heads/master | 2020-12-03T00:41:12.194688 | 2016-03-04T01:41:51 | 2016-03-04T01:41:51 | 53,150,048 | 1 | 1 | null | 2016-03-04T16:43:12 | 2016-03-04T16:43:12 | null | UTF-8 | C++ | false | false | 2,593 | h | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#include <aws/email/SES_EXPORTS.h>
#include <aws/email/SESRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SES
{
namespace Model
{
/**
*/
class AWS_SES_API DeleteVerifiedEmailAddressRequest : public SESRequest
{
public:
DeleteVerifiedEmailAddressRequest();
Aws::String SerializePayload() const override;
/**
* <p>An email address to be removed from the list of verified addresses.</p>
*/
inline const Aws::String& GetEmailAddress() const{ return m_emailAddress; }
/**
* <p>An email address to be removed from the list of verified addresses.</p>
*/
inline void SetEmailAddress(const Aws::String& value) { m_emailAddressHasBeenSet = true; m_emailAddress = value; }
/**
* <p>An email address to be removed from the list of verified addresses.</p>
*/
inline void SetEmailAddress(Aws::String&& value) { m_emailAddressHasBeenSet = true; m_emailAddress = value; }
/**
* <p>An email address to be removed from the list of verified addresses.</p>
*/
inline void SetEmailAddress(const char* value) { m_emailAddressHasBeenSet = true; m_emailAddress.assign(value); }
/**
* <p>An email address to be removed from the list of verified addresses.</p>
*/
inline DeleteVerifiedEmailAddressRequest& WithEmailAddress(const Aws::String& value) { SetEmailAddress(value); return *this;}
/**
* <p>An email address to be removed from the list of verified addresses.</p>
*/
inline DeleteVerifiedEmailAddressRequest& WithEmailAddress(Aws::String&& value) { SetEmailAddress(value); return *this;}
/**
* <p>An email address to be removed from the list of verified addresses.</p>
*/
inline DeleteVerifiedEmailAddressRequest& WithEmailAddress(const char* value) { SetEmailAddress(value); return *this;}
private:
Aws::String m_emailAddress;
bool m_emailAddressHasBeenSet;
};
} // namespace Model
} // namespace SES
} // namespace Aws
| [
"henso@amazon.com"
] | henso@amazon.com |
7b84b29812f9bdcecdf357d0c33b94d3efbbf3c6 | e41c98f2b6ad7a74fd531321f1bbc69dff971518 | /AuthEvent.hpp | b04e6b5c7f23f9dbb2adc089c326ea71c647b07b | [] | no_license | ytt/CornStarch | 86a0725297f91fb2b530988159d78c20339eb498 | 1d828ac2f5f12d7761e9627afb01e5e73776027c | refs/heads/master | 2021-01-19T17:47:55.385639 | 2012-07-18T07:21:53 | 2012-07-18T07:21:53 | 5,093,523 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 364 | hpp | #pragma once
#include "header.hpp"
// ユーザ認証時のイベント
class CAuthEvent : public wxThreadEvent
{
private:
bool m_auth; // 認証の成否
public:
CAuthEvent(void);
~CAuthEvent(void);
// 認証の成否をセット
void setAuthResult(bool ping);
// 認証の成否を取得
bool isAuthSucceeded(void) const;
};
| [
"t.inoue38@gmail.com"
] | t.inoue38@gmail.com |
65506e678c0a015d27229e1a2871d9f215e0d909 | cb77bc862478d280f9c15654f0781b165c5edaf2 | /CPUT/CPUT/CPUTMeshDX11.cpp | f067fa606e443603cdea548842694f520d5feb0a | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | yazici/CloudySky | bd1a693b5fd960cb3f79c39a2e29df9a710bff53 | 7bf3c5210fc1c3d5a042c1731189a817fe7edeed | refs/heads/master | 2020-04-29T20:53:58.940771 | 2017-06-05T19:28:17 | 2017-06-05T19:28:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,627 | cpp | /////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2017 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or imlied.
// See the License for the specific language governing permissions and
// limitations under the License.
/////////////////////////////////////////////////////////////////////////////////////////////
#include "CPUT_DX11.h"
#include "CPUTMeshDX11.h"
#include "CPUTMaterialDX11.h"
#include "CPUTRenderParamsDX.h"
#include "CPUTBufferDX11.h"
//-----------------------------------------------------------------------------
CPUTMeshDX11::CPUTMeshDX11():
mVertexStride(0),
mVertexBufferOffset(0),
mVertexCount(0),
mpVertexBuffer(NULL),
mpVertexBufferForSRVDX(NULL),
mpVertexBufferForSRV(NULL),
mpVertexView(NULL),
mpStagingVertexBuffer(NULL),
mVertexBufferMappedType(CPUT_MAP_UNDEFINED),
mIndexBufferMappedType(CPUT_MAP_UNDEFINED),
mIndexCount(0),
mIndexBufferFormat(DXGI_FORMAT_UNKNOWN),
mpIndexBuffer(NULL),
mpStagingIndexBuffer(NULL),
mpInputLayout(NULL),
mpShadowInputLayout(NULL),
mNumberOfInputLayoutElements(0),
mpLayoutDescription(NULL)
{
}
//-----------------------------------------------------------------------------
CPUTMeshDX11::~CPUTMeshDX11()
{
ClearAllObjects();
}
//-----------------------------------------------------------------------------
void CPUTMeshDX11::ClearAllObjects()
{
SAFE_RELEASE(mpStagingIndexBuffer);
SAFE_RELEASE(mpIndexBuffer);
SAFE_RELEASE(mpStagingVertexBuffer);
SAFE_RELEASE(mpVertexBuffer);
SAFE_RELEASE(mpVertexBufferForSRVDX);
SAFE_RELEASE(mpVertexBufferForSRV);
SAFE_RELEASE(mpVertexView);
SAFE_RELEASE(mpInputLayout);
SAFE_RELEASE(mpShadowInputLayout);
SAFE_DELETE_ARRAY(mpLayoutDescription);
}
// Create the DX vertex/index buffers and D3D11_INPUT_ELEMENT_DESC
//-----------------------------------------------------------------------------
CPUTResult CPUTMeshDX11::CreateNativeResources(
CPUTModel *pModel,
UINT meshIdx,
int vertexDataInfoArraySize,
CPUTBufferInfo *pVertexDataInfo,
void *pVertexData,
CPUTBufferInfo *pIndexDataInfo,
void *pIndexData
){
CPUTResult result = CPUT_SUCCESS;
HRESULT hr;
ID3D11Device *pD3dDevice = CPUT_DX11::GetDevice();
// Release the layout, offset, stride, and vertex buffer structure objects
ClearAllObjects();
// allocate the layout, offset, stride, and vertex buffer structure objects
mpLayoutDescription = new D3D11_INPUT_ELEMENT_DESC[vertexDataInfoArraySize+1];
// Create the index buffer
D3D11_SUBRESOURCE_DATA resourceData;
if(NULL!=pIndexData)
{
mIndexCount = pIndexDataInfo->mElementCount;
// set the data format info
ZeroMemory( &mIndexBufferDesc, sizeof(mIndexBufferDesc) );
mIndexBufferDesc.Usage = D3D11_USAGE_DEFAULT;
mIndexBufferDesc.ByteWidth = mIndexCount * pIndexDataInfo->mElementSizeInBytes;
mIndexBufferDesc.BindFlags = D3D11_BIND_INDEX_BUFFER;
mIndexBufferDesc.CPUAccessFlags = 0; // default to no cpu access for speed
// create the buffer
ZeroMemory( &resourceData, sizeof(resourceData) );
resourceData.pSysMem = pIndexData;
hr = pD3dDevice->CreateBuffer( &mIndexBufferDesc, &resourceData, &mpIndexBuffer );
ASSERT(!FAILED(hr), _L("Failed creating index buffer") );
CPUTSetDebugName( mpIndexBuffer, _L("Index buffer") );
// set the DX index buffer format
mIndexBufferFormat = ConvertToDirectXFormat(pIndexDataInfo->mElementType, pIndexDataInfo->mElementComponentCount);
}
// set up data format info
mVertexCount = pVertexDataInfo[0].mElementCount;
ZeroMemory( &mVertexBufferDesc, sizeof(mVertexBufferDesc) );
mVertexBufferDesc.Usage = D3D11_USAGE_DEFAULT;
// set the stride for one 'element' block of verts
mVertexStride = pVertexDataInfo[vertexDataInfoArraySize-1].mOffset + pVertexDataInfo[vertexDataInfoArraySize-1].mElementSizeInBytes; // size in bytes of a single vertex block
mVertexBufferDesc.ByteWidth = mVertexCount * mVertexStride; // size in bytes of entire buffer
mVertexBufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
mVertexBufferDesc.CPUAccessFlags = 0; // default to no cpu access for speed
// create the buffer
ZeroMemory( &resourceData, sizeof(resourceData) );
resourceData.pSysMem = pVertexData;
hr = pD3dDevice->CreateBuffer( &mVertexBufferDesc, &resourceData, &mpVertexBuffer );
ASSERT( !FAILED(hr), _L("Failed creating vertex buffer") );
CPUTSetDebugName( mpVertexBuffer, _L("Vertex buffer") );
// create the buffer for the shader resource view
D3D11_BUFFER_DESC desc;
ZeroMemory( &desc, sizeof(desc) );
desc.Usage = D3D11_USAGE_DEFAULT;
// set the stride for one 'element' block of verts
mVertexStride = pVertexDataInfo[vertexDataInfoArraySize-1].mOffset + pVertexDataInfo[vertexDataInfoArraySize-1].mElementSizeInBytes; // size in bytes of a single vertex block
desc.ByteWidth = mVertexCount * mVertexStride; // size in bytes of entire buffer
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
desc.CPUAccessFlags = 0;
desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
desc.StructureByteStride = mVertexStride;
hr = pD3dDevice->CreateBuffer( &desc, &resourceData, &mpVertexBufferForSRVDX );
ASSERT( !FAILED(hr), _L("Failed creating vertex buffer for SRV") );
//CPUTSetDebugName( mpVertexBuffer, _L("Vertex buffer for SRV") );
// Create the shader resource view
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
ZeroMemory( &srvDesc, sizeof(srvDesc) );
srvDesc.Format = DXGI_FORMAT_UNKNOWN;
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
srvDesc.Buffer.ElementOffset = 0;
srvDesc.Buffer.NumElements = mVertexCount;
hr = pD3dDevice->CreateShaderResourceView( mpVertexBufferForSRVDX, &srvDesc, &mpVertexView );
ASSERT( !FAILED(hr), _L("Failed creating vertex buffer SRV") );
cString name = _L("@VertexBuffer") + ptoc(pModel) + itoc(meshIdx);
mpVertexBufferForSRV = new CPUTBufferDX11( name, mpVertexBufferForSRVDX, mpVertexView );
CPUTAssetLibrary::GetAssetLibrary()->AddBuffer( name, mpVertexBufferForSRV );
// build the layout object
int currentByteOffset=0;
mNumberOfInputLayoutElements = vertexDataInfoArraySize;
for(int ii=0; ii<vertexDataInfoArraySize; ii++)
{
mpLayoutDescription[ii].SemanticName = pVertexDataInfo[ii].mpSemanticName; // string name that matches
mpLayoutDescription[ii].SemanticIndex = pVertexDataInfo[ii].mSemanticIndex; // if we have more than one
mpLayoutDescription[ii].Format = ConvertToDirectXFormat(pVertexDataInfo[ii].mElementType, pVertexDataInfo[ii].mElementComponentCount);
mpLayoutDescription[ii].InputSlot = 0; // TODO: We support only a single stream now. Support multiple streams.
mpLayoutDescription[ii].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
mpLayoutDescription[ii].InstanceDataStepRate = 0;
mpLayoutDescription[ii].AlignedByteOffset = currentByteOffset;
currentByteOffset += pVertexDataInfo[ii].mElementSizeInBytes;
}
// set the last 'dummy' element to null. Not sure if this is required, as we also pass in count when using this list.
memset( &mpLayoutDescription[vertexDataInfoArraySize], 0, sizeof(D3D11_INPUT_ELEMENT_DESC) );
return result;
}
//-----------------------------------------------------------------------------
void CPUTMeshDX11::Draw(CPUTRenderParameters &renderParams, CPUTModel *pModel, ID3D11InputLayout *pInputLayout )
{
// Skip empty meshes.
if( !mIndexCount ) { return; }
ID3D11DeviceContext *pContext = ((CPUTRenderParametersDX*)&renderParams)->mpContext;
pContext->IASetPrimitiveTopology( mD3DMeshTopology );
pContext->IASetVertexBuffers(0, 1, &mpVertexBuffer, &mVertexStride, &mVertexBufferOffset);
pContext->IASetIndexBuffer(mpIndexBuffer, mIndexBufferFormat, 0);
pContext->IASetInputLayout( pInputLayout );
pContext->DrawIndexed( mIndexCount, 0, 0 );
}
// Sets the mesh topology, and converts it to it's DX format
//-----------------------------------------------------------------------------
void CPUTMeshDX11::SetMeshTopology(const eCPUT_MESH_TOPOLOGY meshTopology)
{
ASSERT( meshTopology > 0 && meshTopology <= 5, _L("") );
CPUTMesh::SetMeshTopology(meshTopology);
// The CPUT enum has the same values as the D3D enum. Will likely need an xlation on OpenGL.
mD3DMeshTopology = (D3D_PRIMITIVE_TOPOLOGY)meshTopology;
}
// Translate an internal CPUT data type into it's equivalent DirectX type
//-----------------------------------------------------------------------------
DXGI_FORMAT CPUTMeshDX11::ConvertToDirectXFormat(CPUT_DATA_FORMAT_TYPE dataFormatType, int componentCount)
{
ASSERT( componentCount>0 && componentCount<=4, _L("Invalid vertex element count.") );
switch( dataFormatType )
{
case CPUT_F32:
{
const DXGI_FORMAT componentCountToFormat[4] = {
DXGI_FORMAT_R32_FLOAT,
DXGI_FORMAT_R32G32_FLOAT,
DXGI_FORMAT_R32G32B32_FLOAT,
DXGI_FORMAT_R32G32B32A32_FLOAT
};
return componentCountToFormat[componentCount-1];
}
case CPUT_U32:
{
const DXGI_FORMAT componentCountToFormat[4] = {
DXGI_FORMAT_R32_UINT,
DXGI_FORMAT_R32G32_UINT,
DXGI_FORMAT_R32G32B32_UINT,
DXGI_FORMAT_R32G32B32A32_UINT
};
return componentCountToFormat[componentCount-1];
break;
}
case CPUT_U16:
{
ASSERT( 3 != componentCount, _L("Invalid vertex element count.") );
const DXGI_FORMAT componentCountToFormat[4] = {
DXGI_FORMAT_R16_UINT,
DXGI_FORMAT_R16G16_UINT,
DXGI_FORMAT_UNKNOWN, // Count of 3 is invalid for 16-bit type
DXGI_FORMAT_R16G16B16A16_UINT
};
return componentCountToFormat[componentCount-1];
}
default:
{
// todo: add all the other data types you want to support
ASSERT(0,_L("Unsupported vertex element type"));
}
return DXGI_FORMAT_UNKNOWN;
}
} // CPUTMeshDX11::ConvertToDirectXFormat()
// Finds a layout that matches the materials vertex shader and the mesh's
// vertex buffer layout by using the InputLayoutCache
//-----------------------------------------------------------------------------
void CPUTMeshDX11::BindVertexShaderLayout( CPUTMaterial *pMaterial, CPUTMaterial *pShadowCastMaterial )
{
ID3D11Device *pDevice = CPUT_DX11::GetDevice();
if( pMaterial )
{
// Get the vertex layout for this shader/format comb
// If already exists, then GetLayout() returns the existing layout for reuse.
CPUTVertexShaderDX11 *pVertexShader = ((CPUTMaterialDX11*)pMaterial)->GetVertexShader();
SAFE_RELEASE(mpInputLayout);
CPUTInputLayoutCacheDX11::GetInputLayoutCache()->GetLayout(pDevice, mpLayoutDescription, pVertexShader, &mpInputLayout);
}
if( pShadowCastMaterial )
{
CPUTVertexShaderDX11 *pVertexShader = ((CPUTMaterialDX11*)pShadowCastMaterial)->GetVertexShader();
SAFE_RELEASE(mpShadowInputLayout);
CPUTInputLayoutCacheDX11::GetInputLayoutCache()->GetLayout(pDevice, mpLayoutDescription, pVertexShader, &mpShadowInputLayout);
}
}
//-----------------------------------------------------------------------------
D3D11_MAPPED_SUBRESOURCE CPUTMeshDX11::Map(
UINT count,
ID3D11Buffer *pBuffer,
D3D11_BUFFER_DESC &bufferDesc,
ID3D11Buffer **pStagingBuffer,
eCPUTMapType *pMappedType,
CPUTRenderParameters ¶ms,
eCPUTMapType type,
bool wait
)
{
// Mapping for DISCARD requires dynamic buffer. Create dynamic copy?
// Could easily provide input flag. But, where would we specify? Don't like specifying in the .set file
// Because mapping is something the application wants to do - it isn't inherent in the data.
// Could do Clone() and pass dynamic flag to that.
// But, then we have two. Could always delete the other.
// Could support programatic flag - apply to all loaded models in the .set
// Could support programatic flag on model. Load model first, then load set.
// For now, simply support CopyResource mechanism.
HRESULT hr;
ID3D11Device *pD3dDevice = CPUT_DX11::GetDevice();
CPUTRenderParametersDX *pParamsDX11 = (CPUTRenderParametersDX*)¶ms;
ID3D11DeviceContext *pContext = pParamsDX11->mpContext;
if( !*pStagingBuffer )
{
D3D11_BUFFER_DESC desc = bufferDesc;
// First time. Create the staging resource
desc.Usage = D3D11_USAGE_STAGING;
switch( type )
{
case CPUT_MAP_READ:
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
desc.BindFlags = 0;
break;
case CPUT_MAP_READ_WRITE:
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE;
desc.BindFlags = 0;
break;
case CPUT_MAP_WRITE:
case CPUT_MAP_WRITE_DISCARD:
case CPUT_MAP_NO_OVERWRITE:
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
desc.BindFlags = 0;
break;
};
hr = pD3dDevice->CreateBuffer( &desc, NULL, pStagingBuffer );
ASSERT( SUCCEEDED(hr), _L("Failed to create staging buffer") );
CPUTSetDebugName( *pStagingBuffer, _L("Mesh Staging buffer") );
}
else
{
ASSERT( *pMappedType == type, _L("Mapping with a different CPU access than creation parameter.") );
}
D3D11_MAPPED_SUBRESOURCE info;
switch( type )
{
case CPUT_MAP_READ:
case CPUT_MAP_READ_WRITE:
// TODO: Copying and immediately mapping probably introduces a stall.
// Expose the copy externally?
// TODO: copy only if vb has changed?
// Copy only first time?
// Copy the GPU version before we read from it.
pContext->CopyResource( *pStagingBuffer, pBuffer );
break;
};
hr = pContext->Map( *pStagingBuffer, wait ? 0 : D3D11_MAP_FLAG_DO_NOT_WAIT, (D3D11_MAP)type, 0, &info );
*pMappedType = type;
return info;
} // CPUTMeshDX11::Map()
//-----------------------------------------------------------------------------
void CPUTMeshDX11::Unmap(
ID3D11Buffer *pBuffer,
ID3D11Buffer *pStagingBuffer,
eCPUTMapType *pMappedType,
CPUTRenderParameters ¶ms
)
{
ASSERT( *pMappedType != CPUT_MAP_UNDEFINED, _L("Can't unmap a buffer that isn't mapped.") );
CPUTRenderParametersDX *pParamsDX11 = (CPUTRenderParametersDX*)¶ms;
ID3D11DeviceContext *pContext = pParamsDX11->mpContext;
pContext->Unmap( pStagingBuffer, 0 );
// If we were mapped for write, then copy staging buffer to GPU
switch( *pMappedType )
{
case CPUT_MAP_READ:
break;
case CPUT_MAP_READ_WRITE:
case CPUT_MAP_WRITE:
case CPUT_MAP_WRITE_DISCARD:
case CPUT_MAP_NO_OVERWRITE:
pContext->CopyResource( pBuffer, pStagingBuffer );
break;
};
// *pMappedType = CPUT_MAP_UNDEFINED; // TODO: Just commented this out. Otherwise, assert in Map() fails. Verify.
} // CPUTMeshDX11::Unmap()
//-----------------------------------------------------------------------------
D3D11_MAPPED_SUBRESOURCE CPUTMeshDX11::MapVertices( CPUTRenderParameters ¶ms, eCPUTMapType type, bool wait )
{
return Map(
mVertexCount,
mpVertexBuffer,
mVertexBufferDesc,
&mpStagingVertexBuffer,
&mVertexBufferMappedType,
params,
type,
wait
);
}
//-----------------------------------------------------------------------------
D3D11_MAPPED_SUBRESOURCE CPUTMeshDX11::MapIndices( CPUTRenderParameters ¶ms, eCPUTMapType type, bool wait )
{
return Map(
mIndexCount,
mpIndexBuffer,
mIndexBufferDesc,
&mpStagingIndexBuffer,
&mIndexBufferMappedType,
params,
type,
wait
);
}
//-----------------------------------------------------------------------------
void CPUTMeshDX11::UnmapVertices( CPUTRenderParameters ¶ms )
{
Unmap( mpVertexBuffer, mpStagingVertexBuffer, &mVertexBufferMappedType, params );
}
//-----------------------------------------------------------------------------
void CPUTMeshDX11::UnmapIndices( CPUTRenderParameters ¶ms )
{
Unmap( mpIndexBuffer, mpStagingIndexBuffer, &mIndexBufferMappedType, params );
}
| [
"marissa@galacticsoft.net"
] | marissa@galacticsoft.net |
78e48c4347dc974c148e9b4b3ea8bd9767b93683 | 1412f81315842afedfd4cf43b132603f76ef3bf8 | /klee-uClibcxx/Codes/klee-uClibc++/bin/comparison_test.cpp | ca56dce93e8e3e776eef36e305fad2be84e945d4 | [] | no_license | Edward-L/Klee-uClibcxx | 2282d68ed2461644fb70b70ceff0a6fd0611eef6 | bd53be353ebccaf7bc235da18484b48262c869c8 | refs/heads/master | 2020-03-18T08:16:55.150426 | 2018-05-23T02:29:23 | 2018-05-23T02:29:23 | 134,500,696 | 1 | 0 | null | 2018-05-23T02:20:04 | 2018-05-23T02:20:04 | null | UTF-8 | C++ | false | false | 425 | cpp | #include <cstring>
#include <iostream>
#define SIZE 7
int main() {
// The input regular expression.
char re[SIZE]="\x00\x00\x00\x00\x00\x00";
//char re[SIZE]="\0";
// Make the input symbolic.
// klee_make_symbolic(re, sizeof re, "re");
// Try to match against a constant string "hello".
//std::cout<<strcmp(re, "hello1");
std::cout<<strcmp(re, "hello1");
//return strcmp(re, "hello1");
return 0;
}
| [
"nithishr@gmail.com"
] | nithishr@gmail.com |
01e07d102c02540bddfab420bdb6c6d22e4b19c1 | fbd8c56e8e449f7ac80b5156e80c15c14cb34b12 | /Codeforces/1084/BB.cpp | 6665f613cef1ad5ea440680e79828345aef35b7d | [
"MIT"
] | permissive | Saikat-S/acm-problems-solutions | 558374a534f4f4aa2bf3bea889c1d5c5a536cf59 | 921c0f3e508e1ee8cd14be867587952d5f67bbb9 | refs/heads/master | 2021-08-03T02:27:21.019914 | 2021-07-27T06:18:28 | 2021-07-27T06:18:28 | 132,938,151 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 756 | cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll binary (ll mn, ll n, ll s, ll sum) {
ll low = 0, high = mn;
ll mid, ans;
while (high >= low) {
mid = (high + low) / 2;
ll x = mid * n;
ll xx = sum - x;
if (xx >= s) {
low = mid + 1;
ans = mid;
} else {
high = mid - 1;
}
}
return ans;
}
int main () {
ll n, s;
cin >> n >> s;
ll ar[n + 3];
ll sum = 0;
for (int i = 0; i < n; i++) {
cin >> ar[i];
sum += ar[i];
}
if (sum < s) {
cout << "-1\n";
} else {
sort (ar, ar + n);
ll mn = ar[0];
cout << fun (mn, n, s, sum) << "\n";
}
return 0;
}
| [
"saikatsharma4@gmail.com"
] | saikatsharma4@gmail.com |
b3da7a9326912675d5bc308e69d036ecf5b3d654 | 6dd0800443932261bce4f8fe27968caec3140192 | /Urvashi/milestone-32(Graphs)/03_Topological Sort/13_Kahn's Algorithm(Course_Schedule_ii).cpp | 501f01bc9a6d09707b9d5da604333c92f3fec9e8 | [] | no_license | Meghag5/Beginner-CPP-Submissions | 77daf52f106b8ad60fd05705d2e884ab9fc40d58 | f04adf8e2b7da734bb77593437f551bd2cf7bef5 | refs/heads/master | 2023-05-09T11:39:26.937993 | 2021-05-26T20:26:10 | 2021-05-26T20:26:10 | 266,160,633 | 0 | 0 | null | 2020-05-22T16:43:49 | 2020-05-22T16:43:48 | null | UTF-8 | C++ | false | false | 3,212 | cpp | /* (https://leetcode.com/problems/course-schedule-ii/)
Solution2:- Based on Kahn's Algorithm (BFS + Queue)
Time complexity:- O(V+E) where V is the number of vertices and E is the number of Edges.
What is Kahn's Algorithm?
=> This is the algorithm to so topological sorting. In this algorithm we will follow three steps:-
1. We will find indegree of every node means we will calculate the adjacent nodes of that vertice which are dependent on it.
2. We will push the node with 0 indegree into the queue because if we will complete the prerequisites first then we can traverse the whole graph.
3. Then we will remove all the nodes one by one from the queue and will reduce the indegree of their adjacent nodes which wew prerequisites for it.
We will take a count variable to check if there is a deadlock(cycle) in the graph. Because if there is a cycle in the graph then it means we cant
apply topological sort in it and there will be no way to complete all the courses.
So, for DAG(Directed acyclic graph) our count variable should be equal to the total no of nodes in the graph.
*/
class Solution
{
public:
bool kahnAlgo(vector<vector<int>> &adj, int n, vector<int> &indegree, vector<int> &ans)
{
queue<int> q;
for (int i = 0; i < n; i++)
{
// will push all the nodes with the indegree 0 in the queue as they are the prerequisite courses to complete first.
if (indegree[i] == 0)
q.push(i);
}
int count = 0;
while (!q.empty())
{
// one by one we will take every element of the queue and will traverse the adjacency list of it and will remove that node
// and will reduce the indegree of the adjacent nodes which are the prerequisites for it.
int curr = q.front();
q.pop();
for (auto a : adj[curr])
{
indegree[a] -= 1;
// and will push the node having 0 indegree in the queue.
if (indegree[a] == 0)
q.push(a);
}
// and after processing current node will push it in the ans.
ans.push_back(curr);
count++;
}
// checking for DAG.
if (count != n)
return false;
return true;
}
vector<int> findOrder(int numCourses, vector<vector<int>> &prerequisites)
{
int n = prerequisites.size();
vector<vector<int>> adj(numCourses); // Adjacency matrix.
vector<int> indegree(numCourses, 0); // indegree array.
// traversing all the nodes of the graph.
for (int i = 0; i < n; i++)
{
// filling adjacency matrix for all the nodes of the graph.
adj[prerequisites[i][1]].push_back(prerequisites[i][0]);
// also filling indegree value for all nodes.
indegree[prerequisites[i][0]] += 1;
}
vector<int> ans;
// if graph is DAG and Kahn's algo is applied then return the ans.
if (kahnAlgo(adj, numCourses, indegree, ans))
return ans;
// otherwise return the empty vector.
vector<int> empty;
return empty;
}
};
| [
"urvashianand0906@gmail.com"
] | urvashianand0906@gmail.com |
9eec51e646544a1d182655ec1c1d7fee1f7b31eb | b1bf17201149ba0a8b865e425fef5e3369b04260 | /build/lib/Target/Hexagon/Release+Asserts/HexagonGenRegisterInfo.inc.tmp | 1bb13b4827c0c62b275dad21c0af513d73dff530 | [] | no_license | cya410/llvm | 788288b9989de58e1b7a05c5ab9490099c7c3920 | a6a751eb63eaea13a427ea33365dade739842453 | refs/heads/master | 2016-09-06T12:38:02.151281 | 2015-03-16T16:09:18 | 2015-03-16T16:09:18 | 30,787,046 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 40,514 | tmp | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|*Target Register Enum Values *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
#ifdef GET_REGINFO_ENUM
#undef GET_REGINFO_ENUM
namespace llvm {
class MCRegisterClass;
extern const MCRegisterClass HexagonMCRegisterClasses[];
namespace Hexagon {
enum {
NoRegister,
CS = 1,
GP = 2,
PC = 3,
UGP = 4,
UPC = 5,
UPCH = 6,
UPCL = 7,
USR = 8,
USR_OVF = 9,
C6 = 10,
C7 = 11,
CS0 = 12,
CS1 = 13,
D0 = 14,
D1 = 15,
D2 = 16,
D3 = 17,
D4 = 18,
D5 = 19,
D6 = 20,
D7 = 21,
D8 = 22,
D9 = 23,
D10 = 24,
D11 = 25,
D12 = 26,
D13 = 27,
D14 = 28,
D15 = 29,
LC0 = 30,
LC1 = 31,
M0 = 32,
M1 = 33,
P0 = 34,
P1 = 35,
P2 = 36,
P3 = 37,
R0 = 38,
R1 = 39,
R2 = 40,
R3 = 41,
R4 = 42,
R5 = 43,
R6 = 44,
R7 = 45,
R8 = 46,
R9 = 47,
R10 = 48,
R11 = 49,
R12 = 50,
R13 = 51,
R14 = 52,
R15 = 53,
R16 = 54,
R17 = 55,
R18 = 56,
R19 = 57,
R20 = 58,
R21 = 59,
R22 = 60,
R23 = 61,
R24 = 62,
R25 = 63,
R26 = 64,
R27 = 65,
R28 = 66,
R29 = 67,
R30 = 68,
R31 = 69,
SA0 = 70,
SA1 = 71,
C1_0 = 72,
C3_2 = 73,
C7_6 = 74,
C9_8 = 75,
C11_10 = 76,
P3_0 = 77,
NUM_TARGET_REGS // 78
};
}
// Register classes
namespace Hexagon {
enum {
IntRegsRegClassID = 0,
CtrRegsRegClassID = 1,
PredRegsRegClassID = 2,
ModRegsRegClassID = 3,
CtrRegs_with_subreg_overflowRegClassID = 4,
DoubleRegsRegClassID = 5,
CtrRegs64RegClassID = 6,
CtrRegs64_with_subreg_overflowRegClassID = 7,
};
}
// Subregister indices
namespace Hexagon {
enum {
NoSubRegister,
subreg_hireg, // 1
subreg_loreg, // 2
subreg_overflow, // 3
NUM_TARGET_SUBREGS
};
}
} // End llvm namespace
#endif // GET_REGINFO_ENUM
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|*MC Register Information *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
#ifdef GET_REGINFO_MC_DESC
#undef GET_REGINFO_MC_DESC
namespace llvm {
extern const MCPhysReg HexagonRegDiffLists[] = {
/* 0 */ 0, 0,
/* 2 */ 0, 1, 0,
/* 5 */ 44, 1, 1, 1, 0,
/* 10 */ 5, 1, 0,
/* 13 */ 8, 1, 0,
/* 16 */ 11, 1, 0,
/* 19 */ 24, 1, 0,
/* 22 */ 25, 1, 0,
/* 25 */ 26, 1, 0,
/* 28 */ 27, 1, 0,
/* 31 */ 28, 1, 0,
/* 34 */ 29, 1, 0,
/* 37 */ 30, 1, 0,
/* 40 */ 31, 1, 0,
/* 43 */ 32, 1, 0,
/* 46 */ 33, 1, 0,
/* 49 */ 34, 1, 0,
/* 52 */ 35, 1, 0,
/* 55 */ 36, 1, 0,
/* 58 */ 37, 1, 0,
/* 61 */ 38, 1, 0,
/* 64 */ 39, 1, 0,
/* 67 */ 65472, 1, 0,
/* 70 */ 65518, 1, 0,
/* 73 */ 2, 2, 0,
/* 76 */ 3, 4, 0,
/* 79 */ 65506, 6, 0,
/* 82 */ 7, 0,
/* 84 */ 10, 0,
/* 86 */ 12, 0,
/* 88 */ 42, 0,
/* 90 */ 63, 0,
/* 92 */ 64, 0,
/* 94 */ 65535, 67, 0,
/* 97 */ 72, 0,
/* 99 */ 74, 0,
/* 101 */ 65534, 65496, 0,
/* 104 */ 65497, 0,
/* 106 */ 65498, 0,
/* 108 */ 65499, 0,
/* 110 */ 65500, 0,
/* 112 */ 65501, 0,
/* 114 */ 65502, 0,
/* 116 */ 65503, 0,
/* 118 */ 65504, 0,
/* 120 */ 65505, 0,
/* 122 */ 65506, 0,
/* 124 */ 65507, 0,
/* 126 */ 65508, 0,
/* 128 */ 65509, 0,
/* 130 */ 65510, 0,
/* 132 */ 65511, 0,
/* 134 */ 65512, 0,
/* 136 */ 65514, 0,
/* 138 */ 65524, 0,
/* 140 */ 65525, 0,
/* 142 */ 65527, 0,
/* 144 */ 65469, 1, 65530, 0,
/* 148 */ 65464, 65534, 0,
/* 151 */ 2, 65535, 0,
};
extern const unsigned HexagonLaneMaskLists[] = {
/* 0 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, ~0u,
/* 5 */ 0x00000002, 0x00000001, ~0u,
/* 8 */ 0x00000001, 0x00000002, ~0u,
};
extern const uint16_t HexagonSubRegIdxLists[] = {
/* 0 */ 2, 1, 0,
/* 3 */ 2, 3, 1, 0,
/* 7 */ 3, 0,
};
extern const MCRegisterInfo::SubRegCoveredBits HexagonSubRegIdxRanges[] = {
{ 65535, 65535 },
{ 32, 32 }, // subreg_hireg
{ 0, 32 }, // subreg_loreg
{ 0, 1 }, // subreg_overflow
};
extern const char HexagonRegStrings[] = {
/* 0 */ 'D', '1', '0', 0,
/* 4 */ 'R', '1', '0', 0,
/* 8 */ 'C', '1', '1', '_', '1', '0', 0,
/* 15 */ 'R', '2', '0', 0,
/* 19 */ 'R', '3', '0', 0,
/* 23 */ 'S', 'A', '0', 0,
/* 27 */ 'L', 'C', '0', 0,
/* 31 */ 'D', '0', 0,
/* 34 */ 'M', '0', 0,
/* 37 */ 'P', '0', 0,
/* 40 */ 'R', '0', 0,
/* 43 */ 'C', 'S', '0', 0,
/* 47 */ 'C', '1', '_', '0', 0,
/* 52 */ 'P', '3', '_', '0', 0,
/* 57 */ 'D', '1', '1', 0,
/* 61 */ 'R', '1', '1', 0,
/* 65 */ 'R', '2', '1', 0,
/* 69 */ 'R', '3', '1', 0,
/* 73 */ 'S', 'A', '1', 0,
/* 77 */ 'L', 'C', '1', 0,
/* 81 */ 'D', '1', 0,
/* 84 */ 'M', '1', 0,
/* 87 */ 'P', '1', 0,
/* 90 */ 'R', '1', 0,
/* 93 */ 'C', 'S', '1', 0,
/* 97 */ 'D', '1', '2', 0,
/* 101 */ 'R', '1', '2', 0,
/* 105 */ 'R', '2', '2', 0,
/* 109 */ 'D', '2', 0,
/* 112 */ 'P', '2', 0,
/* 115 */ 'R', '2', 0,
/* 118 */ 'C', '3', '_', '2', 0,
/* 123 */ 'D', '1', '3', 0,
/* 127 */ 'R', '1', '3', 0,
/* 131 */ 'R', '2', '3', 0,
/* 135 */ 'D', '3', 0,
/* 138 */ 'P', '3', 0,
/* 141 */ 'R', '3', 0,
/* 144 */ 'D', '1', '4', 0,
/* 148 */ 'R', '1', '4', 0,
/* 152 */ 'R', '2', '4', 0,
/* 156 */ 'D', '4', 0,
/* 159 */ 'R', '4', 0,
/* 162 */ 'D', '1', '5', 0,
/* 166 */ 'R', '1', '5', 0,
/* 170 */ 'R', '2', '5', 0,
/* 174 */ 'D', '5', 0,
/* 177 */ 'R', '5', 0,
/* 180 */ 'R', '1', '6', 0,
/* 184 */ 'R', '2', '6', 0,
/* 188 */ 'C', '6', 0,
/* 191 */ 'D', '6', 0,
/* 194 */ 'R', '6', 0,
/* 197 */ 'C', '7', '_', '6', 0,
/* 202 */ 'R', '1', '7', 0,
/* 206 */ 'R', '2', '7', 0,
/* 210 */ 'C', '7', 0,
/* 213 */ 'D', '7', 0,
/* 216 */ 'R', '7', 0,
/* 219 */ 'R', '1', '8', 0,
/* 223 */ 'R', '2', '8', 0,
/* 227 */ 'D', '8', 0,
/* 230 */ 'R', '8', 0,
/* 233 */ 'C', '9', '_', '8', 0,
/* 238 */ 'R', '1', '9', 0,
/* 242 */ 'R', '2', '9', 0,
/* 246 */ 'D', '9', 0,
/* 249 */ 'R', '9', 0,
/* 252 */ 'U', 'P', 'C', 0,
/* 256 */ 'U', 'S', 'R', '_', 'O', 'V', 'F', 0,
/* 264 */ 'U', 'P', 'C', 'H', 0,
/* 269 */ 'U', 'P', 'C', 'L', 0,
/* 274 */ 'U', 'G', 'P', 0,
/* 278 */ 'U', 'S', 'R', 0,
/* 282 */ 'C', 'S', 0,
};
extern const MCRegisterDesc HexagonRegDesc[] = { // Descriptors
{ 3, 0, 0, 0, 0, 0 },
{ 282, 16, 1, 0, 32, 5 },
{ 275, 1, 99, 2, 1, 3 },
{ 253, 1, 97, 2, 1, 3 },
{ 274, 1, 97, 2, 1, 3 },
{ 252, 151, 1, 0, 160, 5 },
{ 264, 1, 152, 2, 1280, 3 },
{ 269, 1, 149, 2, 2274, 3 },
{ 278, 3, 95, 7, 1312, 9 },
{ 256, 1, 94, 2, 1312, 3 },
{ 188, 1, 92, 2, 2385, 3 },
{ 210, 1, 90, 2, 2385, 3 },
{ 43, 1, 140, 2, 2209, 3 },
{ 93, 1, 138, 2, 2209, 3 },
{ 31, 19, 1, 0, 1122, 5 },
{ 81, 22, 1, 0, 1122, 5 },
{ 109, 25, 1, 0, 1122, 5 },
{ 135, 28, 1, 0, 1122, 5 },
{ 156, 31, 1, 0, 1122, 5 },
{ 174, 34, 1, 0, 1122, 5 },
{ 191, 37, 1, 0, 1122, 5 },
{ 213, 40, 1, 0, 1122, 5 },
{ 227, 43, 1, 0, 1122, 5 },
{ 246, 46, 1, 0, 1122, 5 },
{ 0, 49, 1, 0, 1122, 5 },
{ 57, 52, 1, 0, 1122, 5 },
{ 97, 55, 1, 0, 1122, 5 },
{ 123, 58, 1, 0, 1122, 5 },
{ 144, 61, 1, 0, 1122, 5 },
{ 162, 64, 1, 0, 1122, 5 },
{ 27, 1, 88, 2, 1377, 3 },
{ 77, 1, 88, 2, 1377, 3 },
{ 34, 1, 1, 2, 2145, 3 },
{ 84, 1, 1, 2, 2145, 3 },
{ 37, 1, 1, 2, 1345, 3 },
{ 87, 1, 1, 2, 1345, 3 },
{ 112, 1, 1, 2, 1345, 3 },
{ 138, 1, 1, 2, 1345, 3 },
{ 40, 1, 134, 2, 2017, 3 },
{ 90, 1, 132, 2, 2017, 3 },
{ 115, 1, 132, 2, 2017, 3 },
{ 141, 1, 130, 2, 2017, 3 },
{ 159, 1, 130, 2, 2017, 3 },
{ 177, 1, 128, 2, 2017, 3 },
{ 194, 1, 128, 2, 2017, 3 },
{ 216, 1, 126, 2, 2017, 3 },
{ 230, 1, 126, 2, 2017, 3 },
{ 249, 1, 124, 2, 2017, 3 },
{ 4, 1, 124, 2, 2017, 3 },
{ 61, 1, 122, 2, 2017, 3 },
{ 101, 1, 122, 2, 2017, 3 },
{ 127, 1, 120, 2, 2017, 3 },
{ 148, 1, 120, 2, 2017, 3 },
{ 166, 1, 118, 2, 2017, 3 },
{ 180, 1, 118, 2, 2017, 3 },
{ 202, 1, 116, 2, 2017, 3 },
{ 219, 1, 116, 2, 2017, 3 },
{ 238, 1, 114, 2, 2017, 3 },
{ 15, 1, 114, 2, 2017, 3 },
{ 65, 1, 112, 2, 2017, 3 },
{ 105, 1, 112, 2, 2017, 3 },
{ 131, 1, 110, 2, 2017, 3 },
{ 152, 1, 110, 2, 2017, 3 },
{ 170, 1, 108, 2, 2017, 3 },
{ 184, 1, 108, 2, 2017, 3 },
{ 206, 1, 106, 2, 2017, 3 },
{ 223, 1, 106, 2, 2017, 3 },
{ 242, 1, 104, 2, 2017, 3 },
{ 19, 1, 104, 2, 2017, 3 },
{ 69, 1, 102, 2, 2017, 3 },
{ 23, 1, 74, 2, 2177, 3 },
{ 73, 1, 74, 2, 2177, 3 },
{ 47, 101, 1, 0, 1265, 8 },
{ 118, 101, 1, 0, 1265, 8 },
{ 197, 67, 1, 0, 208, 5 },
{ 233, 144, 1, 3, 1216, 8 },
{ 8, 148, 1, 0, 1168, 8 },
{ 52, 1, 1, 2, 80, 0 },
};
extern const MCPhysReg HexagonRegUnitRoots[][2] = {
{ Hexagon::CS0 },
{ Hexagon::CS1 },
{ Hexagon::GP },
{ Hexagon::PC },
{ Hexagon::UGP },
{ Hexagon::UPCL },
{ Hexagon::UPCH },
{ Hexagon::USR_OVF },
{ Hexagon::C6, Hexagon::M0 },
{ Hexagon::C7, Hexagon::M1 },
{ Hexagon::R0 },
{ Hexagon::R1 },
{ Hexagon::R2 },
{ Hexagon::R3 },
{ Hexagon::R4 },
{ Hexagon::R5 },
{ Hexagon::R6 },
{ Hexagon::R7 },
{ Hexagon::R8 },
{ Hexagon::R9 },
{ Hexagon::R10 },
{ Hexagon::R11 },
{ Hexagon::R12 },
{ Hexagon::R13 },
{ Hexagon::R14 },
{ Hexagon::R15 },
{ Hexagon::R16 },
{ Hexagon::R17 },
{ Hexagon::R18 },
{ Hexagon::R19 },
{ Hexagon::R20 },
{ Hexagon::R21 },
{ Hexagon::R22 },
{ Hexagon::R23 },
{ Hexagon::R24 },
{ Hexagon::R25 },
{ Hexagon::R26 },
{ Hexagon::R27 },
{ Hexagon::R28 },
{ Hexagon::R29 },
{ Hexagon::R30 },
{ Hexagon::R31 },
{ Hexagon::LC0 },
{ Hexagon::LC1 },
{ Hexagon::P0, Hexagon::P3_0 },
{ Hexagon::P1, Hexagon::P3_0 },
{ Hexagon::P2, Hexagon::P3_0 },
{ Hexagon::P3, Hexagon::P3_0 },
{ Hexagon::SA0 },
{ Hexagon::SA1 },
};
namespace { // Register classes...
// IntRegs Register Class...
const MCPhysReg IntRegs[] = {
Hexagon::R0, Hexagon::R1, Hexagon::R2, Hexagon::R3, Hexagon::R4, Hexagon::R5, Hexagon::R6, Hexagon::R7, Hexagon::R8, Hexagon::R9, Hexagon::R12, Hexagon::R13, Hexagon::R14, Hexagon::R15, Hexagon::R16, Hexagon::R17, Hexagon::R18, Hexagon::R19, Hexagon::R20, Hexagon::R21, Hexagon::R22, Hexagon::R23, Hexagon::R24, Hexagon::R25, Hexagon::R26, Hexagon::R27, Hexagon::R28, Hexagon::R10, Hexagon::R11, Hexagon::R29, Hexagon::R30, Hexagon::R31,
};
// IntRegs Bit set.
const uint8_t IntRegsBits[] = {
0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x3f,
};
// CtrRegs Register Class...
const MCPhysReg CtrRegs[] = {
Hexagon::LC0, Hexagon::SA0, Hexagon::LC1, Hexagon::SA1, Hexagon::P3_0, Hexagon::M0, Hexagon::M1, Hexagon::C6, Hexagon::C7, Hexagon::CS0, Hexagon::CS1, Hexagon::UPCL, Hexagon::UPCH, Hexagon::USR, Hexagon::USR_OVF, Hexagon::UGP, Hexagon::GP, Hexagon::PC,
};
// CtrRegs Bit set.
const uint8_t CtrRegsBits[] = {
0xdc, 0x3f, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x20,
};
// PredRegs Register Class...
const MCPhysReg PredRegs[] = {
Hexagon::P0, Hexagon::P1, Hexagon::P2, Hexagon::P3,
};
// PredRegs Bit set.
const uint8_t PredRegsBits[] = {
0x00, 0x00, 0x00, 0x00, 0x3c,
};
// ModRegs Register Class...
const MCPhysReg ModRegs[] = {
Hexagon::M0, Hexagon::M1,
};
// ModRegs Bit set.
const uint8_t ModRegsBits[] = {
0x00, 0x00, 0x00, 0x00, 0x03,
};
// CtrRegs_with_subreg_overflow Register Class...
const MCPhysReg CtrRegs_with_subreg_overflow[] = {
Hexagon::USR,
};
// CtrRegs_with_subreg_overflow Bit set.
const uint8_t CtrRegs_with_subreg_overflowBits[] = {
0x00, 0x01,
};
// DoubleRegs Register Class...
const MCPhysReg DoubleRegs[] = {
Hexagon::D0, Hexagon::D1, Hexagon::D2, Hexagon::D3, Hexagon::D4, Hexagon::D6, Hexagon::D7, Hexagon::D8, Hexagon::D9, Hexagon::D10, Hexagon::D11, Hexagon::D12, Hexagon::D13, Hexagon::D5, Hexagon::D14, Hexagon::D15,
};
// DoubleRegs Bit set.
const uint8_t DoubleRegsBits[] = {
0x00, 0xc0, 0xff, 0x3f,
};
// CtrRegs64 Register Class...
const MCPhysReg CtrRegs64[] = {
Hexagon::C1_0, Hexagon::C3_2, Hexagon::C7_6, Hexagon::C9_8, Hexagon::C11_10, Hexagon::CS, Hexagon::UPC,
};
// CtrRegs64 Bit set.
const uint8_t CtrRegs64Bits[] = {
0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f,
};
// CtrRegs64_with_subreg_overflow Register Class...
const MCPhysReg CtrRegs64_with_subreg_overflow[] = {
Hexagon::C9_8,
};
// CtrRegs64_with_subreg_overflow Bit set.
const uint8_t CtrRegs64_with_subreg_overflowBits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
};
}
extern const char HexagonRegClassStrings[] = {
/* 0 */ 'C', 't', 'r', 'R', 'e', 'g', 's', '6', '4', 0,
/* 10 */ 'P', 'r', 'e', 'd', 'R', 'e', 'g', 's', 0,
/* 19 */ 'M', 'o', 'd', 'R', 'e', 'g', 's', 0,
/* 27 */ 'D', 'o', 'u', 'b', 'l', 'e', 'R', 'e', 'g', 's', 0,
/* 38 */ 'C', 't', 'r', 'R', 'e', 'g', 's', 0,
/* 46 */ 'I', 'n', 't', 'R', 'e', 'g', 's', 0,
/* 54 */ 'C', 't', 'r', 'R', 'e', 'g', 's', '6', '4', '_', 'w', 'i', 't', 'h', '_', 's', 'u', 'b', 'r', 'e', 'g', '_', 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', 0,
/* 85 */ 'C', 't', 'r', 'R', 'e', 'g', 's', '_', 'w', 'i', 't', 'h', '_', 's', 'u', 'b', 'r', 'e', 'g', '_', 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', 0,
};
extern const MCRegisterClass HexagonMCRegisterClasses[] = {
{ IntRegs, IntRegsBits, 46, 32, sizeof(IntRegsBits), Hexagon::IntRegsRegClassID, 4, 4, 1, 1 },
{ CtrRegs, CtrRegsBits, 38, 18, sizeof(CtrRegsBits), Hexagon::CtrRegsRegClassID, 4, 4, 1, 0 },
{ PredRegs, PredRegsBits, 10, 4, sizeof(PredRegsBits), Hexagon::PredRegsRegClassID, 4, 4, 1, 1 },
{ ModRegs, ModRegsBits, 19, 2, sizeof(ModRegsBits), Hexagon::ModRegsRegClassID, 4, 4, 1, 1 },
{ CtrRegs_with_subreg_overflow, CtrRegs_with_subreg_overflowBits, 85, 1, sizeof(CtrRegs_with_subreg_overflowBits), Hexagon::CtrRegs_with_subreg_overflowRegClassID, 4, 4, 1, 0 },
{ DoubleRegs, DoubleRegsBits, 27, 16, sizeof(DoubleRegsBits), Hexagon::DoubleRegsRegClassID, 8, 8, 1, 1 },
{ CtrRegs64, CtrRegs64Bits, 0, 7, sizeof(CtrRegs64Bits), Hexagon::CtrRegs64RegClassID, 8, 8, 1, 0 },
{ CtrRegs64_with_subreg_overflow, CtrRegs64_with_subreg_overflowBits, 54, 1, sizeof(CtrRegs64_with_subreg_overflowBits), Hexagon::CtrRegs64_with_subreg_overflowRegClassID, 8, 8, 1, 0 },
};
// Hexagon Dwarf<->LLVM register mappings.
extern const MCRegisterInfo::DwarfLLVMRegPair HexagonDwarfFlavour0Dwarf2L[] = {
{ 0U, Hexagon::R0 },
{ 1U, Hexagon::R1 },
{ 2U, Hexagon::R2 },
{ 3U, Hexagon::R3 },
{ 4U, Hexagon::R4 },
{ 5U, Hexagon::R5 },
{ 6U, Hexagon::R6 },
{ 7U, Hexagon::R7 },
{ 8U, Hexagon::R8 },
{ 9U, Hexagon::R9 },
{ 10U, Hexagon::R10 },
{ 11U, Hexagon::R11 },
{ 12U, Hexagon::R12 },
{ 13U, Hexagon::R13 },
{ 14U, Hexagon::R14 },
{ 15U, Hexagon::R15 },
{ 16U, Hexagon::R16 },
{ 17U, Hexagon::R17 },
{ 18U, Hexagon::R18 },
{ 19U, Hexagon::R19 },
{ 20U, Hexagon::R20 },
{ 21U, Hexagon::R21 },
{ 22U, Hexagon::R22 },
{ 23U, Hexagon::R23 },
{ 24U, Hexagon::R24 },
{ 25U, Hexagon::R25 },
{ 26U, Hexagon::R26 },
{ 27U, Hexagon::R27 },
{ 28U, Hexagon::R28 },
{ 29U, Hexagon::R29 },
{ 30U, Hexagon::R30 },
{ 31U, Hexagon::R31 },
{ 32U, Hexagon::D0 },
{ 34U, Hexagon::D1 },
{ 36U, Hexagon::D2 },
{ 38U, Hexagon::D3 },
{ 40U, Hexagon::D4 },
{ 42U, Hexagon::D5 },
{ 44U, Hexagon::D6 },
{ 46U, Hexagon::D7 },
{ 48U, Hexagon::D8 },
{ 50U, Hexagon::D9 },
{ 52U, Hexagon::D10 },
{ 54U, Hexagon::D11 },
{ 56U, Hexagon::D12 },
{ 58U, Hexagon::D13 },
{ 60U, Hexagon::D14 },
{ 62U, Hexagon::D15 },
{ 63U, Hexagon::P0 },
{ 64U, Hexagon::P1 },
{ 65U, Hexagon::P2 },
{ 66U, Hexagon::P3 },
{ 67U, Hexagon::C1_0 },
{ 68U, Hexagon::LC0 },
{ 69U, Hexagon::C3_2 },
{ 70U, Hexagon::LC1 },
{ 71U, Hexagon::P3_0 },
{ 72U, Hexagon::C7_6 },
{ 73U, Hexagon::M1 },
{ 74U, Hexagon::C9_8 },
{ 75U, Hexagon::PC },
{ 76U, Hexagon::C11_10 },
{ 77U, Hexagon::GP },
{ 78U, Hexagon::CS0 },
{ 79U, Hexagon::CS1 },
{ 80U, Hexagon::UPCL },
{ 81U, Hexagon::UPCH },
};
extern const unsigned HexagonDwarfFlavour0Dwarf2LSize = array_lengthof(HexagonDwarfFlavour0Dwarf2L);
extern const MCRegisterInfo::DwarfLLVMRegPair HexagonEHFlavour0Dwarf2L[] = {
{ 0U, Hexagon::R0 },
{ 1U, Hexagon::R1 },
{ 2U, Hexagon::R2 },
{ 3U, Hexagon::R3 },
{ 4U, Hexagon::R4 },
{ 5U, Hexagon::R5 },
{ 6U, Hexagon::R6 },
{ 7U, Hexagon::R7 },
{ 8U, Hexagon::R8 },
{ 9U, Hexagon::R9 },
{ 10U, Hexagon::R10 },
{ 11U, Hexagon::R11 },
{ 12U, Hexagon::R12 },
{ 13U, Hexagon::R13 },
{ 14U, Hexagon::R14 },
{ 15U, Hexagon::R15 },
{ 16U, Hexagon::R16 },
{ 17U, Hexagon::R17 },
{ 18U, Hexagon::R18 },
{ 19U, Hexagon::R19 },
{ 20U, Hexagon::R20 },
{ 21U, Hexagon::R21 },
{ 22U, Hexagon::R22 },
{ 23U, Hexagon::R23 },
{ 24U, Hexagon::R24 },
{ 25U, Hexagon::R25 },
{ 26U, Hexagon::R26 },
{ 27U, Hexagon::R27 },
{ 28U, Hexagon::R28 },
{ 29U, Hexagon::R29 },
{ 30U, Hexagon::R30 },
{ 31U, Hexagon::R31 },
{ 32U, Hexagon::D0 },
{ 34U, Hexagon::D1 },
{ 36U, Hexagon::D2 },
{ 38U, Hexagon::D3 },
{ 40U, Hexagon::D4 },
{ 42U, Hexagon::D5 },
{ 44U, Hexagon::D6 },
{ 46U, Hexagon::D7 },
{ 48U, Hexagon::D8 },
{ 50U, Hexagon::D9 },
{ 52U, Hexagon::D10 },
{ 54U, Hexagon::D11 },
{ 56U, Hexagon::D12 },
{ 58U, Hexagon::D13 },
{ 60U, Hexagon::D14 },
{ 62U, Hexagon::D15 },
{ 63U, Hexagon::P0 },
{ 64U, Hexagon::P1 },
{ 65U, Hexagon::P2 },
{ 66U, Hexagon::P3 },
{ 67U, Hexagon::C1_0 },
{ 68U, Hexagon::LC0 },
{ 69U, Hexagon::C3_2 },
{ 70U, Hexagon::LC1 },
{ 71U, Hexagon::P3_0 },
{ 72U, Hexagon::C7_6 },
{ 73U, Hexagon::M1 },
{ 74U, Hexagon::C9_8 },
{ 75U, Hexagon::PC },
{ 76U, Hexagon::C11_10 },
{ 77U, Hexagon::GP },
{ 78U, Hexagon::CS0 },
{ 79U, Hexagon::CS1 },
{ 80U, Hexagon::UPCL },
{ 81U, Hexagon::UPCH },
};
extern const unsigned HexagonEHFlavour0Dwarf2LSize = array_lengthof(HexagonEHFlavour0Dwarf2L);
extern const MCRegisterInfo::DwarfLLVMRegPair HexagonDwarfFlavour0L2Dwarf[] = {
{ Hexagon::CS, 78U },
{ Hexagon::GP, 77U },
{ Hexagon::PC, 75U },
{ Hexagon::UGP, 76U },
{ Hexagon::UPC, 80U },
{ Hexagon::UPCH, 81U },
{ Hexagon::UPCL, 80U },
{ Hexagon::USR, 74U },
{ Hexagon::C6, 72U },
{ Hexagon::C7, 73U },
{ Hexagon::CS0, 78U },
{ Hexagon::CS1, 79U },
{ Hexagon::D0, 32U },
{ Hexagon::D1, 34U },
{ Hexagon::D2, 36U },
{ Hexagon::D3, 38U },
{ Hexagon::D4, 40U },
{ Hexagon::D5, 42U },
{ Hexagon::D6, 44U },
{ Hexagon::D7, 46U },
{ Hexagon::D8, 48U },
{ Hexagon::D9, 50U },
{ Hexagon::D10, 52U },
{ Hexagon::D11, 54U },
{ Hexagon::D12, 56U },
{ Hexagon::D13, 58U },
{ Hexagon::D14, 60U },
{ Hexagon::D15, 62U },
{ Hexagon::LC0, 68U },
{ Hexagon::LC1, 70U },
{ Hexagon::M0, 72U },
{ Hexagon::M1, 73U },
{ Hexagon::P0, 63U },
{ Hexagon::P1, 64U },
{ Hexagon::P2, 65U },
{ Hexagon::P3, 66U },
{ Hexagon::R0, 0U },
{ Hexagon::R1, 1U },
{ Hexagon::R2, 2U },
{ Hexagon::R3, 3U },
{ Hexagon::R4, 4U },
{ Hexagon::R5, 5U },
{ Hexagon::R6, 6U },
{ Hexagon::R7, 7U },
{ Hexagon::R8, 8U },
{ Hexagon::R9, 9U },
{ Hexagon::R10, 10U },
{ Hexagon::R11, 11U },
{ Hexagon::R12, 12U },
{ Hexagon::R13, 13U },
{ Hexagon::R14, 14U },
{ Hexagon::R15, 15U },
{ Hexagon::R16, 16U },
{ Hexagon::R17, 17U },
{ Hexagon::R18, 18U },
{ Hexagon::R19, 19U },
{ Hexagon::R20, 20U },
{ Hexagon::R21, 21U },
{ Hexagon::R22, 22U },
{ Hexagon::R23, 23U },
{ Hexagon::R24, 24U },
{ Hexagon::R25, 25U },
{ Hexagon::R26, 26U },
{ Hexagon::R27, 27U },
{ Hexagon::R28, 28U },
{ Hexagon::R29, 29U },
{ Hexagon::R30, 30U },
{ Hexagon::R31, 31U },
{ Hexagon::SA0, 67U },
{ Hexagon::SA1, 69U },
{ Hexagon::C1_0, 67U },
{ Hexagon::C3_2, 69U },
{ Hexagon::C7_6, 72U },
{ Hexagon::C9_8, 74U },
{ Hexagon::C11_10, 76U },
{ Hexagon::P3_0, 71U },
};
extern const unsigned HexagonDwarfFlavour0L2DwarfSize = array_lengthof(HexagonDwarfFlavour0L2Dwarf);
extern const MCRegisterInfo::DwarfLLVMRegPair HexagonEHFlavour0L2Dwarf[] = {
{ Hexagon::CS, 78U },
{ Hexagon::GP, 77U },
{ Hexagon::PC, 75U },
{ Hexagon::UGP, 76U },
{ Hexagon::UPC, 80U },
{ Hexagon::UPCH, 81U },
{ Hexagon::UPCL, 80U },
{ Hexagon::USR, 74U },
{ Hexagon::C6, 72U },
{ Hexagon::C7, 73U },
{ Hexagon::CS0, 78U },
{ Hexagon::CS1, 79U },
{ Hexagon::D0, 32U },
{ Hexagon::D1, 34U },
{ Hexagon::D2, 36U },
{ Hexagon::D3, 38U },
{ Hexagon::D4, 40U },
{ Hexagon::D5, 42U },
{ Hexagon::D6, 44U },
{ Hexagon::D7, 46U },
{ Hexagon::D8, 48U },
{ Hexagon::D9, 50U },
{ Hexagon::D10, 52U },
{ Hexagon::D11, 54U },
{ Hexagon::D12, 56U },
{ Hexagon::D13, 58U },
{ Hexagon::D14, 60U },
{ Hexagon::D15, 62U },
{ Hexagon::LC0, 68U },
{ Hexagon::LC1, 70U },
{ Hexagon::M0, 72U },
{ Hexagon::M1, 73U },
{ Hexagon::P0, 63U },
{ Hexagon::P1, 64U },
{ Hexagon::P2, 65U },
{ Hexagon::P3, 66U },
{ Hexagon::R0, 0U },
{ Hexagon::R1, 1U },
{ Hexagon::R2, 2U },
{ Hexagon::R3, 3U },
{ Hexagon::R4, 4U },
{ Hexagon::R5, 5U },
{ Hexagon::R6, 6U },
{ Hexagon::R7, 7U },
{ Hexagon::R8, 8U },
{ Hexagon::R9, 9U },
{ Hexagon::R10, 10U },
{ Hexagon::R11, 11U },
{ Hexagon::R12, 12U },
{ Hexagon::R13, 13U },
{ Hexagon::R14, 14U },
{ Hexagon::R15, 15U },
{ Hexagon::R16, 16U },
{ Hexagon::R17, 17U },
{ Hexagon::R18, 18U },
{ Hexagon::R19, 19U },
{ Hexagon::R20, 20U },
{ Hexagon::R21, 21U },
{ Hexagon::R22, 22U },
{ Hexagon::R23, 23U },
{ Hexagon::R24, 24U },
{ Hexagon::R25, 25U },
{ Hexagon::R26, 26U },
{ Hexagon::R27, 27U },
{ Hexagon::R28, 28U },
{ Hexagon::R29, 29U },
{ Hexagon::R30, 30U },
{ Hexagon::R31, 31U },
{ Hexagon::SA0, 67U },
{ Hexagon::SA1, 69U },
{ Hexagon::C1_0, 67U },
{ Hexagon::C3_2, 69U },
{ Hexagon::C7_6, 72U },
{ Hexagon::C9_8, 74U },
{ Hexagon::C11_10, 76U },
{ Hexagon::P3_0, 71U },
};
extern const unsigned HexagonEHFlavour0L2DwarfSize = array_lengthof(HexagonEHFlavour0L2Dwarf);
extern const uint16_t HexagonRegEncodingTable[] = {
0,
12,
11,
9,
10,
14,
15,
14,
8,
0,
6,
7,
12,
13,
0,
2,
4,
6,
8,
10,
12,
14,
16,
18,
20,
22,
24,
26,
28,
30,
1,
3,
0,
1,
0,
1,
2,
3,
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,
0,
2,
0,
2,
6,
8,
10,
4,
};
static inline void InitHexagonMCRegisterInfo(MCRegisterInfo *RI, unsigned RA, unsigned DwarfFlavour = 0, unsigned EHFlavour = 0, unsigned PC = 0) {
RI->InitMCRegisterInfo(HexagonRegDesc, 78, RA, PC, HexagonMCRegisterClasses, 8, HexagonRegUnitRoots, 50, HexagonRegDiffLists, HexagonLaneMaskLists, HexagonRegStrings, HexagonRegClassStrings, HexagonSubRegIdxLists, 4,
HexagonSubRegIdxRanges, HexagonRegEncodingTable);
switch (DwarfFlavour) {
default:
llvm_unreachable("Unknown DWARF flavour");
case 0:
RI->mapDwarfRegsToLLVMRegs(HexagonDwarfFlavour0Dwarf2L, HexagonDwarfFlavour0Dwarf2LSize, false);
break;
}
switch (EHFlavour) {
default:
llvm_unreachable("Unknown DWARF flavour");
case 0:
RI->mapDwarfRegsToLLVMRegs(HexagonEHFlavour0Dwarf2L, HexagonEHFlavour0Dwarf2LSize, true);
break;
}
switch (DwarfFlavour) {
default:
llvm_unreachable("Unknown DWARF flavour");
case 0:
RI->mapLLVMRegsToDwarfRegs(HexagonDwarfFlavour0L2Dwarf, HexagonDwarfFlavour0L2DwarfSize, false);
break;
}
switch (EHFlavour) {
default:
llvm_unreachable("Unknown DWARF flavour");
case 0:
RI->mapLLVMRegsToDwarfRegs(HexagonEHFlavour0L2Dwarf, HexagonEHFlavour0L2DwarfSize, true);
break;
}
}
} // End llvm namespace
#endif // GET_REGINFO_MC_DESC
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|*Register Information Header Fragment *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
#ifdef GET_REGINFO_HEADER
#undef GET_REGINFO_HEADER
#include "llvm/Target/TargetRegisterInfo.h"
namespace llvm {
struct HexagonGenRegisterInfo : public TargetRegisterInfo {
explicit HexagonGenRegisterInfo(unsigned RA, unsigned D = 0, unsigned E = 0, unsigned PC = 0);
bool needsStackRealignment(const MachineFunction &) const override
{ return false; }
unsigned composeSubRegIndicesImpl(unsigned, unsigned) const override;
unsigned composeSubRegIndexLaneMaskImpl(unsigned, unsigned) const override;
const TargetRegisterClass *getSubClassWithSubReg(const TargetRegisterClass*, unsigned) const override;
const RegClassWeight &getRegClassWeight(const TargetRegisterClass *RC) const override;
unsigned getRegUnitWeight(unsigned RegUnit) const override;
unsigned getNumRegPressureSets() const override;
const char *getRegPressureSetName(unsigned Idx) const override;
unsigned getRegPressureSetLimit(unsigned Idx) const override;
const int *getRegClassPressureSets(const TargetRegisterClass *RC) const override;
const int *getRegUnitPressureSets(unsigned RegUnit) const override;
};
namespace Hexagon { // Register classes
extern const TargetRegisterClass IntRegsRegClass;
extern const TargetRegisterClass CtrRegsRegClass;
extern const TargetRegisterClass PredRegsRegClass;
extern const TargetRegisterClass ModRegsRegClass;
extern const TargetRegisterClass CtrRegs_with_subreg_overflowRegClass;
extern const TargetRegisterClass DoubleRegsRegClass;
extern const TargetRegisterClass CtrRegs64RegClass;
extern const TargetRegisterClass CtrRegs64_with_subreg_overflowRegClass;
} // end of namespace Hexagon
} // End llvm namespace
#endif // GET_REGINFO_HEADER
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|*Target Register and Register Classes Information *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
#ifdef GET_REGINFO_TARGET_DESC
#undef GET_REGINFO_TARGET_DESC
namespace llvm {
extern const MCRegisterClass HexagonMCRegisterClasses[];
static const MVT::SimpleValueType VTLists[] = {
/* 0 */ MVT::i1, MVT::v2i1, MVT::v4i1, MVT::v8i1, MVT::v4i8, MVT::v2i16, MVT::i32, MVT::Other,
/* 8 */ MVT::i64, MVT::Other,
/* 10 */ MVT::i32, MVT::f32, MVT::v4i8, MVT::v2i16, MVT::Other,
/* 15 */ MVT::i64, MVT::f64, MVT::v8i8, MVT::v4i16, MVT::v2i32, MVT::Other,
};
static const char *const SubRegIndexNameTable[] = { "subreg_hireg", "subreg_loreg", "subreg_overflow", "" };
static const unsigned SubRegIndexLaneMaskTable[] = {
~0u,
0x00000001, // subreg_hireg
0x00000002, // subreg_loreg
0x00000002, // subreg_overflow
};
static const TargetRegisterClass *const NullRegClasses[] = { nullptr };
static const uint32_t IntRegsSubClassMask[] = {
0x00000001,
0x00000020, // subreg_hireg
0x00000020, // subreg_loreg
};
static const uint32_t CtrRegsSubClassMask[] = {
0x0000001a,
0x000000c0, // subreg_hireg
0x000000c0, // subreg_loreg
0x00000090, // subreg_overflow
};
static const uint32_t PredRegsSubClassMask[] = {
0x00000004,
};
static const uint32_t ModRegsSubClassMask[] = {
0x00000008,
};
static const uint32_t CtrRegs_with_subreg_overflowSubClassMask[] = {
0x00000010,
0x00000080, // subreg_loreg
};
static const uint32_t DoubleRegsSubClassMask[] = {
0x00000020,
};
static const uint32_t CtrRegs64SubClassMask[] = {
0x000000c0,
};
static const uint32_t CtrRegs64_with_subreg_overflowSubClassMask[] = {
0x00000080,
};
static const uint16_t SuperRegIdxSeqs[] = {
/* 0 */ 1, 2, 0,
/* 3 */ 1, 2, 3, 0,
};
static const TargetRegisterClass *const ModRegsSuperclasses[] = {
&Hexagon::CtrRegsRegClass,
nullptr
};
static const TargetRegisterClass *const CtrRegs_with_subreg_overflowSuperclasses[] = {
&Hexagon::CtrRegsRegClass,
nullptr
};
static const TargetRegisterClass *const CtrRegs64_with_subreg_overflowSuperclasses[] = {
&Hexagon::CtrRegs64RegClass,
nullptr
};
namespace Hexagon { // Register class instances
extern const TargetRegisterClass IntRegsRegClass = {
&HexagonMCRegisterClasses[IntRegsRegClassID],
VTLists + 10,
IntRegsSubClassMask,
SuperRegIdxSeqs + 0,
0x00000000,
NullRegClasses,
nullptr
};
extern const TargetRegisterClass CtrRegsRegClass = {
&HexagonMCRegisterClasses[CtrRegsRegClassID],
VTLists + 6,
CtrRegsSubClassMask,
SuperRegIdxSeqs + 3,
0x00000000,
NullRegClasses,
nullptr
};
extern const TargetRegisterClass PredRegsRegClass = {
&HexagonMCRegisterClasses[PredRegsRegClassID],
VTLists + 0,
PredRegsSubClassMask,
SuperRegIdxSeqs + 2,
0x00000000,
NullRegClasses,
nullptr
};
extern const TargetRegisterClass ModRegsRegClass = {
&HexagonMCRegisterClasses[ModRegsRegClassID],
VTLists + 6,
ModRegsSubClassMask,
SuperRegIdxSeqs + 2,
0x00000000,
ModRegsSuperclasses,
nullptr
};
extern const TargetRegisterClass CtrRegs_with_subreg_overflowRegClass = {
&HexagonMCRegisterClasses[CtrRegs_with_subreg_overflowRegClassID],
VTLists + 6,
CtrRegs_with_subreg_overflowSubClassMask,
SuperRegIdxSeqs + 1,
0x00000002,
CtrRegs_with_subreg_overflowSuperclasses,
nullptr
};
extern const TargetRegisterClass DoubleRegsRegClass = {
&HexagonMCRegisterClasses[DoubleRegsRegClassID],
VTLists + 15,
DoubleRegsSubClassMask,
SuperRegIdxSeqs + 2,
0x00000003,
NullRegClasses,
nullptr
};
extern const TargetRegisterClass CtrRegs64RegClass = {
&HexagonMCRegisterClasses[CtrRegs64RegClassID],
VTLists + 8,
CtrRegs64SubClassMask,
SuperRegIdxSeqs + 2,
0x00000003,
NullRegClasses,
nullptr
};
extern const TargetRegisterClass CtrRegs64_with_subreg_overflowRegClass = {
&HexagonMCRegisterClasses[CtrRegs64_with_subreg_overflowRegClassID],
VTLists + 8,
CtrRegs64_with_subreg_overflowSubClassMask,
SuperRegIdxSeqs + 2,
0x00000003,
CtrRegs64_with_subreg_overflowSuperclasses,
nullptr
};
}
namespace {
const TargetRegisterClass* const RegisterClasses[] = {
&Hexagon::IntRegsRegClass,
&Hexagon::CtrRegsRegClass,
&Hexagon::PredRegsRegClass,
&Hexagon::ModRegsRegClass,
&Hexagon::CtrRegs_with_subreg_overflowRegClass,
&Hexagon::DoubleRegsRegClass,
&Hexagon::CtrRegs64RegClass,
&Hexagon::CtrRegs64_with_subreg_overflowRegClass,
};
}
static const TargetRegisterInfoDesc HexagonRegInfoDesc[] = { // Extra Descriptors
{ 0, 0 },
{ 0, 0 },
{ 0, 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, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 0 },
{ 0, 0 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 1 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
};
unsigned HexagonGenRegisterInfo::composeSubRegIndicesImpl(unsigned IdxA, unsigned IdxB) const {
static const uint8_t Rows[1][3] = {
{ 0, 0, 3, },
};
--IdxA; assert(IdxA < 3);
--IdxB; assert(IdxB < 3);
return Rows[0][IdxB];
}
unsigned HexagonGenRegisterInfo::composeSubRegIndexLaneMaskImpl(unsigned IdxA, unsigned LaneMask) const {
struct MaskRolOp {
unsigned Mask;
uint8_t RotateLeft;
};
static const MaskRolOp Seqs[] = {
{ 0xFFFFFFFF, 0 }, { 0, 0 } // Sequence 0
};
static const MaskRolOp *CompositeSequences[] = {
&Seqs[0], // to subreg_hireg
&Seqs[0], // to subreg_loreg
&Seqs[0] // to subreg_overflow
};
--IdxA; assert(IdxA < 3 && "Subregister index out of bounds");
unsigned Result = 0;
for (const MaskRolOp *Ops = CompositeSequences[IdxA]; Ops->Mask != 0; ++Ops) {
unsigned Masked = LaneMask & Ops->Mask;
Result |= (Masked << Ops->RotateLeft) & 0xFFFFFFFF;
Result |= (Masked >> ((32 - Ops->RotateLeft) & 0x1F));
}
return Result;
}
const TargetRegisterClass *HexagonGenRegisterInfo::getSubClassWithSubReg(const TargetRegisterClass *RC, unsigned Idx) const {
static const uint8_t Table[8][3] = {
{ // IntRegs
0, // subreg_hireg
0, // subreg_loreg
0, // subreg_overflow
},
{ // CtrRegs
0, // subreg_hireg
0, // subreg_loreg
5, // subreg_overflow -> CtrRegs_with_subreg_overflow
},
{ // PredRegs
0, // subreg_hireg
0, // subreg_loreg
0, // subreg_overflow
},
{ // ModRegs
0, // subreg_hireg
0, // subreg_loreg
0, // subreg_overflow
},
{ // CtrRegs_with_subreg_overflow
0, // subreg_hireg
0, // subreg_loreg
5, // subreg_overflow -> CtrRegs_with_subreg_overflow
},
{ // DoubleRegs
6, // subreg_hireg -> DoubleRegs
6, // subreg_loreg -> DoubleRegs
0, // subreg_overflow
},
{ // CtrRegs64
7, // subreg_hireg -> CtrRegs64
7, // subreg_loreg -> CtrRegs64
8, // subreg_overflow -> CtrRegs64_with_subreg_overflow
},
{ // CtrRegs64_with_subreg_overflow
8, // subreg_hireg -> CtrRegs64_with_subreg_overflow
8, // subreg_loreg -> CtrRegs64_with_subreg_overflow
8, // subreg_overflow -> CtrRegs64_with_subreg_overflow
},
};
assert(RC && "Missing regclass");
if (!Idx) return RC;
--Idx;
assert(Idx < 3 && "Bad subreg");
unsigned TV = Table[RC->getID()][Idx];
return TV ? getRegClass(TV - 1) : nullptr;
}
/// Get the weight in units of pressure for this register class.
const RegClassWeight &HexagonGenRegisterInfo::
getRegClassWeight(const TargetRegisterClass *RC) const {
static const RegClassWeight RCWeightTable[] = {
{1, 32}, // IntRegs
{0, 6}, // CtrRegs
{1, 4}, // PredRegs
{1, 2}, // ModRegs
{0, 0}, // CtrRegs_with_subreg_overflow
{2, 32}, // DoubleRegs
{0, 2}, // CtrRegs64
{0, 0}, // CtrRegs64_with_subreg_overflow
};
return RCWeightTable[RC->getID()];
}
/// Get the weight in units of pressure for this register unit.
unsigned HexagonGenRegisterInfo::
getRegUnitWeight(unsigned RegUnit) const {
assert(RegUnit < 50 && "invalid register unit");
// All register units have unit weight.
return 1;
}
// Get the number of dimensions of register pressure.
unsigned HexagonGenRegisterInfo::getNumRegPressureSets() const {
return 3;
}
// Get the name of this register unit pressure set.
const char *HexagonGenRegisterInfo::
getRegPressureSetName(unsigned Idx) const {
static const char *PressureNameTable[] = {
"ModRegs",
"PredRegs",
"IntRegs",
nullptr };
return PressureNameTable[Idx];
}
// Get the register unit pressure limit for this dimension.
// This limit must be adjusted dynamically for reserved registers.
unsigned HexagonGenRegisterInfo::
getRegPressureSetLimit(unsigned Idx) const {
static const uint8_t PressureLimitTable[] = {
2, // 0: ModRegs
4, // 1: PredRegs
32, // 2: IntRegs
};
return PressureLimitTable[Idx];
}
/// Table of pressure sets per register class or unit.
static const int RCSetsTable[] = {
/* 0 */ 0, -1,
/* 2 */ 1, -1,
/* 4 */ 2, -1,
};
/// Get the dimensions of register pressure impacted by this register class.
/// Returns a -1 terminated array of pressure set IDs
const int* HexagonGenRegisterInfo::
getRegClassPressureSets(const TargetRegisterClass *RC) const {
static const uint8_t RCSetStartTable[] = {
4,1,2,0,1,4,1,1,};
return &RCSetsTable[RCSetStartTable[RC->getID()]];
}
/// Get the dimensions of register pressure impacted by this register unit.
/// Returns a -1 terminated array of pressure set IDs
const int* HexagonGenRegisterInfo::
getRegUnitPressureSets(unsigned RegUnit) const {
assert(RegUnit < 50 && "invalid register unit");
static const uint8_t RUSetStartTable[] = {
1,1,1,1,1,1,1,1,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,2,2,2,2,1,1,};
return &RCSetsTable[RUSetStartTable[RegUnit]];
}
extern const MCRegisterDesc HexagonRegDesc[];
extern const MCPhysReg HexagonRegDiffLists[];
extern const unsigned HexagonLaneMaskLists[];
extern const char HexagonRegStrings[];
extern const char HexagonRegClassStrings[];
extern const MCPhysReg HexagonRegUnitRoots[][2];
extern const uint16_t HexagonSubRegIdxLists[];
extern const MCRegisterInfo::SubRegCoveredBits HexagonSubRegIdxRanges[];
extern const uint16_t HexagonRegEncodingTable[];
// Hexagon Dwarf<->LLVM register mappings.
extern const MCRegisterInfo::DwarfLLVMRegPair HexagonDwarfFlavour0Dwarf2L[];
extern const unsigned HexagonDwarfFlavour0Dwarf2LSize;
extern const MCRegisterInfo::DwarfLLVMRegPair HexagonEHFlavour0Dwarf2L[];
extern const unsigned HexagonEHFlavour0Dwarf2LSize;
extern const MCRegisterInfo::DwarfLLVMRegPair HexagonDwarfFlavour0L2Dwarf[];
extern const unsigned HexagonDwarfFlavour0L2DwarfSize;
extern const MCRegisterInfo::DwarfLLVMRegPair HexagonEHFlavour0L2Dwarf[];
extern const unsigned HexagonEHFlavour0L2DwarfSize;
HexagonGenRegisterInfo::
HexagonGenRegisterInfo(unsigned RA, unsigned DwarfFlavour, unsigned EHFlavour, unsigned PC)
: TargetRegisterInfo(HexagonRegInfoDesc, RegisterClasses, RegisterClasses+8,
SubRegIndexNameTable, SubRegIndexLaneMaskTable, 0xfffffffd) {
InitMCRegisterInfo(HexagonRegDesc, 78, RA, PC,
HexagonMCRegisterClasses, 8,
HexagonRegUnitRoots,
50,
HexagonRegDiffLists,
HexagonLaneMaskLists,
HexagonRegStrings,
HexagonRegClassStrings,
HexagonSubRegIdxLists,
4,
HexagonSubRegIdxRanges,
HexagonRegEncodingTable);
switch (DwarfFlavour) {
default:
llvm_unreachable("Unknown DWARF flavour");
case 0:
mapDwarfRegsToLLVMRegs(HexagonDwarfFlavour0Dwarf2L, HexagonDwarfFlavour0Dwarf2LSize, false);
break;
}
switch (EHFlavour) {
default:
llvm_unreachable("Unknown DWARF flavour");
case 0:
mapDwarfRegsToLLVMRegs(HexagonEHFlavour0Dwarf2L, HexagonEHFlavour0Dwarf2LSize, true);
break;
}
switch (DwarfFlavour) {
default:
llvm_unreachable("Unknown DWARF flavour");
case 0:
mapLLVMRegsToDwarfRegs(HexagonDwarfFlavour0L2Dwarf, HexagonDwarfFlavour0L2DwarfSize, false);
break;
}
switch (EHFlavour) {
default:
llvm_unreachable("Unknown DWARF flavour");
case 0:
mapLLVMRegsToDwarfRegs(HexagonEHFlavour0L2Dwarf, HexagonEHFlavour0L2DwarfSize, true);
break;
}
}
} // End llvm namespace
#endif // GET_REGINFO_TARGET_DESC
| [
"yanchao2012@gmail.com"
] | yanchao2012@gmail.com |
b74c1c5b91fbb0f10fd6eabedc29e200ab6cec1c | 39037781b383ddd596d1df62c25e9bf4a717e588 | /modules/sksg/include/SkSGPath.h | d8ffcbeaee32f8956699e8a87303e2a9d34f7099 | [
"BSD-3-Clause"
] | permissive | adriandumitru/skia | 35dd6709c682ce822d28ba82e7cf73dd7c6c2fcf | 5bcfc78e41a9096f9a4eb33ac4d54e3b435fe1d0 | refs/heads/master | 2020-07-26T17:13:01.441057 | 2019-11-28T11:15:54 | 2019-11-28T11:15:54 | 208,711,635 | 0 | 0 | NOASSERTION | 2019-11-28T11:12:58 | 2019-09-16T04:44:52 | null | UTF-8 | C++ | false | false | 1,486 | h | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSGPath_DEFINED
#define SkSGPath_DEFINED
#include "modules/sksg/include/SkSGGeometryNode.h"
#include "include/core/SkPath.h"
class SkCanvas;
class SkPaint;
namespace sksg {
/**
* Concrete Geometry node, wrapping an SkPath.
*/
class Path : public GeometryNode {
public:
static sk_sp<Path> Make() { return sk_sp<Path>(new Path(SkPath())); }
static sk_sp<Path> Make(const SkPath& r) { return sk_sp<Path>(new Path(r)); }
SG_ATTRIBUTE(Path, SkPath, fPath)
// Temporarily inlined for SkPathFillType staging
// SG_MAPPED_ATTRIBUTE(FillType, SkPathFillType, fPath)
SkPathFillType getFillType() const {
return fPath.getNewFillType();
}
void setFillType(SkPathFillType fillType) {
if (fillType != fPath.getNewFillType()) {
fPath.setFillType(fillType);
this->invalidate();
}
}
protected:
void onClip(SkCanvas*, bool antiAlias) const override;
void onDraw(SkCanvas*, const SkPaint&) const override;
bool onContains(const SkPoint&) const override;
SkRect onRevalidate(InvalidationController*, const SkMatrix&) override;
SkPath onAsPath() const override;
private:
explicit Path(const SkPath&);
SkPath fPath;
using INHERITED = GeometryNode;
};
} // namespace sksg
#endif // SkSGPath_DEFINED
| [
"skia-commit-bot@chromium.org"
] | skia-commit-bot@chromium.org |
1cecbabd9806e7f77c5ffb70911114030ae064c4 | 284d8657b07536bea5d400168a98c1a3ce0bc851 | /xray/xbox_debug_client/sources/memory.h | cf6d58f4d60f05443cce00625c716e1e4abab6a6 | [] | no_license | yxf010/xray-2.0 | c6bcd35caa4677ab19cd8be241ce1cc0a25c74a7 | 47461806c25e34005453a373b07ce5b00df2c295 | refs/heads/master | 2020-08-29T21:35:38.253150 | 2019-05-23T16:00:42 | 2019-05-23T16:00:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,187 | h | ////////////////////////////////////////////////////////////////////////////
// Created : 15.01.2010
// Author : Alexander Maniluk
// Copyright (C) GSC Game World - 2010
////////////////////////////////////////////////////////////////////////////
#ifndef MEMORY_H_INCLUDED
#define MEMORY_H_INCLUDED
#include <xray/buffer_vector.h>
#include <xray/fixed_vector.h>
#include <xray/associative_vector.h>
#include <xray/hash_multiset.h>
#include <map>
#include <vector>
#include <set>
extern xray::memory::doug_lea_allocator_type g_allocator;
#define USER_ALLOCATOR g_allocator
#include <xray/std_containers.h>
#undef USER_ALLOCATOR
#define NEW( type ) XRAY_NEW_IMPL( g_allocator, type )
#define DELETE( pointer ) XRAY_DELETE_IMPL( g_allocator, pointer )
#define MALLOC( size, description ) XRAY_MALLOC_IMPL( g_allocator, size, description )
#define REALLOC( pointer, size, description ) XRAY_REALLOC_IMPL( g_allocator, pointer, size, description )
#define FREE( pointer ) XRAY_FREE_IMPL( g_allocator, pointer )
#define ALLOC( type, count ) XRAY_ALLOC_IMPL( g_allocator, type, count )
#endif // #ifndef MEMORY_H_INCLUDED | [
"tyabustest@gmail.com"
] | tyabustest@gmail.com |
809273d5cf2b962e699fccf9ccf36c63d7bfedf3 | 4a14ea3c208ce9635cdfc519dd5b293d8a2198ba | /Readers/MatrixReader.cpp | 79cf3eba355d18b56d63d2bcc5104aba9864090a | [] | no_license | gloomyRuby/SWPan | 9d9bbb1f789489668167e7c389f3ff52594e8046 | bcc71fdc620951ddebfc2888376d85fa1e217826 | refs/heads/master | 2021-05-10T22:37:17.646755 | 2018-05-07T04:10:17 | 2018-05-07T04:10:17 | 118,262,668 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 605 | cpp | ////
//// Created by Oysha on 20/01/2018.
////
//
//#include "MatrixReader.h"
//#include <iostream>
//#include <fstream>
//
//
//int **MatrixReader::getGeneratorMatrix(std::istream &input) const
//{
// int n, k;
// input >> n >> k;
//
// auto **matrix = (int**)malloc(n * sizeof(int*));
// for (int i = 0; i < n; i++) {
// matrix[i] = (int*)malloc(k * sizeof(int));
// }
//
// for (int i = 0; i < k; i++) {
// for (int j = 0; j < n; j++) {
// int tmp;
// input >> tmp;
// matrix[i][j] = tmp;
// }
// }
//
// return matrix;
//}
| [
"rubylight149@gmail.com"
] | rubylight149@gmail.com |
e66b90512c4c2bc48c485adf278a6c94b75a3a29 | 858e84a361b4d3f6708160b8d587bc0479d133cd | /dep/UILib/Control/UIRichEdit.h | a68e100c4ae8b02d48879f87cb8bcd2c98eab598 | [
"MIT"
] | permissive | canplay/BDO-Frontend | 54979d7b3606a8c050ff5db2005dac748b2740d4 | 23c25c1c3d3bc5826c91efaca14b08c9bc34166e | refs/heads/master | 2022-05-06T19:20:33.363040 | 2022-03-08T16:51:22 | 2022-03-08T16:51:22 | 211,227,675 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,158 | h | #ifndef __UIRICHEDIT_H__
#define __UIRICHEDIT_H__
#pragma once
namespace UILib {
class CTxtWinHost;
class UILIB_API CRichEditUI : public CContainerUI, public IMessageFilterUI
{
public:
CRichEditUI();
~CRichEditUI();
LPCTSTR GetClass() const;
LPVOID GetInterface(LPCTSTR pstrName);
UINT GetControlFlags() const;
bool IsWantTab();
void SetWantTab(bool bWantTab = true);
bool IsWantReturn();
void SetWantReturn(bool bWantReturn = true);
bool IsWantCtrlReturn();
void SetWantCtrlReturn(bool bWantCtrlReturn = true);
bool IsTransparent();
void SetTransparent(bool bTransparent = true);
bool IsRich();
void SetRich(bool bRich = true);
bool IsReadOnly();
void SetReadOnly(bool bReadOnly = true);
bool IsWordWrap();
void SetWordWrap(bool bWordWrap = true);
int GetFont();
void SetFont(int index);
void SetFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);
LONG GetWinStyle();
void SetWinStyle(LONG lStyle);
DWORD GetTextColor();
void SetTextColor(DWORD dwTextColor);
int GetLimitText();
void SetLimitText(int iChars);
long GetTextLength(DWORD dwFlags = GTL_DEFAULT) const;
CDuiString GetText() const;
void SetText(LPCTSTR pstrText);
bool IsModify() const;
void SetModify(bool bModified = true) const;
void GetSel(CHARRANGE &cr) const;
void GetSel(long& nStartChar, long& nEndChar) const;
int SetSel(CHARRANGE &cr);
int SetSel(long nStartChar, long nEndChar);
void ReplaceSel(LPCTSTR lpszNewText, bool bCanUndo);
void ReplaceSelW(LPCWSTR lpszNewText, bool bCanUndo = false);
CDuiString GetSelText() const;
int SetSelAll();
int SetSelNone();
WORD GetSelectionType() const;
bool GetZoom(int& nNum, int& nDen) const;
bool SetZoom(int nNum, int nDen);
bool SetZoomOff();
bool GetAutoURLDetect() const;
bool SetAutoURLDetect(bool bAutoDetect = true);
DWORD GetEventMask() const;
DWORD SetEventMask(DWORD dwEventMask);
CDuiString GetTextRange(long nStartChar, long nEndChar) const;
void HideSelection(bool bHide = true, bool bChangeStyle = false);
void ScrollCaret();
int InsertText(long nInsertAfterChar, LPCTSTR lpstrText, bool bCanUndo = false);
int AppendText(LPCTSTR lpstrText, bool bCanUndo = false);
DWORD GetDefaultCharFormat(CHARFORMAT2 &cf) const;
bool SetDefaultCharFormat(CHARFORMAT2 &cf);
DWORD GetSelectionCharFormat(CHARFORMAT2 &cf) const;
bool SetSelectionCharFormat(CHARFORMAT2 &cf);
bool SetWordCharFormat(CHARFORMAT2 &cf);
DWORD GetParaFormat(PARAFORMAT2 &pf) const;
bool SetParaFormat(PARAFORMAT2 &pf);
bool Redo();
bool Undo();
void Clear();
void Copy();
void Cut();
void Paste();
int GetLineCount() const;
CDuiString GetLine(int nIndex, int nMaxLength) const;
int LineIndex(int nLine = -1) const;
int LineLength(int nLine = -1) const;
bool LineScroll(int nLines, int nChars = 0);
CDuiPoint GetCharPos(long lChar) const;
long LineFromChar(long nIndex) const;
CDuiPoint PosFromChar(UINT nChar) const;
int CharFromPos(CDuiPoint pt) const;
void EmptyUndoBuffer();
UINT SetUndoLimit(UINT nLimit);
long StreamIn(int nFormat, EDITSTREAM &es);
long StreamOut(int nFormat, EDITSTREAM &es);
RECT GetTextPadding() const;
void SetTextPadding(RECT rc);
void DoInit();
bool SetDropAcceptFile(bool bAccept);
// ע�⣺TxSendMessage��SendMessage��������ģ�TxSendMessageû��multibyte��unicode�Զ�ת���Ĺ��ܣ�
// ��richedit2.0�ڲ�����unicodeʵ�ֵģ���multibyte�����У������Լ�����unicode��multibyte��ת��
virtual HRESULT TxSendMessage(UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *plresult) const;
IDropTarget* GetTxDropTarget();
virtual bool OnTxViewChanged();
virtual void OnTxNotify(DWORD iNotify, void *pv);
void SetScrollPos(SIZE szPos);
void LineUp();
void LineDown();
void PageUp();
void PageDown();
void HomeUp();
void EndDown();
void LineLeft();
void LineRight();
void PageLeft();
void PageRight();
void HomeLeft();
void EndRight();
SIZE EstimateSize(SIZE szAvailable);
void SetPos(RECT rc, bool bNeedInvalidate = true);
void Move(SIZE szOffset, bool bNeedInvalidate = true);
void DoEvent(TEventUI& event);
bool DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl);
void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
protected:
enum {
DEFAULT_TIMERID = 20,
};
CTxtWinHost* m_pTwh;
bool m_bVScrollBarFixing;
bool m_bWantTab;
bool m_bWantReturn;
bool m_bWantCtrlReturn;
bool m_bTransparent;
bool m_bRich;
bool m_bReadOnly;
bool m_bWordWrap;
DWORD m_dwTextColor;
int m_iFont;
int m_iLimitText;
LONG m_lTwhStyle;
bool m_bDrawCaret;
bool m_bInited;
RECT m_rcTextPadding;
};
} // namespace UILib
#endif // __UIRICHEDIT_H__
| [
"canplay@vip.qq.com"
] | canplay@vip.qq.com |
811d942c5c8d311bb567d6ea1b3b08153444abbb | e4485af9cde8e9537e966f6bd674899a4d3941c6 | /midem_apps/midem_user_interaction/include/gesture_detector/skeleton_gesture_detector.h | 79d2a3cb746b72e4d36a6f41c4d54a638916b215 | [] | no_license | hiveground-ros-package/MIDEM | 1083bf6e7cce2ecb04b0eb13b647d9af4e6a9746 | ce75dff604d4f77e7b118d58c4ef64f2f2c40f02 | refs/heads/master | 2020-04-23T02:45:18.607433 | 2014-04-18T07:54:57 | 2014-04-18T07:54:57 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,089 | h | /*
* Copyright (c) 2013, HiveGround Co., Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the HiveGround Co., Ltd., nor the name of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Author: Mahisorn Wongphati
*
*/
#ifndef HG_SKELENTON_GESTURE_DETECTOR
#define HG_SKELENTON_GESTURE_DETECTOR
#include "gesture_detector.h"
#include <kinect_msgs/Skeletons.h>
namespace hg_gesture_detector
{
class SkelentonGestureDetector : public GestureDetector
{
public:
virtual ~SkelentonGestureDetector() { }
virtual void addMessage(const kinect_msgs::Skeleton& msg) = 0;
protected:
SkelentonGestureDetector() { }
};
}
#endif //HG_SKELENTON_GESTURE_DETECTOR
| [
"mahisorn.w@hiveground.com"
] | mahisorn.w@hiveground.com |
4c5a9b17de3a35fe02c8945e4e1ca743407621e0 | 9def52cdb72fccf1c67357b0d465ca187d401d1e | /003 Clock 2.0/Client.cpp | d2efff4b27adade9cb1dc2165f56eb397a5f9c29 | [] | no_license | victormarcilio/zeroc-ice | 283a6507438f4afc6a4cef28c7b613d48b554190 | 00ccc90ba2346d932900c279ae1c72c17fa9b6a6 | refs/heads/main | 2023-05-04T11:45:13.397761 | 2021-05-18T20:41:46 | 2021-05-18T20:41:46 | 356,360,057 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,362 | cpp | #include <Ice/Ice.h>
#include <Clock.h>
#include <iomanip>
#include <Glacier2/Glacier2.h>
#include <Glacier2/Router.h>
#include <Glacier2/Session.h>
#include <stdexcept>
using namespace std;
using namespace Demo;
int main(int argc, char* argv[])
{
string senderConnectionStringTCP = "ClockID:tcp -p 10000";
string senderConnectionStringUDP = "ClockID:udp -p 10000";
string gatewayConnectionString = "DemoGlacier2/router:tcp -p 4063";
try
{
Ice::CommunicatorHolder ich(argc, argv);
bool usingGateway = false;
shared_ptr<Glacier2::SessionPrx> session;
if (usingGateway)
{
shared_ptr<Glacier2::RouterPrx> router = Ice::checkedCast<Glacier2::RouterPrx>(ich->stringToProxy(gatewayConnectionString));
ich->setDefaultRouter(router);
session = router->createSession("", "");
}
auto base = ich->stringToProxy(senderConnectionStringTCP);
auto baseUDP = ich->stringToProxy(senderConnectionStringUDP);
auto clockTCP = Ice::checkedCast<ClockPrx>(base);
auto clockUDP = Ice::uncheckedCast<ClockPrx>(baseUDP->ice_datagram());
if (!clockTCP)
{
throw std::runtime_error("Invalid proxy");
}
int opc;
Horario H;
while (1)
{
cout << "1 - Set Time (TCP)\n2 - Set Time (UDP)\n3 - Check Time (TCP)\n4 - Check Time (UDP)**\nYour choice: ";
cin >> opc;
if (opc == 1)
{
int h, m, s;
cout << "Provide the time separated by spaces (hh mm ss): ";
cin >> h >> m >> s;
H.hours = h;
H.minutes = m;
H.seconds = s;
try
{
clockTCP->setTime(H);
}
catch (exception& e)
{
cout << "Ops, Set Time failed!\n" << e.what() << '\n';
}
}
else if (opc == 2)
{
int h, m, s;
cout << "Provide the time separated by spaces (hh mm ss): ";
cin >> h >> m >> s;
H.hours = h;
H.minutes = m;
H.seconds = s;
try
{
clockUDP->setTime(H);
}
catch (exception& e)
{
cout << "Ops, Set Time failed!\n" << e.what() << '\n';
}
}
else if (opc == 3)
{
H = clockTCP->getTime();
cout << "Current Time is: " << setw(2) << setfill('0') << H.hours << ':' << setw(2) << setfill('0') << H.minutes << ':' << setw(2) << setfill('0') << H.seconds << '\n';
}
else if (opc == 4) //This will fail because getTime returns something and this operation is being called in UDP
{
H = clockUDP->getTime();
cout << "Current Time is: " << setw(2) << setfill('0') << H.hours << ':' << setw(2) << setfill('0') << H.minutes << ':' << setw(2) << setfill('0') << H.seconds << '\n';
}
}
}
catch (const std::exception& e)
{
cerr << e.what() << endl;
return 1;
}
return 0;
} | [
"vmp@uvic.ca"
] | vmp@uvic.ca |
f434f628c5785963a3a450384ca6a437c269972f | 49f88ff91aa582e1a9d5ae5a7014f5c07eab7503 | /gen/services/proxy_resolver/public/mojom/proxy_resolver.mojom-shared.h | 89777c60c59e102f6840deeb18ee2b4617569d29 | [] | no_license | AoEiuV020/kiwibrowser-arm64 | b6c719b5f35d65906ae08503ec32f6775c9bb048 | ae7383776e0978b945e85e54242b4e3f7b930284 | refs/heads/main | 2023-06-01T21:09:33.928929 | 2021-06-22T15:56:53 | 2021-06-22T15:56:53 | 379,186,747 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 25,352 | h | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_PROXY_RESOLVER_PUBLIC_MOJOM_PROXY_RESOLVER_MOJOM_SHARED_H_
#define SERVICES_PROXY_RESOLVER_PUBLIC_MOJOM_PROXY_RESOLVER_MOJOM_SHARED_H_
#include <stdint.h>
#include <functional>
#include <ostream>
#include <type_traits>
#include <utility>
#include "base/compiler_specific.h"
#include "base/containers/flat_map.h"
#include "mojo/public/cpp/bindings/array_data_view.h"
#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/interface_data_view.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/map_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom-shared-internal.h"
#include "net/interfaces/address_family.mojom-shared.h"
#include "net/interfaces/host_resolver_service.mojom-shared.h"
#include "url/mojom/url.mojom-shared.h"
#include "mojo/public/cpp/bindings/lib/interface_serialization.h"
#include "mojo/public/cpp/bindings/native_enum.h"
#include "mojo/public/cpp/bindings/lib/native_struct_serialization.h"
namespace proxy_resolver {
namespace mojom {
class ProxyServerDataView;
class ProxyInfoDataView;
} // namespace mojom
} // namespace proxy_resolver
namespace mojo {
namespace internal {
template <>
struct MojomTypeTraits<::proxy_resolver::mojom::ProxyServerDataView> {
using Data = ::proxy_resolver::mojom::internal::ProxyServer_Data;
using DataAsArrayElement = Pointer<Data>;
static constexpr MojomTypeCategory category = MojomTypeCategory::STRUCT;
};
template <>
struct MojomTypeTraits<::proxy_resolver::mojom::ProxyInfoDataView> {
using Data = ::proxy_resolver::mojom::internal::ProxyInfo_Data;
using DataAsArrayElement = Pointer<Data>;
static constexpr MojomTypeCategory category = MojomTypeCategory::STRUCT;
};
} // namespace internal
} // namespace mojo
namespace proxy_resolver {
namespace mojom {
enum class ProxyScheme : int32_t {
INVALID,
DIRECT,
HTTP,
SOCKS4,
SOCKS5,
HTTPS,
QUIC,
kMinValue = 0,
kMaxValue = 6,
};
inline std::ostream& operator<<(std::ostream& os, ProxyScheme value) {
switch(value) {
case ProxyScheme::INVALID:
return os << "ProxyScheme::INVALID";
case ProxyScheme::DIRECT:
return os << "ProxyScheme::DIRECT";
case ProxyScheme::HTTP:
return os << "ProxyScheme::HTTP";
case ProxyScheme::SOCKS4:
return os << "ProxyScheme::SOCKS4";
case ProxyScheme::SOCKS5:
return os << "ProxyScheme::SOCKS5";
case ProxyScheme::HTTPS:
return os << "ProxyScheme::HTTPS";
case ProxyScheme::QUIC:
return os << "ProxyScheme::QUIC";
default:
return os << "Unknown ProxyScheme value: " << static_cast<int32_t>(value);
}
}
inline bool IsKnownEnumValue(ProxyScheme value) {
return internal::ProxyScheme_Data::IsKnownValue(
static_cast<int32_t>(value));
}
// Interface base classes. They are used for type safety check.
class ProxyResolverInterfaceBase {};
using ProxyResolverPtrDataView =
mojo::InterfacePtrDataView<ProxyResolverInterfaceBase>;
using ProxyResolverRequestDataView =
mojo::InterfaceRequestDataView<ProxyResolverInterfaceBase>;
using ProxyResolverAssociatedPtrInfoDataView =
mojo::AssociatedInterfacePtrInfoDataView<ProxyResolverInterfaceBase>;
using ProxyResolverAssociatedRequestDataView =
mojo::AssociatedInterfaceRequestDataView<ProxyResolverInterfaceBase>;
class ProxyResolverRequestClientInterfaceBase {};
using ProxyResolverRequestClientPtrDataView =
mojo::InterfacePtrDataView<ProxyResolverRequestClientInterfaceBase>;
using ProxyResolverRequestClientRequestDataView =
mojo::InterfaceRequestDataView<ProxyResolverRequestClientInterfaceBase>;
using ProxyResolverRequestClientAssociatedPtrInfoDataView =
mojo::AssociatedInterfacePtrInfoDataView<ProxyResolverRequestClientInterfaceBase>;
using ProxyResolverRequestClientAssociatedRequestDataView =
mojo::AssociatedInterfaceRequestDataView<ProxyResolverRequestClientInterfaceBase>;
class ProxyResolverFactoryInterfaceBase {};
using ProxyResolverFactoryPtrDataView =
mojo::InterfacePtrDataView<ProxyResolverFactoryInterfaceBase>;
using ProxyResolverFactoryRequestDataView =
mojo::InterfaceRequestDataView<ProxyResolverFactoryInterfaceBase>;
using ProxyResolverFactoryAssociatedPtrInfoDataView =
mojo::AssociatedInterfacePtrInfoDataView<ProxyResolverFactoryInterfaceBase>;
using ProxyResolverFactoryAssociatedRequestDataView =
mojo::AssociatedInterfaceRequestDataView<ProxyResolverFactoryInterfaceBase>;
class ProxyResolverFactoryRequestClientInterfaceBase {};
using ProxyResolverFactoryRequestClientPtrDataView =
mojo::InterfacePtrDataView<ProxyResolverFactoryRequestClientInterfaceBase>;
using ProxyResolverFactoryRequestClientRequestDataView =
mojo::InterfaceRequestDataView<ProxyResolverFactoryRequestClientInterfaceBase>;
using ProxyResolverFactoryRequestClientAssociatedPtrInfoDataView =
mojo::AssociatedInterfacePtrInfoDataView<ProxyResolverFactoryRequestClientInterfaceBase>;
using ProxyResolverFactoryRequestClientAssociatedRequestDataView =
mojo::AssociatedInterfaceRequestDataView<ProxyResolverFactoryRequestClientInterfaceBase>;
class ProxyServerDataView {
public:
ProxyServerDataView() {}
ProxyServerDataView(
internal::ProxyServer_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
template <typename UserType>
WARN_UNUSED_RESULT bool ReadScheme(UserType* output) const {
auto data_value = data_->scheme;
return mojo::internal::Deserialize<::proxy_resolver::mojom::ProxyScheme>(
data_value, output);
}
ProxyScheme scheme() const {
return static_cast<ProxyScheme>(data_->scheme);
}
inline void GetHostDataView(
mojo::StringDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadHost(UserType* output) {
auto* pointer = data_->host.Get();
return mojo::internal::Deserialize<mojo::StringDataView>(
pointer, output, context_);
}
uint16_t port() const {
return data_->port;
}
private:
internal::ProxyServer_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyInfoDataView {
public:
ProxyInfoDataView() {}
ProxyInfoDataView(
internal::ProxyInfo_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
inline void GetProxyServersDataView(
mojo::ArrayDataView<ProxyServerDataView>* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadProxyServers(UserType* output) {
auto* pointer = data_->proxy_servers.Get();
return mojo::internal::Deserialize<mojo::ArrayDataView<::proxy_resolver::mojom::ProxyServerDataView>>(
pointer, output, context_);
}
private:
internal::ProxyInfo_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolver_GetProxyForUrl_ParamsDataView {
public:
ProxyResolver_GetProxyForUrl_ParamsDataView() {}
ProxyResolver_GetProxyForUrl_ParamsDataView(
internal::ProxyResolver_GetProxyForUrl_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
inline void GetUrlDataView(
::url::mojom::UrlDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadUrl(UserType* output) {
auto* pointer = data_->url.Get();
return mojo::internal::Deserialize<::url::mojom::UrlDataView>(
pointer, output, context_);
}
template <typename UserType>
UserType TakeClient() {
UserType result;
bool ret =
mojo::internal::Deserialize<::proxy_resolver::mojom::ProxyResolverRequestClientPtrDataView>(
&data_->client, &result, context_);
DCHECK(ret);
return result;
}
private:
internal::ProxyResolver_GetProxyForUrl_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolverRequestClient_ReportResult_ParamsDataView {
public:
ProxyResolverRequestClient_ReportResult_ParamsDataView() {}
ProxyResolverRequestClient_ReportResult_ParamsDataView(
internal::ProxyResolverRequestClient_ReportResult_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
int32_t error() const {
return data_->error;
}
inline void GetProxyInfoDataView(
ProxyInfoDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadProxyInfo(UserType* output) {
auto* pointer = data_->proxy_info.Get();
return mojo::internal::Deserialize<::proxy_resolver::mojom::ProxyInfoDataView>(
pointer, output, context_);
}
private:
internal::ProxyResolverRequestClient_ReportResult_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolverRequestClient_Alert_ParamsDataView {
public:
ProxyResolverRequestClient_Alert_ParamsDataView() {}
ProxyResolverRequestClient_Alert_ParamsDataView(
internal::ProxyResolverRequestClient_Alert_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
inline void GetErrorDataView(
mojo::StringDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadError(UserType* output) {
auto* pointer = data_->error.Get();
return mojo::internal::Deserialize<mojo::StringDataView>(
pointer, output, context_);
}
private:
internal::ProxyResolverRequestClient_Alert_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolverRequestClient_OnError_ParamsDataView {
public:
ProxyResolverRequestClient_OnError_ParamsDataView() {}
ProxyResolverRequestClient_OnError_ParamsDataView(
internal::ProxyResolverRequestClient_OnError_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
int32_t line_number() const {
return data_->line_number;
}
inline void GetErrorDataView(
mojo::StringDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadError(UserType* output) {
auto* pointer = data_->error.Get();
return mojo::internal::Deserialize<mojo::StringDataView>(
pointer, output, context_);
}
private:
internal::ProxyResolverRequestClient_OnError_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolverRequestClient_ResolveDns_ParamsDataView {
public:
ProxyResolverRequestClient_ResolveDns_ParamsDataView() {}
ProxyResolverRequestClient_ResolveDns_ParamsDataView(
internal::ProxyResolverRequestClient_ResolveDns_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
inline void GetRequestInfoDataView(
::net::interfaces::HostResolverRequestInfoDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadRequestInfo(UserType* output) {
auto* pointer = data_->request_info.Get();
return mojo::internal::Deserialize<::net::interfaces::HostResolverRequestInfoDataView>(
pointer, output, context_);
}
template <typename UserType>
UserType TakeClient() {
UserType result;
bool ret =
mojo::internal::Deserialize<::net::interfaces::HostResolverRequestClientPtrDataView>(
&data_->client, &result, context_);
DCHECK(ret);
return result;
}
private:
internal::ProxyResolverRequestClient_ResolveDns_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolverFactory_CreateResolver_ParamsDataView {
public:
ProxyResolverFactory_CreateResolver_ParamsDataView() {}
ProxyResolverFactory_CreateResolver_ParamsDataView(
internal::ProxyResolverFactory_CreateResolver_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
inline void GetPacScriptDataView(
mojo::StringDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadPacScript(UserType* output) {
auto* pointer = data_->pac_script.Get();
return mojo::internal::Deserialize<mojo::StringDataView>(
pointer, output, context_);
}
template <typename UserType>
UserType TakeResolver() {
UserType result;
bool ret =
mojo::internal::Deserialize<::proxy_resolver::mojom::ProxyResolverRequestDataView>(
&data_->resolver, &result, context_);
DCHECK(ret);
return result;
}
template <typename UserType>
UserType TakeClient() {
UserType result;
bool ret =
mojo::internal::Deserialize<::proxy_resolver::mojom::ProxyResolverFactoryRequestClientPtrDataView>(
&data_->client, &result, context_);
DCHECK(ret);
return result;
}
private:
internal::ProxyResolverFactory_CreateResolver_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolverFactoryRequestClient_ReportResult_ParamsDataView {
public:
ProxyResolverFactoryRequestClient_ReportResult_ParamsDataView() {}
ProxyResolverFactoryRequestClient_ReportResult_ParamsDataView(
internal::ProxyResolverFactoryRequestClient_ReportResult_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data) {}
bool is_null() const { return !data_; }
int32_t error() const {
return data_->error;
}
private:
internal::ProxyResolverFactoryRequestClient_ReportResult_Params_Data* data_ = nullptr;
};
class ProxyResolverFactoryRequestClient_Alert_ParamsDataView {
public:
ProxyResolverFactoryRequestClient_Alert_ParamsDataView() {}
ProxyResolverFactoryRequestClient_Alert_ParamsDataView(
internal::ProxyResolverFactoryRequestClient_Alert_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
inline void GetErrorDataView(
mojo::StringDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadError(UserType* output) {
auto* pointer = data_->error.Get();
return mojo::internal::Deserialize<mojo::StringDataView>(
pointer, output, context_);
}
private:
internal::ProxyResolverFactoryRequestClient_Alert_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolverFactoryRequestClient_OnError_ParamsDataView {
public:
ProxyResolverFactoryRequestClient_OnError_ParamsDataView() {}
ProxyResolverFactoryRequestClient_OnError_ParamsDataView(
internal::ProxyResolverFactoryRequestClient_OnError_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
int32_t line_number() const {
return data_->line_number;
}
inline void GetErrorDataView(
mojo::StringDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadError(UserType* output) {
auto* pointer = data_->error.Get();
return mojo::internal::Deserialize<mojo::StringDataView>(
pointer, output, context_);
}
private:
internal::ProxyResolverFactoryRequestClient_OnError_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
class ProxyResolverFactoryRequestClient_ResolveDns_ParamsDataView {
public:
ProxyResolverFactoryRequestClient_ResolveDns_ParamsDataView() {}
ProxyResolverFactoryRequestClient_ResolveDns_ParamsDataView(
internal::ProxyResolverFactoryRequestClient_ResolveDns_Params_Data* data,
mojo::internal::SerializationContext* context)
: data_(data), context_(context) {}
bool is_null() const { return !data_; }
inline void GetRequestInfoDataView(
::net::interfaces::HostResolverRequestInfoDataView* output);
template <typename UserType>
WARN_UNUSED_RESULT bool ReadRequestInfo(UserType* output) {
auto* pointer = data_->request_info.Get();
return mojo::internal::Deserialize<::net::interfaces::HostResolverRequestInfoDataView>(
pointer, output, context_);
}
template <typename UserType>
UserType TakeClient() {
UserType result;
bool ret =
mojo::internal::Deserialize<::net::interfaces::HostResolverRequestClientPtrDataView>(
&data_->client, &result, context_);
DCHECK(ret);
return result;
}
private:
internal::ProxyResolverFactoryRequestClient_ResolveDns_Params_Data* data_ = nullptr;
mojo::internal::SerializationContext* context_ = nullptr;
};
} // namespace mojom
} // namespace proxy_resolver
namespace std {
template <>
struct hash<::proxy_resolver::mojom::ProxyScheme>
: public mojo::internal::EnumHashImpl<::proxy_resolver::mojom::ProxyScheme> {};
} // namespace std
namespace mojo {
template <>
struct EnumTraits<::proxy_resolver::mojom::ProxyScheme, ::proxy_resolver::mojom::ProxyScheme> {
static ::proxy_resolver::mojom::ProxyScheme ToMojom(::proxy_resolver::mojom::ProxyScheme input) { return input; }
static bool FromMojom(::proxy_resolver::mojom::ProxyScheme input, ::proxy_resolver::mojom::ProxyScheme* output) {
*output = input;
return true;
}
};
namespace internal {
template <typename MaybeConstUserType>
struct Serializer<::proxy_resolver::mojom::ProxyScheme, MaybeConstUserType> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = EnumTraits<::proxy_resolver::mojom::ProxyScheme, UserType>;
static void Serialize(UserType input, int32_t* output) {
*output = static_cast<int32_t>(Traits::ToMojom(input));
}
static bool Deserialize(int32_t input, UserType* output) {
return Traits::FromMojom(static_cast<::proxy_resolver::mojom::ProxyScheme>(input), output);
}
};
} // namespace internal
namespace internal {
template <typename MaybeConstUserType>
struct Serializer<::proxy_resolver::mojom::ProxyServerDataView, MaybeConstUserType> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::proxy_resolver::mojom::ProxyServerDataView, UserType>;
static void Serialize(MaybeConstUserType& input,
Buffer* buffer,
::proxy_resolver::mojom::internal::ProxyServer_Data::BufferWriter* output,
SerializationContext* context) {
if (CallIsNullIfExists<Traits>(input))
return;
void* custom_context = CustomContextHelper<Traits>::SetUp(input, context);
(*output).Allocate(buffer);
mojo::internal::Serialize<::proxy_resolver::mojom::ProxyScheme>(
CallWithContext(Traits::scheme, input, custom_context), &(*output)->scheme);
decltype(CallWithContext(Traits::host, input, custom_context)) in_host = CallWithContext(Traits::host, input, custom_context);
typename decltype((*output)->host)::BaseType::BufferWriter
host_writer;
mojo::internal::Serialize<mojo::StringDataView>(
in_host, buffer, &host_writer, context);
(*output)->host.Set(
host_writer.is_null() ? nullptr : host_writer.data());
MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING(
(*output)->host.is_null(),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null host in ProxyServer struct");
(*output)->port = CallWithContext(Traits::port, input, custom_context);
CustomContextHelper<Traits>::TearDown(input, custom_context);
}
static bool Deserialize(::proxy_resolver::mojom::internal::ProxyServer_Data* input,
UserType* output,
SerializationContext* context) {
if (!input)
return CallSetToNullIfExists<Traits>(output);
::proxy_resolver::mojom::ProxyServerDataView data_view(input, context);
return Traits::Read(data_view, output);
}
};
} // namespace internal
namespace internal {
template <typename MaybeConstUserType>
struct Serializer<::proxy_resolver::mojom::ProxyInfoDataView, MaybeConstUserType> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::proxy_resolver::mojom::ProxyInfoDataView, UserType>;
static void Serialize(MaybeConstUserType& input,
Buffer* buffer,
::proxy_resolver::mojom::internal::ProxyInfo_Data::BufferWriter* output,
SerializationContext* context) {
if (CallIsNullIfExists<Traits>(input))
return;
void* custom_context = CustomContextHelper<Traits>::SetUp(input, context);
(*output).Allocate(buffer);
decltype(CallWithContext(Traits::proxy_servers, input, custom_context)) in_proxy_servers = CallWithContext(Traits::proxy_servers, input, custom_context);
typename decltype((*output)->proxy_servers)::BaseType::BufferWriter
proxy_servers_writer;
const mojo::internal::ContainerValidateParams proxy_servers_validate_params(
0, false, nullptr);
mojo::internal::Serialize<mojo::ArrayDataView<::proxy_resolver::mojom::ProxyServerDataView>>(
in_proxy_servers, buffer, &proxy_servers_writer, &proxy_servers_validate_params,
context);
(*output)->proxy_servers.Set(
proxy_servers_writer.is_null() ? nullptr : proxy_servers_writer.data());
MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING(
(*output)->proxy_servers.is_null(),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null proxy_servers in ProxyInfo struct");
CustomContextHelper<Traits>::TearDown(input, custom_context);
}
static bool Deserialize(::proxy_resolver::mojom::internal::ProxyInfo_Data* input,
UserType* output,
SerializationContext* context) {
if (!input)
return CallSetToNullIfExists<Traits>(output);
::proxy_resolver::mojom::ProxyInfoDataView data_view(input, context);
return Traits::Read(data_view, output);
}
};
} // namespace internal
} // namespace mojo
namespace proxy_resolver {
namespace mojom {
inline void ProxyServerDataView::GetHostDataView(
mojo::StringDataView* output) {
auto pointer = data_->host.Get();
*output = mojo::StringDataView(pointer, context_);
}
inline void ProxyInfoDataView::GetProxyServersDataView(
mojo::ArrayDataView<ProxyServerDataView>* output) {
auto pointer = data_->proxy_servers.Get();
*output = mojo::ArrayDataView<ProxyServerDataView>(pointer, context_);
}
inline void ProxyResolver_GetProxyForUrl_ParamsDataView::GetUrlDataView(
::url::mojom::UrlDataView* output) {
auto pointer = data_->url.Get();
*output = ::url::mojom::UrlDataView(pointer, context_);
}
inline void ProxyResolverRequestClient_ReportResult_ParamsDataView::GetProxyInfoDataView(
ProxyInfoDataView* output) {
auto pointer = data_->proxy_info.Get();
*output = ProxyInfoDataView(pointer, context_);
}
inline void ProxyResolverRequestClient_Alert_ParamsDataView::GetErrorDataView(
mojo::StringDataView* output) {
auto pointer = data_->error.Get();
*output = mojo::StringDataView(pointer, context_);
}
inline void ProxyResolverRequestClient_OnError_ParamsDataView::GetErrorDataView(
mojo::StringDataView* output) {
auto pointer = data_->error.Get();
*output = mojo::StringDataView(pointer, context_);
}
inline void ProxyResolverRequestClient_ResolveDns_ParamsDataView::GetRequestInfoDataView(
::net::interfaces::HostResolverRequestInfoDataView* output) {
auto pointer = data_->request_info.Get();
*output = ::net::interfaces::HostResolverRequestInfoDataView(pointer, context_);
}
inline void ProxyResolverFactory_CreateResolver_ParamsDataView::GetPacScriptDataView(
mojo::StringDataView* output) {
auto pointer = data_->pac_script.Get();
*output = mojo::StringDataView(pointer, context_);
}
inline void ProxyResolverFactoryRequestClient_Alert_ParamsDataView::GetErrorDataView(
mojo::StringDataView* output) {
auto pointer = data_->error.Get();
*output = mojo::StringDataView(pointer, context_);
}
inline void ProxyResolverFactoryRequestClient_OnError_ParamsDataView::GetErrorDataView(
mojo::StringDataView* output) {
auto pointer = data_->error.Get();
*output = mojo::StringDataView(pointer, context_);
}
inline void ProxyResolverFactoryRequestClient_ResolveDns_ParamsDataView::GetRequestInfoDataView(
::net::interfaces::HostResolverRequestInfoDataView* output) {
auto pointer = data_->request_info.Get();
*output = ::net::interfaces::HostResolverRequestInfoDataView(pointer, context_);
}
} // namespace mojom
} // namespace proxy_resolver
#endif // SERVICES_PROXY_RESOLVER_PUBLIC_MOJOM_PROXY_RESOLVER_MOJOM_SHARED_H_
| [
"aoeiuv020@gmail.com"
] | aoeiuv020@gmail.com |
04619037fb4d4fcfb0bc04127c1a755231451da7 | ccc0956056543120a4317097ddeca717b7ec3153 | /include/storage/PairDB.h | a96cf076fd8cb59cf0d07980657bec2387a888dc | [] | no_license | LarryHsiao/Leto | fa1012ceaf11fe5533db49e9da74a7b2d3f018b9 | d4e05c1a25d259c028164f4755e3c4ff104d1225 | refs/heads/master | 2020-03-08T19:46:10.003379 | 2018-04-25T10:02:32 | 2018-04-25T10:02:32 | 128,363,183 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 312 | h | //
// Created by Larry Hsiao on 4/25/2018.
//
#ifndef LETO_STORAGE_H
#define LETO_STORAGE_H
#include <string>
using namespace std;
class PairDB {
public:
virtual void store(string key, string value) = 0;
virtual string value(string key) = 0;
virtual void clear() = 0;
};
#endif //LETO_STORAGE_H
| [
"larryhsiao@silverhetch.com"
] | larryhsiao@silverhetch.com |
f62c247e76d3267a456db98c6280568c284cfc1c | 347c5c2128cc1193e7ca1a2d338e89466a368072 | /include/operator/Stream.h | 72fb73b407b23eafe79c2e458ad8cb6f411f6319 | [
"MIT"
] | permissive | Tobias-Werner/GStream | 9aec79106646bb82b698272c41dc145654830a12 | b8650c71a607413f965d6582d1eb738481e682bd | refs/heads/master | 2020-08-03T10:57:47.462632 | 2019-10-11T15:31:15 | 2019-10-11T15:31:15 | 211,727,263 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 786 | h | //
// Created by tobias on 27.01.18.
//
#ifndef SPREAMS_STREAM_TABLE_H
#define SPREAMS_STREAM_TABLE_H
#include <vector>
#include <unordered_set>
#include <string>
#include <memory>
#include "Attribute.h"
#include "Tuple.h"
#include "data_container/AStreamContainer.h"
#include "AOperator.h"
#include "View.h"
namespace STREAM {
class Stream : public AOperator {
private:
std::string name;
public:
Stream(std::string name, const std::list<Attribute> attributes);
std::string getName();
void insert(std::shared_ptr<Tuple> &tupel);
void triggerPrevOperator() override;
virtual void onDataUpdate() override;
virtual void updateSchema() override;
~Stream();
};
}
#endif //SPREAMS_STREAM_TABLE_H
| [
"info@x-ploit.de"
] | info@x-ploit.de |
0730bf87e4314b74007f2bdf5940bdda78694ea8 | 38b9daafe39f937b39eefc30501939fd47f7e668 | /tutorials/2WayCouplingOceanWave3D/EvalResults180628-fully/26.8/alpha.water | 6f481b63a25ec3c3371dcfac243e74ef76da04c5 | [] | no_license | rubynuaa/2-way-coupling | 3a292840d9f56255f38c5e31c6b30fcb52d9e1cf | a820b57dd2cac1170b937f8411bc861392d8fbaa | refs/heads/master | 2020-04-08T18:49:53.047796 | 2018-08-29T14:22:18 | 2018-08-29T14:22:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 151,535 | water | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "26.8";
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField nonuniform List<scalar>
21420
(
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1.00001
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
0.999999
0.999998
0.999998
0.999998
0.999997
0.999997
0.999997
0.999996
0.999996
0.999997
0.999997
0.999997
0.999998
0.999997
0.999998
0.999998
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
0.999999
0.999998
0.999997
0.999996
0.999994
0.999993
0.999992
0.999991
0.999992
0.999988
0.999989
0.99999
0.999991
0.999994
0.999995
0.999996
0.999996
0.999995
0.999994
0.999994
0.999995
0.999995
0.999995
0.999996
0.999997
0.999998
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
0.999998
0.999998
0.999998
0.999997
0.999996
0.999994
0.999995
0.999994
0.999991
0.999993
0.999994
0.999995
0.999998
0.999996
0.999996
0.999996
0.999996
0.999996
0.999996
0.999996
0.999996
0.999997
0.999997
0.999997
0.999998
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999997
0.999994
0.999988
0.99998
0.999966
0.999955
0.99995
0.999958
0.999973
0.999978
0.999981
0.999977
0.999975
0.999975
0.99998
0.999985
0.999985
0.999985
0.999987
0.99999
0.999994
0.999996
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999998
0.999997
0.999994
0.999991
0.999988
0.999983
0.99998
0.999975
0.999969
0.999963
0.99996
0.999956
0.999958
0.999963
0.999976
0.999987
0.999988
0.999981
0.999973
0.999965
0.99996
0.999955
0.999954
0.999957
0.999964
0.999974
0.999982
0.999985
0.999986
0.999988
0.999991
0.999995
0.999997
0.999997
0.999998
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999997
0.999993
0.999987
0.999973
0.999943
0.999901
0.999827
0.999691
0.999499
0.999161
0.998691
0.997906
0.996563
0.995011
0.993289
0.990881
0.988755
0.986194
0.984492
0.984019
0.984605
0.9867
0.989638
0.993279
0.99697
0.999336
0.999854
0.999848
0.999859
0.999874
0.999903
0.999936
0.999962
0.999971
0.999977
0.999985
0.999992
0.999995
0.999997
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999998
0.999994
0.999985
0.999966
0.999928
0.999856
0.999734
0.999541
0.999236
0.998754
0.998108
0.997169
0.99602
0.994567
0.992804
0.991019
0.988882
0.987361
0.985727
0.983791
0.983072
0.983605
0.985326
0.988062
0.990688
0.993703
0.996502
0.998852
0.999907
0.999899
0.999895
0.999898
0.999911
0.999932
0.999958
0.999974
0.999978
0.999984
0.999992
0.999996
0.999997
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999992
0.999966
0.999877
0.999624
0.999009
0.997707
0.995251
0.991098
0.984679
0.975526
0.963327
0.951794
0.943997
0.940296
0.94083
0.945004
0.953448
0.965035
0.977731
0.98991
0.998233
0.999642
0.99968
0.999736
0.999825
0.999902
0.999933
0.999953
0.999974
0.999987
0.999992
0.999996
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999992
0.999974
0.999921
0.999784
0.99946
0.998743
0.997283
0.994512
0.989573
0.981621
0.970011
0.954587
0.936006
0.915641
0.893897
0.872647
0.853372
0.836915
0.824977
0.818827
0.817935
0.821661
0.829566
0.841386
0.855505
0.871007
0.889544
0.90928
0.929832
0.950048
0.968863
0.98445
0.995224
0.999632
0.999685
0.999751
0.999828
0.999906
0.999944
0.999955
0.999971
0.999986
0.999992
0.999996
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999997
0.999991
0.999975
0.999934
0.999832
0.9996
0.999121
0.998137
0.996177
0.992542
0.985867
0.974938
0.958774
0.935822
0.905535
0.86788
0.824837
0.78096
0.741545
0.707902
0.677242
0.652385
0.634871
0.624527
0.621411
0.625393
0.637083
0.656573
0.684889
0.721449
0.762731
0.806056
0.845189
0.884342
0.920707
0.953382
0.979213
0.995416
0.999447
0.999598
0.999755
0.999882
0.999929
0.999958
0.99998
0.99999
0.999995
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999995
0.999982
0.99995
0.999865
0.999656
0.999206
0.998263
0.996299
0.992437
0.985191
0.97242
0.952994
0.925106
0.888946
0.844743
0.794749
0.747958
0.709101
0.678975
0.655569
0.636118
0.622137
0.615421
0.617938
0.629642
0.645913
0.66493
0.688572
0.71642
0.750326
0.787732
0.825032
0.860623
0.896854
0.931692
0.962359
0.986214
0.998636
0.99958
0.999722
0.999859
0.999933
0.999957
0.99998
0.999991
0.999995
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999998
0.999994
0.99998
0.999915
0.999531
0.998275
0.997532
0.997279
0.997365
0.997917
0.998603
0.999499
0.999963
0.999974
0.99999
0.999993
0.999994
0.999996
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999996
0.999955
0.999556
0.99675
0.981829
0.92319
0.798749
0.673101
0.562007
0.464931
0.380815
0.30893
0.248664
0.201536
0.168645
0.150113
0.14511
0.15516
0.175758
0.204034
0.240785
0.285468
0.337364
0.396917
0.464351
0.540984
0.626432
0.720106
0.810513
0.872755
0.920509
0.962726
0.991045
0.999008
0.999343
0.999657
0.999839
0.999906
0.999958
0.999981
0.999991
0.999997
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999995
0.999982
0.999939
0.999799
0.999376
0.998168
0.994776
0.98541
0.962359
0.915138
0.834281
0.726878
0.623943
0.531198
0.450526
0.383656
0.329635
0.286821
0.253497
0.228472
0.209906
0.196786
0.189821
0.189139
0.193973
0.206614
0.225603
0.249235
0.278745
0.315565
0.360667
0.413647
0.475085
0.545305
0.622901
0.705422
0.785279
0.850116
0.903733
0.950074
0.983586
0.998313
0.99932
0.999588
0.999815
0.999898
0.999945
0.999976
0.999988
0.999995
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999994
0.999979
0.999936
0.999805
0.999451
0.998563
0.996183
0.990079
0.974971
0.941661
0.878528
0.775761
0.659782
0.550485
0.450445
0.36202
0.285287
0.221987
0.175316
0.143004
0.119037
0.0993616
0.0840732
0.0721673
0.0649361
0.0613429
0.0602661
0.0616387
0.0651448
0.0719834
0.0837571
0.101448
0.128279
0.168381
0.225943
0.29906
0.384653
0.483473
0.592226
0.708897
0.816003
0.892109
0.951439
0.988875
0.998994
0.999428
0.999745
0.999879
0.999941
0.999978
0.99999
0.999996
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999993
0.999974
0.99992
0.999745
0.99926
0.997898
0.994099
0.983471
0.956597
0.898627
0.793501
0.665103
0.543654
0.433014
0.338715
0.26141
0.200829
0.157492
0.126776
0.104429
0.0878784
0.0757139
0.0664799
0.0607121
0.0582727
0.0585378
0.0623992
0.068142
0.0756069
0.0854663
0.0993938
0.119739
0.148777
0.192652
0.25294
0.327455
0.415969
0.518309
0.633371
0.753285
0.85217
0.924843
0.976335
0.998571
0.999389
0.999731
0.999887
0.99994
0.999977
0.999989
0.999996
0.999998
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999996
0.999987
0.999954
0.999827
0.999334
0.997468
0.99024
0.962592
0.875588
0.770178
0.674392
0.591936
0.523098
0.468063
0.426806
0.399003
0.38442
0.382399
0.393198
0.415597
0.448906
0.492653
0.547095
0.6112
0.685745
0.772053
0.868124
0.966202
0.993648
0.996467
0.998162
0.999346
0.99996
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999992
0.999848
0.99747
0.971501
0.825969
0.606915
0.402948
0.220506
0.096685
0.0577632
0.0393615
0.0246223
0.0135146
0.00578674
0.00134845
5.63957e-05
3.87665e-05
2.21266e-05
2.808e-05
9.32826e-05
0.000181866
0.000321312
0.000563067
0.000976092
0.00171876
0.00307638
0.0052382
0.00890482
0.0160967
0.0293434
0.0553977
0.106789
0.203668
0.336628
0.488403
0.651422
0.809036
0.903851
0.967971
0.997502
0.998918
0.999537
0.999794
0.999907
0.999966
0.999986
0.999995
0.999998
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999995
0.999979
0.999921
0.999713
0.998991
0.996405
0.986445
0.951045
0.850284
0.669646
0.485547
0.325575
0.209136
0.139657
0.0925027
0.0595907
0.0373936
0.0231993
0.0146219
0.00975268
0.00727683
0.0062534
0.00602309
0.00588187
0.00572203
0.00571438
0.00589026
0.00641403
0.00718259
0.0082289
0.00977538
0.0119048
0.015257
0.0201932
0.0278037
0.0397495
0.0593939
0.0919639
0.145978
0.231388
0.340823
0.471388
0.615879
0.75719
0.862599
0.938606
0.986852
0.998727
0.999345
0.99973
0.999868
0.999947
0.999979
0.999993
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999993
0.999974
0.999907
0.999693
0.999033
0.996859
0.989631
0.96531
0.896179
0.748349
0.569641
0.400662
0.261501
0.165885
0.105262
0.0631509
0.0341257
0.0162534
0.00660329
0.00319192
0.00300291
0.00283563
0.00250957
0.0022578
0.00204447
0.00181624
0.00160333
0.00148274
0.00145741
0.00148744
0.00158486
0.00174362
0.00205316
0.0024829
0.00318773
0.00433486
0.00627088
0.00966521
0.0157513
0.0271544
0.0480965
0.0902966
0.17358
0.310236
0.474591
0.655387
0.818508
0.918816
0.980256
0.998551
0.999316
0.999747
0.999886
0.999957
0.999984
0.999995
0.999998
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999998
0.999992
0.999973
0.999909
0.999681
0.998937
0.996239
0.986006
0.94859
0.841692
0.653108
0.460903
0.294091
0.178546
0.107851
0.0609932
0.0297949
0.0121518
0.00404432
0.00231442
0.00235683
0.00212081
0.00183598
0.00168887
0.00155369
0.00146829
0.00137964
0.00133542
0.00135502
0.00144297
0.00159764
0.00180869
0.0020982
0.00253734
0.00313038
0.00388996
0.00521496
0.0075909
0.0117338
0.019043
0.0329311
0.059726
0.115659
0.229833
0.390997
0.577502
0.766664
0.894105
0.970625
0.998567
0.999279
0.999742
0.999881
0.999957
0.999983
0.999994
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999995
0.999978
0.9999
0.99953
0.997476
0.986534
0.934629
0.769344
0.578086
0.400127
0.233725
0.10153
0.0485244
0.0304206
0.0200343
0.0127891
0.00787262
0.00464417
0.00260962
0.00135094
0.000553785
4.23974e-05
1.89773e-13
7.09133e-14
2.19144e-11
1.38638e-10
8.31863e-10
4.94245e-09
5.19607e-08
5.02972e-07
7.03072e-05
0.00936771
0.101543
0.229164
0.37011
0.523802
0.691113
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999946
0.998442
0.968373
0.754277
0.464781
0.19796
0.0639873
0.0316949
0.00805853
0.000463377
0.000206792
0.000103253
6.42725e-05
3.25079e-05
1.39326e-05
4.01147e-06
1.38391e-06
8.30078e-07
5.52293e-07
2.76268e-07
3.56155e-07
4.29119e-07
1.02409e-06
1.8865e-06
3.68471e-06
7.24127e-06
1.1723e-05
2.65297e-05
4.73026e-05
7.81861e-05
0.000168107
0.000327484
0.000651881
0.00136823
0.00298873
0.00733085
0.0187502
0.0485991
0.12927
0.303522
0.518279
0.743678
0.893203
0.973481
0.997857
0.999046
0.999659
0.999854
0.999951
0.999982
0.999994
0.999998
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999995
0.999982
0.999926
0.9997
0.998809
0.995025
0.976423
0.895954
0.680277
0.428714
0.220902
0.107685
0.04288
0.0101488
0.000551311
0.000279779
0.000147112
0.000189272
0.00021782
0.00022102
0.000217049
0.00021554
0.000210692
0.000204095
0.000196949
0.000190499
0.000185228
0.000183899
0.00018949
0.00020438
0.000226115
0.000259045
0.000304791
0.000367336
0.000461439
0.000593139
0.000791966
0.00108924
0.00160043
0.00248611
0.00401719
0.00678491
0.0127565
0.0249804
0.0521349
0.115925
0.246322
0.430662
0.64335
0.828474
0.934111
0.989705
0.998593
0.999455
0.99979
0.999924
0.999975
0.999992
0.999998
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999993
0.999975
0.999907
0.999654
0.998725
0.995071
0.979202
0.916114
0.734968
0.499592
0.287657
0.148675
0.0695666
0.0237429
0.00388888
0.00120323
0.00124845
0.00086918
0.000520975
0.00026478
0.00015798
0.000129682
0.00011309
0.000100426
8.28181e-05
6.9497e-05
6.12988e-05
5.28598e-05
4.74589e-05
4.45951e-05
4.40936e-05
4.49401e-05
4.90483e-05
5.53488e-05
6.56354e-05
7.79548e-05
9.74189e-05
0.000126355
0.00017287
0.000251633
0.000377276
0.000629361
0.00106346
0.00200499
0.00407711
0.00954456
0.0244906
0.0647532
0.172057
0.371219
0.602618
0.818049
0.935212
0.992044
0.998773
0.999527
0.999834
0.999938
0.999982
0.999995
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999998
0.999992
0.999976
0.999907
0.999677
0.998798
0.99505
0.976969
0.895638
0.676186
0.422349
0.21547
0.101642
0.0377713
0.00748436
0.0013636
0.00155276
0.00101606
0.000552156
0.000215766
0.000111495
0.000104562
0.000102793
8.87605e-05
6.72276e-05
5.53464e-05
4.53062e-05
3.943e-05
3.5841e-05
3.46737e-05
3.61124e-05
4.04598e-05
4.68646e-05
5.64996e-05
6.7934e-05
8.24031e-05
9.96389e-05
0.000118145
0.00014781
0.000209899
0.00031762
0.000493852
0.000843222
0.00146344
0.00292638
0.00640226
0.0156321
0.0435319
0.123739
0.310857
0.549597
0.785629
0.921686
0.989925
0.998709
0.999552
0.999824
0.999943
0.99998
0.999994
0.999998
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999996
0.99998
0.999897
0.999464
0.996578
0.97704
0.865402
0.612758
0.360274
0.143281
0.0600389
0.0274949
0.00740092
0.000383566
0.000137495
7.6877e-05
3.95713e-05
2.03761e-05
9.76332e-06
4.18065e-06
1.4711e-06
3.5297e-07
8.1862e-08
4.79199e-11
1.96653e-13
4.78444e-14
3.1959e-16
1.23082e-18
1.01779e-19
1.91538e-19
6.40254e-18
9.04756e-14
2.06094e-15
3.55284e-17
6.03489e-19
5.86251e-21
2.54133e-21
3.60922e-18
7.58465e-11
8.8129e-12
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999996
0.999862
0.99433
0.877318
0.532928
0.196117
0.0506505
0.0140463
0.000873244
0.000323489
0.000157735
5.88124e-05
2.28197e-05
9.42522e-06
4.04151e-06
2.32373e-06
1.02448e-06
3.66428e-07
7.91964e-08
2.25199e-08
1.26203e-08
7.89622e-09
3.45856e-09
4.15088e-09
4.38797e-09
1.32397e-08
2.45445e-08
4.49567e-08
1.11969e-07
1.67825e-07
4.12291e-07
8.11449e-07
1.09435e-06
2.81119e-06
5.15108e-06
9.98594e-06
2.29704e-05
4.67253e-05
0.000114636
0.000282686
0.000709857
0.00208183
0.00697659
0.0253415
0.0896771
0.282123
0.54782
0.803006
0.935976
0.994075
0.998569
0.999525
0.999818
0.999942
0.999981
0.999995
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999996
0.999986
0.999937
0.99975
0.998915
0.994788
0.970629
0.849703
0.566794
0.279481
0.110552
0.0295582
0.00192272
0.000622987
0.000235575
8.53092e-05
2.95109e-05
1.97037e-05
1.56633e-05
1.19119e-05
9.54188e-06
8.13663e-06
6.95157e-06
6.53559e-06
6.28542e-06
6.02549e-06
5.62673e-06
5.25177e-06
5.15497e-06
5.15131e-06
5.26383e-06
5.63147e-06
6.07564e-06
6.94102e-06
8.16191e-06
1.01548e-05
1.29592e-05
1.66415e-05
2.25562e-05
3.14994e-05
4.84263e-05
7.96254e-05
0.000127901
0.000202106
0.000367813
0.000536485
0.000927155
0.00237205
0.00657287
0.0191486
0.0594171
0.183442
0.412696
0.671901
0.872254
0.971115
0.997921
0.999251
0.999752
0.999918
0.999978
0.999994
0.999999
1
1
1
1
1
1
1
1
1
0.999999
0.999998
0.999993
0.999977
0.999913
0.999683
0.998718
0.994441
0.970458
0.857814
0.596943
0.323906
0.140172
0.0480859
0.00739565
0.00149483
0.00138609
0.000640137
0.000182004
0.000102425
7.08324e-05
4.38678e-05
2.09045e-05
8.82938e-06
5.5952e-06
4.9383e-06
4.14308e-06
3.41911e-06
2.65996e-06
2.02224e-06
1.68244e-06
1.42573e-06
1.32437e-06
1.25366e-06
1.24533e-06
1.25793e-06
1.37997e-06
1.63329e-06
2.00569e-06
2.34501e-06
2.9124e-06
3.76749e-06
5.22956e-06
7.58499e-06
1.14597e-05
2.03277e-05
3.51499e-05
6.55378e-05
0.00011564
0.000233412
0.000530651
0.00129979
0.00376866
0.0127163
0.0467887
0.170075
0.418487
0.697026
0.887709
0.978077
0.998282
0.99932
0.999805
0.999934
0.999982
0.999995
0.999999
1
1
1
1
1
1
1
0.999999
0.999998
0.999996
0.999991
0.999972
0.999911
0.999693
0.998844
0.994788
0.972484
0.857992
0.575131
0.283904
0.110918
0.029855
0.00268731
0.00202895
0.00127751
0.000391494
0.000153139
0.000106768
6.43587e-05
2.58539e-05
5.72698e-06
2.59961e-06
2.89403e-06
3.31587e-06
3.23979e-06
2.61726e-06
2.10505e-06
1.56397e-06
1.13182e-06
8.98125e-07
7.86772e-07
8.03889e-07
9.23236e-07
1.22349e-06
1.67314e-06
2.07592e-06
2.43312e-06
2.89099e-06
3.6715e-06
4.68263e-06
6.96382e-06
1.17057e-05
1.94447e-05
3.49443e-05
5.68913e-05
0.000108612
0.00021172
0.000432359
0.00131717
0.0039891
0.0107649
0.0365694
0.130952
0.370731
0.665117
0.882304
0.980345
0.998244
0.999429
0.999803
0.999942
0.999983
0.999996
0.999999
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999993
0.999961
0.999795
0.998711
0.98985
0.924633
0.66296
0.352226
0.114379
0.0412791
0.00583046
0.000669469
0.00028752
0.000117435
5.0363e-05
1.7403e-05
5.33651e-06
2.85939e-06
1.28085e-06
5.69329e-07
2.28671e-07
7.83906e-08
2.03441e-08
3.06133e-09
5.60251e-11
2.04681e-13
4.8747e-14
2.76145e-16
7.13279e-19
1.93484e-21
5.45505e-24
2.01562e-25
9.06209e-27
2.33313e-28
3.91803e-30
7.64828e-32
6.47823e-33
1.87144e-33
3.93599e-33
7.34361e-32
1.14107e-27
1.14005e-30
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999998
0.999865
0.991751
0.807154
0.399867
0.0835548
0.0203958
0.00132188
0.000450424
0.000200678
6.56618e-05
2.07049e-05
9.29615e-06
3.20804e-06
1.12951e-06
4.31909e-07
1.60648e-07
8.43024e-08
3.25044e-08
9.75078e-09
1.63066e-09
3.85213e-10
1.97773e-10
1.13927e-10
4.38309e-11
5.47903e-11
5.72781e-11
2.29387e-10
4.10956e-10
8.40037e-10
2.0699e-09
2.97998e-09
8.67797e-09
1.65597e-08
2.249e-08
6.49452e-08
1.16583e-07
2.31207e-07
5.14867e-07
1.00651e-06
2.58647e-06
6.06545e-06
1.50403e-05
4.39867e-05
0.000132092
0.000438331
0.00154413
0.00675496
0.0312271
0.134358
0.401545
0.710558
0.90365
0.985989
0.998233
0.999426
0.999806
0.99994
0.999984
0.999996
0.999999
1
1
1
1
1
1
1
0.999999
0.999998
0.999995
0.999985
0.999943
0.999791
0.999127
0.995414
0.971919
0.831251
0.512689
0.213207
0.0664487
0.00732137
0.00116541
0.000412144
0.000127441
4.57155e-05
1.6707e-05
5.64417e-06
2.30774e-06
1.12571e-06
6.68785e-07
4.0745e-07
2.71379e-07
2.15454e-07
1.7772e-07
1.60439e-07
1.57725e-07
1.55789e-07
1.44941e-07
1.29906e-07
1.28278e-07
1.32608e-07
1.34304e-07
1.44853e-07
1.50466e-07
1.64305e-07
1.87011e-07
2.40687e-07
3.25205e-07
4.17768e-07
5.58847e-07
7.55229e-07
1.1702e-06
2.08582e-06
3.38534e-06
4.99324e-06
1.079e-05
1.19621e-05
1.70787e-05
5.78255e-05
0.000204324
0.000479582
0.00119708
0.00404853
0.0158562
0.0674929
0.259925
0.559848
0.830204
0.959317
0.997609
0.999197
0.999768
0.999931
0.999984
0.999996
0.999999
0.999999
0.999999
0.999999
0.999999
0.999999
0.999998
0.999996
0.999991
0.999974
0.99992
0.999716
0.998911
0.994872
0.971059
0.839592
0.526757
0.231004
0.0795709
0.0135817
0.0020538
0.00143519
0.000481219
0.000183346
0.000102673
4.57755e-05
9.40131e-06
4.49869e-06
2.83236e-06
1.70173e-06
7.02641e-07
2.51515e-07
2.03049e-07
1.96705e-07
1.62242e-07
1.19903e-07
8.36679e-08
5.55344e-08
4.30463e-08
3.67813e-08
3.57095e-08
3.38169e-08
3.34208e-08
3.33059e-08
3.71185e-08
4.67662e-08
6.03227e-08
6.77914e-08
8.18429e-08
1.04322e-07
1.48794e-07
2.1279e-07
3.22042e-07
6.24599e-07
1.11911e-06
2.13694e-06
3.65194e-06
7.8298e-06
1.80668e-05
3.96868e-05
9.8923e-05
0.00027476
0.000930654
0.00362153
0.0162537
0.0779185
0.292858
0.600565
0.848021
0.964233
0.998015
0.99921
0.999716
0.999911
0.999972
0.999989
0.999993
0.999994
0.999995
0.999995
0.999995
0.999994
0.99999
0.999981
0.999956
0.999887
0.999652
0.99877
0.994777
0.973158
0.843919
0.538538
0.230969
0.0723705
0.00957615
0.00243641
0.00146119
0.00044032
0.00019914
0.000108819
3.01611e-05
9.31208e-06
5.75835e-06
3.22934e-06
9.61768e-07
1.14543e-07
4.80222e-08
6.039e-08
8.31406e-08
1.02342e-07
9.69765e-08
8.04495e-08
5.54706e-08
3.31712e-08
2.18554e-08
1.71971e-08
1.72889e-08
2.00196e-08
3.045e-08
4.95011e-08
6.42094e-08
7.13902e-08
7.86499e-08
1.04175e-07
1.38345e-07
2.23675e-07
4.42573e-07
8.1604e-07
1.58193e-06
2.45808e-06
4.88826e-06
1.02053e-05
2.02014e-05
8.17266e-05
0.000318196
0.000483523
0.00106936
0.00315086
0.0131287
0.0630118
0.267814
0.596893
0.863652
0.976041
0.998107
0.99944
0.999824
0.999955
0.999989
0.999998
1
1
1
1
1
1
1
1
1
1
0.999999
0.999997
0.999989
0.999945
0.999709
0.998015
0.983747
0.866821
0.53349
0.200687
0.0585268
0.00680741
0.00102483
0.000379518
0.000146364
4.79556e-05
1.78599e-05
6.37677e-06
2.60437e-06
7.90855e-07
2.09073e-07
1.05577e-07
4.12642e-08
1.58189e-08
5.31898e-09
1.45851e-09
2.79695e-10
2.68536e-11
2.47202e-13
5.67132e-14
3.98847e-16
9.28811e-19
2.36417e-21
6.26787e-24
1.68139e-26
6.01573e-29
8.43004e-31
1.82787e-32
2.88448e-34
4.24553e-36
6.21638e-38
5.76542e-40
4.7987e-42
3.36759e-44
1.88541e-41
1.66102e-44
1
1
1
1
1
1
1
1
1
1
1
1
1
0.999999
0.999926
0.993616
0.797678
0.351189
0.0562807
0.00725427
0.000973289
0.00039014
0.000127108
3.71585e-05
1.62403e-05
4.9356e-06
1.34659e-06
5.52503e-07
1.76665e-07
5.6283e-08
1.99008e-08
6.47479e-09
3.07299e-09
1.03911e-09
2.62994e-10
3.52547e-11
7.27447e-12
3.49186e-12
1.90499e-12
8.26333e-13
7.56185e-13
1.08728e-12
4.71681e-12
8.20973e-12
1.94544e-11
4.15145e-11
6.53853e-11
2.20295e-10
3.52491e-10
5.97687e-10
1.73429e-09
2.8614e-09
6.76345e-09
1.27259e-08
2.7393e-08
7.77006e-08
1.59017e-07
4.24617e-07
1.25216e-06
3.42746e-06
1.17178e-05
3.70353e-05
0.000147308
0.000619634
0.00258943
0.0139491
0.0774529
0.311451
0.637241
0.87624
0.976152
0.99805
0.999363
0.999815
0.999941
0.999982
0.999994
0.999996
0.999997
0.999997
0.999997
0.999996
0.999995
0.999989
0.999976
0.99993
0.999782
0.99921
0.996103
0.976419
0.852524
0.523707
0.197517
0.0504697
0.00335845
0.00106712
0.000345282
0.000117193
3.84542e-05
1.07531e-05
3.33928e-06
1.12557e-06
3.05367e-07
1.04193e-07
4.0293e-08
1.80501e-08
9.8983e-09
5.99866e-09
4.81645e-09
3.91258e-09
3.48091e-09
3.60412e-09
3.712e-09
3.45791e-09
2.99099e-09
2.97476e-09
3.26175e-09
3.21049e-09
3.4807e-09
3.4049e-09
3.5943e-09
3.90004e-09
5.11612e-09
7.28755e-09
9.39127e-09
1.21671e-08
1.5195e-08
2.26919e-08
4.8483e-08
8.41637e-08
1.15831e-07
2.80488e-07
2.56947e-07
3.2252e-07
1.41261e-06
6.48391e-06
1.34783e-05
3.23361e-05
0.000113582
0.000387523
0.00150552
0.00678686
0.0360482
0.185649
0.509611
0.814823
0.955233
0.99772
0.999268
0.999719
0.999921
0.99997
0.999984
0.999987
0.999987
0.999988
0.999985
0.999975
0.999951
0.999887
0.999669
0.998882
0.995471
0.975395
0.849337
0.532122
0.213552
0.0590017
0.00556335
0.00208896
0.00102189
0.000300246
0.000125243
4.27712e-05
1.34307e-05
6.55388e-06
2.71864e-06
4.26564e-07
1.57664e-07
8.40396e-08
5.02234e-08
2.08546e-08
8.5913e-09
8.11602e-09
7.70658e-09
5.63164e-09
3.60524e-09
2.32869e-09
1.45644e-09
1.1934e-09
1.13208e-09
1.13956e-09
1.016e-09
9.70141e-10
9.67122e-10
1.13515e-09
1.49322e-09
1.96522e-09
2.00244e-09
2.30936e-09
3.02867e-09
4.44675e-09
5.78861e-09
9.31354e-09
1.9149e-08
3.56001e-08
6.77415e-08
1.141e-07
2.52403e-07
5.43816e-07
1.17868e-06
3.03508e-06
8.77307e-06
2.97709e-05
9.91993e-05
0.000356058
0.00152544
0.00771758
0.0446027
0.216365
0.534295
0.815558
0.94882
0.996239
0.998811
0.999464
0.99981
0.999893
0.999926
0.99994
0.999943
0.999941
0.999923
0.999876
0.999765
0.999441
0.998375
0.99417
0.970574
0.84942
0.542037
0.217131
0.0627237
0.00696956
0.00268216
0.0011179
0.000335953
0.000137441
4.19391e-05
1.57878e-05
7.90021e-06
2.19597e-06
5.41648e-07
2.70812e-07
1.21575e-07
2.3686e-08
2.59766e-09
1.27267e-09
1.85589e-09
2.86994e-09
3.56935e-09
3.64924e-09
2.79562e-09
1.63811e-09
7.95842e-10
5.77291e-10
4.92589e-10
4.88199e-10
5.86981e-10
1.06106e-09
1.93259e-09
2.29435e-09
2.2027e-09
2.21885e-09
2.91255e-09
4.2261e-09
7.9134e-09
1.87082e-08
3.87221e-08
7.38956e-08
1.1178e-07
2.29265e-07
4.80547e-07
9.97576e-07
6.17307e-06
4.39191e-05
5.12218e-05
5.93793e-05
0.000115705
0.000376765
0.00144784
0.006931
0.0419903
0.223214
0.570186
0.86739
0.980268
0.998273
0.999544
0.999872
0.999971
0.999994
0.999999
1
1
1
1
0.999999
0.999999
0.999998
0.999994
0.99998
0.999922
0.999602
0.997582
0.980208
0.835832
0.478046
0.14612
0.0341121
0.00224422
0.000817196
0.000302275
9.48963e-05
3.09773e-05
1.16541e-05
3.42174e-06
1.11445e-06
3.48759e-07
1.34318e-07
3.60032e-08
8.2588e-09
3.8753e-09
1.32399e-09
4.37493e-10
1.231e-10
2.71297e-11
3.98039e-12
3.37202e-13
6.78308e-14
7.64101e-16
1.94341e-18
4.55558e-21
1.13574e-23
2.9174e-26
7.5214e-29
1.93199e-31
1.0631e-33
2.34311e-35
4.40235e-37
6.78382e-39
8.93819e-41
6.7249e-43
3.00103e-45
8.78523e-48
1.57604e-50
8.37308e-54
0.999999
0.999999
1
1
1
1
1
1
1
1
1
1
0.999971
0.996363
0.829003
0.366868
0.0504155
0.00411963
0.000912083
0.000365408
0.000104458
3.93767e-05
1.2188e-05
3.11301e-06
1.3149e-06
3.71086e-07
8.88325e-08
3.31328e-08
9.8118e-09
2.82558e-09
9.2205e-10
2.64591e-10
1.12956e-10
3.37212e-11
7.46159e-12
1.06893e-12
5.24195e-13
3.08585e-13
1.90539e-13
1.59866e-13
2.12031e-13
1.2035e-13
2.65125e-13
3.65046e-13
9.04334e-13
1.29853e-12
2.47719e-12
6.98067e-12
8.35028e-12
1.87898e-11
4.93498e-11
8.10737e-11
2.15306e-10
3.35924e-10
7.91362e-10
2.49174e-09
4.29605e-09
1.37416e-08
3.83839e-08
1.04619e-07
3.82786e-07
1.04794e-06
4.33778e-06
1.83148e-05
6.46307e-05
0.000311469
0.00154026
0.00826989
0.0517325
0.252873
0.576071
0.844825
0.960104
0.997948
0.999292
0.999675
0.999884
0.99993
0.999953
0.999957
0.999957
0.999948
0.999923
0.999839
0.999631
0.998948
0.995722
0.978542
0.881613
0.554909
0.217197
0.0554143
0.00338895
0.00115045
0.000367357
0.000124843
3.86734e-05
1.18743e-05
3.56922e-06
8.98228e-07
2.43907e-07
6.30123e-08
1.6648e-08
3.93573e-09
1.04708e-09
3.81756e-10
1.97972e-10
1.37897e-10
1.32913e-10
1.29012e-10
1.39152e-10
1.51833e-10
1.56363e-10
1.50627e-10
1.38824e-10
1.42232e-10
1.55079e-10
1.47845e-10
1.53184e-10
1.44361e-10
1.49024e-10
1.54087e-10
1.84276e-10
2.32632e-10
2.74693e-10
3.25902e-10
3.68653e-10
5.28127e-10
1.22433e-09
2.04614e-09
2.6038e-09
6.57694e-09
5.71092e-09
6.87189e-09
3.20372e-08
1.58203e-07
3.32686e-07
8.54485e-07
3.20386e-06
1.18215e-05
4.89681e-05
0.000189387
0.000809487
0.00426041
0.0274527
0.164796
0.494428
0.80774
0.948645
0.99647
0.998966
0.999433
0.999735
0.999809
0.999823
0.999837
0.999801
0.999683
0.999369
0.998423
0.994638
0.974771
0.873562
0.563182
0.226371
0.062729
0.00684527
0.00255092
0.000898688
0.000260314
0.000103343
2.97844e-05
1.00588e-05
3.17994e-06
8.53345e-07
3.1963e-07
1.07336e-07
1.21244e-08
3.76229e-09
1.71039e-09
1.06112e-09
5.61336e-10
3.14771e-10
2.60645e-10
2.17219e-10
1.76674e-10
1.46811e-10
1.2373e-10
1.18726e-10
1.19084e-10
1.19169e-10
1.19171e-10
1.19165e-10
1.19166e-10
1.19175e-10
1.19495e-10
1.30956e-10
1.43202e-10
1.37178e-10
1.44739e-10
1.71311e-10
2.11817e-10
2.41855e-10
3.85347e-10
7.15651e-10
1.31431e-09
2.39263e-09
3.98773e-09
9.21769e-09
1.75489e-08
3.50381e-08
8.79682e-08
2.70292e-07
9.88362e-07
3.39564e-06
1.26067e-05
5.04806e-05
0.000208357
0.000940252
0.00486816
0.0311946
0.169773
0.473494
0.762053
0.91854
0.984013
0.997517
0.998179
0.998805
0.999145
0.999245
0.999224
0.998993
0.998313
0.996354
0.989692
0.95888
0.835723
0.527896
0.226553
0.0673455
0.00867673
0.00290725
0.00135223
0.000364129
0.000122606
3.44318e-05
1.13692e-05
3.29945e-06
1.11426e-06
4.63836e-07
1.24569e-07
2.39139e-08
9.10685e-09
3.17671e-09
5.33236e-10
1.78503e-10
1.65756e-10
1.67101e-10
1.69549e-10
1.73957e-10
1.7287e-10
1.72903e-10
1.77124e-10
1.73654e-10
1.73494e-10
1.73431e-10
1.73425e-10
1.73439e-10
1.75549e-10
2.01433e-10
1.92166e-10
1.82227e-10
1.79587e-10
2.02707e-10
2.58278e-10
4.57809e-10
1.14022e-09
2.39092e-09
3.98104e-09
5.66499e-09
1.16057e-08
2.26136e-08
5.17288e-08
4.9287e-07
6.16928e-06
8.25217e-06
6.24227e-06
6.2666e-06
1.41442e-05
4.89641e-05
0.000194219
0.000931878
0.00485353
0.0343301
0.228538
0.591598
0.878584
0.983943
0.998617
0.999618
0.999899
0.999962
0.999987
0.999992
0.999993
0.999992
0.999989
0.999978
0.999949
0.999839
0.999361
0.996935
0.976388
0.824439
0.462453
0.134483
0.0262639
0.0022023
0.000841869
0.000256185
8.57713e-05
3.12673e-05
8.77962e-06
2.55451e-06
9.19403e-07
2.43301e-07
6.97934e-08
1.92072e-08
6.91302e-09
1.64206e-09
3.2871e-10
1.41799e-10
4.25019e-11
1.22312e-11
3.00517e-12
6.46801e-13
1.65009e-13
8.30545e-14
1.79347e-15
5.4004e-18
1.3394e-20
3.06014e-23
7.2853e-26
1.77397e-28
4.32301e-31
1.03186e-33
2.49392e-36
8.8163e-39
7.67202e-41
9.65628e-43
1.12031e-44
7.84753e-47
3.33797e-49
9.19523e-52
1.4737e-54
6.88046e-58
0.999992
0.99999
0.999995
0.999999
1
1
1
1
1
1
0.999988
0.997231
0.852401
0.397929
0.0530522
0.00471573
0.000968756
0.000360436
0.000105793
4.24119e-05
1.12155e-05
3.98832e-06
1.16541e-06
2.64292e-07
1.0652e-07
2.79316e-08
5.93306e-09
2.00486e-09
5.49479e-10
1.43247e-10
4.31417e-11
1.13346e-11
4.47198e-12
1.32951e-12
4.13368e-13
1.83541e-13
2.83714e-13
1.92769e-13
7.07761e-14
2.63544e-14
1.05189e-14
8.74181e-15
1.99795e-14
3.52431e-14
9.24939e-14
1.06887e-13
2.79935e-13
6.36676e-13
6.11209e-13
1.51876e-12
2.58718e-12
3.56589e-12
8.7779e-12
1.0256e-11
2.59409e-11
8.16975e-11
1.10727e-10
4.07915e-10
1.1198e-09
2.93093e-09
1.06517e-08
2.77588e-08
1.24814e-07
5.29503e-07
1.714e-06
8.88432e-06
4.34391e-05
0.000192824
0.00101921
0.00594547
0.0373713
0.199751
0.501644
0.780977
0.92271
0.98577
0.998769
0.998761
0.999086
0.999288
0.999326
0.999127
0.998694
0.997423
0.992232
0.969884
0.871345
0.572848
0.253737
0.0678585
0.0052376
0.00146546
0.000528626
0.000151393
4.53706e-05
1.47766e-05
4.3089e-06
1.20193e-06
3.30699e-07
7.52746e-08
1.8206e-08
4.27453e-09
1.08575e-09
3.18956e-10
1.62451e-10
1.30829e-10
1.23855e-10
1.15625e-10
1.06912e-10
1.03603e-10
1.01927e-10
1.00971e-10
1.00443e-10
1.00377e-10
1.00548e-10
1.00995e-10
1.01045e-10
1.01184e-10
1.01433e-10
1.01844e-10
1.02352e-10
1.0294e-10
1.03608e-10
1.04351e-10
1.05133e-10
1.05959e-10
1.06875e-10
1.07956e-10
1.18074e-10
1.35274e-10
1.44978e-10
2.32335e-10
2.07606e-10
2.37625e-10
9.25565e-10
3.96373e-09
8.1356e-09
2.16178e-08
8.46126e-08
3.33291e-07
1.48804e-06
5.81375e-06
2.45388e-05
0.000121646
0.000633262
0.00366646
0.0253514
0.161121
0.470739
0.776643
0.923013
0.982419
0.99614
0.996861
0.997219
0.997541
0.997093
0.995064
0.988575
0.964422
0.854445
0.567929
0.259812
0.0779132
0.0103078
0.00308664
0.00133939
0.000345883
0.000101625
2.74164e-05
9.18585e-06
2.58026e-06
6.90728e-07
1.62648e-07
4.00905e-08
1.14828e-08
3.11884e-09
3.99084e-10
1.60072e-10
1.32835e-10
1.24534e-10
1.21012e-10
1.20983e-10
1.22088e-10
1.25586e-10
1.21328e-10
1.19298e-10
1.18675e-10
1.18559e-10
1.1854e-10
1.18803e-10
1.19272e-10
1.19907e-10
1.20242e-10
1.20334e-10
1.20411e-10
1.20601e-10
1.20836e-10
1.21068e-10
1.21323e-10
1.21566e-10
1.21797e-10
1.22029e-10
1.22282e-10
1.22575e-10
1.33234e-10
1.686e-10
2.21641e-10
4.15556e-10
6.44345e-10
1.16203e-09
2.77064e-09
8.7728e-09
3.25952e-08
1.13211e-07
4.52942e-07
1.90615e-06
8.18883e-06
3.47823e-05
0.000154437
0.000745301
0.00379469
0.0226099
0.123012
0.386926
0.654906
0.832796
0.920381
0.96309
0.981357
0.985878
0.985247
0.979731
0.960374
0.899721
0.741747
0.466323
0.217214
0.0688425
0.010428
0.00415763
0.00192518
0.000444654
0.000167135
4.1598e-05
1.1034e-05
3.05881e-06
8.07502e-07
1.95226e-07
5.9103e-08
1.90628e-08
4.99465e-09
9.5697e-10
3.93119e-10
2.06227e-10
1.64265e-10
1.61422e-10
1.63377e-10
1.6569e-10
1.67059e-10
1.69494e-10
1.71693e-10
1.7274e-10
1.77201e-10
1.79354e-10
1.7862e-10
1.78819e-10
1.79509e-10
1.7942e-10
1.7754e-10
1.75436e-10
1.73122e-10
1.70057e-10
1.67981e-10
1.6452e-10
1.62486e-10
1.62544e-10
1.80953e-10
2.4348e-10
2.94412e-10
3.60033e-10
6.66601e-10
1.27617e-09
3.14576e-09
4.32208e-08
7.0435e-07
1.00365e-06
7.00662e-07
5.11283e-07
7.28836e-07
1.83684e-06
6.56412e-06
2.97246e-05
0.000122291
0.000688612
0.00497796
0.0369741
0.24585
0.617986
0.878678
0.977142
0.998911
0.999395
0.999602
0.999818
0.99985
0.999828
0.999728
0.999409
0.998464
0.993579
0.964001
0.802008
0.445731
0.134334
0.0256149
0.00223059
0.000891781
0.000274165
0.000103358
2.92769e-05
9.09414e-06
3.19361e-06
8.09889e-07
2.12063e-07
7.19904e-08
1.72519e-08
4.38315e-09
1.06473e-09
3.55486e-10
7.5265e-11
1.33661e-11
5.41123e-12
1.5376e-12
4.91716e-13
2.05587e-13
1.06317e-13
7.87496e-14
3.22173e-15
1.68691e-17
4.73382e-20
1.11547e-22
2.42978e-25
5.44236e-28
1.24188e-30
2.8349e-33
6.34407e-36
1.38279e-38
2.96432e-41
1.03677e-43
1.29161e-45
1.83195e-47
1.52275e-49
7.30813e-52
2.11157e-54
3.29854e-57
1.40044e-60
0.980112
0.998568
0.999858
0.99996
0.999998
1
1
1
0.999968
0.994386
0.803789
0.378072
0.0511949
0.00553575
0.00084172
0.000394996
0.000121432
4.46438e-05
1.23587e-05
4.88399e-06
1.20316e-06
4.0454e-07
1.11192e-07
2.26931e-08
8.63889e-09
2.10598e-09
4.00757e-10
1.22627e-10
3.12683e-11
7.62496e-12
2.28879e-12
8.67807e-13
4.69531e-13
1.9618e-13
1.24275e-13
5.83285e-14
2.38927e-14
9.20562e-15
2.62533e-15
9.94762e-16
4.70293e-16
1.02219e-15
2.21039e-15
4.46223e-15
1.22563e-14
1.51127e-14
4.23189e-14
9.64942e-14
1.06345e-13
2.86071e-13
4.72279e-13
7.42208e-13
1.33378e-12
1.65161e-12
2.84902e-12
5.05513e-12
5.83535e-12
1.46308e-11
3.22799e-11
7.32116e-11
2.532e-10
6.07595e-10
2.94096e-09
1.30334e-08
4.22164e-08
2.38581e-07
1.17601e-06
5.05424e-06
2.7147e-05
0.000143965
0.000761935
0.00436081
0.0253214
0.128132
0.379731
0.642762
0.82702
0.915037
0.961154
0.979886
0.983598
0.980651
0.964838
0.919314
0.776816
0.514411
0.243978
0.074874
0.00814725
0.00227311
0.000791678
0.000194759
6.01318e-05
2.0251e-05
5.75562e-06
1.75288e-06
4.78415e-07
1.22264e-07
3.08939e-08
6.4233e-09
1.47161e-09
3.95241e-10
1.73858e-10
1.33961e-10
1.24204e-10
1.21576e-10
1.21461e-10
1.23074e-10
1.23766e-10
1.27138e-10
1.28148e-10
1.29265e-10
1.30226e-10
1.29701e-10
1.29146e-10
1.27385e-10
1.24884e-10
1.25493e-10
1.2573e-10
1.2663e-10
1.27266e-10
1.26459e-10
1.26301e-10
1.25932e-10
1.25265e-10
1.26558e-10
1.27526e-10
1.29165e-10
1.28608e-10
1.29126e-10
1.30155e-10
1.31136e-10
1.3204e-10
1.33247e-10
1.3466e-10
1.93072e-10
3.00527e-10
6.75622e-10
2.48865e-09
9.47584e-09
4.30626e-08
1.74111e-07
7.68476e-07
3.87754e-06
1.93465e-05
0.000104915
0.000619796
0.0037366
0.0227155
0.138126
0.394448
0.642059
0.811793
0.894915
0.929573
0.937808
0.928569
0.863808
0.731768
0.504114
0.245239
0.0846218
0.015427
0.0047883
0.00199479
0.000474967
0.000155236
3.71522e-05
9.63653e-06
2.60844e-06
7.10884e-07
1.73563e-07
3.87758e-08
8.73987e-09
1.9427e-09
6.39332e-10
2.1854e-10
1.29758e-10
1.16744e-10
1.1641e-10
1.17228e-10
1.18599e-10
1.20863e-10
1.21428e-10
1.2525e-10
1.26407e-10
1.2817e-10
1.29637e-10
1.30029e-10
1.27995e-10
1.27497e-10
1.29183e-10
1.31714e-10
1.31771e-10
1.33254e-10
1.34039e-10
1.32468e-10
1.31897e-10
1.30972e-10
1.29061e-10
1.2777e-10
1.27123e-10
1.26762e-10
1.27082e-10
1.26654e-10
1.27033e-10
1.2764e-10
1.28493e-10
1.29365e-10
1.30172e-10
1.31012e-10
1.70997e-10
3.65487e-10
1.19477e-09
3.91052e-09
1.59263e-08
6.83986e-08
3.01012e-07
1.28326e-06
5.88943e-06
2.77575e-05
0.000129092
0.000623141
0.0030256
0.0155698
0.0707617
0.221197
0.417422
0.570948
0.661219
0.693313
0.682511
0.616576
0.482015
0.306185
0.157393
0.0553728
0.010532
0.00569108
0.00232266
0.00077378
0.000261978
5.42975e-05
1.58627e-05
3.6834e-06
8.99767e-07
2.18953e-07
5.0209e-08
1.09898e-08
2.95507e-09
9.88093e-10
3.53807e-10
2.04837e-10
1.78836e-10
1.64253e-10
1.59525e-10
1.60837e-10
1.63286e-10
1.68982e-10
1.7921e-10
1.95083e-10
2.10244e-10
2.1846e-10
2.17162e-10
2.05921e-10
1.9534e-10
1.93256e-10
1.9395e-10
1.94025e-10
1.97133e-10
1.96692e-10
1.95224e-10
1.92434e-10
1.84767e-10
1.75929e-10
1.69895e-10
1.62412e-10
1.55184e-10
1.49627e-10
1.48024e-10
1.45044e-10
1.40443e-10
1.65846e-10
2.96747e-10
3.39273e-09
4.95836e-08
6.47656e-08
4.6517e-08
3.48396e-08
4.30992e-08
8.67233e-08
2.74757e-07
1.05933e-06
3.68573e-06
1.99338e-05
0.000122623
0.000661248
0.00510135
0.0423889
0.240394
0.568773
0.822514
0.924014
0.970733
0.989738
0.994669
0.993732
0.988593
0.969883
0.905679
0.684705
0.375473
0.127376
0.0259258
0.0022648
0.000919641
0.000289378
0.000118784
3.44324e-05
1.26711e-05
3.32853e-06
9.67844e-07
3.22624e-07
7.4479e-08
1.7685e-08
5.60451e-09
1.22079e-09
2.76177e-10
5.96257e-11
1.84568e-11
3.70075e-12
7.22137e-13
3.85307e-13
1.81537e-13
1.08162e-13
1.15647e-13
1.68037e-14
1.52694e-15
3.82332e-17
1.76639e-19
4.58485e-22
1.01759e-24
2.09756e-27
4.40353e-30
9.39073e-33
2.00357e-35
4.20026e-38
8.58836e-41
1.69832e-43
3.49107e-46
9.75704e-49
4.08505e-51
1.59023e-53
4.82617e-56
1.04896e-58
1.35065e-61
4.97251e-65
0.0933375
0.428505
0.713423
0.916534
0.997636
0.999531
0.958791
0.791517
0.536901
0.221445
0.0275302
0.00384739
0.000702826
0.000338152
0.000102421
5.10101e-05
1.52143e-05
5.49053e-06
1.44772e-06
5.58337e-07
1.28954e-07
4.10491e-08
1.05955e-08
1.96679e-09
7.01632e-10
1.59356e-10
2.76898e-11
7.85792e-12
2.02123e-12
6.78062e-13
3.38456e-13
1.78892e-13
2.07678e-13
8.68403e-14
1.76983e-14
3.84925e-15
1.33844e-15
4.01594e-16
9.55887e-17
4.94574e-17
3.67239e-17
1.39143e-16
3.42648e-16
7.26897e-16
2.27902e-15
4.05652e-15
9.93841e-15
2.32381e-14
3.99681e-14
9.39028e-14
1.69462e-13
2.85724e-13
5.31377e-13
9.37379e-13
1.48463e-12
2.24756e-12
3.3814e-12
4.88793e-12
6.57005e-12
8.89922e-12
1.34748e-11
2.18825e-11
7.16202e-11
2.70384e-10
8.51571e-10
5.1474e-09
2.57279e-08
1.09702e-07
6.00187e-07
3.40642e-06
1.93788e-05
0.000104032
0.000515034
0.00262008
0.0133637
0.0589771
0.186698
0.370314
0.523735
0.615822
0.629658
0.615036
0.495169
0.333112
0.165991
0.0583539
0.00793584
0.00271021
0.00108695
0.0002598
7.38859e-05
2.78336e-05
8.3832e-06
2.71556e-06
7.30705e-07
2.08505e-07
5.31604e-08
1.25363e-08
2.96904e-09
6.24673e-10
2.1598e-10
1.36712e-10
1.19462e-10
1.23752e-10
1.22632e-10
1.21322e-10
1.21361e-10
1.23917e-10
1.2554e-10
1.28307e-10
1.28823e-10
1.28182e-10
1.30323e-10
1.24614e-10
1.23513e-10
1.19955e-10
1.15041e-10
1.08832e-10
1.09836e-10
1.10081e-10
1.20776e-10
1.15283e-10
1.20256e-10
1.24909e-10
1.22518e-10
1.26897e-10
1.306e-10
1.39147e-10
1.42443e-10
1.49501e-10
1.52911e-10
1.52451e-10
1.5331e-10
1.53226e-10
1.50075e-10
1.50624e-10
1.50686e-10
1.50718e-10
1.7178e-10
3.70782e-10
1.39667e-09
5.44864e-09
2.40191e-08
1.22823e-07
6.11963e-07
3.36477e-06
2.01614e-05
0.000113255
0.000610602
0.00331366
0.0165902
0.0627528
0.169614
0.310574
0.383324
0.394835
0.372113
0.255052
0.152909
0.066267
0.017033
0.00615434
0.002767
0.000928121
0.000233795
5.11119e-05
1.58344e-05
3.63299e-06
8.97713e-07
2.53385e-07
6.83072e-08
1.5231e-08
3.78514e-09
9.25269e-10
2.89411e-10
1.71264e-10
1.25697e-10
1.16878e-10
1.15024e-10
1.15799e-10
1.16939e-10
1.18499e-10
1.22986e-10
1.26629e-10
1.30142e-10
1.33046e-10
1.32081e-10
1.31805e-10
1.28434e-10
1.19164e-10
1.17113e-10
1.14017e-10
1.14253e-10
1.23637e-10
1.2211e-10
1.29659e-10
1.28025e-10
1.24332e-10
1.17978e-10
1.16402e-10
1.1599e-10
1.22696e-10
1.24867e-10
1.29435e-10
1.31184e-10
1.34413e-10
1.38084e-10
1.41045e-10
1.40613e-10
1.39931e-10
1.39731e-10
1.40608e-10
1.4125e-10
1.42071e-10
2.0732e-10
5.80941e-10
2.33012e-09
9.74751e-09
4.01471e-08
1.82565e-07
8.71084e-07
4.33701e-06
2.3135e-05
0.000117338
0.000542569
0.00232211
0.00840561
0.0256601
0.0600348
0.0968104
0.119809
0.11713
0.0950821
0.0534537
0.0195931
0.00720975
0.00566055
0.00230444
0.000975443
0.000328742
0.000102679
2.99301e-05
5.84154e-06
1.41869e-06
3.30611e-07
8.03792e-08
1.88778e-08
4.39282e-09
1.01365e-09
3.73877e-10
2.40195e-10
1.92563e-10
1.77266e-10
1.70955e-10
1.65225e-10
1.58427e-10
1.57093e-10
1.63878e-10
1.79483e-10
2.07436e-10
2.24861e-10
2.25365e-10
2.25176e-10
2.05499e-10
1.83246e-10
1.65087e-10
1.64449e-10
1.77543e-10
1.8821e-10
1.97241e-10
1.96852e-10
1.93373e-10
1.92939e-10
1.84464e-10
1.77056e-10
1.7331e-10
1.70273e-10
1.64747e-10
1.61023e-10
1.57438e-10
1.49899e-10
1.40058e-10
1.33935e-10
1.26187e-10
2.46685e-10
1.7686e-09
1.94268e-09
1.64813e-09
1.82901e-09
3.32394e-09
7.75154e-09
2.16275e-08
6.67524e-08
2.11186e-07
8.1083e-07
3.42075e-06
1.60967e-05
0.000108697
0.000708273
0.00451237
0.0298673
0.136613
0.343758
0.524946
0.636007
0.674593
0.654004
0.560022
0.398329
0.215878
0.0862474
0.0159315
0.00177985
0.000812319
0.00029648
0.000126549
3.82073e-05
1.58162e-05
4.3149e-06
1.54523e-06
3.76395e-07
1.03103e-07
3.23046e-08
6.83146e-09
1.47982e-09
4.34645e-10
8.65324e-11
1.78203e-11
3.62654e-12
1.15709e-12
3.66268e-13
1.48192e-13
1.15196e-13
8.8681e-14
2.09787e-14
4.39953e-15
4.83132e-16
2.87735e-17
4.71149e-19
1.97259e-21
4.73611e-24
9.87339e-27
1.91941e-29
3.77108e-32
7.50535e-35
1.4943e-37
2.92949e-40
5.62252e-43
1.05394e-45
2.05641e-48
5.04776e-51
1.60901e-53
4.47383e-56
9.58221e-59
1.52299e-61
1.53407e-64
4.79601e-68
3.60937e-15
3.33396e-13
1.92087e-08
0.000415734
0.0319198
0.0460306
0.0128874
0.0119104
0.00645337
0.000518299
0.000395272
0.00020714
8.29874e-05
4.22399e-05
1.25368e-05
6.50336e-06
1.89838e-06
6.70459e-07
1.69741e-07
6.3428e-08
1.38118e-08
4.16542e-09
1.00897e-09
1.71983e-10
5.73941e-11
1.2451e-11
2.32639e-12
7.9198e-13
3.24322e-13
1.65564e-13
2.34676e-13
6.98403e-14
2.85331e-14
5.96435e-15
1.03188e-15
2.44002e-16
6.99676e-17
1.65312e-17
3.93078e-18
4.62633e-18
8.50594e-18
3.49677e-17
1.09223e-16
2.74587e-16
8.37877e-16
2.14287e-15
4.8374e-15
1.11356e-14
2.38444e-14
5.23855e-14
9.99006e-14
1.79237e-13
3.34583e-13
6.68464e-13
1.06654e-12
1.69563e-12
2.76505e-12
4.17939e-12
6.09834e-12
8.77621e-12
1.14485e-11
1.45221e-11
1.74884e-11
2.33325e-11
3.87144e-11
1.17253e-10
4.57328e-10
1.95946e-09
1.11208e-08
6.77953e-08
4.10088e-07
2.26358e-06
1.21668e-05
6.43235e-05
0.000305705
0.00130192
0.00495416
0.0156326
0.0387844
0.0704242
0.0824932
0.0833055
0.0509075
0.0162211
0.00383592
0.0023476
0.000988704
0.000300043
8.95096e-05
2.90471e-05
1.06002e-05
3.99549e-06
1.16842e-06
3.63817e-07
9.27589e-08
2.48845e-08
5.95263e-09
1.33946e-09
3.57309e-10
1.3619e-10
1.18367e-10
1.19509e-10
1.16812e-10
1.08502e-10
1.03115e-10
9.93082e-11
9.43867e-11
9.37126e-11
8.92332e-11
8.88788e-11
8.97335e-11
8.64166e-11
9.84129e-11
7.42214e-11
7.47778e-11
6.71658e-11
5.75814e-11
5.45104e-11
5.6259e-11
5.6385e-11
7.63589e-11
6.15493e-11
6.98518e-11
8.93796e-11
7.22184e-11
8.1326e-11
8.8228e-11
1.11492e-10
1.27963e-10
1.48196e-10
1.53989e-10
1.55987e-10
1.56828e-10
1.56759e-10
1.56767e-10
1.51857e-10
1.51105e-10
1.50854e-10
1.51446e-10
1.52738e-10
1.54748e-10
2.62841e-10
8.23709e-10
3.80354e-09
1.8037e-08
9.60585e-08
5.96436e-07
3.59336e-06
2.21934e-05
0.000122379
0.000623931
0.00209836
0.00608276
0.0142825
0.0205917
0.0223239
0.0192619
0.0117123
0.0052676
0.00512023
0.00271177
0.00103735
0.000350168
0.000107176
2.41003e-05
5.23074e-06
1.58582e-06
4.44768e-07
1.1637e-07
3.12483e-08
8.07005e-09
1.81471e-09
5.25574e-10
2.41167e-10
1.60219e-10
1.37305e-10
1.2056e-10
1.08532e-10
1.01744e-10
1.04931e-10
1.08966e-10
1.10089e-10
1.16686e-10
1.17826e-10
1.14455e-10
1.22692e-10
1.10567e-10
1.0344e-10
8.58223e-11
6.26651e-11
6.00415e-11
5.65708e-11
5.78775e-11
6.54132e-11
6.54105e-11
8.73281e-11
7.99571e-11
7.52497e-11
6.75074e-11
6.6617e-11
6.6121e-11
7.65584e-11
7.97439e-11
9.63475e-11
1.03264e-10
1.26933e-10
1.39872e-10
1.4804e-10
1.49346e-10
1.50143e-10
1.5047e-10
1.50473e-10
1.49261e-10
1.48268e-10
1.49561e-10
1.49859e-10
1.67589e-10
4.0655e-10
1.25486e-09
4.71627e-09
1.64231e-08
6.94672e-08
2.16176e-07
6.68522e-07
3.43416e-06
8.55835e-06
2.22132e-05
3.13659e-05
2.19413e-05
5.96521e-06
1.43748e-06
0.000232683
0.00140789
0.00207466
0.00172932
0.00099561
0.000704229
0.000309231
0.000126082
3.83415e-05
1.22436e-05
3.49444e-06
6.89869e-07
1.78985e-07
4.16944e-08
9.42964e-09
2.17099e-09
5.66352e-10
2.50999e-10
1.87858e-10
1.7916e-10
1.81567e-10
1.75805e-10
1.63677e-10
1.47086e-10
1.32318e-10
1.29229e-10
1.49793e-10
1.6219e-10
1.81091e-10
1.83415e-10
1.99185e-10
1.70131e-10
1.26095e-10
1.13945e-10
9.87264e-11
1.00633e-10
1.12112e-10
1.19677e-10
1.65008e-10
1.62017e-10
1.34622e-10
1.54491e-10
1.29803e-10
1.34628e-10
1.37058e-10
1.5259e-10
1.62378e-10
1.61554e-10
1.61182e-10
1.56105e-10
1.48058e-10
1.38154e-10
1.26297e-10
1.26062e-10
1.39175e-10
1.69052e-10
2.50889e-10
5.43518e-10
1.49531e-09
3.35584e-09
8.624e-09
3.01204e-08
9.96106e-08
1.95513e-07
2.0874e-07
5.28969e-07
2.71734e-06
1.46089e-05
8.05019e-05
0.00040342
0.00180351
0.00705257
0.0195695
0.0379727
0.0562307
0.0639348
0.0496717
0.0195459
0.00156718
0.00128137
0.000579387
0.000216025
0.000108527
3.9597e-05
1.74589e-05
5.07969e-06
2.08503e-06
5.38143e-07
1.87318e-07
4.23735e-08
1.09815e-08
3.21267e-09
6.25786e-10
1.24651e-10
3.41743e-11
6.44208e-12
1.5347e-12
4.35492e-13
2.10996e-13
1.16618e-13
5.53928e-14
2.27666e-14
5.33807e-15
1.06365e-15
1.61349e-16
1.33031e-17
5.33616e-19
6.13575e-21
2.33527e-23
5.18409e-26
1.01186e-28
1.84774e-31
3.38806e-34
6.2758e-37
1.16252e-39
2.12422e-42
3.8137e-45
6.75184e-48
1.25671e-50
2.88756e-53
8.28344e-56
2.10247e-58
4.16174e-61
6.08808e-64
5.57001e-67
1.55703e-70
9.73428e-16
1.01512e-14
3.03513e-13
4.21125e-09
3.33727e-07
7.75415e-07
7.67087e-06
6.61326e-05
4.31652e-05
4.32629e-05
4.06193e-05
2.33425e-05
9.75504e-06
5.21726e-06
1.53537e-06
8.19384e-07
2.35732e-07
8.13396e-08
1.98991e-08
7.16973e-09
1.47845e-09
4.22578e-10
9.62704e-11
1.54995e-11
4.9359e-12
1.44657e-12
3.73772e-13
1.72793e-13
2.24683e-13
6.05669e-14
2.49167e-14
7.63795e-15
2.22588e-15
3.95123e-16
6.06997e-17
1.44483e-17
3.42323e-18
6.90708e-19
3.68222e-19
1.27416e-18
4.11138e-18
1.73186e-17
5.8614e-17
1.60288e-16
4.75439e-16
1.25509e-15
2.93806e-15
6.72856e-15
1.42988e-14
3.11837e-14
6.13512e-14
1.13513e-13
2.13247e-13
4.17954e-13
7.06156e-13
1.17989e-12
1.87204e-12
3.04275e-12
4.79852e-12
8.10796e-12
1.21587e-11
1.71363e-11
2.16696e-11
2.68299e-11
3.41758e-11
4.18237e-11
5.87485e-11
1.11377e-10
3.28303e-10
1.32402e-09
6.07948e-09
2.15966e-08
8.56714e-08
3.28761e-07
1.05673e-06
2.74108e-06
3.07024e-06
4.03038e-06
2.58132e-06
1.29787e-06
5.42477e-05
5.82416e-05
0.000976143
0.00054416
0.000416071
0.000169039
7.16357e-05
2.34791e-05
9.94659e-06
4.1432e-06
1.52347e-06
5.72236e-07
1.6241e-07
4.86623e-08
1.17886e-08
3.01111e-09
7.06364e-10
1.97056e-10
1.07038e-10
9.56832e-11
8.96249e-11
8.84801e-11
8.58824e-11
7.01371e-11
5.85609e-11
5.12704e-11
4.40013e-11
4.24211e-11
3.75027e-11
3.61718e-11
3.46154e-11
3.15294e-11
3.60466e-11
2.56753e-11
2.56555e-11
2.2286e-11
1.93739e-11
1.81621e-11
1.86658e-11
1.84058e-11
2.55565e-11
1.98351e-11
2.397e-11
3.1818e-11
2.58488e-11
3.28981e-11
3.69791e-11
5.41695e-11
6.7935e-11
9.12301e-11
1.00156e-10
1.30895e-10
1.29463e-10
1.45505e-10
1.45501e-10
1.44251e-10
1.53837e-10
1.58969e-10
1.61582e-10
1.63588e-10
1.63735e-10
1.6603e-10
1.68698e-10
2.4267e-10
5.9785e-10
2.00559e-09
8.90354e-09
4.66169e-08
2.07765e-07
2.10484e-06
4.51744e-06
1.33807e-05
4.26462e-05
3.23423e-05
6.85329e-05
0.000140133
0.000148163
0.000608083
0.000434429
0.000509193
0.000289883
0.000104519
3.24204e-05
1.12817e-05
2.67706e-06
7.59536e-07
2.25095e-07
6.07707e-08
1.53098e-08
4.02558e-09
1.1056e-09
3.68785e-10
2.05675e-10
1.78107e-10
1.51069e-10
1.21278e-10
9.79133e-11
8.1695e-11
6.81058e-11
6.98411e-11
7.28485e-11
7.14191e-11
7.81328e-11
7.32621e-11
6.31241e-11
7.26439e-11
5.22819e-11
4.46498e-11
3.19988e-11
2.20169e-11
2.11964e-11
1.87405e-11
1.94407e-11
2.03222e-11
1.92941e-11
2.9047e-11
2.57645e-11
2.55712e-11
2.32767e-11
2.26424e-11
2.36047e-11
2.8219e-11
2.97087e-11
4.26883e-11
5.01334e-11
7.40403e-11
9.1138e-11
1.13125e-10
1.30596e-10
1.33649e-10
1.47314e-10
1.51742e-10
1.52874e-10
1.52809e-10
1.51718e-10
1.49676e-10
1.49179e-10
1.4969e-10
2.00388e-10
5.36471e-10
1.36791e-09
4.76733e-09
1.66278e-08
5.03446e-08
1.73794e-07
6.80245e-07
2.38663e-06
7.78765e-06
7.83197e-06
4.38214e-06
2.34575e-07
2.04998e-07
3.14702e-05
0.000107739
0.000111899
8.59152e-05
6.39514e-05
2.96107e-05
1.39217e-05
4.59017e-06
1.49226e-06
4.06029e-07
1.01623e-07
2.46907e-08
5.38286e-09
1.19609e-09
3.64752e-10
1.83834e-10
1.79763e-10
1.73293e-10
1.67951e-10
1.58976e-10
1.50638e-10
1.26036e-10
9.82672e-11
7.91358e-11
7.36888e-11
9.1328e-11
8.93219e-11
9.5667e-11
8.80233e-11
9.87494e-11
7.73563e-11
6.25078e-11
5.74105e-11
4.66359e-11
4.9112e-11
5.13254e-11
5.45913e-11
7.53584e-11
7.48394e-11
6.76461e-11
8.55205e-11
6.78168e-11
8.01161e-11
8.45332e-11
1.02833e-10
1.20415e-10
1.34205e-10
1.32433e-10
1.26065e-10
1.23797e-10
1.21023e-10
1.22612e-10
1.28747e-10
1.43024e-10
2.08822e-10
4.26496e-10
1.17095e-09
3.44481e-09
1.13098e-08
2.6422e-08
3.11705e-08
9.22364e-08
1.24809e-07
4.96305e-08
5.98379e-08
1.7331e-07
4.2534e-07
1.25094e-06
2.66063e-06
3.33198e-06
4.35087e-06
4.97472e-06
4.98734e-06
4.80631e-06
4.7352e-06
0.000185545
0.000239392
0.000143583
9.36351e-05
5.16065e-05
2.70292e-05
1.45775e-05
5.3151e-06
2.3878e-06
6.74881e-07
2.71779e-07
6.67949e-08
2.25764e-08
4.75492e-09
1.16977e-09
3.18263e-10
5.86018e-11
1.1055e-11
3.35291e-12
8.00673e-13
2.66499e-13
1.38975e-13
1.13597e-13
2.57209e-14
5.19399e-15
1.67379e-15
3.15058e-16
5.15442e-17
5.73356e-18
3.53561e-19
9.84742e-21
8.49046e-23
2.9286e-25
6.01339e-28
1.09294e-30
1.86347e-33
3.17336e-36
5.44506e-39
9.33939e-42
1.58274e-44
2.64427e-47
4.39215e-50
7.72524e-53
1.64961e-55
4.25902e-58
9.84288e-61
1.79319e-63
2.40678e-66
1.99637e-69
4.98635e-73
3.21064e-18
1.31942e-15
1.59813e-14
3.39127e-13
4.60421e-09
9.84606e-09
7.83401e-07
3.6922e-06
2.75041e-06
3.56585e-06
4.10405e-06
2.58571e-06
1.1389e-06
6.37643e-07
1.87795e-07
1.02178e-07
2.91325e-08
9.8147e-09
2.33094e-09
8.06875e-10
1.58273e-10
4.34223e-11
9.43057e-12
1.93497e-12
6.7002e-13
2.45829e-13
1.49131e-13
7.89802e-14
2.72701e-14
7.3735e-15
2.6386e-15
7.71004e-16
1.69751e-16
2.54154e-17
3.57903e-18
8.00771e-19
1.61648e-19
4.77075e-20
1.18217e-19
5.46508e-19
2.03088e-18
8.55968e-18
2.98662e-17
8.66068e-17
2.55552e-16
6.75264e-16
1.64233e-15
3.78577e-15
7.90101e-15
1.69086e-14
3.37655e-14
6.41837e-14
1.19269e-13
2.21636e-13
3.918e-13
6.67006e-13
9.79671e-13
1.58361e-12
2.20788e-12
3.07276e-12
6.16987e-12
1.16826e-11
2.01268e-11
2.87293e-11
3.94105e-11
5.21676e-11
6.34126e-11
7.95269e-11
1.13201e-10
2.46751e-10
8.46886e-10
3.08333e-09
1.38154e-08
5.90211e-08
2.48473e-07
9.28025e-07
1.34491e-06
2.52413e-06
1.62052e-06
1.29738e-06
9.92669e-06
2.5229e-06
3.61954e-05
1.90223e-05
2.18078e-05
1.06177e-05
5.17008e-06
2.64298e-06
1.37453e-06
5.92117e-07
2.18376e-07
8.16384e-08
2.2537e-08
6.52381e-09
1.523e-09
4.07075e-10
1.18535e-10
8.05963e-11
6.62123e-11
5.67753e-11
5.48892e-11
5.11999e-11
4.24196e-11
2.7928e-11
2.00827e-11
1.63187e-11
1.31708e-11
1.28479e-11
1.1105e-11
1.13044e-11
1.11672e-11
1.05797e-11
1.11351e-11
8.8946e-12
8.80118e-12
8.0449e-12
7.53784e-12
7.39127e-12
7.4217e-12
7.32975e-12
8.39004e-12
7.30575e-12
7.9159e-12
8.0882e-12
7.61472e-12
9.78663e-12
1.11025e-11
1.84161e-11
2.54681e-11
3.94615e-11
4.41671e-11
6.24085e-11
6.34581e-11
8.01707e-11
9.31012e-11
9.43868e-11
1.12729e-10
1.34688e-10
1.59983e-10
1.73735e-10
1.92921e-10
1.92601e-10
1.91011e-10
1.88266e-10
1.98944e-10
3.3977e-10
1.05977e-09
4.30778e-09
1.96468e-08
1.13374e-07
3.23403e-07
8.0661e-07
2.99199e-06
4.52384e-06
6.23476e-06
8.33119e-06
3.69368e-07
2.45299e-05
2.21703e-05
2.78703e-05
2.09878e-05
9.08109e-06
3.22714e-06
1.21583e-06
3.24871e-07
1.11133e-07
3.2093e-08
8.41489e-09
2.14432e-09
6.53735e-10
2.94534e-10
2.06548e-10
1.75229e-10
1.45094e-10
1.17365e-10
8.93055e-11
6.26031e-11
4.41708e-11
3.11313e-11
3.1509e-11
3.08725e-11
2.84867e-11
3.14907e-11
2.72737e-11
2.21222e-11
2.39968e-11
1.48938e-11
1.28507e-11
1.00473e-11
8.35577e-12
8.10454e-12
7.21544e-12
7.45299e-12
7.404e-12
7.26649e-12
8.73958e-12
8.13971e-12
8.1499e-12
7.566e-12
7.34002e-12
7.43314e-12
8.08572e-12
8.46967e-12
1.23936e-11
1.67571e-11
2.82494e-11
3.73684e-11
5.3042e-11
6.79373e-11
7.29644e-11
9.74558e-11
1.11977e-10
1.42204e-10
1.49865e-10
1.51587e-10
1.51163e-10
1.50766e-10
1.51909e-10
1.50153e-10
1.67594e-10
2.1476e-10
4.09357e-10
1.12154e-09
2.84557e-09
8.93727e-09
3.00791e-08
7.63323e-08
2.65983e-07
3.1397e-07
2.38096e-07
5.89344e-08
2.95344e-08
3.41235e-07
4.16124e-06
6.14055e-06
5.2117e-06
5.21885e-06
2.76431e-06
1.52228e-06
5.67433e-07
1.79923e-07
5.45534e-08
1.51127e-08
3.49039e-09
7.73707e-10
2.37932e-10
1.64864e-10
1.47417e-10
1.46018e-10
1.37587e-10
1.31831e-10
1.15161e-10
1.00099e-10
7.06554e-11
4.74058e-11
3.36884e-11
2.82212e-11
3.29325e-11
2.99739e-11
3.57298e-11
3.29307e-11
3.35204e-11
2.91764e-11
2.58827e-11
2.21069e-11
1.68908e-11
1.79752e-11
1.71557e-11
1.8352e-11
2.2614e-11
2.53189e-11
2.7503e-11
3.51147e-11
2.87952e-11
3.9783e-11
4.16152e-11
5.28317e-11
6.1981e-11
7.30472e-11
8.08629e-11
8.18337e-11
8.40259e-11
8.6073e-11
9.2042e-11
1.123e-10
1.603e-10
2.64186e-10
5.72481e-10
1.56798e-09
4.36296e-09
1.68427e-08
3.6794e-08
3.08157e-08
5.75508e-08
5.17864e-08
1.34189e-08
1.42937e-08
3.85526e-08
1.05496e-07
3.88917e-07
1.05534e-06
1.61092e-06
3.05239e-06
5.10142e-06
7.13075e-06
8.62626e-06
9.99777e-06
1.26166e-05
1.205e-05
1.21612e-05
9.9227e-06
6.06511e-06
3.40893e-06
1.94271e-06
7.11033e-07
3.23102e-07
8.9442e-08
3.50809e-08
8.26134e-09
2.70841e-09
5.34026e-10
1.27149e-10
3.25156e-11
7.02606e-12
1.68455e-12
4.66591e-13
1.84938e-13
1.66807e-13
4.04323e-14
1.22854e-14
2.4392e-15
4.83542e-16
1.18137e-16
1.82173e-17
2.39531e-18
1.98247e-19
9.14199e-21
1.82481e-22
1.24315e-24
3.87116e-27
7.39778e-30
1.24182e-32
1.96024e-35
3.07747e-38
4.85752e-41
7.6621e-44
1.19604e-46
1.84646e-49
2.85385e-52
4.69474e-55
9.23917e-58
2.14107e-60
4.48204e-63
7.46296e-66
9.13268e-69
6.83591e-72
1.52138e-75
2.8075e-20
1.36844e-17
2.87122e-15
2.33921e-14
2.90275e-11
1.41138e-10
3.97786e-08
1.20719e-07
1.75561e-07
2.90528e-07
4.08168e-07
2.82034e-07
1.31989e-07
7.71804e-08
2.29226e-08
1.2635e-08
3.58504e-09
1.17834e-09
2.72775e-10
9.06851e-11
1.73015e-11
5.27164e-12
1.25199e-12
3.27509e-13
1.63839e-13
1.54334e-13
3.72129e-14
1.12639e-14
3.39408e-15
8.90125e-16
2.76971e-16
7.27455e-17
1.2628e-17
1.59614e-18
2.08604e-19
4.20612e-20
8.82451e-21
1.09551e-20
5.00479e-20
2.3674e-19
9.52303e-19
3.98209e-18
1.44747e-17
4.47567e-17
1.31355e-16
3.49901e-16
8.74225e-16
2.03147e-15
4.25873e-15
8.78299e-15
1.77675e-14
3.47485e-14
6.37394e-14
1.14766e-13
2.0475e-13
3.37684e-13
5.1309e-13
7.93438e-13
1.11885e-12
1.64189e-12
2.39005e-12
3.81631e-12
8.65923e-12
1.51492e-11
2.3844e-11
3.7188e-11
5.4454e-11
7.40077e-11
9.64156e-11
1.30214e-10
2.07746e-10
4.915e-10
1.72325e-09
6.07243e-09
2.18923e-08
8.3527e-08
1.9199e-07
4.67023e-07
6.69161e-07
1.01016e-06
1.39498e-06
1.06407e-06
1.91361e-06
1.57346e-06
1.46699e-06
9.22981e-07
5.84734e-07
3.44895e-07
1.89807e-07
8.44492e-08
3.1236e-08
1.16288e-08
3.15248e-09
8.94972e-10
2.28721e-10
9.36036e-11
5.64885e-11
3.61905e-11
3.16869e-11
2.86888e-11
2.49045e-11
1.76692e-11
1.11895e-11
6.53126e-12
5.85195e-12
5.695e-12
5.76583e-12
5.93825e-12
5.93991e-12
5.76371e-12
5.4475e-12
5.00131e-12
4.92631e-12
4.17647e-12
4.16975e-12
3.86734e-12
3.65988e-12
3.61279e-12
3.62286e-12
3.59021e-12
4.06813e-12
3.61606e-12
3.96692e-12
3.96987e-12
3.82214e-12
4.40144e-12
4.59909e-12
5.71554e-12
7.57304e-12
1.29365e-11
1.56413e-11
2.13892e-11
2.30614e-11
3.10287e-11
3.90883e-11
4.80476e-11
6.09594e-11
7.81308e-11
1.04263e-10
1.27393e-10
1.7082e-10
1.79107e-10
1.90347e-10
1.90121e-10
1.89236e-10
2.15399e-10
3.35013e-10
7.42766e-10
3.32386e-09
1.30698e-08
4.91775e-08
1.37861e-07
3.63953e-07
4.9168e-07
5.03369e-07
4.95881e-07
6.57779e-08
9.93533e-07
1.19681e-06
1.81003e-06
1.55964e-06
8.9343e-07
3.46916e-07
1.42434e-07
4.76929e-08
1.63139e-08
4.6561e-09
1.25685e-09
4.25949e-10
2.19641e-10
1.98559e-10
1.62186e-10
1.30769e-10
1.0619e-10
7.78768e-11
5.01425e-11
2.7941e-11
1.57573e-11
9.09831e-12
8.89951e-12
7.78945e-12
7.33587e-12
7.83619e-12
7.09075e-12
7.2613e-12
6.94572e-12
6.27465e-12
6.04172e-12
4.85484e-12
4.08594e-12
4.05278e-12
3.64754e-12
3.75642e-12
3.69544e-12
3.71937e-12
4.16609e-12
4.06673e-12
4.11169e-12
4.00527e-12
3.92465e-12
4.06794e-12
4.24801e-12
4.33922e-12
5.03745e-12
5.52846e-12
8.10743e-12
1.08028e-11
1.59025e-11
2.11815e-11
2.62406e-11
4.18086e-11
5.17052e-11
8.38991e-11
1.03357e-10
1.21707e-10
1.41163e-10
1.34731e-10
1.44086e-10
1.48742e-10
1.57581e-10
1.71644e-10
1.96279e-10
2.8688e-10
5.47935e-10
1.21515e-09
3.00583e-09
6.35297e-09
1.81405e-08
2.83594e-08
3.32286e-08
3.00003e-08
2.75589e-08
3.51079e-08
1.97298e-07
3.70006e-07
3.76183e-07
4.11684e-07
2.87626e-07
1.76569e-07
6.93197e-08
2.75724e-08
8.52211e-09
2.31355e-09
5.65088e-10
1.73878e-10
1.269e-10
1.13561e-10
1.01371e-10
1.04831e-10
9.27658e-11
8.07773e-11
6.17863e-11
4.86991e-11
2.80312e-11
1.55477e-11
9.5356e-12
7.85133e-12
7.96345e-12
9.21206e-12
1.21625e-11
1.26869e-11
1.22644e-11
1.09069e-11
9.76806e-12
8.38867e-12
6.78464e-12
7.26822e-12
6.95362e-12
7.51914e-12
9.16047e-12
9.74368e-12
9.90987e-12
1.15663e-11
9.64489e-12
1.40046e-11
1.40544e-11
2.16593e-11
2.73815e-11
3.44543e-11
4.13252e-11
4.86155e-11
5.40274e-11
5.90611e-11
6.78374e-11
8.79585e-11
1.15953e-10
1.66728e-10
2.75539e-10
4.52698e-10
6.42851e-10
1.3758e-09
1.84516e-08
3.72797e-09
8.22602e-09
7.45454e-09
1.93623e-09
2.71499e-09
6.11999e-09
1.45309e-08
3.8402e-08
1.08719e-07
1.93682e-07
4.0672e-07
6.62209e-07
1.06085e-06
1.39129e-06
1.47501e-06
1.43498e-06
1.35397e-06
1.15915e-06
1.06329e-06
7.10135e-07
4.29269e-07
2.56195e-07
9.46546e-08
4.33297e-08
1.18332e-08
4.49514e-09
1.0231e-09
3.2462e-10
6.32658e-11
1.68461e-11
4.9264e-12
1.03786e-12
3.09334e-13
1.51788e-13
8.81499e-14
2.3111e-14
5.13038e-15
1.32178e-15
2.2613e-16
4.33185e-17
8.10167e-18
1.02894e-18
1.07252e-19
6.69357e-21
2.31661e-22
3.41839e-24
1.9086e-26
5.34487e-29
9.40966e-32
1.44748e-34
2.09782e-37
3.01345e-40
4.34361e-43
6.25518e-46
8.92738e-49
1.26379e-51
1.80159e-54
2.74345e-57
4.93417e-60
1.02257e-62
1.92831e-65
2.91439e-68
3.23076e-71
2.17056e-74
4.28643e-78
3.78645e-22
2.25047e-19
5.46101e-17
4.73989e-15
1.24799e-13
2.50156e-12
1.764e-09
4.23164e-09
1.11954e-08
2.34203e-08
4.00203e-08
3.03424e-08
1.5189e-08
9.26611e-09
2.79149e-09
1.55139e-09
4.39185e-10
1.40942e-10
3.25376e-11
1.03378e-11
2.5591e-12
6.69048e-13
2.44864e-13
1.30929e-13
7.8147e-14
2.33503e-14
5.27151e-15
1.60139e-15
4.25113e-16
1.05422e-16
2.84785e-17
6.4842e-18
9.14503e-19
9.81915e-20
1.19004e-20
2.18294e-21
1.0358e-21
4.12686e-21
2.11594e-20
1.01566e-19
4.33951e-19
1.82213e-18
6.90786e-18
2.25022e-17
6.61317e-17
1.79219e-16
4.52859e-16
1.05566e-15
2.25036e-15
4.56669e-15
9.34617e-15
1.87449e-14
3.47629e-14
6.34776e-14
1.14634e-13
1.85873e-13
2.88615e-13
4.47554e-13
6.39682e-13
9.48893e-13
1.39541e-12
2.04872e-12
3.54908e-12
7.30408e-12
1.2995e-11
2.1542e-11
3.51073e-11
5.24906e-11
7.26485e-11
9.36091e-11
1.18891e-10
1.73248e-10
3.3636e-10
9.01108e-10
3.01322e-09
8.71996e-09
2.56527e-08
5.79879e-08
8.78955e-08
1.56985e-07
1.71417e-07
1.99897e-07
1.82495e-07
1.90924e-07
1.50734e-07
1.11268e-07
7.13042e-08
4.51849e-08
2.62164e-08
1.20584e-08
4.50466e-09
1.68611e-09
4.80769e-10
1.45978e-10
6.76772e-11
3.2151e-11
1.60593e-11
1.21916e-11
1.26376e-11
9.35575e-12
6.42014e-12
4.36813e-12
4.25121e-12
4.37702e-12
4.13745e-12
3.73498e-12
3.38738e-12
3.23624e-12
2.95776e-12
2.85695e-12
2.65155e-12
2.47092e-12
2.46064e-12
2.13865e-12
2.15378e-12
2.02372e-12
1.89588e-12
1.85667e-12
1.88297e-12
1.84431e-12
2.09235e-12
1.87608e-12
2.07852e-12
2.08287e-12
2.03009e-12
2.28118e-12
2.46851e-12
2.99551e-12
3.36952e-12
4.21752e-12
4.60531e-12
6.26764e-12
6.74267e-12
9.5091e-12
1.20884e-11
1.84244e-11
2.73584e-11
3.81149e-11
5.50874e-11
7.06474e-11
9.03309e-11
1.06647e-10
1.39085e-10
1.45992e-10
1.67813e-10
1.9355e-10
2.45472e-10
3.38199e-10
9.44832e-10
2.58574e-09
9.57098e-09
2.4551e-08
4.87763e-08
6.70965e-08
7.23759e-08
6.83968e-08
4.47604e-08
1.01221e-07
1.29536e-07
1.76081e-07
1.62233e-07
1.00841e-07
4.56162e-08
2.10114e-08
7.07389e-09
2.46139e-09
7.53938e-10
2.83184e-10
1.97172e-10
1.68907e-10
1.42954e-10
1.14199e-10
8.92492e-11
6.32471e-11
3.87712e-11
1.93409e-11
7.69424e-12
5.1686e-12
5.12638e-12
5.10901e-12
4.86874e-12
4.64995e-12
4.84316e-12
4.42507e-12
4.27266e-12
4.00957e-12
3.25012e-12
3.06907e-12
2.57561e-12
2.25622e-12
2.27922e-12
2.0788e-12
2.1011e-12
2.07852e-12
2.12575e-12
2.31535e-12
2.34089e-12
2.35744e-12
2.33175e-12
2.33696e-12
2.39609e-12
2.53959e-12
2.66231e-12
2.97223e-12
3.25094e-12
3.72444e-12
4.08509e-12
4.68612e-12
5.72595e-12
7.22166e-12
1.22029e-11
1.67769e-11
3.22881e-11
4.42415e-11
6.3561e-11
8.57532e-11
9.63806e-11
1.1782e-10
1.33955e-10
1.64198e-10
1.86035e-10
2.05278e-10
2.37066e-10
3.20267e-10
4.58923e-10
8.72949e-10
1.80935e-09
3.96737e-09
7.93258e-09
1.22885e-08
1.4797e-08
1.40378e-08
1.30521e-08
1.99175e-08
3.14185e-08
3.68558e-08
4.24293e-08
3.29734e-08
2.22129e-08
1.04174e-08
4.48694e-09
1.39385e-09
4.21598e-10
1.53133e-10
1.01622e-10
6.89117e-11
6.78111e-11
6.15502e-11
5.81953e-11
4.43612e-11
3.44715e-11
2.22435e-11
1.51458e-11
7.21606e-12
5.63048e-12
5.2032e-12
4.79591e-12
4.81898e-12
5.60142e-12
6.72364e-12
6.28593e-12
6.44339e-12
5.23773e-12
4.43529e-12
3.8834e-12
3.33274e-12
3.5212e-12
3.3853e-12
3.61739e-12
4.45639e-12
4.36629e-12
4.43981e-12
5.15116e-12
4.55133e-12
5.737e-12
5.44694e-12
7.24584e-12
8.98605e-12
1.27419e-11
1.72221e-11
2.33807e-11
2.81589e-11
3.41941e-11
4.39603e-11
6.65203e-11
9.8484e-11
1.24848e-10
1.38995e-10
1.37459e-10
1.36771e-10
1.36878e-10
1.70054e-10
1.64124e-10
1.74375e-10
5.00711e-10
4.14367e-10
6.5346e-10
1.18657e-09
2.54352e-09
6.01666e-09
1.31879e-08
2.92957e-08
5.52627e-08
8.65891e-08
1.37559e-07
1.80724e-07
1.82702e-07
1.70881e-07
1.72324e-07
1.28641e-07
1.13717e-07
8.26398e-08
5.38924e-08
3.34886e-08
1.25628e-08
5.77564e-09
1.57061e-09
5.7632e-10
1.34365e-10
4.13665e-11
1.19209e-11
3.04478e-12
7.33632e-13
2.514e-13
2.08305e-13
5.49033e-14
1.41144e-14
3.24797e-15
6.34752e-16
1.40276e-16
2.07923e-17
3.69493e-18
5.4074e-19
5.65965e-20
4.64761e-21
2.21348e-22
5.78914e-24
6.49874e-26
3.04182e-28
7.62441e-31
1.22283e-33
1.7081e-36
2.25073e-39
2.93127e-42
3.82429e-45
4.98371e-48
6.44504e-51
8.2894e-54
1.07897e-56
1.50464e-59
2.45339e-62
4.53549e-65
7.68739e-68
1.05226e-70
1.05463e-73
6.34293e-77
1.10638e-80
8.24046e-24
5.98774e-21
1.68743e-18
2.07307e-16
9.57809e-15
4.59138e-14
7.09865e-11
1.64667e-10
7.11711e-10
1.87044e-09
3.8757e-09
3.22714e-09
1.73608e-09
1.10425e-09
3.38982e-10
1.89412e-10
5.42375e-11
1.71306e-11
5.0651e-12
1.54214e-12
3.63927e-13
1.7163e-13
1.61094e-13
3.81642e-14
1.25421e-14
3.57216e-15
7.64346e-16
2.22157e-16
5.2657e-17
1.21296e-17
2.84132e-18
5.50503e-19
6.44035e-20
5.92502e-21
6.64144e-22
1.39289e-22
2.90977e-22
1.6332e-21
8.76058e-21
4.26896e-20
1.89287e-19
8.04226e-19
3.15762e-18
1.06495e-17
3.15106e-17
8.68673e-17
2.20243e-16
5.12553e-16
1.10646e-15
2.25661e-15
4.66151e-15
9.51587e-15
1.78603e-14
3.27145e-14
5.98716e-14
9.60787e-14
1.51414e-13
2.36235e-13
3.46812e-13
5.2128e-13
7.65288e-13
1.1418e-12
1.75418e-12
2.56686e-12
5.4013e-12
1.12839e-11
2.11837e-11
3.58946e-11
5.50547e-11
7.58638e-11
9.52467e-11
1.16698e-10
1.5213e-10
2.39358e-10
5.15052e-10
1.25477e-09
3.42715e-09
7.46725e-09
1.28785e-08
1.9117e-08
2.45398e-08
2.45542e-08
2.28529e-08
2.35749e-08
1.95921e-08
1.57148e-08
9.36423e-09
5.99564e-09
3.68916e-09
1.77963e-09
7.0545e-10
2.86935e-10
1.0931e-10
5.09379e-11
1.80141e-11
7.6783e-12
4.39298e-12
3.71588e-12
3.92553e-12
3.72446e-12
3.75947e-12
3.52218e-12
3.06418e-12
2.62429e-12
2.30682e-12
1.99598e-12
1.74354e-12
1.62858e-12
1.49374e-12
1.4553e-12
1.32684e-12
1.23514e-12
1.25518e-12
1.09663e-12
1.10805e-12
1.04669e-12
9.92017e-13
9.56749e-13
9.67472e-13
9.53483e-13
1.06849e-12
9.66313e-13
1.07242e-12
1.10574e-12
1.07785e-12
1.19143e-12
1.31963e-12
1.54557e-12
1.70857e-12
2.15615e-12
2.3151e-12
2.70362e-12
2.66053e-12
3.20439e-12
3.54779e-12
4.76556e-12
8.2183e-12
1.37696e-11
2.43484e-11
3.67989e-11
5.63161e-11
7.27435e-11
9.77068e-11
1.13084e-10
1.41375e-10
1.74025e-10
2.15546e-10
2.56691e-10
4.04745e-10
6.62827e-10
1.83173e-09
4.03277e-09
6.90122e-09
9.91123e-09
1.18971e-08
1.19321e-08
1.21079e-08
1.80543e-08
2.1308e-08
2.48223e-08
2.15649e-08
1.30298e-08
6.59144e-09
3.18495e-09
1.10774e-09
4.46602e-10
1.85993e-10
1.53369e-10
1.2927e-10
1.12073e-10
9.69947e-11
7.1507e-11
4.72125e-11
2.73228e-11
1.26552e-11
4.86601e-12
4.48634e-12
3.89017e-12
3.2367e-12
3.03541e-12
2.695e-12
2.5411e-12
2.59962e-12
2.35431e-12
2.20141e-12
2.08765e-12
1.69526e-12
1.65689e-12
1.45055e-12
1.31117e-12
1.32425e-12
1.22627e-12
1.20922e-12
1.19281e-12
1.22139e-12
1.33001e-12
1.39827e-12
1.40245e-12
1.41054e-12
1.41598e-12
1.45703e-12
1.55973e-12
1.64648e-12
1.78838e-12
1.96327e-12
2.18413e-12
2.38255e-12
2.63664e-12
2.92382e-12
3.25771e-12
3.79685e-12
4.88362e-12
8.93562e-12
1.33982e-11
2.56304e-11
4.24291e-11
5.42907e-11
7.83827e-11
9.83701e-11
1.35563e-10
1.65964e-10
1.92074e-10
2.08833e-10
2.33971e-10
2.68638e-10
3.6672e-10
6.04277e-10
1.13469e-09
2.31591e-09
3.80198e-09
4.27456e-09
3.78287e-09
3.42372e-09
3.84827e-09
4.45415e-09
5.26585e-09
5.64195e-09
4.54403e-09
2.96596e-09
1.75923e-09
8.17816e-10
2.97353e-10
1.42242e-10
7.77773e-11
4.69876e-11
3.39753e-11
3.54275e-11
2.55231e-11
2.0093e-11
1.21281e-11
8.38338e-12
5.41157e-12
4.73622e-12
4.68915e-12
3.99346e-12
3.0786e-12
2.5514e-12
2.53811e-12
2.86246e-12
3.17269e-12
2.92182e-12
2.99629e-12
2.49698e-12
2.21525e-12
2.01277e-12
1.77581e-12
1.84584e-12
1.76573e-12
1.86984e-12
2.19878e-12
2.14437e-12
2.25273e-12
2.55468e-12
2.39789e-12
2.94598e-12
2.82e-12
3.57102e-12
3.94725e-12
4.82242e-12
5.6841e-12
7.25136e-12
9.54382e-12
1.35446e-11
2.14088e-11
4.05222e-11
7.45711e-11
1.11123e-10
1.30935e-10
1.37513e-10
1.38137e-10
1.36807e-10
1.37637e-10
1.38639e-10
1.3232e-10
1.18056e-10
1.87314e-10
2.3301e-10
3.22346e-10
5.36798e-10
1.05117e-09
2.09391e-09
4.38771e-09
7.68016e-09
1.10001e-08
1.75889e-08
2.30124e-08
2.26021e-08
2.16621e-08
2.22067e-08
1.8168e-08
1.23785e-08
9.61619e-09
6.76871e-09
4.36025e-09
1.67834e-09
7.74731e-10
2.21241e-10
8.01549e-11
2.65778e-11
9.23881e-12
1.66603e-12
5.24738e-13
2.27624e-13
1.49197e-13
4.14754e-14
9.16211e-15
2.21793e-15
4.51918e-16
7.65568e-17
1.45815e-17
1.89087e-18
2.99917e-19
3.50853e-20
3.02566e-21
1.95618e-22
7.18663e-24
1.43368e-25
1.25512e-27
4.9845e-30
1.11112e-32
1.60337e-35
2.01114e-38
2.38143e-41
2.78081e-44
3.24818e-47
3.78916e-50
4.3918e-53
5.0756e-56
5.96767e-59
7.56571e-62
1.12431e-64
1.90158e-67
3.0161e-70
3.92052e-73
3.70921e-76
2.05304e-79
3.17678e-83
1.588e-25
1.40449e-22
4.57748e-20
7.06621e-18
5.63415e-16
2.11092e-14
2.15662e-12
6.64577e-12
4.51311e-11
1.48256e-10
3.7119e-10
3.39754e-10
1.97151e-10
1.3085e-10
4.15161e-11
2.34371e-11
7.48916e-12
2.72517e-12
6.32578e-13
2.96468e-13
1.23963e-13
9.35903e-14
2.73874e-14
6.44558e-15
2.0034e-15
5.46048e-16
1.11354e-16
2.98767e-17
6.37812e-18
1.34809e-18
2.73712e-19
4.47942e-20
4.41037e-21
3.50811e-22
3.73823e-23
1.94522e-23
1.03298e-22
6.30238e-22
3.46415e-21
1.69741e-20
7.67989e-20
3.2993e-19
1.33049e-18
4.58615e-18
1.36751e-17
3.83033e-17
9.718e-17
2.26085e-16
4.94439e-16
1.02081e-15
2.13799e-15
4.41875e-15
8.44611e-15
1.55152e-14
2.87494e-14
4.60447e-14
7.42078e-14
1.16636e-13
1.73474e-13
2.64303e-13
3.90748e-13
5.96933e-13
9.01494e-13
1.29721e-12
1.85198e-12
3.40563e-12
8.41784e-12
1.82929e-11
3.39759e-11
5.45181e-11
7.57709e-11
9.51515e-11
1.1253e-10
1.36576e-10
1.81587e-10
2.85944e-10
5.56502e-10
1.07165e-09
1.85425e-09
2.47234e-09
3.25836e-09
3.20778e-09
3.01748e-09
3.08074e-09
2.74356e-09
2.37462e-09
1.48836e-09
8.79306e-10
6.04571e-10
3.33748e-10
1.57486e-10
9.38394e-11
3.99303e-11
1.4815e-11
5.05378e-12
3.64171e-12
3.65862e-12
3.59212e-12
3.3665e-12
2.95642e-12
2.62704e-12
2.13346e-12
1.74607e-12
1.41776e-12
1.21046e-12
1.02541e-12
8.83275e-13
8.13066e-13
7.53347e-13
7.33445e-13
6.58767e-13
6.08738e-13
6.25306e-13
5.45258e-13
5.5073e-13
5.20032e-13
4.98269e-13
4.76352e-13
4.80806e-13
4.78996e-13
5.33424e-13
4.89045e-13
5.37899e-13
5.61745e-13
5.52787e-13
6.09636e-13
6.70882e-13
7.86994e-13
8.74752e-13
1.10493e-12
1.19409e-12
1.36534e-12
1.37391e-12
1.66137e-12
1.79939e-12
2.12441e-12
2.46809e-12
3.31735e-12
5.67349e-12
1.01333e-11
2.14333e-11
3.35939e-11
5.60715e-11
7.0979e-11
9.94214e-11
1.37996e-10
1.88698e-10
2.2331e-10
2.56974e-10
2.87313e-10
4.48646e-10
7.39868e-10
1.08357e-09
1.56186e-09
2.01553e-09
2.11138e-09
2.51601e-09
3.27783e-09
3.65799e-09
3.99784e-09
3.34508e-09
1.94185e-09
1.02922e-09
5.71174e-10
2.33409e-10
1.53303e-10
1.113e-10
8.32626e-11
7.75217e-11
7.1013e-11
5.3893e-11
3.22048e-11
1.66596e-11
7.14091e-12
3.76985e-12
3.85838e-12
3.03947e-12
2.33121e-12
1.83828e-12
1.67163e-12
1.46032e-12
1.35105e-12
1.34946e-12
1.22118e-12
1.12748e-12
1.07497e-12
8.89768e-13
8.9584e-13
8.1462e-13
7.51273e-13
7.58985e-13
7.03697e-13
6.83252e-13
6.64543e-13
6.82729e-13
7.48111e-13
8.15957e-13
8.26209e-13
8.3486e-13
8.39978e-13
8.70074e-13
9.34311e-13
9.90752e-13
1.06989e-12
1.19417e-12
1.3059e-12
1.38679e-12
1.58857e-12
1.75646e-12
1.97862e-12
2.31489e-12
2.6315e-12
3.26955e-12
4.10996e-12
7.04828e-12
1.40325e-11
2.12529e-11
3.97794e-11
5.62841e-11
9.30212e-11
1.2501e-10
1.59082e-10
1.7511e-10
1.87875e-10
1.99876e-10
2.20755e-10
2.62528e-10
3.51706e-10
5.55199e-10
8.24647e-10
8.20311e-10
7.38628e-10
7.13407e-10
7.32275e-10
7.77806e-10
9.09887e-10
9.51128e-10
8.05871e-10
6.10633e-10
4.04803e-10
2.29361e-10
1.36335e-10
6.48163e-11
3.00086e-11
1.97466e-11
1.45854e-11
1.20592e-11
6.27363e-12
4.7912e-12
4.3794e-12
4.26792e-12
4.20699e-12
3.76441e-12
2.99614e-12
2.27436e-12
1.65181e-12
1.34378e-12
1.32718e-12
1.42749e-12
1.51259e-12
1.4118e-12
1.45122e-12
1.25324e-12
1.15866e-12
1.07921e-12
9.58521e-13
9.71177e-13
9.20395e-13
9.73648e-13
1.11229e-12
1.11171e-12
1.17973e-12
1.33479e-12
1.31723e-12
1.59869e-12
1.552e-12
1.90676e-12
2.04487e-12
2.37682e-12
2.70235e-12
3.23618e-12
3.85328e-12
4.72284e-12
7.12288e-12
1.76901e-11
4.19075e-11
8.11209e-11
1.23283e-10
1.50319e-10
1.55099e-10
1.54391e-10
1.59153e-10
1.67461e-10
1.60664e-10
1.17894e-10
1.17859e-10
1.16896e-10
1.32622e-10
1.71952e-10
2.52918e-10
4.05155e-10
7.1852e-10
1.15438e-09
1.60031e-09
2.33767e-09
2.9753e-09
2.91126e-09
2.79159e-09
2.87009e-09
2.54255e-09
1.64497e-09
1.16026e-09
8.78328e-10
5.81517e-10
2.46515e-10
1.16649e-10
4.49653e-11
1.94066e-11
5.3173e-12
1.33787e-12
3.81141e-13
2.6491e-13
1.1731e-13
3.21071e-14
8.17106e-15
1.52237e-15
3.38683e-16
6.12367e-17
8.97083e-18
1.47765e-18
1.68802e-19
2.32416e-20
2.2105e-21
1.57091e-22
8.0202e-24
2.29518e-25
3.53001e-27
2.45831e-29
8.32049e-32
1.63518e-34
2.09316e-37
2.32394e-40
2.43772e-43
2.51707e-46
2.59668e-49
2.67507e-52
2.74228e-55
2.81835e-58
3.01113e-61
3.71286e-64
6.09261e-67
1.25487e-69
2.45057e-72
3.69599e-75
3.71949e-78
2.00242e-81
2.77077e-85
4.40657e-27
4.74901e-24
1.77843e-21
3.19941e-19
3.08366e-17
2.57636e-15
6.51993e-14
4.84088e-13
2.94783e-12
1.18394e-11
3.53149e-11
3.5542e-11
2.24905e-11
1.56799e-11
6.01614e-12
3.59645e-12
1.16631e-12
3.77477e-13
1.70032e-13
1.12602e-13
5.23879e-14
1.69233e-14
4.78368e-15
1.10623e-15
3.19444e-16
8.2605e-17
1.60227e-17
3.89117e-18
7.51263e-19
1.44442e-19
2.54226e-20
3.5101e-21
2.9384e-22
2.04096e-23
2.52762e-24
5.52611e-24
3.64927e-23
2.2928e-22
1.27026e-21
6.1882e-21
2.82643e-20
1.22043e-19
5.01703e-19
1.75547e-18
5.26912e-18
1.50148e-17
3.81196e-17
8.8967e-17
1.97804e-16
4.15997e-16
8.8773e-16
1.86279e-15
3.6519e-15
6.73981e-15
1.27037e-14
2.08399e-14
3.44756e-14
5.4873e-14
8.41539e-14
1.29177e-13
1.9349e-13
2.94176e-13
4.53888e-13
6.85122e-13
1.00241e-12
1.54273e-12
2.2837e-12
5.41001e-12
1.37888e-11
2.88693e-11
4.88957e-11
7.17995e-11
9.27665e-11
1.0969e-10
1.26238e-10
1.49187e-10
1.88559e-10
2.54477e-10
3.62368e-10
4.19243e-10
5.12007e-10
5.1559e-10
4.78984e-10
4.91279e-10
4.71632e-10
4.38135e-10
3.13285e-10
2.22024e-10
1.81417e-10
1.3632e-10
7.22106e-11
3.16813e-11
1.08605e-11
4.1719e-12
3.24517e-12
3.29423e-12
2.95383e-12
2.53258e-12
2.23754e-12
1.83354e-12
1.53166e-12
1.17913e-12
9.22592e-13
7.31434e-13
6.13134e-13
5.12816e-13
4.34585e-13
3.93031e-13
3.65563e-13
3.53174e-13
3.11248e-13
2.8583e-13
2.92141e-13
2.56622e-13
2.60378e-13
2.42605e-13
2.32019e-13
2.22404e-13
2.23953e-13
2.25474e-13
2.51326e-13
2.30919e-13
2.50598e-13
2.63767e-13
2.65843e-13
2.94671e-13
3.225e-13
3.82682e-13
4.2958e-13
5.44079e-13
5.89436e-13
6.84948e-13
7.05193e-13
8.35095e-13
9.40101e-13
1.10804e-12
1.322e-12
1.68174e-12
1.97208e-12
2.45559e-12
4.6841e-12
8.51518e-12
1.89779e-11
2.92581e-11
5.07028e-11
8.64479e-11
1.47805e-10
1.97454e-10
2.22076e-10
2.1946e-10
2.28696e-10
2.56957e-10
2.99813e-10
3.69073e-10
4.36792e-10
4.40532e-10
5.81521e-10
6.70289e-10
7.22443e-10
7.51879e-10
6.36993e-10
3.93824e-10
2.45164e-10
1.90383e-10
1.14145e-10
7.4542e-11
4.8534e-11
4.28523e-11
4.40801e-11
3.38662e-11
1.97685e-11
8.53148e-12
3.94726e-12
3.45731e-12
3.17208e-12
2.41838e-12
1.76345e-12
1.31177e-12
1.0226e-12
9.06856e-13
7.81247e-13
7.03549e-13
6.80553e-13
6.16057e-13
5.6321e-13
5.33794e-13
4.49917e-13
4.65164e-13
4.35979e-13
4.0712e-13
4.09021e-13
3.79304e-13
3.6149e-13
3.48016e-13
3.56875e-13
3.979e-13
4.4924e-13
4.59414e-13
4.62618e-13
4.68187e-13
4.89199e-13
5.27189e-13
5.62576e-13
6.15353e-13
6.89381e-13
7.62821e-13
7.87009e-13
9.26054e-13
1.04858e-12
1.22113e-12
1.45467e-12
1.69406e-12
2.07933e-12
2.41754e-12
2.9171e-12
4.04757e-12
5.7316e-12
1.28917e-11
2.24146e-11
4.8655e-11
7.31044e-11
1.07897e-10
1.31621e-10
1.56609e-10
1.74878e-10
1.94254e-10
2.10153e-10
2.22676e-10
2.31726e-10
2.43629e-10
2.49239e-10
2.48295e-10
2.41945e-10
2.39949e-10
2.3008e-10
2.49154e-10
2.68367e-10
2.81712e-10
2.59836e-10
2.01269e-10
1.16727e-10
4.9788e-11
1.89395e-11
9.28692e-12
7.03137e-12
4.539e-12
3.60604e-12
3.75843e-12
3.76128e-12
3.61877e-12
3.2476e-12
2.75529e-12
2.27913e-12
1.67306e-12
1.22246e-12
8.68229e-13
6.96456e-13
6.80583e-13
6.98968e-13
7.33334e-13
6.98396e-13
7.18904e-13
6.24894e-13
5.91059e-13
5.54605e-13
4.91642e-13
4.86431e-13
4.5669e-13
4.8283e-13
5.55389e-13
5.61272e-13
5.92268e-13
6.809e-13
7.08023e-13
8.51049e-13
8.45997e-13
1.00689e-12
1.07553e-12
1.23384e-12
1.38773e-12
1.64419e-12
1.93383e-12
2.33673e-12
3.12673e-12
5.06794e-12
1.48198e-11
4.13029e-11
8.65008e-11
1.42601e-10
1.53057e-10
1.53167e-10
1.53674e-10
1.41323e-10
1.10202e-10
1.07064e-10
8.77349e-11
7.84798e-11
7.63828e-11
8.40289e-11
1.00038e-10
1.25391e-10
1.67282e-10
2.16708e-10
2.6722e-10
3.35744e-10
4.10055e-10
4.10466e-10
3.88605e-10
3.95975e-10
3.81434e-10
2.81405e-10
1.87768e-10
1.50608e-10
9.87157e-11
5.96949e-11
3.29217e-11
1.24144e-11
3.19559e-12
8.49086e-13
3.56329e-13
2.78972e-13
9.72516e-14
2.63241e-14
6.73056e-15
1.55672e-15
2.5005e-16
5.00354e-17
8.01649e-18
1.01896e-18
1.4561e-19
1.46986e-20
1.72677e-21
1.35186e-22
7.92262e-24
3.20983e-25
7.2186e-27
8.65346e-29
4.86237e-31
1.40095e-33
2.39891e-36
2.67707e-39
2.5835e-42
2.35741e-45
2.11451e-48
1.89325e-51
1.69453e-54
1.52665e-57
1.48594e-60
2.02771e-63
4.84338e-66
1.51223e-68
4.34482e-71
9.38684e-74
1.38584e-76
1.27951e-79
6.0697e-83
7.17934e-87
1.48842e-28
1.97445e-25
8.61608e-23
1.80481e-20
2.04002e-18
1.85948e-16
1.42254e-14
5.98869e-14
2.74217e-13
1.0765e-12
3.4472e-12
3.76382e-12
3.17408e-12
2.4572e-12
8.59046e-13
4.67588e-13
2.44411e-13
1.20688e-13
9.97236e-14
3.74484e-14
1.00135e-14
3.09871e-15
8.50014e-16
1.90344e-16
5.06686e-17
1.22825e-17
2.25177e-18
4.91173e-19
8.58816e-20
1.49251e-20
2.27806e-21
2.65853e-22
1.90615e-23
1.17919e-24
3.20849e-25
1.81747e-24
1.21798e-23
7.70206e-23
4.24721e-22
2.0403e-21
9.3188e-21
4.00967e-20
1.67101e-19
5.90772e-19
1.78419e-18
5.18164e-18
1.32202e-17
3.11496e-17
7.06174e-17
1.52051e-16
3.32212e-16
7.13699e-16
1.43407e-15
2.62853e-15
5.04547e-15
8.48308e-15
1.45107e-14
2.35248e-14
3.68661e-14
5.80021e-14
8.73855e-14
1.35518e-13
2.1619e-13
3.33418e-13
5.23079e-13
7.97874e-13
1.19387e-12
1.80855e-12
3.33282e-12
8.21909e-12
1.91183e-11
3.73437e-11
5.96833e-11
8.15371e-11
1.03199e-10
1.18779e-10
1.34664e-10
1.48678e-10
1.74406e-10
1.87807e-10
2.11686e-10
1.86653e-10
2.0018e-10
1.90542e-10
2.05559e-10
1.99449e-10
1.77104e-10
1.46242e-10
9.51746e-11
5.04177e-11
2.09484e-11
7.98241e-12
3.3084e-12
2.86931e-12
2.88082e-12
2.47466e-12
2.01394e-12
1.62616e-12
1.35732e-12
1.04159e-12
8.28205e-13
6.11065e-13
4.62197e-13
3.60921e-13
2.96769e-13
2.44254e-13
2.01415e-13
1.78396e-13
1.64585e-13
1.55492e-13
1.34871e-13
1.21868e-13
1.22823e-13
1.08932e-13
1.1058e-13
1.0156e-13
9.74368e-14
9.32268e-14
9.35239e-14
9.47171e-14
1.05229e-13
9.77085e-14
1.04837e-13
1.12241e-13
1.15908e-13
1.28636e-13
1.40566e-13
1.68521e-13
1.91499e-13
2.44739e-13
2.64996e-13
3.16607e-13
3.33101e-13
3.90907e-13
4.63428e-13
5.46073e-13
6.66012e-13
8.63302e-13
1.0533e-12
1.27572e-12
1.72205e-12
2.06473e-12
3.88202e-12
6.58664e-12
1.47035e-11
3.50433e-11
8.41554e-11
1.40944e-10
1.93828e-10
1.9881e-10
1.96292e-10
1.87404e-10
1.89402e-10
2.11184e-10
2.43257e-10
2.74119e-10
2.65942e-10
2.59937e-10
2.38872e-10
2.618e-10
2.50896e-10
2.14211e-10
1.439e-10
8.34628e-11
3.45708e-11
2.49868e-11
2.00926e-11
2.11333e-11
1.75812e-11
9.55991e-12
4.44763e-12
3.33567e-12
3.25141e-12
2.69866e-12
1.98369e-12
1.3786e-12
9.64613e-13
7.11916e-13
5.52805e-13
4.76587e-13
4.03129e-13
3.49048e-13
3.25325e-13
2.93172e-13
2.64006e-13
2.47531e-13
2.10607e-13
2.22259e-13
2.1317e-13
2.00654e-13
1.99992e-13
1.84286e-13
1.73098e-13
1.64711e-13
1.69079e-13
1.9245e-13
2.23725e-13
2.30585e-13
2.31957e-13
2.36156e-13
2.48264e-13
2.69738e-13
2.90133e-13
3.22861e-13
3.63698e-13
4.10426e-13
4.17214e-13
5.02409e-13
5.85683e-13
7.04155e-13
8.62749e-13
1.04474e-12
1.28528e-12
1.55663e-12
1.93773e-12
2.40401e-12
2.70839e-12
3.63266e-12
6.02954e-12
1.83917e-11
3.06326e-11
5.20758e-11
6.9184e-11
9.45676e-11
1.17615e-10
1.57183e-10
2.00454e-10
2.28313e-10
2.42623e-10
2.52958e-10
2.5372e-10
2.48005e-10
2.41414e-10
2.38329e-10
2.25337e-10
2.34158e-10
2.22933e-10
1.99154e-10
1.44139e-10
8.14549e-11
3.54911e-11
1.34756e-11
5.42019e-12
3.57893e-12
3.26462e-12
3.39565e-12
3.3487e-12
2.97288e-12
2.71227e-12
2.31299e-12
1.99567e-12
1.58711e-12
1.25864e-12
8.81037e-13
6.29908e-13
4.37895e-13
3.43558e-13
3.30005e-13
3.26554e-13
3.42308e-13
3.2838e-13
3.38975e-13
2.91903e-13
2.80204e-13
2.61697e-13
2.29092e-13
2.22971e-13
2.06958e-13
2.18238e-13
2.51194e-13
2.57673e-13
2.72686e-13
3.20081e-13
3.53229e-13
4.24372e-13
4.33181e-13
5.07592e-13
5.4213e-13
6.17148e-13
6.9576e-13
8.16292e-13
9.54726e-13
1.17432e-12
1.54741e-12
2.26674e-12
3.97016e-12
1.23573e-11
4.7096e-11
1.02934e-10
1.48456e-10
1.47183e-10
1.35049e-10
1.0778e-10
8.99398e-11
8.13799e-11
7.21354e-11
6.29565e-11
5.64742e-11
5.58044e-11
5.90259e-11
6.56827e-11
7.3725e-11
7.82189e-11
7.87615e-11
7.80659e-11
8.4737e-11
8.71961e-11
8.71109e-11
8.9228e-11
9.40301e-11
8.58344e-11
8.05931e-11
6.61595e-11
4.09981e-11
1.90892e-11
6.78994e-12
1.82258e-12
6.35955e-13
2.98304e-13
2.54281e-13
7.87408e-14
2.33629e-14
5.87987e-15
1.36914e-15
2.84336e-16
4.01499e-17
7.13838e-18
1.01142e-18
1.12117e-19
1.39391e-20
1.24364e-21
1.23499e-22
8.02805e-24
3.88426e-25
1.25584e-26
2.23653e-28
2.1105e-30
9.64867e-33
2.35216e-35
3.45475e-38
3.28673e-41
2.69234e-44
2.0868e-47
1.58851e-50
1.20888e-53
9.46311e-57
9.46294e-60
2.10054e-62
8.10983e-65
3.05968e-67
9.84723e-70
2.53501e-72
4.73537e-75
5.97268e-78
4.66877e-81
1.85491e-84
1.81376e-88
6.70706e-30
1.11777e-26
5.77295e-24
1.3795e-21
1.64432e-19
1.36002e-17
1.00913e-15
5.79772e-14
6.46502e-14
1.41796e-13
4.48717e-13
4.77204e-13
3.9267e-13
3.21369e-13
1.96062e-13
1.35026e-13
9.71403e-14
5.72817e-14
1.97391e-14
6.80745e-15
1.92403e-15
5.71849e-16
1.5179e-16
3.24572e-17
7.94592e-18
1.78737e-18
3.07357e-19
6.01614e-20
9.52736e-21
1.48937e-21
1.97238e-22
1.95154e-23
1.20515e-24
7.1773e-26
7.71409e-26
5.78356e-25
3.80142e-24
2.38668e-23
1.29974e-22
6.13279e-22
2.77879e-21
1.18385e-20
4.96412e-20
1.76638e-19
5.37214e-19
1.58957e-18
4.0977e-18
9.80903e-18
2.26709e-17
5.00891e-17
1.12747e-16
2.48846e-16
5.10312e-16
8.99956e-16
1.74939e-15
3.00794e-15
5.36403e-15
8.81372e-15
1.41189e-14
2.30958e-14
3.51604e-14
5.70443e-14
9.36861e-14
1.49853e-13
2.42894e-13
3.857e-13
6.21597e-13
9.99395e-13
1.54096e-12
2.02825e-12
4.04639e-12
9.44507e-12
2.05564e-11
3.67673e-11
5.95023e-11
8.09603e-11
1.058e-10
1.19433e-10
1.34974e-10
1.49141e-10
1.51955e-10
1.54044e-10
1.40269e-10
1.36804e-10
1.24997e-10
1.10019e-10
8.37404e-11
5.42945e-11
2.9003e-11
1.32853e-11
5.35187e-12
2.79926e-12
2.48933e-12
2.49052e-12
2.01704e-12
1.65451e-12
1.26657e-12
9.64223e-13
7.6392e-13
5.53542e-13
4.22006e-13
2.99634e-13
2.19059e-13
1.67842e-13
1.34135e-13
1.07688e-13
8.52824e-14
7.34835e-14
6.61698e-14
6.04946e-14
5.15449e-14
4.51458e-14
4.48954e-14
4.01542e-14
4.03566e-14
3.67838e-14
3.54661e-14
3.37216e-14
3.36172e-14
3.40752e-14
3.75958e-14
3.52643e-14
3.79669e-14
4.14188e-14
4.34937e-14
4.84968e-14
5.33695e-14
6.42758e-14
7.4067e-14
9.59861e-14
1.04418e-13
1.2978e-13
1.37454e-13
1.62876e-13
1.99481e-13
2.42174e-13
3.04532e-13
4.03094e-13
5.22101e-13
6.39504e-13
8.62059e-13
1.10755e-12
1.44665e-12
1.81382e-12
3.01855e-12
7.66442e-12
2.68744e-11
6.33406e-11
1.20568e-10
1.40044e-10
1.63307e-10
1.56582e-10
1.44368e-10
1.46542e-10
1.68239e-10
1.90983e-10
2.13598e-10
2.18649e-10
2.17325e-10
1.95084e-10
1.59043e-10
1.04374e-10
5.47453e-11
2.44333e-11
9.75931e-12
6.42222e-12
7.5763e-12
7.0275e-12
4.53274e-12
3.14074e-12
3.04498e-12
2.86061e-12
2.24161e-12
1.66477e-12
1.11852e-12
7.29984e-13
5.03404e-13
3.70301e-13
2.83404e-13
2.35926e-13
1.943e-13
1.59546e-13
1.42845e-13
1.27156e-13
1.11868e-13
1.02631e-13
8.77121e-14
9.38509e-14
9.17521e-14
8.63157e-14
8.49846e-14
7.75711e-14
7.17369e-14
6.76764e-14
6.98495e-14
8.0973e-14
9.67581e-14
1.00283e-13
1.01047e-13
1.0295e-13
1.09343e-13
1.19615e-13
1.30266e-13
1.47501e-13
1.67992e-13
1.93865e-13
1.96118e-13
2.42997e-13
2.92374e-13
3.63727e-13
4.58689e-13
5.79101e-13
7.35491e-13
9.15453e-13
1.17584e-12
1.50334e-12
1.80172e-12
2.07452e-12
2.22294e-12
5.6591e-12
1.03834e-11
1.94092e-11
2.45427e-11
3.524e-11
4.38241e-11
7.12093e-11
1.09715e-10
1.49199e-10
1.7849e-10
1.92529e-10
1.93418e-10
1.86449e-10
1.7254e-10
1.61429e-10
1.40665e-10
1.28256e-10
1.03465e-10
7.88788e-11
5.02564e-11
2.45107e-11
1.07866e-11
4.46528e-12
3.21363e-12
3.29319e-12
2.96223e-12
2.60925e-12
2.30871e-12
1.92661e-12
1.675e-12
1.34977e-12
1.12147e-12
8.48637e-13
6.50978e-13
4.38629e-13
3.06121e-13
2.05117e-13
1.55942e-13
1.45437e-13
1.39471e-13
1.45048e-13
1.38464e-13
1.42871e-13
1.21615e-13
1.1704e-13
1.08441e-13
9.34654e-14
8.87334e-14
8.15268e-14
8.56439e-14
9.8126e-14
1.02175e-13
1.09518e-13
1.31797e-13
1.55207e-13
1.88707e-13
1.98112e-13
2.31402e-13
2.44715e-13
2.78373e-13
3.18004e-13
3.64281e-13
4.35259e-13
5.44734e-13
6.96576e-13
9.88125e-13
1.68446e-12
3.31574e-12
1.6224e-11
5.40114e-11
1.21434e-10
1.37965e-10
1.09101e-10
7.17988e-11
5.78115e-11
5.5064e-11
5.08565e-11
4.65992e-11
4.19046e-11
4.04456e-11
4.11747e-11
4.46645e-11
4.98192e-11
5.51792e-11
5.85618e-11
5.95033e-11
5.95546e-11
6.14147e-11
6.0988e-11
6.08804e-11
6.19515e-11
5.12453e-11
3.42352e-11
2.13716e-11
9.82134e-12
3.06622e-12
1.13444e-12
4.54906e-13
3.60099e-13
1.93644e-13
7.72295e-14
2.19801e-14
5.60527e-15
1.29117e-15
2.69153e-16
4.97495e-17
6.2562e-18
9.83356e-19
1.23061e-19
1.19568e-20
1.2964e-21
1.02083e-22
8.53282e-24
4.63312e-25
1.85307e-26
4.80709e-28
6.82179e-30
5.10635e-32
1.90384e-34
3.88298e-37
4.78887e-40
3.7684e-43
2.53614e-46
1.61603e-49
1.01442e-52
6.77617e-56
8.15794e-59
3.16691e-61
1.5779e-63
6.55261e-66
2.17802e-68
5.90786e-71
1.26153e-73
1.94554e-76
2.0183e-79
1.28891e-82
4.13805e-86
3.21775e-90
1.79013e-31
3.96789e-28
2.59806e-25
7.78218e-23
1.13511e-20
1.04001e-18
8.62129e-17
4.60377e-15
2.44412e-14
4.57191e-14
1.05528e-13
1.16119e-13
1.11969e-13
9.97265e-14
1.34284e-13
7.35689e-14
3.29128e-14
1.13463e-14
3.9506e-15
1.27814e-15
3.71213e-16
1.05641e-16
2.694e-17
5.4396e-18
1.22504e-18
2.5398e-19
4.06699e-20
7.15911e-21
1.02637e-21
1.4378e-22
1.65287e-23
1.39116e-24
7.44055e-26
5.77706e-27
2.21181e-26
1.73005e-25
1.11023e-24
6.86068e-24
3.67275e-23
1.70322e-22
7.61935e-22
3.20525e-21
1.34156e-20
4.78297e-20
1.46493e-19
4.38539e-19
1.14538e-18
2.78714e-18
6.53936e-18
1.47952e-17
3.42779e-17
7.71829e-17
1.60257e-16
2.6144e-16
5.10558e-16
8.94982e-16
1.68187e-15
2.78085e-15
4.55196e-15
7.81101e-15
1.21728e-14
2.07136e-14
3.5269e-14
5.89964e-14
9.91433e-14
1.70049e-13
2.92295e-13
4.96814e-13
8.43916e-13
1.14913e-12
1.62927e-12
2.26494e-12
4.11048e-12
7.98855e-12
1.50128e-11
2.67497e-11
4.53256e-11
6.22024e-11
7.50759e-11
8.50054e-11
8.54806e-11
8.77437e-11
7.42154e-11
6.75029e-11
5.38343e-11
3.96855e-11
2.52937e-11
1.37042e-11
7.09975e-12
3.57506e-12
2.29237e-12
2.31233e-12
2.07594e-12
1.73878e-12
1.32104e-12
1.02977e-12
7.43948e-13
5.35181e-13
4.03836e-13
2.77572e-13
2.03024e-13
1.38298e-13
9.68918e-14
7.20816e-14
5.52418e-14
4.27362e-14
3.20459e-14
2.65617e-14
2.28687e-14
2.00109e-14
1.65556e-14
1.38622e-14
1.35837e-14
1.21896e-14
1.20229e-14
1.09451e-14
1.06489e-14
1.00064e-14
9.88157e-15
9.98429e-15
1.09811e-14
1.03199e-14
1.12593e-14
1.25208e-14
1.33257e-14
1.491e-14
1.66257e-14
2.02225e-14
2.37143e-14
3.05973e-14
3.38957e-14
4.35116e-14
4.70406e-14
5.65812e-14
7.15029e-14
8.99263e-14
1.16936e-13
1.57914e-13
2.19966e-13
2.73705e-13
3.93527e-13
5.37454e-13
7.04186e-13
9.42379e-13
1.21971e-12
1.64035e-12
5.19105e-12
1.48459e-11
3.95074e-11
5.44899e-11
7.27674e-11
8.03664e-11
7.9021e-11
8.32012e-11
1.0015e-10
1.17783e-10
1.40839e-10
1.43365e-10
1.35418e-10
1.02325e-10
6.71041e-11
3.45318e-11
1.49405e-11
7.26226e-12
3.52247e-12
3.05456e-12
2.94731e-12
2.85983e-12
2.68127e-12
2.67148e-12
2.38515e-12
1.86706e-12
1.35076e-12
9.31219e-13
5.81404e-13
3.62998e-13
2.48937e-13
1.80895e-13
1.34181e-13
1.06943e-13
8.48351e-14
6.52201e-14
5.58344e-14
4.86015e-14
4.13564e-14
3.64807e-14
3.11362e-14
3.36056e-14
3.32398e-14
3.09275e-14
2.99225e-14
2.69778e-14
2.45518e-14
2.29881e-14
2.3933e-14
2.81813e-14
3.4628e-14
3.59821e-14
3.62952e-14
3.69365e-14
3.97639e-14
4.38609e-14
4.8344e-14
5.5652e-14
6.44746e-14
7.66261e-14
7.72619e-14
9.91241e-14
1.22327e-13
1.58382e-13
2.05418e-13
2.69767e-13
3.59297e-13
4.63972e-13
6.25995e-13
8.37689e-13
1.05992e-12
1.21755e-12
1.31221e-12
1.86893e-12
3.06699e-12
6.86028e-12
7.78093e-12
1.05789e-11
1.20771e-11
2.24876e-11
4.33652e-11
7.03643e-11
9.80162e-11
1.07274e-10
1.0667e-10
1.00425e-10
8.75086e-11
7.70518e-11
6.29144e-11
5.41425e-11
4.01017e-11
2.78678e-11
1.48629e-11
7.68347e-12
3.84504e-12
2.9067e-12
3.06215e-12
2.56959e-12
2.10055e-12
1.72221e-12
1.45638e-12
1.14536e-12
9.53738e-13
7.31735e-13
5.86921e-13
4.25289e-13
3.15978e-13
2.03316e-13
1.36818e-13
8.663e-14
6.30651e-14
5.61595e-14
5.21154e-14
5.31878e-14
5.00468e-14
5.12487e-14
4.28913e-14
4.10953e-14
3.73431e-14
3.16479e-14
2.87462e-14
2.62981e-14
2.75295e-14
3.12906e-14
3.34969e-14
3.6345e-14
4.46176e-14
5.71819e-14
7.03513e-14
7.60286e-14
8.86126e-14
9.31234e-14
1.06541e-13
1.22002e-13
1.36789e-13
1.65969e-13
2.1416e-13
2.68302e-13
3.8811e-13
6.47827e-13
1.30555e-12
3.41224e-12
1.40814e-11
5.96012e-11
8.59354e-11
6.17534e-11
3.11748e-11
2.35582e-11
2.33039e-11
2.32033e-11
2.34883e-11
2.25925e-11
2.26555e-11
2.26856e-11
2.29087e-11
2.5635e-11
2.7474e-11
2.96101e-11
3.07285e-11
2.90337e-11
2.95773e-11
2.82395e-11
2.41531e-11
2.02137e-11
1.42231e-11
7.54213e-12
3.60404e-12
1.54638e-12
6.7408e-13
4.59643e-13
3.52014e-13
1.68158e-13
6.50079e-14
2.26602e-14
5.88409e-15
1.3193e-15
2.75188e-16
5.10165e-17
8.35618e-18
9.42743e-19
1.30892e-19
1.44626e-20
1.23695e-21
1.17186e-22
8.12631e-24
5.71102e-25
2.60053e-26
8.60901e-28
1.80023e-29
2.04453e-31
1.21901e-33
3.69076e-36
6.18562e-39
6.21642e-42
3.87554e-45
2.0377e-48
1.02173e-51
5.61649e-55
8.84482e-58
5.10363e-60
2.98185e-62
1.35546e-64
4.74413e-67
1.29622e-69
2.83794e-72
4.82468e-75
5.88206e-78
4.79183e-81
2.37984e-84
5.85106e-88
3.37474e-92
3.1438e-33
9.97584e-30
9.00741e-27
3.6984e-24
7.36191e-22
8.65839e-20
8.40537e-18
4.54438e-16
3.15298e-15
1.15242e-14
5.71208e-14
6.42363e-14
5.91922e-14
4.67396e-14
2.65959e-14
1.42671e-14
6.45686e-15
2.28952e-15
7.97514e-16
2.46588e-16
7.14736e-17
1.93872e-17
4.71066e-18
8.90866e-19
1.84837e-19
3.5185e-20
5.21363e-21
8.2811e-22
1.07401e-22
1.34422e-23
1.34189e-24
9.63529e-26
4.51484e-27
8.39465e-28
6.16826e-27
4.77161e-26
2.97179e-25
1.78801e-24
9.33143e-24
4.2374e-23
1.85886e-22
7.6874e-22
3.18782e-21
1.13276e-20
3.48587e-20
1.04643e-19
2.76075e-19
6.78644e-19
1.60862e-18
3.70033e-18
8.73061e-18
1.98564e-17
4.15161e-17
6.1503e-17
1.19323e-16
2.11796e-16
4.2375e-16
7.03517e-16
1.17614e-15
2.11362e-15
3.40857e-15
6.06249e-15
1.08384e-14
1.90385e-14
3.38314e-14
6.13237e-14
1.14729e-13
2.08922e-13
3.86491e-13
5.74283e-13
8.63129e-13
1.27675e-12
1.77377e-12
2.33885e-12
3.74162e-12
5.98131e-12
1.07482e-11
1.86047e-11
2.7132e-11
3.09531e-11
3.07667e-11
2.9424e-11
2.36019e-11
1.97748e-11
1.44564e-11
9.25812e-12
5.97536e-12
3.58505e-12
2.5163e-12
2.1766e-12
2.17634e-12
1.8526e-12
1.43367e-12
1.1388e-12
8.14544e-13
6.01919e-13
4.11846e-13
2.80315e-13
2.01557e-13
1.31382e-13
9.17199e-14
5.94331e-14
3.93888e-14
2.80576e-14
2.02943e-14
1.48966e-14
1.03951e-14
8.14478e-15
6.55081e-15
5.36649e-15
4.22539e-15
3.33602e-15
3.1686e-15
2.82181e-15
2.72709e-15
2.479e-15
2.44579e-15
2.25474e-15
2.22369e-15
2.22801e-15
2.43312e-15
2.27894e-15
2.51709e-15
2.85762e-15
3.09388e-15
3.45494e-15
3.90381e-15
4.80036e-15
5.74242e-15
7.30027e-15
8.40542e-15
1.10081e-14
1.23938e-14
1.48972e-14
1.94959e-14
2.53787e-14
3.48368e-14
4.81476e-14
7.14037e-14
8.99236e-14
1.39472e-13
2.04832e-13
2.82927e-13
3.89617e-13
5.106e-13
7.36013e-13
1.19764e-12
2.89644e-12
8.32588e-12
1.42233e-11
2.16822e-11
2.53688e-11
2.71009e-11
3.27859e-11
4.29999e-11
5.33509e-11
6.65548e-11
6.67538e-11
5.85348e-11
4.08303e-11
2.2081e-11
8.74559e-12
4.31909e-12
2.97263e-12
2.79326e-12
2.93888e-12
2.81877e-12
2.58973e-12
2.2449e-12
1.91142e-12
1.53618e-12
1.11034e-12
7.47883e-13
4.81121e-13
2.81816e-13
1.6937e-13
1.14967e-13
8.12587e-14
5.73494e-14
4.33132e-14
3.27184e-14
2.32574e-14
1.88663e-14
1.58624e-14
1.28504e-14
1.06949e-14
9.00029e-15
9.67361e-15
9.50378e-15
8.62543e-15
8.14573e-15
7.2381e-15
6.48013e-15
6.03498e-15
6.32306e-15
7.55683e-15
9.55974e-15
9.94185e-15
9.99971e-15
1.01882e-14
1.11293e-14
1.2385e-14
1.38124e-14
1.6176e-14
1.91584e-14
2.35305e-14
2.35926e-14
3.14779e-14
4.00139e-14
5.40071e-14
7.23877e-14
9.8232e-14
1.38005e-13
1.85993e-13
2.67806e-13
3.74327e-13
5.00271e-13
5.90594e-13
6.45742e-13
8.04119e-13
1.11788e-12
1.51264e-12
1.82515e-12
2.82511e-12
3.68688e-12
6.05351e-12
1.16676e-11
2.09967e-11
3.71284e-11
4.62926e-11
4.48916e-11
3.90484e-11
3.17332e-11
2.53291e-11
1.89596e-11
1.6287e-11
1.14018e-11
7.76502e-12
4.68256e-12
3.21992e-12
2.7687e-12
2.71361e-12
2.29244e-12
1.79182e-12
1.37319e-12
1.05378e-12
8.5011e-13
6.34604e-13
5.06972e-13
3.71532e-13
2.87415e-13
1.99194e-13
1.42409e-13
8.60831e-14
5.49643e-14
3.22158e-14
2.20838e-14
1.84063e-14
1.6338e-14
1.61609e-14
1.47533e-14
1.4915e-14
1.21177e-14
1.14301e-14
1.00142e-14
8.30538e-15
7.04672e-15
6.47072e-15
6.70755e-15
7.59528e-15
8.40501e-15
9.23196e-15
1.15595e-14
1.63836e-14
2.05089e-14
2.28383e-14
2.64149e-14
2.77355e-14
3.21869e-14
3.61645e-14
3.95992e-14
4.85768e-14
6.38067e-14
7.98217e-14
1.18822e-13
1.99351e-13
4.25123e-13
1.07173e-12
2.70139e-12
1.18045e-11
2.54544e-11
1.61357e-11
6.38468e-12
4.56666e-12
4.60816e-12
4.84605e-12
5.45591e-12
5.95162e-12
6.89578e-12
7.87604e-12
8.43246e-12
1.0378e-11
1.07168e-11
1.04786e-11
1.0606e-11
8.85633e-12
8.04501e-12
7.19103e-12
5.19948e-12
3.70951e-12
2.40155e-12
1.33019e-12
7.63291e-13
4.4751e-13
5.68493e-13
3.37181e-13
1.32947e-13
5.62031e-14
2.05637e-14
6.36378e-15
1.49884e-15
3.01123e-16
5.65535e-17
9.32528e-18
1.35206e-18
1.37357e-19
1.68619e-20
1.6455e-21
1.24302e-22
1.03042e-23
6.27703e-25
3.7106e-26
1.42041e-27
3.89533e-29
6.58753e-31
5.99814e-33
2.8478e-35
6.92438e-38
9.2866e-41
7.28083e-44
3.36128e-47
1.27979e-50
5.35029e-54
9.55518e-57
7.36001e-59
4.95322e-61
2.50514e-63
9.47707e-66
2.67788e-68
5.73076e-71
9.55944e-74
1.21249e-76
1.08824e-79
6.44581e-83
2.29032e-86
3.92758e-90
1.4896e-94
2.80729e-35
1.5081e-31
2.19256e-28
1.4226e-25
4.42612e-23
7.61034e-21
9.05988e-19
5.0945e-17
4.29279e-16
1.6791e-15
9.40152e-15
1.01988e-14
1.07273e-14
8.69298e-15
5.26052e-15
2.84646e-15
1.28516e-15
4.69642e-16
1.61692e-16
4.83709e-17
1.36492e-17
3.51466e-18
8.07695e-19
1.423e-19
2.72469e-20
4.75382e-21
6.48541e-22
9.32453e-23
1.09312e-23
1.21933e-24
1.0572e-25
6.49218e-27
2.78012e-28
1.81744e-28
1.56086e-27
1.1622e-26
6.8855e-26
3.94241e-25
1.95823e-24
8.49498e-24
3.56346e-23
1.41575e-22
5.70626e-22
1.99597e-21
6.15742e-21
1.85347e-20
4.93087e-20
1.22055e-19
2.91654e-19
6.74307e-19
1.60332e-18
3.66731e-18
7.6971e-18
1.05933e-17
2.04135e-17
3.66412e-17
7.80571e-17
1.3008e-16
2.22083e-16
4.18279e-16
7.00849e-16
1.29649e-15
2.45252e-15
4.50574e-15
8.47304e-15
1.62713e-14
3.26849e-14
6.38839e-14
1.29711e-13
2.04504e-13
3.38431e-13
5.64898e-13
8.79181e-13
1.34142e-12
1.82007e-12
2.28121e-12
2.94106e-12
4.05657e-12
5.7677e-12
4.95849e-12
4.36294e-12
3.86082e-12
3.31226e-12
3.26089e-12
3.03938e-12
2.72666e-12
2.38657e-12
2.37044e-12
2.39898e-12
1.9714e-12
1.58741e-12
1.27945e-12
9.32937e-13
7.04324e-13
4.75799e-13
3.32865e-13
2.16148e-13
1.39027e-13
9.49947e-14
5.84736e-14
3.86083e-14
2.35206e-14
1.4531e-14
9.75295e-15
6.54032e-15
4.46742e-15
2.83586e-15
2.04878e-15
1.4957e-15
1.10379e-15
7.97949e-16
5.76151e-16
5.09337e-16
4.40869e-16
4.1805e-16
3.76904e-16
3.78317e-16
3.39772e-16
3.38141e-16
3.32642e-16
3.6111e-16
3.34889e-16
3.74566e-16
4.36478e-16
4.77561e-16
5.25826e-16
6.09715e-16
7.57884e-16
9.29122e-16
1.14466e-15
1.38101e-15
1.84878e-15
2.16499e-15
2.62469e-15
3.56484e-15
4.78461e-15
7.04315e-15
9.93966e-15
1.5513e-14
1.98439e-14
3.28112e-14
5.22465e-14
7.43769e-14
1.13862e-13
1.56997e-13
2.36036e-13
4.07822e-13
7.21504e-13
1.20277e-12
2.09455e-12
3.57393e-12
5.12583e-12
6.06567e-12
7.81375e-12
1.01181e-11
1.18898e-11
1.68102e-11
1.73213e-11
1.38166e-11
9.44556e-12
4.38052e-12
2.92035e-12
2.51832e-12
2.70054e-12
2.40318e-12
2.22844e-12
2.04485e-12
1.80323e-12
1.5081e-12
1.19876e-12
9.07375e-13
6.09605e-13
3.84194e-13
2.31783e-13
1.27744e-13
7.36305e-14
4.88396e-14
3.29716e-14
2.17256e-14
1.53628e-14
1.09168e-14
7.08259e-15
5.36715e-15
4.29328e-15
3.23136e-15
2.47907e-15
1.99134e-15
2.07506e-15
1.94717e-15
1.67467e-15
1.5245e-15
1.32925e-15
1.17029e-15
1.08127e-15
1.13603e-15
1.38377e-15
1.8037e-15
1.87245e-15
1.87364e-15
1.9161e-15
2.12076e-15
2.38202e-15
2.6871e-15
3.20954e-15
3.89405e-15
4.9799e-15
4.93374e-15
6.8635e-15
9.03113e-15
1.27016e-14
1.76298e-14
2.44908e-14
3.65609e-14
5.15816e-14
7.94704e-14
1.17523e-13
1.651e-13
2.12516e-13
2.28218e-13
2.6338e-13
3.65367e-13
5.76686e-13
7.25066e-13
1.29426e-12
2.0813e-12
2.57204e-12
3.60603e-12
5.60814e-12
8.44597e-12
1.16522e-11
9.90763e-12
6.77954e-12
5.46827e-12
4.57725e-12
4.11045e-12
4.05344e-12
3.58424e-12
3.21485e-12
2.86457e-12
2.7723e-12
2.50633e-12
2.04051e-12
1.60041e-12
1.16456e-12
8.36556e-13
6.0376e-13
4.64464e-13
3.30558e-13
2.53012e-13
1.76923e-13
1.31349e-13
8.64556e-14
5.87912e-14
3.27495e-14
1.94879e-14
1.03416e-14
6.53015e-15
4.98117e-15
4.13597e-15
3.89553e-15
3.36749e-15
3.31357e-15
2.54639e-15
2.2998e-15
1.88809e-15
1.49506e-15
1.15685e-15
1.07375e-15
1.099e-15
1.23448e-15
1.41973e-15
1.58577e-15
2.02664e-15
3.23114e-15
4.12953e-15
4.75524e-15
5.39085e-15
5.67796e-15
6.77671e-15
7.36123e-15
7.61887e-15
9.47463e-15
1.27895e-14
1.52738e-14
2.36478e-14
4.08303e-14
8.9224e-14
2.37667e-13
6.42315e-13
1.61132e-12
2.6775e-12
1.87295e-12
1.14747e-12
8.92547e-13
9.66821e-13
9.74779e-13
1.05465e-12
1.11861e-12
1.22599e-12
1.55313e-12
1.91101e-12
2.33208e-12
2.8359e-12
2.24976e-12
1.48421e-12
1.1052e-12
8.76981e-13
8.32933e-13
7.74507e-13
7.21929e-13
5.9148e-13
4.64843e-13
6.55874e-13
3.44588e-13
2.41808e-13
1.37009e-13
4.93702e-14
1.85136e-14
6.18653e-15
1.70832e-15
3.64042e-16
6.63349e-17
1.11899e-17
1.64643e-18
2.11476e-19
1.93741e-20
2.10615e-21
1.81645e-22
1.21488e-23
8.82116e-25
4.70876e-26
2.34418e-27
7.55364e-29
1.71649e-30
2.3505e-32
1.71172e-34
6.41493e-37
1.22184e-39
1.25195e-42
7.08964e-46
2.11821e-49
5.56218e-53
9.14482e-56
7.35794e-58
6.48102e-60
3.73047e-62
1.54969e-64
4.70445e-67
9.93779e-70
1.48671e-72
1.65155e-75
1.34922e-78
7.60131e-82
2.75301e-85
5.77691e-89
5.50106e-93
9.71415e-98
1.57316e-38
3.37571e-34
1.58826e-30
2.86488e-27
2.11866e-24
6.5273e-22
1.05237e-19
6.3349e-18
6.07263e-17
2.6851e-16
1.5669e-15
1.67947e-15
1.95367e-15
1.64783e-15
1.05138e-15
5.82084e-16
2.60101e-16
9.73599e-17
3.27409e-17
9.52932e-18
2.57145e-18
6.2667e-19
1.35419e-19
2.21492e-20
3.92076e-21
6.26648e-22
7.83943e-23
1.02311e-23
1.08321e-24
1.07465e-25
8.09374e-27
4.26087e-28
1.93048e-29
4.06905e-29
3.41171e-28
2.36459e-27
1.28532e-26
6.71177e-26
3.01486e-25
1.17423e-24
4.37985e-24
1.54737e-23
5.63932e-23
1.85022e-22
5.65817e-22
1.70397e-21
4.55199e-21
1.13435e-20
2.72434e-20
6.33166e-20
1.51334e-19
3.48834e-19
7.39188e-19
1.00514e-18
1.97865e-18
3.6232e-18
7.96969e-18
1.35295e-17
2.36896e-17
4.63245e-17
8.10715e-17
1.56884e-16
3.13452e-16
6.01334e-16
1.20548e-15
2.45683e-15
5.20514e-15
1.08027e-14
2.31229e-14
3.96026e-14
7.26711e-14
1.37048e-13
2.54688e-13
4.45803e-13
7.05509e-13
1.02877e-12
1.54571e-12
2.2187e-12
3.14818e-12
3.3375e-12
3.34179e-12
3.41494e-12
3.08901e-12
3.13113e-12
2.91537e-12
2.60524e-12
2.26788e-12
2.09497e-12
1.74748e-12
1.4066e-12
1.09789e-12
8.35329e-13
5.7536e-13
4.13396e-13
2.64194e-13
1.74769e-13
1.07688e-13
6.52194e-14
4.21415e-14
2.43251e-14
1.50308e-14
8.49947e-15
4.82399e-15
2.99911e-15
1.82998e-15
1.1365e-15
6.38645e-16
4.11527e-16
2.6214e-16
1.64378e-16
1.01922e-16
6.17874e-17
4.6274e-17
3.58691e-17
3.25744e-17
2.88392e-17
2.91601e-17
2.55777e-17
2.57045e-17
2.43219e-17
2.69508e-17
2.44479e-17
2.7789e-17
3.34965e-17
3.66239e-17
3.9245e-17
4.68309e-17
5.86516e-17
7.41513e-17
8.59209e-17
1.10161e-16
1.50151e-16
1.79226e-16
2.26303e-16
3.18796e-16
4.35616e-16
7.02614e-16
1.00406e-15
1.6454e-15
2.20156e-15
3.8136e-15
6.74441e-15
9.17412e-15
1.59131e-14
2.23762e-14
3.64491e-14
6.3557e-14
1.0175e-13
1.77505e-13
2.69841e-13
4.13834e-13
6.19944e-13
1.69325e-12
2.80816e-12
4.04618e-12
4.67642e-12
4.80516e-12
4.53474e-12
3.8648e-12
3.20649e-12
2.88604e-12
2.80233e-12
2.37433e-12
2.14273e-12
1.75633e-12
1.58358e-12
1.37906e-12
1.16741e-12
9.32358e-13
6.95957e-13
4.96815e-13
3.11609e-13
1.84137e-13
1.04324e-13
5.39463e-14
2.95402e-14
1.88392e-14
1.19244e-14
7.1966e-15
4.70057e-15
3.10059e-15
1.8117e-15
1.26119e-15
9.41176e-16
6.36707e-16
4.35534e-16
3.12894e-16
2.95564e-16
2.40311e-16
1.78894e-16
1.48758e-16
1.25072e-16
1.08248e-16
9.88531e-17
1.03567e-16
1.29406e-16
1.73897e-16
1.79568e-16
1.78875e-16
1.84009e-16
2.06185e-16
2.34112e-16
2.67015e-16
3.24996e-16
4.05159e-16
5.41761e-16
5.299e-16
7.71502e-16
1.05507e-15
1.54286e-15
2.21819e-15
3.13102e-15
5.00969e-15
7.39354e-15
1.20728e-14
1.91833e-14
2.81562e-14
4.04343e-14
4.24425e-14
3.57941e-14
5.86321e-14
7.9213e-14
1.42284e-13
4.27465e-13
8.76368e-13
1.34566e-12
1.77039e-12
2.50317e-12
3.42827e-12
4.56221e-12
5.04223e-12
5.0445e-12
4.58587e-12
4.33287e-12
3.98288e-12
3.9311e-12
3.46479e-12
3.09796e-12
2.73422e-12
2.34087e-12
1.8799e-12
1.43387e-12
1.04626e-12
7.08975e-13
4.78505e-13
3.25877e-13
2.39045e-13
1.62318e-13
1.18594e-13
7.87712e-14
5.57015e-14
3.44514e-14
2.19837e-14
1.10679e-14
6.02429e-15
2.82637e-15
1.59915e-15
1.08817e-15
8.20089e-16
7.17549e-16
5.67822e-16
5.2143e-16
3.57544e-16
2.8526e-16
2.01458e-16
1.38819e-16
9.42123e-17
9.02733e-17
8.80891e-17
9.99943e-17
1.20517e-16
1.37416e-16
1.79554e-16
3.27816e-16
4.24435e-16
5.10504e-16
5.6631e-16
5.90159e-16
7.39975e-16
7.49179e-16
7.11074e-16
9.25187e-16
1.19298e-15
1.34231e-15
2.22134e-15
3.51764e-15
7.85819e-15
2.11484e-14
4.98095e-14
1.1148e-13
1.634e-13
1.52073e-13
1.05217e-13
9.8395e-14
1.09145e-13
1.01837e-13
1.24124e-13
1.72558e-13
2.02946e-13
3.12105e-13
5.34648e-13
6.53115e-13
8.03136e-13
9.37958e-13
9.50382e-13
7.90063e-13
7.57426e-13
7.15008e-13
6.59943e-13
6.10609e-13
4.83903e-13
3.63699e-13
3.17091e-13
1.63042e-13
1.00165e-13
5.19268e-14
1.75551e-14
5.87468e-15
1.77698e-15
4.39338e-16
8.47308e-17
1.40986e-17
2.13467e-18
2.81425e-19
3.20795e-20
2.65103e-21
2.55626e-22
1.95011e-23
1.15687e-24
7.36256e-26
3.43635e-27
1.44284e-28
3.91688e-30
7.37571e-32
8.18025e-34
4.74623e-36
1.38802e-38
2.01124e-41
1.48693e-44
5.46682e-48
8.63264e-52
5.20375e-55
4.61943e-57
3.63137e-59
3.30618e-61
1.44546e-63
4.68016e-66
1.10287e-68
1.35562e-71
9.73652e-75
4.51289e-78
1.37908e-81
2.63477e-85
2.89742e-89
1.56804e-93
2.63713e-98
5.12366e-145
)
;
boundaryField
{
inlet
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value nonuniform List<scalar>
357
(
0
0
0
0
0
0
1.05237e-19
6.3349e-18
6.07263e-17
2.6851e-16
1.5669e-15
1.67947e-15
1.95367e-15
1.64783e-15
1.05138e-15
5.82084e-16
2.60101e-16
9.73599e-17
3.27409e-17
9.52932e-18
2.57145e-18
6.2667e-19
1.35419e-19
2.21492e-20
3.92076e-21
6.26648e-22
7.83943e-23
1.02311e-23
1.08321e-24
1.07465e-25
8.09374e-27
4.26087e-28
1.93048e-29
4.06905e-29
3.41171e-28
2.36459e-27
1.28532e-26
6.71177e-26
3.01486e-25
1.17423e-24
4.37985e-24
1.54737e-23
5.63932e-23
1.85022e-22
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3.41494e-12
3.08901e-12
3.13113e-12
2.91537e-12
2.60524e-12
2.26788e-12
2.09497e-12
1.74748e-12
1.4066e-12
1.09789e-12
8.35329e-13
5.7536e-13
4.13396e-13
2.64194e-13
1.74769e-13
1.07688e-13
6.52194e-14
4.21415e-14
2.43251e-14
1.50308e-14
8.49947e-15
4.82399e-15
2.99911e-15
1.82998e-15
1.1365e-15
6.38645e-16
4.11527e-16
2.6214e-16
1.64378e-16
1.01922e-16
6.17874e-17
4.6274e-17
3.58691e-17
3.25744e-17
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4.80516e-12
4.53474e-12
3.8648e-12
3.20649e-12
2.88604e-12
2.80233e-12
2.37433e-12
2.14273e-12
1.75633e-12
1.58358e-12
1.37906e-12
1.16741e-12
9.32358e-13
6.95957e-13
4.96815e-13
3.11609e-13
1.84137e-13
1.04324e-13
5.39463e-14
2.95402e-14
1.88392e-14
1.19244e-14
7.1966e-15
4.70057e-15
3.10059e-15
1.8117e-15
1.26119e-15
9.41176e-16
6.36707e-16
4.35534e-16
3.12894e-16
2.95564e-16
2.40311e-16
1.78894e-16
1.48758e-16
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5.0445e-12
4.58587e-12
4.33287e-12
3.98288e-12
3.9311e-12
3.46479e-12
3.09796e-12
2.73422e-12
2.34087e-12
1.8799e-12
1.43387e-12
1.04626e-12
7.08975e-13
4.78505e-13
3.25877e-13
2.39045e-13
1.62318e-13
1.18594e-13
7.87712e-14
5.57015e-14
3.44514e-14
2.19837e-14
1.10679e-14
6.02429e-15
2.82637e-15
1.59915e-15
1.08817e-15
8.20089e-16
7.17549e-16
5.67822e-16
5.2143e-16
3.57544e-16
2.8526e-16
2.01458e-16
1.38819e-16
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
7.57426e-13
7.15008e-13
6.59943e-13
6.10609e-13
4.83903e-13
3.63699e-13
3.17091e-13
1.63042e-13
1.00165e-13
5.19268e-14
1.75551e-14
5.87468e-15
1.77698e-15
4.39338e-16
8.47308e-17
1.40986e-17
2.13467e-18
2.81425e-19
3.20795e-20
2.65103e-21
2.55626e-22
1.95011e-23
1.15687e-24
7.36256e-26
3.43635e-27
1.44284e-28
3.91688e-30
7.37571e-32
8.18025e-34
4.74623e-36
1.38802e-38
2.01124e-41
1.48693e-44
5.46682e-48
8.63264e-52
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
)
;
}
frontBack
{
type empty;
}
}
// ************************************************************************* //
| [
"abenaz15@etudiant.mines-nantes.fr"
] | abenaz15@etudiant.mines-nantes.fr |
b93fbc46c3b0110a9c9f77a993f1548212983db9 | cea74570a5a2511e68e4ba968220cd4bbb13c516 | /OpenSauce/Halo1/Halo1_CE/Rasterizer/PostProcessing/Generic/Internal/c_settings_internal.hpp | 694153da314e29608225719f9382ae1333bc6979 | [] | no_license | Dwood15/OpenSauce_Upgrade | 80bbc88fbf34340323d28ccd03623a103a27e714 | d48cf4819ed371beb4f6e9426f8ab8bcd67fe2b3 | refs/heads/master | 2021-05-04T18:35:39.132266 | 2018-02-18T01:26:48 | 2018-02-18T01:26:48 | 120,191,658 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 966 | hpp | /*
Yelo: Open Sauce SDK
Halo 1 (CE) Edition
See license\OpenSauce\Halo1_CE for specific license information
*/
#pragma once
#if !PLATFORM_IS_DEDI
#include <YeloLib/configuration/c_configuration_container.hpp>
#include <YeloLib/configuration/c_configuration_value.hpp>
#include <YeloLib/open_sauce/settings/c_settings_singleton.hpp>
namespace Yelo
{
namespace Rasterizer { namespace PostProcessing { namespace Generic { namespace Internal
{
class c_settings_container
: public Configuration::c_configuration_container
{
public:
Configuration::c_configuration_value<bool> m_enabled;
c_settings_container();
protected:
const std::vector<Configuration::i_configuration_value* const> GetMembers() final override;
};
class c_settings_internal
: public Settings::c_settings_singleton<c_settings_container, c_settings_internal>
{
public:
void PostLoad() final override;
void PreSave() final override;
};
};};};};
};
#endif | [
"Dwood15@users.noreply.github.com"
] | Dwood15@users.noreply.github.com |
6ddade4947e1212886687abb152b039ac470f85a | 9d17289c97ca943856afd96375e458884d27848a | /addpol.cpp | 16fc0913c093abcd9525284135fdb2fb67487a81 | [] | no_license | pratik-a/DSA | 0b3022638443de8925005abb3c75ea8012e89649 | 94fdf4c11b77421ec7c355a56f799cff9b775ec6 | refs/heads/main | 2023-08-22T00:43:24.773070 | 2021-10-28T18:19:39 | 2021-10-28T18:19:39 | 340,961,805 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,029 | cpp | #include<iostream>
#include<conio.h>
using namespace std;
void insert(int pol[10],int n)
{
cout<<"\n\n******entering polynomial*****\n\n";
for(int i=0;i<=n;i++)
{
cout<<"enter the value for "<<i<<" degree \t ";
cin>>pol[i];
}
}
void add(int final[10],int pol1[10],int pol2[10],int n)
{
for(int i=0;i<=n;i++)
{
final[i]=pol1[i]+pol2[i];
}
}
void display(int final[10],int n)
{
cout<<"\n\n#####final result#####\n\n";
cout<<"\n\nequation is \t ";
for(int i=n;i>=0;i--)
{
if(final[i]!=0 && i!=0)
{
cout<<"("<<final[i]<<")"<<"x^"<<i<<" + ";
}
else if(i==0)
{
cout<<final[i];
}
}
}
int main()
{
int pol1[10]={0},pol2[10]={0},final[10],n1,n2,n;
cout<<"enter the degree for first polynomial add \t ";
cin>>n1;
insert(pol1,n1);
display(pol1,n1);
cout<<"\n\nenter the degree for secound polynomial add \t ";
cin>>n2;
insert(pol2,n2);
display(pol2,n2);
n=n1>n2?n1:n2;
add(final,pol1,pol2,n);
display(final,n);
getch();
return 0;
}
| [
"noreply@github.com"
] | noreply@github.com |
56daf29ab8cbf5eadd13f0759760da446a2c4334 | d9f0884408b993db4326560dda83a6482caf861e | /9656_Hearthstone_2/main.cpp | 7d7f9ca8a714af1293c778601ce6f84e03975213 | [] | no_license | skysaver00/C-Algorithm-2021 | 9feb0b9f73ac47f960d48e5e60db5e6a35e320e7 | 10e6f61b7c213a92ef5eecb43b1046ce3b2a277f | refs/heads/master | 2023-09-03T00:17:08.755999 | 2021-11-11T08:18:41 | 2021-11-11T08:18:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 170 | cpp | #include <stdio.h>
int main() {
int N;
scanf("%d", &N);
if(N % 2 == 1) {
printf("CY\n");
} else {
printf("SK\n");
}
return 0;
} | [
"skysaver00@naver.com"
] | skysaver00@naver.com |
cf6eec0e7212a30ba2bd0697bea828486e6f7613 | f8e19d35de29549ae3fcf84d53fdbc25c590ea51 | /bullet-2.81-rev2613/Demos/FluidSphHfDemo/FluidSphHfDemo.h | 5bc325d29dcea6448c69c721b6e6202fc2632578 | [
"Zlib"
] | permissive | rtrius/Bullet-FLUIDS | 7cd5aa14003724f6cd5c84acda4b0fae252a8412 | b58dbc5108512e5a4bb0a532284a98128fd8f8ce | refs/heads/master | 2016-09-07T18:55:31.688219 | 2014-06-04T03:08:09 | 2014-06-04T03:08:09 | 4,390,588 | 19 | 8 | null | null | null | null | UTF-8 | C++ | false | false | 2,991 | h | /*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
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.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef FLUID_SPH_HF_DEMO_H
#define FLUID_SPH_HF_DEMO_H
#ifdef _WINDOWS
#include "Win32DemoApplication.h"
#define PlatformDemoApplication Win32DemoApplication
#else
#include "GlutDemoApplication.h"
#define PlatformDemoApplication GlutDemoApplication
#endif
#include "LinearMath/btAlignedObjectArray.h"
//
#include "BulletFluids/Sph/btFluidSphSolver.h"
#include "BulletFluids/btFluidHfRigidCollisionConfiguration.h"
#include "BulletFluids/btFluidHfRigidDynamicsWorld.h"
#include "FluidSphHfInteraction.h"
class btCollisionShape;
class btBroadphaseInterface;
class btCollisionDispatcher;
class btConstraintSolver;
class btDefaultCollisionConfiguration;
class FluidSphHfDemo_GL_ShapeDrawer;
///Highly experimental demonstration of SPH and Heightfield fluid interaction
class FluidSphHfDemo : public PlatformDemoApplication
{
//Bullet
btAlignedObjectArray<btCollisionShape*> m_collisionShapes; //Keep the collision shapes, for deletion/cleanup
btBroadphaseInterface* m_broadphase;
btCollisionDispatcher* m_dispatcher;
btConstraintSolver* m_solver;
btDefaultCollisionConfiguration* m_collisionConfiguration;
//Fluid system
btFluidHfRigidDynamicsWorld* m_fluidWorld;
btFluidSph* m_fluidSph;
btFluidHf* m_fluidHf;
btFluidSphSolver* m_fluidSphSolver;
FluidSphHfInteractor m_sphHfInteractor;
//Rendering
FluidSphHfDemo_GL_ShapeDrawer* m_hfFluidShapeDrawer;
public:
FluidSphHfDemo();
virtual ~FluidSphHfDemo();
void initPhysics(); //Initialize Bullet/fluid system here
void exitPhysics(); //Deactivate Bullet/fluid system here
//
virtual void clientMoveAndDisplay(); //Simulation is updated/stepped here
virtual void displayCallback(); //Rendering occurs here
//
virtual void keyboardCallback(unsigned char key, int x, int y);
virtual void specialKeyboard(int key, int x, int y);
virtual void setShootBoxShape();
virtual void clientResetScene();
static DemoApplication* Create()
{
FluidSphHfDemo* demo = new FluidSphHfDemo;
demo->myinit();
return demo;
}
};
#endif //FLUID_SPH_HF_DEMO_H
| [
"rtrius@gmail.com"
] | rtrius@gmail.com |
6551c540ffb262e4d079db1a640a6203b7e9f417 | c1d3e3d6436c7c4b95b6df3e79b22309b5f06c46 | /src/view/src/ModelObserver.cpp | 7e3853403be5233e63c9f57ebb9b80ff17aebb27 | [] | no_license | 1028417/XMusic | 5fe5fbc0bcd58754a324c819aac8f21525c5b055 | f01603e427613c1cb8ed2a7ecb04d446ba78641c | refs/heads/master | 2021-06-13T22:31:28.861017 | 2021-05-13T12:06:59 | 2021-05-13T12:06:59 | 198,460,051 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,411 | cpp |
#include "stdafx.h"
#include "ModelObserver.h"
void CModelObserver::initView()
{
m_view.initView();
}
void CModelObserver::clearView()
{
m_view.clearView();
}
void CModelObserver::refreshMedia()
{
CMediaResPanel::RefreshMediaResPanel();
if (m_view.m_PlayItemPage)
{
m_view.m_PlayItemPage.ShowPlaylist(m_view.m_PlayItemPage.m_pPlaylist, false);
}
if (m_view.m_AlbumPage)
{
m_view.m_AlbumPage.RefreshAlbum();
}
m_view.m_PlayingPage.RefreshList();
}
bool CModelObserver::renameMedia(IMedia& media, cwstr strNewName)
{
return m_view.getController().renameMedia(media, strNewName);
}
void CModelObserver::onPlayingListUpdated(int nPlayingItem, bool bSetActive)
{
if (!m_view.getPlaylistMgr().playinglist().playItems())
{
CPlaySpirit::inst()->clear();
}
m_view.m_PlayingPage.RefreshList(nPlayingItem);
if (bSetActive)
{
m_view.m_PlayingPage.Active(false);
}
}
void CModelObserver::onPlay(UINT uPlayingItem, CPlayItem& PlayItem, CMedia*, CMediaRes*, bool bManual)
{
m_view.m_PlayingPage.m_wndList.onPlay(uPlayingItem, bManual);
m_view.m_PlayCtrl.onPlay(PlayItem);
}
void CModelObserver::onPlayStop(bool bOpenSuccess, bool bPlayFinish)
{
m_view.m_PlayCtrl.onPlayStop(bOpenSuccess, bPlayFinish);
}
UINT CModelObserver::GetSingerImgPos(UINT uSingerID)
{
return m_view.m_ImgMgr.getSingerImgPos(uSingerID);
}
| [
"1028418@qq.com"
] | 1028418@qq.com |
38843d393bc6d6a2da898d90f85eeb8d9211cc87 | c91ba4e746dc5b8f2dface963b4096dd721070fd | /ecs/src/model/DescribeSnapshotPackageResult.cc | 8edbb540496f6a1a485f464e5141599a57222cd4 | [
"Apache-2.0"
] | permissive | IthacaDream/aliyun-openapi-cpp-sdk | fa9120604ca3af4fc48a5f9bf70ff10542103c3a | 31a064d1568f59e0731485a1b0452cfd5d767e42 | refs/heads/master | 2021-09-05T09:44:19.244166 | 2018-01-26T07:00:14 | 2018-01-26T07:00:14 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,517 | cc | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ecs/model/DescribeSnapshotPackageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ecs;
using namespace AlibabaCloud::Ecs::Model;
DescribeSnapshotPackageResult::DescribeSnapshotPackageResult() :
ServiceResult()
{}
DescribeSnapshotPackageResult::DescribeSnapshotPackageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeSnapshotPackageResult::~DescribeSnapshotPackageResult()
{}
void DescribeSnapshotPackageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSnapshotPackages = value["SnapshotPackages"]["SnapshotPackage"];
for (auto value : allSnapshotPackages)
{
SnapshotPackage snapshotPackageObject;
snapshotPackageObject.startTime = value["StartTime"].asString();
snapshotPackageObject.endTime = value["EndTime"].asString();
snapshotPackageObject.initCapacity = std::stol(value["InitCapacity"].asString());
snapshotPackageObject.displayName = value["DisplayName"].asString();
snapshotPackages_.push_back(snapshotPackageObject);
}
totalCount_ = std::stoi(value["TotalCount"].asString());
pageNumber_ = std::stoi(value["PageNumber"].asString());
pageSize_ = std::stoi(value["PageSize"].asString());
}
int DescribeSnapshotPackageResult::getTotalCount()const
{
return totalCount_;
}
void DescribeSnapshotPackageResult::setTotalCount(int totalCount)
{
totalCount_ = totalCount;
}
int DescribeSnapshotPackageResult::getPageSize()const
{
return pageSize_;
}
void DescribeSnapshotPackageResult::setPageSize(int pageSize)
{
pageSize_ = pageSize;
}
int DescribeSnapshotPackageResult::getPageNumber()const
{
return pageNumber_;
}
void DescribeSnapshotPackageResult::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
}
| [
"haowei.yao@alibaba-inc.com"
] | haowei.yao@alibaba-inc.com |
39110ddce22a005dc0c7db2587f108e17fa95ab4 | 190219e4aca487f7c65de81484b993b362825131 | /v2/external/llvm-2.8/include/llvm/IntrinsicInst.h | a17fa9cc5bdd4236ce202aa1f7f49d3739c52e45 | [
"NCSA",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | dilawar/ahir | b6a56ed5c61f121c09ef6636d7dd2752d97529b5 | 9c5592a4df7a47b9c1e406778cc7c17316bcfb4e | refs/heads/master | 2021-07-14T18:04:20.484255 | 2020-07-26T20:18:34 | 2020-07-26T20:18:34 | 184,123,680 | 1 | 0 | NOASSERTION | 2019-04-29T18:34:26 | 2019-04-29T18:34:26 | null | UTF-8 | C++ | false | false | 11,511 | h | //===-- llvm/IntrinsicInst.h - Intrinsic Instruction Wrappers ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines classes that make it really easy to deal with intrinsic
// functions with the isa/dyncast family of functions. In particular, this
// allows you to do things like:
//
// if (MemCpyInst *MCI = dyn_cast<MemCpyInst>(Inst))
// ... MCI->getDest() ... MCI->getSource() ...
//
// All intrinsic function calls are instances of the call instruction, so these
// are all subclasses of the CallInst class. Note that none of these classes
// has state or virtual methods, which is an important part of this gross/neat
// hack working.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_INTRINSICINST_H
#define LLVM_INTRINSICINST_H
#include "llvm/Constants.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
namespace llvm {
/// IntrinsicInst - A useful wrapper class for inspecting calls to intrinsic
/// functions. This allows the standard isa/dyncast/cast functionality to
/// work with calls to intrinsic functions.
class IntrinsicInst : public CallInst {
IntrinsicInst(); // DO NOT IMPLEMENT
IntrinsicInst(const IntrinsicInst&); // DO NOT IMPLEMENT
void operator=(const IntrinsicInst&); // DO NOT IMPLEMENT
public:
/// getIntrinsicID - Return the intrinsic ID of this intrinsic.
///
Intrinsic::ID getIntrinsicID() const {
return (Intrinsic::ID)getCalledFunction()->getIntrinsicID();
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *) { return true; }
static inline bool classof(const CallInst *I) {
if (const Function *CF = I->getCalledFunction())
return CF->getIntrinsicID() != 0;
return false;
}
static inline bool classof(const Value *V) {
return isa<CallInst>(V) && classof(cast<CallInst>(V));
}
};
/// DbgInfoIntrinsic - This is the common base class for debug info intrinsics
///
class DbgInfoIntrinsic : public IntrinsicInst {
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const DbgInfoIntrinsic *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
switch (I->getIntrinsicID()) {
case Intrinsic::dbg_declare:
case Intrinsic::dbg_value:
return true;
default: return false;
}
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
static Value *StripCast(Value *C);
};
/// DbgDeclareInst - This represents the llvm.dbg.declare instruction.
///
class DbgDeclareInst : public DbgInfoIntrinsic {
public:
Value *getAddress() const;
MDNode *getVariable() const { return cast<MDNode>(getArgOperand(1)); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const DbgDeclareInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::dbg_declare;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// DbgValueInst - This represents the llvm.dbg.value instruction.
///
class DbgValueInst : public DbgInfoIntrinsic {
public:
const Value *getValue() const;
Value *getValue();
uint64_t getOffset() const {
return cast<ConstantInt>(
const_cast<Value*>(getArgOperand(1)))->getZExtValue();
}
MDNode *getVariable() const { return cast<MDNode>(getArgOperand(2)); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const DbgValueInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::dbg_value;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// MemIntrinsic - This is the common base class for memset/memcpy/memmove.
///
class MemIntrinsic : public IntrinsicInst {
public:
Value *getRawDest() const { return const_cast<Value*>(getArgOperand(0)); }
Value *getLength() const { return const_cast<Value*>(getArgOperand(2)); }
ConstantInt *getAlignmentCst() const {
return cast<ConstantInt>(const_cast<Value*>(getArgOperand(3)));
}
unsigned getAlignment() const {
return getAlignmentCst()->getZExtValue();
}
ConstantInt *getVolatileCst() const {
return cast<ConstantInt>(const_cast<Value*>(getArgOperand(4)));
}
bool isVolatile() const {
return !getVolatileCst()->isZero();
}
/// getDest - This is just like getRawDest, but it strips off any cast
/// instructions that feed it, giving the original input. The returned
/// value is guaranteed to be a pointer.
Value *getDest() const { return getRawDest()->stripPointerCasts(); }
/// set* - Set the specified arguments of the instruction.
///
void setDest(Value *Ptr) {
assert(getRawDest()->getType() == Ptr->getType() &&
"setDest called with pointer of wrong type!");
setArgOperand(0, Ptr);
}
void setLength(Value *L) {
assert(getLength()->getType() == L->getType() &&
"setLength called with value of wrong type!");
setArgOperand(2, L);
}
void setAlignment(Constant* A) {
setArgOperand(3, A);
}
void setVolatile(Constant* V) {
setArgOperand(4, V);
}
const Type *getAlignmentType() const {
return getArgOperand(3)->getType();
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemIntrinsic *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
switch (I->getIntrinsicID()) {
case Intrinsic::memcpy:
case Intrinsic::memmove:
case Intrinsic::memset:
return true;
default: return false;
}
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// MemSetInst - This class wraps the llvm.memset intrinsic.
///
class MemSetInst : public MemIntrinsic {
public:
/// get* - Return the arguments to the instruction.
///
Value *getValue() const { return const_cast<Value*>(getArgOperand(1)); }
void setValue(Value *Val) {
assert(getValue()->getType() == Val->getType() &&
"setValue called with value of wrong type!");
setArgOperand(1, Val);
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemSetInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memset;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// MemTransferInst - This class wraps the llvm.memcpy/memmove intrinsics.
///
class MemTransferInst : public MemIntrinsic {
public:
/// get* - Return the arguments to the instruction.
///
Value *getRawSource() const { return const_cast<Value*>(getArgOperand(1)); }
/// getSource - This is just like getRawSource, but it strips off any cast
/// instructions that feed it, giving the original input. The returned
/// value is guaranteed to be a pointer.
Value *getSource() const { return getRawSource()->stripPointerCasts(); }
void setSource(Value *Ptr) {
assert(getRawSource()->getType() == Ptr->getType() &&
"setSource called with pointer of wrong type!");
setArgOperand(1, Ptr);
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemTransferInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memcpy ||
I->getIntrinsicID() == Intrinsic::memmove;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// MemCpyInst - This class wraps the llvm.memcpy intrinsic.
///
class MemCpyInst : public MemTransferInst {
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemCpyInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memcpy;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// MemMoveInst - This class wraps the llvm.memmove intrinsic.
///
class MemMoveInst : public MemTransferInst {
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemMoveInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memmove;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// EHExceptionInst - This represents the llvm.eh.exception instruction.
///
class EHExceptionInst : public IntrinsicInst {
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const EHExceptionInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::eh_exception;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// EHSelectorInst - This represents the llvm.eh.selector instruction.
///
class EHSelectorInst : public IntrinsicInst {
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const EHSelectorInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::eh_selector;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
/// MemoryUseIntrinsic - This is the common base class for the memory use
/// marker intrinsics.
///
class MemoryUseIntrinsic : public IntrinsicInst {
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemoryUseIntrinsic *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
switch (I->getIntrinsicID()) {
case Intrinsic::lifetime_start:
case Intrinsic::lifetime_end:
case Intrinsic::invariant_start:
case Intrinsic::invariant_end:
return true;
default: return false;
}
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
}
#endif
| [
"dilawars@ncbs.res.in"
] | dilawars@ncbs.res.in |
93b32aa1b5a341c58c92fa4b5aa6e6197c56cdd1 | d91272f7ce1549b1e08f4d7dd05ecc2ce85bab96 | /507/A.cpp | e1f6e6e5287528e04ea58d97204253cb92537c24 | [] | no_license | Ar-Sibi/Competitive-Programming | 81672229d870763292b2e010b62b899952bdc6dc | df4ed257140909755d8b639649e19c325f4619f6 | refs/heads/master | 2022-04-16T13:31:26.989506 | 2020-04-12T16:24:46 | 2020-04-12T16:24:46 | 159,475,953 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 645 | cpp | #include<bits/stdc++.h>
#include<unordered_map>
using namespace std;
bool comp(pair<int,int> a,pair<int,int>b){
return a.second<b.second;
}
int main(){
cin.tie(NULL);
ios_base::sync_with_stdio(false);
int n,instruments;
cin>>n;
cin>>instruments;
vector<pair<int,int> > time(n);
for(int i=0;i<n;i++){
cin>>time[i].second;
time[i].first=i;
}
sort(time.begin(),time.end(),comp);
int rqdtime=0;
int count=0;
for(int i=0;i<n;i++){
if(rqdtime+time[i].second<=instruments){
count++;
rqdtime+=time[i].second;
}else{
break;
}
}
cout<<count<<endl;
for(int i=0;i<count;i++){
cout<<time[i].first+1<<" ";
}
return 0;
}
| [
"getgoingwithsibi@gmail.com"
] | getgoingwithsibi@gmail.com |
4ca30a5894461c208b8120c260680e0b81aad7f1 | 48d4de83d911acabbe6935fe6fdedac244ba38ea | /SDK/PUBG_MessageHudWidget_parameters.hpp | f4dbb22393046ac4743935cb9f98649efea073c3 | [] | no_license | yuaom/PUBG-SDK-1 | af9c18e7d69a05074d4e6596f5f6ac1761192e7d | 5958d6039aabe8a42d40c2f6a6978af0fffcb87b | refs/heads/master | 2023-06-10T12:42:33.106376 | 2018-02-24T04:38:15 | 2018-02-24T04:38:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,722 | hpp | #pragma once
// PLAYERUNKNOWN'S BATTLEGROUNDS (3.6.13.14) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace Classes
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
// Function MessageHudWidget.MessageHudWidget_C.Icon_DisplayKilledMessage
struct UMessageHudWidget_C_Icon_DisplayKilledMessage_Params
{
struct FDeathMessage Input; // (Parm)
};
// Function MessageHudWidget.MessageHudWidget_C.Normal_DisplayKilledMessage
struct UMessageHudWidget_C_Normal_DisplayKilledMessage_Params
{
struct FDeathMessage InputPin; // (Parm)
};
// Function MessageHudWidget.MessageHudWidget_C.CreateGamePlayMessage
struct UMessageHudWidget_C_CreateGamePlayMessage_Params
{
struct FText Message; // (Parm)
TEnumAsByte<ETextJustify> TextAlignment; // (Parm, ZeroConstructor, IsPlainOldData)
int TextSize; // (Parm, ZeroConstructor, IsPlainOldData)
float Duration; // (Parm, ZeroConstructor, IsPlainOldData)
bool bUseFade_In; // (Parm, ZeroConstructor, IsPlainOldData)
class UAkAudioEvent* Sound; // (Parm, ZeroConstructor, IsPlainOldData)
class UNewSystemMessageWidget_C* MessageWidget; // (Parm, OutParm, ZeroConstructor, IsPlainOldData)
};
// Function MessageHudWidget.MessageHudWidget_C.OnDisplayMessage
struct UMessageHudWidget_C_OnDisplayMessage_Params
{
ESystemMessageType MessageType; // (Parm, ZeroConstructor, IsPlainOldData)
struct FText Message; // (Parm)
float Duration; // (Parm, ZeroConstructor, IsPlainOldData)
class UAkAudioEvent* Sound; // (Parm, ZeroConstructor, IsPlainOldData)
};
// Function MessageHudWidget.MessageHudWidget_C.CreateKillMessage
struct UMessageHudWidget_C_CreateKillMessage_Params
{
struct FDeathMessage DeathMessage; // (Parm)
TEnumAsByte<ETextJustify> TextAlignment; // (Parm, ZeroConstructor, IsPlainOldData)
struct FSlateColor TextColor; // (Parm)
int TextSize; // (Parm, ZeroConstructor, IsPlainOldData)
float Duration; // (Parm, ZeroConstructor, IsPlainOldData)
bool bUseFade_In; // (Parm, ZeroConstructor, IsPlainOldData)
bool bShowMyKillCount; // (Parm, ZeroConstructor, IsPlainOldData)
bool bUseMessagePool; // (Parm, ZeroConstructor, IsPlainOldData)
class UNewSystemMessageWidget_C* MessageWidget; // (Parm, OutParm, ZeroConstructor, IsPlainOldData)
};
// Function MessageHudWidget.MessageHudWidget_C.CreateSystemMessage
struct UMessageHudWidget_C_CreateSystemMessage_Params
{
struct FText Message; // (Parm)
TEnumAsByte<ETextJustify> TextAlignment; // (Parm, ZeroConstructor, IsPlainOldData)
struct FSlateColor TextColor; // (Parm)
int TextSize; // (Parm, ZeroConstructor, IsPlainOldData)
float Duration; // (Parm, ZeroConstructor, IsPlainOldData)
bool bUseFade_In; // (Parm, ZeroConstructor, IsPlainOldData)
class UAkAudioEvent* Sound; // (Parm, ZeroConstructor, IsPlainOldData)
class UNewSystemMessageWidget_C* MessageWidget; // (Parm, OutParm, ZeroConstructor, IsPlainOldData)
};
// Function MessageHudWidget.MessageHudWidget_C.OnDisplayKilledMessage
struct UMessageHudWidget_C_OnDisplayKilledMessage_Params
{
struct FDeathMessage DeathMessage; // (Parm)
};
// Function MessageHudWidget.MessageHudWidget_C.OnDisplaySystemMessage
struct UMessageHudWidget_C_OnDisplaySystemMessage_Params
{
ESystemMessageType MessageType; // (Parm, ZeroConstructor, IsPlainOldData)
struct FText Message; // (Parm)
};
// Function MessageHudWidget.MessageHudWidget_C.InitializeMessageHUD
struct UMessageHudWidget_C_InitializeMessageHUD_Params
{
};
// Function MessageHudWidget.MessageHudWidget_C.Construct
struct UMessageHudWidget_C_Construct_Params
{
};
// Function MessageHudWidget.MessageHudWidget_C.ExecuteUbergraph_MessageHudWidget
struct UMessageHudWidget_C_ExecuteUbergraph_MessageHudWidget_Params
{
int EntryPoint; // (Parm, ZeroConstructor, IsPlainOldData)
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"mtz007@x.y.z"
] | mtz007@x.y.z |
1e9781a543c87a2acf8880afb208f9a27c0dec3d | cb935877e687042fa3bdc6a861038648fa3c3053 | /WowDungeon/EnvironmentStateMachine.cpp | 1ec6f5f4fa777d1c87c9dd79abbe8f1c4a0886c7 | [] | no_license | dseftu/WowDungeon | 545b7efdb2341626d8ee8b311c4a5af3a4eef527 | bbad71dbf94ffda12897eff68907d59298334d67 | refs/heads/master | 2021-05-15T10:39:49.131416 | 2017-11-07T00:18:39 | 2017-11-07T00:18:39 | 108,195,238 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,559 | cpp | #pragma once
#include "pch.h"
#include "EnvironmentStateMachine.h"
namespace WowDungeon
{
EnvironmentStateMachine::EnvironmentStateMachine(shared_ptr<Blackboard> blackboard)
{
mBlackboard = blackboard;
SetCommandString(mBlackboard->GetCommandString());
Initialize();
}
void EnvironmentStateMachine::Initialize()
{
// command must be set
assert(mCommand != nullptr);
// create the predefined conditions
shared_ptr<Condition> ConditionGoNorth = make_shared<StringEqualityCondition>(make_shared<string>("north"), mCommand);
shared_ptr<Condition> ConditionGoSouth = make_shared<StringEqualityCondition>(make_shared<string>("south"), mCommand);
shared_ptr<Condition> ConditionGoEast = make_shared<StringEqualityCondition>(make_shared<string>("east"), mCommand);
shared_ptr<Condition> ConditionGoWest = make_shared<StringEqualityCondition>(make_shared<string>("west"), mCommand);
// create some enter and exit transitions
auto enterRoom1 = make_shared<DisplayTextAction>("The room you are standing in is barren.\nYou see a door to the north and the south.");
auto enterRoom2 = make_shared<DisplayTextAction>("You stumble into the next room. There are torches on the walls illuminating the room.\nYou see a door to the west, east, and the south.");
auto enterRoom3 = make_shared<DisplayTextAction>("You enter the room and realize this was a dead end. On the bright side, there is a small window in here. It looks nice outside, exactly where you aren't. Oh well.\nYou see a door to the west.");
auto enterRoom4 = make_shared<DisplayTextAction>("Entering the room, you notice an elaborate tapastry adorning the west wall. It seems to be depicting a great battle, presumably one that the previous owner participated in. You recognize the colors of the armies on the field as those of the neighboring kingdom. This probably would be very interesting to someone who gets excited over putting rugs on the wall.\nYou see a door to the east and the south.");
auto enterRoom5 = make_shared<DisplayTextAction>("You notice a large chandeler in the middle of this hallway. It is adorned with several very large rubys.\nYou see a door to the north and the south");
auto enterRoom6 = make_shared<DisplayTextAction>("The corner of this room has a small, damaged chair. You don't dare sit on it.\nYou see a door to the north and to the east.");
auto enterRoom7 = make_shared<DisplayTextAction>("You enter a room with three doors.\nYou see a door to the west, north, and east.");
auto enterRoom8 = make_shared<DisplayTextAction>("This room is brighter than the rest. You think you might be close to an exit.\nYou see a door to the west and the south.");
auto enterRoom9 = make_shared<DisplayTextAction>("At last you see the exit!\nYou see a door to the north and the dungeon exit to the south.");
auto exitRoom = make_shared<DisplayTextAction>("\nYou leave the room.\n");
// good intentions, didn't have time.
/*
auto invalidMove1 = make_shared<DisplayTextAction>("You bounce against the wall. This doesn't seem to be your day.");
auto invalidMove2 = make_shared<DisplayTextAction>("You triumphantly attempt to walk through a wall. This does not go well.");
auto invalidMove3 = make_shared<DisplayTextAction>("You start to concentrate, and attempt to create a hole in the wall with your mind powers. Unfortunately, you do not have mind powers.");
auto invalidMove4 = make_shared<DisplayTextAction>("You search around the wall for a hidden lever. You don't find any.");
auto invalidMove5 = make_shared<DisplayTextAction>("Hitting your head against the wall doesn't seem to help anything.");
auto invalidMove6 = make_shared<DisplayTextAction>("You attempt to open the wall like a door. It opens exactly the way that doors don't.");
auto invalidMoves = make_shared<RandomAction>();
invalidMoves->AddAction(invalidMove1);
invalidMoves->AddAction(invalidMove2);
invalidMoves->AddAction(invalidMove3);
invalidMoves->AddAction(invalidMove4);
invalidMoves->AddAction(invalidMove5);
invalidMoves->AddAction(invalidMove6);
*/
auto emptyText = make_shared<DisplayTextAction>("");
auto leaveDungeon = make_shared<DisplayTextAction>("You have successfully escaped the dungeon!");
auto endGame = make_shared<EndGameAction>(mBlackboard);
auto endGameActions = make_shared<ActionList>();
endGameActions->AddAction(leaveDungeon);
endGameActions->AddAction(endGame);
// create some states
shared_ptr<State> room1 = make_shared<State>("Room1", enterRoom1, exitRoom);
shared_ptr<State> room2 = make_shared<State>("Room2", enterRoom2, exitRoom);
shared_ptr<State> room3 = make_shared<State>("Room3", enterRoom3, exitRoom);
shared_ptr<State> room4 = make_shared<State>("Room4", enterRoom4, exitRoom);
shared_ptr<State> room5 = make_shared<State>("Room5", enterRoom5, exitRoom);
shared_ptr<State> room6 = make_shared<State>("Room6", enterRoom6, exitRoom);
shared_ptr<State> room7 = make_shared<State>("Room7", enterRoom7, exitRoom);
shared_ptr<State> room8 = make_shared<State>("Room8", enterRoom8, exitRoom);
shared_ptr<State> room9 = make_shared<State>("Room9", enterRoom9, exitRoom);
shared_ptr<State> lastRoom = make_shared<State>("LastRoom", endGameActions, emptyText);
// add transitions
auto room1to2 = make_shared<Transition>(ConditionGoNorth, room2);
auto room1to7 = make_shared<Transition>(ConditionGoSouth, room7);
room1->AddTransition(room1to2);
room1->AddTransition(room1to7);
auto room2to1 = make_shared<Transition>(ConditionGoSouth, room1);
auto room2to3 = make_shared<Transition>(ConditionGoEast, room3);
auto room2to4 = make_shared<Transition>(ConditionGoWest, room4);
room2->AddTransition(room2to1);
room2->AddTransition(room2to3);
room2->AddTransition(room2to4);
auto room3to2 = make_shared<Transition>(ConditionGoWest, room2);
room3->AddTransition(room3to2);
auto room4to2 = make_shared<Transition>(ConditionGoEast, room2);
auto room4to5 = make_shared<Transition>(ConditionGoSouth, room5);
room4->AddTransition(room4to2);
room4->AddTransition(room4to5);
auto room5to4 = make_shared<Transition>(ConditionGoNorth, room4);
auto room5to6 = make_shared<Transition>(ConditionGoSouth, room6);
room5->AddTransition(room5to4);
room5->AddTransition(room5to6);
auto room6to5 = make_shared<Transition>(ConditionGoNorth, room5);
auto room6to7 = make_shared<Transition>(ConditionGoEast, room7);
room6->AddTransition(room6to5);
room6->AddTransition(room6to7);
auto room7to6 = make_shared<Transition>(ConditionGoWest, room6);
auto room7to1 = make_shared<Transition>(ConditionGoNorth, room1);
auto room7to8 = make_shared<Transition>(ConditionGoEast, room8);
room7->AddTransition(room7to6);
room7->AddTransition(room7to1);
room7->AddTransition(room7to8);
auto room8to7 = make_shared<Transition>(ConditionGoWest, room7);
auto room8to9 = make_shared<Transition>(ConditionGoSouth, room9);
room8->AddTransition(room8to7);
room8->AddTransition(room8to9);
auto room9to8 = make_shared<Transition>(ConditionGoNorth, room8);
auto room9toExit = make_shared<Transition>(ConditionGoSouth, lastRoom);
room9->AddTransition(room9to8);
room9->AddTransition(room9toExit);
AddState(room1);
AddState(room2);
AddState(room3);
AddState(room4);
AddState(room5);
AddState(room6);
AddState(room7);
AddState(room8);
AddState(room9);
SetCurrentState(room1);
room1->Enter();
}
const string EnvironmentStateMachine::GetPlayerCurrentRoom()
{
return CurrentState()->Name();
}
} | [
"dseftu@gmail.com"
] | dseftu@gmail.com |
4f66495159e98e000e46f86d52e433551c6b3ddf | 1fb01e7a9bea4fda55d00d728bdccf647cddbf32 | /Source/SignalR/Private/NegotiationResponse.h | eee34c266865d7f0337b30574d148dc5b408baef | [] | no_license | highlyunavailable/Unreal-SignalR | a91e962d2bda43d8125a00307d6fbe4f731ecaaa | bb33bf8380948826275e71b5f6633ff6ac086590 | refs/heads/master | 2022-04-13T17:17:04.340259 | 2020-03-26T22:40:26 | 2020-03-26T22:40:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 580 | h | #pragma once
#include "CoreMinimal.h"
#include "NegotiationResponse.generated.h"
USTRUCT()
struct FNegotiationTransport
{
GENERATED_BODY()
public:
UPROPERTY()
FString Transport;
UPROPERTY()
TArray<FString> TransferFormats;
};
USTRUCT()
struct FNegotiationResponse
{
GENERATED_BODY()
public:
UPROPERTY()
int32 NegotiateVersion;
UPROPERTY()
FString ConnectionId;
UPROPERTY()
FString ConnectionToken;
UPROPERTY()
FString Url;
UPROPERTY()
FString AccessToken;
UPROPERTY()
FString Error;
UPROPERTY()
TArray<FNegotiationTransport> AvailableTransports;
};
| [
"intelligide@hotmail.fr"
] | intelligide@hotmail.fr |
3c906280ca2cb290654860d7acd447f1a35d5d6b | 82195c2a1fce4ec92bc843c815bf06f7bd9c782a | /src/qt/bitcoingui.cpp | d2ae52166ca3bb920b5ae7dafd96bc2ef68be2cb | [
"MIT"
] | permissive | cashgoldcoin/cashgoldcoin | 9ca2947ff000451182478afeb0726ebd07cdc274 | ec774b51a09379d2b9d16aaca6edc7e3661a64ab | refs/heads/master | 2020-04-06T07:21:11.480655 | 2018-11-12T20:55:19 | 2018-11-12T20:55:19 | 155,448,765 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 45,344 | cpp | // Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
#endif
#include "bitcoingui.h"
#include "bitcoinunits.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "modaloverlay.h"
#include "networkstyle.h"
#include "notificator.h"
#include "openuridialog.h"
#include "optionsdialog.h"
#include "optionsmodel.h"
#include "platformstyle.h"
#include "rpcconsole.h"
#include "utilitydialog.h"
#ifdef ENABLE_WALLET
#include "walletframe.h"
#include "walletmodel.h"
#endif // ENABLE_WALLET
#ifdef Q_OS_MAC
#include "macdockiconhandler.h"
#endif
#include "chainparams.h"
#include "init.h"
#include "ui_interface.h"
#include "util.h"
#include <iostream>
#include <QAction>
#include <QApplication>
#include <QDateTime>
#include <QDesktopWidget>
#include <QDragEnterEvent>
#include <QListWidget>
#include <QMenuBar>
#include <QMessageBox>
#include <QMimeData>
#include <QProgressDialog>
#include <QSettings>
#include <QShortcut>
#include <QStackedWidget>
#include <QStatusBar>
#include <QStyle>
#include <QTimer>
#include <QToolBar>
#include <QVBoxLayout>
#if QT_VERSION < 0x050000
#include <QTextDocument>
#include <QUrl>
#else
#include <QUrlQuery>
#endif
const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
#if defined(Q_OS_MAC)
"macosx"
#elif defined(Q_OS_WIN)
"windows"
#else
"other"
#endif
;
/** Display name for default wallet name. Uses tilde to avoid name
* collisions in the future with additional wallets */
const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *networkStyle, QWidget *parent) :
QMainWindow(parent),
enableWallet(false),
clientModel(0),
walletFrame(0),
unitDisplayControl(0),
labelWalletEncryptionIcon(0),
labelWalletHDStatusIcon(0),
connectionsControl(0),
labelBlocksIcon(0),
progressBarLabel(0),
progressBar(0),
progressDialog(0),
appMenuBar(0),
overviewAction(0),
historyAction(0),
quitAction(0),
sendCoinsAction(0),
sendCoinsMenuAction(0),
usedSendingAddressesAction(0),
usedReceivingAddressesAction(0),
signMessageAction(0),
verifyMessageAction(0),
aboutAction(0),
receiveCoinsAction(0),
receiveCoinsMenuAction(0),
optionsAction(0),
toggleHideAction(0),
encryptWalletAction(0),
backupWalletAction(0),
changePassphraseAction(0),
aboutQtAction(0),
openRPCConsoleAction(0),
openAction(0),
showHelpMessageAction(0),
trayIcon(0),
trayIconMenu(0),
notificator(0),
rpcConsole(0),
helpMessageDialog(0),
modalOverlay(0),
prevBlocks(0),
spinnerFrame(0),
platformStyle(_platformStyle)
{
QSettings settings;
if (!restoreGeometry(settings.value("MainWindowGeometry").toByteArray())) {
// Restore failed (perhaps missing setting), center the window
move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
}
QString windowTitle = tr(PACKAGE_NAME) + " - ";
#ifdef ENABLE_WALLET
enableWallet = WalletModel::isWalletEnabled();
#endif // ENABLE_WALLET
if(enableWallet)
{
windowTitle += tr("Wallet");
} else {
windowTitle += tr("Node");
}
windowTitle += " " + networkStyle->getTitleAddText();
#ifndef Q_OS_MAC
QApplication::setWindowIcon(networkStyle->getTrayAndWindowIcon());
setWindowIcon(networkStyle->getTrayAndWindowIcon());
#else
MacDockIconHandler::instance()->setIcon(networkStyle->getAppIcon());
#endif
setWindowTitle(windowTitle);
#if defined(Q_OS_MAC) && QT_VERSION < 0x050000
// This property is not implemented in Qt 5. Setting it has no effect.
// A replacement API (QtMacUnifiedToolBar) is available in QtMacExtras.
setUnifiedTitleAndToolBarOnMac(true);
#endif
rpcConsole = new RPCConsole(_platformStyle, 0);
helpMessageDialog = new HelpMessageDialog(this, false);
#ifdef ENABLE_WALLET
if(enableWallet)
{
/** Create wallet frame and make it the central widget */
walletFrame = new WalletFrame(_platformStyle, this);
setCentralWidget(walletFrame);
} else
#endif // ENABLE_WALLET
{
/* When compiled without wallet or -disablewallet is provided,
* the central widget is the rpc console.
*/
setCentralWidget(rpcConsole);
}
// Accept D&D of URIs
setAcceptDrops(true);
// Create actions for the toolbar, menu bar and tray/dock icon
// Needs walletFrame to be initialized
createActions();
// Create application menu bar
createMenuBar();
// Create the toolbars
createToolBars();
// Create system tray icon and notification
createTrayIcon(networkStyle);
// Create status bar
statusBar();
// Disable size grip because it looks ugly and nobody needs it
statusBar()->setSizeGripEnabled(false);
// Status bar notification icons
QFrame *frameBlocks = new QFrame();
frameBlocks->setContentsMargins(0,0,0,0);
frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
frameBlocksLayout->setContentsMargins(3,0,3,0);
frameBlocksLayout->setSpacing(3);
unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle);
labelWalletEncryptionIcon = new QLabel();
labelWalletHDStatusIcon = new QLabel();
connectionsControl = new GUIUtil::ClickableLabel();
labelBlocksIcon = new GUIUtil::ClickableLabel();
if(enableWallet)
{
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(unitDisplayControl);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelWalletEncryptionIcon);
frameBlocksLayout->addWidget(labelWalletHDStatusIcon);
}
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(connectionsControl);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelBlocksIcon);
frameBlocksLayout->addStretch();
// Progress bar and label for blocks download
progressBarLabel = new QLabel();
progressBarLabel->setVisible(false);
progressBar = new GUIUtil::ProgressBar();
progressBar->setAlignment(Qt::AlignCenter);
progressBar->setVisible(false);
// Override style sheet for progress bar for styles that have a segmented progress bar,
// as they make the text unreadable (workaround for issue #1071)
// See https://qt-project.org/doc/qt-4.8/gallery.html
QString curStyle = QApplication::style()->metaObject()->className();
if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
{
progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }");
}
statusBar()->addWidget(progressBarLabel);
statusBar()->addWidget(progressBar);
statusBar()->addPermanentWidget(frameBlocks);
// Install event filter to be able to catch status tip events (QEvent::StatusTip)
this->installEventFilter(this);
// Initially wallet actions should be disabled
setWalletActionsEnabled(false);
// Subscribe to notifications from core
subscribeToCoreSignals();
connect(connectionsControl, SIGNAL(clicked(QPoint)), this, SLOT(toggleNetworkActive()));
modalOverlay = new ModalOverlay(this->centralWidget());
#ifdef ENABLE_WALLET
if(enableWallet) {
connect(walletFrame, SIGNAL(requestedSyncWarningInfo()), this, SLOT(showModalOverlay()));
connect(labelBlocksIcon, SIGNAL(clicked(QPoint)), this, SLOT(showModalOverlay()));
connect(progressBar, SIGNAL(clicked(QPoint)), this, SLOT(showModalOverlay()));
}
#endif
}
BitcoinGUI::~BitcoinGUI()
{
// Unsubscribe from notifications from core
unsubscribeFromCoreSignals();
QSettings settings;
settings.setValue("MainWindowGeometry", saveGeometry());
if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
trayIcon->hide();
#ifdef Q_OS_MAC
delete appMenuBar;
MacDockIconHandler::cleanup();
#endif
delete rpcConsole;
}
void BitcoinGUI::createActions()
{
QActionGroup *tabGroup = new QActionGroup(this);
overviewAction = new QAction(platformStyle->SingleColorIcon(":/icons/overview"), tr("&Overview"), this);
overviewAction->setStatusTip(tr("Show general overview of wallet"));
overviewAction->setToolTip(overviewAction->statusTip());
overviewAction->setCheckable(true);
overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1));
tabGroup->addAction(overviewAction);
sendCoinsAction = new QAction(platformStyle->SingleColorIcon(":/icons/send"), tr("&Send"), this);
sendCoinsAction->setStatusTip(tr("Send coins to a CashGoldCoin address"));
sendCoinsAction->setToolTip(sendCoinsAction->statusTip());
sendCoinsAction->setCheckable(true);
sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
tabGroup->addAction(sendCoinsAction);
sendCoinsMenuAction = new QAction(platformStyle->TextColorIcon(":/icons/send"), sendCoinsAction->text(), this);
sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip());
sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip());
receiveCoinsAction = new QAction(platformStyle->SingleColorIcon(":/icons/receiving_addresses"), tr("&Receive"), this);
receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and cashgoldcoin: URIs)"));
receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip());
receiveCoinsAction->setCheckable(true);
receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
tabGroup->addAction(receiveCoinsAction);
receiveCoinsMenuAction = new QAction(platformStyle->TextColorIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this);
receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip());
receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip());
historyAction = new QAction(platformStyle->SingleColorIcon(":/icons/history"), tr("&Transactions"), this);
historyAction->setStatusTip(tr("Browse transaction history"));
historyAction->setToolTip(historyAction->statusTip());
historyAction->setCheckable(true);
historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
tabGroup->addAction(historyAction);
#ifdef ENABLE_WALLET
// These showNormalIfMinimized are needed because Send Coins and Receive Coins
// can be triggered from the tray menu, and need to show the GUI to be useful.
connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
#endif // ENABLE_WALLET
quitAction = new QAction(platformStyle->TextColorIcon(":/icons/quit"), tr("E&xit"), this);
quitAction->setStatusTip(tr("Quit application"));
quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
quitAction->setMenuRole(QAction::QuitRole);
aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&About %1").arg(tr(PACKAGE_NAME)), this);
aboutAction->setStatusTip(tr("Show information about %1").arg(tr(PACKAGE_NAME)));
aboutAction->setMenuRole(QAction::AboutRole);
aboutAction->setEnabled(false);
aboutQtAction = new QAction(platformStyle->TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this);
aboutQtAction->setStatusTip(tr("Show information about Qt"));
aboutQtAction->setMenuRole(QAction::AboutQtRole);
optionsAction = new QAction(platformStyle->TextColorIcon(":/icons/options"), tr("&Options..."), this);
optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(tr(PACKAGE_NAME)));
optionsAction->setMenuRole(QAction::PreferencesRole);
optionsAction->setEnabled(false);
toggleHideAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&Show / Hide"), this);
toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
encryptWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
encryptWalletAction->setCheckable(true);
backupWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
backupWalletAction->setStatusTip(tr("Backup wallet to another location"));
changePassphraseAction = new QAction(platformStyle->TextColorIcon(":/icons/key"), tr("&Change Passphrase..."), this);
changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption"));
signMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/edit"), tr("Sign &message..."), this);
signMessageAction->setStatusTip(tr("Sign messages with your CashGoldCoin addresses to prove you own them"));
verifyMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/verify"), tr("&Verify message..."), this);
verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified CashGoldCoin addresses"));
openRPCConsoleAction = new QAction(platformStyle->TextColorIcon(":/icons/debugwindow"), tr("&Debug window"), this);
openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console"));
// initially disable the debug window menu item
openRPCConsoleAction->setEnabled(false);
usedSendingAddressesAction = new QAction(platformStyle->TextColorIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
usedReceivingAddressesAction = new QAction(platformStyle->TextColorIcon(":/icons/address-book"), tr("&Receiving addresses..."), this);
usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels"));
openAction = new QAction(platformStyle->TextColorIcon(":/icons/open"), tr("Open &URI..."), this);
openAction->setStatusTip(tr("Open a cashgoldcoin: URI or payment request"));
showHelpMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/info"), tr("&Command-line options"), this);
showHelpMessageAction->setMenuRole(QAction::NoRole);
showHelpMessageAction->setStatusTip(tr("Show the %1 help message to get a list with possible CashGoldCoin command-line options").arg(tr(PACKAGE_NAME)));
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked()));
connect(openRPCConsoleAction, SIGNAL(triggered()), this, SLOT(showDebugWindow()));
// prevents an open debug window from becoming stuck/unusable on client shutdown
connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
#ifdef ENABLE_WALLET
if(walletFrame)
{
connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool)));
connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet()));
connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase()));
connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses()));
connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses()));
connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
}
#endif // ENABLE_WALLET
new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C), this, SLOT(showDebugWindowActivateConsole()));
new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D), this, SLOT(showDebugWindow()));
}
void BitcoinGUI::createMenuBar()
{
#ifdef Q_OS_MAC
// Create a decoupled menu bar on Mac which stays even if the window is closed
appMenuBar = new QMenuBar();
#else
// Get the main window's menu bar on other platforms
appMenuBar = menuBar();
#endif
// Configure the menus
QMenu *file = appMenuBar->addMenu(tr("&File"));
if(walletFrame)
{
file->addAction(openAction);
file->addAction(backupWalletAction);
file->addAction(signMessageAction);
file->addAction(verifyMessageAction);
file->addSeparator();
file->addAction(usedSendingAddressesAction);
file->addAction(usedReceivingAddressesAction);
file->addSeparator();
}
file->addAction(quitAction);
QMenu *settings = appMenuBar->addMenu(tr("&Settings"));
if(walletFrame)
{
settings->addAction(encryptWalletAction);
settings->addAction(changePassphraseAction);
settings->addSeparator();
}
settings->addAction(optionsAction);
QMenu *help = appMenuBar->addMenu(tr("&Help"));
if(walletFrame)
{
help->addAction(openRPCConsoleAction);
}
help->addAction(showHelpMessageAction);
help->addSeparator();
help->addAction(aboutAction);
help->addAction(aboutQtAction);
}
void BitcoinGUI::createToolBars()
{
if(walletFrame)
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setMovable(false);
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
overviewAction->setChecked(true);
}
}
void BitcoinGUI::setClientModel(ClientModel *_clientModel)
{
this->clientModel = _clientModel;
if(_clientModel)
{
// Create system tray menu (or setup the dock menu) that late to prevent users from calling actions,
// while the client has not yet fully loaded
createTrayIconMenu();
// Keep up to date with client
updateNetworkState();
connect(_clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
connect(_clientModel, SIGNAL(networkActiveChanged(bool)), this, SLOT(setNetworkActive(bool)));
modalOverlay->setKnownBestHeight(_clientModel->getHeaderTipHeight(), QDateTime::fromTime_t(_clientModel->getHeaderTipTime()));
setNumBlocks(_clientModel->getNumBlocks(), _clientModel->getLastBlockDate(), _clientModel->getVerificationProgress(nullptr), false);
connect(_clientModel, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));
// Receive and report messages from client model
connect(_clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int)));
// Show progress dialog
connect(_clientModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int)));
rpcConsole->setClientModel(_clientModel);
#ifdef ENABLE_WALLET
if(walletFrame)
{
walletFrame->setClientModel(_clientModel);
}
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(_clientModel->getOptionsModel());
OptionsModel* optionsModel = _clientModel->getOptionsModel();
if(optionsModel)
{
// be aware of the tray icon disable state change reported by the OptionsModel object.
connect(optionsModel,SIGNAL(hideTrayIconChanged(bool)),this,SLOT(setTrayIconVisible(bool)));
// initialize the disable state of the tray icon with the current value in the model.
setTrayIconVisible(optionsModel->getHideTrayIcon());
}
} else {
// Disable possibility to show main window via action
toggleHideAction->setEnabled(false);
if(trayIconMenu)
{
// Disable context menu on tray icon
trayIconMenu->clear();
}
// Propagate cleared model to child objects
rpcConsole->setClientModel(nullptr);
#ifdef ENABLE_WALLET
if (walletFrame)
{
walletFrame->setClientModel(nullptr);
}
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(nullptr);
}
}
#ifdef ENABLE_WALLET
bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel)
{
if(!walletFrame)
return false;
setWalletActionsEnabled(true);
return walletFrame->addWallet(name, walletModel);
}
bool BitcoinGUI::setCurrentWallet(const QString& name)
{
if(!walletFrame)
return false;
return walletFrame->setCurrentWallet(name);
}
void BitcoinGUI::removeAllWallets()
{
if(!walletFrame)
return;
setWalletActionsEnabled(false);
walletFrame->removeAllWallets();
}
#endif // ENABLE_WALLET
void BitcoinGUI::setWalletActionsEnabled(bool enabled)
{
overviewAction->setEnabled(enabled);
sendCoinsAction->setEnabled(enabled);
sendCoinsMenuAction->setEnabled(enabled);
receiveCoinsAction->setEnabled(enabled);
receiveCoinsMenuAction->setEnabled(enabled);
historyAction->setEnabled(enabled);
encryptWalletAction->setEnabled(enabled);
backupWalletAction->setEnabled(enabled);
changePassphraseAction->setEnabled(enabled);
signMessageAction->setEnabled(enabled);
verifyMessageAction->setEnabled(enabled);
usedSendingAddressesAction->setEnabled(enabled);
usedReceivingAddressesAction->setEnabled(enabled);
openAction->setEnabled(enabled);
}
void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle)
{
#ifndef Q_OS_MAC
trayIcon = new QSystemTrayIcon(this);
QString toolTip = tr("%1 client").arg(tr(PACKAGE_NAME)) + " " + networkStyle->getTitleAddText();
trayIcon->setToolTip(toolTip);
trayIcon->setIcon(networkStyle->getTrayAndWindowIcon());
trayIcon->hide();
#endif
notificator = new Notificator(QApplication::applicationName(), trayIcon, this);
}
void BitcoinGUI::createTrayIconMenu()
{
#ifndef Q_OS_MAC
// return if trayIcon is unset (only on non-Mac OSes)
if (!trayIcon)
return;
trayIconMenu = new QMenu(this);
trayIcon->setContextMenu(trayIconMenu);
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
#else
// Note: On Mac, the dock icon is used to provide the tray's functionality.
MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();
dockIconHandler->setMainWindow((QMainWindow *)this);
trayIconMenu = dockIconHandler->dockMenu();
#endif
// Configuration of the tray icon (or dock icon) icon menu
trayIconMenu->addAction(toggleHideAction);
trayIconMenu->addSeparator();
trayIconMenu->addAction(sendCoinsMenuAction);
trayIconMenu->addAction(receiveCoinsMenuAction);
trayIconMenu->addSeparator();
trayIconMenu->addAction(signMessageAction);
trayIconMenu->addAction(verifyMessageAction);
trayIconMenu->addSeparator();
trayIconMenu->addAction(optionsAction);
trayIconMenu->addAction(openRPCConsoleAction);
#ifndef Q_OS_MAC // This is built-in on Mac
trayIconMenu->addSeparator();
trayIconMenu->addAction(quitAction);
#endif
}
#ifndef Q_OS_MAC
void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason)
{
if(reason == QSystemTrayIcon::Trigger)
{
// Click on system tray icon triggers show/hide of the main window
toggleHidden();
}
}
#endif
void BitcoinGUI::optionsClicked()
{
if(!clientModel || !clientModel->getOptionsModel())
return;
OptionsDialog dlg(this, enableWallet);
dlg.setModel(clientModel->getOptionsModel());
dlg.exec();
}
void BitcoinGUI::aboutClicked()
{
if(!clientModel)
return;
HelpMessageDialog dlg(this, true);
dlg.exec();
}
void BitcoinGUI::showDebugWindow()
{
rpcConsole->showNormal();
rpcConsole->show();
rpcConsole->raise();
rpcConsole->activateWindow();
}
void BitcoinGUI::showDebugWindowActivateConsole()
{
rpcConsole->setTabFocus(RPCConsole::TAB_CONSOLE);
showDebugWindow();
}
void BitcoinGUI::showHelpMessageClicked()
{
helpMessageDialog->show();
}
#ifdef ENABLE_WALLET
void BitcoinGUI::openClicked()
{
OpenURIDialog dlg(this);
if(dlg.exec())
{
Q_EMIT receivedURI(dlg.getURI());
}
}
void BitcoinGUI::gotoOverviewPage()
{
overviewAction->setChecked(true);
if (walletFrame) walletFrame->gotoOverviewPage();
}
void BitcoinGUI::gotoHistoryPage()
{
historyAction->setChecked(true);
if (walletFrame) walletFrame->gotoHistoryPage();
}
void BitcoinGUI::gotoReceiveCoinsPage()
{
receiveCoinsAction->setChecked(true);
if (walletFrame) walletFrame->gotoReceiveCoinsPage();
}
void BitcoinGUI::gotoSendCoinsPage(QString addr)
{
sendCoinsAction->setChecked(true);
if (walletFrame) walletFrame->gotoSendCoinsPage(addr);
}
void BitcoinGUI::gotoSignMessageTab(QString addr)
{
if (walletFrame) walletFrame->gotoSignMessageTab(addr);
}
void BitcoinGUI::gotoVerifyMessageTab(QString addr)
{
if (walletFrame) walletFrame->gotoVerifyMessageTab(addr);
}
#endif // ENABLE_WALLET
void BitcoinGUI::updateNetworkState()
{
int count = clientModel->getNumConnections();
QString icon;
switch(count)
{
case 0: icon = ":/icons/connect_0"; break;
case 1: case 2: case 3: icon = ":/icons/connect_1"; break;
case 4: case 5: case 6: icon = ":/icons/connect_2"; break;
case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
default: icon = ":/icons/connect_4"; break;
}
QString tooltip;
if (clientModel->getNetworkActive()) {
tooltip = tr("%n active connection(s) to CashGoldCoin network", "", count) + QString(".<br>") + tr("Click to disable network activity.");
} else {
tooltip = tr("Network activity disabled.") + QString("<br>") + tr("Click to enable network activity again.");
icon = ":/icons/network_disabled";
}
// Don't word-wrap this (fixed-width) tooltip
tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
connectionsControl->setToolTip(tooltip);
connectionsControl->setPixmap(platformStyle->SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
}
void BitcoinGUI::setNumConnections(int count)
{
updateNetworkState();
}
void BitcoinGUI::setNetworkActive(bool networkActive)
{
updateNetworkState();
}
void BitcoinGUI::updateHeadersSyncProgressLabel()
{
int64_t headersTipTime = clientModel->getHeaderTipTime();
int headersTipHeight = clientModel->getHeaderTipHeight();
int estHeadersLeft = (GetTime() - headersTipTime) / Params().GetConsensus().nPowTargetSpacing;
if (estHeadersLeft > HEADER_HEIGHT_DELTA_SYNC)
progressBarLabel->setText(tr("Syncing Headers (%1%)...").arg(QString::number(100.0 / (headersTipHeight+estHeadersLeft)*headersTipHeight, 'f', 1)));
}
void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool header)
{
if (modalOverlay)
{
if (header)
modalOverlay->setKnownBestHeight(count, blockDate);
else
modalOverlay->tipUpdate(count, blockDate, nVerificationProgress);
}
if (!clientModel)
return;
// Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbled text)
statusBar()->clearMessage();
// Acquire current block source
enum BlockSource blockSource = clientModel->getBlockSource();
switch (blockSource) {
case BLOCK_SOURCE_NETWORK:
if (header) {
updateHeadersSyncProgressLabel();
return;
}
progressBarLabel->setText(tr("Synchronizing with network..."));
updateHeadersSyncProgressLabel();
break;
case BLOCK_SOURCE_DISK:
if (header) {
progressBarLabel->setText(tr("Indexing blocks on disk..."));
} else {
progressBarLabel->setText(tr("Processing blocks on disk..."));
}
break;
case BLOCK_SOURCE_REINDEX:
progressBarLabel->setText(tr("Reindexing blocks on disk..."));
break;
case BLOCK_SOURCE_NONE:
if (header) {
return;
}
progressBarLabel->setText(tr("Connecting to peers..."));
break;
}
QString tooltip;
QDateTime currentDate = QDateTime::currentDateTime();
qint64 secs = blockDate.secsTo(currentDate);
tooltip = tr("Processed %n block(s) of transaction history.", "", count);
// Set icon state: spinning if catching up, tick otherwise
if(secs < 90*60)
{
tooltip = tr("Up to date") + QString(".<br>") + tooltip;
labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
#ifdef ENABLE_WALLET
if(walletFrame)
{
walletFrame->showOutOfSyncWarning(false);
modalOverlay->showHide(true, true);
}
#endif // ENABLE_WALLET
progressBarLabel->setVisible(false);
progressBar->setVisible(false);
}
else
{
QString timeBehindText = GUIUtil::formatNiceTimeOffset(secs);
progressBarLabel->setVisible(true);
progressBar->setFormat(tr("%1 behind").arg(timeBehindText));
progressBar->setMaximum(1000000000);
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
progressBar->setVisible(true);
tooltip = tr("Catching up...") + QString("<br>") + tooltip;
if(count != prevBlocks)
{
labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(QString(
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
}
prevBlocks = count;
#ifdef ENABLE_WALLET
if(walletFrame)
{
walletFrame->showOutOfSyncWarning(true);
modalOverlay->showHide();
}
#endif // ENABLE_WALLET
tooltip += QString("<br>");
tooltip += tr("Last received block was generated %1 ago.").arg(timeBehindText);
tooltip += QString("<br>");
tooltip += tr("Transactions after this will not yet be visible.");
}
// Don't word-wrap this (fixed-width) tooltip
tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
labelBlocksIcon->setToolTip(tooltip);
progressBarLabel->setToolTip(tooltip);
progressBar->setToolTip(tooltip);
}
void BitcoinGUI::message(const QString &title, const QString &message, unsigned int style, bool *ret)
{
QString strTitle = tr("CashGoldCoin"); // default title
// Default to information icon
int nMBoxIcon = QMessageBox::Information;
int nNotifyIcon = Notificator::Information;
QString msgType;
// Prefer supplied title over style based title
if (!title.isEmpty()) {
msgType = title;
}
else {
switch (style) {
case CClientUIInterface::MSG_ERROR:
msgType = tr("Error");
break;
case CClientUIInterface::MSG_WARNING:
msgType = tr("Warning");
break;
case CClientUIInterface::MSG_INFORMATION:
msgType = tr("Information");
break;
default:
break;
}
}
// Append title to "Bitcoin - "
if (!msgType.isEmpty())
strTitle += " - " + msgType;
// Check for error/warning icon
if (style & CClientUIInterface::ICON_ERROR) {
nMBoxIcon = QMessageBox::Critical;
nNotifyIcon = Notificator::Critical;
}
else if (style & CClientUIInterface::ICON_WARNING) {
nMBoxIcon = QMessageBox::Warning;
nNotifyIcon = Notificator::Warning;
}
// Display message
if (style & CClientUIInterface::MODAL) {
// Check for buttons, use OK as default, if none was supplied
QMessageBox::StandardButton buttons;
if (!(buttons = (QMessageBox::StandardButton)(style & CClientUIInterface::BTN_MASK)))
buttons = QMessageBox::Ok;
showNormalIfMinimized();
QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
int r = mBox.exec();
if (ret != nullptr)
*ret = r == QMessageBox::Ok;
}
else
notificator->notify((Notificator::Class)nNotifyIcon, strTitle, message);
}
void BitcoinGUI::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
#ifndef Q_OS_MAC // Ignored on Mac
if(e->type() == QEvent::WindowStateChange)
{
if(clientModel && clientModel->getOptionsModel() && clientModel->getOptionsModel()->getMinimizeToTray())
{
QWindowStateChangeEvent *wsevt = static_cast<QWindowStateChangeEvent*>(e);
if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized())
{
QTimer::singleShot(0, this, SLOT(hide()));
e->ignore();
}
}
}
#endif
}
void BitcoinGUI::closeEvent(QCloseEvent *event)
{
#ifndef Q_OS_MAC // Ignored on Mac
if(clientModel && clientModel->getOptionsModel())
{
if(!clientModel->getOptionsModel()->getMinimizeOnClose())
{
// close rpcConsole in case it was open to make some space for the shutdown window
rpcConsole->close();
QApplication::quit();
}
else
{
QMainWindow::showMinimized();
event->ignore();
}
}
#else
QMainWindow::closeEvent(event);
#endif
}
void BitcoinGUI::showEvent(QShowEvent *event)
{
// enable the debug window when the main window shows up
openRPCConsoleAction->setEnabled(true);
aboutAction->setEnabled(true);
optionsAction->setEnabled(true);
}
#ifdef ENABLE_WALLET
void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label)
{
// On new transaction, make an info balloon
QString msg = tr("Date: %1\n").arg(date) +
tr("Amount: %1\n").arg(BitcoinUnits::formatWithUnit(unit, amount, true)) +
tr("Type: %1\n").arg(type);
if (!label.isEmpty())
msg += tr("Label: %1\n").arg(label);
else if (!address.isEmpty())
msg += tr("Address: %1\n").arg(address);
message((amount)<0 ? tr("Sent transaction") : tr("Incoming transaction"),
msg, CClientUIInterface::MSG_INFORMATION);
}
#endif // ENABLE_WALLET
void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
{
// Accept only URIs
if(event->mimeData()->hasUrls())
event->acceptProposedAction();
}
void BitcoinGUI::dropEvent(QDropEvent *event)
{
if(event->mimeData()->hasUrls())
{
for (const QUrl &uri : event->mimeData()->urls())
{
Q_EMIT receivedURI(uri.toString());
}
}
event->acceptProposedAction();
}
bool BitcoinGUI::eventFilter(QObject *object, QEvent *event)
{
// Catch status tip events
if (event->type() == QEvent::StatusTip)
{
// Prevent adding text from setStatusTip(), if we currently use the status bar for displaying other stuff
if (progressBarLabel->isVisible() || progressBar->isVisible())
return true;
}
return QMainWindow::eventFilter(object, event);
}
#ifdef ENABLE_WALLET
bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
{
// URI has to be valid
if (walletFrame && walletFrame->handlePaymentRequest(recipient))
{
showNormalIfMinimized();
gotoSendCoinsPage();
return true;
}
return false;
}
void BitcoinGUI::setHDStatus(int hdEnabled)
{
labelWalletHDStatusIcon->setPixmap(platformStyle->SingleColorIcon(hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr("HD key generation is <b>enabled</b>") : tr("HD key generation is <b>disabled</b>"));
// eventually disable the QLabel to set its opacity to 50%
labelWalletHDStatusIcon->setEnabled(hdEnabled);
}
void BitcoinGUI::setEncryptionStatus(int status)
{
switch(status)
{
case WalletModel::Unencrypted:
labelWalletEncryptionIcon->hide();
encryptWalletAction->setChecked(false);
changePassphraseAction->setEnabled(false);
encryptWalletAction->setEnabled(true);
break;
case WalletModel::Unlocked:
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
encryptWalletAction->setChecked(true);
changePassphraseAction->setEnabled(true);
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
break;
case WalletModel::Locked:
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
encryptWalletAction->setChecked(true);
changePassphraseAction->setEnabled(true);
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
break;
}
}
#endif // ENABLE_WALLET
void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
{
if(!clientModel)
return;
// activateWindow() (sometimes) helps with keyboard focus on Windows
if (isHidden())
{
show();
activateWindow();
}
else if (isMinimized())
{
showNormal();
activateWindow();
}
else if (GUIUtil::isObscured(this))
{
raise();
activateWindow();
}
else if(fToggleHidden)
hide();
}
void BitcoinGUI::toggleHidden()
{
showNormalIfMinimized(true);
}
void BitcoinGUI::detectShutdown()
{
if (ShutdownRequested())
{
if(rpcConsole)
rpcConsole->hide();
qApp->quit();
}
}
void BitcoinGUI::showProgress(const QString &title, int nProgress)
{
if (nProgress == 0)
{
progressDialog = new QProgressDialog(title, "", 0, 100);
progressDialog->setWindowModality(Qt::ApplicationModal);
progressDialog->setMinimumDuration(0);
progressDialog->setCancelButton(0);
progressDialog->setAutoClose(false);
progressDialog->setValue(0);
}
else if (nProgress == 100)
{
if (progressDialog)
{
progressDialog->close();
progressDialog->deleteLater();
}
}
else if (progressDialog)
progressDialog->setValue(nProgress);
}
void BitcoinGUI::setTrayIconVisible(bool fHideTrayIcon)
{
if (trayIcon)
{
trayIcon->setVisible(!fHideTrayIcon);
}
}
void BitcoinGUI::showModalOverlay()
{
if (modalOverlay && (progressBar->isVisible() || modalOverlay->isLayerVisible()))
modalOverlay->toggleVisibility();
}
static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style)
{
bool modal = (style & CClientUIInterface::MODAL);
// The SECURE flag has no effect in the Qt GUI.
// bool secure = (style & CClientUIInterface::SECURE);
style &= ~CClientUIInterface::SECURE;
bool ret = false;
// In case of modal message, use blocking connection to wait for user to click a button
QMetaObject::invokeMethod(gui, "message",
modal ? GUIUtil::blockingGUIThreadConnection() : Qt::QueuedConnection,
Q_ARG(QString, QString::fromStdString(caption)),
Q_ARG(QString, QString::fromStdString(message)),
Q_ARG(unsigned int, style),
Q_ARG(bool*, &ret));
return ret;
}
void BitcoinGUI::subscribeToCoreSignals()
{
// Connect signals to client
uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
uiInterface.ThreadSafeQuestion.connect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
}
void BitcoinGUI::unsubscribeFromCoreSignals()
{
// Disconnect signals from client
uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
uiInterface.ThreadSafeQuestion.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
}
void BitcoinGUI::toggleNetworkActive()
{
if (clientModel) {
clientModel->setNetworkActive(!clientModel->getNetworkActive());
}
}
UnitDisplayStatusBarControl::UnitDisplayStatusBarControl(const PlatformStyle *platformStyle) :
optionsModel(0),
menu(0)
{
createContextMenu();
setToolTip(tr("Unit to show amounts in. Click to select another unit."));
QList<BitcoinUnits::Unit> units = BitcoinUnits::availableUnits();
int max_width = 0;
const QFontMetrics fm(font());
for (const BitcoinUnits::Unit unit : units)
{
max_width = qMax(max_width, fm.width(BitcoinUnits::name(unit)));
}
setMinimumSize(max_width, 0);
setAlignment(Qt::AlignRight | Qt::AlignVCenter);
setStyleSheet(QString("QLabel { color : %1 }").arg(platformStyle->SingleColor().name()));
}
/** So that it responds to button clicks */
void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
{
onDisplayUnitsClicked(event->pos());
}
/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
void UnitDisplayStatusBarControl::createContextMenu()
{
menu = new QMenu(this);
for (BitcoinUnits::Unit u : BitcoinUnits::availableUnits())
{
QAction *menuAction = new QAction(QString(BitcoinUnits::name(u)), this);
menuAction->setData(QVariant(u));
menu->addAction(menuAction);
}
connect(menu,SIGNAL(triggered(QAction*)),this,SLOT(onMenuSelection(QAction*)));
}
/** Lets the control know about the Options Model (and its signals) */
void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *_optionsModel)
{
if (_optionsModel)
{
this->optionsModel = _optionsModel;
// be aware of a display unit change reported by the OptionsModel object.
connect(_optionsModel,SIGNAL(displayUnitChanged(int)),this,SLOT(updateDisplayUnit(int)));
// initialize the display units label with the current value in the model.
updateDisplayUnit(_optionsModel->getDisplayUnit());
}
}
/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
void UnitDisplayStatusBarControl::updateDisplayUnit(int newUnits)
{
setText(BitcoinUnits::name(newUnits));
}
/** Shows context menu with Display Unit options by the mouse coordinates */
void UnitDisplayStatusBarControl::onDisplayUnitsClicked(const QPoint& point)
{
QPoint globalPos = mapToGlobal(point);
menu->exec(globalPos);
}
/** Tells underlying optionsModel to update its current display unit. */
void UnitDisplayStatusBarControl::onMenuSelection(QAction* action)
{
if (action)
{
optionsModel->setDisplayUnit(action->data());
}
}
| [
"you@example.com"
] | you@example.com |
f37405ad0976aec4d4f54269e69379393b439f8e | 45cfa155c12b30eca842082f1caf743e1481438b | /Lista_10/zad_7/stos.cpp | c7bbaf4b8b2b42ed647bbaddc12c1442f4af55bf | [] | no_license | KorzenTM/cpp_Mateusz_Korzeniowski | b84506f619f9c19e6961080baaa4d08d0c9fca49 | c6ce957dd2196e9e70a406d338e7756dd3d9cf8d | refs/heads/master | 2022-10-01T22:27:22.728781 | 2020-05-28T11:29:08 | 2020-05-28T11:29:08 | 248,175,701 | 0 | 0 | null | 2020-04-17T06:31:11 | 2020-03-18T08:24:54 | null | UTF-8 | C++ | false | false | 1,244 | cpp | #include "stos.h"
template<class T>
Stos<T>::~Stos()
{
while (!this->empty())
this->pop();
}
template<class T>
Stos<T>::Stos(Stos const& rhs)
:_pSzczyt(rhs._pSzczyt), _size(rhs._size)
{
for (size_t i = 0; i < _size; i++)
_pSzczyt[i]._dane = rhs._pSzczyt[i]._dane;
}
template<class T>
Stos<T> & Stos<T>:: operator=(const Stos &rhs)
{
if (this == &rhs)
return *this;
if (_size < rhs._size)
{
delete _pSzczyt;
_size = rhs._size;
_pSzczyt = new Ogniwo<T>(rhs._pSzczyt->_dane, rhs._pSzczyt);
}
_size = rhs._size;
for (size_t i = 0; i < _size; i++)
_pSzczyt[i]._dane = rhs._pSzczyt[i]._dane;
return *this;
}
template<class T>
void Stos<T>::reverse()
{
Ogniwo<T> *next = _pSzczyt;
Ogniwo<T> *prev = NULL;
Ogniwo<T> *tmp = NULL;
while(next != NULL)
{
tmp=next->_p_nastepny;
next->_p_nastepny=prev;
prev=next;
next=tmp;
}
_pSzczyt = prev;
}
template<class T>
std::ostream &operator<< (std::ostream &F, Stos<T> & stos)
{
F << "(";
F << stos.top();
stos.pop();
while (!stos.empty())
{
F << ", " << stos.top();
stos.pop();
}
F << ")";
return F;
} | [
"mateuszkorzeniowski98@gmail.com"
] | mateuszkorzeniowski98@gmail.com |
e94ac728e68e56f8e4db8258fff7081682795316 | 2c6b956325b7757b1a45fa8f330da4ee0fee0a5f | /Engine/Engine/Engine/Source/Core/Thread/IMutex.h | 9a827efd2ea84078f4478a4bbdff113fc0c251ea | [] | no_license | ekicam2/FunkyEngine | 4a1615fc3f08462323f018876cb243714b7e3d48 | 579b63b425e1e8046b9df19b02a6d2a6eab561af | refs/heads/master | 2020-07-12T21:08:44.976474 | 2020-04-25T19:06:36 | 2020-04-25T19:06:36 | 204,905,684 | 0 | 0 | null | 2020-02-09T14:18:45 | 2019-08-28T10:25:35 | C | UTF-8 | C++ | false | false | 616 | h | #pragma once
namespace Funky
{
namespace Core
{
namespace Thread
{
class IMutex
{
friend class MutexScopeGuard;
public:
static IMutex* Create();
protected:
IMutex() = default;
virtual ~IMutex() = default;
/* If mutex is free return true and lock mutex otherwise return false and suspend execution. */
virtual void Wait() = 0;
virtual void Free() = 0;
};
class MutexScopeGuard final
{
public:
MutexScopeGuard(IMutex* NewMutex) : Mutex(NewMutex) { Mutex->Wait(); }
~MutexScopeGuard() { Mutex->Free(); }
private:
IMutex* Mutex;
};
}
}
} | [
"ekicam2@gmail.com"
] | ekicam2@gmail.com |
eb39bbd3e4af1976d7215c935107b450b2d5f526 | b56bac95f5af902a8fdcb6e612ee2f43f895ae3a | /Wireless OverSim-INETMANET/inetmanet-2.0/src/underTest/wimax/linklayer/Ieee80216/MACSublayer/QoS/ConvergenceSublayerControlModule.cc | f78e8b120f06ea128692f83a915cd5b34e38d179 | [] | no_license | shabirali-mnnit/WirelessOversim-INETMANET | 380ea45fecaf56906ce2226b7638e97d6d1f00b0 | 1c6522495caa26d705bfe810f495c07f8b581a85 | refs/heads/master | 2021-07-30T10:55:25.490486 | 2021-07-20T08:14:35 | 2021-07-20T08:14:35 | 74,204,332 | 2 | 0 | null | 2016-11-22T05:47:22 | 2016-11-19T11:27:26 | C++ | UTF-8 | C++ | false | false | 3,113 | cc | #include "ConvergenceSublayerControlModule.h"
#include "IPv4.h"
#include "IPv4ControlInfo.h"
Define_Module(ConvergenceSublayerControlModule);
ConvergenceSublayerControlModule::ConvergenceSublayerControlModule()
{
}
ConvergenceSublayerControlModule::~ConvergenceSublayerControlModule()
{
}
void ConvergenceSublayerControlModule::initialize()
{
// find the existing gates for better performance
outerIn = findGate("outerIn");
outerOut = findGate("outerOut");
tcIn = findGate("tcIn");
tcOut = findGate("tcOut");
compIn = findGate("compIn");
compOut = findGate("compOut");
//timerEvent = new cMessage("selfTimer");
//scheduleAt(0.005, timerEvent);
}
void ConvergenceSublayerControlModule::handleMessage(cMessage *msg)
{
if (msg->isSelfMessage())
{ //msg comes from outside (the packet generator).
handleSelfMessage(msg);
}
else if (msg->getArrivalGateId() == outerIn)
{
handleUpperLayerMessage(check_and_cast<cPacket *>(msg));
}
//If the message comes back from classification, fragment/pack it
else if (msg->getArrivalGateId() == tcIn)
{
if (dynamic_cast<Ieee80216_DSA_REQ *>(msg))
{
send(msg, outerOut);
}
//send( msg, compOut);
}
}
//msg comes from outside (the packet generator).
//It has to be classified, so it's forwarded to the TrafficClassification module
void ConvergenceSublayerControlModule::handleUpperLayerMessage(cPacket *msg)
{
EV << "Message arrived in CS: " << msg << "\n";
if (msg->getByteLength() != 0)
{
EV << "MESSAGE LENGTH: " << msg->getByteLength() << "\n";
// vorrübergehend: handle incoming packet as payload and
// encapsulate into IPDatagram for classification
IPv4Datagram *ipd = new IPv4Datagram();
ipd->encapsulate(msg);
send(ipd, tcOut);
if (dynamic_cast<Ieee80216_DSA_REQ *>(msg))
{
//forward to CPL
//send( msg, )
}
// incoming ip-packets
if (dynamic_cast<IPv4ControlInfo *>(msg->getControlInfo()))
{
IPv4ControlInfo *ip_ctrlinfo = check_and_cast<IPv4ControlInfo *>(msg->getControlInfo());
if (ip_ctrlinfo != NULL)
{
EV << "IPControlInfo arrived. Length: " << ip_ctrlinfo << "\n";
send(msg, tcOut);
}
else
{
EV << "Non-IP-Packet arrived\n";
}
}
}
//send( msg, "tcOut" );
}
void ConvergenceSublayerControlModule::handleSelfMessage(cMessage *msg)
{
//dummy-content until MobileIP is integrated
IPv4Datagram *ipd = new IPv4Datagram();
ipd->setDestAddress(IPv4Address("123.123.123.123"));
ipd->setHeaderLength(IP_HEADER_BYTES);
EV << "Created new IPDatagram - sending it to TrafficClassification\n";
send(ipd, tcOut);
// IInterfaceTable *itable = InterfaceTableAccess().get();
// EV << "\n\n\nInterface: " << itable->getInterface(0)->name() <<"\n\n\n";
//------------------------------------------
}
| [
"rcs1501@mnnit.ac.in"
] | rcs1501@mnnit.ac.in |
71729ef81118bc0c4b7f7cfcfbee475b86240528 | 617ed1d43ee8cf93b1673135d9834ed4e252311f | /Engine/Math/Color.h | 9bc1dbb32472642c7a345461fe6a64e7498b5f9e | [] | no_license | Caboose19/GAT150 | f846b758feda99a441b98fb0424898795e27d929 | 50eb0858d8bbe490eca3b7a3f95cee3c7455beab | refs/heads/master | 2022-12-07T07:36:13.899568 | 2020-09-01T22:41:16 | 2020-09-01T22:41:16 | 284,755,191 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,380 | h | #pragma once
#include "SDL.h"
#include <windows.h>
#include <iostream>
namespace nc
{
struct Color
{
float r;
float g;
float b;
float a;
Color() : r{ 0 }, g{ 0 }, b{ 0 }, a{ 0 } {}
Color(float r, float g, float b, float a = 1) : r{ r }, g{ g }, b{ b }, a{ a } {}
float& operator [] (size_t index);
//const float& operator[] const(size_t index);
void Set(float r, float g, float b);
Color operator + (const Color& c) const { return Color{ r + c.r, g + c.g , b + c.b}; }
Color operator - (const Color& c) const { return Color{ r - c.r, g - c.g , b - c.b}; }
Color operator * (const Color& c) const { return Color{ r * c.r, g * c.g , b * c.b}; }
Color operator / (const Color& c) const { return Color{ r / c.r, g / c.g , b / c.b}; }
Color operator + (float c) const { return Color{ r - c, g - c, b - c}; }
Color operator - (float c) const { return Color{ r - c, g - c, b - c}; }
Color operator * (float c) const { return Color{ r * c, g * c, b * c}; }
Color operator / (float c) const { return Color{ r / c, g / c, b / c}; }
Color& operator += (const Color& c) { r += c.r; g += c.g; b += c.b; return *this; }
Color& operator -= (const Color& c) { r -= c.r; g -= c.g; b -= c.b; return *this; }
Color& operator *= (const Color& c) { r *= c.r; g *= c.g; b *= c.b; return *this; }
Color& operator /= (const Color& c) { r /= c.r; g /= c.g; b /= c.b; return *this; }
Color& operator += (float c) { r += c; g += c; b += c; return *this; }
Color& operator -= (float c) { r -= c; g -= c; b -= c; return *this; }
Color& operator *= (float c) { r *= c; g *= c; b *= c; return *this; }
Color& operator /= (float c) { r /= c; g /= c; b /= c; return *this; }
friend std::istream& operator >> (std::istream& stream, Color& c);
SDL_Color Pack888() const;
operator SDL_Color() const { return Pack888(); }
static const Color white;
static const Color red;
static const Color green;
static const Color blue;
};
inline SDL_Color Color::Pack888() const
{
SDL_Color color;
BYTE _r = static_cast<BYTE>(r * 255.0f);
BYTE _g = static_cast<BYTE>(g * 255.0f);
BYTE _b = static_cast<BYTE>(b * 255.0f);
BYTE _a = static_cast<BYTE>(b * 255.0f);
return color;
}
inline std::ostream& operator<<(std::ostream& stream, Color& c)
{
stream << c.r << " " << c.g << c.b << c.a;
return stream;
}
} | [
"48289097+Caboose19@users.noreply.github.com"
] | 48289097+Caboose19@users.noreply.github.com |
701931474dad886124d8d0c42d9c84de060a9cff | e06d75abb055bd0f05a7c72e2b3c5ebce059a607 | /substrate.sub/src/widget/TextEditor.h | 63f6c570bd1b94055bdcb2abebded4e49f022679 | [] | no_license | gelisam/Substrate | 7b4b664672abcf631b7276dd87f418ce4e3f50bb | 1859b1e291d957b4f9c4f4ca35bf02563c1e9bc1 | refs/heads/master | 2021-01-13T07:11:12.625851 | 2013-03-13T02:10:58 | 2013-03-13T02:10:58 | 3,361,705 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 268 | h | #ifndef TEXT_EDITOR_H
#define TEXT_EDITOR_H
#include <QtGui/QTextEdit>
class TextEditor : public QTextEdit
{
Q_OBJECT;
public:
TextEditor(QWidget* parent);
virtual bool open(const QString& filename);
signals:
void error(const QString&);
};
#endif
| [
"gelisam@gmail.com"
] | gelisam@gmail.com |
dadf6bbd643a897e6905792a86d345bcacccc9a1 | 2343601c38bb85ebea51f0fd0e83551b34519690 | /src/cpp/QSurfaceFormat/qsurfaceformat_wrap.cpp | 0cd854fcab5e09ff237d02bf06ded89ed8d3e8d4 | [
"MIT"
] | permissive | bvkimball/nodegui-plugin-opengl | fe050c6aeae29677748226146e412205682b46ba | e12669f2efbb07420f86ed8e10c85a9e408f4ff7 | refs/heads/main | 2023-05-24T00:24:33.074070 | 2021-06-14T19:44:11 | 2021-06-14T19:44:11 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,725 | cpp | #include <Extras/Utils/nutils.h>
#include <QtCore/QObject/qobject_wrap.h>
#include "qsurfaceformat_wrap.h"
Napi::FunctionReference QSurfaceFormatWrap::constructor;
Napi::Object QSurfaceFormatWrap::init(Napi::Env env, Napi::Object exports) {
Napi::HandleScope scope(env);
char CLASSNAME[] = "QSurfaceFormat";
Napi::Function func = DefineClass(
env, CLASSNAME,
{InstanceMethod("profile", &QSurfaceFormatWrap::profile),
InstanceMethod("setDepthBufferSize",
&QSurfaceFormatWrap::setDepthBufferSize),
InstanceMethod("setMajorVersion", &QSurfaceFormatWrap::setMajorVersion),
InstanceMethod("setMinorVersion", &QSurfaceFormatWrap::setMinorVersion),
InstanceMethod("setOption", &QSurfaceFormatWrap::setOption),
InstanceMethod("setProfile", &QSurfaceFormatWrap::setProfile),
InstanceMethod("setStencilBufferSize",
&QSurfaceFormatWrap::setStencilBufferSize),
StaticMethod("defaultFormat",
&StaticQSurfaceFormatWrapMethods::defaultFormat),
StaticMethod("setDefaultFormat",
&StaticQSurfaceFormatWrapMethods::setDefaultFormat),
COMPONENT_WRAPPED_METHODS_EXPORT_DEFINE(QOpenGLBufferWrap)});
constructor = Napi::Persistent(func);
exports.Set(CLASSNAME, func);
return exports;
}
QSurfaceFormat* QSurfaceFormatWrap::getInternalInstance() {
return this->instance;
}
QSurfaceFormatWrap::QSurfaceFormatWrap(const Napi::CallbackInfo& info)
: Napi::ObjectWrap<QSurfaceFormatWrap>(info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
if (info.Length() == 1 && info[0].IsExternal()) {
this->instance = info[0].As<Napi::External<QSurfaceFormat>>().Data();
} else {
this->instance = new QSurfaceFormat();
}
this->rawData = extrautils::configureComponent(this->getInternalInstance());
}
QSurfaceFormatWrap::~QSurfaceFormatWrap() { delete this->instance; }
Napi::Value QSurfaceFormatWrap::setDepthBufferSize(
const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
int size = info[0].As<Napi::Number>().Int32Value();
this->instance->setDepthBufferSize(size);
return env.Null();
}
Napi::Value QSurfaceFormatWrap::setStencilBufferSize(
const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
int size = info[0].As<Napi::Number>().Int32Value();
this->instance->setStencilBufferSize(size);
return env.Null();
}
Napi::Value QSurfaceFormatWrap::profile(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
return Napi::Number::New(env, this->instance->profile());
}
Napi::Value QSurfaceFormatWrap::setProfile(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
int profile = info[0].As<Napi::Number>().Int32Value();
this->instance->setProfile(
static_cast<QSurfaceFormat::OpenGLContextProfile>(profile));
return env.Null();
}
Napi::Value QSurfaceFormatWrap::setMajorVersion(
const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
int version = info[0].As<Napi::Number>().Int32Value();
this->instance->setMajorVersion(version);
return env.Null();
}
Napi::Value QSurfaceFormatWrap::setMinorVersion(
const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
int version = info[0].As<Napi::Number>().Int32Value();
this->instance->setMinorVersion(version);
return env.Null();
}
Napi::Value QSurfaceFormatWrap::setOption(
const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
int option = info[0].As<Napi::Number>().Int32Value();
bool on = info[1].As<Napi::Boolean>().Value();
this->instance->setOption(static_cast<QSurfaceFormat::FormatOption>(option), on);
return env.Null();
}
Napi::Value StaticQSurfaceFormatWrapMethods::defaultFormat(
const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
auto instance =
QSurfaceFormatWrap::constructor.New({Napi::External<QSurfaceFormat>::New(
env, new QSurfaceFormat(QSurfaceFormat::defaultFormat()))});
return instance;
}
Napi::Value StaticQSurfaceFormatWrapMethods::setDefaultFormat(
const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
Napi::Object surfaceFormatObject = info[0].As<Napi::Object>();
QSurfaceFormatWrap* surfaceFormatWrap =
Napi::ObjectWrap<QSurfaceFormatWrap>::Unwrap(surfaceFormatObject);
QSurfaceFormat::setDefaultFormat(*surfaceFormatWrap->getInternalInstance());
return env.Null();
}
| [
"simon@simonzone.com"
] | simon@simonzone.com |
ef2fe51307e78b0a998abe561de32055b5117983 | 96a330b0069bf008457d7a9201fc8eba83ff86c6 | /src/polycubed/src/server/Resources/Body/ListResource.h | d5ed87abe1557b158a2cdf0ffd1979365eea6c56 | [
"Apache-2.0"
] | permissive | polycube-network/polycube | 0ef845cb7043a47c37f2f2073d5aaf818da6da46 | a143e3c0325400dad7b9ff3406848f5a953ed3d1 | refs/heads/master | 2023-03-20T01:08:32.534908 | 2022-06-30T12:45:40 | 2022-06-30T12:45:40 | 161,432,392 | 463 | 107 | Apache-2.0 | 2023-03-07T01:11:30 | 2018-12-12T04:23:33 | C++ | UTF-8 | C++ | false | false | 2,113 | h | /*
* Copyright 2018 The Polycube Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "ParentResource.h"
#include <memory>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
namespace polycube::polycubed::Rest::Resources::Body {
class ListKey;
class ListResource : public virtual ParentResource {
public:
ListResource(const std::string &name, const std::string &description,
const std::string &cli_example,
const ParentResource *const parent, PolycubedCore *core,
std::vector<ListKey> &&keys,
const std::vector<JsonNodeField> &node_fields,
bool configuration, bool init_only_config);
bool ValidateKeys(std::unordered_map<std::string, std::string> keys) const;
const Response ReadValue(const std::string &cube_name,
const ListKeyValues &keys) const override;
virtual const Response ReadWhole(const std::string &cube_name,
const ListKeyValues &keys) const;
bool IsMandatory() const override;
/*
* This function takes the keys (parsed from the url in "keys") and save
* them in the body of the request
*/
void FillKeys(nlohmann::json &body, const ListKeyValues &keys);
std::vector<Response> BodyValidateMultiple(
const std::string &cube_name, const ListKeyValues &keys,
nlohmann::json &body, bool initialization) const;
const std::vector<ListKey> keys_;
nlohmann::json ToHelpJson() const override;
};
} // namespace polycube::polycubed::Rest::Resources::Body
| [
"mauriciovasquezbernal@gmail.com"
] | mauriciovasquezbernal@gmail.com |
327ad38d00b4b4b96ef2198e3d7a5c4e9c78b8ae | ab05472608d6cb5001b5819a0c2ee7de42573466 | /ACCbot.cpp | ee52803ecfc8038ca45cfc22412d56d912a8aec6 | [] | no_license | ACCGeneral/ACCBot | 016cf0897454b64df750eca4d934daf54502cd54 | b0949a4e86845ceeb91b09a00eb1818515dd5fc2 | refs/heads/master | 2021-08-31T21:11:37.069608 | 2017-12-22T23:30:50 | 2017-12-22T23:30:50 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,477 | cpp | #include "ACCbot.h"
#include <iostream>
using namespace BWAPI;
using namespace Filter;
bool analyzed;
bool analysis_just_finished;
void ACCbotmain::onStart()
{
AICommander = new Commander();
Broodwar->sendText("ACCBot v1.0");
Broodwar << "The map is " << Broodwar->mapName() << "!" << std::endl;
Broodwar->enableFlag(Flag::UserInput);
Broodwar->setLocalSpeed(10);
Broodwar->setCommandOptimizationLevel(2);
if (Broodwar->isReplay())
{
Broodwar << "The following players are in this replay:" << std::endl;
Playerset players = Broodwar->getPlayers();
for (auto p : players)
{
if (!p->isObserver())
Broodwar << p->getName() << ", playing as " << p->getRace() << std::endl;
}
}
else
{
Broodwar << "The matchup is " << Broodwar->self()->getRace() << " vs " << Broodwar->enemy()->getRace() << std::endl;
}
BWTA::readMap();
analyzed = false;
analysis_just_finished = false;
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AnalyzeThread, NULL, 0, NULL);
}
void ACCbotmain::onEnd(bool isWinner)
{
Worldinformation::getinstance().cleanup();
influenceMapData::getinstance().cleanup();
AICommander->cleanup();
delete AICommander;
}
void ACCbotmain::onFrame()
{
AICommander->update();
// Called once every game frame
// Display the game frame rate as text in the upper left area of the screen
Broodwar->drawTextScreen(200, 0, "FPS: %d", Broodwar->getFPS());
Broodwar->drawTextScreen(200, 20, "Average FPS: %f", Broodwar->getAverageFPS());
// Return if the game is a replay or is paused
if (Broodwar->isReplay() || Broodwar->isPaused() || !Broodwar->self())
return;
if (analyzed)
{
drawTerrainData();
}
if (analysis_just_finished)
{
Broodwar << "Finished analyzing map." << std::endl;
analysis_just_finished = false;
}
// Prevent spamming by only running our onFrame once every number of latency frames.
// Latency frames are the number of frames before commands are processed.
if (Broodwar->getFrameCount() % Broodwar->getLatencyFrames() != 0)
return;
}
void ACCbotmain::onSendText(std::string text)
{
// Send the text to the game if it is not being processed.
Broodwar->sendText("%s", text.c_str());
// Make sure to use %s and pass the text as a parameter,
// otherwise you may run into problems when you use the %(percent) character!
if (text == "/a")
{
if (analyzed == false)
{
Broodwar << "Analyzing map... this may take a minute" << std::endl;
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AnalyzeThread, NULL, 0, NULL);
}
}
else
{
Broodwar->sendText("%s", text.c_str());
}
}
void ACCbotmain::onReceiveText(BWAPI::Player player, std::string text)
{
// Parse the received text
Broodwar << player->getName() << " said \"" << text << "\"" << std::endl;
}
void ACCbotmain::onPlayerLeft(BWAPI::Player player)
{
// Interact verbally with the other players in the game by
// announcing that the other player has left.
Broodwar->sendText("Goodbye %s!", player->getName().c_str());
}
void ACCbotmain::onNukeDetect(BWAPI::Position target)
{
// Check if the target is a valid position
if (target)
{
// if so, print the location of the nuclear strike target
Broodwar << "Nuclear Launch Detected at " << target << std::endl;
}
else
{
// Otherwise, ask other players where the nuke is!
Broodwar->sendText("Where's the nuke?");
}
// You can also retrieve all the nuclear missile targets using Broodwar->getNukeDots()!
}
void ACCbotmain::onUnitDiscover(BWAPI::Unit unit)
{
}
void ACCbotmain::onUnitEvade(BWAPI::Unit unit)
{
}
void ACCbotmain::onUnitShow(BWAPI::Unit unit)
{
AICommander->showunit(unit);
}
void ACCbotmain::onUnitHide(BWAPI::Unit unit)
{
AICommander->unithiding(unit);
}
void ACCbotmain::onUnitCreate(BWAPI::Unit unit)
{
AICommander->createunit(unit);
}
void ACCbotmain::onUnitDestroy(BWAPI::Unit unit)
{
AICommander->unitdead(unit);
}
void ACCbotmain::onUnitMorph(BWAPI::Unit unit)
{
AICommander->unitmorph(unit);
}
void ACCbotmain::onUnitRenegade(BWAPI::Unit unit)
{
AICommander->traitor(unit);
}
void ACCbotmain::onSaveGame(std::string gameName)
{
Broodwar << "The game was saved to \"" << gameName << "\"" << std::endl;
}
void ACCbotmain::onUnitComplete(BWAPI::Unit unit)
{
AICommander->unitcomplete(unit);
}
DWORD WINAPI AnalyzeThread()
{
BWTA::analyze();
analyzed = true;
analysis_just_finished = true;
influenceMapData::getinstance().setupworldinfo();
return 0;
}
void ACCbotmain::drawTerrainData()
{
//we will iterate through all the base locations, and draw their outlines.
for (const auto& baseLocation : BWTA::getBaseLocations()) {
TilePosition p = baseLocation->getTilePosition();
//draw outline of center location
Position leftTop(p.x * TILE_SIZE, p.y * TILE_SIZE);
Position rightBottom(leftTop.x + 4 * TILE_SIZE, leftTop.y + 3 * TILE_SIZE);
Broodwar->drawBoxMap(leftTop, rightBottom, Colors::Blue);
//draw a circle at each mineral patch
for (const auto& mineral : baseLocation->getStaticMinerals()) {
Broodwar->drawCircleMap(mineral->getInitialPosition(), 30, Colors::Cyan);
}
//draw the outlines of Vespene geysers
for (const auto& geyser : baseLocation->getGeysers()) {
TilePosition p1 = geyser->getInitialTilePosition();
Position leftTop1(p1.x * TILE_SIZE, p1.y * TILE_SIZE);
Position rightBottom1(leftTop1.x + 4 * TILE_SIZE, leftTop1.y + 2 * TILE_SIZE);
Broodwar->drawBoxMap(leftTop1, rightBottom1, Colors::Orange);
}
//if this is an island expansion, draw a yellow circle around the base location
if (baseLocation->isIsland()) {
Broodwar->drawCircleMap(baseLocation->getPosition(), 80, Colors::Yellow);
}
}
//we will iterate through all the regions and ...
for (const auto& region : BWTA::getRegions()) {
// draw the polygon outline of it in green
BWTA::Polygon p = region->getPolygon();
for (size_t j = 0; j < p.size(); ++j) {
Position point1 = p[j];
Position point2 = p[(j + 1) % p.size()];
Broodwar->drawLineMap(point1, point2, Colors::Green);
}
// visualize the chokepoints with red lines
for (auto const& chokepoint : region->getChokepoints()) {
Position point1 = chokepoint->getSides().first;
Position point2 = chokepoint->getSides().second;
Broodwar->drawLineMap(point1, point2, Colors::Red);
}
}
}
//Reference to the BWTA2 library for the terrian analysis as well as the drawTerrainData and AnalyzeThread code. Can be found at https://bitbucket.org/auriarte/bwta2/wiki/Getting%20Started | [
"alex_chatt@hotmail.co.uk"
] | alex_chatt@hotmail.co.uk |
de0f09e6990d5cdc91a2a45fc37c0306ef066806 | 78bff80db16c58b268f0800d9691cf1fb9170b23 | /Grafica_Computadora/P2 - Linea Mouse/LineasConMouse/main.cpp | b32b4254cee3f33225fd102323a6fc0d599b0066 | [] | no_license | Dynotum/Graficas_Computadoras | 006e7b6bb0006d6971337d092bbd77875d94b928 | 5095f226867939a67f7a4c73cc1fde13c2f793db | refs/heads/master | 2021-01-11T02:30:54.521713 | 2016-10-14T23:43:49 | 2016-10-14T23:43:49 | 70,954,226 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 2,818 | cpp | #include <windows.h>
#include <GL/GLU.h>
#include <GL/glut.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int colorArray[200][200];
int xini=0,yini=0,xfin=0,yfin=0,lados;
void init(void){
glClearColor(0.0, 0.0, 0.0, 0.0); // se establece el color de la ventana de visualización
glMatrixMode(GL_PROJECTION); //proyección ortogonal en una zona rectangular bidimensional
gluOrtho2D(0.0, 200.0, 0.0, 200.0); //Sistema de coordenas de referencia de 0 a 200 para x, 0 a 150 para y
}
void pixel(int x,int y){
glBegin(GL_POINTS);
glVertex2i(x,y);
glEnd();
}
void LineaBres(int xa, int ya, int xb, int yb){
int dx, dy,x,y,Fin,p,incX,incY;
dx=abs(xa-xb);
dy=abs(ya-yb);
if(xa<xb){
incX=1;
}
if(xa>xb){
incX=-1;
}
if(xa==xb){
incX=0;
}
if(ya<yb){
incY=1;
}
if(ya>yb){
incY=-1;
}
if(ya==yb){
incY=0;
}
x=xa;
y=ya;
pixel(x,y);
if(dx>dy){
Fin=dx;
p=2*(dy-dx);
while(Fin>0){
x=x+incX;
if(p<0)
p=p+2*dy;
else{
y=y+incY;
p=p+2*(dy-dx);
}
pixel(x,y);
Fin--;
}
}
else{
Fin=dy;
p=2*(dx-dy);
pixel(x,y);
while(Fin>0){
y=y+incY;
if(p<0)
p=p+2*dx;
else{
x=x+incX;
p=p+2*(dx-dy);
}
pixel(x,y);
Fin--;
}
}
}//LineaBres
void lineSegment(void){
glClear(GL_COLOR_BUFFER_BIT); // visualización del color asignado a la ventana
glColor3f(0.0, 1.0, 0.0); // color de lalínea
glClear(GL_COLOR_BUFFER_BIT| GL_DEPTH_BUFFER_BIT);
glDrawPixels(200,200,GL_RGB,GL_UNSIGNED_BYTE,colorArray);
LineaBres(xini,yini,xfin,yfin);
glFlush();
glutSwapBuffers();
}
void onMouse(int button, int state, int x, int y) {
if ( (button == GLUT_LEFT_BUTTON) & (state == GLUT_DOWN) ) {
xini=x;
yini=abs(200-y);
}
if ( (button == GLUT_LEFT_BUTTON) & (state == GLUT_UP) ) {
glReadPixels(0,0,200,200,GL_RGB,GL_UNSIGNED_BYTE,colorArray);
}
}
void onMotion(int x, int y) {
xfin=x;
yfin=abs(200-y);
glutPostRedisplay();
}
int main(int argc, char** argv){
glutInit(&argc, argv); //inicialización de GLUT
glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB|GLUT_DEPTH);// único búfer de refresco en la ventana de visualización y el modo de color RGB
glutInitWindowPosition(50, 100); //posición inicial de la ventana, esquina superior izquierda
glutInitWindowSize(200, 200); //alto y ancho en pixeles
glutCreateWindow("Lineas con el Mouse"); //creación de ventana de visualización y asigna el título
init();
glutDisplayFunc(lineSegment); //muestra la línea en la ventana de visualización
glutMouseFunc(onMouse);
glutMotionFunc(onMotion);
glutMainLoop(); // bucle infinito que comprueba entrada de dispositivos
return EXIT_SUCCESS;
}
| [
"dino_arquero_1@hotmail.com"
] | dino_arquero_1@hotmail.com |
6bbd2521ba41e449352d0dd8e643399691eec48b | 94e6c983942bbf14284ff3739f6f57896d2f2a3b | /misc/const_expr.cpp | f0e60cced0019abba2efc0467aa6c8e6c6a7e9fb | [] | no_license | tctony/cpp-demo | e25ffafe9689e92fe43dcf818e652fc30df2c4e2 | e0e2b905c1dd2ab576a8fd05944b06d7a3f7d405 | refs/heads/master | 2023-05-29T04:25:33.163184 | 2020-11-28T15:35:28 | 2020-12-06T02:03:12 | 345,267,680 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,341 | cpp | #include <chrono>
#include <iostream>
#define N 25
uint64_t f1(int n) { return n == 1 || n == 2 ? 1 : f1(n - 1) + f1(n - 2); }
constexpr uint64_t f2(const int n) {
return n == 1 || n == 2 ? 1 : f2(n - 1) + f2(n - 2);
}
int main(int argc, const char *argv[]) {
{
auto ts = std::chrono::high_resolution_clock::now();
uint64_t v = 0;
for (int i = 0; i < 100; ++i) {
v += f1(N);
}
auto te = std::chrono::high_resolution_clock::now();
auto duration =
std::chrono::duration_cast<std::chrono::microseconds>(te - ts).count();
std::cout << duration << std::endl;
}
{
auto ts = std::chrono::high_resolution_clock::now();
uint64_t v = 0;
for (int i = 0; i < 100; ++i) {
v += f2(N);
}
auto te = std::chrono::high_resolution_clock::now();
auto duration =
std::chrono::duration_cast<std::chrono::microseconds>(te - ts).count();
std::cout << duration << std::endl;
}
{
auto ts = std::chrono::high_resolution_clock::now();
uint64_t v = 0;
constexpr uint64_t vv = f2(N);
for (int i = 0; i < 100; ++i) {
v += vv;
}
auto te = std::chrono::high_resolution_clock::now();
auto duration =
std::chrono::duration_cast<std::chrono::microseconds>(te - ts).count();
std::cout << duration << std::endl;
}
return 0;
}
| [
"tangchang21@gmail.com"
] | tangchang21@gmail.com |
1c91756d98ba7e5326c1c0c24b21898f20f0faf6 | 474cf25fed880462fb858c55a12107bab6afa2af | /common/vision/src/rioreceive.cpp | e181a5b9559234bc99e26a6fda5c42343c1c8b04 | [
"MIT"
] | permissive | swan58/2018-PowerUp | 8636971932d1220f9bac63720ce91de2f06f85e4 | 035a4257810ab84de2528048d9afaa635344ae4b | refs/heads/master | 2021-05-12T17:07:45.903076 | 2018-04-25T15:03:06 | 2018-04-25T15:03:06 | 117,037,486 | 1 | 0 | MIT | 2018-02-16T09:18:50 | 2018-01-11T02:12:28 | C++ | UTF-8 | C++ | false | false | 2,052 | cpp | void rioreceive::init()
{
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
std::cerr << "Error: Could not create socket" << std::endl;
} else {
std::memset((char*)&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(PORT);
if (bind(sockfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
std::cerr << "Error: could not bind socket" << std::endl;
}
}
}
unsigned int bytes_to_int(uint8_t *bytes, int &a) {
unsigned int ret_value = 0;
ret_value += (unsigned int)(*(bytes+a+0))<<24;//*0x1000000;
ret_value += (unsigned int)(*(bytes+a+1))<<16;//*0x10000;
ret_value += (unsigned int)(*(bytes+a+2))<<8;//*0x100;
ret_value += (unsigned int)(*(bytes+a+3));
a += 4;
return ret_value;
}
enum portion {
NONE,
CENTRE_XS,
ANGLES,
DISTANCES,
MESSAGE
};
void rioreceive::get(std::vector<int> ¢re_xs, std::vector<double> &angles, std::vector<double> &distances, std::string &message)
{
centre_xs.clear();
angles.clear();
distances.clear();
message = "";
uint8_t buff[1024];
std::memset(buff, 0, 1024);
recvfrom(sockfd, buff, 1024, 0, (struct sockaddr *)&addr, (unsigned int *)1024);
int data = 0, a = 0;
portion p = NONE;
for (int i = 0; i < 1024 && data != 0xE0F; i++) {
if (data == 0xEC5 || data == 0xDC5) {
p = CENTRE_XS;
} else if (data == 0xDE6) {
p = ANGLES;
} else if (data == 0xD15) {
p = DISTANCES;
} else if (data == 0xAC2) {
p = MESSAGE;
} else if (p == CENTRE_XS) {
centre_xs.push_back(data);
} else if (p == ANGLES) {
angles.push_back((double)data/1024-0.436332313);
} else if (p == DISTANCES) {
distances.push_back((double)data/1000);
} else if (p == MESSAGE) {
message += (char)data;
}
data = bytes_to_int(buff, a);
}
}
void rioreceive::test()
{
uint8_t buff[1024];
std::memset(buff, 0, 1024);
recvfrom(sockfd, buff, 1024, 0, (struct sockaddr *)&addr, (unsigned int *)1024);
int a = 0;
for (int i = 0; i < 256; i++) {
int thing = bytes_to_int(buff, a);
if (i != thing)
std::cout << i << " != " << thing << std::endl;
}
}
| [
"jaci.brunning@gmail.com"
] | jaci.brunning@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.