blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
247
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 4
111
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
58
| visit_date
timestamp[ns]date 2015-07-25 18:16:41
2023-09-06 10:45:08
| revision_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| github_id
int64 3.89k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 25
values | gha_event_created_at
timestamp[ns]date 2012-06-07 00:51:45
2023-09-14 21:58:52
⌀ | gha_created_at
timestamp[ns]date 2008-03-27 23:40:48
2023-08-24 19:49:39
⌀ | gha_language
stringclasses 159
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 7
10.5M
| extension
stringclasses 111
values | filename
stringlengths 1
195
| text
stringlengths 7
10.5M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fcb6b061a05cd53f464d35983aaf6855ec44881f
|
b7d4fc29e02e1379b0d44a756b4697dc19f8a792
|
/deps/boost/libs/algorithm/test/ordered_test.cpp
|
f2cbdd785920c918e8d5210bb2333ee1c4713f20
|
[
"GPL-1.0-or-later",
"MIT",
"BSL-1.0"
] |
permissive
|
vslavik/poedit
|
45140ca86a853db58ddcbe65ab588da3873c4431
|
1b0940b026b429a10f310d98eeeaadfab271d556
|
refs/heads/master
| 2023-08-29T06:24:16.088676
| 2023-08-14T15:48:18
| 2023-08-14T15:48:18
| 477,156
| 1,424
| 275
|
MIT
| 2023-09-01T16:57:47
| 2010-01-18T08:23:13
|
C++
|
UTF-8
|
C++
| false
| false
| 9,835
|
cpp
|
ordered_test.cpp
|
// Copyright (c) 2010 Nuovation System Designs, LLC
// Grant Erickson <gerickson@nuovations.com>
//
// Reworked by Marshall Clow; August 2010
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/ for latest version.
#include <algorithm>
#include <iostream>
#include <boost/algorithm/cxx11/is_sorted.hpp>
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
using namespace boost;
/* Preprocessor Defines */
#define elementsof(v) (sizeof (v) / sizeof (v[0]))
#define a_begin(v) (&v[0])
#define a_end(v) (v + elementsof (v))
#define a_range(v) v
#define b_e(v) a_begin(v),a_end(v)
namespace ba = boost::algorithm;
BOOST_CXX14_CONSTEXPR bool less( int x, int y ) { return x < y; }
static void
test_ordered(void)
{
BOOST_CXX14_CONSTEXPR const int strictlyIncreasingValues[] = { 1, 2, 3, 4, 5 };
BOOST_CXX14_CONSTEXPR const int randomValues[] = { 3, 6, 1, 2, 7 };
const int constantValues[] = { 1, 2, 2, 2, 5 };
int nonConstantArray[] = { 1, 2, 2, 2, 5 };
const int inOrderUntilTheEnd [] = { 0, 1, 2, 3, 4, 5, 6, 7, 6 };
// Begin/end checks
BOOST_CHECK ( ba::is_sorted (b_e(strictlyIncreasingValues)));
BOOST_CHECK ( !ba::is_sorted (b_e(randomValues)));
BOOST_CHECK ( ba::is_sorted (b_e(strictlyIncreasingValues), std::less<int>()));
BOOST_CHECK ( !ba::is_sorted (b_e(strictlyIncreasingValues), std::greater<int>()));
// Range checks
BOOST_CHECK ( ba::is_sorted (a_range(strictlyIncreasingValues)));
BOOST_CHECK ( !ba::is_sorted (a_range(randomValues)));
BOOST_CHECK ( ba::is_sorted (a_range(strictlyIncreasingValues), std::less<int>()));
BOOST_CHECK ( !ba::is_sorted (a_range(strictlyIncreasingValues), std::greater<int>()));
BOOST_CHECK ( ba::is_sorted_until ( b_e(strictlyIncreasingValues)) == a_end(strictlyIncreasingValues));
BOOST_CHECK ( ba::is_sorted_until ( b_e(strictlyIncreasingValues), std::less<int>()) == a_end(strictlyIncreasingValues));
BOOST_CHECK ( ba::is_sorted_until ( a_range(strictlyIncreasingValues)) == boost::end(strictlyIncreasingValues));
BOOST_CHECK ( ba::is_sorted_until ( a_range(strictlyIncreasingValues), std::less<int>()) == boost::end(strictlyIncreasingValues));
// Check for const and non-const arrays
BOOST_CHECK ( ba::is_sorted_until ( b_e(constantValues), std::less<int>()) == a_end(constantValues));
BOOST_CHECK ( ba::is_sorted_until ( a_range(constantValues), std::less<int>()) == boost::end(constantValues));
BOOST_CHECK ( ba::is_sorted_until ( b_e(nonConstantArray), std::less<int>()) == a_end(nonConstantArray));
BOOST_CHECK ( ba::is_sorted_until ( a_range(nonConstantArray), std::less<int>()) == boost::end(nonConstantArray));
BOOST_CHECK ( ba::is_sorted_until ( b_e(randomValues), std::less<int>()) == &randomValues[2] );
BOOST_CHECK ( ba::is_sorted_until ( b_e(randomValues)) == &randomValues[2] );
BOOST_CHECK ( ba::is_sorted_until ( a_range(randomValues), std::less<int>()) == &randomValues[2] );
BOOST_CHECK ( ba::is_sorted_until ( a_range(randomValues)) == &randomValues[2] );
BOOST_CHECK ( ba::is_sorted_until ( a_range(inOrderUntilTheEnd), std::less<int>()) == &inOrderUntilTheEnd[8] );
BOOST_CHECK ( ba::is_sorted_until ( a_range(inOrderUntilTheEnd)) == &inOrderUntilTheEnd[8] );
// For zero and one element collections, the comparison predicate should never be called
BOOST_CHECK ( ba::is_sorted_until ( a_begin(randomValues), a_begin(randomValues), std::equal_to<int>()) == a_begin(randomValues));
BOOST_CHECK ( ba::is_sorted_until ( a_begin(randomValues), a_begin(randomValues)) == a_begin(randomValues));
BOOST_CHECK ( ba::is_sorted_until ( a_begin(randomValues), a_begin(randomValues) + 1, std::equal_to<int>()) == a_begin(randomValues) + 1);
BOOST_CHECK ( ba::is_sorted_until ( a_begin(randomValues), a_begin(randomValues) + 1 ) == a_begin(randomValues) + 1);
BOOST_CXX14_CONSTEXPR bool constexpr_res = (
ba::is_sorted ( boost::begin(strictlyIncreasingValues), boost::end(strictlyIncreasingValues) )
&& !ba::is_sorted (a_range(randomValues))
&& ba::is_sorted_until ( boost::begin(strictlyIncreasingValues), boost::end(strictlyIncreasingValues), less) == a_end(strictlyIncreasingValues)
&& ba::is_sorted_until ( randomValues, less) == &randomValues[2]
);
BOOST_CHECK ( constexpr_res );
}
static void
test_increasing_decreasing(void)
{
BOOST_CXX14_CONSTEXPR const int strictlyIncreasingValues[] = { 1, 2, 3, 4, 5 };
BOOST_CXX14_CONSTEXPR const int strictlyDecreasingValues[] = { 9, 8, 7, 6, 5 };
BOOST_CXX14_CONSTEXPR const int increasingValues[] = { 1, 2, 2, 2, 5 };
BOOST_CXX14_CONSTEXPR const int decreasingValues[] = { 9, 7, 7, 7, 5 };
BOOST_CXX14_CONSTEXPR const int randomValues[] = { 3, 6, 1, 2, 7 };
BOOST_CXX14_CONSTEXPR const int constantValues[] = { 7, 7, 7, 7, 7 };
// Test a strictly increasing sequence
BOOST_CHECK ( ba::is_strictly_increasing (b_e(strictlyIncreasingValues)));
BOOST_CHECK ( ba::is_increasing (b_e(strictlyIncreasingValues)));
BOOST_CHECK ( !ba::is_strictly_decreasing (b_e(strictlyIncreasingValues)));
BOOST_CHECK ( !ba::is_decreasing (b_e(strictlyIncreasingValues)));
BOOST_CHECK ( ba::is_strictly_increasing (a_range(strictlyIncreasingValues)));
BOOST_CHECK ( ba::is_increasing (a_range(strictlyIncreasingValues)));
BOOST_CHECK ( !ba::is_strictly_decreasing (a_range(strictlyIncreasingValues)));
BOOST_CHECK ( !ba::is_decreasing (a_range(strictlyIncreasingValues)));
// Test a strictly decreasing sequence
BOOST_CHECK ( !ba::is_strictly_increasing (b_e(strictlyDecreasingValues)));
BOOST_CHECK ( !ba::is_increasing (b_e(strictlyDecreasingValues)));
BOOST_CHECK ( ba::is_strictly_decreasing (b_e(strictlyDecreasingValues)));
BOOST_CHECK ( ba::is_decreasing (b_e(strictlyDecreasingValues)));
// Test an increasing sequence
BOOST_CHECK ( !ba::is_strictly_increasing (b_e(increasingValues)));
BOOST_CHECK ( ba::is_increasing (b_e(increasingValues)));
BOOST_CHECK ( !ba::is_strictly_decreasing (b_e(increasingValues)));
BOOST_CHECK ( !ba::is_decreasing (b_e(increasingValues)));
// Test a decreasing sequence
BOOST_CHECK ( !ba::is_strictly_increasing (b_e(decreasingValues)));
BOOST_CHECK ( !ba::is_increasing (b_e(decreasingValues)));
BOOST_CHECK ( !ba::is_strictly_decreasing (b_e(decreasingValues)));
BOOST_CHECK ( ba::is_decreasing (b_e(decreasingValues)));
// Test a random sequence
BOOST_CHECK ( !ba::is_strictly_increasing (b_e(randomValues)));
BOOST_CHECK ( !ba::is_increasing (b_e(randomValues)));
BOOST_CHECK ( !ba::is_strictly_decreasing (b_e(randomValues)));
BOOST_CHECK ( !ba::is_decreasing (b_e(randomValues)));
// Test a constant sequence
BOOST_CHECK ( !ba::is_strictly_increasing (b_e(constantValues)));
BOOST_CHECK ( ba::is_increasing (b_e(constantValues)));
BOOST_CHECK ( !ba::is_strictly_decreasing (b_e(constantValues)));
BOOST_CHECK ( ba::is_decreasing (b_e(constantValues)));
// Test an empty sequence
BOOST_CHECK ( ba::is_strictly_increasing (strictlyIncreasingValues, strictlyIncreasingValues));
BOOST_CHECK ( ba::is_increasing (strictlyIncreasingValues, strictlyIncreasingValues));
BOOST_CHECK ( ba::is_strictly_decreasing (strictlyIncreasingValues, strictlyIncreasingValues));
BOOST_CHECK ( ba::is_decreasing (strictlyIncreasingValues, strictlyIncreasingValues));
// Test a one-element sequence
BOOST_CHECK ( ba::is_strictly_increasing (strictlyIncreasingValues, strictlyIncreasingValues+1));
BOOST_CHECK ( ba::is_increasing (strictlyIncreasingValues, strictlyIncreasingValues+1));
BOOST_CHECK ( ba::is_strictly_decreasing (strictlyIncreasingValues, strictlyIncreasingValues+1));
BOOST_CHECK ( ba::is_decreasing (strictlyIncreasingValues, strictlyIncreasingValues+1));
// Test a two-element sequence
BOOST_CHECK ( ba::is_strictly_increasing (strictlyIncreasingValues, strictlyIncreasingValues+2));
BOOST_CHECK ( ba::is_increasing (strictlyIncreasingValues, strictlyIncreasingValues+2));
BOOST_CHECK ( !ba::is_strictly_decreasing (strictlyIncreasingValues, strictlyIncreasingValues+2));
BOOST_CHECK ( !ba::is_decreasing (strictlyIncreasingValues, strictlyIncreasingValues+2));
BOOST_CXX14_CONSTEXPR bool constexpr_res = (
ba::is_increasing (boost::begin(increasingValues), boost::end(increasingValues))
&& ba::is_decreasing (boost::begin(decreasingValues), boost::end(decreasingValues))
&& ba::is_strictly_increasing (boost::begin(strictlyIncreasingValues), boost::end(strictlyIncreasingValues))
&& ba::is_strictly_decreasing (boost::begin(strictlyDecreasingValues), boost::end(strictlyDecreasingValues))
&& !ba::is_strictly_increasing (boost::begin(increasingValues), boost::end(increasingValues))
&& !ba::is_strictly_decreasing (boost::begin(decreasingValues), boost::end(decreasingValues))
);
BOOST_CHECK ( constexpr_res );
}
BOOST_AUTO_TEST_CASE( test_main )
{
test_ordered ();
test_increasing_decreasing ();
}
|
212fbc3738a1b467c7fa41cee6bd63a137d57889
|
d747f1a0577da9c17512a3ac331c4896e48b4f65
|
/h/import/wxf/wxfhelper.h
|
802a75bac9b162df8dd152f7466351fb12714990
|
[] |
no_license
|
LenyKholodov/wood
|
4cc470bdfe0c0fbc1c6383f91011461ae09d5497
|
3dbb8421acb24546859bbb63884e11173becd1af
|
refs/heads/master
| 2020-04-14T02:13:03.280422
| 2018-12-30T10:20:30
| 2018-12-30T10:20:30
| 163,578,511
| 0
| 0
| null | null | null | null |
IBM866
|
C++
| false
| false
| 3,053
|
h
|
wxfhelper.h
|
#ifndef __WXF_IMPORT_HELPERS__
#define __WXF_IMPORT_HELPERS__
#include <import\wxf\wxfbase.h>
class FrameReader;
class WXFNode;
/////////////////////////////////////////////////////////////////////////////////////////////
///Хелпер
/////////////////////////////////////////////////////////////////////////////////////////////
class WXFHelper
{
public:
enum Helpers {
BOX,
SPHERE,
CYLINDER,
DUMMY
};
Helpers type;
public:
WXFHelper (Helpers t) : type (t) { }
/////////////////////////////////////////////////////////////////////////////////////////////
///Присоединение крейтеров всех хелперов
/////////////////////////////////////////////////////////////////////////////////////////////
static void BindCreaters (FrameReader&,WXFNode&);
};
/////////////////////////////////////////////////////////////////////////////////////////////
///Шар
/////////////////////////////////////////////////////////////////////////////////////////////
class WXFHelperSphere: public WXFHelper
{
friend class WXFHelper;
public:
vertex_t c; //центр
float r; //радиус
public:
WXFHelperSphere () : WXFHelper (SPHERE) {}
private:
static WXFHelperSphere* Create (WXFHelperSphere*,FrameReader&,WXFNode&);
};
/////////////////////////////////////////////////////////////////////////////////////////////
///Цилиндр
/////////////////////////////////////////////////////////////////////////////////////////////
class WXFHelperCylinder: public WXFHelper
{
friend class WXFHelper;
public:
float r; //радиус
float height; //высота
vertex_t c; //центр
vector3d_t dir; //направление
WXFHelperCylinder () : WXFHelper (CYLINDER) {}
private:
static WXFHelperCylinder* Create (WXFHelperCylinder*,FrameReader&,WXFNode&);
};
/////////////////////////////////////////////////////////////////////////////////////////////
///Дамик
/////////////////////////////////////////////////////////////////////////////////////////////
class WXFHelperDummy: public WXFHelper
{
friend class WXFHelper;
public:
vertex_t c; //центр
vector3d_t dir; //направление
WXFHelperDummy () : WXFHelper (DUMMY) {}
private:
static WXFHelperDummy* Create (WXFHelperDummy*,FrameReader&,WXFNode&);
};
/////////////////////////////////////////////////////////////////////////////////////////////
///Коробка
/////////////////////////////////////////////////////////////////////////////////////////////
class WXFHelperBox: public WXFHelper
{
friend class WXFHelper;
public:
vertex_t c; //центр
vector3d_t dir; //направление
WXFHelperBox () : WXFHelper (BOX) {}
private:
static WXFHelperBox* Create (WXFHelperBox*,FrameReader&,WXFNode&);
};
#endif
|
6f21fc9b2f6fa28684d9ecb7328d0da14ce4fa91
|
bcaf817dbcf3510252b634b8c90f123e6b056121
|
/renumerar.cpp
|
431b55cc5bcbe4b29e92687ca2947e8b168bb34f
|
[] |
no_license
|
tianyayouge/keme5
|
16ba5dbc8b33f2f8af3002f4760a329954b11fc0
|
b0e4d39c359a925328d6da0df1b69fd889ed7d3d
|
refs/heads/master
| 2023-05-07T13:02:59.544384
| 2018-09-16T16:53:11
| 2018-09-16T16:55:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,347
|
cpp
|
renumerar.cpp
|
/* ----------------------------------------------------------------------------------
KEME-Contabilidad; aplicación para llevar contabilidades
Copyright (C) José Manuel Díez Botella
Este programa es software libre: usted puede redistribuirlo y/o modificarlo
bajo los términos de la Licencia Pública General GNU publicada
por la Fundación para el Software Libre, ya sea la versión 3
de la Licencia, o (a su elección) cualquier versión posterior.
Este programa se distribuye con la esperanza de que sea útil, pero
SIN GARANTÍA ALGUNA; ni siquiera la garantía implícita
MERCANTIL o de APTITUD PARA UN PROPÓSITO DETERMINADO.
Consulte los detalles de la Licencia Pública General GNU para obtener
una información más detallada.
Debería haber recibido una copia de la Licencia Pública General GNU
junto a este programa.
En caso contrario, consulte <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------------*/
#include "renumerar.h"
#include <QSqlQuery>
#include "funciones.h"
#include "basedatos.h"
#include <QMessageBox>
renumerar::renumerar() : QDialog() {
ui.setupUi(this);
QSqlQuery query = basedatos::instancia()->selectCodigoejerciciosordercodigo();
QStringList ej1;
if ( query.isActive() ) {
while ( query.next() )
ej1 << query.value(0).toString();
}
ui.ejerciciocomboBox->addItems(ej1);
connect(ui.aceptarpushButton,SIGNAL(clicked()),SLOT(procesar()));
connect(ui.ejerciciogroupBox,SIGNAL(toggled(bool)),SLOT(ejercicioboxcambiado()));
connect(ui.apfechagroupBox,SIGNAL(toggled(bool)),SLOT(apboxcambiado()));
ui.fechadateEdit->setDate(QDate::currentDate());
}
void renumerar::ejercicioboxcambiado()
{
ui.apfechagroupBox->disconnect(SIGNAL(toggled(bool) ));
if (ui.ejerciciogroupBox->isChecked())
ui.apfechagroupBox->setChecked(false);
else
ui.apfechagroupBox->setChecked(true);
connect(ui.apfechagroupBox,SIGNAL(toggled(bool)),SLOT(apboxcambiado()));
}
void renumerar::apboxcambiado()
{
ui.ejerciciogroupBox->disconnect(SIGNAL(toggled(bool) ));
if (ui.apfechagroupBox->isChecked())
ui.ejerciciogroupBox->setChecked(false);
else
ui.ejerciciogroupBox->setChecked(true);
connect(ui.ejerciciogroupBox,SIGNAL(toggled(bool)),SLOT(ejercicioboxcambiado()));
}
void renumerar::procesar()
{
// la renumeración se va a reducir a los números de asientos
// no vamos a tocar los pases
// averiguamos último número de asiento
QDate inicioej;
ui.ejerciciogroupBox->isChecked() ? inicioej=inicioejercicio(ui.ejerciciocomboBox->currentText()) :
inicioej=ui.fechadateEdit->date();
qlonglong vnum=0;
// máximo número de asiento con fecha menor que inicioej
// sólo válido para renumerar por fecha
QString ejercicio;
if (!ui.ejerciciogroupBox->isChecked())
{
vnum = basedatos::instancia()->selectMaxasientofecha(inicioej);
vnum++;
ejercicio=ejerciciodelafecha(inicioej);
}
else
{
vnum=1;
// vnum = basedatos::instancia()->min_asiento(ui.ejerciciocomboBox->currentText());
ejercicio=ui.ejerciciocomboBox->currentText();
}
// reemplazamos los asientos a partir de la fecha de inicio de ejercicio
int aprocesar = basedatos::instancia()->selectCountasientodiariofecha(inicioej); // del ejercicio de la fecha
ui.progressBar->setMaximum(aprocesar);
QSqlQuery query = basedatos::instancia()->selectAsientopasediariofechaorderfechaasientopase(inicioej);
qlonglong asientoguarda=0;
int pos=0;
bool actualizadoamort=false;
if ( query.isActive() ) {
while (query.next() )
{
pos++;
ui.progressBar->setValue(pos);
if (asientoguarda==0) asientoguarda=query.value(0).toLongLong();
if (asientoguarda!=query.value(0).toLongLong())
{
vnum++;
asientoguarda=query.value(0).toLongLong();
}
QString cadnum; cadnum.setNum(vnum);
// asiento en amortcontable ??
if (basedatos::instancia()->esasientodeamort(query.value(0).toString(),
ejercicio))
{
// QMessageBox::information( this, tr("RENUMERAR"),);
if (!actualizadoamort)
{
basedatos::instancia()->renum_amortiz (query.value(0).toString(), cadnum,
ejercicio);
actualizadoamort=true;
}
}
basedatos::instancia()->cambia_asiento_a_pase (query.value(1).toString(),
cadnum);
}
}
// actualizamos los valores de próximo asiento y próximo pase en configuración
vnum++;
QString cadnum;
cadnum.setNum(vnum);
basedatos::instancia()->update_ejercicio_prox_asiento(ejercicio, cadnum);
QMessageBox::information( this, tr("RENUMERAR"),
tr("El proceso ha concluido."));
ui.progressBar->reset();
accept();
}
|
d3a25fd483ec59fdb73c702b1544ef42d8e603cc
|
18af6a7d6561fa226a157078188283c9c65d5a97
|
/56.Merge_Intervals.cpp
|
fdbe8f4e8ed9c139b83bc3b0e99a8a8dda7689c6
|
[] |
no_license
|
shobhit-saini/Leet_Code
|
cc8980c7b1b57087ad6568a1e81bbf291e00afad
|
204d48f31aa2a4bd459f97c896c9fe594eb6ca07
|
refs/heads/master
| 2021-02-05T17:27:09.452448
| 2020-09-22T10:36:29
| 2020-09-22T10:36:29
| 243,809,137
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,176
|
cpp
|
56.Merge_Intervals.cpp
|
/*
Given a collection of intervals, merge all overlapping intervals.
Example 1:
Input: [[1,3],[2,6],[8,10],[15,18]]
Output: [[1,6],[8,10],[15,18]]
Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6].
Example 2:
Input: [[1,4],[4,5]]
Output: [[1,5]]
Explanation: Intervals [1,4] and [4,5] are considered overlapping.
NOTE: input types have been changed on April 15, 2019. Please reset to default code definition to get new method signature.
*/
class Solution {
public:
bool static comp( vector<int>v1, vector<int>v2 )
{
return v1[0] < v2[0];
}
vector<vector<int>> merge(vector<vector<int>>& intervals) {
vector<vector<int>> res ;
if( intervals.size() == 0 )
return res;
sort( intervals.begin() , intervals.end(), comp ) ;
res.push_back(intervals[0]);
int size = intervals.size() , i , j ;
for( i = 1; i < size; i++ )
{
if( res.back()[1] < intervals[i][0] )
res.push_back(intervals[i]);
else
res.back()[1] = max(res.back()[1], intervals[i][1]);
}
return res;
}
};
|
04d9a06585ed1d04c00966fcabf58446b2c9aef7
|
e091e411012a603f14b58c3d05117b50312986c4
|
/Ninja Gaiden/Ninja Gaiden/Ryu.h
|
56c0fa83c55cd8387ced9b4a2875b9398ea324b2
|
[] |
no_license
|
phamphuckhai/GameDirectX
|
071e477d4cae8ab60303ec989f7bfa1f20ad6a4b
|
f34a72b0bee71112f52a1b0aa22a3e8a025a3a9b
|
refs/heads/master
| 2020-06-24T03:56:28.697876
| 2019-07-25T14:01:36
| 2019-07-25T14:01:36
| 198,841,279
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,040
|
h
|
Ryu.h
|
#pragma once
#include "GameObject.h"
#include "Global.h"
#include"Grid.h"
#include"Brick.h"
#include"SwordMan.h"
#include"Katana.h"
#include"Wall.h"
#include"Bird.h"
#include"Runner.h"
#include"Boss.h"
#include"Banshee.h"
#include"MachineGunGuy.h"
#include"Artillery.h"
class Ryu : public CGameObject
{
private:
int score;
static Ryu *m_instance;
int level;
int untouchable;
DWORD untouchable_start;
bool IsJump;
bool IsFighting;
bool IsHurt;
bool IsClimb;
float TimeFighting, TimeHurt;
public:
Ryu();
static Ryu *GetInstance();
int countmisc;
void LoadResource();
~Ryu();
virtual void Update(DWORD dt, vector<LPGAMEOBJECT> *colliable_objects = NULL);
virtual void Render();
void SetState(int state);
void SetLevel(int l) { level = l; }
void StartUntouchable() { untouchable = 1; untouchable_start = GetTickCount(); }
virtual void ResetObject();
virtual void GetBoundingBox(float &left, float &top, float &right, float &bottom);
void ReturnGround();
int GetHp();
void GetScore(int &sc) { sc = this->score; };
};
|
b115e1011f7c4235770a81eb66cafb5cec4230ad
|
6e9cfe7346b6a459f020675f5c9d998cac91a023
|
/Engine/Engine/Defines.hpp
|
fea7a04d04601cf85d6f1ae6ae3c7af40b89eec5
|
[
"MIT"
] |
permissive
|
Zach-Kauffman/Engine
|
388776dee6d072912a66c112cd4c1f4d17a8c5d7
|
cde95d21f8c41170dae6985743cc9eacae9c33ad
|
refs/heads/master
| 2021-01-21T08:06:05.677073
| 2016-04-21T05:46:43
| 2016-04-21T05:46:43
| 47,636,116
| 0
| 0
| null | 2015-12-08T16:56:52
| 2015-12-08T16:56:51
| null |
UTF-8
|
C++
| false
| false
| 196
|
hpp
|
Defines.hpp
|
//#define RUN_TESTS
//#define TEST_ALL
//#define TEST_UTILITIES
//#define TEST_LOGGING
//#define TEST_RESOURCE_GROUP
//#define TEST_RESOURCE_MANAGER
//#define TEST_INI_PARSER
#define LOG_CONSOLE
|
49e57932516eb945da2fdbab74583e9ba1241d9b
|
73c8a3179b944b63b2a798542896e4cdf0937b6e
|
/SPOJ/OSalaoDoClube.cc
|
d60796ec68fdbe3cf4ae05a1fcf79be3336e8b88
|
[
"Apache-2.0"
] |
permissive
|
aajjbb/contest-files
|
c151f1ab9b562ca91d2f8f4070cb0aac126a188d
|
71de602a798b598b0365c570dd5db539fecf5b8c
|
refs/heads/master
| 2023-07-23T19:34:12.565296
| 2023-07-16T00:57:55
| 2023-07-16T00:57:59
| 52,963,297
| 2
| 4
| null | 2017-08-03T20:12:19
| 2016-03-02T13:05:25
|
C++
|
UTF-8
|
C++
| false
| false
| 2,628
|
cc
|
OSalaoDoClube.cc
|
#include <bits/stdc++.h>
template<typename T> T gcd(T a, T b) {
if(!b) return a;
return gcd(b, a % b);
}
template<typename T> T lcm(T a, T b) {
return a * b / gcd(a, b);
}
template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; }
template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; }
using namespace std;
typedef long long Int;
typedef unsigned long long uInt;
typedef unsigned uint;
const long long INF = 998244353LL;
int getCount(const int goal_len, int count, const vector<int>& TB) {
int ans = 0;
map<int, int> cnt;
for (int i = 0; i < TB.size(); i++) {
cnt[TB[i]] += 1;
}
for (int i = 0; count > 0 && i < TB.size(); i++) {
if (TB[i] == goal_len) {
if (cnt[TB[i]] > 0) {
ans += 1;
cnt[TB[i]] -= 1;
count -= 1;
}
} else if (TB[i] * 2 == goal_len) {
if (cnt[TB[i]] >= 2) {
ans += 2;
cnt[TB[i]] -= 2;
count -= 1;
}
} else {
int needed = goal_len - TB[i];
assert(needed != TB[i]);
if (needed < 0) {
continue;
}
assert(needed + TB[i] == goal_len);
if (cnt[needed] > 0 && cnt[TB[i]] > 0) {
ans += 2;
cnt[needed] -= 1;
cnt[TB[i]] -= 1;
count -= 1;
}
}
}
// cout << goal_len << " - " << count << " " << ans << endl;
if (count == 0) {
return ans;
} else {
return INF;
}
}
int main(void) {
cin.tie(0);
ios_base::sync_with_stdio(false);
int N, M, L, K;
while (cin >> N >> M && !(N == 0 && M == 0)) {
cin >> L >> K;
vector<int> TB(K);
for (int i = 0; i < K; i++) {
cin >> TB[i];
}
sort(TB.rbegin(), TB.rend());
int hor = INF;
if ((M * 100) % L == 0) {
//hor = min(getCount(N, (M * 100) / L), getCount((M * 100) / L, N));
hor = getCount(N, (M * 100) / L, TB);
}
int ver = INF;
if ((N * 100) % L == 0) {
//ver = min(getCount(M, (N * 100) / L), getCount((N * 100) / L, M));
ver = getCount(M, (N * 100) / L, TB);
}
int res = min(hor, ver);
if (res == INF) {
cout << "impossivel\n";
} else {
cout << res << "\n";
}
}
return 0;
}
|
cb02ade34869bc6db3a4ee32d58b7b75efa5731d
|
de75ba945d56338bcb13fb0019d34925ad75bb0c
|
/c++_implementation/server/frameprovider.cpp
|
a0a7e1c7c969ce58774f6fe9de01de92efeba0bc
|
[] |
no_license
|
ianzur/mazuMedical
|
acb1d21c43927cad067364a247d958a597ba1124
|
5968c42eec71c413ce1751cab3b752de10caddcb
|
refs/heads/master
| 2022-01-11T12:52:53.431986
| 2021-12-22T22:31:53
| 2021-12-22T22:31:53
| 131,194,367
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 899
|
cpp
|
frameprovider.cpp
|
#include "frameprovider.h"
#include <vector>
#include "opencv2/imgcodecs.hpp"
FrameProvider::FrameProvider(QObject *parent)
: Provider(parent)
{
qDebug() << "frameProvider creation";
}
void FrameProvider::frameReady(cv::Mat &img)
{
// qDebug() << "frameReady slot filled";
// qDebug() << img.empty();
std::vector<uchar> encoded;
//convert Mat to jpg
std::vector <int> compression_params;
compression_params.push_back(cv::IMWRITE_JPEG_QUALITY);
compression_params.push_back(jpgQual);
cv::imencode(".jpg", img, encoded, compression_params);
QByteArray buf; // = reinterpret_cast<const char*>(encoded.data()), encoded.size());
QDataStream ds(&buf, QIODevice::WriteOnly);
ds.writeRawData((const char*) encoded.data(), encoded.size());
// qDebug() << buf.size();
emit writeDatagram(0, buf);
// qDebug() << "frame sent to client";
}
|
e8b7cc4507d6a3913841ab180f9f77e1c6be8d21
|
785a191ab5345e322442a2bc91085dfd7dd02f84
|
/src/game/ctt/resources/models/ModelLib.cpp
|
793b3612c95c3702601a9ce6bf257d5ced12af18
|
[] |
no_license
|
EryksProjectsArchive/CTTGame
|
5e37e47a9440d41da37c69cdc4aefc911608ae06
|
125830260de19e42d714810cac11d0681dd9c9af
|
refs/heads/master
| 2021-01-01T20:48:08.945909
| 2015-06-23T20:21:19
| 2015-06-23T20:21:19
| 98,935,549
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,287
|
cpp
|
ModelLib.cpp
|
//////////////////////////////////////////////
//
// City Transport Tycoon
// Copyright (C) Black Ice Mountains
// All rights reserved
//
// File : resources/models/ModelLib.cpp
// Author : Eryk Dwornicki
//
//////////////////////////////////////////////
#include "ModelLib.h"
#include <graphics/Model.h>
#include <core/DynString.h>
#include <io/fs/FileSystem.h>
#include <graphics/ModelFormat.h>
ModelLib::ModelLib()
{
}
ModelLib::~ModelLib()
{
for (Model *model : m_models)
delete model;
m_models.clear();
}
Model * ModelLib::findByName(const DynString& name)
{
for (Model *model : m_models)
{
if (model->m_name == name)
return model;
}
Model *model = 0;
FilePath path("models/%s.mdl", name.get());
File *file = FileSystem::get()->open(path, FileOpenMode::Read | FileOpenMode::Binary);
if (file->isLoaded())
{
mdl m;
file->read(&m, 1, sizeof(mdl) - sizeof(m.meshes));
if (!memcmp(m.id, "CTTMDL", 6) && m.version == MODEL_FORMAT_VERSION)
{
model = new Model(name, path);
m_models.pushBack(model);
}
else
{
Info("ModelLib", "Cannot load %s. (Version: %X)", name.get(), m.version);
}
}
FileSystem::get()->close(file);
if (!model)
{
Error("ModelLib", "Unable to find model '%s'!.", name.get());
}
return model;
}
|
426f8553c756b7a82d87f17fc63ff5b339ffd49d
|
dfee0e625d58428c5224696c961319a2468687a8
|
/CSAcademy/Round54/pair-swap.cpp
|
a516d7721b3f8800afb2e5829c9cfeb1ac66d108
|
[] |
no_license
|
ia7ck/competitive-programming
|
5f0853811d6892d9d98e9b03287d198d9f61aaa9
|
09be20068c3a6a39d16047c867d405b30514b0e2
|
refs/heads/master
| 2023-09-04T01:29:17.229669
| 2023-09-02T13:58:13
| 2023-09-02T13:58:13
| 150,092,904
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 788
|
cpp
|
pair-swap.cpp
|
#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
#define rep(i, n) for(int i=0; i<(int)(n); i++)
int main(){
int n, k; cin>> n>> k;
vector<int> a(n);
rep(i, n) cin>> a[i];
rep(i, n) a.push_back(1e9);
set<pair<int, int>> s;
rep(i, n*2){
if(i<k){
s.insert({a[i], -i});
}else if(i>=n){
if(i-k<n){
auto mn=*s.begin();
if(mn.first<a[i-k]){
swap(a[i-k], a[-mn.second]);
break;
}
s.erase({a[i-k], -(i-k)});
}
}else{
s.insert({a[i], -i});
auto mn=*s.begin();
if(mn.first<a[i-k]){
swap(a[i-k], a[-mn.second]);
break;
}
s.erase({a[i-k], -(i-k)});
}
}
rep(i, n) cout<< a[i]<< "\n "[i+1<n];
return 0;
}
|
4b1954e2c73ea50299a31c63654bf60243aebffe
|
ae15ca61a82f6d7dc95b4a012400ff713aba003f
|
/src/immutable/pageId.hpp
|
0a7c9494fafd43cce34a768edd2e47a5f1869c9f
|
[
"MIT"
] |
permissive
|
smichniak/page_rank
|
38082b838cd8ebb3bac34b08eb1c3af3745e56f8
|
2f29ee7a24ec85fc23f30d91a4283d8fb78a00ae
|
refs/heads/main
| 2023-03-17T09:22:57.774899
| 2021-03-06T15:05:38
| 2021-03-06T15:05:38
| 339,130,906
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 722
|
hpp
|
pageId.hpp
|
#ifndef PAGE_ID_HPP_
#define PAGE_ID_HPP_
#include <string>
class PageId {
public:
PageId(std::string const& idArg) : id(idArg) {
}
bool operator==(PageId const& other) const {
return this->id == other.id;
}
private:
std::string id;
friend std::ostream& operator<<(std::ostream& out, PageId const& pageId);
friend class PageIdHash;
// For tests only
friend class PageIdAndRankComparable;
};
class PageIdHash {
public:
std::size_t operator()(PageId const& pageId) const {
return std::hash<std::string>{}(pageId.id);
};
};
std::ostream& operator<<(std::ostream& out, PageId const& pageId) {
out << pageId.id;
return out;
}
#endif // PAGE_ID_HPP_
|
860e94d84e297e8c2e3521e8af4667a5bd920688
|
84a4b043bb72cbf3cd5a1adcba922a5960a3d425
|
/Src/multMEF.cpp
|
87e2e20e606c879dde34be4813b1b676779c27bf
|
[
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] |
permissive
|
q86091483/PeleAnalysis
|
2aef2959b08522738627eca7fbdc3a757e31c50a
|
23a6af538122ea8e67c678d0892f54b819b5e035
|
refs/heads/master
| 2023-08-04T02:04:39.458158
| 2023-07-13T19:41:28
| 2023-07-13T19:41:28
| 156,210,178
| 0
| 0
|
NOASSERTION
| 2018-11-05T11:53:20
| 2018-11-05T11:53:20
| null |
UTF-8
|
C++
| false
| false
| 5,932
|
cpp
|
multMEF.cpp
|
#include "winstd.H"
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <map>
#include "ParmParse.H"
#include "MultiFab.H"
#include "VisMF.H"
#include "ParallelDescriptor.H"
#include "DataServices.H"
#include "Geometry.H"
#include "Utility.H"
using std::vector;
using std::map;
using std::string;
using std::cerr;
using std::endl;
using std::cout;
using std::ofstream;
void
read_iso(const std::string& infile,
FArrayBox& nodes,
Array<int>& faceData,
int& nElts,
vector<string>& names,
string& label);
void
write_iso(const std::string& outfile,
const FArrayBox& nodes,
const Array<int>& faceData,
int nElts,
const vector<string>& names,
const string& label);
vector<std::string>
Tokenize (const std::string& instr, const std::string& separators)
{
vector<char*> ptr;
//
// Make copy of line that we can modify.
//
char* line = new char[instr.size()+1];
(void) strcpy(line, instr.c_str());
char* token = 0;
if (!((token = strtok(line, separators.c_str())) == 0))
{
ptr.push_back(token);
while (!((token = strtok(0, separators.c_str())) == 0))
ptr.push_back(token);
}
vector<std::string> tokens(ptr.size());
for (int i = 1; i < ptr.size(); i++)
{
char* p = ptr[i];
while (strchr(separators.c_str(), *(p-1)) != 0)
*--p = 0;
}
for (int i = 0; i < ptr.size(); i++)
tokens[i] = ptr[i];
delete line;
return tokens;
}
static
std::vector<std::string> parseVarNames(std::istream& is)
{
std::string line;
std::getline(is,line);
return Tokenize(line,std::string(", "));
}
static std::string parseTitle(std::istream& is)
{
std::string line;
std::getline(is,line);
return line;
}
int
main (int argc,
char* argv[])
{
BoxLib::Initialize(argc,argv);
ParmParse pp;
int nElts;
string infile; pp.get("infile",infile);
string outfile; pp.get("outfile",outfile);
FArrayBox nodes;
Array<int> faceData;
vector<string> names;
string label;
read_iso(infile,nodes,faceData,nElts,names,label);
int nodesPerElt = faceData.size() / nElts;
BL_ASSERT(nodesPerElt*nElts == faceData.size());
nElts = faceData.size() / nodesPerElt;
int nCompMEF = nodes.nComp();
BL_ASSERT(nElts*nodesPerElt == faceData.size());
Array<int> comps;
int nComp=0;
if (nComp = pp.countval("comps"))
{
comps.resize(nComp);
pp.getarr("comps",comps,0,nComp);
}
else
{
int sComp = 0;
pp.query("sComp",sComp);
nComp = 1;
pp.query("nComp",nComp);
BL_ASSERT(sComp+nComp <= nCompMEF);
comps.resize(nComp);
for (int i=0; i<nComp; ++i)
comps[i] = sComp + i;
}
FArrayBox nodesOut(nodes.box(),1);
vector<string> namesOut(1);
namesOut[0] = "product"; pp.query("nameOut",namesOut[0]);
nodesOut.setVal(1.0); // Initialize to 1
Real* datOut = nodesOut.dataPtr(0);
int nNodes = nodes.box().numPts();
for (int j=0; j<nComp; ++j)
{
BL_ASSERT(comps[j]<nCompMEF);
Real* dat=nodes.dataPtr(comps[j]);
for (int i=0; i<nNodes; ++i)
datOut[i] *= dat[i];
}
write_iso(outfile,nodesOut,faceData,nElts,namesOut,label);
BoxLib::Finalize();
return 0;
}
void
write_iso(const std::string& outfile,
const FArrayBox& nodes,
const Array<int>& faceData,
int nElts,
const vector<string>& names,
const string& label)
{
// Rotate data to vary quickest on component
int nCompSurf = nodes.nComp();
int nNodes = nodes.box().numPts();
FArrayBox tnodes(nodes.box(),nCompSurf);
const Real** np = new const Real*[nCompSurf];
for (int j=0; j<nCompSurf; ++j)
np[j] = nodes.dataPtr(j);
Real* ndat = tnodes.dataPtr();
for (int i=0; i<nNodes; ++i)
{
for (int j=0; j<nCompSurf; ++j)
{
ndat[j] = np[j][i];
}
ndat += nCompSurf;
}
delete [] np;
std::ofstream ofs;
ofs.open(outfile.c_str(),std::ios::out|std::ios::trunc|std::ios::binary);
ofs << label << endl;
for (int i=0; i<nCompSurf; ++i)
{
ofs << names[i];
if (i < nCompSurf-1)
ofs << " ";
else
ofs << std::endl;
}
int nodesPerElt = faceData.size() / nElts;
ofs << nElts << " " << nodesPerElt << endl;
tnodes.writeOn(ofs);
ofs.write((char*)faceData.dataPtr(),sizeof(int)*faceData.size());
ofs.close();
}
void
read_iso(const std::string& infile,
FArrayBox& nodes,
Array<int>& faceData,
int& nElts,
vector<string>& names,
string& label)
{
std::ifstream ifs;
ifs.open(infile.c_str(),std::ios::in|std::ios::binary);
label = parseTitle(ifs);
names = parseVarNames(ifs);
const int nCompSurf = names.size();
int nodesPerElt;
ifs >> nElts;
ifs >> nodesPerElt;
FArrayBox tnodes;
tnodes.readFrom(ifs);
const int nNodes = tnodes.box().numPts();
// "rotate" the data so that the components are 'in the right spot for fab data'
nodes.resize(tnodes.box(),nCompSurf);
Real** np = new Real*[nCompSurf];
for (int j=0; j<nCompSurf; ++j)
np[j] = nodes.dataPtr(j);
Real* ndat = tnodes.dataPtr();
for (int i=0; i<nNodes; ++i)
{
for (int j=0; j<nCompSurf; ++j)
{
np[j][i] = ndat[j];
}
ndat += nCompSurf;
}
delete [] np;
tnodes.clear();
faceData.resize(nElts*nodesPerElt,0);
ifs.read((char*)faceData.dataPtr(),sizeof(int)*faceData.size());
}
|
30f87ba77f90f34fef75fef12def14f295c5ec03
|
4432adbed64c4fc00ffdf3ebd8d2b52842da33d9
|
/Client/include/CreateAccountViewModel.h
|
affa7cdde524686f0fbc803194672f99bb091849
|
[] |
no_license
|
Raidero/TIN_project
|
3bf639dabeedf66e8efb43b709c3dc8099a683b2
|
abe3b62f7ef6e09ab91913de9ac5f2fe424ec256
|
refs/heads/master
| 2021-08-09T02:08:09.898883
| 2018-05-30T16:07:36
| 2018-05-30T16:07:36
| 126,076,430
| 1
| 1
| null | 2018-05-30T16:07:37
| 2018-03-20T20:12:28
|
C++
|
UTF-8
|
C++
| false
| false
| 361
|
h
|
CreateAccountViewModel.h
|
#ifndef CREATEACCOUNTVIEWMODEL_H
#define CREATEACCOUNTVIEWMODEL_H
#include "LoginViewModel.h"
class CreateAccountViewModel: public LoginViewModel
{
public:
CreateAccountViewModel(ViewModel* mvm);
virtual ~CreateAccountViewModel();
void buttonPressed(int i);
void refresh(int message);
};
#endif // CREATEACCOUNTVIEWMODEL_H
|
9e066bf1845e9618fcd60a911ca2700abbb3fc29
|
c89e122e553fd5f886febf9233ad920804304154
|
/samplecode/var_initialization.cpp
|
fb8df13335ef955a47f2a482837e8536876277cc
|
[] |
no_license
|
prabhash1785/Cpp
|
ef6eaf2b14cdc040940a665b598efba0e0a68310
|
9534df99a53710773a28f601b827734fd4978236
|
refs/heads/master
| 2021-04-19T00:58:55.876380
| 2021-04-04T00:00:38
| 2021-04-04T00:00:38
| 30,288,796
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 260
|
cpp
|
var_initialization.cpp
|
#include <iostream>
using namespace std;
int main() {
int a = 3;
int b(5);
//int c{10}; //this type of uniform initialization is failing while compiling with g++
int c(10);
int result = a + b + c;
cout << "result: " << result << '\n';
return 0;
}
|
27f35fb236c674f2887b0555a5f557e6a612c8ba
|
670cc962162aad7d92f6d9d0721dc41a65209de1
|
/parciales/2017/Personalizable.h
|
f3080c928a31b41d09b410e98c316598c3c65e89
|
[] |
no_license
|
Zarakinoa/Design-Patterns
|
1d133764ae9b16fb8fecb1c000be533741dccbac
|
e141146b15d22f09aa670815b9a2c16dbb0c8257
|
refs/heads/master
| 2022-02-19T04:02:13.075807
| 2019-09-25T03:42:33
| 2019-09-25T03:42:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 384
|
h
|
Personalizable.h
|
#include "Producto.h"
#include "Componente.h"
#include <string>
using namespace std;
class Personalizable : public Producto{
private:
float precioItem;
map<string,Componente*> componentes;
public:
void setPrecioItem(float);
void nuevoComp(string);
void elimComp(string);
void nuevaOpComp(string , string , float);
Personalizable(int);
virtual ~Personalizable();
}
|
d9d5b8ab339fed3bf7760eee23000ddc1dd7d4d1
|
e985851ba6d4e9745fb02dfcc270169fc71c5c75
|
/leviathan/src/renderer/context.cpp
|
ef6e552d50370afbfb11b99e8986a357dac3cbf9
|
[
"MIT"
] |
permissive
|
backwardspy/leviathan
|
7140ce04ddad3ae901b143eeda5746f8ce1413ae
|
bfa26f7fabc181fcd945ed6711b596eeae493d3c
|
refs/heads/master
| 2023-03-14T23:18:57.155398
| 2020-11-08T21:33:34
| 2020-11-08T21:33:34
| 307,211,467
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 206
|
cpp
|
context.cpp
|
#include "leviathan/lvpch.h"
#include "leviathan/renderer/context.h"
namespace lv {
ref<lv::Material> Context::make_material(ref<Shader> shader) {
return make_ref<lv::Material>(shader);
}
}
|
58b6787ddc08527979a6ec161aae147252b50889
|
8947812c9c0be1f0bb6c30d1bb225d4d6aafb488
|
/02_Library/Include/XMCocos2D-v3/shaders/CCShaderCache.h
|
1631df4a14512315e0c67bffd2b4e1a478e1e207
|
[
"MIT"
] |
permissive
|
alissastanderwick/OpenKODE-Framework
|
cbb298974e7464d736a21b760c22721281b9c7ec
|
d4382d781da7f488a0e7667362a89e8e389468dd
|
refs/heads/master
| 2021-10-25T01:33:37.821493
| 2016-07-12T01:29:35
| 2016-07-12T01:29:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,175
|
h
|
CCShaderCache.h
|
/* -----------------------------------------------------------------------------------
*
* File CCShaderCache.h
* Ported By Young-Hwan Mun
* Contact xmsoft77@gmail.com
*
* -----------------------------------------------------------------------------------
*
* Copyright (c) 2010-2014 XMSoft
* Copyright (c) 2010-2013 cocos2d-x.org
* Copyright (c) 2011 Ricardo Quesada
* Copyright (c) 2011 Zynga Inc.
*
* http://www.cocos2d-x.org
*
* -----------------------------------------------------------------------------------
*
* 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.
*
* --------------------------------------------------------------------------------- */
#ifndef __CCShaderCache_h__
#define __CCShaderCache_h__
#include <string>
#include <unordered_map>
#include "../base/CCDictionary.h"
NS_CC_BEGIN
class GLProgram;
/**
* @addtogroup shaders
* @{
*/
/**
* ShaderCache
* Singleton that stores manages GL shaders
* @since v2.0
*/
class CC_DLL ShaderCache : public Object
{
public :
/**
* @js ctor
*/
ShaderCache ( KDvoid );
/**
* @js NA
* @lua NA
*/
virtual ~ShaderCache ( KDvoid );
/** returns the shared instance */
static ShaderCache* getInstance ( KDvoid );
/** purges the cache. It releases the retained instance. */
static KDvoid destroyInstance ( KDvoid );
/** loads the default shaders */
KDvoid loadDefaultShaders ( KDvoid );
/** reload the default shaders */
KDvoid reloadDefaultShaders ( KDvoid );
/**
* returns a GL program for a given key
*/
GLProgram* getProgram ( const std::string& key );
/** adds a GLProgram to the cache for a given name */
KDvoid addProgram ( GLProgram* program, const std::string& key );
private :
KDbool init ( KDvoid );
KDvoid loadDefaultShader ( GLProgram* program, KDint type );
std::unordered_map<std::string, GLProgram*> m_aPrograms;
};
// end of shaders group
/// @}
NS_CC_END
#endif // __CCShaderCache_h__
|
d0e4959d0a8a0772752a723336b179f028b97b14
|
eacab7e9daab5f0229199d41530bd64140a49880
|
/bcos-executor/src/executive/ExecutiveFactory.h
|
b49650df33ff6b940aca3228332177f98d4f2826
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
JimmyShi22/FISCO-BCOS
|
fce2d081cc3c676178a9cdaf9f4253d0b05b56ad
|
b8b628f36674ad1fdcbda429581b253af664cf75
|
refs/heads/feature-3.1.0
| 2023-08-19T08:48:53.172782
| 2022-10-11T03:55:28
| 2022-10-11T03:56:13
| 133,357,877
| 3
| 2
|
Apache-2.0
| 2022-10-11T16:58:29
| 2018-05-14T12:33:15
|
C++
|
UTF-8
|
C++
| false
| false
| 2,568
|
h
|
ExecutiveFactory.h
|
/*
* Copyright (C) 2022 FISCO BCOS.
* SPDX-License-Identifier: Apache-2.0
* 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.
*
* @brief factory of executive
* @file ExecutiveFactory.h
* @author: jimmyshi
* @date: 2022-03-22
*/
#pragma once
#include "../executor/TransactionExecutor.h"
#include <tbb/concurrent_unordered_map.h>
#include <atomic>
#include <stack>
namespace bcos
{
namespace executor
{
class BlockContext;
class TransactionExecutive;
class ExecutiveFactory
{
public:
using Ptr = std::shared_ptr<ExecutiveFactory>;
ExecutiveFactory(std::shared_ptr<BlockContext> blockContext,
std::shared_ptr<std::map<std::string, std::shared_ptr<PrecompiledContract>>>
precompiledContract,
std::shared_ptr<std::map<std::string, std::shared_ptr<precompiled::Precompiled>>>
constantPrecompiled,
std::shared_ptr<const std::set<std::string>> builtInPrecompiled,
std::shared_ptr<wasm::GasInjector> gasInjector)
: m_precompiledContract(precompiledContract),
m_constantPrecompiled(constantPrecompiled),
m_builtInPrecompiled(builtInPrecompiled),
m_blockContext(blockContext),
m_gasInjector(gasInjector)
{}
virtual ~ExecutiveFactory() {}
virtual std::shared_ptr<TransactionExecutive> build(const std::string& _contractAddress,
int64_t contextID, int64_t seq, bool useCoroutine = true);
private:
void registerExtPrecompiled(std::shared_ptr<TransactionExecutive>& executive);
std::shared_ptr<std::map<std::string, std::shared_ptr<PrecompiledContract>>>
m_precompiledContract;
std::shared_ptr<std::map<std::string, std::shared_ptr<precompiled::Precompiled>>>
m_constantPrecompiled;
std::shared_ptr<const std::set<std::string>> m_builtInPrecompiled;
std::map<std::string, std::shared_ptr<precompiled::Precompiled>, std::less<>> m_extPrecompiled;
std::weak_ptr<BlockContext> m_blockContext;
std::shared_ptr<wasm::GasInjector> m_gasInjector;
};
} // namespace executor
} // namespace bcos
|
b5a1ede1099aa8205d7f2ccc22c3c43fdde2b8d2
|
4fd1895f96c0051c74a8d729c784337ffb82bdca
|
/tutorial-fortran/00_hello_world/hello_world.cc
|
33220675d06b04350d74b32ec4b875bd4573a6ff
|
[
"Apache-2.0"
] |
permissive
|
eddy16112/legion
|
aa31263b5b0f5d6bd03a9e7736e43a11ee9782d9
|
585e16209c54392527069457a3cb50abbb413ba4
|
refs/heads/stable
| 2021-12-01T15:18:04.751952
| 2017-07-14T22:04:07
| 2017-07-14T22:04:07
| 96,564,980
| 0
| 0
| null | 2017-12-07T17:46:45
| 2017-07-07T18:22:56
|
C++
|
UTF-8
|
C++
| false
| false
| 3,942
|
cc
|
hello_world.cc
|
/* Copyright 2017 Stanford University
*
* 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 <cstdio>
#include "legion.h"
// All of the important user-level objects live
// in the Legion namespace.
using namespace Legion;
// We use an enum to declare the IDs for user-level tasks
enum TaskID {
TOP_LEVEL_TASK_ID,
HELLO_WORLD_TASK_ID,
};
#ifdef __cplusplus
extern "C" {
void hello_world_task_f(int* rank, int* n, const char* cstring[], int* rt_val);
}
#endif
void top_level_task(const Task *task,
const std::vector<PhysicalRegion> ®ions,
Context ctx, Runtime *runtime)
{
int nb_tasks = 10;
{
const InputArgs &command_args = Runtime::get_input_args();
for (int i = 1; i < command_args.argc; i++)
{
if (!strcmp(command_args.argv[i],"-n"))
nb_tasks = atoi(command_args.argv[++i]);
}
}
for (int i = 0; i < nb_tasks; i++) {
TaskLauncher launcher(HELLO_WORLD_TASK_ID, TaskArgument(&i,sizeof(i)));
runtime->execute_task(ctx, launcher);
}
}
// All single-launch tasks in Legion must have this signature with
// the extension that they can have different return values.
void hello_world_task(const Task *task,
const std::vector<PhysicalRegion> ®ions,
Context ctx, Runtime *runtime)
{
assert(task->arglen == sizeof(int));
int rank = *(const int*)task->args;
const char* cstring[] = { "Hello", "World"};
int n = 2;
int rt_val = -1;
hello_world_task_f(&rank, &n, cstring, &rt_val);
assert(rt_val == rank);
}
// We have a main function just like a standard C++ program.
// Once we start the runtime, it will begin running the top-level task.
int main(int argc, char **argv)
{
// Before starting the Legion runtime, you first have to tell it
// what the ID is for the top-level task.
Runtime::set_top_level_task_id(TOP_LEVEL_TASK_ID);
// Before starting the Legion runtime, all possible tasks that the
// runtime can potentially run must be registered with the runtime.
// A task may have multiple variants (versions of the same code for
// different processors, data layouts, etc.) Each variant is
// registered described by a TaskVariantRegistrar object. The
// registrar takes a number of constraints which determine where it
// is valid to run the task variant. The ProcessorConstraint
// specifies the kind of processor on which the task can be run:
// latency optimized cores (LOC) aka CPUs or throughput optimized
// cores (TOC) aka GPUs. The function pointer is passed as a
// template argument to the preregister_task_variant call.
{
TaskVariantRegistrar registrar(TOP_LEVEL_TASK_ID, "top_level");
registrar.add_constraint(ProcessorConstraint(Processor::LOC_PROC));
Runtime::preregister_task_variant<top_level_task>(registrar, "top_level");
}
{
TaskVariantRegistrar registrar(HELLO_WORLD_TASK_ID, "hello_world");
registrar.add_constraint(ProcessorConstraint(Processor::LOC_PROC));
Runtime::preregister_task_variant<hello_world_task>(registrar, "hello_world");
}
// Now we're ready to start the runtime, so tell it to begin the
// execution. We'll never return from this call, but its return
// signature will return an int to satisfy the type checker.
return Runtime::start(argc, argv);
}
|
98540cfae7acc0962221291b13b2b5b4344edbcd
|
a52de2cfe5074fede1a0e74f404629e426b1c7c5
|
/Src/Control/request.h
|
8a1af2f0eb5554661d0752d87da2882f87c05259
|
[] |
no_license
|
bhunt2/QC1.0
|
cf953597bc0880914f64244169859c4529d8e328
|
26f7a5fce67cb2b54312f293ef1d2eb2921216a4
|
refs/heads/master
| 2021-03-19T11:45:14.022905
| 2016-06-08T22:23:11
| 2016-06-08T22:23:20
| 32,777,198
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 807
|
h
|
request.h
|
/****************************************************************
Drone Control and Automation Code
--------------------------------------------
Capstone Project: Object Following Drone
Sponsor: Benjamin Huntsman
Advisor: Dr. McNames, James
Written By: Sabin Maharjan
Date: May 2, 2016
Version: 1.0
Github: https://github.com/bhunt2/QC1.0/tree/master/Src/Control
*******************************************************************/
#include "msp_frames.h"
#include "protocol.h"
#include "parsers.h"
#ifndef REQUEST_H
#define REQUEST_H
class request
{
private:
protocol msp_protocol;
parsers parse;
public:
//request();
ident_frame request_ident();
attitude_frame request_attitude();
altitude_frame request_altitude();
raw_rc_frame request_rc_values();
};
#endif
|
10609447aa97130d7c1cc82d030cf845ede29d41
|
3ab8e0cd65557d274042758f1a3bfca29a1942e4
|
/Chapter 1 - Great software begins here/05. Guitar Inventory - Adding number of strings and delegating comaprison/src/guitar.hpp
|
e2b0fadca3a5af8ca3a7fbd8e59062140f575396
|
[] |
no_license
|
DangerDaisy/Headfirst_OOAD_CPP
|
b22bb2cae078f6346ceb94f9bbf431d1d2f485fa
|
7c310af475194cae17e23c59dcd90726f0a94931
|
refs/heads/master
| 2023-02-15T21:02:02.329289
| 2021-01-10T10:56:46
| 2021-01-10T10:56:46
| 328,359,244
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 373
|
hpp
|
guitar.hpp
|
#ifndef GUITAR_HPP
#define GUITAR_HPP
#include "guitar_spec.hpp"
//Guitar class
class Guitar
{
public:
Guitar(std::string serial_number, double price, Guitar_spec spec);
std::string get_serial_number();
double get_price();
Guitar_spec get_spec();
void set_price(double new_price);
private:
std::string serial_number;
double price;
Guitar_spec spec;
};
#endif
|
a3029353fdc35e3897a9d2a221809f37e57a59c9
|
3c3d0515ac7a9a764bd8446d281ee28751c7154a
|
/RunningAverageEA/RunningAverageEA.h
|
3ce3e043994318b13bd95c7e74cc0a5a3b24fdf6
|
[] |
no_license
|
CacheFactory/offroading_computer
|
8e1857277d87958daf8bb65e324c3804aafac3e4
|
85dd246df3d21e3e07cd278520c33d6937a6f5ac
|
refs/heads/master
| 2021-01-22T05:24:22.562818
| 2016-01-23T04:35:12
| 2016-01-23T04:35:12
| 27,775,498
| 1
| 3
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 973
|
h
|
RunningAverageEA.h
|
#ifndef RunningAverageEA_h
#define RunningAverageEA_h
//
// FILE: RunningAverageEA.h
// AUTHOR: Rob dot Tillaart at gmail dot com
// PURPOSE: RunningAverageEA library for Arduino
// URL: http://arduino.cc/playground/Main/RunningAverageEA
// HISTORY: See RunningAverageEA.cpp
//
// Released to the public domain
//
// backwards compatibility
// clr() clear()
// add(x) addValue(x)
// avg() getAverage()
#define RunningAverageEA_LIB_VERSION "0.2.04"
#include "Arduino.h"
class RunningAverageEA
{
public:
RunningAverageEA(void);
RunningAverageEA(int);
~RunningAverageEA();
void clear();
void addValue(float);
void fillValue(float, int);
float getAverage();
float getStandardDeviation();
float getElement(uint8_t idx);
uint8_t getSize() { return _size; }
uint8_t getCount() { return _cnt; }
protected:
uint8_t _size;
uint8_t _cnt;
uint8_t _idx;
float _sum;
float * _ar;
};
#endif
// END OF FILE
|
2b44988f7586d81573b4dff0b71e424c54f562a0
|
877fff5bb313ccd23d1d01bf23b1e1f2b13bb85a
|
/app/src/main/cpp/dir35435/dir35536/dir35859/dir36113/file36799.cpp
|
4a5da4e4299c012e34f6ab25e4cf73912c657bb2
|
[] |
no_license
|
tgeng/HugeProject
|
829c3bdfb7cbaf57727c41263212d4a67e3eb93d
|
4488d3b765e8827636ce5e878baacdf388710ef2
|
refs/heads/master
| 2022-08-21T16:58:54.161627
| 2020-05-28T01:54:03
| 2020-05-28T01:54:03
| 267,468,475
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 115
|
cpp
|
file36799.cpp
|
#ifndef file36799
#error "macro file36799 must be defined"
#endif
static const char* file36799String = "file36799";
|
7c963a4f43e4a92bdd71564558e9986df43d8eed
|
9a4e407c48031a56989667a6afbe7b5e246f862a
|
/genlisttranslator.h
|
f9225aac5e77bafedbf530cc79a02b5bb1297320
|
[] |
no_license
|
lxman/sflib
|
31c18f6dae5bbaec4e25794cbe871c61ebe0d28e
|
696b2a95ed71dec58183f5398f38c49a687c8a4c
|
refs/heads/master
| 2021-01-20T18:58:00.033744
| 2016-08-04T23:42:57
| 2016-08-04T23:42:57
| 64,971,077
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 233
|
h
|
genlisttranslator.h
|
#ifndef GENLISTTRANSLATOR_H
#define GENLISTTRANSLATOR_H
#include <QMap>
class GenListTranslator {
public:
GenListTranslator();
QString translated(int ID);
private:
QMap<int, QString> _gen_list;
};
#endif // GENLISTTRANSLATOR_H
|
695a42c39ba7359c1ae86074d5751f7ec653289a
|
73a07dda7afaecabde241e53ab240dc5e901bcf7
|
/Commands.cpp
|
91676f749ed0e7f072874aa2c33da939c37082eb
|
[] |
no_license
|
RaidMax/CommanderBot
|
01ff8fc0a04bfabbf3b4aaafced157c6f75c41f8
|
417fe52b37b567aca10ba9764826d1554e35203b
|
refs/heads/master
| 2021-01-20T17:20:02.571620
| 2016-07-24T03:51:18
| 2016-07-24T03:51:18
| 64,047,530
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,930
|
cpp
|
Commands.cpp
|
#include "Commands.h"
#include "Messages.h"
#include "NetRequests.h"
#include "_Main.h"
#include "Poco\URI.h"
string testCommand(commandArgs)
{
return "Test command success!";
}
string pokeCommand(commandArgs)
{
Interface->sendPoke(originID, "Hey, Wakeup!");
return "VOID";
}
string statusCommand(commandArgs)
{
IW4MAdminAPI->addToStatusQueue("events?status=1/");
return "Requested Status";
}
string sudokuCommand(commandArgs)
{
Interface->sendChannelMessage(Interface->getClientName(originID) + " has committed suicide!");
Interface->kickClient(originID);
return "VOID";
}
string serverCommand(commandArgs)
{
// this command should be gaurenteed to have at least 1 argument
std::string encoded;
for (int i = 1; i < arguments.size(); i++)
{
std::string arg = arguments[i];
std::string enc;
if (i == 1)
arg = "!" + arg;
Poco::URI::encode(arg + " ", "", enc);
encoded += enc;
}
std::string id = Interface->getClientUID(originID);
//fix poco issue
FindAndReplace(id, "+", "%2b");
FindAndReplace(encoded, "+", "%2b");
#ifdef _DEBUG
printf("Encoded data is ->%s\n", encoded.c_str());
printf("Origin clientID ->%s\n", id.c_str());
printf("URI request is ->%s\n", (REST_SERVER + "command?query=" + encoded + "&uid=" + id).c_str());
#endif
std::string response;
if (arguments[1] == "select" && arguments.size() > 2)
response = getUri(REST_SERVER + "command?select=" + arguments[2] + "&uid=" + id);
else
response = getUri(REST_SERVER + "command?query=" + encoded + "&uid=" + id);
if (response.length() > 0)
FindAndReplace(response, "<br/>", "\n");
return response;
}
string timeOutCommand(commandArgs)
{
if (!Interface->getClientByID(targetID)->onTimeout)
{
Interface->getClientByID(targetID)->onTimeout = true;
return "User has been placed in timeout.";
}
else
{
Interface->getClientByID(targetID)->onTimeout = false;
return "User is no longer on timeout.";
}
}
|
34aa6fd140e7bcf5dde146288c39a0427c9edf74
|
60abdf933555aff2871d9e41cdda915de0326445
|
/lab1_polynomial/lab1_polynomial/lab1_polynomial.cpp
|
114216033bdbb6048940baaa8738c30ef036b87c
|
[] |
no_license
|
HVjay/Polynomials
|
52cdb27d1a06f0ca43e4d3dc3a82b29ca82ba143
|
1d584952497e2daba97054e57e87d9b43b09583b
|
refs/heads/master
| 2020-04-22T04:59:10.290969
| 2019-06-23T21:13:55
| 2019-06-23T21:13:55
| 169,837,489
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,207
|
cpp
|
lab1_polynomial.cpp
|
#include "lab1_polynomial.h"
class PolynomialTest {
public:
bool test_constructors1() {
bool constructor1 = true;
//test case of positive
int i1[] = { 1, 0, 0, 2 };
Polynomial p1(i1, 4);
constructor1 = constructor1 && p1.data.size() == 4;
constructor1 = constructor1 && p1.data[0] == 1;
//special case of putting size less than 1;
int i3[] = { 1,3,12 };
Polynomial p3(i3, -3);
constructor1 = constructor1 && p3.data.size() == 0;
return constructor1;
}
bool test_random() {
Polynomial px;
Polynomial py;
Polynomial pz;
bool not_equal = true;
cout << "Random Polynomial 1: ";
px.trunc_print();
cout << "\nRandom Polynomial 2: ";
py.trunc_print();
cout << "\nRandom Polynomial 3: ";
pz.trunc_print();
cout << "\nAre these random? (Y/N) " << endl;
char prompt;
cin >> prompt;
not_equal = not_equal && prompt == 'Y';
not_equal = not_equal && !(px.data.size() == py.data.size() && py.data.size() == pz.data.size());
not_equal = not_equal && !(pz.data[0] == py.data[0] && px.data[0] == py.data[0]);
return not_equal;
}
bool test_add() {
//adding two polynomials with the same sizes
int i1[] = { 1, 0, 0, 2 };
Polynomial p1(i1, 4);
int i2[] = { 2, 1, 1, 1 };
Polynomial p2(i2, 4);
Polynomial p3 = p1 + p2;
int i4[] = { 3, 1, 1, 3 };
Polynomial p4(i4, 4);
//adding two polynomials with different sizes
int i5[] = { 1, 3, 1 };
Polynomial p5(i5, 3);
Polynomial p6 = p5 + p2;
int i7[] = { 3, 4, 2, 1 };
Polynomial p7(i7, 4);
//adding one polynomial with an empty one
int i8[] = { 0 };
Polynomial p8(i8, 0);
Polynomial p9 = p8 + p3;
bool add_valid = p3 == p4 && p7 == p6 && p9 == p3;
return add_valid;
}
bool test_subtract() {
//subtracting polynomials of the same size
int i1[] = { 1, 0, 0, 2 };
Polynomial p1(i1, 4);
int i2[] = { 2, 1, 1, 1 };
Polynomial p2(i2, 4);
Polynomial p3 = p1 - p2;
int i4[] = { -1, -1, -1, 1 };
Polynomial p4(i4, 4);
//subtracting two polynomials with different sizes
int i5[] = { 1, 4, 1 };
Polynomial p5 = { i5,3 };
Polynomial p6 = p5 - p2;
int i7[] = { -1, 3, 0, -1 };
Polynomial p7 = { i7,4 };
//subtracting one polynomial with an empty one
int i8[] = { 0 };
Polynomial p8(i8, 1);
Polynomial p9 = p1 - p8;
bool subtract_valid = p3 == p4 && p7 == p6 && p9 == p1;
return subtract_valid;
}
bool test_multiplying() {
//multipling two polynomials with the same size
int i10[] = { 2,4,4 };
Polynomial p10(i10, 3);
int i11[] = { 5,7,2 };
Polynomial p11 = Polynomial(i11, 3);
Polynomial p12 = p10 * p11;
int i13[] = { 10,34,52,36,8 };
Polynomial p13(i13, 5);
//Multiplying polynomials with different sizes
int i1[] = { 1, 0, 0, 2 };
Polynomial p1(i1, 4);
int i2[] = { 0, 0, 2, 0, 1 };
Polynomial p2(i2, 5);
Polynomial p3 = p1 * p2;
int i4[] = { 0, 0, 2, 0, 1, 4, 0, 2 };
Polynomial p4(i4, 8);
//Multiplying a polynomial with nothing
int i5[] = { 0 };
Polynomial p5(i5, 1);
Polynomial p7 = p5 * p4;
p7.zero_poly();
bool multiply_valid = p7 == p5 && p13 == p12 && p4 == p3;
return multiply_valid;
}
bool test_derivative() {
//derivative of a constant
int i1[] = { 1 };
Polynomial p1(i1, 1);
p1 = p1.derivative();
int i2[] = { 0 };
Polynomial p2(i2, 0);
//Derivative of a polynomial Test 1
int i3[] = { 3,5,3 };
Polynomial p3(i3, 3);
p3 = p3.derivative();
int i4[] = { 5,6 };
Polynomial p4(i4, 2);
//Derivative of a Polynomial Test 2
int i5[] = { 1,4,6,2 };
Polynomial p5(i5, 4);
p5 = p5.derivative();
int i6[] = { 4,12,6 };
Polynomial p6(i6, 3);
bool derivative_valid = p1 == p2 && p3 == p4 && p5 == p6;
return derivative_valid;
}
bool test_filereading() {
//Test to correctly read a file
Polynomial poly1("inputpoly.txt");
int i1[] = { 1,4,5 };
Polynomial p1(i1, 3);
//Test 2
Polynomial poly2("inputpoly2.txt");
int i2[] = { 4,5,3 };
Polynomial p2(i2, 3);
//Test 3 - more coefficients than the size specified
Polynomial poly3("inputpoly3.txt");
int i3[] = { 5,1,2,6 };
Polynomial p3(i3, 4);
return poly1 == p1 && poly2 == p2 && poly3== p3 && poly3.negative_polynomial[0]==3;
}
void run() {
assert(test_constructors1());
cout << "Constructor 1 test passed" << endl;
assert(test_random());
cout << "Random constructor test passed" << endl;
assert(test_equals());
cout << "Equals operator test passed" << endl;
assert(test_add());
cout << "Addition operator test passed" << endl;
assert(test_subtract());
cout << "Subtraction operator test passed" << endl;
assert(test_multiplying());
cout << "Multiplication operator test passed" << endl;
assert(test_derivative());
cout << "Derivative method test passed" << endl;
assert(test_filereading());
cout << "File reading constructor test passed" << endl;
}
};
int main()
{
srand(time(0));
PolynomialTest polytest;
polytest.run();
return 0;
}
|
fa2dfaab88609a6968de5edf671a284b5c51f920
|
b6c8ba44f5a1e2055e268203f4bb18b7d83b85c0
|
/Conrad/include/text_utilities.hpp
|
9858b188f339103507879ffbb7bc02ace777c929
|
[] |
no_license
|
ThomRI/ConradGameEngine
|
b045c7309786b9b24574001f4952ad6bfb717035
|
81aa2b29cd7ebfb39aa3e1a6dea9b1278b668fda
|
refs/heads/master
| 2020-03-23T03:59:13.717229
| 2019-08-05T18:49:27
| 2019-08-05T18:49:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 164
|
hpp
|
text_utilities.hpp
|
#ifndef TEXT_UTILITIES_HPP_INCLUDED
#define TEXT_UTILITIES_HPP_INCLUDED
#include <SDL2/SDL_ttf.h>
namespace textutils
{
}
#endif // TEXT_UTILITIES_HPP_INCLUDED
|
888625c9eeb894ea7d713124c8224b8274699f45
|
6fe2d3c27c4cb498b7ad6d9411cc8fa69f4a38f8
|
/algorithms/algorithms-cplusplus/leetcode/Question_0354_Russian_Doll_Envelopes.cc
|
2628d8ace2363a6acf569bb03f0ea51dc4414df1
|
[] |
no_license
|
Lanceolata/code
|
aae54af632a212c878ce45b11dab919bba55bcb3
|
f7d5a7de27c3cc8a7a4abf63eab9ff9b21d512fb
|
refs/heads/master
| 2022-09-01T04:26:56.190829
| 2021-07-29T05:14:40
| 2021-07-29T05:14:40
| 87,202,214
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 512
|
cc
|
Question_0354_Russian_Doll_Envelopes.cc
|
#include <vector>
using namespace std;
class Solution {
public:
int maxEnvelopes(vector<vector<int>>& envelopes) {
int res = 0;
vector<int> dp(envelopes.size(), 1);
sort(envelopes.begin(), envelopes.end());
for (int i = 0; i < envelopes.size(); i++) {
for (int j = 0; j < i; j++) {
if (envelopes[i][0] > envelopes[j][0] && envelopes[i][1] > envelopes[j][1]) {
dp[i] = max(dp[i], dp[j] + 1);
}
}
res = max(res, dp[i]);
}
return res;
}
};
|
4d9449cba31f155e2b220e926c69546c530e1eec
|
13307a197e203892ab9cda3f97df737c7c76d404
|
/Core/src/Module.cpp
|
46764ae38a6c2117efc5c3a9b29567c0bab4fce6
|
[
"Apache-2.0"
] |
permissive
|
bzcheeseman/Hobbit
|
4ec90b431520336bf0bf75d8608b4b4857cf2bc9
|
a2427a3db8a9194883aa6e33bde65f6e7966b049
|
refs/heads/master
| 2021-09-16T23:06:54.940247
| 2018-03-22T00:34:49
| 2018-03-22T00:34:49
| 122,110,145
| 1
| 1
|
Apache-2.0
| 2018-05-19T21:46:04
| 2018-02-19T19:28:55
|
C++
|
UTF-8
|
C++
| false
| false
| 7,656
|
cpp
|
Module.cpp
|
//
// Created by Aman LaChapelle on 3/17/18.
//
// Hobbit
// Copyright (c) 2018 Aman LaChapelle
// Full license at Hobbit/LICENSE.txt
//
/*
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 <llvm/IR/IRBuilder.h>
#include <llvm/IR/Verifier.h>
#include <llvm/Bitcode/BitcodeWriter.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/ExecutionEngine/MCJIT.h>
#include <llvm/ExecutionEngine/SectionMemoryManager.h>
#include <llvm/Support/FileSystem.h>
#include <llvm/Support/Host.h>
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Target/TargetMachine.h>
#include <llvm/Target/TargetOptions.h>
#include <llvm/IR/LegacyPassManager.h>
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
#include "Module.hpp"
#include "Symbol.hpp"
#include "Tensor.hpp"
#include "Variable.hpp"
llvm::LLVMContext *Hobbit::Module::GetContext() { return ctx_; }
Hobbit::Module::Module(const std::string &name, llvm::LLVMContext &ctx)
: name_(name), ctx_(&ctx),
module_(llvm::make_unique<llvm::Module>(name, ctx)) {}
llvm::Function *Hobbit::Module::GetFunction(const std::string &name,
const std::vector<Tensor *> &args) {
std::vector<llvm::Type *> arg_types;
for (auto &arg : args) {
if (arg->GetBuffer() != nullptr)
continue;
arg_types.push_back(arg->GetType());
}
llvm::FunctionType *ft =
llvm::FunctionType::get(llvm::Type::getVoidTy(*ctx_), arg_types, false);
llvm::Function *out =
llvm::cast<llvm::Function>(module_->getOrInsertFunction(name, ft));
llvm::BasicBlock *entryBB = llvm::BasicBlock::Create(
*ctx_, "hobbit." + name_ + "." + name + ".entry", out);
// Set up the args properly
llvm::Function::arg_iterator iter = out->arg_begin();
std::vector<Constant *> constants;
int idx = 0;
while (iter != out->arg_end() && idx < args.size()) {
if (args[idx]->GetBuffer() != nullptr) {
constants.push_back((Constant *)args[idx]);
idx++;
continue;
}
args[idx]->GetBuffer() = &(*iter++);
idx++;
}
std::vector<llvm::Constant *> buffer_constants;
for (auto &c : constants) {
llvm::Type *c_type = c->GetType();
if (c_type->isPointerTy()) {
c_type = c_type->getPointerElementType();
c->GetSymbol()->type = c_type;
}
if (c_type->isFloatingPointTy()) {
if (c_type->isFloatTy()) {
float *buf = (float *)c->GetBuffer();
for (uint64_t i = 0; i < c->GetShape().GetSize(); i++) {
buffer_constants.push_back(
llvm::ConstantFP::get(c_type, (double)buf[i]));
}
}
if (c_type->isDoubleTy()) {
double *buf = (double *)c->GetBuffer();
for (uint64_t i = 0; i < c->GetShape().GetSize(); i++) {
buffer_constants.push_back(llvm::ConstantFP::get(c_type, buf[i]));
}
}
} else if (c_type->isIntegerTy(64)) {
uint64_t *buf = (uint64_t *)c->GetBuffer();
for (uint64_t i = 0; i < c->GetShape().GetSize(); i++) {
buffer_constants.push_back(
llvm::ConstantInt::get(c_type, buf[i], true));
}
} else if (c_type->isIntegerTy(32)) {
uint32_t *buf = (uint32_t *)c->GetBuffer();
for (uint64_t i = 0; i < c->GetShape().GetSize(); i++) {
buffer_constants.push_back(
llvm::ConstantInt::get(c_type, (uint64_t)buf[i], true));
}
} else if (c_type->isIntegerTy(16)) {
uint16_t *buf = (uint16_t *)c->GetBuffer();
for (uint64_t i = 0; i < c->GetShape().GetSize(); i++) {
buffer_constants.push_back(
llvm::ConstantInt::get(c_type, (uint64_t)buf[i], true));
}
} else if (c_type->isIntegerTy(8)) {
uint8_t *buf = (uint8_t *)c->GetBuffer();
for (uint64_t i = 0; i < c->GetShape().GetSize(); i++) {
buffer_constants.push_back(
llvm::ConstantInt::get(c_type, (uint64_t)buf[i], true));
}
} else if (c_type->isIntegerTy(1)) {
bool *buf = (bool *)c->GetBuffer();
for (uint64_t i = 0; i < c->GetShape().GetSize(); i++) {
buffer_constants.push_back(
llvm::ConstantInt::get(c_type, (uint64_t)buf[i], true));
}
}
llvm::ArrayType *arr_type =
llvm::ArrayType::get(c_type, buffer_constants.size());
c->GetBuffer() = llvm::ConstantArray::get(arr_type, buffer_constants);
buffer_constants.clear();
// llvm::IRBuilder<> builder(entryBB);
// llvm::Value *arr_alloca = builder.CreateAlloca(arr_type,
// builder.getInt64(1));
// builder.CreateAlignedStore(const_array, arr_alloca, 32);
// c->GetBuffer() =
// builder.CreateAlignedLoad(builder.CreateGEP(arr_alloca,
// builder.getInt64(0)), 32);
}
return out;
}
void Hobbit::Module::Print() { module_->print(llvm::outs(), nullptr); }
void Hobbit::Module::FinalizeFunction(llvm::Function *f) {
llvm::BasicBlock *exit_bb = llvm::BasicBlock::Create(
*ctx_, "hobbit." + name_ + "." + f->getName() + ".exit", f);
llvm::IRBuilder<> builder(exit_bb);
if (f->getReturnType() == llvm::Type::getVoidTy(*ctx_))
builder.CreateRetVoid();
for (llvm::Function::iterator bb = f->begin(); bb != f->end(); ++bb) {
llvm::BasicBlock *BB = &(*bb);
if (llvm::dyn_cast<llvm::BranchInst>(--(BB->end())))
continue;
builder.SetInsertPoint(BB);
builder.CreateBr(&(*(++bb)));
}
llvm::verifyFunction(*f);
}
void Hobbit::Module::FinalizeModule(unsigned int opt_level,
const std::string &target_triple,
const std::string &cpu,
const std::string &features) {
llvm::InitializeAllTargetInfos();
llvm::InitializeAllTargets();
llvm::InitializeAllTargetMCs();
llvm::InitializeAllAsmPrinters();
llvm::InitializeAllAsmParsers();
module_->setTargetTriple(target_triple);
std::string error;
auto target = llvm::TargetRegistry::lookupTarget(target_triple, error);
llvm::TargetOptions options;
auto RM = llvm::Optional<llvm::Reloc::Model>();
llvm::TargetMachine *target_machine =
target->createTargetMachine(target_triple, cpu, features, options, RM);
module_->setDataLayout(target_machine->createDataLayout());
module_->setTargetTriple(target_triple);
llvm::legacy::PassManager PM;
llvm::PassManagerBuilder PMBuilder;
PMBuilder.OptLevel = opt_level;
PMBuilder.MergeFunctions = true;
PMBuilder.LoopVectorize = true;
PMBuilder.DisableUnrollLoops = false;
PMBuilder.SLPVectorize = true;
PMBuilder.populateModulePassManager(llvm::cast<llvm::PassManagerBase>(PM));
target_machine->adjustPassManager(PMBuilder);
PM.run(*module_);
llvm::verifyModule(*module_);
}
void *Hobbit::Module::GetFunctionPtr(const std::string &name) {
std::string error_str;
llvm::EngineBuilder engineBuilder(std::move(module_));
engineBuilder.setErrorStr(&error_str);
engineBuilder.setEngineKind(llvm::EngineKind::JIT);
engineBuilder.setMCPU("x86-64");
llvm::ExecutionEngine *engine = engineBuilder.create();
return (void *)engine->getFunctionAddress(name);
}
|
fab1fa93def43801b98a89ff140c0c33f921b93c
|
36863c3cc6229ed4e735b3a64395e40632a4a314
|
/C++ Primer/ch5/5.14.cpp
|
1c5c30a192583e1be885e500c99c21b38ae5e711
|
[] |
no_license
|
Kepler11x/Zixue
|
ebd74c21eddbc5ab87cd578a24f24da346e19207
|
2db17b13f0dcc253fb64f78fe326d2abc6a402db
|
refs/heads/master
| 2022-11-27T03:26:37.463979
| 2020-07-29T14:34:37
| 2020-07-29T14:34:37
| 283,393,083
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 680
|
cpp
|
5.14.cpp
|
#include<iostream>
#include<vector>
#include<string>
using namespace std;
using std::vector;
int main()
{
vector<string> strings;
string buf;
string word;
string maxWord;
int maxCount = 1;//记录最大出现次数
int count = 1;
while (cin >> buf) {
if (buf == "quit")
break;//输入quit退出
else
strings.push_back(buf);
}
word = *strings.begin();
for (auto beg = strings.begin() + 1; beg != strings.end(); ++beg) {
if (*beg == word) {
++count;
if (count > maxCount) {
maxCount = count;
maxWord = *beg;
}
}
else {
count = 1;
word = *beg;
}
}
cout << maxWord << "连续出现了" << maxCount << "次" << endl;
return 0;
}
|
9ffced21fd413bcfb9ed6a35bae6abecef7ccfb9
|
a4c163a265ba22d2633212d1106ed5ea42b8b7e8
|
/src/ScorePresent.cpp
|
ba5cdbc03951cbcc2577d63d518434bb858c8d85
|
[] |
no_license
|
leeKol/LodeRunner
|
94d237c94beac10240ea861541238955b377b0a4
|
db98d397a6ad852a6e2e08035bd937e96832affe
|
refs/heads/master
| 2023-07-27T12:06:27.337900
| 2021-09-12T13:46:54
| 2021-09-12T13:46:54
| 405,653,730
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 125
|
cpp
|
ScorePresent.cpp
|
#include "ScorePresent.h"
void ScorePresent::handleCollision(GameObject& gameObject)
{
gameObject.handleCollision(*this);
}
|
532ce418e9004f24cc87a29817b49312d81035f8
|
ab97443135b380e0694c2a5fb66ff872c0f1f262
|
/src/GL3Engine/Graphics/Material.cpp
|
7a2352b041c8ca0e58c77388a8701f2a43bdcd56
|
[
"MIT"
] |
permissive
|
Mati365/Potato3D-Engine
|
5bcfea6c147afd3bc06936ce1637e51b84834343
|
bf683a7213716d17d61d0e53edb32469af5166eb
|
refs/heads/master
| 2016-09-06T16:54:53.907270
| 2015-08-26T10:50:59
| 2015-08-26T10:50:59
| 20,998,655
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 562
|
cpp
|
Material.cpp
|
#include "Texture.hpp"
namespace GL3Engine {
namespace CoreMaterial {
MaterialBufferData Material::getMaterialBufferData() const {
#define COL_DEFINE(type) \
col[type].r(), col[type].g(), col[type].b(), col[type].a()
return MaterialBufferData {
COL_DEFINE(AMBIENT),
COL_DEFINE(DIFFUSE),
COL_DEFINE(SPECULAR),
(GLfloat) tex_flags,
transparent,
shine,
0.f,
};
}
}
}
|
1633f8d8815e8b955b978a95a71846cbb126e194
|
91ddca481281e8b8293d6ad64213c29065237209
|
/CS 162 - Intro to Comp Sci II/Lab_9/queueStack.hpp
|
24707c9ae1604681ce658f82057c10abff14c3c7
|
[] |
no_license
|
FiveFootSeventeen/Class-Projects
|
c397e3ee31e77cee1eed4a70123d315082bc4a76
|
75669ae2f184e1d4b036c61ae34ca7e108498ddc
|
refs/heads/master
| 2020-04-05T14:41:23.837360
| 2018-11-29T00:14:22
| 2018-11-29T00:14:22
| 156,935,736
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 784
|
hpp
|
queueStack.hpp
|
/*********************************************************************
** queueStack Functions
** Author: Jacob Leno
** Date: 11/25/17
** Description: Header file for the queueStack functions.
*********************************************************************/
#include "menu.hpp"
#include <queue>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <stack>
#include <list>
using std::cout;
using std::endl;
#ifndef QUEUESTACK_HPP
#define QUEUESTACK_HPP
void queueMenu();
void stackMenu();
void beginQueue(int, int, int, std::queue<int>&);
void displayValues(std::queue<int>);
void displayLengths(int, double);
void emptyQueue(std::queue<int> &);
void beginStack(std::string);
void displayPalindrome(std::string);
#endif
|
70e00fb95a72f1ce874dc9dc5b4d1f0bda33eb65
|
c2fa27059e42e5dfc48b10a3908db4eff7cebf9b
|
/061001/main.cpp
|
cf7f8eb60f41e57c46b5aff15d9ce0c12ea27ea4
|
[] |
no_license
|
baiheng/cpp-study
|
21787d473d86c19bd08ebd664f178e5bcd452570
|
539788da41c80191d2b0ef8c765e090156335e1f
|
refs/heads/master
| 2021-01-11T04:53:08.114125
| 2016-10-21T07:57:03
| 2016-10-21T07:57:03
| 71,542,852
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 718
|
cpp
|
main.cpp
|
/*
* =====================================================================================
*
* Filename: main.cpp
*
* Description:
*
* Version: 1.0
* Created: 10/01/2016 10:57:48 PM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Company:
*
* =====================================================================================
*/
#include <iostream>
#include <stdlib.h>
extern char** environ;
int main()
{
std::cout << "hello world" << std::endl;
char** env = environ;
while(*env)
{
std::cout << *env << std::endl;
env++;
};
std::cout << getenv("PATH") << std::endl;
return 0;
}
|
6ee5aff49dc327a89950b5204da3bddb516e4f23
|
ae45359c86a0e91364127824050de9894a614392
|
/projects/osgEarthX_COM/COM/Source/TileSource/TileSourceWCS/TileSourceWCS.h
|
625dc9ef9358d82247a7f9914d157fd3a52e1073
|
[] |
no_license
|
hope815/osgEarthX
|
6d6d084f907aaa0e6b832781dfc51a2f0c184eb9
|
7b7c5e98f82c82571cd1d0f306cecf05452315d5
|
refs/heads/master
| 2023-03-15T21:49:20.588996
| 2018-03-29T10:51:34
| 2018-03-29T10:51:34
| null | 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 1,965
|
h
|
TileSourceWCS.h
|
// TileSourceWCS.h : CTileSourceWCS 的声明
#pragma once
#include "resource.h" // 主符号
#include "osgEarthX_COM_i.h"
#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
#error "Windows CE 平台(如不提供完全 DCOM 支持的 Windows Mobile 平台)上无法正确支持单线程 COM 对象。定义 _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA 可强制 ATL 支持创建单线程 COM 对象实现并允许使用其单线程 COM 对象实现。rgs 文件中的线程模型已被设置为“Free”,原因是该模型是非 DCOM Windows CE 平台支持的唯一线程模型。"
#endif
using namespace ATL;
#include <COM/Source/SourceDispatchImpl.h>
#include <osgEarthDrivers/wcs/WCSOptions>
// CTileSourceWCS
class CTileSourceWCS;
typedef
SourceDispatchImpl
<
osgEarth::Drivers::WCSOptions,
CTileSourceWCS,
ITileSourceWCS,
CLSID_TileSourceWCS,
IID_ITileSourceWCS,
NULL,
CLSCTX_INPROC_SERVER,
&LIBID_osgEarthX_COMLib,
/*wMajor =*/ 1,
/*wMinor =*/ 0
>
ITileSourceWCSDispatchImpl;
class ATL_NO_VTABLE CTileSourceWCS :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CTileSourceWCS, &CLSID_TileSourceWCS>,
public ISupportErrorInfo,
public ITileSourceWCSDispatchImpl
{
public:
CTileSourceWCS() : ITileSourceWCSDispatchImpl( TILE_SOURCE_WCS )
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_TILESOURCEWCS)
BEGIN_COM_MAP(CTileSourceWCS)
COM_INTERFACE_ENTRY(ITileSourceWCS)
COM_INTERFACE_ENTRY(ITileSourceDispatch)
COM_INTERFACE_ENTRY(ISourceDispatch)
COM_INTERFACE_ENTRY(IEarthDispatch)
COM_INTERFACE_ENTRY2(IDispatch, ITileSourceWCS)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()
// ISupportsErrorInfo
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
public:
};
OBJECT_ENTRY_AUTO(__uuidof(TileSourceWCS), CTileSourceWCS)
|
f9c3e257b55a0a78e155f0fbd9924178329bba1f
|
fb06736d2ab3268e16ebc9083dedc4abb94dab4c
|
/Common/util/bufferedstream.cpp
|
a67d95415f1cda5fd3a190cd0b687e2fe28929a2
|
[
"LicenseRef-scancode-unknown-license-reference",
"Artistic-2.0"
] |
permissive
|
matteobin/ags
|
15c49e662b3f6b52ceb9db3819c9cd569449c3ec
|
3ba1b2a91aee2ebf9a5a0cb67d93ab93e8042ee0
|
refs/heads/master
| 2022-04-24T19:30:36.676673
| 2020-03-22T20:33:43
| 2020-03-22T20:33:43
| 259,399,863
| 1
| 0
|
NOASSERTION
| 2020-04-27T17:12:57
| 2020-04-27T17:12:56
| null |
UTF-8
|
C++
| false
| false
| 3,811
|
cpp
|
bufferedstream.cpp
|
//=============================================================================
//
// Adventure Game Studio (AGS)
//
// Copyright (C) 1999-2011 Chris Jones and 2011-20xx others
// The full list of copyright holders can be found in the Copyright.txt
// file, which is part of this source code distribution.
//
// The AGS source code is provided under the Artistic License 2.0.
// A copy of this license can be found in the file License.txt and at
// http://www.opensource.org/licenses/artistic-license-2.0.php
//
//=============================================================================
#include <algorithm>
#include <cstring>
#include <stdexcept>
#include "util/bufferedstream.h"
#include "util/stdio_compat.h"
#include "util/string.h"
namespace AGS
{
namespace Common
{
BufferedStream::BufferedStream(const String &file_name, FileOpenMode open_mode, FileWorkMode work_mode, DataEndianess stream_endianess)
: FileStream(file_name, open_mode, work_mode, stream_endianess), _buffer(BufferStreamSize), _bufferPosition(0), _position(0)
{
if (FileStream::Seek(0, kSeekEnd) == false)
throw std::runtime_error("Error determining stream end.");
_end = FileStream::GetPosition();
if (_end == -1)
throw std::runtime_error("Error determining stream end.");
if (FileStream::Seek(0, kSeekBegin) == false)
throw std::runtime_error("Error determining stream end.");
_buffer.resize(0);
}
void BufferedStream::FillBufferFromPosition(soff_t position)
{
FileStream::Seek(position, kSeekBegin);
_buffer.resize(BufferStreamSize);
auto sz = FileStream::Read(_buffer.data(), BufferStreamSize);
_buffer.resize(sz);
_bufferPosition = position;
}
bool BufferedStream::EOS() const
{
return _position == _end;
}
soff_t BufferedStream::GetPosition() const
{
return _position;
}
size_t BufferedStream::Read(void *toBuffer, size_t toSize)
{
auto to = static_cast<char *>(toBuffer);
while(toSize > 0)
{
if (_position < _bufferPosition || _position >= _bufferPosition + _buffer.size())
{
FillBufferFromPosition(_position);
}
if (_buffer.size() <= 0) { break; } // reached EOS
assert(_position >= _bufferPosition && _position < _bufferPosition + _buffer.size()); // sanity check only, should be checked by above.
soff_t bufferOffset = _position - _bufferPosition;
assert(bufferOffset >= 0);
size_t bytesLeft = _buffer.size() - (size_t)bufferOffset;
size_t chunkSize = std::min<size_t>(bytesLeft, toSize);
std::memcpy(to, _buffer.data()+bufferOffset, chunkSize);
to += chunkSize;
_position += chunkSize;
toSize -= chunkSize;
}
return to - (char*)toBuffer;
}
int32_t BufferedStream::ReadByte()
{
uint8_t ch;
auto bytesRead = Read(&ch, 1);
if (bytesRead != 1) { return EOF; }
return ch;
}
size_t BufferedStream::Write(const void *buffer, size_t size)
{
FileStream::Seek(_position, kSeekBegin);
auto sz = FileStream::Write(buffer, size);
if (_position == _end)
_end += sz;
_position += sz;
return sz;
}
int32_t BufferedStream::WriteByte(uint8_t val)
{
auto sz = Write(&val, 1);
if (sz != 1) { return -1; }
return sz;
}
bool BufferedStream::Seek(soff_t offset, StreamSeek origin)
{
soff_t want_pos = -1;
switch(origin)
{
case StreamSeek::kSeekCurrent: want_pos = _position + offset; break;
case StreamSeek::kSeekBegin: want_pos = 0 + offset; break;
case StreamSeek::kSeekEnd: want_pos = _end + offset; break;
break;
}
// clamp
_position = std::min(std::max(want_pos, (soff_t)0), _end);
return _position == want_pos;
}
} // namespace Common
} // namespace AGS
|
567d0dea40bcf6cedb6d98ac961bb5f5de997029
|
421f5b6d1a471a554ba99f6052ebc39a67581c96
|
/Leetcode/96. Unique Binary Search Trees.cpp
|
d17446483f48085247d0a057e80f676179b891fa
|
[] |
no_license
|
avinashw50w/practice_problems
|
045a2a60998dcf2920a1443319f958ede4f58385
|
1968132eccddb1edeb68babaa05aaa81a7c8ecf3
|
refs/heads/master
| 2022-08-31T08:39:19.934398
| 2022-08-10T16:11:35
| 2022-08-10T16:11:35
| 193,635,081
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 992
|
cpp
|
96. Unique Binary Search Trees.cpp
|
/*Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n?
Example:
Input: 3
Output: 5
Explanation:
Given n = 3, there are a total of 5 unique BST's:
1 3 3 2 1
\ / / / \ \
3 2 1 1 3 2
/ / \ \
2 1 2 3
if i is chosen as the root then the nodes from 0..i-1 falls in the left subtree and the nodes
from i+1...n falls in the right subtree. So the total no of uniqueBSTs(0..n) = ∑ uniqueBSTs(0..i-1) * uniqueBSTs(i+1..n) for all i
*/
class Solution {
public:
int numTrees(int n) {
vector<int> dp(n+1, 0);
dp[0] = dp[1] = 1;
// i: no of nodes in the tree
for (int i = 2; i <= n; ++i) {
// j: pick j as the root;
for (int j = 1; j <= i; ++j)
dp[i] += dp[j-1] * dp[i-j];
}
return dp[n];
}
};
|
deae16b1f2f060ed86acf0e6b5c186990ffb6312
|
a783aeb11e299d9878e715a3c70df0ccd8724549
|
/signletion/Singletion.cpp
|
db7e9884072a8a61ce03c27b68417d1913d56df7
|
[] |
no_license
|
bokket/C--2
|
35ff2664ba83ec004303e4f8e0aa5528c3969e66
|
afcf1ae5307c726a18469ca03b1ff111243352ef
|
refs/heads/master
| 2023-08-05T11:38:12.938804
| 2021-09-25T14:39:12
| 2021-09-25T14:39:12
| 309,900,787
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 129
|
cpp
|
Singletion.cpp
|
//
// Created by bokket on 2020/11/24.
//
#include "Singletion.h"
int main()
{
Singletion* s1=Singletion::GetInstance();
}
|
57ad4bb2d29747405c3bbcc0f50ce9896cb5c0b2
|
387549ab27d89668e656771a19c09637612d57ed
|
/DRGLib UE project/Source/FSD/Private/BarleySpawnItem.cpp
|
26493c7758d4df6ab967b92df0ba7bebe3215b7d
|
[
"MIT"
] |
permissive
|
SamsDRGMods/DRGLib
|
3b7285488ef98b7b22ab4e00fec64a4c3fb6a30a
|
76f17bc76dd376f0d0aa09400ac8cb4daad34ade
|
refs/heads/main
| 2023-07-03T10:37:47.196444
| 2023-04-07T23:18:54
| 2023-04-07T23:18:54
| 383,509,787
| 16
| 5
|
MIT
| 2023-04-07T23:18:55
| 2021-07-06T15:08:14
|
C++
|
UTF-8
|
C++
| false
| false
| 125
|
cpp
|
BarleySpawnItem.cpp
|
#include "BarleySpawnItem.h"
FBarleySpawnItem::FBarleySpawnItem() {
this->Resource = NULL;
this->Weight = 0.00f;
}
|
266fa6da43b0133427ffd34bbea67fbdb7a5ca1e
|
c20a1c872ed37b3199252a957edbd4311dc0b4d7
|
/Source/JoinSelPtsDlg.cpp
|
4762adfc3bee368349e3ddddb8b5f8c025d23898
|
[
"MIT"
] |
permissive
|
atanub/SurveyUtilitiesArx
|
569ad2a043af93b5c521c0d21917fd96bd02bf81
|
3ce3f502a4f562464c9462bf82a921094cd094b2
|
refs/heads/master
| 2021-08-05T03:33:01.003854
| 2020-05-10T18:27:38
| 2020-05-10T18:27:38
| 168,826,791
| 4
| 5
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,766
|
cpp
|
JoinSelPtsDlg.cpp
|
// JoinSelPtsDlg.cpp : implementation file
//
#include "Stdafx.h"
#include "JoinSelPtsDlg.h"
#include "SurvUtilApp.h"
#include "ResourceHelper.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern "C" HWND adsw_acadMainWnd();
/////////////////////////////////////////////////////////////////////////////
// CJoinSelPtsDlg dialog
const CString CJoinSelPtsDlg::m_strConstSPointFmt = CString("N: %.4f\r\nE: %.4f\r\nZ: %.4f");
CJoinSelPtsDlg::CJoinSelPtsDlg(const CMasterDataRecs* pRecArray, CWnd* pParent /*=NULL*/)
: CDialog(CJoinSelPtsDlg::IDD, pParent), m_pAvailableMDataRecs(pRecArray)
{
ASSERT(m_pAvailableMDataRecs != 0L);
//{{AFX_DATA_INIT(CJoinSelPtsDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CJoinSelPtsDlg::~CJoinSelPtsDlg()
{
DeallocatePtrArray(m_SelectedMDataRecs);
}
void CJoinSelPtsDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CJoinSelPtsDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CJoinSelPtsDlg, CDialog)
//{{AFX_MSG_MAP(CJoinSelPtsDlg)
ON_BN_CLICKED(IDC_ADD, OnAdd)
ON_BN_CLICKED(IDC_DEL, OnDel)
ON_BN_CLICKED(IDC_DELALL, OnDelAll)
ON_LBN_DBLCLK(IDC_LIST_DEST, OnDblClkListDest)
ON_LBN_DBLCLK(IDC_LIST_SRC, OnDblClkListSrc)
ON_LBN_SELCHANGE(IDC_LIST_SRC, OnSelChangeListSrc)
ON_LBN_SELCHANGE(IDC_LIST_DEST, OnSelChangeListDest)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CJoinSelPtsDlg message handlers
BOOL CJoinSelPtsDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
HFONT hFont;
CListBox* pSrcListBox;
pSrcListBox = (CListBox*)GetDlgItem(IDC_LIST_SRC);
hFont = (HFONT)GetStockObject(ANSI_FIXED_FONT);
ASSERT(hFont != 0L);
pSrcListBox->SendMessage(WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
GetDlgItem(IDC_LIST_DEST)->SendMessage(WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
{//Fill SRC list box
int i;
for(i = 0; i < m_pAvailableMDataRecs->GetSize(); i++)
{
MASTERDATA* pRec;
CString strMark;
int iIndex;
pRec = m_pAvailableMDataRecs->GetAt(i);
strMark = CSurveyData::MarkToShortString(pRec->Mark);
iIndex = pSrcListBox->AddString(strMark);
pSrcListBox->SetItemData(iIndex, (long)pRec);
}
}
GetDlgItem(IDC_EDIT_DET_DEST)->SetWindowText("Nothing selected");
GetDlgItem(IDC_EDIT_DET_SRC)->SetWindowText("Nothing selected");
((CButton*)GetDlgItem(IDC_CHECK))->SetCheck(TRUE);
return FALSE;
}
void CJoinSelPtsDlg::OnOK()
{
// TODO: Add extra validation here
int i, iCount;
MASTERDATA* pRec;
iCount = ((CListBox*)GetDlgItem(IDC_LIST_DEST))->GetCount();
if(iCount <= 0)
{
AfxMessageBox("ERROR: Nothing selected for drawing", MB_ICONSTOP);
GetDlgItem(IDC_LIST_DEST)->SetFocus();
return;
}
GetDlgItem(IDC_EDIT_LYR)->GetWindowText(m_strLyr);
if(!CSurvUtilApp::IsValidACADSymName(m_strLyr))
{
AfxMessageBox("ERROR: Invalid layer name", MB_ICONSTOP);
GetDlgItem(IDC_EDIT_LYR)->SetFocus();
((CEdit*)GetDlgItem(IDC_EDIT_LYR))->SetSel(0, -1);
return;
}
//Form selected 'MASTERDATA' rec array
DeallocatePtrArray(m_SelectedMDataRecs);
for(i = 0; i < iCount; i++)
{
MASTERDATA* pNewRec;
pRec = (MASTERDATA*) (((CListBox*)GetDlgItem(IDC_LIST_DEST))->GetItemData(i));
pNewRec = new MASTERDATA;
memcpy(pNewRec, pRec, sizeof(MASTERDATA));
m_SelectedMDataRecs.Add(pNewRec);
}
m_bZFlag = ((CButton*)GetDlgItem(IDC_CHECK))->GetCheck();
CDialog::OnOK();
}
void CJoinSelPtsDlg::OnAdd()
{
int iIndex;
iIndex = ((CListBox*)GetDlgItem(IDC_LIST_SRC))->GetCurSel();
if(iIndex == LB_ERR)
{
AfxMessageBox("ERROR: Nothing selected to add", MB_ICONSTOP);
return;
}
{//Add to selection(dest) & attach XData
MASTERDATA* pRec;
CString strMark;
((CListBox*)GetDlgItem(IDC_LIST_SRC))->GetText(iIndex, strMark);
pRec = (MASTERDATA*) (((CListBox*)GetDlgItem(IDC_LIST_SRC))->GetItemData(iIndex));
iIndex = ((CListBox*)GetDlgItem(IDC_LIST_DEST))->GetCurSel();
iIndex = ((CListBox*)GetDlgItem(IDC_LIST_DEST))->InsertString(iIndex, strMark);
((CListBox*)GetDlgItem(IDC_LIST_DEST))->SetItemData(iIndex, (long)pRec);
}
GetDlgItem(IDC_EDIT_DET_DEST)->SetWindowText("Nothing selected");
}
void CJoinSelPtsDlg::OnDel()
{
int iIndex;
iIndex = ((CListBox*)GetDlgItem(IDC_LIST_DEST))->GetCurSel();
if(iIndex == LB_ERR)
{
AfxMessageBox("ERROR: Nothing selected to delete", MB_ICONSTOP);
return;
}
((CListBox*)GetDlgItem(IDC_LIST_DEST))->DeleteString(iIndex);
GetDlgItem(IDC_EDIT_DET_DEST)->SetWindowText("Nothing selected");
}
void CJoinSelPtsDlg::OnDelAll()
{
((CListBox*)GetDlgItem(IDC_LIST_DEST))->ResetContent();
}
void CJoinSelPtsDlg::OnDblClkListDest()
{
OnDel();
}
void CJoinSelPtsDlg::OnDblClkListSrc()
{
OnAdd();
}
void CJoinSelPtsDlg::OnSelChangeListSrc()
{
int iIndex;
iIndex = ((CListBox*)GetDlgItem(IDC_LIST_SRC))->GetCurSel();
if(iIndex == LB_ERR)
{
GetDlgItem(IDC_EDIT_DET_SRC)->SetWindowText("Nothing selected");
return;
}
{//Add to selection(dest) & attach XData
MASTERDATA* pRec;
CString strToShow;
pRec = (MASTERDATA*) (((CListBox*)GetDlgItem(IDC_LIST_SRC))->GetItemData(iIndex));
strToShow.Format(CJoinSelPtsDlg::m_strConstSPointFmt, pRec->SPoint.fNorthing, pRec->SPoint.fEasting, pRec->SPoint.fElev);
GetDlgItem(IDC_EDIT_DET_SRC)->SetWindowText(strToShow);
}
}
void CJoinSelPtsDlg::OnSelChangeListDest()
{
int iIndex;
iIndex = ((CListBox*)GetDlgItem(IDC_LIST_DEST))->GetCurSel();
if(iIndex == LB_ERR)
{
GetDlgItem(IDC_EDIT_DET_DEST)->SetWindowText("Nothing selected");
return;
}
{//Add to selection(dest) & attach XData
MASTERDATA* pRec;
CString strToShow;
pRec = (MASTERDATA*) (((CListBox*)GetDlgItem(IDC_LIST_DEST))->GetItemData(iIndex));
strToShow.Format(CJoinSelPtsDlg::m_strConstSPointFmt, pRec->SPoint.fNorthing, pRec->SPoint.fEasting, pRec->SPoint.fElev);
GetDlgItem(IDC_EDIT_DET_DEST)->SetWindowText(strToShow);
}
}
//
BOOL GetJoinSelPtsData(const CMasterDataRecs* pRecArrayParam, AcGePoint3dArray& Array, CString& strLyr, BOOL& bZFlag)
{
CWnd* pAcadWnd;
CTemporaryResourceOverride ResOverride;
pAcadWnd = CWnd::FromHandle(adsw_acadMainWnd());
CJoinSelPtsDlg Dlg(pRecArrayParam, pAcadWnd);
if(Dlg.DoModal() != IDOK)
{
return FALSE;
}
int i;
AcGePoint3d ptTmp;
const CMasterDataRecs* pRecArray = Dlg.GetSelRecArray();
Dlg.GetAttribs(strLyr, bZFlag);
for(i = 0; i < pRecArray->GetSize(); i++)
{
MASTERDATA* pRec;
pRec = pRecArray->GetAt(i);
ptTmp.x = pRec->SPoint.fEasting;
ptTmp.y = pRec->SPoint.fNorthing;
ptTmp.z = (bZFlag) ? pRec->SPoint.fElev : 0.0;
Array.append(ptTmp);
}
return TRUE;
}
|
5160ee47338baf8d7ad528d176bbfe53a2d860e8
|
4c452179cf4c22a5e9d8ee4a9d0062ad3d6d0a45
|
/client/Source/Engine2/weapon.cpp
|
fe0dcdacfca8c0fb0e2643fd5535eaacfc1a18e8
|
[] |
no_license
|
sdetwiler/pammo
|
ed749bdbd150a5665bdabc263005249a821cfa2e
|
aee306611ae8c681a5f8c03b3b0696e2cf771864
|
refs/heads/master
| 2021-01-13T01:49:15.414767
| 2015-05-18T22:21:24
| 2015-05-18T22:21:24
| 35,837,663
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 219
|
cpp
|
weapon.cpp
|
#include "weapon.h"
#include "imageEntity.h"
namespace pammo
{
Weapon::Weapon()
: mIcon()
{
}
// Define the pure virtual destructor.
Weapon::~Weapon()
{}
ImageEntity* Weapon::getIcon()
{
return &mIcon;
}
}
|
7dabe31e4394a6f34c2271fab0bb33ce998d9178
|
bb9b83b2526d3ff8a932a1992885a3fac7ee064d
|
/src/modules/osgViewer/generated_code/KeystoneHandler.pypp.hpp
|
f0f1a5cbc9e89adc84b506403ebafcaa728f346a
|
[] |
no_license
|
JaneliaSciComp/osgpyplusplus
|
4ceb65237772fe6686ddc0805b8c77d7b4b61b40
|
a5ae3f69c7e9101a32d8cc95fe680dab292f75ac
|
refs/heads/master
| 2021-01-10T19:12:31.756663
| 2015-09-09T19:10:16
| 2015-09-09T19:10:16
| 23,578,052
| 20
| 7
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 227
|
hpp
|
KeystoneHandler.pypp.hpp
|
// This file has been generated by Py++.
#ifndef KeystoneHandler_hpp__pyplusplus_wrapper
#define KeystoneHandler_hpp__pyplusplus_wrapper
void register_KeystoneHandler_class();
#endif//KeystoneHandler_hpp__pyplusplus_wrapper
|
7985ce379e1ce16bce0c13e57ed520cc5f20aa90
|
03b830414faedabf35eac66e0d7baf477133300b
|
/src/20200601/52paly.cpp
|
834fe1016f8c314f1a9d172e4153f3168e616964
|
[] |
no_license
|
liupengzhouyi/nowCoder
|
12abb70c30b6872a73c993365575d4d888795c7e
|
14fa3aa5a54def9f34f4552f01088a6c4dd5f96d
|
refs/heads/master
| 2022-10-04T21:14:02.085585
| 2020-06-05T10:11:43
| 2020-06-05T10:11:43
| 267,886,016
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,274
|
cpp
|
52paly.cpp
|
//
// Created by 刘鹏 on 2020/6/1.
//
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
void check24(const vector<int> &nums, int index, double result, bool &isSuccess)
{
if (index == 4) //递归结束条件
{
//if (abs(result - 24) < 1e-6)
isSuccess = true;
return;
}
for (int i = 0; i < 4; i++)
{
if (i == 0)
check24(nums, index + 1, result + nums[index], isSuccess);
else if (i == 1)
check24(nums, index + 1, result - nums[index], isSuccess);
else if(i==2)
check24(nums, index + 1, result * nums[index], isSuccess);
else
check24(nums, index + 1, result / nums[index], isSuccess);
if (isSuccess)
return;
}
}
int paly52()
{
vector<int>nums(4);
while (cin >> nums[0] >> nums[1] >> nums[2] >> nums[3])
{
sort(nums.begin(), nums.end());
bool isSuccess = false;
do {
check24(nums, 0, 0, isSuccess);
if (isSuccess)
break;
} while (next_permutation(nums.begin(), nums.end()));
if (isSuccess)
cout << "true" << endl;
else
cout << "false" << endl;
}
return 0;
}
|
f85cdfc7badbc0efbcab19b02852759792ca5cf1
|
3c078c619096943a2eff75c88ba84fb556107987
|
/examples/Sandbox/Systems/GraphicsSystem.hpp
|
6b24cb21496230c218adcaf20da2bf5f11b3c440
|
[
"MIT"
] |
permissive
|
JordiSubirana/ATEMA
|
d6a778c3b3090456052660ea94fad2c9c20c3c1d
|
c8e4044f60e1afe4e38ddcf80921ee2e644f46ea
|
refs/heads/master
| 2023-08-31T15:32:50.295905
| 2023-08-24T22:58:05
| 2023-08-24T22:58:05
| 56,619,922
| 3
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,376
|
hpp
|
GraphicsSystem.hpp
|
/*
Copyright 2022 Jordi SUBIRANA
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.
*/
#ifndef ATEMA_SANDBOX_GRAPHICSSYSTEM_HPP
#define ATEMA_SANDBOX_GRAPHICSSYSTEM_HPP
#include <Atema/Graphics/DebugRenderer.hpp>
#include <Atema/Math/AABB.hpp>
#include <Atema/Math/Enums.hpp>
#include <Atema/Graphics/FrameRenderer.hpp>
#include <Atema/Graphics/PerspectiveCamera.hpp>
#include <Atema/Graphics/StaticModel.hpp>
#include "System.hpp"
#include "../Settings.hpp"
class GraphicsSystem : public System
{
public:
GraphicsSystem() = delete;
GraphicsSystem(const at::Ptr<at::RenderWindow>& renderWindow);
virtual ~GraphicsSystem();
void update(at::TimeStep timeStep) override;
void onEvent(at::Event& event) override;
void onEntityAdded(at::EntityHandle entity) override;
void onEntityRemoved(at::EntityHandle entity) override;
private:
void checkSettings();
void onResize(const at::Vector2u& size);
void updateFrame();
void updateRenderables();
void updateCamera();
void destroyAfterUse(at::Ptr<void> resource);
void destroyPendingResources(at::RenderFrame& renderFrame);
at::WPtr<at::RenderWindow> m_renderWindow;
// Settings
float m_baseDepthBias;
uint32_t m_shadowMapSize;
uint32_t m_shadowCascadeCount;
float m_frustumRotation;
at::FrameRenderer m_frameRenderer;
at::PerspectiveCamera m_camera;
std::vector<at::Ptr<void>> m_resourcesToDestroy;
};
#endif
|
f8d7ac4111d61bc55def97e723a21d09c181aea9
|
0c807b167431fa28f9f59877359db0be9e22b905
|
/weather_project/wind_sensor/windSensorVer1.0/windSensor.ino
|
79012213f4ee796ee3a8caebefcefe7fc4abd54e
|
[] |
no_license
|
gowthamrajN/Sofwares-Backup
|
2b93bc3c2bef0c0b9f6da6936a5de8b8fc096fef
|
cb35f8735f0893a8b2e5593855ee3888190d4e5c
|
refs/heads/master
| 2021-08-28T11:51:37.718496
| 2017-12-12T04:59:14
| 2017-12-12T04:59:14
| 113,945,782
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,494
|
ino
|
windSensor.ino
|
# define IR 2 // Receive the data from sensor
# define Led 13 // Light a led
// Constants definitions
const float pi = 3.14159265; // pi number
int period = 10000; // Measurement period (miliseconds)
int delaytime = 10000; // Time between samples (miliseconds)
int radio = 65; // Radio from vertical anemometer axis to a cup center (mm)
char* winds[] = {"Calm", "Light air", "Light breeze", "Gentle breeze", "Moderate breeze", "Fresh breeze", "Strong breeze", "Moderate gale", "Fresh gale", "Strong gale", "Storm", "Violent storm", "Hurricane"};
// Variable definitions
unsigned int Sample = 0; // Sample number
unsigned int counter = 0; // B/W counter for sensor
unsigned int RPM = 0; // Revolutions per minute
float speedwind = 0; // Wind speed (m/s)
unsigned short windforce = 0; // Beaufort Wind Force Scale
void setup()
{
// Set the pins
pinMode(2, INPUT);
digitalWrite(2, HIGH);
pinMode(13, OUTPUT);
// sets the serial port to 115200
Serial.begin(9600);
// Splash screen
Serial.println("ANEMOMETER");
Serial.println("**********");
Serial.println("Based on QRD1114 IR sensor");
Serial.print("Sampling period: ");
Serial.print(period/1000);
Serial.print(" seconds every ");
Serial.print(delaytime/1000);
Serial.println(" seconds.");
Serial.println("** You could modify those values on code **");
Serial.println();
}
void loop()
{
Sample++;
Serial.print(Sample);
Serial.print(": Start measurement...");
windvelocity();
Serial.println(" finished.");
Serial.print("Counter: ");
Serial.print(counter);
Serial.print("; RPM: ");
RPMcalc();
Serial.print(RPM);
Serial.print("; Wind speed: ");
WindSpeed();
Serial.print(speedwind);
Serial.print(" [m/s] (+/- 0.07 m/s); Wind force (Beaufort Scale): ");
Serial.print(windforce);
Serial.print(" - ");
Serial.println(winds[windforce]);
Serial.println();
delay(10000);
}
// Measure wind speed
void windvelocity(){
speedwind = 0;
counter = 0;
digitalWrite(Led, HIGH);
attachInterrupt(0, addcount, CHANGE);
unsigned long millis();
long startTime = millis();
while(millis() < startTime + period) {
}
digitalWrite(Led, LOW);
detachInterrupt(1);
}
void RPMcalc(){
RPM=((counter/2)*60)/(period/1000); // Calculate revolutions per minute (RPM)
}
void WindSpeed(){
speedwind = ((2 * pi * radio * RPM)/60) / 1000; // Calculate wind speed on m/s
if (speedwind <= 0.3){ // Calculate Wind force depending of wind velocity
windforce = 0; // Calm
}
else if (speedwind <= 1.5){
windforce = 1; // Light air
}
else if (speedwind <= 3.4){
windforce = 2; // Light breeze
}
else if (speedwind <= 5.4){
windforce = 3; // Gentle breeze
}
else if (speedwind <= 7.9){
windforce = 4; // Moderate breeze
}
else if (speedwind <= 10.7){
windforce = 5; // Fresh breeze
}
else if (speedwind <= 13.8){
windforce = 6; // Strong breeze
}
else if (speedwind <= 17.1){
windforce = 7; // High wind, Moderate gale, Near gale
}
else if (speedwind <= 20.7){
windforce = 8; // Gale, Fresh gale
}
else if (speedwind <= 24.4){
windforce = 9; // Strong gale
}
else if (speedwind <= 28.4){
windforce = 10; // Storm, Whole gale
}
else if (speedwind <= 32.6){
windforce = 11; // Violent storm
}
else {
windforce = 12; // Hurricane (from thi point, apply the Fujita Scale)
}
}
void addcount(){
counter++;
}
|
b732809923b55bdfb2897fa3a6ceb410735cc762
|
5b2c9cf01b25723384aad9f04ad9f8358a17380f
|
/src-cpp/ssdjtopng.cpp
|
a471b7ff4dc50c1dea21f10aabc627550e1d58bd
|
[] |
no_license
|
bioinfolabmu/jnsviewer
|
7bdd129c58a9e4f4e65d0f76203b97720aaa9660
|
d4543fd137a0960397c3826737afd4064423a91a
|
refs/heads/master
| 2021-01-22T06:02:03.194082
| 2017-06-05T22:24:38
| 2017-06-05T22:24:38
| 92,515,077
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 13,935
|
cpp
|
ssdjtopng.cpp
|
////////////////////////////////////////////////////////////
// <Decleration> //
// It is a part of RNASViewer project. //
// <Date> //
// 11/22/2013 //
// <Author> //
// Xi Li //
////////////////////////////////////////////////////////////
#include <iostream>
#include <fstream>
#include <vector>
#include <string.h>
#include <sstream>
#include <math.h>
#include <algorithm>
// Begin, GD libraries for png images.
#include "gd.h"
#include <gdfontt.h>
#include <gdfonts.h>
// Begin, Linux system libraries.
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
using namespace std;
// The elements of sequence in the data file
vector<unsigned char> elements;
// The dots & brackets in the date file.
vector<unsigned char> dot_bracket;
// The id of paired elements in the export file.
vector<int> pairings;
// The coordinate of every elements's(vertices's) lacation.
vector<int> x_axis,y_axis;
////////////////////////////////////////////////////////////////////////////////////////////////////
void release_system_resource()
{
////////////////////////////////////////////////////////////
// <Function> //
// Release the system resource //
////////////////////////////////////////////////////////////
vector<unsigned char> ().swap(elements);
vector<unsigned char> ().swap(dot_bracket);
vector<int> ().swap(x_axis);
vector<int> ().swap(y_axis);
vector<int> ().swap(pairings);
}
vector<std::string> split( string main_str, string pattern)
{
////////////////////////////////////////////////////////////
// <Function> //
// Split a main string into a series of sub string. //
// <Input> //
// main_str: //
// pattern: //
// <Output> //
// result: //
////////////////////////////////////////////////////////////
int pos;
vector<std::string> result;
int size;
main_str = main_str + pattern;
size = main_str.size();
for ( int i=0; i<size; ++i )
{
//
pos = main_str.find( pattern, i );
if ( pos<size )
{
//
string s = main_str.substr( i, pos-i);
result.push_back( s );
i = pos + pattern.size() - 1;
}
}
return result;
}
void process_str_sequence( string str_sequence )
{
//////////////////////////////////////////////////////////////////////
// <Function> //
// Get the bases from str_sequence. //
// <Input> //
// str_sequence: //
// <Output> //
// //
//////////////////////////////////////////////////////////////////////
int end_n;
end_n = str_sequence.size();
for ( int n=0; n<end_n; ++n )
{
unsigned char chr;
string str;
str = str_sequence.substr( n, n+1 );
chr = str[0];
elements.push_back( chr );
}
}
void process_str_pair_signs( string str_pair_signs )
{
//////////////////////////////////////////////////////////////////////
// <Function>
//
// <Input>
// str_pair_signs: //
// <Output>
// //
////////////////////////////////////////////////////////////
int end_n;
end_n = str_pair_signs.size();
for ( int n=0; n<end_n; ++n )
{
unsigned char chr;
string str;
str = str_pair_signs.substr( n, n+1 );
chr = str[0];
dot_bracket.push_back( chr );
}
}
void process_str_coordinate( string str_coordinate )
{
////////////////////////////////////////////////////////////
// <Function> //
// //
// <Input> //
// std_coordinate: //
// <Output> //
// //
////////////////////////////////////////////////////////////
vector<string> xy;
xy = split( str_coordinate, " ");
int end_n = xy.size();
for ( int n=0; n<end_n; ++n )
{
int pos;
pos = xy[n].find( "," );
int end;
end = xy[n].size();
string xy_first;
xy_first = xy[n].substr( 0, pos ) ;
string xy_second;
xy_second = xy[n].substr( pos+1, end );
int i;
i = atoi( xy_first.c_str() );
x_axis.push_back( i );
i = atoi( xy_second.c_str() );
y_axis.push_back( i );
}
vector<string> ().swap(xy);
}
void process_str_pairid( string str_pairid )
{
////////////////////////////////////////////////////////////
// <Function> //
// Get the id info from pairing info. //
// <Input> //
// str_pairid: //
// <Output> //
// //
////////////////////////////////////////////////////////////
vector<string> pairs;
pairs = split( str_pairid, " " );
int end_n;
end_n = pairs.size();
for ( int n=0; n<end_n; ++n )
{
int pos;
pos = pairs[n].find( "," );
int end;
end = pairs[n].size();
string id_first;
id_first = pairs[n].substr( 0, pos ) ;
string id_second;
id_second = pairs[n].substr( pos+1, end );
int i;
i = atoi( id_first.c_str() );
i = i - 1;
pairings.push_back( i );
i = atoi( id_second.c_str() );
i = i - 1;
pairings.push_back( i );
}
}
void import_date( char* file_json )
{
////////////////////////////////////////////////////////////
// <Function> //
// Import date from file in JSON format. //
// <Input> //
// file_json: //
// <Output> //
// elements: //
// dot_bracket: //
// x_axis, y_axis: //
// pairing: //
////////////////////////////////////////////////////////////
ifstream ifs( file_json );
if ( !ifs )
{
cout<<"Error: can not open the input file.";
cout<<endl;
}
else
{
string textline;
string m_str;
m_str = "";
// Read the data from the data file.
while ( !ifs.eof() )
{
getline( ifs, textline , '\n' );
int size;
size = textline.size();
if ( textline[ size-1 ] =='\r' )
{
textline = textline.substr( 0, size-1 );
}
m_str = m_str + textline;
}
m_str = m_str.substr( 1, ( m_str.size() )-3 ); // '{' & '"}'
string pat = "\",";
vector<string> re;
re = split(m_str,pat);
int end_n;
end_n = re.size();
for ( int n=0; n<end_n; ++n )
{
int start;
start = re[n].find(":\"");
int end;
end = re[n].size();
string h_str;
h_str = re[n].substr( 0, start);
string b_str;
b_str = re[n].substr( start+2, end);
if ( h_str == "sequence" )
{
process_str_sequence( b_str );
}
else if ( h_str == "dot_bracket" )
{
process_str_pair_signs( b_str );
}
else if ( h_str == "coordinate" )
{
process_str_coordinate( b_str );
}
else if ( h_str == "pairings" )
{
process_str_pairid( b_str );
}
else
{
cout<<"Error!";
cout<<endl;
}
}
}
}
void SavePng( char *filename , gdImagePtr im)
{
////////////////////////////////////////////////////////////
// <Function> //
// Save a PNG image as a PNG file. //
// <Input> //
// im: //
// <Output> //
// filename: //
////////////////////////////////////////////////////////////
FILE *out;
int size;
char *data;
out = fopen( filename , "wb");
if (!out)
{
// Error
}
data = (char *) gdImagePngPtr(im, &size);
if (!data)
{
// Error
}
if ( (int)fwrite(data, 1, size, out) != size)
{
// Error
}
if (fclose(out) != 0)
{
// Error
}
gdFree(data);
} // void mySavePng( )
void export_png( char* png_file )
{
////////////////////////////////////////////////////////////
// <Function> //
// Draw a png image & save it as a png file. //
// <Input> //
// elements, dot_bracket, x_axis, y_axis, pairings. //
// <Output> //
// png_file: //
////////////////////////////////////////////////////////////
int top_margins,bottom_margins,left_margins,right_margins;
int max_x,max_y;
int mapend,mapheight;
int scale;
scale = 1;
top_margins = bottom_margins = left_margins = right_margins = 15*scale;
max_x = *max_element( x_axis.begin(), x_axis.end() ) ;
mapend = (left_margins+right_margins+max_x)*scale;
max_y = *max_element( y_axis.begin(),y_axis.end() ) ;
mapheight = (top_margins+bottom_margins+max_y)*scale;
gdImagePtr im;
im=gdImageCreate(mapend,mapheight);
int white = gdImageColorAllocate(im,255,255,255);
int black=gdImageColorAllocate(im,0,0,0);
int red = gdImageColorAllocate(im,255,0,0);
int green=gdImageColorAllocate(im,0,255,0);
int blue=gdImageColorAllocate(im,0,0,255);
int n;
int end_n;
// Draw line in order
end_n=elements.size();
for ( n=1 ; n<end_n ; ++n )
{
gdImageLine( im, x_axis[n-1]*scale, y_axis[n-1]*scale
, x_axis[n]*scale, y_axis[n]*scale, blue );
}
// draw line for peair
int front,back;
end_n = ( pairings.size() )/2;
for ( n=0 ; n<end_n ; ++n )
{
front = pairings[2*n];
back = pairings[2*n+1];
gdImageLine( im, x_axis[ front ]*scale, y_axis[ front ]*scale
, x_axis[ back ]*scale, y_axis[ back ]*scale, green );
}
//Ouput elements & subscript
end_n=elements.size()-1;
for ( n=end_n ; n>=0 ; --n )
{
// Draw the circles.
gdImageFilledEllipse( im, x_axis[n]*scale, y_axis[n]*scale, 18*scale, 18*scale, white );
unsigned char *p;
string s;
s=elements[n];
const char* c;
c = s.c_str();
p=(unsigned char*)c;
gdImageString( im, gdFontGetSmall()
, (x_axis[n]-2)*scale, (y_axis[n]-6)*scale, p , black );
if ( ((n+1)%10 == 0) || (n == 0) || (n == end_n) )
{
ostringstream oss;
string ss;
const char *src;
oss<<(n+1);
ss=oss.str();
src = ss.c_str();
char *dest;
dest=new char[512];
strcpy(dest,src);
unsigned char *p_no;
p_no=(unsigned char *)dest;
gdImageString( im, gdFontTiny
, (x_axis[n]+4)*scale, (y_axis[n]-2)*scale, p_no , black );
}
}
// Export the Image
SavePng( png_file,im);
gdImageDestroy(im);
}
int main( int argc, char* argv[] )
{
////////////////////////////////////////////////////////////
// <Function> //
// Import the data form file in SSDJ format. //
// Export a png imager. //
// <Input> //
// argv[1]: SSDJ file. //
// <Output> //
// argv[2]: PNG File. //
////////////////////////////////////////////////////////////
// Import the data from a file in JSON file.
import_date( argv[1] );
// Export the PNG imager.
export_png( argv[2] );
// Release the system resource
release_system_resource();
return 0;
}
|
5de55a570da852a972f185ef96c249259c6f4eb6
|
2ea045ba8b4e4248ecd423d4d34d6812fe3d0dc2
|
/analyze_block_splitting/save_block_splitting.cc
|
440d9a0b87b8e74b4529b05efb401f8fea939911
|
[
"Apache-2.0"
] |
permissive
|
seanpm2001/GoogleChromeLabs_Dynamic-Web-Bundle-Serving
|
d65583184e1c4a38e3bd987f74fb0173ad885a0b
|
fedcfc4a827f3047362a23d0e745ad273fc0094d
|
refs/heads/master
| 2023-03-17T23:46:55.352207
| 2020-06-22T08:43:10
| 2020-06-22T08:43:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,701
|
cc
|
save_block_splitting.cc
|
// Copyright 2020 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdlib.h>
#include <stdio.h>
#include <brotli/encode.h>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <stdexcept>
#include <string>
int DEFAULT_WINDOW = 24;
size_t FileSize(FILE* file) {
fseek(file, 0, SEEK_END);
size_t size = ftell(file);
fseek(file, 0, SEEK_SET);
return size;
}
FILE* OpenFile(const char* filename, const char* mode) {
FILE* file = fopen(filename, mode);
if (file == NULL) {
perror("fopen failed");
}
return file;
}
void ReadData(FILE* file, unsigned char** data, size_t* size) {
*size = FileSize(file);
*data = (unsigned char*) malloc(*size);
if (0 == fread(*data, 1, *size, file)) {
throw "Failed to read from file";
}
return;
}
void BrotliCompressAndSaveBlockSplitting(int level, int window, const unsigned char* input_data, size_t input_size, unsigned char* output_data, size_t output_buffer_size) {
ShouldSaveBlockSplit();
if (!BrotliEncoderCompress(level, window, BROTLI_MODE_GENERIC, input_size, input_data, &output_buffer_size, output_data)) {
throw "Failure in BrotliCompress";
}
}
int MinWindowLargerThanFile(int fileSize, int max) {
int window = 24;
if (fileSize > 0) {
window = 10;
while (((size_t)1 << (window)) - 16 < (uint64_t)fileSize) {
++window;
if (window == max) break;
}
}
return window;
}
int main (int argc, char** argv) {
try {
char* bundle_file = argv[1];
FILE* infile = OpenFile(bundle_file, "rb");
if (infile == NULL) {
exit(1);
}
unsigned char* input_data = NULL;
size_t input_size = 0;
ReadData(infile, &input_data, &input_size);
fclose(infile);
size_t output_buffer_size = input_size * 2;
unsigned char* output_data = (unsigned char*) malloc(output_buffer_size);
int window = MinWindowLargerThanFile(input_size, DEFAULT_WINDOW);
BrotliCompressAndSaveBlockSplitting(11, window, input_data, input_size, output_data, output_buffer_size);
} catch (const char* message) {
std::cout << "Error\n";
}
return 0;
}
|
40aa0f2c608515024ed87f4ccf9c13043dd4d5b5
|
dd91ea0a9b143371cfb186eaa74333da9488510d
|
/shared/libebm/debug_ebm.cpp
|
bf27dbdda3deaafc56dd5888c26aa905721bb784
|
[
"MIT"
] |
permissive
|
interpretml/interpret
|
6c6ef2f2e6a6bb9c43633251089385cc44affe16
|
e6f38ea195aecbbd9d28c7183a83c65ada16e1ae
|
refs/heads/develop
| 2023-09-03T17:42:50.611413
| 2023-08-28T18:16:10
| 2023-08-28T18:16:10
| 184,704,903
| 3,731
| 472
|
MIT
| 2023-08-15T04:31:34
| 2019-05-03T05:47:52
|
C++
|
UTF-8
|
C++
| false
| false
| 25,756
|
cpp
|
debug_ebm.cpp
|
// Copyright (c) 2023 The InterpretML Contributors
// Licensed under the MIT license.
// Author: Paul Koch <code@koch.ninja>
// We normally only test the external public interface because unit testing in C++ is a bit more complicated
// and would require us to make unit test specific builds. For our package it seems we can get away with this,
// yet still have good tests since most of the code is targetable from the outside and we cover a lot of the
// code with just a few option combinations. In some special cases though, it's useful to have some
// glass box testing, so we have a few aspects tested specially here and invoked on startup in DEBUG
// builds. Don't include significant code here, since the DEBUG build does get included in the package. Normally
// it'll just eat some filespace though as the RELEASE build is the only one loaded by default
#include "precompiled_header_cpp.hpp"
#include <stddef.h> // size_t, ptrdiff_t
#include <random>
#include "libebm.h"
#include "logging.h"
#include "common_c.h"
#include "zones.h"
//#include "approximate_math.hpp"
#include "Feature.hpp"
#include "Term.hpp"
#include "Transpose.hpp"
namespace DEFINED_ZONE_NAME {
#ifndef DEFINED_ZONE_NAME
#error DEFINED_ZONE_NAME must be defined
#endif // DEFINED_ZONE_NAME
static_assert(COUNT_BITS(uint8_t) == 8, "automated test with compiler");
static_assert(COUNT_BITS(uint16_t) == 16, "automated test with compiler");
static_assert(COUNT_BITS(uint32_t) == 32, "automated test with compiler");
static_assert(COUNT_BITS(uint64_t) == 64, "automated test with compiler");
//#define INCLUDE_TESTS_IN_RELEASE
//#define ENABLE_TRANSPOSE
//#define ENABLE_TEST_LOG_SUM_ERRORS
//#define ENABLE_TEST_EXP_SUM_ERRORS
//#define ENABLE_TEST_SOFTMAX_SUM_ERRORS
//#define ENABLE_PRINTF
#if !defined(NDEBUG) || defined(INCLUDE_TESTS_IN_RELEASE)
#ifdef ENABLE_TRANSPOSE
static double TestTranspose() {
double debugRet = 0; // this just prevents the optimizer from eliminating this code
std::mt19937 testRandom(52);
std::uniform_int_distribution<> dimensionsDistributions(1, 5);
FeatureBoosting features[5];
Term term;
double original[20000];
double transposed[20000];
double restored[20000];
for(int iTest = 0; iTest < 100000; ++iTest) {
const int cDimensions = dimensionsDistributions(testRandom);
debugRet += cDimensions; // just to ensure this code gets run
term.Initialize(cDimensions);
term.SetCountRealDimensions(cDimensions);
TermFeature * aTermFeatures = term.GetTermFeatures();
size_t cTensorBins = 1;
for(int iDimension = 0; iDimension < cDimensions; ++iDimension) {
aTermFeatures[iDimension].m_iTranspose = iDimension;
aTermFeatures[iDimension].m_pFeature = &features[iDimension];
aTermFeatures[iDimension].m_cStride = cTensorBins;
int cBins;
bool bMissing;
bool bUnknown;
int cExpandedBins;
do {
cBins = dimensionsDistributions(testRandom);
bMissing = 4 <= dimensionsDistributions(testRandom);
bUnknown = 4 <= dimensionsDistributions(testRandom);
cExpandedBins = cBins + (bMissing ? 0 : 1) + (bUnknown ? 0 : 1);
} while(cExpandedBins < 2);
features[iDimension].Initialize(cBins, bMissing, bUnknown, EBM_FALSE);
cTensorBins *= cBins;
}
for(int iDimension = 0; iDimension < cDimensions; ++iDimension) {
std::uniform_int_distribution<> shuffleDistribution(iDimension, cDimensions - 1);
int iShuffle = shuffleDistribution(testRandom);
size_t temp = aTermFeatures[iShuffle].m_iTranspose;
aTermFeatures[iShuffle].m_iTranspose = aTermFeatures[iDimension].m_iTranspose;
aTermFeatures[iDimension].m_iTranspose = temp;
}
for(int i = 0; i < 20000; ++i) {
original[i] = i;
}
Transpose<false>(&term, 1, original, transposed);
Transpose<true>(&term, 1, restored, transposed);
size_t indexIncrement[5];
indexIncrement[0] = 0;
indexIncrement[1] = 0;
indexIncrement[2] = 0;
indexIncrement[3] = 0;
indexIncrement[4] = 0;
size_t indexCorrected[5];
while(true) {
for(int iDimension = 0; iDimension < cDimensions; ++iDimension) {
const FeatureBoosting * pFeature = aTermFeatures[aTermFeatures[iDimension].m_iTranspose].m_pFeature;
bool bMissing = pFeature->IsMissing();
bool bUnknown = pFeature->IsUnknown();
size_t cBins = pFeature->GetCountBins();
cBins = cBins + (bMissing ? 0 : 1) + (bUnknown ? 0 : 1);
size_t i = indexIncrement[iDimension];
if(i == cBins - 1 && !bUnknown) {
--i;
}
if(i == 0 && !bMissing) {
++i;
}
indexCorrected[iDimension] = i;
}
cTensorBins = 1;
size_t iFlatIncrement = 0;
size_t iFlatCorrected = 0;
for(int iDimension = 0; iDimension < cDimensions; ++iDimension) {
const FeatureBoosting * pFeature = aTermFeatures[aTermFeatures[iDimension].m_iTranspose].m_pFeature;
bool bMissing = pFeature->IsMissing();
bool bUnknown = pFeature->IsUnknown();
size_t cBins = pFeature->GetCountBins();
cBins = cBins + (bMissing ? 0 : 1) + (bUnknown ? 0 : 1);
iFlatIncrement += indexIncrement[iDimension] * cTensorBins;
iFlatCorrected += indexCorrected[iDimension] * cTensorBins;
cTensorBins *= cBins;
}
EBM_ASSERT(original[iFlatCorrected] == restored[iFlatIncrement]);
int iDimension;
for(iDimension = 0; iDimension < cDimensions; ++iDimension) {
const FeatureBoosting * pFeature = aTermFeatures[aTermFeatures[iDimension].m_iTranspose].m_pFeature;
bool bMissing = pFeature->IsMissing();
bool bUnknown = pFeature->IsUnknown();
size_t cBins = pFeature->GetCountBins();
cBins = cBins + (bMissing ? 0 : 1) + (bUnknown ? 0 : 1);
size_t i = indexIncrement[iDimension];
++i;
indexIncrement[iDimension] = i;
if(i != cBins) {
break;
}
indexIncrement[iDimension] = 0;
}
if(iDimension == cDimensions) {
break;
}
}
}
return debugRet;
}
// this is just to prevent the compiler for optimizing our code away on release
extern double g_TestTranspose = TestTranspose();
#endif
#ifdef ENABLE_TEST_LOG_SUM_ERRORS
static double TestLogSumErrors() {
double debugRet = 0; // this just prevents the optimizer from eliminating this code
// check that our outputs match that of the std::log function
EBM_ASSERT(std::isnan(std::log(std::numeric_limits<float>::quiet_NaN())));
EBM_ASSERT(std::isnan(std::log(-std::numeric_limits<float>::infinity())));
EBM_ASSERT(std::isnan(std::log(-1.0f))); // should be -NaN
EBM_ASSERT(-std::numeric_limits<float>::infinity() == std::log(0.0f));
EBM_ASSERT(-std::numeric_limits<float>::infinity() == std::log(-0.0f));
EBM_ASSERT(std::numeric_limits<float>::infinity() == std::log(std::numeric_limits<float>::infinity()));
// our function with the same tests as std::log
EBM_ASSERT(std::isnan(LogApproxSchraudolph(std::numeric_limits<float>::quiet_NaN())));
EBM_ASSERT(std::isnan(LogApproxSchraudolph(-std::numeric_limits<float>::infinity())));
EBM_ASSERT(std::isnan(LogApproxSchraudolph(-1.0f))); // should be -NaN
EBM_ASSERT(-std::numeric_limits<float>::infinity() == LogApproxSchraudolph(0.0f));
EBM_ASSERT(-std::numeric_limits<float>::infinity() == LogApproxSchraudolph(-0.0f));
// -87.3365479f == std::log(std::numeric_limits<float>::min())
EBM_ASSERT(-87.5f < LogApproxSchraudolph(std::numeric_limits<float>::min()));
EBM_ASSERT(LogApproxSchraudolph(std::numeric_limits<float>::min()) < -87.25f);
// -103.278931f == std::log(std::numeric_limits<float>::denorm_min())
EBM_ASSERT(-88.125f < LogApproxSchraudolph(std::numeric_limits<float>::denorm_min()));
EBM_ASSERT(LogApproxSchraudolph(std::numeric_limits<float>::denorm_min()) < -87.75f);
// 88.7228394f == std::log(std::numeric_limits<float>::max())
EBM_ASSERT(88.5f < LogApproxSchraudolph(std::numeric_limits<float>::max()));
EBM_ASSERT(LogApproxSchraudolph(std::numeric_limits<float>::max()) < 88.875f);
EBM_ASSERT(std::numeric_limits<float>::infinity() == LogApproxSchraudolph(std::numeric_limits<float>::infinity()));
// our exp error has a periodicity of ln(2), so [0, ln(2)) should have the same relative error as
// [ln(2), 2 * ln(2)) OR [-ln(2), 0) OR [-ln(2)/2, +ln(2)/2)
// BUT, this needs to be evenly distributed, so we can't use nextafter. We need to increment with a constant.
// boosting will push our exp values to between 1 and 1 + a small number less than e
static constexpr double k_testLowerInclusiveBound = 1; // this is true lower bound
static constexpr double k_testUpperExclusiveBound = static_cast<double>(1.0f + 1000 * std::numeric_limits<float>::epsilon()); // 2 would be random guessing. we should optimize for the final rounds. 1.5 gives a log loss about 0.4 which is on the high side of log loss
static constexpr uint64_t k_cTests = 123513;
static constexpr bool k_bIsRandom = false;
static constexpr bool k_bIsRandomFinalFill = true; // if true we choose a random value to randomly fill the space between ticks
static constexpr float termMid = k_logTermLowerBoundInputCloseToOne;
static constexpr uint32_t termStepsFromMid = 5;
static constexpr uint32_t termStepDistance = 1;
static constexpr ptrdiff_t k_cStats = termStepsFromMid * 2 + 1;
static constexpr double k_movementTick = (k_testUpperExclusiveBound - k_testLowerInclusiveBound) / k_cTests;
// uniform_real_distribution includes the lower bound, but not the upper bound, which is good because
// our window is balanced by not including both ends
std::uniform_real_distribution<double> testDistribution(k_bIsRandom ? k_testLowerInclusiveBound : double { 0 }, k_bIsRandom ? k_testUpperExclusiveBound : k_movementTick);
std::mt19937 testRandom(52);
float addTerm = termMid;
for(int i = 0; i < termStepDistance * termStepsFromMid; ++i) {
addTerm = std::nextafter(addTerm, std::numeric_limits<float>::lowest());
}
for(ptrdiff_t iStat = 0; iStat < k_cStats; ++iStat) {
if(k_logTermLowerBound <= addTerm && addTerm <= k_logTermUpperBound) {
double avgAbsError = 0;
double avgError = 0;
double avgSquareError = 0;
double minError = std::numeric_limits<double>::max();
double maxError = std::numeric_limits<double>::lowest();
for(uint64_t iTest = 0; iTest < k_cTests; ++iTest) {
double val;
if(k_bIsRandom) {
val = testDistribution(testRandom);
} else {
val = k_testLowerInclusiveBound + iTest * k_movementTick;
if(k_bIsRandomFinalFill) {
val += testDistribution(testRandom);
}
}
double exactVal = std::log(val);
double approxVal = LogApproxSchraudolph(val, addTerm);
double error = approxVal - exactVal;
avgError += error;
avgAbsError += std::abs(error);
avgSquareError += error * error;
minError = std::min(error, minError);
maxError = std::max(error, maxError);
}
avgAbsError /= k_cTests;
avgError /= k_cTests;
avgSquareError /= k_cTests;
#ifdef ENABLE_PRINTF
printf(
"TextLogApprox: %+.10lf, %+.10lf, %+.10lf, %+.10lf, %+.10lf, %+.8le %s%s\n",
avgError,
avgAbsError,
avgSquareError,
minError,
maxError,
addTerm,
addTerm == termMid ? "*" : "",
iStat == k_cStats - 1 ? "\n" : ""
);
#endif // ENABLE_PRINTF
// this is just to prevent the compiler for optimizing our code away on release
debugRet += avgError;
} else {
#ifdef ENABLE_PRINTF
if(iStat == k_cStats - 1) {
printf("\n");
}
#endif // ENABLE_PRINTF
}
for(int i = 0; i < termStepDistance; ++i) {
addTerm = std::nextafter(addTerm, std::numeric_limits<float>::max());
}
}
// this is just to prevent the compiler for optimizing our code away on release
return debugRet;
}
// this is just to prevent the compiler for optimizing our code away on release
extern double g_TestLogSumErrors = TestLogSumErrors();
#endif // ENABLE_TEST_LOG_SUM_ERRORS
#ifdef ENABLE_TEST_EXP_SUM_ERRORS
static double TestExpSumErrors() {
double debugRet = 0; // this just prevents the optimizer from eliminating this code
// check underflow behavior
EBM_ASSERT(!std::isnan(ExpApproxSchraudolph(k_expUnderflowPoint, k_expTermLowerBound)));
EBM_ASSERT(std::numeric_limits<float>::min() <= ExpApproxSchraudolph(k_expUnderflowPoint, k_expTermLowerBound));
// check overflow behavior
EBM_ASSERT(!std::isnan(ExpApproxSchraudolph(k_expOverflowPoint, k_expTermUpperBound)));
EBM_ASSERT(ExpApproxSchraudolph(k_expOverflowPoint, k_expTermUpperBound) <= std::numeric_limits<float>::max());
// our exp error has a periodicity of ln(2), so [0, ln(2)) should have the same relative error as
// [ln(2), 2 * ln(2)) OR [-ln(2), 0) OR [-ln(2)/2, +ln(2)/2)
// BUT, this needs to be evenly distributed, so we can't use nextafter. We need to increment with a constant.
static constexpr double k_testLowerInclusiveBound = -k_expErrorPeriodicity / 2;
static constexpr double k_testUpperExclusiveBound = k_expErrorPeriodicity / 2;
static constexpr uint64_t k_cTests = 10000;
static constexpr bool k_bIsRandom = false;
static constexpr bool k_bIsRandomFinalFill = true; // if true we choose a random value to randomly fill the space between ticks
static constexpr uint32_t termMid = k_expTermZeroMeanRelativeError;
static constexpr uint32_t termStepsFromMid = 20;
static constexpr uint32_t termStepDistance = 10;
static constexpr ptrdiff_t k_cStats = termStepsFromMid * 2 + 1;
static constexpr double k_movementTick = (k_testUpperExclusiveBound - k_testLowerInclusiveBound) / k_cTests;
// uniform_real_distribution includes the lower bound, but not the upper bound, which is good because
// our window is balanced by not including both ends
std::uniform_real_distribution<double> testDistribution(k_bIsRandom ? k_testLowerInclusiveBound : double { 0 }, k_bIsRandom ? k_testUpperExclusiveBound : k_movementTick);
std::mt19937 testRandom(52);
for(ptrdiff_t iStat = 0; iStat < k_cStats; ++iStat) {
const uint32_t addTerm = termMid - termStepsFromMid * termStepDistance + static_cast<uint32_t>(iStat) * termStepDistance;
if(k_expTermLowerBound <= addTerm && addTerm <= k_expTermUpperBound) {
double avgAbsRelativeError = 0;
double avgRelativeError = 0;
double avgSquareRelativeError = 0;
double minRelativeError = std::numeric_limits<double>::max();
double maxRelativeError = std::numeric_limits<double>::lowest();
for(uint64_t iTest = 0; iTest < k_cTests; ++iTest) {
double val;
if(k_bIsRandom) {
val = testDistribution(testRandom);
} else {
val = k_testLowerInclusiveBound + iTest * k_movementTick;
if(k_bIsRandomFinalFill) {
val += testDistribution(testRandom);
}
}
double exactVal = std::exp(val);
double approxVal = ExpApproxSchraudolph<false, false, false, false>(val, addTerm);
double error = approxVal - exactVal;
double relativeError = error / exactVal;
avgRelativeError += relativeError;
avgAbsRelativeError += std::abs(relativeError);
avgSquareRelativeError += relativeError * relativeError;
minRelativeError = std::min(relativeError, minRelativeError);
maxRelativeError = std::max(relativeError, maxRelativeError);
}
avgAbsRelativeError /= k_cTests;
avgRelativeError /= k_cTests;
avgSquareRelativeError /= k_cTests;
#ifdef ENABLE_PRINTF
printf(
"TextExpApprox: %+.10lf, %+.10lf, %+.10lf, %+.10lf, %+.10lf, %d %s%s\n",
avgRelativeError,
avgAbsRelativeError,
avgSquareRelativeError,
minRelativeError,
maxRelativeError,
addTerm,
addTerm == termMid ? "*" : "",
iStat == k_cStats - 1 ? "\n" : ""
);
#endif // ENABLE_PRINTF
// this is just to prevent the compiler for optimizing our code away on release
debugRet += avgRelativeError;
} else {
#ifdef ENABLE_PRINTF
if(iStat == k_cStats - 1) {
printf("\n");
}
#endif // ENABLE_PRINTF
}
}
// this is just to prevent the compiler for optimizing our code away on release
return debugRet;
}
// this is just to prevent the compiler for optimizing our code away on release
extern double g_TestExpSumErrors = TestExpSumErrors();
#endif // ENABLE_TEST_EXP_SUM_ERRORS
#ifdef ENABLE_TEST_SOFTMAX_SUM_ERRORS
static double TestSoftmaxSumErrors() {
double debugRet = 0; // this just prevents the optimizer from eliminating this code
static constexpr unsigned int seed = 572422;
static constexpr double k_expWindowSkew = 0;
static constexpr int expWindowMultiple = 10;
static_assert(1 <= expWindowMultiple, "window must have a positive non-zero size");
static constexpr bool k_bIsRandom = true;
static constexpr bool k_bIsRandomFinalFill = true; // if true we choose a random value to randomly fill the space between ticks
static constexpr uint64_t k_cTests = uint64_t { 10000000 }; // std::numeric_limits<uint64_t>::max()
static constexpr uint64_t k_outputPeriodicity = uint64_t { 100000000 };
static constexpr uint64_t k_cDivisions = 1609; // ideally choose a prime number
static constexpr ptrdiff_t k_cSoftmaxTerms = 3;
static_assert(2 <= k_cSoftmaxTerms, "can't have just 1 since that's always 100% chance");
static constexpr ptrdiff_t iEliminateOneTerm = 0;
static_assert(iEliminateOneTerm < k_cSoftmaxTerms, "can't eliminate a term above our existing terms");
static constexpr uint32_t termMid = k_expTermZeroMeanErrorForSoftmaxWithZeroedLogit;
static constexpr uint32_t termStepsFromMid = 0;
static constexpr uint32_t termStepDistance = 1;
// below here are calculated values dependent on the above settings
// our exp error has a periodicity of ln(2), so [0, ln(2)) should have the same relative error as
// [ln(2), 2 * ln(2)) OR [-ln(2), 0) OR [-ln(2)/2, +ln(2)/2)
// BUT, this needs to be evenly distributed, so we can't use nextafter. We need to increment with a constant.
static constexpr double k_testLowerInclusiveBound =
k_expWindowSkew - static_cast<double>(expWindowMultiple) * k_expErrorPeriodicity / 2;
static constexpr double k_testUpperExclusiveBound =
k_expWindowSkew + static_cast<double>(expWindowMultiple) * k_expErrorPeriodicity / 2;
static constexpr ptrdiff_t k_cStats = termStepsFromMid * 2 + 1;
static constexpr double k_movementTick = (k_testUpperExclusiveBound - k_testLowerInclusiveBound) / k_cDivisions;
static_assert(k_testLowerInclusiveBound < k_testUpperExclusiveBound, "low must be lower than high");
static_assert(k_expUnderflowPoint <= k_testLowerInclusiveBound, "outside exp bounds");
static_assert(k_testLowerInclusiveBound <= k_expOverflowPoint, "outside exp bounds");
static_assert(k_expUnderflowPoint <= k_testUpperExclusiveBound, "outside exp bounds");
static_assert(k_testUpperExclusiveBound <= k_expOverflowPoint, "outside exp bounds");
// uniform_real_distribution includes the lower bound, but not the upper bound, which is good because
// our window is balanced by not including both ends
std::uniform_real_distribution<double> testDistribution(
k_bIsRandom ? k_testLowerInclusiveBound : double { 0 }, k_bIsRandom ? k_testUpperExclusiveBound : k_movementTick);
std::mt19937 testRandom(seed);
double softmaxTerms[k_cSoftmaxTerms];
double avgAbsRelativeError[k_cStats];
double avgRelativeError[k_cStats];
double avgSquareRelativeError[k_cStats];
double minRelativeError[k_cStats];
double maxRelativeError[k_cStats];
for(ptrdiff_t iStat = 0; iStat < k_cStats; ++iStat) {
avgAbsRelativeError[iStat] = 0;
avgRelativeError[iStat] = 0;
avgSquareRelativeError[iStat] = 0;
minRelativeError[iStat] = std::numeric_limits<double>::max();
maxRelativeError[iStat] = std::numeric_limits<double>::lowest();
}
uint64_t aIndexes[k_cSoftmaxTerms];
for(ptrdiff_t iTerm = 0; iTerm < k_cSoftmaxTerms; ++iTerm) {
softmaxTerms[iTerm] = 0;
aIndexes[iTerm] = 0;
}
uint64_t iTest = 0;
while(true) {
for(ptrdiff_t iStat = 0; iStat < k_cStats; ++iStat) {
const uint32_t addTerm = termMid - termStepsFromMid * termStepDistance + static_cast<uint32_t>(iStat) * termStepDistance;
if(k_expTermLowerBound <= addTerm && addTerm <= k_expTermUpperBound) {
for(ptrdiff_t iTerm = 0; iTerm < k_cSoftmaxTerms; ++iTerm) {
if(iTerm != iEliminateOneTerm) {
if(k_bIsRandom) {
softmaxTerms[iTerm] = testDistribution(testRandom);
} else {
softmaxTerms[iTerm] = k_testLowerInclusiveBound + aIndexes[iTerm] * k_movementTick;
if(k_bIsRandomFinalFill) {
softmaxTerms[iTerm] += testDistribution(testRandom);
}
}
}
}
const double exactNumerator = 0 == iEliminateOneTerm ? double { 1 } : std::exp(softmaxTerms[0]);
double exactDenominator = 0;
for(ptrdiff_t iTerm = 0; iTerm < k_cSoftmaxTerms; ++iTerm) {
const double oneTermAdd = iTerm == iEliminateOneTerm ? double { 1 } : std::exp(softmaxTerms[iTerm]);
exactDenominator += oneTermAdd;
}
const double exactVal = exactNumerator / exactDenominator;
const double approxNumerator = 0 == iEliminateOneTerm ? double { 1 } : ExpApproxSchraudolph<false, false, false, false>(softmaxTerms[0]);
double approxDenominator = 0;
for(ptrdiff_t iTerm = 0; iTerm < k_cSoftmaxTerms; ++iTerm) {
const double oneTermAdd = iTerm == iEliminateOneTerm ? double { 1 } : ExpApproxSchraudolph<false, false, false, false>(softmaxTerms[iTerm]);
approxDenominator += oneTermAdd;
}
const double approxVal = approxNumerator / approxDenominator;
const double error = approxVal - exactVal;
const double relativeError = error / exactVal;
avgRelativeError[iStat] += relativeError;
avgAbsRelativeError[iStat] += std::abs(relativeError);
avgSquareRelativeError[iStat] += relativeError * relativeError;
minRelativeError[iStat] = std::min(relativeError, minRelativeError[iStat]);
maxRelativeError[iStat] = std::max(relativeError, maxRelativeError[iStat]);
// this is just to prevent the compiler for optimizing our code away on release
debugRet += relativeError;
}
}
bool bDone = true;
++iTest;
if(k_bIsRandom) {
if(iTest < k_cTests) {
bDone = false;
}
} else {
for(ptrdiff_t iTerm = 0; iTerm < k_cSoftmaxTerms; ++iTerm) {
if(iTerm != iEliminateOneTerm) {
++aIndexes[iTerm];
if(aIndexes[iTerm] == k_cDivisions) {
aIndexes[iTerm] = 0;
} else {
bDone = false;
break;
}
}
}
}
if(bDone || (0 < k_outputPeriodicity && 0 == iTest % k_outputPeriodicity)) {
for(ptrdiff_t iStat = 0; iStat < k_cStats; ++iStat) {
const uint32_t addTerm = termMid - termStepsFromMid * termStepDistance + static_cast<uint32_t>(iStat) * termStepDistance;
if(k_expTermLowerBound <= addTerm && addTerm <= k_expTermUpperBound) {
#ifdef ENABLE_PRINTF
printf(
"TextSoftmaxApprox: %+.10lf, %+.10lf, %+.10lf, %+.10lf, %+.10lf, %d %s%s\n",
avgRelativeError[iStat] / iTest,
avgAbsRelativeError[iStat] / iTest,
avgSquareRelativeError[iStat] / iTest,
minRelativeError[iStat],
maxRelativeError[iStat],
addTerm,
addTerm == termMid ? "*" : "",
iStat == k_cStats - 1 ? "\n" : ""
);
#endif // ENABLE_PRINTF
} else {
#ifdef ENABLE_PRINTF
if(iStat == k_cStats - 1) {
printf("\n");
}
#endif // ENABLE_PRINTF
}
}
}
if(bDone) {
break;
}
}
// this is just to prevent the compiler for optimizing our code away on release
return debugRet;
}
// this is just to prevent the compiler for optimizing our code away on release
extern double g_TestSoftmaxSumErrors = TestSoftmaxSumErrors();
#endif // ENABLE_TEST_SOFTMAX_SUM_ERRORS
#endif // !defined(NDEBUG) || defined(INCLUDE_TESTS_IN_RELEASE)
} // DEFINED_ZONE_NAME
|
c985bd86770342eb59d1619e1aa7e48affdc6242
|
7a4d5d147a8bc95ccc4eec2614906262f5ab93ee
|
/livewire_features/lwocv.cpp
|
df2ab1b89070b2c6605c2c55be8070a08f82dbec
|
[] |
no_license
|
andemerie/livewire
|
83cf18b20d16a855979692b3a8414545a3194eb7
|
72168ff0de83d95196567203288db64e47006a57
|
refs/heads/master
| 2021-03-22T03:35:42.415132
| 2017-08-13T14:10:40
| 2017-08-13T14:10:40
| 83,986,223
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 11,093
|
cpp
|
lwocv.cpp
|
#include "lwocv.h"
cv::Mat calcImgGrad(const cv::Mat &img) {
cv::Mat ret;
cv::Mat gx, gy, ga;
cv::Sobel(img, gx, CV_64F, 1,0);
cv::Sobel(img, gy, CV_64F, 0,1);
cv::cartToPolar(gx,gy, ret,ga);
double vMax;
cv::minMaxLoc(ret, NULL, &vMax, NULL,NULL);
ret=1.0-ret/vMax;
return ret;
}
cv::Mat calcCanny(const cv::Mat &img) {
cv::Mat ret, tmp, imgb;
img.copyTo(imgb);
// cv::blur(img, imgb, cv::Size(3,3));
// cv::adaptiveBilateralFilter(img,imgb,cv::Size(7,7),200);
int param=9;
cv::bilateralFilter(img,imgb,param,param*2,param/2.0);
cv::Scalar vMean = cv::mean(imgb);
std::cout << "mean = " << vMean << std::endl;
// tmp.reshape(0,1);
// cv::sort(tmp,tmp,CV_SORT_ASCENDING);
// double vMedian = (double)tmp.at<uchar>(0,tmp.cols/2);
double vMedian = vMean[0];
double sigma = 0.3;
double lower = std::max(0.0, (1.0 - sigma) * vMedian);
double upper = std::min(255.0, (1.0 + sigma) * vMedian);
std::cout << "lower=" << lower << ", upper=" << upper << std::endl;
cv::Canny(imgb, ret, lower, upper, 3);
ret.convertTo(ret,CV_64F);
double vMax;
cv::minMaxLoc(ret, NULL, &vMax, NULL,NULL);
return (1.0 - ret/vMax);
}
void use_superpixels(cv::Mat &image) {
cv::Mat image_contours = cv::imread("dog_contours.bmp", CV_LOAD_IMAGE_GRAYSCALE);
for (int i = 0; i < image_contours.rows; i++) {
for (int j = 0; j < image_contours.cols; j++) {
if (image_contours.at<unsigned char>(i, j) == 255) {
image.at<double>(i, j) = 1;
}
}
}
}
cv::Mat calcLiveWireCostFcn(const cv::Mat &img) {
cv::Mat imgg = img;
if(img.channels()==3) {
cv::cvtColor(img,imgg,CV_BGR2GRAY);
}
cv::Mat imgG = calcImgGrad(imgg);
cv::Mat imgE = calcCanny(imgg);
cv::Mat ret;
double pG = 0.8;
double pE = 0.2;
// std::cout << imgG.type() << "/" << imgE.type() << std::endl;
ret = pG*imgG + pE*imgE;
use_superpixels(ret);
return ret;
}
cv::Mat normImage(const cv::Mat &img) {
cv::Mat ret;
cv::normalize(img, ret, 0,255, CV_MINMAX, CV_8U);
return ret;
}
long fFindMinG(SEntry *pSList, long lLength)
{
long lMinPos = 0;
float flMin = 1e15;
SEntry SE;
for (long lI = 0; lI < lLength; lI++) {
SE = *pSList++;
if (SE.flG < flMin) {
lMinPos = lI;
flMin = SE.flG;
}
}
return lMinPos;
}
long fFindLinInd(SEntry *pSList, long lLength, long lInd)
{
SEntry SE;
for (long lI = 0; lI < lLength; lI++) {
SE = *pSList++;
if (SE.lLinInd == lInd) return lI;
}
return -1; // If not found, return -1
}
void calcLiveWireP(const cv::Mat &imgS, int dX, int dY, cv::Mat &iPX, cv::Mat &iPY, double dRadius, int LISTMAXLENGTH)
{
iPX.release();
iPY.release();
cv::Size siz = imgS.size();
double *pdF = (double*)(imgS.data);
short sNX = siz.width;
short sNY = siz.height;
short sXSeed = dX;
short sYSeed = dY;
iPX = cv::Mat::zeros(siz, CV_8S);
iPY = cv::Mat::zeros(siz, CV_8S);
char *plPX = (char*) (iPX.data);
char *plPY = (char*) (iPY.data);
// Start of the real functionality
long lInd;
long lLinInd;
long lListInd = 0; // = length of list
short sXLowerLim;
short sXUpperLim;
short sYLowerLim;
short sYUpperLim;
long lNPixelsToProcess;
long lNPixelsProcessed = 0;
float flThisG;
float flWeight;
SEntry SQ, SR;
cv::Mat lE = cv::Mat::zeros(siz, CV_8S);
char* plE= (char*)(lE.data);
SEntry *pSList = new SEntry[LISTMAXLENGTH];
lNPixelsToProcess = ifMin(long(3.14*dRadius*dRadius + 0.5), long(sNX)*long(sNY));
// Initialize active list with zero cost seed pixel.
SQ.sX = sXSeed;
SQ.sY = sYSeed;
// SQ.lLinInd = ifLinInd(sXSeed, sYSeed, sNY);
SQ.lLinInd = ifLinInd(sXSeed, sYSeed, sNX);
SQ.flG = 0.0;
pSList[lListInd++] = SQ;
// While there are still objects in the active list and pixel limit not reached
while ((lListInd) && (lNPixelsProcessed < lNPixelsToProcess)) {
// ----------------------------------------------------------------
// Determine pixel q in list with minimal cost and remove from
// active list. Mark q as processed.
lInd = fFindMinG(pSList, lListInd);
SQ = pSList[lInd];
lListInd--;
pSList[lInd] = pSList[lListInd];
plE[SQ.lLinInd] = 1;
// ----------------------------------------------------------------
// Determine neighbourhood of q and loop over it
sXLowerLim = ifMax( 0, SQ.sX - 1);
sXUpperLim = ifMin(sNX - 1, SQ.sX + 1);
sYLowerLim = ifMax( 0, SQ.sY - 1);
sYUpperLim = ifMin(sNY - 1, SQ.sY + 1);
for (short sX = sXLowerLim; sX <= sXUpperLim; sX++) {
for (short sY = sYLowerLim; sY <= sYUpperLim; sY++) {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Skip if pixel was already processed
// lLinInd = ifLinInd(sX, sY, sNY);
lLinInd = ifLinInd(sX, sY, sNX);
if (plE[lLinInd]) continue;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Compute the new accumulated cost to the neighbour pixel
if ((abs(sX - SQ.sX) + abs(sY - SQ.sY)) == 1) flWeight = 0.71; else flWeight = 1;
flThisG = SQ.flG + float(pdF[lLinInd])*flWeight;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Check whether r is already in active list and if the
// current cost is lower than the previous
lInd = fFindLinInd(pSList, lListInd, lLinInd);
if (lInd >= 0) {
SR = pSList[lInd];
if (flThisG < SR.flG) {
SR.flG = flThisG;
pSList[lInd] = SR;
plPX[lLinInd] = char(SQ.sX - sX);
plPY[lLinInd] = char(SQ.sY - sY);
}
} else {
// - - - - - - - - - - - - - - - - - - - - - - - - - -
// If r is not in the active list, add it!
SR.sX = sX;
SR.sY = sY;
SR.lLinInd = lLinInd;
SR.flG = flThisG;
pSList[lListInd++] = SR;
plPX[lLinInd] = char(SQ.sX - sX);
plPY[lLinInd] = char(SQ.sY - sY);
// - - - - - - - - - - - - - - - - - - - - - - - - - -
}
}
// End of the neighbourhood loop.
// ----------------------------------------------------------------
}
lNPixelsProcessed++;
}
// End of while loop
delete pSList;
}
void calcLiveWireGetPath(const cv::Mat &ipx, const cv::Mat &ipy, cv::Point pxy, std::vector<cv::Point> &path, int iMAXPATH)
{
path.clear();
// Initialize the variables
int iXS = pxy.x;
int iYS = pxy.y;
std::vector<int> iX(iMAXPATH,0);
std::vector<int> iY(iMAXPATH,0);
int iLength = 0;
iX[iLength] = iXS;
iY[iLength] = iYS;
while ( (ipx.at<char>(iYS, iXS) != 0) || (ipy.at<char>(iYS, iXS) != 0) ) // We're not at the seed
{
iXS = iXS + ipx.at<char>(iYS, iXS);
iYS = iYS + ipy.at<char>(iYS, iXS);
iLength = iLength + 1;
iX[iLength] = iXS;
iY[iLength] = iYS;
}
for(int ii=iLength-2; ii>=0; ii--) {
int tx = iX[ii];
int ty = iY[ii];
path.push_back(cv::Point(tx,ty));
}
}
cv::Point calcIdealAnchor(const cv::Mat &imgS, cv::Point pxy, int rad) {
// std::cout << "FUCK" << std::endl;
int nc = imgS.cols;
int nr = imgS.rows;
int r0 = pxy.y;
int c0 = pxy.x;
//
int rMin = r0-rad;
int rMax = r0+rad;
if(rMin<0) {
rMin = 0;
}
if(rMax>=nr) {
rMax = nr-1;
}
//
int cMin = c0-rad;
int cMax = c0+rad;
if(cMin<0) {
cMin = 0;
}
if(cMax>=nc) {
cMax = nc-1;
}
//
cv::Point ret(c0,r0);
double valMin = imgS.at<double>(r0,c0);
double tval;
for(int rr=rMin; rr<rMax; rr++) {
for(int cc=cMin; cc<cMax; cc++) {
tval = imgS.at<double>(rr,cc);
if(tval<valMin) {
valMin = tval;
ret.x = cc;
ret.y = rr;
}
}
}
return ret;
}
///////////////////////////////////////////////////
OCVLiveWire::OCVLiveWire() {
this->clean();
initParams();
}
OCVLiveWire::OCVLiveWire(const cv::Mat &img, bool modeDebug) {
initParams();
setDebugMode(modeDebug);
loadImage(img);
}
void OCVLiveWire::loadImage(const cv::Mat &img, bool modeDebug) {
setDebugMode(modeDebug);
imgf = calcLiveWireCostFcn(img);
isStartPath = false;
isLoaded = true;
}
void OCVLiveWire::initParams() {
isLoaded = false;
isStartPath = false;
parRadiusA = 4;
parRadiusP = 120;
parRadiusPath = 300;
}
bool OCVLiveWire::isLoadedData() const {
return isLoaded;
}
bool OCVLiveWire::isStartedPath() const {
return isStartPath;
}
void OCVLiveWire::setDebugMode(bool mode) {
isDebug = mode;
}
cv::Point OCVLiveWire::getCPoint() const {
return cPoint;
}
cv::Point OCVLiveWire::getMPoint() const {
return mPoint;
}
void OCVLiveWire::clean() {
this->isLoaded = false;
imgf.release();
iPX.release();
iPY.release();
}
void OCVLiveWire::calcLWP(cv::Point p, bool isAnchorIdeal) {
if(isLoaded) {
cv::Point tp = p;
if(isAnchorIdeal) {
tp = calcIdealAnchor(imgf,p,parRadiusA);
}
calcLiveWireP(imgf, tp.x, tp.y, iPX, iPY, parRadiusP);
isStartPath = true;
cPoint = tp;
}
}
void OCVLiveWire::calcLWPath(const cv::Point &p, bool isAnchorIdeal) {
if(isLoaded && isStartPath) {
cv::Point tp = p;
if(isAnchorIdeal) {
tp = calcIdealAnchor(imgf,p,parRadiusA);
}
double pDST = cv::norm(tp-cPoint);
bool isNoPath = true;
if( (pDST>1.0) && (pDST<parRadiusPath)) {
calcLiveWireGetPath(iPX,iPY, tp, path);
if(path.size()>0) {
isNoPath = false;
}
}
if(isNoPath) {
path.clear();
path.push_back(tp);
}
this->mPoint = tp;
}
}
void OCVLiveWire::incPath() {
if(isLoaded) {
if(path.size()>0) {
pathTot.insert(pathTot.end(), path.begin(), path.end());
}
}
}
void OCVLiveWire::helpDrawImgPXY(const std::string &winName) {
if(isLoaded) {
cv::Mat tmp;
cv::hconcat(iPX,iPY,tmp);
cv::imshow(winName, normImage(tmp));
}
}
void OCVLiveWire::helpDrawImgF(const std::string &winName) {
if(isLoaded) {
cv::imshow(winName, normImage(imgf));
}
}
|
ce1c26b672dbea11d4b4a12075e259ec92ddf553
|
8a94fcd5efd6a6d1f931b723b81ca3fd1cdfae80
|
/strings/strings 1st/finding first unique element in string using an array.cpp
|
32b830536ddfb87e0fcce5628c000c4ed98fce50
|
[] |
no_license
|
saranshrawat/Data-structure-and-algorithms
|
b00c7313a964603783feb615789e90e9cc0d9db7
|
dbb59c971c71ecad3ae7e23a940abe3b897f2e2b
|
refs/heads/main
| 2023-07-26T18:31:06.750360
| 2021-09-07T06:17:27
| 2021-09-07T06:17:27
| 403,859,752
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 594
|
cpp
|
finding first unique element in string using an array.cpp
|
#include<iostream>
#include<string>
#include<map>
using namespace std;
char unique(string s)
{
int v,ind,store,arr[26];
char uni;
for(int i=0;i<s.length();i++)
{ v=(int)s[i];
ind=v-97;
arr[ind]+=1;
}
for(int i=0;i<s.length();i++)
{ v=(int)s[i];
ind=v-97;
if(arr[ind]==1)
{
store=ind;
break;
}
}
store+=97;
uni=(char)store;
return uni;
}
int main()
{
string s;
cout<<"enter a string"<<endl;
cin>>s;
char c=unique(s);
cout<<"first unique char is "<<c;
return 0;
}
|
e48a783620dd8d5407cb8568e8f63dcaa28f5b10
|
7246f7795ba754d05b0868b9c887f8d650f37a46
|
/ProjetPriseDeNote/video.h
|
a8c438beaeb2f7ea5b14b15c62667211bce3fe05
|
[] |
no_license
|
Simobain/MotDit
|
736ebc16262e2ae4184e8029a6bdb3b55b7c05a5
|
4bfa7ac8882b3f61b69e0615cc624fbde8d0a49c
|
refs/heads/master
| 2021-01-19T19:37:49.636026
| 2013-06-16T22:04:03
| 2013-06-16T22:04:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,131
|
h
|
video.h
|
#ifndef VIDEO_H
#define VIDEO_H
#include "binary.h"
/*!
* \file video.h
* \brief Classe de base permettant de définir des notes de type video.
* \author Pauline Cuche/Simon Robain
*/
/**
*\class Video
* \brief Classe représentant les Video
*/
class Video : public Binary
{
Video(const Video& v);
Video& operator=(const Video& v);
public:
/*!
* \brief Constructeur Par Defaut
* Constructeur par défaut de la classe Video
*/
Video();
/*!
* \brief Constructeur
*
* Constructeur de la classe Video
*\param id : ID de la Video
*\param titre : titre de la Video
*\param path : chemin d'accès à la vidéo que l'on souhaite référencer (vide par défaut)
*\param desc : description de la Video (vide par défaut)
*/
Video(const QString& id, const QString& titre, const QString& path="", const QString& desc="");
/*!
*\brief Accesseur du type de la note (ici VIDEO)
*\return NoteType : type de la note renvoyée
*/
NoteType getType() const;
};
#endif // VIDEO_H
|
1cb14642cf23b1abafac60dfe5b978175b94a483
|
ec2f7ef3ba6582c25a525a5e172dc18b28564852
|
/GameAIPlugin/Source/BT/Condition/HaveLastKnownPositionCondition.h
|
cf1c005d67622858baf1f6059a91db05cdbcb615
|
[
"MIT"
] |
permissive
|
river34/the-ai-project
|
86473a354e6c466a63e40b4749cc20386eedd035
|
9397a603e79be4c67ac8da12df4f2178af74ff2f
|
refs/heads/master
| 2021-04-28T10:45:47.136802
| 2018-02-19T14:33:21
| 2018-02-19T14:33:21
| 122,074,021
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 897
|
h
|
HaveLastKnownPositionCondition.h
|
#ifndef HaveLastKnownPositionCondition_h
#define HaveLastKnownPositionCondition_h
#include <stdio.h>
#include "GameBTLib.h"
#include "BaseCharacter.h"
#include "GameFrameworkLib.h"
using namespace GameBT;
class HaveLastKnownPositionCondition : public Behavior
{
public:
HaveLastKnownPositionCondition() : Behavior("HaveLastKnownPosition") { }
inline virtual Status onUpdate(Blackboard* _blackboard)
{
FVector* lastKnownPosition = (FVector*)(_blackboard->getEntry("lkp"));
if (lastKnownPosition != nullptr && lastKnownPosition->IsZero() == false)
{
FString fstr = lastKnownPosition->ToString();
std::string str(TCHAR_TO_UTF8(*fstr));
std::cout << "lastKnownPosition: " << str << std::endl;
return Status::BH_SUCCESS;
}
return Status::BH_FAILURE;
}
inline static Behavior* create(const BehaviorParams& _params) { return new HaveLastKnownPositionCondition; }
};
#endif
|
e40717df1fa4bed922e558636860544d0d79c233
|
52a7321b96dec025b6dbfcffa4f0f6d408a41160
|
/main.cpp
|
5ed6b72cdc1071d6f59e38b0bca18e99b28a2d45
|
[] |
no_license
|
BalitskyIvan/ft_containers
|
1b00822e65e1afb8ee8ebda8ecb281a77759675a
|
8bdbe178fedad4b0846ff130ba162e5bf1969662
|
refs/heads/master
| 2023-07-27T21:51:49.451244
| 2021-08-28T06:43:02
| 2021-08-28T06:43:02
| 334,128,651
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,686
|
cpp
|
main.cpp
|
#include "vector_test.cpp"
#include "map_test.cpp"
#include "stack_tester.cpp"
#include <deque>
#define MAX_RAM 42940000
#define BUFFER_SIZE 12000
struct Buffer {
int idx;
char buff[BUFFER_SIZE];
};
#define COUNT (MAX_RAM / (int)sizeof(Buffer))
template<typename T>
class MutantStack : public ft::stack<T> {
public:
MutantStack() {}
MutantStack(const MutantStack<T> &src) { *this = src; }
MutantStack<T> &operator=(const MutantStack<T> &rhs) {
this->c = rhs.c;
return *this;
}
~MutantStack() {}
typedef typename ft::stack<T>::container_type::iterator iterator;
iterator begin() { return this->c.begin(); }
iterator end() { return this->c.end(); }
};
int main() {
{
// if (argc != 2) {
// std::cerr << "Usage: ./test seed" << std::endl;
// std::cerr << "Provide a seed please" << std::endl;
// std::cerr << "Count value:" << COUNT << std::endl;
// return 1;
// }
// const int seed = atoi(argv[1]);
const int seed = 5;
srand(seed);
ft::vector<std::string> vector_str;
ft::vector<int> vector_int;
ft::stack<int> stack_int;
ft::vector<Buffer> vector_buffer;
ft::stack<Buffer, std::deque<int> > stack_deq_buffer;
ft::map<int, int> map_int;
for (int i = 0; i < COUNT; i++) {
vector_buffer.push_back(Buffer());
}
for (int i = 0; i < COUNT; i++) {
const int idx = rand() % COUNT;
vector_buffer[(size_t)idx].idx = 5;
}
ft::vector<Buffer>().swap(vector_buffer);
try {
for (int i = 0; i < COUNT; i++) {
const int idx = rand() % COUNT;
vector_buffer.at((size_t)idx);
std::cerr << "Error: THIS VECTOR SHOULD BE EMPTY!!" << std::endl;
}
}
catch (const std::exception &e) {
std::cout << "norm" << std::endl;
}
for (int i = 0; i < COUNT; ++i) {
map_int.insert(ft::make_pair(rand(), rand()));
}
int sum = 0;
for (int i = 0; i < 10000; i++) {
int access = rand();
sum += map_int[access];
}
std::cout << "should be constant with the same seed: " << sum << std::endl;
{
ft::map<int, int> copy = map_int;
}
MutantStack<char> iterable_stack;
for (char letter = 'a'; letter <= 'z'; letter++)
iterable_stack.push(letter);
for (MutantStack<char>::iterator it = iterable_stack.begin(); it != iterable_stack.end(); it++) {
std::cout << *it;
}
std::cout << std::endl;
}
{
// if (argc != 2) {
// std::cerr << "Usage: ./test seed" << std::endl;
// std::cerr << "Provide a seed please" << std::endl;
// std::cerr << "Count value:" << COUNT << std::endl;
// return 1;
// }
// const int seed = atoi(argv[1]);
const int seed = 5;
srand(seed);
std::vector<std::string> vector_str;
std::vector<int> vector_int;
std::stack<int> stack_int;
std::vector<Buffer> vector_buffer;
std::map<int, int> map_int;
for (int i = 0; i < COUNT; i++) {
vector_buffer.push_back(Buffer());
}
for (int i = 0; i < COUNT; i++) {
const int idx = rand() % COUNT;
vector_buffer[(size_t)idx].idx = 5;
}
std::vector<Buffer>().swap(vector_buffer);
try {
for (int i = 0; i < COUNT; i++) {
const int idx = rand() % COUNT;
vector_buffer.at((size_t)idx);
std::cerr << "Error: THIS VECTOR SHOULD BE EMPTY!!" << std::endl;
}
}
catch (const std::exception &e) {
std::cout << "norm" << std::endl;
}
for (int i = 0; i < COUNT; ++i) {
map_int.insert(std::make_pair(rand(), rand()));
}
int sum = 0;
for (int i = 0; i < 10000; i++) {
int access = rand();
sum += map_int[access];
}
std::cout << "should be constant with the same seed: " << sum << std::endl;
{
std::map<int, int> copy = map_int;
}
MutantStack<char> iterable_stack;
for (char letter = 'a'; letter <= 'z'; letter++)
iterable_stack.push(letter);
for (MutantStack<char>::iterator it = iterable_stack.begin(); it != iterable_stack.end(); it++) {
std::cout << *it;
}
std::cout << std::endl;
}
{
make_vector_test();
make_map_test();
make_stack_test();
}
return (0);
}
|
c96dc8e873751a9d57f7956a6624e6730d354ea3
|
08c01a0ebe125f5ee2f1db73a9e942a8e0786d82
|
/src/core.cpp
|
39588fd721415d0e64335d480fd05c0c6efb82bd
|
[] |
no_license
|
SealBelek/physicEngine
|
ac5e68df49e325e52dc16451d2f71dbf16d292d6
|
d7ca569ab73c13f156d2aae6d50011506e121d7a
|
refs/heads/master
| 2022-08-02T22:40:17.608962
| 2020-05-26T20:54:32
| 2020-05-26T20:54:32
| 240,591,519
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,624
|
cpp
|
core.cpp
|
//
// Created by seakbelek on 14.02.2020.
//
#include "../include/core.h"
#include <cmath>
using namespace physicEngine;
Vector3::Vector3(): x(0), y(0), z(0){}
Vector3::Vector3(const real x, const real y, const real z): x(x), y(y), z(z) {}
void Vector3::invert() {
/**
* инвертирует вектор
*/
x = -x;
y = -y;
z = -z;
}
real Vector3::magnitude() {
/**
* длина вектора, модуль вектора
*/
return real_sqrt(x*x+y*y+z*z);
}
real Vector3::squareMagnitude() {
/**
* квадрат длины вектора
*/
return x*x+y*y+z*z;
}
void Vector3::normalize() {
/**
* направление вектора
*/
real l = magnitude();
if (l > 0)
{
(*this) *= ((real)1)/l;
}
}
void Vector3::operator*=(const real value) {
x *= value;
y *= value;
z *= value;
}
Vector3 Vector3::operator*(const real value) const{
return Vector3(x*value, y*value, z*value);
}
void Vector3::operator+=(const Vector3 &v) {
x += v.x;
y += v.y;
z += v.z;
}
Vector3 Vector3::operator+(const Vector3 &v) const {
return Vector3(x+v.x, y+v.y, z+v.z);
}
void Vector3::operator-=(const Vector3 &v) {
x -= v.x;
y -= v.y;
z -= v.z;
}
Vector3 Vector3::operator-(const Vector3 &v) const {
return Vector3(x-v.x, y-v.y, z-v.z);
}
void Vector3::addScaledVector(const Vector3 &vector, const real scale) {
x += vector.x * scale;
y += vector.y * scale;
z += vector.z * scale;
}
Vector3 Vector3::componentProduct(const Vector3 &vector) const {
return Vector3(x*vector.x, y*vector.y, z*vector.z);
}
real Vector3::scalarProduct(const Vector3 &vector) const {
return x*vector.x + y*vector.y + z*vector.z;
}
real Vector3::operator*(const Vector3 &vector) const {
return x*vector.x + y*vector.y + z*vector.z;
}
Vector3 Vector3::vectorProduct(const Vector3 &vector) const {
return Vector3(y*vector.z-z*vector.y,
z*vector.x-x*vector.z,
x*vector.y-y*vector.x);
}
void Vector3::operator%=(const Vector3 &vector) {
*this = vectorProduct(vector);
}
Vector3 Vector3::operator%(const Vector3 &vector) const {
return Vector3(y*vector.z - z*vector.y,
z*vector.x - x*vector.z,
x*vector.y - y*vector.x);
}
void Vector3::setVector(const real newX, const real newY, const real newZ) {
x = newX;
y = newY;
z = newZ;
}
void Vector3::clear() {
x = y = z = 0;
}
real Vector3::getX() {
return x;
}
real Vector3::getY() {
return y;
}
real Vector3::getZ() {
return z;
}
|
0650daffe708d8f55af4b09d74ae2f96c7d60daf
|
6b873489c50cae426b6f6bbca8fa2bfc23bba5eb
|
/1154.digital/ADC-lab/ADC_Smoothed_MIDI_cc/ADC_Smoothed_MIDI_cc.ino
|
75d3ab12e8c2e4fc81dc8c82647589608d6517d0
|
[] |
no_license
|
langsound/Digital-Electronics
|
a34dc46826759de9664eb01e1a978017ab3b8379
|
13566f9552f0e284cd7b69a311dcc798c9da7d31
|
refs/heads/master
| 2021-01-19T20:15:33.694418
| 2015-04-15T22:39:36
| 2015-04-15T22:39:36
| 10,916,243
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 812
|
ino
|
ADC_Smoothed_MIDI_cc.ino
|
/*
analog read to MIDI continuous controller send.
One pot is sent via to different midi CC messages.
the first cc message is just scaled data
the second cc message is scaled and smoothed data
*/
// change pwmSmooth here
float pwmSmooth = 0.5;
float pwmOut;
void setup(){
}//endsetup
void loop(){
// send analog read data scaled,
usbMIDI.sendControlChange(34, map(analogRead(0), 0, 1024, 0, 127), 1);
//read analog pin zero, scale it, smooth it.
pwmOut = map(analogRead(0), 0, 1024, 0, 127) * (1-pwmSmooth) + pwmOut * pwmSmooth;
// send analog read data scaled and smoothed.
// may need to convert pwmOut to integer...
usbMIDI.sendControlChange(55, pwmOut, 1);
delay(10); // you may want to change this to something between 33 and 60...
}//endloop
|
65c9adfa45badc5e96e8ed3d9439acaf4eaf7ee6
|
bd99f1443454c27bd247f0696c1730183c9a4a11
|
/main.cpp
|
a82282b805a1c06ac9fcd0461971d9d5b6f5e907
|
[] |
no_license
|
Hostridet/pthread
|
ddea6e2262aaa61b32659f92b7e99f44cabd2ec2
|
09ddc67efbfc10b8048d359587c8e70ad30aa52a
|
refs/heads/main
| 2023-02-17T23:13:50.950171
| 2021-01-15T21:21:56
| 2021-01-15T21:21:56
| 330,018,606
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 697
|
cpp
|
main.cpp
|
#include <iostream>
#include <ctime>
#include "thread.h"
using namespace std;
int main() {
clock_t start, end;
start = clock();
cout << "Сумма высчитанная в одном потоке: " << SoloThread() << endl;
end = clock();
cout << "Один поток посчитал сумму чисел во всех файлах за: " << (end - start) / 1000.0 << endl;
start = clock();
cout << "Сумма высчитанная в 10 потоках: " << MultiThread() << endl;
end = clock();
cout << "10 потоков посчитали сумму чисел во всех файлах за: " << (end - start) / 1000.0 << endl;
return 0;
}
|
8aa6e525cd696551fb19a32127d9af5c884f71bc
|
03fc8bbfb2632d98a8c5a6078361e3c377ad84ee
|
/App/DeepObjectTracker/RecurrentNeuralNetworkCUDA/RecurrentNeuralNetwork.h
|
75ade8cbe8923c18f045e321523d637a127dd05d
|
[] |
no_license
|
andu04/DeepObjectTracker
|
157c488672ee78e90dbd5ef6a92a551f687b7738
|
078ad6fda1a837b1a0819cfa965e41bb6065c547
|
refs/heads/master
| 2021-01-21T17:28:28.823752
| 2017-04-05T20:30:44
| 2017-04-05T20:30:44
| 85,471,456
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 237
|
h
|
RecurrentNeuralNetwork.h
|
#pragma once
#include "cudnn.h"
class RecurrentNeuralNetwork
{
public:
RecurrentNeuralNetwork();
~RecurrentNeuralNetwork();
bool CheckCUDA();
bool CheckCUDNN();
private:
cudnnHandle_t cudnnHandle;
cudnnStatus_t cudnnStatus;
};
|
c2a1cc9e0d56a2794a3a7a730d5ac5ce4a7c2b1a
|
739c019596f3bc2f82940a95e3352bcc27cab630
|
/Forces/714B.cpp
|
118675061647f70186d3be6fc92bae4bef120942
|
[] |
no_license
|
FundamentalEq/CompetitiveProgramming
|
d379ac2b274b26ceb123e8d7769dcbae6615191a
|
10ca735e7ce3cba796ad129df290884cdee1c4af
|
refs/heads/master
| 2020-06-13T06:44:42.822860
| 2017-10-08T14:31:47
| 2017-10-08T14:31:47
| 75,419,874
| 0
| 1
| null | 2017-10-08T14:31:48
| 2016-12-02T18:14:40
|
C++
|
UTF-8
|
C++
| false
| false
| 833
|
cpp
|
714B.cpp
|
#include <bits/stdc++.h>
#define FN(i, n) for (int i = 0; i < (int)(n); ++i)
#define FEN(i,n) for (int i = 1;i <= (int)(n); ++i)
#define FA(i, a) for (__typeof((a).begin()) i = (a).begin(); i != (a).end(); i++)
#define pb push_back
#define mp make_pair
#define sz(a) (int)(a).size()
#define f first
#define s second
#define pii pair<int,int>
#define vi vector<int>
#define ll long long
#define db long double
using namespace std ;
const int L =1e5+5 ;
int main()
{
std::ios::sync_with_stdio(false);
int N ; cin>>N ;
ll sum=0 ;
set<int> A ;
int x ;
FN(i,N)cin>>x, A.insert(x) ;
bool ans=true ;
if(sz(A)>3) ans=false ;
else if(sz(A)==3)
{
vi temp ;
FA(it,A) temp.pb(*it) ;
if((temp[0]+temp[2])%2 != 0 ) ans=false ;
else if( (temp[0]+temp[2])/2 != temp[1]) ans=false ;
}
cout<<(ans?"YES":"NO")<<endl ;
return 0 ;
}
|
c6eac9d48046651babd08e86790d9b17d08298f9
|
d21c3427800f8dd1fcbf34cd2768a65fdcae3a27
|
/code/cytosim/src/sim/fiber_binder.cc
|
085b767da27e1c0627216b56a19491bd6c9e43af
|
[] |
no_license
|
manulera/LeraRamirez2019
|
b4e5637b76b988e3ae32177e7e894f85f9b6e109
|
bc42559d500d6e3270d1e8ab0e033a9e980b5e48
|
refs/heads/master
| 2023-02-12T22:56:05.410164
| 2021-01-13T10:10:24
| 2021-01-13T10:10:24
| 329,267,089
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,615
|
cc
|
fiber_binder.cc
|
// Cytosim was created by Francois Nedelec. Copyright 2007-2017 EMBL.
#include "fiber_binder.h"
#include "fiber_locus.h"
#include "iowrapper.h"
#include "simul.h"
#include "sim.h"
FiberBinder::FiberBinder(Fiber* f, real a)
: fbFiber(f), fbAbs(a)
{
assert_true(f);
inter = f->interpolate(a);
}
void FiberBinder::locate(Fiber * f, real a)
{
assert_true(f);
assert_true(fbFiber==0);
assert_true(f->abscissaM() <= a + REAL_EPSILON);
assert_true(a <= f->abscissaP() + REAL_EPSILON);
fbAbs = a;
fbFiber = f;
f->addBinder(this);
updateBinder();
}
void FiberBinder::delocate()
{
assert_true( fbFiber );
fbFiber->removeBinder(this);
fbFiber = 0;
}
void FiberBinder::relocate(Fiber* f)
{
if ( f != fbFiber )
{
if ( fbFiber )
fbFiber->removeBinder(this);
fbFiber = f;
f->addBinder(this);
updateBinder();
}
}
void FiberBinder::relocate(real a)
{
fbAbs = a;
updateBinder();
}
void FiberBinder::relocate(Fiber* f, real a)
{
if ( f != fbFiber )
{
if ( fbFiber )
fbFiber->removeBinder(this);
fbFiber = f;
f->addBinder(this);
}
fbAbs = a;
updateBinder();
}
void FiberBinder::moveToEndM()
{
assert_true(fbFiber);
fbAbs = fbFiber->abscissaM();
inter = fbFiber->interpolateEndM();
}
void FiberBinder::moveToEndP()
{
assert_true(fbFiber);
fbAbs = fbFiber->abscissaP();
inter = fbFiber->interpolateEndP();
}
void FiberBinder::moveToEnd(const FiberEnd end)
{
assert_true(fbFiber);
assert_true(end==PLUS_END || end==MINUS_END);
if ( end == PLUS_END )
moveToEndP();
else
moveToEndM();
}
//------------------------------------------------------------------------------
#pragma mark -
FiberEnd FiberBinder::nearestEnd() const
{
assert_true(fbFiber);
if ( fbAbs > fbFiber->abscissaC() )
return PLUS_END;
else
return MINUS_END;
}
real FiberBinder::abscissaFrom(const FiberEnd from) const
{
assert_true(fbFiber);
switch( from )
{
case MINUS_END: return fbAbs - fbFiber->abscissaM();
case PLUS_END: return fbFiber->abscissaP() - fbAbs;
case ORIGIN: return fbAbs;
case CENTER: return fbAbs - fbFiber->abscissaC();
default: ABORT_NOW("invalid argument value");
}
return 0;
}
//------------------------------------------------------------------------------
#pragma mark -
void FiberBinder::write(Outputter& out) const
{
out.writeSoftSpace();
if ( fbFiber )
{
checkAbscissa();
fbFiber->writeReference(out);
out.writeFloat(fbAbs);
}
else {
Object::writeNullReference(out);
}
}
void FiberBinder::read(Inputter& in, Simul& sim)
{
Tag tag = 0;
Object * w = sim.readReference(in, tag);
if ( w )
{
//std::clog << "FiberBinder::read() " << (char)tag << std::endl;
Fiber * newfib = static_cast<Fiber*>(w);
if ( tag == Fiber::TAG )
{
fbAbs = in.readFloat();
}
else if ( tag == Fiber::TAG_LATTICE )
{
fbAbs = in.readFloat();
//skip information of site:
in.readUInt32();
}
#ifdef BACKWARD_COMPATIBILITY
else if ( tag == 'm' )
{
fbAbs = in.readFloat();
}
#endif
else
{
///\todo: we should allow binder to refer to any Mecable
throw InvalidIO("FiberBinder should be bound to a Fiber!");
}
// link the FiberBinder as in attach():
if ( newfib != fbFiber )
{
if ( fbFiber )
fbFiber->removeBinder(this);
fbFiber = newfib;
fbFiber->addBinder(this);
}
updateBinder();
checkAbscissa();
}
else
{
if ( fbFiber )
FiberBinder::delocate();
}
}
//------------------------------------------------------------------------------
#pragma mark -
std::ostream& operator << (std::ostream& os, FiberBinder const& obj)
{
if ( obj.fiber() )
os << "(" << obj.fiber()->reference() << " abs " << obj.abscissa() << ")";
else
os << "(null)";
return os;
}
void FiberBinder::checkAbscissa() const
{
assert_true(fbFiber);
if ( fbAbs < fbFiber->abscissaM() - 1e-3 )
MSG.warning("FiberBinder:abscissa < fiber:abscissa(MINUS_END) : %e\n", fbFiber->abscissaM()-fbAbs );
if ( fbAbs > fbFiber->abscissaP() + 1e-3 )
MSG.warning("FiberBinder:abscissa > fiber:abscissa(PLUS_END) : %e\n", fbAbs-fbFiber->abscissaP() );
}
int FiberBinder::bad() const
{
if ( fbFiber != inter.mecable() )
{
std::cerr << "Interpolation mismatch " << fbFiber << " " << inter.mecable() << std::endl;
return 7;
}
if ( fbFiber->betweenMP(fbAbs) )
{
const real e = fbAbs - abscissaInter();
//std::clog << "Interpolation " << std::scientific << e << std::endl;
if ( fabs(e) > 1e-6 )
{
std::cerr << "Interpolation error is " << std::scientific << e << "\n";
std::cerr << " abscissa:\n";
std::cerr << " binder " << fbAbs << "\n";
std::cerr << " interpolated " << abscissaInter() << "\n";
PointInterpolated pi = fbFiber->interpolate(fbAbs);
std::cerr << " updated " << fbFiber->abscissaPoint(pi.point1()+pi.coef1()) << "\n";
return 8;
}
}
return 0;
}
|
8455e46ebce7cbb7c4401fe41b3c259b25d89b57
|
53c44e30f22ed8ad33ae9c0bc1e04fb8b268ce7b
|
/Data Structures/BinarySearchTree.cpp
|
e80a09b779390b26a92755439b582c49a70e2ab8
|
[] |
no_license
|
vinayakkokane/DS-and-Algo-CPP
|
a6ba07e35ff232a613f887eec1a04586c02b9e89
|
4248ad1ed2cabea09cf9305c0b63ad45f8fb5008
|
refs/heads/master
| 2023-03-03T09:28:05.951085
| 2021-02-11T14:23:37
| 2021-02-11T14:23:37
| 284,257,983
| 1
| 1
| null | 2020-10-04T10:22:04
| 2020-08-01T12:43:42
|
C++
|
UTF-8
|
C++
| false
| false
| 5,289
|
cpp
|
BinarySearchTree.cpp
|
/*Implementation of Binary Search Tree
Name: Vinayak L Kokane*/
#include<bits/stdc++.h>
using namespace std;
struct bstnode
{
int data;
struct bstnode *left, *right;
};
struct bstnode *newNode(int key)
{
struct bstnode *temp = new struct bstnode();
temp->data = key;
temp->left = temp->right = NULL;
return temp;
}
void inorder(struct bstnode *root)
{
if (root != NULL){
inorder(root->left);
cout<<root->data<<" ";
inorder(root->right);
}
}
void inorder2(struct bstnode *root){ //iterative inorder
stack <bstnode* > s;
bstnode* current=root;
while(current!=NULL || s.empty()==false){
while(current!=NULL){
s.push(current);
current=current->left;
}
current=s.top();
s.pop();
cout<<current->data<<" ";
current=current->right;
}
}
void preorder(struct bstnode* root){
if(root!=NULL){
cout<<root->data<<" ";
preorder(root->left);
preorder(root->right);
}
}
void preorder2(struct bstnode* root){
stack <bstnode* > s;
bstnode* curr=root;
while(curr!=NULL || !s.empty()){
cout<<curr->data<<" ";
while(curr!=NULL){
s.push(curr);
curr=curr->left;
}
curr=s.top();
s.pop();
curr=curr->right;
}
}
void postorder(struct bstnode* root){
if(root!=NULL){
postorder(root->left);
postorder(root->right);
cout<<root->data<<" ";
}
}
void postorder2(struct bstnode* root){
stack <bstnode* > s1,s2;
bstnode* curr;
s1.push(root);
while(!s1.empty()){
curr=s1.top();
s1.pop();
s2.push(curr);
if(curr->left)
s1.push(curr->left);
if(curr->right)
s1.push(curr->right);
}
while(!s2.empty()){
curr=s2.top();
s2.pop();
cout<<curr->data<<" ";
}
}
struct bstnode* insert(struct bstnode* node, int key)
{
if (node == NULL)
return newNode(key);
if (key < node->data)
node->left = insert(node->left, key);
else
node->right = insert(node->right, key);
return node;
}
struct bstnode * minValueNode(struct bstnode* node)
{
struct bstnode* current = node;
while (current && current->left != NULL)
current = current->left;
cout<<current->data;
return current;
}
struct bstnode* maxValue(bstnode* node){
bstnode* current=node;
while(current && current->right!=NULL){
current=current->right;
}
cout<<current->data;
return current;
}
struct bstnode* MirrorImage(bstnode* node){
if(node==NULL)
return node=NULL;
else{
bstnode* temp;
MirrorImage(node->left);
MirrorImage(node->right);
temp=node->left;
node->left=node->right;
node->right=temp;
return temp;
}
}
struct bstnode* levelorder(bstnode* node){
if (node==NULL)
return node=NULL;
queue <bstnode*> q;
q.push(node);
while(!q.empty()){
bstnode* temp=q.front();
cout<<temp->data<<" ";
q.pop();
if(temp->left!=NULL)
q.push(temp->left);
if(temp->right!=NULL)
q.push(temp->right);
}
return NULL;
}
struct bstnode* deleteNode(struct bstnode* root, int key)
{
if (root == NULL)
return root;
if (key < root->data)
root->left = deleteNode(root->left, key);
else if (key > root->data)
root->right = deleteNode(root->right, key);
else{
if (root->left == NULL)
{
struct bstnode *temp = root->right;
delete root;
return temp;
}
else if (root->right == NULL)
{
struct bstnode *temp = root->left;
delete root;
return temp;
}
struct bstnode* temp = minValueNode(root->right);
root->data = temp->data;
root->right = deleteNode(root->right, temp->data);
}
return root;
}
int main()
{
struct bstnode *root = NULL;
int n;
cout<<"Enter no. of nodes for tree: "; cin>>n;
cout<<"\nEnter elements: ";
for(int i=0;i<n;i++){
int x; cin>>x;
root=insert(root,x);
}
cout<<"\nRecursive in-order traversal: ";
inorder(root);
cout<<"\nIterative in-order traversal: ";
inorder2(root);
cout<<"\nRecursive Pre-order traversal: ";
preorder(root);
cout<<"\nIterative Pre-order traversal: ";
preorder(root);
cout<<"\nRecursive Post-order traversal: ";
postorder(root);
cout<<"\nIterative Post-order traversal: ";
postorder2(root);
cout<<"\nMin-value of tree: ";
minValueNode(root);
cout<<"\nMax-value of tree: ";
maxValue(root);
MirrorImage(root);
cout<<"\nMirror-Image of tree: ";
inorder(root);
cout<<"\nLevel-Order Traversal of Tree: ";
levelorder(root);
return 0;
}
|
f6afc487a54bfe5336913aef0e82556183643cd7
|
f72c609ddfd5d8c459461b78fa50196dc90a976e
|
/PacketSenderPlz/packet.h
|
2e14e248db99fd1e30ccfb5c9d59045375695ebc
|
[
"MIT"
] |
permissive
|
lain3d/PacketSenderPlz
|
52a808e38225c717ae080cfe9606382b9a4dc880
|
bd581d5e24689c4b88cd3fe0dffa80908786a494
|
refs/heads/master
| 2020-12-30T01:00:31.144920
| 2017-03-15T11:22:41
| 2017-03-15T11:22:41
| 238,806,020
| 0
| 1
|
MIT
| 2020-02-06T23:30:13
| 2020-02-06T23:30:12
| null |
UTF-8
|
C++
| false
| false
| 618
|
h
|
packet.h
|
#pragma once
class packet
{
std::string error_;
std::string source_;
std::vector<unsigned char> data_;
bool should_be_parsed_;
static uint32_t main_thread_id_;
template <typename T>
void encode(T data);
public:
packet();
packet(uint16_t header);
bool is_connected();
void encode1(uint8_t data);
void encode2(uint16_t data);
void encode4(uint32_t data);
void encode8(uint64_t data);
void encode_string(std::string data);
void encode_data(std::initializer_list<uint8_t> data);
bool parse(std::string& source);
bool receive();
bool send();
std::string to_string();
std::string get_error();
};
|
de5bea4ca5d3e04212b1651e01df1685aa7d44da
|
f703bebbc497e6c91b8da9c19d26cbcc98a897fb
|
/CodeForces.com/regular_rounds/#352/B.cpp
|
6ef6d9863b7e6739f2c558927a6182b8248b143f
|
[
"MIT"
] |
permissive
|
mstrechen/competitive-programming
|
1dc48163fc2960c54099077b7bfc0ed84912d2c2
|
ffac439840a71f70580a0ef197e47479e167a0eb
|
refs/heads/master
| 2021-09-22T21:09:24.340863
| 2018-09-16T13:48:51
| 2018-09-16T13:48:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 342
|
cpp
|
B.cpp
|
#include <iostream>
using namespace std;
int a[27];
int main(){
ios::sync_with_stdio(false);
int n,answer = 0;
cin >> n;
char tmp;
for(int i = 0; i<n; i++)
{
cin >> tmp;
answer+=a[tmp-'a']>0;
a[tmp-'a']++;
}
if(n>26) cout << -1;
else cout << answer;
return 0;
}
|
1031d848c67fb15b4e10a05991f3ff8017f4765e
|
92a9f837503a591161330d39d061ce290c996f0e
|
/LIB/SiNDYLib/build/FieldMap.cpp
|
a6f7806e073c807b68d71e93bc27d88de7f936c2
|
[] |
no_license
|
AntLJ/TestUploadFolder
|
53a7dae537071d2b1e3bab55e925c8782f3daa0f
|
31f9837abbd6968fc3a0be7610560370c4431217
|
refs/heads/master
| 2020-12-15T21:56:47.756829
| 2020-01-23T07:33:23
| 2020-01-23T07:33:23
| 235,260,509
| 1
| 1
| null | null | null | null |
SHIFT_JIS
|
C++
| false
| false
| 9,856
|
cpp
|
FieldMap.cpp
|
/*
* Copyright (C) INCREMENT P CORP. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY INCREMENT P CORP., 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 HOLDER BE LIABLE FOR ANY
* CLAIM, DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*/
/**
* @file FieldMap.cpp
* @brief CFieldMapクラス実装ファイル
* @author 地図DB制作部開発グループ 古川貴宏
* $Id$
*/
#include "stdafx.h"
#include "FieldMap.h"
#include "util.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
namespace sindy {
using namespace errorcode;
// CFieldMapをコピーする
void CopyFieldMap( CFieldMap& dest, const CFieldMap& src )
{
dest.m_mapFieldIndex = src.m_mapFieldIndex;
dest.m_vecFieldName = src.m_vecFieldName;
dest.m_lShapeIndex = src.m_lShapeIndex;
dest.m_lOIDIndex = src.m_lOIDIndex;
}
sindyErrCode CFieldMap::CreateFieldMap( IFields* ipFields )
{
sindyErrCode emErr = sindyErr_NoErr; // 返り値
clear(); // 初期化
if( ipFields != NULL )
{
long lFieldCount = 0;
IFieldPtr ipField;
ipFields->get_FieldCount( &lFieldCount );
for( long i = 0; i < lFieldCount; ++i )
{
_FIELD stField;
VARIANT_BOOL vbIsEditable = VARIANT_FALSE;
ipFields->get_Field( i, &ipField );
if( ipField )
{
CComBSTR bstrName;
// OBJECTID、SHPAEのフィールド番号を取得
ipField->get_Type( &stField.type );
if( esriFieldTypeOID == stField.type )
m_lOIDIndex = i;
else if( esriFieldTypeGeometry == stField.type )
m_lShapeIndex = i;
// 編集可不可情報を取得
ipField->get_Editable( &vbIsEditable );
stField.editable = VB2bool(vbIsEditable);
// NULL OK情報を取得
ipField->get_IsNullable( &vbIsEditable );
stField.nullable = VB2bool(vbIsEditable);
// フィールド名情報を取得
ipField->get_Name( &bstrName );
stField.name = bstrName;
stField.name.MakeUpper();
// フィールド名がIDで終わるかどうか
// ダミーRowを作成する際にNULLセット
// 対象外にするためにあらかじめ判別
stField.isid = ( stField.name.Right(2) == _T("ID") );
// エイリアス名情報を取得
bstrName.Empty();
ipField->get_AliasName( &bstrName );
stField.alias = bstrName;
// デフォルト値を取得
ipField->get_DefaultValue( &stField.dvalue );
// デフォルト値がフィールドタイプと異なる場合があるので、
// 強制的に変更する
if( VT_R8 == stField.dvalue.vt && esriFieldTypeInteger == stField.type )
stField.dvalue.ChangeType(VT_I4);
// フィールド長情報を取得
long lLen = 0;
ipField->get_Length( &lLen );
stField.length = lLen;
// 桁数情報を取得
stField.precision = 0;
ipField->get_Precision( &stField.precision );
// 小数点以下桁数情報を取得
stField.scale = 0;
ipField->get_Scale( &stField.scale );
// コード値・レンジドメイン情報を取得
IDomainPtr ipDomain;
ipField->get_Domain( &ipDomain );
ICodedValueDomainPtr ipCDomain( ipDomain );
IRangeDomainPtr ipRDomain( ipDomain );
if( ipCDomain )
{
long lCodeCount = 0;
ipCDomain->get_CodeCount( &lCodeCount );
for( long i = 0; i < lCodeCount; ++i )
{
CComBSTR bstrName;
CComVariant vaValue;
ipCDomain->get_Name( i, &bstrName );
ipCDomain->get_Value( i, &vaValue );
vaValue.ChangeType(VT_I4);
stField.domain[CString(bstrName)] = vaValue.lVal;
stField.rdomain[vaValue.lVal] = CString(bstrName);
}
}
else if( ipRDomain )
{
ipRDomain->get_MinValue( &stField.range.first );
ipRDomain->get_MaxValue( &stField.range.second );
}
}
m_mapFieldIndex[stField.name] = i;
m_vecFieldName.push_back( stField );
}
}
else
emErr = sindyErr_COMInterfaceIsNull;
return emErr;
}
// フィールドの付加属性を取得する
const CFieldMap::_FIELD& CFieldMap::GetFieldAttr( long Index ) const
{
LOGASSERTE_IF( 0 <= Index && (ULONG)Index < GetFieldCount(), sindyErr_ArgLimitOver )
return m_vecFieldName[Index];
// 落ちるのを防ぐために、ない場合は一番最後を返す
return *m_vecFieldName.rbegin();
}
// フィールドインデックスからフィールド名を取得する
LPCTSTR CFieldMap::GetName( long Index ) const
{
LOGASSERTE_IF( 0 <= Index && (ULONG)Index < GetFieldCount(), sindyErr_ArgLimitOver )
return m_vecFieldName[Index].name;
return NULL;
}
// フィールドインデックスからフィールドエイリアス名を取得する
LPCTSTR CFieldMap::GetAliasName( long Index ) const
{
LOGASSERTE_IF( 0 <= Index && (ULONG)Index < GetFieldCount(), sindyErr_ArgLimitOver )
return m_vecFieldName[Index].alias;
return NULL;
}
const VARIANT& CFieldMap::GetDefaultValue( long Index ) const
{
LOGASSERTE_IF( 0 <= Index && (ULONG)Index < GetFieldCount(), sindyErr_ArgLimitOver )
return m_vecFieldName[Index].dvalue;
return vtMissing;
}
void CFieldMap::clear()
{
m_mapFieldIndex.clear();
m_vecFieldName.clear();
m_lOIDIndex = -1;
m_lShapeIndex = -1;
}
bool CFieldMap::IsEditable( long lIndex ) const
{
LOGASSERTE_IF( 0 <= lIndex && (ULONG)lIndex < GetFieldCount(), sindyErr_ArgLimitOver )
return m_vecFieldName[lIndex].editable;
return false;
}
// フィールドがNULL OKかどうかをチェックする
bool CFieldMap::IsNullable( long lIndex ) const
{
LOGASSERTE_IF( 0 <= lIndex && (ULONG)lIndex < GetFieldCount(), sindyErr_ArgLimitOver )
return m_vecFieldName[lIndex].nullable;
return false;
}
bool CFieldMap::IsSiNDYEditable(long lIndex, bool bForCopy/*=false*/) const
{
LOGASSERTE_IF( 0 <= lIndex && (ULONG)lIndex < GetFieldCount(), sindyErr_ArgLimitOver )
{
if ( IsEditable( lIndex ) ) {
CString strFieldName = m_vecFieldName[lIndex].name;
INT iPos = strFieldName.ReverseFind('.');
if( iPos > 0 ) strFieldName = strFieldName.Right( strFieldName.GetLength() - iPos - 1 );
bool bRet = true;
if ( IsShapeField(lIndex) ) bRet = false;
else if ( IsOIDField(lIndex) ) bRet = false;
//if( lstrcmp( strFieldName, _T("FID") ) == 0 ) bRet = false; // FID
//else if( lstrcmp( strFieldName, _T("SHAPE") ) == 0 ) bRet = false; // Shape
//else if( lstrcmp( strFieldName, _T("AREA") ) == 0 ) bRet = false; // AREA
//else if( lstrcmp( strFieldName, _T("SHAPE_LENGTH") ) == 0 ) bRet = false; // Shape_length
//else if( lstrcmp( strFieldName, _T("OBJECTID") ) == 0 ) bRet = false; // OBJECTID
else if( lstrcmp( strFieldName, _T("ENABLED") ) == 0 ) bRet = false; // Enabled
else if( lstrcmp( strFieldName, schema::ipc_table::kOperator ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, schema::ipc_table::kPurpose ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, schema::ipc_table::kModifyDate ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, schema::ipc_table::kUpdateType ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, schema::ipc_table::kProgModifyDate ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, schema::ipc_table::kModifyProgName ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, schema::ipc_table::kUserClaim ) == 0 ) bRet = false;
else if( ( ! bForCopy ) && lstrcmp( strFieldName, _T("FIELDSURVEY_F") ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, _T("FROM_NODE_ID") ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, _T("TO_NODE_ID") ) == 0 ) bRet = false;
else if( strFieldName.Right( 3 ).CompareNoCase( _T("_RF") ) == 0 ) bRet = false;
else if( strFieldName.Right( 5 ).CompareNoCase( _T("_LQRF") ) == 0 ) bRet = false;
else if( strFieldName.Left( 3 ).CompareNoCase( _T("TMP") ) == 0 ) bRet = false;
else if( lstrcmp( strFieldName, _T("NODECLASS_C") ) == 0 ) bRet = false;
return bRet;
}
}
return false;
}
// フィールドタイプを取得する
esriFieldType CFieldMap::GetFieldType( long lIndex ) const
{
LOGASSERTE_IF( 0 <= lIndex && (ULONG)lIndex < GetFieldCount(), sindyErr_ArgLimitOver )
return m_vecFieldName[lIndex].type;
return (esriFieldType)-1;
}
// コード値ドメイン対応表を取得する
const std::map<CString,long>& CFieldMap::GetDomain( LPCTSTR lpcszFieldName ) const
{
const_iterator it = begin();
std::advance( it, FindField( lpcszFieldName ) );
return it->domain;
}
// フィールド名からフィールドインデックス番号を取得する
long CFieldMap::_FindField( LPCTSTR lpcszFieldName, bool bDebugTrace ) const
{
CString strFieldName( lpcszFieldName ); // 大文字に変換する
strFieldName.MakeUpper();
std::map<CString,long>::const_iterator it = m_mapFieldIndex.find( strFieldName );
if( it != m_mapFieldIndex.end() )
return it->second;
else if( bDebugTrace )
{
#ifdef DEBUG
_ASSERTE( it != m_mapFieldIndex.end() );
// 対応表の中身を表示
TRACEMESSAGE( _T("%s%s\n"), _T("DEBUG: CFieldMap インデックス番号取得エラー:"), strFieldName );
TRACEMESSAGE( _T("%s\n"), _T("DEBUG: ------------------------------------") );
for( it = m_mapFieldIndex.begin(); it != m_mapFieldIndex.end(); ++it )
TRACEMESSAGE( _T("DEBUG: [%s]=[%d]\n"), it->first, it->second );
#endif // DEBUG
}
return -1;
}
} // sindy
|
3bc7b5e24c5cd303ca2291a66114b43ec3e4b300
|
892c52c638022758f500282f92de7ef0aa33aef1
|
/source/Applications/Uebungen/U_FourPoints.h
|
aaa4db027033813f93bdd1b143dd585a1d890500
|
[] |
no_license
|
zhushaopeng1234/CG_Project
|
147f5ef598e3a61cc0c1191c809c6b9f14af31e5
|
a09d5fd47bf8992cca858af971371181337057c8
|
refs/heads/master
| 2023-03-08T16:09:14.877169
| 2021-02-26T16:16:25
| 2021-02-26T16:16:25
| 342,625,574
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 359
|
h
|
U_FourPoints.h
|
#pragma once
#include "Applications/Application.h"
#include "ShaderPrograms/Program_passThrough.h"
class App_FourPoints :public Application {
int frame_width,frame_height;
float position[4][3]; // x,y,z, x,y,z ,...
float color[4][4]; // r,g,b,a, r,g,b,a, ...
Program_passThrough prog;
public:
App_FourPoints(int w, int h);
void program_step();
};
|
3b529b4e0de89ddaa983f521792509aa884c7ebc
|
3159d77c2fc0828025bd0fb6f5d95c91fcbf4cd5
|
/cpp/shared_ref/shared_ref/main.cpp
|
bb7124c93dac7a9210e88affe51b6192d5f8fc22
|
[] |
no_license
|
jcmana/playground
|
50384f4489a23c3a3bb6083bc619e95bd20b17ea
|
8cf9b9402d38184f1767c4683c6954ae63d818b8
|
refs/heads/master
| 2023-09-01T11:26:07.231711
| 2023-08-21T16:30:16
| 2023-08-21T16:30:16
| 152,144,627
| 1
| 0
| null | 2023-08-21T16:21:29
| 2018-10-08T20:47:39
|
C++
|
UTF-8
|
C++
| false
| false
| 2,884
|
cpp
|
main.cpp
|
#include <iostream>
#include <vector>
#include <string>
#include "unique_ref.hpp"
#include "shared_ref.hpp"
struct intf
{
virtual void method() = 0;
};
struct impl : intf
{
virtual void method() override
{
std::cout << "impl::method()" << std::endl;
};
};
shared_ref<int> return_shared_ref()
{
return shared_ref<int>(0);
}
shared_ref<intf> cast_and_return_shared_ref()
{
return shared_ref(impl());
}
int main()
{
{
shared_ref<int> sr(7);
shared_ref<int> sr_copy = sr;
(*sr)++;
(*sr_copy)++;
std::cout << (*sr) << std::endl;
std::cout << (*sr_copy) << std::endl;
//sr = 4; // compile error, deleted function
std::shared_ptr<int> sp = sr;
(*sp)++;
std::cout << (*sr) << std::endl;
std::cout << (*sr_copy) << std::endl;
std::cout << (*sp) << std::endl;
auto sp_ptr = sp.get();
}
{
const shared_ref<int> sr(7);
(*sr)++;
}
{
shared_ref<const int> sr(7);
//(*sr)++; // compile error, const expression
}
{
shared_ref<std::string> sr("asdfasdf");
std::cout << (*sr) << std::endl;
}
// Missing default ctor
{
//shared_ref<int> sr;
}
// Construct from literal conversion
{
shared_ref<std::string> sr("asdffgfd");
}
// Construct from a copy
{
std::string s = "tuhnhdfgh";
shared_ref<std::string> sr(s);
}
// Construct from a rref
{
std::string s("tuhnhdfgh");
shared_ref<std::string> sr(std::move(s));
}
// Construct from a shared_ptr
{
auto sp = std::make_shared<std::string>("xvcbjteyueetu");
auto sr = shared_ref(sp);
if (false) auto sq = shared_ref<int>(std::shared_ptr<int>()); // runtime exception
}
{
unique_ref ur(7);
//unique_ref<int> ur_copy = ur; // compile error, deleted function
//unique_ref<int> ur_move = std::move(ur); // compile error, deleted function
}
// Return shared from a function
{
auto sr = return_shared_ref();
}
// From nullptr:
{
//shared_ref<int> sr(nullptr);
}
// constness and reseat-ability:
{
shared_ref sr(7);
sr = static_cast<const shared_ref<int> &>(shared_ref(2));
const shared_ref const_sr(4);
//const_sr = sr; // cannot assign to const
}
// implicit conversion to interface in ctor:
{
shared_ref<intf> sr(std::make_shared<impl>());
}
// implicit conversion to interface in cast:
{
auto sr_impl = shared_ref(impl());
auto sr_intf_1 = static_cast<shared_ref<intf>>(sr_impl);
shared_ref<intf> sr_intf_2{sr_impl};
auto sr_from_fn = cast_and_return_shared_ref();
}
}
|
0bb473b8e2d4bf8a8661706461a119e908f5437b
|
93f3fd8dce736f3083e9a8ab7a7c9d105ffee371
|
/SEGUI/Source/GUI/ButtonRadio.cpp
|
2bc17dc560808f3380e6301c6d92a66f95485534
|
[] |
no_license
|
rjadroncik/Shadow-Engine
|
6562c861d1fef7828fc0b882d2ccf27840a4ebd3
|
fb4314116d039e58bf99123dc82def43323988cc
|
refs/heads/master
| 2021-01-17T15:35:37.192851
| 2016-10-28T16:58:02
| 2016-10-28T16:58:02
| 27,828,561
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,836
|
cpp
|
ButtonRadio.cpp
|
#include "StdAfx.h"
#include "ButtonRadio.h"
#include "Paint.h"
#include "Event.h"
CButtonRadio::CButtonRadio(CWindowAbstract* pParent)
{
this->WindowCreate(Win32ClassCButton, WS_CHILD, WS_EX_TRANSPARENT, pParent);
}
CButtonRadio::~CButtonRadio()
{
}
void CButtonRadio::OnWindowPaint(IN CEventWindow& rEvent)
{
//Prepare variables
Rect4i rt = this->RectWindow(); rt.iX = 0; rt.iY = 0;
RectF rect((float)rt.iX, (float)rt.iY, (float)rt.iWidth, (float)rt.iHeight);
//Prepare drawing canvas
rEvent.Canvas().SetSmoothingMode(SmoothingModeHighQuality);
//Prepare circle rectangle
rt.iX = 0;
rt.iY = (rt.iHeight - BTN_STYLE_CLICK_CIRCLE_SIZE) / 2;
rt.iWidth = rt.iX + BTN_STYLE_CLICK_CIRCLE_SIZE;
rt.iHeight = rt.iY + BTN_STYLE_CLICK_CIRCLE_SIZE;
//Prepare text rectangle
rect.X = (float)rt.iWidth + 3; rect.Width -= rect.X;
//Draw circle background
LinearGradientBrush brush(RectF((float)rt.iX, (float)rt.iY, (float)(rt.iWidth - rt.iX), (float)(rt.iHeight - rt.iY)), *CPaint::SysColors.pLight, *CPaint::SysColors.pFace, LinearGradientModeForwardDiagonal);
CPaint::Draw3DCircle(rEvent.Canvas(), rt, NULL, NULL, &brush);
if (m_bHot)
{
//Draw hot highlight rim
CPaint::RectResize(rt, - 1);
CPaint::Draw3DCircle(rEvent.Canvas(), rt, CPaint::SysPens.pOrange_3px, CPaint::SysPens.pOrange_3px, NULL);
CPaint::RectResize(rt, 1);
}
//Draw button rim
if (this->Border()) { CPaint::Draw3DCircle(rEvent.Canvas(), rt, CPaint::SysPens.pDarkShadow, CPaint::SysPens.pLight, NULL); }
StringFormat format;
format.SetAlignment(StringAlignmentNear);
format.SetLineAlignment(StringAlignmentCenter);
//Draw label
rEvent.Canvas().DrawString(this->Label(), -1, CPaint::SysFonts.pArial_11px, rect, &format, CPaint::SysBrushes.pBlack);
//Draw check-mark
if (m_bActive)
{
CPaint::RectResize(rt, -3);
CPaint::Draw3DCircle(rEvent.Canvas(), rt, CPaint::SysPens.pDarkShadow, CPaint::SysPens.pDarkShadow, CPaint::SysBrushes.pBlack);
CPaint::RectResize(rt, 3);
}
//Draw focused dotted outline
if (this->FocusFrame() && this->Focused())
{
Rect rt2((int)rect.X - 1, rt.iY, (int)rect.Width, 13);
rEvent.Canvas().SetSmoothingMode(SmoothingModeNone);
rEvent.Canvas().DrawRectangle(CPaint::SysPens.pDottedGray, rt2);
rEvent.Canvas().SetSmoothingMode(SmoothingModeHighQuality);
}
}
void CButtonRadio::AutoRect(OUT Rect4i* pOutRect)
{
Graphics graphics(this->WindowHandle());
RectF rt;
PointF pt(0, 0);
//Matrix matrix;
graphics.MeasureString(this->Label(), -1, CPaint::SysFonts.pArial_11px, pt, &rt);
//graphics.MeasureDriverString((UINT16*)m_szLabel, -1, CPaint::SysFonts.pArial_11px, &pt, DriverStringOptionsRealizedAdvance | DriverStringOptionsCmapLookup, &matrix, &rt);
pOutRect->iWidth = (int)rt.Width + BTN_STYLE_CLICK_CIRCLE_SIZE + 3 + 2;
pOutRect->iHeight = (int)rt.Height + 4;
}
|
0abfa281f42fc6507358d18165a35d0c9424684c
|
2113ddcca3f023d5dd4c8ce479626a59bf61d9c7
|
/chapter1/programing_exercise/1-13/example.cpp
|
d6cea593ee0a871404e0174d7296345150c0d3e2
|
[] |
no_license
|
EricPro-NJU/Fundamental-Programing-2020
|
708b9aab571b2035e4e4e1c317d9277905012f53
|
5e78068b9feb32930aac0f4652a3156f345c6ce9
|
refs/heads/master
| 2020-12-20T15:43:52.065510
| 2020-01-25T04:49:59
| 2020-01-25T04:49:59
| 236,126,139
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 470
|
cpp
|
example.cpp
|
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int n;
cin >> n;
double c, s;
double c_all = 0, s_all = 0;
int flag = 1;
for (int i = 1; i <= n; i++) {
cin >> c >> s;
if (s < 60) {
flag = 0;
}
c_all += c;
s_all += c * s;
}
if (flag == 0) {
cout << "Failed";
}
else {
double gpa = s_all / c_all;
gpa /= 20.0;
cout << setiosflags(ios::fixed) << setprecision(2) << gpa;
}
return 0;
}
|
e0602d7847df944f2866416f42d6abe721f14eb7
|
88287451518d521c264564f448de973d4ca004a0
|
/src/ReaderFiles.cpp
|
608e5068029c9991dbf4539ed636896df68ccf0e
|
[] |
no_license
|
lazarocosta/FEUP-CAL-projeto2
|
8c513e21db97f67ece13ff4d557c37b274d01e4a
|
4e2140f3c250d991d4fdc886ecaa5355fa942b6e
|
refs/heads/master
| 2016-09-13T14:42:51.852577
| 2016-05-30T14:02:44
| 2016-05-30T14:02:44
| 59,753,388
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,506
|
cpp
|
ReaderFiles.cpp
|
#include "ReaderFiles.h"
ReaderFiles::ReaderFiles(){
readFileNameNodes();
readFileNameRoads();
readFileNameRelation();
}
void ReaderFiles::readFileNameNodes(){
ifstream myfile("files1.txt");
if(myfile.is_open())
{
string line;
char trash;
unsigned long nodeID;
double lat_rad,lon_rad,lat_deg,lon_deg;
bool isFirstTime=true;
while(getline(myfile,line))
{
if(line=="\n")
break;
stringstream ss;
ss.str(line);
ss >> nodeID >> trash;
ss >> lat_deg >> trash;
ss >> lon_deg >> trash;
ss >> lat_rad >> trash;
ss >> lon_rad;
if(isFirstTime)
{
minLat=lat_deg;
maxLat=lat_deg;
minLon=lon_deg;
maxLon=lon_deg;
isFirstTime=false;
}
else
updateLatsAndLons(lat_deg,lon_deg);
nodes.push_back(Node(nodeID,lat_rad,lon_rad,lat_deg,lon_deg));
}
}
myfile.close();
}
void ReaderFiles::readFileNameRoads(){
ifstream myfile("files2.txt");
if(myfile.is_open())
{
string line,lineTrash;
char trash;
unsigned long roadID;
string roadName;
string twoWaysName;
bool twoWays;
while(myfile.good())
{
if(line=="\n")
break;
myfile >> roadID >> trash;
getline(myfile,roadName,';');
getline(myfile,twoWaysName,'\n');
if(twoWaysName=="True")
twoWays=true;
else
twoWays=false;
if(myfile.eof())
break;
roads.push_back(Road(roadID,roadName,twoWays));
}
}
myfile.close();
}
void ReaderFiles::readFileNameRelation(){
ifstream myfile("files3.txt");
if (myfile.is_open()) {
string line;
char trash;
unsigned long roadID,node1ID,node2ID;
while (getline(myfile, line)) {
if (line == "\n")
break;
stringstream ss;
ss.str(line);
ss >> roadID;
ss >> trash;
ss >> node1ID;
ss >> trash;
ss >> node2ID;
relations.push_back(Relation(roadID,node1ID,node2ID));
}
}
myfile.close();
}
vector<Node> ReaderFiles::getNodes() const{
return nodes;
}
vector<Road> ReaderFiles::getRoads() const{
return roads;
}
vector<Relation> ReaderFiles::getRelations() const{
return relations;
}
double ReaderFiles::getMinLat() const{
return minLat;
}
double ReaderFiles::getMaxLat() const{
return maxLat;
}
double ReaderFiles::getMinLon() const{
return minLon;
}
double ReaderFiles::getMaxLon() const{
return maxLon;
}
void ReaderFiles::updateLatsAndLons(double lat,double lon){
if(minLat>lat)
minLat=lat;
if(maxLat<lat)
maxLat=lat;
if(minLon>lon)
minLon=lon;
if(maxLon<lon)
maxLon=lon;
}
|
fe0c9ea8cbe32b1e608bd6f614e4a05c0c4b29dc
|
f8975076e4394c7657fa8c602c2cd938b6191c48
|
/Main/mywow/interface/IVideoResource.h
|
51aa411485f5554cd07b2346d846a78980c4ab1d
|
[] |
no_license
|
miztook/wowmodelexplorer
|
baa87ee965c64ea53272b1cf8bd0c0ca966a76a4
|
78b5ea79668a551dd70cd0699b8393de4472ec5f
|
refs/heads/master
| 2021-07-08T23:10:58.887309
| 2020-07-19T04:27:50
| 2020-07-19T04:27:50
| 145,582,892
| 7
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 584
|
h
|
IVideoResource.h
|
#pragma once
#include "base.h"
class IVideoResource
{
public:
virtual ~IVideoResource() {}
protected:
virtual bool buildVideoResources() = 0;
virtual void releaseVideoResources() = 0;
virtual bool hasVideoBuilt() const = 0;
public:
static bool buildVideoResources(IVideoResource* t)
{
ASSERT(t);
return t->buildVideoResources();
}
static void releaseVideoResources(IVideoResource* t)
{
ASSERT(t);
t->releaseVideoResources();
}
static bool hasVideoBuilt(IVideoResource* t)
{
ASSERT(t);
return t->hasVideoBuilt();
}
};
|
1f421b0ffb7eff0b1699d7ec06fae48e1cd20e98
|
40662e477e03bf8757973cec33ada3643a28cb49
|
/201804/0425/BZOJ4860/BZOJ4860.cpp
|
2785aa9a774df2e78e045675dace3fb93c4bbb57
|
[] |
no_license
|
DreamLolita/BZOJ
|
389f7ab12c288b9f043818b259bc4bd924dd7f21
|
a68e8530603d75f65feed3e621af30cbeccc56fe
|
refs/heads/master
| 2021-09-15T19:21:56.356204
| 2018-06-09T05:54:38
| 2018-06-09T05:54:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,197
|
cpp
|
BZOJ4860.cpp
|
#include<bits/stdc++.h>
#define mkp(x,y) make_pair(y,x)
using namespace std;
typedef pair<int,int> pii;
const int INF=1e8;
const int N=2e5+10;
int root,n,m,liml,limr,sum,ans;
int siz[N],mx[N],col[N];
bool vis[N];
vector<pii>e[N];
int read()
{
int ret=0,f=1;char c='.';
while(!isdigit(c)){if(c=='-')f=0;c=getchar();}
while(isdigit(c)){ret=(ret<<1)+(ret<<3)+(c^48);c=getchar();}
return f?ret:-ret;
}
struct Seqment
{
int sz,root;
int ls[N],rs[N],s[N];
void clear()
{
sz=root=0;s[0]=-INF;
}
void update(int &x,int l,int r,int p,int v)
{
if(!x)
{
x=++sz;s[x]=-INF;
ls[x]=rs[x]=0;
}
if(l==r)
{
s[x]=max(s[x],v);
return;
}
int mid=(l+r)>>1;
if(p<=mid)
update(ls[x],l,mid,p,v);
else
update(rs[x],mid+1,r,p,v);
s[x]=max(s[ls[x]],s[rs[x]]);
}
int query(int x,int l,int r,int L,int R)
{
if(!x)
return -INF;
if(L<=l && r<=R)
return s[x];
int mid=(l+r)>>1,ret=-INF;
if(L<=mid)
ret=max(ret,query(ls[x],l,mid,L,R));
if(R>mid)
ret=max(ret,query(rs[x],mid+1,r,L,R));
return ret;
}
int ask(int l,int r)
{
l=max(l,0);
return query(root,0,n,l,r);
}
}t1,t2;
void merge(int &x,int y)
{
if(!y)
return;
if(!x)
{
x=++t1.sz;
t1.s[x]=-INF;t1.ls[x]=t1.rs[x]=0;
}
t1.s[x]=max(t1.s[x],t2.s[y]);
merge(t1.ls[x],t2.ls[y]);merge(t1.rs[x],t2.rs[y]);
}
void add(int u,int v,int w)
{
e[u].push_back(mkp(v,w));
e[v].push_back(mkp(u,w));
}
void getans(int x,int f,int len,int val,int c,int top)
{
if(len>limr)
return;
ans=max(ans,max(t1.ask(liml-len,limr-len),t2.ask(liml-len,limr-len)-col[top])+val);
for(int i=0;i<e[x].size();++i)
{
int v=e[x][i].second,w=e[x][i].first;
if(vis[v] || v==f)
continue;
getans(v,x,len+1,val+(w==c?0:col[w]),w,top);
}
}
void modify(int x,int f,int len,int val,int c)
{
if(len>limr)
return;
t2.update(t2.root,0,n,len,val);
for(int i=0;i<e[x].size();++i)
{
int v=e[x][i].second,w=e[x][i].first;
if(vis[v] || v==f)
continue;
modify(v,x,len+1,val+(w==c?0:col[w]),w);
}
}
void calc(int x)
{
int las=0;
t1.clear();t2.clear();
t1.update(t1.root,0,n,0,0);
for(int i=0;i<e[x].size();++i)
{
int v=e[x][i].second,w=e[x][i].first;
if(!vis[v])
{
if(w!=las)
{
merge(t1.root,t2.root);
t2.clear();
}
getans(v,x,1,col[w],w,w);modify(v,x,1,col[w],w);las=w;
}
}
}
void getroot(int x,int f)
{
siz[x]=1;mx[x]=0;
for(int i=0;i<e[x].size();++i)
{
int v=e[x][i].second;
if(vis[v] || v==f)
continue;
getroot(v,x);
siz[x]+=siz[v];
if(siz[v]>mx[x])
mx[x]=siz[v];
}
if(sum-siz[x]>mx[x])
mx[x]=sum-siz[x];
if(mx[x]<mx[root])
root=x;
}
void solve(int x)
{
vis[x]=1;calc(x);
for(int i=0;i<e[x].size();++i)
{
int v=e[x][i].second;
if(!vis[v])
{
root=0;sum=siz[v];
getroot(v,0);
solve(root);
}
}
}
int main()
{
freopen("BZOJ4860.in","r",stdin);
freopen("BZOJ4860.out","w",stdout);
n=read();m=read();liml=read();limr=read();
for(int i=1;i<=m;++i)
col[i]=read();
for(int i=1;i<n;++i)
{
int u=read(),v=read(),w=read();
add(u,v,w);
}
for(int i=1;i<=n;++i)
sort(e[i].begin(),e[i].end());
sum=n;mx[0]=n+1;root=0;ans=-INF;
getroot(1,0);
solve(root);
printf("%d\n",ans);
return 0;
}
|
bd7b61901231a095b14fb0859078ee4f37fcf202
|
85b5505456602de80f2306bad8182093ff536493
|
/A1107.cpp
|
25a10b7fd164db516cd60bf08a3ed74ba05f3712
|
[] |
no_license
|
WuJianeng/PAT
|
3bfe515f26e9adf4e14966eccbee5301d9d4daeb
|
d0ecabc0c7cc8ff3306aa5d3d00065e5a26c95bd
|
refs/heads/master
| 2020-04-18T01:33:21.615454
| 2019-11-05T11:43:00
| 2019-11-05T11:43:00
| 167,122,750
| 3
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,198
|
cpp
|
A1107.cpp
|
//2019 2.16 21:07 forked from QingShen Notes
#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn = 1010;
int father[maxn], course[maxn] = {0}, isRoot[maxn] = {0};
void init(int n){
for(int i = 1; i <= n; ++i)
father[i] = i;
}
int findFather(int x){
int a = x;
while(x != father[x]) x = father[x];
//压缩并查集路径
while(a != father[a]){
int z = a;
a = father[a];//x的father可能也不是root,故继续更新,直到a = fahter[a]
father[z] = x;
}
return x;
}
void Union(int a, int b){
int faA = findFather(a);
int faB = findFather(b);
if(faA != faB) father[faA] = faB;
}
bool cmp(int a, int b){
return a > b;
}
int main(){
int n;
cin>>n;
init(n);
for(int i = 1; i <= n; ++i){
int k;
scanf("%d:", &k);
for(int j = 1; j <= k; ++j){
int temp;
cin>>temp;
if(course[temp] == 0) course[temp] = i;
Union(i, course[temp]);
}
}
for(int i = 1; i <= n; ++i)
isRoot[findFather(i)]++;
int count = 0;
for(int i = 1; i <= n; ++i)
if(isRoot[i]) count++;
cout<<count<<endl;
sort(isRoot + 1, isRoot + 1 + n, cmp);
for(int i = 1; i <= count; ++i){
if(i != 1) cout<<" ";
cout<<isRoot[i];
}
return 0;
}
|
fb3ef364e9afa1ba7f41da1f6e35299a80020b45
|
f3f7411692affe7e0539bbdfb0b27156829da128
|
/H - Grid 1.cpp
|
46af65f8b3c532b6d54818ece690e9c9c5a08111
|
[] |
no_license
|
abhishek9125/Educational-DP-Contest
|
bde79923c88516df5b070d7706f0c8f2606f595d
|
b4abca93b82af5f1d1b2f11a7ca17beb0a063310
|
refs/heads/master
| 2022-09-06T04:04:53.422213
| 2020-06-02T16:41:13
| 2020-06-02T16:41:13
| 268,182,497
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,248
|
cpp
|
H - Grid 1.cpp
|
#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;
char grid[1002][1002];
int paths(int n,int m){
int dp[1002][1002];
memset(dp,-1,sizeof(dp));
int counter = 1;
for(int i=0;i<m;i++){
if(grid[0][i]=='#'){
dp[0][i] = 0;
counter = 0;
}
if(grid[0][i]=='.' && counter==1){
dp[0][i] = 1;
}
if(counter==0){
dp[0][i] = 0;
}
}
counter = 1;
for(int i=0;i<n;i++){
if(grid[i][0]=='#'){
dp[i][0] = 0;
counter = 0;
}
if(grid[i][0]=='.' && counter==1){
dp[i][0] = 1;
}
if(counter==0){
dp[i][0] = 0;
}
}
for(int i=1;i<n;i++){
for(int j=1;j<m;j++){
if(grid[i][j]=='.'){
dp[i][j] = (dp[i-1][j]%mod + dp[i][j-1]%mod)%mod;
}
else{
dp[i][j] = 0;
}
}
}
return dp[n-1][m-1];
}
int main(){
int n,m;
cin>>n>>m;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>grid[i][j];
}
}
cout<<paths(n,m);
return 0;
}
|
6ede1c949f2c5afbafc4f76186c5c277c51d399f
|
a7764174fb0351ea666faa9f3b5dfe304390a011
|
/drv/IGESSolid/IGESSolid_HArray1OfFace_0.cxx
|
3d700db51ed2fb67dccab86a18628023c4ce8baf
|
[] |
no_license
|
uel-dataexchange/Opencascade_uel
|
f7123943e9d8124f4fa67579e3cd3f85cfe52d91
|
06ec93d238d3e3ea2881ff44ba8c21cf870435cd
|
refs/heads/master
| 2022-11-16T07:40:30.837854
| 2020-07-08T01:56:37
| 2020-07-08T01:56:37
| 276,290,778
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,717
|
cxx
|
IGESSolid_HArray1OfFace_0.cxx
|
// 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.
#include <IGESSolid_HArray1OfFace.hxx>
#ifndef _Standard_Type_HeaderFile
#include <Standard_Type.hxx>
#endif
#ifndef _Standard_RangeError_HeaderFile
#include <Standard_RangeError.hxx>
#endif
#ifndef _Standard_DimensionMismatch_HeaderFile
#include <Standard_DimensionMismatch.hxx>
#endif
#ifndef _Standard_OutOfRange_HeaderFile
#include <Standard_OutOfRange.hxx>
#endif
#ifndef _Standard_OutOfMemory_HeaderFile
#include <Standard_OutOfMemory.hxx>
#endif
#ifndef _IGESSolid_Face_HeaderFile
#include <IGESSolid_Face.hxx>
#endif
#ifndef _IGESSolid_Array1OfFace_HeaderFile
#include <IGESSolid_Array1OfFace.hxx>
#endif
IMPLEMENT_STANDARD_TYPE(IGESSolid_HArray1OfFace)
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
STANDARD_TYPE(MMgt_TShared),
STANDARD_TYPE(Standard_Transient),
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
IMPLEMENT_STANDARD_TYPE_END(IGESSolid_HArray1OfFace)
IMPLEMENT_DOWNCAST(IGESSolid_HArray1OfFace,Standard_Transient)
IMPLEMENT_STANDARD_RTTI(IGESSolid_HArray1OfFace)
#define ItemHArray1 Handle_IGESSolid_Face
#define ItemHArray1_hxx <IGESSolid_Face.hxx>
#define TheArray1 IGESSolid_Array1OfFace
#define TheArray1_hxx <IGESSolid_Array1OfFace.hxx>
#define TCollection_HArray1 IGESSolid_HArray1OfFace
#define TCollection_HArray1_hxx <IGESSolid_HArray1OfFace.hxx>
#define Handle_TCollection_HArray1 Handle_IGESSolid_HArray1OfFace
#define TCollection_HArray1_Type_() IGESSolid_HArray1OfFace_Type_()
#include <TCollection_HArray1.gxx>
|
e0a526993b0f71fa1e3a2fc2d5c4798463bd0f3c
|
0356c30010b224ea3fa9a7036773e83990878da7
|
/Headers/AA/FeaturesDistance.hpp
|
e7b6858868caad9ebb09ad6bdb1344131e6fe6bf
|
[
"MIT"
] |
permissive
|
DottD/audioRec
|
5891e3c8cb00c9edd16d2139be3840767b3ddc33
|
74c316974000fc7c9048f076de01c40ede85836c
|
refs/heads/master
| 2020-12-01T13:41:07.400878
| 2019-12-28T23:06:08
| 2019-12-28T23:06:08
| 230,643,764
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 571
|
hpp
|
FeaturesDistance.hpp
|
#ifndef FeaturesDistance_hpp
#define FeaturesDistance_hpp
#include <QVariantList>
#include <QAlgorithm.hpp>
#include <armadillo>
namespace AA {
class FeaturesDistance;
}
class AA::FeaturesDistance : public QAlgorithm {
Q_OBJECT
QA_INPUT_LIST(QVector<double>, Features)
QA_OUTPUT(double, Distance)
QA_CTOR_INHERIT
QA_IMPL_CREATE(FeaturesDistance)
private:
arma::mat weightMean(const arma::mat& X,
const arma::mat& W);
arma::mat weightCov(const arma::mat& X,
const arma::vec& W);
public:
void run();
};
#endif /* FeaturesDistance_hpp */
|
ff4030f9a7fb46b8aa834ccdd25ccd35d5adac21
|
43a07286cbbdb855a771db0e5a40c8aaf0373c01
|
/templates/onion_find_set.cpp
|
1d39de85aa218f568812540adc2d37da5a4f5a32
|
[] |
no_license
|
oscar172772/codes
|
56537593463e4c6c003c3da75e75400065bfef82
|
e644c358803ce280284e7360da6302f6b86f1f82
|
refs/heads/master
| 2021-01-20T06:00:16.814847
| 2017-10-03T14:47:05
| 2017-10-03T14:47:05
| 89,832,062
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 663
|
cpp
|
onion_find_set.cpp
|
#include<iostream>
#include<cstdio>
using namespace std;
int n,m,pa[4000010];
int find(int x){return pa[x]==x?x:pa[x]=find(pa[x]);}
inline void onion(int x,int y){int px=find(x),py=find(y);if(px!=py)pa[px]=py;}
inline int read()
{
char ch=getchar();
int ret=0;
while(ch>'9'||ch<'0')ch=getchar();
while(ch<='9'&&ch>='0')
{
ret=ret*10+ch-'0';
ch=getchar();
}
return ret;
}
int main()
{
n=read();m=read();
for(int i=1;i<=n;i++)pa[i]=i;
int op,u,v,ans=0;
for(int i=1;i<=m;i++)
{
op=read();u=read();v=read();
if(op)ans=((ans<<1)+(find(u)==find(v)))%998244353;
else onion(u,v);
}
printf("%d\n",ans);
return 0;
}
|
8dc338cff4f0e80b689bd7ebfceb28d1a498ff78
|
189bde2f18be6ae87d554026b12220c1d07b9bb2
|
/money.cpp
|
ff6758476b7fb21b7b21014ace78dfa99b08c839
|
[] |
no_license
|
kienhoang/MoneyEatV02
|
c73dca319ea3b0d15a78a39bd17c05fe6096ce70
|
b8cffae79bca61a0fcaa3864c0e413cb2fded73e
|
refs/heads/master
| 2021-01-10T08:23:31.959894
| 2016-02-23T05:55:04
| 2016-02-23T05:55:04
| 52,248,634
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 376
|
cpp
|
money.cpp
|
#include "money.h"
#include "ui_money.h"
Money::Money(QWidget *parent) :
QDialog(parent),
ui(new Ui::Money)
{
ui->setupUi(this);
ui->lcdNumber->setDigitCount(10);
this->setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
}
Money::~Money()
{
delete ui;
}
void Money::setMoney(const QString &money){
ui->lcdNumber->display(money);
}
|
98c92405bf90a2598ef6691e28605a676fc871b9
|
e028e65ce1a52180c2eed994b1f321438a23f05a
|
/trunk/program/src/main.cpp
|
fc7b233dfaa7143d028be36ca153285bddd7cf9f
|
[] |
no_license
|
Michacy45/Pobi
|
66be59c5c2fe5682c9a21cbb30a285940e0e2e09
|
8bf2c13fa87a8157a7b8894709631c03db89b4cf
|
refs/heads/master
| 2020-04-05T18:54:29.254800
| 2018-12-06T21:23:09
| 2018-12-06T21:23:09
| 157,117,286
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 439
|
cpp
|
main.cpp
|
#include <iostream>
#include "Client.h"
using namespace std;
int main()
{
/* Client klient1("Michal", "Pesko","123456987");
Client klient2("Adam","Jozwiak","123456789");
//Client *klient3=new Client();
klient1.setAddress("Tranzytowa","5f");
klient1.setRegAddress("Jagienki","9");
klient2.setAddress("Przepiorcza","13c");
cout<<klient1.clientInfo()<<endl;
cout<<klient2.clientInfo()<<endl;
*/
return 0;
}
|
1c9184d918833e740698c48f76e3137b1749dde2
|
877fff5bb313ccd23d1d01bf23b1e1f2b13bb85a
|
/app/src/main/cpp/dir7941/dir22441/dir26975/dir27776/file27911.cpp
|
d0d4ebfece6063a9da86e8728357ae83df04325f
|
[] |
no_license
|
tgeng/HugeProject
|
829c3bdfb7cbaf57727c41263212d4a67e3eb93d
|
4488d3b765e8827636ce5e878baacdf388710ef2
|
refs/heads/master
| 2022-08-21T16:58:54.161627
| 2020-05-28T01:54:03
| 2020-05-28T01:54:03
| 267,468,475
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 115
|
cpp
|
file27911.cpp
|
#ifndef file27911
#error "macro file27911 must be defined"
#endif
static const char* file27911String = "file27911";
|
613c8bc6a7e6d2d987b73b7343eba197ab250e64
|
0efb71923c02367a1194a9b47779e8def49a7b9f
|
/BFS/BFS/14/phi
|
11266aa215accb5d33e5840493caa5bee5dff3dc
|
[] |
no_license
|
andergsv/blandet
|
bbff505e8663c7547b5412700f51e3f42f088d78
|
f648b164ea066c918e297001a8049dd5e6f786f9
|
refs/heads/master
| 2021-01-17T13:23:44.372215
| 2016-06-14T21:32:00
| 2016-06-14T21:32:00
| 41,495,450
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 103,036
|
phi
|
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "14";
object phi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 3 -1 0 0 0 0];
internalField nonuniform List<scalar>
8640
(
0.000467518
1.99821e-05
0.000417441
5.00772e-05
0.000535641
-0.0001182
0.000505678
2.99631e-05
0.000484099
2.15791e-05
0.000542808
-5.87089e-05
0.000452269
9.05387e-05
0.000498178
-4.59092e-05
0.000528894
-3.07154e-05
0.000443669
8.52246e-05
0.000519238
-7.55695e-05
0.000511649
7.58983e-06
0.000436941
7.47074e-05
0.000528168
-9.12266e-05
0.000491624
3.65434e-05
0.000440003
5.16215e-05
0.00050664
-6.66367e-05
0.000491829
1.48111e-05
0.000430813
6.10152e-05
-3.2054e-05
0.000462867
0.00135879
4.86906e-05
0.00130462
0.000104246
0.00144746
-0.000261042
0.00138099
9.64376e-05
0.00139833
4.24258e-06
0.00142622
-8.66007e-05
0.00133618
0.000180573
0.00141245
-0.00012218
0.0013982
-1.64631e-05
0.0013562
0.000127228
0.00140688
-0.000126248
0.00140091
1.35612e-05
0.00133805
0.000137565
0.00140891
-0.000162091
0.00138971
5.57406e-05
0.0013206
0.000120738
0.001393
-0.000139039
0.00137664
3.11749e-05
0.00129489
0.000142764
-0.000128127
0.00139096
0.00217325
6.29427e-05
0.0021289
0.000148591
0.00225244
-0.000384578
0.00217302
0.000175853
0.00220804
-3.07753e-05
0.00222189
-0.000100452
0.00212603
0.000276439
0.00224146
-0.000237615
0.00217108
5.39148e-05
0.00218042
0.000117889
0.00222757
-0.000173399
0.00217218
6.89516e-05
0.00218472
0.000125024
0.00220047
-0.00017784
0.00218534
7.08725e-05
0.00216308
0.000143005
0.00218224
-0.000158206
0.00219323
2.01888e-05
0.00214302
0.000192969
-0.000162555
0.00217745
0.00286439
8.60496e-05
0.00287553
0.000137458
0.00296348
-0.000472531
0.00288585
0.000253478
0.0029353
-8.02192e-05
0.00292343
-8.85825e-05
0.00283806
0.000361804
0.00296631
-0.000365862
0.00286385
0.000156374
0.00289389
8.7849e-05
0.00296003
-0.00023954
0.00284944
0.000179545
0.00292183
5.26333e-05
0.00292356
-0.000179571
0.00286334
0.000131093
0.00291315
9.31978e-05
0.0029083
-0.000153354
0.00288224
4.62402e-05
0.00288469
0.000190527
-0.000203494
0.00292563
0.00342132
0.000152233
0.00350098
5.77963e-05
0.00358237
-0.00055392
0.00347573
0.000360119
0.00358237
-0.000186868
0.00351995
-2.61608e-05
0.00344085
0.000440902
0.00359784
-0.000522852
0.00345032
0.000303901
0.00348895
4.92198e-05
0.00359249
-0.000343083
0.00342762
0.000344411
0.00352308
-4.28215e-05
0.00355891
-0.000215407
0.00343783
0.00025218
0.00352112
9.90327e-06
0.00354037
-0.0001726
0.00346653
0.000120075
0.00347411
0.000182949
-0.000295465
0.00356608
0.00387952
0.000260211
0.00397615
-3.88291e-05
0.0040904
-0.00066817
0.00393522
0.000515296
0.00410063
-0.000352274
0.00402196
5.25096e-05
0.00392013
0.00054273
0.00410816
-0.000710886
0.0039404
0.000471668
0.00395323
3.63815e-05
0.00409842
-0.000488266
0.00391204
0.000530787
0.00398487
-0.000115653
0.0040725
-0.000303034
0.00391959
0.000405086
0.00398876
-5.92663e-05
0.00404952
-0.000233356
0.00395635
0.000213243
0.00394037
0.000198931
-0.000415678
0.00406058
0.00427204
0.000375669
0.00433901
-0.000105801
0.00447722
-0.000806382
0.00429668
0.000695845
0.00447859
-0.000534184
0.00441694
0.000114157
0.00430379
0.000655876
0.00448573
-0.000892818
0.0043404
0.000616994
0.00432134
5.54372e-05
0.00447365
-0.000640573
0.00431183
0.000692606
0.00434118
-0.000145003
0.00445805
-0.000419898
0.00431391
0.000549222
0.00434823
-9.35834e-05
0.00443744
-0.000322568
0.00434761
0.000303069
0.0043144
0.000232145
-0.000530599
0.00442932
0.00459431
0.000468859
0.00463133
-0.00014282
0.00475181
-0.000926868
0.00458466
0.000863001
0.00474479
-0.000694311
0.0046978
0.000161141
0.00460963
0.000744047
0.00474503
-0.00102822
0.00464544
0.000716581
0.00461453
8.63552e-05
0.00473435
-0.000760392
0.00462663
0.000800323
0.00461646
-0.000134838
0.00473158
-0.000535012
0.00462157
0.00065923
0.00462048
-9.24963e-05
0.00472033
-0.000422417
0.00464125
0.000382149
0.00460493
0.000268462
-0.000624784
0.00469912
0.00482705
0.000529311
0.00485326
-0.000169027
0.0049207
-0.000994311
0.00480117
0.000982533
0.00491586
-0.000809008
0.00487153
0.000205471
0.00483537
0.000780206
0.00489734
-0.00109018
0.00485243
0.000761482
0.00482633
0.000112462
0.00489084
-0.000824907
0.00484979
0.000841371
0.00481179
-9.68357e-05
0.00490093
-0.000624149
0.0048399
0.000720261
0.00480858
-6.1179e-05
0.0049038
-0.000517634
0.00484016
0.000445789
0.00480943
0.000299194
-0.000692383
0.00487702
0.00496096
0.000555852
0.00498727
-0.000195339
0.00498414
-0.000991178
0.00493825
0.00102842
0.00498985
-0.000860606
0.00494771
0.000247611
0.00497078
0.000757134
0.00495108
-0.00107048
0.00496
0.000752559
0.00494776
0.000124705
0.00494897
-0.000826118
0.00497171
0.000818631
0.00492295
-4.80784e-05
0.00496853
-0.000669724
0.00496291
0.000725886
0.00491158
-9.85642e-06
0.00498553
-0.000591582
0.00494551
0.000485814
0.00492431
0.000320385
-0.000728905
0.00496084
0.00499498
0.000548375
0.00501958
-0.00021994
0.00494652
-0.000918124
0.00498545
0.000989498
0.0049625
-0.00083766
0.00493254
0.000277576
0.00500435
0.000685321
0.00491436
-0.000980484
0.00496959
0.000697328
0.00497328
0.000121016
0.00491656
-0.000769404
0.00498983
0.000745363
0.00494355
-1.80389e-06
0.00493876
-0.000664933
0.00498348
0.000681171
0.00492832
4.5299e-05
0.00496582
-0.000629078
0.00495594
0.000495692
0.00494744
0.000328889
-0.000729278
0.00494781
0.00492922
0.000506654
0.00494069
-0.000231414
0.0048133
-0.000790728
0.00492958
0.00087322
0.00483457
-0.000742658
0.00482639
0.000285757
0.0049321
0.00057961
0.00478782
-0.000836199
0.00488337
0.000601771
0.00489716
0.000107231
0.00479503
-0.000667275
0.00490679
0.000633602
0.00486622
3.87646e-05
0.00481809
-0.000616798
0.00489977
0.000599494
0.0048547
9.03686e-05
0.00484769
-0.000622077
0.00486985
0.000473533
0.00487726
0.000321484
-0.000689195
0.00483718
0.00476254
0.000431615
0.00474555
-0.000214424
0.00458725
-0.000632425
0.00476387
0.000696596
0.00460599
-0.000584781
0.00463097
0.000260777
0.00475206
0.000458527
0.00457082
-0.00065496
0.00470363
0.000468955
0.00471388
9.69868e-05
0.00458584
-0.000539241
0.00472431
0.000495137
0.00468606
7.70177e-05
0.00461074
-0.000541485
0.00471342
0.000496818
0.00468618
0.000117606
0.00463483
-0.000570729
0.00468571
0.000422659
0.00470956
0.000297634
-0.0006114
0.00463176
0.00449121
0.000327908
0.00443
-0.00015322
0.00427552
-0.000477941
0.00448268
0.000489433
0.00428072
-0.00038282
0.00435286
0.000188637
0.00446081
0.000350575
0.00426944
-0.00046359
0.00443264
0.00030576
0.00442056
0.000109063
0.00429588
-0.000414561
0.00444297
0.00034805
0.00440389
0.000116093
0.00431882
-0.000456408
0.00442962
0.000386013
0.00441746
0.000129772
0.0043314
-0.000484669
0.00440647
0.00034759
0.00443997
0.000264131
-0.000507536
0.0043361
0.00410465
0.000210756
0.0039978
-4.63711e-05
0.00388955
-0.000369685
0.00407984
0.000299136
0.00387409
-0.000177071
0.00399551
6.72213e-05
0.00405593
0.000290155
0.00389689
-0.000304554
0.00406544
0.000137217
0.00402073
0.000153768
0.00393118
-0.000325014
0.00406033
0.000218904
0.00402252
0.000153905
0.00394228
-0.000376174
0.0040505
0.000277795
0.00404307
0.000137207
0.00394248
-0.000384085
0.00403465
0.000255429
0.00406674
0.000232036
-0.000392894
0.0039521
0.00358758
0.000110675
0.00347318
6.80302e-05
0.00342876
-0.000325263
0.00355157
0.000176321
0.00340343
-2.89248e-05
0.00353355
-6.29009e-05
0.00354017
0.000283533
0.00345326
-0.00021764
0.00357351
1.69664e-05
0.00352197
0.000205302
0.00347814
-0.000281185
0.00356176
0.000135289
0.00353937
0.000176294
0.00347236
-0.000309165
0.00356512
0.000185038
0.00355598
0.000146347
0.0034678
-0.000295908
0.00356044
0.000162791
0.00358426
0.000208217
-0.000283933
0.0034753
0.00294521
5.29637e-05
0.00288456
0.000128682
0.00285999
-0.000300697
0.00291344
0.000122877
0.00285618
2.83299e-05
0.00292084
-0.000127562
0.00293115
0.000273228
0.00289829
-0.000184781
0.00293559
-2.03305e-05
0.00293235
0.000208538
0.00289718
-0.000246014
0.00293608
9.63888e-05
0.00295044
0.00016193
0.00288862
-0.000247344
0.00295289
0.000120777
0.00295855
0.000140681
0.00289132
-0.000228673
0.00296069
9.3417e-05
0.00298621
0.000182695
-0.000196605
0.00289888
0.00221313
2.73292e-05
0.00222353
0.00011829
0.00215416
-0.000231329
0.00219182
8.52126e-05
0.00218903
3.11272e-05
0.00217398
-0.00011252
0.00224174
0.000205476
0.00219363
-0.000136671
0.00219156
-1.82616e-05
0.00224702
0.000153076
0.0021743
-0.000173295
0.00220883
6.18554e-05
0.00225581
0.00011495
0.00217537
-0.000166903
0.00222618
6.99687e-05
0.00226172
0.000105146
0.00218712
-0.000154079
0.00223648
4.40579e-05
0.00228236
0.000136813
-0.000127895
0.00221365
0.00140552
9.31197e-06
0.00145671
6.70965e-05
0.00133654
-0.00011116
0.00138808
3.3679e-05
0.00139565
2.35523e-05
0.00134619
-6.30591e-05
0.00145384
9.78231e-05
0.00137453
-5.73553e-05
0.00137673
-2.04671e-05
0.00145004
7.9768e-05
0.00135505
-7.83073e-05
0.00140084
1.60724e-05
0.00145065
6.51396e-05
0.00136234
-7.8601e-05
0.00141233
1.99872e-05
0.00145559
6.18794e-05
0.0013759
-7.4384e-05
0.00141507
4.87995e-06
0.0014764
7.54924e-05
-6.4292e-05
0.00141279
0.000496812
0.000563908
0.000452748
0.000486427
0.00050998
0.00044692
0.000544744
0.000487388
0.000466921
0.000546689
0.000468382
0.000484454
0.000549594
0.000470993
0.00049098
0.00055286
0.000478475
0.000483355
0.000558848
0.000494556
0.000528415
0.000124408
-0.000189956
0.000843573
-0.000345079
2.99209e-05
0.00155793
0.000431524
-0.00114588
0.00236085
0.0027792
-0.00358212
0.00273038
0.00149497
-0.0018645
0.00275159
-0.00094777
0.000926553
0.00297086
-0.00289914
0.00267988
0.00361546
-0.00450335
0.00385876
0.00428979
-0.00752869
0.00685436
0.00461682
-0.0100904
0.00976336
0.00449938
-0.00933057
0.00944801
0.00409572
-0.00591393
0.00631759
0.00362894
-0.00206691
0.0025337
0.0031912
0.000590744
-0.000153004
0.00280373
0.00150338
-0.00111591
0.00248444
0.00125316
-0.000933875
0.00224697
0.000672469
-0.000434996
0.00208472
0.00023012
-6.7869e-05
0.00198059
1.62968e-05
8.78288e-05
0.00191704
-4.85137e-05
0.000112071
0.00187976
-5.16447e-05
8.89205e-05
0.00185858
-3.94487e-05
6.06342e-05
0.00184685
-2.76076e-05
3.93371e-05
0.00184051
-1.88439e-05
2.5184e-05
0.00183716
-1.25686e-05
1.59129e-05
0.00183544
-8.05038e-06
9.76804e-06
0.00183459
-4.86555e-06
5.72226e-06
0.00183417
-2.73475e-06
3.14852e-06
0.00183398
-1.4054e-06
1.59869e-06
0.00183389
-6.40146e-07
7.27494e-07
0.00183386
-2.36756e-07
2.74922e-07
0.00183384
-4.74585e-08
6.33396e-08
0.00183383
2.78921e-08
-2.15157e-08
0.00183383
4.80757e-08
-4.54213e-08
0.00183383
4.50655e-08
-4.4039e-08
0.00183383
3.48161e-08
-3.4527e-08
0.00183383
2.42408e-08
-2.41475e-08
0.00183383
1.57849e-08
-1.56907e-08
0.00183383
9.97948e-09
-9.98596e-09
0.00183383
5.91682e-09
-5.97245e-09
0.00183383
3.32714e-09
-3.24711e-09
0.00183383
1.95785e-09
-1.94384e-09
0.00183383
4.40565e-10
-6.14949e-10
0.00183383
6.55529e-10
-7.26226e-10
0.00183383
1.10119e-10
-2.04117e-11
0.00183383
-4.83257e-11
1.06631e-10
0.00183383
2.46081e-12
-4.63744e-11
0.00183383
-4.88934e-10
4.26095e-10
0.00183383
6.77004e-11
4.99042e-12
0.00183383
1.5552e-10
-8.75673e-11
0.00183383
-8.25715e-11
-6.62106e-12
0.00183383
2.17205e-10
-2.92598e-10
0.00183383
-2.69931e-11
3.38326e-11
0.00183383
1.64374e-10
-1.83682e-10
0.00183383
2.94661e-11
-7.60283e-11
0.00183383
1.08083e-10
-1.15641e-10
0.00183383
1.41583e-10
-7.27477e-11
0.00183383
-2.69067e-10
3.41784e-10
0.00183383
6.86889e-11
-9.42188e-11
0.00183383
-1.17889e-10
-6.86231e-13
0.00183383
-1.41498e-10
8.3378e-11
0.00183383
3.22814e-10
-2.68134e-10
0.00183383
-2.84611e-12
2.62385e-11
0.00183383
-1.52499e-10
8.48771e-11
0.00183383
2.20615e-10
-2.68067e-10
0.00183383
-4.6995e-11
9.60834e-11
0.00183383
-1.02622e-10
2.20848e-10
0.00183383
1.96547e-10
-1.08849e-10
0.00183383
1.00953e-11
-2.31128e-11
0.00183383
-1.25617e-10
5.61491e-11
0.00183383
-4.78803e-12
-3.98626e-12
0.00183383
1.16326e-10
-2.74392e-11
0.00183383
-1.0606e-10
2.11884e-10
0.00183383
-4.01979e-11
6.14174e-11
0.00183383
1.29812e-10
-2.68197e-10
0.00183383
-2.4894e-10
8.95763e-11
0.00183383
-5.22432e-11
1.47076e-11
0.00183383
7.31626e-11
4.97261e-11
0.00183383
-2.44167e-11
9.93825e-11
0.00183383
6.10044e-11
-1.89879e-11
0.00183383
-3.91101e-10
1.43492e-10
0.00183383
1.64957e-10
-1.74069e-10
0.00183383
-1.8918e-10
-1.17869e-10
0.00183383
3.91658e-10
9.61131e-11
0.00183383
-7.20544e-10
3.75851e-10
0.00183383
1.01177e-09
-1.56622e-10
0.00183383
-7.44963e-10
9.81972e-12
0.00183383
7.74383e-10
-5.0368e-11
0.00183383
-7.01065e-10
1.68623e-11
0.00183383
-3.02814e-10
3.13521e-10
0.00183383
8.75685e-10
-2.71743e-10
0.00183383
-1.43372e-09
-4.61353e-11
0.00183383
1.98233e-09
5.79173e-11
0.00183383
-2.10724e-09
6.8769e-12
0.00183383
1.11329e-09
7.6216e-11
0.00183383
6.70486e-10
-1.67469e-10
0.00183383
-1.33477e-09
-1.25908e-10
0.00183383
1.59822e-09
-1.64672e-10
0.00183383
-3.07778e-11
-1.36846e-10
-8.29589e-10
-1.34586e-10
0.00143045
8.4923e-05
0.00140252
-0.000317156
0.0017136
0.000120446
0.00255405
0.00193874
0.00291189
0.00113713
0.00300656
-0.00104244
0.00344402
-0.0033366
0.00408725
-0.00514659
0.00461395
-0.00805539
0.00480215
-0.0102786
0.00456763
-0.00909605
0.0040897
-0.005436
0.00360264
-0.00157985
0.00317602
0.00101737
0.00280721
0.00187219
0.0025009
0.00155947
0.0022672
0.000906165
0.00210204
0.000395285
0.00199268
0.000125653
0.00192447
1.96997e-05
0.001884
-1.11773e-05
0.00186091
-1.63616e-05
0.00184813
-1.48243e-05
0.00184122
-1.19339e-05
0.00183756
-8.91288e-06
0.00183567
-6.15828e-06
0.00183471
-3.90892e-06
0.00183424
-2.26343e-06
0.00183402
-1.17962e-06
0.00183391
-5.34978e-07
0.00183386
-1.89289e-07
0.00183384
-2.68164e-08
0.00183383
3.6456e-08
0.00183383
5.16385e-08
0.00183383
4.62288e-08
0.00183383
3.50856e-08
0.00183383
2.43176e-08
0.00183383
1.58514e-08
0.00183383
9.93947e-09
0.00183383
5.77172e-09
0.00183383
3.33747e-09
0.00183383
1.91337e-09
0.00183383
3.09579e-10
0.00183383
6.06811e-10
0.00183383
2.71505e-10
0.00183383
-1.24434e-10
0.00183383
-1.10735e-10
0.00183383
-6.77164e-10
0.00183383
4.09582e-11
0.00183383
2.71397e-10
0.00183383
-3.91409e-11
0.00183383
2.02014e-10
0.00183383
1.94564e-10
0.00183383
4.79521e-11
0.00183383
1.44081e-11
0.00183383
6.09849e-11
0.00183383
-2.56747e-11
0.00183383
-1.82042e-10
0.00183383
-1.61311e-10
0.00183383
-2.81552e-10
0.00183383
-1.20673e-10
0.00183383
3.35882e-10
0.00183383
1.76195e-10
0.00183383
-3.11027e-11
0.00183383
2.32193e-10
0.00183383
1.98756e-10
0.00183383
1.2766e-10
0.00183383
2.9973e-10
0.00183383
1.25894e-10
0.00183383
-1.66753e-10
0.00183383
2.46675e-11
0.00183383
1.69781e-10
0.00183383
5.46659e-11
0.00183383
-1.8402e-11
0.00183383
-8.97198e-11
0.00183383
-2.54226e-10
0.00183383
-1.93573e-10
0.00183383
1.76858e-10
0.00183383
1.34029e-10
0.00183383
-4.99646e-11
0.00183383
-5.03648e-10
0.00183383
1.44024e-10
0.00183383
-5.09147e-10
0.00183383
8.30077e-10
0.00183383
-9.19159e-10
0.00183383
1.6624e-09
0.00183383
-1.36364e-09
0.00183383
1.50061e-09
0.00183383
-1.52245e-09
0.00183383
-7.89192e-12
0.00183383
1.25318e-09
0.00183383
-2.86637e-09
0.00183383
4.07596e-09
0.00183383
-4.29741e-09
0.00183383
2.42316e-09
0.00183383
1.14612e-09
0.00183383
-2.85485e-09
0.00183383
2.96676e-09
0.00183383
-1.04017e-10
-1.81374e-09
0.00223774
2.46348e-05
0.00217207
-0.000251486
0.00217195
0.00012057
0.00274396
0.00136673
0.00305852
0.00082257
0.00334994
-0.00133386
0.00391358
-0.00390024
0.00446852
-0.00570153
0.0048589
-0.00844577
0.00491325
-0.0103329
0.004567
-0.0087498
0.00402412
-0.00489312
0.00353023
-0.00108596
0.00312362
0.00142398
0.00278151
0.0022143
0.00249664
0.00184434
0.0022741
0.00112871
0.00211146
0.000557932
0.00200038
0.000236732
0.00192955
9.05303e-05
0.001887
3.13662e-05
0.0018626
8.03712e-06
0.00184908
-1.29615e-06
0.00184176
-4.61509e-06
0.00183787
-5.02969e-06
0.00183585
-4.13505e-06
0.00183482
-2.87476e-06
0.0018343
-1.74601e-06
0.00183405
-9.2676e-07
0.00183393
-4.14535e-07
0.00183387
-1.33567e-07
0.00183385
-2.07259e-09
0.00183384
4.69451e-08
0.00183383
5.59395e-08
0.00183383
4.77434e-08
0.00183383
3.54642e-08
0.00183383
2.42986e-08
0.00183383
1.57903e-08
0.00183383
9.84165e-09
0.00183383
5.61945e-09
0.00183383
3.34181e-09
0.00183383
1.86563e-09
0.00183383
2.04666e-10
0.00183383
5.3156e-10
0.00183383
3.29847e-10
0.00183383
-1.16328e-10
0.00183383
-1.43447e-10
0.00183383
-6.7925e-10
0.00183383
6.46922e-11
0.00183383
3.61165e-10
0.00183383
-1.18762e-10
0.00183383
1.28626e-10
0.00183383
2.26327e-10
0.00183383
-1.97159e-11
0.00183383
-7.1795e-12
0.00183383
7.6406e-11
0.00183383
-1.60059e-11
0.00183383
-9.91038e-11
0.00183383
-1.76491e-10
0.00183383
-3.74207e-10
0.00183383
-1.24752e-10
0.00183383
3.45676e-10
0.00183383
1.75187e-10
0.00183383
-3.72704e-11
0.00183383
1.73197e-10
0.00183383
2.17631e-10
0.00183383
2.35203e-10
0.00183383
3.32862e-10
0.00183383
9.94417e-11
0.00183383
-1.66074e-10
0.00183383
9.13413e-12
0.00183383
1.95408e-10
0.00183383
1.5683e-10
0.00183383
1.21017e-11
0.00183383
-2.21653e-10
0.00183383
-3.62501e-10
0.00183383
-1.81436e-10
0.00183383
2.53093e-10
0.00183383
1.28814e-10
0.00183383
2.03424e-11
0.00183383
-6.66335e-10
0.00183383
1.77729e-10
0.00183383
-8.32452e-10
0.00183383
1.30732e-09
0.00183383
-1.30305e-09
0.00183383
2.46264e-09
0.00183383
-2.16902e-09
0.00183383
2.26028e-09
0.00183383
-2.15379e-09
0.00183383
7.331e-11
0.00183383
1.82824e-09
0.00183383
-4.38822e-09
0.00183383
6.15295e-09
0.00183383
-6.40664e-09
0.00183383
3.69949e-09
0.00183383
1.5846e-09
0.00183383
-4.40893e-09
0.00183383
4.34746e-09
0.00183383
-2.61075e-10
-2.72389e-09
0.00288329
6.69713e-05
0.00285373
-0.00022193
0.00286349
0.000110816
0.00310887
0.00112134
0.00333646
0.000594981
0.00377002
-0.00176741
0.00431524
-0.00444546
0.00476852
-0.0061548
0.00503392
-0.00871117
0.00494672
-0.0102457
0.0044933
-0.00829639
0.0039036
-0.00430342
0.00341366
-0.000596022
0.00303552
0.00180212
0.00272753
0.00252228
0.00247186
0.0021
0.00226729
0.00133328
0.0021124
0.000712828
0.00200319
0.000345942
0.00193196
0.000161755
0.00188861
7.47213e-05
0.00186358
3.30673e-05
0.00184966
1.26229e-05
0.00184211
2.93164e-06
0.00183809
-1.01078e-06
0.00183599
-2.02721e-06
0.0018349
-1.78653e-06
0.00183435
-1.19414e-06
0.00183407
-6.52698e-07
0.00183394
-2.81727e-07
0.00183388
-7.10633e-08
0.00183385
2.62054e-08
0.00183384
5.9101e-08
0.00183383
6.08545e-08
0.00183383
4.94108e-08
0.00183383
3.58492e-08
0.00183383
2.42163e-08
0.00183383
1.56358e-08
0.00183383
9.68677e-09
0.00183383
5.42609e-09
0.00183383
3.28252e-09
0.00183383
1.79741e-09
0.00183383
1.49357e-10
0.00183383
4.73015e-10
0.00183383
3.47107e-10
0.00183383
-1.33946e-10
0.00183383
-1.49015e-10
0.00183383
-6.45461e-10
0.00183383
7.09643e-11
0.00183383
4.28503e-10
0.00183383
-1.81562e-10
0.00183383
7.04305e-11
0.00183383
2.5226e-10
0.00183383
-9.05805e-11
0.00183383
-2.11172e-11
0.00183383
9.64205e-11
0.00183383
-2.32899e-11
0.00183383
-3.51859e-11
0.00183383
-1.73573e-10
0.00183383
-4.26343e-10
0.00183383
-1.15902e-10
0.00183383
3.33018e-10
0.00183383
1.62363e-10
0.00183383
-2.65106e-11
0.00183383
1.29026e-10
0.00183383
2.17308e-10
0.00183383
3.02176e-10
0.00183383
3.3766e-10
0.00183383
7.80992e-11
0.00183383
-1.45083e-10
0.00183383
2.63305e-13
0.00183383
1.9878e-10
0.00183383
2.27147e-10
0.00183383
3.55515e-11
0.00183383
-3.1398e-10
0.00183383
-4.20987e-10
0.00183383
-1.6496e-10
0.00183383
3.00668e-10
0.00183383
9.33425e-11
0.00183383
9.1304e-11
0.00183383
-7.87597e-10
0.00183383
2.72349e-10
0.00183383
-1.13805e-09
0.00183383
1.75371e-09
0.00183383
-1.7506e-09
0.00183383
3.22583e-09
0.00183383
-3.00442e-09
0.00183383
3.05757e-09
0.00183383
-2.78107e-09
0.00183383
2.05658e-10
0.00183383
2.39406e-09
0.00183383
-5.90222e-09
0.00183383
8.26503e-09
0.00183383
-8.56524e-09
0.00183383
5.03533e-09
0.00183383
1.95376e-09
0.00183383
-6.02155e-09
0.00183383
5.73377e-09
0.00183383
-4.07009e-10
-3.60592e-09
0.00346253
0.000170523
0.00340005
-0.000159449
0.00353601
-2.51496e-05
0.00365542
0.00100194
0.00379472
0.000455679
0.00422268
-0.00219537
0.00466522
-0.004888
0.00500131
-0.0064909
0.00512805
-0.00883791
0.00489249
-0.0100102
0.00434429
-0.00774818
0.0037304
-0.00368953
0.00325499
-0.000120609
0.00291285
0.00214427
0.00264634
0.00278879
0.00242714
0.0023192
0.0022468
0.00151361
0.00210454
0.000855083
0.00200074
0.000449747
0.00193145
0.000231046
0.00188866
0.000117503
0.00186376
5.79683e-05
0.00184985
2.65388e-05
0.00184227
1.05079e-05
0.00183822
3.04505e-06
0.00183607
1.16319e-07
0.00183495
-6.68504e-07
0.00183438
-6.19885e-07
0.00183409
-3.63383e-07
0.00183395
-1.39455e-07
0.00183388
-3.18805e-09
0.00183385
5.73318e-08
0.00183384
7.26039e-08
0.00183383
6.62447e-08
0.00183383
5.11763e-08
0.00183383
3.62019e-08
0.00183383
2.40624e-08
0.00183383
1.53891e-08
0.00183383
9.46891e-09
0.00183383
5.19769e-09
0.00183383
3.16015e-09
0.00183383
1.71105e-09
0.00183383
1.24329e-10
0.00183383
4.30345e-10
0.00183383
3.33459e-10
0.00183383
-1.59882e-10
0.00183383
-1.28366e-10
0.00183383
-5.86037e-10
0.00183383
6.67991e-11
0.00183383
4.58141e-10
0.00183383
-2.28485e-10
0.00183383
2.52832e-11
0.00183383
2.65032e-10
0.00183383
-1.43465e-10
0.00183383
-2.43831e-11
0.00183383
1.1786e-10
0.00183383
-3.76756e-11
0.00183383
-4.33235e-12
0.00183383
-1.6102e-10
0.00183383
-4.38078e-10
0.00183383
-1.05579e-10
0.00183383
3.0926e-10
0.00183383
1.46552e-10
0.00183383
-9.3468e-12
0.00183383
1.06266e-10
0.00183383
2.08967e-10
0.00183383
3.29936e-10
0.00183383
3.27527e-10
0.00183383
6.67392e-11
0.00183383
-1.19121e-10
0.00183383
-3.66422e-12
0.00183383
1.89412e-10
0.00183383
2.583e-10
0.00183383
4.86405e-11
0.00183383
-3.59988e-10
0.00183383
-4.38939e-10
0.00183383
-1.52036e-10
0.00183383
3.26517e-10
0.00183383
3.64617e-11
0.00183383
1.53017e-10
0.00183383
-8.80554e-10
0.00183383
4.25625e-10
0.00183383
-1.42118e-09
0.00183383
2.17335e-09
0.00183383
-2.2631e-09
0.00183383
3.96638e-09
0.00183383
-3.86729e-09
0.00183383
3.89702e-09
0.00183383
-3.42704e-09
0.00183383
3.94113e-10
0.00183383
2.94563e-09
0.00183383
-7.40264e-09
0.00183383
1.04278e-08
0.00183383
-1.0801e-08
0.00183383
6.44773e-09
0.00183383
2.24738e-09
0.00183383
-7.68785e-09
0.00183383
7.15613e-09
0.00183383
-5.43348e-10
-4.47011e-09
0.00397159
0.000259515
0.00385112
-3.89742e-05
0.00405524
-0.000229276
0.00420086
0.000856322
0.00429694
0.0003596
0.00462542
-0.00252386
0.00492286
-0.00518544
0.00512886
-0.0066969
0.00512559
-0.00883464
0.00475055
-0.00963514
0.00412865
-0.00712629
0.00350849
-0.00306937
0.00305747
0.000330404
0.00275824
0.00244351
0.00254116
0.00300587
0.00236439
0.00249597
0.00221277
0.00166523
0.00208729
0.000980568
0.00199244
0.000544598
0.00192762
0.000295858
0.00188698
0.000158146
0.00186307
8.18757e-05
0.00184961
4.00053e-05
0.00184222
1.78932e-05
0.00183824
7.03096e-06
0.00183611
2.24376e-06
0.00183499
4.54334e-07
0.0018344
-3.54908e-08
0.0018341
-6.48556e-08
0.00183396
9.31979e-09
0.00183388
6.86149e-08
0.00183385
9.05909e-08
0.00183384
8.71047e-08
0.00183383
7.19576e-08
0.00183383
5.29785e-08
0.00183383
3.64916e-08
0.00183383
2.38295e-08
0.00183383
1.50522e-08
0.00183383
9.17962e-09
0.00183383
4.93188e-09
0.00183383
2.98611e-09
0.00183383
1.61118e-09
0.00183383
1.12891e-10
0.00183383
3.94459e-10
0.00183383
2.99083e-10
0.00183383
-1.83903e-10
0.00183383
-8.7418e-11
0.00183383
-5.10577e-10
0.00183383
5.84913e-11
0.00183383
4.5315e-10
0.00183383
-2.64411e-10
0.00183383
-9.79213e-12
0.00183383
2.63368e-10
0.00183383
-1.75159e-10
0.00183383
-1.9525e-11
0.00183383
1.37603e-10
0.00183383
-5.18566e-11
0.00183383
3.12193e-13
0.00183383
-1.43532e-10
0.00183383
-4.20073e-10
0.00183383
-9.70257e-11
0.00183383
2.80624e-10
0.00183383
1.31258e-10
0.00183383
6.88341e-12
0.00183383
9.88817e-11
0.00183383
1.97719e-10
0.00183383
3.29084e-10
0.00183383
3.10134e-10
0.00183383
6.26773e-11
0.00183383
-9.56256e-11
0.00183383
-3.87359e-12
0.00183383
1.75544e-10
0.00183383
2.59617e-10
0.00183383
5.18479e-11
0.00183383
-3.70245e-10
0.00183383
-4.28349e-10
0.00183383
-1.44093e-10
0.00183383
3.39508e-10
0.00183383
-3.1365e-11
0.00183383
2.05729e-10
0.00183383
-9.5859e-10
0.00183383
6.21716e-10
0.00183383
-1.68732e-09
0.00183383
2.57726e-09
0.00183383
-2.82777e-09
0.00183383
4.70042e-09
0.00183383
-4.76039e-09
0.00183383
4.78157e-09
0.00183383
-4.10974e-09
0.00183383
6.42952e-10
0.00183383
3.47251e-09
0.00183383
-8.89005e-09
0.00183383
1.26534e-08
0.00183383
-1.31389e-08
0.00183383
7.96025e-09
0.00183383
2.45961e-09
0.00183383
-9.40183e-09
0.00183383
8.64153e-09
0.00183383
-6.76841e-10
-5.32602e-09
0.00438116
0.000307673
0.00423147
0.000110713
0.00443286
-0.000430663
0.00462433
0.000664855
0.00471284
0.000271086
0.00492037
-0.00273139
0.00506546
-0.00533053
0.00515691
-0.00678835
0.00503028
-0.008708
0.00452611
-0.00913097
0.0038504
-0.00645058
0.00324229
-0.00246126
0.00282731
0.000745392
0.00257419
0.00269662
0.0024087
0.00317136
0.00227836
0.00262632
0.0021614
0.00178219
0.00205866
0.00108331
0.00197738
0.000625872
0.00192008
0.000353157
0.00188336
0.000194864
0.00186142
0.000103819
0.0018489
5.25257e-05
0.00184195
2.48432e-05
0.00183815
1.083e-05
0.0018361
4.29967e-06
0.00183499
1.55559e-06
0.00183441
5.46352e-07
0.00183411
2.36714e-07
0.00183396
1.61567e-07
0.00183388
1.42862e-07
0.00183385
1.25242e-07
0.00183383
1.02235e-07
0.00183383
7.78291e-08
0.00183383
5.47495e-08
0.00183383
3.66889e-08
0.00183383
2.35054e-08
0.00183383
1.46238e-08
0.00183383
8.81297e-09
0.00183383
4.62645e-09
0.00183383
2.77413e-09
0.00183383
1.4994e-09
0.00183383
1.02648e-10
0.00183383
3.56584e-10
0.00183383
2.53152e-10
0.00183383
-1.99129e-10
0.00183383
-3.39332e-11
0.00183383
-4.28504e-10
0.00183383
4.81402e-11
0.00183383
4.22361e-10
0.00183383
-2.93555e-10
0.00183383
-3.73485e-11
0.00183383
2.51273e-10
0.00183383
-1.89446e-10
0.00183383
-9.16922e-12
0.00183383
1.52775e-10
0.00183383
-6.31635e-11
0.00183383
-9.0059e-12
0.00183383
-1.24725e-10
0.00183383
-3.85136e-10
0.00183383
-9.04738e-11
0.00183383
2.50755e-10
0.00183383
1.18177e-10
0.00183383
1.99413e-11
0.00183383
9.89055e-11
0.00183383
1.85921e-10
0.00183383
3.12101e-10
0.00183383
2.89179e-10
0.00183383
6.17194e-11
0.00183383
-7.69385e-11
0.00183383
-1.74435e-12
0.00183383
1.61855e-10
0.00183383
2.43469e-10
0.00183383
4.69712e-11
0.00183383
-3.59583e-10
0.00183383
-3.99808e-10
0.00183383
-1.39137e-10
0.00183383
3.45967e-10
0.00183383
-1.02999e-10
0.00183383
2.54451e-10
0.00183383
-1.03068e-09
0.00183383
8.42766e-10
0.00183383
-1.94555e-09
0.00183383
2.97754e-09
0.00183383
-3.43043e-09
0.00183383
5.44078e-09
0.00183383
-5.68856e-09
0.00183383
5.71549e-09
0.00183383
-4.8431e-09
0.00183383
9.57841e-10
0.00183383
3.96265e-09
0.00183383
-1.03669e-08
0.00183383
1.49523e-08
0.00183383
-1.56023e-08
0.00183383
9.59958e-09
0.00183383
2.58223e-09
0.00183383
-1.11597e-08
0.00183383
1.0212e-08
0.00183383
-8.15614e-10
-6.18071e-09
0.00468118
0.000325611
0.0045392
0.000252694
0.00470365
-0.000595115
0.00491118
0.000457327
0.00500315
0.000179112
0.00509958
-0.00282781
0.00511205
-0.005343
0.00509854
-0.00677484
0.00483302
-0.00844248
0.00421021
-0.00850817
0.00350736
-0.00574773
0.00293227
-0.00188617
0.00256595
0.00111171
0.0023683
0.00289428
0.00226025
0.0032794
0.00217989
0.00270668
0.00210019
0.0018619
0.00202252
0.00116098
0.00195707
0.00069132
0.00190923
0.000400991
0.00187786
0.000226235
0.00185877
0.000122908
0.0018477
6.36042e-05
0.00184144
3.11024e-05
0.00183795
1.43166e-05
0.00183603
6.22412e-06
0.00183497
2.60686e-06
0.00183441
1.11213e-06
0.00183411
5.34797e-07
0.00183396
3.14095e-07
0.00183388
2.17982e-07
0.00183385
1.60496e-07
0.00183383
1.17599e-07
0.00183383
8.36786e-08
0.00183382
5.64122e-08
0.00183382
3.67601e-08
0.00183382
2.30712e-08
0.00183382
1.40975e-08
0.00183383
8.36596e-09
0.00183383
4.2822e-09
0.00183383
2.53519e-09
0.00183383
1.37451e-09
0.00183383
8.58317e-11
0.00183383
3.11779e-10
0.00183383
2.02609e-10
0.00183383
-2.02191e-10
0.00183383
2.42704e-11
0.00183383
-3.48468e-10
0.00183383
3.54176e-11
0.00183383
3.74644e-10
0.00183383
-3.17508e-10
0.00183383
-5.80645e-11
0.00183383
2.33227e-10
0.00183383
-1.90798e-10
0.00183383
4.98066e-12
0.00183383
1.61441e-10
0.00183383
-7.18168e-11
0.00183383
-2.24217e-11
0.00183383
-1.0672e-10
0.00183383
-3.43375e-10
0.00183383
-8.47976e-11
0.00183383
2.21735e-10
0.00183383
1.07631e-10
0.00183383
2.99721e-11
0.00183383
1.00627e-10
0.00183383
1.74279e-10
0.00183383
2.88316e-10
0.00183383
2.66467e-10
0.00183383
6.0451e-11
0.00183383
-6.29616e-11
0.00183383
1.71665e-12
0.00183383
1.50074e-10
0.00183383
2.18821e-10
0.00183383
3.57901e-11
0.00183383
-3.39102e-10
0.00183383
-3.59904e-10
0.00183383
-1.34901e-10
0.00183383
3.48528e-10
0.00183383
-1.74676e-10
0.00183383
3.04826e-10
0.00183383
-1.10167e-09
0.00183383
1.07541e-09
0.00183383
-2.20344e-09
0.00183383
3.38367e-09
0.00183383
-4.06197e-09
0.00183383
6.19602e-09
0.00183383
-6.65659e-09
0.00183383
6.70529e-09
0.00183383
-5.63919e-09
0.00183383
1.34565e-09
0.00183383
4.40496e-09
0.00183383
-1.18345e-08
0.00183382
1.73336e-08
0.00183383
-1.8214e-08
0.00183383
1.13929e-08
0.00183383
2.6048e-09
0.00183383
-1.29598e-08
0.00183383
1.18851e-08
0.00183383
-9.66599e-10
-7.03855e-09
0.00487521
0.000327426
0.00476378
0.000364121
0.00487918
-0.00071051
0.00507468
0.000261821
0.00517222
8.1578e-05
0.00517285
-0.00282844
0.00507012
-0.00524027
0.00494549
-0.00665021
0.00452755
-0.00802454
0.00380634
-0.00778696
0.00310709
-0.00504848
0.00258507
-0.00136415
0.002277
0.00141978
0.00214059
0.00303069
0.00209449
0.0033255
0.00206679
0.00273437
0.00202664
0.00190205
0.0019769
0.00121072
0.0019303
0.000737919
0.00189444
0.000436852
0.00187015
0.000250524
0.00185497
0.000138093
0.00184591
7.26626e-05
0.00184064
3.63744e-05
0.00183761
1.73461e-05
0.00183588
7.94842e-06
0.00183491
3.57586e-06
0.00183438
1.64658e-06
0.00183409
8.22039e-07
0.00183394
4.63303e-07
0.00183387
2.92188e-07
0.00183383
1.95448e-07
0.00183382
1.32739e-07
0.00183381
8.92876e-08
0.00183381
5.78673e-08
0.00183381
3.66585e-08
0.00183381
2.24995e-08
0.00183381
1.34619e-08
0.00183381
7.83693e-09
0.00183381
3.90177e-09
0.00183381
2.27589e-09
0.00183381
1.23365e-09
0.00183381
5.83423e-11
0.00183381
2.59214e-10
0.00183381
1.51891e-10
0.00183381
-1.9293e-10
0.00183381
7.97658e-11
0.00183381
-2.78017e-10
0.00183381
1.96444e-11
0.00183381
3.17122e-10
0.00183381
-3.35325e-10
0.00183381
-7.10337e-11
0.00183381
2.12502e-10
0.00183381
-1.82664e-10
0.00183381
2.18503e-11
0.00183381
1.62443e-10
0.00183381
-7.89339e-11
0.00183381
-3.4097e-11
0.00183381
-9.06031e-11
0.00183381
-3.00864e-10
0.00183381
-7.86046e-11
0.00183381
1.94736e-10
0.00183381
9.90836e-11
0.00183381
3.75752e-11
0.00183381
1.01258e-10
0.00183381
1.62848e-10
0.00183381
2.62757e-10
0.00183381
2.42707e-10
0.00183381
5.70106e-11
0.00183381
-5.28576e-11
0.00183381
6.10722e-12
0.00183381
1.40332e-10
0.00183381
1.902e-10
0.00183381
1.96921e-11
0.00183381
-3.14542e-10
0.00183381
-3.11771e-10
0.00183381
-1.30318e-10
0.00183381
3.47361e-10
0.00183381
-2.44641e-10
0.00183381
3.61383e-10
0.00183381
-1.17391e-09
0.00183381
1.31177e-09
0.00183381
-2.46564e-09
0.00183381
3.80186e-09
0.00183381
-4.71906e-09
0.00183381
6.97177e-09
0.00183381
-7.66854e-09
0.00183381
7.75892e-09
0.00183381
-6.50947e-09
0.00183381
1.81369e-09
0.00183381
4.7904e-09
0.00183382
-1.32918e-08
0.00183381
1.9805e-08
0.00183382
-2.0996e-08
0.00183381
1.33667e-08
0.00183381
2.51526e-09
0.00183382
-1.48013e-08
0.00183381
1.3675e-08
0.00183381
-1.13506e-09
-7.9014e-09
0.00496738
0.000320883
0.00489678
0.000434722
0.0049597
-0.000773425
0.00512546
9.60606e-05
0.00522843
-2.14002e-05
0.00514478
-0.00274478
0.00494309
-0.00503859
0.00469898
-0.0064061
0.0041176
-0.00744316
0.00332266
-0.00699202
0.00265792
-0.00438373
0.002206
-0.000912231
0.00196749
0.00165829
0.00189788
0.00310029
0.00191529
0.00330809
0.00194094
0.00270873
0.00194171
0.00190127
0.00192217
0.00123026
0.001897
0.000763086
0.00187542
0.000458435
0.00185994
0.000266009
0.00184978
0.000148253
0.00184339
7.90481e-05
0.00183946
4.03095e-05
0.00183706
1.97423e-05
0.00183562
9.38707e-06
0.00183477
4.42183e-06
0.00183429
2.13022e-06
0.00183402
1.08899e-06
0.00183388
6.04498e-07
0.00183381
3.631e-07
0.00183378
2.28866e-07
0.00183376
1.4702e-07
0.00183376
9.43386e-08
0.00183376
5.89588e-08
0.00183376
3.6304e-08
0.00183376
2.17444e-08
0.00183376
1.26968e-08
0.00183376
7.22177e-09
0.00183376
3.48634e-09
0.00183376
1.99805e-09
0.00183376
1.0729e-09
0.00183376
1.84465e-11
0.00183376
2.0078e-10
0.00183376
1.03338e-10
0.00183376
-1.73706e-10
0.00183376
1.25511e-10
0.00183376
-2.23281e-10
0.00183376
8.91332e-13
0.00183376
2.55415e-10
0.00183376
-3.44855e-10
0.00183376
-7.44558e-11
0.00183376
1.91088e-10
0.00183376
-1.67559e-10
0.00183376
4.05234e-11
0.00183376
1.55192e-10
0.00183376
-8.55274e-11
0.00183376
-4.12821e-11
0.00183376
-7.69223e-11
0.00183376
-2.60648e-10
0.00183376
-7.05894e-11
0.00183376
1.7042e-10
0.00183376
9.15569e-11
0.00183376
4.31923e-11
0.00183376
1.00088e-10
0.00183376
1.51548e-10
0.00183376
2.37323e-10
0.00183376
2.17978e-10
0.00183376
5.07587e-11
0.00183376
-4.55839e-11
0.00183376
1.1462e-11
0.00183376
1.31894e-10
0.00183376
1.59053e-10
0.00183376
2.74385e-14
0.00183376
-2.87773e-10
0.00183376
-2.56868e-10
0.00183376
-1.25528e-10
0.00183376
3.41767e-10
0.00183376
-3.1194e-10
0.00183376
4.27065e-10
0.00183376
-1.24859e-09
0.00183376
1.54814e-09
0.00183376
-2.7348e-09
0.00183376
4.23581e-09
0.00183376
-5.40205e-09
0.00183376
7.77239e-09
0.00183376
-8.7278e-09
0.00183376
8.88391e-09
0.00183376
-7.46379e-09
0.00183376
2.36839e-09
0.00183376
5.11255e-09
0.00183376
-1.47371e-08
0.00183376
2.23718e-08
0.00183376
-2.3967e-08
0.00183376
1.55444e-08
0.00183376
2.30085e-09
0.00183376
-1.6682e-08
0.00183376
1.55915e-08
0.00183376
-1.32506e-09
-8.76871e-09
0.00496096
0.00030773
0.00493374
0.000461946
0.00494426
-0.000783944
0.00507352
-3.3201e-05
0.0051761
-0.000123983
0.00502024
-0.00258893
0.00473487
-0.00475322
0.00434755
-0.00601877
0.00360208
-0.0066977
0.00276777
-0.00615771
0.00216935
-0.00378531
0.00180198
-0.00054486
0.00164078
0.0018195
0.00164398
0.00309709
0.0017263
0.00322578
0.00180478
0.00263024
0.00184658
0.00185947
0.00185869
0.00121815
0.00185714
0.00076464
0.00185195
0.00046362
0.00184692
0.000271037
0.00184291
0.000152267
0.00183988
8.20715e-05
0.00183768
4.2515e-05
0.00183613
2.12941e-05
0.00183508
1.04312e-05
0.00183442
5.08975e-06
0.00183401
2.53537e-06
0.00183378
1.32156e-06
0.00183365
7.30412e-07
0.00183359
4.26901e-07
0.00183356
2.58719e-07
0.00183355
1.59359e-07
0.00183354
9.82655e-08
0.00183354
5.93912e-08
0.00183354
3.55384e-08
0.00183354
2.07198e-08
0.00183354
1.17619e-08
0.00183354
6.50638e-09
0.00183355
3.03056e-09
0.00183355
1.69769e-09
0.00183355
8.87125e-10
0.00183355
-3.44923e-11
0.00183355
1.39229e-10
0.00183355
5.76081e-11
0.00183355
-1.48698e-10
0.00183355
1.54957e-10
0.00183355
-1.88594e-10
0.00183355
-1.96283e-11
0.00183355
1.94233e-10
0.00183355
-3.4381e-10
0.00183355
-6.66512e-11
0.00183355
1.70148e-10
0.00183355
-1.47481e-10
0.00183355
5.99348e-11
0.00183355
1.39556e-10
0.00183355
-9.21663e-11
0.00183355
-4.3012e-11
0.00183355
-6.60102e-11
0.00183355
-2.23981e-10
0.00183355
-5.96341e-11
0.00183355
1.49075e-10
0.00183355
8.39237e-11
0.00183355
4.71022e-11
0.00183355
9.74645e-11
0.00183355
1.40276e-10
0.00183355
2.12248e-10
0.00183355
1.92057e-10
0.00183355
4.17901e-11
0.00183355
-3.99679e-11
0.00183355
1.79662e-11
0.00183355
1.23429e-10
0.00183355
1.2533e-10
0.00183355
-2.13804e-11
0.00183355
-2.586e-10
0.00183355
-1.96574e-10
0.00183355
-1.21531e-10
0.00183355
3.31526e-10
0.00183355
-3.75805e-10
0.00183355
5.03139e-10
0.00183355
-1.32649e-09
0.00183355
1.7838e-09
0.00183355
-3.01287e-09
0.00183355
4.68722e-09
0.00183355
-6.11265e-09
0.00183355
8.60213e-09
0.00183355
-9.83663e-09
0.00183355
1.0084e-08
0.00183355
-8.50644e-09
0.00183355
3.01146e-09
0.00183355
5.36993e-09
0.00183355
-1.61688e-08
0.00183354
2.50322e-08
0.00183355
-2.71326e-08
0.00183354
1.7939e-08
0.00183355
1.95019e-09
0.00183355
-1.85932e-08
0.00183355
1.76352e-08
0.00183355
-1.53962e-09
-9.63615e-09
0.0048601
0.000284808
0.0048717
0.000450345
0.00483291
-0.000745154
0.00492702
-0.000127314
0.00501953
-0.000216491
0.00480607
-0.00237547
0.00444333
-0.00439048
0.00388698
-0.00546243
0.00299568
-0.00580639
0.00216514
-0.00532716
0.00165702
-0.00327719
0.00138215
-0.000269998
0.00130255
0.0018991
0.0013826
0.00301705
0.00152974
0.00307864
0.00165972
0.00250026
0.00174262
0.00177657
0.00178785
0.00117292
0.0018117
0.000740791
0.00182445
0.000450878
0.00183104
0.000264445
0.00183401
0.000149299
0.00183491
8.11641e-05
0.0018348
4.2628e-05
0.00183431
2.17827e-05
0.00183379
1.09542e-05
0.00183337
5.50855e-06
0.00183308
2.82262e-06
0.00183291
1.49801e-06
0.00183281
8.29035e-07
0.00183276
4.76951e-07
0.00183274
2.81339e-07
0.00183273
1.67751e-07
0.00183273
9.99847e-08
0.00183273
5.85811e-08
0.00183273
3.40455e-08
0.00183273
1.92574e-08
0.00183273
1.05756e-08
0.00183273
5.65464e-09
0.00183273
2.51576e-09
0.00183273
1.36286e-09
0.00183273
6.69515e-10
0.00183273
-1.01128e-10
0.00183273
7.63924e-11
0.00183273
1.38359e-11
0.00183273
-1.23317e-10
0.00183273
1.62412e-10
0.00183273
-1.75785e-10
0.00183273
-3.95693e-11
0.00183273
1.37756e-10
0.00183273
-3.30359e-10
0.00183273
-4.69889e-11
0.00183273
1.50279e-10
0.00183273
-1.24147e-10
0.00183273
7.85863e-11
0.00183273
1.15871e-10
0.00183273
-9.88081e-11
0.00183273
-3.93101e-11
0.00183273
-5.80319e-11
0.00183273
-1.91052e-10
0.00183273
-4.49959e-11
0.00183273
1.30587e-10
0.00183273
7.51488e-11
0.00183273
4.95503e-11
0.00183273
9.4032e-11
0.00183273
1.28831e-10
0.00183273
1.87069e-10
0.00183273
1.64698e-10
0.00183273
3.06673e-11
0.00183273
-3.47347e-11
0.00183273
2.56349e-11
0.00183273
1.13128e-10
0.00183273
8.86948e-11
0.00183273
-4.1829e-11
0.00183273
-2.26043e-10
0.00183273
-1.3321e-10
0.00183273
-1.19861e-10
0.00183273
3.17695e-10
0.00183273
-4.35402e-10
0.00183273
5.8926e-10
0.00183273
-1.40833e-09
0.00183273
2.02014e-09
0.00183273
-3.30218e-09
0.00183273
5.156e-09
0.00183273
-6.85187e-09
0.00183273
9.4644e-09
0.00183273
-1.09931e-08
0.00183273
1.13521e-08
0.00183273
-9.62587e-09
0.00183273
3.72844e-09
0.00183273
5.57455e-09
0.00183273
-1.75885e-08
0.00183273
2.77664e-08
0.00183273
-3.04615e-08
0.00183273
2.05276e-08
0.00183273
1.46116e-09
0.00183273
-2.05073e-08
0.00183273
1.9784e-08
0.00183273
-1.77959e-09
-1.04905e-08
0.00466721
0.000249356
0.00470944
0.000408122
0.00462624
-0.000661954
0.00469261
-0.000193692
0.0047631
-0.000286978
0.00450825
-0.00212061
0.00406342
-0.00394565
0.00332231
-0.00472132
0.00232375
-0.00480783
0.00154267
-0.00454608
0.00113742
-0.00287195
0.000955003
-8.75814e-05
0.000956763
0.00189734
0.00111539
0.00285842
0.00132604
0.00286798
0.00150622
0.00232008
0.0016304
0.00165239
0.00170976
0.00109357
0.0017601
0.000690444
0.00179179
0.000419195
0.00181089
0.00024534
0.00182157
0.000138621
0.00182695
7.57835e-05
0.00182931
4.02728e-05
0.00183013
2.09621e-05
0.00183028
1.08018e-05
0.0018302
5.58388e-06
0.00183009
2.93552e-06
0.00183
1.58508e-06
0.00182995
8.81029e-07
0.00182993
5.02158e-07
0.00182992
2.90455e-07
0.00182992
1.68706e-07
0.00182992
9.75886e-08
0.00182992
5.54943e-08
0.00182993
3.12687e-08
0.00182993
1.70685e-08
0.00182993
8.9967e-09
0.00182993
4.59931e-09
0.00182993
1.90591e-09
0.00182993
9.72729e-10
0.00182993
4.12366e-10
0.00182993
-1.82425e-10
0.00182993
1.18109e-11
0.00182993
-3.00207e-11
0.00182993
-1.03726e-10
0.00182993
1.43893e-10
0.00182993
-1.82802e-10
0.00182993
-5.56853e-11
0.00182993
8.97406e-11
0.00182993
-3.03266e-10
0.00182993
-1.7009e-11
0.00182993
1.31532e-10
0.00182993
-9.90366e-11
0.00182993
9.41431e-11
0.00182993
8.51784e-11
0.00182993
-1.04546e-10
0.00182993
-3.09486e-11
0.00182993
-5.28129e-11
0.00182993
-1.61225e-10
0.00182993
-2.67059e-11
0.00182993
1.14293e-10
0.00182993
6.45835e-11
0.00182993
5.07907e-11
0.00182993
9.01953e-11
0.00182993
1.16756e-10
0.00182993
1.61125e-10
0.00182993
1.35942e-10
0.00182993
1.84328e-11
0.00182993
-2.86681e-11
0.00182993
3.38795e-11
0.00182993
9.89333e-11
0.00182993
4.9599e-11
0.00182993
-5.75696e-11
0.00182993
-1.89279e-10
0.00182993
-7.04919e-11
0.00182993
-1.22315e-10
0.00182993
3.02846e-10
0.00182993
-4.89694e-10
0.00182993
6.83728e-10
0.00182993
-1.49488e-09
0.00182993
2.25945e-09
0.00182993
-3.6056e-09
0.00182993
5.63949e-09
0.00182993
-7.61679e-09
0.00182993
1.03569e-08
0.00182993
-1.21815e-08
0.00182993
1.26555e-08
0.00182993
-1.07723e-08
0.00182993
4.46197e-09
0.00182993
5.77316e-09
0.00182993
-1.90038e-08
0.00182993
3.05087e-08
0.00182993
-3.38272e-08
0.00182993
2.31907e-08
0.00182993
8.63834e-10
0.00182993
-2.23488e-08
0.00182993
2.19533e-08
0.00182993
-2.03793e-09
-1.12956e-08
0.00438388
0.000201577
0.00444409
0.000347916
0.00432851
-0.000546376
0.00437433
-0.000239507
0.0044117
-0.000324347
0.00413001
-0.00183893
0.00358774
-0.00340338
0.00267134
-0.00380492
0.00162994
-0.00376644
0.000929906
-0.00384604
0.000622341
-0.00256438
0.000528338
6.42165e-06
0.00060538
0.0018203
0.000841185
0.00262262
0.00111355
0.00259562
0.00134295
0.00209068
0.00150859
0.00148675
0.00162278
0.000979378
0.00170033
0.000612895
0.00175148
0.000368044
0.00178347
0.000213352
0.00180214
0.000119947
0.00181224
6.56853e-05
0.00181727
3.52375e-05
0.00181958
1.86577e-05
0.00182054
9.83987e-06
0.00182091
5.21982e-06
0.00182103
2.80938e-06
0.00182108
1.54128e-06
0.0018211
8.60898e-07
0.00182111
4.87393e-07
0.00182112
2.7737e-07
0.00182113
1.57367e-07
0.00182114
8.84318e-08
0.00182115
4.87155e-08
0.00182116
2.64672e-08
0.00182116
1.37866e-08
0.00182116
6.85298e-09
0.00182116
3.26073e-09
0.00182116
1.16005e-09
0.00182116
5.06112e-10
0.00182116
1.13441e-10
0.00182116
-2.77324e-10
0.00182116
-5.70643e-11
0.00182116
-7.58399e-11
0.00182116
-9.58502e-11
0.00182116
9.90598e-11
0.00182116
-2.01519e-10
0.00182116
-6.44065e-11
0.00182116
5.34322e-11
0.00182116
-2.61995e-10
0.00182116
1.8104e-11
0.00182116
1.13371e-10
0.00182116
-7.34013e-11
0.00182116
1.02965e-10
0.00182116
4.98591e-11
0.00182116
-1.07302e-10
0.00182116
-1.96235e-11
0.00182116
-4.94699e-11
0.00182116
-1.33068e-10
0.00182116
-6.27344e-12
0.00182116
9.88769e-11
0.00182116
5.23471e-11
0.00182116
5.09491e-11
0.00182116
8.56429e-11
0.00182116
1.03238e-10
0.00182116
1.33852e-10
0.00182116
1.06505e-10
0.00182116
6.77812e-12
0.00182116
-2.10239e-11
0.00182116
4.09673e-11
0.00182116
7.92073e-11
0.00182116
1.05485e-11
0.00182116
-6.41302e-11
0.00182116
-1.48739e-10
0.00182116
-1.35135e-11
0.00182116
-1.30398e-10
0.00182116
2.9071e-10
0.00182116
-5.37147e-10
0.00182116
7.83435e-10
0.00182116
-1.58604e-09
0.00182116
2.50134e-09
0.00182116
-3.9234e-09
0.00182116
6.12756e-09
0.00182116
-8.3907e-09
0.00182116
1.12563e-08
0.00182116
-1.33493e-08
0.00182116
1.3905e-08
0.00182116
-1.18182e-08
0.00182116
5.06672e-09
0.00182116
6.08017e-09
0.00182116
-2.04262e-08
0.00182116
3.30892e-08
0.00182117
-3.68988e-08
0.00182116
2.55933e-08
0.00182116
2.70798e-10
0.00182117
-2.39411e-08
0.00182116
2.39126e-08
0.00182116
-2.28375e-09
-1.19604e-08
0.00401089
0.000142784
0.00407462
0.000284186
0.00394442
-0.000416174
0.00397181
-0.000266896
0.00396959
-0.000322125
0.00366817
-0.00153751
0.00301237
-0.00274758
0.00197354
-0.00276609
0.000968071
-0.00276097
0.00033921
-0.00321718
0.000119159
-0.00234433
0.000113052
1.25285e-05
0.000250833
0.00168252
0.000557225
0.00231622
0.000889365
0.00226348
0.00116778
0.00181226
0.00137583
0.0012787
0.00152543
0.00082978
0.00162957
0.000508753
0.00169879
0.000298825
0.00174219
0.00016996
0.00176773
9.43989e-05
0.00178188
5.1539e-05
0.00178928
2.78367e-05
0.00179297
1.49707e-05
0.00179474
8.06784e-06
0.00179558
4.38071e-06
0.00179598
2.40536e-06
0.00179619
1.33596e-06
0.0017963
7.47771e-07
0.00179637
4.19722e-07
0.00179641
2.3461e-07
0.00179644
1.2965e-07
0.00179646
7.03955e-08
0.00179647
3.71945e-08
0.00179648
1.91575e-08
0.00179648
9.22766e-09
0.00179648
4.08966e-09
0.00179648
1.63157e-09
0.00179649
2.81352e-10
0.00179649
-2.91823e-11
0.00179649
-2.07431e-10
0.00179649
-3.75983e-10
0.00179649
-1.31037e-10
0.00179649
-1.21786e-10
0.00179649
-1.02921e-10
0.00179649
3.49602e-11
0.00179649
-2.16025e-10
0.00179649
-6.32641e-11
0.00179649
3.11309e-11
0.00179649
-2.07587e-10
0.00179649
4.83851e-11
0.00179649
9.51039e-11
0.00179649
-4.85525e-11
0.00179649
1.00223e-10
0.00179649
1.47853e-11
0.00179649
-1.03963e-10
0.00179649
-8.26135e-12
0.00179649
-4.59457e-11
0.00179649
-1.04743e-10
0.00179649
1.25739e-11
0.00179649
8.26633e-11
0.00179649
3.96455e-11
0.00179649
4.96191e-11
0.00179649
7.9035e-11
0.00179649
8.7292e-11
0.00179649
1.0518e-10
0.00179649
7.81366e-11
0.00179649
-2.01581e-12
0.00179649
-1.2234e-11
0.00179649
4.38193e-11
0.00179649
5.41411e-11
0.00179649
-2.2797e-11
0.00179649
-5.77621e-11
0.00179649
-1.07426e-10
0.00179649
3.18728e-11
0.00179649
-1.43918e-10
0.00179649
2.8479e-10
0.00179649
-5.74594e-10
0.00179649
8.81596e-10
0.00179649
-1.67634e-09
0.00179649
2.7323e-09
0.00179649
-4.23922e-09
0.00179649
6.58365e-09
0.00179649
-9.11308e-09
0.00179649
1.20774e-08
0.00179649
-1.43573e-08
0.00179649
1.49033e-08
0.00179649
-1.25097e-08
0.00179649
5.27215e-09
0.00179649
6.68481e-09
0.00179649
-2.18285e-08
0.00179649
3.51313e-08
0.00179649
-3.899e-08
0.00179649
2.70345e-08
0.00179649
-5.70365e-11
0.00179649
-2.49319e-08
0.00179649
2.51588e-08
0.00179649
-2.43315e-09
-1.22882e-08
0.00354123
7.68468e-05
0.00359549
0.000229928
0.00347196
-0.000292642
0.00347645
-0.000271385
0.00343721
-0.000282892
0.0031131
-0.0012134
0.00234865
-0.00198312
0.00129235
-0.00170979
0.000390291
-0.00185891
-0.000191632
-0.00263526
-0.000402895
-0.00213307
-0.000352996
-3.73707e-05
-9.86134e-05
0.00142813
0.00025823
0.00195938
0.000650449
0.00187126
0.000981185
0.00148152
0.00123311
0.00102677
0.00141542
0.000647476
0.00154053
0.000383639
0.0016217
0.000217653
0.00167147
0.000120189
0.00170044
6.54373e-05
0.00171654
3.54383e-05
0.00172516
1.92102e-05
0.00172967
1.04662e-05
0.00173199
5.7426e-06
0.0017332
3.17393e-06
0.00173384
1.76494e-06
0.00173419
9.84264e-07
0.00173439
5.47374e-07
0.00173451
3.0186e-07
0.00173458
1.63977e-07
0.00173462
8.69803e-08
0.00173465
4.46305e-08
0.00173466
2.18165e-08
0.00173467
1.0006e-08
0.00173468
3.88363e-09
0.00173468
1.03756e-09
0.00173468
-7.66986e-11
0.00173468
-6.01798e-10
0.00173469
-5.49505e-10
0.00173469
-4.87322e-10
0.00173469
-4.51363e-10
0.00173469
-2.00601e-10
0.00173469
-1.57536e-10
0.00173469
-1.20749e-10
0.00173469
-2.96884e-11
0.00173469
-2.05689e-10
0.00173469
-5.34468e-11
0.00173469
2.31965e-11
0.00173469
-1.45071e-10
0.00173469
6.08277e-11
0.00173469
7.71158e-11
0.00173469
-2.6713e-11
0.00173469
8.2134e-11
0.00173469
-1.19171e-11
0.00173469
-9.18631e-11
0.00173469
-7.07755e-13
0.00173469
-3.90255e-11
0.00173469
-7.54419e-11
0.00173469
2.4184e-11
0.00173469
6.4724e-11
0.00173469
2.84662e-11
0.00173469
4.53556e-11
0.00173469
6.83759e-11
0.00173469
6.85122e-11
0.00173469
7.61339e-11
0.00173469
5.34779e-11
0.00173469
-5.99009e-12
0.00173469
-4.48676e-12
0.00173469
3.92109e-11
0.00173469
2.76724e-11
0.00173469
-4.23343e-11
0.00173469
-3.86255e-11
0.00173469
-7.14039e-11
0.00173469
6.0636e-11
0.00173469
-1.5841e-10
0.00173469
2.84789e-10
0.00173469
-5.93923e-10
0.00173469
9.59845e-10
0.00173469
-1.74148e-09
0.00173469
2.9017e-09
0.00173469
-4.48211e-09
0.00173469
6.8938e-09
0.00173469
-9.60767e-09
0.00173469
1.25858e-08
0.00173469
-1.48917e-08
0.00173469
1.52776e-08
0.00173469
-1.2452e-08
0.00173469
4.73987e-09
0.00173469
7.72039e-09
0.00173469
-2.29723e-08
0.00173469
3.58947e-08
0.00173469
-3.89653e-08
0.00173469
2.64192e-08
0.00173469
2.73892e-10
0.00173469
-2.47296e-08
0.00173469
2.48275e-08
0.00173469
-2.32872e-09
-1.19319e-08
0.00295841
1.73177e-05
0.00300043
0.000187912
0.00290356
-0.000195772
0.00287651
-0.000244336
0.00281557
-0.000221951
0.00245271
-0.00085054
0.00163548
-0.00116589
0.000712585
-0.000786901
-4.38976e-05
-0.00110243
-0.00059961
-0.00207954
-0.00091081
-0.00182187
-0.000831717
-0.000116464
-0.000502274
0.00109869
-5.14405e-05
0.00150855
0.000407219
0.0014126
0.000791505
0.00109724
0.00107884
0.00073943
0.00127936
0.000446952
0.00141038
0.000252621
0.00149127
0.000136768
0.00153888
7.25746e-05
0.00156589
3.84296e-05
0.0015808
2.05235e-05
0.00158891
1.11073e-05
0.00159328
6.0908e-06
0.00159565
3.37102e-06
0.00159696
1.87287e-06
0.00159768
1.03872e-06
0.00159809
5.7156e-07
0.00159833
3.09486e-07
0.00159847
1.6351e-07
0.00159855
8.34332e-08
0.0015986
4.0278e-08
0.00159863
1.77729e-08
0.00159864
6.59849e-09
0.00159865
1.45442e-09
0.00159865
-7.76039e-10
0.00159866
-1.44426e-09
0.00159866
-1.36585e-09
0.00159866
-1.20361e-09
0.00159866
-8.79482e-10
0.00159866
-6.23616e-10
0.00159866
-4.60737e-10
0.00159866
-2.38421e-10
0.00159866
-1.63635e-10
0.00159866
-1.33334e-10
0.00159866
-6.64441e-11
0.00159866
-1.58257e-10
0.00159866
-4.11656e-11
0.00159866
2.62523e-11
0.00159866
-8.58075e-11
0.00159866
4.73421e-11
0.00159866
6.15444e-11
0.00159866
-1.17045e-11
0.00159866
5.11379e-11
0.00159866
-2.10549e-11
0.00159866
-7.19103e-11
0.00159866
3.55464e-13
0.00159866
-2.61195e-11
0.00159866
-4.74601e-11
0.00159866
2.40444e-11
0.00159866
4.63039e-11
0.00159866
1.99697e-11
0.00159866
3.60419e-11
0.00159866
5.26883e-11
0.00159866
4.81611e-11
0.00159866
4.91087e-11
0.00159866
3.46976e-11
0.00159866
-5.26248e-12
0.00159866
-8.91553e-13
0.00159866
2.70845e-11
0.00159866
7.68389e-12
0.00159866
-4.23671e-11
0.00159866
-1.42449e-11
0.00159866
-4.68723e-11
0.00159866
7.07747e-11
0.00159866
-1.62797e-10
0.00159866
2.80235e-10
0.00159866
-5.75813e-10
0.00159866
9.741e-10
0.00159866
-1.71413e-09
0.00159866
2.88474e-09
0.00159866
-4.46151e-09
0.00159866
6.77984e-09
0.00159866
-9.46836e-09
0.00159866
1.2265e-08
0.00159866
-1.43484e-08
0.00159866
1.44241e-08
0.00159866
-1.11848e-08
0.00159866
3.31085e-09
0.00159866
8.87826e-09
0.00159866
-2.30161e-08
0.00159866
3.40827e-08
0.00159866
-3.53757e-08
0.00159866
2.26332e-08
0.00159866
1.50303e-09
0.00159866
-2.25207e-08
0.00159866
2.18513e-08
0.00159866
-1.78858e-09
-1.0433e-08
0.00224891
-1.79366e-05
0.00229871
0.000138113
0.00222892
-0.000125989
0.00217185
-0.000187261
0.00209645
-0.000146549
0.0016828
-0.000436896
0.000957485
-0.000440566
0.000333125
-0.000162541
-0.000231002
-0.000538301
-0.000900903
-0.00140964
-0.00134079
-0.00138199
-0.00125886
-0.000198392
-0.000862213
0.000702045
-0.000339349
0.000985684
0.000172919
0.000900335
0.00058826
0.000681897
0.000881425
0.000446265
0.00107278
0.0002556
0.00118904
0.000136354
0.00125613
6.96833e-05
0.00129354
3.51633e-05
0.00131404
1.79276e-05
0.00132523
9.33892e-06
0.00133136
4.97851e-06
0.00133475
2.70057e-06
0.00133664
1.47504e-06
0.00133771
8.02005e-07
0.00133832
4.29507e-07
0.00133867
2.23965e-07
0.00133887
1.11671e-07
0.00133898
5.1729e-08
0.00133904
2.11013e-08
0.00133908
6.12787e-09
0.00133909
-5.2051e-10
0.0013391
-2.89101e-09
0.00133911
-3.3022e-09
0.00133911
-2.96704e-09
0.00133911
-2.37131e-09
0.00133911
-1.69258e-09
0.00133911
-1.22598e-09
0.00133911
-8.43792e-10
0.00133911
-5.37979e-10
0.00133911
-3.67571e-10
0.00133911
-2.07839e-10
0.00133911
-1.24367e-10
0.00133911
-1.16875e-10
0.00133911
-5.6421e-11
0.00133911
-8.73127e-11
0.00133911
-3.20073e-11
0.00133911
3.12491e-11
0.00133911
-4.36657e-11
0.00133911
1.6563e-11
0.00133911
4.83922e-11
0.00133911
-6.27592e-12
0.00133911
2.05191e-11
0.00133911
-1.12489e-11
0.00133911
-4.95687e-11
0.00133911
-3.2109e-12
0.00133911
-9.52066e-12
0.00133911
-2.54946e-11
0.00133911
1.43919e-11
0.00133911
2.98423e-11
0.00133911
1.26638e-11
0.00133911
2.16574e-11
0.00133911
3.40209e-11
0.00133911
2.90417e-11
0.00133911
2.67997e-11
0.00133911
2.13126e-11
0.00133911
-2.59052e-12
0.00133911
-1.8965e-12
0.00133911
1.32029e-11
0.00133911
5.25256e-13
0.00133911
-2.70534e-11
0.00133911
2.55236e-12
0.00133911
-3.30559e-11
0.00133911
6.36413e-11
0.00133911
-1.41494e-10
0.00133911
2.45499e-10
0.00133911
-4.85179e-10
0.00133911
8.47208e-10
0.00133911
-1.46745e-09
0.00133911
2.46606e-09
0.00133911
-3.82921e-09
0.00133911
5.74713e-09
0.00133911
-8.0002e-09
0.00133911
1.02464e-08
0.00133911
-1.17881e-08
0.00133911
1.15191e-08
0.00133911
-8.30822e-09
0.00133911
1.29486e-09
0.00133911
8.99255e-09
0.00133911
-2.01285e-08
0.00133912
2.7759e-08
0.00133911
-2.68775e-08
0.00133912
1.5326e-08
0.00133911
3.17763e-09
0.00133911
-1.75005e-08
0.00133911
1.55813e-08
0.00133911
-7.71044e-10
-7.45839e-09
0.00142211
-2.72562e-05
0.00149207
6.81502e-05
0.00142621
-6.01267e-05
0.00134386
-0.000104913
0.00123591
-3.85971e-05
0.000868803
-6.97885e-05
0.000467034
-3.87966e-05
0.000228747
7.57465e-05
-0.000187171
-0.000122383
-0.000959056
-0.000637758
-0.00159308
-0.000747966
-0.00159026
-0.000201207
-0.0011657
0.000277481
-0.000607338
0.000427325
-9.84256e-05
0.000391422
0.000309154
0.000274317
0.000572133
0.000183287
0.000729791
9.79418e-05
0.00081742
4.87252e-05
0.000863976
2.31272e-05
0.000888265
1.08742e-05
0.00090099
5.20279e-06
0.000907769
2.55972e-06
0.000911455
1.29247e-06
0.000913493
6.62229e-07
0.000914631
3.37494e-07
0.000915266
1.66797e-07
0.000915618
7.73064e-08
0.000915811
3.15462e-08
0.000915913
9.0786e-09
0.000915966
-1.1144e-09
0.000915992
-4.73921e-09
0.000916003
-5.48712e-09
0.000916008
-4.96073e-09
0.000916009
-3.96921e-09
0.000916009
-2.96561e-09
0.000916008
-2.13606e-09
0.000916007
-1.51075e-09
0.000916006
-9.80275e-10
0.000916006
-6.56669e-10
0.000916005
-4.49282e-10
0.000916005
-2.67438e-10
0.000916005
-1.77458e-10
0.000916005
-1.02764e-10
0.000916005
-5.21543e-11
0.000916005
-6.12457e-11
0.000916005
-1.97432e-11
0.000916004
-2.59484e-11
0.000916004
-1.98348e-11
0.000916004
2.34002e-11
0.000916004
-2.06749e-11
0.000916004
-8.20467e-12
0.000916004
2.92014e-11
0.000916004
-3.40993e-12
0.000916005
5.81446e-12
0.000916004
2.18936e-12
0.000916004
-2.79395e-11
0.000916004
-5.81863e-12
0.000916004
1.58376e-12
0.000916004
-9.66534e-12
0.000916004
4.81278e-12
0.000916004
1.45324e-11
0.000916004
4.84661e-12
0.000916004
7.3354e-12
0.000916005
1.58895e-11
0.000916005
1.3348e-11
0.000916005
1.07481e-11
0.000916005
1.05796e-11
0.000916005
3.36894e-14
0.000916005
-2.52208e-12
0.000916005
4.49604e-12
0.000916005
1.81177e-12
0.000916005
-9.50305e-12
0.000916005
5.29614e-12
0.000916005
-1.93309e-11
0.000916005
3.91348e-11
0.000916005
-8.27526e-11
0.000916005
1.47075e-10
0.000916004
-2.7908e-10
0.000916005
4.93275e-10
0.000916004
-8.47497e-10
0.000916005
1.40677e-09
0.000916004
-2.18172e-09
0.000916006
3.2216e-09
0.000916003
-4.42113e-09
0.000916007
5.54707e-09
0.000916002
-6.17582e-09
0.000916007
5.70047e-09
0.000916003
-3.51827e-09
0.000916005
-6.84383e-10
0.000916007
6.38933e-09
0.000915999
-1.19557e-08
0.000916012
1.48446e-08
0.000915998
-1.2712e-08
0.000916008
5.36904e-09
0.000916007
3.96071e-09
0.000915999
-9.42718e-09
0.000916008
6.77724e-09
0.000916007
4.11825e-10
-3.35467e-09
0.0004673
0.00053545
0.000475323
0.00037041
0.000331813
0.000262025
0.000223228
0.000298975
0.000176591
-0.000461166
-0.00120913
-0.00141034
-0.00113286
-0.000705533
-0.000314111
-3.97941e-05
0.000143493
0.000241435
0.00029016
0.000313287
0.000324161
0.000329364
0.000331924
0.000333216
0.000333878
0.000334216
0.000334383
0.00033446
0.000334491
0.000334501
0.000334499
0.000334495
0.000334489
0.000334484
0.00033448
0.000334477
0.000334475
0.000334474
0.000334473
0.000334472
0.000334472
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.000334471
0.00033447
0.000334472
0.00033447
0.000334473
0.000334468
0.000334474
0.000334468
0.000334473
0.00033447
0.000334469
0.000334476
0.000334464
0.000334479
0.000334466
0.000334471
0.000334475
0.000334466
0.000334472
0.000334473
0.000519432
-0.000519432
0.000717939
-0.000198506
0.000728139
-1.02005e-05
0.000582779
0.00014536
-0.000310356
0.000893136
-0.00126034
0.000949982
-0.00183121
0.000570875
-0.0020105
0.000179284
-0.00183988
-0.000170618
-0.001477
-0.000362883
-0.000910244
-0.000566751
-0.000358429
-0.000551815
1.66308e-05
-0.00037506
0.000249829
-0.000233198
0.000351159
-0.00010133
0.000382713
-3.15542e-05
0.000383555
-8.41796e-07
0.000374038
9.5171e-06
0.000362675
1.13628e-05
0.000352927
9.74851e-06
0.000345748
7.17914e-06
0.000340982
4.76522e-06
0.00033805
2.93199e-06
0.000336346
1.70465e-06
0.0003354
9.46009e-07
0.000334897
5.02827e-07
0.000334642
2.54972e-07
0.00033452
1.21658e-07
0.000334468
5.27673e-08
0.000334449
1.88471e-08
0.000334445
3.31215e-09
0.000334448
-2.95715e-09
0.000334453
-4.75336e-09
0.000334458
-4.63049e-09
0.000334462
-3.84203e-09
0.000334464
-2.92649e-09
0.000334467
-2.11112e-09
0.000334468
-1.4755e-09
0.000334469
-1.00586e-09
0.00033447
-6.71227e-10
0.00033447
-4.30749e-10
0.00033447
-2.76242e-10
0.000334471
-1.72868e-10
0.000334471
-1.10611e-10
0.000334471
-6.99313e-11
0.000334471
-4.74316e-11
0.000334471
-7.22461e-12
0.000334471
-6.16858e-12
0.000334471
-7.47039e-12
0.000334471
-3.82342e-13
0.000334471
-1.24e-11
0.000334471
-4.03142e-12
0.000334471
-6.73361e-12
0.000334471
-9.02888e-12
0.000334471
1.34831e-11
0.000334471
1.12363e-11
0.000334471
1.07244e-11
0.000334471
1.84023e-11
0.000334471
-6.89274e-13
0.000334471
-1.28318e-11
0.000334471
-7.45791e-12
0.000334471
-1.2429e-11
0.000334471
-1.07942e-11
0.000334471
-3.3851e-12
0.000334471
-1.12214e-11
0.000334471
-1.51596e-11
0.000334471
-8.73065e-12
0.000334471
-6.45443e-12
0.000334471
-2.739e-12
0.000334471
-3.23056e-12
0.000334471
-1.17577e-12
0.000334471
-7.26644e-13
0.000334471
7.52927e-12
0.000334471
-5.52954e-12
0.000334471
1.98688e-11
0.000334471
-3.58236e-11
0.000334471
7.70764e-11
0.000334471
-1.48127e-10
0.000334471
2.81346e-10
0.000334471
-4.96934e-10
0.00033447
8.48337e-10
0.000334472
-1.40933e-09
0.00033447
2.18256e-09
0.000334473
-3.22167e-09
0.000334468
4.42356e-09
0.000334474
-5.55378e-09
0.000334468
6.17934e-09
0.000334473
-5.69837e-09
0.00033447
3.51286e-09
0.000334469
6.85925e-10
0.000334476
-6.38937e-09
0.000334464
1.19606e-08
0.000334479
-1.48405e-08
0.000334466
1.2713e-08
0.000334471
-5.36306e-09
0.000334475
-3.95485e-09
0.000334466
9.42567e-09
0.000334472
-6.77295e-09
0.000334473
-4.07337e-10
3.35007e-09
0.000584883
-0.00110431
0.00104166
-0.000655283
0.000941811
8.96477e-05
-3.78433e-05
0.00112501
-0.00154445
0.00239974
-0.00234753
0.00175306
-0.00264072
0.00086407
-0.00262721
0.000165771
-0.00225712
-0.000540713
-0.00175156
-0.000868437
-0.00100898
-0.00130933
-0.000301336
-0.00125946
0.000236048
-0.000912444
0.000597674
-0.000594824
0.000808288
-0.000311945
0.000915713
-0.000138979
0.000959879
-4.50071e-05
0.000968806
5.89258e-07
0.000961627
1.85424e-05
0.000949767
2.16081e-05
0.000938741
1.82053e-05
0.000930377
1.31292e-05
0.00092469
8.61956e-06
0.000921075
5.31946e-06
0.000918881
3.1401e-06
0.000917593
1.79035e-06
0.000916858
9.90263e-07
0.000916448
5.31362e-07
0.000916226
2.75311e-07
0.000916108
1.36272e-07
0.000916048
6.31038e-08
0.000916019
2.60042e-08
0.000916006
8.20526e-09
0.000916001
3.7713e-10
0.000916
-2.54364e-09
0.000916
-3.16495e-09
0.000916001
-2.8899e-09
0.000916002
-2.33597e-09
0.000916003
-1.7352e-09
0.000916003
-1.21823e-09
0.000916004
-8.31002e-10
0.000916004
-5.72442e-10
0.000916004
-3.70393e-10
0.000916004
-2.39709e-10
0.000916004
-1.58217e-10
0.000916004
-1.03086e-10
0.000916004
-2.12425e-11
0.000916004
-2.19557e-11
0.000916004
-9.52299e-12
0.000916004
3.75436e-12
0.000916004
-2.19363e-11
0.000916004
-1.42013e-12
0.000916005
-2.5008e-11
0.000916005
-1.5661e-11
0.000916004
3.59211e-11
0.000916004
2.56137e-11
0.000916004
2.54419e-11
0.000916004
2.31978e-11
0.000916004
-1.40917e-11
0.000916004
-1.98098e-11
0.000916004
-6.20323e-12
0.000916004
-1.86942e-11
0.000916004
-1.69532e-11
0.000916004
-8.22805e-12
0.000916005
-2.81599e-11
0.000916005
-3.52762e-11
0.000916005
-2.2444e-11
0.000916005
-1.42035e-11
0.000916005
-8.02172e-12
0.000916005
-9.05301e-12
0.000916005
-4.36782e-12
0.000916005
-5.80667e-13
0.000916005
1.33006e-11
0.000916005
-5.8863e-12
0.000916005
4.00913e-11
0.000916005
-6.12038e-11
0.000916005
1.29411e-10
0.000916005
-2.52374e-10
0.000916004
4.8661e-10
0.000916005
-8.50605e-10
0.000916004
1.4636e-09
0.000916005
-2.47178e-09
0.000916004
3.8317e-09
0.000916006
-5.74298e-09
0.000916003
7.99567e-09
0.000916007
-1.02607e-08
0.000916002
1.17954e-08
0.000916007
-1.15185e-08
0.000916003
8.29593e-09
0.000916005
-1.29093e-09
0.000916007
-8.98693e-09
0.000915999
2.01353e-08
0.000916012
-2.77456e-08
0.000915998
2.68895e-08
0.000916008
-1.53019e-08
0.000916007
-3.16322e-09
0.000915999
1.74966e-08
0.000916008
-1.55579e-08
0.000916006
7.84196e-10
7.44729e-09
0.000489584
-0.0015939
0.000876757
-0.00104246
0.000567763
0.000398641
-0.000709434
0.00240221
-0.00212305
0.00381335
-0.0025223
0.00215232
-0.00259856
0.000940326
-0.00253363
0.000100845
-0.00216231
-0.000912034
-0.00162717
-0.00140358
-0.000911701
-0.0020248
-0.000225896
-0.00194527
0.000329444
-0.00146778
0.000726463
-0.000991843
0.000995328
-0.000580809
0.00116941
-0.000313067
0.00127445
-0.000150039
0.00132997
-5.49344e-05
0.00135339
-4.87673e-06
0.00135918
1.58165e-05
0.00135714
2.02416e-05
0.00135279
1.74879e-05
0.00134857
1.28388e-05
0.00134528
8.6086e-06
0.00134297
5.44581e-06
0.00134145
3.3072e-06
0.0013405
1.94638e-06
0.00133991
1.11532e-06
0.00133957
6.2303e-07
0.00133936
3.38832e-07
0.00133925
1.78753e-07
0.00133918
9.06836e-08
0.00133915
4.35817e-08
0.00133913
1.92596e-08
0.00133912
7.21899e-09
0.00133912
1.68491e-09
0.00133911
-6.40121e-10
0.00133911
-1.40441e-09
0.00133911
-1.41312e-09
0.00133911
-1.15481e-09
0.00133911
-8.76883e-10
0.00133911
-6.65956e-10
0.00133911
-4.57512e-10
0.00133911
-3.10912e-10
0.00133911
-2.18888e-10
0.00133911
-1.41174e-10
0.00133911
-2.97474e-11
0.00133911
-4.31441e-11
0.00133911
-1.15827e-11
0.00133911
1.78439e-11
0.00133911
-1.93022e-11
0.00133911
8.73272e-12
0.00133911
-4.91754e-11
0.00133911
-3.1721e-11
0.00133911
5.37676e-11
0.00133911
3.58641e-11
0.00133911
4.85538e-11
0.00133911
4.43353e-11
0.00133911
-2.023e-11
0.00133911
-2.28394e-11
0.00133911
-8.40285e-12
0.00133911
-3.06297e-11
0.00133911
-2.18368e-11
0.00133911
-1.05048e-11
0.00133911
-4.64564e-11
0.00133911
-5.71576e-11
0.00133911
-4.07825e-11
0.00133911
-2.45979e-11
0.00133911
-1.38666e-11
0.00133911
-1.92868e-11
0.00133911
-1.41969e-11
0.00133911
-2.2622e-12
0.00133911
1.55461e-11
0.00133911
-3.26791e-12
0.00133911
5.93303e-11
0.00133911
-6.55931e-11
0.00133911
1.48198e-10
0.00133911
-2.98326e-10
0.00133911
5.69079e-10
0.00133911
-9.76543e-10
0.00133911
1.70693e-09
0.00133911
-2.89529e-09
0.00133911
4.46479e-09
0.00133911
-6.76926e-09
0.00133911
9.45782e-09
0.00133911
-1.22888e-08
0.00133911
1.43579e-08
0.00133911
-1.44281e-08
0.00133911
1.11593e-08
0.00133911
-3.30452e-09
0.00133911
-8.86564e-09
0.00133911
2.30211e-08
0.00133912
-3.40624e-08
0.00133911
3.54027e-08
0.00133912
-2.25795e-08
0.00133911
-1.47223e-09
0.00133911
2.25124e-08
0.00133911
-2.18067e-08
0.00133911
1.82163e-09
1.04224e-08
0.000329011
-0.00192291
0.000534225
-0.00124767
9.99274e-05
0.000832939
-0.00120291
0.00370505
-0.00228287
0.00489331
-0.00241407
0.00228352
-0.00240446
0.000930711
-0.00230236
-1.25414e-06
-0.00199058
-0.00122381
-0.00144147
-0.00195269
-0.000757861
-0.0027084
-0.000113172
-0.00258996
0.000411879
-0.00199283
0.000786591
-0.00136655
0.00105781
-0.000852025
0.00125612
-0.000511384
0.00139788
-0.000291796
0.00149227
-0.000149322
0.0015493
-6.19102e-05
0.00158012
-1.50051e-05
0.00159482
5.5454e-06
0.00160069
1.16172e-05
0.00160229
1.12388e-05
0.00160211
8.79001e-06
0.00160137
6.18886e-06
0.00160059
4.08795e-06
0.00159995
2.58348e-06
0.00159949
1.57829e-06
0.00159917
9.37067e-07
0.00159897
5.42105e-07
0.00159884
3.05877e-07
0.00159876
1.68044e-07
0.00159872
8.95779e-08
0.00159869
4.60585e-08
0.00159868
2.2527e-08
0.00159867
1.02588e-08
0.00159866
4.02971e-09
0.00159866
1.06974e-09
0.00159866
-1.22893e-10
0.00159866
-4.99042e-10
0.00159866
-5.55775e-10
0.00159866
-5.27892e-10
0.00159866
-4.06881e-10
0.00159866
-3.04825e-10
0.00159866
-2.40543e-10
0.00159866
-1.56976e-10
0.00159866
-2.48137e-11
0.00159866
-6.44585e-11
0.00159866
-2.41239e-11
0.00159866
3.56026e-11
0.00159866
-2.25236e-12
0.00159866
3.4228e-11
0.00159866
-6.54518e-11
0.00159866
-5.88509e-11
0.00159866
6.24583e-11
0.00159866
3.63053e-11
0.00159866
6.39084e-11
0.00159866
8.01342e-11
0.00159866
-9.82352e-12
0.00159866
-1.73554e-11
0.00159866
-8.09424e-12
0.00159866
-4.77764e-11
0.00159866
-2.92482e-11
0.00159866
-6.70324e-12
0.00159866
-6.08362e-11
0.00159866
-7.97959e-11
0.00159866
-6.29709e-11
0.00159866
-3.84841e-11
0.00159866
-1.76089e-11
0.00159866
-2.84025e-11
0.00159866
-3.12172e-11
0.00159866
-9.91646e-12
0.00159866
1.33617e-11
0.00159866
-3.30062e-12
0.00159866
7.90847e-11
0.00159866
-5.07387e-11
0.00159866
1.50266e-10
0.00159866
-3.12501e-10
0.00159866
5.69396e-10
0.00159866
-9.65779e-10
0.00159866
1.73381e-09
0.00159866
-2.91675e-09
0.00159866
4.48284e-09
0.00159866
-6.87676e-09
0.00159866
9.59649e-09
0.00159866
-1.26168e-08
0.00159866
1.49012e-08
0.00159866
-1.5288e-08
0.00159866
1.24081e-08
0.00159866
-4.7354e-09
0.00159866
-7.70097e-09
0.00159866
2.29721e-08
0.00159866
-3.58736e-08
0.00159866
3.90044e-08
0.00159866
-2.63318e-08
0.00159866
-2.13576e-10
0.00159866
2.47187e-08
0.00159866
-2.47711e-08
0.00159866
2.39003e-09
1.1933e-08
0.000138312
-0.00206122
0.000182147
-0.00129151
-0.000387131
0.00140222
-0.00150596
0.00482388
-0.00220502
0.00559238
-0.00219429
0.00227279
-0.00218199
0.000918405
-0.00203384
-0.000149399
-0.00177568
-0.00148197
-0.00122785
-0.00250052
-0.000556382
-0.00337987
6.82366e-05
-0.00321458
0.000543533
-0.00246813
0.000869612
-0.00169263
0.00110955
-0.00109196
0.0012967
-0.000698543
0.00144325
-0.000438344
0.00155224
-0.000258313
0.00162753
-0.000137199
0.00167569
-6.31674e-05
0.00170439
-2.31541e-05
0.0017204
-4.38391e-06
0.00172874
2.89753e-06
0.00173275
4.77243e-06
0.00173449
4.45535e-06
0.0017351
3.47428e-06
0.00173522
2.46659e-06
0.00173515
1.6482e-06
0.00173503
1.05326e-06
0.00173492
6.49374e-07
0.00173484
3.88379e-07
0.00173478
2.25887e-07
0.00173475
1.27852e-07
0.00173472
7.03764e-08
0.00173471
3.75137e-08
0.0017347
1.92747e-08
0.00173469
9.29655e-09
0.00173469
4.07321e-09
0.00173469
1.57808e-09
0.00173469
4.43717e-10
0.00173469
-3.97908e-11
0.00173469
-2.51641e-10
0.00173469
-2.63614e-10
0.00173469
-2.40186e-10
0.00173469
-2.31926e-10
0.00173469
-1.5828e-10
0.00173469
-7.97837e-12
0.00173469
-8.03287e-11
0.00173469
-4.81156e-11
0.00173469
4.88405e-11
0.00173469
2.17519e-11
0.00173469
7.17752e-11
0.00173469
-6.64753e-11
0.00173469
-9.05473e-11
0.00173469
6.52038e-11
0.00173469
3.19372e-11
0.00173469
6.33134e-11
0.00173469
1.17594e-10
0.00173469
1.43426e-11
0.00173469
-2.82438e-12
0.00173469
1.03416e-13
0.00173469
-6.53572e-11
0.00173469
-4.19559e-11
0.00173469
2.05278e-12
0.00173469
-6.80406e-11
0.00173469
-1.02127e-10
0.00173469
-8.79945e-11
0.00173469
-5.61686e-11
0.00173469
-2.02312e-11
0.00173469
-3.2712e-11
0.00173469
-5.10252e-11
0.00173469
-2.42274e-11
0.00173469
6.15673e-12
0.00173469
-9.46822e-12
0.00173469
9.85221e-11
0.00173469
-2.12112e-11
0.00173469
1.49078e-10
0.00173469
-3.14606e-10
0.00173469
5.27286e-10
0.00173469
-8.98529e-10
0.00173469
1.66951e-09
0.00173469
-2.74998e-09
0.00173469
4.23365e-09
0.00173469
-6.56268e-09
0.00173469
9.10641e-09
0.00173469
-1.21097e-08
0.00173469
1.4366e-08
0.00173469
-1.49218e-08
0.00173469
1.24456e-08
0.00173469
-5.27434e-09
0.00173469
-6.66112e-09
0.00173469
2.18208e-08
0.00173469
-3.5115e-08
0.00173469
3.9036e-08
0.00173469
-2.69166e-08
0.00173469
1.57587e-10
0.00173469
2.49257e-08
0.00173469
-2.51021e-08
0.00173469
2.52492e-09
1.231e-08
-3.01067e-05
-0.00203111
-0.000131043
-0.00119057
-0.000714662
0.00198584
-0.00164759
0.0057568
-0.00202189
0.00596668
-0.00193901
0.00218991
-0.001937
0.000916389
-0.00175572
-0.000330681
-0.00152878
-0.00170891
-0.00100538
-0.00302392
-0.00034728
-0.00403797
0.000279813
-0.00384167
0.000713592
-0.00290191
0.000985076
-0.00196412
0.00118049
-0.00128738
0.00134094
-0.00085899
0.00147478
-0.000572186
0.00158056
-0.00036409
0.00165859
-0.000215224
0.00171246
-0.000117044
0.00174758
-5.82702e-05
0.00176933
-2.61319e-05
0.00178216
-9.9358e-06
0.00178937
-2.44035e-06
0.00179322
6.10212e-07
0.00179515
1.54434e-06
0.00179605
1.5673e-06
0.00179642
1.27068e-06
0.00179656
9.21542e-07
0.00179658
6.22823e-07
0.00179657
4.00229e-07
0.00179655
2.47196e-07
0.00179653
1.47634e-07
0.00179651
8.55424e-08
0.0017965
4.81022e-08
0.0017965
2.62734e-08
0.00179649
1.36974e-08
0.00179649
6.73997e-09
0.00179649
3.18206e-09
0.00179649
1.38038e-09
0.00179649
4.96086e-10
0.00179649
5.52432e-11
0.00179649
-8.91507e-11
0.00179649
-1.47687e-10
0.00179649
-2.07285e-10
0.00179649
-1.54042e-10
0.00179649
1.49719e-11
0.00179649
-8.98954e-11
0.00179649
-7.79665e-11
0.00179649
5.63043e-11
0.00179649
4.54774e-11
0.00179649
1.12374e-10
0.00179649
-5.49569e-11
0.00179649
-1.20388e-10
0.00179649
6.7696e-11
0.00179649
3.08013e-11
0.00179649
4.97932e-11
0.00179649
1.46572e-10
0.00179649
4.31891e-11
0.00179649
1.67867e-11
0.00179649
1.66044e-11
0.00179649
-7.89416e-11
0.00179649
-5.8833e-11
0.00179649
1.3205e-11
0.00179649
-6.83172e-11
0.00179649
-1.23758e-10
0.00179649
-1.15008e-10
0.00179649
-7.64175e-11
0.00179649
-2.30604e-11
0.00179649
-3.22143e-11
0.00179649
-6.93485e-11
0.00179649
-4.29851e-11
0.00179649
-5.68679e-12
0.00179649
-2.18354e-11
0.00179649
1.16989e-10
0.00179649
1.8044e-11
0.00179649
1.49982e-10
0.00179649
-3.14856e-10
0.00179649
4.68069e-10
0.00179649
-8.17751e-10
0.00179649
1.57943e-09
0.00179649
-2.51952e-09
0.00179649
3.9085e-09
0.00179649
-6.1063e-09
0.00179649
8.39149e-09
0.00179649
-1.12833e-08
0.00179649
1.33575e-08
0.00179649
-1.39329e-08
0.00179649
1.1735e-08
0.00179649
-5.07795e-09
0.00179649
-6.05625e-09
0.00179649
2.0409e-08
0.00179649
-3.308e-08
0.00179649
3.69475e-08
0.00179649
-2.54508e-08
0.00179649
-1.24771e-10
0.00179649
2.39469e-08
0.00179649
-2.38634e-08
0.00179649
2.40437e-09
1.20073e-08
-0.000144007
-0.00188711
-0.000393789
-0.000940787
-0.00092033
0.00251238
-0.00166984
0.0065063
-0.0018112
0.00610805
-0.0016966
0.00207531
-0.00165239
0.000872186
-0.0014286
-0.00055448
-0.00120862
-0.00192889
-0.000726456
-0.00350609
-0.000105281
-0.00465914
0.00049618
-0.00444313
0.000903609
-0.00330934
0.00112594
-0.00218644
0.00127094
-0.00143238
0.00139676
-0.000984814
0.00151064
-0.000686067
0.00160549
-0.000458939
0.00167797
-0.000287706
0.00172978
-0.000168849
0.00176498
-9.34679e-05
0.00178791
-4.9063e-05
0.00180226
-2.42893e-05
0.00181088
-1.1062e-05
0.00181584
-4.34462e-06
0.00181855
-1.1722e-06
0.00181997
1.51117e-07
0.00182067
5.72246e-07
0.00182099
5.99029e-07
0.00182113
4.86538e-07
0.00182118
3.50568e-07
0.00182119
2.34722e-07
0.00182119
1.49176e-07
0.00182118
9.10031e-08
0.00182118
5.35988e-08
0.00182117
3.0651e-08
0.00182117
1.67797e-08
0.00182117
8.75515e-09
0.00182117
4.47836e-09
0.00182116
2.17724e-09
0.00182116
9.65112e-10
0.00182116
3.33292e-10
0.00182116
7.73215e-11
0.00182116
-4.92818e-11
0.00182116
-1.77115e-10
0.00182116
-1.49543e-10
0.00182116
3.93549e-11
0.00182116
-9.52123e-11
0.00182116
-1.07797e-10
0.00182116
6.09967e-11
0.00182116
6.54833e-11
0.00182116
1.48325e-10
0.00182116
-3.7501e-11
0.00182116
-1.44817e-10
0.00182116
7.45224e-11
0.00182116
3.81703e-11
0.00182116
2.99576e-11
0.00182116
1.63078e-10
0.00182116
6.88196e-11
0.00182116
3.70639e-11
0.00182116
3.88679e-11
0.00182116
-8.68338e-11
0.00182116
-7.70335e-11
0.00182116
2.50686e-11
0.00182116
-6.37211e-11
0.00182116
-1.44881e-10
0.00182116
-1.43581e-10
0.00182116
-9.78469e-11
0.00182116
-2.64291e-11
0.00182116
-2.81006e-11
0.00182116
-8.39774e-11
0.00182116
-6.40656e-11
0.00182116
-2.15116e-11
0.00182116
-3.81324e-11
0.00182116
1.35026e-10
0.00182116
6.29746e-11
0.00182116
1.52804e-10
0.00182116
-3.1696e-10
0.00182116
4.03596e-10
0.00182116
-7.38487e-10
0.00182116
1.48683e-09
0.00182116
-2.27667e-09
0.00182116
3.5795e-09
0.00182116
-5.62127e-09
0.00182116
7.62563e-09
0.00182116
-1.03732e-08
0.00182116
1.21906e-08
0.00182116
-1.26943e-08
0.00182116
1.06717e-08
0.00182116
-4.48259e-09
0.00182116
-5.75189e-09
0.00182116
1.89755e-08
0.00182116
-3.05084e-08
0.00182117
3.38769e-08
0.00182116
-2.30274e-08
0.00182116
-6.71973e-10
0.00182117
2.23715e-08
0.00182116
-2.19148e-08
0.00182116
2.18471e-09
1.13687e-08
-0.000239602
-0.00164751
-0.000590311
-0.000590077
-0.00104254
0.00296461
-0.00160519
0.00706895
-0.00159912
0.00610199
-0.00145846
0.00193464
-0.00131777
0.000731499
-0.00104521
-0.000827039
-0.000818684
-0.00215541
-0.000363062
-0.00396171
0.000190466
-0.00521267
0.000734024
-0.00498669
0.00110286
-0.00367817
0.00128218
-0.00236577
0.00137754
-0.00152775
0.00146375
-0.00107102
0.00155282
-0.000775131
0.00163321
-0.000539333
0.0016969
-0.000351394
0.00174318
-0.00021513
0.0017751
-0.000125388
0.00179636
-7.03228e-05
0.00181008
-3.80132e-05
0.00181864
-1.96216e-05
0.00182378
-9.47712e-06
0.00182672
-4.11971e-06
0.00182834
-1.46636e-06
0.00182919
-2.74494e-07
0.00182961
1.77351e-07
0.00182981
2.88031e-07
0.0018299
2.63559e-07
0.00182993
2.00525e-07
0.00182994
1.38375e-07
0.00182994
8.95756e-08
0.00182994
5.53042e-08
0.00182994
3.29736e-08
0.00182994
1.87684e-08
0.00182993
1.01962e-08
0.00182993
5.48161e-09
0.00182993
2.82746e-09
0.00182993
1.3546e-09
0.00182993
5.68082e-10
0.00182993
2.22944e-10
0.00182993
4.56084e-11
0.00182993
-1.46451e-10
0.00182993
-1.46786e-10
0.00182993
6.28916e-11
0.00182993
-9.83542e-11
0.00182993
-1.33911e-10
0.00182993
6.58675e-11
0.00182993
8.07667e-11
0.00182993
1.75569e-10
0.00182993
-1.92983e-11
0.00182993
-1.62225e-10
0.00182993
8.8177e-11
0.00182993
5.56602e-11
0.00182993
8.56313e-12
0.00182993
1.66671e-10
0.00182993
8.70468e-11
0.00182993
5.55668e-11
0.00182993
6.42464e-11
0.00182993
-8.93608e-11
0.00182993
-9.42188e-11
0.00182993
3.69096e-11
0.00182993
-5.63941e-11
0.00182993
-1.65695e-10
0.00182993
-1.73412e-10
0.00182993
-1.19832e-10
0.00182993
-3.0139e-11
0.00182993
-2.09214e-11
0.00182993
-9.41381e-11
0.00182993
-8.68103e-11
0.00182993
-4.10018e-11
0.00182993
-5.52962e-11
0.00182993
1.53869e-10
0.00182993
1.10363e-10
0.00182993
1.55647e-10
0.00182993
-3.21369e-10
0.00182993
3.3826e-10
0.00182993
-6.64143e-10
0.00182993
1.39698e-09
0.00182993
-2.03609e-09
0.00182993
3.26422e-09
0.00182993
-5.14316e-09
0.00182993
6.86748e-09
0.00182993
-9.46625e-09
0.00182993
1.10049e-08
0.00182993
-1.1402e-08
0.00182993
9.50902e-09
0.00182993
-3.75822e-09
0.00182993
-5.55634e-09
0.00182993
1.75483e-08
0.00182993
-2.77774e-08
0.00182993
3.0511e-08
0.00182993
-2.0345e-08
0.00182993
-1.22483e-09
0.00182993
2.05479e-08
0.00182993
-1.97563e-08
0.00182993
1.94997e-09
1.05888e-08
-0.000313478
-0.00133403
-0.000713817
-0.000189738
-0.00108116
0.00333195
-0.00146474
0.00745254
-0.00136224
0.00599948
-0.00119149
0.0017639
-0.000943433
0.000483437
-0.00062925
-0.00114122
-0.000393594
-0.00239107
5.67079e-05
-0.00441201
0.000539383
-0.00569535
0.00100992
-0.00545722
0.00131572
-0.00398398
0.00144683
-0.00249687
0.00149501
-0.00157592
0.0015402
-0.00111621
0.00160085
-0.000835779
0.00166404
-0.000602526
0.00171728
-0.000404635
0.00175673
-0.000254583
0.00178405
-0.000152706
0.00180234
-8.86132e-05
0.00181431
-4.99843e-05
0.00182195
-2.7259e-05
0.00182666
-1.41896e-05
0.00182946
-6.91368e-06
0.00183104
-3.05209e-06
0.0018319
-1.13462e-06
0.00183235
-2.67984e-07
0.00183257
6.85067e-08
0.00183267
1.6128e-07
0.00183272
1.56268e-07
0.00183273
1.21317e-07
0.00183274
8.4401e-08
0.00183274
5.48217e-08
0.00183274
3.40432e-08
0.00183274
2.00566e-08
0.00183274
1.12534e-08
0.00183273
6.28011e-09
0.00183273
3.36961e-09
0.00183273
1.68094e-09
0.00183273
7.65957e-10
0.00183273
3.48497e-10
0.00183273
1.35392e-10
0.00183273
-1.17176e-10
0.00183273
-1.46373e-10
0.00183273
8.49644e-11
0.00183273
-1.00361e-10
0.00183273
-1.54771e-10
0.00183273
7.20332e-11
0.00183273
9.11668e-11
0.00183273
1.93133e-10
0.00183273
-2.65949e-12
0.00183273
-1.71864e-10
0.00183273
1.09359e-10
0.00183273
8.24363e-11
0.00183273
-1.2553e-11
0.00183273
1.5802e-10
0.00183273
9.68198e-11
0.00183273
7.19398e-11
0.00183273
9.10836e-11
0.00183273
-8.76529e-11
0.00183273
-1.09224e-10
0.00183273
4.83978e-11
0.00183273
-4.78467e-11
0.00183273
-1.86099e-10
0.00183273
-2.04132e-10
0.00183273
-1.42491e-10
0.00183273
-3.39702e-11
0.00183273
-1.03214e-11
0.00183273
-9.96216e-11
0.00183273
-1.11805e-10
0.00183273
-6.41941e-11
0.00183273
-7.04292e-11
0.00183273
1.74685e-10
0.00183273
1.5755e-10
0.00183273
1.56945e-10
0.00183273
-3.27143e-10
0.00183273
2.73217e-10
0.00183273
-5.95485e-10
0.00183273
1.31024e-09
0.00183273
-1.79919e-09
0.00183273
2.96346e-09
0.00183273
-4.68113e-09
0.00183273
6.13268e-09
0.00183273
-8.58797e-09
0.00183273
9.85331e-09
0.00183273
-1.01436e-08
0.00183273
8.37365e-09
0.00183273
-3.05048e-09
0.00183273
-5.35358e-09
0.00183273
1.61174e-08
0.00183273
-2.5057e-08
0.00183273
2.71803e-08
0.00183273
-1.77367e-08
0.00183273
-1.67231e-09
0.00183273
1.86517e-08
0.00183273
-1.7616e-08
0.00183273
1.7314e-09
9.75739e-09
-0.000355477
-0.000978552
-0.000762575
0.00021736
-0.00104177
0.00361114
-0.00125664
0.00766741
-0.00107501
0.00581785
-0.000870194
0.00155908
-0.000543337
0.000156579
-0.000198157
-0.0014864
4.83749e-05
-0.0026376
0.000424726
-0.00478836
0.000915245
-0.00618586
0.00131965
-0.00586163
0.00154754
-0.00421187
0.00161859
-0.00256792
0.00161889
-0.00157622
0.00162351
-0.00112083
0.00165387
-0.00086614
0.00169759
-0.000646246
0.00173898
-0.000446026
0.0017709
-0.000286507
0.00179315
-0.000174958
0.00180802
-0.000103481
0.00181779
-5.97527e-05
0.00182411
-3.35798e-05
0.0018281
-1.81784e-05
0.00183053
-9.34301e-06
0.00183195
-4.47066e-06
0.00183274
-1.92628e-06
0.00183316
-6.89676e-07
0.00183337
-1.45556e-07
0.00183348
5.82199e-08
0.00183352
1.09757e-07
0.00183354
1.02155e-07
0.00183355
7.76694e-08
0.00183355
5.32975e-08
0.00183355
3.44518e-08
0.00183355
2.09446e-08
0.00183355
1.20788e-08
0.00183355
6.94892e-09
0.00183355
3.83889e-09
0.00183355
1.9613e-09
0.00183355
9.36608e-10
0.00183355
4.58541e-10
0.00183355
2.20891e-10
0.00183355
-9.02436e-11
0.00183355
-1.48682e-10
0.00183355
1.05756e-10
0.00183355
-1.01469e-10
0.00183355
-1.70357e-10
0.00183355
7.89349e-11
0.00183355
9.68291e-11
0.00183355
2.0201e-10
0.00183355
1.21716e-11
0.00183355
-1.73475e-10
0.00183355
1.37524e-10
0.00183355
1.16428e-10
0.00183355
-3.34875e-11
0.00183355
1.38007e-10
0.00183355
9.9012e-11
0.00183355
8.71178e-11
0.00183355
1.18517e-10
0.00183355
-8.2999e-11
0.00183355
-1.21834e-10
0.00183355
5.92888e-11
0.00183355
-3.8894e-11
0.00183355
-2.05751e-10
0.00183355
-2.35357e-10
0.00183355
-1.66258e-10
0.00183355
-3.77607e-11
0.00183355
4.45745e-12
0.00183355
-1.00448e-10
0.00183355
-1.40063e-10
0.00183355
-9.11866e-11
0.00183355
-8.12729e-11
0.00183355
1.98161e-10
0.00183355
2.02432e-10
0.00183355
1.55982e-10
0.00183355
-3.33011e-10
0.00183355
2.08315e-10
0.00183355
-5.33155e-10
0.00183355
1.22647e-09
0.00183355
-1.56418e-09
0.00183355
2.6751e-09
0.00183355
-4.23743e-09
0.00183355
5.42398e-09
0.00183355
-7.74223e-09
0.00183355
8.75098e-09
0.00183355
-8.95088e-09
0.00183355
7.31549e-09
0.00183355
-2.41667e-09
0.00183355
-5.09723e-09
0.00183355
1.46762e-08
0.00183354
-2.24115e-08
0.00183355
2.40107e-08
0.00183354
-1.53231e-08
0.00183355
-1.98501e-09
0.00183355
1.67585e-08
0.00183355
-1.55771e-08
0.00183355
1.53624e-09
8.91e-09
-0.000362802
-0.000615749
-0.000747108
0.000601665
-0.000936011
0.00380004
-0.00098645
0.00771785
-0.000725299
0.0055567
-0.000491602
0.00132539
-0.00013492
-0.000200103
0.000226727
-0.00184805
0.000451441
-0.00286232
0.000823595
-0.00516052
0.00130352
-0.00666579
0.00165141
-0.00620953
0.00179792
-0.00435837
0.00179808
-0.00256808
0.00174667
-0.00152481
0.00171105
-0.0010852
0.00171062
-0.000865715
0.00173338
-0.00066901
0.00176168
-0.00047432
0.00178545
-0.00031028
0.00180241
-0.000191912
0.00181374
-0.000114811
0.00182118
-6.71992e-05
0.00182605
-3.84523e-05
0.0018292
-2.13214e-05
0.00183117
-1.13116e-05
0.00183235
-5.65483e-06
0.00183303
-2.60655e-06
0.0018334
-1.06201e-06
0.0018336
-3.39453e-07
0.00183369
-3.74819e-08
0.00183374
6.53992e-08
0.00183376
8.32408e-08
0.00183376
7.06194e-08
0.00183376
5.13806e-08
0.00183376
3.45359e-08
0.00183376
2.16033e-08
0.00183376
1.27588e-08
0.00183376
7.53076e-09
0.00183376
4.25513e-09
0.00183376
2.20568e-09
0.00183376
1.08708e-09
0.00183376
5.57116e-10
0.00183376
3.02934e-10
0.00183376
-6.68113e-11
0.00183376
-1.54169e-10
0.00183376
1.25801e-10
0.00183376
-1.01638e-10
0.00183376
-1.81591e-10
0.00183376
8.50718e-11
0.00183376
9.82874e-11
0.00183376
2.04324e-10
0.00183376
2.57937e-11
0.00183376
-1.67306e-10
0.00183376
1.71306e-10
0.00183376
1.55035e-10
0.00183376
-5.51085e-11
0.00183376
1.07697e-10
0.00183376
9.55389e-11
0.00183376
1.02557e-10
0.00183376
1.4597e-10
0.00183376
-7.66681e-11
0.00183376
-1.32396e-10
0.00183376
6.93395e-11
0.00183376
-2.97705e-11
0.00183376
-2.24256e-10
0.00183376
-2.66851e-10
0.00183376
-1.91426e-10
0.00183376
-4.12281e-11
0.00183376
2.39406e-11
0.00183376
-9.68952e-11
0.00183376
-1.72232e-10
0.00183376
-1.21837e-10
0.00183376
-8.65236e-11
0.00183376
2.24403e-10
0.00183376
2.43691e-10
0.00183376
1.52759e-10
0.00183376
-3.38127e-10
0.00183376
1.42869e-10
0.00183376
-4.77491e-10
0.00183376
1.14582e-09
0.00183376
-1.32957e-09
0.00183376
2.39723e-09
0.00183376
-3.81208e-09
0.00183376
4.7407e-09
0.00183376
-6.92693e-09
0.00183376
7.69878e-09
0.00183376
-7.83029e-09
0.00183376
6.34727e-09
0.00183376
-1.87049e-09
0.00183376
-4.7773e-09
0.00183376
1.32234e-08
0.00183376
-1.9858e-08
0.00183376
2.10337e-08
0.00183376
-1.31296e-08
0.00183376
-2.16574e-09
0.00183376
1.48968e-08
0.00183376
-1.36606e-08
0.00183376
1.36388e-09
8.05933e-09
-0.000335586
-0.000280163
-0.000668091
0.00093417
-0.000767829
0.00389978
-0.000662226
0.00761224
-0.000318701
0.00521317
-5.91173e-05
0.0010658
0.000310697
-0.000569916
0.00062319
-0.00216054
0.000849413
-0.00308854
0.00123451
-0.00554562
0.00169899
-0.00713027
0.0019928
-0.00650333
0.00206106
-0.00442664
0.0019851
-0.00249212
0.00187737
-0.00141708
0.00180086
-0.00100869
0.00176973
-0.00083459
0.00177085
-0.000670129
0.00178513
-0.0004886
0.00180018
-0.000325327
0.00181163
-0.000203368
0.00181941
-0.000122585
0.00182455
-7.23408e-05
0.00182797
-4.18727e-05
0.00183024
-2.35941e-05
0.00183172
-1.27885e-05
0.00183264
-6.57752e-06
0.00183319
-3.15567e-06
0.0018335
-1.37219e-06
0.00183367
-5.05534e-07
0.00183375
-1.21497e-07
0.00183379
2.55534e-08
0.00183381
6.58266e-08
0.00183381
6.39036e-08
0.00183382
4.94082e-08
0.00183382
3.44681e-08
0.00183382
2.2118e-08
0.00183382
1.33344e-08
0.00183382
8.0449e-09
0.00183381
4.62677e-09
0.00183381
2.41837e-09
0.00183381
1.22161e-09
0.00183381
6.46851e-10
0.00183381
3.81731e-10
0.00183381
-4.83445e-11
0.00183381
-1.63263e-10
0.00183381
1.45831e-10
0.00183381
-1.00973e-10
0.00183381
-1.89846e-10
0.00183381
8.86438e-11
0.00183381
9.65913e-11
0.00183381
2.02788e-10
0.00183381
3.87237e-11
0.00183381
-1.5414e-10
0.00183381
2.08734e-10
0.00183381
1.9543e-10
0.00183381
-7.82011e-11
0.00183381
6.85122e-11
0.00183381
8.88387e-11
0.00183381
1.19735e-10
0.00183381
1.72696e-10
0.00183381
-6.98465e-11
0.00183381
-1.41501e-10
0.00183381
7.8235e-11
0.00183381
-2.02226e-11
0.00183381
-2.41302e-10
0.00183381
-2.98689e-10
0.00183381
-2.17748e-10
0.00183381
-4.37475e-11
0.00183381
4.78478e-11
0.00183381
-8.96211e-11
0.00183381
-2.07927e-10
0.00183381
-1.5556e-10
0.00183381
-8.61093e-11
0.00183381
2.52961e-10
0.00183381
2.80984e-10
0.00183381
1.47643e-10
0.00183381
-3.42519e-10
0.00183381
7.61828e-11
0.00183381
-4.27874e-10
0.00183381
1.06844e-09
0.00183381
-1.09539e-09
0.00183381
2.12848e-09
0.00183381
-3.40332e-09
0.00183381
4.08101e-09
0.00183381
-6.13934e-09
0.00183381
6.69353e-09
0.00183381
-6.77777e-09
0.00183381
5.46592e-09
0.00183381
-1.40934e-09
0.00183381
-4.39726e-09
0.00183382
1.17609e-08
0.00183381
-1.73952e-08
0.00183382
1.82437e-08
0.00183381
-1.11458e-08
0.00183381
-2.22669e-09
0.00183382
1.30754e-08
0.00183381
-1.18653e-08
0.00183381
1.2119e-09
7.20973e-09
-0.000289692
9.52846e-06
-0.000540904
0.00118538
-0.000562235
0.00392111
-0.000326894
0.0073769
9.45377e-05
0.00479174
0.000313252
0.000847089
0.000754668
-0.00101133
0.000998899
-0.00240477
0.00123339
-0.00332303
0.00164936
-0.00596159
0.00209715
-0.00757805
0.00233452
-0.00674071
0.00232841
-0.00442052
0.0021772
-0.00234091
0.00201035
-0.00125022
0.00189174
-0.000890082
0.00183
-0.00077285
0.00180932
-0.000649451
0.00180906
-0.00048834
0.00181493
-0.000331197
0.0018207
-0.000209138
0.00182492
-0.000126805
0.00182781
-7.52394e-05
0.00182984
-4.38939e-05
0.00183126
-2.50224e-05
0.00183226
-1.37793e-05
0.00183291
-7.23468e-06
0.00183332
-3.56738e-06
0.00183357
-1.61484e-06
0.0018337
-6.40095e-07
0.00183377
-1.91565e-07
0.00183381
-8.49876e-09
0.00183382
5.0604e-08
0.00183383
5.78797e-08
0.00183383
4.75625e-08
0.00183383
3.43399e-08
0.00183383
2.25323e-08
0.00183383
1.38244e-08
0.00183383
8.49865e-09
0.00183383
4.95675e-09
0.00183383
2.60095e-09
0.00183383
1.34289e-09
0.00183383
7.28857e-10
0.00183383
4.5693e-10
0.00183383
-3.64364e-11
0.00183383
-1.76034e-10
0.00183383
1.66634e-10
0.00183383
-1.00037e-10
0.00183383
-1.96317e-10
0.00183383
8.79869e-11
0.00183383
9.32341e-11
0.00183383
2.00246e-10
0.00183383
5.07826e-11
0.00183383
-1.35138e-10
0.00183383
2.47185e-10
0.00183383
2.34574e-10
0.00183383
-1.02711e-10
0.00183383
2.23942e-11
0.00183383
8.15619e-11
0.00183383
1.39755e-10
0.00183383
1.9732e-10
0.00183383
-6.34447e-11
0.00183383
-1.49669e-10
0.00183383
8.53294e-11
0.00183383
-9.59048e-12
0.00183383
-2.5664e-10
0.00183383
-3.31283e-10
0.00183383
-2.44005e-10
0.00183383
-4.42107e-11
0.00183383
7.45102e-11
0.00183383
-7.9679e-11
0.00183383
-2.45098e-10
0.00183383
-1.91222e-10
0.00183383
-8.13545e-11
0.00183383
2.82879e-10
0.00183383
3.14717e-10
0.00183383
1.40853e-10
0.00183383
-3.46935e-10
0.00183383
8.31252e-12
0.00183383
-3.8257e-10
0.00183383
9.93765e-10
0.00183383
-8.63644e-10
0.00183383
1.86785e-09
0.00183383
-3.00746e-09
0.00183383
3.44249e-09
0.00183383
-5.37731e-09
0.00183383
5.73217e-09
0.00183383
-5.78475e-09
0.00183383
4.66142e-09
0.00183383
-1.02666e-09
0.00183383
-3.9634e-09
0.00183383
1.02918e-08
0.00183382
-1.50168e-08
0.00183383
1.5622e-08
0.00183383
-9.34981e-09
0.00183383
-2.18164e-09
0.00183383
1.12954e-08
0.00183383
-1.01815e-08
0.00183383
1.07771e-09
6.36228e-09
-0.000224249
0.000233778
-0.000373148
0.00133428
-0.000321548
0.00386951
-2.1222e-05
0.00707658
0.000459341
0.00431118
0.00070729
0.00059914
0.0011706
-0.00147464
0.00134822
-0.0025824
0.0015999
-0.00357471
0.00206117
-0.00642286
0.00249166
-0.00800854
0.00266828
-0.00691733
0.0025907
-0.00434295
0.00236971
-0.00211992
0.00214446
-0.00102497
0.00198297
-0.000728595
0.00189056
-0.000680438
0.00184817
-0.000607058
0.00183317
-0.000473345
0.00182959
-0.000327612
0.00182952
-0.000209077
0.00183019
-0.000127471
0.00183092
-7.59657e-05
0.00183161
-4.45891e-05
0.00183225
-2.56555e-05
0.00183278
-1.4309e-05
0.00183318
-7.6359e-06
0.00183345
-3.84358e-06
0.00183363
-1.78916e-06
0.00183373
-7.41818e-07
0.00183378
-2.46621e-07
0.00183381
-3.60697e-08
0.00183382
3.79717e-08
0.00183383
5.2762e-08
0.00183383
4.59543e-08
0.00183383
3.42065e-08
0.00183383
2.28722e-08
0.00183383
1.42387e-08
0.00183383
8.89411e-09
0.00183383
5.24582e-09
0.00183383
2.75435e-09
0.00183383
1.45329e-09
0.00183383
8.02206e-10
0.00183383
5.27524e-10
0.00183383
-3.23057e-11
0.00183383
-1.9175e-10
0.00183383
1.88769e-10
0.00183383
-1.0021e-10
0.00183383
-2.00988e-10
0.00183383
8.18823e-11
0.00183383
8.97888e-11
0.00183383
1.99084e-10
0.00183383
6.06299e-11
0.00183383
-1.11444e-10
0.00183383
2.82991e-10
0.00183383
2.69024e-10
0.00183383
-1.26766e-10
0.00183383
-2.79869e-11
0.00183383
7.63136e-11
0.00183383
1.62851e-10
0.00183383
2.17143e-10
0.00183383
-5.76276e-11
0.00183383
-1.56883e-10
0.00183383
8.90243e-11
0.00183383
3.00888e-12
0.00183383
-2.69791e-10
0.00183383
-3.65151e-10
0.00183383
-2.67469e-10
0.00183383
-4.10582e-11
0.00183383
1.00157e-10
0.00183383
-6.83027e-11
0.00183383
-2.79326e-10
0.00183383
-2.27098e-10
0.00183383
-7.48624e-11
0.00183383
3.1269e-10
0.00183383
3.44932e-10
0.00183383
1.31685e-10
0.00183383
-3.51701e-10
0.00183383
-5.85956e-11
0.00183383
-3.39394e-10
0.00183383
9.19299e-10
0.00183383
-6.38119e-10
0.00183383
1.61458e-09
0.00183383
-2.61957e-09
0.00183383
2.82286e-09
0.00183383
-4.63811e-09
0.00183383
4.81311e-09
0.00183383
-4.84131e-09
0.00183383
3.91978e-09
0.00183383
-7.16215e-10
0.00183383
-3.48123e-09
0.00183383
8.82055e-09
0.00183383
-1.27156e-08
0.00183383
1.31451e-08
0.00183383
-7.71627e-09
0.00183383
-2.04397e-09
0.00183383
9.55557e-09
0.00183383
-8.59488e-09
0.00183383
9.58489e-10
5.51581e-09
-0.000146408
0.000380185
-0.000173931
0.0013618
-7.67612e-05
0.00377234
0.000380805
0.00661901
0.000814601
0.00387738
0.00111651
0.000297229
0.00154614
-0.00190427
0.00166245
-0.0026987
0.00195496
-0.00386722
0.00247124
-0.00693914
0.00287729
-0.00841459
0.00298641
-0.00702645
0.00283908
-0.00419562
0.00255632
-0.00183716
0.00227735
-0.000746004
0.0020738
-0.000525044
0.00195083
-0.000557465
0.00188689
-0.000543114
0.00185717
-0.000443629
0.00184403
-0.000314473
0.00183807
-0.000203117
0.0018352
-0.0001246
0.00183382
-7.45891e-05
0.00183327
-4.40346e-05
0.00183316
-2.55509e-05
0.00183327
-1.44118e-05
0.00183343
-7.79819e-06
0.00183358
-3.99118e-06
0.00183369
-1.89726e-06
0.00183375
-8.10956e-07
0.00183379
-2.86396e-07
0.00183382
-5.68549e-08
0.00183383
2.81478e-08
0.00183383
4.86836e-08
0.00183383
4.46584e-08
0.00183383
3.41049e-08
0.00183383
2.31573e-08
0.00183383
1.45854e-08
0.00183383
9.23092e-09
0.00183383
5.49367e-09
0.00183383
2.8801e-09
0.00183383
1.55572e-09
0.00183383
8.62699e-10
0.00183383
5.91464e-10
0.00183383
-3.60908e-11
0.00183383
-2.0824e-10
0.00183383
2.11998e-10
0.00183383
-1.04124e-10
0.00183383
-2.01164e-10
0.00183383
6.99213e-11
0.00183383
8.71524e-11
0.00183383
2.00445e-10
0.00183383
6.54441e-11
0.00183383
-8.37292e-11
0.00183383
3.10696e-10
0.00183383
2.94671e-10
0.00183383
-1.45352e-10
0.00183383
-7.88749e-11
0.00183383
7.53613e-11
0.00183383
1.87539e-10
0.00183383
2.27228e-10
0.00183383
-5.10104e-11
0.00183383
-1.61962e-10
0.00183383
8.57664e-11
0.00183383
1.82648e-11
0.00183383
-2.79488e-10
0.00183383
-4.00176e-10
0.00183383
-2.83276e-10
0.00183383
-3.26621e-11
0.00183383
1.1816e-10
0.00183383
-5.63991e-11
0.00183383
-3.03087e-10
0.00183383
-2.6074e-10
0.00183383
-6.99374e-11
0.00183383
3.40145e-10
0.00183383
3.69114e-10
0.00183383
1.17591e-10
0.00183383
-3.54486e-10
0.00183383
-1.18439e-10
0.00183383
-2.97114e-10
0.00183383
8.38894e-10
0.00183383
-4.2421e-10
0.00183383
1.36796e-09
0.00183383
-2.23465e-09
0.00183383
2.22162e-09
0.00183383
-3.91544e-09
0.00183383
3.93644e-09
0.00183383
-3.93877e-09
0.00183383
3.22378e-09
0.00183383
-4.72626e-10
0.00183383
-2.95543e-09
0.00183383
7.35224e-09
0.00183383
-1.0484e-08
0.00183383
1.07873e-08
0.00183383
-6.22048e-09
0.00183383
-1.82606e-09
0.00183383
7.85579e-09
0.00183383
-7.08631e-09
0.00183383
8.5045e-10
4.66633e-09
-7.10465e-05
0.000451232
3.43569e-05
0.0012564
0.000249667
0.00355703
0.000755499
0.00611318
0.00117544
0.00345744
0.00151504
-4.23634e-05
0.00186149
-0.00225073
0.00193768
-0.00277489
0.00230736
-0.0042369
0.00287898
-0.00751075
0.00324682
-0.00878243
0.00328044
-0.00706008
0.00306522
-0.00398039
0.00273004
-0.00150199
0.00240539
-0.00042135
0.00216295
-0.000282602
0.00201026
-0.000404784
0.00192508
-0.000457925
0.00188078
-0.000399337
0.00185813
-0.000291824
0.0018463
-0.000191278
0.00183994
-0.000118241
0.00183653
-7.11821e-05
0.0018348
-4.23037e-05
0.00183401
-2.47657e-05
0.00183373
-1.41246e-05
0.00183367
-7.74156e-06
0.0018337
-4.01973e-06
0.00183374
-1.94302e-06
0.00183378
-8.48789e-07
0.00183381
-3.11156e-07
0.00183382
-7.0822e-08
0.00183383
2.12212e-08
0.00183383
4.57235e-08
0.00183383
4.37268e-08
0.00183383
3.40592e-08
0.00183383
2.34039e-08
0.00183383
1.48741e-08
0.00183383
9.50708e-09
0.00183383
5.69855e-09
0.00183383
2.98155e-09
0.00183383
1.65405e-09
0.00183383
9.01467e-10
0.00183383
6.45024e-10
0.00183383
-4.58135e-11
0.00183383
-2.21286e-10
0.00183383
2.34397e-10
0.00183383
-1.15858e-10
0.00183383
-1.90208e-10
0.00183383
5.31641e-11
0.00183383
8.45082e-11
0.00183383
2.03199e-10
0.00183383
6.11925e-11
0.00183383
-5.21647e-11
0.00183383
3.22498e-10
0.00183383
3.06944e-10
0.00183383
-1.49387e-10
0.00183383
-1.24835e-10
0.00183383
8.00975e-11
0.00183383
2.09431e-10
0.00183383
2.20027e-10
0.00183383
-3.98639e-11
0.00183383
-1.6212e-10
0.00183383
6.91561e-11
0.00183383
3.59234e-11
0.00183383
-2.83095e-10
0.00183383
-4.34183e-10
0.00183383
-2.84214e-10
0.00183383
-1.8208e-11
0.00183383
1.18907e-10
0.00183383
-4.39415e-11
0.00183383
-3.0563e-10
0.00183383
-2.88512e-10
0.00183383
-6.93703e-11
0.00183383
3.61357e-10
0.00183383
3.79554e-10
0.00183383
9.38064e-11
0.00183383
-3.47877e-10
0.00183383
-1.59802e-10
0.00183383
-2.56748e-10
0.00183383
7.41245e-10
0.00183383
-2.29076e-10
0.00183383
1.12674e-09
0.00183383
-1.84834e-09
0.00183383
1.64206e-09
0.00183383
-3.19646e-09
0.00183383
3.10331e-09
0.00183383
-3.07213e-09
0.00183383
2.55356e-09
0.00183383
-2.91033e-10
0.00183383
-2.39098e-09
0.00183383
5.89154e-09
0.00183383
-8.31313e-09
0.00183383
8.52107e-09
0.00183383
-4.84032e-09
0.00183383
-1.53853e-09
0.00183383
6.19958e-09
0.00183383
-5.63121e-09
0.00183383
7.47814e-10
3.80619e-09
-1.05161e-05
0.000461748
0.000178353
0.00106753
0.000569977
0.00316541
0.00113035
0.00555281
0.00154112
0.00304667
0.00186783
-0.000369081
0.00209884
-0.00248173
0.00218266
-0.00285871
0.00267013
-0.00472437
0.00328182
-0.00812244
0.00359151
-0.00909212
0.00354151
-0.00701008
0.00326143
-0.00370031
0.00288391
-0.00112446
0.00252387
-6.13075e-05
0.00224824
-6.9781e-06
0.00206803
-0.000224569
0.00196231
-0.000352211
0.00190374
-0.000340762
0.00187174
-0.00025983
0.00185414
-0.000173674
0.00184438
-0.000108485
0.00183903
-6.58303e-05
0.0018362
-3.94694e-05
0.00183479
-2.33544e-05
0.00183415
-1.34828e-05
0.00183389
-7.48636e-06
0.00183381
-3.93959e-06
0.0018338
-1.93114e-06
0.00183381
-8.57179e-07
0.00183382
-3.2152e-07
0.00183382
-7.81319e-08
0.00183383
1.71824e-08
0.00183383
4.39206e-08
0.00183383
4.31939e-08
0.00183383
3.40825e-08
0.00183383
2.36252e-08
0.00183383
1.51163e-08
0.00183383
9.71951e-09
0.00183383
5.85649e-09
0.00183383
3.06512e-09
0.00183383
1.75186e-09
0.00183383
9.04797e-10
0.00183383
6.82393e-10
0.00183383
-5.59551e-11
0.00183383
-2.24621e-10
0.00183383
2.51471e-10
0.00183383
-1.40424e-10
0.00183383
-1.58372e-10
0.00183383
3.56358e-11
0.00183383
7.81068e-11
0.00183383
2.03082e-10
0.00183383
4.41594e-11
0.00183383
-1.75444e-11
0.00183383
3.09696e-10
0.00183383
3.02408e-10
0.00183383
-1.27316e-10
0.00183383
-1.58455e-10
0.00183383
9.02295e-11
0.00183383
2.20119e-10
0.00183383
1.87496e-10
0.00183383
-1.82946e-11
0.00183383
-1.53856e-10
0.00183383
3.09845e-11
0.00183383
5.34824e-11
0.00183383
-2.76698e-10
0.00183383
-4.60739e-10
0.00183383
-2.62017e-10
0.00183383
9.12609e-13
0.00183383
9.20629e-11
0.00183383
-3.01153e-11
0.00183383
-2.7521e-10
0.00183383
-3.04467e-10
0.00183383
-7.38e-11
0.00183383
3.69464e-10
0.00183383
3.62624e-10
0.00183383
5.49419e-11
0.00183383
-3.19366e-10
0.00183383
-1.67707e-10
0.00183383
-2.21291e-10
0.00183383
6.10841e-10
0.00183383
-6.25236e-11
0.00183383
8.87988e-10
0.00183383
-1.45589e-09
0.00183383
1.09318e-09
0.00183383
-2.46188e-09
0.00183383
2.31417e-09
0.00183383
-2.24079e-09
0.00183383
1.88813e-09
0.00183383
-1.6651e-10
0.00183383
-1.79472e-09
0.00183383
4.44173e-09
0.00183383
-6.19192e-09
0.00183383
6.31822e-09
0.00183383
-3.55549e-09
0.00183383
-1.18947e-09
0.00183383
4.5946e-09
0.00183383
-4.20098e-09
0.00183383
6.42388e-10
2.92467e-09
5.84973e-05
0.000403251
0.000331133
0.000794896
0.00086932
0.00262722
0.00147545
0.00494668
0.00188376
0.00263836
0.00215685
-0.000642172
0.00226737
-0.00259225
0.00243104
-0.00302238
0.00305777
-0.0053511
0.00367237
-0.00873704
0.00390011
-0.00931986
0.00376039
-0.00687036
0.00342066
-0.00336058
0.00301154
-0.000715346
0.00262758
0.000322653
0.00232666
0.000293946
0.00212275
-2.06617e-05
0.001998
-0.000227459
0.00192572
-0.000268487
0.00188469
-0.000218799
0.00186153
-0.000150508
0.00184852
-9.54806e-05
0.00184133
-5.86414e-05
0.00183747
-3.56096e-05
0.00183549
-2.13705e-05
0.00183453
-1.25203e-05
0.00183409
-7.05214e-06
0.00183391
-3.76105e-06
0.00183385
-1.86654e-06
0.00183383
-8.38249e-07
0.00183383
-3.18297e-07
0.00183383
-7.90683e-08
0.00183383
1.59537e-08
0.00183383
4.3286e-08
0.00183383
4.30776e-08
0.00183383
3.41788e-08
0.00183383
2.38282e-08
0.00183383
1.5324e-08
0.00183383
9.86625e-09
0.00183383
5.96214e-09
0.00183383
3.14072e-09
0.00183383
1.8475e-09
0.00183383
8.57263e-10
0.00183383
6.96571e-10
0.00183383
-5.55468e-11
0.00183383
-2.10792e-10
0.00183383
2.56508e-10
0.00183383
-1.82479e-10
0.00183383
-9.83208e-11
0.00183383
2.62893e-11
0.00183383
6.00572e-11
0.00183383
1.92399e-10
0.00183383
1.49646e-11
0.00183383
1.64868e-11
0.00183383
2.69288e-10
0.00183383
2.82287e-10
0.00183383
-7.2687e-11
0.00183383
-1.71092e-10
0.00183383
1.01437e-10
0.00183383
2.07684e-10
0.00183383
1.27363e-10
0.00183383
1.93691e-11
0.00183383
-1.35352e-10
0.00183383
-3.37581e-11
0.00183383
6.49316e-11
0.00183383
-2.56266e-10
0.00183383
-4.66901e-10
0.00183383
-2.10165e-10
0.00183383
1.9851e-11
0.00183383
3.22274e-11
0.00183383
-1.51912e-11
0.00183383
-2.05993e-10
0.00183383
-2.99252e-10
0.00183383
-8.01831e-11
0.00183383
3.53475e-10
0.00183383
3.04061e-10
0.00183383
-1.10079e-12
0.00183383
-2.57026e-10
0.00183383
-1.31324e-10
0.00183383
-1.92863e-10
0.00183383
4.3352e-10
0.00183383
6.32341e-11
0.00183383
6.45774e-10
0.00183383
-1.04967e-09
0.00183383
5.89322e-10
0.00183383
-1.69238e-09
0.00183383
1.56563e-09
0.00183383
-1.44626e-09
0.00183383
1.21014e-09
0.00183383
-9.36689e-11
0.00183383
-1.17643e-09
0.00183383
3.00247e-09
0.00183383
-4.10898e-09
0.00183383
4.15404e-09
0.00183383
-2.34222e-09
0.00183383
-7.84755e-10
0.00183383
3.04837e-09
0.00183383
-2.76893e-09
0.00183383
5.24772e-10
2.01162e-09
8.60216e-05
0.000317229
0.000450571
0.000430347
0.00113771
0.00194008
0.00179466
0.00428973
0.00218926
0.00224376
0.00238159
-0.000834496
0.0024118
-0.00262246
0.00273322
-0.00334381
0.00347292
-0.0060908
0.00403744
-0.00930156
0.00416094
-0.00944336
0.0039292
-0.00663862
0.0035372
-0.00296858
0.00310767
-0.000285819
0.00271148
0.000718846
0.00239456
0.000610866
0.00217245
0.000201449
0.0020312
-8.62078e-05
0.0019463
-0.000183591
0.00189676
-0.000169259
0.00186835
-0.0001221
0.00185231
-7.94363e-05
0.00184342
-4.97528e-05
0.00183862
-3.08132e-05
0.00183612
-1.88696e-05
0.00183487
-1.12704e-05
0.00183428
-6.45775e-06
0.00183401
-3.49406e-06
0.0018339
-1.75409e-06
0.00183385
-7.9421e-07
0.00183384
-3.02402e-07
0.00183383
-7.39952e-08
0.00183383
1.74151e-08
0.00183383
4.38125e-08
0.00183383
4.33787e-08
0.00183383
3.43427e-08
0.00183383
2.40045e-08
0.00183383
1.5503e-08
0.00183383
9.95434e-09
0.00183383
6.01416e-09
0.00183383
3.21848e-09
0.00183383
1.92459e-09
0.00183383
7.47181e-10
0.00183383
6.84151e-10
0.00183383
-2.43066e-11
0.00183383
-1.70776e-10
0.00183383
2.4394e-10
0.00183383
-2.4589e-10
0.00183383
-1.79162e-11
0.00183383
3.59714e-11
0.00183383
1.76188e-11
0.00183383
1.6092e-10
0.00183383
-1.19484e-11
0.00183383
4.5159e-11
0.00183383
2.1375e-10
0.00183383
2.5564e-10
0.00183383
3.26753e-12
0.00183383
-1.61585e-10
0.00183383
1.02234e-10
0.00183383
1.56976e-10
0.00183383
5.0711e-11
0.00183383
7.63625e-11
0.00183383
-1.07273e-10
0.00183383
-1.14939e-10
0.00183383
6.592e-11
0.00183383
-2.18232e-10
0.00183383
-4.31589e-10
0.00183383
-1.29928e-10
0.00183383
3.45884e-11
0.00183383
-5.43865e-11
0.00183383
-4.6647e-12
0.00183383
-1.09968e-10
0.00183383
-2.61936e-10
0.00183383
-8.2502e-11
0.00183383
2.9794e-10
0.00183383
2.00488e-10
0.00183383
-6.92938e-11
0.00183383
-1.61401e-10
0.00183383
-5.59347e-11
0.00183383
-1.68802e-10
0.00183383
2.0577e-10
0.00183383
1.37847e-10
0.00183383
3.91977e-10
0.00183383
-6.1978e-10
0.00183383
1.45792e-10
0.00183383
-8.79229e-10
0.00183383
8.45585e-10
0.00183383
-6.86719e-10
0.00183383
5.1471e-10
0.00183383
-6.45005e-11
0.00183383
-5.4956e-10
0.00183383
1.56751e-09
0.00183383
-2.05421e-09
0.00183383
2.01411e-09
0.00183383
-1.16752e-09
0.00183383
-3.31552e-10
0.00183383
1.55916e-09
0.00183383
-1.32132e-09
0.00183383
3.86972e-10
1.06468e-09
0.000127274
0.000587542
0.00138174
0.00208935
0.00246862
0.00256067
0.00261809
0.00313304
0.0038966
0.0043584
0.00436305
0.00404202
0.00360714
0.00316831
0.00277125
0.00244824
0.00221469
0.00206061
0.00196485
0.00190766
0.00187448
0.00185568
0.00184527
0.00183964
0.00183668
0.00183518
0.00183444
0.0018341
0.00183394
0.00183387
0.00183385
0.00183384
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
)
;
boundaryField
{
inlet
{
type calculated;
value nonuniform List<scalar>
20
(
-0.0004875
-0.0013875
-0.0021875
-0.0028875
-0.0034875
-0.0039875
-0.0043875
-0.0046875
-0.0048875
-0.0049875
-0.0049875
-0.0048875
-0.0046875
-0.0043875
-0.0039875
-0.0034875
-0.0028875
-0.0021875
-0.0013875
-0.0004875
)
;
}
outlet
{
type calculated;
value nonuniform List<scalar>
40
(
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183381
0.00183376
0.00183355
0.00183273
0.00182993
0.00182116
0.00179649
0.00173469
0.00159866
0.00133911
0.000916002
0.00033447
0.00033447
0.000916002
0.00133911
0.00159866
0.00173469
0.00179649
0.00182116
0.00182993
0.00183273
0.00183355
0.00183376
0.00183381
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
0.00183383
)
;
}
walls
{
type calculated;
value uniform 0;
}
frontAndBack
{
type empty;
value nonuniform 0();
}
}
// ************************************************************************* //
|
|
4a08cc0ec8d32b0f64dbdcf987399e6c7ea5ce45
|
600df3590cce1fe49b9a96e9ca5b5242884a2a70
|
/third_party/skia/src/gpu/vk/GrVkVaryingHandler.cpp
|
f6fed219557899ae450b8bdeff59c5a5208b6067
|
[
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
metux/chromium-suckless
|
efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a
|
72a05af97787001756bae2511b7985e61498c965
|
refs/heads/orig
| 2022-12-04T23:53:58.681218
| 2017-04-30T10:59:06
| 2017-04-30T23:35:58
| 89,884,931
| 5
| 3
|
BSD-3-Clause
| 2022-11-23T20:52:53
| 2017-05-01T00:09:08
| null |
UTF-8
|
C++
| false
| false
| 3,058
|
cpp
|
GrVkVaryingHandler.cpp
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrVkVaryingHandler.h"
/** Returns the number of locations take up by a given GrSLType. We assume that all
scalar values are 32 bits. */
static inline int grsltype_to_location_size(GrSLType type) {
static const uint32_t kSizes[] = {
0, // kVoid_GrSLType
1, // kFloat_GrSLType
1, // kVec2f_GrSLType
1, // kVec3f_GrSLType
1, // kVec4f_GrSLType
2, // kMat22f_GrSLType
3, // kMat33f_GrSLType
4, // kMat44f_GrSLType
0, // kTexture2DSampler_GrSLType
0, // kTextureExternalSampler_GrSLType
0, // kTexture2DRectSampler_GrSLType
0, // kTextureBufferSampler_GrSLType
1, // kBool_GrSLType
1, // kInt_GrSLType
1, // kUint_GrSLType
0, // kTexture2D_GrSLType
0, // kSampler_GrSLType
};
return kSizes[type];
GR_STATIC_ASSERT(0 == kVoid_GrSLType);
GR_STATIC_ASSERT(1 == kFloat_GrSLType);
GR_STATIC_ASSERT(2 == kVec2f_GrSLType);
GR_STATIC_ASSERT(3 == kVec3f_GrSLType);
GR_STATIC_ASSERT(4 == kVec4f_GrSLType);
GR_STATIC_ASSERT(5 == kMat22f_GrSLType);
GR_STATIC_ASSERT(6 == kMat33f_GrSLType);
GR_STATIC_ASSERT(7 == kMat44f_GrSLType);
GR_STATIC_ASSERT(8 == kTexture2DSampler_GrSLType);
GR_STATIC_ASSERT(9 == kTextureExternalSampler_GrSLType);
GR_STATIC_ASSERT(10 == kTexture2DRectSampler_GrSLType);
GR_STATIC_ASSERT(11 == kTextureBufferSampler_GrSLType);
GR_STATIC_ASSERT(12 == kBool_GrSLType);
GR_STATIC_ASSERT(13 == kInt_GrSLType);
GR_STATIC_ASSERT(14 == kUint_GrSLType);
GR_STATIC_ASSERT(15 == kTexture2D_GrSLType);
GR_STATIC_ASSERT(16 == kSampler_GrSLType);
GR_STATIC_ASSERT(SK_ARRAY_COUNT(kSizes) == kGrSLTypeCount);
}
void finalize_helper(GrVkVaryingHandler::VarArray& vars) {
int locationIndex = 0;
for (int i = 0; i < vars.count(); ++i) {
GrGLSLShaderVar& var = vars[i];
SkString location;
location.appendf("location = %d", locationIndex);
var.setLayoutQualifier(location.c_str());
int elementSize = grsltype_to_location_size(var.getType());
SkASSERT(elementSize);
int numElements = 1;
if (var.isArray()) {
numElements = var.getArrayCount();
}
locationIndex += elementSize * numElements;
}
// Vulkan requires at least 64 locations to be supported for both vertex output and fragment
// input. If we ever hit this assert, then we'll need to add a cap to actually check the
// supported input and output values and adjust our supported shaders based on those values.
SkASSERT(locationIndex <= 64);
}
void GrVkVaryingHandler::onFinalize() {
finalize_helper(fVertexInputs);
finalize_helper(fVertexOutputs);
finalize_helper(fGeomInputs);
finalize_helper(fGeomOutputs);
finalize_helper(fFragInputs);
finalize_helper(fFragOutputs);
}
|
ea10ed342bdd1fcac1c3e99dc33b2ab9c136764a
|
a3010c13c9691c9f9f74187a826779810074b6f8
|
/tests/test.cpp
|
29ae3a869758775b0476224e78779c77edc0f739
|
[] |
no_license
|
zhangjiayin/php-xml2array
|
3970766a91dd429b909cd22581101b25124a3d0c
|
e56a1f9a319991bd650b58119d7729cb106a5e79
|
refs/heads/master
| 2021-01-10T21:36:37.636438
| 2010-10-14T12:15:45
| 2010-10-14T12:15:45
| 32,119,035
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,025
|
cpp
|
test.cpp
|
#include <iostream>
#include <libxml/parser.h>
#include <libxml/tree.h>
using namespace std;
int main(int argc,char** argv)
{
xmlDocPtr doc=NULL;
xmlNodePtr cur=NULL;
char* name=NULL;
char* value=NULL;
xmlKeepBlanksDefault (0);
if(argc<2)
{
cout<<"argc must be 2 or above."<<endl;
return -1;
}
doc=xmlParseFile(argv[1]);//创建Dom树
if(doc==NULL)
{
cout<<"Loading xml file failed."<<endl;
exit(1);
}
cur=xmlDocGetRootElement(doc);//获取根节点
if(cur==NULL)
{
cout<<"empty file"<<endl;
xmlFreeDoc(doc);
exit(2);
}
//walk the tree
cur=cur->xmlChildrenNode;//get sub node
while(cur !=NULL)
{
name=(char*)(cur->name);
value=(char*)xmlNodeGetContent(cur);
cout<<"name is: "<<name<<", value is: "<<value<<endl;
xmlFree(value);
cur=cur->next;
}
xmlFreeDoc(doc);//释放xml解析库所用资源
xmlCleanupParser();
return 0;
}
|
b8d9588b8e94e448f23f35c94beef8bc2c3ad416
|
5c66adeeeffb82d309368ab106b1b15ad08a6cf9
|
/Arrays/find_duplicate.cpp
|
883ebdb87343077f3b4add1804a3a900d7214de6
|
[] |
no_license
|
akashfit2max/SDE-problems
|
c0bcf5ebbeb9ffb051e047d748177d841388e2d8
|
eb486119157dd078894a83ca5f66aeb09de5df93
|
refs/heads/master
| 2023-07-15T16:09:36.659020
| 2021-08-14T16:22:05
| 2021-08-14T16:22:05
| 287,676,492
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,764
|
cpp
|
find_duplicate.cpp
|
/* author : akash kumar */
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define f first
#define s second
#define ss string
#define mp make_pair
#define map map<int, int>
#define umap unordered_map<int,int>
#define pb push_back
#define p pair<int, int>
#define pp pair<int, p>
#define v vector<int>
#define vl vector<ll>
#define vb vector<bool>
#define vs vector<string>
#define vp vector<p>
#define vpp vector<pair<int, p>>
#define vv vector<v>
#define vvl vector<vl>
#define vvp vector<vp>
#define el endl
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define repa(i, a, n) for(int i = a; i <(n); ++i)
#define repd(i, n) for(int i = n; i >= 0; --i)
#define all(x) (x).begin(), (x).end()
#define Pi 3.14159
const int mod = 1e9+7;
ll gcd(ll a, ll b){ll temp;while (b > 0){temp = a%b;a = b;b = temp;} return a;}
ll lcm(ll a, ll b){return a*b/gcd(a,b);}
ll fpow(ll b, ll exp, ll mod){if(exp == 0) return 1;ll t = fpow(b,exp/2,mod);if(exp&1) return t*t%mod*b%mod;return t*t%mod;}
ll divmod(ll i, ll j, ll mod){i%=mod,j%=mod;return i*fpow(j,mod-2,mod)%mod;}
void findDuplicates(vector<int>& nums) {
cout << "The repeating elements are:" <<el;
rep(i,nums.size()) {
if(nums[abs(nums[i])] > 0) {
nums[abs(nums[i])] = -nums[abs(nums[i])];
}
else {
cout<<nums[i]<<" ";
}
}
}
void solve() {
int n;
cin>>n;
v nums(n);
rep(i,n) {
cin>>nums[i];
}
findDuplicates(nums);
}
//Akash_Kumar --main function
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t = 1;
// cin >> t;
while(t--) {
solve();
}
return 0;
}
|
335d182106972b27e7dfe3bb946388910ee232de
|
346cfc9c68d600ce3878b82bf37baf303bba3839
|
/ArmorRecognizer0/main.cpp
|
8399fb781b5be90066c67b6e072723c6958a4232
|
[] |
no_license
|
lf2653/txCV
|
54c3528e13f9b77a617032e4859cc5b8d1620429
|
ff4c4270966f8a9735f16dfe06059917005b9621
|
refs/heads/master
| 2021-05-16T05:04:03.033714
| 2017-07-26T01:55:51
| 2017-07-26T01:55:51
| null | 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 13,660
|
cpp
|
main.cpp
|
//#include <pthread.h>
#include <sstream>
#include <stdio.h>
#include <iostream>
#include <opencv2/opencv.hpp>
#include "functions.h"
#include "getConfig.h"
#include "serialsom.h"
//#include "MyQueue.h"
// 宏定义
#define WINNAME "Armor Recognition"
#define WINNAME1 "Binary Image"
#define MaxContourArea 450 // 面积大于该值的轮廓不是装甲的灯条
#define MinContourArea 25 // 面积小于该值的轮廓不是装甲的灯条
#define Width 800 // 视频宽
#define Height 600 // 视频高
//#define DEBUG
#define SEND
// 全局变量
VideoCapture cap;
VideoWriter writer;
map<string, string> config;
Mat frame, gray; // 视频帧及其灰度图
Mat binaryImage, hsvImage; // 二值图及HSV图,使用cvtColor得到
Mat element, element1; // 开运算参数
string fileName; // 视频的文件名
bool showBinaryImage = false; // 是否显示二值图
int key = 0; // waitKey() 返回值
int m_threshold; // 灰度阈值
int detectColor; // 敌军装甲的颜色:0-红色,1-蓝色
float tmpAngle0;
float tmpAngle1;
uint8_t yawOut = 250; // 发送的 yaw 值
uint8_t pitchOut = 250; // 发送的 pitch 值
uint8_t shot = 0; // 是否射击
int frameCount = 450;
bool findArmor; // 是否检测到装甲
Point targetPoint(370, 340);
Point centerOfArmor;
float areaOfLightContour = 0; // 某个灯条的面积,用于大致表示目标装甲的远近。
SearchWindow searchWindow(Width, Height); // 搜索窗口
bool useSW = false; // 是否使用搜索窗口
int swSizeCache[5] = { 0,0,0,0,0 }; // 缓存 5 帧搜索窗口的尺寸(宽)
int recordVideo = 0; // 是否录像
int videoName; // 录像文件名
Mat bMat, gMat, rMat; // BGR单通道图
void on_Mouse(int event, int x, int y, int flags, void*);
void* capFrameThread(void *arg);
int main()
{
sleep(1);
#ifdef SEND
// 初始化串口类
Serialport Serialport1("/dev/ttyUSB0");
int fd = Serialport1.open_port("/dev/ttyUSB0");
while (fd < 0) {
sleep(1);
fd = Serialport1.open_port("/dev/ttyUSB0");
}
Serialport1.set_opt(115200, 8, 'N', 1);
#endif
/***************************************
读取 video.cfg 里面的键值对
****************************************/
bool read = ReadConfig("video.cfg", config); // 把video.cfg读入config键值对,成功返回true
if (!read) {
cout << "cannot open file : video.cfg" << endl;
return -1;
}
/***************************************
全局变量初始化
****************************************/
m_threshold = atoi(config["THRESHOLD"].c_str());
detectColor = atoi(config["DETECTCOLOR"].c_str());
fileName = config["FILENAME"].c_str();
recordVideo = atoi(config["RECORDVIDEO"].c_str());
element = getStructuringElement(MORPH_ELLIPSE, Size(2, 2));
element1 = getStructuringElement(MORPH_ELLIPSE, Size(5, 5));
bMat.create(Size(Width, Height), CV_8UC1);
gMat.create(Size(Width, Height), CV_8UC1);
rMat.create(Size(Width, Height), CV_8UC1);
Mat chan[3] = { bMat, gMat, rMat };
vector<RotatedRect> rotatedRects; // 对面积在指定范围内的轮廓拟合椭圆,得到相应的旋转矩形
vector<RotatedRect> rotatedRectsOfLights; // 蓝色/红色灯条的RotatedRect
#ifdef DEBUG
namedWindow(WINNAME, WINDOW_AUTOSIZE);
createTrackbar("Threshold", WINNAME, &m_threshold, 255, 0);
setMouseCallback(WINNAME, on_Mouse); // 鼠标响应函数获取targetPoint
#endif
//VideoCapture cap("1.avi");
cap.open(0);
while (!cap.isOpened()) {
sleep(1);
cap.open(0);
}
//cap.set(CV_CAP_PROP_FOURCC, CV_FOURCC('M', 'J', 'P', 'G')); // 需要在设置宽高之前设置,否则无效
//cap.set(CV_CAP_PROP_SATURATION, 80);
cap.set(CAP_PROP_FRAME_WIDTH, Width);
cap.set(CAP_PROP_FRAME_HEIGHT, Height);
if (recordVideo) {
FileStorage fs1("record.xml", FileStorage::READ);
fs1["videoName"] >> videoName;
fs1.release();
stringstream ss;
ss << videoName;
string s = ss.str();
int fourcc = CV_FOURCC('M', 'J', 'P', 'G');
writer.open(s + ".avi", fourcc, 25.0, Size(Width, Height));
videoName++;
FileStorage fs2("record.xml", FileStorage::WRITE);
fs2 << "videoName" << videoName;
fs2.release();
}
// 开启读取视频帧的线程(貌似程序在有些计算机上运行会因此崩溃)
/* pthread_t id;
int ret = pthread_create(&id, NULL, capFrameThread, NULL);
if (!ret) {
cout << "open thread to capture frame: success" << endl;
} else {
cout << "open thread to capture frame: failed" << endl;
}*/
/***************************************
开始处理每一帧
****************************************/
while (true)
{
// double time0 = static_cast<double>(getTickCount());
cap >> frame;
if (frame.empty()) {
#ifdef DEBUG
break;
#else
continue;
#endif
}
if (recordVideo)
writer.write(frame);
// 如果当前帧使用搜索窗口,则仅保留目标区域图像,其他区域改为黑色
if (useSW) {
Mat frameTemp(Height, Width, CV_8UC3, Scalar(0, 0, 0));
frame(searchWindow.getRect()).copyTo(frameTemp(searchWindow.getRect()));
frame = frameTemp;
}
#ifdef DEBUG
Mat frame_ = frame.clone(); // 帧图像备份,调试用
#endif // DEBUG
split(frame, chan);
cvtColor(frame, gray, COLOR_BGR2GRAY);
threshold(gray, binaryImage, m_threshold, 255, THRESH_BINARY);
morphologyEx(binaryImage, binaryImage, MORPH_OPEN, element); // 开运算,先腐蚀,后膨胀。去掉小的白色轮廓
#ifdef DEBUG
Mat binaryImage_ = binaryImage.clone(); // 二值图像备份,调试用
#endif
// 寻找轮廓,注意参数四不能设为 CHAIN_APPROX_SIMPLE,因为如果如果这样设置,表示一个轮廓的点的数量可能少于4
// 而 fitEllipse 函数要求点的数量不能小于 4 ,否则会报错
vector<vector<Point> > contours; // 所有轮廓
findContours(binaryImage, contours, RETR_EXTERNAL, CHAIN_APPROX_NONE);
vector<vector<Point> > contoursInAreaRange; // 面积在(MinContourArea, MaxContourArea)范围内的轮廓
for (int i = 0; i < contours.size(); i++) {
double areaTemp = contourArea(contours[i]);
if (areaTemp > MinContourArea && areaTemp < MaxContourArea)
contoursInAreaRange.push_back(contours[i]);
}
// 如果面积在指定范围内的轮廓数量小于2,则进入下一次循环(注意这种情况非常少)
if (contoursInAreaRange.size() < 2) {
frameCount++;
if (frameCount > 9)
useSW = false;
if (frameCount < 60) {
yawOut = 100;
pitchOut = 100;
shot = 0;
} else if (frameCount >= 60) {
frameCount--;
yawOut = 250;
pitchOut = 250;
shot = 0;
}
goto HERE;
}
// 得到轮廓的旋转矩形 RotatedRect
// 为每一个符合条件的 RotatedRect 制作一个掩模,判断掩模区域的主要颜色是红色还是蓝色
rotatedRectsOfLights.clear();
for (int i = 0; i < contoursInAreaRange.size(); i++) {
RotatedRect rotatedRectTemp = fitEllipse(contoursInAreaRange[i]);
float tmpA = rotatedRectTemp.angle; // 旋转矩形的角度
if (tmpA > 25 && tmpA < 155) // 旋转矩形的角度是否在指定范围内
continue;
Mat mask(Height, Width, CV_8UC1, Scalar(0));
drawContours(mask, contoursInAreaRange, i, Scalar(255), -1); // 绘制(轮廓的)掩模
dilate(mask, mask, element1);
Mat mask1;
dilate(mask, mask1, element1);
bitwise_not(mask, mask);
Mat mask2; // 带形掩模,白色轮廓周围的光带
bitwise_and(mask, mask1, mask2);
bool b1 = false;
if (detectColor)
b1 = JudgeColor(bMat, rMat, 90, mask2); // 蓝色装甲
else
b1 = JudgeColor(rMat, bMat, 60, mask2); // 红色装甲
if (b1) {
rotatedRectsOfLights.push_back(rotatedRectTemp);
}
}
/* 如果检测到灯条的数量等于0,则发送未检测到目标的信号,进入下一帧(这种情况较多)
* 如果之前检测到了装甲(frameCount=0),而后又出现灯条数量为0的情况
* 可能是对面步兵车被打败、撤退或者移动,发送云台静止不动的信号,等待几秒再发送云台进入搜索模式的信号
*/
if (rotatedRectsOfLights.size() == 0) {
if (frameCount > 9)
useSW = false;
// 如果某一帧开始没有检测到装甲,frameCount自加一
frameCount++;
if (frameCount <= 60) {
pitchOut = 100;
yawOut = 100;
shot = 0;
} else if (frameCount > 60) {
// 如果连续60帧没有检测到装甲,则认定为没有目标,串口发送信息进入搜索模式
frameCount--;
pitchOut = 250;
yawOut = 250;
shot = 0;
}
goto HERE;
}
#ifdef DEBUG
// 绘制每个灯条的拟合椭圆
for (int i = 0; i < rotatedRectsOfLights.size(); i++)
ellipse(frame_, rotatedRectsOfLights[i], Scalar(0, 255, 0), 2, LINE_AA);
#endif
tmpAngle0 = 10; // 两个灯条的角度差(绝对值),如果是这种情况:// 或 \\ ,则角度差在10以内有可能是一对装甲
tmpAngle1 = 170; // 如果是这种情况:/\ 或 \/ ,则角度差大于170度可能是一对装甲
findArmor = false;
// 寻找属于一个装甲的两个灯条,从而确定装甲的位置
for (int i = 0; i < rotatedRectsOfLights.size() - 1; i++) {
for (int j = i + 1; j < rotatedRectsOfLights.size(); j++) {
float angleDifference = abs(rotatedRectsOfLights[i].angle - rotatedRectsOfLights[j].angle); // 灯带的角度差
float yDifference = abs(rotatedRectsOfLights[i].center.y - rotatedRectsOfLights[j].center.y); // 灯带的Y轴差
float xDifference = abs(rotatedRectsOfLights[i].center.x - rotatedRectsOfLights[j].center.x); // 灯带的X轴差
float rotatedRectHeight = rotatedRectsOfLights[i].size.height;
float rotatedRectWidth = rotatedRectsOfLights[i].size.width;
if (rotatedRectHeight < rotatedRectWidth)
exchange(rotatedRectHeight, rotatedRectWidth);
if (xDifference < rotatedRectHeight*2/3)
continue;
if ((angleDifference < 10 || angleDifference > 170) &&
(angleDifference < tmpAngle0 || angleDifference > tmpAngle1) &&
yDifference < 10) {
#ifdef DEBUG
circle(frame_, rotatedRectsOfLights[i].center, 3, Scalar(0, 0, 255), -1, LINE_AA);
circle(frame_, rotatedRectsOfLights[j].center, 3, Scalar(0, 0, 255), -1, LINE_AA);
#endif
centerOfArmor = centerOf2Points(rotatedRectsOfLights[i].center, rotatedRectsOfLights[j].center);
// 更新 tmpAngle0 和 tmpAngle1,目的是找到角度差最小的一对灯条,认为它们属于一个装甲
if (angleDifference < 10)
tmpAngle0 = angleDifference;
else if (angleDifference > 170)
tmpAngle1 = angleDifference;
findArmor = true;
useSW = true;
for (int k = 0; k < 4; k++)
swSizeCache[k] = swSizeCache[k + 1];
swSizeCache[4] = rotatedRectHeight;
int swSizeCacheSum = 0;
for (int k = 0; k < 5; k++)
swSizeCacheSum += swSizeCache[k];
searchWindow.setCenter(centerOfArmor.x, centerOfArmor.y);
searchWindow.setSize(swSizeCacheSum / 5 * 25, rotatedRectHeight * 15);
}
}
}
if (findArmor) {
// 如果检测到了装甲的位置,frameCount置零,并向串口发送装甲的位置信息
frameCount = 0;
#ifdef DEBUG
circle(frame_, centerOfArmor, 10, Scalar(0, 0, 255), 2, LINE_AA);
#endif
int disX = centerOfArmor.x - targetPoint.x;
int disY = centerOfArmor.y - targetPoint.y;
disX = -disX;
disX += 100;
if (disX > 200)
disX = 200;
else if (disX < 0)
disX = 0;
disY += 100;
if (disY > 200)
disY = 200;
else if (disY < 0)
disY = 0;
yawOut = static_cast<uint8_t>(disX);
pitchOut = static_cast<uint8_t>(disY);
shot = 1;
} else {
// 检测到灯条但是没有匹配到装甲
frameCount++;
if (frameCount > 6)
useSW = false;
if (frameCount > 10) {
int disX, disY;
// 如果没有检测到装甲,且画面中灯条的数量大于2,则向窗口发送灯条的位置信息
float minAngle = 200.;
for (int i = 0; i < rotatedRectsOfLights.size(); i++) {
float angleTemp = rotatedRectsOfLights[i].angle;
if (angleTemp > 155)
angleTemp = 180 - angleTemp;
if (angleTemp < minAngle) {
disX = rotatedRectsOfLights[i].center.x - targetPoint.x;
disY = rotatedRectsOfLights[i].center.y - targetPoint.y;
minAngle = angleTemp;
}
}
disX = -disX;
disX += 100;
if (disX > 200)
disX = 200;
else if (disX < 0)
disX = 0;
disY += 100;
if (disY > 200)
disY = 200;
else if (disY < 0)
disY = 0;
yawOut = static_cast<uint8_t>(disX);
pitchOut = static_cast<uint8_t>(disY);
shot = 0;
}
}
HERE:
#ifdef SEND
Serialport1.usart3_send(pitchOut, yawOut, shot);
#else
continue;
#endif
//time0 = ((double)getTickCount() - time0) / getTickFrequency();
//cout << "time : " << time0 * 1000 << "ms" << endl;
#ifdef DEBUG
cout << static_cast<int>(pitchOut) << ", " << static_cast<int>(yawOut) << ", " << static_cast<int>(shot) << endl;
imshow(WINNAME, frame_);
key = (waitKey(30)&255);
if (key == 27) {
break;
} else if (key == int('0')) {
if (showBinaryImage) // 如果这时候窗口是显示的,则关闭它
destroyWindow(WINNAME1);
showBinaryImage = !showBinaryImage;
} else if (key == 32) {
waitKey(0);
}
#endif
}
return 0;
}
void* capFrameThread(void *arg)
{
while(true) {
if (cap.isOpened())
cap >> frame;
}
return NULL;
}
void on_Mouse(int event, int x, int y, int flags, void*) {
if (event == EVENT_LBUTTONDOWN) {
targetPoint.x = x;
targetPoint.y = y;
}
}
|
3eacc7a1d4f067e4b46e7408a632c9713cc79e30
|
d089ceceb1fab6c4bb5667c36928be41bf5e4c71
|
/robison e nilton - 200616.cpp
|
097e8c3e1cbb30197a989f47a44c22cea1d38afc
|
[
"MIT"
] |
permissive
|
jcvasconcelos/praticando-exercicios-simples-git-c
|
cffc3bb42a8e7fcc54d0ffa3fc2b7f06433fe5da
|
24e7328ff6c6cb452acf2fad1e7a1789e2daaf42
|
refs/heads/master
| 2022-12-05T08:49:56.614099
| 2020-08-21T01:11:48
| 2020-08-21T01:11:48
| 289,145,538
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
C++
| false
| false
| 2,773
|
cpp
|
robison e nilton - 200616.cpp
|
/*
Criar um programa capaz de calcular o tempo entre dois horários quaisquer de um determinado dia.
O programa deve ler dois horários, compostos por três números inteiros, representando horas, minutos e segundos.
O programa deve verificar se o horário é válido(horas entre 0 e 23, minutos entre 0 e 59, e segundos entre 00 e 59).
O programa deve ter uma função para calcular a quantidade de segundos em um horário, e outra função para calcular e
imprimir a quantidade de horas, minutos e segundos em uma quantidade de segundos
*/
#include <stdio.h>
#include <stdlib.h>
void converte_horario (int tempo)
{
int horas_seg=3600;
int horas = (tempo/horas_seg); //resultado da hora
int minutos = (tempo -(horas_seg*horas))/60;
int segundos = (tempo -(horas_seg*horas)-(minutos*60));
printf("A diferenca entre os dois horarios em horas, minutos e segundos: %dh : %dm : %ds \n",horas,minutos,segundos);
}
int conversao (int h, int min, int seg)
{
h *= 60;// minutos
h *= 60; //segundos
min *= 60; //segundos
return h+min+seg;
}
int verificar_horas (int h)
{
if ((h>23) || (h <0))
return 0;
else
return 1;
}
int verificar_minutos (int min)
{
if ((min>59) || (min <0))
return 0;
else
return 1;
}
int verificar_segundos (int seg)
{
if ((seg>59) || (seg <0))
return 0;
else
return 1;
}
int main ()
{
int h, min, seg, verificar, total, total1, total2;
while (true)
{
printf ("Insira o horario em horas: \n");
scanf ("%d", &h);
verificar = verificar_horas (h);
if (verificar == 1)
break;
}
while (true)
{
printf ("Insira o horario em minutos: \n");
scanf ("%d", &min);
verificar = verificar_minutos (min);
if (verificar == 1)
break;
}
while (true)
{
printf ("Insira o horario em segundos: \n");
scanf ("%d", &seg);
verificar = verificar_segundos (seg);
if (verificar == 1)
break;
}
total1 = conversao (h, min, seg);
printf ("Total em segundos do primeiro horario: %ds\n\n",total1);
while (true)
{
printf ("Insira o segundo horario em horas: \n");
scanf ("%d", &h);
verificar = verificar_horas (h);
if (verificar == 1)
break;
}
while (true)
{
printf ("Insira o segundo horario em minutos: \n");
scanf ("%d", &min);
verificar = verificar_minutos (min);
if (verificar == 1)
break;
}
while (true)
{
printf ("Insira o segundo horario em segundos: \n");
scanf ("%d", &seg);
verificar = verificar_segundos (seg);
if (verificar == 1)
break;
}
total2 = conversao (h, min, seg);
printf ("Total do segundo horario em segundos: %ds\n\n",total2);
if (total1 >total2)
total = total1 - total2;
else
total = total2 - total1;
converte_horario (total);
printf ("A diferenca entre os dois horarios em segundos: %ds", total);
}
|
762fc0d9fb0abdc19ff4174fde95b58add055eba
|
0898b19d8cd27061c04edff03269f4860cc30828
|
/Source/combat/ComboSystem.cc
|
05ae226af47fa27465824205adf47c04e76efc1e
|
[] |
no_license
|
aesophor/vigilante
|
6194beed07c18f592f926c92d3391e4d84831938
|
44ade83c0c22c785322d30381283ea1ad6cf75f0
|
refs/heads/master
| 2023-08-08T01:09:00.461867
| 2023-07-30T13:58:29
| 2023-07-30T13:58:29
| 145,686,294
| 75
| 9
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,134
|
cc
|
ComboSystem.cc
|
// Copyright (c) 2023 Marco Wang <m.aesophor@gmail.com>. All rights reserved.
#include "ComboSystem.h"
#include <algorithm>
#include "character/Character.h"
#include "input/InputManager.h"
#include "scene/SceneManager.h"
#include "util/Logger.h"
using namespace std;
USING_NS_AX;
namespace vigilante {
namespace {
constexpr float kComboResetTimer = 1.5f;
} // namespace
ComboSystem::ComboSystem(Character& c) : _character{c} {
const auto v0 = _fsm.getInitialStateId();
const auto v1 = _fsm.defineState(Character::State::ATTACKING);
const auto v2 = _fsm.defineState(Character::State::ATTACKING);
const auto v3 = _fsm.defineState(Character::State::ATTACKING_FORWARD);
const auto v4 = _fsm.defineState(Character::State::ATTACKING_UPWARD);
const auto v5 = _fsm.defineState(Character::State::ATTACKING_FORWARD);
_fsm.defineStateTransition(v0, v1, {});
_fsm.defineStateTransition(v1, v2, {});
_fsm.defineStateTransition(v2, v4, {EventKeyboard::KeyCode::KEY_UP_ARROW});
_fsm.defineStateTransition(v2, v3, {EventKeyboard::KeyCode::KEY_LEFT_ARROW});
_fsm.defineStateTransition(v2, v3, {EventKeyboard::KeyCode::KEY_RIGHT_ARROW});
_fsm.defineStateTransition(v4, v5, {EventKeyboard::KeyCode::KEY_LEFT_ARROW});
_fsm.defineStateTransition(v4, v5, {EventKeyboard::KeyCode::KEY_RIGHT_ARROW});
}
optional<Character::State> ComboSystem::determineNextAttackState() {
auto reqs = _fsm.getAllNextStatesAndTransitionRequirements(_fsm.getCurrentStateId());
if (reqs.empty()) {
reset();
reqs = _fsm.getAllNextStatesAndTransitionRequirements(_fsm.getCurrentStateId());
}
if (reqs.empty()) {
VGLOG(LOG_ERR, "Failed to perform combo state transition.");
return std::nullopt;
}
auto isKeyPressed = [](const EventKeyboard::KeyCode keyCode) -> bool {
return IS_KEY_PRESSED(keyCode);
};
for (const auto &[nextStateId, keyCodes] : reqs) {
if (std::all_of(keyCodes.begin(), keyCodes.end(), isKeyPressed)) {
_fsm.setCurrentStateId(nextStateId);
_fsm.setTimer(kComboResetTimer);
return _fsm.getState(nextStateId);
}
}
return nullopt;
}
} // namespace vigilante
|
05713302cd6a53ba08866055190d4fd685f7a31f
|
066e9694783d88f78a8ba4d3d15adf541146903b
|
/Buyukov.Viktor/Laba4/Dinlib/Dinlib.cpp
|
100b2d3f3dc9b0981b3c676e5bf49ed58fa8962d
|
[] |
no_license
|
953506/css-953506
|
e683cc0ed202f4527cdc0fdc18e5d3b30459ee61
|
bb6abcf1c3ba31d42fdf65c1f4f690867082d591
|
refs/heads/master
| 2021-04-13T03:23:08.869753
| 2020-11-29T21:18:08
| 2020-11-29T21:18:08
| 249,132,598
| 6
| 10
| null | 2020-03-22T10:56:03
| 2020-03-22T07:16:39
|
C#
|
UTF-8
|
C++
| false
| false
| 264
|
cpp
|
Dinlib.cpp
|
#include "pch.h"
#include <math.h>
#include "Dinlib.h"
int __stdcall Sum(int a, int b) {
return a + b;
}
int __stdcall Diff(int a, int b) {
return a - b;
}
int __cdecl stepen(int a, int b) {
int i = 1;
for (int r = 1; r <= b; r++)
i *= a;
return i;
}
|
d2d2484f6794665285634c1836fe991563f4b104
|
486c7e8a16a1d5419bc7a385dd4d043558ee04ef
|
/VmpcPlugin/Source/ThirdParty/include/ctoot/src/audio/delay/PhaserProcess.hpp
|
510c0b915778d4246b29a4020bd21c9f0cb63385
|
[] |
no_license
|
izzyreal/vmpc-unreal-plugin
|
73751fcd825ffe777fd08c7b651ef374aeb7c2fa
|
338ae3373956b88473d804ca75f081a756382f11
|
refs/heads/master
| 2023-04-11T02:24:46.902201
| 2021-04-28T20:39:10
| 2021-04-28T20:39:10
| 113,060,206
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 744
|
hpp
|
PhaserProcess.hpp
|
#pragma once
#include <audio/core/SimpleAudioProcess.hpp>
#include <vector>
namespace ctoot {
namespace audio {
namespace delay {
class AllPass;
class PhaserProcessVariables;
class PhaserProcess
: public ctoot::audio::core::SimpleAudioProcess
{
public:
float a1{};
private:
static constexpr int N{ 12 };
std::vector<AllPass*> allpass{ };
float zm1{ };
float lfoPhase{ };
float dmin{ }, dmax{ };
int sampleRate{ };
PhaserProcessVariables* vars{ };
public:
int processAudio(ctoot::audio::core::AudioBuffer* buffer) override;
public:
PhaserProcess(PhaserProcessVariables* vars);
~PhaserProcess();
};
}
}
}
|
2951b8542bdf37359152d6733a78edcaee72b005
|
2ee2e84625b1705d724177cc8674e29e0fcc0010
|
/Shader.h
|
4bf4a158b8fdd781b247c1783e80b08eaf7a2d0c
|
[] |
no_license
|
ThatMathsyBardGuy/CubeMarchTerrain
|
70f4091c09d1b00a762858ad063ab2dab38375a0
|
733d60fc090558788cdb4303125033078eb8d5ad
|
refs/heads/master
| 2023-06-04T09:00:19.471171
| 2020-02-11T10:17:12
| 2020-02-11T10:17:12
| 237,242,577
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 728
|
h
|
Shader.h
|
#pragma once
#include <GL/glew.h>
#include <string>
namespace rendering {
enum ShaderStages {
VERTEX, FRAGMENT, GEOMETRY, MAX_STAGES
};
class Shader {
public:
Shader();
Shader(const char* vertexsource, const char* fragmentsource);
Shader(std::string vertexfile, std::string fragmentfile);
Shader(std::string vertexfile, std::string geometryfile, std::string fragmentfile);
~Shader();
GLuint GetProgram() { return m_Program; }
protected:
void LoadShaderCode(const char* vertexsource, const char* fragmentsource, const char* geometrysource = "");
void SetDefaultAttributes();
bool LoadShaderFile(std::string from, std::string& into);
GLuint m_ShaderStages[MAX_STAGES];
GLuint m_Program;
};
}
|
1c72dcf4ee17419723b5365b15e7290334b2029e
|
3e868ee4683bae403cf6d9bfdddce0750a30ebb9
|
/main.cpp
|
1034997a5fcf103095c5b6ca5c075825c2c75fac
|
[] |
no_license
|
mustiian/Palindrome
|
e8cf022386c5304378afd67ee067c58ff5942692
|
729738caae7e39ae9fd4e19d970a10371b49c3a7
|
refs/heads/master
| 2020-04-10T09:24:22.976993
| 2019-04-24T18:14:58
| 2019-04-24T18:14:58
| 160,935,296
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,879
|
cpp
|
main.cpp
|
#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
using namespace std;
const int MAX_POSITION = 500;
class TTon{
public:
TTon ( int pos ) : m_Position( pos )
{ }
void InsertNeighbour (int neighbour, char ton){
m_Neighbours.insert( {neighbour, ton} );
}
map<int, char>& GetNeighbours(){
return m_Neighbours;
}
private:
int m_Position;
map<int, char> m_Neighbours;
};
class CKoledy{
public:
CKoledy( int size, int start, int end ):
m_Start(start), m_End(end)
{
for (int i = 0; i < size; ++i) {
m_Song.emplace_back( TTon(i) );
}
}
void InsertNeighbour( int position, int neighbour, char ton );
bool GetAllWords ( int startPosition );
void InsertWordsToSong( int position, int neiPosition, char ton );
void InsertWordsToSongReverse( int position, int neiPosition, char ton );
int CountAllPalindromes();
private:
vector<TTon> m_Song;
map<int, vector<string>> m_Words;
map<int, vector<string>> m_Words_rev;
int m_Start;
int m_End;
};
void CKoledy::InsertNeighbour(int position, int neighbour, char ton) {
m_Song[position].InsertNeighbour(neighbour, ton);
}
bool CKoledy::GetAllWords(int position) {
bool gotoEnd = false;
if ( position == m_End ){ /// IF THE LAST POSITION:
m_Words[m_End].emplace_back(""); /// INSERT NOTHING
m_Words_rev[m_End].emplace_back("");
return true;
}
for ( const auto& neighbour: m_Song[position].GetNeighbours() ){ /// FOR ALL NEIGHBOURS:
int neighbourPosition = neighbour.first;
char neighbourTon = neighbour.second;
if ( m_Words.find( neighbourPosition ) != m_Words.end() ){ /// IF NEIGHBOUR HAS ALL WORDS:
InsertWordsToSong(position, neighbourPosition, neighbourTon); /// INSERT WORDS WITH NEW CHAR IN THIS POSITION
InsertWordsToSongReverse(position, neighbourPosition, neighbourTon);
gotoEnd = true;
}
else { /// ELSE NEIGHBOUR FIND ALL HIS NEIGHBOURS WORDS
gotoEnd = GetAllWords(neighbourPosition);
if ( gotoEnd ) { /// IF POSITION GO TO END: INSERT WORDS
InsertWordsToSong(position, neighbourPosition, neighbourTon);
InsertWordsToSongReverse(position, neighbourPosition, neighbourTon);
}
}
}
return gotoEnd;
}
void CKoledy::InsertWordsToSong(int position, int neiPosition, char ton) {
for ( const string& word: m_Words.at( neiPosition ) ){
m_Words[position].emplace_back(ton + word);
}
}
void CKoledy::InsertWordsToSongReverse(int position, int neiPosition, char ton) {
for ( const string& word: m_Words_rev.at( neiPosition ) ){
m_Words_rev[position].emplace_back(word + ton);
}
}
int CKoledy::CountAllPalindromes() {
int count = 0;
for (size_t i = 0; i < m_Words[m_Start].size(); ++i) {
if ( m_Words[m_Start][i] == m_Words_rev[m_Start][i] ){
count++;
count %= 1000000007;
}
}
return count;
}
int main(){
int size, ignoreTon, size_of_neighbours;
int start, end;
cin >> size >> ignoreTon;
cin >> start >> end;
CKoledy koledy(size, start, end);
for (int pos = 0; pos < size; ++pos) {
cin >> size_of_neighbours;
for (int j = 0; j < size_of_neighbours; ++j) {
int neighbour; char ton;
cin >> neighbour >> ton;
koledy.InsertNeighbour(pos, neighbour, ton);
}
}
koledy.GetAllWords( start );
cout << koledy.CountAllPalindromes() << endl;
return 0;
}
|
5aa8f229c4e14c3ba64fdf286a793f3faa447030
|
2b39d6f15cb85690c8e6e5c086362916a7df01bd
|
/src/asp/GUI/GuiBase.h
|
d1d796bba5f3ca496d9d361d7ee93d449372f070
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
NeoGeographyToolkit/StereoPipeline
|
3649ba23fb5a07a8e3f13811a21ba12e0bd6c70a
|
80ba3b2a1fc4d5acbd47621ba117852fef6687bf
|
refs/heads/master
| 2023-08-31T02:28:40.247866
| 2023-08-27T03:06:35
| 2023-08-27T03:06:35
| 714,891
| 414
| 124
|
Apache-2.0
| 2023-03-09T03:10:29
| 2010-06-11T02:11:55
|
C++
|
UTF-8
|
C++
| false
| false
| 1,078
|
h
|
GuiBase.h
|
// __BEGIN_LICENSE__
// Copyright (c) 2006-2013, United States Government as represented by the
// Administrator of the National Aeronautics and Space Administration. All
// rights reserved.
//
// The NGT platform is licensed under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance with the
// License. You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// __END_LICENSE__
/// \file GuiBase.h
///
/// Very low-level Qt functions
///
#ifndef __STEREO_GUI_GUI_BASE_H__
#define __STEREO_GUI_GUI_BASE_H__
#include <string>
namespace vw { namespace gui {
void popUp(std::string const& msg);
}} // namespace vw::gui
#endif // __STEREO_GUI_GUI_BASE_H__
|
4ba929d186544ef04fa22045a3fc7fe58bca3f37
|
0ed4839cf0d78545b5693b9df079c3ffb0675059
|
/二分专题/LeetCode-275.cpp
|
b10104f64edd498659a1d10f50fa8859f69bdd7b
|
[] |
no_license
|
liuhycn/leetcode_exercise
|
2fc50d8d2a329e70c8e09d5bb74d70ee11a6a9cf
|
6536cc5044d4380e2b427ef75e84572f3a02c8bb
|
refs/heads/master
| 2020-05-01T11:21:14.557593
| 2019-08-04T07:08:34
| 2019-08-04T07:08:34
| 177,440,696
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 615
|
cpp
|
LeetCode-275.cpp
|
class Solution {
public:
int hIndex(vector<int>& nums) {
if (nums.empty()) return 0;
int l = 0;
int r = nums.size() - 1;
int n = nums.size();
while (l < r)
{
int mid = l + r >> 1;
if (nums[mid] >= n - mid)
r = mid;
else
l = mid + 1;
}
return min(n - l, nums[l]);
}
};
作者:小仙童
链接:https://www.acwing.com/activity/content/code/content/63946/
来源:AcWing
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
|
aeeccce940cd82863c9a9725dfa83cebded84176
|
49287a1da270671e99b8db8f7ffac9c4f8e2b118
|
/Vicky's/customerchoosestore.cpp
|
5695bda8feea350aa0c8d913481b3f4e4c86935a
|
[] |
no_license
|
kchang8/cpsc462-bobapp-project
|
18520b950bfe78896ef833d6657b8f206c63c2b1
|
37d683515ff64205ea193d2192080c10ed8b2747
|
refs/heads/master
| 2020-08-05T08:10:58.515010
| 2019-12-11T20:32:26
| 2019-12-11T20:32:26
| 212,459,523
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 819
|
cpp
|
customerchoosestore.cpp
|
#include "customerchoosestore.h"
#include "ui_customerchoosestore.h"
#include <QPixmap>
customerChooseStore::customerChooseStore(QWidget *parent) :
QDialog(parent),
ui(new Ui::customerChooseStore)
{
//Background
ui->setupUi(this);
QPixmap bkgrn("C:/Users/admin/Desktop/bobappBackground.PNG");
bkgrn = bkgrn.scaled(this->size(), Qt::IgnoreAspectRatio);
QPalette palette1;
palette1.setBrush(QPalette::Background, bkgrn);
this->setPalette(palette1);
ui->comboBox->addItem("Sharetea, Fullerton, CA");
ui->comboBox->addItem("Ding Tea, Fullerton , CA");
}
customerChooseStore::~customerChooseStore()
{
delete ui;
}
void customerChooseStore::on_pushButton_clicked()
{
hide();
cOrder = new custOrder(this);
cOrder -> show();
}
|
2fa35f7cce1e6aee9305caeb98759a2170be742d
|
a63d60c270433e84398f6be4642feb7643c0c8b0
|
/USACO/USACO 2016-2017/Plat/Dec 2016/triangles.cpp
|
2946c682555e0e50aaa9c324a53dad2e6057ff97
|
[] |
no_license
|
luciocf/Problems
|
70a97784c17a106cb9e0f0ec28ac57cf58fea8c7
|
19f6000e9e6a5fe483ad4bb17e9ba50644ac954a
|
refs/heads/master
| 2023-08-21T10:54:18.574403
| 2021-10-29T03:45:16
| 2021-10-29T03:45:16
| 169,012,579
| 8
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,412
|
cpp
|
triangles.cpp
|
// USACO 2016/2017 - Lots of Triangles
// Lúcio Cardoso
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
typedef pair<int, int> pt;
typedef long long ll;
const int maxn = 310;
pt p[maxn];
int ans[maxn][maxn][maxn];
int final[maxn];
pt operator- (const pt &x, const pt &y)
{
return {x.x-y.x, x.y-y.y};
}
ll cross(pt a, pt b)
{
return 1ll*a.x*b.y - 1ll*a.y*b.x;
}
int sign(ll x)
{
if (x > 0) return 1;
if (x == 0) return 0;
return -1;
}
bool inside(pt a, pt b, pt c, pt p)
{
ll a1 = abs(cross(a-p, b-p));
ll a2 = abs(cross(b-p, c-p));
ll a3 = abs(cross(c-p, a-p));
return (abs(cross(b-a, c-a)) == (a1+a2+a3));
}
bool intersect(pt a1, pt b1, pt a2, pt b2)
{
int c1 = sign(cross(b1-a1, a2-a1))*sign(cross(b1-a1, b2-a1));
int c2 = sign(cross(b2-a2, a1-a2))*sign(cross(b2-a2, b1-a2));
return (c1 == -1 && c2 == -1);
}
int main(void)
{
freopen("triangles.in", "r", stdin); freopen("triangles.out", "w", stdout);
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d %d", &p[i].x, &p[i].y);
sort(p+1, p+n+1);
pt pivot = p[1];
for (int a = 2; a <= n; a++)
for (int b = a+1; b <= n; b++)
for (int c = 2; c <= n; c++)
if (c != a && c != b && inside(pivot, p[a], p[b], p[c]))
ans[1][a][b]++, ans[1][b][a]++;
for (int a = 2; a <= n; a++)
{
for (int b = a+1; b <= n; b++)
{
for (int c = b+1; c <= n; c++)
{
if (intersect(pivot, p[a], p[b], p[c]))
ans[a][b][c] = ans[1][b][a] + ans[1][c][a] - ans[1][b][c];
else if (intersect(pivot, p[b], p[a], p[c]))
{
ans[a][b][c] = ans[1][a][b] + ans[1][c][b] - ans[1][a][c];
}
else if (intersect(pivot, p[c], p[a], p[b]))
{
ans[a][b][c] = ans[1][a][c] + ans[1][b][c] - ans[1][a][b];
}
else
{
ll a1 = abs(cross(p[a]-pivot, p[b]-pivot));
ll a2 = abs(cross(p[b]-pivot, p[c]-pivot));
ll a3 = abs(cross(p[c]-pivot, p[a]-pivot));
if (max({a1, a2, a3}) == a1)
ans[a][b][c] = ans[1][a][b] - ans[1][a][c] - ans[1][b][c] - 1;
else if (max({a1, a2, a3}) == a2)
ans[a][b][c] = ans[1][b][c] - ans[1][b][a] - ans[1][c][a] - 1;
else
ans[a][b][c] = ans[1][c][a] - ans[1][c][b] - ans[1][a][b] - 1;
}
final[ans[a][b][c]]++;
}
}
}
for (int a = 2; a <= n; a++)
for (int b = a+1; b <= n; b++)
final[ans[1][a][b]]++;
for (int i = 0; i <= n-3; i++)
printf("%d\n", final[i]);
}
|
45d68d60f4a67bc4d693e484f70056fb347e9d27
|
f6b4b97930c9c85e406d60043b2f7a2620ab081f
|
/Server.cpp
|
d43fd6807c7be4d8232b6f5b627e9c077c086d89
|
[] |
no_license
|
DaronP/ChatSistos
|
387bd0ec893f44c982ef06d7792580c522a1dc7d
|
3a2ae2dcc41849fb4be444dac8696df17d70e486
|
refs/heads/master
| 2022-04-24T10:01:33.669821
| 2020-04-23T08:06:56
| 2020-04-23T08:06:56
| 258,041,718
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,643
|
cpp
|
Server.cpp
|
#include <iostream>
#include <string>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <sys/uio.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <fstream>
#include <pthread.h>
#include <queue>
#include <stdarg.h>
#include <sys/syscall.h>
#include "mensaje.pb.h"
#include <map>
#include "Server.h"
using namespace std;
using namespace chat;
//Server side
int usrsNum;
map<string, clientInfo> userMap;
queue <clientInfo> requestQ;
int listeningConnections(int serverSd)
{
struct sockaddr_in clientAddr;
int sockSize = sizeof(clientAddr);
int requestFD = accept(serverSd, (struct sockaddr *)&clientAddr, (socklen_t*)&sockSize);
if(requestFD < 0)
{
cout << "Error connecting to client" << endl;
return -1;
}
cout << "Connection accepted" << endl;
char ipstr[INET6_ADDRSTRLEN];
struct sockaddr_in *temp = (struct sockaddr_in *)&clientAddr;
inet_ntop(AF_INET, &temp->sin_addr, ipstr, sizeof(ipstr));
cout << "Connecting to IP address: " << ipstr << endl;
struct clientInfo newClient;
newClient.id = usrsNum;
usrsNum ++;
newClient.socketCli = clientAddr;
newClient.requestFD = requestFD;
newClient.ip = ipstr;
//Pusheando cliente nuevo
pthread_mutex_t clireqMutex;
pthread_mutex_lock(&clireqMutex);
requestQ.push(newClient);
pthread_mutex_unlock(&clireqMutex);
return 0;
}
clientInfo requestDel()
{
clientInfo request;
pthread_mutex_t clireqMutex;
pthread_mutex_lock(&clireqMutex);
request = requestQ.front();
requestQ.pop();
pthread_mutex_unlock(&clireqMutex);
return request;
}
int readReq(int requestFD, void *buffer)
{
int size = recvfrom(requestFD, buffer, 1500, 0, NULL, NULL);
if(size < 0)
{
cout << "Error reading request" << endl;
return -1;
}
return size;
}
clientInfo getUser(string usr)
{
clientInfo clien;
pthread_mutex_t clireqMutex;
pthread_mutex_lock(&clireqMutex);
clien = userMap[usr];
pthread_mutex_unlock(&clireqMutex);
return clien;
}
int sendRes(int serverSd, struct sockaddr_in *dest, ServerMessage srvr)
{
string res;
srvr.SerializeToString(&res);
char cStr[res.size() + 1];
strcpy(cStr, res.c_str());
int sending = sendto(serverSd, cStr, sizeof(cStr), 0, (struct sockaddr *) &dest, sizeof(&dest));
if(sending < 0)
{
cout << "Error sending response" << endl;
return -1;
}
return 0;
}
string registerUsr(MyInfoSynchronize req, clientInfo cli)
{
cli.userName = req.username();
cli.status = "activo";
pthread_mutex_t clireqMutex;
pthread_mutex_lock(&clireqMutex);
userMap[cli.userName] = cli;
pthread_mutex_unlock(&clireqMutex);
clientInfo connectedUser = getUser(req.username());
MyInfoResponse * my_info(new MyInfoResponse);
my_info->set_userid(connectedUser.id);
ServerMessage srvrmsg;
srvrmsg.set_option(4);
srvrmsg.set_allocated_myinforesponse(my_info);
sendRes(connectedUser.requestFD, &connectedUser.socketCli, srvrmsg);
char acknw[1500];
readReq(connectedUser.requestFD, acknw);
return(connectedUser.userName);
}
ServerMessage changeStatus(ChangeStatusRequest req, string usr)
{
string status = req.status();
int iD;
pthread_mutex_t clireqMutex;
pthread_mutex_lock(&clireqMutex);
userMap[usr].status = status;
iD = userMap[usr].id;
pthread_mutex_unlock(&clireqMutex);
ChangeStatusResponse * cs(new ChangeStatusResponse);
cs->set_userid(iD);
cs->set_status(status);
ServerMessage res;
res.set_option(6);
res.set_allocated_changestatusresponse(cs);
return res;
}
ServerMessage bcastMessage(BroadcastRequest req, clientInfo ci)
{
string message = req.message();
ServerMessage res;
BroadcastResponse * bres(new BroadcastResponse);
ServerMessage resR;
BroadcastMessage * bcast(new BroadcastMessage);
bcast->set_message(message);
bcast->set_userid(ci.id);
res.set_option(1);
res.set_allocated_broadcast(bcast);
bres->set_messagestatus("sent");
resR.set_option(7);
resR.set_allocated_broadcastresponse(bres);
return resR;
}
ServerMessage dm(DirectMessageRequest req, clientInfo ci)
{
clientInfo cinfo;
if(req.has_username())
{
cinfo = getUser(req.username());
}
else
{
cout << "No username Entered" << endl;
exit(0);
}
DirectMessage * direct(new DirectMessage);
direct->set_userid(ci.id);
direct->set_message(req.message());
ServerMessage dmres;
dmres.set_option(2);
sendRes(cinfo.requestFD, &cinfo.socketCli, dmres);
DirectMessageResponse * dmresponse(new DirectMessageResponse);
dmresponse->set_messagestatus("sent");
ServerMessage sm;
sm.set_option(8);
sm.set_allocated_directmessageresponse(dmresponse);
return sm;
}
ServerMessage requests(ClientMessage cm, clientInfo ci)
{
int option = cm.option();
if(option == 3)
{
return changeStatus(cm.changestatus(), ci.userName);
}
if(option == 4)
{
return bcastMessage(cm.broadcast(), ci);
}
if(option == 5)
{
return dm(cm.directmessage(), ci);
}
else
{
}
}
void newConnection()
{
struct clientInfo requestD = requestDel();
char req[1500];
readReq(requestD.requestFD, req);
ClientMessage cliMsg;
cliMsg.ParseFromString(req);
int optn = cliMsg.option();
string usr;
if(optn == 1)
{
usr = registerUsr(cliMsg.synchronize(), requestD);
}
else
{
usr = "";
ServerMessage clireq;
ErrorResponse * err(new ErrorResponse);
err->set_errormessage("User not logged in");
clireq.set_option(3);
clireq.set_allocated_error(err);
sendRes(requestD.requestFD, &requestD.socketCli, clireq);
close(requestD.requestFD);
pthread_exit(NULL);
}
if(usr != "")
{
cout << "Connection successful.\nWelcome to the chat" << endl;
clientInfo userInfo = getUser(usr);
userInfo.id = requestD.id;
char wasd[1500];
while(1)
{
int rdSize = readReq(requestD.requestFD, wasd);
if(rdSize <= 0)
{
cout << "FATAL ERROR" << endl;
close(requestD.requestFD);
break;
}
ClientMessage rqst;
rqst.ParseFromString(wasd);
ServerMessage nose = requests(rqst, userInfo);
if(sendRes(requestD.requestFD, &requestD.socketCli, nose) < -1)
{
cout << "Error sending response " << endl;
}
else
{
cout << "Response sent" << endl;
}
}
}
else
{
close(requestD.requestFD);
}
pthread_exit( NULL );
}
int main(int argc, char *argv[])
{
GOOGLE_PROTOBUF_VERIFY_VERSION;
//for the server, we only need to specify a port number
if(argc != 2)
{
cerr << "Usage: port" << endl;
exit(0);
}
//grab the port number
int port = atoi(argv[1]);
struct sockaddr_in sendSockAddr;
int serverSd = socket(AF_INET, SOCK_STREAM, 0);
if(serverSd < 0)
{
cout << "Error creating socket" << endl;
return -1;
}
sendSockAddr.sin_family = AF_INET;
sendSockAddr.sin_addr.s_addr = INADDR_ANY;
sendSockAddr.sin_port = htons(port);
int binding = bind(serverSd, (struct sockaddr *)&sendSockAddr, sizeof(sendSockAddr));
if(binding < 0)
{
cout << "Error binding socket to IP" << endl;
cout << "Unable to start server" << endl;
return -1;
}
int listening = listen(serverSd, 50);
if(listening < 0)
{
cout << "Unable to lsiten clients" << endl;
cout << "Unable to start server" << endl;
return -1;
}
while(1)
{
listeningConnections(serverSd);
//pthread_create(&serverThread, NULL, newConnection, NULL);
newConnection();
}
}
|
d46147f83475a3ef22f3d126031f20f5bea34540
|
9841347922e22ddd21a20d187c597d3746ff9b4b
|
/number_theory/furui.cpp
|
cc8f64ba03f2926678b818bdecbf17f8f36c0a70
|
[] |
no_license
|
takumi-fukunaga/Atcoder_log
|
99d1c87a5e8bcf093ae6eec59743ef7dab429ac0
|
026995cefe871cbe4f21850911036dc45f896812
|
refs/heads/main
| 2023-07-24T05:59:32.900465
| 2021-08-27T14:17:08
| 2021-08-27T14:17:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 409
|
cpp
|
furui.cpp
|
/*
スニペット
エラトステネスの篩
*/
bool prime[1000010];
void furui() {
prime[0]=true;
prime[1]=true;
int i = 2;
while (i <= 1000000) {
int j = 2;
while (j*j <= i && !prime[i]) {
if (i%j == 0) {
prime[i] = true;
break;
}
else j++;
}
int z = 2;
while (!prime[i]) {
if (i*z <= 1000000) {
prime[i*z] = true;
z++;
}
else break;
}
i++;
}
}
|
1cf8f6a71b1094bbc4cd51c9fb97004178c44823
|
cfc99437b085afa7304ed5a4eab2a90072c7e50e
|
/pintools/source/tools/Utils/runnable.h
|
952727316ed2c41d44ff384ae98e1fabb417eda2
|
[
"MIT",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
moraispgsi/pin-bootstrap
|
95498b63f88c311e4fe446259214266130aece3f
|
7315b4e1709f63f018781456f9c745fc6f020f22
|
refs/heads/master
| 2021-09-07T18:09:11.568374
| 2018-02-27T05:16:32
| 2018-02-27T05:16:32
| 122,972,429
| 0
| 1
|
MIT
| 2018-02-26T14:31:18
| 2018-02-26T13:17:08
|
C++
|
UTF-8
|
C++
| false
| false
| 4,579
|
h
|
runnable.h
|
/*BEGIN_LEGAL
Intel Open Source License
Copyright (c) 2002-2017 Intel Corporation. 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 Intel Corporation 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 INTEL OR
ITS 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.
END_LEGAL */
/*! @file
* Runnable and function objects.
*/
#ifndef RUNNABLE_H
#define RUNNABLE_H
#include <string>
#include <iostream>
#if defined(TARGET_LINUX) || defined(TARGET_BSD)
# include <stdlib.h> /* gcc4.3.x required */
#endif
using namespace std;
/*!
* Abstract interface of a runnable object.
*/
class RUNNABLE_OBJ
{
public:
virtual void Run() = 0;
virtual ~RUNNABLE_OBJ() {}
};
/*!
* Abstract function object.
*/
class FUNC_OBJ : public RUNNABLE_OBJ
{
public:
// Execute the function.
// @return <this> object that contains result of the function invocation.
virtual FUNC_OBJ & Execute() = 0;
// Execute the function and return to the caller even if the function threw an
// exception.
// The function is NOT thread-safe.
// @return <this> object that contains result of the function invocation.
virtual FUNC_OBJ & ExecuteSafe();
// Implementation of the RUNNABLE_OBJ::Run() function.
void Run() {Execute();}
// Return boolean status of the last Execute() invocation.
// @return TRUE - the function succeeded and returned an expected result
// FALSE - the function failed or returned an unexpected result
virtual bool Status() const = 0;
// Return human-readable string representation of the status of the last
// Execute() invocation.
virtual string ErrorMessage() const
{
if (Status())
{
return "Success";
}
else
{
return "Failure";
}
}
// Check the status of the last Execute() invocation. Print error message and
// exit abnormally if the function failed.
void AssertStatus()
{
if (!Status())
{
cerr << Name() << ": " << ErrorMessage() << endl;
exit(1);
}
}
// Return name of the function.
virtual string Name() const = 0;
// Create a copy of this object.
virtual FUNC_OBJ * Clone() const = 0;
// Virtual destructor
virtual ~FUNC_OBJ() {}
protected:
// Handle exception.
// @param[in] exceptIp address of the instruction that caused the exception
// @return <this> object that contains result of the exception handling.
virtual FUNC_OBJ & HandleException(void * exceptIp) {return *this;}
};
/*!
* Class that represents a position-independent function.
*/
class PI_FUNC : public FUNC_OBJ
{
public:
// Copy the function body into specified buffer.
// @return <this> object that represents the function in the new location.
virtual PI_FUNC & Copy(void * buffer) = 0;
// Base address of the function's code range.
virtual void * Start() const = 0;
// Size of the function's code range.
virtual size_t Size() const = 0;
// Max. size of the function's code range
static const size_t MAX_SIZE = 8192;
};
#endif //RUNNABLE_H
/* ===================================================================== */
/* eof */
/* ===================================================================== */
|
cfcb4a676029f661da42f1515d260da905a7eac3
|
9bfad29a2deedc5850530e129f6abafc98f64961
|
/Model_Widget_w_FileReaderClass/filereader.h
|
6d1e9d97e98ab984f8e134ed62900a4c20deef3e
|
[] |
no_license
|
alex-adam/Task
|
cca3f28d6315f09b50466ccd1a7d76f283748963
|
9603d1d12c318842b237823978bda11edb373af1
|
refs/heads/master
| 2020-06-05T09:38:18.525867
| 2015-09-16T00:36:46
| 2015-09-16T00:36:46
| 42,554,222
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 240
|
h
|
filereader.h
|
#ifndef FILEREADER_H
#define FILEREADER_H
#include <QString>
#include <filemodel.h>
class FileReader
{
public:
FileReader();
void fill_model(QString path);
FileModel model_;
signals:
public slots:
};
#endif // FILEREADER_H
|
74946085d287a8bfb1a9fed6d3fab466090fe080
|
bddb40149f9028297d9b4f3f6b77514cadac9bca
|
/Source/FRC_Source/WindRiver/2011/FRC_2011/FRC2011_Robot.h
|
f1ab7f195439d8f88b4ca863d49353c22d4199e1
|
[] |
no_license
|
JamesTerm/GremlinGames
|
91d61a50d0926b8e95cad21053ba2cf6c3316003
|
fd0366af007bff8cffe4941b4bb5bb16948a8c66
|
refs/heads/master
| 2021-10-20T21:15:53.121770
| 2019-03-01T15:45:58
| 2019-03-01T15:45:58
| 173,261,435
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,349
|
h
|
FRC2011_Robot.h
|
#pragma once
class FRC_2011_Control_Interface : public Tank_Drive_Control_Interface,
public Robot_Control_Interface,
public Arm_Control_Interface
{
public:
//This is primarily used for updates to dashboard and driver station during a test build
virtual void Robot_Control_TimeChange(double dTime_s)=0;
//We need to pass the properties to the Robot Control to be able to make proper conversions.
//The client code may cast the properties to obtain the specific data
virtual void Initialize(const Entity_Properties *props)=0;
};
///This is a specific robot that is a robot tank and is composed of an arm, it provides addition methods to control the arm, and applies updates to
///the Robot_Control_Interface
class FRC_2011_Robot : public Tank_Robot
{
public:
enum SolenoidDevices
{
eDeployment,
eClaw,
eRist
};
enum SpeedControllerDevices
{
eArm,
eRollers
};
FRC_2011_Robot(const char EntityName[],FRC_2011_Control_Interface *robot_control,bool UseEncoders=false);
IEvent::HandlerList ehl;
virtual void Initialize(Entity2D_Kind::EventMap& em, const Entity_Properties *props=NULL);
virtual void ResetPos();
virtual void TimeChange(double dTime_s);
void CloseDeploymentDoor(bool Close);
//TODO test roller using is angular to be true
class Robot_Claw : public Ship_1D
{
public:
Robot_Claw(const char EntityName[],Robot_Control_Interface *robot_control);
IEvent::HandlerList ehl;
//public access needed for goals
void CloseClaw(bool Close);
//Using meaningful terms to assert the correct direction at this level
void Grip(bool on);
void Squirt(bool on);
protected:
//Intercept the time change to send out voltage
virtual void TimeChange(double dTime_s);
virtual void BindAdditionalEventControls(bool Bind);
private:
#ifndef Robot_TesterCode
typedef Ship_1D __super;
#endif
//events are a bit picky on what to subscribe so we'll just wrap from here
void SetRequestedVelocity_FromNormalized(double Velocity) {__super::SetRequestedVelocity_FromNormalized(Velocity);}
Robot_Control_Interface * const m_RobotControl;
bool m_Grip,m_Squirt;
};
class Robot_Arm : public Ship_1D
{
public:
Robot_Arm(const char EntityName[],Arm_Control_Interface *robot_control,size_t InstanceIndex=0);
IEvent::HandlerList ehl;
//The parent needs to call initialize
virtual void Initialize(Entity2D_Kind::EventMap& em,const Entity1D_Properties *props=NULL);
static double HeightToAngle_r(double Height_m);
static double Arm_AngleToHeight_m(double Angle_r);
static double AngleToHeight_m(double Angle_r);
static double GetPosRest();
//given the raw potentiometer converts to the arm angle
static double PotentiometerRaw_To_Arm_r(double raw);
void CloseRist(bool Close);
virtual void ResetPos();
protected:
//Intercept the time change to obtain current height as well as sending out the desired velocity
virtual void TimeChange(double dTime_s);
virtual void BindAdditionalEventControls(bool Bind);
virtual void PosDisplacementCallback(double posDisplacement_m);
private:
#ifndef Robot_TesterCode
typedef Ship_1D __super;
#endif
//events are a bit picky on what to subscribe so we'll just wrap from here
void SetRequestedVelocity_FromNormalized(double Velocity) {__super::SetRequestedVelocity_FromNormalized(Velocity);}
void SetPotentiometerSafety(double Value);
void SetPosRest();
void SetPos0feet();
void SetPos3feet();
void SetPos6feet();
void SetPos9feet();
Arm_Control_Interface * const m_RobotControl;
const size_t m_InstanceIndex;
PIDController2 m_PIDController;
double m_LastPosition; //used for calibration
double m_CalibratedScaler; //used for calibration
double m_LastTime; //used for calibration
double m_MaxSpeedReference; //used for calibration
bool m_UsingPotentiometer; //dynamically able to turn off (e.g. panic button)
bool m_VoltageOverride; //when true will kill voltage
};
//Accessors needed for setting goals
Robot_Arm &GetArm() {return m_Arm;}
Robot_Claw &GetClaw() {return m_Claw;}
protected:
virtual void BindAdditionalEventControls(bool Bind);
private:
#ifndef Robot_TesterCode
typedef Tank_Robot __super;
#endif
FRC_2011_Control_Interface * const m_RobotControl;
Robot_Arm m_Arm;
Robot_Claw m_Claw;
bool m_VoltageOverride; //when true will kill voltage
};
#ifdef Robot_TesterCode
///This class is a dummy class to use for simulation only. It does however go through the conversion process, so it is useful to monitor the values
///are correct
class FRC_2011_Robot_Control : public FRC_2011_Control_Interface
{
public:
FRC_2011_Robot_Control();
//This is only needed for simulation
protected: //from Robot_Control_Interface
virtual void UpdateVoltage(size_t index,double Voltage);
virtual void CloseSolenoid(size_t index,bool Close);
virtual void OpenSolenoid(size_t index,bool Open) {CloseSolenoid(index,!Open);}
protected: //from Tank_Drive_Control_Interface
virtual void Reset_Encoders() {m_pTankRobotControl->Reset_Encoders();}
virtual void GetLeftRightVelocity(double &LeftVelocity,double &RightVelocity) {m_pTankRobotControl->GetLeftRightVelocity(LeftVelocity,RightVelocity);}
//Unfortunately the actual wheels are reversed (resolved here since this is this specific robot)
virtual void UpdateLeftRightVoltage(double LeftVoltage,double RightVoltage) {m_pTankRobotControl->UpdateLeftRightVoltage(RightVoltage,LeftVoltage);}
virtual void Tank_Drive_Control_TimeChange(double dTime_s) {m_pTankRobotControl->Tank_Drive_Control_TimeChange(dTime_s);}
protected: //from Arm Interface
virtual void Reset_Arm(size_t index=0);
virtual void UpdateArmVoltage(size_t index,double Voltage) {UpdateVoltage(FRC_2011_Robot::eArm,Voltage);}
//pacify this by returning its current value
virtual double GetArmCurrentPosition(size_t index);
virtual void CloseRist(bool Close) {CloseSolenoid(FRC_2011_Robot::eRist,Close);}
virtual void OpenRist(bool Close) {CloseSolenoid(FRC_2011_Robot::eRist,!Close);}
protected: //from FRC_2011_Control_Interface
//Will reset various members as needed (e.g. Kalman filters)
virtual void Robot_Control_TimeChange(double dTime_s);
virtual void Initialize(const Entity_Properties *props);
protected:
Tank_Robot_Control m_TankRobotControl;
Tank_Drive_Control_Interface * const m_pTankRobotControl; //This allows access to protected members
double m_ArmMaxSpeed;
Potentiometer_Tester m_Potentiometer; //simulate a real potentiometer for calibration testing
KalmanFilter m_KalFilter_Arm;
//cache voltage values for display
double m_ArmVoltage,m_RollerVoltage;
bool m_Deployment,m_Claw,m_Rist;
};
///This is only for the simulation where we need not have client code instantiate a Robot_Control
class FRC_2011_Robot_UI : public FRC_2011_Robot, public FRC_2011_Robot_Control
{
public:
FRC_2011_Robot_UI(const char EntityName[]) : FRC_2011_Robot(EntityName,this),FRC_2011_Robot_Control(),
m_TankUI(this) {}
protected:
virtual void TimeChange(double dTime_s)
{
__super::TimeChange(dTime_s);
m_TankUI.TimeChange(dTime_s);
}
virtual void Initialize(Entity2D::EventMap& em, const Entity_Properties *props=NULL)
{
__super::Initialize(em,props);
m_TankUI.Initialize(em,props);
}
protected: //from EntityPropertiesInterface
virtual void UI_Init(Actor_Text *parent) {m_TankUI.UI_Init(parent);}
virtual void custom_update(osg::NodeVisitor *nv, osg::Drawable *draw,const osg::Vec3 &parent_pos)
{m_TankUI.custom_update(nv,draw,parent_pos);}
virtual void Text_SizeToUse(double SizeToUse) {m_TankUI.Text_SizeToUse(SizeToUse);}
virtual void UpdateScene (osg::Geode *geode, bool AddOrRemove) {m_TankUI.UpdateScene(geode,AddOrRemove);}
private:
Tank_Robot_UI m_TankUI;
};
#endif
class FRC_2011_Robot_Properties : public Tank_Robot_Properties
{
public:
FRC_2011_Robot_Properties();
//I'm not going to implement script support mainly due to lack of time, but also this is a specific object that
//most likely is not going to be sub-classed (i.e. sealed)... if this turns out different later we can implement
//virtual void LoadFromScript(GG_Framework::Logic::Scripting::Script& script);
const Ship_1D_Properties &GetArmProps() const {return m_ArmProps;}
const Ship_1D_Properties &GetClawProps() const {return m_ClawProps;}
private:
Ship_1D_Properties m_ArmProps,m_ClawProps;
};
namespace FRC_2011_Goals
{
class Goal_OperateSolenoid : public AtomicGoal
{
private:
FRC_2011_Robot &m_Robot;
const FRC_2011_Robot::SolenoidDevices m_SolenoidDevice;
bool m_Terminate;
bool m_IsClosed;
public:
Goal_OperateSolenoid(FRC_2011_Robot &robot,FRC_2011_Robot::SolenoidDevices SolenoidDevice,bool Close);
virtual void Activate() {m_Status=eActive;}
virtual Goal_Status Process(double dTime_s);
virtual void Terminate() {m_Terminate=true;}
};
Goal *Get_TestLengthGoal(FRC_2011_Robot *Robot);
Goal *Get_UberTubeGoal(FRC_2011_Robot *Robot);
}
|
7f6a1ed4f1b4fc9bc46111cb2d6af399ec8f79ba
|
570150546b2c2ba928074c362cb0211dfe92b215
|
/.vs/Love Babbar Sheet/Queue/tut11.cpp
|
54de0edad1b8c4b4d6535e0e6e2f84ef54c9c838
|
[] |
no_license
|
gutaussehend-Harshal/CPP-and-DSA-practice-questions
|
391782ce20a3c1b9ab69d651482518694fabff31
|
0d6c4500ecad6295683c9c2753482e74131b443c
|
refs/heads/main
| 2023-07-18T05:48:24.158391
| 2021-09-05T04:36:43
| 2021-09-05T04:36:43
| 403,214,869
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 560
|
cpp
|
tut11.cpp
|
#include <bits/stdc++.h>
using namespace std;
// Reverse sentence using stack -->
void reverseSentence(string s)
{
stack<string> st;
for (int i = 0; i < s.length(); i++)
{
string result = "";
while (s[i] != ' ' && i < s.length())
{
result += s[i];
i++;
}
st.push(result);
}
while (!st.empty())
{
cout << st.top() << " ";
st.pop();
}
}
int main()
{
system("CLS");
string s = "Hey how are you doing?";
reverseSentence(s);
return 0;
}
|
682a0cd35be4a76d0b7e3bf4258025d77ee9b99e
|
86bc88eafbce6f933c42910c1ba43eac926c0534
|
/battledialog.h
|
40bd7e6071030c34de2167a8fdcc112032e0c303
|
[] |
no_license
|
gagrigoryan/qt_practice
|
fe3709cbc27ca79a420fee82bd4d56d9ae659622
|
850e6f77c42979192d5d2702e365a889fafdafa3
|
refs/heads/master
| 2022-11-18T09:18:28.392287
| 2020-06-28T17:54:47
| 2020-06-28T17:54:47
| 275,585,814
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 596
|
h
|
battledialog.h
|
#ifndef BATTLEDIALOG_H
#define BATTLEDIALOG_H
#include <QDialog>
#include <QMessageBox>
#include "battle.h"
namespace Ui {
class BattleDialog;
}
class BattleDialog : public QDialog
{
Q_OBJECT
public:
explicit BattleDialog(Battle *battle, QWidget *parent = nullptr);
~BattleDialog();
public slots:
void battleHit(Actor *from, Actor *to, int damage);
private slots:
void on_attackBtn_clicked();
void battleFinished(Actor *winner, Actor *looser);
private:
Ui::BattleDialog *ui;
Battle *battle;
signals:
void run(int room);
};
#endif // BATTLEDIALOG_H
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.