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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0a418f03bca9731f320304bff1bbd974c346d026
|
67eda6a2ca7ec42ab992cc8e97853e9f41160740
|
/A-Star/Node.cpp
|
bb2f4ca97f6fe4e95eb96004f421cd84e8cb7f02
|
[] |
no_license
|
Foiros/MyGOAP
|
df0e7ab659d97807a2b83e1ae103c23b7884036d
|
11c53614e03501cf845f33b3d2a843e63bbc5ab6
|
refs/heads/main
| 2023-08-06T20:29:43.148262
| 2021-10-08T11:22:47
| 2021-10-08T11:22:47
| 414,592,824
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,784
|
cpp
|
Node.cpp
|
//
// Created by arttu on 07/10/2021.
//
#include "Node.h"
Node::Node() = default;
Node::Node(int x, int y, bool _walkable, Node* _prev_node) :
location_x(x), location_y(y), walkable(_walkable), prev_node(_prev_node){
}
Node::~Node() = default;
void Node::Determine_Neighbors(int id) {
int first_neighbor = 0;
int second_neighbor = 0;
if(id == 0){
first_neighbor = 233 ;
second_neighbor = id + 1;
}
else if (id == 233){
first_neighbor = 0;
second_neighbor = id - 1;
}
else{
first_neighbor = id - 1;
second_neighbor = id + 1;
}
neighbors.push_back(first_neighbor);
neighbors.push_back(second_neighbor);
}
std::vector<int> Node::Get_Neighbors() const{
return neighbors;
}
float Node::Get_G() const{
// Just compute previous nodes and return cost to travel from start to this node
float res = 0.0f;
const Node* scan = this;
while (scan->prev_node) {
res += 1.0f;
scan = scan->prev_node;
}
return res;
}
float Node::Get_H(Node* end_node) const{
// For heuristic, use euclidean length of the vector from this node to end position.
auto dx = float(end_node->location_x - location_x);
auto dy = float(end_node->location_y - location_y);
return sqrtf((dx * dx) + (dy * dy));
}
float Node::Get_F(Node* end_node) const{
// F = G + H
return Get_G() + Get_H(end_node);
}
bool Node::In_Bounds(int width, int height){
if(location_x <= width && location_x>= -width && location_y <= height && location_y >= -height)
return true;
else
return false;
//return 0 <= id.locationX && id.locationX < width && 0 <= id.locationY && id.locationY < height;
}
bool Node::Walkable(){
return walkable;
}
|
34decc3b2dff7517f00928810f985f6756667e15
|
e33c16e84d5f558786ffc583718e782cd49b5dd8
|
/src/mol_sys.cpp
|
50957941b8c0348034a2ca7336c46c98b4d1d08e
|
[
"MIT"
] |
permissive
|
d-SEAMS/seams-core
|
fa4eaa14be9059f2a0fb87f2725866290d0ebe94
|
e42be0a1f28de2f8d6b44b6cf97e20cc4c058266
|
refs/heads/main
| 2023-08-31T02:01:40.889157
| 2023-08-23T19:38:29
| 2023-08-23T19:38:29
| 164,746,444
| 29
| 6
|
MIT
| 2023-08-23T19:38:30
| 2019-01-08T22:50:43
|
C++
|
UTF-8
|
C++
| false
| false
| 5,283
|
cpp
|
mol_sys.cpp
|
//-----------------------------------------------------------------------------------
// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
//
// Copyright (c) 2018--present d-SEAMS core team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the MIT License as published by
// the Open Source Initiative.
//
// A copy of the MIT License is included in the LICENSE file of this repository.
// You should have received a copy of the MIT License along with this program.
// If not, see <https://opensource.org/licenses/MIT>.
//-----------------------------------------------------------------------------------
#include <iostream>
#include <memory>
#include <mol_sys.hpp>
/**
* @details Function for clearing PointCloud if it is already
* filled. This should be called before every frame is read in.
* @param[out] yCloud The cleared PointCloud
*/
molSys::PointCloud<molSys::Point<double>, double> molSys::clearPointCloud(
molSys::PointCloud<molSys::Point<double>, double> *yCloud) {
//
std::vector<molSys::Point<double>> tempPts;
std::vector<double> tempBox;
//
std::vector<double> tempBox1;
tempPts.swap(yCloud->pts);
tempBox.swap(yCloud->box);
tempBox1.swap(yCloud->boxLow);
yCloud->idIndexMap.clear();
return *yCloud;
}
/**
* @details Function for creating an unordered map with the atomIDs in the
* pointCloud as the keys and the molecular IDs as the values
*/
std::unordered_map<int, int> molSys::createIDMolIDmap(
molSys::PointCloud<molSys::Point<double>, double> *yCloud) {
std::unordered_map<int, int>
idMolIDmap; // atom IDs as keys and mol IDs as values
int iatomMolID; // molID of the current iatom
int iatomID; // atom ID of the current iatom
// Loop through the atoms in yCloud
for (int iatom = 0; iatom < yCloud->nop; iatom++) {
iatomID = yCloud->pts[iatom].atomID; // atom ID
iatomMolID = yCloud->pts[iatom].molID; // molecular ID
// Update the unordered map
idMolIDmap[iatomID] = iatomMolID;
} // end of loop through every iatom in pointCloud
return idMolIDmap;
}
/**
* @details Function for creating an unordered map with the atomIDs in the
* pointCloud as the keys and the molecular IDs as the values. More than one atom
* can have the same molecule ID.
*/
std::unordered_multimap<int, int> molSys::createMolIDAtomIDMultiMap(
molSys::PointCloud<molSys::Point<double>, double> *yCloud) {
std::unordered_multimap<int, int>
molIDAtomIDmap; // atom IDs as keys and mol IDs as values
int iatomMolID; // molID of the current iatom
int iatomID; // atom ID of the current iatom
// Loop through the atoms in yCloud
for (int iatom = 0; iatom < yCloud->nop; iatom++) {
iatomID = yCloud->pts[iatom].atomID; // atom ID
iatomMolID = yCloud->pts[iatom].molID; // molecular ID
// Update the unordered multimap
molIDAtomIDmap.emplace(iatomMolID,iatomID);
} // end of loop through every iatom in pointCloud
return molIDAtomIDmap;
}
/**
* @details Function that returns a vector of vectors, which contains the
* hydrogen atoms for each molID in the oxygen atom pointCloud
*/
std::vector<std::vector<int>> molSys::hAtomMolList(
molSys::PointCloud<molSys::Point<double>, double> *hCloud,
molSys::PointCloud<molSys::Point<double>, double> *oCloud) {
std::vector<std::vector<int>>
hMolList; // the first column contains the molecular IDs, and the next
// two elements in the row are the hydrogen bond atoms in the
// molecule
int iMolID; // Current molecular ID
int nHatoms; // No. of h atoms found for a particular molID.
for (int iatom = 0; iatom < oCloud->nop; iatom++) {
// Get the molID
iMolID = oCloud->pts[iatom].molID;
hMolList.push_back(std::vector<int>()); // Empty vector for the index iatom
// Fill the first element with the molecular ID
hMolList[iatom].push_back(iMolID);
nHatoms = 0; // init (no. of h atoms for the particular molID)
// Now search through the hydrogen atom pointCloud for this particular molID
for (int jatom = 0; jatom < hCloud->nop; jatom++) {
if (hCloud->pts[jatom].molID == iMolID) {
hMolList[iatom].push_back(jatom); // fill the hatom index
nHatoms++;
// If the two hydrogens have been found, break out of the loop
if (nHatoms == 2) {
break;
} // end of break
} // end of check to see if jatom is part of iMolID
} // end of loop through the hydrogen atom pointCloud
} // end of looping through every oxygen atom
return hMolList;
} // end of function
/**
* @details Function for searching a vector of vectors for a particular
* molecular ID, and
* @returns the index found in molList
* @returns -1 if not found
*/
int molSys::searchMolList(std::vector<std::vector<int>> molList,
int molIDtoFind) {
int index = -1; // init invalid index
for (int iatom = 0; iatom < molList.size(); iatom++) {
// If the molecular ID is equal, return the index in the array
if (molList[iatom][0] == molIDtoFind) {
index = iatom;
return index;
} // end of check
} // end of looping through iatom
return index;
}
|
f8b6e19b7c41256ca2c3fb39fa5868fa69eb5e09
|
1f86dd67b457848e70e1bc07f33562e7dd5f99e3
|
/LightOJ/1080/9861233_AC_260ms_2332kB.cpp
|
3bcf7e101c1d7b31a70e16523da771fad1367f41
|
[] |
no_license
|
osmansajid/Contest-Problems
|
96be8994dc119f128a3b011e18f8f1c5ab93a67c
|
7036e432b1e477fda3d5a129e15cbb27f5ec0292
|
refs/heads/master
| 2022-07-08T19:47:25.106766
| 2022-06-12T19:51:01
| 2022-06-12T19:51:01
| 216,519,325
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,132
|
cpp
|
9861233_AC_260ms_2332kB.cpp
|
#include<bits/stdc++.h>
using namespace std;
int tree[100000];
int sum(int indx)
{
int sum = 0;
while (indx){
sum += tree[indx];
indx -= indx & -indx;
}
return sum;
}
//updates->
void update(int indx,int n, int val){
while (indx <= n){
tree[indx] += val;
indx += indx & (-indx);
}
}
int main()
{
int t,tc=0;
scanf("%d",&t);
while(t--){
memset(tree,0,sizeof tree);
string s;
cin>>s;
int n=s.size();
int q;
scanf("%d",&q);
printf("Case %d:\n",++tc);
while(q--){
getchar();
char ch;
scanf("%c",&ch);
if(ch=='I'){
int a,b,x;
scanf("%d %d",&a,&b);
update(a,n,1);
update(b+1,n,-1);
}
else{
int a,x;
scanf("%d",&a);
if(sum(a)%2==0){
printf("%d\n",s[a-1]-'0');
}
else{
printf("%d\n",1-(s[a-1]-'0'));
}
}
}
}
}
|
70a991c2251c229f6525475605004bb802595311
|
580bc10730634fe80190df0856b5c2293b63a262
|
/invert.cpp
|
a6242d5b6c73d804fd473cc9c26ab88b20e95e72
|
[] |
no_license
|
hnguyen257/Multicore_term_project
|
6a5207bf03a93f2f6b03a17e95625425bccdd031
|
04397c885ec7d1451b82c004c46c394835363344
|
refs/heads/master
| 2022-04-23T21:48:57.254303
| 2020-04-29T03:57:45
| 2020-04-29T03:57:45
| 258,048,436
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 932
|
cpp
|
invert.cpp
|
#include <iostream>
#include <string>
#include "determinant.h"
#include "gauss_jordan.h"
#include "invert.h"
using namespace std;
double** invert(double const* const* input, int size)
{
if (determinant(input, size) == 0)
{
cout << "Error: matrices with determinants of 0 are not invertible." << endl;
return NULL;
}
double** copy = new double* [size];
#pragma omp parallel for
for (int i = 0; i < size; i++)
{
copy[i] = new double[size * 2];
memcpy(copy[i], input[i], size * sizeof(double));
#pragma omp parallel for
for (int j = 0; j < size; j++)
{
if (j == i)
{
copy[i][j + size] = 1;
}
else
{
copy[i][j + size] = 0;
}
}
}
gauss_jordan(copy, size, size, size * 2);
#pragma omp parallel for
for (int i = 0; i < size; i++)
{
double* temp = new double[size];
memcpy(temp, copy[i] + size, size * sizeof(double));
delete[] copy[i];
copy[i] = temp;
}
return copy;
}
|
98b3734a10bb1f42e79c0d1962db8660323cc3bd
|
ed444c4a0ed1fe679da64b81ec6aa1ddf885a185
|
/Tool/ProtocolCreate/Creater/ProtocolCreater.cpp
|
da0dd4cb670cbb55a2f11186fc49944c00d4c83c
|
[] |
no_license
|
swaphack/CodeLib
|
54e07db129d38be0fd55504ef917bbe522338aa6
|
fff8ed54afc334e1ff5e3dd34ec5cfcf6ce7bdc9
|
refs/heads/master
| 2022-05-16T20:31:45.123321
| 2022-05-12T03:38:45
| 2022-05-12T03:38:45
| 58,099,874
| 1
| 0
| null | 2016-05-11T09:46:07
| 2016-05-05T02:57:24
|
C++
|
UTF-8
|
C++
| false
| false
| 1,444
|
cpp
|
ProtocolCreater.cpp
|
#include "ProtocolCreater.h"
#include "IProtocolFile.h"
ProtocolCreater::ProtocolCreater()
{
}
ProtocolCreater::~ProtocolCreater()
{
this->clearProtocols();
}
void ProtocolCreater::addProtocol(IProtocolFile* pProtocol)
{
if (pProtocol == nullptr)
{
return;
}
m_vecProtocols.push_back(pProtocol);
}
void ProtocolCreater::removeProtocol(IProtocolFile* pProtocol)
{
if (pProtocol == nullptr)
{
return;
}
std::vector<IProtocolFile*>::iterator itr = m_vecProtocols.begin();
while (itr != m_vecProtocols.end())
{
if (*itr == pProtocol)
{
delete *itr;
m_vecProtocols.erase(itr);
break;
}
itr++;
}
}
bool ProtocolCreater::existsProtocol(IProtocolFile* pProtocol)
{
if (pProtocol == nullptr)
{
return false;
}
std::vector<IProtocolFile*>::const_iterator itr = m_vecProtocols.begin();
while (itr != m_vecProtocols.end())
{
if (*itr == pProtocol)
{
return true;
}
itr++;
}
return false;
}
void ProtocolCreater::clearProtocols()
{
std::vector<IProtocolFile*>::iterator itr = m_vecProtocols.begin();
while (itr != m_vecProtocols.end())
{
delete *itr;
itr++;
}
m_vecProtocols.clear();
}
void ProtocolCreater::Flush(XMLDocument* pDocument)
{
std::vector<IProtocolFile*>::iterator itr = m_vecProtocols.begin();
while (itr != m_vecProtocols.end())
{
if (!(*itr)->loadPackets(pDocument))
{
printf("Create File %s Failure\n", (*itr)->createFileName());
}
itr++;
}
}
|
65de0332eb429a24237a880bbd08b1fec16b132b
|
955fa8aced85fe5c2279f23615ff190e5bab5884
|
/netconn_tcp_server.cpp
|
352e9d2a5b20ae5760efa35e7549b314fa035c4f
|
[] |
no_license
|
pushkar/cshm-net
|
0b6de29c130d74f25dd5188e19e4c6cd556d6c34
|
5a24af965573990ae5059109fc8b1673a1753497
|
refs/heads/master
| 2020-05-19T19:44:29.510877
| 2010-04-09T21:55:14
| 2010-04-09T21:55:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,304
|
cpp
|
netconn_tcp_server.cpp
|
#include "netconn.h"
#include "netconn_tcp_server.h"
#include <achshm.h>
#include <cshm.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
TCPServer::TCPServer(const char* port, const char* _channel_name) {
channel_name = new char[100];
memcpy(channel_name, _channel_name, 100);
receive_port = new char[20];
memcpy(receive_port, port, 20);
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE; // use my IP
sin_size = sizeof client_addr;
}
gnet_error TCPServer::SendStream(void *buffer, size_t buffer_size) {
send(new_fd, buffer, buffer_size, 0);
return GNET_OK;
}
gnet_error TCPServer::Listen() {
if (listen(socket_fd, 10) == -1) {
perror("listen");
return GNET_LISTEN_FAILED;
}
new_fd = accept(socket_fd, (struct sockaddr*)&client_addr, &sin_size);
if(new_fd == -1)
return GNET_SEND_ERROR;
return GNET_OK;
}
gnet_error TCPServer::Link() {
if(Listen() != GNET_OK)
return GNET_LISTEN_FAILED;
ach = new cshmSubscriber(channel_name);
err = ach->open();
if(err != ACH_OK) {
cshm_error_cstr(err);
return GNET_SUBSCRIPTION_ERROR;
}
frame_size = ach->getFrameSize();
frame_header_size = sizeof(cshm_buffer_info_t);
unsigned char* buffer = new unsigned char[frame_size + frame_header_size];
unsigned char* header = buffer + frame_size;
size_t buffer_size = frame_size + frame_header_size;
// TODO: Add zeros to buffer
while(1) {
err = ach->getNext(buffer, &info);
if(err == ACH_OK) {
memcpy(header, &info, frame_header_size);
SendStream(buffer, buffer_size);
}
else
cshm_error_cstr(err);
}
free(buffer);
return GNET_OK;
}
gnet_error TCPServer::LinkLatest() {
if(Listen() != GNET_OK)
return GNET_LISTEN_FAILED;
ach = new cshmSubscriber(channel_name);
err = ach->open();
if(err != ACH_OK) {
cshm_error_cstr(err);
return GNET_SUBSCRIPTION_ERROR;
}
frame_size = ach->getFrameSize();
frame_header_size = sizeof(cshm_buffer_info_t);
unsigned char* buffer = new unsigned char[frame_size + frame_header_size];
unsigned char* header = buffer + frame_size;
size_t buffer_size = frame_size + frame_header_size;
// TODO: Add zeros to buffer
while(1) {
err = ach->getLatest(buffer, &info);
if(err == ACH_OK) {
memcpy(header, &info, frame_header_size);
SendStream(buffer, buffer_size);
}
else
cshm_error_cstr(err);
}
free(buffer);
return GNET_OK;
}
gnet_error TCPServer::Connect() {
if((rv = getaddrinfo(NULL, receive_port, &hints, &p)) != 0)
return GNET_GETADDR_FAILED;
if ((socket_fd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1)
return GNET_SOCKET_FAILED;
if (setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1) {
close(socket_fd);
return GNET_SOCKET_FAILED; // socket reset failed
}
if (bind(socket_fd, p->ai_addr, p->ai_addrlen) == -1) {
close(socket_fd);
return GNET_SOCKET_FAILED; // socket binding failed
}
if(p == NULL)
return GNET_CONNECTION_FAILED;
return GNET_OK;
}
void TCPServer::Close() {
free(p);
close(new_fd);
close(socket_fd);
}
TCPServer::~TCPServer() {
Close();
}
|
ae13fea2125b2544efbb16c2e5ffd93079492d14
|
91b307496cd9e674f44c8529ab7f8aed2c65974c
|
/NBT.h
|
889ebb5fbefef54f372645833c41242b70f8f13c
|
[] |
no_license
|
qtx0213/MinecraftToRoblox
|
f5247bdb5afb4202fd4ba71cb6a654208c13349f
|
22ab6f63a5e884e97b28d250670e4dbd202467ff
|
refs/heads/master
| 2022-04-05T23:50:06.748037
| 2013-12-10T17:53:53
| 2013-12-10T17:53:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,923
|
h
|
NBT.h
|
#pragma once
#include <string>
#include <vector>
#define SIMPLE_NBT
#ifdef SIMPLE_NBT
class ChunkSection{
public:
unsigned char y;
std::vector<unsigned char> blocks;
ChunkSection();
ChunkSection(ChunkSection&& other) throw();
};
class WorldInfo{
public:
int x;
int z;
std::vector<ChunkSection> sections;
WorldInfo(const unsigned char*& data);
};
#else
class NBT_Payload{
public:
virtual ~NBT_Payload();
};
class NBT_Tag{
public:
unsigned char id;
std::string name;
NBT_Tag* operator[](std::string child);
NBT_Payload* payload;
NBT_Tag(const unsigned char*& data);
~NBT_Tag();
};
class NBT_Byte:public NBT_Payload{
public:
signed char data;
NBT_Byte(const unsigned char*& data);
};
class NBT_Short:public NBT_Payload{
public:
signed short data;
NBT_Short(const unsigned char*& data);
};
class NBT_Int:public NBT_Payload{
public:
signed int data;
NBT_Int(const unsigned char*& data);
};
class NBT_Long:public NBT_Payload{
public:
signed long long data;
NBT_Long(const unsigned char*& data);
};
class NBT_Float:public NBT_Payload{
public:
float data;
NBT_Float(const unsigned char*& data);
};
class NBT_Double:public NBT_Payload{
public:
double data;
NBT_Double(const unsigned char*& data);
};
class NBT_Byte_Array:public NBT_Payload{
public:
std::vector<signed char> data;
NBT_Byte_Array(const unsigned char*& data);
};
class NBT_String:public NBT_Payload{
public:
std::string data;
NBT_String(const unsigned char*& data);
};
class NBT_List:public NBT_Payload{
public:
unsigned char id;
std::vector<NBT_Payload*> data;
NBT_List(const unsigned char*& data);
~NBT_List();
};
class NBT_Compound:public NBT_Payload{
public:
std::vector<NBT_Tag*> data;
NBT_Tag* operator[](std::string child);
NBT_Compound(const unsigned char*& data);
~NBT_Compound();
};
class NBT_Int_Array:public NBT_Payload{
public:
std::vector<int> data;
NBT_Int_Array(const unsigned char*& data);
};
#endif
|
22c24a03c353356f4acb63555827cb2f1426b66c
|
a4058d50eb7ec5e489a766c44ee43a5c72080a73
|
/multi-school/2019/C3/_11.cc
|
be5044b8222c5872617554b8ee382afab00a7dee
|
[] |
no_license
|
AkibaSummer/programs
|
7e25d40aeab6851c42bd739c00a55bd6e99f5b45
|
ef8c0513435a81a121097bc34dfc6d023b342415
|
refs/heads/master
| 2022-10-28T08:27:22.408688
| 2022-10-03T16:01:17
| 2022-10-03T16:01:17
| 148,867,608
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,858
|
cc
|
_11.cc
|
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
const long long maxn=2000005;
struct link{
long long target,weight;
};
struct que_node{
long long dis1,id;
bool operator < (const que_node &r)const{
return dis1==r.dis1?id>r.id:dis1>r.dis1;
}
};
struct dp_node{
long long dis1,dis0;
};
struct edge {
long long nx,w,to;
}e[maxn * 2];
long long head[maxn], mal;
void init(long long n) {
memset(head,0,sizeof(long long)*(n+1));
mal = 1;
}
void addedge(long long u, long long v, long long w) {
e[mal].to = v; e[mal].w = w; e[mal].nx = head[u]; head[u] = mal ++;
}
void addedges(long long u, long long v, long long w) {
addedge(u,v,w);
addedge(v,u,w);
}
// vector<link> links[maxn];
long long deg[maxn];
long long vis[maxn];
dp_node dp[maxn];
void slove(){
long long n;
scanf("%lld",&n);
init(n);
for (long long i=1;i<=n;i++){
deg[i]=0;
vis[i]=0;
// links[i].clear();
dp[i]={0,0};
}
for (long long i=1;i<n;i++){
long long q,w,e;
scanf("%lld%lld%lld",&q,&w,&e);
deg[q]++;
deg[w]++;
addedges(q,w,e);
// links[q].push_back({w,e});
// links[w].push_back({q,e});
}
long long num=n;
priority_queue<que_node> que;
for (long long i=1;i<=n;i++){
if (deg[i]==1){
vis[i]=1;
que.push({0,i});
num--;
}
}
que_node temp;
while (num!=0){
temp=que.top();
que.pop();
for(long long ii = head[temp.id]; ii ; ii = e[ii].nx) {
long long v = e[ii].to, w = e[ii].w;
link i={v,w};
if (!vis[i.target]){
deg[i.target]--;
dp[i.target].dis0=max(dp[i.target].dis0,dp[temp.id].dis0+i.weight);
dp[i.target].dis1=max(dp[i.target].dis1,min(dp[temp.id].dis0,dp[temp.id].dis1+i.weight));
if (deg[i.target]==1){
vis[i.target]=1;
que.push({dp[i.target].dis1,i.target});
num--;
}
}
}
// for (auto &i:links[temp.id]){
// if (!vis[i.target]){
// deg[i.target]--;
// dp[i.target].dis0=max(dp[i.target].dis0,dp[temp.id].dis0+i.weight);
// dp[i.target].dis1=max(dp[i.target].dis1,min(dp[temp.id].dis0,dp[temp.id].dis1+i.weight));
// if (deg[i.target]==1){
// vis[i.target]=1;
// que.push({dp[i.target].dis1,i.target});
// num--;
// }
// }
// }
}
// cout<<que.size()<<endl;
long long node1=que.top().id;
que.pop();
long long node2=que.top().id;
long long distance;
for(long long i = head[node1]; i ; i = e[i].nx) {
long long v = e[i].to, w = e[i].w;
if (v==node2){
distance=w;
break;
}
}
// for (auto &i:links[node1]){
// if (i.target==node2){
// distance=i.weight;
// break;
// }
// }
long long ans = 1<<30,node;
if (max(dp[node1].dis0,dp[node2].dis0)<=ans){
ans = max(dp[node1].dis0,dp[node2].dis0);
node = min(node1,node2);
}
if (max(dp[node1].dis0,dp[node2].dis1+distance)<=ans){
ans = max(dp[node1].dis0,dp[node2].dis1+distance);
node = node1;
}
if (max(dp[node2].dis0,dp[node1].dis1+distance)<=ans){
ans = max(dp[node2].dis0,dp[node1].dis1+distance);
node = node2;
}
printf("%lld %lld\n",node,ans);
// cout<<node<<' '<<ans<<endl;
// for (long long i=1;i<=n;i++){
// cout<<dp[i].dis0<<' '<<dp[i].dis1<<endl;
// }
}
int main(){
long long t;
scanf("%lld",&t);
while (t--){
slove();
}
}
|
a09c5ded7396717a130f68feaeec0c3e6772bc9e
|
c70a973995dc7aed32e2d2d1d93d59f1393df1c8
|
/lg2392.cpp
|
88cf0251c6caf034c907a111c08928d810894b74
|
[] |
no_license
|
iwtbam/iwtbam
|
a2aba70db06ee0b83ffe1934c741869e893d4533
|
3ebc1d9c0655222cfe7babeee767e3638ca71538
|
refs/heads/master
| 2023-02-10T23:22:50.650242
| 2021-01-03T14:05:36
| 2021-01-03T14:05:36
| 290,930,402
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,181
|
cpp
|
lg2392.cpp
|
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <algorithm>
#include <cstring>
using std::max;
using std::min;
const int MAXN = 100;
const int INF = 0x3f3f3f3f;
int num[MAXN];
int dp[3000];
int partition(int *, int);
int calc(int *, int);
int main()
{
int s1, s2, s3, s4;
scanf("%d%d%d%d", &s1, &s2, &s3, &s4);
int cost = 0;
cost += calc(num, s1);
cost += calc(num, s2);
cost += calc(num, s3);
cost += calc(num, s4);
printf("%d\n", cost);
return 0;
}
int calc(int *num, int size)
{
for (int i = 0; i < size; i++)
scanf("%d", &num[i]);
return partition(num, size);
}
int partition(int *num, int total)
{
int sum = 0;
for (int i = 0; i < total; i++)
sum += num[i];
int half = sum / 2;
memset(dp, 0, sizeof(dp));
dp[0] = 1;
for (int i = 0; i < total; i++)
{
for (int j = half; j >= num[i]; j--)
{
if (dp[j] == 0)
dp[j] = dp[j - num[i]];
}
}
int res = INF;
for (int i = 0; i <= half; i++)
{
if (dp[i] == 0)
continue;
res = min(res, max(i, sum - i));
}
return res;
}
|
f730a60a8bfe08109c684f0bf1fbf58d5760f7a0
|
e7e497b20442a4220296dea1550091a457df5a38
|
/main_project/OceCxxAdapter/src/MiniGroupManagerAdapter.cpp
|
11489327fa5eeab3fdb4acff0a0299ddedb10b52
|
[] |
no_license
|
gunner14/old_rr_code
|
cf17a2dedf8dfcdcf441d49139adaadc770c0eea
|
bb047dc88fa7243ded61d840af0f8bad22d68dee
|
refs/heads/master
| 2021-01-17T18:23:28.154228
| 2013-12-02T23:45:33
| 2013-12-02T23:45:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,766
|
cpp
|
MiniGroupManagerAdapter.cpp
|
/*
* =====================================================================================
*
* Filename: MiniGroupManagerAdapter.cpp
*
* Description:
*
* Version: 1.0
* Created: 10/26/2011 11:35:52 AM
* Revision: none
* Compiler: g++
*
* Author: min.shang (Jesse Shang), min.shang@renren-inc.com
* Company: renren-inc
*
* =====================================================================================
*/
#include "MiniGroupManagerAdapter.h"
using namespace xce::mngp;
using namespace minigroup;
MiniGroupManagerPrx MiniGroupManagerAdapter::getMiniGroupManagerPrx(int id) {
return getProxy(id);
}
vector<MiniGroupManagerPrx> MiniGroupManagerAdapter::getAllMiniGroupManagerPrx(int id) {
return getAllProxySeq(0);
}
MiniGroupSeq MiniGroupManagerAdapter::getMiniGroups(int user_id) {
MiniGroupManagerPrx prx = NULL;
MiniGroupSeq result;
try {
prx = getMiniGroupManagerPrx();
result = prx->getMiniGroups(user_id);
} catch (const Ice::ConnectTimeoutException& e) {
throw e;
}
return result;
}
MiniGroupSeq MiniGroupManagerAdapter::getMiniGroupsWithIds(const MyUtil::LongSeq& miniGroupIds) {
MiniGroupManagerPrx prx = NULL;
MiniGroupSeq result;
try {
prx = getMiniGroupManagerPrx();
result = prx->getMiniGroupsWithIds(miniGroupIds);
} catch (const Ice::ConnectTimeoutException& e) {
throw e;
}
return result;
}
void MiniGroupManagerAdapter::addMiniGroups(const MiniGroupSeq& minigroups) {
try {
vector<MiniGroupManagerPrx> prxs = getAllMiniGroupManagerPrx();
for (vector<MiniGroupManagerPrx>::const_iterator it = prxs.begin(); it != prxs.end(); ++it) {
(*it)->addMiniGroups(minigroups);
}
} catch (const Ice::ConnectTimeoutException& e) {
throw e;
}
}
void MiniGroupManagerAdapter::setJoinedMiniGroups(int user_id, const MyUtil::LongSeq& minigroup_ids) {
try {
vector<MiniGroupManagerPrx> prxs = getAllMiniGroupManagerPrx();
for (vector<MiniGroupManagerPrx>::const_iterator it = prxs.begin(); it != prxs.end(); ++it) {
(*it)->setJoinedMiniGroups(user_id, minigroup_ids);
}
} catch (const Ice::ConnectTimeoutException& e) {
throw e;
}
}
void MiniGroupManagerAdapter::addJoinedMiniGroups(int user_id, const MyUtil::LongSeq& minigroup_ids) {
try {
vector<MiniGroupManagerPrx> prxs = getAllMiniGroupManagerPrx();
for (vector<MiniGroupManagerPrx>::const_iterator it = prxs.begin(); it != prxs.end(); ++it) {
(*it)->addJoinedMiniGroups(user_id, minigroup_ids);
}
} catch (const Ice::ConnectTimeoutException& e) {
throw e;
}
}
void MiniGroupManagerAdapter::removeJoinedMiniGroups(int user_id, const MyUtil::LongSeq& minigroup_ids) {
try {
vector<MiniGroupManagerPrx> prxs = getAllMiniGroupManagerPrx();
for (vector<MiniGroupManagerPrx>::const_iterator it = prxs.begin(); it != prxs.end(); ++it) {
(*it)->removeJoinedMiniGroups(user_id, minigroup_ids);
}
} catch (const Ice::ConnectTimeoutException& e) {
throw e;
}
}
void MiniGroupManagerAdapter::removeAllJoinedMiniGroups(int user_id) {
try {
vector<MiniGroupManagerPrx> prxs = getAllMiniGroupManagerPrx();
for (vector<MiniGroupManagerPrx>::const_iterator it = prxs.begin(); it != prxs.end(); ++it) {
(*it)->removeAllJoinedMiniGroups(user_id);
}
} catch (const Ice::ConnectTimeoutException& e) {
throw e;
}
}
void MiniGroupManagerAdapter::setValid(bool valid) {
try {
vector<MiniGroupManagerPrx> prxs = getAllMiniGroupManagerPrx();
for (vector<MiniGroupManagerPrx>::const_iterator it = prxs.begin(); it != prxs.end(); ++it) {
(*it)->setValid(valid);
}
} catch (const Ice::ConnectTimeoutException& e) {
throw e;
}
}
|
a6b39b82de7a84ffd538f828eb0461afcbe6934c
|
9c51f3be759e2cafe85b9d38043b9bf41c479373
|
/original_code/GradeBook.cpp
|
bab589fc3670ec358625354bb13a95fa8c6321db
|
[] |
no_license
|
BenSandeen/gradebook_example
|
f9be425821c70da152a074c90aafa1e2d30fd03d
|
a650983299ca0e835bf129701d0eaec7406faa99
|
refs/heads/master
| 2021-03-22T02:07:28.803399
| 2016-07-20T01:04:25
| 2016-07-20T01:04:25
| 62,373,521
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,261
|
cpp
|
GradeBook.cpp
|
/*
* =====================================================================================
*
* Filename: GradeBook.cpp
*
* Description: Defines the functions of the GradeBook class prototyped in GradeBook.h
*
* Version: 1.0
* Created: 07/01/2016 01:35:30 AM
* Revision: none
* Compiler: gcc
*
* Author: Ben Sandeen
* Organization:
*
* =====================================================================================
*/
/* #include <stdlib.h> */
/* #include <string> */
#include <iostream>
#include "GradeBook.h" // using quotes tells compiler to look in current dir
// to find the GradeBook.h file. The brackets (<>) tell it
// to look in the standard location for built-in C++ libs
using namespace std;
// constructor function that the compiler uses to instantiate a gradebook object
GradeBook::GradeBook(string name) {
setCourseName(name); // uses the class's set function for robustness
}
void GradeBook::setCourseName(string name) {
courseName = name; // start with a basic setter function
}
string GradeBook::getCourseName() const {
return courseName;
}
void GradeBook::displayCourseName() const {
cout << "Course name is: " << getCourseName() << endl;
}
|
83f335327b47e61bb44ee6ff94c3b6223c30f4f3
|
271642153900d3a1bba0373b4dea71bf305dec8c
|
/cpp/cpp/queue3/queue.cpp
|
69d0f7f4ef640ba616b61855afb3a02a2c30bb4e
|
[] |
no_license
|
rkdwjddn456/5G_course
|
883063d8de37f2494d5210f0585bf6dc75a53c70
|
066bfdaf1b8d995dc3c2d14d995e9788f109787f
|
refs/heads/main
| 2023-06-14T15:32:56.850247
| 2021-07-02T09:34:03
| 2021-07-02T09:34:03
| 382,280,066
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 483
|
cpp
|
queue.cpp
|
#include <cassert>
#include "queue.h"
const int Queue:: QUEUESIZE = 100;
Queue:: Queue(int size)
:arr_(size), front_(0) , rear_(0)
{
}
void Queue:: push(int data)
{
assert(!isfull());
arr_[rear_] = data;
++rear_;
}
int Queue:: pop()
{
assert( !isempty());
int tmp = front_;
++front_;
return arr_[tmp];
}
bool Queue::isempty() const
{
return front_ == rear_;
}
bool Queue::isfull() const
{
return (rear_== arr_.size());
}
|
a2d9b6d70f74eadba6017cdc6ff2bd6ca23bd7cd
|
f3c01e5ebacea1751e993a6575bde896064b9c0e
|
/TouchGFX/gui/src/screencontrolsliderspeed_screen/ScreenControlSliderSpeedPresenter.cpp
|
670893d75dac4a6c3c53ee296aa7987da09e1fa5
|
[] |
no_license
|
ThanhTrungqn/test-screen-led
|
a6e682fd9b15e2b7c71f6b2bc2c87d6cf2a8ed25
|
3c62453a2fbeaeae9900ba73634e9dc92bef13e6
|
refs/heads/master
| 2021-03-18T11:14:02.101644
| 2020-08-26T11:23:56
| 2020-08-26T11:23:56
| 247,070,138
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 403
|
cpp
|
ScreenControlSliderSpeedPresenter.cpp
|
#include <gui/screencontrolsliderspeed_screen/ScreenControlSliderSpeedView.hpp>
#include <gui/screencontrolsliderspeed_screen/ScreenControlSliderSpeedPresenter.hpp>
ScreenControlSliderSpeedPresenter::ScreenControlSliderSpeedPresenter(ScreenControlSliderSpeedView& v)
: view(v)
{
}
void ScreenControlSliderSpeedPresenter::activate()
{
}
void ScreenControlSliderSpeedPresenter::deactivate()
{
}
|
58bd7b84ff3b353e3188c75e0e648750f3eea1d6
|
e9d5edcc5420dd458b843e32d54105641664b42b
|
/Wall.h
|
456ad59d3e276b5d2597d02849e767b9bbfb6229
|
[] |
no_license
|
Bocity/tankwar
|
f9ce1fbee123f5ed81c1b21e2c28cadaa9ba7801
|
6e2bd321aed43093033f48e7db41bc3032c2bba8
|
refs/heads/master
| 2020-04-06T09:09:39.768420
| 2018-11-13T06:26:13
| 2018-11-13T06:26:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,126
|
h
|
Wall.h
|
//
// Created by 郝进 on 2018/1/7.
//
#ifndef TANK_WALL_H
#define TANK_WALL_H
#include "EveryThing.h"
class wall: public EveryThing{
Q_OBJECT
Q_INTERFACES(QGraphicsItem)
public:
explicit wall(std::string img ):img(
std::move(img)){
wtype = WALL;
wallPix.load(tr(this->img.c_str()));
}
const double getLifeValue()const{
return lifeValue;
}
const std::string getImg()const {
return img;
}
int getId() override {
return 0;
}
double getX1() override {
return this->pos().x()-wallPix.width()/2;
}
double getX2() override {
return this->pos().x()+wallPix.width()/2;
}
double getY1() override {
return this->pos().y()-wallPix.height()/2;
}
double getY2() override {
return this->pos().y()+wallPix.height()/2;
}
QRectF boundingRect()const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
QPixmap wallPix;
std::string img;
QPainterPath shape() const override;
};
#endif //TANK_WALL_H
|
8ee92672329a191acdbd0fb1915eb1c0ab0d094f
|
039ec659ecd3f23eb25faff0061f401553cc9dec
|
/main.cpp
|
53a487bb240bff725056bbcc3d0a16868744048a
|
[] |
no_license
|
fingerAuth486/add-nbo
|
a7cbeff8f2b1f3444f724066bfe58b95980e6eab
|
56638624f7b22b8af3073e52323ba399ce2a55b9
|
refs/heads/master
| 2023-06-24T02:17:09.027416
| 2021-07-27T14:20:04
| 2021-07-27T14:20:04
| 388,133,023
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 704
|
cpp
|
main.cpp
|
#include <iostream>
#include <stdint.h>
#include <netinet/in.h>
int main(int argc, char* argv[])
{
FILE *file1;
file1 = fopen(argv[1],"r");
if (file1 == NULL) return -1;
uint32_t thousand;
FILE *file2;
file2 = fopen(argv[2],"r");
if (file2 == NULL) return -1;
uint32_t five_hundred;
fread(&thousand, sizeof(uint32_t), 1, file1);
fread(&five_hundred, sizeof(uint32_t), 1, file2);
thousand = htonl(thousand);
five_hundred = htonl(five_hundred);
uint32_t result;
result = thousand + five_hundred;
printf("%d(0x%x) + %d(0x%x) = %d(0x%x)",thousand,thousand,five_hundred,five_hundred,result,result);
fclose(file1);
fclose(file2);
}
|
73e1aa226e6ee70a604fd9b43216a234f1b18162
|
32ffee400604bf821858eaf9cd8cfc65926e2bc1
|
/micromamba/src/login.cpp
|
bd61bb7e311ea0487fafc285b8bcdaf83493a714
|
[
"BSD-3-Clause"
] |
permissive
|
mamba-org/mamba
|
ebabfe45c866f7d812a8dddbcc6814e40c96b9b2
|
319f0553f5036cc74cb7919f6ecadc784cb6c187
|
refs/heads/main
| 2023-08-31T05:00:08.103215
| 2023-08-29T14:35:10
| 2023-08-29T14:35:10
| 173,947,939
| 4,478
| 292
|
BSD-3-Clause
| 2023-09-14T10:14:10
| 2019-03-05T13:05:10
|
C++
|
UTF-8
|
C++
| false
| false
| 6,917
|
cpp
|
login.cpp
|
// Copyright (c) 2019, QuantStack and Mamba Contributors
//
// Distributed under the terms of the BSD 3-Clause License.
//
// The full license is in the file LICENSE, distributed with this software.
#include <string>
#include <CLI/App.hpp>
#include "mamba/core/environment.hpp"
#include "mamba/core/output.hpp"
#include "mamba/core/util.hpp"
#include "mamba/util/string.hpp"
#include "mamba/util/url.hpp"
std::string
read_stdin()
{
std::size_t len;
std::array<char, 1024> buffer;
std::string result;
while ((len = std::fread(buffer.data(), sizeof(char), buffer.size(), stdin)) > 0)
{
if (std::ferror(stdin) && !std::feof(stdin))
{
throw std::runtime_error("Reading from stdin failed.");
}
result.append(buffer.data(), len);
}
return result;
}
std::string
get_token_base(const std::string& host)
{
const auto url = mamba::util::URL::parse(host);
std::string maybe_colon_and_port{};
if (!url.port().empty())
{
maybe_colon_and_port.push_back(':');
maybe_colon_and_port.append(url.port());
}
return mamba::util::concat(
url.host(),
maybe_colon_and_port,
mamba::util::rstrip(url.pretty_path(), '/')
);
}
void
set_logout_command(CLI::App* subcom)
{
static std::string host;
subcom->add_option("host", host, "Host for the account");
static bool all;
subcom->add_flag("--all", all, "Log out from all hosts");
subcom->callback(
[]()
{
static auto path = mamba::env::home_directory() / ".mamba" / "auth";
fs::u8path auth_file = path / "authentication.json";
if (all)
{
if (fs::exists(auth_file))
{
fs::remove(auth_file);
}
return 0;
}
nlohmann::json auth_info;
try
{
if (fs::exists(auth_file))
{
auto fi = mamba::open_ifstream(auth_file);
fi >> auth_info;
}
auto token_base = get_token_base(host);
auto it = auth_info.find(token_base);
if (it != auth_info.end())
{
auth_info.erase(it);
std::cout << "Logged out from " << token_base << std::endl;
}
else
{
std::cout << "You are not logged in to " << token_base << std::endl;
}
}
catch (std::exception& e)
{
LOG_ERROR << "Could not parse " << auth_file;
LOG_ERROR << e.what();
return 1;
}
auto fo = mamba::open_ofstream(auth_file);
fo << auth_info;
return 0;
}
);
}
void
set_login_command(CLI::App* subcom)
{
static std::string user, pass, token, bearer, host;
static bool pass_stdin = false;
static bool token_stdin = false;
static bool bearer_stdin = false;
subcom->add_option("-p,--password", pass, "Password for account");
subcom->add_option("-u,--username", user, "User name for the account");
subcom->add_option("-t,--token", token, "Token for the account");
subcom->add_option("-b,--bearer", bearer, "Bearer token for the account");
subcom->add_flag("--password-stdin", pass_stdin, "Read password from stdin");
subcom->add_flag("--token-stdin", token_stdin, "Read token from stdin");
subcom->add_flag("--bearer-stdin", bearer_stdin, "Read bearer token from stdin");
subcom->add_option(
"host",
host,
"Host for the account. The scheme (e.g. https://) is ignored\n"
"but not the port (optional) nor the channel (optional)."
);
subcom->callback(
[]()
{
if (host.empty())
{
throw std::runtime_error("No host given.");
}
// remove any scheme etc.
auto token_base = get_token_base(host);
if (pass_stdin)
{
pass = read_stdin();
}
if (token_stdin)
{
token = read_stdin();
}
if (bearer_stdin)
{
bearer = read_stdin();
}
static auto path = mamba::env::home_directory() / ".mamba" / "auth";
fs::create_directories(path);
nlohmann::json auth_info;
fs::u8path auth_file = path / "authentication.json";
try
{
if (fs::exists(auth_file))
{
auto fi = mamba::open_ifstream(auth_file);
fi >> auth_info;
}
else
{
auth_info = nlohmann::json::object();
}
nlohmann::json auth_object = nlohmann::json::object();
if (pass.empty() && token.empty() && bearer.empty())
{
throw std::runtime_error("No password or token given.");
}
if (!pass.empty())
{
auth_object["type"] = "BasicHTTPAuthentication";
auto pass_encoded = mamba::encode_base64(mamba::util::strip(pass));
if (!pass_encoded)
{
throw pass_encoded.error();
}
auth_object["password"] = pass_encoded.value();
auth_object["user"] = user;
}
else if (!token.empty())
{
auth_object["type"] = "CondaToken";
auth_object["token"] = mamba::util::strip(token);
}
else if (!bearer.empty())
{
auth_object["type"] = "BearerToken";
auth_object["token"] = mamba::util::strip(bearer);
}
auth_info[token_base] = auth_object;
}
catch (std::exception& e)
{
LOG_ERROR << "Could not modify " << auth_file;
LOG_ERROR << e.what();
return 1;
}
auto out = mamba::open_ofstream(auth_file);
out << auth_info.dump(4);
std::cout << "Successfully stored login information" << std::endl;
return 0;
}
);
}
void
set_auth_command(CLI::App* subcom)
{
CLI::App* login_cmd = subcom->add_subcommand("login", "Store login information for a specific host");
set_login_command(login_cmd);
CLI::App* logout_cmd = subcom->add_subcommand(
"logout",
"Erase login information for a specific host"
);
set_logout_command(logout_cmd);
}
|
ac7d11685f1770eb8650acd12dcf05488f03fdd3
|
7c7c874abbe8ff4d2cccbdf8cbe37d731315e5b0
|
/TowerDefense/enums.h
|
c95e83d616651e0d3895b3c008d8a66b1284d396
|
[] |
no_license
|
JaroslawPalasz/-PK4-TowerDefense-Game
|
86a0dfb238d4f528deff09553c9b713176a57d4f
|
32458c8e0f4c87e85a676c8509fa37bde7e67c5e
|
refs/heads/main
| 2023-04-02T12:05:04.212586
| 2021-04-06T17:16:59
| 2021-04-06T17:16:59
| 355,263,567
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,829
|
h
|
enums.h
|
#pragma once
/*header and enum file*/
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <iostream>
#include <utility>
#include <memory>
#include <string>
#include <map>
#include <cassert>
#include <vector>
#include <fstream>
#include <stdexcept>
enum TEXTURES
{
TILE_START, TILE_END,
TILE_GRASS, TILE_SAND, //tiles impassable on which we can't build
TILE_MUD, TILE_ROAD, //tiles passable on which we can't build
TILE_BUILD_GRASS, TILE_BUILD_SAND, //tiles on which we can build
TOWER_MG_1, TOWER_MG_2, TOWER_MG_3, TOWER_ROCKET_1, TOWER_ROCKET_2,
TOWER_SLOW_1, TOWER_SLOW_2, TOWER_POISON_1, TOWER_POISON_2, //towers
ENEMY_FAST, ENEMY_HEAVY, ENEMY_BOSS, //enemies
ENEMY_FAST_FREEZED, ENEMY_FAST_POISONED, //effect on enemies
ENEMY_HEAVY_FREEZED, ENEMY_HEAVY_POISONED, //fast, heavy, boss - poisoned and freezed
ENEMY_BOSS_FREEZED, ENEMY_BOSS_POISONED,
ENEMY_FAST_FREEZED_POISONED, ENEMY_HEAVY_FREEZED_POISONED,
ENEMY_BOSS_FREEZED_POISONED,
ENEMY_FAST_RIGHT, ENEMY_FAST_LEFT, ENEMY_FAST_DOWN, ENEMY_FAST_UP,
ENEMY_FAST_FREEZED_RIGHT, ENEMY_FAST_FREEZED_LEFT, ENEMY_FAST_FREEZED_DOWN, ENEMY_FAST_FREEZED_UP,
ENEMY_FAST_POISONED_RIGHT, ENEMY_FAST_POISONED_LEFT, ENEMY_FAST_POISONED_DOWN, ENEMY_FAST_POISONED_UP,
ENEMY_FAST_FREEZED_POISONED_RIGHT, ENEMY_FAST_FREEZED_POISONED_LEFT, ENEMY_FAST_FREEZED_POISONED_DOWN,
ENEMY_FAST_FREEZED_POISONED_UP,
ENEMY_HEAVY_RIGHT, ENEMY_HEAVY_LEFT, ENEMY_HEAVY_DOWN, ENEMY_HEAVY_UP,
ENEMY_HEAVY_FREEZED_RIGHT, ENEMY_HEAVY_FREEZED_LEFT, ENEMY_HEAVY_FREEZED_DOWN, ENEMY_HEAVY_FREEZED_UP,
ENEMY_HEAVY_POISONED_RIGHT, ENEMY_HEAVY_POISONED_LEFT, ENEMY_HEAVY_POISONED_DOWN, ENEMY_HEAVY_POISONED_UP,
ENEMY_HEAVY_FREEZED_POISONED_RIGHT, ENEMY_HEAVY_FREEZED_POISONED_LEFT, ENEMY_HEAVY_FREEZED_POISONED_DOWN,
ENEMY_HEAVY_FREEZED_POISONED_UP,
ENEMY_BOSS_RIGHT, ENEMY_BOSS_LEFT, ENEMY_BOSS_DOWN, ENEMY_BOSS_UP,
ENEMY_BOSS_FREEZED_RIGHT, ENEMY_BOSS_FREEZED_LEFT, ENEMY_BOSS_FREEZED_DOWN, ENEMY_BOSS_FREEZED_UP,
ENEMY_BOSS_POISONED_RIGHT, ENEMY_BOSS_POISONED_LEFT, ENEMY_BOSS_POISONED_DOWN, ENEMY_BOSS_POISONED_UP,
ENEMY_BOSS_FREEZED_POISONED_RIGHT, ENEMY_BOSS_FREEZED_POISONED_LEFT, ENEMY_BOSS_FREEZED_POISONED_DOWN,
ENEMY_BOSS_FREEZED_POISONED_UP,
POWERUP_SLOW, POWERUP_EXPLOSION, POWERUP_FREEZE, //power-ups
POWERUP_SLOW_COOLDOWN, POWERUP_EXPLOSION_COOLDOWN,
POWERUP_FREEZE_COOLDOWN,
GOLD, HEART, //gold and heart
BUTTON_LEFT, BUTTON_RIGHT, BUTTON_UP, BUTTON_DOWN,
BUTTON_PAUSE, BUTTON_RESUME,
PANEL, //buttons and panel
BULLET_MG_1, BULLET_MG_2, BULLET_ROCKET_1, BULLET_ROCKET_2,
BULLET_SLOW_1, BULLET_POISON_1, //bullets
UPGRADE_1, UPGRADE_2, UPGRADE_3,
SELL,
BACKGROUND, BUTTON,
NONE
};
enum DIRECTIONS
{
UP, DOWN, LEFT, RIGHT
};
|
5e8e32c2f54c8f11a76d9c82e66ee59a0bb2ad3a
|
dd938cdbd18a52b793e7d1e9d6d0a90bc45ef54d
|
/base/event/EventGroup.h
|
39fa4f0d79f3f17689dcea2bb0d0455005978871
|
[
"MIT"
] |
permissive
|
dispyfree/xhstt
|
b103bb4857895bda693d8bd9967af250e206416a
|
12059c96dbdecddf9495d16bdd81b905f9986960
|
refs/heads/master
| 2021-05-04T11:28:49.299125
| 2017-10-01T20:17:59
| 2017-10-01T20:17:59
| 46,188,583
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,871
|
h
|
EventGroup.h
|
/*
* File: EventGroup.h
*
*/
#ifndef EVENTGROUP_H
#define EVENTGROUP_H
#include "Instance.h"
#include "Event.h"
#include "EventGroupKind.h"
#include "CachedObj.h"
#include <string>
#include <vector>
namespace khe{
class Instance;
class EventGroupKind;
class Event;
class Constraint;
class EventGroup : CachedObj<EventGroup>{
public:
using KheType = KHE_EVENT_GROUP;
EventGroup(Instance inst, EventGroupKind kind, const std::string &id,
const std::string &name);
EventGroup(Instance inst, const std::string &id,
const std::string &name);
EventGroup(KHE_EVENT_GROUP grp);
virtual ~EventGroup();
void setBack(void *back);
void *getBack() const {
return KheEventGroupBack(grp);
}
std::string getObjType() const;
Instance getInstance() const;
EventGroupKind getKind() const;
std::string getId() const;
std::string getName() const;
void add(Event e);
void sub(Event e);
void doUnion(const EventGroup &grp2);
void intersect(const EventGroup &grp2);
void difference(const EventGroup &grp2);
IR<Event> getEvents() const;
bool contains(const Event &e) const;
bool equals(const EventGroup &gr) const;
bool isSubSet(const EventGroup gr) const;
bool isDisjoint(const EventGroup &gr) const;
IR<Constraint> getConstraints() const;
operator int() const;
operator KheType() const;
/**
* Caution: this does NOT use the equivalence relation as implied by
* "equals". It just compares on the KHE object level for storage in containers.
* @param eg2
* @return
*/
bool operator==(const EventGroup &eg2) const;
bool operator<(const EventGroup &eg2) const;
protected:
KheType grp;
};
}
#endif /* EVENTGROUP_H */
|
f4bdb340e52bf8ccd59c546d93144f699122c863
|
8f81b0fea52234080b97df67a64a2c3391f2161a
|
/PAT/advanced_level/1116_Come_on!_Let's_C/funny_programming_contest.cpp
|
80463cb0d7ee3b73996f558e2bcf137eab3d2326
|
[] |
no_license
|
jJayyyyyyy/OJ
|
ce676b8645717848325a208c087502faf2cf7d88
|
6d2874fdf27fadb5cbc10a333e1ea85e88002eef
|
refs/heads/master
| 2022-09-30T18:02:08.414754
| 2020-01-17T12:33:33
| 2022-09-29T02:24:05
| 129,335,712
| 44
| 16
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,187
|
cpp
|
funny_programming_contest.cpp
|
#include <iostream>
#include <iomanip>
#include <cmath>
#define MAXSIZE 10005
using namespace std;
struct Student{
int rank;
int checked;
Student(){
rank = -1;
checked = 0;
}
};
Student stuList[MAXSIZE];
int primeList[MAXSIZE] = {0, 0, 1};
int printID(int &id){
cout<<setfill('0')<<setw(4)<<id;
return 0;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int i, j, n, id, k, queryID, rank;
for( i=3; i<MAXSIZE; i+=2 ){
primeList[i] = 1;
primeList[i+1] = 0;
}
int upperBound = (int)sqrt(MAXSIZE);
for( i=3; i<upperBound; i+=2 ){
if( 1 == primeList[i] ){
for( j=i+i; j<MAXSIZE; j+=i ){
primeList[j] = 0;
}
}
}
cin>>n;
for( i=1; i<=n; i++ ){
cin>>id;
stuList[id].rank = i;
}
cin>>k;
for( i=1; i<=k; i++ ){
cin>>queryID;
printID(queryID);
rank = stuList[queryID].rank;
if( -1 == rank ){
cout<<": Are you kidding?\n";
}else{
if( 1 == stuList[queryID].checked ){
cout<<": Checked\n";
}else{
stuList[queryID].checked = 1;
if( 1 == rank ){
cout<<": Mystery Award\n";
}else if( 1 == primeList[rank] ){
cout<<": Minion\n";
}else{
cout<<": Chocolate\n";
}
}
}
}
return 0;
}
|
ab0ced3782d4d9cc5ef18f666162658528e09b8b
|
745eb63515495a0da6c71967042adb47c445ac32
|
/HOTSTEEM/steem/code/rs232.cpp
|
12e2daef6673caac22810e1e75dfc8da6b4dfcf1
|
[] |
no_license
|
ReservoirGods/TOOLS.RG
|
0f8fac2b7f0178643337ce9907bd9060371d317c
|
6e1830ae927741043240bedd46f8034092d8f396
|
refs/heads/master
| 2020-03-26T23:02:41.689830
| 2020-01-05T21:21:18
| 2020-01-05T21:21:18
| 145,505,833
| 2
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,728
|
cpp
|
rs232.cpp
|
/*---------------------------------------------------------------------------
FILE: rs232.cpp
MODULE: emu
DESCRIPTION: Serial port emulation.
---------------------------------------------------------------------------*/
//---------------------------------------------------------------------------
// Send this to modem to test ATDT1471\r
//---------------------------------------------------------------------------
void RS232_VBL(int)
{
DWORD Flags=SerialPort.GetModemFlags();
// If flag is on bit=0
mfp_gpip_set_bit(MFP_GPIP_CTS_BIT,bool((Flags & MS_CTS_ON) ? 0:true));
mfp_gpip_set_bit(MFP_GPIP_DCD_BIT,bool((Flags & MS_RLSD_ON) ? 0:true));
mfp_gpip_set_bit(MFP_GPIP_RING_BIT,bool((Flags & MS_RING_ON) ? 0:true));
if (SerialPort.IsPCPort()){
agenda_delete(RS232_VBL);
agenda_add(RS232_VBL,int((shifter_freq==MONO_HZ) ? 14:6),0);
}
}
//---------------------------------------------------------------------------
BYTE RS232_ReadReg(int Reg)
{
switch (Reg){
case MFPR_RSR:
if (rs232_recv_overrun==0) mfp_reg[MFPR_RSR]&=BYTE(~BIT_6);
break;
case MFPR_TSR:
mfp_reg[MFPR_RSR]&=BYTE(~BIT_6); // Clear underrun
break;
case MFPR_UDR:
//added 22/5/2000
mfp_reg[MFPR_RSR]&=BYTE(~BIT_7); //clear RX buffer full
if (rs232_recv_overrun){
mfp_reg[MFPR_RSR]|=BIT_6;
rs232_recv_overrun=0;
if (mfp_interrupt_enabled[MFP_INT_RS232_RECEIVE_ERROR]){
mfp_interrupt(MFP_INT_RS232_RECEIVE_ERROR,ABSOLUTE_CPU_TIME);
}else{
mfp_interrupt(MFP_INT_RS232_RECEIVE_BUFFER_FULL,ABSOLUTE_CPU_TIME);
}
}
return rs232_recv_byte;
}
return mfp_reg[Reg];
}
//---------------------------------------------------------------------------
void RS232_CalculateBaud(bool Div16,BYTE cr,bool SetBaudNow)
{
if (cr){ //Timer D running
int hbls_per_second=int((shifter_freq==MONO_HZ) ? HBLS_PER_SECOND_MONO:HBLS_PER_SECOND_AVE);
if (Div16){
rs232_hbls_per_word=(mfp_timer_prescale[cr]*BYTE_00_TO_256(mfp_reg[MFPR_TDDR]))*16*
rs232_bits_per_word*hbls_per_second/MFP_CLK_EXACT;
}else{
rs232_hbls_per_word=max((mfp_timer_prescale[cr]*BYTE_00_TO_256(mfp_reg[MFPR_TDDR]))*
rs232_bits_per_word*hbls_per_second/MFP_CLK_EXACT,1);
}
if (SerialPort.IsPCPort()){
if (SetBaudNow==0){
UpdateBaud=true;
return;
}
BYTE UCR=mfp_reg[MFPR_UCR];
double Baud=double(19200*4)/(mfp_timer_prescale[cr]*BYTE_00_TO_256(mfp_reg[MFPR_TDDR]));
if (Div16==0) Baud*=16;
BYTE StopBits=ONESTOPBIT;
switch (UCR & b00011000){
case b00010000:StopBits=ONE5STOPBITS;break;
case b00011000:StopBits=TWOSTOPBITS; break;
}
int RTS=int((psg_reg[PSGR_PORT_A] & BIT_3) ? RTS_CONTROL_ENABLE:RTS_CONTROL_DISABLE);
int DTR=int((psg_reg[PSGR_PORT_A] & BIT_4) ? DTR_CONTROL_ENABLE:DTR_CONTROL_DISABLE);
SerialPort.SetupCOM(DWORD(Baud),0,RTS,DTR,
bool(UCR & BIT_2),BYTE((UCR & BIT_1) ? EVENPARITY:ODDPARITY),
StopBits,BYTE(8-((UCR & b01100000) >> 5)));
UpdateBaud=0;
}
}else{
rs232_hbls_per_word=80000000;
}
}
//---------------------------------------------------------------------------
void RS232_WriteReg(int Reg,BYTE NewVal)
{
switch (Reg){
case MFPR_UCR:
{
int old_bpw=rs232_bits_per_word;
rs232_bits_per_word=1+BYTE(8-((NewVal & b01100000) >> 5))+1;
switch (NewVal & b00011000){
case b00010000: // 1.5
case b00011000: // 2
rs232_bits_per_word++;
break;
}
NewVal&=b11111110;
if ((mfp_reg[MFPR_UCR] & BIT_7)!=(NewVal & BIT_7) || old_bpw!=rs232_bits_per_word){
mfp_reg[MFPR_UCR]=NewVal;
RS232_CalculateBaud(bool(NewVal & BIT_7),mfp_get_timer_control_register(3),0);
}
break;
}
case MFPR_RSR:
if ((NewVal & BIT_0)==0 && (mfp_reg[MFPR_RSR] & BIT_0)){ //disable receiver
NewVal=0;
}
NewVal&=BYTE(~BIT_7);
NewVal|=BYTE(mfp_reg[MFPR_RSR] & BIT_7);
break;
case MFPR_TSR:
if ((NewVal & BIT_0) && (mfp_reg[MFPR_TSR] & BIT_0)==0){ //enable transmitter
NewVal&=BYTE(~BIT_4); //Clear END
}
NewVal&=BYTE(~BIT_7);
NewVal|=BYTE(mfp_reg[MFPR_TSR] & BIT_7);
if ((NewVal & BIT_3)!=(mfp_reg[MFPR_TSR] & BIT_3)){
if (NewVal & BIT_3){
SerialPort.StartBreak();
agenda_delete(agenda_serial_sent_byte);
agenda_add(agenda_serial_break_boundary,rs232_hbls_per_word,0);
}else{
SerialPort.EndBreak();
agenda_delete(agenda_serial_break_boundary);
if ((mfp_reg[MFPR_TSR] & BIT_7)==0){ // tx buffer not empty
agenda_add(agenda_serial_sent_byte,2,0);
}
}
}
break;
case MFPR_UDR:
if ((mfp_reg[MFPR_TSR] & BIT_0) && (mfp_reg[MFPR_TSR] & BIT_3)==0){
// Transmitter enabled and no break
if (UpdateBaud) RS232_CalculateBaud(bool(mfp_reg[MFPR_UCR] & BIT_7),mfp_get_timer_control_register(3),true);
mfp_reg[MFPR_TSR]&=BYTE(~BIT_7);
agenda_add(agenda_serial_sent_byte,rs232_hbls_per_word,0);
if ((mfp_reg[MFPR_TSR] & b00000110)==b00000110){ //loopback
agenda_add(agenda_serial_loopback_byte,rs232_hbls_per_word+1,NewVal);
}else{
SerialPort.OutputByte(BYTE(NewVal & (0xff >> ((mfp_reg[MFPR_UCR] & b01100000) >> 5))));
}
}
return;
}
mfp_reg[Reg]=NewVal;
}
void agenda_serial_sent_byte(int)
{
mfp_reg[MFPR_TSR]|=BYTE(BIT_7); //buffer empty
mfp_interrupt(MFP_INT_RS232_TRANSMIT_BUFFER_EMPTY,ABSOLUTE_CPU_TIME);
if ((mfp_reg[MFPR_TSR] & BIT_0)==0){ // transmitter disabled
mfp_reg[MFPR_TSR]|=BYTE(BIT_4); //End
mfp_interrupt(MFP_INT_RS232_TRANSMIT_ERROR,ABSOLUTE_CPU_TIME);
if (mfp_reg[MFPR_TSR] & BIT_5) mfp_reg[MFPR_RSR]|=BIT_0; //Auto turnaround!
}
}
void agenda_serial_break_boundary(int)
{
if ((mfp_reg[MFPR_TSR] & BIT_6)==0) mfp_interrupt(MFP_INT_RS232_TRANSMIT_ERROR,ABSOLUTE_CPU_TIME);
agenda_add(agenda_serial_break_boundary,rs232_hbls_per_word,0);
}
void agenda_serial_loopback_byte(int NewVal)
{
if (mfp_reg[MFPR_RSR] & BIT_0){
if ((mfp_reg[MFPR_RSR] & BIT_7 /*Buffer Full*/)==0 ){
rs232_recv_byte=BYTE(NewVal);
rs232_recv_overrun=0;
}else{
rs232_recv_overrun=true;
}
mfp_reg[MFPR_RSR]&=BYTE(~(BIT_2 /*Char in progress*/ | BIT_3 /*Break*/ |
BIT_4 /*Frame Error*/ | BIT_5 /*Parity Error*/));
mfp_reg[MFPR_RSR]|=BIT_7 /*Buffer Full*/;
mfp_interrupt(MFP_INT_RS232_RECEIVE_BUFFER_FULL,ABSOLUTE_CPU_TIME);
}
}
|
7949664591cf0f1b2ec407cbbf6cd6f9db7eff07
|
a95b9b10f8b62df1e87341de8535e6b1f3d59814
|
/Delete Node in a Linked List without head.cpp
|
9ee2c0dbc6893855f153f00bf976dc70a66e9d3c
|
[] |
no_license
|
tanyasri02/Linked-list
|
dcf1edf4e30f9ac87a8aab6311bd6de77721d1c7
|
3d88d3f60200b1f9fc010ca308ee9203d6e3341b
|
refs/heads/main
| 2023-08-18T22:24:48.002980
| 2021-10-12T16:25:09
| 2021-10-12T16:25:09
| 416,395,454
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 490
|
cpp
|
Delete Node in a Linked List without head.cpp
|
//appoarch :phich nhi ptaa age to ptaa hai na
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
void deleteNode(ListNode* pos) {
if(pos==NULL||pos->next==NULL)
return;
ListNode *temp=pos->next;
pos->val=pos->next->val;
pos->next=temp->next;
delete temp;
}
};
|
4ccb6c2d94ee74c4b31f08e782efb8cba030d1eb
|
adb265b77c488d5b8642e377d243891708cba962
|
/facerecognizer.h
|
636a8b5c86c497fb9092deee5224580766554649
|
[] |
no_license
|
SergTrip/FaceDetectorDll
|
1bb83f52011ac5d87b358ae5de7bbf3e58dd323f
|
cdb1c4d65cc7661d516e3aa7c307cbbfa40e2594
|
refs/heads/master
| 2021-01-10T15:40:28.336051
| 2016-02-06T12:17:53
| 2016-02-06T12:17:53
| 36,668,390
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,290
|
h
|
facerecognizer.h
|
#ifndef FACERECOGNIZER_H
#define FACERECOGNIZER_H
#include <QWidget>
#include <QImage>
#include <QTimer>
#include <QPainter>
#include <QDebug>
#include <opencv2/opencv.hpp>
//#define FACE_CASCADE_NAME "D:\\Dropbox\\Germanij\\Projects\\Faces\\Data\\haarcascades\\haarcascade_frontalface_alt.xml"
#define FACE_CASCADE_NAME "/home/sergey/Libs/opencv/data/haarcascades/haarcascade_frontalface_alt.xml"
//#define FACE_CASCADE_NAME "../../Data/lbpcascades/lbpcascade_frontalface.xml"
//#define EYE_CASCADE_NAME "../../Data/haarcascades/haarcascade_eye_tree_eyeglasses.xml"
//#define FILE_NAME "../../Data/MyFace.3gp"
//#define PHOTO_NAME "../../Data/Face.jpg"
namespace Ui {
class FaceRecognizer;
}
// using namespace cv;
using namespace std;
class FaceRecognizer : public QWidget
{
Q_OBJECT
public:
explicit FaceRecognizer(QWidget *parent = 0);
~FaceRecognizer();
private:
// Непосредственно опеределяет расположение лица
void detectAndDraw();
private:
// Экземпляр изображения Qt
QImage m_oQtImage;
// Хранилище с динамически изменяемым размером
cv::Mat m_oCVMat;
// Объект для работы с камерой
cv::VideoCapture m_oCVCapture;
// Классификаторы для обнраужения объекта
cv::CascadeClassifier m_pCVFaceCascade;
cv::CascadeClassifier m_pCVEyeCascade;
// Реализация унаследованного класса перерисовки
void paintEvent(QPaintEvent* event);
// Экземпляр таймера
QTimer* m_pQtTimer;
// Время таймера
int m_nTime;
public slots:
// Обработать следующий кадр
void queryFrame();
// Запустить таймер
void startTimer();
// Остановить таймер
void stopTimer();
// Установить время
void setTime( int time );
public:
// Получить текущее изображение
QImage getImage();
};
#endif // FACERECOGNIZER_H
|
909a0c7e1d31f817ce71d2359dccb62362d5c4c0
|
d677f13b0f27caf3e3cfda2d93883ca95f3a6890
|
/AST/Test/BinaryExpressionTest.cpp
|
184950daf7cd02ffe1da699455e8afc4f851aec2
|
[] |
no_license
|
cades/cminus
|
f5f0f68fa1e39c4b079c11cbee23b0257a6a8567
|
6c98ecad0419a058982f0512fd5f5927addbb0ed
|
refs/heads/master
| 2021-01-22T02:49:23.960414
| 2012-06-28T17:31:53
| 2012-06-28T17:31:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,057
|
cpp
|
BinaryExpressionTest.cpp
|
/*
* BinaryExpressionTest.cpp
*
* Created on: 2012/6/18
* Author: mac
*/
#include "../Node/PlusNode.h"
#include "../Node/IntLiteral.h"
#include "../Node/FloatLiteral.h"
#include "../Node/Identifier.h"
#include "../Node/Factor.h"
#include <stdexcept>
#include <CppUTest/TestHarness.h>
TEST_GROUP(BinaryExpressionShouldBeAbleTo) {
Literal *int3, *int5, *float3, *float7;
Expression* intExpr, *floatExpr, *mixedExpr;
void setup() {
int3 = new IntLiteral(3);
int5 = new IntLiteral(5);
intExpr = new PlusNode(int3, int5);
float3 = new FloatLiteral(3.0);
float7 = new FloatLiteral(7.1);
floatExpr = new PlusNode(float3, float7);
mixedExpr = new PlusNode(float3, int5);
}
void teardown() {
delete intExpr;
delete floatExpr;
delete mixedExpr;
delete int3;
delete int5;
delete float3;
delete float7;
}
};
TEST(BinaryExpressionShouldBeAbleTo, handleEasyCase_1) {
Literal* l = new IntLiteral(3);
IntLiteral* iLit = dynamic_cast<IntLiteral*>( l->evaluate() );
LONGS_EQUAL(3, iLit->getValue());
delete iLit;
delete l;
}
TEST(BinaryExpressionShouldBeAbleTo, handleEasyCase_2) {
Literal* l = new FloatLiteral(3.0);
FloatLiteral* fLit = dynamic_cast<FloatLiteral*>( l->evaluate() );
DOUBLES_EQUAL(3.0, fLit->getValue(), 100);
delete fLit;
delete l;
}
TEST(BinaryExpressionShouldBeAbleTo, handleBinaryOperationWith2Ints) {
IntLiteral* lit = dynamic_cast<IntLiteral*>( intExpr->evaluate() );
LONGS_EQUAL(8, lit->getValue());
delete lit;
}
TEST(BinaryExpressionShouldBeAbleTo, handleBinaryOperationWith2Floats) {
FloatLiteral* lit = dynamic_cast<FloatLiteral*>( floatExpr->evaluate() );
DOUBLES_EQUAL(10.1, lit->getValue(), 100);
delete lit;
}
TEST(BinaryExpressionShouldBeAbleTo, handleBinaryOperationWith_IntFloatMixed) {
FloatLiteral* lit = dynamic_cast<FloatLiteral*>( mixedExpr->evaluate() );
DOUBLES_EQUAL(8.0, lit->getValue(), 100);
delete lit;
}
TEST(BinaryExpressionShouldBeAbleTo, handleBinaryOperationWith_IntFloatMixed_2) {
Literal* l = new FloatLiteral(3.2);
Expression* expr = new PlusNode(mixedExpr, l);
FloatLiteral* lit = dynamic_cast<FloatLiteral*>( expr->evaluate() );
DOUBLES_EQUAL(11.2, lit->getValue(), 10);
delete l;
delete expr;
delete lit;
}
/*
TEST(BinaryExpressionShouldBeAbleTo, handleIlligalCase) {
Identifier* id = new Identifier("variable");
Factor* factor = new Factor(id);
Expression* expr = new PlusNode(factor, int3);
try {
IntLiteral* lit = dynamic_cast<IntLiteral*>( expr->evaluate() );
} catch (std::exception& e) {
STRCMP_EQUAL("Cannot evaluate constant.", string(e.what()).substr(0, 25).c_str());
}
delete id;
delete expr;
}
TEST(BinaryExpressionShouldBeAbleTo, handleIlligalCase_2) {
Identifier* id = new Identifier("variable");
Factor* factor = new Factor(id);
Expression* expr = new PlusNode(intExpr, factor);
try {
IntLiteral* lit = dynamic_cast<IntLiteral*>( expr->evaluate() );
} catch (std::exception& e) {
STRCMP_EQUAL("Cannot evaluate constant.", string(e.what()).substr(0, 25).c_str());
}
delete id;
delete expr;
}
*/
|
5325a3896948ebf1b516864ef92940117c2d8c5b
|
25f9a6acd386cebe32456676a511aef745396efc
|
/GameServerPeer/MainServerPeer.cpp
|
588497b16bf9e7d5d2775b4078ebfd401cb8b94c
|
[] |
no_license
|
VictorRomeroLopez/-AA3-_Cluedo
|
f8026ad7acfc3f0882f6c77911de455b2bba0bd6
|
89f43cce97cdfb23010ce332d0ce67841941bdfc
|
refs/heads/master
| 2021-02-24T05:04:18.672321
| 2020-03-16T22:33:26
| 2020-03-16T22:33:26
| 245,420,301
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,320
|
cpp
|
MainServerPeer.cpp
|
#include <SFML/Network.hpp>
#include <SFML/System.hpp>
#include <iostream>
using namespace sf;
const unsigned short MAX_PLAYERS = 5;
const unsigned short SERVER_PORT = 50000;
struct Address {
std::string nick;
IpAddress ipAdress;
unsigned short port;
Address(std::string _nick, IpAddress _ipAddress, unsigned short _port) : nick(_nick), ipAdress(_ipAddress), port(_port) {}
};
void print(std::string text) {
std::cout << text << std::endl;
}
int main()
{
std::vector<Address*> peer;
TcpListener listener;
unsigned int random = (unsigned int)rand();
listener.listen(SERVER_PORT);
for (short i = 0; i < MAX_PLAYERS; i++)
{
TcpSocket socket;
if (listener.accept(socket) != Socket::Status::Done) {
print("error al listener");
}
std::string nickname;
Packet nickPacket;
socket.receive(nickPacket);
nickPacket >> nickname;
Packet pack;
Address* newAddress = new Address(nickname, socket.getRemoteAddress(), socket.getRemotePort());
peer.push_back(newAddress);
int count = peer.size() - 1;
pack << count;
pack << random;
for (int i = 0; i < peer.size() - 1; i++) {
pack << peer[i]->ipAdress.toString() << peer[i]->port << peer[i]->nick;
std::cout << peer[i]->nick << std::endl;
}
socket.send(pack);
socket.disconnect();
}
listener.close();
return 0;
}
|
072c73f88a73885f495c1a0dcf88db84eaf0010c
|
3dc4f53ec79d917102bdcf6cc30424caade17c39
|
/test/test_recurrence.cpp
|
646eba8671bc4526c47700f5e4a82a04075061f3
|
[
"BSL-1.0"
] |
permissive
|
boostorg/math
|
015da3eb8ff4754b88c13acabb943bc2025fe272
|
0d941f0d0751869964a046fab975f34f739a53a3
|
refs/heads/develop
| 2023-08-31T09:04:04.090046
| 2023-08-28T17:10:58
| 2023-08-28T17:10:58
| 7,589,942
| 290
| 282
|
BSL-1.0
| 2023-09-11T18:11:58
| 2013-01-13T15:58:55
|
C++
|
UTF-8
|
C++
| false
| false
| 6,173
|
cpp
|
test_recurrence.cpp
|
// (C) Copyright John Maddock 2018.
// Use, modification and distribution are subject to 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)
#define BOOST_TEST_MODULE test_recurrences
#include <boost/math/tools/config.hpp>
#ifndef BOOST_NO_CXX11_HDR_TUPLE
#include <boost/multiprecision/cpp_bin_float.hpp>
#include <boost/math/tools/recurrence.hpp>
#include <boost/math/special_functions/bessel.hpp>
#include <boost/test/included/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
//#include <boost/test/tools/floating_point_comparison.hpp>
#include <boost/math/concepts/real_concept.hpp>
#ifdef _MSC_VER
#pragma warning(disable:4127)
#endif
template <class T>
struct bessel_jy_recurrence
{
bessel_jy_recurrence(T v, T z) : v(v), z(z) {}
boost::math::tuple<T, T, T> operator()(int k)const
{
return boost::math::tuple<T, T, T>(T(1), -2 * (v + k) / z, T(1));
}
T v, z;
};
template <class T>
struct bessel_ik_recurrence
{
bessel_ik_recurrence(T v, T z) : v(v), z(z) {}
boost::math::tuple<T, T, T> operator()(int k)const
{
return boost::math::tuple<T, T, T>(T(1), -2 * (v + k) / z, T(-1));
}
T v, z;
};
template <class T>
void test_spots(T, const char* name)
{
std::cout << "Running tests for type " << name << std::endl;
T tol = boost::math::tools::epsilon<T>() * 5;
if ((std::numeric_limits<T>::digits > 53) || (std::numeric_limits<T>::digits == 0))
tol *= 5;
//
// Test forward recurrence on Y_v(x):
//
{
T v = 22.25;
T x = 4.125;
bessel_jy_recurrence<T> coef(v, x);
T prev;
T first = boost::math::cyl_neumann(v - 1, x);
T second = boost::math::cyl_neumann(v, x);
T sixth = boost::math::tools::apply_recurrence_relation_forward(coef, 6, first, second, (long long*)0, &prev);
T expected1 = boost::math::cyl_neumann(v + 6, x);
T expected2 = boost::math::cyl_neumann(v + 5, x);
BOOST_CHECK_CLOSE_FRACTION(sixth, expected1, tol);
BOOST_CHECK_CLOSE_FRACTION(prev, expected2, tol);
boost::math::tools::forward_recurrence_iterator< bessel_jy_recurrence<T> > it(coef, first, second);
for (unsigned i = 0; i < 15; ++i)
{
expected1 = boost::math::cyl_neumann(v + i, x);
T found = *it;
BOOST_CHECK_CLOSE_FRACTION(found, expected1, tol);
++it;
}
if (std::numeric_limits<T>::max_exponent > 300)
{
//
// This calculates the ratio Y_v(x)/Y_v+1(x) from the recurrence relations
// which are only transiently stable since Y_v is not minimal as v->-INF
// but only as v->0. We have to be sure that v is sufficiently large that
// convergence is complete before we reach the origin.
//
v = 102.75;
std::uintmax_t max_iter = 200;
T ratio = boost::math::tools::function_ratio_from_forwards_recurrence(bessel_jy_recurrence<T>(v, x), boost::math::tools::epsilon<T>(), max_iter);
first = boost::math::cyl_neumann(v, x);
second = boost::math::cyl_neumann(v + 1, x);
BOOST_CHECK_CLOSE_FRACTION(ratio, first / second, tol);
boost::math::tools::forward_recurrence_iterator< bessel_jy_recurrence<T> > it2(bessel_jy_recurrence<T>(v, x), boost::math::cyl_neumann(v, x));
for (unsigned i = 0; i < 15; ++i)
{
expected1 = boost::math::cyl_neumann(v + i, x);
T found = *it2;
BOOST_CHECK_CLOSE_FRACTION(found, expected1, tol);
++it2;
}
}
}
//
// Test backward recurrence on J_v(x):
//
{
if ((std::numeric_limits<T>::digits > 53) || !std::numeric_limits<T>::is_specialized)
tol *= 5;
T v = 22.25;
T x = 4.125;
bessel_jy_recurrence<T> coef(v, x);
T prev;
T first = boost::math::cyl_bessel_j(v + 1, x);
T second = boost::math::cyl_bessel_j(v, x);
T sixth = boost::math::tools::apply_recurrence_relation_backward(coef, 6, first, second, (long long*)0, &prev);
T expected1 = boost::math::cyl_bessel_j(v - 6, x);
T expected2 = boost::math::cyl_bessel_j(v - 5, x);
BOOST_CHECK_CLOSE_FRACTION(sixth, expected1, tol);
BOOST_CHECK_CLOSE_FRACTION(prev, expected2, tol);
boost::math::tools::backward_recurrence_iterator< bessel_jy_recurrence<T> > it(coef, first, second);
for (unsigned i = 0; i < 15; ++i)
{
expected1 = boost::math::cyl_bessel_j(v - i, x);
T found = *it;
BOOST_CHECK_CLOSE_FRACTION(found, expected1, tol);
++it;
}
std::uintmax_t max_iter = 200;
T ratio = boost::math::tools::function_ratio_from_backwards_recurrence(bessel_jy_recurrence<T>(v, x), boost::math::tools::epsilon<T>(), max_iter);
first = boost::math::cyl_bessel_j(v, x);
second = boost::math::cyl_bessel_j(v - 1, x);
BOOST_CHECK_CLOSE_FRACTION(ratio, first / second, tol);
boost::math::tools::backward_recurrence_iterator< bessel_jy_recurrence<T> > it2(bessel_jy_recurrence<T>(v, x), boost::math::cyl_bessel_j(v, x));
//boost::math::tools::backward_recurrence_iterator< bessel_jy_recurrence<T> > it3(bessel_jy_recurrence<T>(v, x), boost::math::cyl_neumann(v+1, x), boost::math::cyl_neumann(v, x));
for (unsigned i = 0; i < 15; ++i)
{
expected1 = boost::math::cyl_bessel_j(v - i, x);
T found = *it2;
BOOST_CHECK_CLOSE_FRACTION(found, expected1, tol);
++it2;
}
}
}
BOOST_AUTO_TEST_CASE( test_main )
{
BOOST_MATH_CONTROL_FP;
#if !defined(TEST) || TEST == 1
test_spots(0.0F, "float");
test_spots(0.0, "double");
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_spots(0.0L, "long double");
#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS
test_spots(boost::math::concepts::real_concept(0.1), "real_concept");
#endif
#endif
#endif
#if !defined(TEST) || TEST == 2 || TEST == 3
#ifndef BOOST_MATH_NO_MP_TESTS
test_spots(boost::multiprecision::cpp_bin_float_quad(), "cpp_bin_float_quad");
#endif
#endif
}
#else
int main() { return 0; }
#endif
|
93e1aa388e262b4c9e26a3a7921a76a440212be6
|
f3dd00b1dfd95541d2665a95e0d5c5c011170ba8
|
/src/server/server_config.cc
|
ede7b345a5b89608cdfe81daabf92240d4804dec
|
[] |
no_license
|
exabytes18/kiwi
|
0aebf55d312331b6912011d26258d29c179eecdc
|
a1736db3ffb573a8628977a0fbf4e637d77afeea
|
refs/heads/master
| 2021-01-23T16:28:20.632923
| 2018-08-07T08:01:51
| 2018-08-07T08:04:51
| 93,299,166
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,066
|
cc
|
server_config.cc
|
#include "common/constants.h"
#include "common/exceptions.h"
#include "common/file_utils.h"
#include "yaml-cpp/yaml.h"
#include "yaml-cpp/exceptions.h"
#include "server_config.h"
using namespace std;
template <class T>
static T ParseValue(char const* config_path, string const& name, YAML::Node& value) {
try {
return value.as<T>();
} catch (YAML::BadConversion& e) {
stringstream ss;
ss << "Error parsing \"" << name << "\" @ ";
ss << "file " << config_path << ", ";
ss << "line " << e.mark.line << ", ";
ss << "column " << e.mark.column << ".";
throw ConfigurationException(ss.str());
}
}
template <class T>
static T ParseRequiredParameter(char const* config_path, YAML::Node const& yaml, string const& name) {
auto value = yaml[name];
if (value) {
return ParseValue<T>(config_path, name, value);
} else {
stringstream ss;
ss << "You must specify \"" << name << "\" in " << config_path << ".";
throw ConfigurationException(ss.str());
}
}
template <class T>
static T ParseOptionalParameter(char const* config_path, YAML::Node const& yaml, string const& name, T defaultValue) {
auto value = yaml[name];
if (value) {
return ParseValue<T>(config_path, name, value);
} else {
return defaultValue;
}
}
static unordered_map<uint32_t, SocketAddress> ParseHostMap(char const* config_path, YAML::Node const& yaml, string const& name) {
auto hosts = yaml["hosts"];
if (!hosts) {
stringstream ss;
ss << "You must specify \"" << name << "\" in " << config_path << ".";
throw ConfigurationException(ss.str());
}
if (!hosts.IsMap()) {
stringstream ss;
ss << "The \"" << name << "\" configuration option in \"" << config_path << "\" must be a map.";
throw ConfigurationException(ss.str());
}
try {
unordered_map<uint32_t, SocketAddress> result;
for (YAML::const_iterator it = hosts.begin(); it != hosts.end(); ++it) {
uint32_t key = it->first.as<uint32_t>();
string value = it->second.as<string>();
result.insert(make_pair(key, SocketAddress::FromString(value, Constants::DEFAULT_PORT)));
}
return result;
} catch (YAML::BadConversion& e) {
stringstream ss;
ss << "Error parsing \"" << name << "\" @ ";
ss << "file " << config_path << ", ";
ss << "line " << e.mark.line << ", ";
ss << "column " << e.mark.column << ".";
throw ConfigurationException(ss.str());
}
}
ServerConfig ServerConfig::ParseFromFile(char const* config_path) {
auto contents = FileUtils::ReadFile(config_path);
auto yaml = YAML::Load(contents);
auto cluster_name = ParseRequiredParameter<string>(config_path, yaml, "cluster_name");
if (cluster_name.length() > Constants::MAX_CLUSTER_NAME_LENGTH) {
stringstream ss;
ss << "The \"cluster_name\" configuration parameter must be <= " << Constants::MAX_CLUSTER_NAME_LENGTH << " bytes long.";
throw ConfigurationException(ss.str());
}
auto server_id = ParseRequiredParameter<uint32_t>(config_path, yaml, "server_id");
auto hosts = ParseHostMap(config_path, yaml, "hosts");
if (hosts.find(server_id) == hosts.end()) {
stringstream ss;
ss << "The \"hosts\" configuration parameter must contain an entry matching the \"server_id\" (\"" << server_id << "\").";
throw ConfigurationException(ss.str());
}
auto data_dir = ParseRequiredParameter<string>(config_path, yaml, "data_dir");
auto use_ipv4 = ParseOptionalParameter<bool>(config_path, yaml, "ipv4", false);
auto use_ipv6 = ParseOptionalParameter<bool>(config_path, yaml, "ipv6", false);
auto bind_address = ParseRequiredParameter<string>(config_path, yaml, "bind_address");
auto socket_address = SocketAddress::FromString(bind_address, Constants::DEFAULT_PORT);
return ServerConfig(cluster_name, server_id, socket_address, hosts, data_dir, use_ipv4, use_ipv6);
}
ServerConfig::ServerConfig(string const& cluster_name, uint32_t server_id, SocketAddress const& bind_address, unordered_map<uint32_t, SocketAddress> const& hosts, string const& data_dir, bool use_ipv4, bool use_ipv6) :
cluster_name(cluster_name),
server_id(server_id),
bind_address(bind_address),
hosts(hosts),
data_dir(data_dir),
use_ipv4(use_ipv4),
use_ipv6(use_ipv6) {}
string const& ServerConfig::ClusterName(void) const {
return cluster_name;
}
uint32_t ServerConfig::ServerId(void) const {
return server_id;
}
SocketAddress ServerConfig::BindAddress(void) const {
return bind_address;
}
unordered_map<uint32_t, SocketAddress> const& ServerConfig::Hosts(void) const {
return hosts;
}
string const& ServerConfig::DataDir(void) const {
return data_dir;
}
bool ServerConfig::UseIPV4(void) const {
return use_ipv4;
}
bool ServerConfig::UseIPV6(void) const {
return use_ipv6;
}
|
7f803ebafebfc88ae5ecce79b85c5d18df5f2e1b
|
4f7c53c128328f294e9b67a4eb00b72c459692e6
|
/app/Document/PurchaseDocument/DocumentNKController.cpp
|
167dea1ac6c3b6a23134aa180cf62b0e2eaf1370
|
[] |
no_license
|
milczarekIT/agila
|
a94d59c1acfe171eb361be67acda1c5babc69df6
|
ec0ddf53dfa54aaa21d48b5e7f334aabcba5227e
|
refs/heads/master
| 2021-01-10T06:39:56.117202
| 2013-08-24T20:15:22
| 2013-08-24T20:15:22
| 46,000,158
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,287
|
cpp
|
DocumentNKController.cpp
|
#include "DocumentNKController.h"
DocumentNKController::DocumentNKController(QWidget* parent)
{
view = new DocumentNKView(parent, this);
service = new DocumentNKService();
Contractor issuer;
Contractor receiver;
}
/**
Wyświetla okno dokumentu Nota Korygująca.
Zwraca utworzony dokument lub NULL w przypadku anulowania operacji.
*/
void DocumentNKController::exec() {
DocumentNK document;
// symbol
dnc = new DocumentNumeratorController("NK");
QString symbol = dnc->getNextSymbol();
view->getLineDocumentSymbol()->setText(symbol);
delete dnc;
dnc = NULL;
// miejsce wystawienia
SettingsModel *sm = new SettingsModel();
QString documentPlace = sm->getDefualtDocumentPlace().getName();
view->getLineDocumentPlace()->setText(documentPlace);
delete sm;
sm = NULL;
if(ApplicationManager::getInstance()->getLoggedUser() != NULL)
this->view->getLineIssueName()->setText(ApplicationManager::getInstance()->getLoggedUser()->getName());
int signal = view->exec();
document = getDocumentNK();
if(signal == QDialog::Accepted)
{
service->addDocumentNK(document);
this->printDoc();
return ;
}
return;
}
void DocumentNKController::exec(QString symbol)
{
document = service->getDocumentNK(symbol);
oldDocument = document;
initData();
int signal = view->exec();
document = getDocumentNK();
if(signal == QDialog::Accepted)
{
if(!(oldDocument == document)) // jeśli nie było edycji, to nie ma potrzeby wywoływać modelu
{
service->editDocumentNK(document);
this->printDoc();
}
return ;
}
return;
}
void DocumentNKController::initData()
{
this->receiver=document.getContractor();
view->getLineDocumentSymbol()->setText(document.getSymbol());
view->getLineDocumentPlace()->setText(document.getDocumentPlace());
view->getDateEditDocumentDate()->setDate(document.getDocumentDate());
view->getLineRelatedTo()->setText(document.getInvoiceSymbol());
view->getDateEditInvoiceDate()->setDate(document.getInvoiceDate());
view->getLineIssueName()->setText(document.getIssueName());
view->getLineReceiveName()->setText(document.getReceiveName());
view->getTextReceiver()->setText(document.getContractor().getContractorData());
view->getTextCorrected()->setText(document.getCorrectedContent());
view->getTextCorrect()->setText(document.getCorrectContent());
}
void DocumentNKController::setReceiveName(Contractor receiver)
{
if(receiver.isCompany())
view->getLineReceiveName()->setText(receiver.getRepresentative());
else
view->getLineReceiveName()->setText(receiver.getName());
}
void DocumentNKController::setIssueName(QString name)
{
view->getLineIssueName()->setText(name);
}
DocumentNK DocumentNKController::getDocumentNK()
{
DocumentNK document;
document.setSymbol(view->getLineDocumentSymbol()->text());
document.setDocumentDate(view->getDateEditDocumentDate()->date());
document.setDocumentPlace(view->getLineDocumentPlace()->text());
document.setContractor(receiver);
document.setInvoiceSymbol(view->getLineRelatedTo()->text());
document.setInvoiceDate(view->getDateEditInvoiceDate()->date());
document.setCorrectedContent(view->getTextCorrected()->toPlainText());
document.setCorrectContent(view->getTextCorrect()->toPlainText());
document.setIssueName(view->getLineIssueName()->text());
document.setReceiveName(view->getLineReceiveName()->text());
return document;
}
void DocumentNKController::selectReceiver()
{
SelectContractorController* contractorSelect = new SelectContractorController(view);
contractorSelect->setContractorTypeFilter(Contractor::SUPPLIER); // tylko dostawcy
contractorSelect->showDialog();
if(contractorSelect->getView()->getContractorsTable()->getId() > 0)
{
receiver = contractorSelect->addContractor();
view->setReceiver(receiver);
this->setReceiveName(receiver);
}
delete contractorSelect;
}
void DocumentNKController::selectInvoice()
{
SelectInvoiceController dialog(view, "PURCHASE");
dialog.setDocumentNotTypeFilter("NK"); // nie wyświetli dokumentów NK
dialog.showDialog();
Document invoice;
if(dialog.getCancel() !=1)
{
invoice = dialog.addInvoice();
insertInvoiceData(invoice);
}
}
void DocumentNKController::insertInvoiceData(Document invoice)
{
view->getLineRelatedTo()->setText(invoice.getSymbol());
view->getDateEditInvoiceDate()->setDate(invoice.getDocumentDate());
receiver = invoice.getContractor();
view->setReceiver(receiver);
this->setReceiveName(receiver);
}
void DocumentNKController::checkChanges()
{
document = getDocumentNK();
if(this->isEmptyForm())
{
view->reject();
}
else
{
if(!(oldDocument == document)) // jeśli kliknięto anuluj, ale nastąpiły zmiany
{
MessageBox *messageBox = new MessageBox();
if (messageBox->createQuestionBox("Dokonano zmian") == MessageBox::YES)
{
//this->checkRequiredFields(); // jesli bedzie walidacja to tutaj
view->accept();
}
else
view->reject(); // zmiany dokonane, ale użytkowik chce anulować
}
else
{
view->reject(); // nie dokonano zmian, anuluj
}
}
}
bool DocumentNKController::isEmptyForm()
{
if(!view->getLineRelatedTo()->text().isEmpty())
return false;
else if(!view->getTextReceiver()->toPlainText().isEmpty())
return false;
else if(!view->getTextCorrected()->toPlainText().isEmpty())
return false;
else if(!view->getTextCorrect()->toPlainText().isEmpty())
return false;
else
return true;
}
void DocumentNKController::printDoc()
{
DocumentNK nk = service->getDocumentNK(view->getLineDocumentSymbol()->text());
PrintPurchaseDocumentController *pc = new PrintPurchaseDocumentController(view->getLineDocumentSymbol()->text());
pc->print(&nk);
delete pc;
}
DocumentNKController::~DocumentNKController()
{
delete service;
}
|
9998c436d9f8ad9c00d029c344c80cc8c5502cb0
|
660bbd91d82c86cc4e2d5e576331d74c72fc97f1
|
/C++/240/GoTos/main.cpp
|
78ce24fc148bb663eb06023f69b34d4621ab8c08
|
[] |
no_license
|
lexic92/Practice-Programs
|
67d3dc906e7d49b8d3680f0099bd26dc2135d778
|
44da603722b047f77c754e2173de3111416310f9
|
refs/heads/master
| 2021-01-01T20:01:12.756552
| 2013-04-05T04:02:43
| 2013-04-05T04:02:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 809
|
cpp
|
main.cpp
|
#include <iostream>
#include <cmath>
#include "main.h"
int main()
{
simpleExample();
whatNotToDo();
}
void whatNotToDo()
{
//The goto statement and it’s corresponding statement label must appear in the same function.
goto skip; // invalid forward jump
int x;
skip:
=
x = 3; // what would this even evaluate to?
// OUTPUT:
//main.cpp: In function ‘void whatNotToDo()’:
//main.cpp:15: error: jump to label ‘skip’
//main.cpp:13: error: from here
//main.cpp:14: error: crosses initialization of ‘int x’
}
void simpleExample()
{
using namespace std;
// this is a statement label
tryAgain :
cout << "Enter a non-negative number";
double dX;
cin >> dX;
if (dX < 0.0)
goto tryAgain; // this is the goto statement
cout << "The sqrt of " << dX << " is " << sqrt(dX) << endl;
}
|
9cc84240b3702ccee57a5f2e726025bbec973904
|
009095e774626d71a799880f6f628b81728a3f4c
|
/src/Account.cpp
|
bfc19570cc23c5fcfb2c8e939d75c67a33476321
|
[] |
no_license
|
guptacharchil/BankSystem
|
514081dbe7c86d96f8e925d93f0f133b7a33f747
|
b2f3d93421f22b816d463984f842a9c4faf7461a
|
refs/heads/master
| 2020-06-03T06:15:39.210929
| 2019-06-12T02:17:52
| 2019-06-12T02:17:52
| 191,475,855
| 0
| 0
| null | 2019-06-12T01:35:01
| 2019-06-12T01:35:01
| null |
UTF-8
|
C++
| false
| false
| 1,130
|
cpp
|
Account.cpp
|
#include <iostream>
#include "../include/BankSystem/Account.hpp"
Account::Account() //Constructor for initializing values
{
this->holderName = "John Doe";
this->accountNum = "123456789";
this->balance = 0;
}
Account::~Account() //Destructor to free memory when required
{
}
std::string Account::getHolderName()
{
return (this->holderName);
}
std::string Account::getAccountNum()
{
return (this->accountNum);
}
void Account::displayBalance()
{
std::cout << "The current balance is " << this->balance << ".\n";
}
double Account::getBalance()
{
return (this->balance);
}
void Account::withdraw(double sum) //Withdraw a certain amount from the balance
{
if (this->balance - sum > 0)
{
this->balance -= sum;
std::cout << sum << " withdrawn from the account.\n";
this->displayBalance();
}
else
{
std::cout << "Insufficient balance in the account!\n";
}
}
void Account::deposit(double sum) //Deposit a certain amount to the balance
{
this->balance += sum;
std::cout << sum << " deposited to the account.\n";
this->displayBalance();
}
|
afcda626a342c7fb317d9e67b76e926caf909fe6
|
c3ad6263554e6b5c8b7c4ff969d9296f708778fa
|
/HW_Project_13/homework_1573492750/Lesson13_1/Lesson13_1/Lesson13_1/Stack.h
|
fefff1e344dcf1597da7aea584d2927a4381238f
|
[] |
no_license
|
Cybr0/C_Cpp__Part-3
|
47b5f4bd1b069e678a08848cdf5e95c4c05b86c5
|
5015c285b6735e7de7b4f84300e585b8f80e2b6c
|
refs/heads/master
| 2022-10-19T05:09:30.976833
| 2020-06-12T12:20:16
| 2020-06-12T12:20:16
| 271,791,390
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,080
|
h
|
Stack.h
|
#pragma once
template<class U>
class list_item {
public:
list_item() {
next = nullptr;
prev = nullptr;
}
U data;
list_item<U>* next;
list_item<U>* prev;
};
template<class T>
class Stack {
public:
Stack() { _size = 0; item = nullptr; }
Stack(const std::initializer_list<T>& list);
~Stack() {}
void push(T);
T pop();
size_t size();
private:
size_t _size;
list_item<T> *item;
};
template<class T>
inline Stack<T>::Stack(const std::initializer_list<T>& list)
{
for (T item : list) {
push(item);
}
}
template<class T>
inline void Stack<T>::push(T value)
{
list_item<T>* new_item = new list_item<T>();
new_item->data = value;
if (item) {
item->next = new_item;
new_item->prev = item;
}
item = new_item;
_size++;
}
template<class T>
inline T Stack<T>::pop()
{
T ret_val;
if (item) {
ret_val = item->data;
if (item->prev) {
item = item->prev;
delete item->next;
item->next = nullptr;
} else {
delete item;
item = nullptr;
}
_size--;
}
return ret_val;
}
template<class T>
inline size_t Stack<T>::size()
{
return _size;
}
|
db26384576937a959694095d2ee1a0bee7ba4295
|
d0fb46aecc3b69983e7f6244331a81dff42d9595
|
/config/src/model/UpdateConfigDeliveryChannelRequest.cc
|
7bc16808bbbcfeb574fae224b051760119f3f7d5
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-cpp-sdk
|
3d8d051d44ad00753a429817dd03957614c0c66a
|
e862bd03c844bcb7ccaa90571bceaa2802c7f135
|
refs/heads/master
| 2023-08-29T11:54:00.525102
| 2023-08-29T03:32:48
| 2023-08-29T03:32:48
| 115,379,460
| 104
| 82
|
NOASSERTION
| 2023-09-14T06:13:33
| 2017-12-26T02:53:27
|
C++
|
UTF-8
|
C++
| false
| false
| 5,345
|
cc
|
UpdateConfigDeliveryChannelRequest.cc
|
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/config/model/UpdateConfigDeliveryChannelRequest.h>
using AlibabaCloud::Config::Model::UpdateConfigDeliveryChannelRequest;
UpdateConfigDeliveryChannelRequest::UpdateConfigDeliveryChannelRequest()
: RpcServiceRequest("config", "2020-09-07", "UpdateConfigDeliveryChannel") {
setMethod(HttpRequest::Method::Post);
}
UpdateConfigDeliveryChannelRequest::~UpdateConfigDeliveryChannelRequest() {}
bool UpdateConfigDeliveryChannelRequest::getNonCompliantNotification() const {
return nonCompliantNotification_;
}
void UpdateConfigDeliveryChannelRequest::setNonCompliantNotification(bool nonCompliantNotification) {
nonCompliantNotification_ = nonCompliantNotification;
setParameter(std::string("NonCompliantNotification"), nonCompliantNotification ? "true" : "false");
}
std::string UpdateConfigDeliveryChannelRequest::getClientToken() const {
return clientToken_;
}
void UpdateConfigDeliveryChannelRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
bool UpdateConfigDeliveryChannelRequest::getConfigurationSnapshot() const {
return configurationSnapshot_;
}
void UpdateConfigDeliveryChannelRequest::setConfigurationSnapshot(bool configurationSnapshot) {
configurationSnapshot_ = configurationSnapshot;
setParameter(std::string("ConfigurationSnapshot"), configurationSnapshot ? "true" : "false");
}
std::string UpdateConfigDeliveryChannelRequest::getDescription() const {
return description_;
}
void UpdateConfigDeliveryChannelRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
std::string UpdateConfigDeliveryChannelRequest::getDeliveryChannelTargetArn() const {
return deliveryChannelTargetArn_;
}
void UpdateConfigDeliveryChannelRequest::setDeliveryChannelTargetArn(const std::string &deliveryChannelTargetArn) {
deliveryChannelTargetArn_ = deliveryChannelTargetArn;
setParameter(std::string("DeliveryChannelTargetArn"), deliveryChannelTargetArn);
}
std::string UpdateConfigDeliveryChannelRequest::getDeliveryChannelCondition() const {
return deliveryChannelCondition_;
}
void UpdateConfigDeliveryChannelRequest::setDeliveryChannelCondition(const std::string &deliveryChannelCondition) {
deliveryChannelCondition_ = deliveryChannelCondition;
setParameter(std::string("DeliveryChannelCondition"), deliveryChannelCondition);
}
bool UpdateConfigDeliveryChannelRequest::getConfigurationItemChangeNotification() const {
return configurationItemChangeNotification_;
}
void UpdateConfigDeliveryChannelRequest::setConfigurationItemChangeNotification(bool configurationItemChangeNotification) {
configurationItemChangeNotification_ = configurationItemChangeNotification;
setParameter(std::string("ConfigurationItemChangeNotification"), configurationItemChangeNotification ? "true" : "false");
}
std::string UpdateConfigDeliveryChannelRequest::getDeliveryChannelName() const {
return deliveryChannelName_;
}
void UpdateConfigDeliveryChannelRequest::setDeliveryChannelName(const std::string &deliveryChannelName) {
deliveryChannelName_ = deliveryChannelName;
setParameter(std::string("DeliveryChannelName"), deliveryChannelName);
}
std::string UpdateConfigDeliveryChannelRequest::getDeliverySnapshotTime() const {
return deliverySnapshotTime_;
}
void UpdateConfigDeliveryChannelRequest::setDeliverySnapshotTime(const std::string &deliverySnapshotTime) {
deliverySnapshotTime_ = deliverySnapshotTime;
setParameter(std::string("DeliverySnapshotTime"), deliverySnapshotTime);
}
std::string UpdateConfigDeliveryChannelRequest::getDeliveryChannelId() const {
return deliveryChannelId_;
}
void UpdateConfigDeliveryChannelRequest::setDeliveryChannelId(const std::string &deliveryChannelId) {
deliveryChannelId_ = deliveryChannelId;
setParameter(std::string("DeliveryChannelId"), deliveryChannelId);
}
std::string UpdateConfigDeliveryChannelRequest::getOversizedDataOSSTargetArn() const {
return oversizedDataOSSTargetArn_;
}
void UpdateConfigDeliveryChannelRequest::setOversizedDataOSSTargetArn(const std::string &oversizedDataOSSTargetArn) {
oversizedDataOSSTargetArn_ = oversizedDataOSSTargetArn;
setParameter(std::string("OversizedDataOSSTargetArn"), oversizedDataOSSTargetArn);
}
long UpdateConfigDeliveryChannelRequest::getStatus() const {
return status_;
}
void UpdateConfigDeliveryChannelRequest::setStatus(long status) {
status_ = status;
setParameter(std::string("Status"), std::to_string(status));
}
|
73e048c90687ee813e7b317e58bcecec2bb0a7c4
|
3f440887531e54b4844fdba5f26954e1c01d8c2e
|
/vegetation.h
|
bb4062787056d8e7e6abef21c09740d90dbbe25e
|
[] |
no_license
|
Jartidelro/FireSpreadModel
|
0df39a35020b4b63d243c32709a2025ba1420901
|
7bef98d33e3b2347b62bc139be6b421c26d5ebb6
|
refs/heads/master
| 2021-01-20T17:02:47.965117
| 2016-06-29T11:49:16
| 2016-06-29T11:49:16
| 62,141,424
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 163
|
h
|
vegetation.h
|
#ifndef VEGETATION_H
#define VEGETATION_H
class Vegetation
{
public:
Vegetation();
Parameters* vegArray[gridSize][gridSize];
};
#endif // VEGETATION_H
|
ba255aa5e4d0d00131438dc33dc20d3cdfacea42
|
d94aeeb531ca5866f91ef4ee7bd696e2b09be061
|
/infoarena/barbar/barbar.cpp
|
ca246119684d54e5222393aa660a7412426c81f7
|
[] |
no_license
|
alexvelea/competitive
|
ffbe56d05a41941f39d8fa8e3fc366e97c73c2e0
|
f1582ba49174ca956359de6f68e26f6b30306a4d
|
refs/heads/master
| 2022-10-20T17:04:25.483158
| 2020-06-18T23:33:25
| 2020-06-18T23:33:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,568
|
cpp
|
barbar.cpp
|
#include <algorithm>
#include <fstream>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
ifstream in("barbar.in");
ofstream out("barbar.out");
const int kMaxN = 1005;
queue<pair<int, int> > bfs;
int father[kMaxN][kMaxN], fth[kMaxN * kMaxN], nr_f;
int best[kMaxN][kMaxN];
bool ok[kMaxN][kMaxN], viz[kMaxN][kMaxN];
vector<pair<int, int> > el[kMaxN * 2];
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, -1, 1};
int get_father(int f) {
if (fth[f] != f)
fth[f] = get_father(fth[f]);
return fth[f];
}
void join(int a, int b) {
a = get_father(a);
b = get_father(b);
if (a == 0 or b == 0)
return ;
fth[a] = b;
return ;
}
int get_father(int x, int y) {
int f = get_father(father[x][y]);
father[x][y] = f;
return f;
}
int main() {
int n, m;
int x_st, y_st, x_fi, y_fi;
in >> n >> m;
for (int i = 1; i <= n; ++i)
for (int j = 1; j <= m; ++j) {
ok[i][j] = true;
char c;
in >> c;
if (c == '.')
continue;
if (c == '*') {
ok[i][j] = false;
continue;
}
if (c == 'D') {
viz[i][j] = true;
bfs.push(make_pair(i, j));
continue;
}
if (c == 'I') {
// irod barmanul
x_st = i;
y_st = j;
continue;
}
if (c == 'O') {
// iubita lui irod
x_fi = i;
y_fi = j;
continue;
}
}
while (bfs.size()) {
int x = bfs.front().first;
int y = bfs.front().second;
bfs.pop();
for (int d = 0; d < 4; ++d) {
int nx = dx[d] + x;
int ny = dy[d] + y;
if (viz[nx][ny] == false and ok[nx][ny]) {
viz[nx][ny] = true;
best[nx][ny] = best[x][y] + 1;
bfs.push(make_pair(nx, ny));
}
}
}
// for (int i = 1; i <= n; ++i, cerr << '\n')
// for (int j = 1; j <= m; ++j)
// cerr << best[i][j];
for (int i = 1; i <= n; ++i)
for (int j = 1; j <= m; ++j)
el[best[i][j]].push_back(make_pair(i, j));
for (int i = n + m; i > 0; --i) {
for (pair<int, int> itr : el[i]) {
int c = 0;
int x = itr.first;
int y = itr.second;
for (int d = 0; d < 4; ++d) {
int nx = x + dx[d];
int ny = y + dy[d];
if (c == 0)
c = get_father(nx, ny);
else
join(c, get_father(nx, ny));
}
if (c == 0) {
++nr_f;
fth[nr_f] = nr_f;
c = nr_f;
}
father[x][y] = c;
}
/* for (int i = 1; i <= n; ++i, cerr << '\n')
for (int j = 1; j <= m; ++j)
if (father[i][j])
cerr << '1';
else
cerr << '0';
cerr << '\n';*/
if (get_father(x_st, y_st) == get_father(x_fi, y_fi) and get_father(x_st, y_st) != 0) {
out << i << '\n';
return 0;
}
}
out << "-1";
return 0;
}
|
7612a1aba52023c5a3202a26f098cba917d157bd
|
7cdeed4073db6c168d51220599ba996803e37b46
|
/src/gba/interrupts.cpp
|
d06fd331be2617a15246c26d1854388bdb66e796
|
[] |
no_license
|
OutOfTheVoid/gba_game
|
1fb4c2a18764dcb54b972518e0ae212c5f83fbbd
|
91c5fcb171eec78550d8094d6743c98976b8586d
|
refs/heads/main
| 2023-02-01T03:40:09.403010
| 2020-12-16T09:46:57
| 2020-12-16T09:46:57
| 321,855,739
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,494
|
cpp
|
interrupts.cpp
|
#include "gba/interrupts.hpp"
#include "gba/hal.hpp"
#include "gba/util.hpp"
void ARM_CODE master_isr();
bool block_interrups() {
bool state = GBA_INTERRUPT_MASTER_ENABLE != 0;
GBA_INTERRUPT_MASTER_ENABLE = 0;
return state;
}
void restore_interrupts(bool state) {
GBA_INTERRUPT_MASTER_ENABLE = state ? 1 : 0;
}
void (* handlers[14])() = {
};
void init_interrupts() {
GBA_INTERRUPT_MASTER_ENABLE = 0;
GBA_INTERRUPT_ENABLE = 0;
for (int i = 0; i < 14; i ++) {
handlers[i] = nullptr;
}
GBA_INTERRUPT_ROUTINE_PTR = & master_isr;
GBA_INTERRUPT_MASTER_ENABLE = 1;
}
void set_interrupt_enabled(Interrupt interrupt, bool enabled) {
uint16_t int_bit = 1 << static_cast<int32_t>(interrupt);
if (enabled) {
GBA_INTERRUPT_ENABLE |= int_bit;
} else {
GBA_INTERRUPT_ENABLE &= ~int_bit;
}
}
void set_handler(Interrupt interrupt, void (* handler)()) {
bool int_state = block_interrups();
int int_num = static_cast<int>(interrupt);
uint16_t int_bit = 1 << int_num;
handlers[int_num] = handler;
if (handler != nullptr) {
GBA_INTERRUPT_ENABLE |= int_bit;
} else {
GBA_INTERRUPT_ENABLE &= ~int_bit;
}
restore_interrupts(int_state);
}
void ARM_CODE master_isr() {
bool iblock = block_interrups();
uint16_t interrupts = GBA_INTERRUPT_FLAGS;
for (int i = 0; i < 14; i ++) {
if (((interrupts & (1 << i)) != 0) && (handlers[i] != nullptr)) {
handlers[i]();
}
}
GBA_INTERRUPT_FLAGS_BIOS = interrupts;
GBA_INTERRUPT_FLAGS = interrupts;
restore_interrupts(iblock);
}
|
713d01d079f5df76d620e928f7b3ef1b351330d0
|
cf648257b8ed25eb5bd4315e7a6d6d6be3cffbbf
|
/D3DApp/Slider.cpp
|
ed6e83d8c7d450c3ce54b0d91221db904209e40a
|
[] |
no_license
|
rahulrajatsingh/TinyGameEngine
|
e5027702276e11b2601f1c8891896f8c4cfc6102
|
a7b7ab25e2bde3bc93d7306b7e9522750e8995c8
|
refs/heads/master
| 2020-04-02T05:48:02.653912
| 2019-04-29T05:22:09
| 2019-04-29T05:22:09
| 154,106,172
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 854
|
cpp
|
Slider.cpp
|
#include "StdAfx.h"
#include "Slider.h"
using namespace GEngine;
Slider::Slider(PlayerSlider slider)
: xPos(0)
, yPos(18) //lets put it in center for now
{
if(PLAYER_ONE_SLIDER == slider)
{
xPos = 1;
}
else
{
xPos = 79;
}
position.lower = yPos;
position.upper = yPos + SLIDER_LENGTH;
slider_ = new QuadObject(SLIDER_WIDTH,SLIDER_LENGTH,VERTEX(xPos,yPos,0), COLOR_RED, XY);
Direct3DInterface::GetInstance().AddObject(slider_);
}
Slider::~Slider(void)
{
}
void Slider::MoveSlider(DirectionSlider direction)
{
if(direction == SLIDER_GO_UP)
{
yPos += 1;
}
else
{
yPos -= 1;
}
position.lower = yPos;
position.upper = yPos + SLIDER_LENGTH;
slider_->SetPosition(VERTEX(xPos,yPos,0));
}
SliderPosition Slider::GetPosition()
{
return position;
}
|
981e55546e49781616105ce52cc705ec52f20d6e
|
c2a3e92f9253016c52a78c1e6034ef9867ab4946
|
/Headers/CameraControls.h
|
e390866e2d3e49c8f50eb6997fea7dac7289c662
|
[] |
no_license
|
AKalf/Shaders-in-OpenGl-using-C-
|
f43f093b52e54dcfa4fa01122e02a8deab424ec8
|
344c4aaf945f4ca67c061feb8f028083a4eccc59
|
refs/heads/master
| 2020-04-02T14:27:36.903292
| 2018-10-24T16:13:03
| 2018-10-24T16:13:03
| 154,525,558
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,631
|
h
|
CameraControls.h
|
#ifndef __CAMERACONTROLS_H_INCLUDED__
#define __CAMERACONTROLS_H_INCLUDED__
// Include standard headers
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
// Include GLEW
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <GLFW/glfw3.h>
// It is included in "MyTime.h"
//#include <GLFW/glfw3.h>
// Include GLM
#include <glm/glm.hpp>
#include <glm\common.hpp>
#include <glm\simd\common.h>
#include <glm/gtx/transform.hpp> // after <glm/glm.hpp>
#include <glm\gtc\matrix_transform.hpp>
#include "MyTime.h"
#include "MyDebug.h"
using namespace glm;
#define __LOAD_SHADERS_H__
#define FOURCC_DXT1 0x31545844 // Equivalent to "DXT1" in ASCII
#define FOURCC_DXT3 0x33545844 // Equivalent to "DXT3" in ASCII
#define FOURCC_DXT5 0x35545844 // Equivalent to "DXT5" in ASCII
// Initial Field of View
const float initialFoV = 75.0f;
const float speed = 3; // 3 units / second
const float mouseSpeed = 0.0005f;
class MyCamera {
private:
// Get mouse position
double xpos, ypos;
// Variables to calculate center of window
int currentWidth, currentHeight;
// horizontal angle : toward -Z
float horizontalAngle;
// vertical angle : 0, look at the horizon
float verticalAngle;
// position
glm::vec3 cameraPosition;
void MoveCamera(GLFWwindow* window, glm::vec3 cameraDirection, glm::vec3 right);
public:
MyCamera(glm::vec3 cameraPos);
void CameraUpdate(GLFWwindow* window, std::vector<glm::mat4>* matrices);
glm::vec3 GetCameraPosition();
};
#endif
|
12ba515f57db296e44dad6ea9d8ce0a062f84b79
|
efcb3d05fa4b5a84ccfd3606b7ce85d7a2261735
|
/My2DGameEngine/Transform.h
|
c1e441e59362b88a9c6a266c4739e67c9fea22f7
|
[] |
no_license
|
meisamrce/2DGameEgnine
|
3eb3feab17aca9b5879ad598f90efd4ebf87be8d
|
062773801179998742d1ea3630acd052b732a885
|
refs/heads/master
| 2023-04-16T07:06:26.787673
| 2021-04-26T15:23:45
| 2021-04-26T15:23:45
| 351,838,494
| 14
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 666
|
h
|
Transform.h
|
#ifndef TRANSFORM_H
#define TRANSFORM_H
#include "Global.h"
class Transform
{
public:
Transform();
~Transform();
void setPosition(const glm::vec2 &value);
glm::vec2 getPosition() const;
void setScale(float value);
float getScale() const;
void setRotate(float value);
float getRotate() const;
void translate(const glm::vec2 &value);
void translateX(float x);
void translateY(float y);
void scale(float value);
void rotate(float value);
protected:
glm::vec2 m_Position;
float m_Scale;
float m_Rotate;
};
#endif // TRANSFORM_H
|
389d698e38bdc1983a3a21752211d08f6adee843
|
55aa6896ec6e891bd0d7485a5dcb19a702bc7b66
|
/Codeforces/366a.cpp
|
54096ebd6c30bd5d0811d153d841d02099cc0334
|
[] |
no_license
|
akkapakasaikiran/Competitive-Programming
|
590f0edbe11ed8f89fd2504d98a8e308cb077a62
|
44eb6fb693a7e3b6e0a8afbbbc2ef060d657417b
|
refs/heads/master
| 2020-12-01T04:59:20.116932
| 2020-11-16T21:57:35
| 2020-11-16T21:57:35
| 230,562,500
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,482
|
cpp
|
366a.cpp
|
#include<iostream>
#include<vector>
#include<list>
#include<cmath>
#include<set>
#include<map>
#include<unordered_map>
#include<set>
#include<unordered_set>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
#define ll long long
#define st string
#define vi vector<int>
#define vii vector<int>::iterator
#define pb push_back
#define all(v) v.begin(),v.end()
#define pi pair<int,int>
#define mp make_pair
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<n;i++)
#define forab(i,a,b) for(int i=a;i<b;i++)
#define forv(v) for(auto x : v)
#define max3(a,b,c) max(max(a,b),c)
#define max4(a,b,c,d) max(max(a,b),max(c,d))
#define min3(a,b,c) min(min(a,b),c)
#define min4(a,b,c,d) min(min(a,b),min(c,d))
#define tki take_input
#define tkii take_input<int>
template <typename T>
void take_input(vector<T> &a, int size){
T tmp;
for(int i=0;i<size;i++){
cin>>tmp;
a.push_back(tmp);
}
}
#define prv print_vector
#define prvi print_vector<int>
template <typename T>
void print_vector(vector<T> v){
for(int i=0;i<v.size();i++) cout<<v[i]<<" ";
cout<<endl;
}
void swap(bool &hate){
if(hate) hate = false;
else hate = true;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n; cin>>n;
bool hate = true;
while(n>1){
if(hate){
cout<<"I hate that ";
swap(hate);
}
else{
cout<<"I love that ";
swap(hate);
}
n--;
}
if(hate) cout<<"I hate it"<<endl;
else cout<<"I love it"<<endl;
}
|
6e1283eb422332e4d9f8f84b394c46fe6aea66d0
|
1701ae0cc2c6e54bda999f28a209eee736b60c97
|
/MapComponents/MapVariants/NoiseMap.hpp
|
1f210597c31545644da067f196fe645ba0b25ed9
|
[] |
no_license
|
Afromullet/Colony
|
1ae977c94762e9a11f71df54b2691464827d0c4c
|
1c50b068eaf4be447434320fc75eabef9c9de209
|
refs/heads/master
| 2021-05-06T15:39:34.407735
| 2018-12-02T02:26:02
| 2018-12-02T02:26:02
| 113,618,907
| 3
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 505
|
hpp
|
NoiseMap.hpp
|
//
// NoiseMap.hpp
// Colony
//
// Created by Sean on 5/20/18.
// Copyright © 2018 Afromullet. All rights reserved.
//
#ifndef NoiseMap_hpp
#define NoiseMap_hpp
#include <stdio.h>
#include "Map.hpp"
class NoiseMap : public Map
{
public:
NoiseMap();
void Generate_NoiseMap(sf::Vector2i _tileSize,unsigned int _width, unsigned int _height);
void GenerateNoiseValues();
void SetBiomes();
void LoadBiomeTiles();
void GenerateTerrainFeatures();
};
#endif /* NoiseMap_hpp */
|
b7bce512771b2f43f926efa532a34bdd535792bf
|
175e724e9cc27fe3000326c816c6c8a2e8ed5e48
|
/jma-receipt.r_5_1_branch/cobol/copy/HCM18V01.INC
|
6f58130a582ac8563ebc5f657cf79de4cf9d5fbc
|
[] |
no_license
|
Hiroaki-Inomata/ORCA-5-1
|
8ddb025ed0a9f7d4ca43503dff093722508207bf
|
15c648029770cfd9b3af60ae004c65819af6b4b1
|
refs/heads/master
| 2022-11-08T13:33:19.410136
| 2020-06-25T13:35:13
| 2020-06-25T13:35:13
| 274,871,265
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,217
|
inc
|
HCM18V01.INC
|
01 HCM18V01.
02 HCM18V01-KANANAME PIC X(30).
02 HCM18V01-NAME PIC X(26).
02 HCM18V01-HOSPNAME PIC X(60).
02 HCM18V01-BYOSYOSU PIC X(4).
02 HCM18V01-TOTALTEN PIC X(6).
02 HCM18V01-TOTALMONEY PIC X(10).
02 HCM18V01-KOFUNUM.
03 HCM18V01-KOFUNUM-S PIC X(1) OCCURS 13 TIMES.
02 HCM18V01-SRYYMD.
03 HCM18V01-SRYYMD-S PIC X(1) OCCURS 7 TIMES.
02 HCM18V01-KENSAYMD.
03 HCM18V01-KENSAYMD-S PIC X(1) OCCURS 7 TIMES.
02 HCM18V01-GOKEI.
03 HCM18V01-GOKEI-S PIC X(1) OCCURS 7 TIMES.
02 HCM18V01-KEIKA-G OCCURS 3 TIMES.
03 HCM18V01-KEIKA PIC X(52).
02 HCM18V01-ZENKAIY PIC X(2).
02 HCM18V01-ZENKAIM PIC X(2).
02 HCM18V01-ZENKAID PIC X(2).
02 HCM18V01-SYOSHINY PIC X(2).
02 HCM18V01-SYOSHINM PIC X(2).
02 HCM18V01-SYOSHIND PIC X(2).
02 HCM18V01-SAISHINY PIC X(2).
02 HCM18V01-SAISHINM PIC X(2).
02 HCM18V01-SAISHIND PIC X(2).
02 HCM18V01-JIKANGAI1 PIC X(2).
02 HCM18V01-JIKANGAI2 PIC X(2).
02 HCM18V01-JIKANGAI3 PIC X(2).
02 HCM18V01-KAISU-G OCCURS 32 TIMES.
03 HCM18V01-KAISU PIC X(3).
02 HCM18V01-KOUTEN-G OCCURS 32 TIMES.
03 HCM18V01-KOUTEN PIC X(7).
02 HCM18V01-SRYKBN-G OCCURS 30 TIMES.
03 HCM18V01-SRYKBN PIC X(4).
02 HCM18V01-TEKIYO-G OCCURS 30 TIMES.
03 HCM18V01-TEKIYO PIC X(52).
02 HCM18V01-SYOBYOEDA PIC X(1).
02 HCM18V01-SYOBYO PIC X(2).
02 HCM18V01-SYOSHINMONEY PIC X(7).
02 HCM18V01-SAISHINMONEY PIC X(7).
02 HCM18V01-SYOKEI PIC X(7).
02 HCM18V01-PTNUM PIC X(20).
02 HCM18V01-JIKANGAI11 PIC X(4).
02 HCM18V01-JIKANGAI21 PIC X(4).
02 HCM18V01-JIKANGAI31 PIC X(4).
02 HCM18V01-RENNUM PIC X(7).
|
64795f514cc8a1d562208a0bf754b62ea300c355
|
00f545daf7b2199d7231c52bcefa8fdb12a4f89f
|
/src/pathtracer/CMU462/include/CMU462/misc.h
|
c9d63685a9ad6f3e4759d1402252beb906beea69
|
[
"MIT"
] |
permissive
|
jazztext/VRRayTracing
|
eec21279cbb59b757248cf2b5d8e9c2827973a23
|
82201cbdbda9330ce4c023a517d18c56d38094dd
|
refs/heads/master
| 2021-01-21T13:57:09.068408
| 2016-05-10T03:19:21
| 2016-05-10T03:19:21
| 55,202,577
| 3
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,817
|
h
|
misc.h
|
#ifndef CMU462_MISC_H
#define CMU462_MISC_H
#include <cmath>
#include <limits>
#include <algorithm>
namespace CMU462 {
#define PI (3.14159265358979323)
#define EPS_D (0.00000000001)
#define EPS_F (0.000001f)
#define INF_D (std::numeric_limits<double>::infinity())
#define INF_F (std::numeric_limits<float>::infinity())
// MOUSE INPUTS //
#define MOUSE_LEFT 0
#define MOUSE_RIGHT 1
#define MOUSE_MIDDLE 2
// KEYBOARD INPUTS //
#define KEYBOARD_ENTER 257
#define KEYBOARD_TAB 258
#define KEYBOARD_BACKSPACE 259
#define KEYBOARD_INSERT 260
#define KEYBOARD_DELETE 261
#define KEYBOARD_RIGHT 262
#define KEYBOARD_LEFT 263
#define KEYBOARD_DOWN 264
#define KEYBOARD_UP 265
#define KEYBOARD_PAGE_UP 266
#define KEYBOARD_PAGE_DOWN 267
#define KEYBOARD_PRINT_SCREEN 283
// EVENT TYPES //
#define EVENT_RELEASE 0
#define EVENT_PRESS 1
#define EVENT_REPEAT 2
// MODIFIERS //
#define MOD_SHIFT 0x0001
#define MOD_CTRL 0x0002
#define MOD_ALT 0x0004
#define MOD_SUPER 0x0008
/*
Takes any kind of number and converts from degrees to radians.
*/
template<typename T>
inline T radians(T deg) {
return deg * (PI / 180);
}
/*
Takes any kind of number and converts from radians to degrees.
*/
template<typename T>
inline T degrees(T rad) {
return rad * (180 / PI);
}
/*
Takes any kind of number, as well as a lower and upper bound, and clamps the
number to be within the bound.
NOTE: x, lo, and hi must all be the same type or compilation will fail. A
common mistake is to pass an int for x and size_ts for lo and hi.
*/
template<typename T>
inline T clamp(T x, T lo, T hi) {
return std::min(std::max(x, lo), hi);
}
} // namespace CMU462
#endif // CMU462_MISCMATH_H
|
4fb0641dc5537332c569465f1d009b746216310f
|
79d988f7c9a45944739ac25b5ed5be53d5a785b2
|
/src/kernel/mem.cpp
|
81ae56c84921e549753985100a8b3810898c9573
|
[] |
no_license
|
drgraetz/os
|
0d0a586e8e2c4fa5a6b53dc80b1149748c2a0130
|
b7a7cff6c6e206a7e2c22f7daf5611a519c269e5
|
refs/heads/master
| 2020-05-21T16:40:50.712753
| 2016-10-02T16:00:53
| 2016-10-02T16:00:53
| 63,357,837
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,441
|
cpp
|
mem.cpp
|
#include "kernel.hpp"
/**
* @file
*
* Implements the kernel's memory functionality.
*
* @author Dr. Florian M. Grätz
*/
//#define IS_LOWMEM(x) ((x) < ((uint32_t)&CODE / AddressSpace::MEMPAGESIZE))
//
///**
// * Number of free pages of memory.
// */
//static uint32_t freePagesCount;
//
///**
// * A descriptor for a set of free memory pages. A descriptor fits exactliy in
// * a single memory page.
// */
//typedef struct freeMemoryDesc_s {
// /**
// * A set of indices to free memory pages.
// */
// uint32_t freeIndices[sizeof(AddressSpace::MemPage) / sizeof(uint32_t) - 1];
// /**
// * Pointer to the next structure in the single linked list, or INVALID_PTR.
// */
// struct freeMemoryDesc_s* next;
//} freeMemoryDesc_t;
//
///**
// * Pointer to a descriptor holding information on the free system memory.
// */
//freeMemoryDesc_t* freeMemory = (freeMemoryDesc_t*)INVALID_PTR;
///**
// * Number of unused entries in the currently used memory descriptor.
// */
//int freeEntriesInCurrentDescriptor = 0;
//
//bool swapLowMem(int& idx) {
// for (freeMemoryDesc_t* act = freeMemory; !IS_LOWMEM(idx); act = act->next) {
// if (act == INVALID_PTR) {
// return false;
// }
// for (size_t i = 0; i < ARRAYSIZE(act->freeIndices); i++) {
// uint32_t temp = act->freeIndices[i];
// if (IS_LOWMEM(temp)) {
// act->freeIndices[i] = idx;
// idx = temp;
// }
// }
// }
// return true;
//}
//
//void MemoryManager::markAsFree(int idx) {
// if (freeEntriesInCurrentDescriptor > 0) {
// freeMemory->freeIndices[--freeEntriesInCurrentDescriptor] = idx;
// freePagesCount++;
// printf("%u: %u\r\n", freeEntriesInCurrentDescriptor, idx);
// return;
// }
// freeMemoryDesc_t* phys;
// if (!swapLowMem(idx)) {
// return;
// }
// phys = (freeMemoryDesc_t*)(idx * MEMPAGE_SIZE);
// printf("TABLE: %p\r\n", phys);
// AddressSpace::kernel.map(phys, phys, MEMPAGE_SIZE, true, false);
// AddressSpace::kernel.load();
// phys->next = freeMemory;
// freeMemory = phys;
// freeEntriesInCurrentDescriptor = ARRAYSIZE(phys->freeIndices);
//}
//
//int MemoryManager::allocate(bool allowHighMemory) {
// int result;
// if (freePagesCount == 0) {
// return -1;
// }
// if (freeEntriesInCurrentDescriptor == ARRAYSIZE(freeMemory->freeIndices)) {
// result = (uint32_t)freeMemory / MEMPAGE_SIZE;
// freeMemory = freeMemory->next;
// freeEntriesInCurrentDescriptor = 0;
// } else {
// result = freeMemory->freeIndices[freeEntriesInCurrentDescriptor++];
// freePagesCount--;
// }
// if (!allowHighMemory) {
// if (!swapLowMem(result)) {
// return -1;
// }
// }
// return result;
//}
//
//uint32_t MemoryManager::getFreePagesCount() {
// return freePagesCount;
//}
void* memset(void* ptr, int value, size_t byteCount) {
char* c = (char*)ptr;
for (; byteCount > 0; byteCount--) {
*c++ = value;
}
return ptr;
}
//void* memcpy(void* dest, const void* source, size_t byteCount) {
// char* c = (char*)dest;
// for (; byteCount > 0; byteCount--) {
// *c++ = *(const char*)source;
// source = (char*)source + 1;
// }
// return dest;
//}
//
//MemoryStream::MemoryStream(void* buffer, size_t size, size_t pos) {
// start = (char*)buffer;
// end = (char*)buffer + size;
// if (pos > size) {
// pos = size;
// }
// current = (char*)buffer + pos;
//}
//
//off_t MemoryStream::seek(off_t pos) {
// if (pos < 0 || pos > end - start) {
// errno = EINVAL;
// return -1;
// }
// current = start + pos;
// errno = ESUCCESS;
// return pos;
//}
//
//ssize_t MemoryStream::write(const void* buf, size_t size) {
// if (buf == nullptr || size > SSIZE_MAX) {
// errno = EINVAL;
// return -1;
// }
// if (current + size > end) {
// size = end - current;
// }
// memcpy(current, buf, size);
// current += size;
// return size;
//}
//
//ssize_t MemoryStream::read(void* buf, size_t size) {
// if (buf == nullptr || size > SSIZE_MAX) {
// errno = EINVAL;
// return -1;
// }
// if (current + size > end) {
// size = end - current;
// }
// memcpy(buf, current, size);
// current += size;
// return size;
//}
|
1ffa8fdabc5ee36ec489abb418893689a71cda4f
|
2b93fc91d32734382ead2f011ceeffab68b19a9b
|
/08.02.cpp
|
0477bbfef344cf992efc4b5a4b19b0bfd7f8e07f
|
[] |
no_license
|
lionkor/GIP-19-20
|
ad0c643486d7dc1d7efceaef35b18a39c9863236
|
d779d193dd6432f4dfead84094b3b4a1a79df25a
|
refs/heads/master
| 2020-08-20T21:20:49.907014
| 2020-04-01T11:41:07
| 2020-04-01T11:41:07
| 216,066,976
| 8
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,516
|
cpp
|
08.02.cpp
|
#include <iostream>
#define CIMGGIP_MAIN
#include "CImgGIP05.h"
struct Box
{
int x;
int y;
int delta_y;
};
const int box_max = 10, box_size = 40;
void draw_boxes(Box boxes[])
{
gip_white_background();
for (std::size_t i = 0; i < box_max; ++i)
{
gip_draw_rectangle(boxes[i].x, boxes[i].y, boxes[i].x + box_size,
boxes[i].y + box_size, blue);
}
}
bool update_boxes(Box boxes[])
{
for (std::size_t i = 0; i < box_max; ++i)
{
boxes[i].y += boxes[i].delta_y;
if (boxes[i].y + box_size > gip_win_size_y) { return false; }
}
return true;
}
bool check_collision_AABB(int m_x, int m_y, const Box& box)
{
return m_x >= box.x && m_x <= box.x + box_size && m_y >= box.y &&
m_y <= box.y + box_size;
}
void handle_mouse_click(Box boxes[])
{
int mouse_x = gip_mouse_x();
int mouse_y = gip_mouse_y();
for (std::size_t i = 0; i < box_max; ++i)
{
if (check_collision_AABB(mouse_x, mouse_y, boxes[i]))
{
boxes[i].delta_y += 10;
boxes[i].y = 0 - box_size;
}
}
}
int main()
{
Box boxes[box_max] { 0 };
bool keep_going = true;
for (int i = 0; i < box_max; i++)
{
boxes[i].x = i * (box_size + 20) + 10;
boxes[i].y = 0;
boxes[i].delta_y = gip_random(10, 30);
}
while (keep_going && gip_window_not_closed())
{
draw_boxes(boxes);
for (int loop_count = 0; loop_count < 200; loop_count++)
{
gip_wait(5); // warte 5 Milli-Sekunden
if (gip_mouse_button1_pressed()) { handle_mouse_click(boxes); }
}
keep_going = update_boxes(boxes);
}
return 0;
}
|
f50432ce65a667d6460884c41364577f75621942
|
e396ca3e9140c8a1f43c2505af6f318d40a7db1d
|
/unittest/logic_test/Implies_AND_Area_HighToMiddle_and_Low.hpp
|
0bc55ff9fbcd8730187db08a5c376a3c9b1b0604
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
kenji-hosokawa/rba
|
4fb2c8ef84c5b8bf2d80785986abd299c9e76203
|
52a88df64dcfec8165aea32cb3052e7e74a3a709
|
refs/heads/master
| 2022-12-17T10:23:05.558421
| 2020-07-29T11:03:27
| 2020-07-29T11:03:27
| 274,852,993
| 0
| 0
| null | 2020-06-25T07:19:19
| 2020-06-25T07:19:19
| null |
UTF-8
|
C++
| false
| false
| 733
|
hpp
|
Implies_AND_Area_HighToMiddle_and_Low.hpp
|
// Copyright (c) 2019 DENSO CORPORATION. All rights reserved.
/**
* Implies_AND_Area_HighToMiddle_and_Low.hpp
*/
#ifndef IMPLIES_AND_AREA_HIGHTOMIDDLE_AND_LOW_HPP
#define IMPLIES_AND_AREA_HIGHTOMIDDLE_AND_LOW_HPP
#include <string>
#include "gtest/gtest.h"
#include "RBAArbitrator.hpp"
#define JSONFILE "Implies_AND_Area_HighToMiddle_and_Low.json"
namespace {
class Implies_AND_Area_HighToMiddle_and_Low : public ::testing::Test {
protected:
Implies_AND_Area_HighToMiddle_and_Low(void);
virtual ~Implies_AND_Area_HighToMiddle_and_Low(void);
virtual void SetUp(void);
virtual void TearDown(void);
protected:
rba::RBAModel* model=nullptr;
rba::RBAArbitrator* arb=nullptr;
std::string testName="";
};
}
#endif
|
33456dd4e315dda818e4e2752e6bb1097944d67e
|
767b47db951c27c5b0f73795c9803bb3a207b895
|
/deps.win32/include/live555_bak/liveMedia_version.hh
|
85ad99b21136aae3d104c329bc3804f39f317497
|
[
"BSD-3-Clause"
] |
permissive
|
OpenVisualCloud/Cloud-Gaming-Windows-Sample
|
6e4d13cbe641dbef2c9848978459e688df36ae24
|
34e5159baed94b9e45acc47d66c31f80969bfae2
|
refs/heads/master
| 2023-02-16T05:31:25.892275
| 2023-01-30T15:14:36
| 2023-01-30T15:14:36
| 194,909,729
| 50
| 19
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 294
|
hh
|
liveMedia_version.hh
|
// Version information for the "liveMedia" library
// Copyright (c) 1996-2015 Live Networks, Inc. All rights reserved.
#ifndef _LIVEMEDIA_VERSION_HH
#define _LIVEMEDIA_VERSION_HH
#define LIVEMEDIA_LIBRARY_VERSION_STRING "2015.02.05"
#define LIVEMEDIA_LIBRARY_VERSION_INT 1423094400
#endif
|
afd89bcdc999bd1ae207b95ab6feb51030851387
|
a3d6556180e74af7b555f8d47d3fea55b94bcbda
|
/ash/webui/eche_app_ui/url_constants.h
|
6dd8cafce5e967a8ce4324847b9ee6335f9694f0
|
[
"BSD-3-Clause"
] |
permissive
|
chromium/chromium
|
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
|
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
|
refs/heads/main
| 2023-08-24T00:35:12.585945
| 2023-08-23T22:01:11
| 2023-08-23T22:01:11
| 120,360,765
| 17,408
| 7,102
|
BSD-3-Clause
| 2023-09-10T23:44:27
| 2018-02-05T20:55:32
| null |
UTF-8
|
C++
| false
| false
| 550
|
h
|
url_constants.h
|
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WEBUI_ECHE_APP_UI_URL_CONSTANTS_H_
#define ASH_WEBUI_ECHE_APP_UI_URL_CONSTANTS_H_
namespace ash {
namespace eche_app {
extern const char kChromeUIEcheAppHost[];
extern const char kChromeUIEcheAppURL[];
extern const char kChromeUIEcheAppGuestHost[];
extern const char kChromeUIEcheAppGuestURL[];
} // namespace eche_app
} // namespace ash
#endif // ASH_WEBUI_ECHE_APP_UI_URL_CONSTANTS_H_
|
0f187ea445d63ae3652ae923f3ca76e13192bdf0
|
06bd829a0b316ff1a8b54b4fc1bb88c73a4fc68f
|
/数组/388.第 k 个排列.cpp
|
8656372dbc979aa313ec21af27b7a2b2538a9419
|
[] |
no_license
|
LiuYu0521/lintcode
|
148e763294f478f50858f8053cacf5478b5c60b4
|
97c90a2065c6bf6df76c43211af0db2da528b965
|
refs/heads/master
| 2021-01-22T21:53:32.924735
| 2017-08-13T02:51:25
| 2017-08-13T02:51:25
| 92,742,383
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 564
|
cpp
|
388.第 k 个排列.cpp
|
class Solution {
public:
/**
* @param n: n
* @param k: the kth permutation
* @return: return the k-th permutation
*/
string getPermutation(int n, int k) {
string res;
string num = "123456789";
vector<int> f(n, 1);
for(int i = 1; i < n; i++)
f[i] = f[i - 1] * i;
k--;
for(int i = n; i >= 1; i--)
{
int a = k / f[i - 1];
k = k % f[i - 1];
res.push_back(num[a]);
num.erase(a, 1);
}
return res;
}
};
|
18155c991096437b1c40cccc5ef70e8e8d06e407
|
9ada6ca9bd5e669eb3e903f900bae306bf7fd75e
|
/case3/ddtFoam_Tutorial/0.005400000/fH
|
bf1aabc8a2c4b66eab1f8294b1bcc063cb729d6d
|
[] |
no_license
|
ptroyen/DDT
|
a6c8747f3a924a7039b71c96ee7d4a1618ad4197
|
6e6ddc7937324b04b22fbfcf974f9c9ea24e48bf
|
refs/heads/master
| 2020-05-24T15:04:39.786689
| 2018-01-28T21:36:40
| 2018-01-28T21:36:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 123,513
|
fH
|
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0.005400000";
object fH;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField nonuniform List<scalar>
12384
(
0.0316502
0.0300079
0.0289191
0.0284718
0.0284006
0.0285069
0.0286538
0.0287551
0.0289879
0.0294004
0.0304451
0.0328274
0.0346456
0.0290897
0.0227183
0.0232142
0.0237637
0.0243702
0.0247693
0.0249465
0.0249989
0.0249847
0.0249558
0.0249276
0.024913
0.0249097
0.0249019
0.024879
0.0248475
0.0248083
0.0247758
0.0247335
0.0246851
0.024644
0.0246002
0.0244951
0.0244232
0.0243099
0.0241838
0.0239875
0.0237691
0.0233795
0.0232943
0.0230695
0.0303331
0.0304633
0.0294445
0.0274099
0.0262908
0.0259646
0.0259109
0.0258479
0.0259839
0.026161
0.026298
0.0265605
0.0267254
0.0268819
0.0270323
0.0271129
0.027234
0.0272726
0.0273954
0.0274586
0.0276156
0.0277887
0.0280439
0.0285064
0.0293179
0.0302564
0.0300703
0.0276243
0.0265587
0.0267674
0.0299999
0.0309593
0.0320908
0.0316504
0.0311093
0.0306528
0.0303692
0.0302051
0.0301462
0.030144
0.0301538
0.0301594
0.0301867
0.0302051
0.0302168
0.0302233
0.0302248
0.0302345
0.0302596
0.0302885
0.0303092
0.0303746
0.0305467
0.0309668
0.0316266
0.0303327
0.028744
0.0283589
0.0283244
0.0283743
0.0334501
0.0335937
0.0336726
0.0336554
0.033433
0.03314
0.0328349
0.0325994
0.0323538
0.0322141
0.0320538
0.0319308
0.03184
0.0316923
0.0316529
0.0315195
0.0314979
0.0316794
0.0315163
0.0317405
0.0317969
0.0322375
0.0322896
0.0308259
0.0286405
0.0277453
0.0276814
0.0279884
0.0282195
0.028343
0.0331828
0.0361172
0.0369461
0.0373514
0.0377177
0.0378927
0.0379309
0.0378407
0.0377355
0.0376246
0.0374833
0.0373597
0.0371832
0.0370722
0.0369397
0.0368512
0.0367551
0.0367559
0.03676
0.0367832
0.0367787
0.0367578
0.0367689
0.0367625
0.0368131
0.0368492
0.0368399
0.0365042
0.0339187
0.0312233
0.031169
0.0317598
0.03018
0.0291751
0.0289202
0.0290065
0.0298988
0.030977
0.0315925
0.0319267
0.0320449
0.0320395
0.0320206
0.0319362
0.0319654
0.0319195
0.0319967
0.0319639
0.0319944
0.0319687
0.0319414
0.0317095
0.031103
0.0297411
0.0275127
0.025726
0.0252182
0.025829
0.0270493
0.0276966
0.028322
0.0284509
0.0293121
0.0308702
0.0326554
0.0342995
0.0353703
0.0361204
0.0366991
0.0368363
0.037224
0.0369465
0.037196
0.0370906
0.0372987
0.0372587
0.0373865
0.0374011
0.0374641
0.0373124
0.0372792
0.0369567
0.0363164
0.0350674
0.0337972
0.033917
0.0339876
0.0339032
0.0338869
0.033882
0.0324039
0.0320707
0.0318415
0.0317635
0.0317795
0.031761
0.0318401
0.0317387
0.0318768
0.0317363
0.031775
0.0316616
0.0316806
0.031659
0.0316712
0.0316361
0.0316594
0.031636
0.0319443
0.0324374
0.0331718
0.0377085
0.0450706
0.0457485
0.0451829
0.0449142
0.0447718
0.0449218
0.0451916
0.0453454
0.0281523
0.0293313
0.0307291
0.0318025
0.032352
0.0326812
0.0327172
0.0329189
0.0326891
0.0328415
0.0329903
0.0327413
0.0327502
0.0326798
0.0325789
0.0325185
0.0323884
0.0321487
0.031888
0.0314432
0.0311704
0.0324591
0.0362906
0.0368534
0.0366941
0.0365892
0.0365462
0.0365345
0.0365399
0.0365528
0.0344617
0.0359262
0.0365905
0.0367661
0.0367757
0.0367285
0.0367353
0.0365325
0.0365859
0.0363173
0.0364766
0.0362377
0.036266
0.0361113
0.0358962
0.0360942
0.0358914
0.0360236
0.0363078
0.0365989
0.0384007
0.0403504
0.0391723
0.0384832
0.0383214
0.0383586
0.03845
0.0384651
0.038325
0.0381846
0.0294733
0.0348153
0.038238
0.0347305
0.0343037
0.0363276
0.0385269
0.039863
0.0404441
0.0406159
0.0405291
0.0403174
0.0400658
0.0397896
0.0394984
0.0393413
0.0392522
0.0392324
0.0392123
0.0391887
0.0391386
0.0391071
0.0391319
0.0391488
0.0393047
0.0395609
0.0395602
0.0382447
0.033428
0.0228028
0.0168736
0.0172156
0.0174407
0.0174671
0.0173514
0.018789
0.0456951
0.0540973
0.0540035
0.0535948
0.0532366
0.0530625
0.0528267
0.0527145
0.0527385
0.0528828
0.0531648
0.0535872
0.0541326
0.0547736
0.0552211
0.0553001
0.0543249
0.0515079
0.0476364
0.0444126
0.0429334
0.0399639
0.0281372
0.0185308
0.0259895
0.0259556
0.0264278
0.0274363
0.0285531
0.0291646
0.0293351
0.029184
0.028569
0.0280636
0.0283108
0.0299548
0.0336035
0.0307868
0.0227796
0.0234767
0.0243507
0.0252229
0.0257026
0.0257666
0.025576
0.0253759
0.0252701
0.0252725
0.025268
0.0252158
0.0251272
0.0250184
0.0249347
0.0249013
0.024911
0.0249446
0.0249914
0.0250102
0.0249907
0.0248983
0.0247491
0.0245505
0.0243352
0.0240965
0.0238613
0.0235533
0.0232568
0.0224381
0.0303767
0.0302098
0.0281041
0.025791
0.0249093
0.0249605
0.0253141
0.0257021
0.0259596
0.0264604
0.0268837
0.0273724
0.0275662
0.02773
0.0277469
0.0277558
0.0277485
0.0277096
0.0277264
0.0276964
0.0276973
0.0277404
0.0277928
0.028088
0.0286658
0.0296275
0.0303084
0.0299544
0.0290285
0.0287822
0.030018
0.03124
0.0321547
0.0314726
0.0307892
0.0301368
0.0298101
0.0298392
0.0299722
0.0300426
0.0300875
0.0300605
0.0299963
0.0299424
0.0299189
0.029924
0.0299769
0.0300204
0.0300539
0.0300368
0.0300353
0.0300788
0.0302267
0.0305617
0.0312998
0.0313079
0.0302433
0.0294133
0.0291294
0.0288679
0.0335036
0.0338047
0.0334814
0.0325407
0.0316013
0.0309261
0.0304947
0.0302043
0.0300371
0.029913
0.0298827
0.0298098
0.0298381
0.0298179
0.0298763
0.0299644
0.0300984
0.0303458
0.030597
0.0309252
0.0312458
0.0317376
0.032176
0.0320048
0.0308781
0.0292318
0.028382
0.0285817
0.0290237
0.0289805
0.0341598
0.036675
0.0374483
0.0378142
0.0378848
0.0375447
0.0370978
0.0367889
0.0366594
0.0364808
0.0362279
0.0358967
0.0356739
0.0355549
0.0355331
0.0355539
0.0355099
0.0355868
0.035572
0.0355382
0.0356354
0.0357632
0.0359208
0.0361181
0.0362888
0.0365278
0.0366713
0.0366635
0.0356828
0.0334088
0.0314551
0.0311259
0.0297825
0.0294659
0.0298495
0.0318366
0.0337166
0.0337699
0.0331311
0.0322749
0.0315844
0.0310761
0.0307551
0.0306
0.0305736
0.0306689
0.0308397
0.0310882
0.0312979
0.031612
0.0318651
0.0319595
0.0317569
0.0310268
0.0294738
0.0274195
0.0257465
0.025232
0.0260849
0.0273209
0.0326223
0.0341364
0.0364171
0.0388144
0.0400256
0.0403557
0.040212
0.0398343
0.0392465
0.0388119
0.0382504
0.0381881
0.0378718
0.0379271
0.037894
0.0379573
0.0378911
0.0379005
0.0379485
0.0379563
0.0378289
0.0376006
0.0370932
0.0360301
0.034427
0.0336194
0.0332981
0.0334528
0.0335107
0.0337222
0.0312071
0.0311565
0.0315276
0.0320292
0.0325112
0.0328628
0.0330795
0.0331506
0.0331574
0.0330846
0.0329174
0.0326922
0.0323669
0.032027
0.0317547
0.0316162
0.0313223
0.0312319
0.0311697
0.0316966
0.0322751
0.034647
0.0413699
0.0448604
0.0427627
0.0415291
0.0411693
0.0419909
0.0435142
0.0448708
0.0307821
0.0330311
0.0342064
0.0344067
0.0343659
0.0340051
0.0336797
0.0331729
0.0330159
0.0326545
0.0325515
0.0324748
0.0324242
0.0324225
0.0324514
0.0326769
0.0326928
0.03271
0.0324064
0.0320158
0.031503
0.0316219
0.0341458
0.03676
0.0367578
0.0367132
0.036773
0.0368447
0.036847
0.0369022
0.036701
0.0374291
0.037458
0.0372494
0.0369464
0.0366262
0.0363016
0.0359843
0.0356796
0.035404
0.0351396
0.0348772
0.034717
0.0344668
0.0343955
0.0344571
0.0345682
0.0348172
0.0352697
0.0357239
0.0369975
0.0393798
0.0396915
0.0385184
0.0386671
0.0392534
0.0397869
0.0397875
0.0390629
0.038265
0.0346564
0.0374593
0.0365313
0.0359008
0.0384513
0.0410219
0.0417554
0.0415143
0.0405719
0.0394361
0.0386103
0.0380416
0.0376562
0.0375748
0.0378365
0.0383957
0.0391272
0.0396365
0.0397607
0.0395932
0.0391722
0.0386258
0.0380717
0.0378128
0.037984
0.0385908
0.0392023
0.0387914
0.0362039
0.0284917
0.0193772
0.0226213
0.0239615
0.0224376
0.0210254
0.0339941
0.0513654
0.0538734
0.053042
0.0522376
0.0516671
0.0513223
0.0512069
0.0511868
0.0512189
0.0512279
0.0514181
0.0519011
0.0529137
0.0545529
0.0563642
0.057494
0.0575281
0.0540404
0.0477019
0.0428107
0.0418523
0.0402958
0.0306539
0.0193232
0.025335
0.0262922
0.0289361
0.0307747
0.0314624
0.0315675
0.031538
0.0316357
0.0314279
0.0304174
0.0286043
0.0287348
0.0318128
0.0314948
0.0228854
0.0239207
0.0251981
0.0262042
0.0264537
0.0261261
0.0256904
0.025437
0.0253327
0.025328
0.0252381
0.0250688
0.0248624
0.0247285
0.0247284
0.0248179
0.0249286
0.0250693
0.0252032
0.0253337
0.0253865
0.0253732
0.0252286
0.0249528
0.0246161
0.0242728
0.023976
0.0237052
0.0233811
0.0225234
0.0303949
0.0297947
0.027045
0.0253098
0.0253088
0.0260682
0.0265036
0.0265872
0.026843
0.0273946
0.0278522
0.028137
0.0281118
0.0279929
0.0278603
0.0277631
0.027726
0.0277591
0.0278162
0.027914
0.0279192
0.0279441
0.0278976
0.0278931
0.0281666
0.0288087
0.0298179
0.0303104
0.0301164
0.0294944
0.0300884
0.0316127
0.0325222
0.0318925
0.0309081
0.0299943
0.0298581
0.0300833
0.0301676
0.0300294
0.0297435
0.0294512
0.0291958
0.0290226
0.0289389
0.0289502
0.0290681
0.0292903
0.0295637
0.0297461
0.0298329
0.0298901
0.0299825
0.0302082
0.0308024
0.0313946
0.0314005
0.0307134
0.030112
0.0292873
0.0336375
0.033425
0.0317171
0.0303665
0.0297173
0.0294294
0.0293147
0.0292659
0.0292705
0.0292639
0.0292816
0.029302
0.0292988
0.0293149
0.0292992
0.0293784
0.0293982
0.0294835
0.0297356
0.030054
0.0304651
0.0310153
0.0316462
0.0320754
0.0320676
0.031253
0.0300865
0.0297165
0.0298541
0.0293641
0.0349049
0.0371296
0.0375731
0.0373315
0.0365562
0.0358768
0.0357543
0.0357981
0.0358522
0.0356444
0.035358
0.0352439
0.0353804
0.035648
0.0358605
0.0360493
0.0361988
0.0362468
0.0363285
0.0362447
0.0361402
0.0359824
0.0357889
0.0357456
0.0358183
0.0360283
0.0363138
0.0365274
0.0363139
0.0345823
0.0315903
0.0307646
0.0299122
0.030323
0.0326584
0.035297
0.0338598
0.031862
0.0306401
0.0299706
0.0295728
0.0294007
0.0294274
0.0297391
0.0300842
0.030461
0.0306062
0.0306358
0.0307781
0.031001
0.0313155
0.0317216
0.0320134
0.0318496
0.0310327
0.0293426
0.0271325
0.0253796
0.0254362
0.0269129
0.0345001
0.0364597
0.0404769
0.0414373
0.0407061
0.0393611
0.0379678
0.0367518
0.0361471
0.035657
0.0355307
0.0352453
0.0354723
0.0352605
0.035468
0.0355852
0.0358719
0.0363166
0.0367751
0.0373804
0.0377995
0.0379419
0.0376902
0.0369586
0.0355434
0.0341661
0.0333711
0.0329439
0.0330036
0.0333893
0.0310933
0.0321902
0.0334075
0.034273
0.0346963
0.0347898
0.0346627
0.0345356
0.0341407
0.0339559
0.0335441
0.0334822
0.033288
0.0331194
0.0329315
0.0325435
0.0321094
0.0315769
0.0310811
0.031142
0.0315414
0.0327973
0.0375438
0.0431643
0.0414006
0.0384236
0.0375499
0.0384048
0.0407833
0.0437286
0.0334985
0.034731
0.0347277
0.0342324
0.0334725
0.0327987
0.0320296
0.0315389
0.030932
0.0305815
0.0303204
0.0301164
0.0302298
0.030292
0.0307374
0.0312972
0.0317841
0.0322676
0.0325383
0.0324434
0.0319391
0.03152
0.032417
0.0356925
0.0369038
0.0369846
0.03721
0.0372567
0.0371926
0.0373354
0.0383398
0.0379255
0.0375761
0.0371182
0.0365473
0.0360634
0.0354852
0.0350328
0.034449
0.0339474
0.0335067
0.0331143
0.0327717
0.0325159
0.0324006
0.032563
0.0328115
0.0332003
0.0337932
0.0345266
0.0356623
0.0379426
0.039658
0.0387619
0.0389358
0.0400573
0.0410114
0.0411802
0.0400246
0.0382563
0.0368697
0.0370995
0.0368401
0.0390467
0.0412814
0.0414131
0.0400955
0.0387482
0.0376795
0.0372408
0.0368081
0.0365227
0.036388
0.0366533
0.0375364
0.0390536
0.0406145
0.0411518
0.0411174
0.0403512
0.0390885
0.0380378
0.0373168
0.0367417
0.0365552
0.0371422
0.0382538
0.0387967
0.0375894
0.0317503
0.0273716
0.0342282
0.035879
0.0282834
0.0300224
0.0468691
0.0533757
0.053124
0.052106
0.0515868
0.0514412
0.0515147
0.0516444
0.0517647
0.0518423
0.051814
0.0517218
0.0517296
0.0523119
0.0540473
0.0566758
0.0583697
0.0583787
0.0545852
0.0453295
0.0395721
0.0402424
0.0404382
0.0327121
0.0198586
0.0254817
0.0281051
0.0313432
0.0318191
0.0311911
0.0304217
0.0299808
0.0302523
0.0313576
0.0314489
0.0298148
0.0286051
0.0307063
0.0316209
0.0230275
0.0244563
0.0260825
0.0271041
0.0270636
0.0264394
0.0258068
0.0254106
0.0252239
0.0251438
0.0249837
0.0247489
0.0245293
0.0245266
0.0247056
0.0249507
0.0252012
0.0254397
0.0256619
0.0258383
0.0259323
0.0259178
0.0257523
0.025421
0.0249743
0.0244947
0.0240897
0.0237952
0.0234717
0.0226124
0.0303668
0.0295188
0.0267732
0.0257059
0.026643
0.0277315
0.0275523
0.027081
0.0272504
0.0277746
0.0281288
0.0281333
0.0278513
0.0275858
0.0274289
0.0273783
0.0273794
0.0274691
0.0275416
0.0277214
0.0278975
0.0280188
0.0280742
0.0279871
0.0279465
0.0282956
0.0291182
0.0300213
0.0303041
0.0297826
0.0300999
0.0320316
0.0331163
0.0324746
0.0308007
0.0298967
0.0300024
0.030103
0.0298666
0.0294618
0.0290207
0.0286246
0.0283429
0.0281604
0.028057
0.0280222
0.0280572
0.0282133
0.0285245
0.0289559
0.0293264
0.0295917
0.0297564
0.0299349
0.030363
0.0310711
0.0315499
0.0314822
0.0308825
0.0297052
0.0337517
0.0316097
0.0299115
0.029368
0.0292217
0.0291967
0.0292188
0.0292534
0.0292941
0.0293377
0.0293847
0.029428
0.0294503
0.0294312
0.0294501
0.0294119
0.0293947
0.0293504
0.0293777
0.0294836
0.0298548
0.0303773
0.0310022
0.0316316
0.0320642
0.0321051
0.0314329
0.0308036
0.0305122
0.0296771
0.0354171
0.0372666
0.0371726
0.0361233
0.0352034
0.0350477
0.0352116
0.0354194
0.0354477
0.0351808
0.0351294
0.0354281
0.0358625
0.0362572
0.0364313
0.0366573
0.036674
0.0368358
0.0368933
0.036886
0.0367578
0.0365503
0.0362192
0.0358624
0.0356528
0.035664
0.0359181
0.0362815
0.0364072
0.0351816
0.0315992
0.0306832
0.0304536
0.0325178
0.0357249
0.0342384
0.0312117
0.0303275
0.0302098
0.0299022
0.0295782
0.0297953
0.0306211
0.0318654
0.0330296
0.0337604
0.0339697
0.0335304
0.0327169
0.0319185
0.0315286
0.0315902
0.031901
0.0321893
0.0319293
0.0307931
0.0284801
0.0258122
0.0251574
0.0265469
0.035665
0.0391478
0.0420866
0.0406108
0.0382853
0.0364487
0.0354198
0.0350334
0.0352373
0.0353875
0.0358994
0.0361921
0.0364679
0.0364668
0.0362987
0.0360051
0.0358005
0.0357353
0.0357695
0.0361359
0.0368274
0.0376317
0.037921
0.0375675
0.0365429
0.0350889
0.0339487
0.0333753
0.0331589
0.033294
0.0327295
0.0340006
0.0348957
0.0352276
0.0351671
0.0347711
0.0340519
0.0332558
0.0324992
0.0319432
0.0315098
0.0313798
0.031397
0.0316735
0.0320063
0.0322121
0.032221
0.0319151
0.0313227
0.0309521
0.0310238
0.0317961
0.0349485
0.0408071
0.0412505
0.0379236
0.0366011
0.0364889
0.0383862
0.0423549
0.0354171
0.0350928
0.0344644
0.0337504
0.0329438
0.0321129
0.0311539
0.030437
0.0297914
0.0292805
0.0290701
0.028907
0.0289495
0.0291467
0.0292111
0.0297222
0.0302932
0.0311598
0.0319373
0.0324264
0.0322431
0.0317271
0.0317282
0.0340781
0.0366092
0.0371763
0.0374623
0.0374753
0.037343
0.0375526
0.0376435
0.03774
0.0373486
0.0365944
0.0358375
0.0352348
0.0344687
0.0336484
0.0327368
0.0318172
0.0311338
0.0304828
0.0302349
0.0299097
0.0299513
0.0302427
0.0308129
0.0314483
0.0322252
0.0331782
0.0344063
0.0365484
0.0391862
0.0392002
0.0388684
0.0398963
0.0411066
0.0419117
0.0407895
0.0382669
0.0371394
0.0369637
0.0384591
0.0408818
0.0412403
0.0398668
0.038382
0.0376501
0.0372872
0.0369717
0.0366027
0.0361542
0.0357164
0.0355861
0.0362638
0.0379864
0.0401104
0.0412459
0.0408192
0.0390157
0.0361491
0.0337958
0.033249
0.0337142
0.0343772
0.0354034
0.0370873
0.0384697
0.0380563
0.033353
0.0362817
0.045912
0.0429794
0.0332075
0.0404733
0.0519692
0.0533867
0.052403
0.0517079
0.0515011
0.0513998
0.0513434
0.0513441
0.0514716
0.0518517
0.0523047
0.0525596
0.0524822
0.0524647
0.0535483
0.0568238
0.0594762
0.0588416
0.0534924
0.0422419
0.0367984
0.0392966
0.0404378
0.0327286
0.019812
0.025839
0.029594
0.0317498
0.0308103
0.0293434
0.0284778
0.0278562
0.0279037
0.0292847
0.0307809
0.0299919
0.0287747
0.0303471
0.0315869
0.0232243
0.025055
0.0269927
0.0279872
0.0277009
0.0268265
0.025947
0.0253423
0.0250222
0.024886
0.0246853
0.0244366
0.0243355
0.0244973
0.0248423
0.0251917
0.0255384
0.0258369
0.026131
0.0263811
0.0265085
0.0264991
0.0262784
0.0258688
0.0253138
0.0247158
0.0242011
0.0238541
0.0235254
0.0226451
0.0303014
0.0294702
0.0270943
0.0266897
0.0284269
0.0293675
0.0283972
0.0274124
0.0274964
0.027938
0.0281127
0.0278856
0.0275346
0.0273716
0.0273938
0.0275427
0.0277106
0.027831
0.0277676
0.0277757
0.0279121
0.0280836
0.0281801
0.0281442
0.0280135
0.0280553
0.0286306
0.0295823
0.0301843
0.0298376
0.0301992
0.0324163
0.0337463
0.0327845
0.0304879
0.0298894
0.0300401
0.0299195
0.0295647
0.0291887
0.0288061
0.0284672
0.0282197
0.0280667
0.0279711
0.0278913
0.0278129
0.0277742
0.027864
0.0281467
0.0286142
0.0290702
0.0294134
0.0296599
0.0300221
0.0307042
0.031428
0.0316847
0.0312475
0.0299104
0.0334582
0.0300019
0.0293729
0.0292289
0.0292131
0.0292375
0.0292651
0.0292962
0.0293507
0.029438
0.0295445
0.0296458
0.0297186
0.0297542
0.0297496
0.0297135
0.029612
0.0294704
0.0293699
0.0293619
0.0295218
0.029909
0.0304329
0.0310791
0.031664
0.0320712
0.0319468
0.0315011
0.0309644
0.0299128
0.0357048
0.0371606
0.0363789
0.035185
0.0348109
0.0348188
0.0349559
0.0351762
0.0351514
0.0349596
0.0352192
0.035709
0.0360562
0.0363776
0.0365233
0.0367182
0.0367375
0.0367951
0.0367833
0.036858
0.0368677
0.0368722
0.0366082
0.0361744
0.035712
0.0354597
0.0355983
0.0360425
0.0363365
0.035438
0.0315512
0.0308291
0.0319065
0.03533
0.035574
0.0313563
0.0307894
0.031641
0.0311084
0.03014
0.0298674
0.0309153
0.0329637
0.0349653
0.0360638
0.0365745
0.0365926
0.0363987
0.0353833
0.0338403
0.0324373
0.0318477
0.031871
0.0322589
0.0324217
0.0317346
0.0295601
0.0262999
0.0250844
0.0264003
0.0369357
0.0418454
0.0414446
0.0384391
0.0363638
0.0354082
0.0352332
0.0357353
0.0365997
0.0375626
0.0383767
0.03901
0.0392489
0.0394308
0.0393566
0.0388788
0.0381121
0.0371383
0.0363908
0.0359849
0.0361007
0.0368537
0.0377637
0.0378413
0.0372107
0.0359961
0.0347249
0.033886
0.0333832
0.0333074
0.0339658
0.0348834
0.0353284
0.035331
0.0347988
0.0336888
0.0324552
0.0311728
0.0302839
0.0295158
0.0291598
0.0289231
0.0289249
0.0291112
0.0298124
0.0304505
0.0312618
0.0316196
0.0315161
0.0310069
0.0307708
0.0312356
0.0333126
0.0383828
0.040836
0.0386812
0.0368477
0.0360134
0.0365384
0.0407167
0.035866
0.034991
0.0345154
0.0338937
0.0328892
0.0316929
0.0303482
0.0295611
0.0288448
0.028672
0.0284709
0.0284511
0.0284994
0.028573
0.0286803
0.0288447
0.0292177
0.0299801
0.0309603
0.0319455
0.0322856
0.0319288
0.0315738
0.0328167
0.0355924
0.0371014
0.03755
0.0374403
0.0373528
0.0376564
0.037441
0.0376392
0.036785
0.0359211
0.0353017
0.034618
0.0334793
0.0321875
0.0308021
0.0296137
0.0287882
0.028182
0.0277878
0.0277221
0.0277331
0.0281197
0.0288083
0.0297521
0.0307243
0.031883
0.0332569
0.0353927
0.0384428
0.0395725
0.0390835
0.039429
0.0406082
0.0421008
0.0410752
0.038277
0.0372459
0.0375627
0.0400117
0.0412129
0.0401374
0.0385557
0.0378215
0.0376082
0.0374663
0.0372416
0.036894
0.0363631
0.0355752
0.0347431
0.0344494
0.0356311
0.0382455
0.0403164
0.0403501
0.0380539
0.033729
0.0295702
0.0283971
0.0297314
0.031555
0.0336355
0.0360035
0.0381661
0.0381446
0.0339523
0.0419664
0.052353
0.0447936
0.0383846
0.0469953
0.0532989
0.0530141
0.0518906
0.0512369
0.0505508
0.0495237
0.0485565
0.047984
0.0482528
0.0493723
0.0509034
0.0523315
0.0530076
0.0527963
0.0527359
0.0556496
0.0602041
0.0597581
0.05275
0.0411212
0.036362
0.0390004
0.039955
0.0314928
0.0193537
0.0261316
0.0302007
0.0311212
0.0294885
0.0283981
0.0277581
0.0270878
0.0269632
0.0280614
0.0296937
0.0294296
0.0288951
0.030396
0.0315621
0.023443
0.0257368
0.0279301
0.0288411
0.0284182
0.0273286
0.0261901
0.0253634
0.0248807
0.0246754
0.0244368
0.0242152
0.0242515
0.0245575
0.0250357
0.0254239
0.0257624
0.0260334
0.0264071
0.0267377
0.0269744
0.0269862
0.0267205
0.0262049
0.0255302
0.0248385
0.0242471
0.0238684
0.0235344
0.0226163
0.0302158
0.0295974
0.0277631
0.0280054
0.0302437
0.0308986
0.0291376
0.0276306
0.0276222
0.0280013
0.0280251
0.0276926
0.0274077
0.0274088
0.027702
0.0281202
0.0285358
0.0286401
0.0284463
0.028118
0.0280642
0.0282233
0.0283237
0.0282751
0.0281037
0.0280195
0.0283432
0.0291833
0.0299531
0.0297716
0.0301346
0.0328141
0.0342799
0.0326864
0.0302394
0.029902
0.029977
0.0298006
0.0295474
0.0293229
0.0290474
0.0287185
0.0284313
0.028277
0.0281939
0.0280796
0.0279175
0.0277243
0.0276131
0.0276962
0.0280547
0.0285598
0.0289884
0.0293505
0.029747
0.0304348
0.0312612
0.0317452
0.0313535
0.0299578
0.032289
0.02947
0.0292928
0.029243
0.0292808
0.0292952
0.0292799
0.0292927
0.0293674
0.0295303
0.0297062
0.02987
0.0299801
0.0300258
0.0300262
0.0299757
0.0298732
0.0297028
0.0295419
0.029427
0.0294408
0.0296356
0.0300409
0.0305964
0.0312554
0.031816
0.0320099
0.0317261
0.0311749
0.0300234
0.0358724
0.0368823
0.0357286
0.0350449
0.0349217
0.0347368
0.0347966
0.0350223
0.0349628
0.0348975
0.0352886
0.0356402
0.0358078
0.0360263
0.0363151
0.0366044
0.036691
0.0366969
0.0367047
0.0367277
0.0368105
0.0369404
0.036796
0.0364105
0.0357907
0.035327
0.0353658
0.0358739
0.036258
0.0354736
0.0315068
0.0314038
0.0340821
0.0361327
0.0327721
0.0315499
0.0329824
0.0326537
0.0307162
0.0295092
0.0300944
0.032492
0.0351901
0.0365958
0.0367568
0.0366067
0.0365581
0.0366415
0.0362458
0.0350141
0.0332696
0.0321502
0.0319769
0.0323581
0.0327555
0.0323403
0.0300483
0.0263017
0.0249509
0.0264453
0.0386683
0.0423456
0.0396746
0.0373245
0.0359442
0.0355397
0.0359334
0.0368541
0.0380405
0.0390246
0.0396261
0.0401325
0.0403248
0.0406838
0.0407131
0.0407514
0.0403169
0.0393529
0.038008
0.0367302
0.0361139
0.0363266
0.037268
0.0378736
0.0375516
0.0365988
0.0353281
0.0343969
0.033748
0.0333974
0.0347456
0.0352794
0.0354244
0.0351598
0.0341463
0.0325714
0.0311023
0.0296674
0.0289611
0.0283225
0.0281048
0.0278982
0.0277993
0.0278514
0.0281434
0.0287498
0.0298181
0.0306466
0.0312144
0.0310774
0.0307318
0.0309483
0.0324096
0.036529
0.0398585
0.0392905
0.0377686
0.0362705
0.0362739
0.0392726
0.035754
0.0352165
0.0349324
0.0341972
0.0328126
0.0311947
0.0295297
0.0288968
0.0283472
0.0283772
0.0283094
0.0284459
0.0285563
0.0286223
0.0285929
0.0286223
0.0286993
0.0292342
0.0301085
0.0313662
0.0320878
0.032019
0.0315794
0.032096
0.0343894
0.0364707
0.037188
0.0371676
0.0372879
0.0377166
0.0378519
0.0373177
0.0361664
0.0356042
0.0351681
0.0342119
0.0324445
0.0307646
0.0289462
0.027888
0.0271135
0.026573
0.0263405
0.026158
0.0263231
0.0266746
0.0273536
0.0283219
0.0293894
0.0307463
0.032271
0.0344727
0.0376709
0.0397063
0.0394759
0.0394985
0.0404931
0.0420538
0.0410178
0.0383589
0.0374159
0.0385548
0.0406939
0.0406529
0.0390569
0.0380208
0.0378349
0.0378533
0.0378291
0.0377291
0.037498
0.0370902
0.0363282
0.0349609
0.0335815
0.0333505
0.0356647
0.0387754
0.0399601
0.0384778
0.0341509
0.0291055
0.0269858
0.0275856
0.0297505
0.0324244
0.0355531
0.0381621
0.0381643
0.0340338
0.0440044
0.0540348
0.0462142
0.0428931
0.0502425
0.0534583
0.0525854
0.0513623
0.0501259
0.0483238
0.0459272
0.0440855
0.0432798
0.0437294
0.0453081
0.0478002
0.0506054
0.0528248
0.0533261
0.0525894
0.0535224
0.0600978
0.0615308
0.0533291
0.0414011
0.036559
0.0385561
0.0381031
0.0281261
0.0188744
0.0263205
0.0299127
0.030167
0.028767
0.0280958
0.0275456
0.0268018
0.0266335
0.0274493
0.0286502
0.0288641
0.029192
0.0305745
0.0313343
0.0237991
0.0266843
0.0288133
0.0294783
0.0289711
0.027726
0.0265212
0.0254727
0.0248074
0.0245208
0.0242392
0.0240617
0.0242267
0.0246662
0.025212
0.025554
0.0258144
0.0260827
0.0265597
0.0270153
0.0273226
0.0272577
0.0268808
0.0262537
0.0254684
0.0247907
0.0242011
0.023863
0.0234999
0.0224954
0.0300924
0.029792
0.0286231
0.0293669
0.0318314
0.032189
0.0297859
0.0277829
0.0276822
0.028014
0.0279723
0.0276184
0.0274168
0.0275468
0.0279388
0.0285036
0.0289413
0.0290985
0.0288905
0.0285472
0.0283921
0.0284301
0.0284925
0.0283983
0.0281605
0.0279829
0.0281886
0.0289124
0.0297075
0.0296561
0.0302811
0.0331361
0.0345354
0.0323587
0.0300723
0.0298693
0.029943
0.0298065
0.0297209
0.0296757
0.0294105
0.0290472
0.0286875
0.028485
0.0283818
0.0282368
0.0280068
0.0277347
0.0274915
0.027464
0.0276643
0.028153
0.0286313
0.0290863
0.0295559
0.030292
0.0311917
0.0317026
0.0312689
0.0297836
0.0311627
0.0293276
0.0293248
0.0293932
0.0294623
0.0294458
0.0293668
0.0293259
0.0293889
0.0295834
0.0297782
0.0299675
0.0300974
0.0302018
0.0302061
0.0301941
0.030057
0.0299195
0.0297383
0.0295646
0.0294895
0.0295609
0.02984
0.0302798
0.0309225
0.0315742
0.0318723
0.0317305
0.031236
0.0300592
0.0359716
0.0365564
0.0355916
0.0354051
0.0351779
0.0346611
0.0346959
0.0349296
0.0348346
0.0348003
0.0351141
0.0352576
0.0352669
0.0354962
0.0359407
0.0363931
0.036592
0.0367353
0.0367508
0.0367436
0.036838
0.0369546
0.0368372
0.0363975
0.0357204
0.0351616
0.0352256
0.0358146
0.0362199
0.0353658
0.0315686
0.0327946
0.0357456
0.0347026
0.0324264
0.0337743
0.0343365
0.0321422
0.0297031
0.0291387
0.0306265
0.0336783
0.035877
0.036545
0.0358977
0.0351626
0.0351323
0.0357331
0.0357867
0.0349298
0.0333706
0.0322862
0.0321201
0.0326187
0.03316
0.03274
0.0298789
0.025798
0.0249805
0.0268039
0.0399315
0.0420191
0.0390522
0.0372129
0.0359767
0.0358204
0.0364591
0.0375349
0.0386391
0.0392788
0.0396262
0.039781
0.0400291
0.0404263
0.0408425
0.0411933
0.041233
0.0407312
0.0395055
0.037792
0.0365136
0.0362259
0.0368676
0.037728
0.037731
0.036936
0.0356969
0.0347197
0.0339157
0.0334141
0.0353781
0.0355656
0.0354524
0.0349391
0.0336239
0.0318233
0.0302688
0.0289476
0.0284792
0.0280443
0.0279378
0.0277258
0.0275578
0.0273752
0.0274354
0.0276663
0.0286476
0.0297346
0.0307022
0.0309542
0.0307
0.0307598
0.0318296
0.035039
0.0385
0.0391041
0.0379032
0.0363104
0.0359255
0.0384547
0.0356624
0.03565
0.0353934
0.0345699
0.0328631
0.0308889
0.0291575
0.0285676
0.028307
0.0284114
0.0285325
0.0286506
0.0286938
0.0287249
0.028686
0.0286003
0.0285622
0.0288643
0.0295769
0.0308991
0.0318218
0.0319812
0.0315756
0.0317438
0.0334725
0.0356046
0.0364484
0.0368081
0.0373169
0.0378447
0.0380809
0.0368208
0.0358608
0.0356019
0.0351923
0.0338656
0.0316097
0.0297549
0.0277025
0.0269988
0.026147
0.025715
0.0254433
0.0253628
0.0254754
0.0257398
0.0264074
0.0272178
0.0283979
0.0298333
0.0315448
0.0337751
0.0369935
0.0396297
0.0400202
0.0400451
0.0409625
0.0422299
0.0409928
0.0384173
0.037578
0.0391306
0.0407129
0.039885
0.0384438
0.0379336
0.0379467
0.0379334
0.0379033
0.0379219
0.0378985
0.0376984
0.0372206
0.0361384
0.033997
0.0321678
0.0328074
0.0362347
0.0389368
0.0393423
0.0366806
0.0318925
0.0283324
0.0279057
0.0296332
0.0327198
0.0360485
0.0383949
0.0378459
0.0339083
0.0420801
0.0546115
0.0483233
0.0464029
0.0517482
0.0534467
0.0521788
0.0506564
0.048569
0.0457001
0.0423013
0.0399767
0.0389703
0.0394906
0.0415282
0.0444841
0.0481403
0.0516745
0.0536684
0.0531257
0.0519281
0.0586264
0.0633992
0.0550668
0.0417767
0.0359658
0.0370273
0.0348847
0.0249584
0.0183121
0.0261875
0.029289
0.0292184
0.0282266
0.0279083
0.0273994
0.0266665
0.0264459
0.0270467
0.0282257
0.0290825
0.0295743
0.0292529
0.0288599
0.0240721
0.0272572
0.029367
0.0298055
0.0290799
0.0279559
0.0268882
0.0256542
0.0247831
0.0243989
0.0240894
0.0239663
0.0242358
0.0247563
0.0253042
0.0255755
0.0258034
0.0261407
0.0267203
0.0271928
0.0273134
0.0270803
0.0265347
0.0258509
0.0251316
0.0245184
0.0240287
0.0236888
0.0232309
0.0223947
0.0299408
0.0299478
0.0295155
0.0307135
0.0331009
0.0330886
0.0301802
0.0279174
0.0276999
0.0280003
0.0279733
0.0277006
0.0275013
0.0275594
0.0278204
0.0283633
0.0288683
0.0291505
0.0291345
0.0289374
0.0287349
0.0286629
0.0285754
0.0283659
0.0281059
0.0279323
0.0281401
0.0287977
0.0295273
0.0295082
0.0302474
0.0334801
0.0346247
0.0319232
0.0300544
0.0299066
0.0299549
0.0298998
0.0298672
0.0298597
0.0297057
0.029356
0.0289697
0.028689
0.028518
0.0283461
0.0280463
0.0277249
0.0274685
0.0274124
0.0275381
0.0279588
0.0283942
0.0289472
0.0295291
0.0303737
0.0312804
0.0316876
0.0309185
0.0296754
0.0304441
0.0292863
0.0295306
0.0296841
0.0298075
0.0298077
0.0296811
0.0295148
0.0294363
0.0295512
0.0297357
0.0299321
0.0300808
0.0302005
0.0302636
0.0302248
0.0301713
0.0300323
0.029889
0.0296919
0.029573
0.0295793
0.0297973
0.0302025
0.0307842
0.0313945
0.0317242
0.0315723
0.0310921
0.0299032
0.0360197
0.0363874
0.0359121
0.0361015
0.0353646
0.0345752
0.0346103
0.0348957
0.0347417
0.0346203
0.0347893
0.0347528
0.034658
0.0348761
0.0354185
0.0359865
0.0363567
0.0365593
0.0367387
0.0368369
0.0368833
0.0368931
0.0366792
0.0360809
0.0353844
0.0349972
0.0352747
0.0358671
0.0361127
0.0352494
0.0317539
0.0340283
0.0361872
0.0339914
0.0337381
0.0353456
0.0346295
0.031426
0.0291658
0.0289047
0.0306525
0.0335984
0.0356187
0.0360458
0.0352401
0.0345297
0.0344418
0.0346858
0.0346609
0.0339787
0.0329598
0.0323143
0.0324358
0.0332136
0.0337665
0.032584
0.0284973
0.0251133
0.0252061
0.0269277
0.0406338
0.0417382
0.0392363
0.0374957
0.0361371
0.0359611
0.0366611
0.0376528
0.0385717
0.0389948
0.0390021
0.0390828
0.0394481
0.0401
0.0408031
0.0413524
0.0416302
0.0413747
0.0403038
0.0384909
0.036827
0.0362512
0.0366993
0.0376229
0.0377378
0.037004
0.0357972
0.034934
0.0340055
0.0334505
0.036084
0.0359329
0.0354637
0.0348051
0.0334136
0.0315172
0.0299042
0.0287625
0.0283693
0.0281477
0.0279661
0.0276039
0.0272735
0.0270392
0.026972
0.0270808
0.0280023
0.0290482
0.0302705
0.0306959
0.0306065
0.0306538
0.0315142
0.0340867
0.0372654
0.0382682
0.0375137
0.0363842
0.0362922
0.0378575
0.0358228
0.0360348
0.0359035
0.0350932
0.0332082
0.0308775
0.0291095
0.0284786
0.0283836
0.0285323
0.0287113
0.0288105
0.0288766
0.0288636
0.0287713
0.0286146
0.0285094
0.0287452
0.0294096
0.0306814
0.0316332
0.031867
0.0314778
0.0315299
0.0329215
0.034691
0.0359174
0.0370659
0.0378143
0.0381666
0.0377912
0.0365198
0.0357989
0.0356892
0.0353356
0.0337787
0.0312838
0.0292805
0.0273185
0.0265537
0.0256076
0.0252493
0.0248725
0.0247936
0.024968
0.0252221
0.0258503
0.0266539
0.0278252
0.0292665
0.0310504
0.0333699
0.0365285
0.0394006
0.040427
0.0407287
0.0415467
0.0423675
0.0408293
0.038385
0.0377385
0.0394558
0.0405158
0.0393088
0.0381244
0.0378917
0.0377253
0.0374341
0.0372885
0.0374537
0.0378144
0.037936
0.0376845
0.0371057
0.0354884
0.0321728
0.0307123
0.0331393
0.0369113
0.0391685
0.0389056
0.0362559
0.032706
0.0311615
0.0322938
0.0347093
0.0374536
0.0387136
0.0372657
0.0337962
0.0363942
0.0546187
0.0507745
0.0489373
0.0525021
0.0534254
0.051857
0.0500303
0.0472793
0.0438247
0.0396456
0.0373041
0.0360142
0.0367751
0.0390611
0.0422763
0.0462024
0.0502852
0.0535103
0.053788
0.0517072
0.0563034
0.0641737
0.0570306
0.0420278
0.0342973
0.0337414
0.0303452
0.0216345
0.0177094
0.0258563
0.0283364
0.0282306
0.0276832
0.0277887
0.0274308
0.0266693
0.0263955
0.0272181
0.0289395
0.0296406
0.0283382
0.0260103
0.0247681
0.0241727
0.023961
0.0250207
0.0282964
0.0296279
0.0296254
0.0288361
0.028067
0.0272704
0.0258822
0.0247916
0.0243222
0.0239945
0.0238988
0.0242103
0.0247568
0.0252845
0.0255315
0.0257596
0.026144
0.0266136
0.0268886
0.0267293
0.0262939
0.0256247
0.0250181
0.0244433
0.0240429
0.023789
0.0235932
0.0232333
0.023135
0.0266575
0.0290565
0.0299204
0.0301919
0.0304086
0.0318421
0.0338056
0.0337953
0.030461
0.0279885
0.0276746
0.0279685
0.0280232
0.0278739
0.0276885
0.0275557
0.0275756
0.027901
0.0283209
0.0287424
0.0289041
0.0288978
0.0287218
0.0285583
0.0283488
0.0280916
0.0278742
0.0278106
0.0280696
0.0286105
0.0292187
0.0293492
0.0292735
0.0292169
0.0307286
0.0338534
0.0346566
0.0319214
0.0300207
0.0298768
0.0300097
0.0299683
0.0299426
0.030029
0.0300179
0.0297318
0.0292903
0.0289359
0.0287129
0.0285116
0.0281983
0.0278505
0.0275944
0.027496
0.027624
0.0279954
0.0284731
0.0290953
0.0298384
0.0307169
0.0313716
0.0313108
0.030508
0.0300271
0.0300039
0.0298543
0.029765
0.0296322
0.0298536
0.0301067
0.0303611
0.0304515
0.0303019
0.0299739
0.029618
0.0295033
0.0295981
0.029776
0.0299109
0.0300453
0.0301109
0.0301322
0.0300845
0.0300114
0.0299117
0.0297517
0.0296561
0.0296716
0.0298671
0.0302708
0.0308158
0.0313107
0.0315146
0.0313618
0.0310079
0.0301141
0.0298053
0.033381
0.0360144
0.0364659
0.0366944
0.0368207
0.03542
0.0344814
0.0345203
0.0349166
0.0347095
0.0343891
0.0344172
0.0342799
0.034103
0.0342265
0.0347623
0.0354716
0.0359748
0.0361761
0.0363541
0.0365559
0.0365745
0.0364272
0.0360352
0.0354702
0.0350171
0.0350653
0.0355166
0.0360144
0.0359873
0.0347851
0.0324291
0.0319064
0.0328158
0.0354587
0.0355135
0.0340126
0.0351704
0.0362212
0.0348646
0.0314139
0.0289632
0.0285245
0.029873
0.0325105
0.0348561
0.0358095
0.0353671
0.0344865
0.0339783
0.0337594
0.0335609
0.0331233
0.032737
0.0327461
0.0334367
0.0340975
0.033714
0.0308465
0.026511
0.0247464
0.0261594
0.0332432
0.0418977
0.0418971
0.0417114
0.0417266
0.040255
0.0382642
0.0364505
0.035963
0.0364926
0.037437
0.0381489
0.0383995
0.0384797
0.0386326
0.039152
0.0400867
0.0410171
0.0415242
0.0416309
0.0412983
0.0402207
0.0383582
0.0368156
0.0362667
0.0367762
0.0376295
0.0376206
0.0368093
0.0356605
0.0347823
0.033427
0.0341878
0.0363589
0.0374974
0.0373597
0.0365389
0.0356043
0.0348464
0.0335214
0.0316139
0.0299159
0.0288536
0.0284658
0.0282821
0.0280244
0.0274818
0.026912
0.0265272
0.0266189
0.0268164
0.0277972
0.0288345
0.0300923
0.0304957
0.0304502
0.0305477
0.031329
0.0334989
0.0362014
0.0374015
0.0363121
0.0364052
0.0368273
0.036428
0.035979
0.0361161
0.0361491
0.0363147
0.0363547
0.0358077
0.0338872
0.0312718
0.0292702
0.0285321
0.028435
0.0285661
0.0287466
0.0288062
0.0288878
0.0288539
0.0287331
0.0285688
0.0285004
0.0288135
0.0295727
0.0307402
0.0315772
0.0316806
0.0312893
0.0313862
0.0329357
0.0350864
0.037582
0.0385712
0.0389116
0.0388989
0.0385653
0.0380874
0.0374554
0.0365714
0.035813
0.0357598
0.0356092
0.0340602
0.0315663
0.0293346
0.0274457
0.0265202
0.0254421
0.0251067
0.024725
0.0246994
0.0248186
0.0250448
0.0256489
0.0264108
0.0276287
0.0290174
0.0309242
0.0332432
0.0364064
0.0393136
0.0406531
0.0412391
0.0420115
0.042304
0.040829
0.0388778
0.0381071
0.0378567
0.0376887
0.0394774
0.040314
0.0389383
0.0379913
0.0376487
0.0370536
0.0363182
0.036031
0.0364833
0.0372951
0.0379426
0.0378886
0.0373952
0.0367842
0.033883
0.0300771
0.0303676
0.0335424
0.0371114
0.0392615
0.0392516
0.0376846
0.0362065
0.036217
0.037495
0.0386953
0.0386579
0.0359869
0.0310674
0.0250212
0.0230029
0.0291593
0.0516818
0.0534719
0.0508141
0.05302
0.0534586
0.0517413
0.0497335
0.046773
0.0432056
0.0389177
0.0364285
0.0351608
0.036001
0.038299
0.0415458
0.0454797
0.0496457
0.0532367
0.0541024
0.0520425
0.0546308
0.0639864
0.0583052
0.0411276
0.0310426
0.0281584
0.0243391
0.0199977
0.0244302
0.0665825
0.0717536
0.0253764
0.0271576
0.0270522
0.0269792
0.0275858
0.0275683
0.0268582
0.0265958
0.0277358
0.0293444
0.0292604
0.0269185
0.0252018
0.0246579
0.0247622
0.0254503
0.0269982
0.0291216
0.0295728
0.0291159
0.0284306
0.0281529
0.0276366
0.0261667
0.0248522
0.0242946
0.0239456
0.023835
0.0241124
0.0246394
0.0251268
0.02539
0.0255616
0.0257955
0.0259732
0.0259156
0.025521
0.0250313
0.0245973
0.02447
0.0245323
0.0247568
0.0248792
0.0248572
0.0246195
0.0251217
0.0277967
0.0290262
0.0298302
0.0303496
0.0312204
0.0328424
0.0342498
0.0337926
0.0304757
0.0281
0.027611
0.0279228
0.0280364
0.0280465
0.0280055
0.0278227
0.0275709
0.0275551
0.0276282
0.0279224
0.0281459
0.0282166
0.0281371
0.0280233
0.0278638
0.0277576
0.0277399
0.0278837
0.0281889
0.0286111
0.0290105
0.0292187
0.0291474
0.0291536
0.0308538
0.03405
0.0346559
0.0316448
0.0301324
0.0299178
0.0300269
0.0300783
0.0300502
0.0301461
0.030217
0.0300639
0.0296492
0.029241
0.0289746
0.0287975
0.0285568
0.0282386
0.0279848
0.0278817
0.0280218
0.0283846
0.0289425
0.0296492
0.0304143
0.0310241
0.0310828
0.0306967
0.0302645
0.0300215
0.0298566
0.0297632
0.029802
0.0299978
0.0302053
0.0305488
0.0309713
0.0312431
0.0311611
0.0307566
0.0301785
0.0297045
0.0295764
0.0296133
0.0297161
0.029824
0.0298889
0.0299442
0.0299367
0.0299125
0.0298479
0.0297886
0.0297905
0.0298841
0.0301346
0.0305048
0.0309228
0.0312106
0.0312449
0.0311035
0.0308161
0.0300982
0.0303205
0.0343461
0.0361648
0.0369742
0.0377249
0.0374616
0.0355011
0.0343805
0.0343657
0.03497
0.0348131
0.0342252
0.0340827
0.0339259
0.0337111
0.0336985
0.0341124
0.0348586
0.0355431
0.03583
0.0358234
0.0358153
0.0357762
0.0355957
0.0353087
0.0350827
0.0351002
0.0354449
0.0358362
0.0359402
0.0349227
0.0331291
0.0324004
0.0331467
0.0348412
0.0364169
0.0353012
0.0348078
0.0360052
0.0366987
0.035616
0.0322298
0.0292212
0.0282386
0.0288025
0.0307695
0.0332205
0.0349976
0.0355452
0.0350598
0.0344817
0.0339244
0.0336947
0.0335409
0.0337019
0.034119
0.0343815
0.0339611
0.031732
0.027724
0.0253202
0.0255329
0.0295796
0.0384386
0.0432854
0.0432703
0.0437664
0.0437873
0.0422116
0.0397422
0.0371484
0.0359491
0.0361437
0.0369224
0.0375708
0.0378973
0.0380149
0.0381067
0.0385608
0.0394228
0.040393
0.0408935
0.0408269
0.0402579
0.0391043
0.0376319
0.0366065
0.0364406
0.0370571
0.0375686
0.0372826
0.0364112
0.0354258
0.0342654
0.0334453
0.0360312
0.0392157
0.040701
0.0400921
0.0381309
0.0361448
0.0350601
0.0338953
0.0320716
0.0303258
0.0291606
0.0286487
0.0284475
0.0281978
0.0277372
0.0271671
0.0267856
0.0269326
0.0272307
0.0282392
0.0291149
0.0300619
0.0303117
0.0302797
0.0304787
0.0313026
0.0332669
0.0355589
0.0364654
0.0358466
0.0366106
0.0366863
0.0362489
0.0361399
0.0360413
0.0359564
0.036043
0.0365083
0.0364971
0.0348875
0.0321283
0.0297301
0.0286713
0.0284578
0.0285611
0.0286512
0.0286555
0.0286746
0.0286571
0.0286047
0.0285728
0.0286769
0.0292027
0.0300613
0.0309759
0.0314641
0.0313417
0.0309635
0.0314976
0.0335273
0.0362849
0.0382416
0.0390896
0.0394278
0.0393609
0.039179
0.0389293
0.0384608
0.037168
0.035916
0.0357259
0.0359161
0.034713
0.032403
0.0300735
0.0281813
0.0270244
0.0259652
0.0254364
0.0250296
0.0249324
0.0250053
0.0252595
0.0258082
0.0265707
0.0277668
0.0292149
0.0311555
0.0335481
0.0365437
0.0391863
0.0406364
0.0414711
0.0422576
0.0418767
0.039693
0.0382111
0.0380322
0.03781
0.0377629
0.0394009
0.0401215
0.0387517
0.0379031
0.0373364
0.0363903
0.0354322
0.0351609
0.0356115
0.0366841
0.0378046
0.0380346
0.0374317
0.037143
0.036264
0.0309749
0.0292378
0.0306643
0.0334427
0.0367674
0.0392563
0.0398539
0.0394755
0.0391797
0.0391553
0.0389783
0.0377868
0.0351259
0.0312776
0.0264091
0.0230916
0.0261368
0.0420281
0.0558633
0.0526199
0.0534447
0.0536018
0.0519949
0.0499056
0.0470943
0.0438328
0.0401562
0.0377269
0.0365784
0.0374083
0.0393692
0.0423052
0.0459647
0.0499311
0.0533406
0.0542728
0.0523468
0.0541392
0.0632736
0.0590258
0.0413032
0.0287877
0.0245596
0.0222131
0.0221478
0.0357047
0.0686821
0.0714352
0.0248452
0.0257863
0.0257432
0.0260576
0.0272207
0.0277038
0.0272851
0.0270962
0.028182
0.0296246
0.0295163
0.0272922
0.0257548
0.0256902
0.0264164
0.0273554
0.0285004
0.0292925
0.0291035
0.0284896
0.0281263
0.0283294
0.0280819
0.0265648
0.0249794
0.0243316
0.0239464
0.0237734
0.0239577
0.024396
0.0248299
0.0250506
0.0251184
0.0250839
0.0249946
0.0247544
0.0246136
0.0247268
0.0251918
0.0259576
0.0267057
0.0271999
0.0274786
0.0274388
0.0273517
0.0278029
0.028577
0.0288839
0.0297165
0.0306498
0.0320669
0.0336061
0.0343243
0.0332444
0.030526
0.0282376
0.0275027
0.0278033
0.0279403
0.0280674
0.0282679
0.028338
0.0281691
0.027783
0.027442
0.0273625
0.027407
0.0275329
0.0276397
0.0276959
0.0278043
0.0279804
0.028242
0.0285595
0.0288414
0.0290083
0.0290834
0.0291205
0.029051
0.0292749
0.0311718
0.0343073
0.0345292
0.0318617
0.030345
0.0298928
0.0299725
0.0301588
0.0301466
0.0301597
0.0302918
0.0302695
0.0300147
0.0296058
0.0293045
0.02917
0.0290467
0.0288617
0.0286612
0.02861
0.0287789
0.029171
0.0297493
0.0303478
0.0307909
0.0308546
0.0305905
0.0302932
0.030076
0.0299264
0.0298741
0.0299936
0.0301609
0.0303444
0.0305088
0.030868
0.0314018
0.031902
0.0320778
0.0317819
0.031151
0.0304256
0.0299069
0.029672
0.0296524
0.0297088
0.0297763
0.029841
0.0298792
0.0298963
0.0299039
0.0299411
0.0300401
0.0302014
0.0304111
0.0306215
0.0307691
0.0307875
0.0307149
0.0305828
0.0304616
0.0301013
0.0315894
0.0351714
0.0366832
0.0379484
0.0387839
0.0378956
0.0357528
0.0342675
0.0340989
0.035068
0.0350909
0.0342964
0.0338843
0.0337887
0.0336375
0.033574
0.0337471
0.0342902
0.035038
0.0355848
0.0357294
0.0355776
0.0354174
0.0353294
0.035309
0.0354076
0.035597
0.0358103
0.0357246
0.0347722
0.0334165
0.0329193
0.0338259
0.0354475
0.036928
0.0372721
0.0359837
0.0356986
0.0363587
0.036999
0.0366003
0.0338355
0.0303919
0.0284667
0.02813
0.0289867
0.0307126
0.0328168
0.0345034
0.0351726
0.0353372
0.0351163
0.0349074
0.0347632
0.0346664
0.0344065
0.0332886
0.0310361
0.0277638
0.0259522
0.0262021
0.0291838
0.0352635
0.0420771
0.0447273
0.0452265
0.0459153
0.0457607
0.0442703
0.0417789
0.0385326
0.0361855
0.0358193
0.0363609
0.0370138
0.037437
0.0375907
0.0375259
0.0377284
0.0380864
0.0386607
0.0390741
0.0389442
0.0384296
0.0376546
0.0369298
0.0365955
0.0367919
0.0371791
0.0372153
0.0367631
0.0359634
0.0350271
0.0338223
0.0341665
0.0386614
0.0429427
0.0446708
0.0434912
0.0406649
0.0373775
0.0354338
0.0344479
0.0328813
0.0310906
0.0297204
0.0290017
0.0287114
0.0285631
0.0283224
0.0280563
0.0278728
0.0279582
0.0283526
0.0289905
0.0296143
0.0300025
0.0300816
0.030118
0.0305184
0.0315295
0.0333959
0.035217
0.0355636
0.03566
0.03668
0.0367103
0.0363091
0.0360124
0.0354889
0.0351301
0.0352254
0.0360633
0.0368499
0.0360371
0.0334762
0.0306989
0.0290829
0.0285872
0.0285787
0.0286599
0.0286332
0.0286332
0.0286604
0.0287472
0.0289517
0.0293306
0.0299102
0.0305425
0.0310319
0.0310645
0.0308007
0.0309892
0.0322674
0.0349805
0.0373608
0.0384875
0.0392142
0.0393929
0.0391561
0.0390634
0.0392277
0.0392082
0.0380862
0.0362231
0.0356678
0.0360199
0.035569
0.0337232
0.0315445
0.029542
0.0282069
0.0270112
0.0263881
0.0257656
0.0256302
0.0256561
0.025954
0.0264937
0.0272743
0.0284565
0.029978
0.0319613
0.0343691
0.0370556
0.0392758
0.0406806
0.0417499
0.0420811
0.0405868
0.0384095
0.0378696
0.037922
0.0376734
0.0378492
0.0393627
0.0399725
0.0386657
0.0378281
0.0372613
0.0362967
0.0353445
0.0351325
0.0355628
0.0365189
0.0377188
0.0381228
0.0374039
0.0368092
0.0374933
0.0334363
0.0291812
0.0296823
0.0309275
0.0324778
0.0353227
0.0384135
0.0392258
0.0391811
0.0388841
0.0382906
0.037081
0.0351286
0.0320888
0.0266537
0.027001
0.0318293
0.0407401
0.0555242
0.054283
0.0540509
0.053928
0.0525823
0.0506129
0.0481582
0.045429
0.0427619
0.04061
0.0399638
0.0402904
0.0419371
0.0444066
0.0475374
0.0510196
0.0539166
0.0543405
0.0525004
0.0544406
0.0628452
0.0585293
0.0412716
0.0287289
0.0254871
0.0257321
0.0324156
0.0520307
0.0669231
0.0706199
0.0243955
0.0244444
0.0243723
0.024998
0.0266884
0.0277427
0.0278618
0.027973
0.0288836
0.0298836
0.0295813
0.0275035
0.0261173
0.026266
0.0272667
0.0282339
0.0288321
0.0288948
0.0285027
0.0280634
0.0281653
0.0284763
0.0283969
0.027043
0.025193
0.0244347
0.0240155
0.0237637
0.0238085
0.0240743
0.0244017
0.0245918
0.0245406
0.0244143
0.0242772
0.0242661
0.024476
0.0248333
0.0251897
0.0256132
0.026167
0.0270157
0.0278452
0.0284597
0.0287937
0.0291104
0.0292779
0.0295524
0.030357
0.0315583
0.0328855
0.0335755
0.0334855
0.0322589
0.0306045
0.0284629
0.0273733
0.0276444
0.0277806
0.0279091
0.0282531
0.0286953
0.02894
0.0287517
0.0283912
0.0279109
0.0276587
0.0276822
0.02781
0.0281283
0.0284673
0.0287816
0.0291093
0.0292901
0.0293709
0.029456
0.0295514
0.029494
0.0296078
0.0302175
0.0323272
0.0348625
0.0344937
0.0326418
0.0311468
0.0301711
0.0297317
0.0300755
0.0302815
0.030185
0.0302328
0.0303301
0.030266
0.0300078
0.0297019
0.0295215
0.0294992
0.0295047
0.0295028
0.0295563
0.0297502
0.0300872
0.0304465
0.0306687
0.0306625
0.0304764
0.0302872
0.0301481
0.0300029
0.0299176
0.0300308
0.0302686
0.0304773
0.0306047
0.0307044
0.0309492
0.0315016
0.0322022
0.032731
0.0328173
0.0323619
0.0316468
0.0307901
0.0301738
0.0298637
0.0297989
0.0297982
0.0298626
0.0298849
0.0299193
0.0299624
0.0300284
0.030106
0.0301789
0.0303061
0.0304355
0.0305772
0.0306833
0.0307196
0.0307043
0.0305846
0.0309593
0.0334799
0.0360928
0.0375503
0.0391024
0.0395813
0.0383367
0.0361803
0.0341763
0.0337066
0.0350601
0.0354818
0.034621
0.0339924
0.0338676
0.033905
0.033923
0.0339158
0.0340688
0.034526
0.0350651
0.0355219
0.0357205
0.0357262
0.0357143
0.035724
0.0357657
0.0357158
0.0353613
0.034477
0.033545
0.0332381
0.0342204
0.0360979
0.0378694
0.0389684
0.0388195
0.0376814
0.03683
0.0366004
0.0370954
0.0373407
0.0358349
0.0326443
0.0297611
0.0284155
0.0282111
0.0286931
0.0296186
0.0310189
0.032425
0.0334137
0.0338623
0.0337943
0.0334694
0.0326994
0.0313077
0.0292059
0.0271606
0.0262612
0.0271921
0.0307306
0.0358782
0.0409292
0.0445299
0.0459835
0.0468258
0.0474565
0.0472294
0.0458963
0.0438547
0.0407066
0.0370728
0.0356153
0.0357919
0.0363853
0.0369112
0.0371904
0.0370837
0.0370146
0.0370557
0.0371651
0.0372704
0.0372282
0.0370156
0.0367544
0.0365632
0.0366538
0.0368355
0.0368671
0.0366616
0.0361765
0.0354362
0.0343592
0.0334837
0.0356317
0.0413191
0.0458779
0.0470655
0.0455452
0.0431704
0.0395734
0.0360948
0.0350158
0.0338542
0.0322306
0.0307634
0.0297465
0.0291632
0.0289108
0.028795
0.0287849
0.0289183
0.0289579
0.0293185
0.0294874
0.0296709
0.029794
0.029863
0.0301522
0.0308087
0.0320135
0.0336465
0.0349264
0.0350962
0.0356799
0.0366739
0.0368122
0.036432
0.0359373
0.0351485
0.034793
0.0346675
0.0351058
0.0366336
0.0370126
0.0351901
0.0323308
0.030083
0.029001
0.0287693
0.0288607
0.0289537
0.0290488
0.029165
0.0293325
0.0296519
0.0299512
0.0303357
0.0305746
0.0306802
0.0306334
0.0308274
0.0317767
0.0340203
0.0365593
0.0379391
0.0385802
0.0390958
0.0389279
0.0383216
0.0380965
0.0386959
0.0395223
0.0391974
0.0369359
0.0356451
0.0358951
0.0362081
0.0352841
0.0335966
0.0317669
0.0301642
0.0289111
0.0280673
0.0275416
0.027134
0.0271391
0.0273932
0.027927
0.0288
0.0299688
0.0315118
0.0334213
0.0355956
0.0378295
0.0397129
0.0411236
0.0418489
0.040741
0.0382532
0.0374206
0.0376577
0.0376814
0.03757
0.0379907
0.0392805
0.0398502
0.0387278
0.0378855
0.0373472
0.036639
0.0359427
0.0357395
0.0360914
0.0369152
0.0378449
0.0380753
0.0373391
0.0365471
0.0377956
0.0367473
0.0304955
0.0306947
0.0318631
0.030884
0.0305903
0.0324977
0.0350119
0.0364173
0.0364739
0.0357249
0.0342291
0.0318182
0.0289111
0.0338635
0.0397685
0.0460392
0.0492107
0.0557584
0.0559505
0.0550396
0.0544743
0.053392
0.0517755
0.0497804
0.047696
0.0457644
0.0444336
0.043789
0.0442859
0.0453623
0.0472469
0.0497885
0.0525981
0.0546463
0.0542397
0.0526464
0.0556208
0.0625161
0.0572796
0.043205
0.0331277
0.0332825
0.0390187
0.0523693
0.0637838
0.0635224
0.0703093
0.0241636
0.0233229
0.0231277
0.0238997
0.0259718
0.0275962
0.0282346
0.0287898
0.0295178
0.0300454
0.0296666
0.0277173
0.0262915
0.0262032
0.0270085
0.0278903
0.028326
0.0283584
0.0281636
0.0280786
0.0282928
0.0285429
0.0285941
0.0275723
0.0254569
0.0245902
0.0241834
0.0238144
0.0237076
0.0237973
0.0239669
0.0241071
0.0240748
0.0239728
0.0238795
0.0239219
0.0240143
0.0239867
0.0237485
0.0235513
0.0236377
0.0243931
0.0255114
0.0268163
0.0278388
0.0286898
0.0293836
0.0299995
0.0307049
0.0315236
0.032081
0.0320493
0.031577
0.0314721
0.0309486
0.0286696
0.0272362
0.0274526
0.0276062
0.0275439
0.0278237
0.0285056
0.029164
0.0296398
0.0297541
0.0294366
0.029245
0.0289813
0.0291031
0.0292488
0.0294752
0.0295202
0.0294633
0.0295067
0.0298776
0.0304977
0.0309125
0.0310302
0.0313494
0.0322955
0.0340745
0.0354315
0.0351073
0.0343781
0.032856
0.0313549
0.0296132
0.02963
0.0302692
0.030334
0.0301848
0.0302611
0.0303552
0.0302881
0.0301127
0.0298988
0.0298002
0.0298583
0.0300116
0.0301778
0.0303443
0.0304841
0.0305366
0.0304448
0.0302803
0.0301479
0.0301565
0.0301194
0.0299872
0.0298845
0.0300039
0.0302315
0.0304609
0.0306685
0.030808
0.0308955
0.0312874
0.032082
0.0328843
0.0334071
0.0334646
0.032996
0.0322366
0.0313989
0.030741
0.0302831
0.030161
0.0300547
0.0301275
0.0301638
0.030293
0.0305157
0.0307733
0.0311506
0.0315302
0.0318693
0.032087
0.0321014
0.0319484
0.031773
0.0320083
0.0333251
0.0354981
0.037283
0.0387129
0.0398681
0.0397827
0.0385571
0.036518
0.0342225
0.0333162
0.034805
0.0358765
0.0352032
0.0343556
0.0341133
0.034308
0.034506
0.0345691
0.0345908
0.0346304
0.0346994
0.0349318
0.0351344
0.0353416
0.0354211
0.0353531
0.0351639
0.0347456
0.0341449
0.0336717
0.0336318
0.0344845
0.0363415
0.0383336
0.0398682
0.0406554
0.0406428
0.0398797
0.0386741
0.0374548
0.0371393
0.037599
0.0374469
0.0355557
0.032701
0.0304794
0.0291558
0.0284723
0.028247
0.0283593
0.0287421
0.029069
0.0293947
0.0294332
0.0290612
0.0282942
0.0273063
0.0264534
0.0261835
0.0273419
0.0308229
0.03626
0.0414356
0.0446651
0.0461151
0.0470243
0.0479732
0.0485824
0.0484134
0.0468837
0.0450882
0.0432121
0.0390977
0.0360242
0.0353619
0.035651
0.0361892
0.0367024
0.0368399
0.0368025
0.0366747
0.0365503
0.0364368
0.0364422
0.0363929
0.0363628
0.0364111
0.0364961
0.0365004
0.0363526
0.0360381
0.0355136
0.0346704
0.0337274
0.0336787
0.0372446
0.0431753
0.0470169
0.0474359
0.0443885
0.0433032
0.0421434
0.037441
0.0355135
0.0347598
0.0335135
0.0322002
0.0310336
0.0301309
0.0295579
0.0292866
0.0291705
0.029207
0.0292528
0.0292988
0.0295952
0.029521
0.0297894
0.0300532
0.0306213
0.031503
0.0326843
0.033901
0.0346897
0.0350209
0.0357575
0.0365647
0.0368562
0.0366394
0.0359888
0.0353167
0.0349272
0.0345654
0.0343555
0.0357718
0.0373912
0.03689
0.0345613
0.031927
0.0301227
0.0292915
0.029084
0.0291853
0.0292936
0.0294675
0.0296214
0.0298454
0.0300117
0.0300964
0.0303637
0.0304213
0.0309186
0.0318719
0.0337706
0.0360216
0.0375203
0.0381096
0.0385015
0.0389089
0.0387091
0.0380831
0.0377389
0.0382483
0.0393874
0.0399939
0.0382097
0.0357572
0.0355454
0.0362803
0.0364485
0.0357519
0.0344679
0.0330397
0.0317661
0.0308219
0.0299482
0.0297898
0.0297139
0.0299494
0.0304719
0.0312771
0.032414
0.0338625
0.0355798
0.0374628
0.039295
0.0406837
0.041153
0.0397772
0.0373676
0.0368019
0.037127
0.0372524
0.0374372
0.0376015
0.0381334
0.0391424
0.0396473
0.0389498
0.0381803
0.0376172
0.0371607
0.0368154
0.0367314
0.0370051
0.0375749
0.03806
0.0378729
0.0370526
0.0363945
0.0377908
0.0395019
0.0331318
0.0327023
0.0354695
0.0343374
0.0306897
0.0287091
0.0284868
0.029142
0.0297399
0.0297587
0.0293843
0.0291169
0.0322182
0.0494127
0.0541642
0.0569003
0.0572275
0.0578992
0.0575336
0.0562965
0.0553304
0.0543602
0.0531293
0.051708
0.0502154
0.0489946
0.0480767
0.0478116
0.0479897
0.0488978
0.0503793
0.0523396
0.0542804
0.0551409
0.0538314
0.0530884
0.057848
0.0615885
0.0550645
0.0461417
0.0426159
0.0481949
0.0563602
0.062582
0.0613666
0.0615202
0.0706106
0.0244515
0.0227838
0.0223265
0.0229656
0.0251839
0.0272623
0.0281882
0.0290025
0.0296276
0.0299133
0.029448
0.0282248
0.0267911
0.0262153
0.0263965
0.0270337
0.0274986
0.0278595
0.0280491
0.0282584
0.0283909
0.0285109
0.0286375
0.0279669
0.0257081
0.0247439
0.0244727
0.0240253
0.0237285
0.023671
0.023701
0.0237171
0.0237139
0.023647
0.0235556
0.0234858
0.0233717
0.0231832
0.0230132
0.0229439
0.0231432
0.0234413
0.0241946
0.0251543
0.0262885
0.0273866
0.0283314
0.0290577
0.0295859
0.0299616
0.0302675
0.030455
0.0310369
0.0316742
0.0312986
0.0286856
0.0270908
0.0272123
0.0275059
0.0273882
0.0272842
0.0276287
0.0284397
0.0293991
0.030047
0.0304882
0.0305372
0.0304307
0.0303094
0.0300889
0.0298487
0.0295673
0.0294157
0.0295465
0.0301694
0.0314205
0.0324553
0.0330761
0.0335939
0.0343285
0.0351887
0.0354996
0.0353158
0.0348004
0.0337956
0.0323773
0.0302302
0.0291493
0.0295592
0.0304569
0.0304146
0.0301891
0.0302442
0.0303485
0.0303212
0.0302711
0.0301383
0.0300657
0.0300794
0.0301712
0.0302471
0.030265
0.0302098
0.0301099
0.030023
0.0300333
0.0301237
0.0301207
0.0300023
0.0298704
0.0298972
0.0300587
0.0302784
0.0304848
0.0306898
0.0307274
0.0309753
0.0316374
0.0325514
0.0334182
0.0339066
0.0339871
0.0336061
0.0329569
0.0323304
0.0318661
0.0315494
0.0315535
0.0317815
0.0322217
0.032755
0.033414
0.0340292
0.0345413
0.0348196
0.034857
0.034678
0.0344053
0.034214
0.034322
0.0349501
0.0360981
0.0373973
0.0385318
0.039555
0.0399933
0.0395396
0.0383736
0.0365025
0.0343182
0.0330612
0.0342095
0.0360972
0.0359203
0.0350257
0.0345089
0.0346559
0.0350105
0.0352497
0.035482
0.0356257
0.0355029
0.0352605
0.0350193
0.0350309
0.0348546
0.0347683
0.0345404
0.0343485
0.0342295
0.0344187
0.0351668
0.0365855
0.0383028
0.039896
0.0409888
0.0414501
0.0414851
0.0411949
0.0402476
0.0388356
0.0376866
0.0376042
0.0381329
0.0379285
0.0362273
0.0342231
0.0326882
0.0313625
0.0300872
0.0290809
0.0284633
0.0280665
0.0277001
0.0274301
0.0270747
0.0267323
0.02639
0.0263546
0.026814
0.028649
0.0322079
0.0369636
0.0416101
0.0448242
0.0463133
0.0472008
0.0480629
0.0486052
0.0487852
0.0473226
0.0451534
0.0447044
0.0420361
0.037766
0.0355415
0.0351088
0.0353542
0.0357284
0.0361086
0.036512
0.0363858
0.0364997
0.036328
0.0363053
0.0362632
0.0361985
0.0362037
0.0360815
0.0359226
0.03564
0.0351929
0.0344952
0.0336559
0.0331731
0.0339021
0.0375706
0.0424866
0.0454313
0.0451248
0.0413718
0.0401755
0.0431726
0.0398808
0.0360758
0.0353781
0.0346488
0.0336564
0.0326784
0.031781
0.0310627
0.0304903
0.0301901
0.0300064
0.0300578
0.0299534
0.0302726
0.0302847
0.0307538
0.0311477
0.0318431
0.0326677
0.0335513
0.0343017
0.0347966
0.0352129
0.0357965
0.0363683
0.0367334
0.0368024
0.0363493
0.0357489
0.035315
0.0348182
0.0341933
0.03456
0.0369428
0.0378478
0.0369395
0.0347542
0.0326615
0.0310092
0.0302104
0.0298069
0.029784
0.0298029
0.0298755
0.0299914
0.030168
0.030428
0.0308125
0.0314758
0.0325042
0.0341068
0.0359001
0.0373423
0.0379476
0.0380536
0.038229
0.0385689
0.0385731
0.0383605
0.0383055
0.0387073
0.0394704
0.0402455
0.0398044
0.0365381
0.0351877
0.0356965
0.0365674
0.0369226
0.0366844
0.0359629
0.0352431
0.0344794
0.0342113
0.0337516
0.0337162
0.0339225
0.0343881
0.0350437
0.0360201
0.0371918
0.0384402
0.0395345
0.0400569
0.039723
0.0380455
0.0361799
0.0359732
0.0362454
0.0366824
0.0370079
0.0373546
0.0376769
0.0382213
0.0388931
0.0393613
0.0391622
0.0386881
0.0382477
0.0379123
0.0377284
0.0377453
0.0379451
0.0381223
0.0379919
0.0374283
0.036585
0.0363807
0.0386702
0.0415713
0.0369967
0.0355374
0.0389181
0.0399451
0.0360947
0.0311714
0.0287062
0.0282042
0.028585
0.0306017
0.0336487
0.0394337
0.0478041
0.0563057
0.058936
0.0598068
0.06001
0.0596496
0.0589262
0.0576422
0.0565116
0.0555571
0.0546159
0.0536388
0.0527963
0.0519901
0.0516178
0.051441
0.0517809
0.0524382
0.0534872
0.0546692
0.0554803
0.0550675
0.0532766
0.0545837
0.0608781
0.05893
0.0527948
0.0496164
0.050938
0.0561608
0.0592684
0.0574549
0.0537972
0.0611191
0.0710236
0.0256091
0.0232705
0.0221795
0.0222958
0.0243659
0.0268109
0.0277966
0.0283777
0.0288742
0.0290822
0.0287883
0.028357
0.0277665
0.0271275
0.0267237
0.0268532
0.0272481
0.0277752
0.0281417
0.0283676
0.0284014
0.0284401
0.0286209
0.0281272
0.0259308
0.0247977
0.0247616
0.0245072
0.0239797
0.0236823
0.0236048
0.0235437
0.0234753
0.0233817
0.023285
0.0231547
0.0230421
0.0229383
0.0229494
0.02304
0.0233081
0.023578
0.0240317
0.0247262
0.0259218
0.0271804
0.0284014
0.0292715
0.0299807
0.0304104
0.0307548
0.0312274
0.0317837
0.0319803
0.0307327
0.0283599
0.0268607
0.0268562
0.0273878
0.0274364
0.027207
0.0271011
0.027325
0.0281711
0.0293693
0.0301569
0.0304107
0.0303999
0.0303223
0.0299576
0.0296764
0.02949
0.0293654
0.0295099
0.0300196
0.0310579
0.0322093
0.0331999
0.0339242
0.0343808
0.034598
0.0341987
0.03383
0.0333348
0.0326329
0.0318217
0.0306307
0.0291877
0.028396
0.0296428
0.0306657
0.0304785
0.0300895
0.0301652
0.0302334
0.0303127
0.030348
0.0303707
0.0303385
0.030304
0.03027
0.0302387
0.0302048
0.0301876
0.0302063
0.03026
0.0302835
0.0302362
0.0301182
0.0300176
0.0300121
0.0301022
0.0302835
0.0303646
0.0303676
0.0302607
0.0305643
0.0311772
0.0318558
0.0328749
0.0337771
0.0342646
0.0344048
0.0342984
0.0341206
0.0340689
0.0341922
0.0345137
0.0350155
0.0355702
0.0360899
0.0365505
0.0368581
0.0370502
0.0371115
0.0370629
0.0369778
0.0369408
0.0370183
0.0372701
0.0377125
0.0382833
0.038827
0.0393298
0.0396011
0.0393424
0.0386026
0.0374711
0.0359488
0.0342249
0.0330297
0.0335074
0.035537
0.0365629
0.0359768
0.035127
0.0348719
0.035253
0.0356604
0.0360977
0.0365627
0.0368851
0.0369049
0.0367589
0.0365077
0.0363324
0.0361994
0.036185
0.0362506
0.0365504
0.0370731
0.0378041
0.0387644
0.0398094
0.0407467
0.0413003
0.0414251
0.0411298
0.0407091
0.0402077
0.0394344
0.0383914
0.0378574
0.0381194
0.0388066
0.0387767
0.0378174
0.0366674
0.0358291
0.0347447
0.0335823
0.0324317
0.0313712
0.030367
0.0296123
0.0289489
0.0284858
0.0281547
0.0281911
0.0286367
0.0298014
0.0316708
0.034374
0.0374734
0.0405215
0.0430938
0.044835
0.0460262
0.0465506
0.046542
0.0458509
0.0446727
0.0444646
0.0445109
0.0410897
0.0370896
0.0351126
0.0347382
0.0347371
0.0349506
0.0351366
0.0353701
0.0354494
0.0355011
0.0354677
0.0354126
0.0353029
0.0351544
0.0349305
0.0345981
0.0341526
0.0335992
0.0330268
0.0325635
0.0325072
0.0331722
0.0352449
0.0379491
0.0391753
0.0387791
0.0375266
0.0373573
0.0416721
0.0429954
0.0370122
0.0357208
0.0353453
0.0346825
0.0340329
0.033456
0.0330355
0.0326397
0.03242
0.0322489
0.0321602
0.0321865
0.0322626
0.0324528
0.0327228
0.0330697
0.0334918
0.0339197
0.0342983
0.0345862
0.0348187
0.0351221
0.035517
0.0359728
0.036386
0.0365861
0.0364548
0.0361293
0.0355737
0.0348541
0.0342155
0.0341382
0.0357035
0.0378388
0.0383791
0.0376698
0.0362705
0.0346757
0.0336333
0.0326028
0.0321812
0.0320348
0.0319115
0.0320901
0.032347
0.0328324
0.0335187
0.0344396
0.0356095
0.0368115
0.0378739
0.0385021
0.038665
0.0385125
0.0384399
0.0384463
0.0385267
0.0385994
0.0388315
0.0393774
0.0400043
0.0404243
0.0405964
0.0385047
0.0353762
0.034762
0.0355843
0.0363568
0.0369833
0.0372346
0.0375146
0.0375081
0.0375358
0.0375777
0.0375768
0.037737
0.0379097
0.0382106
0.0385005
0.0386604
0.0385181
0.0380841
0.0370429
0.0356551
0.0348874
0.0349467
0.0354317
0.035997
0.036483
0.0368993
0.0372864
0.0376628
0.0380238
0.0384183
0.0387728
0.0389242
0.0389002
0.0387966
0.0386684
0.0385856
0.038462
0.0382665
0.0379146
0.0374045
0.0367406
0.0361195
0.037443
0.0411497
0.0435763
0.0411933
0.0394028
0.0412691
0.0429449
0.0402543
0.0343427
0.0298267
0.0283331
0.0283252
0.0306596
0.035232
0.0414423
0.0474315
0.052279
0.0569785
0.0588709
0.0597861
0.0598454
0.0596316
0.0589455
0.0580869
0.0573135
0.0566232
0.0560022
0.055551
0.0551663
0.0549958
0.0550531
0.0552415
0.0555423
0.0558509
0.0560018
0.0557589
0.0542196
0.0529942
0.0583822
0.0632764
0.0550097
0.0506232
0.0502102
0.050964
0.0521656
0.0520487
0.0510104
0.0527263
0.0627785
0.0714795
0.0273886
0.0255361
0.0229547
0.02205
0.0235273
0.0263894
0.0274909
0.0277425
0.027715
0.028008
0.0278975
0.0280232
0.0280298
0.0279494
0.027901
0.0278856
0.027936
0.0281134
0.0282341
0.0282718
0.0282689
0.0283691
0.0285539
0.0281747
0.0263446
0.024818
0.0247086
0.0250347
0.024457
0.0238155
0.0236818
0.0236197
0.0235583
0.0235007
0.0234278
0.0233798
0.0233322
0.0233659
0.0234405
0.0236495
0.0238047
0.0241054
0.0243164
0.0246511
0.0252451
0.0260538
0.0271679
0.0282308
0.0291485
0.029826
0.0303326
0.0305603
0.0306309
0.0302171
0.029107
0.0276315
0.0266155
0.0264588
0.0269493
0.0274703
0.0274396
0.0272113
0.0269603
0.0270553
0.0283073
0.0296185
0.0300808
0.0302445
0.030204
0.0301805
0.0301487
0.0299414
0.0299938
0.0299365
0.0300575
0.0302813
0.0306849
0.0311351
0.0315571
0.0318993
0.0318886
0.0316518
0.0313598
0.0312804
0.0309914
0.0306342
0.029941
0.0288693
0.0281403
0.0282811
0.029907
0.0310729
0.0302047
0.0300164
0.0299323
0.0299083
0.0299712
0.0300575
0.0301186
0.0301576
0.0301735
0.0301746
0.0301719
0.0301654
0.0301559
0.0301397
0.0300953
0.030027
0.029953
0.0299022
0.0298708
0.0298875
0.0298528
0.0297263
0.0295843
0.0295483
0.0298191
0.030896
0.0311846
0.0320131
0.0332969
0.0341263
0.0346712
0.0350018
0.035221
0.0354205
0.0356615
0.0359489
0.0361716
0.036511
0.0366572
0.0368689
0.0370611
0.0372218
0.0373503
0.0374874
0.037634
0.0377988
0.0379573
0.0381293
0.0382975
0.0384426
0.0385731
0.0386289
0.0385173
0.037845
0.0369828
0.0361116
0.0351352
0.0340054
0.0331096
0.0330666
0.0339585
0.0357087
0.0368565
0.03603
0.03502
0.0352833
0.035794
0.0362616
0.0367745
0.037379
0.0377014
0.0380892
0.0382401
0.0385976
0.038586
0.038868
0.0389819
0.0392099
0.0394428
0.0397277
0.0400101
0.0402956
0.0405392
0.0406551
0.0405562
0.0401086
0.0395003
0.0390788
0.0387705
0.0383242
0.0379847
0.0382261
0.0384128
0.0396292
0.0398021
0.0391653
0.0390433
0.0389644
0.0386948
0.0384925
0.0380553
0.0375942
0.0369343
0.036297
0.0356516
0.035327
0.0350516
0.0351451
0.0354714
0.0361566
0.0370565
0.0381436
0.0393344
0.0405752
0.0416764
0.0425744
0.0430536
0.0434048
0.0435705
0.0436093
0.0438373
0.0450046
0.0446043
0.0401335
0.0359988
0.0347629
0.0344229
0.0343684
0.0339076
0.034168
0.0339148
0.0340063
0.0338954
0.0337547
0.0337448
0.0334628
0.0333618
0.0331363
0.032944
0.0327683
0.032659
0.0326101
0.0326756
0.0328774
0.0333099
0.0338967
0.0342714
0.0345718
0.0349879
0.0361897
0.0401484
0.0444156
0.0390798
0.0359642
0.0356658
0.0351544
0.0345955
0.0341192
0.0341406
0.0338218
0.0338673
0.0338745
0.0336286
0.0338345
0.0335274
0.0337893
0.0337534
0.0338184
0.0338637
0.0339019
0.0339306
0.0339687
0.0340447
0.0341774
0.0343747
0.0346586
0.0349376
0.0351067
0.0351046
0.0348379
0.0345506
0.0342907
0.0340744
0.0340936
0.0347312
0.0367048
0.038569
0.0391018
0.039
0.0384033
0.0385411
0.0378929
0.0380137
0.0377255
0.037743
0.0377895
0.0380303
0.038251
0.0386613
0.0390979
0.0395128
0.0398932
0.0401438
0.0402767
0.0402849
0.0401868
0.040055
0.039948
0.0399423
0.0401059
0.0402832
0.0404315
0.0405811
0.0406603
0.0407117
0.0404369
0.0368957
0.0343297
0.0345531
0.0350673
0.0352561
0.035672
0.0353908
0.0358048
0.0357547
0.0359317
0.0359953
0.0358107
0.0358092
0.0355751
0.0353075
0.034911
0.0344454
0.0339138
0.033619
0.0335683
0.0337674
0.0340896
0.0344855
0.0349622
0.0353743
0.0357965
0.0361479
0.0364304
0.0366507
0.0366909
0.0369068
0.0371278
0.0372358
0.0373355
0.037285
0.0372311
0.0371036
0.0369261
0.036692
0.0364122
0.036073
0.0360138
0.0402346
0.0443431
0.0447252
0.0436607
0.0425943
0.0428378
0.0436455
0.0425486
0.036111
0.0305241
0.0283757
0.0278109
0.0280504
0.0295134
0.0327066
0.0365899
0.0417235
0.0468802
0.0515181
0.0546637
0.0565597
0.0574074
0.0576529
0.057688
0.0575967
0.057455
0.0572864
0.057151
0.0571082
0.0568914
0.0568599
0.056616
0.0565405
0.0563967
0.0560515
0.0554825
0.0528562
0.0545565
0.0649347
0.0644411
0.0599064
0.0572323
0.0560244
0.05581
0.0562872
0.0569847
0.0589062
0.0630584
0.0683647
0.0718163
0.0316009
0.0299483
0.0289614
0.0284669
0.0283983
0.0284998
0.028623
0.0287796
0.0289658
0.0294676
0.0302971
0.0329673
0.0348183
0.0290828
0.0227218
0.0232151
0.0237674
0.024371
0.0247748
0.0249475
0.0249914
0.0249915
0.024952
0.0249293
0.0249138
0.0249126
0.0249011
0.0248769
0.0248475
0.0248113
0.0247695
0.0247348
0.0246911
0.0246472
0.0245776
0.024521
0.0244111
0.024318
0.0241741
0.0239934
0.0237641
0.0233619
0.0232978
0.0230915
0.0303331
0.030462
0.0294289
0.0274029
0.0262694
0.0259697
0.0258442
0.0259021
0.02599
0.0261155
0.0263615
0.0265179
0.0267391
0.0268988
0.0270079
0.0271437
0.027196
0.0273148
0.0273566
0.0274907
0.0275977
0.0277789
0.0280452
0.0285266
0.0292973
0.0302365
0.0300751
0.0276454
0.0265383
0.026762
0.0300109
0.0309051
0.0320321
0.0316621
0.0310638
0.030669
0.0303617
0.0302075
0.0301478
0.0301441
0.030152
0.0301589
0.0301872
0.0302073
0.0302181
0.0302231
0.03022
0.0302501
0.0302466
0.0302895
0.0303036
0.0303737
0.030549
0.0309691
0.0316236
0.0303285
0.0287551
0.0283693
0.0283174
0.0283681
0.0334489
0.0335943
0.0336719
0.0336546
0.0334355
0.0331329
0.0328526
0.0325728
0.0323899
0.0321841
0.0320707
0.0319362
0.0317925
0.0317322
0.0316022
0.0315682
0.0315595
0.0314868
0.0317389
0.0315734
0.0318616
0.0322243
0.0322914
0.0308323
0.0286186
0.0277188
0.0276943
0.0279762
0.0282139
0.0283251
0.0332143
0.0361016
0.0369428
0.037345
0.0377178
0.0378913
0.0379275
0.037845
0.0377347
0.0376152
0.0375009
0.0373399
0.0372173
0.037041
0.0369423
0.0368409
0.0368038
0.0367397
0.0367612
0.036771
0.0367769
0.036764
0.0367423
0.0367669
0.0368074
0.0368561
0.036845
0.0365035
0.0339182
0.0312189
0.0311625
0.0317609
0.030166
0.0291667
0.0289191
0.0290102
0.0299046
0.0309851
0.0315896
0.0319167
0.0320372
0.0320347
0.0319872
0.0319891
0.0319178
0.031983
0.0319482
0.0320012
0.0319589
0.0319694
0.0319555
0.0317151
0.0311067
0.0297181
0.027534
0.0257224
0.0252107
0.0258446
0.0270605
0.0276827
0.0283411
0.028475
0.0293076
0.0308219
0.0326607
0.0342157
0.0353189
0.0361534
0.0366248
0.037055
0.0369006
0.0371748
0.0370275
0.0372423
0.0371591
0.0373534
0.0373188
0.0374403
0.0374332
0.0374027
0.0371895
0.0369957
0.0362998
0.0350678
0.0337929
0.0339203
0.0339798
0.0339149
0.0338813
0.0338862
0.0324097
0.0320709
0.0318501
0.0317647
0.0317571
0.0318056
0.0317603
0.0318622
0.0317192
0.0318674
0.0317282
0.0316546
0.0316639
0.0316612
0.0316707
0.0316634
0.0315729
0.0316332
0.0320535
0.0324407
0.0331799
0.0377017
0.0450728
0.0457345
0.0451787
0.0448085
0.0447977
0.0448584
0.0452107
0.0453495
0.0281515
0.0293362
0.0307341
0.0317978
0.032367
0.0326269
0.032899
0.0326663
0.0328573
0.0328177
0.0328079
0.0328848
0.0327263
0.0326654
0.0325873
0.0325281
0.0323818
0.0321968
0.0318553
0.0314723
0.0311639
0.0324576
0.0362707
0.0368481
0.0366955
0.0365909
0.0365433
0.0365336
0.0365361
0.036552
0.034459
0.0359276
0.0365847
0.0367724
0.0367811
0.0367632
0.036639
0.0366717
0.0364057
0.0365357
0.0362799
0.036412
0.0361709
0.036035
0.0360915
0.0358467
0.03593
0.0361182
0.0363164
0.0365767
0.0383846
0.0403488
0.0391703
0.0384781
0.0383145
0.0383758
0.038442
0.0384658
0.0383201
0.0381841
0.0294449
0.0348407
0.0382432
0.0347411
0.0343098
0.036296
0.0385507
0.0398227
0.0404643
0.0406148
0.0405282
0.0403216
0.0400633
0.039788
0.0394966
0.0393432
0.0392482
0.0392291
0.0392184
0.0391874
0.0391364
0.0391054
0.0391163
0.0391605
0.0392968
0.0395579
0.0395575
0.0382422
0.0334189
0.0228842
0.0169171
0.0172393
0.0173996
0.017382
0.0173678
0.0189242
0.0461334
0.0540709
0.0540227
0.0536012
0.05327
0.0529872
0.0528657
0.0527222
0.0527359
0.0528803
0.053161
0.0535834
0.0541375
0.0547715
0.0552201
0.0552861
0.0543106
0.051686
0.0476884
0.0444065
0.0427103
0.0398035
0.0283669
0.0185721
0.0260845
0.0259509
0.0264271
0.0275352
0.0285467
0.0291725
0.0293817
0.0291603
0.0285856
0.0280791
0.0282107
0.0301154
0.0335055
0.0307781
0.022774
0.02348
0.0243508
0.0252292
0.025717
0.0257563
0.0255732
0.0253778
0.0252894
0.0252667
0.0252499
0.02522
0.0251281
0.0250207
0.0249388
0.0248985
0.0249077
0.0249495
0.0249895
0.0250163
0.0249865
0.0249016
0.0247473
0.0245519
0.0243324
0.0241007
0.0238625
0.0235624
0.0232683
0.0224215
0.0303768
0.030208
0.0280915
0.0257684
0.024953
0.0249262
0.0253406
0.0256397
0.0260286
0.0264021
0.0269452
0.0272996
0.0276291
0.0277049
0.0277583
0.0277557
0.0277402
0.0277321
0.0277077
0.0277052
0.027703
0.0277085
0.0278318
0.0280694
0.0286755
0.029635
0.0303043
0.0299172
0.0290212
0.0287893
0.0300311
0.0312506
0.0320947
0.0315456
0.0307546
0.0301394
0.0298077
0.0298374
0.0299701
0.0300476
0.0300906
0.0300594
0.0299945
0.0299416
0.0299188
0.0299278
0.0299594
0.0300442
0.030058
0.0300315
0.0300225
0.0300793
0.0302242
0.030565
0.0313045
0.0313052
0.0302748
0.0293807
0.0290948
0.0288534
0.0335067
0.0338072
0.0334817
0.0325538
0.0316129
0.0309242
0.030486
0.0302135
0.0300248
0.0299288
0.0298481
0.0298592
0.0297984
0.0298365
0.0298752
0.0299651
0.0301168
0.03031
0.0306316
0.0308996
0.031262
0.0317279
0.0321805
0.031973
0.0308436
0.0292457
0.0283666
0.0286078
0.0290318
0.0289779
0.0341534
0.0366913
0.0374543
0.0378157
0.0378806
0.0375439
0.0370765
0.0368111
0.0366474
0.0364831
0.0362158
0.0359152
0.035665
0.0355623
0.0355294
0.0355175
0.0355774
0.0355544
0.03556
0.0355657
0.0356222
0.0357823
0.0359239
0.0360862
0.0362993
0.0365253
0.0366623
0.0366669
0.0356819
0.0334055
0.0314695
0.0312089
0.0298156
0.0294711
0.0298082
0.0317954
0.0337292
0.0337836
0.0331212
0.0322925
0.0315789
0.0310737
0.030761
0.0305931
0.0305862
0.0306557
0.0308423
0.0310602
0.0313367
0.0315962
0.0318588
0.0319714
0.0317417
0.0310261
0.0294743
0.0274249
0.0257586
0.0252347
0.0260668
0.027362
0.0326365
0.0340898
0.0362794
0.0388372
0.0400306
0.0403304
0.0402597
0.0397815
0.0393081
0.0387059
0.0384438
0.0379534
0.0380319
0.0378655
0.0379612
0.0378964
0.0379164
0.037912
0.0379155
0.0379453
0.0378806
0.037576
0.037064
0.0360337
0.0344593
0.0336281
0.0332659
0.0334288
0.0335122
0.0337167
0.0312035
0.0311579
0.0315222
0.0320421
0.0325057
0.0328981
0.0330635
0.0331557
0.0331594
0.0330728
0.0329264
0.0326979
0.0323715
0.0320106
0.0317748
0.0315641
0.0314173
0.0310906
0.0312667
0.0316986
0.0322758
0.0346654
0.0413318
0.0448874
0.0427617
0.041415
0.0411638
0.0418113
0.0435818
0.0448389
0.0307838
0.0330466
0.0342111
0.0344297
0.0343342
0.0340516
0.0335885
0.033305
0.0328314
0.0327879
0.0325273
0.0324547
0.032433
0.0323915
0.0325358
0.0326005
0.0327629
0.032653
0.0324562
0.0320175
0.0314776
0.0316398
0.0341096
0.0367655
0.0367596
0.0367055
0.0367581
0.036833
0.0368343
0.0368967
0.0367026
0.0374308
0.037457
0.0372488
0.0369583
0.0366173
0.0362838
0.0360027
0.0356772
0.0354137
0.0351218
0.0349002
0.0346793
0.0345017
0.0343797
0.0344283
0.034565
0.0348397
0.0352671
0.0357234
0.0369891
0.0393901
0.0396939
0.0385198
0.0386667
0.0392608
0.0397976
0.0397822
0.0390521
0.03827
0.0346222
0.0374631
0.0365169
0.0358951
0.038457
0.0410572
0.0417195
0.0415285
0.0405624
0.0394552
0.0386235
0.0380148
0.0376778
0.0375661
0.0378304
0.038398
0.0391281
0.0396451
0.0397599
0.0395951
0.03918
0.0386171
0.0380789
0.0378188
0.0379712
0.03859
0.0392033
0.0387879
0.0361644
0.0284662
0.0197828
0.0226691
0.0238163
0.0223003
0.0209113
0.0344397
0.0514598
0.0538816
0.0530252
0.0522554
0.0516779
0.0513068
0.0511885
0.051199
0.0511914
0.0512533
0.0513968
0.0519062
0.0529079
0.0545521
0.0563577
0.0574787
0.0576176
0.0543536
0.0475213
0.0426843
0.0416334
0.0401496
0.0304693
0.0191205
0.0253228
0.0263213
0.02885
0.0308418
0.0314658
0.0315644
0.0315555
0.0316027
0.0314695
0.0302786
0.0286503
0.0287645
0.0317345
0.0315156
0.022878
0.0239049
0.0251707
0.0261929
0.0264562
0.0261251
0.025685
0.0254257
0.0253629
0.0253193
0.0252405
0.025068
0.0248577
0.0247306
0.0247295
0.0248098
0.0249372
0.0250672
0.025208
0.0253175
0.0253971
0.0253718
0.0252231
0.0249566
0.024617
0.0242713
0.0239712
0.0237004
0.023372
0.0225186
0.0303947
0.0297928
0.0270475
0.025306
0.0253131
0.02606
0.0265191
0.026584
0.0268608
0.0273456
0.0279023
0.0281101
0.0281198
0.0279954
0.0278685
0.0277658
0.0277265
0.0277467
0.0278512
0.0278792
0.0279421
0.0279166
0.0278986
0.02792
0.0281299
0.0288318
0.0298129
0.0303066
0.0301172
0.0294992
0.030069
0.0316388
0.0324906
0.0319504
0.0308876
0.0300006
0.0298554
0.0300837
0.0301748
0.0300238
0.0297397
0.0294518
0.0291973
0.0290235
0.0289368
0.0289506
0.0290665
0.0293108
0.0295494
0.029734
0.0298326
0.0298914
0.029984
0.0302021
0.0308029
0.0313871
0.0314087
0.0307209
0.0301105
0.0293059
0.0336381
0.0334516
0.0317197
0.0303589
0.0297037
0.0294514
0.0293021
0.0292731
0.029261
0.0292711
0.0292818
0.0292945
0.0293154
0.0292822
0.0293443
0.02934
0.0294138
0.029513
0.0297067
0.0300575
0.0304747
0.0310169
0.0316621
0.0320766
0.032092
0.0312725
0.0300679
0.0297321
0.0298578
0.0293594
0.0348906
0.0371189
0.0375862
0.0373449
0.0365388
0.0359062
0.0357226
0.0358205
0.0358347
0.03566
0.0353469
0.0352538
0.035383
0.0356269
0.0358696
0.0360528
0.0361721
0.0362911
0.0362803
0.036281
0.0361436
0.0359493
0.0358162
0.0357467
0.0358159
0.0360174
0.0363214
0.0365271
0.036316
0.0345827
0.0315712
0.0307793
0.0299165
0.0303546
0.0327524
0.0352885
0.0338235
0.0318582
0.0306507
0.0299682
0.0295689
0.0293945
0.0294752
0.0296933
0.0301269
0.0304376
0.030582
0.0306868
0.0307783
0.0309831
0.0313172
0.031738
0.0320072
0.0318619
0.0310189
0.0293165
0.0270866
0.0253362
0.0254559
0.0268774
0.0345067
0.0364147
0.0403594
0.0414173
0.04073
0.0393358
0.0379275
0.0368826
0.0360321
0.035752
0.0353706
0.0355059
0.0352375
0.0354351
0.0353637
0.0356254
0.0358817
0.0362679
0.0368154
0.0373281
0.0378197
0.0379869
0.0376638
0.0369535
0.035518
0.0341434
0.0333352
0.0329917
0.0330868
0.0334329
0.0310949
0.0321792
0.0334069
0.0342781
0.0346862
0.0347433
0.034738
0.0344386
0.0342494
0.0338181
0.0336799
0.0333993
0.0333283
0.0331258
0.0328565
0.0326038
0.0321374
0.0314859
0.0311307
0.0311045
0.0315371
0.032807
0.0375396
0.0432176
0.0414186
0.0384367
0.037653
0.0382706
0.0408642
0.0436759
0.0335022
0.0347378
0.034725
0.0342208
0.0335107
0.0327121
0.0321761
0.0314129
0.0309721
0.0305758
0.0302852
0.0301949
0.0301656
0.0304277
0.0307294
0.0312459
0.0318021
0.0322444
0.0325537
0.0323885
0.0319328
0.0315225
0.0324004
0.0357485
0.0369103
0.0369845
0.0372086
0.0372532
0.0371861
0.0373303
0.0383458
0.0379212
0.0375802
0.0371057
0.0365844
0.036002
0.0355591
0.0349706
0.0344713
0.0339444
0.0334992
0.0331247
0.0327961
0.0324915
0.0324241
0.0325258
0.032803
0.0332002
0.0338026
0.034517
0.0356633
0.0379288
0.0396569
0.0387705
0.0389261
0.040065
0.0410114
0.0411778
0.0400101
0.0382585
0.0368768
0.0370882
0.0368418
0.0390626
0.041241
0.0414473
0.0401347
0.0386389
0.037766
0.0371828
0.0368409
0.036506
0.036395
0.0366429
0.0375292
0.0390483
0.0406166
0.0411514
0.0411181
0.0403497
0.0390916
0.0380119
0.0373163
0.0367344
0.0365703
0.0371282
0.0382656
0.0387946
0.0375898
0.0317544
0.0279551
0.0343458
0.0357401
0.0281094
0.0298697
0.0470252
0.0533829
0.0531348
0.0520989
0.0515945
0.0514412
0.0515089
0.0516265
0.0517725
0.0518411
0.0518217
0.0517147
0.0517338
0.0523057
0.0540352
0.0566883
0.0583465
0.0584067
0.0545217
0.0443684
0.0399752
0.040603
0.0403641
0.0321081
0.0196685
0.025498
0.0281322
0.0312798
0.0318104
0.0312293
0.030396
0.0299762
0.0303107
0.0313281
0.0314929
0.0298404
0.0285258
0.0307352
0.0316229
0.0230317
0.0244442
0.0260802
0.0271024
0.0270583
0.0264327
0.0257983
0.0254021
0.0252401
0.0251338
0.0249956
0.0247377
0.0245342
0.0245279
0.0247046
0.024957
0.0252016
0.02544
0.0256549
0.0258449
0.0259324
0.0259202
0.0257524
0.0254235
0.024966
0.0244948
0.0240927
0.0237991
0.0234763
0.0226142
0.0303678
0.0295162
0.0267855
0.0257026
0.0266441
0.0277285
0.0275573
0.027091
0.0272446
0.0277604
0.0281383
0.0281302
0.0278403
0.0275952
0.0274286
0.0273679
0.027393
0.0274387
0.0275707
0.0277045
0.0278905
0.0280465
0.0280487
0.0279728
0.0279916
0.0282879
0.0291433
0.0300254
0.0302987
0.0297828
0.0301385
0.0320195
0.0330963
0.0324782
0.0307987
0.0299022
0.0300075
0.0301052
0.0298633
0.0294649
0.029018
0.0286232
0.0283458
0.0281589
0.0280552
0.0280202
0.0280599
0.0282056
0.0285188
0.0289602
0.0293227
0.0295883
0.0297473
0.0299351
0.0303658
0.0310644
0.0315667
0.0314311
0.0308687
0.0296845
0.0337404
0.0316469
0.0299252
0.0293748
0.0292214
0.0291979
0.0292182
0.0292541
0.0292939
0.029338
0.0293854
0.0294245
0.0294431
0.0294419
0.0294303
0.0294418
0.0293743
0.0293436
0.0293471
0.0295364
0.0298288
0.0303619
0.0310108
0.0316328
0.0320694
0.0320867
0.0314366
0.0308173
0.0305118
0.0296798
0.0354085
0.0372595
0.0371618
0.0361098
0.0351949
0.0350548
0.0352049
0.0354284
0.0354342
0.0352014
0.0351218
0.0354286
0.0358917
0.0362256
0.036497
0.0365584
0.0367514
0.0368058
0.036911
0.0368938
0.0367325
0.0365453
0.0362508
0.0358698
0.0356391
0.0356565
0.035923
0.0362823
0.0364129
0.0351825
0.0316053
0.0306549
0.0304744
0.0325348
0.0357473
0.0342728
0.0311734
0.0303284
0.0302153
0.0299014
0.0295975
0.0297664
0.0306288
0.0318609
0.033018
0.0337809
0.0339605
0.0335432
0.0327146
0.0319048
0.031532
0.0315959
0.0319027
0.0321741
0.0319376
0.0307913
0.0285471
0.0258767
0.0251848
0.0265617
0.0356006
0.0390918
0.0421074
0.0405755
0.038289
0.0364571
0.0354397
0.035086
0.0351044
0.0355467
0.0357962
0.0362354
0.0364447
0.0365088
0.0362349
0.0360199
0.0358207
0.0357169
0.0358085
0.0360927
0.0368254
0.0376252
0.037944
0.0375441
0.0365129
0.0351025
0.0339815
0.0333252
0.0330812
0.0332872
0.0327265
0.0340012
0.0348965
0.0352139
0.0351947
0.0347636
0.0340388
0.0332395
0.032536
0.0319057
0.031543
0.0313344
0.0314565
0.0316555
0.0319169
0.0322448
0.0322426
0.0319174
0.0313464
0.0309016
0.0310487
0.0317877
0.0349106
0.0407802
0.0413178
0.0379352
0.0365685
0.0364197
0.0382607
0.0423235
0.0354341
0.0350985
0.0344692
0.0337312
0.0329712
0.0320511
0.0312605
0.0303617
0.029743
0.0293802
0.0290317
0.0289525
0.0289296
0.029023
0.0292592
0.0296423
0.0303596
0.0311069
0.0319774
0.0324202
0.0322739
0.031728
0.0317465
0.0340705
0.0366247
0.0371808
0.0374689
0.0374638
0.0373327
0.0375609
0.0376423
0.0377379
0.0373465
0.0365779
0.0358779
0.0351805
0.0345224
0.033623
0.0327158
0.0318735
0.0310592
0.0305851
0.0301243
0.0300227
0.0299413
0.0302654
0.0307861
0.0314342
0.0322156
0.0331914
0.0343988
0.0365687
0.0391882
0.0391958
0.0388897
0.039914
0.0411511
0.0418916
0.0407911
0.0382646
0.0371467
0.0369509
0.0384761
0.0408965
0.0412264
0.0398267
0.0384139
0.037642
0.0372887
0.0369751
0.0365948
0.0361483
0.0357125
0.0355987
0.0362555
0.037981
0.0401151
0.0412406
0.0408091
0.0390252
0.0361572
0.033729
0.0332929
0.0337382
0.03434
0.0354162
0.0370662
0.0384756
0.0380566
0.0333436
0.0366351
0.0459678
0.0428264
0.0331446
0.0404336
0.0519518
0.0533695
0.0524081
0.0517159
0.05149
0.0514076
0.0513612
0.0513157
0.0514621
0.0518505
0.052311
0.0525488
0.0524835
0.0524656
0.0535335
0.0568207
0.0594597
0.0588239
0.0532142
0.0416234
0.0377215
0.0397255
0.0404705
0.0327743
0.0196502
0.0258323
0.0296635
0.0317675
0.0307477
0.0293933
0.028429
0.0279142
0.0278374
0.0293431
0.0308304
0.0300325
0.0287385
0.0303481
0.0315825
0.0232093
0.0250688
0.0270048
0.0279838
0.0277005
0.0268323
0.0259439
0.0253439
0.0250313
0.02487
0.0247007
0.0244292
0.0243318
0.0245064
0.0248382
0.0252044
0.0255164
0.0258327
0.0261444
0.0263827
0.0265091
0.02649
0.0262857
0.0258685
0.0253136
0.0247141
0.0242004
0.0238548
0.0235206
0.0226425
0.0303055
0.0294632
0.0270847
0.0266948
0.0284331
0.0293912
0.0284055
0.0274153
0.0274832
0.0279395
0.0281208
0.0278908
0.0275288
0.0273548
0.0273925
0.0275374
0.0277344
0.0278118
0.0277752
0.0277808
0.0279095
0.0280852
0.0281833
0.0281243
0.0279945
0.0280739
0.0286235
0.02957
0.030179
0.0298356
0.0301122
0.0324289
0.0337533
0.032791
0.0304996
0.0298931
0.0300369
0.0299144
0.0295716
0.0291954
0.0288121
0.0284659
0.0282162
0.0280618
0.0279729
0.027892
0.0278159
0.0277588
0.027867
0.0281846
0.0286197
0.0290916
0.0294109
0.0296615
0.0300201
0.0307201
0.0314299
0.0317156
0.0312456
0.029929
0.0334575
0.0299779
0.0293736
0.0292302
0.0292129
0.0292381
0.0292656
0.0292968
0.0293496
0.0294368
0.0295431
0.0296498
0.0297245
0.0297608
0.0297441
0.0297047
0.0296047
0.0294758
0.0293544
0.0293616
0.0295329
0.0299041
0.0304488
0.0310587
0.0316856
0.0320555
0.0319825
0.0314956
0.0309581
0.029907
0.0356994
0.037173
0.0363743
0.0351962
0.0348091
0.0348179
0.0349537
0.0351808
0.0351366
0.0349725
0.0352223
0.0356839
0.0360992
0.0363166
0.0365914
0.0366574
0.0367895
0.036773
0.0367994
0.0368221
0.0368824
0.0368564
0.0366283
0.0361802
0.035696
0.0354632
0.0355957
0.0360438
0.0363356
0.0354368
0.0315624
0.0308135
0.0318555
0.0352115
0.0355885
0.0313916
0.0307948
0.0316275
0.0311147
0.0301344
0.0298597
0.0309162
0.032962
0.0349709
0.0360992
0.0364725
0.0366836
0.0363301
0.035389
0.0338648
0.0324385
0.031836
0.0318837
0.0322615
0.0324127
0.0317331
0.0295284
0.026253
0.0250257
0.0264026
0.036987
0.0417952
0.0414867
0.0384653
0.0363811
0.035392
0.0352182
0.0357355
0.0365697
0.037555
0.0384272
0.0389319
0.0393127
0.0394094
0.0393497
0.0389074
0.0380828
0.0372148
0.0364143
0.0359827
0.0361317
0.0368188
0.0377177
0.0378968
0.0372138
0.0359622
0.0346995
0.0339052
0.0334575
0.0333296
0.0339667
0.0348804
0.0353254
0.0353257
0.0347935
0.0337298
0.0323881
0.0312416
0.0301927
0.029594
0.0290984
0.0289311
0.0289267
0.0292469
0.0296564
0.0305446
0.0312156
0.0316311
0.0315109
0.0309978
0.0308112
0.0312219
0.0333608
0.0384978
0.040844
0.0387396
0.0370249
0.0360325
0.0368164
0.0407449
0.0358689
0.0349921
0.0345115
0.0338857
0.0329162
0.0316201
0.0305001
0.0293912
0.0289638
0.0286018
0.0285041
0.0284411
0.0284833
0.0286594
0.0286725
0.0288317
0.0292433
0.0299555
0.0309961
0.031919
0.0322782
0.031935
0.0315889
0.0328054
0.0355911
0.0370882
0.0375359
0.0374411
0.0373611
0.0376532
0.03744
0.0376429
0.0367889
0.0359108
0.0353185
0.0345784
0.0335681
0.0321335
0.0307818
0.0296783
0.0287645
0.0281744
0.0278413
0.027614
0.0277516
0.0281283
0.0288383
0.0297262
0.0307093
0.0318845
0.0332647
0.0353828
0.038466
0.0395464
0.0391085
0.0394135
0.0405596
0.0420679
0.0410761
0.0383082
0.037238
0.0375935
0.0400072
0.0412076
0.040137
0.0385755
0.0378064
0.0376119
0.0374702
0.0372373
0.0368954
0.0363645
0.0355774
0.0347514
0.0344463
0.0356199
0.0382576
0.040305
0.0403162
0.0380947
0.0337613
0.0295272
0.0285928
0.0297128
0.031635
0.0336159
0.0360247
0.0381639
0.0381405
0.0339693
0.0420029
0.0523559
0.0446767
0.0383571
0.0469586
0.053195
0.0530237
0.0518948
0.0512654
0.0504992
0.0495233
0.0485241
0.0480607
0.0483464
0.0493892
0.0509139
0.0523339
0.0530111
0.0528026
0.0527441
0.0556577
0.0602157
0.0597295
0.0526216
0.0412893
0.0368649
0.0392179
0.0399157
0.0310123
0.0192987
0.0261494
0.0301423
0.031133
0.0294793
0.0284313
0.0277235
0.0271533
0.0269371
0.028076
0.0296995
0.0294241
0.0288633
0.0304367
0.0315532
0.0234382
0.0257254
0.027926
0.0288432
0.02843
0.0273193
0.0261896
0.025364
0.024888
0.0246582
0.0244527
0.0242042
0.0242431
0.0245725
0.0250128
0.0254451
0.0257442
0.0260579
0.0263949
0.0267358
0.0269685
0.0269895
0.0267268
0.0262021
0.0255287
0.0248359
0.0242482
0.0238696
0.0235373
0.0226236
0.0302096
0.0295963
0.027761
0.0279691
0.0302239
0.0309046
0.0291574
0.0276252
0.0276234
0.0279996
0.0280292
0.0276825
0.0274109
0.0274109
0.0277031
0.0281405
0.0285021
0.0286622
0.0284371
0.0281234
0.0280758
0.0282096
0.0283343
0.0282964
0.0280933
0.0280021
0.0283579
0.0291849
0.0299623
0.029782
0.0302366
0.0327893
0.0342878
0.03273
0.0302167
0.0298762
0.0299735
0.0297846
0.0295575
0.029351
0.0290761
0.0287037
0.0284316
0.0282778
0.0281923
0.0280795
0.0279152
0.0277299
0.0276042
0.0277064
0.0280456
0.0285451
0.0290105
0.0293405
0.0297513
0.0304365
0.0312685
0.0317168
0.0313513
0.0299478
0.0322982
0.0294785
0.0292939
0.029243
0.0292813
0.0292964
0.0292814
0.0292844
0.0293685
0.0295302
0.0297172
0.0298657
0.0299735
0.0300414
0.030029
0.0299949
0.0298529
0.029728
0.0295415
0.0294269
0.0294337
0.0296483
0.0300299
0.0305927
0.0312443
0.0318281
0.0319905
0.0317347
0.0311835
0.0300264
0.0358701
0.0368851
0.0357373
0.0350477
0.0349224
0.0347362
0.0347972
0.0350189
0.0349543
0.034899
0.0352915
0.0356422
0.0358082
0.0360104
0.0363482
0.0365766
0.0366942
0.0367167
0.0366805
0.0367291
0.0368397
0.0369185
0.0368104
0.0363977
0.0357798
0.0353413
0.0353638
0.0358747
0.0362562
0.0354749
0.0315068
0.0314508
0.0342141
0.0361374
0.0326902
0.0315495
0.0329951
0.0326521
0.0307178
0.0294986
0.0301077
0.0324847
0.0351606
0.0365626
0.036818
0.0365669
0.0365994
0.0366234
0.0362385
0.0350267
0.0332612
0.0321558
0.0319647
0.0323583
0.0327609
0.0323513
0.0300658
0.026334
0.0249987
0.0264375
0.0386577
0.0423427
0.0396494
0.0373287
0.0359376
0.0355518
0.0359265
0.0368633
0.0380404
0.0389779
0.039665
0.040048
0.0404705
0.0405307
0.0408069
0.0407337
0.0402977
0.0393815
0.0379633
0.0367089
0.0361712
0.0363238
0.0372407
0.0378882
0.0376037
0.0366239
0.0353412
0.034384
0.0337142
0.0333562
0.0347435
0.0352797
0.0354277
0.0351585
0.0341203
0.0326511
0.0309875
0.0298393
0.0288049
0.0284297
0.0280405
0.0279075
0.0278296
0.0278134
0.0280867
0.0288312
0.0297019
0.0306804
0.0312324
0.0310853
0.0307538
0.0309066
0.0323585
0.0364689
0.039817
0.0392937
0.0376293
0.0361669
0.036057
0.0392746
0.0357278
0.0352204
0.0349308
0.0341935
0.0328471
0.0310949
0.0297639
0.0286493
0.0285125
0.0282559
0.0283696
0.0284243
0.0285636
0.0286359
0.0286267
0.0285794
0.0287263
0.0291824
0.0302033
0.0312827
0.0321079
0.0320303
0.0315908
0.0320964
0.0343981
0.0364611
0.0372131
0.0371615
0.0372867
0.037719
0.0378548
0.0373158
0.03617
0.0355984
0.035176
0.034146
0.0326318
0.0305453
0.0291081
0.0278505
0.0270871
0.0266169
0.0262705
0.0262889
0.026282
0.0266453
0.0273646
0.0282713
0.0294195
0.0307155
0.032299
0.0344293
0.0376631
0.0397044
0.0394774
0.0395015
0.0405265
0.042106
0.0410484
0.0383773
0.0374102
0.0385284
0.0407022
0.0406415
0.0390694
0.038019
0.037837
0.0378536
0.0378289
0.0377273
0.037504
0.0370852
0.0363283
0.0349607
0.0335937
0.0333549
0.0356732
0.038772
0.0399306
0.0385482
0.0341327
0.0291513
0.026866
0.027572
0.0297023
0.0324714
0.035507
0.0381604
0.0381492
0.0340403
0.044139
0.0540001
0.0461718
0.0429104
0.0502539
0.0534484
0.0525976
0.0513412
0.0501576
0.0482305
0.046095
0.0441296
0.0432342
0.0436417
0.0453298
0.0478235
0.0506032
0.0528132
0.0533356
0.0526015
0.053482
0.0601063
0.061508
0.0533712
0.0414319
0.0365359
0.038424
0.037731
0.0279092
0.0187869
0.0262827
0.0299433
0.0301705
0.0287408
0.0281102
0.0274876
0.0268735
0.026633
0.0274024
0.0286623
0.0288322
0.0291404
0.0305176
0.0313562
0.0237829
0.0266459
0.0288028
0.0294703
0.0289455
0.0277045
0.0265112
0.025469
0.0248212
0.0245061
0.0242545
0.0240549
0.0242128
0.0246929
0.0251796
0.0255768
0.0257966
0.0261086
0.0265337
0.0270429
0.0273191
0.0272482
0.026897
0.0262289
0.0254938
0.0247724
0.0242089
0.0238538
0.023505
0.0224871
0.0300418
0.0298003
0.0286265
0.0294232
0.0318617
0.0321911
0.0297492
0.0277907
0.0276943
0.0280186
0.0279707
0.0276293
0.0274203
0.0275366
0.0279542
0.0284774
0.0289505
0.0290944
0.0289128
0.0285606
0.0283796
0.0284525
0.0284802
0.0283952
0.0281588
0.0279736
0.028192
0.0289098
0.0297119
0.02966
0.0301563
0.0331544
0.0345346
0.0322343
0.0301016
0.029898
0.0299338
0.0298296
0.0297278
0.0296206
0.0293778
0.0290298
0.0286892
0.028489
0.0283821
0.0282379
0.0280087
0.0277273
0.0274876
0.0274613
0.0276907
0.0281121
0.028653
0.029079
0.0295535
0.0302959
0.0311896
0.0317231
0.0312686
0.0297849
0.0311635
0.0293209
0.0293231
0.0293929
0.0294633
0.0294476
0.0293704
0.0293181
0.0293981
0.0295703
0.0297923
0.0299644
0.0300987
0.0301787
0.0302402
0.0301513
0.0300721
0.029919
0.0297417
0.0295593
0.0294951
0.0295817
0.0298148
0.0302918
0.0309246
0.0315588
0.0318787
0.0317137
0.0312312
0.030064
0.0359709
0.036552
0.0355929
0.0354082
0.0351832
0.0346603
0.0346911
0.0349259
0.0348276
0.0348032
0.0351097
0.0352641
0.0352604
0.03549
0.0359515
0.0363649
0.0366191
0.0367113
0.0367659
0.0367492
0.0368488
0.0369383
0.0368414
0.0364198
0.0356918
0.0351699
0.0352248
0.0358175
0.0362194
0.0353681
0.0315817
0.0328257
0.0357993
0.0348091
0.0324672
0.033753
0.0343369
0.0321506
0.0296993
0.0291278
0.0306508
0.0336712
0.035917
0.0365734
0.035903
0.0351801
0.0351375
0.03572
0.0358114
0.0349122
0.0333774
0.0322847
0.0321286
0.0326235
0.0331635
0.0327304
0.0299129
0.0257897
0.0249642
0.0267873
0.039931
0.0420029
0.039048
0.0372154
0.0359739
0.0358213
0.0364556
0.0375424
0.0386255
0.0393256
0.039629
0.0397944
0.040041
0.0404139
0.0408526
0.0411432
0.0412207
0.040769
0.0394679
0.037801
0.0365297
0.0362224
0.0368692
0.0377305
0.0377267
0.0369423
0.0356966
0.0347248
0.0339333
0.0334248
0.0353774
0.0355689
0.0354509
0.0349402
0.0336069
0.0318835
0.0301577
0.029109
0.0283211
0.0281409
0.0278804
0.0277444
0.0275675
0.0274086
0.0273482
0.0277843
0.0285378
0.0297932
0.030687
0.0309753
0.0307395
0.0307446
0.0318151
0.0350894
0.0386012
0.0389901
0.0380195
0.0364687
0.0361872
0.0384374
0.0356671
0.0356558
0.03541
0.0345705
0.0328834
0.0307974
0.0293386
0.0284079
0.0283685
0.0284021
0.0285319
0.0286329
0.0287336
0.0287147
0.028681
0.0286002
0.0285641
0.028792
0.0297075
0.0307795
0.0318644
0.0319957
0.0315637
0.0317236
0.0334833
0.0355971
0.0364286
0.0367982
0.0373112
0.0378436
0.038083
0.0368236
0.0358607
0.0356023
0.0351985
0.0338049
0.0318414
0.029346
0.0281021
0.0267321
0.0262333
0.025719
0.0254278
0.0253176
0.025435
0.0258046
0.0263242
0.0272917
0.028384
0.0298283
0.0315423
0.0337663
0.0370015
0.0396509
0.0399613
0.0400115
0.0409456
0.0421869
0.0409666
0.0384347
0.0375936
0.0391484
0.0406939
0.0399097
0.0384102
0.0379382
0.0379481
0.0379362
0.0379087
0.0379129
0.037905
0.0376992
0.0372203
0.0361356
0.0339903
0.0321856
0.0328189
0.0362276
0.03893
0.0393519
0.0365715
0.0319335
0.0284668
0.028041
0.0297426
0.032694
0.0360844
0.038398
0.0378861
0.0338952
0.0421753
0.0545981
0.0483074
0.0464151
0.0517668
0.0534585
0.052182
0.0506434
0.0486398
0.0455575
0.0424939
0.0398767
0.0388226
0.0394819
0.0414649
0.0445219
0.0480941
0.0516762
0.0536607
0.0531244
0.0519413
0.0586194
0.063383
0.0550841
0.0417168
0.035875
0.0364761
0.033578
0.0242199
0.0182613
0.0262016
0.0292631
0.0292237
0.0282271
0.0279283
0.0273941
0.0266856
0.0264508
0.0270409
0.0282684
0.0290816
0.0295373
0.0291402
0.0288797
0.0240315
0.0272291
0.0293632
0.0298063
0.0290988
0.0279757
0.0268881
0.0256486
0.0247989
0.0243935
0.0240989
0.0239606
0.0242121
0.0247935
0.0252716
0.0255911
0.0257917
0.0261624
0.0266914
0.0272056
0.0273353
0.0270627
0.0265548
0.0258377
0.0251385
0.0245147
0.0240208
0.0237015
0.0232426
0.0223831
0.0299742
0.0299624
0.0295228
0.0306763
0.0330522
0.0331391
0.0302343
0.0278669
0.0277163
0.0280126
0.027971
0.0277097
0.0275104
0.0275282
0.0278715
0.0283305
0.0288826
0.0291623
0.0291266
0.0289246
0.0287355
0.0286623
0.028567
0.0283789
0.0281031
0.0279295
0.0281327
0.0287986
0.0295176
0.0294926
0.0303791
0.0334733
0.0346165
0.0320708
0.0300295
0.0298759
0.0299673
0.0298907
0.0298323
0.0298927
0.0296963
0.0293778
0.0289684
0.0286846
0.0285302
0.0283353
0.0280524
0.0277183
0.0274592
0.027403
0.027569
0.0278885
0.0284489
0.0289238
0.0295408
0.0303685
0.0312809
0.031679
0.0309238
0.0296788
0.0304405
0.0292818
0.0295285
0.0296833
0.0298103
0.0298093
0.0296816
0.0295115
0.0294399
0.0295528
0.0297469
0.0299284
0.0300801
0.0301915
0.03026
0.0302308
0.0301509
0.0300608
0.029872
0.0297003
0.0295696
0.0295921
0.0297862
0.0302008
0.030783
0.0313929
0.0317178
0.0315769
0.0311056
0.0299046
0.0360195
0.0363871
0.0359102
0.0361032
0.035362
0.0345727
0.0346134
0.0348906
0.0347369
0.0346257
0.0347879
0.0347504
0.0346618
0.0348793
0.0354072
0.0360015
0.036354
0.0365564
0.036749
0.0368353
0.0368853
0.0369055
0.0366546
0.0361011
0.0353688
0.034999
0.0352717
0.0358643
0.0361129
0.0352481
0.0317507
0.0340113
0.03615
0.0339034
0.0337301
0.0353513
0.0346317
0.0314243
0.029154
0.0289048
0.0306593
0.03359
0.0355961
0.0360024
0.0353089
0.0345412
0.0344124
0.0346607
0.0346586
0.0339608
0.0329677
0.0323078
0.0324423
0.0332071
0.0337557
0.0325992
0.0284848
0.0251246
0.0252137
0.0268826
0.0406312
0.0417458
0.0392352
0.0375056
0.0361367
0.0359507
0.0366579
0.0376821
0.0385818
0.0389522
0.0390391
0.0390705
0.0394211
0.0401177
0.0407579
0.0413644
0.0416168
0.0413715
0.0403055
0.0385196
0.0368266
0.0362466
0.036705
0.0376345
0.0377237
0.0370043
0.0358041
0.0349387
0.0340137
0.0334421
0.0360841
0.0359286
0.0354635
0.0348044
0.0334145
0.0315469
0.0298199
0.0288699
0.0282984
0.028172
0.0279371
0.0276336
0.0272706
0.0270485
0.0268823
0.0272181
0.0278442
0.0291395
0.0302203
0.0307531
0.0306012
0.0306266
0.0314997
0.0340704
0.0372209
0.0383332
0.0374888
0.0362609
0.0361674
0.0379081
0.0358208
0.0360332
0.0359386
0.0351108
0.0332033
0.030854
0.0291969
0.0284045
0.0283912
0.0285598
0.0286834
0.0288132
0.0288916
0.0288573
0.0287652
0.0286233
0.0285177
0.0287037
0.029498
0.0305845
0.0316763
0.0318727
0.0314724
0.0315127
0.0329177
0.0346836
0.0359605
0.0371138
0.0378394
0.0381729
0.0377913
0.0365189
0.0357966
0.0356892
0.0353423
0.033745
0.0314576
0.0289425
0.0276665
0.0262774
0.0257771
0.0251181
0.0248864
0.0248265
0.0249313
0.0252673
0.0257874
0.0267069
0.027793
0.0292736
0.0310729
0.0333296
0.0365614
0.0394953
0.0404342
0.0407573
0.0415568
0.0423649
0.0408676
0.0383572
0.0377146
0.0394405
0.0405227
0.0393086
0.038143
0.0378811
0.0377224
0.0374202
0.0372737
0.0374559
0.0378051
0.0379533
0.0376724
0.0371002
0.0354855
0.0321732
0.0306978
0.0331244
0.0369374
0.0392342
0.0388976
0.0362089
0.0324713
0.030959
0.0321166
0.0347734
0.0374236
0.0387019
0.03723
0.0338087
0.0364136
0.0546554
0.0507645
0.0489404
0.0525228
0.053428
0.0518542
0.0499935
0.0474361
0.0435061
0.0400648
0.0370044
0.0361652
0.03685
0.0390047
0.0422991
0.0461659
0.0502789
0.0535116
0.0537902
0.0517148
0.056296
0.0641763
0.0571275
0.0420369
0.0340755
0.0329213
0.028463
0.0210473
0.0176718
0.0258464
0.0283685
0.0282004
0.0276823
0.0277866
0.0274295
0.0266682
0.0264032
0.0272708
0.0289963
0.0296657
0.0282752
0.0260001
0.0248368
0.0241823
0.0239308
0.0250191
0.028284
0.0296183
0.0296208
0.0288089
0.0280331
0.0272346
0.0258718
0.0248107
0.0243143
0.0239961
0.0238959
0.0241897
0.0247897
0.0252629
0.0255412
0.0257491
0.0261517
0.0266177
0.0268744
0.0267566
0.0262482
0.0256627
0.0249892
0.0244601
0.0240378
0.0237825
0.0235971
0.0232025
0.0232501
0.0265412
0.0289783
0.0299506
0.0301652
0.0303936
0.031909
0.0338213
0.0337243
0.0303793
0.0279774
0.027698
0.0279889
0.0280207
0.0278859
0.0277001
0.0275125
0.02763
0.0278455
0.0283351
0.0287343
0.0289207
0.0288611
0.0287451
0.0285658
0.0283515
0.0280924
0.0278718
0.0278184
0.0280693
0.0286146
0.0292209
0.0293499
0.0292784
0.0293028
0.0306462
0.033854
0.0346577
0.0317333
0.0300537
0.029908
0.030003
0.0299724
0.029961
0.030028
0.0300322
0.0297422
0.0292913
0.0289296
0.0287139
0.0285066
0.0281918
0.0278569
0.0276004
0.0275085
0.0276342
0.0279723
0.0285083
0.0290735
0.029835
0.0307232
0.031375
0.0313064
0.0305073
0.0300259
0.0300151
0.0298704
0.0297486
0.0296235
0.0298563
0.0301076
0.0303647
0.0304581
0.030299
0.02996
0.0296402
0.029498
0.0296037
0.0297534
0.0299278
0.0300496
0.0301242
0.0301098
0.0300964
0.0300209
0.0298889
0.0297672
0.0296576
0.0296681
0.0298683
0.0302695
0.0308162
0.0313097
0.0315112
0.0313682
0.031008
0.0301163
0.0298196
0.0333765
0.036011
0.0364669
0.0366908
0.0368049
0.0354192
0.0344815
0.0345143
0.0349152
0.034705
0.0343912
0.0344162
0.0342907
0.0341054
0.0342227
0.0347643
0.0354715
0.0359739
0.0361781
0.0363598
0.0365579
0.0365664
0.0364232
0.0360478
0.0354771
0.035028
0.0350556
0.0355194
0.0360168
0.0359985
0.0347837
0.0324232
0.0319033
0.032811
0.0354706
0.0355612
0.0340267
0.0351604
0.0362232
0.0348629
0.0314136
0.0289663
0.0285265
0.0298682
0.0325003
0.0348267
0.0357492
0.0354134
0.0345179
0.0339657
0.0337866
0.0335629
0.033135
0.0327121
0.0327914
0.0334292
0.0340833
0.0337529
0.0308139
0.0265126
0.0247668
0.0260938
0.0331907
0.041899
0.0418957
0.0417116
0.0417263
0.0402565
0.038273
0.0364551
0.0359353
0.0365022
0.0374195
0.0381259
0.038433
0.038491
0.0386172
0.0391056
0.0401046
0.0410093
0.0415168
0.0416219
0.0412351
0.0402311
0.0384081
0.0367938
0.0362745
0.036779
0.03764
0.0376012
0.0368069
0.0356677
0.0348011
0.0333679
0.0342158
0.0363503
0.037488
0.0373592
0.0365412
0.0356056
0.0348463
0.0335136
0.0316236
0.0299014
0.0288837
0.0284322
0.0283015
0.0280078
0.027501
0.0268828
0.0265577
0.0265161
0.0269844
0.0276263
0.0289802
0.0300401
0.0305306
0.0304519
0.0305372
0.0313436
0.0334641
0.0361735
0.0373394
0.0364139
0.0364032
0.0368253
0.0364363
0.0359504
0.0361037
0.0361359
0.0363134
0.0363636
0.0358254
0.0338957
0.0312511
0.0293261
0.0284353
0.0284328
0.0286144
0.0287024
0.0288338
0.0288753
0.0288507
0.0287464
0.0285768
0.028501
0.028773
0.0296128
0.0307201
0.0315758
0.03168
0.0312829
0.0314054
0.0329138
0.0351065
0.0375801
0.0385609
0.0389093
0.0388884
0.0385682
0.0380926
0.0374644
0.0365713
0.035814
0.0357545
0.0356168
0.03406
0.0316165
0.0291811
0.0276556
0.0262442
0.0256774
0.0249467
0.0248173
0.0246952
0.0247953
0.0250984
0.0255719
0.0264989
0.0275445
0.0291044
0.030878
0.0332728
0.0363592
0.0392375
0.0406091
0.0412164
0.0419727
0.0423689
0.0407938
0.038795
0.0380736
0.0378565
0.0377096
0.0394824
0.0403211
0.0389373
0.0379808
0.0376489
0.0370591
0.0363349
0.0360615
0.0364696
0.0372909
0.0379462
0.0378901
0.0373956
0.036776
0.03387
0.0300795
0.0303853
0.033583
0.0370882
0.0392
0.0392434
0.0377745
0.0362977
0.0362808
0.0375098
0.0386856
0.0386726
0.0360151
0.031181
0.0250513
0.0229926
0.0291788
0.0517159
0.053458
0.0508151
0.0530361
0.0534525
0.0517593
0.0496669
0.0469474
0.0428183
0.0393362
0.0362414
0.0351569
0.0360229
0.0382629
0.0415868
0.0454738
0.0496503
0.053233
0.0540998
0.0520403
0.0546276
0.0639926
0.0584227
0.041465
0.030969
0.0276891
0.023255
0.019787
0.0238836
0.0649819
0.0716612
0.0253715
0.0271669
0.0270417
0.0269967
0.0275835
0.0275665
0.0268735
0.026626
0.027731
0.0293565
0.0292642
0.0269011
0.0252273
0.024688
0.0247431
0.0254666
0.0269698
0.0291085
0.029573
0.0291224
0.0284338
0.0281653
0.0276519
0.0261702
0.0248667
0.0242914
0.0239477
0.0238332
0.0241047
0.0246471
0.0251254
0.0253878
0.0255588
0.0257934
0.0259859
0.0258893
0.0255378
0.0250256
0.0246167
0.0244524
0.0245426
0.0247299
0.0248863
0.0248608
0.0246102
0.0251473
0.0277816
0.0289528
0.0298018
0.030336
0.0312267
0.0328765
0.0342457
0.0338016
0.0304928
0.0280566
0.0276374
0.0279276
0.0280184
0.0280487
0.027992
0.0278126
0.0276401
0.0274857
0.0276997
0.0278932
0.0281468
0.0282093
0.0281587
0.0280059
0.0278636
0.0277551
0.0277382
0.0278733
0.0281926
0.0286151
0.0290215
0.0292154
0.0291705
0.0291528
0.0307757
0.0340155
0.0346362
0.0317668
0.030108
0.0298863
0.0300351
0.0300933
0.0300479
0.0301222
0.0302188
0.0300503
0.0296455
0.0292322
0.0289758
0.0287979
0.0285384
0.0282358
0.0279818
0.0278822
0.0280024
0.0283819
0.0289323
0.0296407
0.0304271
0.0310259
0.0310785
0.0306915
0.0302624
0.030026
0.0298666
0.0297644
0.0297978
0.0299997
0.0302041
0.0305516
0.0309685
0.0312447
0.0311738
0.0307488
0.0301798
0.0297212
0.0295585
0.029628
0.0297203
0.0298148
0.0298859
0.029938
0.0299527
0.0298964
0.0298523
0.0297953
0.0297831
0.0298893
0.0301267
0.0305051
0.0309265
0.0312227
0.0312482
0.0311
0.0308145
0.0300974
0.0302953
0.0343338
0.0361611
0.0369725
0.0377224
0.0374565
0.0355077
0.0343649
0.0343692
0.0349848
0.0348058
0.0342251
0.034072
0.0339393
0.0337025
0.033707
0.034112
0.034854
0.0355345
0.0358414
0.0358219
0.0358079
0.0357852
0.0355921
0.0353158
0.0350671
0.0351283
0.035439
0.035829
0.0359361
0.0349204
0.0331226
0.0323985
0.0331649
0.034851
0.0364168
0.0352879
0.0348067
0.0360172
0.0367051
0.0356047
0.0322287
0.029238
0.0282614
0.0287917
0.0307428
0.0332499
0.0350243
0.0354767
0.0350669
0.0344334
0.0339669
0.0336574
0.0335629
0.033698
0.0341241
0.0344017
0.0339329
0.0317201
0.0277272
0.025328
0.0255218
0.0296585
0.0384682
0.0432932
0.0432719
0.0437687
0.0437897
0.0422125
0.0397514
0.0371509
0.0359298
0.0361589
0.0369108
0.0375689
0.0379129
0.0379939
0.0381283
0.0385224
0.0394101
0.0403773
0.0409035
0.0408714
0.0402562
0.0390946
0.0376481
0.036591
0.036462
0.0370572
0.0375533
0.0372941
0.0364119
0.0354192
0.0342432
0.033443
0.0360953
0.0392339
0.0407215
0.0400751
0.0381329
0.0361457
0.035058
0.0338948
0.0320802
0.0303105
0.0291613
0.0286323
0.0284795
0.0281998
0.0277271
0.0271595
0.0268337
0.0268249
0.0274258
0.0280038
0.0292543
0.0300501
0.0303135
0.0302724
0.0304772
0.0313149
0.0332913
0.0355604
0.0364933
0.035792
0.0366378
0.0366666
0.0362635
0.0361263
0.0360391
0.0359473
0.0360167
0.0364646
0.0364928
0.0348798
0.0321063
0.0297882
0.0286458
0.0284531
0.0285827
0.0286164
0.0286783
0.0286824
0.028656
0.0286039
0.0285736
0.028696
0.0291648
0.0300776
0.0309841
0.0314362
0.0313256
0.0310245
0.0314732
0.0335592
0.0362991
0.0382362
0.0390769
0.0394224
0.039363
0.0391833
0.0389279
0.0384745
0.037169
0.0359236
0.0357227
0.0359327
0.0347182
0.0323991
0.0300051
0.0283402
0.0268803
0.02609
0.0253403
0.0250489
0.0249234
0.025001
0.0252775
0.0257593
0.0266305
0.0277051
0.029255
0.031119
0.0335816
0.0365746
0.0392221
0.0406623
0.0414745
0.0422459
0.0418904
0.0397436
0.0382905
0.038009
0.0378103
0.0377777
0.03941
0.0401142
0.0387504
0.0378787
0.0373678
0.0363824
0.0354615
0.035112
0.035656
0.0366824
0.0378024
0.0380397
0.0374311
0.0371465
0.0362721
0.0309696
0.0292364
0.0306434
0.0334356
0.0367999
0.0392836
0.0398843
0.0394721
0.0391947
0.0391421
0.0389261
0.0378119
0.0351142
0.0312417
0.026342
0.0231002
0.0260023
0.0421432
0.0559179
0.0526233
0.0534493
0.0535992
0.0520233
0.0498373
0.0472349
0.0435935
0.0403302
0.0376644
0.036748
0.0372603
0.0393468
0.0423633
0.0459617
0.0499257
0.0533417
0.05427
0.0523483
0.0541262
0.0632755
0.0590255
0.0410125
0.0285733
0.024209
0.0219498
0.0219909
0.0376505
0.0685237
0.071418
0.0248546
0.0258429
0.0257166
0.0260778
0.0272204
0.0277084
0.0272864
0.0271181
0.0280602
0.0295952
0.0295647
0.0273231
0.0256782
0.0256662
0.026369
0.0273576
0.0285024
0.0292527
0.029093
0.0284939
0.0281636
0.0283322
0.0280393
0.0265505
0.0249938
0.0243242
0.0239438
0.0237884
0.0239553
0.0244011
0.0248331
0.0250567
0.0251022
0.0251033
0.024973
0.0247882
0.0246023
0.0247209
0.0252019
0.0259556
0.0266781
0.0272388
0.0274697
0.0274369
0.0273513
0.0277817
0.0285444
0.0288875
0.0296952
0.0306282
0.0320765
0.0336419
0.0343464
0.0332062
0.0304875
0.0282397
0.0275266
0.0278073
0.0279393
0.0280835
0.0282774
0.0283672
0.0281509
0.0277607
0.0274914
0.0273313
0.0274183
0.027541
0.0276168
0.027704
0.0277971
0.0279863
0.028243
0.028565
0.0288476
0.0290026
0.0290711
0.0291128
0.0290502
0.0292367
0.0311046
0.0343527
0.0345073
0.0317379
0.0303795
0.0298985
0.0299401
0.0301683
0.0301535
0.0301534
0.0302972
0.0302726
0.0300039
0.0296118
0.0293143
0.0291721
0.0290622
0.0288565
0.0286629
0.0286062
0.0287766
0.0291867
0.0297515
0.0303595
0.0307912
0.030854
0.0305916
0.0302994
0.0300808
0.029929
0.0298696
0.0299933
0.0301729
0.0303451
0.0305059
0.0308632
0.0314013
0.0318962
0.0320882
0.0317916
0.0311456
0.0304243
0.02989
0.0296527
0.0296246
0.0297088
0.0297684
0.0298455
0.0298766
0.0298917
0.0299059
0.0299444
0.0300366
0.0301996
0.0304085
0.030618
0.0307655
0.0307904
0.0306914
0.030613
0.0304558
0.0301085
0.0316211
0.0351667
0.0366818
0.0379502
0.0387769
0.0378616
0.0357531
0.0342335
0.0340993
0.0350749
0.0350785
0.0342938
0.0338969
0.0337727
0.0336397
0.0335676
0.0337585
0.0342831
0.0350225
0.0355971
0.0357324
0.0355781
0.0354149
0.0353273
0.0353113
0.035393
0.0355994
0.0358094
0.0357262
0.0347674
0.0334137
0.0329194
0.0338378
0.0354514
0.0369308
0.0372662
0.0359782
0.0356768
0.0363288
0.0370161
0.0365977
0.0338214
0.0303964
0.0284944
0.0281695
0.0289653
0.0306899
0.032824
0.0344904
0.0352222
0.0353011
0.0351465
0.0348624
0.0347728
0.034686
0.0343701
0.0333153
0.0310085
0.0277689
0.0259692
0.02618
0.0291953
0.0352619
0.0421137
0.0447249
0.0452343
0.0459205
0.0457663
0.0442722
0.0417864
0.0385309
0.0361696
0.03582
0.0363452
0.0370227
0.0374585
0.0375456
0.0375822
0.0376741
0.0381039
0.0386878
0.0390451
0.0389863
0.0384425
0.0376458
0.0369272
0.0365899
0.036795
0.0371841
0.0372165
0.0367628
0.0359625
0.0350265
0.0337808
0.0341768
0.0386041
0.0429536
0.0446724
0.043487
0.0406795
0.0373721
0.0354312
0.0344493
0.0328731
0.0310778
0.0297479
0.0289968
0.0287123
0.0285512
0.0283287
0.0280619
0.0278632
0.0279389
0.0283743
0.0289943
0.029614
0.0300135
0.030077
0.0301204
0.030506
0.031529
0.0333959
0.0352304
0.0355619
0.0356537
0.03669
0.0367133
0.0362857
0.0360252
0.0354647
0.035144
0.0352478
0.0360628
0.0368311
0.0360182
0.0334687
0.0307258
0.0290822
0.028591
0.0286287
0.0286001
0.0286534
0.0286392
0.028662
0.0287575
0.0289539
0.0293131
0.0299146
0.0305797
0.0309767
0.0310827
0.0308928
0.0309044
0.0322821
0.0349616
0.0373512
0.0385021
0.0392201
0.0393893
0.0391477
0.039054
0.0392233
0.0391945
0.0380866
0.0362193
0.035672
0.0360425
0.0355665
0.0337505
0.0314882
0.0296432
0.0280646
0.0271207
0.0262499
0.0259085
0.0256288
0.0256731
0.02595
0.0264569
0.0273259
0.0284364
0.0299873
0.0319454
0.0343632
0.0370416
0.0392668
0.0406671
0.0417495
0.042093
0.0406012
0.0383744
0.0378468
0.0379112
0.0376604
0.0378566
0.0393732
0.0399695
0.0386674
0.0378279
0.0372813
0.0362732
0.0353141
0.0351047
0.035569
0.0365478
0.0377158
0.0381222
0.0374053
0.0368085
0.0374776
0.033455
0.0292159
0.0296868
0.0309337
0.0324951
0.0353242
0.0384171
0.039224
0.0391881
0.0388788
0.0382766
0.0370917
0.0351343
0.0320591
0.0265695
0.0270343
0.0319903
0.0405162
0.0554728
0.0542884
0.0540482
0.0539261
0.052605
0.0505699
0.0482199
0.045392
0.0426316
0.0407717
0.0398023
0.0405053
0.0419874
0.044377
0.047506
0.0510064
0.0539172
0.0543428
0.0524991
0.0544466
0.062809
0.0585099
0.0414053
0.0291798
0.0255476
0.0261802
0.0324286
0.0550545
0.065537
0.0705784
0.0244026
0.0244846
0.0243445
0.0249995
0.0266994
0.0277161
0.0278289
0.0279702
0.028855
0.0299273
0.0296632
0.027478
0.0260265
0.0262341
0.0272719
0.0282308
0.0288242
0.028918
0.0285041
0.0280544
0.0281604
0.0284762
0.0284063
0.0270552
0.0251961
0.0244288
0.0240101
0.0237611
0.0238025
0.0240819
0.0244004
0.0245757
0.0245561
0.0244142
0.0242719
0.0242734
0.0244793
0.024824
0.0251924
0.0256203
0.0261806
0.0269763
0.0278795
0.0284399
0.028833
0.0290615
0.0292744
0.029597
0.0303203
0.0315706
0.0328615
0.0335692
0.0334958
0.0322711
0.0306194
0.0284714
0.0273918
0.0276446
0.0277555
0.0278839
0.0282537
0.0286932
0.0289099
0.0288345
0.0283524
0.0279343
0.0276702
0.0276422
0.0278555
0.0281065
0.0284489
0.0288121
0.0291061
0.0292902
0.0293635
0.0294758
0.0295294
0.0294813
0.0295918
0.0302242
0.0323109
0.0348493
0.034483
0.0326821
0.0313281
0.0300845
0.0297297
0.0301146
0.0302604
0.030177
0.0302411
0.0303437
0.030273
0.030005
0.0296897
0.0295286
0.0294963
0.029505
0.0295025
0.0295532
0.0297542
0.0300844
0.0304351
0.0306674
0.0306639
0.0304746
0.0302841
0.0301502
0.0300092
0.0299234
0.0300353
0.0302583
0.0304646
0.0306028
0.0307078
0.03095
0.0314875
0.0322081
0.0327243
0.0328243
0.0323731
0.0315999
0.0308404
0.0302251
0.0298904
0.0297781
0.0298436
0.0298483
0.0298989
0.0299112
0.0299606
0.0300377
0.0300993
0.0301985
0.0302954
0.0304374
0.0305799
0.030684
0.0307194
0.030682
0.0305931
0.0309609
0.0334907
0.0360908
0.0375572
0.0391107
0.0395903
0.0383206
0.0361787
0.0341359
0.033709
0.035067
0.0354784
0.0346399
0.0339784
0.0338678
0.0339071
0.0339202
0.0339122
0.0340786
0.0345097
0.0350918
0.0355163
0.035712
0.0357341
0.0357132
0.0357315
0.0357665
0.0357159
0.035367
0.034491
0.0335504
0.0332278
0.0342233
0.0361042
0.0378795
0.0389704
0.0388273
0.0377035
0.0368624
0.0365864
0.037101
0.0373581
0.0358406
0.0326325
0.0297541
0.0284458
0.0282319
0.0286421
0.0296282
0.0310161
0.0324269
0.0334321
0.0338545
0.0338011
0.0334462
0.0327134
0.0313118
0.0292059
0.0271667
0.0262136
0.0272175
0.0306915
0.0358748
0.0409246
0.0445339
0.0459997
0.0468176
0.0474545
0.0472409
0.0458994
0.0438615
0.0407133
0.0370775
0.0356317
0.0357727
0.0363897
0.0369451
0.0371516
0.037124
0.037002
0.0370429
0.037193
0.0372361
0.03722
0.0370053
0.0367127
0.0365834
0.0366567
0.0368262
0.0368809
0.0366577
0.036176
0.0354383
0.0343491
0.0335235
0.035636
0.0413278
0.0458961
0.0471019
0.0455394
0.0431692
0.0395728
0.0361147
0.0350164
0.0338463
0.0322394
0.0307833
0.0297239
0.0291544
0.0289044
0.0288076
0.0288176
0.0288337
0.0290688
0.0291829
0.0295875
0.0296745
0.0297515
0.0298942
0.0301326
0.0308231
0.0320141
0.0336464
0.0349287
0.0351007
0.0356824
0.0366708
0.036808
0.0364361
0.0359378
0.0352009
0.0347844
0.0346587
0.0351315
0.0366481
0.0370114
0.0352129
0.0323321
0.0300704
0.0290078
0.0287877
0.0288615
0.0289705
0.0290245
0.0291493
0.0293568
0.0296158
0.0299898
0.0303089
0.0305981
0.0306687
0.0306378
0.0307896
0.0318089
0.0340274
0.0365533
0.0379384
0.0385615
0.0390825
0.0389352
0.0383117
0.0380957
0.0386962
0.0394983
0.0392019
0.0369307
0.035629
0.0358777
0.036208
0.0352996
0.0336044
0.0317568
0.0301546
0.0289397
0.0280533
0.027388
0.0271708
0.027108
0.0273784
0.0279614
0.0287928
0.029974
0.0315115
0.0334123
0.0355975
0.037832
0.0397141
0.0411293
0.0418233
0.0407002
0.0383525
0.0374242
0.0376933
0.03768
0.0375704
0.0379941
0.0392951
0.0398312
0.0387225
0.03788
0.037354
0.0366395
0.0359686
0.0357548
0.0360948
0.0369139
0.0378423
0.0380811
0.0373389
0.0365515
0.0377971
0.0367719
0.0305061
0.0306647
0.0318586
0.0308706
0.030567
0.0325057
0.0349928
0.0364341
0.0364264
0.0357405
0.0342654
0.0319335
0.0288121
0.0331205
0.0399929
0.0464712
0.0490034
0.0557233
0.0559513
0.0550398
0.0544737
0.0534103
0.051744
0.0498094
0.0477056
0.0457613
0.0443373
0.0438568
0.0440523
0.0452861
0.0472119
0.0498013
0.052621
0.0546526
0.0542488
0.0526396
0.055604
0.0625695
0.0573743
0.042767
0.0338247
0.0337311
0.0419307
0.0535149
0.0636222
0.0619448
0.0700651
0.0241737
0.0233529
0.0231057
0.0239184
0.0259993
0.0275283
0.0282817
0.0287893
0.0295166
0.0301013
0.029673
0.0277293
0.0262457
0.0261547
0.0270269
0.0278753
0.0283248
0.028358
0.0281555
0.0280743
0.0282936
0.0285424
0.0285928
0.0275544
0.0254451
0.0245815
0.0241723
0.0238106
0.0237002
0.0238031
0.0239652
0.0241032
0.0240832
0.0239623
0.0238931
0.0239157
0.024016
0.0239803
0.0237541
0.0235164
0.0236895
0.0243597
0.0255518
0.0267893
0.0278687
0.0286666
0.0293948
0.030015
0.0306831
0.0315137
0.0320912
0.0320246
0.0315479
0.0314927
0.0309555
0.0286682
0.0272408
0.0274369
0.027594
0.0275435
0.02783
0.0284643
0.0291547
0.029638
0.0297039
0.0295489
0.0291257
0.0290735
0.0290379
0.0292742
0.0294653
0.02953
0.0294651
0.0295093
0.0298695
0.0304986
0.030921
0.0310359
0.0313296
0.0322527
0.0340644
0.0354525
0.0351258
0.0342428
0.033046
0.0310421
0.0297741
0.0296026
0.0302512
0.0303502
0.0302131
0.0302624
0.0303445
0.0302939
0.0301102
0.0298938
0.0297984
0.0298588
0.0300119
0.0301804
0.0303466
0.030491
0.030541
0.0304469
0.0302739
0.0301484
0.030156
0.0301189
0.0299908
0.0298919
0.0299942
0.0302239
0.0304599
0.0306663
0.0307915
0.0308979
0.0312934
0.0320767
0.0328903
0.0333845
0.0334687
0.0330105
0.0322131
0.0313569
0.0306912
0.0303141
0.0300812
0.0300722
0.030099
0.0301852
0.0303105
0.0304926
0.0307993
0.0311359
0.0315342
0.0318823
0.0320842
0.0321173
0.0319519
0.0317621
0.0320209
0.0333058
0.0355007
0.0372847
0.0387116
0.0398633
0.0398198
0.0385685
0.0365362
0.0341512
0.0333287
0.0348038
0.0358538
0.0352143
0.0343443
0.0341202
0.034307
0.0345085
0.0345633
0.0345969
0.0346111
0.0347342
0.0348707
0.0351797
0.0353444
0.0353982
0.0353678
0.0351628
0.0347498
0.0341599
0.0336771
0.0336161
0.0344812
0.0363492
0.0383153
0.0398546
0.040673
0.040648
0.0398847
0.0386464
0.0374142
0.0371396
0.0375934
0.0374685
0.0355554
0.0326974
0.0304743
0.0291414
0.0284694
0.0282443
0.0283962
0.028672
0.0291081
0.0293547
0.0294452
0.0290678
0.0282954
0.0273079
0.0264356
0.0262337
0.0272862
0.0308627
0.036235
0.0414368
0.0446558
0.0461112
0.0470163
0.0479717
0.0485771
0.0484131
0.0468952
0.0450913
0.0432104
0.039135
0.0360265
0.0353545
0.0356756
0.0361781
0.0366032
0.0369203
0.0367946
0.0366476
0.0365333
0.0364951
0.0364508
0.0363866
0.0363459
0.0364263
0.0364986
0.0364958
0.0363522
0.0360348
0.0355124
0.0346699
0.0337341
0.0336723
0.0372982
0.0431666
0.0470296
0.0474304
0.0444108
0.0432817
0.0421477
0.0374287
0.0355137
0.034759
0.0335274
0.0321796
0.0310283
0.0301444
0.029562
0.029259
0.0291789
0.0291714
0.0292785
0.0294406
0.0293546
0.0296912
0.0297187
0.0300647
0.0306165
0.0315012
0.0326769
0.0339001
0.0346852
0.0350099
0.0357587
0.0365624
0.0368384
0.0366387
0.0360496
0.0352452
0.0349416
0.0345746
0.0343519
0.0357769
0.0373979
0.0368759
0.0345445
0.0319522
0.0300697
0.0292924
0.0290735
0.029164
0.0293144
0.0294622
0.029668
0.0298188
0.029976
0.0301847
0.0302321
0.0305303
0.0308504
0.0318978
0.0337379
0.0360033
0.0375532
0.038092
0.0385065
0.0389157
0.0387031
0.0380844
0.0377614
0.0382919
0.0393736
0.0400104
0.0381996
0.0357456
0.035549
0.0362775
0.036458
0.0357997
0.0344119
0.0330474
0.0317736
0.0307202
0.0302501
0.0297393
0.0297076
0.0299551
0.0304603
0.031275
0.0324121
0.0338621
0.0355838
0.0374644
0.039294
0.0406847
0.0411709
0.0398402
0.0372827
0.0368052
0.0370662
0.0372811
0.0374439
0.0375962
0.0381419
0.0391341
0.0396591
0.0389538
0.0381676
0.0376274
0.0371557
0.0367965
0.0367113
0.0370039
0.0375801
0.0380639
0.0378713
0.0370522
0.0363968
0.0378169
0.0394871
0.0331147
0.0326999
0.0354976
0.0343355
0.0306938
0.0286998
0.0285094
0.0291702
0.029772
0.0296316
0.0293924
0.0291129
0.0326294
0.0489852
0.0542885
0.0570117
0.0571045
0.0579001
0.05754
0.0562898
0.0553361
0.0543588
0.0531223
0.051693
0.0502695
0.0489255
0.0481418
0.0477678
0.0481432
0.0489365
0.0504099
0.0523578
0.0542742
0.0551342
0.0538267
0.0530837
0.0578624
0.0616128
0.05525
0.045872
0.0430974
0.0483053
0.0577347
0.0625038
0.0606359
0.0597602
0.0701868
0.0244634
0.0227969
0.0223338
0.0229406
0.0251637
0.0272019
0.028269
0.0289791
0.0296212
0.0299578
0.029476
0.0281085
0.0268194
0.0262045
0.0264379
0.0269722
0.0275379
0.0278338
0.0280551
0.0282487
0.0283951
0.0285118
0.0286385
0.0279401
0.0256932
0.0247484
0.024463
0.024038
0.0237265
0.0236683
0.0236937
0.0237295
0.0237079
0.023644
0.0235606
0.0234831
0.0233723
0.0231844
0.0229963
0.0229879
0.0230756
0.0235206
0.0241538
0.0251716
0.026288
0.0273727
0.0283281
0.0290787
0.0295655
0.029972
0.0302405
0.0304744
0.0309809
0.0316774
0.0313095
0.0286746
0.0270868
0.0272086
0.0275071
0.027388
0.0273139
0.0276339
0.0284523
0.0293511
0.0300961
0.0304549
0.0305306
0.0304568
0.0302966
0.0300911
0.0298251
0.029627
0.0294037
0.0295143
0.0301651
0.0314429
0.0324437
0.0330753
0.0335862
0.0343188
0.0351866
0.0354885
0.035294
0.03484
0.0338198
0.0323032
0.030476
0.0290772
0.0296013
0.0304473
0.0304088
0.0301723
0.0302507
0.0303405
0.0303441
0.0302613
0.0301414
0.0300614
0.03008
0.0301714
0.0302495
0.0302666
0.0302124
0.0301089
0.030023
0.0300344
0.0301235
0.0301218
0.0300119
0.0298715
0.0298951
0.0300735
0.0302503
0.0305037
0.0307171
0.0307337
0.0309713
0.0316345
0.0325497
0.033421
0.0339
0.0339809
0.0336124
0.0329785
0.0323511
0.0318482
0.0316237
0.0315423
0.0317673
0.0321987
0.0327798
0.0333965
0.0340402
0.0345359
0.0348261
0.0348547
0.034679
0.0344055
0.0342103
0.034326
0.034954
0.0361019
0.037395
0.0385236
0.0395538
0.0399816
0.0395073
0.0384538
0.0364907
0.034231
0.0330789
0.034178
0.0360789
0.0359387
0.0350183
0.0345164
0.0346576
0.0350124
0.0352436
0.0354823
0.0356213
0.0355098
0.0352286
0.0351035
0.0349232
0.0349273
0.0347249
0.0345592
0.034351
0.0342252
0.0344121
0.0351451
0.0365961
0.0383142
0.0399068
0.0410018
0.0414415
0.0414941
0.0411802
0.0402596
0.0388423
0.0377082
0.0375732
0.0381446
0.0379355
0.0362346
0.0342082
0.0326867
0.0313413
0.0301014
0.0290802
0.0284767
0.0280367
0.0277304
0.027406
0.0270857
0.0266968
0.0264347
0.0263186
0.0268585
0.0285935
0.032224
0.0369584
0.0416129
0.0448256
0.0463109
0.0471939
0.0480686
0.0485947
0.0487925
0.0473165
0.0451492
0.04469
0.0420286
0.0377629
0.0355283
0.035125
0.0353396
0.0357551
0.0361573
0.0363499
0.0365676
0.0363632
0.0363926
0.0363013
0.0362375
0.0362455
0.0361581
0.0361033
0.035913
0.0356409
0.0351945
0.0344992
0.033654
0.0331678
0.0339034
0.0375619
0.042496
0.0454247
0.0450971
0.0413667
0.0401586
0.043184
0.0398774
0.0360759
0.0353815
0.0346452
0.0336559
0.0326814
0.0317922
0.0310295
0.0305219
0.0301669
0.0300661
0.0299436
0.0301398
0.0300602
0.030471
0.0306355
0.0311803
0.0318274
0.0326795
0.0335425
0.0343046
0.0347946
0.0352136
0.035788
0.0363754
0.0367382
0.0367793
0.0363678
0.0357347
0.0353173
0.034813
0.0341877
0.034546
0.0369673
0.037829
0.0369164
0.0347852
0.03259
0.0310855
0.0301258
0.0298695
0.0297904
0.029804
0.0298791
0.0299773
0.0301566
0.0304529
0.030829
0.0314485
0.032538
0.0340958
0.0359035
0.0373408
0.0379441
0.0380721
0.0382442
0.0385789
0.038563
0.0383535
0.038306
0.0387245
0.0394818
0.0402413
0.0398022
0.0365394
0.0351851
0.0356574
0.0365175
0.0370264
0.0366761
0.0359763
0.0351992
0.0346344
0.0339187
0.0338163
0.0337408
0.0339485
0.0343404
0.0350469
0.036018
0.0371893
0.0384379
0.0395318
0.0400573
0.039703
0.0380152
0.0362293
0.035984
0.0362878
0.0366423
0.037048
0.0373298
0.0376977
0.0382046
0.0389162
0.0393466
0.0391637
0.0386935
0.0382446
0.037916
0.0377296
0.0377486
0.0379483
0.0381241
0.0379907
0.0374262
0.0365855
0.0363643
0.0386851
0.0415579
0.037023
0.0355004
0.0389466
0.0399193
0.0361213
0.0311395
0.0287086
0.0281498
0.0287156
0.0304831
0.0335755
0.0388907
0.0485481
0.056247
0.058971
0.0598123
0.0600027
0.0596605
0.0589297
0.0576354
0.056517
0.0555666
0.054594
0.0536659
0.0527314
0.0520754
0.0515699
0.0514776
0.0517135
0.0524151
0.0534879
0.054662
0.0554826
0.055068
0.0532819
0.054584
0.0609079
0.0590119
0.052874
0.0490188
0.0504916
0.055984
0.0590645
0.0569694
0.0526538
0.0597174
0.0709749
0.0256322
0.0233633
0.0222274
0.0222613
0.0242896
0.0267479
0.0278482
0.0283524
0.02892
0.0290598
0.0287867
0.0283503
0.0277908
0.0271045
0.0267327
0.0268475
0.0272779
0.027758
0.0281464
0.0283643
0.0284043
0.0284442
0.0286203
0.0281473
0.0259502
0.024807
0.0247647
0.0245247
0.0239663
0.0236858
0.0236064
0.0235448
0.0234688
0.0233914
0.0232767
0.0231611
0.0230326
0.0229575
0.0229202
0.0230706
0.0232822
0.0236265
0.0239644
0.024775
0.0259067
0.0272117
0.0283193
0.0293269
0.0299665
0.0304127
0.0307517
0.0312345
0.0317787
0.031958
0.0307495
0.028342
0.0268737
0.0268495
0.0274023
0.027427
0.0272107
0.0270612
0.0273269
0.0282164
0.0293839
0.0301246
0.0304067
0.0304643
0.0302601
0.0299772
0.0296868
0.0294671
0.0293937
0.029518
0.0299843
0.0310672
0.0322062
0.0332016
0.0339237
0.0343828
0.0346013
0.0342226
0.0338058
0.0332883
0.0326077
0.0317705
0.0306617
0.0290685
0.0285186
0.0296368
0.0306783
0.0304512
0.0301029
0.0301652
0.0302379
0.030305
0.0303544
0.030361
0.0303429
0.0303042
0.0302688
0.0302382
0.0302047
0.0301855
0.0302038
0.0302579
0.0302857
0.0302348
0.0301212
0.0300165
0.030004
0.030122
0.0302752
0.0303868
0.0303448
0.0302543
0.0305499
0.0311729
0.0318574
0.0328744
0.0337784
0.0342723
0.0344004
0.0342772
0.0341332
0.0340711
0.0341811
0.0345335
0.035026
0.0355606
0.036103
0.0365349
0.0368757
0.0370473
0.0371036
0.0370639
0.0369765
0.0369382
0.0370156
0.0372656
0.0377171
0.0382857
0.038841
0.0393229
0.0396056
0.0393643
0.0385898
0.0374914
0.0359389
0.0341904
0.0330426
0.0334581
0.0355604
0.0365482
0.035963
0.0351236
0.0348683
0.0352541
0.0356575
0.0360937
0.0365824
0.0368591
0.0369101
0.0367604
0.0365283
0.0363157
0.036221
0.0361615
0.0362683
0.036544
0.0370685
0.03781
0.0387646
0.039816
0.0407552
0.0412955
0.0414339
0.0411137
0.0406948
0.0402056
0.0394325
0.0383885
0.0378482
0.0381052
0.0388067
0.0387977
0.0378179
0.0366775
0.0358218
0.0347544
0.0335889
0.0324403
0.0313441
0.0304173
0.0295695
0.028972
0.0284619
0.0281901
0.0281421
0.0286847
0.0297609
0.0317068
0.0343599
0.0374802
0.0405234
0.0431073
0.0448704
0.04602
0.0465565
0.0465445
0.0458513
0.0446734
0.0444569
0.0445055
0.0410865
0.0370757
0.0351317
0.0347046
0.0347941
0.0348949
0.0351782
0.035339
0.0354755
0.0354819
0.0354741
0.0354082
0.0353139
0.0351506
0.0349234
0.0346074
0.0341482
0.0336057
0.0330299
0.0325647
0.032504
0.0331536
0.0352303
0.0378939
0.0391873
0.0387944
0.0375536
0.0373648
0.0416639
0.0429904
0.0370377
0.0357143
0.035346
0.0346955
0.0340164
0.0334912
0.0329993
0.032674
0.0324053
0.0322505
0.032187
0.0321595
0.0322671
0.0324549
0.0327191
0.0330743
0.0334867
0.033922
0.0343
0.0345864
0.0348191
0.0351243
0.0355105
0.0359923
0.0363686
0.0365545
0.0364684
0.0361354
0.0355838
0.0348488
0.0342211
0.0341394
0.0357142
0.0378773
0.0384225
0.037673
0.0361888
0.0348354
0.0334435
0.0327797
0.0322148
0.031901
0.0319749
0.0320511
0.0323582
0.0328132
0.0335229
0.0344611
0.0355818
0.0368264
0.0378695
0.0385178
0.0386528
0.0385127
0.0384033
0.038474
0.0385223
0.0386169
0.0388381
0.0393972
0.0400203
0.0404293
0.0405953
0.0385027
0.0353813
0.0347691
0.0356016
0.0363515
0.036906
0.0373218
0.0374493
0.0375293
0.0375264
0.0376015
0.03758
0.0377024
0.0379506
0.0382044
0.0385013
0.0386626
0.0385257
0.0381096
0.0370753
0.0356686
0.0348617
0.0349344
0.0354168
0.0360019
0.0364923
0.0368917
0.0372843
0.0376594
0.0380417
0.0383949
0.0387934
0.0389112
0.0389033
0.0387948
0.038672
0.0385829
0.0384576
0.0382702
0.0379173
0.0373994
0.0367414
0.0361199
0.0374468
0.0411448
0.0435689
0.0412038
0.0393846
0.0412845
0.0429381
0.0402904
0.0343179
0.0298754
0.0282896
0.0283551
0.030577
0.0352999
0.0412449
0.0473194
0.0525184
0.0569031
0.0589935
0.0597813
0.059843
0.0596251
0.0589426
0.058098
0.0573129
0.0566087
0.0560263
0.0555147
0.0551912
0.0549989
0.055062
0.0552625
0.0555418
0.0558507
0.0559925
0.055753
0.0542281
0.0529891
0.0584044
0.0634541
0.0551496
0.0505831
0.0497055
0.0506145
0.0519752
0.0521416
0.0503999
0.0524841
0.0639971
0.0716932
0.027387
0.0256032
0.0229782
0.0220332
0.0234725
0.0263886
0.0275032
0.0276222
0.02791
0.0278459
0.0280483
0.0279498
0.0279855
0.028009
0.0279206
0.0278313
0.0279669
0.0281159
0.0282363
0.0282689
0.0282688
0.0283707
0.0285552
0.0281664
0.0263414
0.0248184
0.0247084
0.025028
0.0244366
0.0238332
0.0236728
0.0236173
0.0235661
0.0234932
0.0234392
0.0233685
0.0233464
0.0233471
0.0234685
0.0236039
0.0238703
0.0240258
0.0243692
0.0246852
0.0251664
0.0261059
0.0271467
0.028231
0.0291277
0.029862
0.0302976
0.0305879
0.0306143
0.0302198
0.029104
0.0276269
0.0266334
0.0264378
0.0269692
0.027469
0.0274236
0.0271707
0.026896
0.0271178
0.0283723
0.0295474
0.0300982
0.0302078
0.0302548
0.030226
0.0300355
0.0300466
0.0299066
0.029977
0.0300386
0.0303013
0.0306874
0.0311314
0.0315648
0.0318982
0.0319102
0.0315968
0.0314491
0.0311856
0.0310216
0.0306509
0.029964
0.0287787
0.0281343
0.028337
0.0298322
0.031048
0.0302015
0.030016
0.0299371
0.0299007
0.0299778
0.0300558
0.0301224
0.0301606
0.0301717
0.030174
0.0301709
0.0301644
0.0301568
0.0301396
0.030095
0.0300266
0.0299547
0.0298964
0.0298771
0.0298823
0.0298604
0.0297057
0.0295945
0.0295511
0.0298293
0.0308912
0.0311884
0.0320069
0.0332987
0.0341351
0.034678
0.0349989
0.0351988
0.0354329
0.0356801
0.0359253
0.036239
0.03642
0.0366929
0.0368725
0.0370542
0.0372125
0.0373485
0.0374763
0.0376329
0.0377942
0.0379725
0.0381455
0.0383053
0.0384393
0.0385677
0.0386222
0.038503
0.037823
0.0369789
0.0361089
0.035126
0.0339951
0.0331126
0.0330584
0.0339751
0.0356768
0.0368736
0.0360191
0.0350234
0.0352735
0.0357899
0.0362607
0.0368522
0.0373025
0.0377568
0.0380256
0.0383754
0.0384169
0.038737
0.0387696
0.0390145
0.0391971
0.0394613
0.0397224
0.0400084
0.040296
0.0405384
0.0406574
0.0405545
0.0401113
0.039513
0.0390743
0.0387732
0.0383171
0.0379808
0.0382173
0.0383697
0.0396518
0.0398497
0.0391644
0.0390574
0.0389244
0.038782
0.0384009
0.0380738
0.0375197
0.0369627
0.0362215
0.0357398
0.0352648
0.0350967
0.0351141
0.0354872
0.036147
0.0370602
0.0381449
0.0393367
0.0405689
0.0416929
0.0425569
0.0430602
0.0434
0.0435748
0.043612
0.0438385
0.045011
0.0446047
0.0401304
0.0360205
0.0347203
0.0344622
0.0341475
0.03429
0.0338653
0.0341023
0.033944
0.0339283
0.0338366
0.0335783
0.0335823
0.0333169
0.0331466
0.0329416
0.0327704
0.0326591
0.0326099
0.0326755
0.0328756
0.0333051
0.033893
0.0342243
0.0346275
0.0350237
0.0361504
0.0401501
0.0444113
0.0390645
0.0359746
0.0356553
0.0351475
0.0345745
0.0343241
0.0339014
0.0339471
0.0338382
0.0337484
0.0338609
0.0335416
0.0338237
0.0336108
0.0338019
0.033815
0.0338639
0.0339012
0.0339294
0.0339708
0.0340438
0.0341779
0.0343784
0.0346469
0.0349571
0.0350958
0.0350774
0.0349081
0.0345415
0.034261
0.034069
0.0341011
0.0347208
0.0367038
0.0385615
0.0391651
0.0388284
0.0387423
0.0380789
0.0383048
0.0378362
0.0378091
0.0377402
0.037849
0.0379527
0.0382988
0.0386594
0.0390837
0.0395255
0.0398829
0.0401502
0.0402751
0.0402855
0.0401942
0.0400358
0.0399503
0.0399311
0.0401182
0.0402594
0.0404351
0.0405798
0.040661
0.0407127
0.040436
0.0368991
0.034321
0.034567
0.0350835
0.0354223
0.0352556
0.0357641
0.0355676
0.0359006
0.0359097
0.0358421
0.0359503
0.035751
0.0356031
0.0352965
0.0349103
0.034443
0.0339068
0.0336212
0.0335777
0.0337787
0.0340989
0.0345046
0.0349217
0.0354189
0.0358179
0.0361317
0.0364247
0.0366349
0.0366901
0.0369176
0.0371089
0.0372686
0.0373026
0.0373168
0.0372111
0.037107
0.0369274
0.0366922
0.0364045
0.0360732
0.0360142
0.0402355
0.0443453
0.0447218
0.0436671
0.0425839
0.0428373
0.043653
0.0425592
0.0360183
0.0305677
0.0283908
0.0278481
0.0279635
0.0296762
0.0326056
0.0367784
0.0416019
0.0470819
0.0513778
0.0546616
0.0566115
0.0574028
0.0576555
0.0576886
0.0576003
0.0574381
0.0572966
0.0571745
0.0570221
0.0570237
0.0567339
0.0566799
0.0565532
0.0563742
0.0560457
0.0554859
0.0528591
0.0545411
0.0649497
0.0647788
0.0596466
0.0570312
0.0556016
0.0555847
0.0561807
0.0572132
0.0585738
0.0626036
0.0680324
0.0718128
)
;
boundaryField
{
wand
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
|
|
0a8d07a60fb7d67563e4bb53f2197fb311f25a54
|
4ff113df2895e5909efb79d118b7bd005ab56f15
|
/ArraysMossman.cpp
|
4660b52e536cca0d7256a48e4b550e8ff6ea583c
|
[] |
no_license
|
VincentMossman/highSchool
|
8f3865fc51d57b890ae90b8418ed58279796bb21
|
d3daca035486662ea46c0cbad81ddc467f217e4a
|
refs/heads/master
| 2020-03-12T17:49:46.552660
| 2018-04-23T19:34:01
| 2018-04-23T19:34:01
| 130,745,907
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,027
|
cpp
|
ArraysMossman.cpp
|
/* Vincent Mossman
Arrays
March 11, 2013
User is prompted for filename of file containing list of 25 integers and several operations are performed.
*/
#include <iostream>
#include <iomanip>
#include <math.h>
#include <fstream>
using namespace std;
//Constants:
const int ARRAY_SIZE = 25;
const int FILENAME_SIZE = 45; /* Should be more than big enough for normal named text files */
//Prototypes:
void FillArray(int QuieriedArray[]);
int GetFileSize(char QuieriedFile[]);
void DisplayArray(int Array[]);
int ArrayMax(int Array[]);
int ArrayMin(int Array[]);
int ArraySum(int Array[]);
int SearchArray(int Array[]);
void NumberSuffix(char NumSuffix[], int Num); /* Just for fun */
void main()
{
int NumArray[ARRAY_SIZE];
char NumSuffix[2]; /* suffix for after index number, just for fun */
int SearchIndex;
cout.setf(ios::showpoint | ios::fixed);
FillArray(NumArray);
DisplayArray(NumArray);
cout << " Maximum Value: " << ArrayMax(NumArray) << endl;
cout << " Minimum Value: " << ArrayMin(NumArray) << endl;
cout << " Sum of Values: " << ArraySum(NumArray) << endl;
cout << " Average of Values: " << setprecision(2) << double(ArraySum(NumArray)) / double(ARRAY_SIZE) << endl;
SearchIndex = SearchArray(NumArray);
if (SearchIndex != -1)
{
cout << endl << " Your value was found at index " << SearchIndex << '.' << endl;
NumberSuffix(NumSuffix, (SearchIndex + 1)); // fills suffix array
cout << " In other words, it is the " << SearchIndex + 1 << NumSuffix[0] << NumSuffix[1]
<< " number in the list." << endl;
}
else
cout << endl << " Your value could not be found." << endl;
cout << endl << endl << endl;
system("pause");
}
//Pre-con: Requires a variable containing an array to be filled.
//Post-con: Fills array from location defined by user.
/*Other: If the file defined by the user contains a different amount of integers than the defined array size, the
function will notify the user and ask for a different file. Also, if the file does not exist, the function will
notify the user. */
void FillArray(int QuieriedArray[])
{
ifstream InFile;
char FileName[FILENAME_SIZE];
//Nested loop for robust file retrieving:
do
{
cout << endl << '\t' << "Please enter the name of the file: ";
cin >> FileName;
system("cls");
InFile.open(FileName);
while (InFile.fail())
{
cout << endl << '\t' << "WARNING: File '" << FileName << "' does not exist." << endl << endl;
cout << '\t' << "Please enter the name of the file: ";
cin >> FileName;
system("cls");
InFile.open(FileName);
}
system("cls");
if (GetFileSize(FileName) != ARRAY_SIZE)
{
cout << endl << '\t' << "WARNING: The number of integers (" << GetFileSize(FileName)
<< ") in this file is unsupported by" << endl << "\t\t"
<< "this program. Please choose a different file." << endl << endl;
InFile.close();
}
} while (GetFileSize(FileName) != ARRAY_SIZE);
//Retrieves and fills array:
for (int i = 0; i < ARRAY_SIZE; i++)
InFile >> QuieriedArray[i];
}
//Info: Simple function that returns the number of numbers inside a given file, simply for robustness
//Pre-con: Filename
//Post-con: Returns number of numbers
int GetFileSize(char QuieriedFile[])
{
int temp;
int num_of_nums = 0;
ifstream InFile;
InFile.open(QuieriedFile);
InFile >> temp;
while (!InFile.eof())
{
num_of_nums++;
InFile >> temp;
}
return num_of_nums;
}
//Pre-con: Array to be displayed
//Post-con: Displays array
void DisplayArray(int Array[])
{
cout << endl << "\tYour Numbers:" << endl << '\t';
for (int i = 0; i < ARRAY_SIZE; i++)
{
cout << Array[i];
if (i < (ARRAY_SIZE - 1))
cout << ", ";
if (i == 15)
cout << endl << '\t';
}
cout << endl << endl;
}
//Pre-con: Array to find maximum value of
//Post-con: Returns maximum value
int ArrayMax(int Array[])
{
int temp = Array[0]; /* since its possible for the array to contain negative numbers its better to start
with the first value of the array than zero */
for (int i = 0; i < ARRAY_SIZE; i++)
{
if (Array[i] >= temp)
temp = Array[i];
}
return temp;
}
//Pre-con: Array to find minimum value of
//Post-con: Returns minimum value
int ArrayMin(int Array[])
{
int temp = Array[0]; /* since its possible for the array to contain negative numbers its better to start
with the first value of the array than zero */
for (int i = 0; i < ARRAY_SIZE; i++)
{
if (Array[i] <= temp)
temp = Array[i];
}
return temp;
}
//Pre-con: Array to find sum of
//Post-con: Returns sum
int ArraySum(int Array[])
{
int temp = 0;
for (int i = 0; i < ARRAY_SIZE; i++)
temp += Array[i];
return temp;
}
//Pre-con: Array to search
//Post-con: Returns index value of number if it is found, if it is not found returns a -1.
/*Other: DOES NOT account for duplicate entries, so if number searched for appears more than once, it only returns
the index value of the first instance */
int SearchArray(int Array[])
{
int ValToFind;
int temp = -1; /* if no matching value is found in the loop below, temp will remain as -1 */
cout << endl << "\tEnter the value you would like to search for: ";
cin >> ValToFind;
for (int i = 0; i < ARRAY_SIZE; i++)
{
if (ValToFind == Array[i])
{
temp = i;
break;
}
}
return temp;
}
//Pre-con: 2 slot char array to fill / Number to find suffix of
//Post-con: Fills 2 slot char array with appropriate suffix
void NumberSuffix(char NumSuffix[], int Num)
{
switch (Num)
{
case 1:
case 21:
{
NumSuffix[0] = 's';
NumSuffix[1] = 't';
}
break;
case 2:
case 22:
{
NumSuffix[0] = 'n';
NumSuffix[1] = 'd';
}
break;
case 3:
case 23:
{
NumSuffix[0] = 'r';
NumSuffix[1] = 'd';
}
break;
default:
{
NumSuffix[0] = 't';
NumSuffix[1] = 'h';
}
}
}
|
44266ff9846f1327a86a2d6a51931baf5dd468a6
|
c2432fecf3cc2a9a0412fcc9ec91a21fcd539d49
|
/Paint3D-master/icosahedron_glcpp.cpp
|
1d098fd2824fad48e81508840ba42d8b2f2273cf
|
[] |
no_license
|
buichidunggithub/Computer-Graphics-Lab
|
860231099e54ae7aaaf147c73aabc2ffb34bfdd4
|
5a5f235e2e6dfbea6b25b7fbf084f50a1b7e47c3
|
refs/heads/master
| 2022-12-21T14:49:34.026477
| 2020-09-21T07:01:08
| 2020-09-21T07:01:08
| 297,242,738
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 488
|
cpp
|
icosahedron_glcpp.cpp
|
#include <GL\glew.h>
#include <GL\freeglut.h>
#include <cmath>
#include "icosahedron_gl.h"
IcosahedronGL::IcosahedronGL() : PolygonGL() {
}
IcosahedronGL::~IcosahedronGL() {
}
void IcosahedronGL::render() {
glPolygonMode(GL_FRONT, this->frontFaceMode);
glPolygonMode(GL_BACK, this->frontFaceMode);
glColor3f(this->color[0], this->color[1], this->color[2]);
glPushMatrix();
GLfloat *ptrM = glm::value_ptr(this->m);
glMultMatrixf(ptrM);
glutWireIcosahedron();
glPopMatrix();
}
|
590dcf059fcf078bce6c1c5c073a1fcb9a4ecf9c
|
92e6a6a3d89f1d241afd839a00e4f10485b87c1b
|
/Source/FinalProject/AgentController.h
|
dd51635b585e40670f5b1e9a20e9fab4e9383e5f
|
[] |
no_license
|
bexedmondson/FinalProject
|
348a1854cf9cff0aacbce4306cdf9c1dc1313b62
|
2e7425d99d42a1ed631bbf3fffc690c0626f3e57
|
refs/heads/master
| 2021-01-17T10:21:28.175445
| 2016-04-18T14:48:26
| 2016-04-18T14:48:26
| 48,063,396
| 0
| 0
| null | 2016-06-01T16:53:42
| 2015-12-15T19:09:53
|
C++
|
UTF-8
|
C++
| false
| false
| 882
|
h
|
AgentController.h
|
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Agent.h"
#include "AIController.h"
#include "AgentController.generated.h"
/**
*
*/
UCLASS()
class FINALPROJECT_API AAgentController : public AAIController
{
GENERATED_BODY()
public:
AAgentController(const FObjectInitializer& ObjectInitializer);
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick(float DeltaSeconds) override;
protected:
UWorld* World;
void GenerateAgents();
AAgent* SpawnNewAgent();
void FindGlobalBest();
FVector globalBest;
// test functions
TArray<AAgent*> GetAgentArray();
void EmptyAgentArray();
int GetNumberOfAgents();
int GetSpawnSquareSize();
void AddAgentToArray(AAgent* agent);
void RemoveAgentFromArray(AAgent* agent);
FVector GetGlobalBest();
};
|
5d621009d991cf9f71ca80fb4b9e6e1deda677df
|
d49d348f33bf1264b4a6fbc16c84a739e7a7f7e4
|
/lab12/class1.cpp
|
3ec72dbbd9727b472cb55dd3a2be612dcbdac6c9
|
[] |
no_license
|
AndreyKnot/Andrey-Tatarenko
|
d9469ad128032e9209c1e93f11d0b00f3787d10e
|
8e1c2da14d48f5cd8678866fd565c49a6dd8b84f
|
refs/heads/master
| 2020-12-28T01:48:36.781502
| 2020-06-26T12:56:55
| 2020-06-26T12:56:55
| 238,141,869
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,455
|
cpp
|
class1.cpp
|
#include "class1.h"
string Student::get_info() const
{
stringstream temp;
temp.setf(std::ios::left);
temp << setw(10) << age << setw(8) << number_stud << setw(16) << middle_mark << setw(9)
<< name << setw(7) << debt << setw(14) << prog_d;
return temp.str();
}
int Student::get_numb() const
{
return number_stud;
}
stringstream Student::get_str() const
{
stringstream temp;
temp << " " << age << " " << number_stud << " " << middle_mark << " "
<< name << " " << debt << " " << prog_d;
return temp;
}
ostream& operator<< (ostream& output, const Student& other)
{
output << other.get_info();
return output;
}
bool Student::operator==(const int ns) const
{
return this->number_stud == ns;
}
Student::Student(int a, int n, int m, string na, bool d, int pd) : age(a), number_stud(n), middle_mark(m), name(na), debt(d), prog_d(pd)
{
//cout << "\nВызвался конструктор с параметрами";
}
Student::Student() : age(0), number_stud(0), middle_mark(0), name("Name"), debt(0), prog_d(0)
{
//cout << "\nВызвался конструктор по умолчанию.";
}
Student::Student(const Student& other) : age(other.age), number_stud(other.number_stud), middle_mark(other.middle_mark), name(other.name), debt(other.debt), prog_d(other.prog_d)
{
//cout << "\nВызвался конструктор копирования.";
}
Student::~Student()
{
//cout << "\nВызвался деструктор";
}
|
c764c65aa657fb14778974ce751960903c03128e
|
75fc5b7b4ecb02d5954473bbee225410ca4138cd
|
/src/shaderman.cpp
|
3729c9244cb59b0875beb07478c3bb1762906823
|
[] |
no_license
|
ngeorge337/Danimator
|
a10d08a51745fe90a6a8002a78c804936463473c
|
ae5ac016a02fe2a414520dece749b2e50d51167b
|
refs/heads/master
| 2021-01-01T19:21:47.033924
| 2017-07-29T02:50:01
| 2017-07-29T02:50:01
| 98,568,341
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,217
|
cpp
|
shaderman.cpp
|
#include "libs.h"
#include "util.h"
#include "static.h"
#include "file.h"
#include "configfile.h"
#include "ccmd.h"
#include "cvar.h"
#include "console.h"
#include "token.h"
#include "strmanip.h"
#include "resrcman.h"
#include "shaderman.h"
void ShaderManager::UnloadAll()
{
shadermap.clear();
}
void ShaderManager::ReloadAll()
{
for(auto it = shadermap.begin(); it != shadermap.end(); ++it)
{
Reload(it->first);
}
}
void ShaderManager::Unload( std::string fileName )
{
shadermap.erase(fileName);
}
void ShaderManager::Reload( std::string fileName )
{
Unload(fileName);
Precache(fileName);
}
bool ShaderManager::Precache( std::string fileName )
{
std::string origname = fileName;
if(shadermap.find(fileName) != shadermap.end())
return true;
if(!HasDirectory(fileName))
fileName = m_searchDirs.front() + fileName;
std::shared_ptr<sf::Shader> t(new sf::Shader);
if(!t->loadFromFile(fileName, DetermineType(fileName)))
{
Console->LogMessage("Could not load Shader '%s'", fileName);
return false;
}
Resource_t<sf::Shader> resrc;
resrc.ptr = t;
resrc.file_name = GetStringFilename(fileName);
resrc.file_dir = GetStringDirectory(fileName);
this->shadermap.insert(std::pair<std::string, Resource_t<sf::Shader>>(origname, resrc));
return true;
}
bool ShaderManager::Precache(std::string vertexShader, std::string fragmentShader)
{
std::string origname = vertexShader;
std::string origname2 = fragmentShader;
if(shadermap.find(vertexShader) != shadermap.end() && shadermap.find(fragmentShader) != shadermap.end())
return true;
if(!HasDirectory(vertexShader))
vertexShader = m_searchDirs.front() + vertexShader;
if(!HasDirectory(fragmentShader))
fragmentShader = m_searchDirs.front() + fragmentShader;
std::shared_ptr<sf::Shader> t(new sf::Shader);
if(!t->loadFromFile(vertexShader, fragmentShader))
{
Console->LogMessage("Could not load Shader pair '%s' and '%s'", vertexShader, fragmentShader);
return false;
}
std::string realname = vertexShader + ", " + fragmentShader;
Resource_t<sf::Shader> resrc;
resrc.ptr = t;
resrc.file_name = GetStringFilename(vertexShader) + ", " + GetStringFilename(fragmentShader);
resrc.file_dir = GetStringDirectory(vertexShader);
this->shadermap.insert(std::pair<std::string, Resource_t<sf::Shader>>(realname, resrc));
return true;
}
std::shared_ptr<sf::Shader> ShaderManager::GetShader(std::string name)
{
if(shadermap.find(name) == shadermap.end())
if(!Precache(name))
return nullptr;
return shadermap[name].ptr;
}
std::shared_ptr<sf::Shader> ShaderManager::GetShaderSet(std::string vertexShader, std::string fragmentShader)
{
std::string realname = vertexShader + ", " + fragmentShader;
if(shadermap.find(realname) == shadermap.end())
if(!Precache(vertexShader, fragmentShader))
return nullptr;
return shadermap[realname].ptr;
}
sf::Shader::Type ShaderManager::DetermineType( std::string filename )
{
std::string ext = GetStringExtension(filename);
if(CompNoCase(ext, ".vert"))
return sf::Shader::Vertex;
else if(CompNoCase(ext, ".frag"))
return sf::Shader::Fragment;
else
{
Console->LogMessage("Unable to determine shader type in '%s'", filename);
return sf::Shader::Fragment;
}
}
|
3c4f68b26ba946dc8edd65dace996c4c8e23e09a
|
4577107bc37a84954c28405fd8e3d49c57874806
|
/core/core_sub_thread.h
|
bca683e94ebc616146180946b6cbfa3332883607
|
[] |
no_license
|
kenlist/dht-fetcher
|
6fa1fa94a772b15236ced8f25d2368532f335f17
|
14296ae5f12c0a7bf95a081cac91f0db519be373
|
refs/heads/master
| 2021-01-01T17:16:04.712363
| 2014-07-18T03:11:15
| 2014-07-18T03:11:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 626
|
h
|
core_sub_thread.h
|
#ifndef DHTFETCHER_CORE_CORE_SUB_THREAD_H_
#define DHTFETCHER_CORE_CORE_SUB_THREAD_H_
#include "base/basictypes.h"
#include "thread/core_thread_impl.h"
class NotificationService;
class CoreSubThread : public CoreThreadImpl {
public:
explicit CoreSubThread(CoreThread::ID identifier);
virtual ~CoreSubThread();
protected:
virtual void Init() OVERRIDE;
virtual void CleanUp() OVERRIDE;
private:
// These methods encapsulate cleanup that needs to happen on the IO thread
// before we call the embedder's CleanUp function.
void IOThreadPreCleanUp();
DISALLOW_COPY_AND_ASSIGN(CoreSubThread);
};
#endif
|
3c0f58422967595ee0078009608bd411d48422a7
|
30dba492e0b01acb893d12093c8032bdd8ac7fa1
|
/src/device_driver/MT9V034.cpp
|
4f210e81cc417dc1197149eddcee3bcdf7187840
|
[] |
no_license
|
danlee1213/Intelligent_Racing_Project
|
ad5f4733530f44adca4a860ffa3515b033f9ee89
|
329084cfcd26b3455cad0ff18382cc66278bc9d4
|
refs/heads/main
| 2023-04-25T10:51:39.693857
| 2021-05-10T08:03:22
| 2021-05-10T08:03:22
| 352,883,068
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 14,123
|
cpp
|
MT9V034.cpp
|
/*
* MT9V034.cpp
*
* Created on: Sep 15, 2018
* Author: LeeChunHei
*/
#include "device_driver/MT9V034.h"
#include "driver/soft_i2c_master.h"
#include "driver/hard_i2c_master.h"
#include <assert.h>
#ifdef MT9V034_USED
namespace DeviceDriver
{
__attribute__((section("NonCacheable,\"aw\",%nobits @"))) static uint8_t frame_buffer[4][360960] __attribute__((aligned(64)));
const System::Pinout::Name mt9v034_pins[MT9V034_USED * 15] = MT9V034_PINS;
const Driver::I2CMaster::Config MT9V034::GetI2CConfig(System::Pinout::Name sck, System::Pinout::Name sda)
{
Driver::I2CMaster::Config config;
config.scl = sck;
config.sda = sda;
config.send_wait_time = 200000;
config.recieve_wait_time = 200000;
config.debug_enable = true;
config.baud_rate_Hz = 100000;
return config;
}
const Driver::Csi::Config MT9V034::GetCsiConfig(const MT9V034::Config &camera_config)
{
assert(MT9V034_DATABUS == 8 || MT9V034_DATABUS == 10 || MT9V034_DATABUS == 16);
Driver::Csi::Config config;
#if MT9V034_DATABUS == 10
config.pin_list.data0 = mt9v034_pins[camera_config.id * 15 + 5];
config.pin_list.data1 = mt9v034_pins[camera_config.id * 15 + 6];
#endif
config.pin_list.data2 = mt9v034_pins[camera_config.id * 15 + 7];
config.pin_list.data3 = mt9v034_pins[camera_config.id * 15 + 8];
config.pin_list.data4 = mt9v034_pins[camera_config.id * 15 + 9];
config.pin_list.data5 = mt9v034_pins[camera_config.id * 15 + 10];
config.pin_list.data6 = mt9v034_pins[camera_config.id * 15 + 11];
config.pin_list.data7 = mt9v034_pins[camera_config.id * 15 + 12];
config.pin_list.data8 = mt9v034_pins[camera_config.id * 15 + 13];
config.pin_list.data9 = mt9v034_pins[camera_config.id * 15 + 14];
config.pin_list.pclk = mt9v034_pins[camera_config.id * 15 + 4];
config.pin_list.vsync = mt9v034_pins[camera_config.id * 15 + 2];
config.pin_list.hsync = mt9v034_pins[camera_config.id * 15 + 3];
config.is_10_bit_data = (MT9V034_DATABUS == 10);
config.bytes_per_pixel = MT9V034_DATABUS == 8 ? 1 : 2;
config.data_bus = Driver::Csi::Config::DataBus::k8Bit;
volatile uint16_t width = camera_config.width >> 3;
config.width = width << 3;
config.height = camera_config.height;
config.work_mode = Driver::Csi::Config::WorkMode::kGatedClockMode;
config.line_pitch_bytes = config.width * config.bytes_per_pixel;
config.vsync_active_low = false;
return config;
}
void MT9V034::RegSet(uint8_t reg_addr, uint16_t value, bool check)
{
do
{
assert(i2c_master->SendByte(0xB8 >> 1, (uint8_t)reg_addr, value >> 8));
assert(i2c_master->SendByte(0xB8 >> 1, (uint8_t)0xF0, value & 0xFF));
} while (check && RegGet(reg_addr)!=value);
}
uint16_t MT9V034::RegGet(uint8_t reg_addr){
uint8_t out_byte_high, out_byte_low;
uint16_t result;
assert(i2c_master->GetByte(0xB8 >> 1, (uint8_t)reg_addr, out_byte_high));
assert(i2c_master->GetByte(0xB8 >> 1, (uint8_t)0xF0, out_byte_low));
result = out_byte_high;
result <<= 8;
result += out_byte_low;
return result;
}
MT9V034::MT9V034(const Config &config) : csi(GetCsiConfig(config)), width((config.width >> 3) << 3), height(config.height)
{
if (config.i2c_master)
{
i2c_master = config.i2c_master;
}
else
{
System::Pinout::Config scl_config, sda_config;
uint8_t scl_module, sda_module;
scl_config.pin = mt9v034_pins[config.id * 15 + 1];
sda_config.pin = mt9v034_pins[config.id * 15];
Driver::I2CMaster::Config i2c_config = GetI2CConfig(scl_config.pin, sda_config.pin);
if (!System::Pinout::GetI2CSclPinConfig(scl_config, scl_module) || !System::Pinout::GetI2CSdaPinConfig(sda_config, sda_module) || (scl_module != sda_module))
{
i2c_master = new Driver::SoftI2CMaster(i2c_config);
}
else
{
i2c_master = new Driver::HardI2CMaster(i2c_config);
}
}
RegSet(0xFE, 0xBEEF, false);
assert(RegGet(0x00) == 0x1324);
//Reset control circuit
RegSet(0x0C, 1, false);
RegSet(0x0C, 0, false);
//Load
RegSet(0x01, 0x0001,false); //COL_WINDOW_START_CONTEXTA_REG
RegSet(0x02, 0x0004,false); //ROW_WINDOW_START_CONTEXTA_REG
RegSet(0x03, 0x01E0,false); //ROW_WINDOW_SIZE_CONTEXTA_REG
RegSet(0x04, 0x02F0,false); //COL_WINDOW_SIZE_CONTEXTA_REG
RegSet(0x05, 0x005E,false); //HORZ_BLANK_CONTEXTA_REG
RegSet(0x06, 0x002D,false); //VERT_BLANK_CONTEXTA_REG
RegSet(0x07, 0x0188,false); //CONTROL_MODE_REG
RegSet(0x08, 0x01BB,false); //COARSE_SHUTTER_WIDTH_1_CONTEXTA
RegSet(0x09, 0x01D9,false); //COARSE_SHUTTER_WIDTH_2_CONTEXTA
RegSet(0x0A, 0x0164,false); //SHUTTER_WIDTH_CONTROL_CONTEXTA
RegSet(0x0B, 0x0000,false); //COARSE_SHUTTER_WIDTH_TOTAL_CONTEXTA
RegSet(0x0C, 0x0000,false); //RESET_REG
RegSet(0x0D, 0x0300,false); //READ_MODE_REG
RegSet(0x0E, 0x0000,false); //READ_MODE2_REG
RegSet(0x0F, 0x0000,false); //PIXEL_OPERATION_MODE
RegSet(0x10, 0x0040,false); //RAMP_START_DELAY
RegSet(0x11, 0x8042,false); //OFFSET_CONTROL
RegSet(0x12, 0x0022,false); //AMP_RESET_BAR_CONTROL
RegSet(0x13, 0x2D2E,false); //5T_PIXEL_RESET_CONTROL
RegSet(0x14, 0x0E02,false); //4T_PIXEL_RESET_CONTROL
RegSet(0x15, 0x0E32,false); //TX_CONTROL
RegSet(0x16, 0x2802,false); //5T_PIXEL_SHS_CONTROL
RegSet(0x17, 0x3E38,false); //4T_PIXEL_SHS_CONTROL
RegSet(0x18, 0x3E38,false); //5T_PIXEL_SHR_CONTROL
RegSet(0x19, 0x2802,false); //4T_PIXEL_SHR_CONTROL
RegSet(0x1A, 0x0428,false); //COMPARATOR_RESET_CONTROL
RegSet(0x1B, 0x0000,false); //LED_OUT_CONTROL
RegSet(0x1C, 0x0302,false); //DATA_COMPRESSION
RegSet(0x1D, 0x0040,false); //ANALOG_TEST_CONTROL
RegSet(0x1E, 0x0000,false); //SRAM_TEST_DATA_ODD
RegSet(0x1F, 0x0000,false); //SRAM_TEST_DATA_EVEN
RegSet(0x20, 0x03C7,false); //BOOST_ROW_EN
RegSet(0x21, 0x0020,false); //I_VLN_CONTROL
RegSet(0x22, 0x0020,false); //I_VLN_AMP_CONTROL
RegSet(0x23, 0x0010,false); //I_VLN_CMP_CONTROL
RegSet(0x24, 0x001B,false); //I_OFFSET_CONTROL
RegSet(0x26, 0x0004,false); //I_VLN_VREF_ADC_CONTROL
RegSet(0x27, 0x000C,false); //I_VLN_STEP_CONTROL
RegSet(0x28, 0x0010,false); //I_VLN_BUF_CONTROL
RegSet(0x29, 0x0010,false); //I_MASTER_CONTROL
RegSet(0x2A, 0x0020,false); //I_VLN_AMP_60MHZ_CONTROL
RegSet(0x2B, 0x0004,false); //VREF_AMP_CONTROL
RegSet(0x2C, 0x0004,false); //VREF_ADC_CONTROL
RegSet(0x2D, 0x0004,false); //VBOOST_CONTROL
RegSet(0x2E, 0x0007,false); //V_HI_CONTROL
RegSet(0x2F, 0x0003,false); //V_LO_CONTROL
RegSet(0x30, 0x0003,false); //V_AMP_CAS_CONTROL
RegSet(0x31, 0x0027,false); //V1_CONTROL_CONTEXTA
RegSet(0x32, 0x001A,false); //V2_CONTROL_CONTEXTA
RegSet(0x33, 0x0005,false); //V3_CONTROL_CONTEXTA
RegSet(0x34, 0x0003,false); //V4_CONTROL_CONTEXTA
RegSet(0x35, 0x0010,false); //GLOBAL_GAIN_CONTEXTA_REG
RegSet(0x36, 0x8010,false); //GLOBAL_GAIN_CONTEXTB_REG
RegSet(0x37, 0x0000,false); //VOLTAGE_CONTROL
RegSet(0x38, 0x0000,false); //IDAC_VOLTAGE_MONITOR
RegSet(0x39, 0x0027,false); //V1_CONTROL_CONTEXTB
RegSet(0x3A, 0x0026,false); //V2_CONTROL_CONTEXTB
RegSet(0x3B, 0x0005,false); //V3_CONTROL_CONTEXTB
RegSet(0x3C, 0x0003,false); //V4_CONTROL_CONTEXTB
RegSet(0x40, 0x0080,false); //DARK_AVG_THRESHOLDS
RegSet(0x46, 0x231D,false); //CALIB_CONTROL_REG (AUTO)
RegSet(0x47, 0x0080,false); //STEP_SIZE_AVG_MODE
RegSet(0x48, 0x0020,false); //ROW_NOISE_CONTROL
RegSet(0x4C, 0x0002,false); //NOISE_CONSTANT
RegSet(0x60, 0x0000,false); //PIXCLK_CONTROL
RegSet(0x67, 0x0000,false); //TEST_DATA
RegSet(0x6C, 0x0000,false); //TILE_X0_Y0
RegSet(0x70, 0x0000,false); //TILE_X1_Y0
RegSet(0x71, 0x002A,false); //TILE_X2_Y0
RegSet(0x72, 0x0000,false); //TILE_X3_Y0
RegSet(0x7F, 0x0000,false); //TILE_X4_Y0
RegSet(0x99, 0x0000,false); //TILE_X0_Y1
RegSet(0x9A, 0x0096,false); //TILE_X1_Y1
RegSet(0x9B, 0x012C,false); //TILE_X2_Y1
RegSet(0x9C, 0x01C2,false); //TILE_X3_Y1
RegSet(0x9D, 0x0258,false); //TILE_X4_Y1
RegSet(0x9E, 0x02F0,false); //TILE_X0_Y2
RegSet(0x9F, 0x0000,false); //TILE_X1_Y2
RegSet(0xA0, 0x0060,false); //TILE_X2_Y2
RegSet(0xA1, 0x00C0,false); //TILE_X3_Y2
RegSet(0xA2, 0x0120,false); //TILE_X4_Y2
RegSet(0xA3, 0x0180,false); //TILE_X0_Y3
RegSet(0xA4, 0x01E0,false); //TILE_X1_Y3
RegSet(0xA5, 0x003A,false); //TILE_X2_Y3
RegSet(0xA6, 0x0002,false); //TILE_X3_Y3
RegSet(0xA8, 0x0000,false); //TILE_X4_Y3
RegSet(0xA9, 0x0002,false); //TILE_X0_Y4
RegSet(0xAA, 0x0002,false); //TILE_X1_Y4
RegSet(0xAB, 0x0040,false); //TILE_X2_Y4
RegSet(0xAC, 0x0001,false); //TILE_X3_Y4
RegSet(0xAD, 0x01E0,false); //TILE_X4_Y4
RegSet(0xAE, 0x0014,false); //X0_SLASH5
RegSet(0xAF, 0x0000,false); //X1_SLASH5
RegSet(0xB0, 0xABE0,false); //X2_SLASH5
RegSet(0xB1, 0x0002,false); //X3_SLASH5
RegSet(0xB2, 0x0010,false); //X4_SLASH5
RegSet(0xB3, 0x0010,false); //X5_SLASH5
RegSet(0xB4, 0x0000,false); //Y0_SLASH5
RegSet(0xB5, 0x0000,false); //Y1_SLASH5
RegSet(0xB6, 0x0000,false); //Y2_SLASH5
RegSet(0xB7, 0x0000,false); //Y3_SLASH5
RegSet(0xBF, 0x0016,false); //Y4_SLASH5
RegSet(0xC0, 0x000A,false); //Y5_SLASH5
RegSet(0xC2, 0x18D0,false); //DESIRED_BIN
RegSet(0xC3, 0x007F,false); //EXP_SKIP_FRM_H
RegSet(0xC4, 0x007F,false); //EXP_LPF
RegSet(0xC5, 0x007F,false); //GAIN_SKIP_FRM
RegSet(0xC6, 0x0000,false); //GAIN_LPF_H
RegSet(0xC7, 0x4416,false); //MAX_GAIN
RegSet(0xC8, 0x4421,false); //MIN_COARSE_EXPOSURE
RegSet(0xC9, 0x0001,false); //MAX_COARSE_EXPOSURE
RegSet(0xCA, 0x0004,false); //BIN_DIFF_THRESHOLD
RegSet(0xCB, 0x01E0,false); //AUTO_BLOCK_CONTROL
RegSet(0xCC, 0x02F0,false); //PIXEL_COUNT
RegSet(0xCD, 0x005E,false); //LVDS_MASTER_CONTROL
RegSet(0xCE, 0x002D,false); //LVDS_SHFT_CLK_CONTROL
RegSet(0xCF, 0x01DE,false); //LVDS_DATA_CONTROL
RegSet(0xD0, 0x01DF,false); //LVDS_DATA_STREAM_LATENCY
RegSet(0xD1, 0x0164,false); //LVDS_INTERNAL_SYNC
RegSet(0xD2, 0x0001,false); //LVDS_USE_10BIT_PIXELS
RegSet(0xD3, 0x0000,false); //STEREO_ERROR_CONTROL
RegSet(0xD4, 0x0000,false); //INTERLACE_FIELD_VBLANK
RegSet(0xD5, 0x0104,false); //IMAGE_CAPTURE_NUM
RegSet(0xD6, 0x0000,false); //ANALOG_CONTROLS
RegSet(0xD7, 0x0000,false); //AB_PULSE_WIDTH_REG
RegSet(0xD8, 0x0000,false); //TX_PULLUP_PULSE_WIDTH_REG
RegSet(0xD9, 0x0000,false); //RST_PULLUP_PULSE_WIDTH_REG
RegSet(0xF0, 0x0000,false); //NTSC_FV_CONTROL
RegSet(0xFE, 0xBEEF,false); //NTSC_HBLANK
uint16_t data = 0;
uint16_t width = config.width;
uint16_t height = config.height;
uint16_t exposure;
if((height*4)<=480)
{
height *= 4;
data |= 2;
exposure = (config.fps > 193)? 193:((config.fps<1)?1:config.fps);
if(exposure > 132)
{
exposure = (uint16_t)(-2.0 * exposure + 504);
}
else
{
exposure = (uint16_t)(132.0 / exposure * 240);
}
}
else if((height*2)<=480)
{
height *= 2;
data |= 1;
exposure = (config.fps > 112)? 112:((config.fps<1)?1:config.fps);
if(exposure > 66)
{
exposure = (uint16_t)(-5.2 * exposure + 822);
}
else
{
exposure = (uint16_t)(66.0 / exposure * 480);
}
}
else
{
exposure = (config.fps > 60)? 60: ((config.fps<1)?1:config.fps);
exposure = (uint16_t)(60.0 / exposure * 480);
}
if((width*4)<=752 )
{
width *= 4;
data |= 2<<2;
}
else if((width*2)<=752 )
{
width *= 2;
data |= 1<<2;
}
//Row and column flip
data |= 3<<4;
RegSet(0x0D, data);
RegSet(0x04, width);
RegSet(0x03, height);
RegSet(0x01, (752-width)/2+1);
RegSet(0x02, (480-height)/2+4);
RegSet(0x0B, exposure);
//Enable anti eclipse
RegSet(0xC2, 0x18D0);
RegSet(0xAB, 0x0040);
RegSet(0xB0, width*height);
RegSet(0x1C, 0x0303);
//Reg fix
RegSet(0x13, 0x2D2E);
RegSet(0x20, 0x03C7);
RegSet(0x24, 0x0010);
RegSet(0x2B, 0x0003);
RegSet(0x2F, 0x0003);
//Coarse shutter image width control
RegSet(0x0A, 0x0164);
RegSet(0x32, 0x001A);
RegSet(0x0F, 0x0103);
RegSet(0xA5, 60);
RegSet(0x35, 0x8010);
//AEC AGC
uint8_t af_value = ((config.enable_AGC & 1) << 1) | (config.enable_AEC & 1) | 0;
RegSet(0xAF, (af_value << 8) | af_value | 0);
switch (config.hdr_mode)
{
case Config::HDR::kDisable:
RegSet(0x08, 0x01BB);
RegSet(0x09, 0x01D9);
RegSet(0x0A, 0x0164);
if(RegGet(0x0B)>0x01E0)
RegSet(0x0B, 0x01E0);
RegSet(0x0F, 0x0100);
RegSet(0x35, 0x0010);
break;
case Config::HDR::k80dB:
RegSet(0x0A, 0x0164);
if(RegGet(0x0B)>0x03E8)
RegSet(0x0B, 0x03E8);
RegSet(0x0F, 0x0103);
RegSet(0x35, 0x8010);
break;
case Config::HDR::k100dB:
RegSet(0x0A, 0x0164);
if(RegGet(0x0B)>0x03E8)
RegSet(0x0B, 0x03E8);
RegSet(0x0F, 0x0103);
RegSet(0x35, 0x8010);
break;
default:
break;
}
RegSet(0x70, 0x0303); //ROW_NOISE_CONTROL
//Reset
RegSet(0x0C, 0x03, false);
//Lock all register
RegSet(0xFE, 0xDEAD, false);
csi.ConfigTransferBuffer(0, (uint32_t)frame_buffer[0]);
csi.ConfigTransferBuffer(1, (uint32_t)frame_buffer[1]);
waiting_buffer_addr = (uint32_t)frame_buffer[2];
ready_buffer_addr = (uint32_t)frame_buffer[3];
transferred =false;
csi.SetListener([&](Driver::Csi *csi_ptr) {
uint8_t state = csi_ptr->IsTransferComplete();
if(state&1){
volatile uint32_t temp = waiting_buffer_addr;
waiting_buffer_addr = csi_ptr->GetTransferBuffer(0);
csi_ptr->ConfigTransferBuffer(0, temp);
}
if(state&2){
volatile uint32_t temp = waiting_buffer_addr;
waiting_buffer_addr = csi_ptr->GetTransferBuffer(1);
csi_ptr->ConfigTransferBuffer(1, temp);
}
transferred=true;
},5);
}
void MT9V034::Start()
{
is_started = true;
csi.Start();
}
void MT9V034::Stop()
{
is_started = false;
csi.Stop();
}
} // namespace DeviceDriver
#endif
|
3db516c6afd3cc675b9efb584254894cdad5db9e
|
91eaf3f580d2d700266203c37375c91a9575fcca
|
/Shapes-by-point.cpp
|
bd65286a663373663c9fa6b16a90c7c29006fa02
|
[] |
no_license
|
EishaAnwar/OOP-Tasks
|
2106627121db7724da9bf20b7658c6a5e339c8e7
|
7d65ec1eb84be07137833ed18642fe38f3568dec
|
refs/heads/master
| 2022-12-06T08:15:11.756267
| 2020-09-01T14:56:26
| 2020-09-01T14:56:26
| 213,025,122
| 1
| 3
| null | 2020-09-01T14:56:28
| 2019-10-05T15:38:57
|
C++
|
UTF-8
|
C++
| false
| false
| 2,118
|
cpp
|
Shapes-by-point.cpp
|
//This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
using namespace std;
class shape
{
protected:
double area;
double volume;
public:
virtual double cal_area()=0; //abstract area function of base class
virtual double cal_vol()=0; //abstract vol function of base class
};
class point:public shape //derive concrete point class
{
protected:
int x;
int y;
public:
point();
point(int x1, int y1);
double cal_area()
{
cout << "\narea of point called";
cout << "\nPoint x position=" << x;
cout << "\nPoint y position=" << y;
return area;
}
double cal_vol()
{
cout << "\nvolume of point called";
cout << "\nPoint x position=" << x;
cout << "\nPoint y position=" << y;
return volume;
}
};
point::point()
{
x = 0;
y = 0;
}
point::point(int x1, int y1)
{
x = x1;
y = y1;
}
class circle :public point
{
protected:
int radius;
public:
circle()
{
radius = 0;
}
circle(int r, int x1, int y1):point(x1,y1)
{
radius = r;
}
double cal_area()
{
cout << "\narea of circle called";
area = 3.14*radius*radius;
cout <<"\narea of circle is "<< area;
return area;
}
double cal_vol()
{
cout << "\nvolume of circle called";
volume = (4 * 3.14*radius*radius*radius) / 3;
cout << "\nvolume of circle is " << volume;
return volume;
}
};
class cylinder :public circle
{
protected:
int height;
public:
cylinder()
{
height = 0;
}
cylinder(int h, int r, int x1, int y1) :circle(r, x1, y1)
{
height = h;
}
double cal_area()
{
cout << "\narea of cylinder called";
area = 3.14*radius*radius*height;
cout << "\narea of cylinder is " << area;
return area;
}
double cal_vol()
{
cout << "\nvolume of cylinder called";
volume = 3.14*radius*radius*height;
cout << "\nvolume of circle is " << volume;
return volume;
}
};
int main()
{
shape *c=new point(1,0);
c->cal_area();
c->cal_vol();
point b(1, 1);
b.cal_area();
b.cal_vol();
circle d(1,2, 1);
d.cal_area();
d.cal_vol();
cylinder e(1, 1, 1, 1);
e.cal_area();
e.cal_vol();
}
|
d8787e6f85b01f60232d1226ccc5063e6a0a9aee
|
c356ad9aa464a851427a4f5eaceb0e0bde4ab351
|
/Algorithms/Lexical Analysis/Partition_Method_Minimization_DFA/src/Partition.h
|
6c3c5f6759385b2866f4030b1f46eb4f9f087f7f
|
[] |
no_license
|
jorge-luis-ibanez-canales-2019630541/Compiladores2021B
|
69582379f32defae8b4c7729a9ddea2c0205725a
|
d195ec8fc74129c8f4f9932cd1dd4deff54af108
|
refs/heads/main
| 2023-06-09T01:20:12.619880
| 2021-06-23T22:01:44
| 2021-06-23T22:01:44
| 375,504,845
| 0
| 1
| null | 2021-06-23T08:27:53
| 2021-06-09T22:31:06
|
C
|
UTF-8
|
C++
| false
| false
| 411
|
h
|
Partition.h
|
#ifndef _PARTITION_
#define _PARTITION_
#include<set>
#include<vector>
#include "../../Automaton/State.h"
#include "EquivClass.h"
using std::set;
using std::vector;
class Partition: public vector<EquivClass>{
private:
public:
Partition() {}
Partition(vector<EquivClass> classes) { this->assign(classes.begin(), classes.end()); }
void push(EquivClass E);
};
#endif
|
df4a8fbf9e710a8e66658da12283d902cca6bf9a
|
6f80725456e91d83cc22bd515a8a636460085039
|
/baekjoon/2533.cpp
|
5cc3b11d2d514bd00dcdb361b17a48a8bb81b24a
|
[] |
no_license
|
greedy0110/algorithm
|
6061c9b48d93eb70b0dda6f40128325dee534047
|
ce205f04d29a9d6d6d98060bf92aa5511eb09418
|
refs/heads/master
| 2023-09-04T16:06:33.552642
| 2021-11-10T00:59:39
| 2021-11-10T00:59:39
| 279,033,190
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,810
|
cpp
|
2533.cpp
|
//
// Created by 신승민 on 2021/09/15.
//
#include <bits/stdc++.h>
using namespace std;
#define RP(i, X) for (int i=0; i<((X)); i++)
#define all(X) begin((X)), end((X))
#define endl '\n'
#define custom_pq(X) priority_queue<X, vector<X>, X>
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef long long ll;
int n;
vvi g, children;
vvi cache;
int SNS(int cur, int pick_parent) {
int &cac = cache[cur][pick_parent];
if (cac != -1) return cac;
// 부모가 선택 되었다면? cur은 선택하지 못한다.
// 부모가 선택 안되었다면? cur을 선택하거나, 선택하지 않을 수 있다.
// 자식을 선택한 경우.
int notpick = 1e9, pick = 1;
for (int child: children[cur]) {
pick += SNS(child, 1);
}
if (pick_parent == 1) {
// 부모가 선택되어있으면, 자식은 선택할 수 없다.
notpick = 0;
for (int child: children[cur]) {
notpick += SNS(child, 0);
}
}
return cac = min(notpick, pick);
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin >> n;
g = vvi(n + 1);
children = vvi(n + 1);
cache = vvi(n + 1, vi(2, -1));
RP(_, n - 1) {
int u, v;
cin >> u >> v;
g[u].push_back(v);
g[v].push_back(u);
}
// 1을 root로 해서 트리를 형성한다. bfs!
vb visited(n + 1, false);
queue<int> q;
visited[1] = true;
q.push(1);
while (!q.empty()) {
int cur = q.front();
q.pop();
for (int v : g[cur]) {
if (visited[v]) continue;
children[cur].push_back(v);
visited[v] = true;
q.push(v);
}
}
cout << SNS(1, 1) << endl;
return 0;
}
|
eb9042e9c99deac2116f32e5a1ed1271681f0bd0
|
a52f9f1165a97a161e371e5d2c72fdd61593341f
|
/external/pcl/include/pcl/PSFFit.h
|
a4b8e762a1fe4ef19b881a82c818290981d99b33
|
[
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"Zlib",
"MIT"
] |
permissive
|
AstrocatApp/AstrocatApp
|
3c27d7b1c1413dbc531f8ed973da3d3d525f59ff
|
0b3b33861260ed495bfcbd4c8601ab82ad247d37
|
refs/heads/master
| 2023-08-12T01:07:57.961008
| 2021-05-25T05:15:24
| 2021-05-25T05:15:24
| 335,548,027
| 2
| 1
|
MIT
| 2021-10-07T05:15:50
| 2021-02-03T07:53:32
|
C++
|
UTF-8
|
C++
| false
| false
| 17,223
|
h
|
PSFFit.h
|
// ____ ______ __
// / __ \ / ____// /
// / /_/ // / / /
// / ____// /___ / /___ PixInsight Class Library
// /_/ \____//_____/ PCL 2.4.7
// ----------------------------------------------------------------------------
// pcl/PSFFit.h - Released 2020-12-17T15:46:29Z
// ----------------------------------------------------------------------------
// This file is part of the PixInsight Class Library (PCL).
// PCL is a multiplatform C++ framework for development of PixInsight modules.
//
// Copyright (c) 2003-2020 Pleiades Astrophoto S.L. All Rights Reserved.
//
// Redistribution and use in both source and binary forms, with or without
// modification, is permitted provided that the following conditions are met:
//
// 1. All redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. All redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names
// of their contributors, may be used to endorse or promote products derived
// from this software without specific prior written permission. For written
// permission, please contact info@pixinsight.com.
//
// 4. All products derived from this software, in any form whatsoever, must
// reproduce the following acknowledgment in the end-user documentation
// and/or other materials provided with the product:
//
// "This product is based on software from the PixInsight project, developed
// by Pleiades Astrophoto and its contributors (https://pixinsight.com/)."
//
// Alternatively, if that is where third-party acknowledgments normally
// appear, this acknowledgment must be reproduced in the product itself.
//
// THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS 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 PLEIADES ASTROPHOTO OR ITS
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS
// INTERRUPTION; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE,
// DATA OR PROFITS) 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.
// ----------------------------------------------------------------------------
#ifndef __PCL_PSFFit_h
#define __PCL_PSFFit_h
/// \file pcl/PSFFit.h
#include <pcl/Defs.h>
#include <pcl/Diagnostics.h>
#include <pcl/ImageVariant.h>
#include <pcl/Matrix.h>
#include <pcl/String.h>
namespace pcl
{
// ----------------------------------------------------------------------------
/*!
* \namespace pcl::PSFunction
* \brief Point spread function types.
*
* <table border="1" cellpadding="4" cellspacing="0">
* <tr><td>PSFunction::Invalid</td> <td>Represents an invalid or unsupported PSF type.</td></tr>
* <tr><td>ImageMode::Gaussian</td> <td>Gaussian PSF.</td></tr>
* <tr><td>ImageMode::Moffat</td> <td>Moffat PSF with a fitted beta parameter.</td></tr>
* <tr><td>ImageMode::MoffatA</td> <td>Moffat PSF with fixed beta=10 parameter.</td></tr>
* <tr><td>ImageMode::Moffat8</td> <td>Moffat PSF with fixed beta=8 parameter.</td></tr>
* <tr><td>ImageMode::Moffat6</td> <td>Moffat PSF with fixed beta=6 parameter.</td></tr>
* <tr><td>ImageMode::Moffat4</td> <td>Moffat PSF with fixed beta=4 parameter.</td></tr>
* <tr><td>ImageMode::Moffat25</td> <td>Moffat PSF with fixed beta=2.5 parameter.</td></tr>
* <tr><td>ImageMode::Moffat15</td> <td>Moffat PSF with fixed beta=1.5 parameter.</td></tr>
* <tr><td>ImageMode::Lorentzian</td> <td>Lorentzian PSF, equivalent to a Moffat PSF with fixed beta=1 parameter.</td></tr>
* <tr><td>ImageMode::VariableShape</td> <td>Variable shape PSF</td></tr>
* </table>
*/
namespace PSFunction
{
enum value_type
{
Invalid = -1, // Represents an invalid or unsupported PSF type
Gaussian = 0, // Gaussian PSF
Moffat, // Moffat PSF with a fitted beta parameter
MoffatA, // Moffat PSF with fixed beta=10
Moffat8, // Moffat PSF with fixed beta=8
Moffat6, // Moffat PSF with fixed beta=6
Moffat4, // Moffat PSF with fixed beta=4
Moffat25, // Moffat PSF with fixed beta=2.5
Moffat15, // Moffat PSF with fixed beta=1.5
Lorentzian, // Lorentzian PSF, equivalent to a Moffat PSF with fixed beta=1
VariableShape, // Variable shape PSF
NumberOfFunctions,
Default = Gaussian
};
}
// ----------------------------------------------------------------------------
/*!
* \namespace pcl::PSFFitStatus
* \brief PSF fit process results.
*
* <table border="1" cellpadding="4" cellspacing="0">
* <tr><td>PSFFitStatus::Invalid</td> <td>Represents an invalid or unsupported PSF fit status</td></tr>
* <tr><td>PSFFitStatus::NotFitted</td> <td>The PSF has not been fitted because the process has not been executed.</td></tr>
* <tr><td>PSFFitStatus::FittedOk</td> <td>PSF fitted correctly. The relative error of the solution is at most equal to the specified tolerance.</td></tr>
* <tr><td>PSFFitStatus::BadParameters</td> <td>The PSF fitting process failed because of improper input parameters.</td></tr>
* <tr><td>PSFFitStatus::NoSolution</td> <td>There is no solution with the specified parameters and source data.</td></tr>
* <tr><td>PSFFitStatus::NoConvergence</td> <td>The Levenberg-Marquadt algorithm did not find a valid solution after a prescribed maximum number of iterations.</td></tr>
* <tr><td>PSFFitStatus::InaccurateSolution</td> <td>A PSF has been fitted, but the Levenberg-Marquadt algorithm couldn't find a valid solution to the specified tolerance.</td></tr>
* <tr><td>PSFFitStatus::UnknownError</td> <td>The PSF fitting process failed for an unspecified reason.</td></tr>
* </table>
*/
namespace PSFFitStatus
{
enum value_type
{
Invalid = -1,
NotFitted = 0,
FittedOk,
BadParameters,
NoSolution,
NoConvergence,
InaccurateSolution,
UnknownError
};
}
// ----------------------------------------------------------------------------
/*!
* \class PSFData
* \brief PSF fit parameters.
*/
struct PSFData
{
/*!
* Represents a point spread function type.
*/
typedef PSFunction::value_type psf_function;
/*!
* Represents a PSF fitting process status.
*/
typedef PSFFitStatus::value_type psf_fit_status;
psf_function function = PSFunction::Invalid; //!< Point spread function type (PSFunction namespace).
bool circular = false; //!< Circular or elliptical PSF.
psf_fit_status status = PSFFitStatus::NotFitted; //!< Status code (PSFFitStatus namespace).
bool celestial = false; //!< True iff equatorial coordinates are available.
double B = 0; //!< Local background estimate in pixel value units.
double A = 0; //!< Function amplitude (or estimated maximum) in pixel value units.
DPoint c0 = 0.0; //!< Centroid position in image coordinates.
DPoint q0 = 0.0; //!< Centroid equatorial coordinates, when celestial=true.
double sx = 0; //!< Function width in pixels on the X axis, sx >= sy.
double sy = 0; //!< Function width in pixels on the Y axis, sx >= sy.
double theta = 0; //!< Rotation angle of the sx axis in degrees, in the [0,180) range.
double beta = 0; //!< Moffat beta or shape parameter (dimensionless).
double flux = 0; //!< Total flux above the local background, measured on source image pixels.
double meanSignal = 0; //!< Estimated mean signal over the fitting region.
double mad = 0; /*!< Goodness of fit estimate. A robust, normalized mean absolute difference between
the estimated PSF and the sample of source image pixels over the fitting region. */
/*!
* Default constructor.
*/
PSFData() = default;
/*!
* Copy constructor.
*/
PSFData( const PSFData& ) = default;
/*!
* Move constructor.
*/
PSFData( PSFData&& ) = default;
/*!
* Copy assignment operator. Returns a reference to this object.
*/
PSFData& operator =( const PSFData& ) = default;
/*!
* Move assignment operator. Returns a reference to this object.
*/
PSFData& operator =( PSFData&& ) = default;
/*!
* Returns true iff this object contained valid PSF fitting parameters. This
* happens (or \e should happen, under normal conditions) when the status
* data member is equal to PSFFitStatus::FittedOk.
*/
operator bool() const
{
return status == PSFFitStatus::FittedOk;
}
/*!
* Returns the name of the fitted PSF function. See the PSFunction namespace
* for supported functions.
*/
String FunctionName() const;
/*!
* Returns a string with a brief description of the current fitting status.
*/
String StatusText() const;
/*!
* Returns the full width at half maximum (FWHM) on the X axis in pixels.
*
* For an elliptic PSF, the X axis corresponds to the orientation of the
* major function axis as projected on the image.
*
* For a circular PSF, FWHMx() and FWHMy() are equivalent.
*/
double FWHMx() const
{
return FWHM( function, sx, beta );
}
/*!
* Returns the full width at half maximum (FWHM) on the Y axis in pixels.
*
* For an elliptic PSF, the Y axis corresponds to the orientation of the
* minor function axis as projected on the image.
*
* For a circular PSF, FWHMx() and FWHMy() are equivalent.
*/
double FWHMy() const
{
return FWHM( function, sy, beta );
}
/*!
* Returns the PSF bounding rectangle. The coordinates of the bounding
* rectangle \a r are calculated as follows:
*
* r.x0 = c0.x - d \n
* r.y0 = c0.y - d \n
* r.x1 = c0.x + d \n
* r.y1 = c0.y + d \n
*
* where d is equal to:
*
* FWHMx()/2 for a circular PSF, \n
* Max( FWHMx(), FWHMy() )/2 for an elliptic PSF.
*/
DRect Bounds() const
{
double d = (circular ? FWHMx() : Max( FWHMx(), FWHMy() ))/2;
return DRect( c0.x-d, c0.y-d, c0.x+d, c0.y+d );
}
/*!
* Returns true iff this object contains valid equatorial coordinates
* computed by an astrometric solution of the image for the centroid
* coordinates.
*/
bool HasCelestialCoordinates() const
{
return celestial;
}
/*!
* Returns an image representation (in 32-bit floating point format) of the
* fitted point spread function.
*/
void ToImage( Image& ) const;
/*!
* Returns the full width at half maximum (FWHM) corresponding to a
* supported function with the specified parameters.
*
* \param function The type of point spread function. See the PSFunction
* namespace for supported functions.
*
* \param sigma Estimated function width.
*
* \param beta Moffat beta or VariableShape shape parameter.
* Must be > 0.
*
* The returned value is the FWHM in sigma units, or zero if an invalid or
* unsupported function type has been specified.
*/
static double FWHM( psf_function function, double sigma, double beta = 2 )
{
PCL_PRECONDITION( beta > 0 )
switch ( function )
{
case PSFunction::Gaussian: return 2.3548200450309493 * sigma;
case PSFunction::Moffat: return 2 * sigma * Sqrt( Pow2( 1/beta ) - 1 );
case PSFunction::MoffatA: return 0.5358113941912513 * sigma;
case PSFunction::Moffat8: return 0.6016900619596693 * sigma;
case PSFunction::Moffat6: return 0.6998915581984769 * sigma;
case PSFunction::Moffat4: return 0.8699588840921645 * sigma;
case PSFunction::Moffat25: return 1.1305006161394060 * sigma;
case PSFunction::Moffat15: return 1.5328418730817597 * sigma;
case PSFunction::Lorentzian: return 2 * sigma;
case PSFunction::VariableShape: return 2 * sigma * Pow( beta*0.6931471805599453, 1/beta );
default: return 0; // ?!
}
}
};
// ----------------------------------------------------------------------------
/*!
* \class PSFFit
* \brief Numerical Point Spread Function (PSF) fit to a source in an image.
*/
class PSFFit
{
public:
/*!
* Represents a point spread function type.
*/
typedef PSFData::psf_function psf_function;
/*!
* Represents a PSF fitting process status.
*/
typedef PSFData::psf_fit_status psf_fit_status;
/*!
* Fitted PSF parameters.
*/
PSFData psf;
/*!
* Fits a point spread function to a source in the specified \a image.
*
* \param image The source image.
*
* \param center The intial search point in image coordinates. For
* consistent results, these coordinates must be the
* result of a robust object detection process.
*
* \param rect The rectangular region of the image where the
* function fitting process will take place. PSF
* parameters will be evaluated from source pixel
* values acquired exclusively from this region.
*
* \param function The point spread function type to be fitted. A
* Gaussian PSF is fitted by default.
*
* \param circular Whether to fit a circular or an elliptical PSF.
* Elliptical functions are fitted by default.
*
* \param betaMin,betaMax The range of shape parameter values when
* \a function is PSFunction::VariableShape; ignored
* for other point spread functions. When the values of these
* parameters are such that \a betaMin < \a betaMax, an optimal
* value of the beta (shape) PSF parameter will be searched for
* iteratively within the specified range. The shape parameter will be
* optimized for minimization of the absolute difference between the
* estimated PSF and the sample of source image pixels. When
* \a betaMin ≥ \a betaMax, the shape parameter will stay constant
* and equal to the specified \a betaMin value during the entire PSF
* fitting process, and the rest of PSF parameters will be estimated
* accordingly. The valid range of beta parameter values is [1.0,6.0].
* Values outside this range may lead to numerically unstable PSF
* fitting processes.
*
* The implementation of the Levenberg-Marquadt algorithm used internally by
* this function is extremely sensitive to the specified \a center and
* \a rect parameters. These starting parameters should always be
* calculated using robust procedures to achieve consistent results.
*
* In the most frequent use case, where a star detection procedure is
* typically used to obtain these starting parameters, robustness to poorly
* sampled data and resilience to outlier pixels and noise are particularly
* important to this task.
*/
PSFFit( const ImageVariant& image,
const DPoint& center, const DRect& rect,
psf_function function = PSFunction::Gaussian, bool circular = false,
double betaMin = 1.0, double betaMax = 4.0 );
/*!
* Copy constructor.
*/
PSFFit( const PSFFit& ) = default;
/*!
* Move constructor.
*/
PSFFit( PSFFit&& ) = default;
/*!
* Copy assignment opèrator. Returns a reference to this object.
*/
PSFFit& operator =( const PSFFit& x ) = default;
/*!
* Move assignment operator. Returns a reference to this object.
*/
PSFFit& operator =( PSFFit&& x ) = default;
/*!
* Returns true iff this object contains a valid PSF fit, i.e. valid PSF
* fitted parameters.
*/
operator bool() const
{
return psf;
}
private:
Matrix S; // matrix of sampled pixel data
Vector P; // vector of function parameters
mutable double m_beta;
Vector GoodnessOfFit( psf_function, bool circular ) const;
friend class PSFFitEngine;
};
// ----------------------------------------------------------------------------
} // pcl
#endif // __PCL_PSFFit_h
// ----------------------------------------------------------------------------
// EOF pcl/PSFFit.h - Released 2020-12-17T15:46:29Z
|
c0c0b70dc82ca93dcace2bdb33abe6c15b92d669
|
d93e3a6c448a1cad7fd52b3ed8de12891a7e0f01
|
/exprVal.cpp
|
e67b3793e076a13af343fc1207392df30a685f58
|
[] |
no_license
|
QuentindeA/TP_Comp
|
f8ffb4829c8fa359eb82e4c84f8425b61e75e870
|
5e31496f4bedcbead02ad0e7be3a4d118a8e715e
|
refs/heads/main
| 2023-03-09T18:52:20.496812
| 2021-02-23T16:54:52
| 2021-02-23T16:54:52
| 341,462,734
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 73
|
cpp
|
exprVal.cpp
|
#include "exprVal.h"
int ExprVal::eval()
{
return e->GetValeur();
}
|
2b7eedd20beba968da0e66b814adce46298696a8
|
0eff6819bcada5724f8b1afcc530200c48874d1a
|
/Bookkeeping.h
|
9d271be263e22839d79fda2060461508b683339e
|
[] |
no_license
|
gwenbleyd/-library_information_system
|
a4af8cee4faacacb11d3f58acb32715d9084d533
|
2890a6b4fd27c3e1c24186d3fd3aae2e2ac3d68d
|
refs/heads/master
| 2023-05-31T18:39:15.694477
| 2021-07-07T21:51:47
| 2021-07-07T21:51:47
| 306,790,124
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,424
|
h
|
Bookkeeping.h
|
#pragma once
#include <iostream>
#include <mysql/mysql.h>
#include <nana/gui/widgets/listbox.hpp>
#include "Book.h"
#include "Author.h"
#include "Adress.h"
#include "Reader.h"
#include "Librarian.h"
#define HOST "127.0.0.1"
#define USERNAME "root"
#define PASSWORD "ak260800"
#define PORT 3306
#define DB_NAME "bookkeeping"
class Bookkeeping{
private:
unsigned int port;
std::string host;
std::string username;
std::string password;
std::string schema;
MYSQL* conn;
void close();
public:
Bookkeeping(Bookkeeping &) = delete;
void operator=(const Bookkeeping &) = delete;
Bookkeeping(const std::string, const std::string, const std::string, const unsigned int, const std::string);
void connect();
std::string getHost();
std::string getUsername();
unsigned int getPort();
std::string getSchema();
void addBook(std::string&, std::string&, std::string&, std::string&, std::string&, int, nana::date::value&, nana::date::value&);
void addReader(std::string&, std::string&, std::string&, nana::date::value&, std::string&, std::string&, unsigned int, unsigned int);
void addLibrarian(std::string&, std::string&, std::string&, std::string&, std::string&, unsigned int, unsigned int);
void actBook(unsigned int, unsigned int, std::string&, bool);
nana::listbox::cat_proxy viewBooks(nana::listbox&);
nana::listbox::cat_proxy search(nana::listbox& lb, std::string&, unsigned short int);
~Bookkeeping();
};
|
1a72fe5805cbd7cb6c5713072e36d048397041e8
|
a23087bc0ce8a846cd6fab3882be9b3488ba4189
|
/bones/core/events/event_handler.cpp
|
a75ae42fb43b195248196915aed53c1a81ae1549
|
[] |
no_license
|
jvont/bones
|
d5670cab71c21139fb61704acfd671383e3c5743
|
3bcf286d5ee2ea6e0d152a565a7f7f4b2c5e1473
|
refs/heads/main
| 2023-09-04T11:47:59.089290
| 2021-10-05T22:25:32
| 2021-10-05T22:25:32
| 413,957,648
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 800
|
cpp
|
event_handler.cpp
|
#include <core/debug/log.h>
#include <core/events/event_handler.h>
namespace bones
{
EventHandler::~EventHandler()
{
if (parent != nullptr)
{
parent->remove_handler(this);
}
}
void EventHandler::add_handler(EventHandler* handler)
{
if (handler->parent == nullptr)
{
handler->parent = this;
children.insert(handler);
}
else
{
logerror << "EventHandler not added: Parent instance detected" << logendl;
}
}
void EventHandler::remove_handler(EventHandler* handler)
{
handler->parent = nullptr;
children.erase(handler);
}
void EventHandler::handle_event(const Event& event)
{
for (EventHandler* handler : children)
{
handler->handle_event(event);
}
}
}
|
c6e61808b812b8bf1e29ee5cbdc0aa29577d90eb
|
c8bd1c43245e0af3cc6c12f503a29801601f815c
|
/strassen2.cpp
|
7fdc8fdb47305fd5a20f28e8a756102b7aac62b0
|
[] |
no_license
|
Shaleengovil25/sturdy-disco
|
3d8eb5f4a9bb688cdbea45df8a467edaa01b20c6
|
4b2afcc9b525dd2a264f46c78e675bc065cadfcf
|
refs/heads/master
| 2022-12-30T08:59:07.944275
| 2020-10-01T05:23:06
| 2020-10-01T05:23:06
| 300,154,443
| 0
| 1
| null | 2020-10-05T05:22:53
| 2020-10-01T05:20:37
|
HTML
|
UTF-8
|
C++
| false
| false
| 3,376
|
cpp
|
strassen2.cpp
|
#include<stdio.h>
#include<conio.h>
#include<math.h>
int power(int);
int strassen(int *, int *, int *, int, int);
int main()
{
int i,j,k,n1,n2,n3,n,m;
/*Input first matrix*/
printf("Enter the order of the 1st Matrix (rows and columns):");
scanf("%d%d",&n1,&n2);
int A[n1][n2];
printf("\nNow enter the first matrix");
for(i=0;i<n1;i++){
printf("\nEnter the elements of the %d-th row:",i+1);
for(j=0;j<n2;j++)
scanf(" %d",&A[i][j]);
}
/*Input second matrix*/
printf("\nEnter the no. of columns of the 2nd Matrix:");
scanf("%d",&n3);
int B[n2][n3];
printf("\nNow enter the second matrix");
for(i=0;i<n2;i++){
printf("\nEnter the elements of the %d-th row:",i+1);
for(j=0;j<n3;j++)
scanf(" %d",&B[i][j]);
}
/*Creating square matrix of order 2^n for all and initializing all elements to 0 except prefixed*/
if(n1>=n2 && n1>=n3)
n=n1;
else if(n2>=n1 && n2>=n3)
n=n2;
else
n=n3;
int o=1;
while(n>power(o))
o=o+1;
m=power(o);
int a[m][m],b[m][m],C[m][m];
for(i=0;i<m;i++){
for(j=0;j<m;j++){
a[i][j]=0;
b[i][j]=0;
}
}
for(i=0;i<n1;i++)
for(j=0;j<n2;j++)
a[i][j]=A[i][j];
for(i=0;i<n2;i++)
for(j=0;j<n3;j++)
b[i][j]=B[i][j];
/*Printing first matrix*/
printf("\nThis is the first matrix:");
for(i=0;i<m;i++){
printf("\n\n\n");
for(j=0;j<m;j++)
printf("\t%d",a[i][j]);
}
/*Printing second matrix*/
printf("\n\n\nThis is the second matrix:");
for(i=0;i<m;i++){
printf("\n\n\n");
for(j=0;j<m;j++)
printf("\t%d",b[i][j]);
}
/*Initializing the multiplication Matrix:*/
for(i=0;i<m;i++)
for(j=0;j<m;j++)
C[i][j]=0;
strassen(a,b,C,m,m); //Calling the function.
/*Printing the final matrix*/
printf("\n\n\nThis is the final matrix:");
for(i=0;i<m;i++){
printf("\n\n\n");
for(j=0;j<m;j++)
printf("\t%d",C[i][j]);
}
}
int power(int n){
int i,p=1;
for(i=1;i<=n;i++)
p=2*p;
return(p);
}
int strassen(int *A, int *B, int *C, int m, int n){
if(m==2){
int P=(*A+*(A+n+1))*(*B+*(B+n+1)); //P=(A[0][0]+A[1][1])*(B[0][0]+B[1][1])
int Q=(*(A+n)+*(A+n+1))*(*B); //Q=(A[1][0]+A[1][1])*B[0][0]
int R=(*A)*(*(B+1)-*(B+n+1)); //R=A[0][0]*(B[0][1]-B[1][1])
int S=(*(A+n+1))*(*(B+n)-*B); //S=A[1][1]*(B[1][0]-B[0][0])
int T=(*A+*(A+1))*(*(B+n+1)); //T=(A[0][0]+A[0][1])*B[1][1]
int U=(*(A+n)-*A)*(*B+*(B+1)); //U=(A[1][0]-A[0][0])*(B[0][0]+B[0][1])
int V=(*(A+1)-*(A+n+1))*(*(B+n)+*(B+n+1)); //V=(A[0][1]-A[1][1])*(B[1][0]+B[1][1]);
*C=*C+P+S-T+V; //C[0][0]=P+S-T+V
*(C+1)=*(C+1)+R+T; //C[0][1]=R+T
*(C+n)=*(C+n)+Q+S; //C[1][0]=Q+S
*(C+n+1)=*(C+n+1)+P+R-Q+U; //C[1][1]=P+R-Q+U
}
else{
m=m/2;
strassen(A,B,C,m,n);
strassen(A,B+m,C+m,m,n);
strassen(A+m,B+m*n,C,m,n);
strassen(A+m,B+m*(n+1),C+m,m,n);
strassen(A+m*n,B,C+m*n,m,n);
strassen(A+m*n,B+m,C+m*(n+1),m,n);
strassen(A+m*(n+1),B+m*n,C+m*n,m,n);
strassen(A+m*(n+1),B+m*(n+1),C+m*(n+1),m,n);
}
}
|
3cf81dbe347b83e9db675df58eb8e8eb331acc3b
|
ffe7f4beff4725aa53884098d7f211c2079ab5d3
|
/AfxHookGoldSrc/mirv_output.cpp
|
48c190865fa2a0951f43a5f44ab5129573acefd1
|
[
"MIT"
] |
permissive
|
advancedfx/advancedfx
|
3135dca4431bf999ba0a15d5f856cbe31c95ac08
|
f82427d24a933f666595f02ddf033006e8ddd150
|
refs/heads/main
| 2023-09-06T01:57:25.899101
| 2023-09-01T18:15:39
| 2023-09-01T18:15:39
| 89,074,083
| 496
| 100
|
MIT
| 2023-08-19T11:57:33
| 2017-04-22T14:05:48
|
C++
|
UTF-8
|
C++
| false
| false
| 1,905
|
cpp
|
mirv_output.cpp
|
//#include "stdafx.h"
// Copyright (c) by advancedfx.org
//
// Last changes:
// 2010-01-11 dominik.matrixstorm.com
//
// First changes
// 2010-01-11 dominik.matrixstorm.com
// BEGIN HLSDK includes
#pragma push_macro("HSPRITE")
#define HSPRITE MDTHACKED_HSPRITE
//
#include <hlsdk/multiplayer/cl_dll/wrect.h>
#include <hlsdk/multiplayer/cl_dll/cl_dll.h>
//
#undef HSPRITE
#pragma pop_macro("HSPRITE")
// END HLSDK includes
// Own includes:
#include "cmdregister.h"
extern cl_enginefuncs_s* pEngfuncs;
void ListCodecs() {
HRESULT hr;
ICreateDevEnum *pSysDevEnum = NULL;
IEnumMoniker *pEnum = NULL;
IMoniker *pMoniker = NULL;
pEngfuncs->Con_Printf("Codecs:\n");
hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL,
CLSCTX_INPROC_SERVER, IID_ICreateDevEnum,
(void**)&pSysDevEnum);
if (FAILED(hr))
{
return;
}
hr = pSysDevEnum->CreateClassEnumerator(
CLSID_VideoCompressorCategory, &pEnum, 0);
if (hr == S_OK) // S_FALSE means nothing in this category.
{
while (S_OK == pEnum->Next(1, &pMoniker, NULL))
{
IPropertyBag *pPropBag = NULL;
pMoniker->BindToStorage(0, 0, IID_IPropertyBag,
(void **)&pPropBag);
VARIANT var;
VariantInit(&var);
hr = pPropBag->Read(L"FriendlyName", &var, 0);
if (SUCCEEDED(hr))
{
int ilen=WideCharToMultiByte(
CP_ACP,
0,
var.bstrVal,
-1,
NULL,
0,
NULL,
NULL
);
LPSTR str = (LPSTR)malloc(ilen);
if(0 != WideCharToMultiByte(
CP_ACP,
0,
var.bstrVal,
-1,
str,
ilen,
NULL,
NULL
))
pEngfuncs->Con_Printf("%s\n", str);
free(str);
}
VariantClear(&var);
pPropBag->Release();
pMoniker->Release();
}
}
pSysDevEnum->Release();
pEnum->Release();
}
REGISTER_DEBUGCMD_FUNC(output) {
ListCodecs();
}
|
aa0d83ec64eb84366c545dfe71930b27ab5d0a50
|
af3d0cafc723f3816c797f0b908fc5ef9c948300
|
/include/evb/readoutunit/SuperFragment.h
|
90a2c23c8b19a82320b9f763112118f8ad9c10a7
|
[] |
no_license
|
mommsen/evb
|
ff1865488b580ba0219200d881ce4c7a5f45f6a8
|
15803ee11d08091ba5d806dac45e32225f0ffcd7
|
refs/heads/master
| 2021-01-23T18:31:55.490678
| 2018-12-17T15:16:39
| 2018-12-17T15:16:39
| 9,771,450
| 0
| 0
| null | 2018-07-06T07:53:56
| 2013-04-30T13:20:53
|
C++
|
UTF-8
|
C++
| false
| false
| 1,455
|
h
|
SuperFragment.h
|
#ifndef _evb_readoutunit_SuperFragment_h_
#define _evb_readoutunit_SuperFragment_h_
#include <boost/shared_ptr.hpp>
#include <stdint.h>
#include <vector>
#include "evb/EvBid.h"
#include "evb/readoutunit/FedFragment.h"
namespace evb {
namespace readoutunit {
/**
* \ingroup xdaqApps
* \brief Represent a super-fragment
*/
class SuperFragment
{
public:
SuperFragment(const EvBid&, const std::string& subSystem);
void discardFedId(const uint16_t fedId);
bool append(const FedFragmentPtr&);
bool hasMissingFEDs() const
{ return !missingFedIds_.empty(); }
typedef std::vector<uint16_t> MissingFedIds;
MissingFedIds getMissingFedIds() const
{ return missingFedIds_; }
typedef std::vector<FedFragmentPtr> FedFragments;
const FedFragments& getFedFragments() const
{ return fedFragments_; }
EvBid getEvBid() const { return evbId_; }
uint32_t getSize() const { return size_; }
private:
const EvBid evbId_;
const std::string& subSystem_;
uint32_t size_;
MissingFedIds missingFedIds_;
FedFragments fedFragments_;
};
typedef boost::shared_ptr<SuperFragment> SuperFragmentPtr;
} //namespace readoutunit
} //namespace evb
#endif // _evb_readoutunit_SuperFragment_h_
/// emacs configuration
/// Local Variables: -
/// mode: c++ -
/// c-basic-offset: 2 -
/// indent-tabs-mode: nil -
/// End: -
|
a5fa99b8f53f1ab971cfde80af0b86540a7c5299
|
c2560f1da3847fdb915834b10e91eab6a7170909
|
/Nayda/MessagesDefinitions.h
|
e78cf766dbc9d8cfaa309c8f953aded624df0651
|
[] |
no_license
|
Mar94oK/Nayda
|
f4227ae92a417b5453e26d5a727360d04b26e1e7
|
8c22901752e4f2e29e786355329e7ad833e68a03
|
refs/heads/master
| 2021-01-17T08:51:41.061474
| 2018-12-01T14:41:20
| 2018-12-01T14:41:20
| 83,962,734
| 0
| 1
| null | 2018-12-01T14:41:21
| 2017-03-05T10:43:42
|
C++
|
UTF-8
|
C++
| false
| false
| 4,534
|
h
|
MessagesDefinitions.h
|
#ifndef PROTOBUFMESSAGESIDENTIFICATORS_H
#define PROTOBUFMESSAGESIDENTIFICATORS_H
#include <QString>
#include "gamesettings.h"
namespace MessageSystem {
}
enum class MessageSubSystems
{
CONNECTION_SUBSYSTEM = 0,
GAME_ACTIONS_SUBSYSTEM = 1,
GAME_NOTIFICATION_SUBSYSTEM = 2
};
enum class ConnectionSubSysCommandsID
{
SERVER_INPUT_QUERY_REQUEST = 0,
SERVER_INPUT_QUERY_REPLY = 1,
CLIENT_ROOM_CREATION_REQUEST = 2,
CLIENT_ROOM_CREATION_REPLY = 3,
CLIENT_CONNECTION_TO_ROOM_REQUEST = 4,
CLIENT_CONNECTION_TO_ROOM_REPLY = 5
};
enum class RoomCreationErrors
{
NO_ERRORS = 0,
NO_FREE_SLOTS_AVAILABLE = 1,
RULES_ARE_NOT_SUPPORTED = 2,
INCORRECT_SETTINGS = 3
};
struct ServerQueryReplyData
{
bool _roomCreationAllowed;
bool _connectionToRoomAllowed;
QString _serverName;
ServerQueryReplyData(bool creationAllowed, bool connectionAllowed, QString name) :
_roomCreationAllowed(creationAllowed), _connectionToRoomAllowed(connectionAllowed), _serverName(name)
{ }
};
struct ErrorType
{
bool noFreeSlots;
bool rulesAreNotSupported;
bool incorrectSettings;
};
struct ClientRoomCreationReplyData
{
bool _connectionAllowed; //check
uint32_t _slotID; //to identify the slot's number
uint32_t _freeSlotsLeft; //how many slots left
ErrorType _errors; //to identify the Error
ClientRoomCreationReplyData(bool connectionAllowed, uint32_t slotID, uint32_t freeSlotsLeft, ErrorType errors) :
_connectionAllowed(connectionAllowed), _slotID(slotID), _freeSlotsLeft(freeSlotsLeft), _errors(errors)
{ }
};
struct ClientConnectToRoomSettingsData
{
bool agreeToWait;
bool connectToAnyRoom;
ClientConnectToRoomSettingsData(bool agree, bool connectToAny) :
agreeToWait(agree), connectToAnyRoom(connectToAny)
{ }
};
struct ServerRoomReadyToConnectData
{
uint32_t roomID;
QString roomName;
uint32_t players;
uint32_t maximumNumberOfPlayers;
bool deleteUpdateFlag;
ServerRoomReadyToConnectData(uint32_t id, const QString& name, uint32_t pl, uint32_t maxNumber, bool flag):
roomID(id), roomName(name), players(pl), maximumNumberOfPlayers (maxNumber), deleteUpdateFlag(flag)
{ }
};
struct ClientConnectionToRoomReplyData
{
std::vector<ServerRoomReadyToConnectData> _rooms;
uint32_t _queryOrder;
uint32_t _querySize;
ClientConnectionToRoomReplyData(const std::vector<ServerRoomReadyToConnectData>& data,
uint32_t order, uint32_t size):
_rooms(data), _queryOrder(order), _querySize(size)
{ }
};
struct PlayerData
{
QString playerName;
uint32_t playerID;
explicit PlayerData( const QString& name, uint32_t id) :
playerName(name), playerID(id)
{}
};
struct ServerClientWantedToEnterTheRoomReplyData
{
bool entranceAllowed;
uint32_t roomID;
QString roomName;
QString masterName;
uint32_t numberOfPlayers;
uint32_t maximumNumberOfPlayers;
std::vector <PlayerData> players;
GameSettings providedSettings;
explicit ServerClientWantedToEnterTheRoomReplyData(bool allowed,
uint32_t id,
const QString& name,
const QString& mstrName,
uint32_t nmbrPlaers,
uint32_t maxPlayers,
const std::vector<PlayerData>& playersData,
GameSettings settings):
entranceAllowed(allowed), roomID(id), roomName(name), masterName(mstrName),
numberOfPlayers(nmbrPlaers), maximumNumberOfPlayers(maxPlayers),
players(playersData), providedSettings(settings)
{}
};
struct TheGameIsAboutToStartData
{
bool start;
std::vector<uint32_t>positionsDoors;
std::vector<uint32_t>positionsTreasures;
std::vector<QString> playersOrder;
explicit TheGameIsAboutToStartData(bool strt,
const std::vector<uint32_t>& posDoors,
const std::vector<uint32_t>& posTreasures) :
start(strt), positionsDoors(posDoors), positionsTreasures(posTreasures)
{ }
};
#define ROOM_ID_NOT_DEFINED 9999
#define NO_QUERY_POSITION 777
#define QUERY_OVERSIZE 999
#endif // PROTOBUFMESSAGESIDENTIFICATORS_H
|
460916e2b414254e96ef10929eb4fd0a89218a1b
|
c4a70a2ef03ee4b89b61b4c6d65a3898b1133958
|
/vol102/10226_HarwoodSpecies.cpp
|
90746fadc9f9795761e87e44e12bed1edfb92f4b
|
[] |
no_license
|
GonzaloCirilo/UVa
|
40803053f26aba966e95e6d08c44cb6dee294651
|
2f106aa76ef5bb9471b747322302fad3051de7d7
|
refs/heads/master
| 2023-04-13T05:08:57.704904
| 2023-04-06T20:06:09
| 2023-04-06T20:06:09
| 98,001,587
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 842
|
cpp
|
10226_HarwoodSpecies.cpp
|
#include <stdio.h>
#include <string>
#include <algorithm>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
int t;
char token;
scanf("%d\n\n", &t);
int aux = t;
while (t--) {
if (t != aux - 1)printf("\n");
unordered_map<string, int> dict;
vector<string> ss = vector<string>();
int n = 0;
while (true) {
token = getchar();
if (token == '\n' || token == EOF) break;
string s;
s.push_back(token);
while (true) {
token = getchar();
if (token == '\n' || token == EOF)
break;
s.push_back(token);
}
if (!dict.insert({ s,1 }).second) {
dict[s]++;
}else{
ss.push_back(s);
}
n++;
}
sort(ss.begin(),ss.end());
for (auto it = ss.begin(); it != ss.end(); it++) {
printf("%s %.4f\n", (*it).c_str(), ((float)dict[*it] / n) * 100);
}
}
return 0;
}
|
00a84bcfd9cfb9b4c667907a67bfe5e8d3f7eb9e
|
37867f639363ab2f188028dc158b483b6e6b81f3
|
/Src/BaseSubsystems/ScriptManager.h
|
34bc1e9ae1f08c9bbbc8ca4d02f5abdc6f76039f
|
[] |
no_license
|
ailuoxz/BadPrincess-Game
|
704143bcafe1205a2ccdd7dbd68ed284c6fa1d76
|
47caae1a03fdfe8058260e44add25fd8e89f99c3
|
refs/heads/master
| 2021-12-14T15:13:50.974644
| 2017-05-04T16:31:22
| 2017-05-04T16:31:22
| null | 0
| 0
| null | null | null | null |
ISO-8859-1
|
C++
| false
| false
| 2,492
|
h
|
ScriptManager.h
|
//---------------------------------------------------------------------------
// ScriptManager.h
//---------------------------------------------------------------------------
#ifndef __ScriptManager_ScriptManager_H
#define __ScriptManager_ScriptManager_H
#include <string>
#include <vector>
// Predeclaración de clases para ahorrar tiempo de compilación
// al ahorrarnos la inclusión de ficheros .h en otros .h
// Estructura con el contexto (estado) del intérprete de Lua.
struct lua_State;
typedef int (*lua_CFunction) (lua_State *L);
namespace ScriptManager {
class CScriptManager {
public:
static bool Init();
static void Release();
static CScriptManager &GetSingleton();
static CScriptManager *GetPtrSingleton();
bool loadScript(const char *script);
bool executeScript(const char *script);
int getGlobal(const char *name, int defaultValue);
bool getGlobal(const char *name, bool defaultValue);
std::string getGlobal(const char *name, const char *defaultValue);
int getField(const char *table, const char *field, int defaultValue);
bool getField(const char *table, const char *field, bool defaultValue);
std::string getField(const char *table, const char *arrayName, int idx, const char *field,std::string defaultValue);
float getField(const char *table, const char *arrayName, int idx, const char *field,float defaultValue);
void getTableIndex(const char *table,std::vector<std::string> &result);
int getTableSize(const char *table);
int getTableSize(const char *table, const char *subtable);
std::string getField(const char *table, const char *field, const char *defaultValue);
bool setGlobalField(const char *table,const char *field, std::string value);
bool setGlobalField(const char *table,const char *field, int value);
bool executeProcedure(const char *subroutineName);
bool executeProcedure(const char *subroutineName, int param1);
bool executeFunction(const char *subroutineName, int param1, int &result);
bool executeFunction(const char *subroutineName, const char *param1, int &result);
bool executeFunction(const char *subroutineName, int param1, std::string param2[],int arrayLength,int param3, int &result);
void registerFunction(lua_CFunction f, const char *luaName);
lua_State *getNativeInterpreter() { return _lua; }
protected:
static int luaError(lua_State *s);
CScriptManager();
~CScriptManager();
bool open();
void close();
static CScriptManager *_instance;
lua_State *_lua;
};
}
#endif
|
90e635292596f6c0ff50596d59d2d0d8180d12c9
|
da5c296a579f71dbfdbc4470e4327d4701c06cf0
|
/student.h
|
6d2870c9c7fde50bc518417d6e315bd456203765
|
[] |
no_license
|
niman565/Sorting_Algorithms
|
3e7ebd863696a2b0ccf5756b9407663f4b19d426
|
6d479a7bf962b3f0800754949506a2334a7ff0ab
|
refs/heads/master
| 2020-04-19T15:01:34.297591
| 2019-01-30T02:26:07
| 2019-01-30T02:26:07
| 168,262,069
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,462
|
h
|
student.h
|
#include <iostream>
#include <string>
#include <exception>
#ifndef STUDENT_H
#define STUDENT_H
class Student{
friend class StudentRecord;
private:
int score; //score given to student by professor
int id; //identification number of the student
std::string name; //name of the student
Student *nextStudent; //pointer to next "Student" node in linked list "StudentRecord"
bool sorted; //value that indicates whether or not the Student is in order; primarily, this field is meant for use in sorting algorithms
//unless changed, the default value of sorted is false
public:
/*
* Constructors and Destructor.
* Constructors accept Student objects and Student fields as arguments.
*/
Student() : score(0), id(0) , name(""), sorted(false) //default constructor; initializes fields to default values
{nextStudent = NULL;} //sets pointer to "NULL" since this is the default constructor
Student(Student& s1) : score(s1.score), id(s1.id) , name(s1.name), sorted(false)
{this->nextStudent = s1.nextStudent;}
Student(Student* s1) : score(s1->score), id(s1->id) , name(s1->name), sorted(false)
{this->nextStudent = s1->nextStudent;}
//The following two constructors take L-value arguments.
Student(int& grade, int& idnum, std::string& newName) : score(grade), id(idnum) , name(newName), sorted(false)
{nextStudent = NULL;}
Student(int& grade, int& idnum, std::string& newName, Student& s2) : score(grade), id(idnum) , name(newName), sorted(false)
{nextStudent = &s2;}
//The following two constructors take R-value arguments.
Student(int&& grade, int&& idnum, std::string&& newName) : score(grade), id(idnum) , name(newName), sorted(false)
{nextStudent = NULL;}
Student(int&& grade, int&& idnum, std::string&& newName, Student& s2) : score(grade), id(idnum) , name(newName), sorted(false)
{nextStudent = &s2;}
~Student(){
delete nextStudent;
nextStudent = NULL;
}
void makeSorted(){
sorted = true;
}
void notSorted(){
sorted = false;
}
//accessor methods
int getScore(){
return score;
}
int getIdNum(){
return id;
}
std::string getName(){
return name;
}
Student* getNext(){
return nextStudent;
}
bool isSorted(){
return sorted;
}
//mutator methods
void setNext(Student* a){
nextStudent = a;
}
};
#endif
|
82f669987868a1eb265bd0633c45108a78097f9b
|
2186bcabd536ea456fa1e558fdb9f1ce77aa26b2
|
/p2/src/generator/controlpoints.cpp
|
3008e1144947964d9bd20c328b8a6359ebfeda13
|
[] |
no_license
|
Kaixi26/CG_Trabalho
|
3c68b7d55facbee60ce3868e7f7de2b1bcded383
|
c69bd632a47eb004bbfa45e52f07874c1210a5f1
|
refs/heads/master
| 2022-07-28T09:27:42.541592
| 2020-05-24T17:41:08
| 2020-05-24T17:41:08
| 241,995,625
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 792
|
cpp
|
controlpoints.cpp
|
#include "controlpoints.h"
ControlPoints::ControlPoints(std::array<Point, 4> p) : p{p} {}
Point ControlPoints::evalBezier(float t){
return Point(
t*t*t*p[3].x + 3*t*t*(1-t)*p[2].x + 3*t*(1-t)*(1-t)*p[1].x + (1-t)*(1-t)*(1-t)*p[0].x
, t*t*t*p[3].y + 3*t*t*(1-t)*p[2].y + 3*t*(1-t)*(1-t)*p[1].y + (1-t)*(1-t)*(1-t)*p[0].y
, t*t*t*p[3].z + 3*t*t*(1-t)*p[2].z + 3*t*(1-t)*(1-t)*p[1].z + (1-t)*(1-t)*(1-t)*p[0].z);
}
Point ControlPoints::evalBezierNormal(float t){
return Point(
(-3*t*t+6*t-3)*p[0].x + (9*t*t-12*t+3)*p[1].x + (-9*t*t+6*t)*p[2].x + (3*t*t)*p[3].x
, (-3*t*t+6*t-3)*p[0].y + (9*t*t-12*t+3)*p[1].y + (-9*t*t+6*t)*p[2].y + (3*t*t)*p[3].y
, (-3*t*t+6*t-3)*p[0].z + (9*t*t-12*t+3)*p[1].z + (-9*t*t+6*t)*p[2].z + (3*t*t)*p[3].z
);
}
|
5ac6066e2c85d22d9de90c5c853b313bdeff2679
|
22afbecdcfddb3d8207288d86567db6e67d53d8d
|
/Code/WebserverTest3/WebserverTest3.ino
|
c72d691c5c6860bdbc65d21f6c860a1869deabe4
|
[] |
no_license
|
JantonDeluxe/luft-waffle
|
d67c148c757044cf3147525326a4ba2cc57580b3
|
7c0a1c9332c1d453b9724ab353657c6ed63d66c6
|
refs/heads/master
| 2020-07-04T15:17:46.853073
| 2020-04-15T14:12:04
| 2020-04-15T14:12:04
| 202,322,626
| 2
| 1
| null | 2019-10-23T12:34:31
| 2019-08-14T09:50:51
|
C++
|
UTF-8
|
C++
| false
| false
| 5,744
|
ino
|
WebserverTest3.ino
|
/* Höhenmesser 2.0
Projektseite:
-------------
https://jantondeluxe.github.io
Hardware:
---------
Board: WEMOS D1 mini pro V1.0
Altimeter: Bosch BMP180
Display: GM009605 OLED
D1 mini Data logger shield mit DS1307 RTC
Disclaimer:
-----------
Basiert teilweise auf dem Sketch BMP180_altitude_example aus der SFE_BMP180-Library:
V10 Mike Grusin, SparkFun Electronics 10/24/2013
V1.1.2 Updates for Arduino 1.6.4 5/2015
Basiert teilweise auf dem Tutorial "ESP8266 data logging with real time graphs" auf
https://circuits4you.com/2019/01/11/esp8266-data-logging-with-real-time-graphs/
Danke an Nick Lamprecht für die Hilfe mit Java Script!
*/
// Libraries
#include <Wire.h>
#include <FS.h>
#include <SFE_BMP180.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SD.h>
#include <RTClib.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
// Header
#include "StartPage.h"
#include "ChartPage.h"
#include "AboutPage.h"
// Display-Eigenschaften definieren
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1 // -1, da kein Reset-Pin vorhanden
// Objekte
SFE_BMP180 pressure;
RTC_DS1307 RTC;
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
ESP8266WebServer server(80);
// Name und Passwort WLAN oder Access Point
const char* ssid = "REMOVED";
const char* password = "REMOVED";
// Kalibrierung: Anzahl der Messungen
const int measurements = 100;
// Globale Variablen
double highest;
double P;
double h;
double Temp;
double v;
double a;
double S1;
double S2;
double deltaS;
double del = 0;
double timer = 400;
double lowestV;
bool startstop = false;
float T0;
float deltaT;
float Array[measurements];
float P0 = 0.0;
char status;
// Setup
void setup() {
// Serial-Setup
Serial.begin(115200);
delay(100);
Serial.println("");
Serial.println("Serial gestartet!");
// I2C-Setup
Wire.begin();
Serial.println("I2C gestartet!");
// Display-Setup
if (display.begin(SSD1306_SWITCHCAPVCC, 0x3C))
{
{
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.cp437(true); // font
display.setCursor(0, 0);
Serial.println("Display gestartet!");
}
}
else
{
Serial.println("Display nicht gefunden!");
while (1);
}
drawLoadingscreen1();
// Dateisystem starten
if (SPIFFS.begin())
{
Serial.println("SPIFFS gestartet!");
}
else
{
Serial.println("SPIFFS nicht gestartet!");
display.clearDisplay();
display.print("SPIFFS nicht gestartet!");
delay(1000);
display.clearDisplay();
while (1);
}
drawLoadingscreen2();
/*
// RTC-Setup
if (RTC.begin())
Serial.println("RTC gestartet!");
else
{
Serial.println("RTC nicht gestartet!");
display.clearDisplay();
display.print("RTC nicht gestartet!");
delay(1000);
display.clearDisplay();
while (1);
}
if (! RTC.isrunning()) {
Serial.println("RTC bisher noch nicht gesetzt!");
RTC.adjust(DateTime(F(__DATE__), F(__TIME__)));
}
*/
drawLoadingscreen3();
//Sensor-Setup
if (pressure.begin())
Serial.println("BMP180 gestartet!");
else
{
Serial.println("BMP180 fehlt!");
display.clearDisplay();
display.print("BMP180 fehlt!");
delay(1000);
display.clearDisplay();
while (1);
}
drawLoadingscreen4();
// Basisdruck
calculateBasePressure();
Serial.println("Ausgangsdruck berechnet!");
drawLoadingscreen5();
// WLAN-Verbindung
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
drawLoadingscreen6();
Serial.println("");
Serial.print("Verbunden mit: ");
Serial.println(ssid);
drawLoadingscreen7();
// Webserver-Setup
server.on("/", handleRoot);
server.on("/start", handleStart);
server.on("/stopp", handleStopp);
server.on("/chart", handleChart);
server.on("/about", handleAbout);
server.on("/calibrate", handleCalibration);
server.on("/readData", handleData);
server.onNotFound(handleWebRequests);
server.begin();
Serial.println("HTTP-Server gestartet!");
Serial.print("IP: ");
/* Serial.println(WiFi.softAPIP()); */
Serial.println(WiFi.localIP());
drawLoadingscreen8();
drawLoadingscreen9();
drawLoadingscreen9();
drawLoadingscreen10();
drawSplashscreen();
delay(1500);
display.clearDisplay();
}
void loop() {
// Zeitmessung starten
T0 = millis();
/*// Uhrzeit anzeigen
DateTime now = RTC.now();
Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.day(), DEC);
Serial.print(" (");
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println(")");
*/
// Webserver
server.handleClient();
// Druck messen
P = getPressure();
// Ausgangsstrecke
S1 = h;
// Höhenunterschied
h = pressure.altitude(P, P0);
// Streckenberechnung
S2 = h;
deltaS = S2 - S1;
// Maximum
if (h > highest) highest = h;
if (v < lowestV) lowestV = v;
// Temperatur messen
status = pressure.startTemperature();
delay(status);
status = pressure.getTemperature(Temp);
// Werte anzeigen
anzeige();
// Mögliche Verzögerung
delay(del);
// Zeitmessung stoppen
deltaT = millis() - T0;
deltaT = deltaT / 1000;
// Geschwindigkeit und Beschleunigung ausrechnen
v = deltaS / deltaT;
a = (2 * deltaS) / (deltaT * deltaT);
// Messung gestartet
if (startstop == true) {
timer = timer - 1;
if (timer == 0) {
startstop = false;
}
}
|
cad326f9793539679760a67ac808cdacd60ae764
|
cdf36db8dee0a1ce68e41e2cd2db8ddf0c038d3d
|
/butano/include/btn_span_fwd.h
|
ae4e7d9e4d54091eba2dfcbd613a1c4161cb4186
|
[
"Zlib"
] |
permissive
|
cjiajiazhuiqiu/butano
|
f594736208e363e3cb22551797f3d7d9bb8cc37c
|
ac6cccfeeaeb4d6f3acb4de04a43bf8cefd4b042
|
refs/heads/master
| 2023-01-14T00:58:30.230050
| 2020-11-15T09:43:50
| 2020-11-15T09:43:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 652
|
h
|
btn_span_fwd.h
|
/*
* Copyright (c) 2020 Gustavo Valiente gustavo.valiente@protonmail.com
* zlib License, see LICENSE file.
*/
#ifndef BTN_SPAN_FWD_H
#define BTN_SPAN_FWD_H
/**
* @file
* btn::span declaration header file.
*
* @ingroup span
*/
#include "btn_common.h"
namespace btn
{
/**
* @brief Refers to a contiguous sequence of elements with the first element of the sequence at position zero.
*
* The elements are not copied but referenced, so they should outlive the span to avoid dangling references.
*
* @tparam Type Element type.
*
* @ingroup span
*/
template<typename Type>
class span;
}
#endif
|
e56909c72d7d6d6e5c70e6cdd3886214e9b260ba
|
8028c77435920a39892a421fca1e444a5fd9eacc
|
/apps/lgc/fsw/src/lgc_app.cpp
|
78bf0a56ac6dd27d88dfc2d71759ace107d72dac
|
[
"BSD-3-Clause"
] |
permissive
|
WindhoverLabs/airliner
|
fc2b2d59c73efc8f63c6fb8b3c4e00c5fddcc7c7
|
2ab9c8717e0a42d40b0d014a22dbcc1ed7ec0eb1
|
refs/heads/integration
| 2023-08-04T06:01:53.480641
| 2023-07-31T03:22:06
| 2023-07-31T03:22:06
| 332,887,132
| 9
| 2
| null | 2023-07-31T02:58:48
| 2021-01-25T21:21:52
|
C
|
UTF-8
|
C++
| false
| false
| 20,093
|
cpp
|
lgc_app.cpp
|
/************************************************************************
** Includes
*************************************************************************/
#include <string.h>
#include "cfe.h"
#include "lgc_app.h"
#include "lgc_msg.h"
#include "lgc_version.h"
#include "px4lib.h"
#include "px4lib_msgids.h"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Instantiate the application object. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
LGC oLGC;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Default constructor. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
LGC::LGC()
{
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Destructor constructor. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
LGC::~LGC()
{
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Initialize event tables. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 LGC::InitEvent()
{
int32 iStatus = CFE_SUCCESS;
/* Register the table with CFE */
iStatus = CFE_EVS_Register(0, 0, CFE_EVS_BINARY_FILTER);
if (iStatus != CFE_SUCCESS)
{
(void) CFE_ES_WriteToSysLog("LGC - Failed to register with EVS (0x%08lX)\n", iStatus);
}
return (iStatus);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Initialize Message Pipes */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 LGC::InitPipe()
{
int32 iStatus=CFE_SUCCESS;
/* Init schedule pipe and subscribe to wakeup messages */
iStatus = CFE_SB_CreatePipe(&SchPipeId,
LGC_SCH_PIPE_DEPTH,
LGC_SCH_PIPE_NAME);
if (iStatus == CFE_SUCCESS)
{
iStatus = CFE_SB_SubscribeEx(LGC_WAKEUP_MID, SchPipeId, CFE_SB_Default_Qos, LGC_WAKEUP_MID_MAX_MSG_COUNT);
if (iStatus != CFE_SUCCESS)
{
(void) CFE_EVS_SendEvent(LGC_SUBSCRIBE_ERR_EID, CFE_EVS_ERROR,
"Sch Pipe failed to subscribe to LGC_WAKEUP_MID. (0x%08lX)",
iStatus);
goto LGC_InitPipe_Exit_Tag;
}
iStatus = CFE_SB_SubscribeEx(LGC_SEND_HK_MID, SchPipeId, CFE_SB_Default_Qos, LGC_SEND_HK_MID_MAX_MSG_COUNT);
if (iStatus != CFE_SUCCESS)
{
(void) CFE_EVS_SendEvent(LGC_SUBSCRIBE_ERR_EID, CFE_EVS_ERROR,
"CMD Pipe failed to subscribe to LGC_SEND_HK_MID. (0x%08X)",
(unsigned int)iStatus);
goto LGC_InitPipe_Exit_Tag;
}
iStatus = CFE_SB_SubscribeEx(PX4_MANUAL_CONTROL_SETPOINT_MID, SchPipeId, CFE_SB_Default_Qos, 1);
if (iStatus != CFE_SUCCESS)
{
(void) CFE_EVS_SendEvent(LGC_SUBSCRIBE_ERR_EID, CFE_EVS_ERROR,
"CMD Pipe failed to subscribe to PX4_MANUAL_CONTROL_SETPOINT_MID. (0x%08lX)",
iStatus);
goto LGC_InitPipe_Exit_Tag;
}
iStatus = CFE_SB_SubscribeEx(PX4_VEHICLE_STATUS_MID, SchPipeId, CFE_SB_Default_Qos, 1);
if (iStatus != CFE_SUCCESS)
{
(void) CFE_EVS_SendEvent(LGC_SUBSCRIBE_ERR_EID, CFE_EVS_ERROR,
"CMD Pipe failed to subscribe to PX4_VEHICLE_STATUS_MID. (0x%08lX)",
iStatus);
goto LGC_InitPipe_Exit_Tag;
}
}
else
{
(void) CFE_EVS_SendEvent(LGC_PIPE_INIT_ERR_EID, CFE_EVS_ERROR,
"Failed to create SCH pipe (0x%08lX)",
iStatus);
goto LGC_InitPipe_Exit_Tag;
}
/* Init command pipe and subscribe to command messages */
iStatus = CFE_SB_CreatePipe(&CmdPipeId,
LGC_CMD_PIPE_DEPTH,
LGC_CMD_PIPE_NAME);
if (iStatus == CFE_SUCCESS)
{
/* Subscribe to command messages */
iStatus = CFE_SB_Subscribe(LGC_CMD_MID, CmdPipeId);
if (iStatus != CFE_SUCCESS)
{
(void) CFE_EVS_SendEvent(LGC_SUBSCRIBE_ERR_EID, CFE_EVS_ERROR,
"CMD Pipe failed to subscribe to LGC_CMD_MID. (0x%08lX)",
iStatus);
goto LGC_InitPipe_Exit_Tag;
}
}
else
{
(void) CFE_EVS_SendEvent(LGC_PIPE_INIT_ERR_EID, CFE_EVS_ERROR,
"Failed to create CMD pipe (0x%08lX)",
iStatus);
goto LGC_InitPipe_Exit_Tag;
}
LGC_InitPipe_Exit_Tag:
return (iStatus);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Initialize Global Variables */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void LGC::InitData()
{
/* Init housekeeping message. */
CFE_SB_InitMsg(&HkTlm,
LGC_HK_TLM_MID, sizeof(HkTlm), TRUE);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* LGC initialization */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 LGC::InitApp()
{
int32 iStatus = CFE_SUCCESS;
int8 hasEvents = 0;
iStatus = InitEvent();
if (iStatus != CFE_SUCCESS)
{
(void) CFE_ES_WriteToSysLog("LGC - Failed to init events (0x%08lX)\n", iStatus);
goto LGC_InitApp_Exit_Tag;
}
else
{
hasEvents = 1;
}
iStatus = InitPipe();
if (iStatus != CFE_SUCCESS)
{
goto LGC_InitApp_Exit_Tag;
}
InitData();
iStatus = InitConfigTbl();
if (iStatus != CFE_SUCCESS)
{
goto LGC_InitApp_Exit_Tag;
}
/* Initialize the hardware device for use. */
iStatus = InitDevice();
if (iStatus != CFE_SUCCESS)
{
(void) CFE_EVS_SendEvent(LGC_DEVICE_INIT_ERR_EID, CFE_EVS_ERROR,
"Failed to init device (0x%08x)",
(unsigned int)iStatus);
goto LGC_InitApp_Exit_Tag;
}
HkTlm.State = LGC_INITIALIZED;
LGC_InitApp_Exit_Tag:
if (iStatus == CFE_SUCCESS)
{
(void) CFE_EVS_SendEvent(LGC_INIT_INF_EID, CFE_EVS_INFORMATION,
"Initialized. Version %d.%d.%d.%d",
LGC_MAJOR_VERSION,
LGC_MINOR_VERSION,
LGC_REVISION,
LGC_MISSION_REV);
}
else
{
if (hasEvents == 1)
{
CFE_EVS_SendEvent(LGC_INIT_ERR_EID, CFE_EVS_ERROR, "Application failed to initialize");
}
else
{
CFE_ES_WriteToSysLog("LGC - Application failed to initialize\n");
}
}
return (iStatus);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Receive and Process Messages */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 LGC::RcvSchPipeMsg(int32 iBlocking)
{
int32 iStatus = CFE_SUCCESS;
CFE_SB_Msg_t* MsgPtr = NULL;
CFE_SB_MsgId_t MsgId = 0;
/* Stop Performance Log entry */
CFE_ES_PerfLogExit(LGC_MAIN_TASK_PERF_ID);
/* Wait for WakeUp messages from scheduler */
iStatus = CFE_SB_RcvMsg(&MsgPtr, SchPipeId, iBlocking);
/* Start Performance Log entry */
CFE_ES_PerfLogEntry(LGC_MAIN_TASK_PERF_ID);
if (iStatus == CFE_SUCCESS)
{
MsgId = CFE_SB_GetMsgId(MsgPtr);
switch (MsgId)
{
case LGC_WAKEUP_MID:
{
CheckSwitchPosition();
break;
}
case LGC_SEND_HK_MID:
{
ProcessCmdPipe();
ReportHousekeeping();
break;
}
case PX4_MANUAL_CONTROL_SETPOINT_MID:
{
memcpy(&CVT.m_ManualControlSetpointMsg, MsgPtr, sizeof(CVT.m_ManualControlSetpointMsg));
break;
}
case PX4_VEHICLE_STATUS_MID:
{
memcpy(&CVT.m_VehicleStatusMsg, MsgPtr, sizeof(CVT.m_VehicleStatusMsg));
break;
}
default:
{
(void) CFE_EVS_SendEvent(LGC_MSGID_ERR_EID, CFE_EVS_ERROR,
"Recvd invalid SCH msgId (0x%04X)", MsgId);
}
}
}
else if (iStatus == CFE_SB_NO_MESSAGE)
{
/* If there's no incoming message, do nothing here.
* Note, this section is dead code only if the iBlocking arg
* is CFE_SB_PEND_FOREVER. */
iStatus = CFE_SUCCESS;
}
else if (iStatus == CFE_SB_TIME_OUT)
{
/* If there's no incoming message within a specified time (via the
* iBlocking arg, you can do nothing here.
* Note, this section is dead code only if the iBlocking arg
* is CFE_SB_PEND_FOREVER. */
iStatus = CFE_SUCCESS;
}
else
{
(void) CFE_EVS_SendEvent(LGC_RCVMSG_ERR_EID, CFE_EVS_ERROR,
"SCH pipe read error (0x%08lX).", iStatus);
}
return (iStatus);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Process Incoming Commands */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void LGC::ProcessCmdPipe()
{
int32 iStatus = CFE_SUCCESS;
CFE_SB_Msg_t* CmdMsgPtr = NULL;
CFE_SB_MsgId_t CmdMsgId = 0;
/* Process command messages until the pipe is empty */
while (1)
{
iStatus = CFE_SB_RcvMsg(&CmdMsgPtr, CmdPipeId, CFE_SB_POLL);
if(iStatus == CFE_SUCCESS)
{
CmdMsgId = CFE_SB_GetMsgId(CmdMsgPtr);
switch (CmdMsgId)
{
case LGC_CMD_MID:
{
ProcessAppCmds(CmdMsgPtr);
break;
}
default:
{
/* Bump the command error counter for an unknown command.
* (This should only occur if it was subscribed to with this
* pipe, but not handled in this switch-case.) */
HkTlm.usCmdErrCnt++;
(void) CFE_EVS_SendEvent(LGC_MSGID_ERR_EID, CFE_EVS_ERROR,
"Recvd invalid CMD msgId (0x%04X)", (unsigned short)CmdMsgId);
break;
}
}
}
else if (iStatus == CFE_SB_NO_MESSAGE)
{
break;
}
else
{
(void) CFE_EVS_SendEvent(LGC_RCVMSG_ERR_EID, CFE_EVS_ERROR,
"CMD pipe read error (0x%08lX)", iStatus);
break;
}
}
return;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Process LGC Commands */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void LGC::ProcessAppCmds(CFE_SB_Msg_t* MsgPtr)
{
uint32 uiCmdCode = 0;
if (MsgPtr != NULL)
{
uiCmdCode = CFE_SB_GetCmdCode(MsgPtr);
switch (uiCmdCode)
{
case LGC_NOOP_CC:
{
HkTlm.usCmdCnt++;
(void) CFE_EVS_SendEvent(LGC_CMD_NOOP_EID, CFE_EVS_INFORMATION,
"Recvd NOOP. Version %d.%d.%d.%d",
LGC_MAJOR_VERSION,
LGC_MINOR_VERSION,
LGC_REVISION,
LGC_MISSION_REV);
break;
}
case LGC_RESET_CC:
{
HkTlm.usCmdCnt = 0;
HkTlm.usCmdErrCnt = 0;
break;
}
default:
{
HkTlm.usCmdErrCnt++;
(void) CFE_EVS_SendEvent(LGC_CC_ERR_EID, CFE_EVS_ERROR,
"Recvd invalid command code (%u)", (unsigned int)uiCmdCode);
break;
}
}
}
return;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Send LGC Housekeeping */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void LGC::ReportHousekeeping()
{
CFE_SB_TimeStampMsg((CFE_SB_Msg_t*)&HkTlm);
CFE_SB_SendMsg((CFE_SB_Msg_t*)&HkTlm);
return;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Verify Command Length */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
boolean LGC::VerifyCmdLength(CFE_SB_Msg_t* MsgPtr,
uint16 usExpectedLen)
{
boolean bResult = TRUE;
uint16 usMsgLen = 0;
if (MsgPtr != NULL)
{
usMsgLen = CFE_SB_GetTotalMsgLength(MsgPtr);
if (usExpectedLen != usMsgLen)
{
bResult = FALSE;
CFE_SB_MsgId_t MsgId = CFE_SB_GetMsgId(MsgPtr);
uint16 usCmdCode = CFE_SB_GetCmdCode(MsgPtr);
(void) CFE_EVS_SendEvent(LGC_MSGLEN_ERR_EID, CFE_EVS_ERROR,
"Rcvd invalid msgLen: msgId=0x%08X, cmdCode=%d, "
"msgLen=%d, expectedLen=%d",
MsgId, usCmdCode, usMsgLen, usExpectedLen);
HkTlm.usCmdErrCnt++;
}
}
return (bResult);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* LGC Application C style main entry point. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
extern "C" void LGC_AppMain()
{
oLGC.AppMain();
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* LGC Application C++ style main entry point. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void LGC::AppMain()
{
/* Register the application with Executive Services */
uiRunStatus = CFE_ES_APP_RUN;
int32 iStatus = CFE_ES_RegisterApp();
if (iStatus != CFE_SUCCESS)
{
(void) CFE_ES_WriteToSysLog("LGC - Failed to register the app (0x%08lX)\n", iStatus);
}
/* Start Performance Log entry */
CFE_ES_PerfLogEntry(LGC_MAIN_TASK_PERF_ID);
/* Perform application initializations */
if (iStatus == CFE_SUCCESS)
{
iStatus = InitApp();
}
if (iStatus == CFE_SUCCESS)
{
/* Do not perform performance monitoring on startup sync */
CFE_ES_PerfLogExit(LGC_MAIN_TASK_PERF_ID);
CFE_ES_WaitForStartupSync(LGC_STARTUP_TIMEOUT_MSEC);
CFE_ES_PerfLogEntry(LGC_MAIN_TASK_PERF_ID);
}
else
{
uiRunStatus = CFE_ES_APP_ERROR;
}
/* Application main loop */
while (CFE_ES_RunLoop(&uiRunStatus) == TRUE)
{
RcvSchPipeMsg(LGC_SCH_PIPE_PEND_TIME);
iStatus = AcquireConfigPointers();
if(iStatus != CFE_SUCCESS)
{
/* We apparently tried to load a new table but failed. Terminate the application. */
uiRunStatus = CFE_ES_APP_ERROR;
}
}
/* Stop Performance Log entry */
CFE_ES_PerfLogExit(LGC_MAIN_TASK_PERF_ID);
/* Exit the application */
CFE_ES_ExitApp(uiRunStatus);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Extend landing gear */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void LGC::ExtendGear(void)
{
uint16 min_pwm[LGC_MAX_GEAR_OUTPUTS];
for (uint32 i = 0; i < LGC_MAX_GEAR_OUTPUTS; ++i)
{
min_pwm[i] = ConfigTblPtr->PwmMin;
}
SetMotorOutputs(min_pwm);
return;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Retract landing gear */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void LGC::RetractGear(void)
{
uint16 max_pwm[LGC_MAX_GEAR_OUTPUTS];
for (uint32 i = 0; i < LGC_MAX_GEAR_OUTPUTS; ++i)
{
max_pwm[i] = ConfigTblPtr->PwmMax;
}
SetMotorOutputs(max_pwm);
return;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Decode landing gear switch position. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void LGC::CheckSwitchPosition(void)
{
switch(CVT.m_ManualControlSetpointMsg.GearSwitch)
{
case PX4_SWITCH_POS_NONE:
{
/* Do nothing */
break;
}
case PX4_SWITCH_POS_ON:
{
if(HkTlm.State != LGC_RETRACTED)
{
(void) CFE_EVS_SendEvent(LGC_RETRACT_INF_EID, CFE_EVS_ERROR,
"Landing Gear in Retracted State");
RetractGear();
HkTlm.State = LGC_RETRACTED;
}
break;
}
case PX4_SWITCH_POS_MIDDLE:
{
/* Do nothing */
break;
}
case PX4_SWITCH_POS_OFF:
{
if(HkTlm.State != LGC_EXTENDED)
{
(void) CFE_EVS_SendEvent(LGC_EXTEND_INF_EID, CFE_EVS_ERROR,
"Landing gear in Extended State");
ExtendGear();
HkTlm.State = LGC_EXTENDED;
}
break;
}
}
return;
}
/************************/
/* End of File Comment */
/************************/
|
636807c128674b32c27801a344ab453767ef6afe
|
92e67b30497ffd29d3400e88aa553bbd12518fe9
|
/assignment2/part6/Re=110/30/phi
|
a0ef0f6809b681c93c7ee4eeb85897d765a9f927
|
[] |
no_license
|
henryrossiter/OpenFOAM
|
8b89de8feb4d4c7f9ad4894b2ef550508792ce5c
|
c54b80dbf0548b34760b4fdc0dc4fb2facfdf657
|
refs/heads/master
| 2022-11-18T10:05:15.963117
| 2020-06-28T15:24:54
| 2020-06-28T15:24:54
| 241,991,470
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 42,980
|
phi
|
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "30";
object phi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 3 -1 0 0 0 0];
internalField nonuniform List<scalar>
3880
(
8.68778e-05
-0.000930531
0.000843654
0.000334795
0.000249996
-0.000497914
0.000702662
0.00298025
-0.00334812
0.00112017
0.00642822
-0.00684573
0.00152372
0.01011
-0.0105136
0.0018798
0.0137739
-0.01413
0.00218506
0.017313
-0.0176183
0.0024503
0.0206751
-0.0209404
0.00268124
0.0237971
-0.0240281
0.0265869
0.00286694
-0.0267726
9.69686e-05
-0.0010275
0.000395081
-4.81153e-05
0.000874204
0.00250112
0.00147169
0.00583074
0.0021175
0.00946421
0.00276399
0.0131275
0.00339324
0.0166838
0.00400404
0.0200643
0.00459217
0.023209
0.0260405
0.00513861
0.000101227
-0.00112873
0.000437603
-0.000384491
0.00101383
0.0019249
0.00178174
0.00506282
0.00267037
0.00857559
0.00361856
0.0121793
0.00459059
0.0157117
0.00557017
0.0190848
0.00654306
0.0222361
0.0250993
0.00748429
9.77405e-05
-0.00122647
0.00045543
-0.00074218
0.00110433
0.001276
0.00201714
0.00415001
0.00313017
0.00746255
0.00437385
0.0109356
0.00569447
0.0143911
0.00705752
0.0177217
0.00843629
0.0208573
0.0237351
0.00980044
8.59098e-05
-0.00131238
0.000445356
-0.00110163
0.00113478
0.000586573
0.00215188
0.00313291
0.00344938
0.00616506
0.00495888
0.0094261
0.00661387
0.0127361
0.0083611
0.0159745
0.0101577
0.0190608
0.021927
0.0119659
6.69386e-05
-0.00137931
0.000409411
-0.0014441
0.00110415
-0.000108163
0.00217385
0.00206321
0.00359484
0.00474406
0.00531197
0.00770898
0.00725733
0.0107908
0.00936508
0.0138667
0.0115757
0.0168502
0.0196637
0.013839
4.40355e-05
-0.00142335
0.000355678
-0.00175574
0.00102385
-0.000776334
0.00209123
0.000995827
0.00355991
0.00327538
0.00539813
0.00587076
0.00755169
0.00863722
0.00995673
0.0114617
0.0125464
0.0142605
0.0169541
0.015256
2.24254e-05
-0.00144578
0.000298238
-0.00203155
0.000918648
-0.00139674
0.00193668
-2.22036e-05
0.00337548
0.00183658
0.00523028
0.00401596
0.00747306
0.00639443
0.0100611
0.00887363
0.0129429
0.0113787
0.0138457
0.0160513
8.73794e-06
-0.00145451
0.000255513
-0.00227833
0.000824271
-0.0019655
0.00176598
-0.000963911
0.00311393
0.000488632
0.00488462
0.00224528
0.00707894
0.00420011
0.00968911
0.00626345
0.0127141
0.00835375
0.0104157
0.016144
8.35473e-06
-0.00146287
0.000246739
-0.00251671
0.000780995
-0.00249976
0.0016489
-0.00183181
0.00288009
-0.000742562
0.0044978
0.000627566
0.00651877
0.00217914
0.00895936
0.00382287
0.011885
0.00542812
0.0155448
0.00675594
0.00187555
0.112679
-0.111687
0.00101166
0.134412
-0.133549
0.000573215
0.147632
-0.147194
0.000266029
0.154739
-0.154432
9.33999e-05
0.159312
-0.15914
-7.94348e-05
0.16521
-0.165037
5.88084e-05
0.178315
-0.178453
-0.000132928
0.208361
-0.208169
-6.86126e-05
0.262951
-0.263015
0.325331
-0.3254
0.00455885
0.113259
0.00380898
0.135162
0.00320045
0.148241
0.00261748
0.155322
0.00207638
0.159854
0.00165091
0.165636
0.00139387
0.178572
0.00107377
0.208681
0.000604605
0.26342
0.325936
0.0073427
0.1134
0.00666498
0.13584
0.00588029
0.149025
0.0049924
0.15621
0.00409812
0.160748
0.00332044
0.166413
0.00277897
0.179114
0.00221833
0.209241
0.00130365
0.264335
0.32724
0.0101417
0.113059
0.00953829
0.136443
0.00856945
0.149994
0.00737588
0.157403
0.00611944
0.162004
0.00498451
0.167548
0.00414971
0.179948
0.00333426
0.210057
0.00200103
0.265668
0.329241
0.0128848
0.11214
0.0123883
0.13694
0.0112432
0.151139
0.00974403
0.158903
0.00812271
0.163626
0.00662849
0.169043
0.0054864
0.18109
0.00442003
0.211123
0.00268043
0.267408
0.331921
0.0154837
0.110495
0.0151515
0.137272
0.0138612
0.15243
0.012075
0.160689
0.0100974
0.165603
0.00824076
0.170899
0.00678334
0.182548
0.00546826
0.212438
0.003334
0.269542
0.335255
0.0178691
0.107882
0.017815
0.137326
0.0164168
0.153828
0.0143511
0.162754
0.012021
0.167933
0.00980147
0.173119
0.00802685
0.184323
0.00646578
0.213999
0.00396061
0.272047
0.339216
0.0198748
0.104059
0.0202252
0.136976
0.0188242
0.155229
0.0165425
0.165036
0.0138888
0.170587
0.0113117
0.175696
0.00921039
0.186424
0.00740023
0.215809
0.00454523
0.274902
0.343761
0.0215732
0.0986295
0.0225447
0.136004
0.0211604
0.156613
0.018646
0.16755
0.0156717
0.173561
0.0127492
0.178618
0.010335
0.188838
0.00828177
0.217863
0.00510556
0.278078
0.348867
0.0223777
0.0917966
0.0242915
0.13409
0.0232485
0.157656
0.0206663
0.170133
0.0174427
0.176785
0.0141515
0.181909
0.0114197
0.19157
0.00906372
0.220219
0.00564524
0.281497
0.354512
0.00966809
0.094154
-0.0120255
0.00559101
0.138168
0.00223732
0.16101
-3.52699e-05
0.172405
-0.00173129
0.178481
-0.00325468
0.183433
-0.00433311
0.192648
-0.00465541
0.220541
-0.00337639
0.280218
0.351135
0.0130387
0.0957721
-0.0146568
0.0109284
0.140278
0.00725623
0.164682
0.00364269
0.176019
0.000763699
0.18136
-0.00147559
0.185672
-0.00306429
0.194237
-0.00393522
0.221412
-0.00317065
0.279453
0.347965
0.0145139
0.097548
-0.0162898
0.0130704
0.141721
0.00967493
0.168077
0.00580168
0.179892
0.00224329
0.184918
-0.000720369
0.188636
-0.00287072
0.196387
-0.00394328
0.222484
-0.00305662
0.278567
0.344908
0.0155347
0.0979819
-0.0159686
0.0154755
0.141781
0.0124174
0.171136
0.00834647
0.183963
0.00451227
0.188753
0.00133002
0.191818
-0.00125194
0.198969
-0.00309766
0.22433
-0.00300436
0.278473
0.341904
0.0142143
0.0981896
-0.014422
0.0147031
0.141292
0.0127057
0.173133
0.00914225
0.187526
0.0054694
0.192425
0.00234201
0.194945
-0.000117144
0.201428
-0.00167477
0.225888
-0.00180058
0.278599
0.340103
0.0137669
0.0971403
-0.0127176
0.0145041
0.140555
0.0128148
0.174822
0.0095716
0.19077
0.00600739
0.19599
0.00278405
0.198169
-7.73614e-05
0.20429
-0.00233851
0.228149
-0.00257418
0.278835
0.337529
0.010511
0.0961884
-0.00955914
0.0118227
0.139243
0.0113373
0.175308
0.0094498
0.192657
0.007042
0.198397
0.00478474
0.200426
0.00264699
0.206428
0.000688286
0.230108
-0.000745729
0.280269
0.336783
0.00824679
0.0956339
-0.0076922
0.00855509
0.138935
0.00800473
0.175858
0.00649689
0.194165
0.00460288
0.200291
0.00264676
0.202382
0.000595798
0.208479
-0.00103496
0.231738
-0.00139639
0.28063
0.335387
0.00440664
0.0950558
-0.0038286
0.00549383
0.137848
0.00609857
0.175253
0.00591008
0.194353
0.00547156
0.20073
0.00490656
0.202947
0.00353174
0.209853
0.00123284
0.234037
-0.000445642
0.282309
0.334941
-0.000170856
-0.00122997
1.74346e-05
0.00110286
0.00187036
0.00233868
0.0024934
0.00208389
0.000887679
-0.000198653
0.0166965
-0.0156751
-0.0130469
0.0193726
-0.0173329
0.0211137
-0.018031
0.0219308
-0.0167857
0.0220402
-0.0145314
0.0215635
-0.0122409
0.0211363
-0.00913191
0.0206804
-0.00723628
0.020736
-0.00388428
-0.00189006
0.0158758
-0.019371
-0.0121799
0.0187283
-0.0201854
0.0204484
-0.0197511
0.0211297
-0.017467
0.0210259
-0.0144276
0.0203625
-0.0115775
0.0197261
-0.00849556
0.0190752
-0.00658537
0.0189936
-0.00380268
-0.00233909
0.0159452
-0.0231663
-0.0121499
0.0185273
-0.0227675
0.0198792
-0.021103
0.0202059
-0.0177937
0.0198037
-0.0140254
0.0189444
-0.0107182
0.0181262
-0.00767739
0.0173517
-0.00581085
0.0171431
-0.00359404
-0.00257987
0.0161779
-0.0266647
-0.0126795
0.0181913
-0.0247809
0.0190041
-0.0219158
0.0189112
-0.0177008
0.0182255
-0.0133398
0.0172162
-0.00970886
0.0162718
-0.006733
0.0154321
-0.00497117
0.0151045
-0.00326636
-0.00261295
0.0159606
-0.0294464
-0.0131788
0.0172277
-0.026048
0.0174807
-0.0221688
0.0170271
-0.0172471
0.016153
-0.0124657
0.0150804
-0.00863623
0.0140868
-0.00573941
0.0132327
-0.00411713
0.0127987
-0.00283232
-0.00245992
0.0148394
-0.0312633
-0.0130226
0.0153555
-0.026564
0.0151509
-0.0219642
0.0144667
-0.016563
0.0135308
-0.0115297
0.0124906
-0.0075961
0.0115267
-0.00477544
0.0107028
-0.00329329
0.0101917
-0.00232122
-0.00216614
0.0126377
-0.0320996
-0.0118013
0.0125438
-0.0264702
0.0120482
-0.0214686
0.0112797
-0.0157945
0.0103979
-0.0106479
0.00947084
-0.00666909
0.00860259
-0.0039072
0.00785016
-0.00254086
0.00731179
-0.00178285
-0.0017943
0.00946607
-0.0321147
-0.00945101
0.00896825
-0.0259724
0.00834876
-0.0208491
0.0076149
-0.0150606
0.00686888
-0.00990188
0.00611017
-0.00591038
0.00538697
-0.00318399
0.0047477
-0.00190159
0.00424648
-0.00128163
-0.00141146
0.00563273
-0.0315375
-0.00620992
0.00492277
-0.0252624
0.00430285
-0.0202292
0.00367993
-0.0144377
0.00310945
-0.0093314
0.00255008
-0.00535101
0.00200609
-0.00264
0.00152203
-0.00141753
0.00111943
-0.000879033
-0.00107742
0.00151223
-0.0305843
-0.00246548
0.000729597
-0.0244798
0.000151933
-0.0196515
-0.00028171
-0.014004
-0.000690205
-0.00892291
-0.00103576
-0.00500545
-0.00138147
-0.00229429
-0.00168005
-0.00111895
-0.00193868
-0.000620405
-0.000834819
-0.00255517
-0.0294215
0.00139241
-0.00332341
-0.0237115
-0.00380075
-0.0191742
-0.00413243
-0.0136724
-0.00434415
-0.00871118
-0.00448855
-0.00486105
-0.00461697
-0.00216587
-0.00472017
-0.00101575
-0.00481911
-0.000521464
-0.000700656
-0.0063159
-0.0281771
0.00507146
-0.00703224
-0.0229952
-0.00743555
-0.0187708
-0.00763392
-0.013474
-0.00768892
-0.00865619
-0.0076419
-0.00490807
-0.00757218
-0.00223559
-0.00749381
-0.00109413
-0.00745261
-0.000562663
-0.000663959
-0.00961569
-0.0269459
0.00838452
-0.0102557
-0.0223552
-0.010606
-0.0184205
-0.010685
-0.013395
-0.0106126
-0.00872858
-0.0104044
-0.0051163
-0.0101735
-0.00246647
-0.0099554
-0.00131225
-0.00981444
-0.00070363
-0.000695929
-0.0123772
-0.0257885
0.0112198
-0.0129318
-0.0218007
-0.0132483
-0.0181039
-0.0132307
-0.0134126
-0.013066
-0.00889326
-0.0127424
-0.00543987
-0.0124048
-0.0028041
-0.0121056
-0.00161139
-0.0119153
-0.000893945
-0.000761446
-0.0145938
-0.0247325
0.0135378
-0.0150614
-0.0213331
-0.0153583
-0.017807
-0.0152761
-0.0134949
-0.0150572
-0.00911208
-0.0146758
-0.00582132
-0.0142931
-0.00318681
-0.013976
-0.00192847
-0.0137854
-0.00108453
-0.000825444
-0.0163076
-0.0237695
0.0153446
-0.0166897
-0.020951
-0.0169766
-0.01752
-0.0168685
-0.013603
-0.0166349
-0.00934564
-0.0162567
-0.00619953
-0.0158881
-0.00355544
-0.0156104
-0.00220615
-0.0154612
-0.00123373
-0.000855405
-0.017583
-0.0228561
0.0166696
-0.0178878
-0.0206463
-0.0181675
-0.0172403
-0.0180769
-0.0136936
-0.0178654
-0.00955705
-0.0175477
-0.00651725
-0.0172437
-0.00385946
-0.0170522
-0.00239763
-0.0169777
-0.00130824
-0.000821403
-0.0184643
-0.0219419
0.01755
-0.0187225
-0.020388
-0.018995
-0.0169678
-0.0189692
-0.0137194
-0.0188139
-0.00971235
-0.0186056
-0.00672557
-0.0184066
-0.00405848
-0.0183374
-0.00246682
-0.0183648
-0.00128081
-0.000695158
-0.0189758
-0.0210009
0.0180349
-0.0192594
-0.0201045
-0.0195221
-0.0167051
-0.0196035
-0.013638
-0.0195339
-0.00978193
-0.0194727
-0.00678672
-0.0194108
-0.00412045
-0.0194926
-0.00238496
-0.0196469
-0.00112651
-0.000448808
-0.0191953
-0.0200423
0.0182367
-0.0195811
-0.0197187
-0.019785
-0.0165013
-0.0199876
-0.0134354
-0.0200334
-0.00973614
-0.0201535
-0.00666659
-0.0202668
-0.00400711
-0.0205308
-0.00212095
-0.0208455
-0.000811882
-5.57767e-05
-0.0799538
-0.0190118
0.0789232
-0.0832869
-0.0163856
-0.0856634
-0.0141248
-0.0879357
-0.011163
-0.0891765
-0.00849541
-0.089996
-0.00584709
-0.0902375
-0.00376556
-0.0903917
-0.00196674
-0.0903446
-0.000859027
-2.62328e-05
-0.0999688
-0.0172756
0.0982326
-0.102377
-0.0139775
-0.104279
-0.0122224
-0.106153
-0.00928886
-0.107387
-0.00726185
-0.108314
-0.00492018
-0.108775
-0.00330435
-0.108987
-0.00175525
-0.108997
-0.0008486
-2.68331e-05
-0.120063
-0.01527
0.118057
-0.122142
-0.0118982
-0.123969
-0.0103954
-0.125587
-0.00767084
-0.126742
-0.00610731
-0.127565
-0.00409696
-0.127974
-0.00289486
-0.128135
-0.00159492
-0.128135
-0.000848065
-5.41471e-05
-0.141851
-0.0134173
0.139998
-0.143707
-0.0100423
-0.145352
-0.00875008
-0.146723
-0.0063003
-0.147704
-0.00512573
-0.148378
-0.00342341
-0.14871
-0.00256326
-0.148833
-0.00147129
-0.148827
-0.000854571
-7.34736e-05
-0.167025
-0.0114541
0.165062
-0.168622
-0.00844517
-0.170074
-0.00729765
-0.171229
-0.00514612
-0.172078
-0.00427675
-0.172662
-0.00283918
-0.17297
-0.00225551
-0.173124
-0.00131667
-0.173146
-0.000832678
-6.94547e-05
-0.197409
-0.00947616
0.195431
-0.198933
-0.00692165
-0.200337
-0.00589332
-0.2014
-0.00408269
-0.202199
-0.00347817
-0.202768
-0.0022706
-0.203141
-0.00188177
-0.203408
-0.00104977
-0.203544
-0.000697047
-1.42838e-05
-0.234211
-0.00725504
0.23199
-0.23614
-0.0049926
-0.23772
-0.0043141
-0.238768
-0.00303412
-0.239617
-0.00262919
-0.240268
-0.00161989
-0.240811
-0.00133913
-0.241284
-0.000576227
-0.241607
-0.000373834
7.20565e-05
-0.276899
-0.00475978
0.274403
-0.278123
-0.00376811
-0.279339
-0.003098
-0.280382
-0.00199147
-0.281372
-0.00163893
-0.282113
-0.000879401
-0.28281
-0.000641966
-0.283348
-3.78008e-05
-0.283733
1.13098e-05
0.000166705
-0.310249
-0.00236643
0.307856
-0.312827
-0.00118989
-0.314929
-0.000996464
-0.31622
-0.000700556
-0.317241
-0.000618315
-0.317792
-0.000328429
-0.318274
-0.000159596
-0.318468
0.000156739
-0.318615
0.000157811
0.000126826
-0.333323
0.330957
-0.334513
-0.33551
-0.33621
-0.336829
-0.337157
-0.337317
-0.33716
-0.337002
-0.0214025
0.0810364
0.0192893
-0.0225835
0.0994135
-0.0230943
0.118568
-0.0229852
0.139889
-0.0223115
0.164388
-0.0209062
0.194026
-0.018562
0.229646
-0.0132025
0.269044
-0.00803044
0.302684
0.322926
-0.0203912
0.0823928
0.0190349
-0.0213466
0.100369
-0.0216782
0.1189
-0.0214098
0.139621
-0.0206024
0.163581
-0.0191141
0.192537
-0.0166505
0.227183
-0.0123854
0.264779
-0.00701439
0.297313
0.315912
-0.0195068
0.0835011
0.0183985
-0.0202448
0.101107
-0.0204119
0.119067
-0.0200516
0.139261
-0.0192063
0.162735
-0.0177453
0.191076
-0.0153448
0.224782
-0.0114889
0.260923
-0.00633789
0.292162
0.309574
-0.0184621
0.0844778
0.0174854
-0.0190089
0.101654
-0.0190055
0.119063
-0.0185417
0.138797
-0.0176564
0.16185
-0.0162235
0.189643
-0.0139345
0.222493
-0.0104364
0.257425
-0.00562981
0.287355
0.303944
-0.0172317
0.0853417
0.0163678
-0.0176233
0.102045
-0.0174812
0.118921
-0.0169304
0.138246
-0.0160145
0.160934
-0.0146163
0.188245
-0.0124679
0.220345
-0.00929091
0.254248
-0.00495467
0.283019
0.29899
-0.01584
0.0860858
0.0150959
-0.0160808
0.102286
-0.0158236
0.118664
-0.0152087
0.137631
-0.0142801
0.160005
-0.0129347
0.1869
-0.0109512
0.218361
-0.00809853
0.251395
-0.00430494
0.279225
0.294685
-0.0143247
0.0867037
0.0137068
-0.0144128
0.102374
-0.0140487
0.1183
-0.0133817
0.136964
-0.0124538
0.159078
-0.0111801
0.185626
-0.00938398
0.216565
-0.00688064
0.248892
-0.00365158
0.275996
0.291033
-0.0127183
0.0871878
0.0122342
-0.0126586
0.102314
-0.012193
0.117834
-0.0114779
0.136249
-0.010557
0.158157
-0.00936748
0.184437
-0.0077766
0.214974
-0.00564748
0.246763
-0.00298595
0.273335
0.288047
-0.0110527
0.0875282
0.0107124
-0.0108532
0.102115
-0.0102927
0.117274
-0.00953209
0.135488
-0.00862059
0.157245
-0.00752203
0.183338
-0.00614732
0.213599
-0.00440664
0.245022
-0.00231114
0.271239
0.285736
-0.00936131
0.0877129
0.00917661
-0.00902939
0.101783
-0.00837968
0.116624
-0.00757549
0.134684
-0.00667436
0.156344
-0.00567047
0.182334
-0.00451764
0.212447
-0.00317056
0.243675
-0.00163712
0.269706
0.284099
-0.00768158
0.087725
0.00766943
-0.00722923
0.101331
-0.00648921
0.115884
-0.00564254
0.133837
-0.00475028
0.155452
-0.00383969
0.181424
-0.00290756
0.211515
-0.00195225
0.24272
-0.000971218
0.268725
0.283128
-0.00604662
0.0875574
0.00621427
-0.00549163
0.100776
-0.00466315
0.115056
-0.00377589
0.13295
-0.00288988
0.154566
-0.0020664
0.1806
-0.00134086
0.210789
-0.000760526
0.242139
-0.000322587
0.268287
0.282805
-0.00451642
0.0872265
0.00484731
-0.00386013
0.100119
-0.00295266
0.114148
-0.00202715
0.132025
-0.00114859
0.153687
-0.000412863
0.179865
0.000117073
0.210259
0.000375012
0.241881
0.000298153
0.268364
0.283103
-0.00312277
0.08676
0.00358932
-0.00236223
0.0993587
-0.00139685
0.113183
-0.000449015
0.131077
0.000461635
0.152777
0.00119951
0.179127
0.00157537
0.209883
0.00147342
0.241983
0.000895548
0.268942
0.283999
-0.00188725
0.0861975
0.00244973
-0.00101956
0.098491
-6.94842e-05
0.112233
0.00108031
0.129927
0.00204508
0.151812
0.00271766
0.178454
0.00293063
0.20967
0.00251668
0.242397
0.00146793
0.26999
0.285467
-0.000825374
0.0855982
0.00142462
0.000136182
0.0975295
0.00131952
0.11105
0.00246515
0.128781
0.00344205
0.150835
0.00407922
0.177817
0.0041569
0.209593
0.00346438
0.24309
0.0019858
0.271469
0.287453
3.3918e-05
0.0850826
0.000481744
0.00130342
0.09626
0.00249027
0.109863
0.00368383
0.127588
0.00469669
0.149822
0.00532576
0.177188
0.0053024
0.209616
0.00436341
0.244029
0.00248502
0.273347
0.289938
0.000986966
0.0844716
-0.000376004
0.00223221
0.0950147
0.00344466
0.10865
0.00467315
0.126359
0.00571553
0.14878
0.00634236
0.176561
0.00624613
0.209712
0.0051121
0.245163
0.00289579
0.275564
0.292833
0.0018497
0.0838069
-0.00118498
0.00312327
0.0937412
0.00435758
0.107416
0.00561467
0.125102
0.00669472
0.1477
0.00733455
0.175921
0.007179
0.209868
0.00585818
0.246484
0.0033156
0.278106
0.296149
0.00221436
0.0834998
-0.0019073
0.00351213
0.0924434
0.00476755
0.106161
0.00602535
0.123844
0.00712699
0.146598
0.00779551
0.175253
0.00764813
0.210015
0.00626153
0.24787
0.00353058
0.280837
0.29968
-0.0697233
0.0760257
0.0771975
-0.0622441
0.0849642
-0.0563406
0.100257
-0.0500696
0.117573
-0.0435977
0.140126
-0.0367598
0.168415
-0.0291561
0.202411
-0.0203986
0.239113
-0.0104417
0.27088
0.289238
-0.0836403
0.068709
0.090957
-0.0760087
0.0773325
-0.0688463
0.0930946
-0.0612766
0.110004
-0.0537545
0.132604
-0.0457434
0.160404
-0.0366513
0.193319
-0.0259923
0.228454
-0.0137485
0.258636
0.275489
-0.0981061
0.0607793
0.106036
-0.0897392
0.0689655
-0.0819009
0.0852564
-0.0737595
0.101862
-0.0651968
0.124041
-0.0555661
0.150773
-0.0444304
0.182184
-0.0312537
0.215277
-0.0159236
0.243306
0.259566
-0.114737
0.0531537
0.122363
-0.106538
0.0607662
-0.0987995
0.0775178
-0.0899001
0.092963
-0.0799705
0.114112
-0.0685582
0.139361
-0.0551271
0.168753
-0.0391197
0.199269
-0.0207183
0.224905
0.238847
-0.134777
0.0453322
0.142598
-0.127312
0.0533016
-0.118572
0.068778
-0.107931
0.0823213
-0.0962331
0.102414
-0.0824596
0.125587
-0.0660005
0.152294
-0.0462186
0.179488
-0.0233602
0.202047
0.215487
-0.161522
0.0380707
0.168784
-0.153288
0.0450672
-0.143044
0.0585346
-0.131272
0.0705494
-0.118013
0.0891551
-0.101483
0.109057
-0.0813314
0.132142
-0.0570986
0.155255
-0.0303334
0.175281
0.185154
-0.191425
0.0293234
0.200172
-0.182331
0.0359729
-0.170772
0.0469764
-0.157228
0.0570047
-0.140828
0.0727556
-0.119874
0.0881024
-0.0942747
0.106543
-0.064228
0.125208
-0.0317456
0.142799
0.153408
-0.229843
0.0211252
0.238041
-0.219655
0.0257846
-0.206529
0.0338508
-0.190586
0.0410614
-0.170322
0.0524911
-0.144763
0.0625439
-0.1143
0.0760798
-0.0793342
0.0902419
-0.0422733
0.105738
0.111135
-0.263862
0.0103065
0.274681
-0.250869
0.0127921
-0.233914
0.0168955
-0.213602
0.0207491
-0.187813
0.0267026
-0.156811
0.0315413
-0.119887
0.039156
-0.076385
0.0467399
-0.0283845
0.0577377
0.0827505
-0.335065
0.345371
-0.322273
-0.305377
-0.284628
-0.257925
-0.226384
-0.187228
-0.140488
-0.0827505
-0.000572968
0.0796793
-0.00190883
-0.00259946
0.0929834
-0.00428476
0.107721
-0.0055979
0.123676
-0.0064939
0.143494
-0.00692065
0.16921
-0.00669658
0.199948
-0.005548
0.236893
-0.00423745
0.27337
0.341134
0.000111777
0.0822911
-0.00272357
-0.0021
0.0951952
-0.00395216
0.109573
-0.00533279
0.125057
-0.00627364
0.144435
-0.00671207
0.169649
-0.00656656
0.199803
-0.00546928
0.235796
-0.00380814
0.271709
0.337326
0.00111858
0.0846835
-0.00351098
-0.00125301
0.0975668
-0.00314648
0.111467
-0.00455797
0.126468
-0.00552278
0.1454
-0.00597684
0.170103
-0.00592998
0.199756
-0.00494977
0.234815
-0.00347329
0.270232
0.333852
0.00199126
0.0869693
-0.00427713
-0.000446706
0.100005
-0.00225067
0.113271
-0.00364628
0.127864
-0.00458912
0.146343
-0.00506957
0.170583
-0.00508727
0.199774
-0.00430081
0.234029
-0.00305534
0.268987
0.330797
0.00285058
0.0891453
-0.00502656
0.000432483
0.102423
-0.00136188
0.115065
-0.0027208
0.129223
-0.0036228
0.147245
-0.00410763
0.171068
-0.00418173
0.199848
-0.00358894
0.233436
-0.00259722
0.267995
0.3282
0.00374219
0.0911498
-0.00574667
0.00145753
0.104708
-0.000411294
0.116934
-0.00172135
0.130533
-0.00258632
0.14811
-0.00307335
0.171555
-0.00322157
0.199996
-0.00281973
0.233034
-0.00210842
0.267284
0.326091
0.00465239
0.0929164
-0.00641901
0.00251422
0.106846
0.000704581
0.118744
-0.000629787
0.131867
-0.00144913
0.148929
-0.00194412
0.17205
-0.00218378
0.200236
-0.00198359
0.232834
-0.00158062
0.266881
0.324511
0.00555418
0.0943832
-0.00702098
0.00360171
0.108798
0.00188852
0.120457
0.000585173
0.133171
-0.000224679
0.149739
-0.000731731
0.172557
-0.00103931
0.200543
-0.00108347
0.232878
-0.00100843
0.266806
0.323502
0.00641845
0.0954883
-0.00752358
0.00469378
0.110523
0.0030892
0.122061
0.00187587
0.134384
0.00108839
0.150526
0.000569005
0.173077
0.000201267
0.200911
-0.000148667
0.233228
-0.000389157
0.267046
0.323113
0.00722613
0.0961537
-0.00789153
0.00576146
0.111988
0.00430006
0.123523
0.00316759
0.135516
0.00241638
0.151278
0.00191908
0.173574
0.00141973
0.20141
0.000881828
0.233766
0.000243701
0.267684
0.323357
0.00795946
0.0962783
-0.00808404
0.00680531
0.113142
0.00551364
0.124814
0.00445974
0.13657
0.0037514
0.151986
0.00325935
0.174066
0.00267456
0.201995
0.00189934
0.234541
0.000857825
0.268726
0.324215
0.00858446
0.0957776
-0.00808373
0.00780164
0.113924
0.00671934
0.125897
0.00575039
0.137539
0.00508215
0.152654
0.00459844
0.17455
0.00393454
0.202659
0.00291939
0.235556
0.00149139
0.270154
0.325706
0.00905453
0.0945886
-0.00786553
0.00870169
0.114277
0.0078803
0.126718
0.00700921
0.13841
0.00638198
0.153281
0.00591318
0.175019
0.005177
0.203395
0.00393852
0.236795
0.00212772
0.271965
0.327834
0.00933248
0.092681
-0.00742489
0.00947137
0.114138
0.00896789
0.127222
0.00820612
0.139172
0.00762548
0.153862
0.00717294
0.175471
0.00637569
0.204192
0.00493514
0.238235
0.00275193
0.274148
0.330586
0.00937322
0.090082
-0.0067742
0.0100832
0.113428
0.0099553
0.12735
0.00932285
0.139804
0.00879955
0.154385
0.00836404
0.175907
0.00752491
0.205031
0.00590399
0.239856
0.00336382
0.276688
0.33395
0.00914247
0.0868871
-0.0059476
0.0105027
0.112068
0.0107862
0.127066
0.0103157
0.140275
0.00985906
0.154842
0.00944142
0.176324
0.0085823
0.205891
0.00680961
0.241629
0.00394375
0.279554
0.337893
0.00863764
0.0832503
-0.00500084
0.0107402
0.109966
0.0114711
0.126335
0.0112111
0.140535
0.0108294
0.155224
0.0104327
0.176721
0.00957422
0.206749
0.00766981
0.243533
0.00450102
0.282723
0.342394
0.00783824
0.0794199
-0.0040078
0.010703
0.107101
0.0118652
0.125173
0.0118759
0.140524
0.0115933
0.155506
0.011228
0.177086
0.0103959
0.207581
0.00841608
0.245513
0.00500209
0.286137
0.347396
0.00692955
0.0755634
-0.00307305
0.0106422
0.103388
0.0122551
0.12356
0.0125524
0.140227
0.0123483
0.15571
0.0120017
0.177433
0.0111864
0.208396
0.00912604
0.247574
0.00547381
0.289789
0.35287
0.00542651
0.0723909
-0.00225402
0.00974597
0.0990688
0.0118801
0.121426
0.0126205
0.139487
0.0126059
0.155725
0.0123321
0.177707
0.0116232
0.209105
0.00958303
0.249614
0.00584243
0.29353
0.358713
-0.063097
0.0597184
0.0757696
-0.050241
0.0862127
-0.0398978
0.111083
-0.0311329
0.130722
-0.0250977
0.14969
-0.0200087
0.172618
-0.0145768
0.203673
-0.00917198
0.244209
-0.00473761
0.289095
0.353975
-0.093009
0.0474046
0.105323
-0.0769828
0.0701866
-0.0607817
0.0948815
-0.0477094
0.117649
-0.0383458
0.140326
-0.0306076
0.16488
-0.0229722
0.196038
-0.0148249
0.236062
-0.00735808
0.281628
0.346617
-0.122299
0.0345457
0.135157
-0.104602
0.0524897
-0.0860951
0.0763749
-0.0689982
0.100553
-0.054935
0.126263
-0.0434804
0.153425
-0.0329616
0.185519
-0.0215193
0.224619
-0.0103164
0.270425
0.336301
-0.145964
0.0237014
0.156808
-0.130956
0.0374813
-0.113392
0.0588108
-0.0940037
0.0811646
-0.0761151
0.108374
-0.0596443
0.136954
-0.0445922
0.170467
-0.0289874
0.209015
-0.0136863
0.255124
0.322614
-0.162409
0.0161867
0.169924
-0.152035
0.0271076
-0.137653
0.0444282
-0.119618
0.0631297
-0.100193
0.0889501
-0.079248
0.116009
-0.0591212
0.15034
-0.0382935
0.188187
-0.0174874
0.234318
0.305127
-0.174591
0.0121804
0.178597
-0.167723
0.0202393
-0.156766
0.0334718
-0.141891
0.0482544
-0.123064
0.0701234
-0.100479
0.093423
-0.0763988
0.12626
-0.0497376
0.161526
-0.0231165
0.207697
0.28201
-0.189002
0.00921851
0.191964
-0.184249
0.0154864
-0.175917
0.025139
-0.163961
0.0362991
-0.146787
0.0529492
-0.125051
0.071687
-0.0978153
0.0990247
-0.0651071
0.128818
-0.0311869
0.173777
0.250824
-0.216493
0.00626938
0.219442
-0.211571
0.0105651
-0.203744
0.0173115
-0.192485
0.0250404
-0.175848
0.0363125
-0.153896
0.0497347
-0.12398
0.0691086
-0.087219
0.0920565
-0.0456958
0.132254
0.205128
-0.277906
0.00257497
0.281601
-0.272293
0.0049523
-0.263257
0.00827498
-0.250656
0.0124395
-0.232499
0.0181552
-0.208389
0.0256255
-0.175371
0.0360901
-0.133182
0.0498675
-0.0761903
0.075262
0.128937
-0.359605
0.36218
-0.354652
-0.346377
-0.333938
-0.315783
-0.290157
-0.254067
-0.204199
-0.128937
-0.00783273
0.0819794
0.00162288
-0.0127759
0.110266
-0.0157333
0.138115
-0.0162154
0.157291
-0.0148489
0.168557
-0.0127575
0.176506
-0.0105397
0.189746
-0.00872086
0.217623
-0.00575021
0.27863
0.356429
-0.00883698
0.0876611
0.00315527
-0.0137018
0.115131
-0.0162223
0.140635
-0.0162381
0.157306
-0.0146443
0.166963
-0.0124852
0.174347
-0.010309
0.18757
-0.0085752
0.215889
-0.0056395
0.275694
0.35079
-0.00917047
0.0925499
0.00428166
-0.0133613
0.119322
-0.0153434
0.142617
-0.0151218
0.157085
-0.0135371
0.165379
-0.0115077
0.172317
-0.00953243
0.185595
-0.00790479
0.214262
-0.00522173
0.273011
0.345568
-0.00913225
0.0967699
0.0049123
-0.0125465
0.122736
-0.0139718
0.144043
-0.0135526
0.156666
-0.0120969
0.163923
-0.0103296
0.17055
-0.00859033
0.183856
-0.00713669
0.212808
-0.00473229
0.270607
0.340836
-0.00872594
0.100448
0.0050478
-0.0115309
0.125541
-0.0124953
0.145007
-0.0119563
0.156127
-0.0106159
0.162583
-0.00907952
0.169014
-0.0075696
0.182346
-0.00630097
0.211539
-0.00418648
0.268492
0.336649
-0.00788095
0.103623
0.00470573
-0.0101941
0.127854
-0.0108556
0.145669
-0.0102728
0.155544
-0.00908187
0.161392
-0.00776443
0.167696
-0.00648472
0.181066
-0.00539774
0.210452
-0.00359062
0.266685
0.333059
-0.00660317
0.106316
0.00390991
-0.00847941
0.12973
-0.00895372
0.146143
-0.00842417
0.155014
-0.00744162
0.160409
-0.00636273
0.166617
-0.00533006
0.180033
-0.00442518
0.209547
-0.00295235
0.265212
0.330106
-0.00493354
0.108552
0.00269843
-0.00644133
0.131238
-0.00680955
0.146511
-0.00640988
0.154615
-0.00568638
0.159686
-0.00487069
0.165802
-0.00409291
0.179255
-0.00338954
0.208844
-0.0022791
0.264102
0.327827
-0.00291513
0.110348
0.00111835
-0.00414671
0.13247
-0.00448132
0.146846
-0.00426759
0.154401
-0.00383994
0.159258
-0.00330396
0.165266
-0.00278263
0.178734
-0.00230852
0.20837
-0.00157825
0.263372
0.326249
-0.000575853
-0.000763156
-0.00165484
-0.00200288
-0.00203366
-0.00191553
-0.00168725
-0.00140643
-0.00120529
-0.000849074
2.62164e-05
-0.00148908
0.00028768
-0.00277818
0.000823614
-0.00303569
0.0016521
-0.0026603
0.00278794
-0.0018784
0.00424457
-0.000829061
0.00603052
0.000393188
0.00813891
0.00171448
0.0105161
0.00305095
0.00422511
6.35898e-05
-0.00155267
0.000382445
-0.00309703
0.000966999
-0.00362024
0.00181296
-0.00350627
0.00291662
-0.00298206
0.00427729
-0.00218973
0.00589449
-0.00122401
0.00776203
-0.00015306
0.00986186
0.000951121
0.00190709
0.00012006
-0.00167273
0.000526731
-0.0035037
0.00120271
-0.00429622
0.00212371
-0.00442726
0.00327046
-0.00412881
0.00463138
-0.00355065
0.00620173
-0.00279436
0.0079818
-0.00193313
0.0099734
-0.00104049
-0.000269373
0.00018916
-0.00186189
0.000701535
-0.00401608
0.00149282
-0.00508751
0.0025221
-0.00545654
0.00375917
-0.00536588
0.00518552
-0.00497701
0.00679312
-0.00440195
0.00858228
-0.00372229
0.0105553
-0.00301353
-0.0023936
0.000261513
-0.00212341
0.000878505
-0.00463307
0.0017793
-0.0059883
0.00290842
-0.00658567
0.00422816
-0.00668562
0.0057163
-0.00646515
0.00736234
-0.00604799
0.00916327
-0.00552322
0.0111148
-0.00496506
-0.00445764
0.000326336
-0.00244974
0.00102548
-0.00533221
0.00199742
-0.00696025
0.00317297
-0.00776121
0.00450878
-0.00802144
0.00598113
-0.00793749
0.00757863
-0.00764549
0.00929566
-0.00724026
0.0111225
-0.00679188
-0.00635772
0.000373065
-0.00282281
0.00111233
-0.00607147
0.00208977
-0.00793769
0.00322362
-0.00889507
0.00446688
-0.0092647
0.00579649
-0.00926711
0.00720279
-0.00905178
0.00868094
-0.0087184
0.0102218
-0.00833275
-0.00793724
0.000392777
-0.00321559
0.00111588
-0.00679458
0.00201703
-0.00883883
0.00300552
-0.00988355
0.00403434
-0.0102935
0.00508464
-0.0103174
0.00615218
-0.0101193
0.00723745
-0.00980368
0.00833857
-0.00943387
-0.00904968
0.000379264
-0.00359485
0.00102321
-0.00743853
0.00176405
-0.00957967
0.00250924
-0.0106287
0.00321768
-0.011002
0.00387951
-0.0109792
0.00449994
-0.0107397
0.00508854
-0.0103923
0.00565441
-0.00999974
-0.00960519
0.000329642
-0.00392449
0.000833008
-0.00794189
0.00134047
-0.0100871
0.00176748
-0.0110558
0.00208572
-0.0113202
0.00229882
-0.0111923
0.00242402
-0.0108649
0.00248109
-0.0104494
0.00248853
-0.0100072
-0.00958214
0.000264278
-0.00418877
0.000582351
-0.00825997
0.000804831
-0.0103096
0.000868895
-0.0111198
0.000766307
-0.0112176
0.00051737
-0.0109434
0.00015159
-0.0104992
-0.000302738
-0.00999502
-0.00082223
-0.00948769
-0.00901196
0.000156439
-0.00434521
0.000245353
-0.00834888
0.000153017
-0.0102173
-0.000155339
-0.0108115
-0.000665837
-0.0107071
-0.00134368
-0.0102656
-0.00215053
-0.00969231
-0.00305432
-0.00909124
-0.00403203
-0.00850997
-0.00797253
2.61907e-05
-0.0043714
-0.000136103
-0.00818658
-0.000548995
-0.00980438
-0.00121289
-0.0101476
-0.00209403
-0.00982596
-0.00314636
-0.00921324
-0.00432736
-0.00851132
-0.00560502
-0.00781358
-0.00695936
-0.00715563
-0.00654737
-0.000118435
-0.00425297
-0.000538624
-0.0077664
-0.00125744
-0.00908556
-0.00224135
-0.00916366
-0.00343987
-0.00862744
-0.0048012
-0.00785191
-0.00628289
-0.00702963
-0.00785553
-0.00624094
-0.00950248
-0.00550868
-0.00483002
-0.000268684
-0.00398428
-0.000938663
-0.00709642
-0.0019352
-0.00808903
-0.00319249
-0.00790638
-0.00464882
-0.0071711
-0.00625172
-0.00624901
-0.00796219
-0.00531915
-0.00975473
-0.0044484
-0.0116149
-0.00364851
-0.00290708
-0.000416347
-0.00356794
-0.00131709
-0.00619568
-0.00255428
-0.00685184
-0.00403395
-0.00642671
-0.00568834
-0.00551671
-0.00746835
-0.004469
-0.00934099
-0.00344651
-0.0112856
-0.00250374
-0.0132894
-0.00164479
-0.000851882
-0.000554359
-0.00301358
-0.00165915
-0.00509088
-0.0030961
-0.00541489
-0.00474774
-0.00477506
-0.00654421
-0.00372024
-0.00844235
-0.00257087
-0.0104168
-0.00147207
-0.0124532
-0.000467336
-0.0145412
0.000443247
0.00127651
-0.000677178
-0.0023364
-0.00195484
-0.00381322
-0.00355065
-0.00381907
-0.00532818
-0.00299754
-0.00721764
-0.00183078
-0.00918224
-0.00060627
-0.0112043
0.00054999
-0.0132771
0.00160544
-0.0153958
0.00256202
0.00343071
-0.000780829
-0.00155557
-0.00219822
-0.00239584
-0.00391483
-0.00210246
-0.00577951
-0.00113286
-0.00772343
0.000113138
-0.00971445
0.00138474
-0.0117395
0.00257507
-0.0137973
0.00366323
-0.015891
0.0046557
0.0055746
-0.000862667
-0.000692903
-0.00238637
-0.000872136
-0.00418994
-0.000298881
-0.00611258
0.00078978
-0.00808843
0.00208899
-0.0100898
0.00338606
-0.0121047
0.00458998
-0.0141291
0.0056877
-0.0161718
0.00669838
0.00763954
-0.000922181
0.000229278
-0.00252035
0.000726031
-0.00438097
0.00156174
-0.00633953
0.00274834
-0.00833948
0.00408893
-0.0103687
0.00541527
-0.0124372
0.00665851
-0.0145728
0.00782331
-0.0168255
0.0089511
0.0101033
-0.000955526
0.0011848
-0.00259257
0.00236308
-0.0044781
0.00344726
-0.00644673
0.00471697
-0.00844943
0.00609163
-0.010482
0.00744784
-0.0125559
0.00873238
-0.0146832
0.00995068
-0.0168608
0.0111287
0.0122774
-0.000962113
0.00214692
-0.00260381
0.00400478
-0.00448227
0.00532572
-0.00643037
0.00666508
-0.00840093
0.00806219
-0.0103886
0.00943553
-0.0123962
0.0107399
-0.0144185
0.011973
-0.0164333
0.0131435
0.0142426
-0.000942565
0.00308948
-0.00255538
0.0056176
-0.00439478
0.00716511
-0.00629058
0.00856088
-0.00819305
0.00996467
-0.0100925
0.0113349
-0.0119844
0.0126319
-0.0138581
0.0138467
-0.0156961
0.0149815
0.0160319
-0.000898484
0.00398797
-0.00245077
0.00716989
-0.00422104
0.00893538
-0.00603548
0.0103753
-0.00783979
0.011769
-0.00962022
0.0131154
-0.0113699
0.0143816
-0.0130804
0.0155571
-0.0147447
0.0166458
0.0176551
-0.000832395
0.00482036
-0.0022955
0.00863299
-0.00396992
0.0106098
-0.00567874
0.0120841
-0.00736247
0.0134527
-0.00900466
0.0147576
-0.0105993
0.0159763
-0.012143
0.0171008
-0.0136377
0.0181404
0.0191133
-0.000747562
0.00556792
-0.0020967
0.00998213
-0.00365268
0.0121658
-0.00523694
0.0136684
-0.0067848
0.0150006
-0.00827795
0.0162507
-0.00971236
0.0174107
-0.0110893
0.0184778
-0.012416
0.019467
0.0204041
-0.000647733
0.00621566
-0.00186249
0.0111969
-0.00328187
0.0135852
-0.00472769
0.0151142
-0.00613029
0.0164032
-0.00746952
0.0175899
-0.00874292
0.0186841
-0.00995476
0.0196897
-0.0111141
0.0206263
0.0215242
-0.000536814
0.00675247
-0.00160148
0.0122616
-0.00287043
0.0148541
-0.00416837
0.0164121
-0.00542095
0.0176558
-0.00660565
0.0187746
-0.00772035
0.0197988
-0.00877037
0.0207397
-0.00976426
0.0216202
0.0224723
-0.000418374
0.00717084
-0.00132214
0.0131653
-0.00243106
0.015963
-0.00357545
0.0175565
-0.00467684
0.0187572
-0.00570956
0.0198073
-0.00667054
0.0207598
-0.00756444
0.0216336
-0.0083978
0.0224536
0.0232511
-0.000328772
0.00749962
-0.00107613
0.0139127
-0.00202025
0.0169071
-0.00300609
0.0185424
-0.00395384
0.0197049
-0.00483469
0.0206882
-0.00564364
0.0215687
-0.00638366
0.0223736
-0.00705856
0.0231285
0.023862
-0.000218304
0.00771792
-0.000799608
0.014494
-0.00157537
0.0176829
-0.00240399
0.019371
-0.00320414
0.020505
-0.00394321
0.0214273
-0.00461343
0.0222389
-0.00521546
0.0229757
-0.0057503
0.0236633
0.024326
-0.000112889
0.00783081
-0.000529339
0.0149104
-0.00113636
0.0182899
-0.00180934
0.020044
-0.00246689
0.0211626
-0.00307275
0.0220331
-0.00361591
0.0227821
-0.00409458
0.0234543
-0.00450758
0.0240763
0.0246657
-1.5301e-05
0.00784611
-0.000271081
0.0151662
-0.000711646
0.0187305
-0.00123216
0.0205645
-0.00175304
0.0216835
-0.00223499
0.0225151
-0.00266376
0.0232109
-0.00303512
0.0238257
-0.0033468
0.024388
0.0249082
7.38608e-05
0.00777225
-2.5308e-05
0.0152654
-0.00030828
0.0190135
-0.000680749
0.020937
-0.00107116
0.0220739
-0.00143846
0.0228824
-0.00176545
0.0235379
-0.00204539
0.0241056
-0.00227542
0.024618
0.0250825
0.000150711
0.00762154
0.000189856
0.0152262
6.7077e-05
0.0191362
-0.000161732
0.0211658
-0.000427771
0.0223399
-0.000688771
0.0231434
-0.000925351
0.0237744
-0.00112866
0.0243089
-0.00129298
0.0247823
0.0252142
0.00021623
0.00740531
0.000385736
0.0150567
0.000410058
0.0191119
0.000319684
0.0212561
0.000172578
0.022487
1.07228e-05
0.0233052
-0.00014409
0.0239293
-0.000282677
0.0244475
-0.00040064
0.0249003
0.0252953
0.000270047
0.00713526
0.000556616
0.0147702
0.000718993
0.0189495
0.000760399
0.0212147
0.000727186
0.0225203
0.000659014
0.0233734
0.000579256
0.024009
0.000501082
0.0245257
0.000429977
0.0249714
0.0253493
0.000312306
0.00682295
0.000701595
0.0143809
0.000991477
0.0186597
0.0011582
0.021048
0.00123424
0.0224442
0.00125482
0.0233528
0.00124329
0.0240205
0.0012184
0.0245506
0.00120073
0.0249891
0.025365
0.000343638
0.00647931
0.000820982
0.0139035
0.00122705
0.0182536
0.00151229
0.0207628
0.00169363
0.0222629
0.00180002
0.0232464
0.00185264
0.0239679
0.00186959
0.0245336
0.00189217
0.0249665
0.0253499
0.000363552
0.00611576
0.000916814
0.0133503
0.00143126
0.0177392
0.00183255
0.0203615
0.00212016
0.0219753
0.00231293
0.0230536
0.00242335
0.0238575
0.00244246
0.0245145
0.00231306
0.0250959
0.0257541
0.00038331
0.00573245
0.000999938
0.0127336
0.00160817
0.0171309
0.00211399
0.0198557
0.0025007
0.0215886
0.0027772
0.0227771
0.0029508
0.0236839
0.00301431
0.024451
0.00294116
0.025169
0.0259717
0.000394399
0.00533805
0.00106107
0.012067
0.00175153
0.0164405
0.00235558
0.0192516
0.00284178
0.0211024
0.00321023
0.0224087
0.00346552
0.0234286
0.00360458
0.024312
0.00361581
0.0251578
0.0260765
0.00039861
0.00493944
0.00110308
0.0113625
0.00186404
0.0156795
0.00255899
0.0185567
0.00314338
0.020518
0.00360858
0.0219435
0.00395543
0.0230818
0.00418178
0.0240856
0.00428321
0.0250564
0.0260826
0.000397661
0.00454178
0.00112895
0.0106312
0.00194849
0.01486
0.00272544
0.0177797
0.00340395
0.0198395
0.00396669
0.0213808
0.00440999
0.0226385
0.00473167
0.023764
0.00493159
0.0248565
0.0259876
0.000393181
0.0041486
0.00114167
0.00988273
0.0020078
0.0139938
0.00285623
0.0169313
0.00362205
0.0190736
0.00427987
0.0207229
0.00482132
0.022097
0.00524336
0.0233419
0.00554725
0.0245526
0.0257882
0.000386638
0.00376196
0.00114405
0.00912531
0.00204479
0.0130931
0.0029526
0.0160235
0.00379606
0.0182302
0.00454287
0.0199761
0.00518008
0.0214598
0.00570292
0.0228191
0.00611228
0.0241432
0.0254815
0.000379254
0.00338271
0.0011385
0.00836607
0.00206191
0.0121697
0.00301536
0.01507
0.00392364
0.0173219
0.00474912
0.0191506
0.00547473
0.0207342
0.00609369
0.0222001
0.00660601
0.0236309
0.0250665
0.000371946
0.00301076
0.00112683
0.00761119
0.00206089
0.0112356
0.00304456
0.0140863
0.00400154
0.0163649
0.00489071
0.0182615
0.00569185
0.019933
0.00639649
0.0214955
0.0070039
0.0230235
0.0245468
0.000365298
0.00264547
0.00111023
0.00686625
0.00204269
0.0103032
0.00303951
0.0130895
0.00402572
0.0153787
0.00495883
0.0173284
0.00581682
0.0190751
0.00659023
0.0207221
0.00727812
0.0223356
0.0239334
0.000344157
0.00230131
0.00106351
0.0061469
0.00197633
0.00939036
0.00296581
0.0121
0.00395954
0.014385
0.0049151
0.0163728
0.00580984
0.0181803
0.00663418
0.0198977
0.00738786
0.0215819
0.0232372
0.000335893
0.00196542
0.00103243
0.00545037
0.00191715
0.00850563
0.00288134
0.0111358
0.00385766
0.0134087
0.00480626
0.0154242
0.00570591
0.0172807
0.0065484
0.0190552
0.0073355
0.0207948
0.022489
0.000326681
0.00163873
0.000993826
0.00478322
0.00183693
0.00766253
0.00275577
0.010217
0.00368944
0.012475
0.00460236
0.0145113
0.00547622
0.0164068
0.00630547
0.018226
0.007095
0.0200053
0.0217185
0.000315445
0.00132329
0.000945777
0.00415289
0.00173362
0.00687469
0.00258748
0.00936314
0.00345399
0.0116085
0.00430321
0.0136621
0.00512114
0.0155889
0.00590583
0.0174413
0.00666569
0.0192454
0.0209593
0.000301177
0.00102211
0.000886744
0.00356732
0.00160617
0.00615526
0.00237703
0.00859228
0.00315432
0.0108312
0.00391495
0.0129014
0.00465022
0.0148536
0.00536234
0.0167292
0.00606239
0.0185454
0.0202474
0.000283139
0.000738975
0.000815997
0.00303446
0.00145521
0.00551605
0.00212774
0.00791975
0.00279775
0.0101612
0.00344996
0.0122492
0.00408181
0.0142217
0.00469998
0.016111
0.0053165
0.0179288
0.0196164
0.000260986
0.000477989
0.000733908
0.00256154
0.00128327
0.00496669
0.00184578
0.00735724
0.00239528
0.00961171
0.00292517
0.0117193
0.00343989
0.013707
0.00395144
0.0155995
0.00447226
0.017408
0.0190878
0.000234849
0.00024314
0.000642072
0.00215432
0.00109486
0.0045139
0.00153967
0.00691243
0.00196013
0.00919124
0.00235899
0.0113205
0.00274903
0.013317
0.0031499
0.0151986
0.00357941
0.0169785
0.0186594
0.000205369
3.77709e-05
0.000543301
0.00181639
0.00089619
0.00416101
0.00121953
0.00658909
0.00150595
0.00890482
0.00176733
0.0110591
0.00202591
0.0130584
0.0023125
0.014912
0.00267066
0.0166203
0.018257
0.000173686
-0.000135915
0.000441527
0.00154855
0.000694908
0.00390763
0.000896442
0.00638755
0.00104532
0.00875594
0.00116105
0.0109434
0.00127824
0.0129412
0.00144678
0.0147435
0.00174521
0.0163219
0.0177482
0.00014144
-0.000277355
0.000341994
0.00134799
0.000501347
0.00374828
0.000585269
0.00630363
0.000591173
0.00875003
0.000526336
0.0110082
0.000389426
0.0130781
0.000137762
0.0149951
-0.000399302
0.016859
0.0189718
0.000111081
-0.000388436
0.000251661
0.00120741
0.000327026
0.00367291
0.00030179
0.00632887
0.000166591
0.00888523
-8.63719e-05
0.0112612
-0.000484719
0.0134765
-0.00109507
0.0156055
-0.00200913
0.017773
0.0201179
8.39866e-05
-0.000472422
0.000174989
0.00111641
0.000182496
0.00366541
6.75263e-05
0.00644384
-0.000185065
0.00913782
-0.000593216
0.0116693
-0.00118876
0.014072
-0.00201615
0.0164329
-0.0030892
0.0188461
0.0213104
6.21498e-05
-0.000534572
0.000117723
0.00106084
7.92399e-05
0.00370389
-9.63528e-05
0.00661943
-0.000430964
0.00947244
-0.000944131
0.0121825
-0.00166101
0.0147889
-0.0025984
0.0173703
-0.00372341
0.0199711
0.0224993
4.71551e-05
-0.000581728
8.43608e-05
0.00102363
2.63063e-05
0.00376194
-0.000175265
0.006821
-0.000546987
0.00984416
-0.00110685
0.0127423
-0.0018681
0.0155502
-0.00282336
0.0183255
-0.00391746
0.0210652
0.0236296
3.99123e-05
-0.00062164
7.75925e-05
0.000985951
2.88119e-05
0.00381073
-0.000159056
0.00700887
-0.000517849
0.010203
-0.00106171
0.0132862
-0.00179174
0.0162802
-0.00268437
0.0192182
-0.0036806
0.0220614
0.0246547
4.04299e-05
-0.00066207
9.7355e-05
0.000929026
8.92605e-05
0.00381882
-4.5226e-05
0.00714335
-0.000339198
0.0104969
-0.000804668
0.0137517
-0.00143367
0.0169092
-0.00219524
0.0199797
-0.00303709
0.0229033
0.0255275
4.77204e-05
-0.00070979
0.000140382
0.000836365
0.000200117
0.00375909
0.000160012
0.00718346
-1.89374e-05
0.0106759
-0.000347712
0.0140805
-0.000814157
0.0173756
-0.0013867
0.0205523
-0.00202413
0.0235407
0.0262018
5.98559e-05
-0.000769646
0.000201037
0.000695185
0.000352307
0.00360782
0.000442122
0.00709364
0.000423889
0.0106941
0.000283208
0.0142211
3.20882e-05
0.0176267
-0.000302151
0.0208865
-0.00069044
0.023929
0.0266298
7.40069e-05
0.000271278
0.000530979
0.000778895
0.000959431
0.00105054
0.00105898
0.00100511
0.000906038
)
;
boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value nonuniform List<scalar>
40
(
0.0964566
0.137659
0.174168
0.193586
0.200262
0.202792
0.210263
0.235233
0.283395
0.334743
0.0213961
0.0194426
0.0173838
0.0151375
0.0126457
0.00989795
0.00693994
0.00386365
0.000785392
-0.00218128
-0.00495328
-0.00748931
-0.00978247
-0.0118498
-0.0137214
-0.0154313
-0.0170117
-0.0184911
-0.0198933
-0.0212385
-0.0903741
-0.108996
-0.128108
-0.148807
-0.17315
-0.203599
-0.241694
-0.283828
-0.318575
-0.336875
)
;
}
cylinder
{
type calculated;
value uniform 0;
}
top
{
type symmetryPlane;
value uniform 0;
}
bottom
{
type symmetryPlane;
value uniform 0;
}
defaultFaces
{
type empty;
value nonuniform 0();
}
}
// ************************************************************************* //
|
|
d65b82285ad5f85813b880206f44dbd648dd7990
|
81eeb1b0ea8722a73ddaa18f8b914b981a9e18e3
|
/rx90/rx90_control/src/main_publisher.cpp
|
f4f52d90716412fc9651961985c6814824e830d6
|
[] |
no_license
|
zlmone/TERRINet
|
9b750220f1dcce15bb839d5a635ddbdd90c18a45
|
89a830c48335b6fb37b8e2472bff040408247fc3
|
refs/heads/master
| 2023-07-09T02:09:03.539347
| 2019-12-02T10:46:35
| 2019-12-02T10:46:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,950
|
cpp
|
main_publisher.cpp
|
#include "ros/ros.h"
#include "std_msgs/Float64.h"
#include "stdio.h"
#include <sstream>
#include <thread>
#include "gazebo_msgs/ApplyJointEffort.h"
#include "std_msgs/Duration.h"
#include "std_msgs/Time.h"
int main(int argc, char **argv)
{
ros::init(argc, argv, "publisher");
std_msgs::Float64 msg;
msg.data = 0;
int end=0;
int alert=0;
float tiempo=4;
ros::NodeHandle n;
ros::Publisher pub_shoulder_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_SHOULDER_JOINT_position_controller/command", 1000);
ros::Publisher pub_arm_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_ARM_JOINT_position_controller/command", 1000);
ros::Publisher pub_elbow_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_ELBOW_JOINT_position_controller/command", 1000);
ros::Publisher pub_forearm_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_FOREARM_JOINT_position_controller/command", 1000);
ros::Publisher pub_wrist_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_WRIST_JOINT_position_controller/command", 1000);
ros::Publisher pub_flange_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_FLANGE_JOINT_position_controller/command", 1000);
ros::Publisher pub_lgripper_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_LGRIPPER_JOINT_position_controller/command", 1000);
ros::Publisher pub_rgripper_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_RGRIPPER_JOINT_position_controller/command", 1000);
ros::Publisher pub_mgripper_1 = n.advertise<std_msgs::Float64>("/rx90_1/RX90_MGRIPPER_JOINT_position_controller/command", 1000);
ros::Publisher pub_shoulder_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_SHOULDER_JOINT_position_controller/command", 1000);
ros::Publisher pub_arm_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_ARM_JOINT_position_controller/command", 1000);
ros::Publisher pub_elbow_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_ELBOW_JOINT_position_controller/command", 1000);
ros::Publisher pub_forearm_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_FOREARM_JOINT_position_controller/command", 1000);
ros::Publisher pub_wrist_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_WRIST_JOINT_position_controller/command", 1000);
ros::Publisher pub_flange_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_FLANGE_JOINT_position_controller/command", 1000);
ros::Publisher pub_lgripper_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_LGRIPPER_JOINT_position_controller/command", 1000);
ros::Publisher pub_rgripper_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_RGRIPPER_JOINT_position_controller/command", 1000);
ros::Publisher pub_mgripper_2 = n.advertise<std_msgs::Float64>("/rx90_2/RX90_MGRIPPER_JOINT_position_controller/command", 1000);
ros::Rate loop_rate(10);
std::thread garra;
//THREAD GRIPPER
auto mgarra = [&end,&alert,&argc,&argv](){
ros::init(argc, argv, "publisher_finger");
ros::NodeHandle n;
ros::ServiceClient client = n.serviceClient<gazebo_msgs::ApplyJointEffort>("/gazebo/apply_joint_effort");
gazebo_msgs::ApplyJointEffort gripper_1, gripper_2;
gripper_1.request.joint_name = "rx90_1::RX90_MGRIPPER_JOINT";
gripper_1.request.effort = -99;
gripper_1.request.start_time = ros::Time(0);
gripper_1.request.duration = ros::Duration(-1);
gripper_2.request.joint_name = "rx90_2::RX90_MGRIPPER_JOINT";
gripper_2.request.effort = 99;
gripper_2.request.start_time = ros::Time(0);
gripper_2.request.duration = ros::Duration(-1);
client.call(gripper_2);
client.call(gripper_1);
ROS_INFO("hilo");
while(!end)
{
sleep(0.2);
if(alert==1){
//gripper_1.request.joint_name = "rx90_1::RX90_MGRIPPER_JOINT";
gripper_1.request.effort = 100;
//gripper_1.request.start_time = ros::Time(0);
//gripper_1.request.duration = ros::Duration(-1);
client.call(gripper_1);
gripper_2.request.effort = -150;
client.call(gripper_2);
alert=2;
}
else if(alert==2)
{
gripper_1.request.effort = 100;
client.call(gripper_1);
gripper_2.request.effort = -150;
client.call(gripper_2);
alert=3;
}
}
//gripper_1.request.joint_name = "rx90_1::RX90_MGRIPPER_JOINT";
gripper_1.request.effort = 100;
gripper_2.request.effort = 200;
//gripper_1.request.start_time = ros::Time(0);
//gripper_1.request.duration = ros::Duration(-1);
client.call(gripper_1);
client.call(gripper_2);
client.call(gripper_1);
client.call(gripper_2);
};
//FIRST ARM
ROS_INFO("READY!");
pub_arm_1.publish(msg);
pub_arm_2.publish(msg);
sleep(tiempo);
msg.data=-0.06;
ROS_INFO("moving arm [%f]", msg.data);
pub_arm_1.publish(msg);
pub_arm_2.publish(msg);
sleep(tiempo);
msg.data=0.7;
ROS_INFO("moving elbow [%f]", msg.data);
pub_elbow_1.publish(msg);
pub_elbow_2.publish(msg);
sleep(tiempo);
msg.data=-0.3;
ROS_INFO("moving arm [%f]", msg.data);
pub_arm_1.publish(msg);
pub_arm_2.publish(msg);
sleep(tiempo);
garra = std::thread(mgarra);
sleep(tiempo);
msg.data=0.9;
ROS_INFO("moving arm [%f]", msg.data);
pub_arm_1.publish(msg);
pub_arm_2.publish(msg);
sleep(tiempo);
msg.data=0.85;
ROS_INFO("moving wrist [%f]", msg.data);
pub_wrist_1.publish(msg);
pub_wrist_2.publish(msg);
sleep(tiempo+3);
msg.data=0.85;
ROS_INFO("moving arm [%f]", msg.data);
pub_arm_2.publish(msg);
msg.data=1.20;
sleep(tiempo);
ROS_INFO("moving elbow [%f]", msg.data);
pub_elbow_2.publish(msg);
msg.data=0.3;
sleep(tiempo);
ROS_INFO("moving wrist [%f]", msg.data);
pub_wrist_2.publish(msg);
msg.data=0.7;
sleep(tiempo+1);
alert=1;
sleep(tiempo-1);
ROS_INFO("moving arm [%f]", msg.data);
pub_arm_1.publish(msg);
msg.data=-0.7;
ROS_INFO("moving elbow [%f]", msg.data);
pub_elbow_1.publish(msg);
msg.data=1.6;
sleep(tiempo);
ROS_INFO("moving shoulder [%f]", msg.data);
pub_shoulder_2.publish(msg);
sleep(tiempo);
msg.data=0;
ROS_INFO("moving wrist [%f]", msg.data);
pub_wrist_2.publish(msg);
sleep(tiempo);
msg.data=-0.1;
ROS_INFO("moving arm [%f]", msg.data);
pub_arm_2.publish(msg);
sleep(tiempo);
end=1;
end=1;
garra.join();
return 0;
}
|
ca355c4a09cc272d05fa30fa2185b9cac754249d
|
6e396c0f4bc60265c35fff2b78abf706b2b56b41
|
/pass/instrument/ptauthpass.cpp
|
e800abdcfd454affefdf7174bd5ce8f73ec6bc9d
|
[] |
no_license
|
RiS3-Lab/PTAuth
|
0603cb7af2fc376ceadd39c0898106d0b14728a7
|
6013c22d2f93f64748c503b773fb9701803ae00b
|
refs/heads/master
| 2023-06-03T05:38:21.859845
| 2021-07-02T22:36:42
| 2021-07-02T22:36:42
| 381,856,323
| 7
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 8,303
|
cpp
|
ptauthpass.cpp
|
#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/LLVMContext.h"
#include <set>
#include <malloc.h>
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/IR/Instructions.h"
#include <string.h>
#include <sstream>
#include "llvm/Object/StackMapParser.h"
#include <queue>
#include <map>
#include <list>
#include <iterator>
#include <iostream>
#include <bits/stdc++.h>
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include <vector>
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include <iostream>
#include <string>
#include "passutils.h"
#include "ptauthTypes.h"
#define OPTIMIZATION 1
using namespace llvm;
using namespace std;
namespace {
class PTAuthpass : public ModulePass {
public:
static char ID;
std::vector<Function *> to_replace_functions;
PTAuthpass() : ModulePass(ID) {}
bool runOnModule(Module &m) override;
};
}
char PTAuthpass::ID = 0;
bool isPrevAlloca = false;
AllocaInst *prevAI;
bool allocaFinished = false;
Value* GlobalObjectsArr[100]={0};
size_t GlobalObjectsArrSize = 0;
size_t InternalCall = 0;
size_t GlobalPointer = 0;
size_t NestedPointer = 0;
std::unordered_set <string> optimizedList = {""};
size_t FlagFreeCalled = 0 ;
struct functionProperties funcProperties;
vector<pointerProperties> pointers;
vector<GEPProperties> GEPS;
Function *__loadCheck;
Function *__GEPCheck;
Function *__nestedGEPCheck;
Function *__storeCheck;
Function *__xpac = nullptr;
Function *__noCheck;
Type *Int8Ty;
Type *VoidType;
Type *VoidPtrTy;
bool PTAuthpass::runOnModule(Module &m) {
DataLayout *dl = new DataLayout(&m);
int counter=0;
Module::FunctionListType &functions = m.getFunctionList();
// Replacing functions
for (Module::FunctionListType::iterator it = functions.begin(),
it_end = functions.end(); it != it_end; ++it) {
counter++;
Function &func = *it;
//Replacing malloc with __ptauth_malloc
if (func.getName() == "malloc") {
passutils::replaceFuncionWith(func, "__ptauth_malloc");
}
//Replacing calloc with __ptauth_calloc
if (func.getName() == "calloc") {
passutils::replaceFuncionWith(func, "__ptauth_calloc");
}
//Replacing calloc with __ptauth_realloc
if (func.getName() == "realloc") {
passutils::replaceFuncionWith(func, "__ptauth_realloc");
}
//Replacing calloc with __ptauth_free
if (func.getName() == "free") {
passutils::replaceFuncionWith(func, "__ptauth_free");
}
// TODO: Handle more APIs(). Custom APIs also can be added here.
if (func.getName() == "aligned_alloc") {
//passutils::replaceFuncionWith(func, "__ptauth_aligned_alloc");
}
if (func.getName() == "memalign") {
//passutils::replaceFuncionWith(func, "__ptauth_memalign");
}
if (func.getName() == "posix_memalign") {
//passutils::replaceFuncionWith(func, "__ptauth_posix_memalign");
}
if (func.getName() == "valloc") {
//passutils::replaceFuncionWith(func, "__ptauth_valloc");
}
if (func.getName() == "pvalloc") {
//passutils::replaceFuncionWith(func, "__ptauth_pvalloc");
}
} // End of replacing functions
//----------------Inserting runtime libraries checks
Int8Ty = Type::getInt8Ty(m.getContext());
VoidPtrTy = PointerType::getUnqual(Type::getInt8Ty(m.getContext()));
VoidType = Type::getVoidTy(m.getContext());
FunctionType *FTy = FunctionType::get(VoidPtrTy, {VoidPtrTy}, false);
Constant *hookFunc = m.getOrInsertFunction("__loadCheck", FTy);
__loadCheck = cast<Function>(hookFunc);
FTy = FunctionType::get(VoidPtrTy, {VoidPtrTy}, false);
hookFunc = m.getOrInsertFunction("__GEPCheck", FTy);
__GEPCheck = cast<Function>(hookFunc);
FTy = FunctionType::get(VoidPtrTy, {VoidPtrTy}, false);
hookFunc = m.getOrInsertFunction("__nestedGEPCheck", FTy);
__nestedGEPCheck = cast<Function>(hookFunc);
Type *VoidTy33 = PointerType::getUnqual(Int8Ty);
FunctionType *FTy33 = FunctionType::get(VoidTy33, {VoidPtrTy}, false);
hookFunc = m.getOrInsertFunction("__storeCheck", FTy33);
__storeCheck = cast<Function>(hookFunc);
Type *VoidTy8 = PointerType::getUnqual(Int8Ty);
FunctionType *FTy12 = FunctionType::get(VoidPtrTy, {VoidPtrTy}, false);
hookFunc = m.getOrInsertFunction("__xpac", FTy12);
__xpac = cast<Function>(hookFunc);
Type *VoidTy88 = PointerType::getUnqual(Int8Ty);
FunctionType *FTy128 = FunctionType::get(VoidPtrTy, {VoidPtrTy}, false);
hookFunc = m.getOrInsertFunction("__noCheck", FTy12);
__noCheck = cast<Function>(hookFunc);
// This avoid-list is only compatible with Top-Byte Ignore
// This list of functions is totally safe in single-threaded applications. In the following functions, there is no global pointers to heap section.
// Also, the pointers are neither passed to other functions in the applications (which guarantees they are not freed) nor freed by free() API.
//std::unordered_set <string> avoidList = {"mainQSort3", "mainSort", "primal_start_artificial", "primal_update_flow",
// "bea_is_dual_infeasible","primal_update_flow","primal_start_artificial","insert_new_arc","replace_weaker_arc","primal_feasible","price_out_impl","primal_bea_mpp"};
std::unordered_set <string> avoidList = {"mainQSort3", "mainSort", "price_out_impl", "primal_bea_mpp","read_min","getopt_internal","writeSyntaxElement_fixed"};
//"primal_feasible", "insert_new_arc","replace_weaker_arc","primal_start_artificial","primal_update_flow","bea_is_dual_infeasible"};
// iterate over the module
for (auto &F : m) { // iterate over the basic functions
if (F.getBasicBlockList().size()){
#if OPTIMIZATION
passutils::optimizer(F);
#endif
if ((avoidList.count(F.getName())>0) || (optimizedList.count(F.getName())>0)){
continue;
}
errs() << "Instrumenting function = " << F.getName() << "\n";
for (auto &B : F) {
for (auto &I : B) {
if (isPrevAlloca) {
isPrevAlloca = false;
prevAI = nullptr;
} // End of prev allocation
if (allocaFinished) {
allocaFinished = false;
} // End of allocaFinished
if (AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
passutils::instrumentAlloc(AI);
}
else if (ReturnInst *RI = dyn_cast<ReturnInst>(&I)) {
passutils::instrumentReturn(RI);
}
else if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
passutils::instrumentStore(SI);
}
else if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
passutils::instrumentLoad(LI);
}
else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I)) {
passutils::instrumentGEP(GEP);
}
else if (CallInst *CI = dyn_cast<CallInst>(&I)) {
passutils::instrumentCalls(CI);
}
} // End of iterate over the basic blocks
} // End of iterate over the functions
}
} // End of iterate over the module
return false;
}//End of runOnModule
static RegisterPass<PTAuthpass> X("ptauth", "PTAuth pass mitigates the temporal memory corruption attacks in the heap", false, false);
|
b3eac1259c1f9220b3004eb352c8392307d57efa
|
81463233d639e9782a5f5185b68bb1eb0cde83f7
|
/AIPlayer.h
|
7db7fe41933aaa1d305af59f063ef5db67c3a7b5
|
[] |
no_license
|
Acuratus/ait-checkers
|
3cf37d84f8322f8dc6f9b1347c0bf11cf5118c5b
|
889bb300a97bb4df120b88a5d0ed569f03fa6a77
|
refs/heads/master
| 2020-05-17T14:51:37.635183
| 2008-12-17T08:31:10
| 2008-12-17T08:31:10
| 37,693,001
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 768
|
h
|
AIPlayer.h
|
/*
********************************************************
* Filename: AIPlayer.h
********************************************************
* Created on: Nov 5, 2008
* Author: marc
********************************************************
*/
#ifndef AIPLAYER_H_
#define AIPLAYER_H_
#include "Player.h"
#include "Heuristic.h"
#include "Thread.h"
class Heuristic;
using namespace std;
class AIPlayer: public Player {
public:
AIPlayer(int color, string name, MUTEX* mutex); // Create user
~AIPlayer(); // Destroy user (Empty implementation yet)
void makeNextMove(board* b); // Make the next best move
bool working;
void timeoutOccurred();
string getName();
private:
Heuristic* m_heuristic;
MUTEX* m_mutex;
};
#endif /* AIPLAYER_H_ */
|
877c9e1a88f4c85f7957182dcea7b0627b559da7
|
c29e9d984244dc7d1addaaa8c1fe061c743e3dbd
|
/second time/PAT A1155.cpp
|
982c3908b6a120d9137ad0dc1ce153bc927cd13b
|
[] |
no_license
|
KaihongGo/PAT
|
b596519a74ff9e5ce508b95fe05070a551896fa1
|
3b9d80681694aedf33e7f355cb684576156811c4
|
refs/heads/master
| 2023-01-09T07:56:18.829829
| 2020-11-02T13:05:39
| 2020-11-02T13:05:39
| 304,880,027
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,080
|
cpp
|
PAT A1155.cpp
|
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int MAXN = 10010;
int heap[MAXN];
int n; // n elements
vector<int> path;
void DFS(int root)
{
if (root <= n && root * 2 > n)
{
path.push_back(heap[root]);
for (int i = 0; i < path.size(); i++)
{
cout << path[i];
i != path.size() - 1 ? cout << " " : cout << endl;
}
path.pop_back();
return;
}
path.push_back(heap[root]);
if (root * 2 + 1 <= n)
DFS(root * 2 + 1);
if (root * 2 <= n)
DFS(root * 2);
path.pop_back();
}
void downAdjust(int low, int high)
{
int i = low, j = 2 * i;
while (j <= high)
{
if (j + 1 <= high && heap[j + 1] > heap[j])
j = j + 1;
if (heap[j] > heap[i])
{
swap(heap[j], heap[i]);
i = j;
j = 2 * i;
}
else
break;1
}
}
void createHeap()
{
}
int main()
{
cin >> n;
for (int i = 1; i <= n; i++)
cin >> heap[i];
DFS(1);
}
|
4727adeda5803c0559b631fdde99484d4cf97372
|
59b2600c91c87672dc4792461aeb459668794e94
|
/zybo/ROOT_FS/app/ad-sample/include/Theta.hpp
|
19f7ded55da5bb59787e8a0a46c96bb1943d3280
|
[
"MIT"
] |
permissive
|
19j5150/ad-refkit
|
f4ca7a0efec6729c807b96023046880f68e2e096
|
69ef3a636326102591294eaabd765b55cab28944
|
refs/heads/master
| 2023-06-08T12:10:55.657174
| 2021-07-01T07:15:37
| 2021-07-01T07:15:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,071
|
hpp
|
Theta.hpp
|
/**
* Theta: 弧度法で角度を表現するクラス
*
* Copyright (C) 2019 Yuya Kudo.
* Copyright (C) 2019 Atsushi Takada.
* Authors:
* Yuya Kudo <ri0049ee@ed.ritsumei.ac.jp>
* Atsushi Takada <ri0051rr@ed.ritsumei.ac.jp>
*
*/
#ifndef INCLUDE_THETA_HPP_
#define INCLUDE_THETA_HPP_
#include <cmath>
#include <algorithm>
namespace core {
constexpr double PI = 3.14159265359;
/**
* 角度を[-π, π)の範囲で表現し、境界を隠匿する
*/
class Theta {
public:
double raw;
Theta() = default;
constexpr explicit Theta(const double& val) : raw(val) { }
constexpr double get() const {
if(-PI <= raw && raw < PI) {
return raw;
}
else {
// 範囲外であった場合、値を正規化する
double raw_mod = fmod(raw + PI, 2 * PI);
return (0 <= raw_mod) ? raw_mod - PI : raw_mod + PI;
}
}
constexpr double getDegree() const {
return (this->get() / PI) * 180;
}
constexpr bool isZero() const {
return this->get() == 0.0;
}
constexpr Theta disparityWith(const Theta& other) const {
const auto t = this->get();
const auto ot = other.get();
return Theta(std::min(std::abs(t - ot), core::PI * 2 - std::abs(t) - std::abs(ot)));
}
constexpr Theta operator +() const {
return *this;
}
constexpr Theta operator -() const {
return Theta(-raw);
}
constexpr Theta operator +(const Theta& other) const {
return Theta(raw + other.raw);
}
constexpr Theta operator -(const Theta& other) const {
return Theta(raw - other.raw);
}
constexpr Theta operator *(double s) const {
return Theta(raw * s);
}
constexpr Theta operator /(double s) const {
return Theta(raw / s);
}
constexpr Theta operator +=(const Theta& other) {
raw += other.raw;
return *this;
}
constexpr Theta operator -=(const Theta& other) {
raw -= other.raw;
return *this;
}
constexpr bool operator ==(const Theta& other) const {
return this->get() == other.get();
}
constexpr bool operator !=(const Theta& other) const {
return this->get() != other.get();
}
constexpr bool operator <(const Theta& other) const {
return this->get() < other.get();
}
constexpr bool operator <=(const Theta& other) const {
return this->get() <= other.get();
}
constexpr bool operator >(const Theta& other) const {
return this->get() > other.get();
}
constexpr bool operator >=(const Theta& other) const {
return this->get() >= other.get();
}
};
}
#endif /* INCLUDE_THETA_HPP_ */
|
606755d0888e73374131fc9430b638311b726234
|
b770387df67108cd598b764ce11ef3223e91e836
|
/testProject/MyEventHandler.cpp
|
695a08c0155d6c48d14495c9e09f395dc87e112d
|
[] |
no_license
|
MeLikeyCode/QtGameEngine
|
45678cfcc89ef34eefe6b6f2b2e77bbef5576947
|
4f386f0f40b620d4351baf9b124371991fc6af94
|
refs/heads/master
| 2022-10-19T04:42:42.554122
| 2020-05-20T00:03:53
| 2020-05-20T00:03:53
| 114,507,663
| 115
| 35
| null | 2022-10-06T01:59:42
| 2017-12-17T03:51:42
|
C++
|
UTF-8
|
C++
| false
| false
| 1,219
|
cpp
|
MyEventHandler.cpp
|
#include "MyEventHandler.h"
#include "qge/Game.h"
#include "qge/MeleeWeaponSlot.h"
#include "qge/TopDownSprite.h"
#include "qge/Entity.h"
#include "qge/Map.h"
#include "qge/ECBodyThruster.h"
extern qge::Entity* player;
EventHandler::EventHandler(qge::Game *forGame): game_(forGame)
{
QObject::connect(forGame, &qge::Game::mousePressed,this,&EventHandler::onMousePressed);
}
void EventHandler::onMousePressed(QPoint pos, Qt::MouseButton button)
{
if (button == Qt::LeftButton)
((qge::MeleeWeaponSlot*)player->slot("melee"))->use(); // use whatever item is equipped in the players "melee" slot
if (button == Qt::RightButton){
// create an enemy for the player
qge::Entity* enemy = new qge::Entity();
qge::TopDownSprite* spr = new qge::TopDownSprite();
spr->addFrames(":/resources/graphics/spider",7,"walk");
spr->addFrames(":/resources/graphics/spider",1,"stand");
spr->play("stand",-1,1,0);
enemy->setSprite(spr);
player->map()->addEntity(enemy);
enemy->setPos(game_->mapToMap(pos));
qge::ECBodyThruster* bodyThrustContr = new qge::ECBodyThruster(enemy);
bodyThrustContr->addTargetEntity(player);
}
}
|
655da18a415ee6fdb99be06d9ead18c7aa855a69
|
7032972f5ebbaf8ecb60da0a95bf16ea3e592633
|
/Barrage/bcg/inc/BCGPShowAllButton.h
|
065c623b474da0d75b09f014e67f492b083de604
|
[
"Apache-2.0"
] |
permissive
|
luocheng610/Douyu_BarrageAssistant
|
817086abd75c58bfa68228697fa7aa786325ed82
|
b2ce4f49cc76e7c95b1383ecb1b5e37452b8da04
|
refs/heads/master
| 2021-01-22T11:32:06.879143
| 2019-12-15T03:40:46
| 2019-12-15T03:40:46
| 92,707,125
| 7
| 7
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,652
|
h
|
BCGPShowAllButton.h
|
//*******************************************************************************
// COPYRIGHT NOTES
// ---------------
// This is a part of the BCGControlBar Library
// Copyright (C) 1998-2014 BCGSoft Ltd.
// All rights reserved.
//
// This source code can be used, distributed or modified
// only under terms and conditions
// of the accompanying license agreement.
//*******************************************************************************
// BCGShowAllButton.h: interface for the CBCGPShowAllButton class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_BCGPSHOWALLBUTTON_H__DE028D43_36EB_11D3_95C5_00A0C9289F1B__INCLUDED_)
#define AFX_BCGPSHOWALLBUTTON_H__DE028D43_36EB_11D3_95C5_00A0C9289F1B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "BCGPToolbarMenuButton.h"
class CBCGPShowAllButton : public CBCGPToolbarMenuButton
{
DECLARE_DYNCREATE(CBCGPShowAllButton)
public:
CBCGPShowAllButton();
virtual ~CBCGPShowAllButton();
virtual void OnDraw (CDC* pDC, const CRect& rect, CBCGPToolBarImages* pImages,
BOOL bHorz = TRUE, BOOL bCustomizeMode = FALSE,
BOOL bHighlight = FALSE,
BOOL bDrawBorder = TRUE,
BOOL bGrayDisabledButtons = TRUE);
virtual SIZE OnCalculateSize (CDC* pDC, const CSize& sizeDefault, BOOL bHorz);
virtual BOOL OnClick (CWnd* pWnd, BOOL bDelay = TRUE);
virtual BOOL OpenPopupMenu (CWnd* pWnd = NULL);
virtual BOOL OnToolHitTest (const CWnd* pWnd, TOOLINFO* pTI);
};
#endif // !defined(AFX_BCGPSHOWALLBUTTON_H__DE028D43_36EB_11D3_95C5_00A0C9289F1B__INCLUDED_)
|
49462e4e359181615299a586aad83da44e74acde
|
a8c02c52693ec55a5a176c63d8a18569584afa43
|
/GUI1/Motor2D/GuiLabel.cpp
|
d0a3a47223cf84ad0e4bc9588675deaa5520fb74
|
[] |
no_license
|
Margeli/GUI1
|
d7bbb39e7c79f940a11e963ba0694e8bc37e6805
|
daf1634d2b6f31e20f1d168be9e597403a8941ef
|
refs/heads/master
| 2021-05-07T06:51:14.599616
| 2017-12-09T16:39:55
| 2017-12-09T16:39:55
| 111,778,572
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,156
|
cpp
|
GuiLabel.cpp
|
#include "GuiLabel.h"
#include "j1Gui.h"
#include "j1UI_Elem.h"
#include "j1App.h"
#include "j1Fonts.h"
#include "j1Render.h"
#include "j1Textures.h"
GuiLabel::GuiLabel(Alignment alignment) : j1UI_Elem(UIType::LABEL, Alignment::NONE) {
align = alignment;
int font_size = 14;
const char* path;
if (font_frizqt == nullptr) {
path = "fonts/wow/FRIZQT__.ttf";
font_frizqt = App->font->Load(path, font_size);
}
if (font_morpheus == nullptr) {
path = "fonts/wow/MORPHEUS.ttf";
font_morpheus = App->font->Load(path, font_size);
}
if (font_skurri == nullptr) {
path = "fonts/wow/skurri.ttf";
font_morpheus = App->font->Load(path, font_size);
}
if (font_arialn == nullptr) {
path = "fonts/wow/ARIALN.ttf";
font_morpheus = App->font->Load(path, font_size);
}
}
GuiLabel::~GuiLabel()
{
}
bool GuiLabel::Start() {
int width, height;
App->font->CalcSize(text.GetString(), width, height);
rect.w = width;
rect.h = height;
return true;
}
bool GuiLabel::CleanUp() {
return true;
}
void GuiLabel::CreateText(p2SString txt, SDL_Color color, FontType font) {
_TTF_Font* fnt = nullptr;
switch (font) {
case FRIZQT:
fnt = font_frizqt; break;
case MORPHEUS:
fnt = font_morpheus; break;
case SKURRI:
fnt = font_skurri; break;
case ARIALN:
fnt = font_arialn; break;
}
text_color = color;
text_font = fnt;
text = txt;
tex = App->font->Print(text.GetString(), text_color, text_font);
}
bool GuiLabel::Update(float dt) {
UpdateAlignment();
App->render->Blit(tex, position.x+ displacement.x, position.y+ displacement.y);
return true;
}
void GuiLabel::ChangeText(p2SString newtext) {
App->tex->UnLoad(tex);
text = newtext;
tex = App->font->Print(newtext.GetString(), text_color, text_font);
}
void GuiLabel::Drag(iPoint displace) {
displacement.x += displace.x;
displacement.y += displace.y;
}
void GuiLabel::GetTxtDimensions(int &width, int &height) {
App->font->CalcSize(text.GetString(), width, height, text_font);
rect.w = width;
rect.h = height;
}
const char* GuiLabel::GetText() const {
return text.GetString();
}
void GuiLabel::AddCharToTxt(char* ch) {
text += ch;
ChangeText(text);
}
|
4124e233082e6e48c5c6866261b26535cd4a07f6
|
d7d33966eaedb1f64182a8d39036c60fe068e074
|
/include/LLGL/PipelineState.h
|
828b8ba005294a82b5060c68b579f5b4df8fb534
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
beldenfox/LLGL
|
7aca3d5902bba9f8e09f09d0dd3808756be3088c
|
3a54125ebfa79bb06fccf8c413d308ff22186b52
|
refs/heads/master
| 2023-07-12T09:32:31.348478
| 2021-08-24T03:41:24
| 2021-08-26T16:55:47
| 275,416,529
| 1
| 0
|
NOASSERTION
| 2020-06-27T17:01:24
| 2020-06-27T17:01:24
| null |
UTF-8
|
C++
| false
| false
| 656
|
h
|
PipelineState.h
|
/*
* PipelineState.h
*
* This file is part of the "LLGL" project (Copyright (c) 2015-2019 by Lukas Hermanns)
* See "LICENSE.txt" for license information.
*/
#ifndef LLGL_PIPELINE_STATE_H
#define LLGL_PIPELINE_STATE_H
#include "RenderSystemChild.h"
namespace LLGL
{
/**
\brief Graphics and compute pipeline state interface.
\see RenderSystem::CreatePipelineState
\see CommandBuffer::SetPipelineState
*/
class LLGL_EXPORT PipelineState : public RenderSystemChild
{
LLGL_DECLARE_INTERFACE( InterfaceID::PipelineState );
};
} // /namespace LLGL
#endif
// ================================================================================
|
9e38d1993c9bb052b184e83b5ab8f10fd51907ca
|
b8d4f0cd96abc6033500b817ec8cd192d16da344
|
/Hashing/SpellChecker.cpp
|
4531ca9cafe4101c1ec10fe3e06267c078a583a4
|
[] |
no_license
|
Mahad28/Spell-checker-
|
e4f4bac79a683c7990bc9865c89c312bcdb89ce4
|
b817245906c450740b7a2eeab4ab36c6a98d35b1
|
refs/heads/master
| 2021-01-17T22:51:45.793190
| 2015-02-13T23:09:15
| 2015-02-13T23:09:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,530
|
cpp
|
SpellChecker.cpp
|
//
// SpellChecker.cpp
// Hashing
//
// Created by Shiv chandra Kumar on 11/24/14.
// Copyright (c) 2014 Shiv chandra Kumar. All rights reserved.
//
#include "SpellChecker.h"
#include "Dictionary.h"
#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
using namespace std;
Dictionary dict;
SpellChecker::SpellChecker(){
count_num =0;
}
//the only public method of class Spellchecker. only this method can be accesed from the main. we call
//each correct word finding technique one by one from here and finally call the printing method.
void SpellChecker::correcting_algorithm(char* word){
check_delete(word);
check_swap(word);
check_split(word);
print_result(word);
empty();
}
//dlete each letter of the word one by one and check for the remain of the word in dictionary.
//if found push it into the array
void SpellChecker::check_delete(char* word){
int len = int(strlen(word));
char* new_word = new char();
int index = 0;
for(int i = 0 ; i< len ; i++){
for(int j=0 ; j<len ; j++){
if(i != j){
new_word[index++] = word[j];
}
}
new_word[index++] = '\0';
index = 0;
if(dict.lookup(new_word)){
bool present = false;
for(int k=0 ;k<count_num ;k++ ){
if(strcmp(list_of_words[k], new_word)==0){
present = true;
}
}
if(!present){
list_of_words[count_num] = new char();
strcpy(list_of_words[count_num], new_word);
count_num++;
}
}
}
return;
}
//swap the adjascent pair of the word and check for the correct words from dictionary.store it in array
//when found
void SpellChecker::check_swap(char* word){
int len = int(strlen(word));
for(int i=0 ; i <len-1 ; i++){
char* temp_word = new char();
strcpy(temp_word, word);
char temp;
temp = temp_word[i];
temp_word[i] = temp_word[i+1];
temp_word[i+1] = temp ;
if(dict.lookup(temp_word)){
list_of_words[count_num] = new char();
strcpy(list_of_words[count_num], temp_word);
count_num++;
}
delete temp_word;
temp_word = NULL;
}
return;
}
//split the word into the pair and check whether each word from the pair are correct
void SpellChecker::check_split(char* word){
int len = int(strlen(word));
for(int i= 0; i< len; i++){
int ind1 = 0;
int ind2 = 0;
char* first_part = new char();
char* second_part = new char();
for(int j = 0 ; j<=i ; j++){
first_part[ind1++] = word[j];
}
first_part[ind1++] = '\0';
for(int k = i+1 ;k < len ; k++){
second_part[ind2++] = word[k];
}
second_part[ind2++] = '\0';
if(dict.lookup(first_part) && dict.lookup(second_part)){
strcat(first_part, " ");
strcat(first_part, second_part);
list_of_words[count_num] = new char();
strcpy(list_of_words[count_num], first_part);
count_num++;
}
delete first_part;
first_part = NULL;
delete second_part;
second_part = NULL;
}
}
//print the correct word suggestions
void SpellChecker::print_result(char* word){
cout<<"Word not found:"<<word<<endl;
cout<<"Perhaps you meant:"<<endl;
//sort the words in ascending order
char* temp = new char();
if(count_num >1){
for(int first = 0 ; first< count_num ; first++){
for(int second = 1; second <count_num ; second++){
if(strcmp(list_of_words[first], list_of_words[second]) > 0){
strcpy(temp,list_of_words[first]);
strcpy(list_of_words[first] , list_of_words[second]);
strcpy(list_of_words[second] , temp);
}
}
}
}
if(temp != NULL){
delete temp;
temp = NULL;
}
for(int i =0 ; i < count_num; i++){
cout<<list_of_words[i]<<endl;
}
cout<<endl;
cout<<endl;
}
//empty the array used to store the suggested correct words from dictionary
void SpellChecker::empty(){
for(int i=0; i< count_num ; i++){
if(list_of_words != NULL){
delete list_of_words[i];
list_of_words[i] = NULL;
}
}
count_num = 0;
}
|
c9e0975c95a8846f26dca4a013e9cff1cde0e79c
|
af0918e1f187152e5d3d5c9c75dbcdbc7c7ef7d8
|
/20150306/io4.cc
|
21b4f0eac591eadaeecf87cb947c74f5e4e08e4e
|
[] |
no_license
|
liyisheng/MaNong
|
ec2f26a56e39e20792a4850ed4b3134cf800d17c
|
5fd508d43764fa10af12b7c04d327871893c4942
|
refs/heads/master
| 2021-01-21T21:54:23.429286
| 2019-07-26T16:00:45
| 2019-07-26T16:00:45
| 29,233,307
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 642
|
cc
|
io4.cc
|
/*************************************************************************
> File Name: io4.cc
> Author: liyisheng
> Mail: liyishengchn@gmail.com
> Created Time: Sun 08 Mar 2015 03:15:43 PM CST
************************************************************************/
#include<iostream>
#include<sstream>
#include<string>
using namespace std;
int main(int argc, char *argv[])
{
int ival = 512;
int ival2 = 1024;
stringstream ss;
ss << "ival = " << ival << " " << "ival2 = " << ival2 << endl;
string str = ss.str();
cout << str << endl;
// string str1;
while(ss >> str)
{
cout << str << endl;
}
return 0;
}
|
580322ba1fdfd2bc81b9a9ee7f27d1d922f33956
|
fb3ea6359b132a8144703360ab5e71baddcdc475
|
/daabbcc/src/DynamicTree.cpp
|
c73115e262e93afd1ac9bef1870934a5ab491d83
|
[] |
no_license
|
selimanac/DAABBCC
|
310f97cc4ec6f3b313c2629fe0de2bf38dddffda
|
36524fa95436182682a1b00c9647b628c82f71b3
|
refs/heads/v2.1
| 2022-10-28T13:42:10.577151
| 2022-10-24T10:41:59
| 2022-10-24T10:41:59
| 121,843,877
| 45
| 4
| null | 2022-10-14T15:24:24
| 2018-02-17T09:50:48
|
C++
|
UTF-8
|
C++
| false
| false
| 10,750
|
cpp
|
DynamicTree.cpp
|
#include <DynamicTree.hpp>
DynamicTree::DynamicTree()
{
result.SetCapacity(100);
ray_result.SetCapacity(100);
orderResult.SetCapacity(100);
tmpOrderResult.SetCapacity(100);
}
DynamicTree::~DynamicTree() { ResetTree(); }
// ITERATE CALLBACKS
void DynamicTree::IterateRemoveCallback(DynamicTree *context, const uint32_t *key, Groups *value)
{
delete value->m_tree;
}
// Reset
void DynamicTree::ResetTree()
{
ht.Iterate(IterateRemoveCallback, this);
ht.Clear();
m_GameObjectContainer.SetSize(0);
result.SetSize(0);
ray_result.SetSize(0);
orderResult.SetSize(0);
tmpOrderResult.SetSize(0);
}
void DynamicTree::Run(bool toggle)
{
state = toggle;
}
void DynamicTree::Clear()
{
ResetTree();
}
int DynamicTree::AddGroup()
{
int c = groupCounter;
b2DynamicTree *m_tree = new b2DynamicTree();
Groups value;
value.m_tree = m_tree;
if (ht.Full())
{
ht.SetCapacity(ht.Capacity() + 10, ht.Capacity() + 10);
}
ht.Put(c, value);
groupCounter++;
return c;
}
void DynamicTree::AddGameObject(uint32_t groupID, int32 proxyId, dmGameObject::HInstance instance, int32 w, int32 h)
{
GameObjectContainer goContainer;
goContainer.groupID = groupID;
goContainer.proxyId = proxyId;
goContainer.instance = instance;
goContainer.w = w;
goContainer.h = h;
if (m_GameObjectContainer.Full())
{
m_GameObjectContainer.SetCapacity(m_GameObjectContainer.Capacity() + 100);
}
m_GameObjectContainer.Push(goContainer);
}
void DynamicTree::GameobjectUpdate()
{
if (!state || m_GameObjectContainer.Size() == 0)
{
return;
}
for (updateCounter = 0; updateCounter < m_GameObjectContainer.Size(); ++updateCounter)
{
updateContainer = &m_GameObjectContainer[updateCounter];
goPosition = dmGameObject::GetPosition(updateContainer->instance);
MoveProxy(updateContainer->groupID, updateContainer->proxyId, goPosition.getX(), goPosition.getY(), updateContainer->w, updateContainer->h);
}
}
void DynamicTree::RemoveGroup(int groupId)
{
int n = (int)m_GameObjectContainer.Size();
for (int i = 0; i < n; ++i)
{
if (m_GameObjectContainer[i].groupID == groupId)
{
m_GameObjectContainer.EraseSwap(i);
--n;
--i;
}
}
delete ht.Get(groupId)->m_tree;
ht.Erase(groupId);
}
int32 DynamicTree::AddProxy(int groupId, float x, float y, int w, int h)
{
b2AABB aabb;
aabb.lowerBound = Bound(0, x, y, w, h);
aabb.upperBound = Bound(1, x, y, w, h);
Groups *g = ht.Get(groupId);
int32 proxyId = g->m_tree->CreateProxy(aabb, nullptr);
return proxyId;
}
void DynamicTree::DestroyProxyID(int groupID, int proxyID)
{
for (uint32_t i = 0; i < m_GameObjectContainer.Size(); ++i)
{
if (m_GameObjectContainer[i].groupID == groupID && m_GameObjectContainer[i].proxyId == proxyID)
{
m_GameObjectContainer.EraseSwap(i);
}
}
ht.Get(groupID)->m_tree->DestroyProxy(proxyID);
}
void DynamicTree::RemoveProxyGameobject(int groupID, int proxyID)
{
DestroyProxyID(groupID, proxyID);
/* for (uint32_t i = 0; i < m_GameObjectContainer.Size(); ++i)
{
if (m_GameObjectContainer[i].groupID == groupID && m_GameObjectContainer[i].proxyId == proxyID)
{
// ht.Get(m_GameObjectContainer[i].groupID)->m_tree->DestroyProxy(m_GameObjectContainer[i].proxyId);
m_GameObjectContainer.EraseSwap(i);
}
}
ht.Get(groupID)->m_tree->DestroyProxy(proxyID); */
}
void DynamicTree::RemoveProxy(int groupID, int proxyID)
{
DestroyProxyID(groupID, proxyID);
/* for (int i = 0; i < m_GameObjectContainer.Size(); i++)
{
if (m_GameObjectContainer[i].groupID == groupId && m_GameObjectContainer[i].proxyId == proxyID)
{
m_GameObjectContainer.EraseSwap(i);
}
}
ht.Get(groupId)->m_tree->DestroyProxy(proxyID); */
}
/******************************
* RAY
******************************/
float32 DynamicTree::RayCastCallback(const b2RayCastInputAABB &input,
int32 proxyId, int groupId)
{
b2AABB aabb = GetAABB(groupId, proxyId);
b2RayCastOutputAABB output;
bool hit = aabb.RayCast(&output, input);
if (hit)
{
if (ray_result.Full())
{
ray_result.SetCapacity(ray_result.Capacity() + 100);
}
if (isSorted)
{
if (orderResult.Full())
{
orderResult.SetCapacity(orderResult.Capacity() + 100);
}
if (tmpOrderResult.Full())
{
tmpOrderResult.SetCapacity(orderResult.Capacity() + 100);
}
targetProxyCenter = GetAABBPosition(groupId, proxyId);
// dmLogInfo("targetProxyCenter %f %f", targetProxyCenter.x,
// targetProxyCenter.y);
float32 distance = b2Distance(targetProxyCenter, nodeProxyCenter);
// dmLogInfo("distance %i - %f", proxyId, distance);
tmpOrder.proxyID = proxyId;
tmpOrder.distance = distance;
orderResult.Push(tmpOrder);
tmpOrderResult.Push(tmpOrder);
}
else
{
ray_result.Push(proxyId);
}
// return output.fraction;
}
return input.maxFraction;
}
void DynamicTree::RayCastSort(int groupId, float start_x, float start_y, float end_x, float end_y)
{
isSorted = true;
ray_result.SetSize(0);
orderResult.SetSize(0);
tmpOrderResult.SetSize(0);
b2RayCastInputAABB m_rayCastInput;
m_rayCastInput.p1.Set(start_x, start_y);
m_rayCastInput.p2.Set(end_x, end_y);
m_rayCastInput.maxFraction = 1.0f;
nodeProxyCenter.x = start_x;
nodeProxyCenter.y = start_y;
ht.Get(groupId)->m_tree->RayCast(this, m_rayCastInput, groupId);
jc::radix_sort(orderResult.Begin(), orderResult.End(),
tmpOrderResult.Begin());
}
void DynamicTree::RayCast(int groupId, float start_x, float start_y, float end_x, float end_y)
{
ray_result.SetSize(0);
b2RayCastInputAABB m_rayCastInput;
m_rayCastInput.p1.Set(start_x, start_y);
m_rayCastInput.p2.Set(end_x, end_y);
m_rayCastInput.maxFraction = 1.0f;
ht.Get(groupId)->m_tree->RayCast(this, m_rayCastInput, groupId);
}
/******************************
* QUERY
******************************/
bool DynamicTree::QueryCallback(int32 proxyId, int groupId)
{
if (nodeProxyID == -1 || nodeProxyID != proxyId)
{
if (result.Full())
{
result.SetCapacity(result.Capacity() + 100);
}
if (isSorted)
{
if (orderResult.Full())
{
orderResult.SetCapacity(orderResult.Capacity() + 100);
}
if (tmpOrderResult.Full())
{
tmpOrderResult.SetCapacity(orderResult.Capacity() + 100);
}
targetProxyCenter = GetAABBPosition(groupId, proxyId);
// dmLogInfo("targetProxyCenter %f %f", targetProxyCenter.x,
// targetProxyCenter.y);
float32 distance = b2Distance(targetProxyCenter, nodeProxyCenter);
// dmLogInfo("distance %i - %f", proxyId, distance);
tmpOrder.proxyID = proxyId;
tmpOrder.distance = distance;
orderResult.Push(tmpOrder);
tmpOrderResult.Push(tmpOrder);
}
else
{
result.Push(proxyId);
}
}
return true;
}
/* Sort */
void DynamicTree::QueryIDSort(int groupId, int proxyID)
{
isSorted = true;
nodeProxyID = proxyID;
nodeProxyCenter = GetAABBPosition(groupId, proxyID);
b2AABB aabb = GetAABB(groupId, proxyID);
Query(groupId, aabb);
jc::radix_sort(orderResult.Begin(), orderResult.End(),
tmpOrderResult.Begin());
}
void DynamicTree::QueryAABBSort(int groupId, float x, float y, int w, int h)
{
isSorted = true;
nodeProxyID = -1;
b2AABB aabb;
aabb.lowerBound = Bound(0, x, y, w, h);
aabb.upperBound = Bound(1, x, y, w, h);
nodeProxyCenter = aabb.GetCenter();
Query(groupId, aabb);
jc::radix_sort(orderResult.Begin(), orderResult.End(),
tmpOrderResult.Begin());
}
void DynamicTree::QueryID(int groupId, int proxyID)
{
isSorted = false;
nodeProxyID = proxyID;
b2AABB aabb = GetAABB(groupId, proxyID);
Query(groupId, aabb);
}
void DynamicTree::QueryAABB(int groupId, float x, float y, int w, int h)
{
isSorted = false;
nodeProxyID = -1;
b2AABB aabb;
aabb.lowerBound = Bound(0, x, y, w, h);
aabb.upperBound = Bound(1, x, y, w, h);
Query(groupId, aabb);
}
void DynamicTree::Query(int groupId, b2AABB aabb)
{
orderResult.SetSize(0);
tmpOrderResult.SetSize(0);
result.SetSize(0);
ht.Get(groupId)->m_tree->Query(this, aabb, groupId);
}
void DynamicTree::updateGameobjectSize(int groupID, int proxyID, int w, int h)
{
for (uint32_t i = 0; i < m_GameObjectContainer.Size(); ++i)
{
if (m_GameObjectContainer[i].groupID == groupID && m_GameObjectContainer[i].proxyId == proxyID)
{
m_GameObjectContainer[i].w = w;
m_GameObjectContainer[i].h = h;
}
}
}
void DynamicTree::MoveProxy(int groupId, int proxyID, float x, float y, int w, int h)
{
b2AABB current_aabb = GetAABB(groupId, proxyID);
b2AABB next_aabb;
next_aabb.lowerBound = Bound(0, x, y, w, h);
next_aabb.upperBound = Bound(1, x, y, w, h);
b2Vec2 displacement; // = next_aabb.GetCenter() - current_aabb.GetCenter();
displacement.x = 0.2;
displacement.y = 0.2;
ht.Get(groupId)->m_tree->MoveProxy(proxyID, next_aabb, displacement);
}
b2AABB DynamicTree::GetAABB(int groupId, int proxyID)
{
b2AABB aabb = ht.Get(groupId)->m_tree->GetFatAABB(proxyID);
b2Vec2 r(b2_aabbExtension, b2_aabbExtension);
aabb.lowerBound = aabb.lowerBound + r;
aabb.upperBound = aabb.upperBound - r;
return aabb;
}
b2Vec2 DynamicTree::GetAABBPosition(int groupId, int proxyID)
{
b2AABB aabb = GetAABB(groupId, proxyID);
b2Vec2 aabbCenter = aabb.GetCenter();
return aabbCenter;
}
b2Vec2 DynamicTree::Bound(int type, float x, float y, int w, int h)
{
b2Vec2 bound;
if (type == 0)
{
bound.x = x - (w / 2);
bound.y = y - (h / 2);
}
else
{
bound.x = x + (w / 2);
bound.y = y + (h / 2);
}
return bound;
}
bool DynamicTree::CheckGroup(int groupID)
{
if (ht.Get(groupID) == NULL)
{
return true;
}
return false;
}
|
c536d6dbd2cd721c5e40b2ac8f0c689c497c1ce1
|
7089756c4afb8bae05c0d3530d4ad2483541c4ea
|
/matrix/determinant.cpp
|
57e32d48ad2cbda90e0ff5b8df041f20a882cb76
|
[] |
no_license
|
jmeehan2003/Intro-to-CS-II
|
6d6804491e9c981b3fef3874709d9c335860ad6a
|
40ef31f7747e7e1684601dc602446f2799f7338f
|
refs/heads/master
| 2020-03-09T08:36:06.444219
| 2018-06-29T14:00:30
| 2018-06-29T14:00:30
| 128,693,082
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,201
|
cpp
|
determinant.cpp
|
/***********************************************************
** Author: James Meehan
** Date: 4/4/2018
** Description: This is the determinant() function
** definition. The determinant() function takes a pointer to
** a 2D array and the size of the matrix as parameters and
** calculates and returns the determinant
**********************************************************/
#include <iostream>
#include "determinant.hpp"
using std::cout;
using std::endl;
int determinant(int **matrix, int size) {
int det;
if (size == 2) {
det = ((matrix[0][0] * matrix[1][1]) - (matrix[0][1] * matrix[1][0]));
cout << "The determinant is: " << det << endl;
return det;
}
else if (size == 3) {
int firstCalc = matrix[0][0] * ((matrix[1][1] * matrix[2][2]) - (matrix[1][2] * matrix[2][1]));
int secondCalc = matrix[0][1] * ((matrix[1][0] * matrix[2][2]) - (matrix[1][2] * matrix[2][0]));
int thirdCalc = matrix[0][2] * ((matrix[1][0] * matrix[2][1]) - (matrix[1][1] * matrix[2][0]));
det = firstCalc - secondCalc + thirdCalc;
cout << "The determinant is: " << det << endl;
return det;
}
else {
cout << "Invalid matrix size" << endl;
return -1;
}
}
|
27285185d6bef3a6d05b8ffa11239ae9cd15c328
|
cdc29cb5095b7d6734a8bce5b88683e88b5a580a
|
/App/Recorder/GeneratedFiles/Debug/moc_videowid.cpp
|
d01a6151477562f6758c7a977a63c6a12f35b4bb
|
[] |
no_license
|
VanceKingSaxbeA/EventCaptureEngine
|
693db07dd6c4bb00e1150c996b7eea65c1ccf8a3
|
7f0ce1975c5b4262728ad48b97709159e04aa7e1
|
refs/heads/master
| 2016-08-04T09:07:59.746948
| 2015-08-01T12:18:50
| 2015-08-01T12:18:50
| 16,331,690
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,840
|
cpp
|
moc_videowid.cpp
|
/*Owner & Copyrights: Vance King Saxbe. A.*//* Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe@yahoo.com. Development teams from Power Dominion Enterprise, Precieux Consulting. Project sponsored by GoldSax Foundation, GoldSax Group and executed by GoldSax Manager.*//****************************************************************************
** Meta object code from reading C++ file 'videowid.h'
**
** Created: Thu Sep 26 13:46:51 2013
** by: The Qt Meta Object Compiler version 62 (Qt 4.7.4)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../../../../Common/DSCORE/videowid.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'videowid.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 62
#error "This file was generated using the moc from 4.7.4. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_VideoWid[] = {
// content:
5, // revision
0, // classname
0, 0, // classinfo
17, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
3, // signalCount
// signals: signature, parameters, type, tag, flags
10, 9, 9, 9, 0x05,
25, 9, 9, 9, 0x05,
42, 40, 9, 9, 0x05,
// slots: signature, parameters, type, tag, flags
62, 9, 9, 9, 0x08,
73, 9, 9, 9, 0x08,
82, 40, 9, 9, 0x0a,
127, 9, 9, 9, 0x0a,
155, 9, 9, 9, 0x0a,
183, 9, 9, 9, 0x0a,
205, 9, 9, 9, 0x0a,
227, 9, 9, 9, 0x0a,
240, 9, 9, 9, 0x0a,
251, 9, 9, 9, 0x0a,
270, 263, 9, 9, 0x0a,
287, 40, 9, 9, 0x0a,
318, 9, 313, 9, 0x0a,
329, 9, 313, 9, 0x0a,
0 // eod
};
static const char qt_meta_stringdata_VideoWid[] = {
"VideoWid\0\0beginRestart()\0finished(bool)\0"
",\0audioLevel(int,int)\0timerTic()\0"
"signal()\0widget_Position(action_status,VideoWidgets*)\0"
"toMainwidget(VideoWidgets*)\0"
"toFullScreen(VideoWidgets*)\0"
"toHide(VideoWidgets*)\0toShow(VideoWidgets*)\0"
"finish(bool)\0gStarted()\0pause(bool)\0"
"status\0fullScreen(bool)\0"
"setChannelvolume(int,int)\0bool\0"
"runGraph()\0stopGraph()\0"
};
const QMetaObject VideoWid::staticMetaObject = {
{ &QWidget::staticMetaObject, qt_meta_stringdata_VideoWid,
qt_meta_data_VideoWid, 0 }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &VideoWid::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *VideoWid::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *VideoWid::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_VideoWid))
return static_cast<void*>(const_cast< VideoWid*>(this));
return QWidget::qt_metacast(_clname);
}
int VideoWid::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: beginRestart(); break;
case 1: finished((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 2: audioLevel((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
case 3: timerTic(); break;
case 4: signal(); break;
case 5: widget_Position((*reinterpret_cast< action_status(*)>(_a[1])),(*reinterpret_cast< VideoWidgets*(*)>(_a[2]))); break;
case 6: toMainwidget((*reinterpret_cast< VideoWidgets*(*)>(_a[1]))); break;
case 7: toFullScreen((*reinterpret_cast< VideoWidgets*(*)>(_a[1]))); break;
case 8: toHide((*reinterpret_cast< VideoWidgets*(*)>(_a[1]))); break;
case 9: toShow((*reinterpret_cast< VideoWidgets*(*)>(_a[1]))); break;
case 10: finish((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 11: gStarted(); break;
case 12: pause((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 13: fullScreen((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 14: setChannelvolume((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
case 15: { bool _r = runGraph();
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
case 16: { bool _r = stopGraph();
if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break;
default: ;
}
_id -= 17;
}
return _id;
}
// SIGNAL 0
void VideoWid::beginRestart()
{
QMetaObject::activate(this, &staticMetaObject, 0, 0);
}
// SIGNAL 1
void VideoWid::finished(bool _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
// SIGNAL 2
void VideoWid::audioLevel(int _t1, int _t2)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) };
QMetaObject::activate(this, &staticMetaObject, 2, _a);
}
QT_END_MOC_NAMESPACE
/*email to provide support at vancekingsaxbe@powerdominionenterprise.com, businessaffairs@powerdominionenterprise.com, For donations please write to fundraising@powerdominionenterprise.com*/
|
f95a783aa219a9fb25d04d6a75b996a4651f6347
|
a5651c5032b9de35c78f63b38324fe7392250d14
|
/Codeforces/Round_468/D.cpp
|
cbda799724bda299940be1fc2f14d8b2e87d0aa9
|
[] |
no_license
|
bkhanale/Competitive-Programming
|
7012db1c7f6fd0950f14a865c175a569534bfb69
|
074779f8c513405b8c5ddd5f750592083eaf7548
|
refs/heads/master
| 2021-01-01T15:21:48.213987
| 2019-02-07T08:00:47
| 2019-02-07T08:00:47
| 97,603,092
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 870
|
cpp
|
D.cpp
|
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
freopen("input.txt", "r", stdin);
ll n;
cin >> n;
ll p[n];
for(ll i = 0; i < n - 1; i++) {
cin >> p[i];
}
ll cnt = 0, app_time[100005], j, i = 0, k = 0, ans = 1, maxk = 0;
while(k <= max(n - 2, maxk)) {
cout << "i = " << i << endl;
if(i < n - 1) {
cnt = 1;
for(j = i + 1; j < n - 1; j++) {
if(p[j] != p[i]) {
break;
} else {
cnt++;
}
}
cout << "j = " << j << endl;
maxk = max(p[i] + k - 1, maxk);
app_time[p[i] + k - 1] += cnt;
i = j;
}
cout << "cnt = " << cnt << " k = " << k << " maxk = " << maxk << endl;
ans += app_time[k] % 2; k++;
}
for(ll i = k + 1; i <= maxk; i++) {
ans += app_time[i] % 2;
}
for(ll i = 0; i <= maxk; i++) {
cout << app_time[i] << " ";
}
cout << endl;
cout << ans << endl;
return 0;
}
|
daebe3e425fa8a2e116f089675544576eb1a8f36
|
4e06cdf7f9e3fcf519a6f281b2cf02014f6ec375
|
/Sources/Login.cpp
|
4a5d47352d7b158a24b933de9624fbafd28e16a0
|
[] |
no_license
|
JafarBM/MineSweeper
|
453151bdd332071415587ffdb6760c67fad5d0cf
|
07c2aaae38125468f98d598d713212243461348b
|
refs/heads/master
| 2023-06-03T13:10:50.579006
| 2021-06-20T19:36:39
| 2021-06-20T19:36:39
| 376,236,995
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,637
|
cpp
|
Login.cpp
|
//
// Created by morpheus on 1/31/19.
//
#include <Headers/Login.h>
#include <Headers/Client.h>
LoginMenu::LoginMenu() {
QRect rect = QApplication::desktop()->screenGeometry();
this->setGeometry(rect.width() / 2, rect.height() / 2, 400, 400);
QDialogButtonBox *buttonBox = new QDialogButtonBox;
exit = new QPushButton("Exit", this);
play = new QPushButton("Play", this);
buttonBox->addButton(exit, QDialogButtonBox::RejectRole);
buttonBox->addButton(play, QDialogButtonBox::ActionRole);
QHBoxLayout *usernameLayout = new QHBoxLayout;
username = new QLineEdit("Player");
QLabel *userLabel = new QLabel("Username: ");
usernameLayout->addWidget(userLabel); usernameLayout->addWidget(username);
QHBoxLayout *boardSizeLayout = new QHBoxLayout;
board_height = new QLineEdit("10");
QLabel *heightLabel = new QLabel("Height: ");
boardSizeLayout->addWidget(heightLabel); boardSizeLayout->addWidget(board_height);
board_width = new QLineEdit("10");
QLabel *widthLabel = new QLabel("Width");
boardSizeLayout->addWidget(widthLabel); boardSizeLayout->addWidget(board_width);
QVBoxLayout *LoginPage = new QVBoxLayout;
LoginPage->addLayout(usernameLayout);
LoginPage->addLayout(boardSizeLayout);
LoginPage->addWidget(buttonBox);
setLayout(LoginPage);
connect(exit, SIGNAL(clicked()), this, SLOT(close()));
connect(play, SIGNAL(clicked()), this, SLOT(newGame()));
show();
}
void LoginMenu::newGame() {
this->hide();
emit newLogin(new QString(username->text()), board_height->text().toUShort(), board_width->text().toUShort());
}
|
128defb60990d1060ca76187916bd7186f331496
|
b742f3559ce780414ade232258532560659e6738
|
/gemm_optimized/main.cpp
|
8b14a8e512bc7891b276a58f062fc621cdcfaf1f
|
[] |
no_license
|
fernandoFernandeSantos/CUDA_training
|
9f35b3d49ec204a2a5ad5c467c61002fac839ca3
|
bf9a525d1a452dd991d16139b16bc1a528240fcf
|
refs/heads/master
| 2021-09-06T09:31:43.238177
| 2021-08-24T22:03:30
| 2021-08-24T22:03:30
| 73,217,835
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,762
|
cpp
|
main.cpp
|
/**
* Copyright 1993-2012 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*/
#include "device_vector.h"
#include "sgemm_nn_64_16_16_16_4.h"
#include <cassert>
#include <vector>
#include <iostream>
typedef double real_t;
typedef float half_real_t;
void gemm_host(std::vector<real_t>& a, std::vector<real_t>& b,
std::vector<real_t>& c, real_t alpha, real_t beta, int m, int n,
int k) {
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
real_t sum = 0;
for (int p = 0; p < k; p++) {
sum += a[i * m + p] * b[p * n + j];
}
c[i * m + j] = alpha * sum + beta * c[i * m + j];
}
}
}
int main(int argc, char **argv) {
int m;
int n;
int k;
m = n = k = 4096;
int lda = m;
int ldb = n;
int ldc = k;
real_t alpha = 0.1;
real_t beta = 0.3;
const std::vector<real_t> zero_vector(m * k, 0.0);
const std::vector<half_real_t> zero_vector_inc(m * k, 0.0);
std::vector<real_t> host_a(m * n, alpha);
std::vector<real_t> host_b(n * k, beta);
std::vector<real_t> host_c(m * k, 0.0);
std::vector<half_real_t> host_c_inc(m * k, 0.0);
rad::DeviceVector<real_t> device_c(host_c), device_a(host_a), device_b(
host_b);
rad::DeviceVector<half_real_t> device_c_inc(host_c_inc);
cudaStream_t st;
cudaStreamCreate(&st);
assert(m > 512 && n > 512 && m % 64 == 0 && n % 16 == 0 && k % 16 == 0);
for (int t = 0; t < 10; t++) {
device_c = zero_vector;
device_c_inc = zero_vector_inc;
sgemm(st, device_c.data(), device_a.data(), device_b.data(), m, n, k,
lda, ldb, ldc, alpha, beta);
device_c = zero_vector;
device_c_inc = zero_vector_inc;
sgemm_dmr(st, device_c.data(), device_c_inc.data(), device_a.data(),
device_b.data(), m, n, k, lda, ldb, ldc, alpha, beta);
}
host_c = device_c.to_vector();
host_c_inc = device_c_inc.to_vector();
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
std::cout << host_c[i * m + j] << " ";
}
std::cout << std::endl;
}
std::cout << "Incomplete type" << std::endl;
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
std::cout << host_c_inc[i * m + j] << " ";
}
std::cout << std::endl;
}
std::vector<real_t> test_gemm(m * k, 0);
gemm_host(host_a, host_b, test_gemm, alpha, beta, m, n, k);
for (int i = 0; i < test_gemm.size(); i++) {
auto g = test_gemm[i], f = host_c[i];
if (g != f) {
std::cout << "HOST " << g << " GPU " << f << std::endl;
break;
}
}
cudaStreamDestroy(st);
return 0;
}
|
597a3e6164145f6d18c8658c152cb56282e8295a
|
c2e70f85de6df21e7b48c183d796838382d3b0c6
|
/play7.cpp
|
42fd3ab0da6413d870e1e508478ef3c33665cd99
|
[] |
no_license
|
RENUGAPRIYA/magical-strikers
|
a9b6ee485931213f9ba7a446ee1a4436bfa76814
|
dad499e3774b5761ac7667553c5d312aa537d8c9
|
refs/heads/master
| 2021-04-25T09:02:55.717641
| 2018-05-25T08:52:26
| 2018-05-25T08:52:26
| 122,191,308
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 729
|
cpp
|
play7.cpp
|
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
clrscr();
int i=0, j=0, k=0;
char str1[20], str2[20], temp[20];
cout<<"Enter the 1st String : ";
gets(str1);
cout<<"Enter the 2nd String : ";
gets(str2);
cout<<"Strings before swapping are :\n";
cout<<"String 1 = "<<str1<<"\n";
cout<<"String 2 = "<<str2<<"\n";
while(str1[i]!='\0')
{
temp[j]=str1[i];
i++;
j++;
}
temp[j]='\0';
i=0, j=0;
while(str2[i]!='\0')
{
str1[j]=str2[i];
i++;
j++;
}
str1[j]='\0';
i=0, j=0;
while(temp[i]!='\0')
{
str2[j]=temp[i];
i++;
j++;
}
str2[j]='\0';
cout<<"Strings after swapping : \n";
cout<<"String 1 = "<<str1<<"\n";
cout<<"String 2 = "<<str2<<"\n";
getch();
}
|
e6b4d4e7dabfeaae95d7e5a5397fd1833b4d98c5
|
38d7655ec5b69b8793d391c06617757cf4f5167d
|
/c++codes2/string.cpp
|
c5490d1df997d45edc4453f697f642c6bf114a25
|
[] |
no_license
|
priyanksonis/cpp-codes
|
81ba5939f82d245b72b08db6a66ad1e6d399132e
|
c7e2ec11f1ba3e560457058239da3a3a11e5963e
|
refs/heads/master
| 2020-04-02T14:34:28.392578
| 2019-07-20T13:09:38
| 2019-07-20T13:09:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 172
|
cpp
|
string.cpp
|
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
size_t len;
string s;
cin>>s;
cout<<s;
cout<<s.at(2);
len=strlen(s.c_str());
cout<<len;
}
|
c459ca8d57dcd5448adbd17fe3971de189d4aac6
|
751fe73c7a0188dfe27c9fe78c0410b137db91fb
|
/log/flog/Flog.h
|
9372a0bd9d8507079ff1473ee3809dd0d6ef1d65
|
[] |
no_license
|
longshadian/estl
|
0b1380e9dacfc4e193e1bb19401de28dd135fedf
|
3dba7a84abc8dbf999ababa977279e929a0a6623
|
refs/heads/master
| 2021-07-09T19:29:06.402311
| 2021-04-05T14:16:21
| 2021-04-05T14:16:21
| 12,356,617
| 3
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,166
|
h
|
Flog.h
|
#pragma once
#include <cstdio>
#include <cstdint>
#include <cstdarg>
#include <vector>
#include <list>
#include <thread>
#include <string>
#include <condition_variable>
#include <mutex>
#include <atomic>
namespace flog
{
struct LogBuffer
{
LogBuffer();
~LogBuffer();
LogBuffer(const LogBuffer&) = delete;
LogBuffer& operator=(const LogBuffer&) = delete;
LogBuffer(LogBuffer&&);
LogBuffer& operator=(LogBuffer&&);
void Resize(std::size_t length);
std::uint8_t* WritePtr();
const std::uint8_t* ReadPtr() const;
void Consume(std::size_t length);
std::vector<std::uint8_t> m_buffer;
};
enum LOG_TYPE
{
LOG_DEBUG = 1,
LOG_TIP = 2,
LOG_TJ = 4,
LOG_ERROR = 8,
LOG_TRACE = 16,
};
class LogRecord
{
public:
LogRecord(const char* log_root, const char* app_name);
~LogRecord();
void log(const char* log_type, const char* log_content);
char m_app_name[256];
std::int32_t m_day;
std::int32_t m_log_type;
std::string m_dir_name;
LogBuffer m_buffer;
};
using LogRecordUPtr = std::unique_ptr<LogRecord>;
class Logger
{
Logger();
public:
struct log_t
{
int m_type;
char m_app_name[64];
char m_app_log[1024];
};
public:
~Logger();
static Logger* Get();
void Init();
void setLogLevel(int level);
int getLogLevel() const;
void Post(LogRecordUPtr record);
private:
void StartThread();
std::string getFullAppName();
std::string getRootDir();
static int getexepath(char* path, int max);
void WriteRecord(LogRecordUPtr record);
private:
std::int32_t m_log_level;
std::atomic<bool> m_running;
std::thread m_thread;
std::string m_log_root;
std::mutex m_mtx;
std::condition_variable m_cond;
std::list<LogRecordUPtr> m_list;
};
void PrintFormat(const std::string& sub_dir_name, LOG_TYPE log_type, const char* format, ...);
void StringPrintf(std::vector<char>* output, const char* format, va_list args);
std::unique_ptr<LogRecord> CreateRecord();
} // namespace flog
|
1aebf8a92fea21813e58d60a75891c399a77403a
|
d25fef58f0802b52b9e0f4c0d9044eeaae7bc2be
|
/knights.h
|
a88d52852bdf8109c7f55c50b2ca8e95428a1614
|
[] |
no_license
|
Shuistlo/Knights-Tour
|
7d498a857c0f16c641c4b82e2204592625288cd6
|
aebd0540d336ed01c65dde257675ac1e7c9b4d83
|
refs/heads/master
| 2021-05-06T00:28:03.786736
| 2018-01-12T16:15:29
| 2018-01-12T16:15:29
| 117,261,336
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,446
|
h
|
knights.h
|
#ifndef KNIGHTS_H
#define KNIGHTS_H
#include <utility>
#include <vector>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <cstdint>
// Do not add any extra #includes without asking on the KEATS discussion forum
using std::pair;
using std::make_pair;
using std::vector;
typedef vector<pair<int,int> > Path;
/** Helper function: adds two pairs of ints */
pair<int,int> operator+(const pair<int,int> & a, const pair<int,int> & b) {
return make_pair(a.first + b.first, a.second + b.second);
}
// TODO - your code goes here
bool const isLegal(const pair<int,int> &currLoc, const int dim, const vector<pair<int,int>> path){
if(std::find(path.begin(), path.end(), currLoc) == path.end()) { return false; }
return !(currLoc.first < 0 || currLoc.first >=dim || currLoc.second < 0 || currLoc.second > dim);
}
vector<pair<int,int>> moves(const pair<int,int> & currLoc){
vector<pair<int,int>> operations{make_pair(1,-2), make_pair(2,-1), make_pair(2,1),make_pair(1,2),make_pair(-1,2),make_pair(-2,1),make_pair(-2,-1),make_pair(-1,-2)};
vector<pair<int,int>> moves(8);
std::transform(operations.begin(), operations.end(), moves, [&currLoc](const pair<int,int> cL){
return cL+currLoc;
});
return moves;
}
vector<pair<int,int>> legal_moves(const int dim, const vector<pair<int,int>> path, const pair<int,int> &currLoc){
vector<pair<int,int>> allMoves = moves(currLoc);
vector<pair<int,int>> legalsOnly;
std::transform(allMoves.begin(), allMoves.end(), legalsOnly, [&currLoc, dim, path](const pair<int,int> cL){
if(isLegal(currLoc, dim, path)){
return cL;
}
});
return legalsOnly;
}
pair<Path,bool> first_tour(const int dim, Path path) {
if(path.size() == dim*dim){
return make_pair(path, true);
}
Path emptyPath;
vector<pair<int,int>> moves = legal_moves(dim,path,path[path.size()-1]);
if(moves.size() == 0){
return make_pair(emptyPath, false);
}
else {
for(int i = 0; i < moves.size(); i++){
path.push_back(moves[i]);
pair<Path,bool> possibleTour = first_tour(dim,path);
if(possibleTour.second==true){
return possibleTour;
}else{
path.pop_back();
}
}
return make_pair(emptyPath,false);
}
}
// Do not edit below this line
#endif
|
d280e6f5ba3d6223fb16c39d8eac12199c128d3b
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_1484496_0/C++/smn/C.cpp
|
aa078617c676dfd09eb897ab5741ccbdd07be5e5
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,491
|
cpp
|
C.cpp
|
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <map>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <stack>
#include <queue>
#include <cstring>
using namespace std;
typedef long long LL;
#define REP(i,e) for (int (i) = 0; (i) < (e); ++(i))
#define foreach(__my_iterator,__my_object) for (typeof((__my_object).begin()) __my_iterator = (__my_object).begin(); __my_iterator!= (__my_object).end(); __my_iterator++)
int H[20 * 100000 + 1];
int a[21];
void go(int x, int y){
REP(i, 20){
int ax = (x>>i) & 1;
int ay = (y>>i) & 1;
if(ax && ay){
x ^= 1<<i;
y ^= 1<<i;
}
}
REP(i,20) if((x>>i) & 1) printf("%d ", a[i]);
printf("\n");
REP(i,20) if((y>>i) & 1) printf("%d ", a[i]);
printf("\n");
}
void solve(){
bool ok = false;
REP(i, 1<<20){
int sum = 0;
REP(j, 20) if((i >> j) & 1) sum += a[j];
if(H[sum] > 0){
ok = true;
go(H[sum], i);
break;
}
H[sum] = i;
}
if(!ok) printf("Impossible\n");
}
int main(){
int T,N;
cin >> T;
REP(i, T){
cin >> N;
REP(j, N) cin >> a[j];
printf("Case #%d:\n", i+1);
memset(H, 0, sizeof(H));
solve();
}
return 0;
}
/*
echo "2
20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
20 120 266 858 1243 1657 1771 2328 2490 2665 2894 3117 4210 4454 4943 5690 6170 7048 7125 9512 9600" | ./a.out
*/
|
7fc42314ef6b35ba239b70df6b5eba71c33ac350
|
548cddac58b80abf15deee01851ccd7115dbc0ab
|
/Program2Files/Program2/Prompt/Examples/buildheap.cxx
|
7a79e06fcf0bd9fd543e3b846e54f30448abe169
|
[] |
no_license
|
shivangsoni/Data-Structures
|
5d1084be1fa6e5a64d103f480e932e41a1715a30
|
c058a1f5862ce7f3060c6022c9f724f1f06fe181
|
refs/heads/master
| 2021-04-15T14:16:54.754984
| 2018-03-27T02:26:24
| 2018-03-27T02:26:24
| 126,529,424
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,580
|
cxx
|
buildheap.cxx
|
#include <cstdio>
#include <iostream>
#include <fstream>
#include <random>
#include <set>
#include <string>
#include "json.hpp"
using namespace std;
class MaxPriorityQueue
{
public:
int n;
int priority[10000];
int count;
MaxPriorityQueue(){
n=1;
count=1;
}
MaxPriorityQueue(int a){
priority[0]=1000000;
n=a;
count=1;
}
void insert(int k){
if(count == n+1){
cout<<"Priority Queue is full cannot insert\n";
//exit(0);
}
else{
//cout<<"Inside insert";
priority[count] = k;
heapifyup(count);
count++;
}
}
int removeMax(){
if(count == 1){
cout<<"Priority Queue is empty cannot delete\n";
//exit(0);
}
else{
int v = priority[1];
count=count-1;
priority[1]=priority[count];
heapifydown(1);
return v;
}
}
int removeKey(int k){
int index = 0;
for(int i=1;i<count;i++){
if(k == priority[i]){
index = i;
}
}
if(index == 0)
{
cout<<"Key to be deleted does not exist in Priority Queue\n";
//exit(0);
}
int v = priority[index];
priority[index] = priority[--count];
heapifydown(index);
return v;
}
void change(int k,int newk){
int index=0;
for(int i=1;i<count;i++){
if(priority[i] == k){
index = i;
}
}
if(index == 0){
//cout<<"Key to be changed"<<k<<" does not exist in Priority Queue\n";
/*for(int i=0;i<count;i++){
cout<<priority[i]<<"\t";
}*/
//exit(0);
}
priority[index] = newk;
//if(newk > k){
//heapifydown(index);
/*}
else{
*/heapifyup(index);
//}
}
void heapifyup(int k){
int v;
v = priority[k];
if(k>=2){
while (priority[k/2] < v)
{ int temp;
temp =priority[k];
priority[k] = priority[k/2];
priority[k/2] = temp;
//cout<<"Priority of k "<<priority[k]<<"\t V value"<<v<<"\n";
k = k/2;
if(k<2){break;}
}
}
priority[k] = v;
}
void heapifydown(int k){
int j, v;
v = priority[k];
while (k <= count/2)
{
j = k+k;
if (j < count && priority[j] < priority[j+1]) j++;
if (v >= priority[j]) break;
priority[k] = priority[j]; k = j;
}
priority[k] = v;
}
};
int main(int argc, char** argv) {
/* MaxPriorityQueue a(4);
//cout<<"Call Insert\n";
a.insert(4065);
a.insert(3047);
a.change(4065,4358);
a.change(4358,3562);
a.change(3562,4654);
a.change(4654,2955);
a.change(3047,1123);
a.insert(95);
int h=a.removeMax();
a.change(1123,4791);
a.change(4791,2971);
a.change(2971,4847);
a.change(4847,869);
a.change(869,3551);
a.change(3551,1018);
a.insert(1317);
a.insert(2188);
a.change(1018,1142);
a.removeMax();
a.change(1142,4824);
for(int i=1;i<a.count;i++){
cout<<a.priority[i]<<"\t";
}
cout<<"\n";*/
//a.removeKey(2);
//a.change(9,1);
//a.removeMax();
/*for(int i=1;i<a.count;i++){
cout<<a.priority[i];
}*/
if (argc != 2) {
printf("Usage: %s inputFile\n", argv[0]);
return EXIT_FAILURE;
}
// Get samples
string inputFilename(argv[1]);
ifstream inputFile;
inputFile.open(inputFilename.c_str());
nlohmann::json samples;
if (inputFile.is_open()) {
inputFile >> samples;
} else {
printf("Unable to open file %s\n", inputFilename.c_str());
return EXIT_FAILURE;
}
int n = samples["metadata"]["maxHeapSize"];
MaxPriorityQueue a(n);
//cout<<"The capacity of priority Queue\t"<<a.n<<"\n";
nlohmann::json result;
result["metadata"]["maxHeapSize"] = samples["metadata"]["maxHeapSize"];
result["metadata"]["max_size"] = samples["metadata"]["maxHeapSize"];
result["metadata"]["numOperations"] = samples["metadata"]["numOperations"];
for (auto itr = samples.begin(); itr != samples.end(); ++itr) {
if (itr.key() != "metadata") {
auto sample = itr.value();
string str = sample["operation"];
//cout<<str<<"\n";
if(str.compare("insert") == 0)
{
int t = sample["key"];
//cout<< "The value to be inserting is"<<t<<"\n";
a.insert(t);
//continue;
}
else if(str.compare("removeMax") == 0)
{
int k = a.removeMax();
//cout<< "The value deleted is"<<k<<"Count Value is"<<a.count<<"\n";
//continue;
}
else if(str.compare("change") == 0)
{
int key = sample["key"];
int newkey = sample["newKey"];
// cout<< "The value to be changed is"<<key<<"Updated Value"<<newkey<<"\n";
a.change(key,newkey);
//continue;
}
else if(str.compare("removeKey") == 0){
int key =sample["key"];
//cout<<"The key to be removed is"<<key<<"\n";
a.removeKey(key);
//continue;
}
/* for(int i=1;i<a.count;i++){
cout<<a.priority[i]<<" ";
}
cout<<"\n";*/
}
}
result["metadata"]["size"]=a.count-1;
for(int i=1;i<a.count;i++){
//cout<<a.priority[i]<<"\t";
string s = to_string(i);
result[s]["key"]=a.priority[i];
if((i/2) >= 1){
result[s]["parent"]= to_string(i/2);
}
if((2*i)<a.count){
result[s]["leftChild"]= to_string(2*i);
}
if((2*i+1)<a.count){
result[s]["rightChild"]= to_string(2*i+1);
}
}
cout<<result;
}
|
1866bdec83dc7c903f5275c421410f32dc0ed25b
|
26aa9c99c8ecc6ea1aa1524edebd029713510d1f
|
/TestSuite/TestSuite.cpp
|
f0c5b326877bfa3d7bf3b4e8835a9329f444c283
|
[] |
no_license
|
leobrl/XBlas
|
c40994be52f4d3cc23d79aee3d5f93a5b6c405f1
|
263ac9a35fb766570b4e37a84641d1515d9c9bf1
|
refs/heads/master
| 2021-07-19T12:27:19.647598
| 2017-10-24T20:43:38
| 2017-10-24T20:43:38
| 108,180,250
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 278
|
cpp
|
TestSuite.cpp
|
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <gtest/gtest.h>
#include <stdio.h>
#include<iostream>
#include <gtest/gtest.h>
int main(int ac, char* av[])
{
testing::InitGoogleTest(&ac, av);
testing::GTEST_FLAG(filter) = "*";
RUN_ALL_TESTS();
}
|
00a4d7b12fc0ea32f699c2a6a19a9723003739cd
|
68f09846b235ee3ee03340e35c1c240d747c129c
|
/graf2/graf2.cpp
|
4be985f495cbb4df7d8c5d7ad182b1c9477daa76
|
[] |
no_license
|
marekziba/graf2
|
164c07f90009ca18f1a1efb914d4baf147ab18e0
|
0596f825f7dc0799675ab7ee34875dfb603488c9
|
refs/heads/master
| 2020-12-23T18:55:09.877266
| 2020-01-30T15:15:22
| 2020-01-30T15:15:22
| 237,240,349
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,820
|
cpp
|
graf2.cpp
|
// graf2.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <ctime>
#include <cstdio>
#include "Solution.h"
#include "Population.h"
#include "GeneticAlgorithm.h"
void generate(int nVerts, float density, std::string path) { // this one works fine
// the std::array can only be fixed-size, therefore we're forced to use vector of vectors
std::vector<std::vector<int>> adjMX; adjMX.resize(nVerts);
// initializing the "array"
std::ofstream outfile(path);
outfile << nVerts << "\n";
for (int i = 0; i < nVerts; i++) {
adjMX[i].resize(nVerts);
}
// filling with zeros
for (int i = 0; i < nVerts; i++) {
for (int j = 0; j < nVerts; j++) {
adjMX[i][j] = 0;
}
}
// and now we're determining the amount of edges and generating them by randomly choosing two vertices
int nEdges = round((nVerts * (nVerts - 1)) / 2 * density);
int v1, v2;
//std::srad(std::time(nullptr));
for (int i = 0; i < nEdges; i++) {
do {
v1 = std::rand() % nVerts;
v2 = std::rand() % nVerts;
} while (v1 == v2 || adjMX[v1][v2] == 1 || adjMX[v2][v1] == 1); // we need to check whether the edge is not a self-loop and hasn't been generated yet
adjMX[v1][v2] = 1; adjMX[v2][v1] = 1; // writing an edge to the matrix
//std::cout << v1 << " --- " << v2 << "\n";
}
for (int i = 0; i < nVerts; i++) {
for (int j = 0; j < nVerts; j++) {
if (adjMX[i][j] == 1 && i < j) {
outfile << i + 1 << " " << j + 1 << "\n";
}
}
}
outfile.close();
}
int main()
{
std::string path = "C:/Users/Lenovo/Documents/OK/gc500.txt";
std::srand(std::time(nullptr));
//generate(496, 0.01, path);
Graf g(path.c_str());
g.print();
std::cout << "\n\n";
/*
for (int i = 0; i < 10; i++) {
Solution s(g, 3);
std::cout << s << "\n";
}
*/
/*
Population p(g, 6, 4);
std::cout << p;
p.refresh();
std::cout << "\nPopulation after refresh:\n" << p;
*/
int colors = 209;
GeneticAlgorithm genalg(g, colors);
//getch();
genalg.printResults();
while (genalg.run(20000)) {
std::cout << "Found solution for " << colors << " colors\n";
genalg = GeneticAlgorithm(g, --colors);
}
genalg.printResults();
}
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu
// Tips for Getting Started:
// 1. Use the Solution Explorer window to add/manage files
// 2. Use the Team Explorer window to connect to source control
// 3. Use the Output window to see build output and other messages
// 4. Use the Error List window to view errors
// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
|
68c876647b7326169e8193d0957ecd0debc7b797
|
7b49c6aced0e672cc7636a4fb5eeee7694f28cdc
|
/project/source/game/Actor/Enemy.h
|
ce2e904569b233b22509ed04d24b350673cb00b2
|
[] |
no_license
|
TomohiroYuki/YukitterFramework
|
f57b3231deaeba86ac2e97d2cadb27a187cc6b49
|
50efa6d32005c89d1164894e4a239300573d7e7b
|
refs/heads/master
| 2020-03-30T07:47:56.342747
| 2018-09-30T13:16:43
| 2018-09-30T13:16:43
| 150,967,310
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 10,547
|
h
|
Enemy.h
|
//#pragma once
//
//#include "source\game\Actor\Actor.h"
//#include "source\game\Actor\Player.h"
//#include "source\game\Actor\Bullet.h"
//#include <list>
//#include <vector>
//#include "source\system\UI\Widget.h"
////#include "source\system\sound\sound.h"
//
//class EnemyManager;
//class Enemy_Zako;
//class E2_YuppiY;
//
//class EnemyBase :public Actor
//{
//public:
// EnemyBase(Player* p_ref, int mesh_id, float HP_MAX);
// virtual ~EnemyBase() {}
//protected:
// Player* player_reference;
// DirectX::XMFLOAT3 move;
// float HP_MAX;
//
// int ai_mode{};
// int ai_timer{};
// float speed{};
//public:
// float hp;
//
// virtual bool Update() = 0;
// virtual void ChangeAI(int new_mode)
// {
// ai_mode = new_mode;
// ai_timer = 0;
// speed = .0f;
// }
//
//};
//
//
//class EnemyManager
//{
//public:
// EnemyManager()
// {}
// ~EnemyManager() {}
//private:
// static bool is_loaded;
//public:
// static Player* player_reference;
//
//
//
// static void Initialize(Player* p_ref)
// {
// player_reference = p_ref;
// enemies_list.clear();
// if (is_loaded)return;
// AddEnemyModel("DATA\\3D\\aku.fbx");
// AddEnemyModel("DATA\\3D\\ecc.fbx");
// AddEnemyModel("DATA\\3D\\oh.fbx");
// AddEnemyModel("DATA\\3D\\totsu.fbx");
//
// is_loaded = true;
// }
//
// static void ResetPlayerReference(Player* p_ref)
// {
// player_reference = p_ref;
// }
//
// static std::list<std::unique_ptr<EnemyBase>> enemies_list;
//
// static void SpawnEnemy(std::unique_ptr<EnemyBase> enemy);
//
// static std::vector<std::shared_ptr<StaticMesh>> enemies_model_list;
//
// static void AddEnemyModel(const char* filename);
//
// static std::shared_ptr<StaticMesh> GetMesh(int id);
//
// static void Update();
//
// static void Render()
// {
// for each(auto& enemy in enemies_list)
// {
// enemy->Render();
// }
// }
//
// static bool ShotCollision(Bullet* bullet)
// {
// for (auto& it = enemies_list.begin(); it != enemies_list.end();/**/)
// {
//
// VECTORIII b_pos(bullet->GetActorLocation().x, bullet->GetActorLocation().y, bullet->GetActorLocation().z);
// //if(bullet->GetActorLocation()- (*it)->GetActorLocation())
// VECTORIII e_pos((*it)->GetActorLocation().x, (*it)->GetActorLocation().y, (*it)->GetActorLocation().z);
//
//
// if (HitCheckSphere(b_pos, 1.5f, e_pos, 1.5f))
// {
//
// (*it)->hp -= 1.0f;
// if ((*it)->hp <= 0)
// {
// it = enemies_list.erase(it);
// }
// /*else
// {
// it++;
// continue;
// }*/
// return true;
//
// }
// else
// it++;
// }
// return false;
// }
//
//
// static void RandomSpawn()
// {
// static int count = 0;
// count++;
//
// if (count > 10)
// {
// count = 0;
// enemies_list.emplace_back(std::make_unique<E2_YuppiY>(DirectX::XMFLOAT3(0, 0, 0), player_reference));
// }
// }
//
//
// static void SpawnE2(DirectX::XMFLOAT3 pos)
// {
// EnemyManager::enemies_list.emplace_back(std::make_unique<E2_YuppiY>(pos,player_reference ));
//
// }
//
//};
//
//
//
//class Enemy_Zako :public EnemyBase
//{
//public:
// Enemy_Zako(DirectX::XMFLOAT3 pos, Player* p_ref) :
// EnemyBase(p_ref, 0,1.0f)
// {
// this->position = pos;
// move = DirectX::XMFLOAT3(0.2f, 0, 0);
// }
//private:
//
//public:
//
// bool Update()
// {
// position.x += move.x;
// position.y += move.y;
// position.z += move.z;
//
// if (HitCheckSphere(GetActorLocation(), 1.5f, player_reference->GetActorLocation(), 1.2f))
// {
//
// player_reference->life--;
// return true;
// }
// return false;
//
// }
//};
//
//
//class Enemy_Chaser :public EnemyBase
//{
//public:
// Enemy_Chaser(DirectX::XMFLOAT3 pos, Player* p_ref) :
// EnemyBase(p_ref, 2,1.0f)
// {
// this->position = pos;
// move = DirectX::XMFLOAT3(0.2f, 0, 0);
//
// speed = 0.5f;
//
// }
//private:
// //float speed{};
//public:
//
// bool Update()
// {
//
//
// VECTORIII player_pos = player_reference->GetActorLocation();
//
// VECTORIII pos = GetActorLocation();
//
// pos += (player_pos - pos).GetNormalize()*speed;
//
//
//
// position = DirectX::XMFLOAT3(pos.x, pos.y, pos.z);
//
// if (HitCheckSphere(GetActorLocation(), 1.5f, player_reference->GetActorLocation(), 1.2f))
// {
//
// player_reference->life--;
// return true;
// }
// return false;
//
// }
//};
//
//
//class E2_YuppiY final :public EnemyBase
//{
//public:
// E2_YuppiY(DirectX::XMFLOAT3 pos, Player* p_ref) :
// EnemyBase(p_ref,3,1.0f)
// {
// position = pos;
// }
//
//private:
// enum AI_MODE {
// CHASE, ATTACK, STOP, WALK
// };
// enum CAUTION_STATE {
// NOTHING, QUESTION, CAUTION
// }caution_state = NOTHING;
//
// const float E2_MOVE_SPEED= 0.60f;
// const float sencetivity = 8.5f;
// float caution_gauge = 0;
// const float E_GAUGE_CAUTION_MAX = 300.0f;
// const float E_GAUGE_ANGRY_MAX = 100.0f;
//public:
// void AI_Walk()
// {
// position.x -= 2;
//
// }
// bool AI_Chase(bool is_move)
// {
// float ax, ay, bx, by, crossP;
// float dotP, L1, L2, cosValue, dAngle;
// ax = sinf(angle);
// ay = cosf(angle);
// bx = player_reference->GetActorLocation().x - position.x;
// by = player_reference->GetActorLocation().y - position.y;
// crossP = ay*bx - ax*by;
// dotP = ax*bx + ay*by;
// L1 = sqrtf(ax*ax + ay*ay);
// L2 = sqrtf(bx*bx + by*by);
// cosValue = .0f;
// if (L2 > .0f)cosValue = dotP / (L1*L2);
// if (cosValue > -1.0f)
// {
// dAngle = 1.0f - cosValue;
// if (dAngle > 0.04f)dAngle = 0.04f;
// if (crossP > .0f) angle += dAngle;
// else angle -= dAngle;
// }
//
// if (is_move) {
// float speed = E2_MOVE_SPEED;
// if (caution_state == NOTHING)
// {
// speed = 0.25f*2.0f;
// }
// else if (caution_state == CAUTION)
// {
// speed = 0.45f*2.0f;
// }
// position.x += sinf(angle)*speed ;
// position.y += cosf(angle)*speed ;
//
// }
// else return false;
// if (L2 < sencetivity*6.0f)
// {
// switch (caution_state)
// {
// case NOTHING:
// if (L2 < sencetivity*2.0f ) {
// caution_state = CAUTION;
// }
// break;
// case QUESTION:
//
//
// if (caution_gauge++ > E_GAUGE_CAUTION_MAX)
// {
// caution_gauge = 0;
// caution_state = CAUTION;
// }
//
//
// break;
// case CAUTION:
//
// {
// if (caution_gauge++ > E_GAUGE_ANGRY_MAX)
// {
// caution_gauge = E_GAUGE_ANGRY_MAX;
//
// ChangeAI(ATTACK);
// }
//
// }
// break;
// default:
// break;
// }
// }
//
//
// return false;
//
// }
// bool AI_Attack()
// {
// ai_timer++;
// if (ai_timer <= 60)
// {
// AI_Chase(false);
//
// }
// if ((ai_timer > 60) && (ai_timer <= 75)) {
//
// position.x += sinf(angle)*E2_MOVE_SPEED*speed ;
// position.y += cosf(angle)*E2_MOVE_SPEED*speed ;
// if ((speed += 0.40f) > 5.30f)
// speed = 5.30f;
// }
// else if (ai_timer >75)
// {
// position.x += sinf(angle)*E2_MOVE_SPEED*speed;
// position.y += cosf(angle)*E2_MOVE_SPEED*speed;
// if ((speed -= .020f) <= .0f) {
// speed = .0f;
// caution_gauge = .0f;
//
// return true;
// }
// }
// return false;
// }
//
// inline bool AI_Stop()
// {
// if (ai_timer++ > 90)return true;
// return false;
// }
//
// void AI()
// {
// if (YMabsolute(position.x - player_reference->GetActorLocation().x) > 1280*1.5f)return;
// if (YMabsolute(position.y - player_reference->GetActorLocation().y) > 720*1.5f)return;
//
//
// switch (ai_mode)
// {
// case WALK:
//
//
// break;
// case CHASE:
// if (AI_Chase(true))
// {
//
// ChangeAI(ATTACK);
// }
// break;
// case ATTACK:
// if (AI_Attack())
// {
//
// ChangeAI(STOP);
// }
// break;
//
// case STOP:
// if (AI_Stop())
// {
// ChangeAI(CHASE);
// }
// break;
// default:
// break;
// }
// }
//
//
//
// bool Update()
// {
// AI();
//
// if (HitCheckSphere(GetActorLocation(), 1.5f, player_reference->GetActorLocation(), 1.2f))
// {
//
// player_reference->life--;
// return true;
// }
// return false;
// }
//
//};
//
//
//class Enemy_ECC final :public EnemyBase
//{
//public:
// Enemy_ECC(DirectX::XMFLOAT3 pos, Player* p_ref) :
// EnemyBase(p_ref, 1,50)
// {
// this->position = pos;
// move = DirectX::XMFLOAT3(0.2f, 0, 0);
// scale = 3.0f;
// //angle = PI;
// ai_method = std::make_unique<AI_Walk>(this, 4*60);
//
// max_dist = 10.0f;
//
// hp_gauge_widget = std::make_unique<GaugeWidget>(VECTORII(415, 38), VECTORII(1280 - 415, 0), 0.0f, L"DATA\\2D\\towerHP_bar.png", L"DATA\\2D\\towerHP.png");
// }
//
// ~Enemy_ECC()
// {
// GameBrain::GetInstance()->game_state = GameBrain::WIN;
// }
//private:
//
// float max_dist{};
// std::unique_ptr<GaugeWidget> hp_gauge_widget;
//
//public:
// std::list<std::unique_ptr<Bullet>> ecc_bullet_list;
//
//
// class AI_Base
// {
// public:
// AI_Base(Enemy_ECC* _ecc_ref) :
// ecc_ref(_ecc_ref)
// {}
// virtual ~AI_Base() {}
// protected:
// Enemy_ECC* ecc_ref;
// public:
//
// virtual bool Method() = 0;
// };
//
// class AI_Shot final :public AI_Base
// {
// public:
// AI_Shot(Enemy_ECC* _ecc_ref, int num_of_shots) :
// AI_Base(_ecc_ref),
// shot_speed(1.5f),
// shot_span(10),
// shot_num(num_of_shots)
// {}
// ~AI_Shot() {}
// private:
// float shot_speed;
// const int shot_span;
// const int shot_num;
// int span_count{};
// int shot_count{};
// public:
//
// bool Method();
// };
//
// class AI_Walk final :public AI_Base
// {
// public:
// AI_Walk(Enemy_ECC* _ecc_ref, int walk_time_max) :
// AI_Base(_ecc_ref),
// TIME_MAX(walk_time_max)
// {}
// ~AI_Walk() {}
// private:
// int time_count{};
// int TIME_MAX;
// public:
//
// bool Method();
// };
//
// class AI_Spawner final :public AI_Base
// {
// public:
// AI_Spawner(Enemy_ECC* _ecc_ref, int num) :
// AI_Base(_ecc_ref),
// NUM(num)
// {}
// ~AI_Spawner() {}
// private:
//
// const int NUM;
// int n = 0;
// int timer = 0;
// int LAG = 25;
// public:
//
// bool Method();
// };
//
// bool Update()
// {
// ai_method->Method();
//
// for (auto& it = ecc_bullet_list.begin(); it != ecc_bullet_list.end();/**/)
// {
// (*it)->Update();
//
// if (HitCheckSphere((*it)->GetActorLocation(), 1.5f, player_reference->GetActorLocation(), 1.2f))
// {
// it = ecc_bullet_list.erase(it);
// player_reference->life--;
//
// }
// else it++;
// }
//
// hp_gauge_widget->gauge = hp / HP_MAX;
//
//
//
// return false;
// }
//
// void Render()
// {
// EnemyBase::Render();
//
// for each(auto& bullet in ecc_bullet_list)
// {
// bullet->Render();
// }
//
// hp_gauge_widget->Render();
// }
//
// std::unique_ptr<AI_Base> ai_method;
//
//};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.