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
fb5ef8047c133755c4afe491af344a333bbc69a6
7797740f06f9e6d6729fd49697d8917e28c172d1
/lite/kernels/mlu/bridges/tensor.h
22268f69ba39926dbbfb1bbb18e3a86331097f90
[ "Apache-2.0" ]
permissive
AnBaolei1984/Paddle-Lite
508f567f27403dabd097c69f3cc4cc239d3fe933
db4bd998d5fdabddbcf0eb28951787eb008eeb19
refs/heads/develop
2021-11-21T12:18:38.346264
2021-01-28T02:57:01
2021-01-28T02:57:01
333,635,248
2
1
Apache-2.0
2021-07-27T02:52:39
2021-01-28T03:33:20
null
UTF-8
C++
false
false
2,267
h
tensor.h
// Copyright (c) 2019 PaddlePaddle Authors. 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. #pragma once #include <fstream> #include <string> #include <vector> #include "lite/kernels/mlu/bridges/utility.h" namespace paddle { namespace lite { namespace subgraph { namespace mlu { class MLUTensor { public: MLUTensor() : mlu_tensor_(nullptr), tensor_type_(CNML_TENSOR), mlu_dtype_(CNML_DATA_FLOAT32) {} void set_mlu_ptr(void* mlu_data) { mlu_ptr_ = mlu_data; } MLUTensor(const std::vector<int64_t>& shape, cnmlTensorType_t tensor_type = CNML_TENSOR, cnmlDataOrder_t shape_order = CNML_NCHW, cnmlDataType_t mlu_dtype = CNML_DATA_FLOAT32, cnmlDataOrder_t data_order = CNML_NHWC); void remember(const std::vector<int>& shape, cnmlTensorType_t tensor_type, cnmlDataType_t mlu_dtype, cnmlDataOrder_t shape_order, cnmlDataOrder_t data_order); void Create(); cnmlTensor_t mlu_tensor(); void* mlu_data() { CHECK(mlu_ptr_ != nullptr); return mlu_ptr_; } cnmlDataType_t dtype() { return mlu_dtype_; } void set_mlu_dtype(cnmlDataType_t type) { mlu_dtype_ = type; } const std::vector<int64_t>& get_origin_shape() const { return origin_shape_; } ~MLUTensor(); void ToFile(std::string file_name); cnmlDataOrder_t dorder() { return data_order_; } private: cnmlTensor_t mlu_tensor_; std::vector<int> shape_; std::vector<int64_t> origin_shape_; cnmlTensorType_t tensor_type_; cnmlDataType_t mlu_dtype_; int dim_{0}; cnmlDataOrder_t data_order_; void* mlu_ptr_; }; } // namespace mlu } // namespace subgraph } // namespace lite } // namespace paddle
a32e12e41dc8217da261438cc5ce611834ea5b4e
fa6265903f99b667265bd8889b0ee71358a17b12
/src/gl/stereo3d/gl_quadstereo.h
377d846b336e687c82bc83a1a6820dfad46d7608
[]
no_license
cmbruns/gz3doom
1a12beec7d6dbd3003608c45676158306ee6cd6f
0ef1d8d3cf2c301088ca7690d58957803c9d00b0
refs/heads/openvr
2022-12-23T19:18:03.611477
2017-06-27T16:41:26
2017-06-27T16:41:26
13,457,931
100
20
null
2018-07-29T16:40:18
2013-10-10T00:15:27
C++
UTF-8
C++
false
false
2,167
h
gl_quadstereo.h
// //--------------------------------------------------------------------------- // // Copyright(C) 2015 Christopher Bruns // All rights reserved. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see http://www.gnu.org/licenses/ // //-------------------------------------------------------------------------- // /* ** gl_quadstereo.h ** Quad-buffered OpenGL stereoscopic 3D mode for GZDoom ** */ #ifndef GL_QUADSTEREO_H_ #define GL_QUADSTEREO_H_ #include "gl_stereo3d.h" #include "gl_stereo_leftright.h" #include "gl/system/gl_system.h" namespace s3d { class QuadStereoLeftPose : public LeftEyePose { public: QuadStereoLeftPose(float ipd) : LeftEyePose(ipd), bQuadStereoSupported(false) {} bool bQuadStereoSupported; }; class QuadStereoRightPose : public RightEyePose { public: QuadStereoRightPose(float ipd) : RightEyePose(ipd), bQuadStereoSupported(false){} bool bQuadStereoSupported; }; // To use Quad-buffered stereo mode with nvidia 3d vision glasses, // you must either: // A) be using a Quadro series video card, OR // // B) be using nvidia driver version 314.07 or later // AND have your monitor set to 120 Hz refresh rate // AND have gzdoom in true full screen mode class QuadStereo : public Stereo3DMode { public: QuadStereo(double ipdMeters); void Present() const override; void SetUp() const override; static const QuadStereo& getInstance(float ipd); private: QuadStereoLeftPose leftEye; QuadStereoRightPose rightEye; bool bQuadStereoSupported; void checkInitialRenderContextState(); }; } /* namespace s3d */ #endif /* GL_QUADSTEREO_H_ */
cc1b1366b7c56df65bdbd7e96737ead353b42b0f
f205e66e8e1a6b0459438565e90d6704d9f499f7
/CHIP-8_Emulator/Cpu.h
1528a2210221e7c472f3861dff01730c6463218f
[]
no_license
boris-ns/Chip8
e413ce8d1da2234148aa573044f274071c867e41
5e45875ab47627e2824c1f4d27f2e284ec11403d
refs/heads/master
2020-03-07T15:31:50.847974
2018-04-20T13:15:58
2018-04-20T13:15:58
127,557,251
1
0
null
null
null
null
UTF-8
C++
false
false
1,525
h
Cpu.h
#pragma once #include <string> #include "SFML/Graphics.hpp" #define MEMORY_SIZE 4096 #define NUM_REGISTERS 16 #define SCREEN_WIDTH 64 #define SCREEN_HEIGHT 32 #define MULTIPLIER 10 #define STACK_SIZE 16 #define NUM_KEYS 16 #define FONTSET_SIZE 80 #define NUM_PIXELS SCREEN_WIDTH * SCREEN_HEIGHT class Chip8 { public: Chip8(); ~Chip8(); void MainLoop(); void EmulateCycle(); bool LoadROM(const std::string& romPath); void Render(sf::RenderWindow& window); void HandleEvents(sf::RenderWindow& window); void Chip8::SwitchKeyState(sf::Keyboard::Key pressedKey, int state); unsigned short FetchOpcode(); void DecodeExecute(); void UpdateTimers(); void UpdatePC(); private: bool drawFlag; static const unsigned char fontset[FONTSET_SIZE]; const int CARRY_FLAG = NUM_REGISTERS - 1; sf::Uint8 screenImage[NUM_PIXELS * 4]; // contains RGBA values // Registers unsigned char sp; // stack pointer unsigned char V[NUM_REGISTERS]; // registers unsigned short I; // index register unsigned short pc; // program counter register unsigned short opcode; // current opcode // Timers unsigned char delayTimer; unsigned char soundTimer; // Data storage unsigned char gfx[NUM_PIXELS]; // screen unsigned char key[NUM_KEYS]; // keyboard state unsigned char memory[MEMORY_SIZE]; // 4K memory unsigned short stack[STACK_SIZE]; // stack for jump instructions and function calls }; void Log(const std::string& message);
a1a5f759fbb5074456ed105901e11b065471ccbf
d160bb839227b14bb25e6b1b70c8dffb8d270274
/MCMS/Main/Processes/ConfParty/ConfPartyLib/PartyMonitor.cpp
66139faf984859f003267bf50ca5069252154c2e
[]
no_license
somesh-ballia/mcms
62a58baffee123a2af427b21fa7979beb1e39dd3
41aaa87d5f3b38bc186749861140fef464ddadd4
refs/heads/master
2020-12-02T22:04:46.442309
2017-07-03T06:02:21
2017-07-03T06:02:21
96,075,113
1
0
null
null
null
null
UTF-8
C++
false
false
87,572
cpp
PartyMonitor.cpp
//+========================================================================+ // PartyMonitor.CPP | // Copyright 1995 Pictel Technologies Ltd. | // All Rights Reserved. | //-------------------------------------------------------------------------| // NOTE: This software contains valuable trade secrets and proprietary | // information of Pictel Technologies Ltd. and is protected by law. | // It may not be copied or distributed in any form or medium, disclosed | // to third parties, reverse engineered or used in any manner without | // prior written authorization from Pictel Technologies Ltd. | //-------------------------------------------------------------------------| // FILE: PartyMonitor.CPP | // SUBSYSTEM: MCMS | // PROGRAMMER: ANAT A | //-------------------------------------------------------------------------| // Who | Date | Description | //-------------------------------------------------------------------------| // |21/01/04 | | //+========================================================================+ #include <ostream> #include <istream> #include "PartyMonitor.h" #include "InitCommonStrings.h" #include "ConfPartyProcess.h" #include "StringsMaps.h" #include "Capabilities.h" #include "StatusesGeneral.h" #include "PObject.h" #include "Segment.h" #include "ChannelParams.h" #include "ObjString.h" #include "Trace.h" #include "SysConfig.h" #include "ProcessBase.h" #include "CapInfo.h" #include "IceCmInd.h" #include "EnumsToStrings.h" /////////////////////////////////////////////////////////////////////////////////////// BYTE IsContainAnnex(int eAnnex,DWORD annexes) { BYTE bRes = FALSE; annexes_fd_set annexesMask; annexesMask.fds_bits[0] = annexes; if (CAP_FD_ISSET(eAnnex, &(annexesMask))) bRes = TRUE; return bRes; } /*************************************************************************************/ /* CPrtMontrBaseParams */ /*************************************************************************************/ /////////////////////////////////////////////////////////////////////////////////////// //Party monitoring base CPrtMontrBaseParams::CPrtMontrBaseParams() { m_mapProblem = 0; m_bitRate = 0xFFFFFFFF; m_protocol = 0; m_channelIndex = 0; m_channelType = 0; // IpV6 - Monitoring memset(&m_partyAddr,0,sizeof(mcTransportAddress)); memset(&m_mcuAddr,0,sizeof(mcTransportAddress)); memset(&m_IcePartyAddr,0,sizeof(mcTransportAddress)); memset(&m_IceMcuAddr,0,sizeof(mcTransportAddress)); m_IceConnectionType = kNone; m_connectionStatus = 0; m_IsIce = 0; } /////////////////////////////////////////////////////////////////////////////////////// CPrtMontrBaseParams::CPrtMontrBaseParams(DWORD channelType) { m_mapProblem = 0; m_bitRate = 0xFFFFFFFF; m_protocol = 0; m_channelIndex = 0; m_channelType = channelType; // IpV6 - Monitoring memset(&m_partyAddr,0,sizeof(mcTransportAddress)); memset(&m_mcuAddr,0,sizeof(mcTransportAddress)); memset(&m_IcePartyAddr,0,sizeof(mcTransportAddress)); memset(&m_IceMcuAddr,0,sizeof(mcTransportAddress)); m_IceConnectionType = kNone; m_connectionStatus = 0; m_IsIce = 0; } /////////////////////////////////////////////////////////////////////////////////////// CPrtMontrBaseParams::CPrtMontrBaseParams(const CPrtMontrBaseParams &other):CPObject(other) { m_mapProblem = other.m_mapProblem; m_bitRate = other.m_bitRate; m_protocol = other.m_protocol; m_channelIndex = other.m_channelIndex; m_channelType = other.m_channelType; memset(&m_partyAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_partyAddr),&(other.m_partyAddr), sizeof(mcTransportAddress)); memset(&m_mcuAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_mcuAddr),&(other.m_mcuAddr), sizeof(mcTransportAddress)); m_IsIce = other.m_IsIce; memset(&m_IcePartyAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_IcePartyAddr),&(other.m_IcePartyAddr), sizeof(mcTransportAddress)); memset(&m_IceMcuAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_IceMcuAddr),&(other.m_IceMcuAddr), sizeof(mcTransportAddress)); m_IceConnectionType = other.m_IceConnectionType; // m_partyAddr = other.m_partyAddr; // m_mcuAddr = other.m_mcuAddr; m_connectionStatus = other.m_connectionStatus; // m_partyPort = other.m_partyPort; // m_mcuPort = other.m_mcuPort; } /////////////////////////////////////////////////////////////////////////////////////// CPrtMontrBaseParams& CPrtMontrBaseParams::operator=(const CPrtMontrBaseParams& other) { if(this != &other) { m_connectionStatus = other.m_connectionStatus; m_bitRate = other.m_bitRate; // IpV6 - Monitoring if (::isApiTaNull(const_cast<mcTransportAddress*>(&other.m_partyAddr)) == FALSE && ::isIpTaNonValid(const_cast<mcTransportAddress*>(&other.m_partyAddr)) == FALSE) { memset(&m_partyAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_partyAddr),&(other.m_partyAddr), sizeof(mcTransportAddress)); } if (::isApiTaNull(const_cast<mcTransportAddress*>(&other.m_mcuAddr)) == FALSE && ::isIpTaNonValid(const_cast<mcTransportAddress*>(&other.m_mcuAddr)) == FALSE) { memset(&m_mcuAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_mcuAddr),&(other.m_mcuAddr), sizeof(mcTransportAddress)); } m_mapProblem = other.m_mapProblem; m_protocol = other.m_protocol; m_channelIndex = other.m_channelIndex; m_channelType = other.m_channelType; m_IsIce = other.m_IsIce; // ICE if (::isApiTaNull(const_cast<mcTransportAddress*>(&other.m_IcePartyAddr)) == FALSE && ::isIpTaNonValid(const_cast<mcTransportAddress*>(&other.m_IcePartyAddr)) == FALSE) { memset(&m_IcePartyAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_IcePartyAddr),&(other.m_IcePartyAddr), sizeof(mcTransportAddress)); } if (::isApiTaNull(const_cast<mcTransportAddress*>(&other.m_IceMcuAddr)) == FALSE && ::isIpTaNonValid(const_cast<mcTransportAddress*>(&other.m_IceMcuAddr)) == FALSE) { memset(&m_IceMcuAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_IceMcuAddr),&(other.m_IceMcuAddr), sizeof(mcTransportAddress)); } m_IceConnectionType = other.m_IceConnectionType; } return *this; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CPrtMontrBaseParams::operator==(const CPrtMontrBaseParams& other) { if(this == &other) return TRUE; if( m_mapProblem == other.m_mapProblem && m_bitRate == other.m_bitRate && m_protocol == other.m_protocol && m_channelIndex == other.m_channelIndex && m_channelType == other.m_channelType && (::isIpAddressEqual(&m_partyAddr, const_cast<mcTransportAddress*>(&other.m_partyAddr)) == TRUE) && (::isIpAddressEqual(&m_mcuAddr, const_cast<mcTransportAddress*>(&other.m_mcuAddr)) == TRUE) && m_connectionStatus == other.m_connectionStatus && m_partyAddr.port == other.m_partyAddr.port && m_mcuAddr.port == other.m_mcuAddr.port && m_IsIce == other.m_IsIce && (::isIpAddressEqual(&m_IcePartyAddr, const_cast<mcTransportAddress*>(&other.m_IcePartyAddr)) == TRUE) && (::isIpAddressEqual(&m_IceMcuAddr, const_cast<mcTransportAddress*>(&other.m_IceMcuAddr)) == TRUE) && m_IcePartyAddr.port == other.m_IcePartyAddr.port && m_IceMcuAddr.port == other.m_IceMcuAddr.port && m_IceConnectionType == other.m_IceConnectionType) return TRUE; else return FALSE; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CPrtMontrBaseParams::operator!=(const CPrtMontrBaseParams& other) { return (!(*this == other)); } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::CopyClass(CPrtMontrBaseParams &other) { *this = other; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CPrtMontrBaseParams::IsEqual(CPrtMontrBaseParams &other) { return (*this == other); } /////////////////////////////////////////////////////////////////////////////////////// CPrtMontrBaseParams *CPrtMontrBaseParams::AllocNewClass(EIpChannelType channelType) { CPrtMontrBaseParams *pNewClass = NULL; switch(channelType) { case H225: case H245: pNewClass = new CPrtMontrBaseParams(channelType); break; case AUDIO_IN: pNewClass = new CAdvanceAudioIn; break; case AUDIO_OUT: pNewClass = new CAdvanceAudioOut; break; case VIDEO_IN: case VIDEO_CONT_IN: pNewClass = new CAdvanceVideoIn(channelType); break; case VIDEO_OUT: case VIDEO_CONT_OUT: pNewClass = new CAdvanceVideoOut(channelType); break; case FECC_IN: pNewClass = new CAdvanceFeccIn; break; case FECC_OUT: pNewClass = new CAdvanceFeccOut; break; case AUDIO_CONT_IN: case AUDIO_CONT_OUT: break; case BFCP_IN: case BFCP_OUT: case BFCP: case BFCP_UDP: pNewClass = new CPrtMontrBaseParams(channelType); break; default: // Note: some enumeration value are not handled in switch. Add default to suppress warning. break; } return pNewClass; } ////////////////////////////////////////////////////////////////////////////////////// CPrtMontrBaseParams *CPrtMontrBaseParams::AllocNewClass(const CPrtMontrBaseParams &other) { CPrtMontrBaseParams *pNewClass = NULL; EIpChannelType channelType = (EIpChannelType)other.GetChannelType(); switch(channelType) { case H225: case H245: pNewClass = new CPrtMontrBaseParams(other); break; case AUDIO_IN: pNewClass = new CAdvanceAudioIn((const CAdvanceAudioIn&)other); break; case AUDIO_OUT: pNewClass = new CAdvanceAudioOut((const CAdvanceAudioOut&)other); break; case VIDEO_IN: case VIDEO_CONT_IN: pNewClass = new CAdvanceVideoIn((const CAdvanceVideoIn&)other); break; case VIDEO_OUT: case VIDEO_CONT_OUT: pNewClass = new CAdvanceVideoOut((const CAdvanceVideoOut&)other); break; case FECC_IN: pNewClass = new CAdvanceFeccIn((const CAdvanceFeccIn&)other); break; case FECC_OUT: pNewClass = new CAdvanceFeccOut((const CAdvanceFeccOut&)other); break; case AUDIO_CONT_IN: case AUDIO_CONT_OUT: break; case BFCP_IN: case BFCP_OUT: pNewClass = new CPrtMontrBaseParams(other); break; default: // Note: some enumeration value are not handled in switch. Add default to suppress warning. break; } return pNewClass; } /////////////////////////////////////////////////////////////////////////////////////// //#ifdef __HIGHC__ void CPrtMontrBaseParams::Serialize(WORD format,CSegment &seg) const { //FPTRACE(eLevelInfoNormal,"CPrtMontrBaseParams::Serialize "); switch ( format ) { case NATIVE : { seg << m_mapProblem; seg << m_bitRate; seg << m_protocol; seg << m_channelIndex; seg << m_channelType; seg << m_IsIce; seg << (DWORD)m_IceConnectionType; // IpV6 - Monitoring seg << (DWORD)m_partyAddr.ipVersion ; seg << (DWORD)m_partyAddr.port; seg << (DWORD)m_partyAddr.distribution; seg << (DWORD)m_partyAddr.transportType; if ((enIpVersion)m_partyAddr.ipVersion == eIpVersion4) seg << (DWORD)m_partyAddr.addr.v4.ip; else { seg << (DWORD)m_partyAddr.addr.v6.scopeId; char szIP[64]; ::ipToString(m_partyAddr, szIP,1); // With Brackets seg << szIP ; } seg << (DWORD)m_mcuAddr.ipVersion ; seg << (DWORD)m_mcuAddr.port; seg << (DWORD)m_mcuAddr.distribution; seg << (DWORD)m_mcuAddr.transportType; if ((enIpVersion)m_mcuAddr.ipVersion == eIpVersion4) seg << (DWORD)m_mcuAddr.addr.v4.ip; else { seg << (DWORD)m_mcuAddr.addr.v6.scopeId; char szIP1[64]; ::ipToString(m_mcuAddr, szIP1,1); // With Brackets seg << szIP1 ; } if(m_IsIce) { seg << (DWORD)m_IcePartyAddr.ipVersion ; seg << (DWORD)m_IcePartyAddr.port; seg << (DWORD)m_IcePartyAddr.distribution; seg << (DWORD)m_IcePartyAddr.transportType; if ((enIpVersion)m_IcePartyAddr.ipVersion == eIpVersion4) seg << (DWORD)m_IcePartyAddr.addr.v4.ip; else { seg << (DWORD)m_IcePartyAddr.addr.v6.scopeId; char szIP2[64]; ::ipToString(m_IcePartyAddr, szIP2,1); // With Brackets seg << szIP2 ; } seg << (DWORD)m_IceMcuAddr.ipVersion ; seg << (DWORD)m_IceMcuAddr.port; seg << (DWORD)m_IceMcuAddr.distribution; seg << (DWORD)m_IceMcuAddr.transportType; if ((enIpVersion)m_IceMcuAddr.ipVersion == eIpVersion4) seg << (DWORD)m_IceMcuAddr.addr.v4.ip; else { seg << (DWORD)m_IceMcuAddr.addr.v6.scopeId; char szIP3[64]; ::ipToString(m_IceMcuAddr, szIP3,1); // With Brackets seg << szIP3 ; } } // seg << m_partyAddr; // seg << m_mcuAddr; seg << m_connectionStatus; // seg << m_partyPort; // seg << m_mcuPort; break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrBaseParams::DeSerialize(WORD format,CSegment &seg) { //FPTRACE(eLevelInfoNormal,"CPrtMontrBaseParams::DeSerialize"); switch ( format ) { case NATIVE : { seg >> m_mapProblem; seg >> m_bitRate; seg >> m_protocol; seg >> m_channelIndex; seg >> m_channelType; seg >> m_IsIce; DWORD tmp = 0; seg >> tmp; m_IceConnectionType = (EIceConnectionType)tmp; // IpV6 seg >> m_partyAddr.ipVersion; seg >> m_partyAddr.port; seg >> m_partyAddr.distribution; seg >> m_partyAddr.transportType; if ((enIpVersion)m_partyAddr.ipVersion == eIpVersion4) seg >> m_partyAddr.addr.v4.ip; else { seg >> m_partyAddr.addr.v6.scopeId ; char szIP[64]; memset(szIP,'\0',64); seg >> szIP; ::stringToIp(&m_partyAddr, szIP); // With Brackets } // IpV6 seg >> m_mcuAddr.ipVersion; seg >> m_mcuAddr.port; seg >> m_mcuAddr.distribution; seg >> m_mcuAddr.transportType; if ((enIpVersion)m_mcuAddr.ipVersion == eIpVersion4) seg >> m_mcuAddr.addr.v4.ip; else { seg >> m_mcuAddr.addr.v6.scopeId ; char szIP1[64]; memset(szIP1,'\0',64); seg >> szIP1; ::stringToIp(&m_mcuAddr, szIP1); // With Brackets } if(m_IsIce) { seg >> m_IcePartyAddr.ipVersion; seg >> m_IcePartyAddr.port; seg >> m_IcePartyAddr.distribution; seg >> m_IcePartyAddr.transportType; if ((enIpVersion)m_IcePartyAddr.ipVersion == eIpVersion4) seg >> m_IcePartyAddr.addr.v4.ip; else { seg >> m_IcePartyAddr.addr.v6.scopeId ; char szIP2[64]; memset(szIP2,'\0',64); seg >> szIP2; ::stringToIp(&m_IcePartyAddr, szIP2); // With Brackets } seg >> m_IceMcuAddr.ipVersion; seg >> m_IceMcuAddr.port; seg >> m_IceMcuAddr.distribution; seg >> m_IceMcuAddr.transportType; if ((enIpVersion)m_IceMcuAddr.ipVersion == eIpVersion4) seg >> m_IceMcuAddr.addr.v4.ip; else { seg >> m_IcePartyAddr.addr.v6.scopeId ; char szIP3[64]; memset(szIP3,'\0',64); seg >> szIP3; ::stringToIp(&m_IcePartyAddr, szIP3); // With Brackets } } // seg >> m_partyAddr; // seg >> m_mcuAddr; seg >> m_connectionStatus; // seg >> m_partyPort; // seg >> m_mcuPort; break; } default : { break; } } } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::Dump1() { CLargeString strBase1; char szPartyIP[64]; char szMcuIP[64]; char IcePartyIP[64]; char IceMcuIP[64]; memset(szPartyIP, '\0', 64); memset(szMcuIP, '\0', 64); memset(IcePartyIP, '\0', 64); memset(IceMcuIP, '\0', 64); ::ipToString(m_partyAddr, szPartyIP, 1); // With Brackets ::ipToString(m_mcuAddr, szMcuIP, 1); // With Brackets if (m_IsIce) ::ipToString(m_IcePartyAddr, IcePartyIP, 1); // With Brackets ::ipToString(m_IceMcuAddr, IceMcuIP, 1); // With Brackets strBase1 << " : \nm_mapProblem = " << m_mapProblem << "\nm_bitRate = " << m_bitRate << "\nm_protocol = " << m_protocol << "\nm_channelIndex = " << m_channelIndex << "\nm_channelType = " << m_channelType << "\nm_partyAddr = " << szPartyIP << "\npartyPort = " << m_partyAddr.port << "\nm_mcuAddr = " << szMcuIP << "\nm_mcuPort = " << m_mcuAddr.port << "\nm_connectionStatus = " << m_connectionStatus << "\nm_IsICE = " << m_IsIce; if (m_IsIce) { strBase1 << "\nm_IcePartyAdd = " << IcePartyIP <<"\npartyPort = " << m_IcePartyAddr.port << "\nm_IceMcuAdd = " << IceMcuIP << "\nm_IceMcuPort = " << m_IceMcuAddr.port << "\nm_IceConnectionType = "<< m_IceConnectionType; } FPTRACE2(eLevelInfoNormal,"CPrtMontrBaseParams::Dump ", strBase1.GetString()); } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::SerializeXml(CXMLDOMElement* pFatherNode) { CXMLDOMElement* pPrtMontrBaseParams = pFatherNode->AddChildNode("BASIC_PARAM"); CXMLDOMElement* pChildNode = pPrtMontrBaseParams->AddChildNode("MAP_PROBLEM"); if (m_mapProblem&BitRateProblem) pChildNode->AddChildNode("PROBLEM",BitRateProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&FractionLossProblem) pChildNode->AddChildNode("PROBLEM",FractionLossProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&JitterProblem) pChildNode->AddChildNode("PROBLEM",JitterProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&LatencyProblem) pChildNode->AddChildNode("PROBLEM",LatencyProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&ProtocolProblem) pChildNode->AddChildNode("PROBLEM",ProtocolProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&ResolutionProblem) pChildNode->AddChildNode("PROBLEM",ResolutionProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&FrameRateProblem) pChildNode->AddChildNode("PROBLEM",FrameRateProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&AnnexesProblem) pChildNode->AddChildNode("PROBLEM",AnnexesProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&FramePerPacketProblem) pChildNode->AddChildNode("PROBLEM",FramePerPacketProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&ActualLossAccProblem) pChildNode->AddChildNode("PROBLEM",ActualLossAccProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&ActualLossInterProblem) pChildNode->AddChildNode("PROBLEM",ActualLossInterProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&OutOfOrderAccProblem) pChildNode->AddChildNode("PROBLEM",OutOfOrderAccProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&OutOfOrderInterProblem) pChildNode->AddChildNode("PROBLEM",OutOfOrderInterProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&FragmentedAccProblem) pChildNode->AddChildNode("PROBLEM",FragmentedAccProblem,MAP_PROBLEM_ENUM); if (m_mapProblem&FragmentedInterProblem) pChildNode->AddChildNode("PROBLEM",FragmentedInterProblem,MAP_PROBLEM_ENUM); pPrtMontrBaseParams->AddChildNode("BIT_RATE",m_bitRate); pPrtMontrBaseParams->AddChildNode("PROTOCOL",m_protocol, CAP_CODE_ENUM); pPrtMontrBaseParams->AddChildNode("CHANNEL_INDEX",m_channelIndex); pPrtMontrBaseParams->AddChildNode("CHANNEL_TYPE",m_channelType, IP_CHANNEL_TYPE_ENUM); // IpV6 - Monitoring if ((enIpVersion)m_partyAddr.ipVersion == eIpVersion4) pPrtMontrBaseParams->AddIPChildNode("PARTY_ADDRESS", m_partyAddr); // IpV6 - Monitoring if ((enIpVersion)m_mcuAddr.ipVersion == eIpVersion4) pPrtMontrBaseParams->AddIPChildNode("MCU_ADDRESS",m_mcuAddr); pPrtMontrBaseParams->AddChildNode("PARTY_PORT",m_partyAddr.port); pPrtMontrBaseParams->AddChildNode("MCU_PORT",m_mcuAddr.port); pPrtMontrBaseParams->AddChildNode("PARTY_TRANSPORT_TYPE", m_partyAddr.transportType, TRANSPORT_TYPE_ENUM); pPrtMontrBaseParams->AddChildNode("MCU_TRANSPORT_TYPE", m_mcuAddr.transportType, TRANSPORT_TYPE_ENUM); pPrtMontrBaseParams->AddChildNode("CONNECTION_STATUS",m_connectionStatus); //Ice if ((enIpVersion)m_IcePartyAddr.ipVersion == eIpVersion4) { pPrtMontrBaseParams->AddIPChildNode("ICE_PARTY_ADDRESS", m_IcePartyAddr); } if ((enIpVersion)m_IceMcuAddr.ipVersion == eIpVersion4) { pPrtMontrBaseParams->AddIPChildNode("ICE_MCU_ADDRESS",m_IceMcuAddr); } pPrtMontrBaseParams->AddChildNode("ICE_PARTY_PORT",m_IcePartyAddr.port); pPrtMontrBaseParams->AddChildNode("ICE_MCU_PORT",m_IceMcuAddr.port); pPrtMontrBaseParams->AddChildNode("ICE_PARTY_TRANSPORT_TYPE", m_IcePartyAddr.transportType, TRANSPORT_TYPE_ENUM); pPrtMontrBaseParams->AddChildNode("ICE_MCU_TRANSPORT_TYPE", m_IceMcuAddr.transportType, TRANSPORT_TYPE_ENUM); pPrtMontrBaseParams->AddChildNode("ICE_CONNECTION_TYPE",m_IceConnectionType,ICE_CONNECTION_TYPE_ENUM); if ((enIpVersion)m_partyAddr.ipVersion == eIpVersion6) pPrtMontrBaseParams->AddIPChildNode("PARTY_IPV6_ADDRESS",m_partyAddr,1); if ((enIpVersion)m_mcuAddr.ipVersion == eIpVersion6) pPrtMontrBaseParams->AddIPChildNode("MCU_IPV6_ADDRESS",m_mcuAddr,1); } /////////////////////////////////////////////////////////////////////////////////////// int CPrtMontrBaseParams::DeSerializeXml(CXMLDOMElement *pFatherNode,char *pszError) { int nStatus = STATUS_OK; CXMLDOMElement *pActionNode, *pChildNode, *pNode; GET_CHILD_NODE(pFatherNode,"BASIC_PARAM", pActionNode); if (pActionNode) { m_mapProblem = 0; GET_CHILD_NODE(pActionNode,"MAP_PROBLEM", pChildNode); if (pChildNode) { int num; GET_FIRST_CHILD_NODE(pChildNode,"PROBLEM", pNode); while (pNode) { GET_VALIDATE(pNode, &num, MAP_PROBLEM_ENUM); switch(num) { case BitRateProblem: m_mapProblem |= BitRateProblem; break; case FractionLossProblem: m_mapProblem |= FractionLossProblem; break; case JitterProblem: m_mapProblem |= JitterProblem; break; case LatencyProblem: m_mapProblem |= LatencyProblem; break; case ProtocolProblem: m_mapProblem |= ProtocolProblem; break; case ResolutionProblem: m_mapProblem |= ResolutionProblem; break; case FrameRateProblem: m_mapProblem |= FrameRateProblem; break; case AnnexesProblem: m_mapProblem |= AnnexesProblem; break; case FramePerPacketProblem: m_mapProblem |= FramePerPacketProblem; break; case ActualLossAccProblem: m_mapProblem |= ActualLossAccProblem; break; case ActualLossInterProblem: m_mapProblem |= ActualLossInterProblem; break; case OutOfOrderAccProblem: m_mapProblem |= OutOfOrderAccProblem; break; case OutOfOrderInterProblem: m_mapProblem |= OutOfOrderInterProblem; break; case FragmentedAccProblem: m_mapProblem |= FragmentedAccProblem; break; case FragmentedInterProblem: m_mapProblem |= FragmentedInterProblem; break; } GET_NEXT_CHILD_NODE(pChildNode, "PROBLEM", pNode); } } BYTE tmpTransportType = 0; GET_VALIDATE_CHILD(pActionNode,"BIT_RATE",&m_bitRate,_0_TO_DWORD); GET_VALIDATE_CHILD(pActionNode,"PROTOCOL",&m_protocol,CAP_CODE_ENUM); GET_VALIDATE_CHILD(pActionNode,"CHANNEL_INDEX",&m_channelIndex,_0_TO_DWORD); GET_VALIDATE_CHILD(pActionNode,"CHANNEL_TYPE",&m_channelType,IP_CHANNEL_TYPE_ENUM); GET_VALIDATE_CHILD(pActionNode,"PARTY_ADDRESS",&m_partyAddr,IP_ADDRESS); GET_VALIDATE_CHILD(pActionNode,"MCU_ADDRESS",&m_mcuAddr,IP_ADDRESS); GET_VALIDATE_CHILD(pActionNode,"PARTY_PORT",&m_partyAddr.port,_0_TO_WORD); GET_VALIDATE_CHILD(pActionNode,"MCU_PORT",&m_mcuAddr.port,_0_TO_WORD); tmpTransportType = 0; GET_VALIDATE_CHILD(pActionNode,"PARTY_TRANSPORT_TYPE",&tmpTransportType,TRANSPORT_TYPE_ENUM); m_partyAddr.transportType = (enTransportType)tmpTransportType; tmpTransportType = 0; GET_VALIDATE_CHILD(pActionNode,"MCU_TRANSPORT_TYPE",&tmpTransportType,TRANSPORT_TYPE_ENUM); m_mcuAddr.transportType = (enTransportType)tmpTransportType; GET_VALIDATE_CHILD(pActionNode,"CONNECTION_STATUS",&m_connectionStatus,_0_TO_DWORD); //Ice GET_VALIDATE_CHILD(pActionNode,"ICE_PARTY_ADDRESS",&m_IcePartyAddr,IP_ADDRESS); GET_VALIDATE_CHILD(pActionNode,"ICE_MCU_ADDRESS",&m_IceMcuAddr,IP_ADDRESS); GET_VALIDATE_CHILD(pActionNode,"ICE_PARTY_PORT",&m_IcePartyAddr.port,_0_TO_WORD); GET_VALIDATE_CHILD(pActionNode,"ICE_MCU_PORT",&m_IceMcuAddr.port,_0_TO_WORD); tmpTransportType = 0; GET_VALIDATE_CHILD(pActionNode,"ICE_PARTY_TRANSPORT_TYPE",&tmpTransportType, TRANSPORT_TYPE_ENUM); m_IcePartyAddr.transportType = (enTransportType)tmpTransportType; tmpTransportType = 0; GET_VALIDATE_CHILD(pActionNode,"ICE_MCU_TRANSPORT_TYPE",&tmpTransportType, TRANSPORT_TYPE_ENUM); m_IceMcuAddr.transportType = (enTransportType)tmpTransportType; DWORD tmp =(DWORD) m_IceConnectionType; GET_VALIDATE_CHILD(pActionNode,"ICE_CONNECTION_TYPE",&tmp,ICE_CONNECTION_TYPE_ENUM); mcTransportAddress tempIpV6Addr; memset(&tempIpV6Addr,0,sizeof(mcTransportAddress)); GET_VALIDATE_CHILD(pActionNode,"PARTY_IPV6_ADDRESS",&tempIpV6Addr,IP_ADDRESS); if (tempIpV6Addr.ipVersion == (DWORD)eIpVersion6) memcpy(&m_partyAddr, &tempIpV6Addr, sizeof(mcTransportAddress)); memset(&tempIpV6Addr,0,sizeof(mcTransportAddress)); GET_VALIDATE_CHILD(pActionNode,"MCU_IPV6_ADDRESS",&tempIpV6Addr,IP_ADDRESS); if (tempIpV6Addr.ipVersion == (DWORD)eIpVersion6) memcpy(&m_mcuAddr, &tempIpV6Addr, sizeof(mcTransportAddress)); } return STATUS_OK; } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::CheckExceedingFieldsRules(DWORD rate,DWORD protocol,CMedString &strExcFieldsRules) { //#ifdef __HIGHC__ // get system.cfg values CSysConfig* pSysConfig = CProcessBase::GetProcess()->GetSysConfig(); std::string key = "THRESHOLD_BITRATE"; DWORD thresholdBitRate = 11000;//::GetpSystemCfg()->GetThresholdBitRate(); pSysConfig->GetDWORDDataByKey(key, thresholdBitRate); DWORD currBitRate = m_bitRate / 1000; //We move to units between 1 to 10000 that 10000 is 100% if((thresholdBitRate != 10000) && (currBitRate * 10000) > (rate * thresholdBitRate)) //Need to check if the new rate is over the current rate by 110% { strExcFieldsRules <<" Exceed bit rate. Current: "<<currBitRate<<" ,expected: "<<rate; SetProblem(BitRateProblem); } if (m_protocol != protocol) { strExcFieldsRules << "Current:" << CapEnumToString((CapEnum)m_protocol) << ", Expected: " << CapEnumToString((CapEnum)protocol) << " - Different protocol"; if (m_protocol < eUnknownAlgorithemCapCode && protocol < eUnknownAlgorithemCapCode) { SetProblem(ProtocolProblem); } else { SetProblem(ProtocolProblem); DBGPASSERT(m_protocol); DBGPASSERT(protocol); } } //#endif } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::SetPartyAddr(mcTransportAddress* partyAddr) { memset(&m_partyAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_partyAddr),partyAddr, sizeof(mcTransportAddress)); } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::SetMcuAddr(mcTransportAddress* mcuAddr) { memset(&m_mcuAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_mcuAddr),mcuAddr, sizeof(mcTransportAddress)); } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::SetIcePartyAddr(mcTransportAddress* IcePartyAddr) { memset(&m_IcePartyAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_IcePartyAddr),IcePartyAddr, sizeof(mcTransportAddress)); } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::SetIceMcuAddr(mcTransportAddress* IceMcuAddr) { memset(&m_IceMcuAddr,0,sizeof(mcTransportAddress)); memcpy(&(m_IceMcuAddr),IceMcuAddr, sizeof(mcTransportAddress)); } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrBaseParams::SetIceConnectionType(EIceConnectionType IceConnectionType) { m_IceConnectionType = IceConnectionType; } /*************************************************************************************/ /* CPrtMontrGlobalParams */ /*************************************************************************************/ /////////////////////////////////////////////////////////////////////////////////////// CPrtMontrGlobalParams::CPrtMontrGlobalParams() { m_numOfPackets = 0; m_latency = 0; m_packetLoss = 0; m_jitter = 0; m_jitterPeak = 0; m_franctioLoss = 0; m_franctioLossPeak = 0; } /////////////////////////////////////////////////////////////////////////////////////// CPrtMontrGlobalParams::CPrtMontrGlobalParams(const CPrtMontrGlobalParams &other):CPrtMontrBaseParams(other) { m_numOfPackets = other.m_numOfPackets; m_latency = other.m_latency; m_packetLoss = other.m_packetLoss; m_jitter = other.m_jitter; m_jitterPeak = other.m_jitterPeak; m_franctioLoss = other.m_franctioLoss; m_franctioLossPeak = other.m_franctioLossPeak; } /////////////////////////////////////////////////////////////////////////////////////// CPrtMontrGlobalParams& CPrtMontrGlobalParams::operator=(const CPrtMontrGlobalParams& other) { if(this != &other) { m_numOfPackets = other.m_numOfPackets; m_latency = other.m_latency; m_packetLoss = other.m_packetLoss; m_jitter = other.m_jitter; m_jitterPeak = other.m_jitterPeak; m_franctioLoss = other.m_franctioLoss; m_franctioLossPeak = other.m_franctioLossPeak; (CPrtMontrBaseParams &)*this = (const CPrtMontrBaseParams &)other; } return *this; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CPrtMontrGlobalParams::operator==(const CPrtMontrGlobalParams& other) { if(this == &other) return TRUE; if((CPrtMontrBaseParams &)*this == (const CPrtMontrBaseParams &)other && m_numOfPackets == other.m_numOfPackets && m_latency == other.m_latency && m_packetLoss == other.m_packetLoss && m_jitter == other.m_jitter && m_jitterPeak == other.m_jitterPeak && m_franctioLoss == other.m_franctioLoss && m_franctioLossPeak == other.m_franctioLossPeak) return TRUE; else return FALSE; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CPrtMontrGlobalParams::operator!=(const CPrtMontrGlobalParams& other) { return (!(*this == other)); } /////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrGlobalParams::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CPrtMontrGlobalParams")) *this = (CPrtMontrGlobalParams &)other; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CPrtMontrGlobalParams::IsEqual(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CPrtMontrGlobalParams")) return (*this == (CPrtMontrGlobalParams &)other); else return FALSE; } /////////////////////////////////////////////////////////////////////////////////////// //#ifdef __HIGHC__ void CPrtMontrGlobalParams::Serialize(WORD format,CSegment &seg) const { switch ( format ) { case NATIVE : { CPrtMontrBaseParams::Serialize(format,seg); seg << m_numOfPackets; seg << m_latency; seg << m_packetLoss; seg << m_jitter; seg << m_jitterPeak; seg << m_franctioLoss; seg << m_franctioLossPeak; break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::DeSerialize(WORD format,CSegment &seg) { switch ( format ) { case NATIVE : { CPrtMontrBaseParams::DeSerialize(format,seg); seg >> m_numOfPackets; seg >> m_latency; seg >> m_packetLoss; seg >> m_jitter; seg >> m_jitterPeak; seg >> m_franctioLoss; seg >> m_franctioLossPeak; break; } default : { break; } } } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::SerializeXml(CXMLDOMElement* pFatherNode) { CXMLDOMElement* pPrtMontrGlobalParams = pFatherNode->AddChildNode("GLOBAL_PARAM"); CPrtMontrBaseParams::SerializeXml(pPrtMontrGlobalParams); pPrtMontrGlobalParams->AddChildNode("NUMBER_OF_PACKETS",m_numOfPackets); pPrtMontrGlobalParams->AddChildNode("LATENCY",m_latency); pPrtMontrGlobalParams->AddChildNode("PACKET_LOSS",m_packetLoss); pPrtMontrGlobalParams->AddChildNode("JITTER",m_jitter); pPrtMontrGlobalParams->AddChildNode("JITTER_PEAK",m_jitterPeak); pPrtMontrGlobalParams->AddChildNode("FRACTION_LOSS",m_franctioLoss); pPrtMontrGlobalParams->AddChildNode("FRACTION_LOSS_PEAK",m_franctioLossPeak); } ///////////////////////////////////////////////////////////////////////////// * / int CPrtMontrGlobalParams::DeSerializeXml(CXMLDOMElement *pActionNode,char *pszError) { int nStatus = STATUS_OK; CXMLDOMElement *pChildNode; GET_CHILD_NODE(pActionNode, "GLOBAL_PARAM", pChildNode); if (pChildNode) { nStatus = CPrtMontrBaseParams::DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; GET_VALIDATE_CHILD(pChildNode,"NUMBER_OF_PACKETS",&m_numOfPackets,_0_TO_DWORD); GET_VALIDATE_CHILD(pChildNode,"LATENCY",&m_latency,_0_TO_DWORD); GET_VALIDATE_CHILD(pChildNode,"PACKET_LOSS",&m_packetLoss,_0_TO_DWORD); GET_VALIDATE_CHILD(pChildNode,"JITTER",&m_jitter,_0_TO_DWORD); GET_VALIDATE_CHILD(pChildNode,"JITTER_PEAK",&m_jitterPeak,_0_TO_DWORD); GET_VALIDATE_CHILD(pChildNode,"FRACTION_LOSS",&m_franctioLoss,_0_TO_WORD); GET_VALIDATE_CHILD(pChildNode,"FRACTION_LOSS_PEAK",&m_franctioLossPeak,_0_TO_WORD); } return STATUS_OK; } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::SetGlobalParam(const CPrtMontrGlobalParams& globalParam) { //we do not want the operator= that copy the Base too. m_numOfPackets = globalParam.m_numOfPackets; m_latency = globalParam.m_latency; m_packetLoss = globalParam.m_packetLoss; m_jitter = globalParam.m_jitter; m_jitterPeak = globalParam.m_jitterPeak; m_franctioLoss = globalParam.m_franctioLoss; m_franctioLossPeak = globalParam.m_franctioLossPeak; } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::SetJitter(DWORD jitter) { if((m_channelType == AUDIO_IN) || (m_channelType == AUDIO_OUT) || (m_channelType == FECC_OUT) || (m_channelType == FECC_IN)) m_jitter = jitter / AudiokHz; // FecckHz equal to AudiokHz else m_jitter = jitter / VideokHz; } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::SetJitterPeak(DWORD jitterPeak) { if((m_channelType == AUDIO_IN) || (m_channelType == AUDIO_OUT) || (m_channelType == FECC_OUT) || (m_channelType == FECC_IN)) m_jitterPeak = jitterPeak / AudiokHz; // FecckHz equal to AudiokHz else m_jitterPeak = jitterPeak / VideokHz; } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::SetFranctionLoss(unsigned short franctioLost) { m_franctioLoss = (franctioLost*10000) / FractionLossPercent; } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::SetFranctionLossPeak(unsigned short franctioLostPeak) { m_franctioLossPeak = (franctioLostPeak*10000) / FractionLossPercent; } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::SetLatency(DWORD latency) { // WORD seconds = 0; // DWORD milliseconds = 0; // DWORD hexConvert = 65536;//2^16 // seconds = latency >> 16; // milliseconds = (latency & LSBmask); // milliseconds *= 1000; // milliseconds /= hexConvert; // milliseconds += seconds*1000; // m_latency = milliseconds; m_latency = latency; } ///////////////////////////////////////////////////////////////////////////// * / void CPrtMontrGlobalParams::CheckExceedingFieldsRules(DWORD rate,DWORD protocol,CMedString &strExcFieldsRules) { //#ifdef __HIGHC__ // get system.cfg values CSysConfig* pSysConfig = CProcessBase::GetProcess()->GetSysConfig(); DWORD thresholdBitRate = 11000;//::GetpSystemCfg()->GetThresholdBitRate(); DWORD thresholdLatency = 300;//::GetpSystemCfg()->GetThresholdLatency(); DWORD thresholdFractionLoss = 50;//::GetpSystemCfg()->GetThresholdFractionLoss(); DWORD thresholdJitter = 80;//::GetpSystemCfg()->GetThresholdJitter(); std::string key = "THRESHOLD_BITRATE"; pSysConfig->GetDWORDDataByKey(key, thresholdBitRate); key = "THRESHOLD_LATENCY"; pSysConfig->GetDWORDDataByKey(key, thresholdLatency); key = "THRESHOLD_FRACTION_LOSS"; pSysConfig->GetDWORDDataByKey(key, thresholdFractionLoss); key = "THRESHOLD_JITTER"; pSysConfig->GetDWORDDataByKey(key, thresholdJitter); if(thresholdLatency && (m_latency > thresholdLatency)) { strExcFieldsRules<<" Exceed latency = "<< m_latency; strExcFieldsRules<<" threshold "<<thresholdLatency; SetProblem(LatencyProblem); } if(thresholdJitter && (m_jitter > thresholdJitter)) { strExcFieldsRules<<" Exceed jitter "<<m_jitter; SetProblem(JitterProblem); } // the m_franctioLoss is now x (from the card) * 1000 / 256 need to be bigger than y (trashhold) // y is system.cfg param which is % * 1000 if(thresholdFractionLoss && (m_franctioLoss >= thresholdFractionLoss)) { strExcFieldsRules<<" Exceed franction loss "<<m_franctioLoss; SetProblem(FractionLossProblem); } CPrtMontrBaseParams::CheckExceedingFieldsRules(rate,protocol,strExcFieldsRules); //#endif } ///////////////////////////////////////////////////////////////////////////////////////// void CPrtMontrGlobalParams::Dump1() { CLargeString strBase1; strBase1<< " : \nm_numOfPackets = " << m_numOfPackets << "\nm_latency = " << m_latency << "\nm_packetLoss = " << m_packetLoss << "\nm_jitter = " << m_jitter << "\nm_jitterPeak = " << m_jitterPeak << "\nm_franctioLoss = " << m_franctioLoss << "\nm_franctioLossPeak = " << m_franctioLossPeak; CPrtMontrBaseParams::Dump1(); FPTRACE2(eLevelInfoNormal,"CPrtMontrGlobalParams::Dump ", strBase1.GetString()); } /*************************************************************************************/ /* CAdvanceChInfo */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////////////////// CAdvanceChInfo::CAdvanceChInfo() { m_accumulate = 0; m_accumulatePercent = 0xFFFFFFFF; m_intervalPercent = 0xFFFFFFFF; m_interval = 0xFFFF; m_intervalPeak = 0; } //////////////////////////////////////////////////////////////////////////////////////// CAdvanceChInfo::CAdvanceChInfo(const CAdvanceChInfo &other):CPObject(other) { m_accumulate = other.m_accumulate; m_accumulatePercent = other.m_accumulatePercent; m_intervalPercent = other.m_intervalPercent; m_interval = other.m_interval; m_intervalPeak = other.m_intervalPeak; } //////////////////////////////////////////////////////////////////////////////////////// CAdvanceChInfo& CAdvanceChInfo::operator=(const CAdvanceChInfo& other) { if(this != &other) { m_accumulate = other.m_accumulate; m_accumulatePercent = other.m_accumulatePercent; m_intervalPercent = other.m_intervalPercent; m_interval = other.m_interval; m_intervalPeak = other.m_intervalPeak; } return *this; } ///////////////////////////////////////////////////////////////////////////// * / DWORD CAdvanceChInfo::operator==(const CAdvanceChInfo& other) { if(this == &other) return TRUE; if( m_accumulate == other.m_accumulate && m_accumulatePercent == other.m_accumulatePercent && m_intervalPercent == other.m_intervalPercent && m_interval == other.m_interval && m_intervalPeak == other.m_intervalPeak) return TRUE; else return FALSE; } ///////////////////////////////////////////////////////////////////////////// * / DWORD CAdvanceChInfo::operator!=(const CAdvanceChInfo& other) { return (!(*this == other)); } ///////////////////////////////////////////////////////////////////////////// * / //#ifdef __HIGHC__ void CAdvanceChInfo::Serialize(WORD format,CSegment &seg) const { switch ( format ) { case NATIVE : { seg << m_accumulate; seg << m_accumulatePercent; seg << m_intervalPercent; seg << m_interval; seg << m_intervalPeak; break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceChInfo::DeSerialize(WORD format,CSegment &seg) { switch ( format ) { case NATIVE : { seg >> m_accumulate; seg >> m_accumulatePercent; seg >> m_intervalPercent; seg >> m_interval; seg >> m_intervalPeak; break; } default : { break; } } } //#endif ///////////////////////////////////////////////////////////////////////////////////////// void CAdvanceChInfo::SerializeXml(CXMLDOMElement* pFatherNode) { pFatherNode->AddChildNode("ACCUMULATE",m_accumulate); pFatherNode->AddChildNode("ACCUMULATE_PERCENT",m_accumulatePercent); pFatherNode->AddChildNode("INTERVAL_PERCENT",m_intervalPercent); pFatherNode->AddChildNode("INTERVAL_NUMBER",m_interval); pFatherNode->AddChildNode("INTERVAL_PEAK",m_intervalPeak); } ///////////////////////////////////////////////////////////////////////////// * / int CAdvanceChInfo::DeSerializeXml(CXMLDOMElement *pActionNode,char *pszError) { int nStatus = STATUS_OK; GET_VALIDATE_CHILD(pActionNode,"ACCUMULATE",&m_accumulate,_0_TO_DWORD); GET_VALIDATE_CHILD(pActionNode,"ACCUMULATE_PERCENT",&m_accumulatePercent,_0_TO_DWORD); GET_VALIDATE_CHILD(pActionNode,"INTERVAL_PERCENT",&m_intervalPercent,_0_TO_DWORD); GET_VALIDATE_CHILD(pActionNode,"INTERVAL_NUMBER",&m_interval,_0_TO_WORD); GET_VALIDATE_CHILD(pActionNode,"INTERVAL_PEAK",&m_intervalPeak,_0_TO_WORD); return STATUS_OK; } ///////////////////////////////////////////////////////////////////////////// void CAdvanceChInfo::Dump1() { CLargeString strBase1; strBase1<< " : \nm_accumulate = " << m_accumulate << "\nm_accumulatePercent = " << m_accumulatePercent << "\nm_intervalPercent = " << m_intervalPercent << "\nm_interval = " << m_interval << "\nm_intervalPeak = " << m_intervalPeak; FPTRACE2(eLevelInfoNormal,"CAdvanceChInfo::Dump ", strBase1.GetString()); } /*************************************************************************************/ /* CRtpInfo */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CRtpInfo::CRtpInfo():m_rtpPacketLoss(),m_rtpOutOfOrder(),m_rtpFragmentPackets(),m_jitterBufferSize(),m_jitterLatePackets(),m_jitterOverflows(),m_jitterSamplePacketInterval() { } ///////////////////////////////////////////////////////////////////////////// * / CRtpInfo::CRtpInfo(const CRtpInfo &other):CPObject(other) { m_rtpPacketLoss = other.m_rtpPacketLoss; m_rtpOutOfOrder = other.m_rtpOutOfOrder; m_rtpFragmentPackets = other.m_rtpFragmentPackets; m_jitterBufferSize = other.m_jitterBufferSize; m_jitterLatePackets = other.m_jitterLatePackets; m_jitterOverflows = other.m_jitterOverflows; m_jitterSamplePacketInterval = other.m_jitterSamplePacketInterval; } ///////////////////////////////////////////////////////////////////////////// * / CRtpInfo& CRtpInfo::operator=(const CRtpInfo& other) { if(this != &other) { m_rtpPacketLoss = other.m_rtpPacketLoss; m_rtpOutOfOrder = other.m_rtpOutOfOrder; m_rtpFragmentPackets = other.m_rtpFragmentPackets; m_jitterBufferSize = other.m_jitterBufferSize; m_jitterLatePackets = other.m_jitterLatePackets; m_jitterOverflows = other.m_jitterOverflows; m_jitterSamplePacketInterval = other.m_jitterSamplePacketInterval; } return *this; } ////////////////////////////////////////////////////////////////////// * / DWORD CRtpInfo::operator==(const CRtpInfo& other) { if(this == &other) return TRUE; if( m_rtpPacketLoss == other.m_rtpPacketLoss && m_rtpOutOfOrder == other.m_rtpOutOfOrder && m_rtpFragmentPackets == other.m_rtpFragmentPackets && m_jitterBufferSize == other.m_jitterBufferSize && m_jitterLatePackets == other.m_jitterLatePackets && m_jitterOverflows == other.m_jitterOverflows && m_jitterSamplePacketInterval == other.m_jitterSamplePacketInterval) return TRUE; else return FALSE; } ////////////////////////////////////////////////////////////////////// * / DWORD CRtpInfo::operator!=(const CRtpInfo& other) { return (!(*this == other)); } ////////////////////////////////////////////////////////////////////// * / //#ifdef __HIGHC__ void CRtpInfo::Serialize(WORD format,CSegment &seg) const { switch ( format ) { case NATIVE : { m_rtpPacketLoss.Serialize(format,seg); m_rtpOutOfOrder.Serialize(format,seg); m_rtpFragmentPackets.Serialize(format,seg); m_jitterBufferSize.Serialize(format,seg); m_jitterLatePackets.Serialize(format,seg); m_jitterOverflows.Serialize(format,seg); m_jitterSamplePacketInterval.Serialize(format,seg); break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CRtpInfo::DeSerialize(WORD format,CSegment &seg) { switch ( format ) { case NATIVE : { m_rtpPacketLoss.DeSerialize(format,seg); m_rtpOutOfOrder.DeSerialize(format,seg); m_rtpFragmentPackets.DeSerialize(format,seg); m_jitterBufferSize.DeSerialize(format,seg); m_jitterLatePackets.DeSerialize(format,seg); m_jitterOverflows.DeSerialize(format,seg); m_jitterSamplePacketInterval.DeSerialize(format,seg); break; } default : { break; } } } //#endif ///////////////////////////////////////////////////////////////////////////// * / void CRtpInfo::SerializeXml(CXMLDOMElement* pFatherNode) { CXMLDOMElement* pRtpInfo = pFatherNode->AddChildNode("RTP_INFO"); CXMLDOMElement* pTempNode = pRtpInfo->AddChildNode("RTP_PACKET_LOSS"); m_rtpPacketLoss.SerializeXml(pTempNode); pTempNode = pRtpInfo->AddChildNode("RTP_OUT_OF_ORDER"); m_rtpOutOfOrder.SerializeXml(pTempNode); pTempNode = pRtpInfo->AddChildNode("RTP_FRAGMENT_PACKETS"); m_rtpFragmentPackets.SerializeXml(pTempNode); pTempNode = pRtpInfo->AddChildNode("JITTER_BUFFER_SIZE"); m_jitterBufferSize.SerializeXml(pTempNode); pTempNode = pRtpInfo->AddChildNode("JITTER_LATE_PACKETS"); m_jitterLatePackets.SerializeXml(pTempNode); pTempNode = pRtpInfo->AddChildNode("JITTER_OVERFLOWS"); m_jitterOverflows.SerializeXml(pTempNode); pTempNode = pRtpInfo->AddChildNode("JITTER_SAMPLE_PACKET_INTERVAL"); m_jitterSamplePacketInterval.SerializeXml(pTempNode); } ///////////////////////////////////////////////////////////////////////////// * / int CRtpInfo::DeSerializeXml(CXMLDOMElement *pActionNode,char *pszError) { int nStatus = STATUS_OK; CXMLDOMElement* pChildNode; GET_CHILD_NODE(pActionNode, "RTP_PACKET_LOSS", pChildNode); if (pChildNode) { nStatus = m_rtpPacketLoss.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "RTP_OUT_OF_ORDER", pChildNode); if (pChildNode) { nStatus = m_rtpOutOfOrder.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "RTP_FRAGMENT_PACKETS", pChildNode); if (pChildNode) { nStatus = m_rtpFragmentPackets.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "JITTER_BUFFER_SIZE", pChildNode); if (pChildNode) { nStatus = m_jitterBufferSize.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "JITTER_LATE_PACKETS", pChildNode); if (pChildNode) { nStatus = m_jitterLatePackets.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "JITTER_OVERFLOWS", pChildNode); if (pChildNode) { nStatus = m_jitterOverflows.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "JITTER_SAMPLE_PACKET_INTERVAL", pChildNode); if (pChildNode) { nStatus = m_jitterSamplePacketInterval.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } return STATUS_OK; } ///////////////////////////////////////////////////////////////////////////// * / void CRtpInfo::SetRtpInfo(const CRtpInfo& rtpInfo) { *this = rtpInfo; } ///////////////////////////////////////////////////////////////////////////// void CRtpInfo::DumpStr() { PTRACE(eLevelInfoNormal,"CRtpInfo::Dump"); PTRACE(eLevelInfoNormal,"\nm_rtpPacketLoss "); m_rtpPacketLoss.Dump1(); PTRACE(eLevelInfoNormal,"\nm_rtpOutOfOrder "); m_rtpOutOfOrder.Dump1(); PTRACE(eLevelInfoNormal,"\nm_rtpFragmentPackets "); m_rtpFragmentPackets.Dump1(); PTRACE(eLevelInfoNormal,"\nm_jitterBufferSize "); m_jitterBufferSize.Dump1(); PTRACE(eLevelInfoNormal,"\nm_jitterLatePackets "); m_jitterLatePackets.Dump1(); PTRACE(eLevelInfoNormal,"\nm_jitterOverflows "); m_jitterOverflows.Dump1(); PTRACE(eLevelInfoNormal,"\nm_jitterSamplePacketInterval "); m_jitterSamplePacketInterval.Dump1(); } ///////////////////////////////////////////////////////////////////////////// * / DWORD CRtpInfo::CheckExceedingFieldsRules(CMedString &strExcFieldsRules) { DWORD mapProblem = 0; //#ifdef __HIGHC__ DWORD res = 0; WORD quotient; //full WORD remainder; //PacketLoss // get system.cfg values CSysConfig* pSysConfig = CProcessBase::GetProcess()->GetSysConfig(); std::string key = ""; DWORD thresholdNumber = 50;//::GetpSystemCfg()->GetThresholdAccPacketLoss(); key = "THRESHOLD_ACCUMULATE_PACKET_LOSS"; pSysConfig->GetDWORDDataByKey(key, thresholdNumber); res = m_rtpPacketLoss.GetAccumulatePercent(); if(res == 0xFFFFFFFF)// this is the default value, its happened some times in the first monitoring indication. Should ignore this error res = 0; res = res /10; if(thresholdNumber && (res > thresholdNumber)) { quotient = res / 100; remainder = res % 100; strExcFieldsRules<<" Exceed rtp packet loss accumulate "<<quotient<<"."<<remainder; mapProblem |= ActualLossAccProblem; } thresholdNumber = 50;//::GetpSystemCfg()->GetThresholdInterPacketLoss(); key = "THRESHOLD_INTERVAL_PACKET_LOSS"; pSysConfig->GetDWORDDataByKey(key, thresholdNumber); res = m_rtpPacketLoss.GetIntervalPercent(); if(res == 0xFFFFFFFF)// this is the default value, its happened some times in the first monitoring indication. Should ignore this error res = 0; res = res /10; if(thresholdNumber && (res > thresholdNumber)) { quotient = res / 100; remainder = res % 100; strExcFieldsRules<<" Exceed rtp packet loss interval "<<quotient<<"."<<remainder; mapProblem |= ActualLossInterProblem; } //OutOfOrder thresholdNumber = 50;//::GetpSystemCfg()->GetThresholdAccOutOfOrder(); key = "THRESHOLD_ACCUMULATE_OUT_OF_ORDER"; pSysConfig->GetDWORDDataByKey(key, thresholdNumber); res = m_rtpOutOfOrder.GetAccumulatePercent(); if(res == 0xFFFFFFFF)// this is the default value, its happened some times in the first monitoring indication. Should ignore this error res = 0; res = res /10; if(thresholdNumber && (res > thresholdNumber)) { quotient = res / 100; remainder = res % 100; strExcFieldsRules<<" Exceed out of order accumulate "<<quotient<<"."<<remainder; mapProblem |= OutOfOrderAccProblem; } thresholdNumber = 50;//::GetpSystemCfg()->GetThresholdIntervalOutOfOrder(); key = "THRESHOLD_INTERVAL_OUT_OF_ORDER"; pSysConfig->GetDWORDDataByKey(key, thresholdNumber); res = m_rtpOutOfOrder.GetIntervalPercent(); if(res == 0xFFFFFFFF)// this is the default value, its happened some times in the first monitoring indication. Should ignore this error res = 0; res = res /10; if(thresholdNumber && (res > thresholdNumber)) { quotient = res / 100; remainder = res % 100; strExcFieldsRules<<" Exceed out of order interval "<<quotient<<"."<<remainder; mapProblem |= OutOfOrderInterProblem; } //Fragmented thresholdNumber = 50;//::GetpSystemCfg()->GetThresholdAccFragmented(); key = "THRESHOLD_ACCUMULATE_FRAGMENTED"; pSysConfig->GetDWORDDataByKey(key, thresholdNumber); res = m_rtpFragmentPackets.GetAccumulatePercent(); if(res == 0xFFFFFFFF)// this is the default value, its happened some times in the first monitoring indication. Should ignore this error res = 0; res = res /10; if(thresholdNumber && (res > thresholdNumber)) { quotient = res / 100; remainder = res % 100; strExcFieldsRules<<" Exceed fragment packets accumulate "<<quotient<<"."<<remainder; mapProblem |= FragmentedAccProblem; } thresholdNumber = 50;//::GetpSystemCfg()->GetThresholdIntervalFragmented(); key = "THRESHOLD_INTERVAL_FRAGMENTED"; pSysConfig->GetDWORDDataByKey(key, thresholdNumber); res = m_rtpFragmentPackets.GetIntervalPercent(); if(res == 0xFFFFFFFF)// this is the default value, its happened some times in the first monitoring indication. Should ignore this error res = 0; res = res /10; if(thresholdNumber && (res > thresholdNumber)) { quotient = res / 100; remainder = res % 100; strExcFieldsRules<<" Exceed fragment packets interval "<<quotient<<"."<<remainder; mapProblem |= FragmentedInterProblem; } //#endif return mapProblem; } /*************************************************************************************/ /* CAdvanceAudio */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceAudio::CAdvanceAudio(const CAdvanceAudio &other):CPrtMontrGlobalParams(other) { m_framePerPacket = other.m_framePerPacket; } ///////////////////////////////////////////////////////////////////////////// * / CAdvanceAudio& CAdvanceAudio::operator=(const CAdvanceAudio& other) { if(this != &other) { m_framePerPacket = other.m_framePerPacket; (CPrtMontrGlobalParams &)*this = (CPrtMontrGlobalParams &)other; } return *this; } ///////////////////////////////////////////////////////////////////////////// * / DWORD CAdvanceAudio::operator==(const CAdvanceAudio& other) { if(this == &other) return TRUE; if((CPrtMontrGlobalParams &)*this == (CPrtMontrGlobalParams &)other && m_framePerPacket == other.m_framePerPacket) return TRUE; else return FALSE; } ///////////////////////////////////////////////////////////////////////////// * / DWORD CAdvanceAudio::operator!=(const CAdvanceAudio& other) { return (!(*this == other)); } /////////////////////////////////////////////////////////////////////////////////////// void CAdvanceAudio::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceAudio")) { *this = (CAdvanceAudio &)other; } } /////////////////////////////////////////////////////////////////////////////////////// DWORD CAdvanceAudio::IsEqual(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceAudio")) return (*this == (CAdvanceAudio &)other); else return FALSE; } ///////////////////////////////////////////////////////////////////////////// * / //#ifdef __HIGHC__ void CAdvanceAudio::Serialize(WORD format,CSegment &seg) const { switch ( format ) { case NATIVE : { CPrtMontrGlobalParams::Serialize(format,seg); seg << m_framePerPacket; break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceAudio::DeSerialize(WORD format,CSegment &seg) { switch ( format ) { case NATIVE : { CPrtMontrGlobalParams::DeSerialize(format,seg); seg >> m_framePerPacket; break; } default : { break; } } } //#endif /////////////////////////////////////////////////////////////////// * / void CAdvanceAudio::SerializeXml(CXMLDOMElement* pFatherNode) { CXMLDOMElement* pAdvanceAudio = pFatherNode->AddChildNode("ADVANCED_AUDIO_PARAM"); CPrtMontrGlobalParams::SerializeXml(pAdvanceAudio); pAdvanceAudio->AddChildNode("FRAME_PER_PACKET",m_framePerPacket); } ///////////////////////////////////////////////////////////////////////////// * / int CAdvanceAudio::DeSerializeXml(CXMLDOMElement *pFatherNode,char *pszError) { int nStatus = STATUS_OK; CXMLDOMElement *pActionNode; GET_CHILD_NODE(pFatherNode, "ADVANCED_AUDIO_PARAM", pActionNode); if (pActionNode) { nStatus = CPrtMontrGlobalParams::DeSerializeXml(pActionNode, pszError); if (nStatus!=STATUS_OK) return nStatus; GET_VALIDATE_CHILD(pActionNode,"FRAME_PER_PACKET",&m_framePerPacket,_0_TO_DWORD); } return STATUS_OK; } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceAudio::CheckExceedingFieldsRules(DWORD rate,DWORD protocol, DWORD framePerPacket,CMedString &strExcFieldsRules) { if(m_framePerPacket != framePerPacket) { strExcFieldsRules<<" Different frame per packet. Current: "<<m_framePerPacket; strExcFieldsRules<<" ,expected: "<<framePerPacket; SetProblem(FramePerPacketProblem); } CPrtMontrGlobalParams::CheckExceedingFieldsRules(rate,protocol,strExcFieldsRules); } ///////////////////////////////////////////////////////////////////////////// void CAdvanceAudio::Dump1() { CLargeString strBase1; strBase1<< " : \nm_framePerPacket = " << m_framePerPacket; FPTRACE2(eLevelInfoNormal,"CAdvanceAudio::Dump ", strBase1.GetString()); CPrtMontrGlobalParams::Dump1(); } /*************************************************************************************/ /* CAdvanceAudioOut */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceAudioOut::CAdvanceAudioOut() { m_channelType = AUDIO_OUT; } //////////////////////////////////////////////////// void CAdvanceAudioOut::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceAudioOut")) { *this = (CAdvanceAudioOut &)other; } } ///////////////////////////////////////////////////////////////////////////// void CAdvanceAudioOut::Dump1() { PTRACE(eLevelInfoNormal,"CAdvanceAudioOut::Dump \n"); CAdvanceAudio::Dump1(); } /*************************************************************************************/ /* CAdvanceAudioIn */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceAudioIn::CAdvanceAudioIn() { m_channelType = AUDIO_IN; } ///////////////////////////////////////////////////////////////////////////// * / CAdvanceAudioIn::CAdvanceAudioIn(const CAdvanceAudioIn &other):CAdvanceAudio(other),CRtpInfo(other) { } ///////////////////////////////////////////////////////////////////////////// /*void CAdvanceAudioIn::Dump1() { PTRACE(eLevelInfoNormal,"CAdvanceAudioIn::Dump \n"); ((CAdvanceAudio&)*this).Dump1(); }*/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceAudioIn& CAdvanceAudioIn::operator=(const CAdvanceAudioIn& other) { if(this != &other) { (CAdvanceAudio &)*this = (CAdvanceAudio &)other; m_rtpPacketLoss = other.m_rtpPacketLoss; m_rtpOutOfOrder = other.m_rtpOutOfOrder; m_rtpFragmentPackets = other.m_rtpFragmentPackets; m_jitterBufferSize = other.m_jitterBufferSize; m_jitterLatePackets = other.m_jitterLatePackets; m_jitterOverflows = other.m_jitterOverflows; m_jitterSamplePacketInterval = other.m_jitterSamplePacketInterval; } return *this; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CAdvanceAudioIn::operator==(const CAdvanceAudioIn& other) { if(this == &other) return TRUE; if( (CAdvanceAudio &)*this == (CAdvanceAudio &)other && m_rtpPacketLoss == other.m_rtpPacketLoss && m_rtpOutOfOrder == other.m_rtpOutOfOrder && m_rtpFragmentPackets == other.m_rtpFragmentPackets && m_jitterBufferSize == other.m_jitterBufferSize && m_jitterLatePackets == other.m_jitterLatePackets && m_jitterOverflows == other.m_jitterOverflows && m_jitterSamplePacketInterval == other.m_jitterSamplePacketInterval) return TRUE; else return FALSE; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CAdvanceAudioIn::operator!=(const CAdvanceAudioIn& other) { return (!(*this == other)); } /////////////////////////////////////////////////////////////////////////////////////// void CAdvanceAudioIn::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceAudioIn")) { *this = (CAdvanceAudioIn &)other; } } ///////////////////////////////////////////////////////////////////////////// * DWORD CAdvanceAudioIn::IsEqual(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceAudioIn")) return (*this == (CAdvanceAudioIn &)other); else return FALSE; } ///////////////////////////////////////////////////////////////////////////// * //#ifdef __HIGHC__ void CAdvanceAudioIn::Serialize(WORD format,CSegment &seg) const { switch ( format ) { case NATIVE : { CAdvanceAudio::Serialize(format,seg); CRtpInfo::Serialize(format,seg); break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceAudioIn::DeSerialize(WORD format,CSegment &seg) { switch ( format ) { case NATIVE : { CAdvanceAudio::DeSerialize(format,seg); CRtpInfo::DeSerialize(format,seg); break; } default : { break; } } } //#endif ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceAudioIn::SerializeXml(CXMLDOMElement* pFatherNode) { CXMLDOMElement* pAdvanceAudioIn = pFatherNode->AddChildNode("ADVANCED_AUDIO_IN"); CAdvanceAudio::SerializeXml(pAdvanceAudioIn); CRtpInfo::SerializeXml(pAdvanceAudioIn); } ///////////////////////////////////////////////////////////////////////////// * / int CAdvanceAudioIn::DeSerializeXml(CXMLDOMElement *pFatherNode,char *pszError) { int nStatus = STATUS_OK; CXMLDOMElement *pChildNode, *pActionNode; GET_CHILD_NODE(pFatherNode, "ADVANCED_AUDIO_IN", pActionNode); if (pActionNode) { nStatus = CAdvanceAudio::DeSerializeXml(pActionNode,pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "RTP_INFO", pChildNode); if (pChildNode) { nStatus = CRtpInfo::DeSerializeXml(pChildNode,pszError); if (nStatus!=STATUS_OK) return nStatus; } return STATUS_OK; } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceAudioIn::CheckExceedingFieldsRules(DWORD rate,DWORD protocol, long framePerPacket,CMedString &strExcFieldsRules) { DWORD mapProblem = CRtpInfo::CheckExceedingFieldsRules(strExcFieldsRules); CAdvanceAudio::CheckExceedingFieldsRules(rate,protocol,framePerPacket,strExcFieldsRules); SetProblem(mapProblem); } /*************************************************************************************/ /* CAdvanceVideo */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceVideo::CAdvanceVideo() { m_annexes = 0; m_resolution = 0xFFFFFFFF; m_maxResolution = 0xFFFFFFFF; m_minResolution = 0xFFFFFFFF; m_frameRate = 0; m_maxFrameRate = 0; m_minFrameRate = 0; m_resolutionWidth = 0; m_maxResolutionWidth = 0; m_minResolutionWidth = 0; m_resolutionHeight = 0; m_maxResolutionHeight = 0; m_minResolutionHeight = 0; } ///////////////////////////////////////////////////////////////////////////// * / CAdvanceVideo::CAdvanceVideo(const CAdvanceVideo &other):CPrtMontrGlobalParams(other) { m_annexes = other.m_annexes; m_resolution = other.m_resolution; m_maxResolution = other.m_maxResolution; m_minResolution = other.m_minResolution; m_frameRate = other.m_frameRate; m_maxFrameRate = other.m_maxFrameRate; m_minFrameRate = other.m_minFrameRate; m_resolutionWidth = other.m_resolutionWidth; m_maxResolutionWidth = other.m_maxResolutionWidth; m_minResolutionWidth = other.m_minResolutionWidth; m_resolutionHeight = other.m_resolutionHeight; m_maxResolutionHeight = other.m_maxResolutionHeight; m_minResolutionHeight = other.m_minResolutionHeight; } ///////////////////////////////////////////////////////////////////////////// * / CAdvanceVideo& CAdvanceVideo::operator=(const CAdvanceVideo& other) { if(this != &other) { m_annexes = other.m_annexes; m_resolution = other.m_resolution; m_maxResolution = other.m_maxResolution; m_minResolution = other.m_minResolution; m_frameRate = other.m_frameRate; m_maxFrameRate = other.m_maxFrameRate; m_minFrameRate = other.m_minFrameRate; m_resolutionWidth = other.m_resolutionWidth; m_maxResolutionWidth = other.m_maxResolutionWidth; m_minResolutionWidth = other.m_minResolutionWidth; m_resolutionHeight = other.m_resolutionHeight; m_maxResolutionHeight = other.m_maxResolutionHeight; m_minResolutionHeight = other.m_minResolutionHeight; (CPrtMontrGlobalParams &)*this = (CPrtMontrGlobalParams &)other; } return *this; } ///////////////////////////////////////////////////////////////////////////// * / DWORD CAdvanceVideo::operator==(const CAdvanceVideo& other) { if(this == &other) return TRUE; if( (CPrtMontrGlobalParams &)*this == (CPrtMontrGlobalParams &)other && m_annexes == other.m_annexes && m_resolution == other.m_resolution && m_maxResolution == other.m_maxResolution && m_minResolution == other.m_minResolution && m_frameRate == other.m_frameRate && m_maxFrameRate == other.m_maxFrameRate && m_minFrameRate == other.m_minFrameRate && m_resolutionWidth == other.m_resolutionWidth && m_maxResolutionWidth == other.m_maxResolutionWidth && m_minResolutionWidth == other.m_minResolutionWidth && m_maxResolutionHeight == other.m_maxResolutionHeight && m_minResolutionHeight == other.m_minResolutionHeight && m_resolutionHeight == other.m_resolutionHeight) return TRUE; else return FALSE; } ///////////////////////////////////////////////////////////////////////////// * / DWORD CAdvanceVideo::operator!=(const CAdvanceVideo& other) { return (!(*this == other)); } /////////////////////////////////////////////////////////////////////////////////////// void CAdvanceVideo::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceVideo")) { *this = (CAdvanceVideo &)other; } } ///////////////////////////////////////////////////////////////////////////// * DWORD CAdvanceVideo::IsEqual(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceVideo")) return (*this == (CAdvanceVideo &)other); else return FALSE; } ///////////////////////////////////////////////////////////////////////////// * / //#ifdef __HIGHC__ void CAdvanceVideo::Serialize(WORD format,CSegment &seg) const { switch ( format ) { case NATIVE : { CPrtMontrGlobalParams::Serialize(format,seg); seg << m_annexes; seg << (DWORD)m_resolution; seg << (DWORD)m_maxResolution; seg << (DWORD)m_minResolution; seg << m_frameRate; seg << m_maxFrameRate; seg << m_minFrameRate; seg << m_resolutionWidth; seg << m_maxResolutionWidth; seg << m_minResolutionWidth; seg << m_resolutionHeight; seg << m_maxResolutionHeight; seg << m_minResolutionHeight; break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceVideo::DeSerialize(WORD format,CSegment &seg) { switch ( format ) { case NATIVE : { CPrtMontrGlobalParams::DeSerialize(format,seg); DWORD resolution; DWORD maxResolution; DWORD minResolution; seg >> m_annexes; seg >> resolution; seg >> maxResolution; seg >> minResolution; seg >> m_frameRate; seg >> m_maxFrameRate; seg >> m_minFrameRate; seg >> m_resolutionWidth; seg >> m_maxResolutionWidth; seg >> m_minResolutionWidth; seg >> m_resolutionHeight; seg >> m_maxResolutionHeight; seg >> m_minResolutionHeight; m_resolution = (int)resolution; m_maxResolution = (int)maxResolution; m_minResolution = (int)minResolution; break; } default : { break; } } } //#endif ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceVideo::SerializeXml(CXMLDOMElement* pFatherNode) { CXMLDOMElement* pAdvanceVideo = pFatherNode->AddChildNode("ADVANCED_VIDEO_PARAM"); CPrtMontrGlobalParams::SerializeXml(pAdvanceVideo); CXMLDOMElement* pChildNode = pAdvanceVideo->AddChildNode("ANNEXES"); for (int i=0; i<H263_Annexes_Number; i++) { if (IsAnnex(i)) pChildNode->AddChildNode("ANNEX",i,ANNEXES_ENUM); } pAdvanceVideo->AddChildNode("RESOLUTION",m_resolution, VIDEO_RESOLUTION_ENUM); pAdvanceVideo->AddChildNode("VIDEO_FRAME_RATE",m_frameRate); pAdvanceVideo->AddChildNode("RESOLUTION_WIDTH",m_resolutionWidth); pAdvanceVideo->AddChildNode("RESOLUTION_HEIGHT",m_resolutionHeight); } ///////////////////////////////////////////////////////////////////////////// * / BYTE CAdvanceVideo::IsAnnex(int annex) const { BOOL bRes = FALSE; annexes_fd_set annexesMask; annexesListEn eAnnex = (annexesListEn)annex; annexesMask.fds_bits[0] = m_annexes; BOOL bIsParameterOK = (eAnnex < H263_Annexes_Number); if (bIsParameterOK) { if (CAP_FD_ISSET(eAnnex, &(annexesMask))) bRes = TRUE; } return bRes; } ///////////////////////////////////////////////////////////////////////////// * / int CAdvanceVideo::DeSerializeXml(CXMLDOMElement *pFatherNode,char *pszError) { int nStatus = STATUS_OK; CXMLDOMElement *pActionNode, *pChildNode, *pAnnexNode; GET_CHILD_NODE(pFatherNode, "ADVANCED_VIDEO_PARAM", pActionNode); if (pActionNode) { nStatus = CPrtMontrGlobalParams::DeSerializeXml(pActionNode, pszError); if (nStatus!=STATUS_OK) return nStatus; GET_CHILD_NODE(pActionNode,"ANNEXES", pChildNode); if (pChildNode) { int num; GET_FIRST_CHILD_NODE(pChildNode, "ANNEX", pAnnexNode); annexes_fd_set tempMask; tempMask.fds_bits[0] = 0; while (pAnnexNode) { GET_VALIDATE(pAnnexNode, &num, ANNEXES_ENUM); //update the annexes AddAnnex(&tempMask,num); GET_NEXT_CHILD_NODE(pChildNode, "ANNEX", pAnnexNode); } m_annexes = tempMask.fds_bits[0]; } GET_VALIDATE_CHILD(pActionNode,"RESOLUTION",&m_resolution,VIDEO_RESOLUTION_ENUM); GET_VALIDATE_CHILD(pActionNode,"VIDEO_FRAME_RATE",&m_frameRate,_0_TO_WORD); GET_VALIDATE_CHILD(pActionNode,"RESOLUTION_WIDTH",&m_resolutionWidth,_0_TO_WORD); GET_VALIDATE_CHILD(pActionNode,"RESOLUTION_HEIGHT",&m_resolutionHeight,_0_TO_WORD); } return STATUS_OK; } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceVideo::AddAnnex(annexes_fd_set *pTempMask,DWORD eAnnex) const { BYTE bIsParameterOK = (eAnnex < H263_Annexes_Number); if (bIsParameterOK) CAP_FD_SET(eAnnex, pTempMask); } ///////////////////////////////////////////////////////////////////////////// void CAdvanceVideo::Dump1() { CLargeString strBase1; strBase1<< " : \nm_annexes = " << m_annexes << "\nm_resolution = " << m_resolution << "\nm_frameRate = " << m_frameRate << "\nm_resolutionWidth = " << m_resolutionWidth << "\nm_resolutionHeight = " << m_resolutionHeight; FPTRACE2(eLevelInfoNormal,"CAdvanceVideo::Dump ", strBase1.GetString()); CPrtMontrGlobalParams::Dump1(); } ///////////////////////////////////////////////////////////////////////////// * / BYTE CAdvanceVideo::bIsResolutionOk(DWORD resolution) { /*m_resolution - is the resolution that we received from the card resolution - it the resolution from the channel. In case the m_resolution is bigger then the resolution we have in the channel it is a problem, we should check with the right order! */ DWORD roundedUp_m_resolution = m_resolution; if(roundedUp_m_resolution == (DWORD)kUnknownFormat) roundedUp_m_resolution = CCapSetInfo::GetResolutionFormat(m_resolutionWidth, m_resolutionHeight); if ((roundedUp_m_resolution >= kLastFormat) || (resolution >= kLastFormat )) return FALSE; BYTE bIsOk = TRUE; EOrderedFormat eReportedResolution = CCapSetInfo::ConvertFormatToOrderedFormat((EFormat)roundedUp_m_resolution); EOrderedFormat eChannelResolution = CCapSetInfo::ConvertFormatToOrderedFormat((EFormat)resolution); if (roundedUp_m_resolution != (DWORD)kUnknownFormat && eReportedResolution > eChannelResolution) bIsOk = FALSE; return bIsOk; } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceVideo::CheckExceedingFieldsRules(DWORD rate,DWORD protocol,DWORD annexes, int resolution,unsigned short frameRate,CMedString &strExcFieldsRules) { //#ifdef __HIGHC__ // get system.cfg values CSysConfig* pSysConfig = CProcessBase::GetProcess()->GetSysConfig(); std::string key = "THRESHOLD_FRAME_RATE"; DWORD thresholdFrameRate = 12000;//::GetpSystemCfg()->GetThresholdFrameRate(); pSysConfig->GetDWORDDataByKey(key, thresholdFrameRate); if((kUnknownFormat <= m_resolution && m_resolution < kLastFormat) && (kUnknownFormat <= resolution && resolution < kLastFormat)) { BYTE bIsOk = bIsResolutionOk(resolution); if(bIsOk == FALSE) { CCapSetInfo capInfo; strExcFieldsRules<<" Exceed resolution. Current: " << capInfo.GetFormatStr((EFormat)m_resolution); //::GetResolutionFormatName(m_resolution,strExcFieldsRules); strExcFieldsRules<<" is bigger than expected: " << capInfo.GetFormatStr((EFormat)resolution); //::GetResolutionFormatName(resolution,strExcFieldsRules); SetProblem(ResolutionProblem); } } else { strExcFieldsRules<<"The resolution exceed the number of known resolution."; strExcFieldsRules<<" m_resolution = "<<m_resolution; strExcFieldsRules<<" resolution = "<<resolution; SetProblem(ResolutionProblem); DBGPASSERT(m_resolution); DBGPASSERT(resolution); } if((thresholdFrameRate != 10000) && ((m_frameRate * (DWORD)10000) > (frameRate * thresholdFrameRate))) //if the m_frameRate > 120% { strExcFieldsRules<<" Exceed frame rate. Current: "<< m_frameRate; strExcFieldsRules<<" ,expected: "<<frameRate; SetProblem(FrameRateProblem); } //For checking difference we need to check if the group of the union is remain the //current annexes BOOL bIsProblem = FALSE; // for(annexesListEn eAnnex = typeAnnexB; eAnnex < H263_Annexes_Number && !bIsProblem; eAnnex++) // { // if(IsContainAnnex((int)eAnnex, m_annexes) && (!IsContainAnnex((int)eAnnex, annexes))) // { // if(eAnnex != typeAnnexI) // bIsProblem = TRUE; // } // } DWORD eAnnex; for(eAnnex = typeAnnexB; eAnnex < H263_Annexes_Number && !bIsProblem; eAnnex++) { if(IsContainAnnex(eAnnex, m_annexes) && (!IsContainAnnex(eAnnex, annexes))) { if(eAnnex != typeAnnexI) bIsProblem = TRUE; } } if(bIsProblem) { strExcFieldsRules<<" Annexes problem. m_annexes = "<<m_annexes<<" annexes = "<<--annexes; strExcFieldsRules<<" Problematic annex is: "<<eAnnex; SetProblem(AnnexesProblem); } CPrtMontrGlobalParams::CheckExceedingFieldsRules(rate,protocol,strExcFieldsRules); //#endif } /*************************************************************************************/ /* CAdvanceVideoOut */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceVideoOut::CAdvanceVideoOut(EIpChannelType channelType) { m_channelType = channelType; //VIDEO_OUT or VIDEO_CONT_OUT } //////////////////////////////////////////////////// void CAdvanceVideoOut::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceVideoOut")) { *this = (CAdvanceVideoOut &)other; } } ///////////////////////////////////////////////////////////////////////////// void CAdvanceVideoOut::Dump1() { PTRACE(eLevelInfoNormal,"CAdvanceVideoOut::Dump \n"); CAdvanceVideo::Dump1(); } /*************************************************************************************/ /* CAdvanceVideoIn */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceVideoIn::CAdvanceVideoIn(EIpChannelType channelType) { m_channelType = channelType; //VIDEO_IN or VIDEO_CONT_IN } ///////////////////////////////////////////////////////////////////////////// * / CAdvanceVideoIn::CAdvanceVideoIn(const CAdvanceVideoIn &other):CAdvanceVideo(other),CRtpInfo(other) { m_errorResilience = other.m_errorResilience; } ///////////////////////////////////////////////////////////////////////////// /*void CAdvanceVideoIn::Dump12() { PTRACE(eLevelInfoNormal,"CAdvanceVideoOut::Dump \n"); m_errorResilience.Dump1(); }*/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceVideoIn& CAdvanceVideoIn::operator=(const CAdvanceVideoIn& other) { if(this != &other) { m_errorResilience = other.m_errorResilience; (CAdvanceVideo &)*this = (CAdvanceVideo &)other; m_rtpPacketLoss = other.m_rtpPacketLoss; m_rtpOutOfOrder = other.m_rtpOutOfOrder; m_rtpFragmentPackets = other.m_rtpFragmentPackets; m_jitterBufferSize = other.m_jitterBufferSize; m_jitterLatePackets = other.m_jitterLatePackets; m_jitterOverflows = other.m_jitterOverflows; m_jitterSamplePacketInterval = other.m_jitterSamplePacketInterval; } return *this; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CAdvanceVideoIn::operator==(const CAdvanceVideoIn& other) { if(this == &other) return TRUE; if( (CAdvanceVideo &)*this == (CAdvanceVideo &)other && m_errorResilience == other.m_errorResilience && m_rtpPacketLoss == other.m_rtpPacketLoss && m_rtpOutOfOrder == other.m_rtpOutOfOrder && m_rtpFragmentPackets == other.m_rtpFragmentPackets && m_jitterBufferSize == other.m_jitterBufferSize && m_jitterLatePackets == other.m_jitterLatePackets && m_jitterOverflows == other.m_jitterOverflows && m_jitterSamplePacketInterval == other.m_jitterSamplePacketInterval) return TRUE; else return FALSE; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CAdvanceVideoIn::operator!=(const CAdvanceVideoIn& other) { return (!(*this == other)); } /////////////////////////////////////////////////////////////////////////////////////// void CAdvanceVideoIn::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceVideoIn")) { *this = (CAdvanceVideoIn &)other; } } ///////////////////////////////////////////////////////////////////////////// * DWORD CAdvanceVideoIn::IsEqual(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceVideoIn")) return (*this == (CAdvanceVideoIn &)other); else return FALSE; } //////////////////////////////////////////////////////////////////////////// * / //#ifdef __HIGHC__ void CAdvanceVideoIn::Serialize(WORD format,CSegment &seg) const { switch ( format ) { case NATIVE : { CAdvanceVideo::Serialize(format,seg); CRtpInfo::Serialize(format,seg); m_errorResilience.Serialize(format,seg); break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceVideoIn::DeSerialize(WORD format,CSegment &seg) { switch ( format ) { case NATIVE : { CAdvanceVideo::DeSerialize(format,seg); CRtpInfo::DeSerialize(format,seg); m_errorResilience.DeSerialize(format,seg); break; } default : { break; } } } //#endif ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceVideoIn::SerializeXml(CXMLDOMElement* pFatherNode) { CXMLDOMElement* pAdvanceVideoIn = pFatherNode->AddChildNode("ADVANCED_VIDEO_IN"); CXMLDOMElement* pTempNode; CAdvanceVideo::SerializeXml(pAdvanceVideoIn); CRtpInfo::SerializeXml(pAdvanceVideoIn); pTempNode = pAdvanceVideoIn->AddChildNode("ERROR_RESILIENCE"); m_errorResilience.SerializeXml(pTempNode); } ///////////////////////////////////////////////////////////////////////////// * / int CAdvanceVideoIn::DeSerializeXml(CXMLDOMElement *pFatherNode,char *pszError) { int nStatus = STATUS_OK; CXMLDOMElement *pChildNode, *pActionNode; GET_CHILD_NODE(pFatherNode, "ADVANCED_VIDEO_IN", pActionNode); if (pActionNode) { nStatus = CAdvanceVideo::DeSerializeXml(pActionNode, pszError); if (nStatus!=STATUS_OK) return nStatus; GET_CHILD_NODE(pActionNode, "RTP_INFO", pChildNode); if (pChildNode) { nStatus = CRtpInfo::DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "ERROR_RESILIENCE", pChildNode); if (pChildNode) { nStatus = m_errorResilience.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } } return STATUS_OK; } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceVideoIn::CheckExceedingFieldsRules(DWORD rate,DWORD protocol,DWORD annexes, DWORD resolution,DWORD frameRate,CMedString &strExcFieldsRules) { DWORD mapProblem = CRtpInfo::CheckExceedingFieldsRules(strExcFieldsRules); CAdvanceVideo::CheckExceedingFieldsRules(rate,protocol,annexes,resolution,frameRate,strExcFieldsRules); SetProblem(mapProblem); } /*************************************************************************************/ /* CAdvanceFeccOut */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceFeccOut::CAdvanceFeccOut() { m_channelType = FECC_OUT; } /////////////////////////////////// void CAdvanceFeccOut::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceFeccOut")) { *this = (CAdvanceFeccOut &)other; } } //////////////////////////////////////// void CAdvanceFeccOut::Dump1() { PTRACE(eLevelInfoNormal,"CAdvanceFeccOut::Dump \n"); CPrtMontrGlobalParams::Dump1(); } /*************************************************************************************/ /* CAdvanceFeccIn */ /*************************************************************************************/ ///////////////////////////////////////////////////////////////////////////// * / CAdvanceFeccIn::CAdvanceFeccIn() { m_channelType = FECC_IN; } ///////////////////////////////////////////////////////////////////////////// void CAdvanceFeccIn::Dump1() { PTRACE(eLevelInfoNormal,"CAdvanceFeccIn::Dump \n"); PTRACE(eLevelInfoNormal,"m_rtpPacketLoss \n"); m_rtpPacketLoss.Dump1(); PTRACE(eLevelInfoNormal,"m_rtpOutOfOrder \n"); m_rtpOutOfOrder.Dump1(); PTRACE(eLevelInfoNormal,"m_rtpFragmentPackets \n"); m_rtpFragmentPackets.Dump1(); CPrtMontrGlobalParams::Dump1(); } ///////////////////////////////////////////////////////////////////////////// * / CAdvanceFeccIn::CAdvanceFeccIn(const CAdvanceFeccIn &other):CPrtMontrGlobalParams(other) { m_rtpPacketLoss = other.m_rtpPacketLoss; m_rtpOutOfOrder = other.m_rtpOutOfOrder; m_rtpFragmentPackets = other.m_rtpFragmentPackets; } ///////////////////////////////////////////////////////////////////////////// * / CAdvanceFeccIn& CAdvanceFeccIn::operator=(const CAdvanceFeccIn& other) { if(this != &other) { m_rtpPacketLoss = other.m_rtpPacketLoss; m_rtpOutOfOrder = other.m_rtpOutOfOrder; m_rtpFragmentPackets = other.m_rtpFragmentPackets; (CPrtMontrGlobalParams &)*this = (CPrtMontrGlobalParams &)other; } return *this; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CAdvanceFeccIn::operator==(const CAdvanceFeccIn& other) { if(this == &other) return TRUE; if( (CPrtMontrGlobalParams &)*this == (CPrtMontrGlobalParams &)other && m_rtpPacketLoss == other.m_rtpPacketLoss && m_rtpOutOfOrder == other.m_rtpOutOfOrder && m_rtpFragmentPackets == other.m_rtpFragmentPackets) return TRUE; else return FALSE; } /////////////////////////////////////////////////////////////////////////////////////// DWORD CAdvanceFeccIn::operator!=(const CAdvanceFeccIn& other) { return (!(*this == other)); } /////////////////////////////////////////////////////////////////////////////////////// void CAdvanceFeccIn::CopyClass(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceFeccIn")) { *this = (CAdvanceFeccIn &)other; } } ///////////////////////////////////////////////////////////////////////////// * DWORD CAdvanceFeccIn::IsEqual(CPrtMontrBaseParams &other) { if(!strcmp(other.NameOf(),"CAdvanceVideoIn")) return (*this == (CAdvanceFeccIn &)other); else return FALSE; } //////////////////////////////////////////////////////////////////////////// * / //#ifdef __HIGHC__ void CAdvanceFeccIn::Serialize(WORD format,CSegment &seg) const { switch ( format ) { case NATIVE : { CPrtMontrGlobalParams::Serialize(format,seg); m_rtpPacketLoss.Serialize(format,seg); m_rtpOutOfOrder.Serialize(format,seg); m_rtpFragmentPackets.Serialize(format,seg); break; } default : break; } } ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceFeccIn::DeSerialize(WORD format,CSegment &seg) { switch ( format ) { case NATIVE : { CPrtMontrGlobalParams::DeSerialize(format,seg); m_rtpPacketLoss.DeSerialize(format,seg); m_rtpOutOfOrder.DeSerialize(format,seg); m_rtpFragmentPackets.DeSerialize(format,seg); break; } default : { break; } } } //#endif ///////////////////////////////////////////////////////////////////////////// * / void CAdvanceFeccIn::SerializeXml(CXMLDOMElement* pFatherNode) { CXMLDOMElement* pAdvanceFeccIn = pFatherNode->AddChildNode("ADVANCED_FECC_IN"); CXMLDOMElement* pTempNode; CPrtMontrGlobalParams::SerializeXml(pAdvanceFeccIn); pTempNode = pAdvanceFeccIn->AddChildNode("RTP_PACKET_LOSS"); m_rtpPacketLoss.SerializeXml(pTempNode); pTempNode = pAdvanceFeccIn->AddChildNode("RTP_OUT_OF_ORDER"); m_rtpOutOfOrder.SerializeXml(pTempNode); pTempNode = pAdvanceFeccIn->AddChildNode("RTP_FRAGMENT_PACKETS"); m_rtpFragmentPackets.SerializeXml(pTempNode); } ///////////////////////////////////////////////////////////////////////////// * / int CAdvanceFeccIn::DeSerializeXml(CXMLDOMElement *pFatherNode,char *pszError) { int nStatus = STATUS_OK; CXMLDOMElement *pChildNode, *pActionNode; GET_CHILD_NODE(pFatherNode, "ADVANCED_FECC_IN", pActionNode); if (pActionNode) { nStatus = CPrtMontrGlobalParams::DeSerializeXml(pActionNode, pszError); if (nStatus!=STATUS_OK) return nStatus; GET_CHILD_NODE(pActionNode, "RTP_PACKET_LOSS", pChildNode); if (pChildNode) { nStatus = m_rtpPacketLoss.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "RTP_OUT_OF_ORDER", pChildNode); if (pChildNode) { nStatus = m_rtpOutOfOrder.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } GET_CHILD_NODE(pActionNode, "RTP_FRAGMENT_PACKETS", pChildNode); if (pChildNode) { nStatus = m_rtpFragmentPackets.DeSerializeXml(pChildNode, pszError); if (nStatus!=STATUS_OK) return nStatus; } } return STATUS_OK; } ///////////////////////////////////////////////////////////////////////////// * /
58e48441d41394c69dbc1256f51a89df2bdbd83c
8d952a06e3809a06825a3be7b067201f3652f16a
/debug/atomics/ATLAS-TDAQ/HltsvStrategies/DcmMeasuredStatistics.h
4a58b208398e730742f8299722cd5a9ccfb11d4b
[ "MIT", "GPL-3.0-only" ]
permissive
andyLaurito92/haikunet
b771eaf6bd91292485f0a49698ce123b9308d676
db44623b248c56735c28a5f589c3239dc7e9855e
refs/heads/master
2021-06-14T12:38:38.996450
2021-05-05T18:26:02
2021-05-05T18:26:02
75,564,849
2
1
MIT
2021-05-05T18:26:26
2016-12-04T21:12:31
C++
UTF-8
C++
false
false
1,237
h
DcmMeasuredStatistics.h
#ifndef ATOMICS_ATLAS_TDAQ_HltsvStrategies_DcmMeasuredStatistics_H_ #define ATOMICS_ATLAS_TDAQ_HltsvStrategies_DcmMeasuredStatistics_H_ #include "simulator.h" #include "sinks/Loggers/IPowerDEVSLogger.h" #include "ATLAS-TDAQ/globals.h" #include <algorithm> #include <vector> #include <queue> #include <list> class DcmMeasuredStatistics { double currentTime; double totalFilteringTime; double processingTime; double networkLatency; unsigned int requestedFragmentsSize; public: DcmMeasuredStatistics(double currentTime, double totalFilteringTime, double processingTime, double networkLatency, unsigned int requestedFragmentsSize) : currentTime(currentTime), totalFilteringTime(totalFilteringTime), processingTime(processingTime), networkLatency(networkLatency), requestedFragmentsSize(requestedFragmentsSize){ }; double getCurrentTime() { return this->currentTime;}; double getTotalFilteringTime() { return this->totalFilteringTime;}; double getProcessingTime() { return this->processingTime;}; double getNetworkLatency() { return this->networkLatency;}; unsigned int getRequestedFragmentsSize() { return this->requestedFragmentsSize;}; }; #endif /* ATOMICS_ATLAS_TDAQ_HltsvStrategies_DcmMeasuredStatistics_H_ */
d4ce31680c844405867f4daff06cece84af5d64a
de11818671ff03bf6bade1fcd490ab7b83386d05
/test/cpp/profiling/endoscope_service_test.cc
c61aaae3946500f4ec307470576748d3c4571069
[ "BSD-3-Clause" ]
permissive
zayoo/grpc
1a6a6a3c3823fac2480ded97e94f315c5e6a4258
693cb54854be0701acf98b76042ace7d2f5419bf
refs/heads/master
2021-01-24T14:18:33.049867
2015-08-08T00:57:20
2015-08-08T00:57:20
36,533,967
0
0
null
2015-07-27T20:14:59
2015-05-29T23:16:10
C
UTF-8
C++
false
false
6,027
cc
endoscope_service_test.cc
/* * * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include <sys/time.h> #include "test/core/util/test_config.h" #include "src/core/profiling/timers.h" #include "src/cpp/profiling/endoscope_service.h" #include <grpc++/server_context.h> #include <grpc++/status.h> #include <gtest/gtest.h> #include <grpc/grpc.h> #ifdef GRPC_ENDOSCOPE_PROFILER using perftools::endoscope::EndoRequestPB; using perftools::endoscope::EndoSnapshotPB; using perftools::endoscope::EndoAtomPB; namespace grpc { namespace testing { class EndoscopeServiceTest : public ::testing::Test { protected: grpc::endoscope::EndoscopeService service_; }; TEST_F(EndoscopeServiceTest, EndoscopeCoreTest) { grpc_endo_base *base = &grpc_endo_instance; GRPC_ENDO_INIT(base); GRPC_ENDO_BEGIN(base, "SOMEBODY SET UP US THE BOMB"); GRPC_ENDO_BEGIN(base, "ALL YOUR BASE ARE BELONG TO US"); GRPC_ENDO_EVENT(base, "YOU HAVE NO CHANCE TO SURVIVE MAKE YOUR TIME"); GRPC_ENDO_END(base, NULL); GRPC_ENDO_END(base, NULL); // marker EXPECT_EQ("SOMEBODY SET UP US THE BOMB", string(base->marker_pool[0].name)); EXPECT_EQ("ALL YOUR BASE ARE BELONG TO US", string(base->marker_pool[1].name)); EXPECT_EQ("YOU HAVE NO CHANCE TO SURVIVE MAKE YOUR TIME", string(base->marker_pool[2].name)); EXPECT_EQ(3, base->marker_count); // task EXPECT_EQ(0, base->task_pool[0].marker_id); EXPECT_EQ(0, base->task_pool[0].thread_index); EXPECT_EQ(0, base->task_pool[0].log_head); EXPECT_EQ(2, base->task_pool[0].log_tail); EXPECT_EQ(GRPC_ENDO_EMPTY, base->task_pool[0].next_task); EXPECT_EQ(GRPC_ENDO_EMPTY, base->task_pool[0].next_taskwithatom); EXPECT_EQ(0, base->task_pool[0].scope_depth); EXPECT_LT(base->task_pool[0].cycle_begin, base->task_pool[0].cycle_end); EXPECT_EQ(1, base->task_stack); EXPECT_EQ(0, base->task_history_head); EXPECT_EQ(0, base->task_history_tail); EXPECT_EQ(0, base->task_withatom_head); EXPECT_EQ(0, base->task_withatom_tail); EXPECT_EQ(1, base->task_count); // atom EXPECT_EQ(1, base->atom_pool[0].type); // EndoAtomPB::SCOPE_BEGIN EXPECT_EQ(1, base->atom_pool[0].param); EXPECT_EQ(1, base->atom_pool[0].next_atom); EXPECT_EQ(5, base->atom_pool[1].type); // EndoAtomPB::EVENT EXPECT_EQ(2, base->atom_pool[1].param); EXPECT_EQ(2, base->atom_pool[1].next_atom); EXPECT_EQ(2, base->atom_pool[2].type); // EndoAtomPB::SCOPE_END EXPECT_EQ(GRPC_ENDO_EMPTY, base->atom_pool[2].next_atom); EXPECT_LT(base->atom_pool[0].cycle, base->atom_pool[1].cycle); EXPECT_LT(base->atom_pool[1].cycle, base->atom_pool[2].cycle); EXPECT_EQ(3, base->atom_stack); // thread EXPECT_EQ(GRPC_ENDO_EMPTY, base->thread_pool[0].task_active); EXPECT_EQ(1, base->thread_count); } TEST_F(EndoscopeServiceTest, ProtobufOutputTest) { grpc_endo_base *base = &grpc_endo_instance; GRPC_ENDO_INIT(base); GRPC_ENDO_BEGIN(base, "SOMEBODY SET UP US THE BOMB"); GRPC_ENDO_BEGIN(base, "ALL YOUR BASE ARE BELONG TO US"); GRPC_ENDO_EVENT(base, "YOU HAVE NO CHANCE TO SURVIVE MAKE YOUR TIME"); GRPC_ENDO_END(base, NULL); GRPC_ENDO_END(base, NULL); EndoRequestPB request; EndoSnapshotPB snapshot; Status s = service_.Action(nullptr, &request, &snapshot); // marker EXPECT_EQ("SOMEBODY SET UP US THE BOMB", snapshot.marker(0).name()); EXPECT_EQ("ALL YOUR BASE ARE BELONG TO US", snapshot.marker(1).name()); EXPECT_EQ("YOU HAVE NO CHANCE TO SURVIVE MAKE YOUR TIME", snapshot.marker(2).name()); EXPECT_EQ(3, snapshot.marker_size()); // task EXPECT_EQ(0, snapshot.tasks_history(0).marker_id()); EXPECT_LT(snapshot.tasks_history(0).cycle_begin(), snapshot.tasks_history(0).cycle_end()); EXPECT_EQ(1, snapshot.tasks_history_size()); EXPECT_EQ(0, snapshot.tasks_active_size()); // atom EXPECT_EQ(EndoAtomPB::SCOPE_BEGIN, snapshot.tasks_history(0).log(0).type()); EXPECT_EQ(1, snapshot.tasks_history(0).log(0).param()); EXPECT_EQ(EndoAtomPB::EVENT, snapshot.tasks_history(0).log(1).type()); EXPECT_EQ(2, snapshot.tasks_history(0).log(1).param()); EXPECT_EQ(EndoAtomPB::SCOPE_END, snapshot.tasks_history(0).log(2).type()); // thread EXPECT_EQ(snapshot.thread(0).thread_id(), snapshot.tasks_history(0).thread_id()); EXPECT_EQ(1, snapshot.thread_size()); } } // namespace testing } // namespace grpc #endif // GRPC_ENDOSCOPE_PROFILER int main(int argc, char** argv) { grpc_test_init(argc, argv); ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
cb11d2e5ec210b2d51391f8433654805b7d2c73f
083a89f79cf82819847f4028ece2cf0d217b2b70
/src/kpserver/authenticate/LoginManager.cpp
2aab818cfa867f6d1d64647c3ca22b691755c4df
[]
no_license
pyotr777/kportal
5e535cb08e6fd069ef88eaceafe4becbd71d0fc4
c0a6ff5b73234d5ff71d9a886a8ab5e81648018e
refs/heads/master
2020-04-03T22:07:00.453636
2017-02-16T05:28:19
2017-02-16T05:28:19
58,171,266
0
1
null
null
null
null
UTF-8
C++
false
false
1,505
cpp
LoginManager.cpp
#include "LoginManager.hpp" LoginManager::LoginManager() { } LoginManager::~LoginManager() { m_users.clear(); } /* * Add UserInfoObject by loginId */ void LoginManager::addLoginInfo(const std::string loginId, const UserInfoObject userInfo){ boost::unique_lock<boost::mutex> lock(m_lock); m_users.insert(std::pair<std::string, UserInfoObject>(loginId, userInfo)); //std::cout << "Bp: addLoginInfo(): m_users.size() = " << m_users.size() << std::endl; lock.unlock(); m_cond.notify_one(); } /* * Get UserInfoObject by loginId */ UserInfoObject LoginManager::getUserInfo(const std::string loginId) { boost::unique_lock<boost::mutex> lock(m_lock); UserInfoObject uio; map<std::string, UserInfoObject>::iterator it = m_users.find(loginId); if(it != m_users.end()) { lock.unlock(); return m_users[loginId]; } lock.unlock(); return uio; } /* * Remove UserInfoObject by loginId */ bool LoginManager::removeUserInfo(const std::string loginId) { boost::unique_lock<boost::mutex> lock(m_lock); map<std::string, UserInfoObject>::iterator it = m_users.find(loginId); if(it != m_users.end()) { m_users.erase(loginId); } lock.unlock(); } /* void get_request(request<endpoint_type>& value) { boost::unique_lock<boost::mutex> lock(m_lock); while (m_requests.empty()) { m_cond.wait(lock); } value = m_requests.front(); m_requests.pop(); } */
49a5bf1ca793c07fab01c413112c38aff10a5a92
7e503d7a83ac710ed3acbfca8c2048c1e80be0a8
/Tables/include/TStack.h
8c1b4ba31c27e3042f5e424af799bb0d6358a7b6
[]
no_license
pavelkumbrasev/Tables
4aca3eee25d692c397b16bc122dad4bac4410d1c
20827893859eec8d8a70533eb2f738693858a1dc
refs/heads/master
2021-09-14T23:01:28.114839
2018-05-21T18:10:58
2018-05-21T18:10:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
695
h
TStack.h
#pragma once template<class T> class TStack{ private: int size,MaxSize; T *mas; public : TStack(int _MaxSize=100){ if (_MaxSize < 0) throw _MaxSize; size=0; MaxSize=_MaxSize; mas=new T[MaxSize]; } ~TStack(){delete [] mas;} TStack(const TStack &st){ size=st.size; MaxSize=st.MaxSize; mas=new T[MaxSize]; for(int i=0;i<size;i++) mas[i]=st.mas[i]; } bool isEmpty(){return size==0;} bool isFull(){return size==MaxSize;} void push(const T a){ if (isFull()) throw a; mas[size]=a; size++; } T top(){ if (isEmpty()) throw size; return mas[size-1]; } void clear(){size=0;} T pop(){ if (isEmpty()) throw size; size--; return mas[size]; } };
6f475fe7c9343d07ef796a4c67c3e04471f127c1
283984e15f18712a46ae1457a319fbdf6fe037f8
/coin_change.cpp
76071befd94c33ae4d48208f3f8de1f54e99bf3c
[]
no_license
iamfahim/Algorithm-Implementation
ceecb231bcf8b7f79af39d426c64d3aac829e497
90b954bcc14801451bfd3ebbf806228360fdc89e
refs/heads/master
2021-01-25T14:16:57.271155
2019-12-26T17:39:24
2019-12-26T17:39:24
123,679,742
1
0
null
null
null
null
UTF-8
C++
false
false
894
cpp
coin_change.cpp
#include<bits/stdc++.h> using namespace std; int coin[]={5,8,11,15,18}; int make; int dp[6][100]; int call(int i,int amount) { if(i>=5) { if(amount==0) return 1; else return 0; } if(dp[i][amount]!=-1)return dp[i][amount]; int ret1=0,ret2=0; if(amount-coin[i]>=0)ret1=call(i,amount-coin[i]); ret2=call(i+1,amount); return dp[i][amount]=ret1|ret2; } /* jodi coin input diye taka ai coin array ar coin diye banano jay taile 1 return korbe na hole zero return korbe. amar jodi dorkar hoy sorbocchp koyta coin banano jay tahole just ret1+ret2 kor dilei cholbe.*/ int main() { memset(dp,-1,sizeof(dp)); while(cin>>make) { cout<<call(0,make)<<endl; } return 0; } /* stdin copy 100 2 1 0 3 4 5 7 9 10 450 45 23 15 stdout copy 1 0 0 1 0 0 1 0 0 1 0 1 1 1 */
a75b1d3f7b4cc077dd0cc85ed582b3f93af7f74b
c0d9e29c76c6a3c066853a39617409527b71a841
/source/ControlSystem.cpp
4d69643a8412019091706016f59751db0a7de870
[ "MIT" ]
permissive
fneiva2006/rpi-facerec
6c6cf5203398e5a1709c4eb79ee54660b740ae4a
b081f0dea2bf97547e76a490d86db5b70d2e1ba9
refs/heads/master
2022-09-06T11:02:47.407154
2020-05-31T14:37:48
2020-05-31T14:37:48
268,298,359
0
0
null
null
null
null
MacCentralEurope
C++
false
false
14,984
cpp
ControlSystem.cpp
/* File Name: ControlSystem.cpp Author(s): Felipe Neiva Montalv„o Melo and Dennis Hadjivelichkov July 2016 This file corresponds to the "Controller" on the Face Detection & Recognition System. It was developed in an undergraduate academic project at The University of Manchester during the months of July and August 2016. For more information, please consult the documentation file (FaceRecDocumentation.pdf). */ #include "ControlSystem.hpp" #include <string> using namespace std; using namespace cv; extern FrameRate fps_counter; //SystemStructure::SystemStructure() //{ // /* Start camera module */ // cam = new CameraSys(); // if( cam->start(MAIN_WINDOW_WIDTH,MAIN_WINDOW_HEIGHT,30)) // exit(1); // // /* Start Detection module */ // det = new DetectionSys(); // if( det->load_cascades() == 0 ) // cout << "Cascades loaded !" << endl; // else // { // cout << "Program terminating...\n"; exit(2); // } // // /* Initialise DataIO module */ // data = new DataIO(); // /* Load Images */ // data->loadImages(); // // /* Start Recognition module */ // rec = new RecognitionSys(); // /* Create LBP recognition model with the loaded images */ // if(!data->m_images.empty()) // rec->trainLBPH(data->m_images,data->m_numeric_labels); // // /* Initialise UserInterfcae */ // interface = new UserInterface(); // // /* Initialise SpeechHandler */ // speech = new SpeechHandler(); // //} // //SystemStructure::~SystemStructure() //{ // delete det; // delete rec; // delete data; // delete interface; // delete speech; //} ControlSystem::ControlSystem(SystemStructure* System) { m_System = System; cout << "Control System Initialised !" << endl; } int ControlSystem::run() { /* Variables used in the control routine */ int cvkey; vector<Mat> CAface; Mat frame; int sp_cmd; // string name,temp=""; /* ================== Main Control Routine of the program ============== */ for (;;) { /* Get a new frame from camera */ frame = m_System->cam->getFrame(CAM_ROT_ANGLE); /* Processes the captured frame */ m_System->det->processFrame(frame); /* Get the face extracted from the camera */ CAface = m_System->det->getCAimages(); /* If there is a extracted face available, display it on the detected face window */ if(!CAface.empty()) m_System->interface->displayImage(CAFACE_WINDOW_NAME,CAface[0]); fps_counter.count_frame(); /* Update the framerate calculator */ m_System->interface->displayImage(MAIN_WINDOW_NAME,frame); /* Simply captures any key typed */ cvkey = m_System->interface->getWindowKey(); /* Requests speech input of type=3, returns string*/ //sp_cmd = m_System->speech->getCommand(); /* Captured window key treatment */ if ( cvkey > 0) { if(cvkey%256 == 'c') /* Focus on next detected face */ { m_System->det->changeSelection(); } else if(cvkey%256 == 's') /* Save the cropped/aligned image to database */ { fps_counter.stop(); saveProcedure(CAface,frame, string("")); fps_counter.start(1); } else if(cvkey%256 == 'r') /* Recognise the face (try to find the closest match) */ { fps_counter.stop(); recognitionProcedure(CAface); fps_counter.start(1); m_System->interface->displayImage(CLM_WINDOW_NAME, BLACK_FRAME); } else if(cvkey%256 == '\e') /* if esc is pressed the program ends */ { fps_counter.stop(); // Stops the framerate calculator UserInterface::speak("Exiting Program"); // DataIO::output_txt(string("0"), OUT_TXT); return 0; } else if(cvkey%256 == 'l') /* Reloads Images */ { m_System->data->loadImages(); m_System->rec->trainLBPH(m_System->data->m_images, m_System->data->m_numeric_labels); } } /* Speech detection signal treatment */ // else if( sp_cmd > 0) // { // if( sp_cmd%256 == 'c') /* Focus on next detected face */ // { // m_System->det->changeSelection(); // } // else if( sp_cmd%256 == 's') // { // saveProcedure(CAface,frame, string("")); // } // else if(sp_cmd%256 == 'r') // { // recognitionProcedure(CAface); // } // else if(sp_cmd%256 == '\e' || sp_cmd == '&') // { // fps_counter.stop(); // Stops the framerate calculator // DataIO::output_txt(string("0"), OUT_TXT); // return 0; // } // else if(sp_cmd%256 == 'l') // { // m_System->data->loadImages(); // m_System->rec->trainLBPH(m_System->data->m_images, m_System->data->m_numeric_labels); // } // // } } } int ControlSystem::saveProcedure(const vector<Mat>& CAface, Mat frame, const string& name) { string saveFileName = name; cout << endl<<"SAVEFILE NAME " << saveFileName << endl << endl; if(!CAface.empty()) /* Check if any face has been properly detected and cropped */ { if(!saveFileName.empty()) { cout << endl<<"SAVEFILE NAME 2:" << saveFileName << endl << endl; m_System->data->saveImage(saveFileName,CAface[0]);/* save the image*/ m_System->data->loadImages();/* reload the images */ /* Retrain recognition module */ m_System->rec->trainLBPH(m_System->data->m_images,m_System->data->m_numeric_labels); UserInterface::speak("Image saved !"); m_System->interface->win(m_System->cam,"Image saved!\nPress Enter to continue..."); return 1; } /* If the file name was not previously given, start name capture process */ while(saveFileName.empty()) { /* Get name from what user types on main window screen */ if (name==string ("")) saveFileName = m_System->interface->win(m_System->cam ); /* Get name from speech recognition */ //if (name==string ("")) saveFileName = m_System->interface->spwin(m_System->cam, m_System->speech); /* If esc is pressed the saving process is cancelled. Program returns to the main loop (detection) */ if(saveFileName == string("\e")) { UserInterface::speak("Image not saved !"); m_System->interface->win(m_System->cam,"Image not saved!\nPress Enter to continue..."); return 0; } if(!saveFileName.empty()) { cout << endl<<"SAVEFILE NAME 2:" << saveFileName << endl << endl; m_System->data->saveImage(saveFileName,CAface[0]);/* save the image*/ m_System->data->loadImages();/* reload the images */ /* Retrain recognition module */ m_System->rec->trainLBPH(m_System->data->m_images,m_System->data->m_numeric_labels); UserInterface::speak("Image saved !"); m_System->interface->win(m_System->cam,"Image saved!\nPress Enter to continue..."); return 1; } else { cerr << "Error in saveProcedure: Name input is empty.\nPlease enter a name or esc to cancel" << endl; UserInterface::speak("Name input is empty. Please enter a name or esc to cancel"); m_System->interface->win(m_System->cam,"Name input is empty.\nPlease enter a name or esc to cancel.\nPress Enter to continue..."); } } } else { cerr << "Error in saveProcedure: No faces cropped/aligned yet!" << endl; m_System->interface->win(m_System->cam,"No faces cropped/aligned yet!\nPress Enter to continue..."); UserInterface::speak("No faces cropped nor aligned yet!"); } return 0; } void ControlSystem::recognitionProcedure(const vector<Mat>& CAface) { static string guess; static bool known_face; static Mat frame; if(!CAface.empty()) /* Check if any face has been properly detected and cropped */ { if( m_System->rec->trained()) { int predictedIndex; double confidence = m_System->rec->findClosestMatch(CAface[0],predictedIndex); cout << endl << confidence << " confidence, " << predictedIndex << " PREDICTED INDEX" << endl; guess = DataIO::name_from_address(m_System->data->m_addresses[predictedIndex]); known_face = (confidence < THRESHOLD_REC ); /* Check confidence Threshold */ if(known_face) { m_System->interface->displayImage(CLM_WINDOW_NAME,m_System->data->m_images[predictedIndex]); knownFaceProcedure(CAface, guess); return; } else { unknownFaceProcedure(CAface); return; } } else { cerr << "Error in recognitionProcedure: Training Set is empty. Please save any image to database." << endl; UserInterface::speak("Training Set is empty. Please save any image to database."); m_System->interface->win(m_System->cam,"Training Set is empty.\nPlease save any image to database.\nPress Enter to continue..."); } } else { cerr << "Error in recognitionProcedure: No faces cropped nor aligned yet!" << endl; UserInterface::speak("No faces cropped nor aligned yet!"); m_System->interface->win(m_System->cam,"No faces cropped nor aligned yet!\nPress Enter to continue..."); } m_System->interface->displayImage(CLM_WINDOW_NAME, BLACK_FRAME); return; } void ControlSystem::unknownFaceProcedure(const vector<Mat>& CAface) { UserInterface::speak("Unrecognized face. Would you like to register new person?"); int key, sp_in = -1; Mat frame; while(1) { key = m_System->interface->getWindowKey()%256; //sp_in = m_System->speech->getYesNo(); frame = m_System->cam->getFrame(CAM_ROT_ANGLE); if( key == '\e' || key == 'n' || sp_in == '&' || sp_in == 'n') return; if(key == 'y' || sp_in == 'y') { saveProcedure(CAface,frame,string("") ); return; } UserInterface::putFormatedWindowText(frame,"Unrecognized face\nWould you like to register new person?"); m_System->interface->displayImage(MAIN_WINDOW_NAME,frame); } } void ControlSystem::knownFaceProcedure(const vector<Mat>& CAface, string guess) { UserInterface::speak("The recognised face belongs to," + guess); UserInterface::speak("Was my guess correct?"); Mat frame; static int key; int sp_in = -1; // First loop, Expected input Y/N/Q while(1) { //sp_in = m_System->speech->getYesNo(); key = m_System->interface->getWindowKey()%256; if (key == 'n' || sp_in == 'n') { unknownFaceProcedure(CAface); return; } /* Proceed to unknown face if guess is wrong */ if (key == '\e'|| sp_in == '&') return; /* Stop procedure if quit input */ if(key == 'y' || sp_in == 'y') break; /* Continue to saving if correct guess */ frame = m_System->cam->getFrame(CAM_ROT_ANGLE); UserInterface::putFormatedWindowText(frame,"The recognised face belongs to " + guess + "\nWas my guess correct?"); m_System->interface->displayImage(MAIN_WINDOW_NAME,frame); } UserInterface::speak("Would you like to save the new face image ?"); // Second loop, expected input Y/N/Q while(1) { //sp_in = m_System->speech->getYesNo(); key = m_System->interface->getWindowKey()%256; /* Return if input is N or Q */ if(key =='\e'||key=='n'||sp_in == '&'||sp_in == 'n') { return; } frame = m_System->cam->getFrame(CAM_ROT_ANGLE); /* Save if input is Y */ if(key == 'y' || sp_in == 'y') { saveProcedure(CAface,frame, guess) ; /* Requests conversation mode */ //DataIO::output_txt("3"); return; } UserInterface::putFormatedWindowText(frame,"The recognised face belongs to " + guess + ".\nWould you like to save the image ? [y/n]"); m_System->interface->displayImage(MAIN_WINDOW_NAME,frame); } } // //string ControlSystem::inputProcedure(int request, string output_file,string input_file){ // // static bool send_request = true; // string received; // /* requests speech input of type request // 0 - no request, 1 - y/n or q, 2 - name // 3 - command key, 4 - convo mode */ // if(send_request) // { // cout<< endl<<send_request<<" "<<request<<endl; // DataIO::speech_request(request, output_file); // } // // // /* Sends request only once */ // send_request = false; // // /* Input string is not needed for mode 4, // Prefferably should be called via speech_request() */ // if (request==4) return ""; // // received=DataIO::input_txt(input_file); // // /* Debugging - check what it has received */ // if(received != string("No new input")) // cout << endl << "Recieved a \t" << received<< endl << endl; // // /* Returns empty string if error or no new input */ // if (received==string("")) // { // cerr << "Error in function input_txt: Unable to open file "<<input_file<<endl; // return ""; // } // else if (received==string("No new input")) // { // return ""; // } // // /* Clears text from txt file and writes default text // unless dynamically entering name */ // /* If it is ready for a new request changes send_request */ // if (request!=2) // { // cout<<"received1"<<endl; // send_request = true; // DataIO::output_txt("No new input",input_file); // } // /* If entering a name and last char is $, clearing input */ // else if (received[received.size()-1]=='$') // { // cout<<"received2"<<endl; // send_request = true; // DataIO::output_txt("No new input",input_file); // } // else if (received[received.size()-1]=='%') // { // cout<<"received3"<<endl; // send_request = true; // DataIO::output_txt("No new input",input_file); // return "%"; // } // // /* Converts to lowercase */ // received=DataIO::string_to_lowercase(received); // // /* Returns input*/ // return received; //}
875967eddbc4a9e9c538d586e688f25793e8d7c8
3457bdff33ab6c5c892c23fb9bbb40fe990001a8
/Metal Gear/Rock.h
1d6918225e0c8569d3a093686d68be423e7a0015
[]
no_license
bennettl/Metal-Gear
83c46f0b4775feb03f74fbbc8e254923737fb7f5
2296265a510a35b471a9fb84eac0bd000a67e625
refs/heads/master
2020-05-17T16:40:38.647597
2014-08-07T18:08:16
2014-08-07T18:08:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
296
h
Rock.h
#ifndef Rock_h #define Rock_h #include "Object.h" class Rock : public Object{ public: //Constructor Rock(QWidget *parent = 0, Coordinate pos = defaultCoordinate); // Moves the bomb item to its current position (static) virtual void moveObject(); }; #endif
e8db74527e22dbf6c1c972e8eb9c2bfb405bf625
a4464526a36b3aa50144588dbffe3b053bd1dd07
/plugin/src/icu4unity/unity_interface.h
de398cf212aa4b3a176da9d5da9e33a751bce82c
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
chanon/icu4unity
8022702ab2b269c116e1d1b001d842f126478976
7a904f4862b75d794a3b20b7a2f0fcdb00bff795
refs/heads/master
2020-04-01T13:58:40.582937
2018-10-21T08:44:45
2018-10-21T08:44:45
153,275,168
7
0
null
null
null
null
UTF-8
C++
false
false
10,769
h
unity_interface.h
#pragma once // Code in this file is From Unity Technologies NativeRenderingPlugin demo /* The MIT License (MIT) Copyright (c) 2016, Unity Technologies Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // Standard base includes, defines that indicate our current platform, etc. #include <stddef.h> // Which platform we are on? // UNITY_WIN - Windows (regular win32) // UNITY_OSX - Mac OS X // UNITY_LINUX - Linux // UNITY_IPHONE - iOS // UNITY_ANDROID - Android // UNITY_METRO - WSA or UWP // UNITY_WEBGL - WebGL #if _MSC_VER #define UNITY_WIN 1 #elif defined(__APPLE__) #if defined(__arm__) || defined(__arm64__) #define UNITY_IPHONE 1 #else #define UNITY_OSX 1 #endif #elif defined(UNITY_METRO) || defined(UNITY_ANDROID) || defined(UNITY_LINUX) || defined(UNITY_WEBGL) // these are defined externally #elif defined(__EMSCRIPTEN__) // this is already defined in Unity 5.6 #define UNITY_WEBGL 1 #else #error "Unknown platform!" #endif // COM-like Release macro #ifndef SAFE_RELEASE #define SAFE_RELEASE(a) if (a) { a->Release(); a = NULL; } #endif #pragma once // Unity native plugin API // Compatible with C99 #if defined(__CYGWIN32__) #define UNITY_INTERFACE_API __stdcall #define UNITY_INTERFACE_EXPORT __declspec(dllexport) #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WINAPI_FAMILY) #define UNITY_INTERFACE_API __stdcall #define UNITY_INTERFACE_EXPORT __declspec(dllexport) #elif defined(__MACH__) || defined(__ANDROID__) || defined(__linux__) #define UNITY_INTERFACE_API #define UNITY_INTERFACE_EXPORT __attribute__ ((visibility ("default"))) #else #define UNITY_INTERFACE_API #define UNITY_INTERFACE_EXPORT __attribute__ ((visibility ("default"))) #endif #define UNITY_EXPORT UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // IUnityInterface is a registry of interfaces we choose to expose to plugins. // // USAGE: // --------- // To retrieve an interface a user can do the following from a plugin, assuming they have the header file for the interface: // // IMyInterface * ptr = registry->Get<IMyInterface>(); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Unity Interface GUID // Ensures global uniqueness. // // Template specialization is used to produce a means of looking up a GUID from its interface type at compile time. // The net result should compile down to passing around the GUID. // // UNITY_REGISTER_INTERFACE_GUID should be placed in the header file of any interface definition outside of all namespaces. // The interface structure and the registration GUID are all that is required to expose the interface to other systems. struct UnityInterfaceGUID { #ifdef __cplusplus UnityInterfaceGUID(unsigned long long high, unsigned long long low) : m_GUIDHigh(high) , m_GUIDLow(low) { } UnityInterfaceGUID(const UnityInterfaceGUID& other) { m_GUIDHigh = other.m_GUIDHigh; m_GUIDLow = other.m_GUIDLow; } UnityInterfaceGUID& operator=(const UnityInterfaceGUID& other) { m_GUIDHigh = other.m_GUIDHigh; m_GUIDLow = other.m_GUIDLow; return *this; } bool Equals(const UnityInterfaceGUID& other) const { return m_GUIDHigh == other.m_GUIDHigh && m_GUIDLow == other.m_GUIDLow; } bool LessThan(const UnityInterfaceGUID& other) const { return m_GUIDHigh < other.m_GUIDHigh || (m_GUIDHigh == other.m_GUIDHigh && m_GUIDLow < other.m_GUIDLow); } #endif unsigned long long m_GUIDHigh; unsigned long long m_GUIDLow; }; #ifdef __cplusplus inline bool operator==(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return left.Equals(right); } inline bool operator!=(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return !left.Equals(right); } inline bool operator<(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return left.LessThan(right); } inline bool operator>(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return right.LessThan(left); } inline bool operator>=(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return !operator<(left, right); } inline bool operator<=(const UnityInterfaceGUID& left, const UnityInterfaceGUID& right) { return !operator>(left, right); } #else typedef struct UnityInterfaceGUID UnityInterfaceGUID; #endif #ifdef __cplusplus #define UNITY_DECLARE_INTERFACE(NAME) \ struct NAME : IUnityInterface // Generic version of GetUnityInterfaceGUID to allow us to specialize it // per interface below. The generic version has no actual implementation // on purpose. // // If you get errors about return values related to this method then // you have forgotten to include UNITY_REGISTER_INTERFACE_GUID with // your interface, or it is not visible at some point when you are // trying to retrieve or add an interface. template<typename TYPE> inline const UnityInterfaceGUID GetUnityInterfaceGUID(); // This is the macro you provide in your public interface header // outside of a namespace to allow us to map between type and GUID // without the user having to worry about it when attempting to // add or retrieve and interface from the registry. #define UNITY_REGISTER_INTERFACE_GUID(HASHH, HASHL, TYPE) \ template<> \ inline const UnityInterfaceGUID GetUnityInterfaceGUID<TYPE>() \ { \ return UnityInterfaceGUID(HASHH,HASHL); \ } // Same as UNITY_REGISTER_INTERFACE_GUID but allows the interface to live in // a particular namespace. As long as the namespace is visible at the time you call // GetUnityInterfaceGUID< INTERFACETYPE >() or you explicitly qualify it in the template // calls this will work fine, only the macro here needs to have the additional parameter #define UNITY_REGISTER_INTERFACE_GUID_IN_NAMESPACE(HASHH, HASHL, TYPE, NAMESPACE) \ const UnityInterfaceGUID TYPE##_GUID(HASHH, HASHL); \ template<> \ inline const UnityInterfaceGUID GetUnityInterfaceGUID< NAMESPACE :: TYPE >() \ { \ return UnityInterfaceGUID(HASHH,HASHL); \ } // These macros allow for C compatibility in user code. #define UNITY_GET_INTERFACE_GUID(TYPE) GetUnityInterfaceGUID< TYPE >() #else #define UNITY_DECLARE_INTERFACE(NAME) \ typedef struct NAME NAME; \ struct NAME // NOTE: This has the downside that one some compilers it will not get stripped from all compilation units that // can see a header containing this constant. However, it's only for C compatibility and thus should have // minimal impact. #define UNITY_REGISTER_INTERFACE_GUID(HASHH, HASHL, TYPE) \ const UnityInterfaceGUID TYPE##_GUID = {HASHH, HASHL}; // In general namespaces are going to be a problem for C code any interfaces we expose in a namespace are // not going to be usable from C. #define UNITY_REGISTER_INTERFACE_GUID_IN_NAMESPACE(HASHH, HASHL, TYPE, NAMESPACE) // These macros allow for C compatibility in user code. #define UNITY_GET_INTERFACE_GUID(TYPE) TYPE##_GUID #endif // Using this in user code rather than INTERFACES->Get<TYPE>() will be C compatible for those places in plugins where // this may be needed. Unity code itself does not need this. #define UNITY_GET_INTERFACE(INTERFACES, TYPE) (TYPE*)INTERFACES->GetInterfaceSplit (UNITY_GET_INTERFACE_GUID(TYPE).m_GUIDHigh, UNITY_GET_INTERFACE_GUID(TYPE).m_GUIDLow); #ifdef __cplusplus struct IUnityInterface { }; #else typedef void IUnityInterface; #endif typedef struct IUnityInterfaces { // Returns an interface matching the guid. // Returns nullptr if the given interface is unavailable in the active Unity runtime. IUnityInterface* (UNITY_INTERFACE_API * GetInterface)(UnityInterfaceGUID guid); // Registers a new interface. void(UNITY_INTERFACE_API * RegisterInterface)(UnityInterfaceGUID guid, IUnityInterface * ptr); // Split APIs for C IUnityInterface* (UNITY_INTERFACE_API * GetInterfaceSplit)(unsigned long long guidHigh, unsigned long long guidLow); void(UNITY_INTERFACE_API * RegisterInterfaceSplit)(unsigned long long guidHigh, unsigned long long guidLow, IUnityInterface * ptr); #ifdef __cplusplus // Helper for GetInterface. template<typename INTERFACE> INTERFACE* Get() { return static_cast<INTERFACE*>(GetInterface(GetUnityInterfaceGUID<INTERFACE>())); } // Helper for RegisterInterface. template<typename INTERFACE> void Register(IUnityInterface* ptr) { RegisterInterface(GetUnityInterfaceGUID<INTERFACE>(), ptr); } #endif } IUnityInterfaces; #ifdef __cplusplus extern "C" { #endif // If exported by a plugin, this function will be called when the plugin is loaded. void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginLoad(IUnityInterfaces* unityInterfaces); // If exported by a plugin, this function will be called when the plugin is about to be unloaded. void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginUnload(); #ifdef __cplusplus } #endif
fcbb694f9cf4262fafeb59fd5cba7d2770433852
fbe2cbeb947664ba278ba30ce713810676a2c412
/iptv_root/iptv_media3/IMediaStreaming.h
1d888ecf54b4598a6ce8a8fc8ba633c111ff4fbd
[]
no_license
abhipr1/multitv
0b3b863bfb61b83c30053b15688b070d4149ca0b
6a93bf9122ddbcc1971dead3ab3be8faea5e53d8
refs/heads/master
2020-12-24T15:13:44.511555
2009-06-04T17:11:02
2009-06-04T17:11:02
41,107,043
0
0
null
null
null
null
UTF-8
C++
false
false
2,259
h
IMediaStreaming.h
#ifndef IMEDIA_H #define IMEDIA_H #include "CBufferMedia.h" #include "Media_const.h" #include "Data_reg.h" #include "ithread.h" #include "CThreadSafeDeque.h" class IMediaApi { protected: BOOL m_bInit; public: IMediaApi() {m_bInit = FALSE; } virtual ~IMediaApi() {} }; class IMediaObjectApi { protected: BOOL m_bInit; public: IMediaObjectApi() {m_bInit = FALSE; } virtual ~IMediaObjectApi() {} virtual ULONG GetApiInterface(IMediaApi **_ppMediaApi) = 0; }; class IThread; class Decoder; class IMediaStreaming { protected: BOOL m_bInit, m_bWaitingData, m_bMediaPlaying; ULONG m_ulFramesDropped, m_ulFramesProcessed, m_ulCurTimestamp, m_ulLastLoadMediaTime; _SEMAPHORE m_PlaySemaph, m_TimeElapsedSemaph; MediaSpec m_MediaSpec; CBufferMedia *m_pMediaSource; IThread *m_pThread; ULONG SetLoadMediaTime(); public: IMediaStreaming(CBufferMedia *_pMediaSource); virtual ~IMediaStreaming(); virtual ULONG PrepareFrame()= 0; virtual ULONG SyncStreaming(ULONG _ulCurTime, IMediaStreaming *_pOtherMedia) = 0; ULONG SetDecoder(Decoder *_pDecoder); ULONG SetPacket(BYTE *_buf, ULONG _bufSize, MediaSpec _mediaSpec); BOOL EncodedFrameReady(); BOOL DecodedFrameReady(); BOOL InputBufferFull(); ULONG DropNextFrame(); ULONG GetTimeSinceLastLoadedFrame(ULONG *_pulElapsedTime); ULONG Play(ThreadFunction _pFunc, void *_pCtx); ULONG Stop(); ULONG StopWaitingData(); ULONG WaitData(); MediaSpec GetMediaSpec() {return m_MediaSpec; } ULONG GetFramesProcessed() {return m_ulFramesProcessed; } ULONG GetFramesDropped() {return m_ulFramesDropped; } ULONG GetMediaTimestamp() {return m_ulCurTimestamp; } BOOL WaitingData() {return m_bWaitingData; } BOOL MediaPlaying() {return m_bMediaPlaying; } void SetMediaTimestamp(ULONG _ulTimestamp) {m_ulCurTimestamp = _ulTimestamp;} }; #endif
fc4c2a8a9c42acac4bb41675da2093393ddbc15b
fcd588e6f24a0578b82da8d59a760a6b25e9403f
/libSLR/Core/medium_object.cpp
46e29eec26c3a26e0185f9e75477693ddae6cf06
[]
no_license
PeterZs/SLR
6337b8213aaa946728877ffdb7ff8c883a7cc9de
53ca7a57d52f74d26b897eec8a6d646feff513a8
refs/heads/master
2020-04-19T14:53:51.896447
2018-12-23T07:48:49
2018-12-23T07:48:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
18,448
cpp
medium_object.cpp
// // medium_object.cpp // // Created by 渡部 心 on 2016/09/19. // Copyright (c) 2016年 渡部 心. All rights reserved. // #include "medium_object.h" #include "../MemoryAllocators/ArenaAllocator.h" #include "distributions.h" #include "surface_object.h" #include "light_path_sampler.h" #include "textures.h" #include "medium_material.h" #include "../Accelerator/StandardBVH.h" #include "../Accelerator/SBVH.h" #include "../Accelerator/QBVH.h" #include "../Scene/Scene.h" namespace SLR { SampledSpectrum VolumetricLight::sample(const LightPosQuery &query, const VolumetricLightPosSample &smp, VolumetricLightPosQueryResult* result) const { return m_obj->sample(m_appliedTransform, query, smp, result); } void VolumetricLight::sampleRay(const LightPosQuery &lightPosQuery, const VolumetricLightPosSample &lightPosSample, const EDFQuery &edfQuery, const EDFSample &edfSample, ArenaAllocator &mem, VolumetricLightPosQueryResult* lightPosResult, SampledSpectrum* Le0, EDF** edf, EDFQueryResult* edfResult, SampledSpectrum* Le1, Ray* ray, float* epsilon) const { m_obj->sampleRay(m_appliedTransform, lightPosQuery, lightPosSample, edfQuery, edfSample, mem, lightPosResult, Le0, edf, edfResult, Le1, ray, epsilon); } SampledSpectrum VolumetricLight::sample(const LightPosQuery &query, LightPathSampler &pathSampler, ArenaAllocator &mem, LightPosQueryResult** lpResult) const { VolumetricLightPosQueryResult* result = mem.create<VolumetricLightPosQueryResult>(); SampledSpectrum ret = sample(query, pathSampler.getVolumetricLightPosSample(), result); *lpResult = result; return ret; } void VolumetricLight::sampleRay(const LightPosQuery &lightPosQuery, LightPathSampler &pathSampler, const EDFQuery &edfQuery, ArenaAllocator &mem, LightPosQueryResult** lightPosResult, SampledSpectrum* Le0, EDF** edf, EDFQueryResult* edfResult, SampledSpectrum* Le1, Ray* ray, float* epsilon) const { *lightPosResult = mem.create<VolumetricLightPosQueryResult>(); sampleRay(lightPosQuery, pathSampler.getVolumetricLightPosSample(), edfQuery, pathSampler.getEDFSample(), mem, (VolumetricLightPosQueryResult*)*lightPosResult, Le0, edf, edfResult, Le1, ray, epsilon); } bool SingleMediumObject::isEmitting() const { return m_material->isEmitting(); } float SingleMediumObject::importance() const { return 1.0f; } void SingleMediumObject::selectLight(float u, float time, VolumetricLight* light, float* prob) const { light->setObject(this); *prob = 1.0f; } SampledSpectrum SingleMediumObject::sample(const StaticTransform &transform, const LightPosQuery &query, const VolumetricLightPosSample &smp, VolumetricLightPosQueryResult* result) const { SLRAssert_NotImplemented(); return SampledSpectrum::Zero; } void SingleMediumObject::sampleRay(const StaticTransform &transform, const LightPosQuery &lightPosQuery, const VolumetricLightPosSample &lightPosSample, const EDFQuery &edfQuery, const EDFSample &edfSample, ArenaAllocator &mem, VolumetricLightPosQueryResult* lightPosResult, SampledSpectrum* Le0, SLR::EDF** edf, EDFQueryResult* edfResult, SampledSpectrum* Le1, Ray* ray, float* epsilon) const { SLRAssert_NotImplemented(); } bool SingleMediumObject::interact(const Ray &ray, const RaySegment &segment, const WavelengthSamples &wls, LightPathSampler &pathSampler, MediumInteraction* mi, SampledSpectrum* medThroughput, bool* singleWavelength) const { if (!m_medium->interact(ray, segment, wls, pathSampler, mi, medThroughput, singleWavelength)) return false; mi->setObject(this); mi->setLightProb(isEmitting() ? 1.0f : 0.0f); return true; } SampledSpectrum SingleMediumObject::evaluateTransmittance(const Ray &ray, const RaySegment &segment, const WavelengthSamples &wls, LightPathSampler &pathSampler, bool* singleWavelength) const { return m_medium->evaluateTransmittance(ray, segment, wls, pathSampler, singleWavelength); } void SingleMediumObject::calculateMediumPoint(const MediumInteraction &mi, MediumPoint* medPt) const { m_medium->calculateMediumPoint(mi, medPt); medPt->setObject(this); medPt->applyTransform(mi.getAppliedTransform()); } SampledSpectrum SingleMediumObject::evaluateExtinctionCoefficient(const MediumPoint &medPt, const WavelengthSamples &wls) const { float u, v, w; medPt.getMediumParameter(&u, &v, &w); return m_medium->evaluateExtinctionCoefficient(Point3D(u, v, w), wls); } AbstractBDF* SingleMediumObject::createAbstractBDF(const MediumPoint &medPt, const WavelengthSamples &wls, ArenaAllocator &mem) const { PhaseFunction* pf = m_material->getPhaseFunction(medPt, wls, mem); float u, v, w; medPt.getMediumParameter(&u, &v, &w); SampledSpectrum albedo = m_medium->evaluateAlbedo(Point3D(u, v, w), wls); return mem.create<VolumetricBSDF>(albedo, pf); } BoundingBox3D TransformedMediumObject::bounds() const { return m_transform->motionBounds(m_medObj->bounds()); } bool TransformedMediumObject::isEmitting() const { return m_medObj->isEmitting(); } float TransformedMediumObject::importance() const { return m_medObj->importance(); } void TransformedMediumObject::selectLight(float u, float time, VolumetricLight* light, float* prob) const { m_medObj->selectLight(u, time, light, prob); StaticTransform tf; m_transform->sample(time, &tf); light->applyTransformFromLeft(tf); } bool TransformedMediumObject::contains(const Point3D &p, float time) const { StaticTransform tf; m_transform->sample(time, &tf); Point3D localP = invert(tf) * p; return m_medObj->contains(localP, time); } bool TransformedMediumObject::intersectBoundary(const Ray &ray, const RaySegment &segment, float* distToBoundary, bool* enter) const { StaticTransform tf; m_transform->sample(ray.time, &tf); Ray localRay = invert(tf) * ray; return m_medObj->intersectBoundary(localRay, segment, distToBoundary, enter); } bool TransformedMediumObject::interact(const Ray &ray, const RaySegment &segment, const WavelengthSamples &wls, LightPathSampler &pathSampler, MediumInteraction* mi, SampledSpectrum* medThroughput, bool* singleWavelength) const { StaticTransform tf; m_transform->sample(ray.time, &tf); Ray localRay = invert(tf) * ray; bool hit = m_medObj->interact(localRay, segment, wls, pathSampler, mi, medThroughput, singleWavelength); if (hit) mi->applyTransformFromLeft(tf); return hit; } SampledSpectrum TransformedMediumObject::evaluateTransmittance(const Ray &ray, const RaySegment &segment, const WavelengthSamples &wls, LightPathSampler &pathSampler, bool* singleWavelength) const { StaticTransform tf; m_transform->sample(ray.time, &tf); Ray localRay = invert(tf) * ray; SampledSpectrum ret = m_medObj->evaluateTransmittance(localRay, segment, wls, pathSampler, singleWavelength); return ret; } BoundingBox3D EnclosedMediumObject::bounds() const { return intersection(m_boundary->bounds(), m_medToSurfTF * m_medObj->bounds()); } bool EnclosedMediumObject::contains(const Point3D &p, float time) const { if (!m_medObj->contains(p, time)) return false; Point3D pInSurf = m_medToSurfTF * p; return m_boundary->contains(pInSurf, time); } bool EnclosedMediumObject::intersectBoundary(const Ray &ray, const RaySegment &segment, float* distToBoundary, bool* enter) const { SurfaceInteraction si; Ray r = m_medToSurfTF * ray; bool hit = m_boundary->intersectWithoutAlpha(r, segment, &si); if (!hit) return false; float distToSurf = si.getDistance(); bool enterToSurf = dot(si.getGeometricNormal(), r.dir) < 0.0f; float distToRawMed; bool enterToRawMed; hit = m_medObj->intersectBoundary(ray, segment, &distToRawMed, &enterToRawMed); if (!hit) return false; if (enterToSurf && enterToRawMed) { *distToBoundary = std::max(distToSurf, distToRawMed); *enter = true; } else if (enterToSurf && !enterToRawMed) { *distToBoundary = std::min(distToSurf, distToRawMed); *enter = true; } else if (!enterToSurf && enterToRawMed) { *distToBoundary = std::min(distToSurf, distToRawMed); *enter = true; } else { *distToBoundary = std::min(distToSurf, distToRawMed); *enter = false; } return true; } bool EnclosedMediumObject::interact(const Ray &ray, const RaySegment &segment, const WavelengthSamples &wls, LightPathSampler &pathSampler, MediumInteraction* mi, SampledSpectrum* medThroughput, bool* singleWavelength) const { return m_medObj->interact(ray, segment, wls, pathSampler, mi, medThroughput, singleWavelength); } SampledSpectrum EnclosedMediumObject::evaluateTransmittance(const Ray &ray, const RaySegment &segment, const WavelengthSamples &wls, LightPathSampler &pathSampler, bool* singleWavelength) const { return m_medObj->evaluateTransmittance(ray, segment, wls, pathSampler, singleWavelength); } MediumObjectAggregate::MediumObjectAggregate(const std::vector<MediumObject*> &objs) { BoundingBox3D bbox; for (int i = 0; i < objs.size(); ++i) bbox.unify(objs[i]->bounds()); m_bounds = bbox; for (int i = 0; i < objs.size(); ++i) m_objLists.push_back(objs[i]); std::vector<uint32_t> lightIndices; std::vector<float> lightImportances; for (int i = 0; i < objs.size(); ++i) { const MediumObject* obj = objs[i]; if (obj->isEmitting()) { lightIndices.push_back(i); lightImportances.push_back(obj->importance()); } } m_numLights = (uint32_t)lightImportances.size(); m_lightList = new const MediumObject*[m_numLights]; m_lightDist1D = new DiscreteDistribution1D(lightImportances); for (int i = 0; i < m_numLights; ++i) { uint32_t objIdx = lightIndices[i]; const MediumObject* light = objs[objIdx]; m_lightList[i] = light; m_objToLightMap[light] = i; } } MediumObjectAggregate::~MediumObjectAggregate() { delete m_lightDist1D; delete[] m_lightList; } BoundingBox3D MediumObjectAggregate::bounds() const { return m_bounds; } bool MediumObjectAggregate::isEmitting() const { return m_numLights > 0; } float MediumObjectAggregate::importance() const { return m_lightDist1D->integral(); } void MediumObjectAggregate::selectLight(float u, float time, VolumetricLight* light, float* prob) const { uint32_t lIdx = m_lightDist1D->sample(u, prob, &u); const MediumObject* obj = m_lightList[lIdx]; float cProb; obj->selectLight(u, time, light, &cProb); *prob *= cProb; } // TODO: consider overlap volumes, nesting volumes, numerical precision (e.g. volumes that their boundaries are very close each other). bool MediumObjectAggregate::interact(const Ray &ray, const RaySegment &segment, const WavelengthSamples &wls, LightPathSampler &pathSampler, MediumInteraction* mi, SampledSpectrum* medThroughput, bool* singleWavelength) const { *medThroughput = SampledSpectrum::One; *singleWavelength = false; RaySegment isectRange = segment; Point3D currentPoint = ray.org + isectRange.distMin * ray.dir; // The following process is logically the same as: // curMedia = m_accelerator->queryCurrentMedia(currentPoint); const MediumObject* curMedium = nullptr; for (int i = 0; i < m_objLists.size(); ++i) { if (m_objLists[i]->contains(currentPoint, ray.time)) curMedium = m_objLists[i]; } while (true) { const MediumObject* nextMedium = nullptr; float distToNextBoundary = INFINITY; // The following process is logically the same as: // nextMedium = m_accelerator->queryNextMedia(ray, &distToNextBoundary); for (int i = 0; i < m_objLists.size(); ++i) { float distToBoundary = INFINITY; bool enter; if (m_objLists[i]->intersectBoundary(ray, isectRange, &distToBoundary, &enter)) { if (distToBoundary < distToNextBoundary) { distToNextBoundary = distToBoundary; nextMedium = enter ? m_objLists[i] : nullptr; } } } if (curMedium && nextMedium) curMedium = nullptr; distToNextBoundary = std::min(distToNextBoundary, segment.distMax); if (std::isinf(distToNextBoundary)) return false; bool hit = false; if (curMedium) { SampledSpectrum curMedThroughput; bool curSingleWavelength; hit = curMedium->interact(ray, RaySegment(isectRange.distMin, distToNextBoundary), wls, pathSampler, mi, &curMedThroughput, &curSingleWavelength); *medThroughput *= curMedThroughput; *singleWavelength |= curSingleWavelength; } if (hit) { if (m_objToLightMap.count(curMedium) > 0) { uint32_t lightIdx = m_objToLightMap.at(curMedium); mi->setLightProb(m_lightDist1D->evaluatePMF(lightIdx) * mi->getLightProb()); } return true; } if (distToNextBoundary == segment.distMax) return false; isectRange.distMin = distToNextBoundary * (1.0f + Ray::Epsilon); curMedium = nextMedium; } SLRAssert(false, "This code path should never be executed."); return true; } SampledSpectrum MediumObjectAggregate::evaluateTransmittance(const Ray &ray, const RaySegment &segment, const WavelengthSamples &wls, LightPathSampler &pathSampler, bool* singleWavelength) const { SampledSpectrum transmittance = SampledSpectrum::One; *singleWavelength = false; RaySegment isectRange = segment; Point3D currentPoint = ray.org + isectRange.distMin * ray.dir; // The following process is logically the same as: // curMedia = m_accelerator->queryCurrentMedia(currentPoint); const MediumObject* curMedium = nullptr; for (int i = 0; i < m_objLists.size(); ++i) { if (m_objLists[i]->contains(currentPoint, ray.time)) curMedium = m_objLists[i]; } while (true) { const MediumObject* nextMedium = nullptr; float distToNextBoundary = INFINITY; // The following process is logically the same as: // nextMedium = m_accelerator->queryNextMedia(ray, &distToNextBoundary); for (int i = 0; i < m_objLists.size(); ++i) { float distToBoundary = INFINITY; bool enter; if (m_objLists[i]->intersectBoundary(ray, isectRange, &distToBoundary, &enter)) { if (distToBoundary < distToNextBoundary) { distToNextBoundary = distToBoundary; nextMedium = enter ? m_objLists[i] : nullptr; } } } if (curMedium && nextMedium) curMedium = nullptr; distToNextBoundary = std::min(distToNextBoundary, segment.distMax); if (std::isinf(distToNextBoundary)) return transmittance; if (curMedium) { SampledSpectrum curTransmittance; bool curSingleWavelength; curTransmittance = curMedium->evaluateTransmittance(ray, RaySegment(isectRange.distMin, distToNextBoundary), wls, pathSampler, &curSingleWavelength); transmittance *= curTransmittance; *singleWavelength |= curSingleWavelength; } if (distToNextBoundary == segment.distMax) break; isectRange.distMin = distToNextBoundary * (1.0f + Ray::Epsilon); curMedium = nextMedium; } return transmittance; } }
e97254129b20c53e5b28cfccdfc181cf8ce33bfe
482ec3480e8418dda62f85a5359e70c89256f1a8
/cpp/CPP_NEW/helper_classes/CStrLen.hpp
eca1f15475ebbec0249f29c507e29635426c2141
[]
no_license
rajatgirotra/study
84d319968f31f78798a56362546f21d22abd7ae7
acbb6d21a8182feabcb3329e17c76ac3af375255
refs/heads/master
2023-09-01T20:48:31.137541
2023-08-29T01:41:17
2023-08-29T01:41:17
85,041,241
6
1
null
2023-05-01T19:25:38
2017-03-15T07:17:24
C++
UTF-8
C++
false
false
1,137
hpp
CStrLen.hpp
#pragma once #include <cstdint> #include <fstream> #include <string> #include <type_traits> namespace util { #define STRLEN(s) ( ( (sizeof ( s ) ) / ( sizeof ( char ) ) ) - 1) #define CSL(s) (s), (static_cast<int>(STRLEN(s))) #define CSLO(s) CStrLen(CSL(s)) class CStrLen { private: const char* m_s {nullptr}; std::size_t m_len {0}; public: // for string literals and character pointers. CStrLen(const char*, int = -1) noexcept; // for std::string template <typename T, typename std::enable_if_t<std::is_same_v<const char*, decltype(std::declval<const T>().data())>>* = nullptr> explicit CStrLen(const T& arg) noexcept : m_s(arg.c_str()), m_len(arg.size()) { } // for arrays template <std::size_t N> explicit CStrLen(const char (&arr)[N]) : m_s(arr), m_len(N-1) { } explicit operator const char* () const noexcept { return m_s; } explicit operator bool() const noexcept { return m_s != nullptr; } friend std::ostream& operator << (std::ostream& os, const CStrLen& rhs) noexcept; }; }
d2b74da3ba34711732a9e5eaff82239361f49979
93a89acb8dfc02de05837556132b27628abde83c
/vpu-hal2/dl/inference-engine/src/vpu/graph_transformer/stages/detection_output.cpp
41b0e0891bb83c4d706499ec14419d737d6221f6
[ "Intel", "Apache-2.0" ]
permissive
leon1205/nn-hal
ef1b8c3fd5b2e0cbc96df44cb6206b7917c59d53
f6c23e001c690cb32ce8392825e000ae631cf5fc
refs/heads/master
2020-03-24T10:03:32.377936
2018-07-06T15:45:19
2018-07-06T15:45:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,913
cpp
detection_output.cpp
// // INTEL CONFIDENTIAL // Copyright 2017-2018 Intel Corporation. // // The source code contained or described herein and all documents // related to the source code ("Material") are owned by Intel Corporation // or its suppliers or licensors. Title to the Material remains with // Intel Corporation or its suppliers and licensors. The Material may // contain trade secrets and proprietary and confidential information // of Intel Corporation and its suppliers and licensors, and is protected // by worldwide copyright and trade secret laws and treaty provisions. // No part of the Material may be used, copied, reproduced, modified, // published, uploaded, posted, transmitted, distributed, or disclosed // in any way without Intel's prior express written permission. // // No license under any patent, copyright, trade secret or other // intellectual property right is granted to or conferred upon you by // disclosure or delivery of the Materials, either expressly, by implication, // inducement, estoppel or otherwise. Any license under such intellectual // property rights must be express and approved by Intel in writing. // // Include any supplier copyright notices as supplier requires Intel to use. // // Include supplier trademarks or logos as supplier requires Intel to use, // preceded by an asterisk. An asterisked footnote can be added as follows: // *Third Party trademarks are the property of their respective owners. // // Unless otherwise agreed by Intel in writing, you may not remove or alter // this notice or any other notice embedded in Materials by Intel or Intel's // suppliers or licensors in any way. // #include "graph_transformer_impl.hpp" #include <vector> #include <string> namespace { enum PriorBox_CodeType { CORNER = 1, CENTER_SIZE, CORNER_SIZE }; } // namespace void VpuDetectionOutputStage::dumpToDot(std::ostream& os) { os << "num_classes=" << params.num_classes << "\\n" << "share_location=" << params.share_location << "\\n" << "background_label_id=" << params.background_label_id << "\\n" << "nms_threshold=" << params.nms_threshold << "\\n" << "top_k=" << params.top_k << "\\n" << "code_type=" << params.code_type << "\\n" << "keep_top_k=" << params.keep_top_k << "\\n" << "confidence_threshold=" << params.confidence_threshold << "\\n" << "variance_encoded_in_target=" << params.variance_encoded_in_target << "\\n" << "eta=" << params.eta << "\\n" << "num_priors=" << params.num_priors; } void VpuDetectionOutputStage::dumpToBlob(BlobWriter& writer) { writer.write(params); inputs[0]->dumpToBlob(writer); inputs[1]->dumpToBlob(writer); inputs[2]->dumpToBlob(writer); outputs[0]->dumpToBlob(writer); } void GraphTransformerImpl::parseDetectionOutput(const CNNLayerPtr& layer, const std::vector<VpuDataHandle>& inputs, const std::vector<VpuDataHandle>& outputs) { assert(inputs.size() == 3); assert(outputs.size() == 1); DetectionOutputParams detParams; detParams.num_classes = layer->GetParamAsInt("num_classes", 0); detParams.share_location = layer->GetParamAsInt("share_location", 1); detParams.background_label_id = layer->GetParamAsInt("background_label_id", 0); detParams.nms_threshold = layer->GetParamAsFloat("nms_threshold", 0); detParams.top_k = layer->GetParamAsInt("top_k", 0); { auto code_type_str = layer->GetParamAsString("code_type", "caffe.PriorBoxParameter.CENTER_SIZE"); if (code_type_str.find("CORNER") != std::string::npos) { detParams.code_type = CORNER; } else if (code_type_str.find("CENTER_SIZE") != std::string::npos) { detParams.code_type = CENTER_SIZE; } else if (code_type_str.find("CORNER_SIZE") != std::string::npos) { detParams.code_type = CORNER_SIZE; } else { THROW_IE_EXCEPTION << "[VPU] Unknown code_type " << code_type_str << " for DetectionOutput layer " << layer->name; } } detParams.keep_top_k = layer->GetParamAsInt("keep_top_k", 0); detParams.confidence_threshold = layer->GetParamAsFloat("confidence_threshold", 0); detParams.variance_encoded_in_target = layer->GetParamAsInt("variance_encoded_in_target", 0); detParams.eta = layer->GetParamAsFloat("eta", 0); { auto prior = layer->insData[2].lock(); assert(prior != nullptr); // Each prior consists of 4 values. detParams.num_priors = prior->dims[0] / 4; } addNewStage<VpuDetectionOutputStage>( layer->name, kDetectionOutput, layer, [detParams](VpuDetectionOutputStage* stage) { stage->params = detParams; stage->requiredOutputOrder[0] = stage->outputs[0]->order; }, inputs, outputs); }
0d764077ff62871690b319371eb9e278266b9b7d
aba765c5993b8d1074622441089a55a1610ce18e
/src/trident/iterators/arrayitr.cpp
6e2bf88c980b3d4821cd04cca959f9f536b0082a
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
karmaresearch/trident
cbf3dfa7d81c93ac40c76782564d0e453f605fa3
621ed49c648c811d5f69617833539f419766d3be
refs/heads/master
2023-08-03T23:09:38.295697
2023-07-19T07:21:15
2023-07-19T07:21:15
97,223,343
23
9
Apache-2.0
2021-09-30T09:04:25
2017-07-14T10:40:40
C++
UTF-8
C++
false
false
6,035
cpp
arrayitr.cpp
/* * Copyright 2017 Jacopo Urbani * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. **/ #include <trident/iterators/arrayitr.h> #include <assert.h> #include <iostream> using namespace std; bool ArrayItr::hasNext() { if (hasNextChecked) { return n; } if (ignSecondColumn) { //Is there a new first term? bool found = false; while (pos < nElements) { if (array->at(pos).first != v1) { found = true; break; } pos++; } if (found) { n = true; } else { n = false; } hasNextChecked = true; } if (constraint1 == -1) { n = pos < nElements; } else { // Check whether the elements in pos1 and pos2 satisfy the // constraints if (pos == nElements || array->at(pos).first != constraint1 || (constraint2 != -1 && array->at(pos).second != constraint2)) { n = false; } else { n = true; } } hasNextChecked = true; return n; } int64_t ArrayItr::getCount() { if (!ignSecondColumn) { throw 10; } if (countElems == 0) { countElems = 1; //Pos points to the next element than the current one. This is //because this method is called after next() while ((pos) < nElements && array->at(pos).first == array->at(pos - 1).first) { pos++; countElems++; } } return countElems; } void ArrayItr::next() { v1 = (int64_t)(array->at(pos).first); v2 = (int64_t)(array->at(pos).second); pos++; hasNextChecked = false; countElems = 0; } void ArrayItr::clear() { array = NULL; } void ArrayItr::mark() { markPos = pos; } void ArrayItr::reset(const char i) { pos = markPos; hasNextChecked = false; } void ArrayItr::moveto(const int64_t c1, const int64_t c2) { assert(v1 != -1); assert(ignSecondColumn || v2 != -1); if (v1 >= c1 && (ignSecondColumn || v1 > c1 || v2 >= c2)) { // Position is backwards. pos--; //so that hasNext will move to the same point hasNextChecked = true; n = true; return; } int p = binarySearch(array.get(), pos, nElements, c1); if (p < 0) { p = -p - 1; } pos = p; while (pos < nElements && (array->at(pos).first < c1 || (array->at(pos).first == c1 && array->at(pos).second < c2))) { pos++; } hasNextChecked = false; } void ArrayItr::ignoreSecondColumn() { ignSecondColumn = true; } int ArrayItr::binarySearch(Pairs *array, int start, int end, uint64_t key) { int low = start; int high = end - 1; while (low <= high) { int mid = (low + high) >> 1; int64_t midVal = array->at(mid).first; if (midVal < key) low = mid + 1; else if (midVal > key) high = mid - 1; else if (low != mid) // Equal but range is not fully scanned high = mid; // Set upper bound to current number and rescan else // Equal and full range is scanned return mid; } if (low >= end) { return -low - 1; } else { return high; } } void ArrayItr::init(std::shared_ptr<Pairs> values, int64_t v1, int64_t v2) { this->array = values; nElements = (int)values->size(); constraint1 = (int64_t)v1; constraint2 = (int64_t)v2; countElems = 0; hasNextChecked = false; ignSecondColumn = false; this->v1 = this->v2 = -1; if (constraint1 != -1) { pos = binarySearch(array.get(), 0, nElements, constraint1); if (pos >= 0) { if (constraint2 != -1) { // The values are not many. Let's try to do a linear search // and see how it goes... while (pos < nElements && array->at(pos).first == constraint1 && array->at(pos).second < constraint2) { pos++; } hasNextChecked = true; n = pos < nElements && array->at(pos).second == constraint2; } else { hasNextChecked = n = true; } } else { hasNextChecked = true; n = false; pos = 0; } } else { pos = 0; hasNextChecked = n = true; } } uint64_t ArrayItr::getCardinality() { //if (n) { if (ignSecondColumn) { uint64_t count = 0; size_t pos2 = 0; int64_t existingV1 = -1; while (pos2 < nElements) { if (array->at(pos2).first != existingV1) { count++; existingV1 = (int64_t)(array->at(pos2).first); } pos2++; } return count; } else { /*uint64_t count = 1; size_t pos2 = pos + 1; while (pos2 < nElements) { if (array->at(pos2).first != constraint1) { break; } count++; pos2++; } return count;*/ return nElements; } //} else { // return 0; //} } uint64_t ArrayItr::estCardinality() { return getCardinality(); }
8fc750e42a08b088de32a8951d23f21b5ab7619e
9868954eba83b4e277d30e1146290b0e9cbf77cc
/src/ROL.h
9e9a5d1e3fe4f1d890d02f46cfe7c5e1016a3d1a
[ "FSFAP", "MIT" ]
permissive
domahony/6502Emulator
25f741a0e9fefc6a1a0ec5ef87d0093b4689ad30
dbc1088998966ce4d59b9a38e5fe08dfcb1bfcf9
refs/heads/master
2016-09-06T12:47:56.204414
2015-04-29T23:24:04
2015-04-29T23:24:04
30,092,413
0
0
null
null
null
null
UTF-8
C++
false
false
205
h
ROL.h
/* * ROL.h * * Created on: Feb 17, 2015 * Author: domahony */ #ifndef ROL_H_ #define ROL_H_ #include "CPU.h" void initROL(std::function<int (domahony::emu::CPU&)> *fn); #endif /* ROL_H_ */
67f2c4efeee9f68a43344772f6d49dda299fb129
1c5b605bc9c9047fa598a045924963fe00f102c3
/src/serverSubject.cpp
e27564859496253dad23340ae95e9cf3da049fec
[]
no_license
rozanecm/siu-guaramini
6f276e4399b524ade36803e9c49b6145e535d74a
067942c3b3ad33b80059a58a474f065ee84d22d0
refs/heads/master
2021-01-20T01:17:32.216444
2017-10-07T18:48:32
2017-10-07T18:48:32
89,251,027
0
0
null
null
null
null
UTF-8
C++
false
false
904
cpp
serverSubject.cpp
#include "serverSubject.h" #include <string> Subject::Subject(int subjectID, int courseID, int teacherID, int vacantes, std::string description) : subjectID(subjectID), courseID(courseID), teacherID(teacherID), vacantes(vacantes), description(description){} std::string Subject::getDescription() const { return description; } int Subject::getVacantes() const { return vacantes; } int Subject::getTeacherID() const { return teacherID; } void Subject::enroll(int studentID) { enrolledStudents.push_front(studentID); vacantes--; } void Subject::unEnroll(int studentID) { enrolledStudents.remove(studentID); vacantes++; } bool Subject::hasVacancies() { return vacantes > 0; }
bc4a4736fadb15e3c90d05738c9ce6334bb27148
e10bfac72612860ecf2f39c7769c0d0ffe703bff
/DeviceStateForm.h
fdd2cebaa5a2ad6e2971ed0da5a5ae62b0f5d24d
[]
no_license
qqsskk/AgvCtrlSys
0e03bf1a7b6e841cce963817d8e9bf26c7e5aac9
bea53eb0e5a6b186ddecfd6118a9c1e71ee77f8f
refs/heads/master
2020-12-12T23:47:58.649928
2019-12-02T03:05:39
2019-12-02T03:05:39
234,260,672
2
1
null
2020-01-16T07:27:40
2020-01-16T07:27:40
null
UTF-8
C++
false
false
774
h
DeviceStateForm.h
#ifndef DEVICESTATEFORM_H #define DEVICESTATEFORM_H #include <QWidget> #include <QHBoxLayout> #include <QTimer> #include <QSqlQueryModel> #include <QSqlTableModel> #include <QSqlDatabase> #include <QSqlQueryModel> #include <QDebug> #include <QJsonParseError> #include <QJsonArray> #include <QVariantMap> #include <memory> #include <QAbstractTableModel> #include <QJsonArray> #include "CustomJsonModel.h" namespace Ui { class DeviceStateForm; } class DeviceStateForm : public QWidget { Q_OBJECT public: explicit DeviceStateForm(QWidget *parent = nullptr); ~DeviceStateForm(); private: Ui::DeviceStateForm *ui; QSqlQueryModel *m_modelAgv; QSqlQueryModel *m_modelCaller; private slots: void onUpdateModel(); }; #endif // DEVICESTATEFORM_H
f9bbd353ed332beca2de451a83cb6fc5c222993e
83ea4112a19c193dcc8a3d36f2ea7f9b70294d53
/4/Guess The Number.cpp
4633cbef16f654395d60e396310e2c67364b2b6f
[]
no_license
s-bond/Miscellaneous-Codes
a8240eb8d2ab59528be59a1a60ad9fcd1722e9b2
51fa3242230a7c820a58999e3449a755e9fda6f4
refs/heads/master
2021-01-02T22:58:50.156483
2013-08-12T17:53:36
2013-08-12T17:53:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,135
cpp
Guess The Number.cpp
/* @ * Siddharth Maloo */ #include <iostream> #include <vector> #include <map> #include <stack> #include <queue> #include <string.h> #include <string> #include <math.h> #include <algorithm> #include <cstring> #include <time.h> #include <fstream> ///////////////// #define ULL unsigned long long int #define GI ({int t;scanf("%d",&t);t;}) #define GL ({unsigned long long int t;scanf("%llu",&t);t;}) #define PInt(a) printf("%d\n",(a)) #define PLng(a) printf("%llu\n",(a)) #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) ///////////////// using namespace std; char ch[25]; bool flag; ULL ans; int main () { int i, j, k, c=0, t; scanf("%s",&ch); while ( ch[0] != '*'){ ans = 0;flag=1; vector<int>yes, no; FOR(i,0,strlen(ch)) if(ch[i]=='Y') yes.push_back(i+1); else no.push_back(i+1); if( yes.size()){ ans = (ULL)yes[0]; FOR(i,1,yes.size()){ ans = (ans * (ULL)yes[i]) / __gcd((int)ans,yes[i]); } FOR(i,0,no.size()){ if( ans % no[i] == 0){ flag=false; break; } } } else flag=false; if(flag) PLng(ans); else PInt(-1); scanf("%s",&ch); } return 0; }
a7db6cbd733bf5a2a6fac98f6f2ddddc8ab4805f
50f566db9a9f3c6a80f5edc8b1d278caf64b4758
/HW Chapter 4/Testingcode/testingcode1/name.h
c55844a9ec017f34ac25bd72aa679b31c4768a1b
[]
no_license
trippy/c-plus-plus
cd06eb27cdb6986af5e85e60382d35193adad96f
8df49eb84aa6da56221bf25ae26cfba0489ef1de
refs/heads/master
2022-11-22T23:33:37.597377
2020-07-27T20:26:34
2020-07-27T20:26:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
682
h
name.h
//CPSC 230 RAVI PATEL CH 4 HW Q1 //name.h #include <iostream> using namespace std; double max1(double a, double b){ if (a > b) cout<<"Maximum value: "<<a<<endl; else cout<<"Maximum value: "<<b<<endl; return 0; } bool islower1(char a){ if (islower(a)) cout<< true<<" - Character is lower case!"<<endl; else cout<< false<<" - Character is upper case!"<<endl; return 0; } bool isprime1(int a){ bool isPrime = true; int i; for(i = 2; i <= a / 2; ++i) { if(a % i == 0) { isPrime = false; break; } } if (isPrime) cout<< true<<" - This is a prime number!"<<endl; else cout<< false<<" - This is not a prime number!"<<endl; return 0; }
669964e7ad2b82967b3fc73a8099baa095462b40
1d1fa41f8c25074a571d9d530bce7301b8f4e9df
/MarioProject/constants.h
01b44f417fc88d863f6c5a78754bb37ee1fa606b
[]
no_license
SamYallop/MarioProject
cf5dfa0bf3d64db4fc60530013132ff44386db82
f81f76aad13fb0eb563389082effbe18672591be
refs/heads/main
2023-04-09T06:48:33.769578
2021-01-29T13:02:43
2021-01-29T13:02:43
331,949,126
0
0
null
null
null
null
UTF-8
C++
false
false
127
h
constants.h
#pragma once // Screen Dimensions #define SCREEN_WIDTH 512 #define SCREEN_HEIGHT 416 #include <iostream> using namespace std;
9824de2a2fe3738e845ea98e6920839254ee43cb
5bbc1726914d849a9edfa3662bc6139e5459548c
/hld/corelib/output.h
2f1b75adbb1131eccfaadd889937118294830831
[]
no_license
swcho/TVBAgentV2
8fe99ddf33647985a9906d69b495d682b176a176
3d64a438f9bcf8a25da4aded6bc9e2d595a1f7c1
refs/heads/master
2016-09-05T11:04:09.288471
2014-12-02T13:31:09
2014-12-02T13:31:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,316
h
output.h
//================================================================= // // Copyright (C) 2011 // Teleview Corporation // // Author : // HuyLe, huy@teleview.com //================================================================= #ifndef _TLV_OUTPUT_ #define _TLV_OUTPUT_ #include "corelib.h" #define BANK_SIZE_4 0x200000 // 8 Mbyte is 2M x 32bit class CHldPlayback; class Output{ public: CHldPlayback *sys_play; char name[256]; public: // memory allocation // initialization of target hardward virtual void init(CHldPlayback *sys_play) = 0; virtual void quit() = 0; // virtual int consume_item(char *buff, int size) = 0; int main_loop(void *param); }; // using abstract base class as a method for ...... class CHldFileWriter : public Output{ private: char file_path[256]; FILE *file_handler; char *tmp_buff; public: CHldFileWriter(); ~CHldFileWriter(); void init(CHldPlayback *core_broadcast); int consume_item(char *buff, int size); void quit(); void WriteFileSize(int size_); }; class CHldBoard597V2: public Output{ public: int hw_group_index; int hw_bank_index; int hw_bank_number; int hw_bank_offset; void *dma_buffer; public: CHldBoard597V2(); ~CHldBoard597V2(); void init(CHldPlayback *core_broadcast); int consume_item(char *buff, int size); void quit(); #ifndef _TEST_ // for interfacing with HLD int TSPL_SET_PLAY_RATE(long play_freq, long use_max_play_rate); int TSPL_SET_TSIO_DIRECTION(int direction); int TSPL_GET_TSIO_DIRECTION(); int TSPL_SET_SDRAM_BANK_CONFIG(int nBankCount); int TSPL_SET_SDRAM_BANK_OFFSET_CONFIG(int nBankOffset); int TSPL_SET_SDRAM_BANK_INFO(int nBankCount, int nBankOffset); int TSPL_GET_DMA_STATUS(); void* TSPL_GET_DMA_ADDR(); int TSPL_SET_SDCON_MODE(int nMode); #ifdef WIN32 int TSPL_WRITE_BLOCK(DWORD *srcBuff, unsigned long buffSize, DWORD *des); #else int TSPL_WRITE_BLOCK(unsigned int *srcBuff, unsigned long buffSize, unsigned int *des); #endif int TSPL_GET_CUR_BANK_GROUP(); //2012/7/5 DM ======================================================================== void call_SetHwDmaDiection_Play(void); void call_SetHwFifoCntl_(); int call_WaitConsumePlayBuf_toMaxLevel_HasEndlessWhile(); //==================================================================================== #endif }; // do not write to board class OutputNULL: public Output { public: OutputNULL(); ~OutputNULL(); void init(CHldPlayback *core_broadcast); int consume_item(char *buff, int size); void quit(); }; class CHldBoardDVBT2: public CHldBoard597V2 { public: CHldBoardDVBT2(); ~CHldBoardDVBT2(); void init(CHldPlayback *core_broadcast); }; class CHldBoardISDBT: public CHldBoard597V2 { public: CHldBoardISDBT(); ~CHldBoardISDBT(); void init(CHldPlayback *core_broadcast); }; // for playing muxed file, using tmcc in file // this is nonsense class, it will be delete when multiplexer interface is re-designed class CHldBoardISDBTUsingTMCC: public CHldBoard597V2{ public: CHldBoardISDBTUsingTMCC(); ~CHldBoardISDBTUsingTMCC(); void init(CHldPlayback *core_broadcast); }; class CHldBoardDVBC2: public CHldBoard597V2 { public: CHldBoardDVBC2(); ~CHldBoardDVBC2(); void init(CHldPlayback *core_broadcast); }; #endif
efa42cf35be88b7220e481ac515cac2b8f4ae3c2
25238ac14341c3f18e070dd1270795b612d86b91
/vector.cpp
dd76f84ece519488efcbb2bd22d5c2a5f96b3d62
[]
no_license
hervatteshreyu/cpp-cheat-sheet
2f9db02add15a94827c7844928797d1010fb69f0
a721d3f2d8f29c9f7bc6e377c6b289c6a14028ee
refs/heads/master
2023-05-15T05:54:57.711775
2021-06-06T15:06:04
2021-06-06T15:06:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,127
cpp
vector.cpp
#include <iostream> #include <vector> class MyClass { private: int a, b; public: MyClass(int a, int b) { this->a = a; this->b = b; } void print() { std::cout<<a<<","<<b<<std::endl; } }; int main() { std::vector<int> numbers; numbers.push_back(1); int temp = 2; numbers.push_back(temp); int* ptr = (int*) malloc(sizeof(int)); *ptr = 3; numbers.push_back(*ptr); for(int i = 0; i < numbers.size(); i++) { std::cout<<numbers[i]<<" "; } std::cout<<std::endl; if(numbers.size() != 0) { numbers.pop_back(); // Never actually used this } for(int i = 0; i < numbers.size(); i++) { std::cout<<numbers[i]<<" "; } std::cout<<std::endl; std::vector<MyClass*> objects1; objects1.push_back(new MyClass(11, 12)); MyClass* temp2 = (MyClass*) malloc(sizeof(MyClass)); temp2 = new MyClass(13, 14); objects1.push_back(temp2); for(int i = 0; i< objects1.size(); i++) { objects1[i]->print(); } std::vector<MyClass> objects2; objects2.emplace_back(21, 22); objects2.emplace_back(23, 24); for(int i = 0; i< objects2.size(); i++) { objects2[i].print(); } return 0; }
994b6716919993ce62363da810be07c668a5c006
41738b4abc7f7ba222053f13031924739f8e0a5b
/archive/Arduino/power_2ch_12v.ino
3cb9b9f6cbf3c91f26a76ded595ca500c99b02fc
[]
no_license
fatlard1993/Medeina
76a7f56a3c5aa51aed2d210c5c05ba3679af4132
4f3390afc8c2988d78d6c5f496b1a22e8b27652d
refs/heads/master
2021-01-23T08:24:28.192911
2020-03-16T05:29:38
2020-03-16T05:29:38
31,342,868
0
0
null
null
null
null
UTF-8
C++
false
false
4,448
ino
power_2ch_12v.ino
#include <Wire.h> #define SLAVE_ADDRESS 4 // Slave address used for I2c #define NUM_OUTLETS 8 // Total number of outlets #define FIRST_OUTLET_PIN 2 // The first(lowest number) pin of NUM_OUTLETS, designed to be used with consecutive pins eg. 2-9 int data = 9; // Data to be writen back to I2c master. 9 = no data ready yet. void setup(){ for(int i = FIRST_OUTLET_PIN; i <= NUM_OUTLETS + (FIRST_OUTLET_PIN - 1); i++){ // Loop through all outlets pinMode(i, OUTPUT); digitalWrite(i, HIGH); // Initialize them all at HIGH (off) } Wire.begin(SLAVE_ADDRESS); Serial.begin(9600); Wire.onReceive(receiveEvent); Wire.onRequest(requestEvent); Serial.println(" Serial/I2c Powerstrip "); Serial.println("============================================="); Serial.println("To operate enter 2 digits [action][outletNum]"); Serial.println("Available actions are: 1(ON), 0(OFF), r(read)"); Serial.print("There are "); Serial.print(NUM_OUTLETS); Serial.println(" currently configured outlets"); Serial.println("============================================="); } void loop(){ delay(100); } void serialEvent() { int receiveByte = 0; // Set command index to 0 char command[2]; // [0] = outletNum (1-8), [1] = action (0,1,r) while(Serial.available()) { command[receiveByte] = (char)Serial.read(); if (command[receiveByte] == '\n') { // Break out of loop when return is pressed break; } else{ receiveByte++; } } handleInput(command); } void requestEvent(){ Wire.write(data); data = 9; } void receiveEvent(int howMany){ int receiveByte = 0; // Set command index to 0 char command[2]; // [0] = outletNum (1-8), [1] = action (0,1,r) while(Wire.available()){ command[receiveByte] = Wire.read(); receiveByte++; } handleInput(command); } void handleInput(char command[2]){ int outletNum; if(command[1] == 'a'){ outletNum = 666; }else{ outletNum = (int)command[1] - '0'; // Convert char to int if(outletNum > NUM_OUTLETS || outletNum < 1){ data = 2; // 2 = unusable outlet num (obvously) Serial.print(outletNum); Serial.print(" is not a valid outlet selection, 1-"); Serial.print(NUM_OUTLETS); Serial.println(" are currently configured."); return; } else{ outletNum = outletNum + (FIRST_OUTLET_PIN - 1); // Adjust based on what the first pin is } } switch(command[0]){ case '0': turnOff(outletNum); break; case '1': turnOn(outletNum); break; case 'r': readOutlet(outletNum); break; default: data = 3; // 3 = invalid action (This may never be used, might remove it later) Serial.print(command[0]); Serial.println(" is not a valid outlet action. 0, 1, r are the avalible actions"); break; } } void turnOn(int outletNum){ data = 1; if(outletNum == 666){ for(int i = FIRST_OUTLET_PIN; i <= NUM_OUTLETS + (FIRST_OUTLET_PIN - 1); i++){ if(digitalRead(i)){ digitalWrite(i, LOW); Serial.print("Turned ON outlet #"); Serial.println(i - (FIRST_OUTLET_PIN - 1)); } } }else{ digitalWrite(outletNum, LOW); Serial.print("Turned ON outlet #"); Serial.println(outletNum - (FIRST_OUTLET_PIN - 1)); } } void turnOff(int outletNum){ data = 1; if(outletNum == 666){ for(int i = FIRST_OUTLET_PIN; i <= NUM_OUTLETS + (FIRST_OUTLET_PIN - 1); i++){ if(!digitalRead(i)){ digitalWrite(i, HIGH); Serial.print("Turned OFF outlet #"); Serial.println(i - (FIRST_OUTLET_PIN - 1)); } } }else{ digitalWrite(outletNum, HIGH); Serial.print("Turned OFF outlet #"); Serial.println(outletNum - (FIRST_OUTLET_PIN - 1)); } } void readOutlet(int outletNum){ if(outletNum == 666){ for(int i = FIRST_OUTLET_PIN; i <= NUM_OUTLETS; i++){ bool outletState = digitalRead(i); Serial.print("Outlet #"); Serial.print(i - (FIRST_OUTLET_PIN - 1)); Serial.print(" is "); if(outletState){ Serial.println("OFF!"); } else{ Serial.println("ON!"); } } }else{ bool outletState = digitalRead(outletNum); Serial.print("Outlet #"); Serial.print(outletNum - (FIRST_OUTLET_PIN - 1)); Serial.print(" is "); if(outletState){ data = 0; Serial.println("OFF!"); } else{ data = 1; Serial.println("ON!"); } } }
0f94ae0e29420d91c1925da5b5bd31199abad171
d2a8fb2e87e8853e7d762e94264c93a34b83d5c3
/HW04/11_9/11_9/Source.cpp
b1587e89643c739fac5b0718ef5c512662625294
[]
no_license
michaelzeng96/HW04
7188743db5dd6a3ec6a57932ea9be5ca5d4bf8e9
34a6c9c89438d65ee3148c34975efb2dec1931fc
refs/heads/master
2021-01-10T06:37:21.203497
2015-06-05T05:18:07
2015-06-05T05:18:07
36,913,410
0
0
null
null
null
null
UTF-8
C++
false
false
2,925
cpp
Source.cpp
#include <iostream> using namespace std; class Rectangle2D { private: double dX; double dY; double dWidth; double dHeight; public: Rectangle2D(); Rectangle2D(double setX, double setY, double setWidth, double setHeight); double getX(void) const; double getY(void) const; double getWidth(void) const; void setWidth(double setWidth); double getHeight(void) const; void setHeight(double setHeight); double getArea(void) const; double getPerimeter(void) const; bool contains(double x, double y) const; bool contains(const Rectangle2D &r) const; bool overlaps(const Rectangle2D &r) const; }; Rectangle2D::Rectangle2D() { dX = 0; dY = 0; dWidth = 1; dHeight = 1; } Rectangle2D::Rectangle2D(double setX, double setY, double setWidth, double setHeight) { dX = setX; dY = setY; dWidth = setWidth; dHeight = setHeight; } double Rectangle2D::getX(void) const { return dX; } double Rectangle2D::getY(void) const { return dY; } double Rectangle2D::getWidth(void) const { return dWidth; } void Rectangle2D::setWidth(double setWidth) { dWidth = setWidth; } double Rectangle2D::getHeight(void) const { return dHeight; } void Rectangle2D::setHeight(double setHeight) { dHeight = setHeight; } double Rectangle2D::getArea(void) const { return dWidth*dHeight; } double Rectangle2D::getPerimeter(void) const { return (dWidth + dHeight) * 2; } bool Rectangle2D::contains(double x, double y) const { double xMax = dX + (dWidth / 2); double xMin = dX - (dWidth / 2); double yMax = dY + (dHeight / 2); double yMin = dY - (dHeight / 2); if ((x <= xMax && x >= xMin) && (y <= yMax &&y >= yMin)) { return true; } return false; } bool Rectangle2D::contains(const Rectangle2D &r) const { double xMax = dX + (dWidth / 2); double xMin = dX - (dWidth / 2); double yMax = dY + (dHeight / 2); double yMin = dY - (dHeight / 2); double obj_xMax = r.dX + (r.dWidth / 2); double obj_xMin = r.dX - (r.dWidth / 2); double obj_yMax = r.dY + (r.dHeight / 2); double obj_yMin = r.dY - (r.dHeight / 2); if (obj_xMax <= xMax && obj_xMin >= xMin && obj_yMax <= yMax && obj_yMin >= yMin) { return true; } return false; } bool Rectangle2D::overlaps(const Rectangle2D &r) const { double xMax = dX + (dWidth / 2); double xMin = dX - (dWidth / 2); double yMax = dY + (dHeight / 2); double yMin = dY - (dHeight / 2); double obj_xMax = r.dX + (r.dWidth / 2); double obj_xMin = r.dX - (r.dWidth / 2); double obj_yMax = r.dY + (r.dHeight / 2); double obj_yMin = r.dY - (r.dHeight / 2); if (obj_xMax <= xMax || obj_xMin >= xMin || obj_yMax <= yMax || obj_yMin >= yMin) { return true; } return false; } int main() { Rectangle2D r1(2, 2, 5.5, 4.9); Rectangle2D r2(4, 5, 10.5, 3.2); Rectangle2D r3(3, 5, 2.3, 5.4); cout << "r1's area is " << r1.getArea() << endl; cout << r1.contains(3, 3) << endl; cout << r1.contains(r2) << endl; cout << r1.overlaps(r3) << endl; return 0; }
1bda040e7aafb7403281d47d49fe853171c36662
44a992e6a8d8cef4f0c42d00eb3e07a75e3bbdc0
/LongestIncreasingContinuoussubsequence.cpp
eddf6f97aa7458eec60868a27c3bed3f9a543637
[]
no_license
legendtkl/lintcode
f750ce1ca09af74061400d3470dd8bc50500aabe
320d2d4db3649c7c264e0dd6668e20f066b8b333
refs/heads/master
2016-09-11T02:19:47.628349
2015-09-01T13:48:13
2015-09-01T13:48:13
40,899,121
0
0
null
null
null
null
UTF-8
C++
false
false
912
cpp
LongestIncreasingContinuoussubsequence.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int longestSubsequence(vector<int>& A){ int pos=0, n=A.size(), ret=1; while(pos<n){ int i=pos+1; while(A[i]>A[i-1) } } void reverseVector(vector<int>& A){ int left=0, right=A.size()-1; while(left<right){ int tmp = A[left]; A[left] = A[right]; A[right] = tmp; ++left; --right; } } int longestIncreasingContinuousSubsequence(vector<int>& A) { int incr = longestSubsequence(A); reverseVector(A); int decr = longestSubsequence(A); return max(incr, decr); } }; int main(){ vector<int> A{99,55,7,29,80,33,19,23,6,35,40,27,44,74,5,17,52,36,67,32,37,42,18,77,66,62,97,79,60,94,30,2,85,22,26,91,3,16,8,0,48,93,39,31,63,13,71,58,69,50,21,70,61,43,12,88,47,45,72,76}; Solution solve; cout << solve.longestIncreasingContinuousSubsequence(B) << endl; return 0; }
da6f6a49e9cc60781d3a9b952134a60c0b77a79d
30646591b9e70441473889dc6bd438859980e388
/src/ofApp.cpp
fee28fe4b943f88af77eaaa7fa8eb7434879bf74
[]
no_license
jmarsico/CLP_Knoxville_Wall
0dc684368674203deff0b548315dcd776b74aec9
718766f4440b8d217a58ac76e2212386786e20bc
refs/heads/master
2021-01-22T12:26:01.980197
2016-07-21T13:54:50
2016-07-21T13:54:50
55,097,358
0
0
null
null
null
null
UTF-8
C++
false
false
9,161
cpp
ofApp.cpp
// ============================================================================= // // Copyright (C) 2016 Jakob Marsico <http://ultralowres.com> #include "ofApp.h" void ofApp::setup() { //keep framerate to 44 because this is framerate of LED drivers ofSetFrameRate(44); //set up the scene, pass it reference to the state manager, and the corners of the light arrangement/layout scene.setup(&state, ofVec2f(0,290), ofVec2f(ofGetWidth(),620)); //set the turn on and turn-off times of the system state.setTurnOnTime("8:00"); state.setTurnOffTime("23:00"); //set up the GUI setupGui(); bShowGui = false; //load the CSV document that stores light point locations csv.loadLightPoints("allPoints.csv"); //read the light locations from the CSV document and set up lightPoint objects for(size_t i = 0; i < csv.getNumLights(); i++){ LightPoint lp; ofVec2f p = csv.getLightLoc(i); ofVec2f trans(18, 220); p += trans; p *= 2.7; lp.setup(p); lights.push_back(lp); //also add an element to the vector we use to send over KiNet lightVals.push_back(0); } ofLogNotice("ofApp::setup") << "number of lights from CSV: " << lights.size(); //set up the KiNet connections kinet.setup(lights.size()); //initialize the osc manager osc.setup(); //load the logos and text images logo.load("textLogo.png"); teenRoom.load("Teen_Room.png"); frontWall.load("Front_Wall.png"); entrance.load("Entrance.png"); //add listeners for scheduler events and for on/off events from admin webpage ofAddListener(StateManager::turnOnOff, this, &ofApp::onSchedulerEvent); ofAddListener(OscManager::turnOnOff, this, &ofApp::onOscOnOff); } //------------------------------------------------------ void ofApp::update(){ FPS = ofGetFrameRate(); //update the framerate variable ofSetColor(255); //set color to white (standard when working with overlaid FBOs) state.update(); //update the state manager //update the osc manager with any pause timing... to be sent to admin webpage osc.setPauseTimeRemaining(state.getPauseTimeRemaining()); osc.update(bSendToLights); //update the status of the wall for the osc heartbeat scene.update(); //udpate the scene manager scene.generateFinalComposite(); //layer the different FBOs to create composit compPix = scene.getPixels(); //pull down the composite image from all layers (fluid, etc) //if sending to lights, update from animation for(size_t i = 0; i < lights.size(); i++){ ofVec2f loc = lights[i].getLoc(); //get the lightPoint's location int val = compPix.getColor(loc.x, loc.y).getBrightness(); //sample the composite image at the given location lights[i].setAvgSamplingSize(avgSampSize); //re-adjust the averaging sample size (if changed in GUI) lights[i].setCurrentVal(val); //add the current reading to the averaging samples //if we are sending to the wall, take light val //if not, send zeros if(bSendToLights){ lightVals[i] = lights[i].getAvgVal(); //copy the average value for this pixel to the KiNet vector } else { lightVals[i] = 0; //if we aren't sending to the wall, set KiNet pixel to zero } } // if(bTestSequence) { for(size_t i = 0; i < lightVals.size(); i++){ if(i == testCurrentLight){ lightVals[i] = 255; } else{ lightVals[i] = 0; } } } kinet.update(lightVals); //update the kinet manager kinet.send(); //send to the wal } //------------------------------------------------------ void ofApp::draw(){ ofBackground(0); ofSetColor(255); //draw each of the lightPoints for(size_t i = 0; i < lights.size(); i ++){ lights[i].draw(); } //draw all of the logos and text assets ofSetColor(255); logo.draw(20,20, logo.getWidth() * 0.20, logo.getHeight() * 0.20 ); teenRoom.draw(90 ,645, teenRoom.getWidth() * 0.15, teenRoom.getHeight() * 0.15); frontWall.draw(800,645, frontWall.getWidth() * 0.15, frontWall.getHeight() * 0.15); entrance.draw(1657, 645, entrance.getWidth() * 0.15, entrance.getHeight() * 0.15); //draw the final scene (usually fluid) we are setting color to 50 so the fluid will appear very dim ofSetColor(50); if(bShowAnim) scene.draw(); //draw the GUIs ofSetColor(255); if(bShowGui){ systemGui.draw(); animGui.draw(); fluidGui.draw(); ofShowCursor(); } else { ofHideCursor();} //sometimes we want to visualize the mouse coordinates (useful for when setting up layout) if(mouseLoc){ ofDrawBitmapStringHighlight(ofToString(mouseX) + "," + ofToString(mouseY), mouseX, mouseY); } //draw lines showing different sections ofSetColor(200); ofDrawLine(345, 350, 345, 600); ofDrawLine(1547, 350, 1547, 600); ofSetColor(255); } //------------------------------------------------------ void ofApp::setupGui(){ int guiColorSwitch = 0; ofColor guiHeaderColor[2]; guiHeaderColor[0].set(200, 150); guiHeaderColor[1].set(150, 150); ofColor guiFillColor[2]; guiFillColor[0].set(200, 150); guiFillColor[1].set(200, 150); //system gui, for overall settings systemGui.setup("system", "systemSettings.xml"); systemGui.add(FPS.set("framerate", 0, 0, 100)); systemGui.add(bShowAnim.set("show anim", false)); systemGui.add(mouseLoc.set("show mouselocation", false)); systemGui.add(avgSampSize.set("smoothing", 1, 1, 20)); systemGui.add(bSendToLights.set("lights on/off", true)); systemGui.add(bTestSequence.set("test light sequence", false)); systemGui.add(testCurrentLight.set("current test light", 0, 0, 749)); systemGui.setPosition(ofPoint(10,10)); //fluid gui, for controlling everything withing ofxFlowTools fluidGui.setup("fluid", "settings.xml"); fluidGui.setDefaultHeaderBackgroundColor(guiHeaderColor[guiColorSwitch]); fluidGui.setDefaultFillColor(guiFillColor[guiColorSwitch]); guiColorSwitch = 1 - guiColorSwitch; fluidGui.add(scene.getFluidParams()); //add the animation parameters (this will include everything from the scene) animGui.setup("animation", "animSettings.xml"); animGui.add(scene.getAnimationParams()); // if the settings files are not present the parameters will not be set during this setup systemGui.loadFromFile("systemSettings.xml"); fluidGui.loadFromFile("settings.xml"); animGui.loadFromFile("animSettings.xml"); //minimize everything to begin fluidGui.minimizeAll(); animGui.minimizeAll(); //set the locations of each GUI fluidGui.setPosition(ofGetWidth() - fluidGui.getWidth() - 10,10); systemGui.setPosition(ofGetWidth() - fluidGui.getWidth() - systemGui.getWidth() - 20, 10); animGui.setPosition(systemGui.getPosition().x, 10 + systemGui.getHeight()); } //------------------------------------------------------ void ofApp::turnOffLights(){ bSendToLights = false; //set everything to zero for(size_t i = 0; i < lightVals.size(); i++){ lightVals[i] = 0; } //send the zero-filled buffer to KiNet kinet.update(lightVals); kinet.send(); } //------------------------------------------------------ void ofApp::turnOnLights(){ //switch flag so we start updating with animation values bSendToLights = true; } //event listener from scheduled on/off events //------------------------------------------------------ void ofApp::onSchedulerEvent(bool &onOff){ if(onOff == true){ turnOnLights(); ofLog() << "TURN ON LIGHTS FROM SCHEDULE"; } else if(onOff == false){ turnOffLights(); ofLog() << "TURN OFF LIGHTS FROM SCHEDULE"; } } //event listener from admin-enabled on/off messages (from Node Server) //------------------------------------------------------ void ofApp::onOscOnOff(bool &onOff){ if(onOff == true){ turnOnLights(); } else if(onOff == false){ turnOffLights(); } } void ofApp::exit(){ // Set the logger back to the default to make sure any // remaining messages are logged correctly. ofLogToConsole(); ofClear(0); //when exiting, turn all lights to zero and send last packet to KiNet turnOffLights(); } // g key toggles the GUI //------------------------------------------------------ void ofApp::keyReleased(int key){ if(key == 'g'){ bShowGui = !bShowGui; } else if(key == 'n'){ testCurrentLight ++; } else if(key == 'b'){ testCurrentLight --; } }
91b6e03e5b976fdd320094dc152ba640fd9e8e4b
40d5485760211f848a325ec5491c4f4e83eccda5
/Prática XII/geraCodigo.cpp
dd6ca09576e3348def19ff6c5af11297047be18b
[ "MIT" ]
permissive
EhODavi/INF213
1699953ec46bbca98c577289497ef7b8374da980
2099354f1e8f9eda9a92531e5dc45a736ef3882e
refs/heads/main
2023-02-02T14:50:44.367104
2020-12-19T19:23:37
2020-12-19T19:23:37
322,921,942
0
0
null
null
null
null
UTF-8
C++
false
false
386
cpp
geraCodigo.cpp
#include <iostream> #include "MyMap.h" int main() { MyMap<string,int> mapa; string palavra; int n = 0; while(cin >> palavra) { pair<MyMapIterator<string,int>,bool> resultado = mapa.insert(make_pair(palavra,n)); if(resultado.second) n++; cout << (*(resultado.first)).first << " " << (*(resultado.first)).second << endl; } return 0; }
e6d8f1b984a98d49a2371eb62f672a0a786f429e
297497957c531d81ba286bc91253fbbb78b4d8be
/third_party/libwebrtc/modules/audio_coding/audio_network_adaptor/dtx_controller.cc
dc64c3fd561ecdea6cdeb6a216fd8efacaf25731
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
marco-c/gecko-dev-comments-removed
7a9dd34045b07e6b22f0c636c0a836b9e639f9d3
61942784fb157763e65608e5a29b3729b0aa66fa
refs/heads/master
2023-08-09T18:55:25.895853
2023-08-01T00:40:39
2023-08-01T00:40:39
211,297,481
0
0
NOASSERTION
2019-09-29T01:27:49
2019-09-27T10:44:24
C++
UTF-8
C++
false
false
1,311
cc
dtx_controller.cc
#include "modules/audio_coding/audio_network_adaptor/dtx_controller.h" #include "rtc_base/checks.h" namespace webrtc { DtxController::Config::Config(bool initial_dtx_enabled, int dtx_enabling_bandwidth_bps, int dtx_disabling_bandwidth_bps) : initial_dtx_enabled(initial_dtx_enabled), dtx_enabling_bandwidth_bps(dtx_enabling_bandwidth_bps), dtx_disabling_bandwidth_bps(dtx_disabling_bandwidth_bps) {} DtxController::DtxController(const Config& config) : config_(config), dtx_enabled_(config_.initial_dtx_enabled) {} DtxController::~DtxController() = default; void DtxController::UpdateNetworkMetrics( const NetworkMetrics& network_metrics) { if (network_metrics.uplink_bandwidth_bps) uplink_bandwidth_bps_ = network_metrics.uplink_bandwidth_bps; } void DtxController::MakeDecision(AudioEncoderRuntimeConfig* config) { RTC_DCHECK(!config->enable_dtx); if (uplink_bandwidth_bps_) { if (dtx_enabled_ && *uplink_bandwidth_bps_ >= config_.dtx_disabling_bandwidth_bps) { dtx_enabled_ = false; } else if (!dtx_enabled_ && *uplink_bandwidth_bps_ <= config_.dtx_enabling_bandwidth_bps) { dtx_enabled_ = true; } } config->enable_dtx = dtx_enabled_; } }
7a91579729689effe0de7f13bf13b5aff1d3f159
fe56d3e6ab520394295197331b6186b8a0c721b2
/qll/qll/Source.cpp
47ca128dca422e2fe0b0eae7408725ea36bb8e81
[]
no_license
fatmaf/ec100_projects
cc3f319ef55642efc5620401be7c7fe4b50d2a14
fb2e9f0275bcf3955afcb3761487c62d36da727b
refs/heads/master
2022-09-03T20:45:42.573616
2019-03-12T19:50:12
2019-03-12T19:50:12
51,710,069
0
0
null
2022-08-31T19:50:31
2016-02-14T19:40:16
JavaScript
UTF-8
C++
false
false
2,411
cpp
Source.cpp
#include <iostream> #include <string> using namespace std; template <class T> struct node { T data; node* next; node* prev; }; template <class Litem> class linkedList { node<Litem>* head; node<Litem>* tail; public: linkedList() { head = NULL; tail = NULL; } bool isEmpty() { return (head == tail) && (head==NULL); } node<Litem>* findbyitem(int item) { node<Litem>* toret = NULL; if (!isEmpty()) { node<Litem>*cur = head; while (cur!=NULL && cur->data != item) { cur = cur->next; } if (cur) { toret = cur; } } return toret; } void addtoend(Litem item) { if (isEmpty()) { head = new node<Litem>; head->data = item; head->next = NULL; head->prev = NULL; tail = head; } else { tail->next = new node<Litem>; tail->next->prev = tail; tail = tail->next; tail->next = NULL; tail->data = item; } } void addtostart(Litem item) { if (isEmpty()) { head = new node<Litem>; head->data = item; head->next = NULL; head->prev = NULL; tail = head; } else { node<Litem>*ptr = new node<Litem>; ptr->data = item; ptr->next = head; ptr->prev = NULL; head->prev = ptr; head = ptr; } } void removefromend() { if (!isEmpty()) { node<Litem>* todel = tail; tail = tail->prev; if (tail) { tail->next = NULL; } if (todel == head) head = NULL; delete todel; } } void removefromfront() { if (!isEmpty()) { node<Litem> * todel = head; head = head->next; if(head) head->prev = NULL; if (todel == tail) tail = NULL; delete todel; } } void display() { cout << endl; for (node<Litem>* cur = head; cur != NULL; cur = cur->next) { cout << cur->data << "\t"; } cout << endl; } }; int main() { linkedList<int> ll; for (int i = 0; i < 5; i++) { ll.addtoend(i); } ll.display(); for (int i = 0; i < 5; i++) { ll.addtostart(5 - i); } ll.display(); for (int i = 0; i < 5; i++) ll.removefromend(); ll.display(); for (int i = 0; i < 5; i++) ll.removefromfront(); ll.display(); for (int i = 0; i < 5; i++) { ll.addtostart(5 - i); } ll.display(); for (int i = 0; i < 5; i++) { ll.addtoend(i); } ll.display(); for (int i = 0; i < 5; i++) ll.removefromfront(); ll.display(); for (int i = 0; i < 5; i++) ll.removefromend(); ll.display(); return 0; }
8547af8da1f7b9d992e19e94b6a38549e2c9d8bf
88746bb15e1bc9034aaf26367738f278e137aba1
/src/Category.h
04f60a805b503c8ce9ab4d93fbb44d471c3d03b6
[]
no_license
SDaggula/Cpp-Scribble
91759307c2bd1ec11b3250f24dbf87315be0b08a
fd4dc0a9c843e44e9d5680ce3a12656b6d606824
refs/heads/master
2020-03-27T09:41:05.261622
2018-08-27T22:57:04
2018-08-27T22:57:04
146,363,141
0
0
null
null
null
null
UTF-8
C++
false
false
544
h
Category.h
#ifndef CATEGORY_H #define CATEGORY_H #include <iostream> #include <stdbool.h> #include <string.h> #include <vector> #include "MultiStroke.h" using namespace std; class Category{ private: string _name; vector<MultiStroke> _prototypes; public: Category(); Category(string name); Category(string name, MultiStroke firstExample); Category(string name, vector<MultiStroke> examples); string getName(); int getNumExamples(); MultiStroke get(int i); void AddExample(MultiStroke p); string ParseName(string s); }; #endif
b0d4d35fd29e02d334c38dd485d836850eceee8b
e1b07de1253fccf61994d794bba7dcff55466f22
/src/NetworkOptionsMode.cpp
becdbc1fe9cfa9a3be2b6bce74701217ac7140ed
[]
no_license
ausomely/w2-multiplayer-support
320eec638f2243907731ce75348ebadece4e0928
759385ab9f5e04dd94cd95b6e2a9ba72da40a561
refs/heads/main
2023-03-29T17:20:54.140338
2019-03-12T20:34:11
2019-03-12T20:34:11
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,303
cpp
NetworkOptionsMode.cpp
/* Copyright (c) 2015, Christopher Nitta All rights reserved. All source material (source code, images, sounds, etc.) have been provided to University of California, Davis students of course ECS 160 for educational purposes. It may not be distributed beyond those enrolled in the course without prior permission from the copyright holder. All sound files, sound fonts, midi files, and images that have been included that were extracted from original Warcraft II by Blizzard Entertainment were found freely available via internet sources and have been labeld as abandonware. They have been included in this distribution for educational purposes only and this copyright notice does not attempt to claim any ownership of this material. */ #include "NetworkOptionsMode.h" #include "ApplicationData.h" #include "OptionsMenuMode.h" std::shared_ptr<CNetworkOptionsMode> CNetworkOptionsMode::DNetworkOptionsModePointer; std::string CNetworkOptionsMode::DCurrPassword = ""; //! Creates the screen that is seen in game. CNetworkOptionsMode::CNetworkOptionsMode(const SPrivateConstructorType &key) { DCurrPassword.clear(); DTitle = "Network Options"; DButtonTexts.push_back("OK"); DButtonFunctions.push_back(NetworkOptionsUpdateButtonCallback); DButtonTexts.push_back("Cancel"); DButtonFunctions.push_back(OptionsButtonCallback); DEditTitles.push_back("User Name:"); DEditValidationFunctions.push_back(ValidHostnameCallback); DEditTitles.push_back("Remote Hostname:"); DEditValidationFunctions.push_back(ValidHostnameCallback); DEditTitles.push_back("Remote Port Number:"); DEditValidationFunctions.push_back(ValidPortNumberCallback); DEditTitles.push_back("Password: "); DEditValidationFunctions.push_back(ValidPasswordCallback); } //! This function is continuously called while in the network options menu. It handles password checking and printing * bool CNetworkOptionsMode::ValidPasswordCallback(const std::string &str) { const int maxLen = 12; //Handles syncing input with what is stored if (str.empty()) { //input is empty DNetworkOptionsModePointer->DCurrPassword.clear(); } else if (str.size() > DNetworkOptionsModePointer->DCurrPassword.size()) { DNetworkOptionsModePointer->DCurrPassword.append( str.substr(DNetworkOptionsModePointer->DCurrPassword.size(), str.size())); //Added input } else if (str.size() < DNetworkOptionsModePointer->DCurrPassword.size()) { //deleted input DNetworkOptionsModePointer->DCurrPassword.erase( str.size(), DNetworkOptionsModePointer->DCurrPassword.size()); } //Replaces input with * for (auto i = DNetworkOptionsModePointer->DEditText[3].begin(); i != DNetworkOptionsModePointer->DEditText[3].end(); i++) { *i = '*'; } //Input checking if (DNetworkOptionsModePointer->DCurrPassword.size() > maxLen) { return false; } return true; } //! This function is his function is continuously called while in the network options menu. It handles hostnames bool CNetworkOptionsMode::ValidHostnameCallback(const std::string &str) { int CharSinceDot = 0; if (253 < str.length()) { return false; } if (0 == str.length()) { return false; } for (auto Char : str) { if ('.' == Char) { if (0 == CharSinceDot) { return false; } CharSinceDot = 0; } else { CharSinceDot++; if (63 < CharSinceDot) { return false; } if (('-' != Char) && (!(('0' <= Char) && ('9' >= Char))) && (!(('a' <= Char) && ('z' >= Char))) && (!(('A' <= Char) && ('Z' >= Char)))) { return false; } } } return true; } //! This function is his function is continuously called while in the network options menu. It handles portnumbers bool CNetworkOptionsMode::ValidPortNumberCallback(const std::string &str) { try { int Port = std::stoi(str); if ((1024 < Port) && (65535 >= Port)) { return str == std::to_string(Port); } } catch (std::exception &E) { return false; } return false; } //! This function is his function is continuously called while in the network options menu. This function calles all the other validate //! functions and sets the settings in context. void CNetworkOptionsMode::NetworkOptionsUpdateButtonCallback( std::shared_ptr<CApplicationData> context) { for (int Index = 0; Index < DNetworkOptionsModePointer->DEditText.size(); Index++) { if (!DNetworkOptionsModePointer->DEditValidationFunctions[Index]( DNetworkOptionsModePointer->DEditText[Index])) { return; } } context->DUsername = DNetworkOptionsModePointer->DEditText[0]; context->DRemoteHostname = DNetworkOptionsModePointer->DEditText[1]; context->DMultiplayerPort = std::stoi(DNetworkOptionsModePointer->DEditText[2]); context->DPassword = DNetworkOptionsModePointer->DCurrPassword; context->ChangeApplicationMode(COptionsMenuMode::Instance()); } void CNetworkOptionsMode::OptionsButtonCallback( std::shared_ptr<CApplicationData> context) { context->ChangeApplicationMode(COptionsMenuMode::Instance()); } std::shared_ptr<CApplicationMode> CNetworkOptionsMode::Instance() { if (DNetworkOptionsModePointer == nullptr) { DNetworkOptionsModePointer = std::make_shared<CNetworkOptionsMode>(SPrivateConstructorType()); } return DNetworkOptionsModePointer; } void CNetworkOptionsMode::InitializeChange( std::shared_ptr<CApplicationData> context) { DEditSelected = -1; DEditSelectedCharacter = -1; DButtonLocations.clear(); DEditLocations.clear(); DEditText.clear(); DEditText.push_back(context->DUsername); DEditText.push_back(context->DRemoteHostname); DEditText.push_back(std::to_string(context->DMultiplayerPort)); DEditText.push_back(context->DPassword); }
37488766f06065c9127be2ba3702ac91b44858c1
eb8c7a2102b1c91fa9d5d43dbed58a7a1854142a
/src/db/db_add.cpp
1fbe3e5fe6cff0c13095169d2fae324ab28435c6
[ "BSD-3-Clause" ]
permissive
cuhk-eda/split-extract
00e3610564a5ccb362a773e935c3f0bf44e08415
1841214919a87277596395d33d363a7048fecb54
refs/heads/main
2023-03-01T00:00:52.710162
2021-01-30T23:12:56
2021-01-30T23:12:56
312,288,253
3
2
null
null
null
null
UTF-8
C++
false
false
5,668
cpp
db_add.cpp
#include "db.h" using namespace db; #include "../ut/utils.h" Layer* Database::addLayer(const string& name, const char type) { Layer* newlayer = new Layer(name, type); if (layers.size() > 0) { Layer* oldlayer = layers[layers.size() - 1]; oldlayer->_above = newlayer; newlayer->_below = oldlayer; if (type == 'r') { newlayer->rIdx = oldlayer->cIdx + 1; } else { newlayer->cIdx = oldlayer->rIdx; } } else { newlayer->_below = nullptr; if (type == 'r') { newlayer->rIdx = 0; } else { newlayer->cIdx = 0; } } layers.push_back(newlayer); if (type == 'r') ++nLayers; return newlayer; } ViaType* Database::addViaType(const string& name, bool isDef) { ViaType* viatype = getViaType(name); if (viatype) { printlog(LOG_WARN, "via type re-defined: %s", name.c_str()); return viatype; } viatype = new ViaType(name, isDef); #ifdef _GNUC_4_8_ name_viatypes.emplace(name, viatype); #else name_viatypes[name] = viatype; #endif viatypes.push_back(viatype); return viatype; } CellType* Database::addCellType(const string& name, unsigned libcell) { CellType* celltype = getCellType(name); if (celltype) { printlog(LOG_WARN, "cell type re-defined: %s", name.c_str()); return celltype; } celltype = new CellType(name, libcell); #ifdef _GNUC_4_8_ name_celltypes.emplace(name, celltype); #else name_celltypes[name] = celltype; #endif celltypes.push_back(celltype); return celltype; } Cell* Database::addCell(const string& name, CellType* type) { Cell* cell = getCell(name); if (cell) { printlog(LOG_WARN, "cell re-defined: %s", name.c_str()); if (!cell->ctype()) { cell->ctype(type); } return cell; } cell = new Cell(name, type); #ifdef _GNUC_4_8_ name_cells.emplace(name, cell); #else name_cells[name] = cell; #endif cells.push_back(cell); return cell; } IOPin* Database::addIOPin(const string& name, const string& netName, const char direction) { IOPin* iopin = getIOPin(name); if (iopin) { printlog(LOG_WARN, "IO pin re-defined: %s", name.c_str()); return iopin; } iopin = new IOPin(name, netName, direction); #ifdef _GNUC_4_8_ name_iopins.emplace(name, iopin); #else name_iopins[name] = iopin; #endif iopins.push_back(iopin); return iopin; } Net* Database::addNet(const string& name, const NDR* ndr, const unsigned nLayers) { string n = name; replace(n.begin(), n.end(), '/', '_'); Net* net = getNet(n); if (net) { printlog(LOG_WARN, "Net re-defined: %s", n.c_str()); return net; } net = new Net(n, ndr, Use::UseEnum::Signal, nLayers); #ifdef _GNUC_4_8_ name_nets.emplace(n, net); #else name_nets[n] = net; #endif nets.push_back(net); return net; } SplitNet* Database::addSplitNet(const string& name, const NDR* ndr, const Net* net) { SplitNet* splitNet = getSplitNet(name); if (splitNet) { printlog(LOG_WARN, "Split Net re-defined: %s", name.c_str()); return splitNet; } if (!net) net = getNetHint(name); if (!net) { printlog(LOG_ERROR, "Parent Net non-defined: %s", name.c_str()); return nullptr; } splitNet = new SplitNet(name, ndr, net); name_splitNets[name] = splitNet; splitNets.push_back(splitNet); return splitNet; } SplitNet* Database::addSplitNet(Pin* pin, const Layer* splitLayer) { string name; if (pin->cell) { name = pin->cell->name() + "_" + pin->type->name(); } else if (pin->iopin) { name = pin->iopin->name; } else { printlog(LOG_ERROR, "invalid pin %s:%d", __FILE__, __LINE__); } SplitNet* splitNet = getSplitNet(name); if (splitNet) { printlog(LOG_WARN, "Split Net re-defined: %s", name.c_str()); return splitNet; } splitNet = new SplitNet(name, nullptr, pin->net()); pin->splitNet(splitNet); splitNet->addPin(pin); int x = INT_MIN; int y = INT_MIN; pin->getPinCenter(x, y); const NetRouteNode nrn(splitLayer, x, y, -1); splitNet->addNode(nrn, false); splitNet->addUpVia(nrn); name_splitNets[name] = splitNet; splitNets.push_back(splitNet); return splitNet; } Row* Database::addRow(const string& name, const string& macro, const int x, const int y, const unsigned xNum, const unsigned yNum, const bool flip, const unsigned xStep, const unsigned yStep) { Row* newrow = new Row(name, macro, x, y, xNum, yNum, flip, xStep, yStep); rows.push_back(newrow); return newrow; } Region* Database::addRegion(const string& name, const char type) { Region* region = getRegion(name); if (region) { printlog(LOG_WARN, "Region re-defined: %s", name.c_str()); return region; } region = new Region(name, type); regions.push_back(region); return region; } NDR* Database::addNDR(const string& name, const bool hardSpacing) { NDR* ndr = getNDR(name); if (ndr) { printlog(LOG_WARN, "NDR re-defined: %s", name.c_str()); return ndr; } ndr = new NDR(name, hardSpacing); ndrs.emplace(name, ndr); return ndr; } Net* Database::addSNet(const string& name, const Use::UseEnum use) { Net* newsnet = new Net(name, nullptr, use, 0); snets.push_back(newsnet); return newsnet; }
dda4713270e3e6cc8585f5aabc33e70d3657722e
76261aae39cfc15a2b3444665ebcb23a657db361
/Production/Source/Ripley/ManageLinksBuilder.h
716813538198496476d085522f4ed7f1fed6a2ca
[]
no_license
rocketeerbkw/DNA
d208c72690ccfae261beb531fb52d1c2647783e3
de5993d6d0f8dd735085ebca4c86f4363c498615
refs/heads/master
2021-01-21T13:29:52.930616
2015-10-01T17:05:40
2015-10-01T17:05:40
43,528,993
1
0
null
2015-10-02T00:43:08
2015-10-02T00:43:08
null
UTF-8
C++
false
false
706
h
ManageLinksBuilder.h
// ManageLinksBuilder.h: interface for the CManageLinksBuilder class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_MANAGELINKSBUILDER_H__B76FE8C9_F3A0_483D_8894_3B36669BA163__INCLUDED_) #define AFX_MANAGELINKSBUILDER_H__B76FE8C9_F3A0_483D_8894_3B36669BA163__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "XMLBuilder.h" class CManageLinksBuilder : public CXMLBuilder { public: virtual bool Build(CWholePage* pPage); CManageLinksBuilder(CInputContext& inputContext); virtual ~CManageLinksBuilder(); }; #endif // !defined(AFX_MANAGELINKSBUILDER_H__B76FE8C9_F3A0_483D_8894_3B36669BA163__INCLUDED_)
cc0549ebc374bdb9dbdd75301469a5a6d64fa8fe
99466d9132f7cf3ee53f54f1c3fe5a2848f1942e
/567.cpp
86186c20ab7c9bc607cc5a7325bf29b47f39c6bd
[]
no_license
Hyukli/leetcode
e71604126712ad801dd27c387099999085f055d3
3444f0a92ee4edc7607ee8afab760c756a89df7f
refs/heads/master
2021-06-05T14:14:58.792020
2020-03-31T13:40:58
2020-03-31T13:40:58
93,115,710
4
0
null
null
null
null
UTF-8
C++
false
false
844
cpp
567.cpp
#include<iostream> #include<vector> using namespace std; class Solution { public: bool checkInclusion(string s1, string s2) { int n1=s1.size(); int n2=s2.size(); vector<int> v1(26,0); vector<int> v2(26,0); if(n1>n2) { return false; } for(int i=0;i<n1;i++) { v1[s1[i]-'a']++; v2[s2[i]-'a']++; } if(v1==v2) { return true; } for(int i=1;i+n1<=n2;i++) { v2[s2[i+n1-1]-'a']++; v2[s2[i-1]-'a']--; if(v1==v2) { return true; } } return false; } }; int main() { Solution s; string s1,s2; cin>>s1>>s2; cout<<(s.checkInclusion(s1,s2)?"Yes":"No")<<endl; return 0; }
0386d84548fb5e99bc6b6551a91fb04b4cb09050
1574422519bb0cc2ce6e076f1632f8e9abb1beb1
/src/beunit.h
7b8ce88213d3ed34abd3697104ac3495c37d9161
[]
no_license
JaatSoft/BeBattle
cea96c00d7b3f3bf4d9d5a9200b5fe7a3e2a118c
2dc7fba2265971a963ec0d6c72cc5d5e896a41ba
refs/heads/master
2021-09-27T08:41:34.024558
2017-12-31T22:52:34
2018-09-21T06:25:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,037
h
beunit.h
#ifndef BEUNIT_H #define BEUNIT_H #include <View.h> #include <Bitmap.h> #include <Rect.h> #include "effect.h" #include <stdlib.h> #include "convert.h" //--------------------------------------------------------------------- class DView; //temp //--------------------------------------------------------------------- class BeUnit { protected : friend struct Item; friend class DView; int HP; //Hit point of this unit int Recovery; //time before he play again int Type; //which kind of unit int Player; //Owner of the unit BRect Position; //Current position on the board bool Speed; bool Slow; bool Stun; bool Poison; void Update(BRect old); //Redraw the unit (and erase previous frame) Effect* SEffect(); //Allow access to special effects //load a bitmap BBitmap* GetAnim(int unit, int anim, int frame, rgb_color color); //load a bitmap (flipped verticaly) BBitmap* GetAnimFlip(int unit, int anim, int frame, rgb_color color); public : rgb_color PlayerColor; //Color of the player BBitmap* CurrentImage; //Current Frame BeUnit(); virtual ~BeUnit() {delete CurrentImage;} void Draw(BView*, bool); bool Contains(BPoint p); bool Intersect(BRect where); BRect GetPosition() {return Position;} int GetType() {return Type;} int GetPlayer() {return Player;} void SetPlayer(int P) {Player = P;} int GetHP() {return HP;} void SetHP(int newhp); virtual void DoAction1(BeUnit*, BRect) = 0; virtual void DoAction2(BeUnit*, BRect) = 0; virtual void DoAction3(BeUnit*, BRect) = 0; virtual void DoAction4(BeUnit*, BRect) = 0; virtual void DoAction5(BeUnit*, BRect) = 0; virtual void DoAction6(BeUnit*, BRect) = 0; virtual bool OkTarget1(BeUnit*, bool, BRect) = 0; virtual bool OkTarget2(BeUnit*, bool, BRect) = 0; virtual bool OkTarget3(BeUnit*, bool, BRect) = 0; virtual bool OkTarget4(BeUnit*, bool, BRect) = 0; virtual bool OkTarget5(BeUnit*, bool, BRect) = 0; virtual void Hit(bool) = 0; virtual void Stupid() = 0; virtual void Kill() = 0; void ApplyEffect(); void CastSpeed() {Speed = true;} void CastSlow() {Slow = true;} void CastStun() {Stun = true; Recovery += 20;} void CastPoison() {Poison = true;} bool IsSpeed() {return Speed;} bool IsSlow() {return Slow;} bool IsStun() {return Stun;} bool IsPoison() {return Poison;} void AddRecovery() {Recovery++;} void CastRemove() {Speed = false; Slow = false; Stun = false; Poison = false; Recovery = 3;} int Distance(BRect, BRect); }; //--------------------------------------------------------------------- struct Item {/*Each unit is in a container like this. It allows me to put different units in a same list*/ BeUnit* Unit; bool operator<(const Item& I) const {return Unit->Recovery < I.Unit->Recovery;} void DestroyUnit() {delete Unit;} }; //--------------------------------------------------------------------- #include "be1.h" //the normal "looking" guy #include "be2.h" //the violent boxer #include "be3.h" //the magician #include "be4.h" //the mysctic #include "be5.h" //the "don't underestimate me" unit #endif
63e174b975f20f13cce66f1ade5bfda8ea6b8cbb
98b941d492aee02d3c69ef13e43daeba17bbdc5a
/CompetitiveProgramming/SVENGY/SVENGY.cpp
4a4c4aa453c225880cb5133147e1983845f58891
[]
no_license
suresh-yetukuri/CJ-Competitive-Programming
f992d86f1591ffff15fefb64bd44cca83aed1546
9444c32bd60b4ee6f930a024453ba0899eb3848a
refs/heads/main
2023-01-27T13:08:51.807657
2020-12-10T03:16:04
2020-12-10T03:16:04
306,341,414
0
0
null
null
null
null
UTF-8
C++
false
false
1,750
cpp
SVENGY.cpp
// SVENGY.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { long long nTownCount = 0; cin >> nTownCount; vector<long long> pInput(nTownCount, 0); for (int iCounter = 0; iCounter < nTownCount; ++iCounter) cin >> pInput[iCounter]; long long curr_city = 0; long long min_energy_cost = 0; while (curr_city < (nTownCount-1)) { long long next_city = curr_city + 1; while (next_city < (nTownCount - 1)) { if ((abs(pInput[curr_city]) > abs(pInput[next_city])) || (abs(pInput[curr_city]) == abs(pInput[next_city]) && pInput[curr_city] > 0)) break; else ++next_city; } min_energy_cost += ((next_city - curr_city) * pInput[curr_city]) + ((next_city * next_city) - (curr_city * curr_city)) * (pInput[curr_city] * pInput[curr_city]); curr_city = next_city; } cout << min_energy_cost << endl; return 0; } // 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
91d45552b1030d2e4c88ed79914d08e480f82911
c0d8930b9cfecf8790937a67c32d14e35b716b8e
/baekjoon_5532/main.cpp
d0e99f026890f35a9dbf7660658a6f9fa2a90ae1
[]
no_license
imWhS/ProblemSolving
4309af97b3760f7a0fbc01a73551f0bd778ebc30
1ca342d6d244c2ff3c6b571f028e0a7d1f8f6b98
refs/heads/master
2021-08-20T04:53:16.972633
2021-06-29T14:26:36
2021-06-29T14:26:36
231,716,104
0
0
null
null
null
null
UTF-8
C++
false
false
1,756
cpp
main.cpp
/* 5532 방학 숙제 방학 숙제는 수학 B 페이지, 국어 A 페이지 풀기다. 방학은 총 L 일이다. 하루에 국어는 최대 C 페이지, 수학은 최대 D 페이지 풀 수 있다. input L (2 <= L <= 40) A (1 <= A, B <= 1000) B C (1 <= C, D <= 100) D output 겨울 방학동안 숙제를 하지 않고 놀 수 있는 최대 날의 수 */ #include <iostream> using namespace std; int L, A, B, C, D; void solution() { //방학 일수 l int l; //cout << "국어 총 " << A << "페이지, 수학 총 " << B << "페이지 남았습니다." << endl; //cout << "-" << endl; for(l = 1; l <= L; l++) { //방학 일수 L 만큼 반복A -= C; //cout << "DAY " << l << endl; if(A >= C) { A -= C; //cout << "국어 " << C << "페이지 완료해 " << A << "페이지 남았습니다." << endl; } if(B >= D) { B -= D; //cout << "수학 " << D << "페이지 완료해 " << B << "페이지 남았습니다." << endl; } //cout << "-" << endl; if(A < C || B < D) break; //더 할 숙제가 없으면 반복 종료 } if(A != 0 || B != 0) { //cout << "최종 국어 " << A << "페이지, 수학 " << B << "페이지 남았습니다." << endl; while(A > 0 || B > 0) { A -= C; //cout << "국어 " << C << "페이지 완료해 " << A << "페이지 남았습니다." << endl; B -= D; //cout << "수학 " << D << "페이지 완료해 " << B << "페이지 남았습니다." << endl; l++; } } cout << L - l << endl; } //C 국어 D 수학 int main() { cin >> L >> A >> B >> C >> D; solution(); return 0; }
bf2637afe4316285fcf2f2106bd393c5fae45b95
423007aec031f2b67117528912bd06c93ba4932f
/CPPExercises/Algorithms.h
b8b4e860176655ddf2232a3763f3d50fff081d27
[]
no_license
AlexanderMalyshev/CPPExercises
5391b6b18e4a806c1b31114ac85689304a82fd0c
7c542097b09233afd2a6dc41592d9d22cd04f693
refs/heads/master
2021-08-23T16:27:02.596941
2017-12-05T17:20:45
2017-12-05T17:20:45
104,525,461
0
0
null
null
null
null
UTF-8
C++
false
false
610
h
Algorithms.h
#pragma once #include <iostream> #include <vector> #include <algorithm> template <typename Type> std::ostream& operator << (std::ostream& o, const std::vector<Type>& v) { o << "Array: "; std::for_each(v.cbegin(), v.cend(), [&o](const Type& n) { o << n << " "; }); return o; } void GenerateVector(std::vector<int>& vec, const int& size); void QuickSort(std::vector<int>& vec, const int& start, const int& end); int BinarySearch(std::vector<int>& vec, const int& item, const int& start, const int& end); bool IsSorted(std::vector<int>& vec); void KthSmallestElements(std::vector<int>& vec, const int& k);
60e91ab956b5b31d4bc8ec53299d74a6d30b0bcf
60a15a584b00895e47628c5a485bd1f14cfeebbe
/comps/misc/input/DrvCommon2/VT5Profile.cpp
7d7f948478b8d8d21021a0ed764c2b7f0dba94eb
[]
no_license
fcccode/vt5
ce4c1d8fe819715f2580586c8113cfedf2ab44ac
c88049949ebb999304f0fc7648f3d03f6501c65b
refs/heads/master
2020-09-27T22:56:55.348501
2019-06-17T20:39:46
2019-06-17T20:39:46
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
8,639
cpp
VT5Profile.cpp
#include "StdAfx.h" //#include "Common.h" #include "Input.h" #include "VT5Profile.h" #if !defined(COMMON1) #include <ComDef.h> #include "misc_utils.h" #include "data5.h" #endif #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif CVT5ProfileManager::CVT5ProfileManager(LPCTSTR lpDrvName, bool bSingleProfile) : CStdProfileManager(bSingleProfile), m_sDriverName(lpDrvName) { } bool CVT5ProfileManager::IsVT5Profile() { IUnknown *punk = GetAppUnknown(); return punk!=NULL; } VARIANT CVT5ProfileManager::_GetProfileValue(LPCTSTR lpSection, LPCTSTR lpEntry, bool bIgnoreMethodic) { sptrINamedData sptrND(GetAppUnknown()); CString sSecName(_T("Input")); IUnknown *punkCM = _GetOtherComponent( GetAppUnknown(), IID_IDriverManager ); if (punkCM) { sptrIDriverManager sptrDM(punkCM); punkCM->Release(); BSTR bstr; sptrDM->GetSectionName(&bstr); sSecName = bstr; ::SysFreeString(bstr); } VARIANT var; ::VariantInit(&var); sSecName += CString("\\")+m_sDriverName; //sergey 01/02/06 è 11.05.06 CString s=lpEntry; //if(s==_T("ColorCamera"))-11.05.06 if(s==_T("ColorCamera")|| s==_T("CaptureFromPreview")|| s==_T("Fish")) sSecName += CString("\\")+SectionName(lpSection,true); else sSecName += CString("\\")+SectionName(lpSection,bIgnoreMethodic); //sSecName += CString("\\")+SectionName(lpSection,bIgnoreMethodic); //end CString sKeyName(lpEntry); BSTR bstrSecName = sSecName.AllocSysString(); BSTR bstrKeyName = sKeyName.AllocSysString(); sptrND->SetupSection(bstrSecName); sptrND->GetValue(bstrKeyName, &var); ::SysFreeString(bstrSecName); ::SysFreeString(bstrKeyName); return var; } VARIANT CVT5ProfileManager::GetDefaultProfileValue(LPCTSTR lpSection, LPCTSTR lpEntry, bool bIgnoreMethodic) { sptrINamedData sptrND(GetAppUnknown()); CString sSecName(_T("Input")); IUnknown *punkCM = _GetOtherComponent( GetAppUnknown(), IID_IDriverManager ); if (punkCM) { sptrIDriverManager sptrDM(punkCM); punkCM->Release(); BSTR bstr; sptrDM->GetSectionName(&bstr); sSecName = bstr; ::SysFreeString(bstr); } VARIANT var; ::VariantInit(&var); sSecName += CString("\\")+m_sDriverName; // if (lpSection) sSecName += CString("\\")+lpSection; sSecName += "-Default"; CString sKeyName(lpEntry); sptrND->SetupSection(_bstr_t((LPCTSTR)sSecName)); sptrND->GetValue(_bstr_t((LPCTSTR)sKeyName), &var); return var; } VARIANT CVT5ProfileManager::GetProfileValue(LPCTSTR lpSection, LPCTSTR lpEntry, bool bIgnoreMethodic) { VARIANT var = _GetProfileValue(lpSection, lpEntry, bIgnoreMethodic); if (var.vt == VT_EMPTY) var = GetDefaultProfileValue(lpSection, lpEntry); return var; } void CVT5ProfileManager::WriteProfileValue(LPCTSTR lpSection, LPCTSTR lpEntry, VARIANT var, bool bIgnoreMethodic) { sptrINamedData sptrND(GetAppUnknown()); CString sSecName(_T("Input")); IUnknown *punkCM = _GetOtherComponent( GetAppUnknown(), IID_IDriverManager ); if (punkCM) { sptrIDriverManager sptrDM(punkCM); punkCM->Release(); BSTR bstr; sptrDM->GetSectionName(&bstr); sSecName = bstr; ::SysFreeString(bstr); } sSecName += CString("\\")+m_sDriverName; // if (lpSection) sSecName += CString("\\")+SectionName(lpSection,bIgnoreMethodic); CString sKeyName(lpEntry); if (!sKeyName.IsEmpty() && !sSecName.IsEmpty()) { sptrND->SetupSection(_bstr_t((LPCTSTR)sSecName)); sptrND->SetValue(_bstr_t((LPCTSTR)sKeyName), var); } } int CVT5ProfileManager::_GetProfileInt(LPCTSTR lpSection, LPCTSTR lpEntry, int nDef, bool bIgnoreMethodic) { if (IsVT5Profile()) { VARIANT var = _GetProfileValue(lpSection, lpEntry); int nRet = nDef; if (var.vt == VT_I2) nRet = var.iVal; else if (var.vt == VT_I4) nRet = var.lVal; ::VariantClear(&var); return nRet; } else return CStdProfileManager::_GetProfileInt(lpSection, lpEntry, nDef, bIgnoreMethodic); } double CVT5ProfileManager::_GetProfileDouble(LPCTSTR lpSection, LPCTSTR lpEntry, double dDef, bool *pbDefValueUsed, bool bIgnoreMethodic) { if (IsVT5Profile()) { VARIANT var = _GetProfileValue(lpSection, lpEntry); double dRet = dDef; if (var.vt == VT_R4) dRet = var.fltVal; else if (var.vt == VT_R8) dRet = var.dblVal; if (pbDefValueUsed) *pbDefValueUsed = var.vt!=VT_R4&&var.vt!=VT_R8; ::VariantClear(&var); return dRet; } else return CStdProfileManager::_GetProfileDouble(lpSection, lpEntry, dDef, pbDefValueUsed, bIgnoreMethodic); } CString CVT5ProfileManager::_GetProfileString(LPCTSTR lpSection, LPCTSTR lpEntry, LPCTSTR lpDefault, bool bIgnoreMethodic) { if (IsVT5Profile()) { VARIANT var = _GetProfileValue(lpSection, lpEntry); CString sRet(lpDefault); if (var.vt == VT_BSTR) sRet = var.bstrVal; ::VariantClear(&var); return sRet; } else return CStdProfileManager::_GetProfileString(lpSection, lpEntry, lpDefault, bIgnoreMethodic); } int CVT5ProfileManager::GetDefaultProfileInt(LPCTSTR lpSection, LPCTSTR lpEntry, int nDef, bool bIgnoreMethodic) { if (IsVT5Profile()) { VARIANT var = GetDefaultProfileValue(lpSection, lpEntry); int nRet = nDef; if (var.vt == VT_I2) nRet = var.iVal; else if (var.vt == VT_I4) nRet = var.lVal; ::VariantClear(&var); return nRet; } else return CStdProfileManager::GetDefaultProfileInt(lpSection, lpEntry, nDef); } double CVT5ProfileManager::GetDefaultProfileDouble(LPCTSTR lpSection, LPCTSTR lpEntry, double dDef, bool *pbDefValueUsed, bool bIgnoreMethodic) { if (IsVT5Profile()) { VARIANT var = GetDefaultProfileValue(lpSection, lpEntry); double dRet = dDef; if (var.vt == VT_R4) dRet = var.fltVal; else if (var.vt == VT_R8) dRet = var.dblVal; if (pbDefValueUsed) *pbDefValueUsed = var.vt!=VT_R4&&var.vt!=VT_R8; ::VariantClear(&var); return dRet; } else return CStdProfileManager::GetDefaultProfileDouble(lpSection, lpEntry, dDef, pbDefValueUsed); } CString CVT5ProfileManager::GetDefaultProfileString(LPCTSTR lpSection, LPCTSTR lpEntry, LPCTSTR lpDefault, bool bIgnoreMethodic) { if (IsVT5Profile()) { VARIANT var = GetDefaultProfileValue(lpSection, lpEntry); CString sRet(lpDefault); if (var.vt == VT_BSTR) sRet = var.bstrVal; ::VariantClear(&var); return sRet; } else return CStdProfileManager::GetDefaultProfileString(lpSection, lpEntry, lpDefault); } void CVT5ProfileManager::WriteProfileInt(LPCTSTR lpSection, LPCTSTR lpEntry, int nValue, bool bIgnoreMethodic) { if (IsVT5Profile()) { VARIANT var; var.vt = VT_I4; var.lVal = nValue; WriteProfileValue(lpSection, lpEntry, var); } else CStdProfileManager::WriteProfileInt(lpSection, lpEntry, nValue, bIgnoreMethodic); } void CVT5ProfileManager::WriteProfileDouble(LPCTSTR lpSection, LPCTSTR lpEntry, double dValue, bool bIgnoreMethodic) { if (IsVT5Profile()) { VARIANT var; var.vt = VT_R8; var.dblVal = dValue; WriteProfileValue(lpSection, lpEntry, var); } else CStdProfileManager::WriteProfileDouble(lpSection, lpEntry, dValue, bIgnoreMethodic); } void CVT5ProfileManager::WriteProfileString(LPCTSTR lpSection, LPCTSTR lpEntry, LPCTSTR lpValue, bool bIgnoreMethodic) { if (IsVT5Profile()) { CString s(lpValue); _variant_t var; var.vt = VT_BSTR; var.bstrVal = s.AllocSysString(); WriteProfileValue(lpSection, lpEntry, var, bIgnoreMethodic); } else CStdProfileManager::WriteProfileString(lpSection, lpEntry, lpValue, bIgnoreMethodic); } static void CopySection(CString sDriverName, CString sSec) { sptrINamedData sptrND(GetAppUnknown()); CString sSecName(_T("Input")); IUnknown *punkCM = _GetOtherComponent( GetAppUnknown(), IID_IDriverManager ); if (punkCM) { sptrIDriverManager sptrDM(punkCM); punkCM->Release(); BSTR bstr; sptrDM->GetSectionName(&bstr); sSecName = bstr; ::SysFreeString(bstr); } sSecName += CString("\\")+sDriverName; if (!sSec.IsEmpty()) sSecName += CString("\\")+sSec; CString sSecDefault(sSecName); sSecDefault += "-Default"; sptrND->SetupSection(bstr_t((LPCTSTR)sSecDefault)); long nCount; HRESULT hr = sptrND->GetEntriesCount(&nCount); if (SUCCEEDED(hr)) { for (int i = 0; i < nCount; i++) { BSTR bstr; sptrND->SetupSection(bstr_t((LPCTSTR)sSecDefault)); sptrND->GetEntryName(i, &bstr); VARIANT var; VariantInit(&var); sptrND->GetValue(bstr, &var); sptrND->SetupSection(_bstr_t((LPCTSTR)sSecName)); sptrND->SetValue(bstr, var); ::SysFreeString(bstr); } } } void CVT5ProfileManager::InitSettings() { } void CVT5ProfileManager::ResetSettings() { CopySection(m_sDriverName, _T("Settings")); CopySection(m_sDriverName, _T("Source")); CopySection(m_sDriverName, _T("Format")); CopySection(m_sDriverName, _T("AVI")); }
ba3646357ef0d0c6481b7779153412f7dfc883eb
4ac6eb27481a672b5a2d06c319a449c5bb5dbda6
/C++/QT/tp5/mainwindow.cpp
133105624ef644fe4c7027265eb4558dfe1f8e45
[]
no_license
quentinDERORY/ENSICAEN
164af8281821e676f7b419e843f4d1620d46adc2
0e50c0d7470d991cbbca7d1d1309099b0fec6dec
refs/heads/master
2020-09-14T04:58:46.091625
2016-08-28T00:10:44
2016-08-28T00:10:44
66,688,534
0
0
null
null
null
null
UTF-8
C++
false
false
1,410
cpp
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { model = new InvoiceModel(); ui->setupUi(this); ui->vue->setModel(model); //Connect connect(ui->first_name,SIGNAL(textEdited(QString)),model,SLOT(setFirstname(QString))); connect(ui->last_name,SIGNAL(textEdited(QString)),model,SLOT(setLastname(QString))); connect(ui->adress1,SIGNAL(textEdited(QString)),model,SLOT(setAddressLine1(QString))); connect(ui->adress2,SIGNAL(textEdited(QString)),model,SLOT(setAddressLine2(QString))); connect(ui->city,SIGNAL(textEdited(QString)),model,SLOT(setCity(QString))); connect(ui->zipCode,SIGNAL(textEdited(QString)),model,SLOT(setZipcode(QString))); connect(ui->tableWidget,SIGNAL(cellChanged(int,int)),this,SLOT(cell(int,int))); } MainWindow::~MainWindow() { delete ui; } void MainWindow::cell(int x, int y){ QString tmp = ui->tableWidget->itemAt(x,y)->text(); model->setCell(x,y,tmp); } void MainWindow::on_actionQuitter_triggered() { this->close(); } void MainWindow::on_actionOuvrir_triggered() { model = new InvoiceModel(); ui->vue->setModel(model); ui->adress1->clear(); ui->adress2->clear(); ui->first_name->clear(); ui->last_name->clear(); ui->city->clear(); ui->zipCode->clear(); ui->tableWidget->clear(); }
f0bad673979a5ea68e43b3425b64122450f05dfc
96dbd470db1da75cfbe0f6971a44e0e3611cb0f1
/Timus_1022/main.cpp
85c2677c72f366583bc057721d2933b6993ca7d5
[]
no_license
MatrixDeity/Problems
1d3c0ce1075f425f8ac4d39c32a0c87d94fc4061
f7899cebbb8c09b1cd526dfe6ee9d649e0071327
refs/heads/master
2023-07-09T08:01:05.575383
2023-06-24T21:32:07
2023-06-24T21:32:07
102,288,478
0
0
null
null
null
null
UTF-8
C++
false
false
882
cpp
main.cpp
/** Timus_1022 http://acm.timus.ru/problem.aspx?space=1&num=1022 MatrixDeity, 2017. */ #include <iostream> #include <vector> #include <algorithm> using namespace std; using Graph = vector<vector<int>>; void dfs(Graph& graph, int from, vector<bool>& used, vector<int>& anses) { if (used[from]) return; used[from] = true; for (int node : graph[from]) dfs(graph, node, used, anses); anses.push_back(from); } int main() { int n; cin >> n; Graph graph(n + 1); vector<bool> used(n + 1); vector<int> anses; for (int i = 1; i <= n; ++i) { int a; while (cin >> a && a != 0) { graph[i].push_back(a); } } for (int i = 1; i <= n; ++i) dfs(graph, i, used, anses); for (auto it = anses.rbegin(); it != anses.rend(); ++it) cout << *it << ' '; return 0; }
8a094d8ec4c26155e45d23291ac1c877b548260f
52046a76984ffc81e588babaaaab906b2fb154ed
/SPOJ/String/Pattern Find.cpp
9885e4bf3a9be1b143c248877637af38ef3d500b
[]
no_license
amoghj8/Cpp-Refresher
141d46537f0ed1d2216f5b54510f4ee52ecd4aac
239a7a08c6e4f60a5ea3a1aedefad6a0dd188181
refs/heads/master
2023-02-15T16:49:15.214837
2021-01-03T18:37:38
2021-01-03T18:37:38
281,087,522
0
0
null
null
null
null
UTF-8
C++
false
false
1,592
cpp
Pattern Find.cpp
#include<bits/stdc++.h> using namespace std; #define lli long long int #define mod 1000000007 lli dp[1000001], inv[1000001]; string text, pattern; lli computeHash(string input) { int p = 31; lli p_power = 1; lli result = 0; for(auto ch: input) { result = (result + (ch-'a'+1)*p_power) % mod; p_power = (p_power * p) % mod; } return result; } void init(){ inv[0] = 1; dp[0] = text[0]-'a'+1; lli p_power = 1; lli p = 31; for(int i=1;i<text.size();i++) { p_power = (p_power * p ) % mod; dp[i] = (dp[i-1] + (text[i]-'a'+1)*p_power) % mod; inv[i] = p_power % mod; } } lli matchHash(int start, int end) { lli result = dp[end]; if(start>0) { result = (result - dp[start-1] + mod) % mod; } return result; } int main() { int testCases; cin >> testCases; while(testCases--) { cin.ignore(); cin >> text >> pattern; lli hashInput = computeHash(pattern); init(); bool found = false; vector<int> result; for(int start=0, end=pattern.size()-1;end<text.size();start++, end++) { lli tempHash = (hashInput * inv[start]) % mod; if(tempHash == matchHash(start, end)){ found = true; result.push_back(start+1); } } if(!found) cout << "Not Found"<< endl; else { cout << result.size() << endl; for(auto occ:result) { cout << occ << " "; } cout << endl; } } return 0; }
e288b33cd86ca6941a22b26b27013ea05242fe19
8f02939917edda1e714ffc26f305ac6778986e2d
/BOJ/8286/main.cc
b8505f0a036b99918d227d0695cd548a422fb9c2
[]
no_license
queuedq/ps
fd6ee880d67484d666970e7ef85459683fa5b106
d45bd3037a389495d9937afa47cf0f74cd3f09cf
refs/heads/master
2023-08-18T16:45:18.970261
2023-08-17T17:04:19
2023-08-17T17:04:19
134,966,734
5
0
null
null
null
null
UTF-8
C++
false
false
1,007
cc
main.cc
#include <bits/stdc++.h> #define endl "\n" #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() using namespace std; using lld = long long; using pii = pair<int, int>; using pll = pair<lld, lld>; //////////////////////////////////////////////////////////////// const int MN = 2e6+5; int N, deg[MN]; vector<pii> ans; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); //////////////////////////////// cin >> N; vector<int> A, B; for (int u=1; u<=N; u++) { cin >> deg[u]; if (deg[u] == 1) A.push_back(u); else B.push_back(u); } while (!A.empty() && !B.empty()) { int u = A.back(), v = B.back(); ans.push_back({u, v}); deg[u]--, deg[v]--; A.pop_back(); if (deg[v] == 1) { B.pop_back(); A.push_back(v); } } if (sz(A) == 2 && sz(B) == 0) { ans.push_back({A[0], A[1]}); for (auto [u, v]: ans) cout << u << " " << v << endl; } else { cout << "BRAK" << endl; } //////////////////////////////// return 0; }
b1d8ab444154e95eddd1bb2f57476b6ecde96af4
067f91c6c3c241f4c51f6c4f34fce96b34245294
/00_pkg_src/GWmodel/src-i386/GWmodelCUDA/CGWmodelCUDA.cpp
c5a6feb39ff35536d5cd22098beb72eccf1a4e5f
[]
no_license
lbb220/GWmodel.Rcheck
93a1bf9d93078f7c17fb5ec109e6176ec1d65180
f45d7bce59e75ac5ebe0f19a47e73c10ab11e505
refs/heads/master
2021-07-15T14:29:31.424417
2021-02-07T10:31:18
2021-02-07T10:31:18
234,888,376
1
2
null
null
null
null
UTF-8
C++
false
false
26,502
cpp
CGWmodelCUDA.cpp
#include <armadillo> #include <cuda_runtime.h> #include <cublas_v2.h> #include <stdio.h> #include <time.h> #include "helper.h" #include "CGWmodelCUDA.h" #include "GWmodelKernel.h" #ifdef ENABLE_PREVIEW #include "preview.h" #endif // ENABLE_PREVIEW using namespace arma; #define RESERVE_GPU_MEM ((long long int)2*1024*1024*1024) CGWmodelCUDA::CGWmodelCUDA() : x(0, 0) , y((uword)0) , dp(0, 0) , rp(0, 0) , dMat(0, 0) , betas(0, 0) , betasSE(0, 0) , s_hat((uword)0) , qdiag((uword)0) { rp_given = false; dm_given = false; } CGWmodelCUDA::CGWmodelCUDA(int N, int K, bool rp_given, int n, bool dm_given) : x(K, N, fill::zeros) , y(N, fill::zeros) , dp(N, 2, fill::zeros) , betas(0, 0) , betasSE(0, 0) , s_hat((uword)0) , qdiag((uword)0) { this->rp_given = rp_given; this->dm_given = dm_given; if (rp_given) rp = mat(n, 2, fill::zeros); else rp = mat(N, 2); if (dm_given) dMat = mat(N, n, fill::zeros); else dMat = mat(0, 0); } CGWmodelCUDA::~CGWmodelCUDA() { x.clear(); y.clear(); dp.clear(); rp.clear(); dMat.clear(); rp_given = false; dm_given = false; } void CGWmodelCUDA::SetX(int i, int k, double value) { x(i, k) = value; } void CGWmodelCUDA::SetY(int i, double value) { y(i) = value; } void CGWmodelCUDA::SetDp(int i, double u, double v) { dp(i, 0) = u; dp(i, 1) = v; } void CGWmodelCUDA::SetRp(int i, double u, double v) { rp(i, 0) = u; rp(i, 1) = v; } void CGWmodelCUDA::SetDmat(int i, int j, double value) { dMat(i, j) = value; } double CGWmodelCUDA::GetBetas(int i, int k) { return betas(k, i); } double CGWmodelCUDA::GetBetasSE(int i, int k) { return betasSE(k, i); } double CGWmodelCUDA::GetShat1() { return s_hat(0); } double CGWmodelCUDA::GetShat2() { return s_hat(1); } double CGWmodelCUDA::GetQdiag(int i) { return qdiag(i); } bool CGWmodelCUDA::Regression(bool hatmatrix, double p, double theta, bool longlat, double bw, int kernel, bool adaptive, int groupl, int gpuID) { if (rp_given) hatmatrix = false; int n = rp.n_rows, N = dp.n_rows, K = x.n_rows; // ==================== // Check GPU properties // ==================== int gpuCount = 0; checkRegCudaErrors(cudaGetDeviceCount(&gpuCount)); if (gpuID >= gpuCount) { return false; } cudaDeviceProp devProp; checkRegCudaErrors(cudaGetDeviceProperties(&devProp, gpuID)); int smNum = devProp.multiProcessorCount; if (groupl <= 0) { groupl = (devProp.totalGlobalMem - RESERVE_GPU_MEM) / N / K / sizeof(double) / smNum * smNum; } int maxThreads = devProp.maxThreadsPerBlock; #ifdef PRINT_CLOCKS printf("GPU Device: %s. \t Group length: %d\n", devProp.name, groupl); #endif // PRINT_CLOCKS // ============ // Cuda prepare // ============ cublasHandle_t handle; cublasCreate(&handle); // ==================== // Armadillo Precompute // ==================== betas = mat(K, n, fill::zeros); // ============ // dp rp prepare // ============ double *d_dp, *d_rp; checkRegCudaErrors(cudaMalloc((void **)&d_dp, sizeof(double) * N * 2)); checkRegCudaErrors(cudaMemcpy(d_dp, dp.mem, sizeof(double) * N * 2, cudaMemcpyHostToDevice)); if (rp_given) { checkRegCudaErrors(cudaMalloc((void **)&d_rp, sizeof(double) * n * 2)); checkRegCudaErrors(cudaMemcpy(d_rp, rp.mem, sizeof(double) * n * 2, cudaMemcpyHostToDevice)); } else d_rp = d_dp; if (p != 2.0 && theta != 0.0 && !longlat) { checkRegCudaErrors(gw_coordinate_rotate_cuda(d_dp, N, theta, maxThreads)); if (rp_given) { checkRegCudaErrors(gw_coordinate_rotate_cuda(d_rp, n, theta, maxThreads)); } } // ========================= // Regression with hatmatrix // ========================= if (hatmatrix) { betasSE = mat(K, n, fill::zeros); s_hat = vec(2, fill::zeros); qdiag = vec(N, fill::zeros); // ---------------- // Group Parameters // ---------------- int groups = n / groupl + (n % groupl == 0 ? 0 : 1); // ----------------- // CUDA memory alloc // ----------------- // Single matrix double *d_x, *d_y, *d_dists, *d_weights; checkRegCudaErrors(cudaMalloc((void **)&d_x, sizeof(double) * K * N)); checkRegCudaErrors(cudaMalloc((void **)&d_y, sizeof(double) * N * 1)); checkRegCudaErrors(cudaMalloc((void **)&d_dists, sizeof(double) * N * 1)); checkRegCudaErrors(cudaMalloc((void **)&d_weights, sizeof(double) * N * 1)); checkRegCudaErrors(cudaMemcpy(d_x, x.mem, sizeof(double) * N * K, cudaMemcpyHostToDevice)); checkRegCudaErrors(cudaMemcpy(d_y, y.mem, sizeof(double) * N * 1, cudaMemcpyHostToDevice)); // Matrix array double **p_xA = new double*[groupl], **p_yA = new double*[groupl]; for (size_t i = 0; i < groupl; i++) { p_xA[i] = d_x; p_yA[i] = d_y; } double **p_xiA = new double*[N], **d_xiA; for (size_t i = 0; i < N; i++) { p_xiA[i] = d_x + i * K; } checkRegCudaErrors(cudaMalloc((void **)&d_xiA, sizeof(double*) * N)); checkRegCudaErrors(cudaMemcpy(d_xiA, p_xiA, sizeof(double*) * N, cudaMemcpyHostToDevice)); double **p_xtwA, **p_xtwxA, **p_xtwyA, **p_xtwxRA, **p_betaA; p_xtwA = new double*[groupl]; p_xtwxA = new double*[groupl]; p_xtwyA = new double*[groupl]; p_xtwxRA = new double*[groupl]; p_betaA = new double*[groupl]; for (size_t i = 0; i < groupl; i++) { checkRegCudaErrors(cudaMalloc((void **)&p_xtwA[i], sizeof(double) * K * N)); checkRegCudaErrors(cudaMalloc((void **)&p_xtwxA[i], sizeof(double) * K * K)); checkRegCudaErrors(cudaMalloc((void **)&p_xtwyA[i], sizeof(double) * K * 1)); checkRegCudaErrors(cudaMalloc((void **)&p_xtwxRA[i], sizeof(double) * K * K)); checkRegCudaErrors(cudaMalloc((void **)&p_betaA[i], sizeof(double) * K * 1)); } double **d_xtwxA, **d_xtwxRA; checkRegCudaErrors(cudaMalloc((void **)&d_xtwxA, sizeof(double*) * groupl)); checkRegCudaErrors(cudaMalloc((void **)&d_xtwxRA, sizeof(double*) * groupl)); checkRegCudaErrors(cudaMemcpy(d_xtwxA, p_xtwxA, sizeof(double*) * groupl, cudaMemcpyHostToDevice)); checkRegCudaErrors(cudaMemcpy(d_xtwxRA, p_xtwxRA, sizeof(double*) * groupl, cudaMemcpyHostToDevice)); // Info vector int *d_info; checkRegCudaErrors(cudaMalloc((void **)&d_info, sizeof(int) * n)); // qdiag double *d_qdiag, *d_S, *d_C; checkRegCudaErrors(cudaMalloc((void **)&d_S, sizeof(double) * 1 * N)); checkRegCudaErrors(cudaMalloc((void **)&d_C, sizeof(double) * N * K)); checkRegCudaErrors(cudaMalloc((void **)&d_qdiag, sizeof(double) * N * 1)); checkRegCudaErrors(cudaMemset(d_qdiag, 0, sizeof(double) * N * 1)); // ---------------- // Begin regression // ---------------- #ifdef PRINT_CLOCKS printf("%d Groups, %d items per group.\n", groups, groupl); clock_t clock0, clock1; const char* time_format = "%8.2lfs"; printf("%14s", " "); printf("%9s", "xtw"); //printf("%9s", "gemm"); printf("%9s", "Matinv"); printf("%9s", "beta"); printf("%9s", "S"); printf("%9s", "C"); printf("%9s", "betaSE"); printf("%9s", "s_hat"); printf("%9s", "q_diag"); printf("%9s", "Total"); printf("\n"); #endif for (size_t g = 0; g < groups; g++) { #ifdef PRINT_CLOCKS printf("Group %6d: ", g); clock0 = clock(); clock1 = clock0; clock_t clock_xtw = 0, clock_gemm_xtw = 0; #endif // PRINT_CLOCKS size_t begin = g * groupl, end = g == (groups - 1) ? n : (g + 1) * groupl, groupn = end - begin; double alpha = 1.0, beta = 0.0; // ~~~~~~~~~~~~~~~~~~~~ // Calculate xtwx, xtwy // ~~~~~~~~~~~~~~~~~~~~ for (int i = begin; i < end; i++) { size_t e = i - begin; #ifdef PRINT_CLOCKS //clock_t clocki = clock(); #endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Calculate dist, weight, xtw // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (dm_given) { checkRegCudaErrors(cudaMemcpy(d_dists, (void *)dMat.col(i).colmem, sizeof(double) * N, cudaMemcpyHostToDevice)); } else { checkRegCudaErrors(gw_dist_cuda(d_dp, d_rp, N, n, i, p, theta, longlat, rp_given, d_dists, maxThreads)); } checkRegCudaErrors(gw_weight_cuda(bw, kernel, adaptive, d_dists, d_weights, N, 1, maxThreads)); //checkCudaErrors(cudaDeviceSynchronize()); //#ifdef PRINT_CLOCKS // clock_xtw += (clock() - clocki); clocki = clock(); //#endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~~~~~~~ // Calculate xtwx, xtwy // ~~~~~~~~~~~~~~~~~~~~ checkRegCudaErrors(cublasDdgmm(handle, CUBLAS_SIDE_RIGHT, K, N, d_x, K, d_weights, 1, p_xtwA[e], K)); checkRegCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_T, K, K, N, &alpha, p_xtwA[e], K, d_x, K, &beta, p_xtwxA[e], K)); checkRegCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_N, K, 1, N, &alpha, p_xtwA[e], K, d_y, N, &beta, p_xtwyA[e], K)); #ifdef PRINT_CLOCKS //clock_gemm_xtw += (clock() - clocki); #endif // PRINT_CLOCKS } #ifdef PRINT_CLOCKS checkRegCudaErrors(cudaDeviceSynchronize()); printf(time_format, (double)(clock() - clock1) / CLOCKS_PER_SEC); clock1 = clock(); //printf(time_format, (double)(clock_xtw) / CLOCKS_PER_SEC); //printf(time_format, (double)(clock_gemm_xtw) / CLOCKS_PER_SEC); clock1 = clock(); #endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~~~~~~~~~~~~ // Calculate inverse of xtwx // ~~~~~~~~~~~~~~~~~~~~~~~~~ checkRegCudaErrors(cublasDmatinvBatched(handle, K, d_xtwxA, K, d_xtwxRA, K, d_info, groupn)); checkRegCudaErrors(cudaDeviceSynchronize()); #ifdef PRINT_CLOCKS printf(time_format, (double)(clock() - clock1) / CLOCKS_PER_SEC); clock1 = clock(); #endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Calculate Diagnosis Information // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ clock_t clock_beta = 0, clock_gemm_S = 0, clock_gemm_C = 0, clock_betasSE = 0, clock_s_hat = 0, clock_qdiag = 0; for (size_t i = begin; i < end; i++) { size_t e = i - begin; #ifdef PRINT_CLOCKS clock_t clocki = clock(); #endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~ // Calculate beta // ~~~~~~~~~~~~~~ checkRegCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_N, K, 1, K, &alpha, p_xtwxRA[e], K, p_xtwyA[e], K, &beta, p_betaA[e], K)); checkRegCudaErrors(cudaMemcpy((void *)betas.colptr(i), p_betaA[e], sizeof(double) * K, cudaMemcpyDeviceToHost)); #ifdef PRINT_CLOCKS clock_beta += (clock() - clocki); clocki = clock(); #endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~~~ // calculate ci, si // ~~~~~~~~~~~~~~~~ checkRegCudaErrors(cublasDgemm(handle, CUBLAS_OP_T, CUBLAS_OP_T, N, K, K, &alpha, p_xtwA[e], K, p_xtwxRA[e], K, &beta, d_C, N)); checkRegCudaErrors(cudaDeviceSynchronize()); #ifdef PRINT_CLOCKS clock_gemm_S += (clock() - clocki); clocki = clock(); #endif // PRINT_CLOCKS checkRegCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_N, N, 1, K, &alpha, d_C, N, p_xiA[i], K, &beta, d_S, N)); checkRegCudaErrors(cudaDeviceSynchronize()); #ifdef PRINT_CLOCKS clock_gemm_C += (clock() - clocki); clocki = clock(); #endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~~~~ // calculate betasSE // ~~~~~~~~~~~~~~~~~ double *betaSE = betasSE.colptr(i); for (size_t j = 0; j < K; j++) { checkRegCudaErrors(cublasDdot(handle, N, d_C + j * N, 1, d_C + j * N, 1, betaSE + K)); } #ifdef PRINT_CLOCKS clock_betasSE += (clock() - clocki); clocki = clock(); #endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~~ // calculate s_hat // ~~~~~~~~~~~~~~~ double s1, s2; checkRegCudaErrors(cudaMemcpy((void *)&s1, d_S + i, sizeof(double), cudaMemcpyDeviceToHost)); checkRegCudaErrors(cublasDdot(handle, N, d_S, 1, d_S, 1, &s2)); s_hat(0) += s1; s_hat(1) += s2; #ifdef PRINT_CLOCKS clock_s_hat += (clock() - clocki); clocki = clock(); #endif // PRINT_CLOCKS // ~~~~~~~~~~~~~~~~~ // calculate diag(q) // ~~~~~~~~~~~~~~~~~ checkRegCudaErrors(gw_qdiag_cuda(d_S, N, i, d_qdiag, maxThreads)); checkRegCudaErrors(cudaDeviceSynchronize()); #ifdef PRINT_CLOCKS clock_qdiag += (clock() - clocki); clocki = clock(); #endif // PRINT_CLOCKS } #ifdef PRINT_CLOCKS printf(time_format, (double)(clock_beta) / CLOCKS_PER_SEC); printf(time_format, (double)(clock_gemm_S) / CLOCKS_PER_SEC); printf(time_format, (double)(clock_gemm_C) / CLOCKS_PER_SEC); printf(time_format, (double)(clock_betasSE) / CLOCKS_PER_SEC); printf(time_format, (double)(clock_s_hat) / CLOCKS_PER_SEC); printf(time_format, (double)(clock_qdiag) / CLOCKS_PER_SEC); printf(time_format, (double)(clock() - clock0) / CLOCKS_PER_SEC); printf("\n"); #endif // PRINT_CLOCKS } checkRegCudaErrors(cudaMemcpy((double *)qdiag.mem, d_qdiag, sizeof(double) * N * 1, cudaMemcpyDeviceToHost)); // ---------------- // Free Cuda Memory // ---------------- checkRegCudaErrors(cudaFree(d_x)); checkRegCudaErrors(cudaFree(d_y)); checkRegCudaErrors(cudaFree(d_dists)); checkRegCudaErrors(cudaFree(d_weights)); checkRegCudaErrors(cudaFree(d_xiA)); checkRegCudaErrors(cudaFree(d_xtwxA)); checkRegCudaErrors(cudaFree(d_xtwxRA)); checkRegCudaErrors(cudaFree(d_info)); checkRegCudaErrors(cudaFree(d_qdiag)); checkRegCudaErrors(cudaFree(d_S)); checkRegCudaErrors(cudaFree(d_C)); delete p_xA; p_xA = nullptr; delete p_yA; p_yA = nullptr; delete p_xiA; p_xiA = nullptr; for (size_t i = 0; i < groupl; i++) { checkRegCudaErrors(cudaFree((void *)p_xtwA[i])); checkRegCudaErrors(cudaFree((void *)p_xtwxA[i])); checkRegCudaErrors(cudaFree((void *)p_xtwyA[i])); checkRegCudaErrors(cudaFree((void *)p_xtwxRA[i])); checkRegCudaErrors(cudaFree((void *)p_betaA[i])); } delete p_xtwA; p_xtwA = nullptr; delete p_xtwyA; p_xtwyA = nullptr; delete p_xtwxA; p_xtwxA = nullptr; delete p_xtwxRA; p_xtwxRA = nullptr; delete p_betaA; p_betaA = nullptr; } // ============================= // Regression with out hatmatrix // ============================= else { // ----------------- // CUDA memory alloc // ----------------- int groupl = smNum * maxThreads, groups = n / groupl + (n % groupl == 0 ? 0 : 1); #ifdef PRINT_CLOCKS printf("%d Groups, %d items per group.\n", groups, groupl); #endif // PRINT_CLOCKS // Single matrix double *d_x, *d_y, *d_xtw, *d_dists, *d_weights; checkRegCudaErrors(cudaMalloc((void **)&d_x, sizeof(double) * N * K)); checkRegCudaErrors(cudaMalloc((void **)&d_y, sizeof(double) * N * 1)); checkRegCudaErrors(cudaMalloc((void **)&d_xtw, sizeof(double) * N * K)); checkRegCudaErrors(cudaMalloc((void **)&d_dists, sizeof(double) * N)); checkRegCudaErrors(cudaMalloc((void **)&d_weights, sizeof(double) * N)); checkRegCudaErrors(cudaMemcpy(d_x, x.mem, sizeof(double) * N * K, cudaMemcpyHostToDevice)); checkRegCudaErrors(cudaMemcpy(d_y, y.mem, sizeof(double) * N * 1, cudaMemcpyHostToDevice)); double **p_xtwxA, **p_xtwyA, **p_xtwxRA, **p_betaA; p_xtwxA = new double*[groupl]; p_xtwyA = new double*[groupl]; p_xtwxRA = new double*[groupl]; p_betaA = new double*[groupl]; for (size_t i = 0; i < groupl; i++) { checkRegCudaErrors(cudaMalloc((void **)&p_xtwxA[i], sizeof(double) * K * K)); checkRegCudaErrors(cudaMalloc((void **)&p_xtwyA[i], sizeof(double) * K * 1)); checkRegCudaErrors(cudaMalloc((void **)&p_xtwxRA[i], sizeof(double) * K * K)); checkRegCudaErrors(cudaMalloc((void **)&p_betaA[i], sizeof(double) * K * 1)); } double **d_xtwxA, **d_xtwxRA; checkRegCudaErrors(cudaMalloc((void **)&d_xtwxA, sizeof(double*) * groupl)); checkRegCudaErrors(cudaMalloc((void **)&d_xtwxRA, sizeof(double*) * groupl)); checkRegCudaErrors(cudaMemcpy(d_xtwxA, p_xtwxA, sizeof(double*) * groupl, cudaMemcpyHostToDevice)); checkRegCudaErrors(cudaMemcpy(d_xtwxRA, p_xtwxRA, sizeof(double*) * groupl, cudaMemcpyHostToDevice)); int *d_info; checkRegCudaErrors(cudaMalloc((void **)&d_info, sizeof(int) * groupl)); #ifdef PRINT_CLOCKS // clocks // ------ clock_t clock0 = clock(); const char* time_format = "%10.2lfs"; printf("%13s", " "); printf("%11s", "xtw"); printf("%11s", "gemm"); printf("%11s", "Matinv"); printf("%11s", "beta"); printf("%11s", "Total"); printf("\n"); #endif // PRINT_CLOCKS // ---------------- // Begin regression // ---------------- //printf("\n"); double one = 1.0, zero = 0.0; for (size_t g = 0; g < groups; g++) { size_t begin = g * groupl, end = g == (groups - 1) ? n : (g + 1) * groupl, groupn = end - begin; // ~~~~~~~~~~~~~~~~~~~ // Calculate xtwx xtwy // ~~~~~~~~~~~~~~~~~~~ #ifdef PRINT_CLOCKS printf("Group %5d: ", g); clock_t clock1 = clock(), clock_gemm = 0; #endif for (int i = begin; i < end; i++) { size_t e = i - begin; #ifdef PRINT_CLOCKS clock_t clocki = clock(); #endif // PRINT_CLOCKS if (dm_given) { checkRegCudaErrors(cudaMemcpy(d_dists, (void *)dMat.col(i).colmem, sizeof(double) * N, cudaMemcpyHostToDevice)); } else { checkRegCudaErrors(gw_dist_cuda(d_dp, d_rp, N, n, i, p, theta, longlat, rp_given, d_dists, maxThreads)); } checkRegCudaErrors(gw_weight_cuda(bw, kernel, adaptive, d_dists, d_weights, N, 1, maxThreads)); checkRegCudaErrors(gw_xtw_cuda(d_x, d_weights, N, K, d_xtw, maxThreads)); checkRegCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_T, K, K, N, &one, d_xtw, K, d_x, K, &zero, p_xtwxA[e], K)); checkRegCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_N, K, 1, N, &one, d_xtw, K, d_y, N, &zero, p_xtwyA[e], K)); #ifdef PRINT_CLOCKS clock_gemm += (clock() - clocki); clocki = clock(); #endif // PRINT_CLOCKS } #ifdef PRINT_CLOCKS printf(time_format, (double)(clock_gemm) / CLOCKS_PER_SEC); clock1 = clock(); #endif // ~~~~~~~~~~~~~~ // Matrix inverse // ~~~~~~~~~~~~~~ checkRegCudaErrors(cublasDmatinvBatched(handle, K, d_xtwxA, K, d_xtwxRA, K, d_info, groupn)); #ifdef PRINT_CLOCKS printf(time_format, (double)(clock() - clock1) / CLOCKS_PER_SEC); clock1 = clock(); #endif // ~~~~~~~~~~~~~~ // calculate beta // ~~~~~~~~~~~~~~ for (size_t i = begin; i < end; i++) { size_t e = i - begin; checkRegCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_N, K, 1, K, &one, p_xtwxRA[e], K, p_xtwyA[e], K, &zero, p_betaA[e], K)); checkRegCudaErrors(cudaMemcpy((void *)betas.col(i).colmem, p_betaA[e], sizeof(double) * K, cudaMemcpyDeviceToHost)); } #ifdef PRINT_CLOCKS printf(time_format, (double)(clock() - clock1) / CLOCKS_PER_SEC); clock1 = clock(); printf(time_format, (double)(clock() - clock0) / CLOCKS_PER_SEC); clock0 = clock(); printf("\n"); #endif } #ifdef PRINT_CLOCKS printf(time_format, (double)(clock() - clock0) / CLOCKS_PER_SEC); printf("\n"); #endif // ---------------- // Free Cuda Memory // ---------------- checkRegCudaErrors(cudaFree(d_x)); checkRegCudaErrors(cudaFree(d_y)); checkRegCudaErrors(cudaFree(d_dists)); checkRegCudaErrors(cudaFree(d_weights)); checkRegCudaErrors(cudaFree(d_xtwxA)); checkRegCudaErrors(cudaFree(d_xtwxRA)); checkRegCudaErrors(cudaFree(d_info)); for (size_t i = 0; i < groupl; i++) { checkRegCudaErrors(cudaFree(p_xtwxA[i])); checkRegCudaErrors(cudaFree(p_xtwyA[i])); checkRegCudaErrors(cudaFree(p_xtwxRA[i])); checkRegCudaErrors(cudaFree(p_betaA[i])); } delete[] p_xtwxA; p_xtwxA = nullptr; delete[] p_xtwyA; p_xtwyA = nullptr; delete[] p_xtwxRA; p_xtwxRA = nullptr; delete[] p_betaA; p_betaA = nullptr; } checkRegCudaErrors(cudaFree(d_dp)); if (rp_given) { checkRegCudaErrors(cudaFree(d_rp)); } cublasDestroy(handle); return true; } double CGWmodelCUDA::CV(double p, double theta, bool longlat, double bw, int kernel, bool adaptive, int groupl, int gpuID) { int n = rp.n_rows, N = dp.n_rows, K = x.n_rows; // ==================== // Check GPU properties // ==================== int gpuCount = 0; checkCvCudaErrors(cudaGetDeviceCount(&gpuCount)); if (gpuID >= gpuCount) { return false; } cudaDeviceProp devProp; checkCvCudaErrors(cudaGetDeviceProperties(&devProp, gpuID)); int smNum = devProp.multiProcessorCount; int maxThreads = devProp.maxThreadsPerBlock; if (groupl <= 0) { groupl = smNum * maxThreads / 2; } #ifdef PRINT_CLOCKS printf("GPU Device: %s. \t Group length: %d\n", devProp.name, groupl); #endif // PRINT_CLOCKS // ============ // Cuda prepare // ============ cublasHandle_t handle; cublasCreate(&handle); // ==================== // Armadillo Precompute // ==================== //betas = mat(K, n, fill::zeros); double cv = 0.0; // ============ // dp rp prepare // ============ double *d_dp; checkCvCudaErrors(cudaMalloc((void **)&d_dp, sizeof(double) * N * 2)); checkCvCudaErrors(cudaMemcpy(d_dp, dp.mem, sizeof(double) * N * 2, cudaMemcpyHostToDevice)); if (p != 2.0 && theta != 0.0 && !longlat) { checkCvCudaErrors(gw_coordinate_rotate_cuda(d_dp, N, theta, maxThreads)); } int groups = n / groupl + (n % groupl == 0 ? 0 : 1); #ifdef PRINT_CLOCKS printf("%d Groups, %d items per group.\n", groups, groupl); #endif // PRINT_CLOCKS // Single matrix double *d_x, *d_y, *d_xtw, *d_dists, *d_weights; checkCvCudaErrors(cudaMalloc((void **)&d_x, sizeof(double) * N * K)); checkCvCudaErrors(cudaMalloc((void **)&d_y, sizeof(double) * N * 1)); checkCvCudaErrors(cudaMalloc((void **)&d_xtw, sizeof(double) * N * K)); checkCvCudaErrors(cudaMalloc((void **)&d_dists, sizeof(double) * N)); checkCvCudaErrors(cudaMalloc((void **)&d_weights, sizeof(double) * N)); checkCvCudaErrors(cudaMemcpy(d_x, x.mem, sizeof(double) * N * K, cudaMemcpyHostToDevice)); checkCvCudaErrors(cudaMemcpy(d_y, y.mem, sizeof(double) * N * 1, cudaMemcpyHostToDevice)); double **p_xtwxA, **p_xtwyA, **p_xtwxRA, **p_betaA; p_xtwxA = new double*[groupl]; p_xtwyA = new double*[groupl]; p_xtwxRA = new double*[groupl]; p_betaA = new double*[groupl]; for (size_t i = 0; i < groupl; i++) { checkCvCudaErrors(cudaMalloc((void **)&p_xtwxA[i], sizeof(double) * K * K)); checkCvCudaErrors(cudaMalloc((void **)&p_xtwyA[i], sizeof(double) * K * 1)); checkCvCudaErrors(cudaMalloc((void **)&p_xtwxRA[i], sizeof(double) * K * K)); checkCvCudaErrors(cudaMalloc((void **)&p_betaA[i], sizeof(double) * K * 1)); } double **p_xiA = new double*[N]; for (size_t i = 0; i < N; i++) { p_xiA[i] = d_x + i * K; } double **d_xtwxA, **d_xtwxRA; checkCvCudaErrors(cudaMalloc((void **)&d_xtwxA, sizeof(double*) * groupl)); checkCvCudaErrors(cudaMalloc((void **)&d_xtwxRA, sizeof(double*) * groupl)); checkCvCudaErrors(cudaMemcpy(d_xtwxA, p_xtwxA, sizeof(double*) * groupl, cudaMemcpyHostToDevice)); checkCvCudaErrors(cudaMemcpy(d_xtwxRA, p_xtwxRA, sizeof(double*) * groupl, cudaMemcpyHostToDevice)); int *p_info, *d_info; p_info = new int[groupl]; checkCvCudaErrors(cudaMalloc((void **)&d_info, sizeof(int) * groupl)); #ifdef PRINT_CLOCKS // clocks // ------ clock_t clock0 = clock(); const char* time_format = "%10.2lfs"; printf("%13s", " "); printf("%11s", "xtw"); printf("%11s", "gemm"); printf("%11s", "Matinv"); printf("%11s", "beta"); printf("%11s", "Total"); printf("\n"); #endif // PRINT_CLOCKS // ---------------- // Begin regression // ---------------- //printf("\n"); double one = 1.0, zero = 0.0; for (size_t g = 0; g < groups; g++) { size_t begin = g * groupl, end = g == (groups - 1) ? n : (g + 1) * groupl, groupn = end - begin; // ~~~~~~~~~~~~~~~~~~~ // Calculate xtwx xtwy // ~~~~~~~~~~~~~~~~~~~ #ifdef PRINT_CLOCKS printf("Group %5d: ", g); clock_t clock1 = clock(), clock_gemm = 0; #endif for (int i = begin; i < end; i++) { size_t e = i - begin; #ifdef PRINT_CLOCKS clock_t clocki = clock(); #endif // PRINT_CLOCKS if (dm_given) { checkCvCudaErrors(cudaMemcpy(d_dists, (void *)dMat.col(i).colmem, sizeof(double) * N, cudaMemcpyHostToDevice)); } else { checkCvCudaErrors(gw_dist_cuda(d_dp, d_dp, N, n, i, p, theta, longlat, rp_given, d_dists, maxThreads)); } checkCvCudaErrors(gw_weight_cuda(bw, kernel, adaptive, d_dists, d_weights, N, 1, maxThreads)); checkCvCudaErrors(cudaMemcpy(d_weights + i, &zero, sizeof(double), cudaMemcpyHostToDevice)); checkCvCudaErrors(gw_xtw_cuda(d_x, d_weights, N, K, d_xtw, maxThreads)); checkCvCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_T, K, K, N, &one, d_xtw, K, d_x, K, &zero, p_xtwxA[e], K)); checkCvCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_N, K, 1, N, &one, d_xtw, K, d_y, N, &zero, p_xtwyA[e], K)); #ifdef PRINT_CLOCKS clock_gemm += (clock() - clocki); clocki = clock(); #endif // PRINT_CLOCKS } #ifdef PRINT_CLOCKS printf(time_format, (double)(clock_gemm) / CLOCKS_PER_SEC); clock1 = clock(); #endif // ~~~~~~~~~~~~~~ // Matrix inverse // ~~~~~~~~~~~~~~ checkCvCudaErrors(cublasDmatinvBatched(handle, K, d_xtwxA, K, d_xtwxRA, K, d_info, groupn)); checkCvCudaErrors(cudaMemcpy(p_info, d_info, sizeof(int) * groupl, cudaMemcpyDeviceToHost)); for (size_t i = begin; i < end; i++) { size_t e = i - begin; int info = p_info[e]; if (info > 0) { #ifndef WIN32 throw std::exception(std::runtime_error("Matrix seems singular.")); #else throw std::exception("Matrix seems singular."); #endif } } #ifdef PRINT_CLOCKS printf(time_format, (double)(clock() - clock1) / CLOCKS_PER_SEC); clock1 = clock(); #endif // ~~~~~~~~~~~~~~ // calculate beta // ~~~~~~~~~~~~~~ for (size_t i = begin; i < end; i++) { size_t e = i - begin; double yhat = 0; checkCvCudaErrors(cublasDgemm(handle, CUBLAS_OP_N, CUBLAS_OP_N, K, 1, K, &one, p_xtwxRA[e], K, p_xtwyA[e], K, &zero, p_betaA[e], K)); checkCvCudaErrors(cublasDdot(handle, K, p_xiA[i], 1, p_betaA[e], 1, &yhat)); cv += ((y(i) - yhat) * (y(i) - yhat)); } #ifdef PRINT_CLOCKS printf(time_format, (double)(clock() - clock1) / CLOCKS_PER_SEC); clock1 = clock(); printf(time_format, (double)(clock() - clock0) / CLOCKS_PER_SEC); clock0 = clock(); printf("\n"); #endif } #ifdef PRINT_CLOCKS printf(time_format, (double)(clock() - clock0) / CLOCKS_PER_SEC); printf("\n"); #endif // ---------------- // Free Cuda Memory // ---------------- checkCvCudaErrors(cudaFree(d_x)); checkCvCudaErrors(cudaFree(d_y)); checkCvCudaErrors(cudaFree(d_dists)); checkCvCudaErrors(cudaFree(d_weights)); checkCvCudaErrors(cudaFree(d_xtwxA)); checkCvCudaErrors(cudaFree(d_xtwxRA)); checkCvCudaErrors(cudaFree(d_info)); for (size_t i = 0; i < groupl; i++) { checkCvCudaErrors(cudaFree(p_xtwxA[i])); checkCvCudaErrors(cudaFree(p_xtwyA[i])); checkCvCudaErrors(cudaFree(p_xtwxRA[i])); checkCvCudaErrors(cudaFree(p_betaA[i])); } delete[] p_xtwxA; p_xtwxA = nullptr; delete[] p_xtwxRA; p_xtwxRA = nullptr; delete[] p_xtwyA; p_xtwyA = nullptr; delete[] p_betaA; p_betaA = nullptr; checkCvCudaErrors(cudaFree(d_dp)); cublasDestroy(handle); return cv; }
a5748d6c1fcf52693582a2db26e9b71c02cf6d02
920617f8a53204ed24798fdd17edabf6524f9647
/Chapter09/practice/9.27.cpp
e8b46f34737d2593b9e009c3f6be223a90b304aa
[]
no_license
primerX/CppPrime_Code
57771295c0940fc25a69cde999cd10962b61344d
b0512aafe3fb0d571698908af3f37408871ee2d3
refs/heads/master
2020-04-07T01:24:52.000261
2018-12-01T06:26:48
2018-12-01T06:26:48
157,940,489
0
0
null
null
null
null
UTF-8
C++
false
false
606
cpp
9.27.cpp
#include <iostream> #include <forward_list> using namespace std; int main(int argc, char const *argv[]) { forward_list<int> iflst = {1, 2, 3, 4, 5, 6, 7, 8}; auto prev = iflst.before_begin(); // 前驱元素 auto curr = iflst.begin(); // 当前元素 while(curr != iflst.end()){ if(*curr & 1){ // 奇数 curr = iflst.erase_after(prev); // 删除,移动到下一元素 }else{ prev = curr; // 前驱元素与当前迭代器都向前推进 curr++; } } // 遍历 iflst for(auto it = iflst.cbegin(); it != iflst.cend(); it++){ cout << *it << " "; } cout << endl; return 0; }
e1419c84132f7af69a311d6bf788e13782268eea
a2267e976899b579694be30ff64ceeaad75924aa
/Chapter6/Section3/Section3_recursive/源.cpp
6c355decd20b0df0294923e79ea0b1942a80ad6d
[]
no_license
Anosy/C-Primer5
ba8123f9ba3eb0e188189ce6f8ae102c814bbcc8
accce069df0c3abadfc255c8fe96ed3ff752a1ea
refs/heads/master
2020-03-30T23:00:29.435819
2018-12-03T08:46:12
2018-12-03T08:46:12
151,687,218
1
0
null
null
null
null
UTF-8
C++
false
false
246
cpp
源.cpp
#include<iostream> using namespace std; int factorial(int val) { if (val > 1) { return factorial(val - 1)*val; } return 1; } int main() { int a = 5; int results = factorial(5); cout << results << endl; system("pause"); return 0; }
02b04271521cc52f74ad659e14ed79bf7a61c7b3
fd6992af5014def5066047f0792cbabf9320212b
/src/PhysicsObject.cpp
7754f90a5f6c8030194939f431c52b80a4baa220
[]
no_license
Sunlight4/Sethtroid
c573beb3b5c81ecc10ac68f75a1691fb6ac007ed
270424c9af0b473993b90af5abfd43b3ef59795a
refs/heads/master
2022-01-13T04:56:24.310641
2019-06-20T19:38:36
2019-06-20T19:38:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,222
cpp
PhysicsObject.cpp
/* * PhysicsObject.cpp * * Created on: Jun 14, 2019 * Author: triforce */ #include "PhysicsObject.h" #include "Game.h" PhysicsObject::PhysicsObject(Game* game, LoadingData data) : GameObject(game, data){ } PhysicsObject::~PhysicsObject() { } void PhysicsObject::InitialUpdate() { pos+=velocity; } void PhysicsObject::GeneralUpdate() { pos+=displacement-Vector(sign(displacement.x), sign(displacement.y)); } void PhysicsObject::Initialize() { velocity = Vector(0, 0); displacement = Vector(0, 0); } void PhysicsObject::CollisionPoll() { displacement=Vector(0, 0); std::forward_list<Collision> collisions; std::vector<OffsetTrigger*> striggers = SolidTriggers(); for (auto it = striggers.begin(); it!=striggers.end(); it++) { collisions=game->GetCollisions((*it), solidFlag); for (auto it2 = collisions.begin(); it2!=collisions.end(); it2++) { if (((*it2).normal.y)<0 && (*it)->GetPos().y>(*it2).otherPos.y) continue; if (((*it2).normal.y)>0 && (*it)->GetPos().y<(*it2).otherPos.y) continue; if (std::abs((*it2).normal.x)>std::abs(displacement.x)) displacement.x = (*it2).normal.x; if (std::abs((*it2).normal.y)>std::abs(displacement.y)) displacement.y = (*it2).normal.y; } } }
699b4b3e6086c640eeffbb1669623722a46e24c6
a82a25373aac822d68be709f33cd82770db5aae9
/source/b2m_app.cpp
ed5d0c21fd0a1a6c90b32a5e6c87abfe4e677559
[]
no_license
becker929/b2m
4e90bf01d091f3befcc7cb44b94ecca296fc4e8c
7e9c1a001e0376c2f76aa630506dbf18964e4198
refs/heads/main
2023-06-10T07:55:51.034211
2021-07-02T03:17:52
2021-07-02T03:17:52
382,208,252
0
0
null
null
null
null
UTF-8
C++
false
false
11,063
cpp
b2m_app.cpp
/* PortAudio code adapted from official examples http://www.portaudio.com/docs/v19-doxydocs/group__examples__src.html MIDI code adapted from libremidi tests https://github.com/jcelerier/libremidi */ #include "midiout.h" #include "portaudio.h" #include "stft_nn.h" #include <chrono> #include <fstream> #include <iostream> #include <memory> #include <stdio.h> #include <stdlib.h> #include <string> #include <thread> /* #define SAMPLE_RATE (17932) // Test failure to open with this value. */ #define SAMPLE_RATE (44100) #define FRAMES_PER_BUFFER (512) // #define NUM_SECONDS 1 #define NUM_CHANNELS (2) /* #define DITHER_FLAG (paDitherOff) */ #define DITHER_FLAG (0) /**/ /** Set to 1 if you want to capture the recording to a file. */ #define WRITE_TO_FILE (0) /* Select sample format. */ #if 1 # define PA_SAMPLE_TYPE paFloat32 typedef float SAMPLE; # define SAMPLE_SILENCE (0.0f) # define PRINTF_S_FORMAT "%.8f" #elif 1 # define PA_SAMPLE_TYPE paInt16 typedef short SAMPLE; # define SAMPLE_SILENCE (0) # define PRINTF_S_FORMAT "%d" #elif 0 # define PA_SAMPLE_TYPE paInt8 typedef char SAMPLE; # define SAMPLE_SILENCE (0) # define PRINTF_S_FORMAT "%d" #else # define PA_SAMPLE_TYPE paUInt8 typedef unsigned char SAMPLE; # define SAMPLE_SILENCE (128) # define PRINTF_S_FORMAT "%d" #endif typedef struct { int frameIndex; /* Index into sample array. */ int maxFrameIndex; SAMPLE* recordedSamples; } paTestData; /* This routine will be called by the PortAudio engine when audio is needed. ** It may be called at interrupt level on some machines so don't do anything ** that could mess up the system like calling malloc() or free(). */ static int recordCallback( const void* inputBuffer, void* outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo* timeInfo, PaStreamCallbackFlags statusFlags, void* userData) { paTestData* data = (paTestData*)userData; const SAMPLE* rptr = (const SAMPLE*)inputBuffer; SAMPLE* wptr = &data->recordedSamples[data->frameIndex * NUM_CHANNELS]; long framesToCalc; long i; int finished; unsigned long framesLeft = data->maxFrameIndex - data->frameIndex; (void)outputBuffer; /* Prevent unused variable warnings. */ (void)timeInfo; (void)statusFlags; (void)userData; if (framesLeft < framesPerBuffer) { framesToCalc = framesLeft; finished = paComplete; } else { framesToCalc = framesPerBuffer; finished = paContinue; } if (inputBuffer == NULL) { for (i = 0; i < framesToCalc; i++) { *wptr++ = SAMPLE_SILENCE; /* left */ if (NUM_CHANNELS == 2) *wptr++ = SAMPLE_SILENCE; /* right */ } } else { for (i = 0; i < framesToCalc; i++) { *wptr++ = *rptr++; /* left */ if (NUM_CHANNELS == 2) *wptr++ = *rptr++; /* right */ } } data->frameIndex += framesToCalc; return finished; } /*******************************************************************/ void dbg(int msgNum) { printf("%d\n", msgNum); fflush(stdout); } /*******************************************************************/ int main(int argc, char** argv) { int msgNum = 0; if (!argv[1] || !argv[2]) { fprintf(stderr, "Usage: ./test seconds_to_run device_number\n"); return 1; } int NUM_SECONDS = std::stoi(std::string(argv[1])); int DEVICE_NUM = std::stoi(std::string(argv[2])); PaStreamParameters inputParameters, outputParameters; PaStream* stream; PaError err = paNoError; paTestData data; int i; int totalFrames; int numSamples; int numBytes; SAMPLE max, val; double average; fprintf(stdout, "Allocating audio array.\n"); data.maxFrameIndex = totalFrames = NUM_SECONDS * SAMPLE_RATE; /* Record for a few seconds. */ data.frameIndex = 0; numSamples = totalFrames * NUM_CHANNELS; numBytes = numSamples * sizeof(SAMPLE); data.recordedSamples = (SAMPLE*)malloc(numBytes); /* From now on, recordedSamples is initialised. */ if (data.recordedSamples == NULL) { fprintf(stderr, "Could not allocate record array.\n"); Pa_Terminate(); if (data.recordedSamples) /* Sure it is NULL or valid. */ free(data.recordedSamples); if (err != paNoError) { fprintf(stderr, "Error number: %d\n", err); fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err)); err = 1; /* Always return 0 or 1, but no other return codes. */ } return err; } for (i = 0; i < numSamples; i++) data.recordedSamples[i] = 0; fprintf(stdout, "Initializing PortAudio.\n"); err = Pa_Initialize(); if (err != paNoError) { fprintf(stderr, "An error occured while initializing the portaudio stream\n"); Pa_Terminate(); if (data.recordedSamples) /* Sure it is NULL or valid. */ free(data.recordedSamples); if (err != paNoError) { fprintf(stderr, "An error occured while terminating the portaudio stream\n"); fprintf(stderr, "Error number: %d\n", err); fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err)); err = 1; /* Always return 0 or 1, but no other return codes. */ } return err; } int x = Pa_GetHostApiCount(); printf("hostApiCount:%d\n", x); fflush(stdout); x = Pa_GetDeviceCount(); printf("deviceCount:%d\n", x); fflush(stdout); inputParameters.device = DEVICE_NUM; // Pa_GetDefaultInputDevice(); /* default input device */ inputParameters.channelCount = 2; /* stereo input */ inputParameters.sampleFormat = PA_SAMPLE_TYPE; inputParameters.suggestedLatency = Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency; inputParameters.hostApiSpecificStreamInfo = NULL; fprintf(stdout, "requested input channels: %d\n", inputParameters.channelCount); fprintf(stdout, "device max input channels: %d\n", Pa_GetDeviceInfo(inputParameters.device)->maxInputChannels); fprintf(stdout, "device name: %s\n", Pa_GetDeviceInfo(inputParameters.device)->name); /* Record some audio. -------------------------------------------- */ fprintf(stdout, "Opening stream.\n"); err = Pa_OpenStream( &stream, &inputParameters, NULL, /* &outputParameters, */ SAMPLE_RATE, FRAMES_PER_BUFFER, paClipOff, /* we won't output out of range samples so don't bother clipping them */ recordCallback, &data); if (err != paNoError) { fprintf(stderr, "An error occured while opening the portaudio stream\n"); Pa_Terminate(); if (data.recordedSamples) /* Sure it is NULL or valid. */ free(data.recordedSamples); if (err != paNoError) {fprintf(stderr, "Error number: %d\n", err); fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err)); err = 1; /* Always return 0 or 1, but no other return codes. */ } return err; } fprintf(stdout, "Starting stream.\n"); err = Pa_StartStream(stream); if (err != paNoError) { fprintf(stderr, "An error occured while starting the portaudio stream\n"); Pa_Terminate(); if (data.recordedSamples) /* Sure it is NULL or valid. */ free(data.recordedSamples); if (err != paNoError) { fprintf(stderr, "Error number: %d\n", err); fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err)); err = 1; /* Always return 0 or 1, but no other return codes. */ } return err; } /*******************************************************************/ /*******************************************************************/ /*******************************************************************/ /*******************************************************************/ std::cout << "************************* loading torch model ****\n"; Model model; MyMidi midi; std::cout << "=== Now recording! Please beatbox. ===\n"; std::vector<int> indices; int frameLength = 512; int shiftLength = 256; int nextIndex = frameLength; int max_cooldown = 8; int cooldown = 0; std::vector<int> predictions; std::vector<std::vector<float>> audio_vectors; // while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) for (int ix = 0; ix < NUM_SECONDS * 1000; ix++) { // indices.push_back(nextIndex); if (data.frameIndex >= nextIndex) { // std::cout << nextIndex << ", " << data.frameIndex << "\n"; std::vector<float> audio_vector{ data.recordedSamples + nextIndex - frameLength, data.recordedSamples + nextIndex}; nextIndex += shiftLength; if (cooldown > 0) { cooldown -= 1; } else { int prediction = model.predict(audio_vector); if (prediction != 2) cooldown = max_cooldown; if (prediction == 0) { midi.send_message(68); } if (prediction == 1) { midi.send_message(74); } predictions.push_back(prediction); audio_vectors.push_back(audio_vector); } } else if (data.frameIndex >= data.maxFrameIndex) { break; } else { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } } std::cout << "=== Done. finalizing ===\n"; std::ofstream audio_vector_file; audio_vector_file.open("audio_vectors.csv"); for (int i = 0; i < audio_vectors.size(); i++) { for (int j = 0; j < audio_vectors[i].size(); j++) { audio_vector_file << audio_vectors[i][j] << ","; } audio_vector_file << "\n"; } audio_vector_file.close(); std::ofstream prediction_file; prediction_file.open("predictions.csv"); for (int i = 0; i < predictions.size(); i++) { prediction_file << predictions[i] << ","; } prediction_file.close(); std::ofstream audio_file; audio_file.open("audio.csv"); for (int i = 0; i < data.frameIndex; i++) { audio_file << data.recordedSamples[i] << ","; } audio_file.close(); /*******************************************************************/ /*******************************************************************/ /*******************************************************************/ /*******************************************************************/ if (err < 0) { Pa_Terminate(); if (data.recordedSamples) /* Sure it is NULL or valid. */ free(data.recordedSamples); if (err != paNoError) { fprintf(stderr, "An error occured while using the portaudio stream\n"); fprintf(stderr, "Error number: %d\n", err); fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err)); err = 1; /* Always return 0 or 1, but no other return codes. */ } return err; } err = Pa_CloseStream(stream); if (err != paNoError) { Pa_Terminate(); if (data.recordedSamples) /* Sure it is NULL or valid. */ free(data.recordedSamples); if (err != paNoError) { fprintf(stderr, "An error occured while using the portaudio stream\n"); fprintf(stderr, "Error number: %d\n", err); fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(err)); err = 1; /* Always return 0 or 1, but no other return codes. */ } return err; } }
8241cd705e5383bb0c71d34b7ec94f49963da0c5
a02cdae2f280c97c1b86ef3a1b72c613bd683b22
/17.Letter Combinations of a Phone Number.h
e337460113668e910a613f8cc861383a44a82a0d
[]
no_license
wenxiao/LeetcodeCode
6ec1bbb2e2a625adfe8daaaed95a2a2795184e99
385a93f459366e90df294d005b83b631da1f8c3f
refs/heads/master
2021-01-01T17:27:41.120927
2015-10-05T12:33:21
2015-10-05T12:33:21
33,222,964
0
0
null
null
null
null
GB18030
C++
false
false
1,152
h
17.Letter Combinations of a Phone Number.h
class Solution { //在VS上不能通过编译,因为不能这样初始化mp,可以将其作为dfs函数的一个static变量初始化即可。 public: //对应每个数字对应的字母表 map<char,vector<char>> mp={ {'1',{}}, {'2',{'a','b','c'}}, {'3',{'d','e','f'}}, {'4',{'g','h','i'}}, {'5',{'j','k','l'}}, {'6',{'m','n','o'}}, {'7',{'p','q','r','s'}}, {'8',{'t','u','v'}}, {'9',{'w','x','y','z'}}, {'0',{}} }; //遍历每一种可能的情况 void dfs(vector<string>& ret, const string& digits, string& current,int depth){ if(depth==digits.size()){ ret.push_back(current); return; } for(int i=0;i<mp[digits[depth]].size();i++){ current[depth]=mp[digits[depth]][i]; dfs(ret,digits,current,depth+1); } } vector<string> letterCombinations(string digits) { vector<string> ret; if(digits=="") return ret; string current=digits; dfs(ret,digits,current,0); return ret; } };
0c4f82e90e5fcbc67b4c6c2f31e8fe74710ba3bc
868e8628acaa0bf276134f9cc3ced379679eab10
/squareDrop/0.14/alpha.water
d5f59ff360c63b51b9e9547d27d0582aca08b13c
[]
no_license
stigmn/droplet
921af6851f88c0acf8b1cd84f5e2903f1d0cb87a
1649ceb0a9ce5abb243fb77569211558c2f0dc96
refs/heads/master
2020-04-04T20:08:37.912624
2015-11-25T11:20:32
2015-11-25T11:20:32
45,102,907
0
0
null
2015-10-28T09:46:30
2015-10-28T09:46:29
null
UTF-8
C++
false
false
114,672
water
alpha.water
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0.14"; object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField nonuniform List<scalar> 10000 ( 1.17131e-65 3.66076e-62 4.28978e-60 9.19602e-59 4.38552e-58 3.68063e-58 1.04686e-55 3.1118e-53 7.37473e-51 1.32392e-48 1.82105e-46 1.97341e-44 1.73052e-42 1.26401e-40 7.90303e-39 4.41964e-37 2.68952e-35 1.85209e-33 8.19964e-32 2.51875e-30 5.96541e-29 1.09959e-27 1.55263e-26 1.69465e-25 1.43695e-24 9.46808e-24 4.86015e-23 1.97688e-22 6.26913e-22 1.18312e-21 1.41485e-21 1.12012e-21 5.98084e-22 2.17475e-22 5.39001e-23 9.07497e-24 1.02463e-24 7.72503e-26 3.7638e-27 1.1648e-28 2.72479e-30 5.05078e-32 7.94004e-34 1.12647e-35 1.44092e-37 1.55242e-39 1.35854e-41 8.9866e-44 2.80561e-45 4.70048e-44 1.41116e-61 3.63146e-58 5.68309e-56 1.9854e-54 1.87104e-53 7.19354e-51 1.81703e-48 3.12935e-46 3.84981e-44 3.55654e-42 2.56972e-40 1.4976e-38 7.20715e-37 2.91471e-35 1.00295e-33 2.96114e-32 7.56886e-31 1.77055e-29 4.01789e-28 7.65544e-27 1.2039e-25 1.56515e-24 1.64688e-23 1.40004e-22 9.66503e-22 5.37348e-21 2.42358e-20 8.95747e-20 2.60699e-19 4.72529e-19 5.64749e-19 4.62887e-19 2.642e-19 1.05976e-19 2.99135e-20 5.9436e-21 8.21788e-22 7.88394e-23 5.18632e-24 2.29273e-25 7.66507e-27 2.04836e-28 4.63468e-30 9.30381e-32 1.6496e-33 2.41927e-35 2.73442e-37 2.25006e-39 6.3959e-41 1.08137e-39 5.48845e-58 1.21909e-54 2.64279e-52 1.86667e-50 4.74329e-48 1.05747e-45 1.53412e-43 1.56924e-41 1.2003e-39 7.15839e-38 3.43284e-36 1.35497e-34 4.48132e-33 1.25901e-31 3.03595e-30 6.3327e-29 1.15e-27 1.83857e-26 2.76938e-25 3.76766e-24 4.43535e-23 4.45514e-22 3.76359e-21 2.65467e-20 1.55876e-19 7.56377e-19 3.06754e-18 1.04431e-17 2.82396e-17 4.92823e-17 5.86993e-17 4.94849e-17 2.98489e-17 1.29999e-17 4.09221e-18 9.32357e-19 1.51512e-19 1.74461e-20 1.41083e-21 7.86105e-23 3.30312e-24 1.14421e-25 3.50264e-27 9.86587e-29 2.49579e-30 5.32115e-32 8.95142e-34 1.10469e-35 2.44291e-36 1.0021e-34 1.10014e-54 2.2563e-51 7.14064e-49 2.11096e-46 5.14336e-44 7.64197e-42 7.6895e-40 5.6269e-38 3.14989e-36 1.39952e-34 5.07208e-33 1.53058e-31 3.90694e-30 8.53954e-29 1.61358e-27 2.6556e-26 3.83075e-25 4.88156e-24 5.66254e-23 6.09783e-22 5.80678e-21 4.80994e-20 3.42768e-19 2.08406e-18 1.07279e-17 4.66885e-17 1.73594e-16 5.48217e-16 1.38119e-15 2.32279e-15 2.75114e-15 2.37609e-15 1.50413e-15 7.05165e-16 2.44952e-16 6.31211e-17 1.1861e-17 1.60343e-18 1.54233e-19 1.0414e-20 5.2561e-22 2.2717e-23 9.19113e-25 3.60053e-26 1.31754e-27 4.28478e-29 1.1098e-30 1.85139e-32 3.07412e-32 9.65463e-31 1.3316e-51 2.74626e-48 1.45231e-45 4.72973e-43 8.46534e-41 9.55554e-39 7.46994e-37 4.31502e-35 1.93e-33 6.9181e-32 2.03891e-30 5.03703e-29 1.0586e-27 1.91454e-26 3.00686e-25 4.13103e-24 4.99528e-23 5.34917e-22 5.14635e-21 4.62514e-20 3.72622e-19 2.64544e-18 1.63897e-17 8.78807e-17 4.04581e-16 1.60509e-15 5.52568e-15 1.627e-14 3.82763e-14 6.18693e-14 7.2722e-14 6.41666e-14 4.24149e-14 2.12778e-14 8.10788e-15 2.34933e-15 5.06931e-16 7.97238e-17 9.01871e-18 7.2559e-19 4.34578e-20 2.31263e-21 1.22109e-22 6.55463e-24 3.38843e-25 1.57774e-26 5.1196e-28 9.84197e-30 5.13811e-29 1.28936e-27 1.00513e-48 2.01991e-45 1.14093e-42 2.93886e-40 4.22696e-38 3.89887e-36 2.52063e-34 1.2149e-32 4.56515e-31 1.38236e-29 3.45764e-28 7.2784e-27 1.30793e-25 2.02885e-24 2.74065e-23 3.2471e-22 3.39452e-21 3.14869e-20 2.61499e-19 2.01429e-18 1.40773e-17 8.75436e-17 4.79902e-16 2.30253e-15 9.60789e-15 3.50771e-14 1.12295e-13 3.08346e-13 6.77538e-13 1.05151e-12 1.22277e-12 1.09982e-12 7.55819e-13 4.03987e-13 1.68167e-13 5.4639e-14 1.35227e-14 2.472e-15 3.27944e-16 3.12941e-17 2.21858e-18 1.43939e-19 9.76213e-21 6.94834e-22 4.84498e-23 2.84595e-24 1.04152e-25 2.34272e-27 2.25981e-26 4.64005e-25 3.98841e-46 7.37525e-43 3.58319e-40 7.70847e-38 9.37171e-36 7.37189e-34 4.09134e-32 1.70126e-30 5.53631e-29 1.45631e-27 3.17251e-26 5.82952e-25 9.1629e-24 1.24549e-22 1.47676e-21 1.53813e-20 1.4156e-19 1.15739e-18 8.46928e-18 5.69441e-17 3.5055e-16 1.93318e-15 9.47629e-15 4.1058e-14 1.56547e-13 5.28374e-13 1.5738e-12 4.02166e-12 8.24415e-12 1.22724e-11 1.40892e-11 1.28819e-11 9.17377e-12 5.20461e-12 2.35876e-12 8.58945e-13 2.44031e-13 5.20902e-14 8.13218e-15 9.21056e-16 7.75342e-17 6.03853e-18 5.13228e-19 4.65978e-20 4.09515e-21 2.8516e-22 1.15068e-23 3.03515e-25 3.68909e-24 6.46691e-23 8.5038e-44 1.40621e-40 5.86656e-38 1.09288e-35 1.15779e-33 7.97374e-32 3.88835e-30 1.42438e-28 4.09148e-27 9.51425e-26 1.83454e-24 2.98701e-23 4.16427e-22 5.02495e-21 5.29341e-20 4.90195e-19 4.01382e-18 2.92136e-17 1.90247e-16 1.13071e-15 6.18509e-15 3.04729e-14 1.34401e-13 5.28711e-13 1.84958e-12 5.77712e-12 1.59768e-11 3.78778e-11 7.2353e-11 1.03261e-10 1.16916e-10 1.08322e-10 7.9676e-11 4.79088e-11 2.3523e-11 9.6205e-12 3.14226e-12 7.88445e-13 1.4604e-13 1.9723e-14 1.97199e-15 1.81711e-16 1.88294e-17 2.093e-18 2.21544e-19 1.78808e-20 8.11886e-22 2.32037e-23 2.77776e-22 4.33679e-21 1.10434e-41 1.6182e-38 5.94616e-36 9.80075e-34 9.2174e-32 5.64953e-30 2.45613e-28 8.03071e-27 2.06046e-25 4.28173e-24 7.3804e-23 1.07453e-21 1.33985e-20 1.44634e-19 1.3632e-18 1.12959e-17 8.277e-17 5.39139e-16 3.14103e-15 1.66214e-14 8.11809e-14 3.5874e-13 1.42805e-12 5.1126e-12 1.64257e-11 4.74044e-11 1.21301e-10 2.66005e-10 4.73361e-10 6.48096e-10 7.23886e-10 6.77594e-10 5.12725e-10 3.27469e-10 1.72769e-10 7.96752e-11 2.99606e-11 8.9075e-12 1.97828e-12 3.20871e-13 3.83106e-14 4.09671e-15 5.01701e-16 6.60347e-17 8.20724e-18 7.67582e-19 4.05677e-20 1.16002e-21 1.11438e-20 1.6092e-19 9.69803e-40 1.26924e-36 4.16828e-34 6.15655e-32 5.19825e-30 2.86401e-28 1.12003e-26 3.29502e-25 7.60619e-24 1.42174e-22 2.20373e-21 2.88438e-20 3.23245e-19 3.13517e-18 2.6541e-17 1.97462e-16 1.29865e-15 7.59032e-15 3.96627e-14 1.87607e-13 8.20037e-13 3.25417e-12 1.16969e-11 3.81004e-11 1.12242e-10 2.98314e-10 7.036e-10 1.42427e-09 2.36434e-09 3.11255e-09 3.4363e-09 3.2382e-09 2.51568e-09 1.71553e-09 9.59987e-10 5.01644e-10 2.17059e-10 7.69966e-11 2.07297e-11 4.08223e-12 5.84243e-13 7.14047e-14 1.00277e-14 1.5222e-15 2.18732e-16 2.39186e-17 1.52709e-18 4.4337e-20 2.62533e-19 3.63741e-18 6.25287e-38 7.34418e-35 2.17266e-32 2.8963e-30 2.20982e-28 1.10089e-26 3.89335e-25 1.03551e-23 2.15982e-22 3.64522e-21 5.09798e-20 6.01632e-19 6.07532e-18 5.30619e-17 4.0424e-16 2.70466e-15 1.59862e-14 8.39289e-14 3.93767e-13 1.66864e-12 6.52622e-12 2.32447e-11 7.53319e-11 2.2269e-10 5.99462e-10 1.46114e-09 3.16581e-09 5.91207e-09 9.18556e-09 1.16875e-08 1.28067e-08 1.20749e-08 9.68036e-09 7.10421e-09 4.12088e-09 2.44964e-09 1.21404e-09 5.16308e-10 1.70031e-10 4.12453e-11 7.16582e-12 9.99654e-13 1.55999e-13 2.65741e-14 4.36211e-15 5.61613e-16 4.43998e-17 1.48444e-18 3.87238e-18 5.35404e-17 3.11801e-36 3.29907e-33 8.82466e-31 1.06558e-28 7.37188e-27 3.33137e-25 1.06861e-23 2.57658e-22 4.86802e-21 7.43501e-20 9.40035e-19 1.00195e-17 9.12958e-17 7.18858e-16 4.93269e-15 2.96991e-14 1.57826e-13 7.4441e-13 3.13556e-12 1.19089e-11 4.16439e-11 1.32854e-10 3.86988e-10 1.03402e-09 2.53191e-09 5.63553e-09 1.11887e-08 1.92928e-08 2.82249e-08 3.53007e-08 3.86685e-08 3.57214e-08 3.02332e-08 2.39015e-08 1.38958e-08 9.36957e-09 5.27531e-09 2.69471e-09 1.09011e-09 3.30232e-10 7.1265e-11 1.15875e-11 1.97117e-12 3.67184e-13 6.77461e-14 1.02033e-14 1.0163e-15 4.56291e-17 3.72765e-17 5.37637e-16 1.24411e-34 1.18709e-31 2.8756e-29 3.1508e-27 1.9801e-25 8.13189e-24 2.37022e-22 5.18978e-21 8.89579e-20 1.23123e-18 1.40893e-17 1.35755e-16 1.11694e-15 7.9326e-15 4.90439e-14 2.6577e-13 1.26981e-12 5.37929e-12 2.03308e-11 6.91764e-11 2.16013e-10 6.15511e-10 1.60498e-09 3.85736e-09 8.55103e-09 1.73148e-08 3.14403e-08 5.01404e-08 7.02081e-08 9.28215e-08 1.02244e-07 8.47573e-08 7.9206e-08 6.56359e-08 3.71285e-08 2.78692e-08 1.77517e-08 1.08683e-08 5.38639e-09 2.0515e-09 5.62363e-10 1.10812e-10 2.0652e-11 4.1494e-12 8.46069e-13 1.47446e-13 1.82572e-14 1.1762e-15 2.50153e-16 3.81455e-15 4.02849e-33 3.46795e-30 7.61576e-28 7.58182e-26 4.33454e-24 1.62023e-22 4.29798e-21 8.55964e-20 1.33316e-18 1.67445e-17 1.73637e-16 1.51394e-15 1.12563e-14 7.21516e-14 4.02123e-13 1.96202e-12 8.42985e-12 3.20718e-11 1.08705e-10 3.31098e-10 9.22092e-10 2.33958e-09 5.43847e-09 1.17032e-08 2.33899e-08 4.2943e-08 7.11432e-08 1.05648e-07 1.50898e-07 2.09782e-07 2.21256e-07 1.60967e-07 1.73655e-07 1.42284e-07 7.65291e-08 6.2616e-08 4.58386e-08 3.34194e-08 2.009e-08 9.59535e-09 3.39375e-09 8.49817e-10 1.78541e-10 3.88075e-11 8.6431e-12 1.71506e-12 2.58539e-13 2.33472e-14 1.65704e-15 1.96145e-14 1.05503e-31 8.20505e-29 1.63628e-26 1.48285e-24 7.72719e-23 2.63427e-21 6.37289e-20 1.15683e-18 1.64061e-17 1.87385e-16 1.76444e-15 1.39483e-14 9.38922e-14 5.44151e-13 2.73849e-12 1.20491e-11 4.66161e-11 1.59427e-10 4.84769e-10 1.32146e-09 3.27984e-09 7.39232e-09 1.52655e-08 2.9309e-08 5.26395e-08 8.74148e-08 1.33029e-07 2.02407e-07 3.2413e-07 1.85464e-06 1.91596e-06 1.96579e-07 3.36546e-07 2.71243e-07 1.12124e-07 1.01573e-07 9.02871e-08 7.75867e-08 5.56068e-08 3.29159e-08 1.50882e-08 4.98495e-09 1.2669e-09 3.09953e-10 7.52742e-11 1.66591e-11 2.96001e-12 3.51755e-13 2.11947e-14 7.44229e-14 2.19698e-30 1.54805e-27 2.81221e-25 2.3275e-23 1.10929e-21 3.46106e-20 7.66355e-19 1.27259e-17 1.64946e-16 1.71961e-15 1.47574e-14 1.06156e-13 6.49233e-13 3.41341e-12 1.55613e-11 6.19292e-11 2.1633e-10 6.66591e-10 1.82144e-09 4.44852e-09 9.84235e-09 1.96835e-08 3.60333e-08 6.15955e-08 9.92651e-08 1.50499e-07 2.36075e-07 6.16877e-07 7.44689e-06 1.1572e-05 1.15732e-05 5.45276e-06 7.67102e-07 2.00227e-07 1.6758e-07 1.16729e-07 1.36546e-07 1.37128e-07 1.14044e-07 8.17297e-08 4.78286e-08 2.10484e-08 6.88608e-09 1.99756e-09 5.44174e-10 1.34373e-10 2.75421e-11 4.10445e-12 3.38746e-13 2.1407e-13 3.58287e-29 2.2954e-26 3.81224e-24 2.89264e-22 1.26605e-20 3.63081e-19 7.39137e-18 1.12813e-16 1.34291e-15 1.28431e-14 1.00962e-13 6.64221e-13 3.70916e-12 1.77778e-11 7.37684e-11 2.66771e-10 8.45155e-10 2.35598e-09 5.80519e-09 1.2736e-08 2.51589e-08 4.46759e-08 7.24845e-08 1.1015e-07 1.57877e-07 2.10852e-07 2.25157e-07 6.14174e-06 1.15757e-05 1.15711e-05 1.15749e-05 1.1578e-05 2.53001e-06 1.91567e-07 1.9815e-07 3.42592e-07 1.65444e-07 1.92353e-07 1.78137e-07 1.48751e-07 1.07516e-07 6.22286e-08 2.7185e-08 9.83648e-09 3.15243e-09 8.90745e-10 2.09969e-10 3.76857e-11 4.26163e-12 5.85124e-13 4.52905e-28 2.64888e-25 4.03792e-23 2.82043e-21 1.13846e-19 3.01435e-18 5.66812e-17 7.99031e-16 8.78032e-15 7.74438e-14 5.60788e-13 3.39354e-12 1.74044e-11 7.64954e-11 2.9062e-10 9.60616e-10 2.77583e-09 7.03801e-09 1.57142e-08 3.11021e-08 5.51794e-08 8.78533e-08 1.28155e-07 1.76403e-07 2.30808e-07 2.82683e-07 2.875e-07 6.0631e-06 1.1578e-05 1.15769e-05 1.14859e-05 5.09129e-06 2.09099e-07 2.09223e-07 2.25902e-07 2.36075e-07 2.23042e-07 2.31789e-07 2.26393e-07 2.08799e-07 1.76796e-07 1.28955e-07 7.47831e-08 3.46722e-08 1.3576e-08 4.544e-09 1.25781e-09 2.69981e-10 3.94197e-11 3.25846e-12 4.42007e-27 2.37045e-24 3.33026e-22 2.15004e-20 8.0369e-19 1.97294e-17 3.44163e-16 4.50119e-15 4.58734e-14 3.74986e-13 2.51406e-12 1.40692e-11 6.66442e-11 2.70188e-10 9.45617e-10 2.87538e-09 7.63097e-09 1.77348e-08 3.62317e-08 6.56713e-08 1.08078e-07 1.63012e-07 2.2576e-07 2.77011e-07 3.16577e-07 3.1351e-07 4.56322e-07 2.81381e-07 3.46133e-06 5.50436e-06 1.32715e-06 2.55145e-07 2.56935e-07 2.58545e-07 2.61727e-07 2.44222e-07 2.45255e-07 2.58587e-07 2.56024e-07 2.46622e-07 2.28671e-07 1.95976e-07 1.43531e-07 8.4701e-08 4.10616e-08 1.6635e-08 5.52134e-09 1.43125e-09 2.62539e-10 2.69142e-11 3.34188e-26 1.65172e-23 2.14835e-21 1.28756e-19 4.47584e-18 1.02292e-16 1.66217e-15 2.02522e-14 1.92234e-13 1.46279e-12 9.1227e-12 4.74502e-11 2.0873e-10 7.85262e-10 2.54887e-09 7.18735e-09 1.77102e-08 3.841e-08 7.4324e-08 1.31959e-07 2.22133e-07 4.01761e-07 6.61583e-07 4.76226e-07 3.432e-07 2.76574e-07 2.68459e-07 2.68869e-07 2.68355e-07 2.68394e-07 2.70074e-07 2.73738e-07 2.75737e-07 2.76372e-07 2.72469e-07 4.85867e-07 2.504e-07 2.7716e-07 2.76341e-07 2.68616e-07 2.57306e-07 2.39692e-07 2.06157e-07 1.498e-07 8.94048e-08 4.40436e-08 1.76595e-08 5.54969e-09 1.26241e-09 1.72019e-10 1.97518e-25 9.04867e-23 1.09528e-20 6.12346e-19 1.9887e-17 4.24989e-16 6.45968e-15 7.36214e-14 6.53507e-13 4.6487e-12 2.70936e-11 1.31685e-10 5.41481e-10 1.90595e-09 5.79684e-09 1.53418e-08 3.5514e-08 7.24395e-08 1.33296e-07 1.9876e-07 8.32257e-07 6.66239e-06 8.48822e-06 2.56505e-06 2.52772e-07 2.58938e-07 2.71926e-07 2.795e-07 2.7502e-07 2.87718e-07 2.86931e-07 2.86435e-07 2.84636e-07 2.83176e-07 2.80342e-07 2.60706e-07 2.57703e-07 2.90665e-07 2.94816e-07 2.85568e-07 2.75609e-07 2.62401e-07 2.44192e-07 2.06196e-07 1.47345e-07 8.71233e-08 4.19219e-08 1.58751e-08 4.41737e-09 7.71748e-10 9.25483e-25 3.95633e-22 4.48381e-20 2.35169e-18 7.1724e-17 1.43987e-15 2.05539e-14 2.19837e-13 1.82915e-12 1.21776e-11 6.62978e-11 3.00316e-10 1.14784e-09 3.74432e-09 1.05234e-08 2.57132e-08 5.53395e-08 1.06015e-07 1.24701e-07 9.36356e-07 7.77832e-06 8.53894e-06 8.54087e-06 3.18821e-06 2.52825e-07 2.67361e-07 2.84035e-07 2.85355e-07 3.78731e-07 2.88388e-07 2.90583e-07 2.90635e-07 2.89517e-07 2.92791e-07 2.94639e-07 2.90097e-07 5.18803e-07 2.97187e-07 2.99733e-07 2.91092e-07 3.01359e-07 2.81426e-07 2.64076e-07 2.41678e-07 1.98083e-07 1.37355e-07 7.81677e-08 3.52258e-08 1.17958e-08 2.554e-09 3.49207e-24 1.40414e-21 1.50102e-19 7.43709e-18 2.14401e-16 4.06777e-15 5.4835e-14 5.53144e-13 4.33343e-12 2.71095e-11 1.3838e-10 5.86349e-10 2.09154e-09 6.3549e-09 1.66159e-08 3.77171e-08 7.44867e-08 1.25403e-07 1.36619e-07 2.91025e-06 8.5236e-06 8.536e-06 7.08719e-06 2.59549e-07 2.60156e-07 2.7985e-07 2.93696e-07 3.00253e-07 2.96143e-07 2.93378e-07 3.90653e-07 2.93115e-07 2.96306e-07 3.06833e-07 3.15487e-07 3.29275e-07 3.31936e-07 3.10548e-07 5.90035e-07 4.05133e-07 3.08223e-07 3.22378e-07 2.84831e-07 2.62091e-07 2.33046e-07 1.83564e-07 1.21149e-07 6.39817e-08 2.53564e-08 6.61996e-09 1.07539e-23 4.10707e-21 4.17918e-19 1.97314e-17 5.42146e-16 9.79818e-15 1.25673e-13 1.20418e-12 8.94246e-12 5.29042e-11 2.54729e-10 1.01547e-09 3.39933e-09 9.67048e-09 2.36289e-08 5.01319e-08 9.3677e-08 1.55001e-07 1.65575e-07 1.07777e-06 7.50959e-06 8.23485e-06 1.08485e-06 2.68927e-07 2.81232e-07 2.93447e-07 3.02268e-07 3.04179e-07 2.99416e-07 3.01493e-07 3.03188e-07 3.43506e-07 3.08649e-07 3.25585e-07 3.42881e-07 3.36347e-07 7.59308e-07 1.82476e-05 3.34825e-05 2.9756e-05 4.49522e-06 3.30532e-07 3.30718e-07 2.83562e-07 2.56164e-07 2.1928e-07 1.63445e-07 9.93596e-08 4.58445e-08 1.41111e-08 2.72406e-23 9.99976e-21 9.79307e-19 4.45196e-17 1.17746e-15 2.04647e-14 2.52051e-13 2.31467e-12 1.64367e-11 9.27498e-11 4.24843e-10 1.60706e-09 5.09296e-09 1.36912e-08 3.15765e-08 6.32489e-08 1.12191e-07 1.80953e-07 2.19265e-07 9.3565e-07 1.78711e-06 8.51479e-07 3.35631e-07 3.06627e-07 3.03954e-07 3.16481e-07 3.28457e-07 3.15099e-07 3.04908e-07 3.12103e-07 3.29835e-07 3.29755e-07 3.14721e-07 3.27128e-07 3.75356e-07 3.38267e-07 1.74849e-05 5.22579e-05 5.22113e-05 5.22047e-05 4.05511e-05 5.24804e-06 3.14581e-07 3.15907e-07 2.65626e-07 2.43498e-07 1.98828e-07 1.36276e-07 7.20442e-08 2.56639e-08 5.69144e-23 2.03656e-20 1.94436e-18 8.61342e-17 2.21781e-15 3.74736e-14 4.47899e-13 3.98338e-12 2.73312e-11 1.48667e-10 6.54898e-10 2.37735e-09 7.21703e-09 1.85587e-08 4.08953e-08 7.80799e-08 1.3077e-07 1.95199e-07 2.62475e-07 3.14073e-07 3.16231e-07 3.21547e-07 3.09221e-07 3.15489e-07 3.32059e-07 3.22636e-07 3.33028e-07 3.82167e-07 3.12936e-07 3.40701e-07 3.42519e-07 1.07649e-06 2.23627e-06 9.28636e-07 3.58942e-07 3.40961e-07 2.89796e-05 5.21671e-05 5.21766e-05 5.21876e-05 5.21638e-05 1.66953e-05 2.87618e-07 2.73537e-07 3.39867e-07 2.27673e-07 2.22291e-07 1.7007e-07 1.01271e-07 4.10285e-08 9.77372e-23 3.46699e-20 3.2752e-18 1.43301e-16 3.63698e-15 6.04412e-14 7.08837e-13 6.16983e-12 4.13215e-11 2.18794e-10 9.35652e-10 3.28851e-09 9.64097e-09 2.38804e-08 5.05285e-08 9.21447e-08 1.45668e-07 1.99855e-07 2.37497e-07 2.48427e-07 3.11987e-07 3.23401e-07 3.34767e-07 3.49479e-07 3.45439e-07 1.16714e-06 1.39117e-06 3.4849e-07 3.41023e-07 3.5032e-07 2.95732e-06 7.28891e-06 7.49679e-06 6.97293e-06 1.58978e-06 3.48071e-07 2.76946e-06 4.01512e-05 5.21348e-05 5.21699e-05 3.4942e-05 4.31373e-06 2.70275e-07 2.60664e-07 2.56973e-07 2.48267e-07 2.34647e-07 1.94899e-07 1.29269e-07 5.88212e-08 1.36456e-22 4.9024e-20 4.66494e-18 2.04727e-16 5.19273e-15 8.59491e-14 1.00065e-12 8.61805e-12 5.6921e-11 2.96231e-10 1.24092e-09 4.25843e-09 1.21532e-08 2.92243e-08 5.98399e-08 1.04934e-07 1.57097e-07 1.98445e-07 2.0871e-07 4.56852e-07 2.9866e-07 3.15122e-07 3.82329e-07 4.00865e-07 6.35171e-06 1.83716e-05 1.73062e-05 1.98596e-06 3.34443e-07 3.96898e-07 5.62756e-06 7.49804e-06 7.49744e-06 7.49678e-06 4.21072e-06 3.76467e-07 4.17308e-07 5.32232e-07 1.50985e-05 1.50343e-05 1.34315e-06 2.72528e-07 2.97787e-07 2.54419e-07 2.48018e-07 2.1865e-07 2.00973e-07 1.98375e-07 1.49496e-07 7.65212e-08 1.5177e-22 5.6827e-20 5.57004e-18 2.49749e-16 6.43151e-15 1.0752e-13 1.25855e-12 1.08514e-11 7.14557e-11 3.6923e-10 1.52942e-09 5.16897e-09 1.4475e-08 3.40569e-08 6.81428e-08 1.16956e-07 1.7295e-07 2.23025e-07 2.67221e-07 3.31888e-07 2.97738e-07 3.0558e-07 3.15579e-07 5.02492e-06 2.09142e-05 2.0916e-05 2.0916e-05 1.02598e-05 3.33536e-07 3.47345e-07 1.49188e-06 6.63797e-06 7.49732e-06 7.49674e-06 6.09705e-06 1.81823e-06 8.08114e-07 3.4073e-07 2.7825e-07 2.70238e-07 2.68757e-07 2.6734e-07 2.58622e-07 2.55502e-07 2.22451e-07 3.25147e-07 3.47921e-07 1.7404e-07 1.61111e-07 9.21641e-08 1.30442e-22 5.2903e-20 5.49581e-18 2.57482e-16 6.85833e-15 1.17672e-13 1.4046e-12 1.22812e-11 8.15886e-11 4.23226e-10 1.7513e-09 5.88428e-09 1.63077e-08 3.78363e-08 7.45824e-08 1.26787e-07 1.89223e-07 2.57076e-07 3.46942e-07 5.25504e-07 8.27184e-06 1.04542e-05 4.12522e-07 8.81175e-06 2.09153e-05 2.09135e-05 2.0874e-05 3.2296e-06 3.32907e-07 3.50534e-07 6.83142e-07 2.73503e-06 7.49568e-06 6.95653e-06 7.22455e-06 7.22841e-06 7.06138e-06 4.67256e-06 1.27043e-06 2.84309e-07 2.81687e-07 2.76246e-07 2.88885e-07 2.283e-07 2.1528e-07 3.1795e-07 3.46681e-07 2.1244e-07 1.72822e-07 1.04741e-07 8.30563e-23 3.84548e-20 4.391e-18 2.20947e-16 6.22311e-15 1.11635e-13 1.38102e-12 1.24232e-11 8.43682e-11 4.44719e-10 1.85925e-09 6.27593e-09 1.73778e-08 4.00848e-08 7.82949e-08 1.32001e-07 1.97289e-07 2.73377e-07 2.86347e-07 6.54293e-06 1.63293e-05 1.63239e-05 1.1226e-05 2.43516e-06 1.96314e-05 2.09085e-05 1.0851e-05 3.2106e-07 3.29604e-07 1.122e-06 5.5497e-06 5.98657e-06 2.72454e-06 3.28202e-07 5.11896e-06 7.23407e-06 7.01785e-06 6.73369e-06 6.19913e-06 6.53325e-06 5.00201e-06 2.23242e-06 4.35617e-07 2.19895e-07 2.07918e-07 1.99215e-07 2.05594e-07 2.14788e-07 1.5366e-07 1.12625e-07 3.68477e-23 2.10144e-20 2.766e-18 1.54627e-16 4.72756e-15 9.06025e-14 1.18335e-12 1.11337e-11 7.84534e-11 4.26022e-10 1.82246e-09 6.25331e-09 1.74873e-08 4.04851e-08 7.89327e-08 1.32432e-07 1.97702e-07 2.34905e-07 1.05433e-06 1.49733e-05 1.63292e-05 1.63333e-05 1.52121e-05 3.50459e-07 5.6566e-06 8.05197e-06 5.81013e-07 3.22094e-07 3.29604e-07 2.43552e-06 5.88653e-06 5.93734e-06 8.71284e-07 3.19063e-07 3.18981e-07 1.48185e-06 2.69606e-06 1.27455e-06 3.72584e-07 2.91965e-05 4.22641e-05 1.90954e-05 3.60667e-07 2.11549e-07 1.95759e-07 1.95624e-07 1.96523e-07 1.87666e-07 2.33064e-07 1.15603e-07 1.02649e-23 8.17768e-21 1.32626e-18 8.59816e-17 2.94453e-15 6.18144e-14 8.70635e-13 8.72939e-12 6.49182e-11 3.68907e-10 1.63856e-09 5.79344e-09 1.65696e-08 3.89437e-08 7.65346e-08 1.28489e-07 1.9065e-07 2.76635e-07 5.77437e-07 1.24403e-05 1.63357e-05 1.63394e-05 7.92981e-06 3.32239e-07 3.38166e-07 3.03078e-07 3.0369e-07 3.24676e-07 3.31094e-07 1.20891e-06 3.50949e-06 1.15062e-06 3.31066e-07 3.22201e-07 3.18921e-07 3.19472e-07 3.20658e-07 3.25232e-07 3.33699e-07 2.69999e-05 4.22927e-05 1.84689e-05 1.19885e-06 4.65042e-06 7.24985e-06 4.45522e-06 7.25583e-07 1.17629e-07 2.27259e-07 1.14167e-07 1.61225e-24 2.16959e-21 4.70549e-19 3.71083e-17 1.47181e-15 3.47398e-14 5.39603e-13 5.88701e-12 4.70987e-11 2.85148e-10 1.33753e-09 4.95195e-09 1.47049e-08 3.5577e-08 7.13618e-08 1.21218e-07 1.79243e-07 2.39752e-07 2.58112e-07 3.51466e-06 1.37652e-05 1.18813e-05 3.35724e-07 3.31608e-07 4.00311e-07 3.0399e-07 3.0844e-07 3.15491e-07 3.62054e-07 2.99646e-07 2.99998e-07 3.0255e-07 3.47505e-07 3.82942e-07 3.26184e-07 3.21031e-07 3.26095e-07 3.38219e-07 3.78711e-07 4.59477e-06 4.20071e-05 1.5409e-05 6.03335e-06 9.67582e-06 1.06958e-05 5.08293e-06 3.90767e-07 4.65073e-08 1.15871e-07 1.11994e-07 1.72451e-25 4.75782e-22 1.4575e-19 1.42963e-17 6.62323e-16 1.76154e-14 3.01533e-13 3.57383e-12 3.07783e-11 1.99253e-10 9.93792e-10 3.8904e-09 1.2153e-08 3.07049e-08 6.37741e-08 1.11156e-07 1.66883e-07 2.22988e-07 2.7231e-07 2.85979e-07 1.15587e-06 1.24267e-06 3.30987e-07 3.2528e-07 3.17784e-07 3.058e-07 3.07858e-07 3.12794e-07 3.04895e-07 2.99777e-07 3.01541e-07 4.21437e-07 1.82716e-06 1.84844e-06 3.29054e-07 3.35624e-07 3.59687e-07 4.33697e-07 1.04996e-06 4.52467e-06 4.04178e-05 0.000204517 6.30504e-05 4.25514e-06 1.07132e-06 4.82887e-07 4.32762e-08 3.08157e-08 3.48466e-08 3.05995e-08 1.82056e-26 1.0906e-22 4.62665e-20 5.55884e-18 2.97948e-16 8.87204e-15 1.66552e-13 2.13427e-12 1.96654e-11 1.35153e-10 7.11548e-10 2.93024e-09 9.60397e-09 2.53501e-08 5.47245e-08 9.85996e-08 1.5207e-07 2.06819e-07 2.58498e-07 3.17e-07 3.24676e-07 3.36152e-07 3.34323e-07 3.15798e-07 3.07886e-07 3.01563e-07 3.03821e-07 3.0429e-07 2.98776e-07 3.02608e-07 3.07676e-07 9.97608e-07 2.0159e-06 2.01754e-06 3.49707e-07 3.86626e-07 2.19236e-06 2.32596e-05 0.00011793 0.000153218 0.000532585 0.00189017 0.000576663 1.8723e-07 2.31556e-07 4.30138e-08 2.82666e-08 2.78951e-08 2.75236e-08 2.65859e-08 1.78935e-27 2.30021e-23 1.36683e-20 2.02642e-18 1.2622e-16 4.22162e-15 8.71332e-14 1.20983e-12 1.19584e-11 8.75224e-11 4.87986e-10 2.11946e-09 7.29966e-09 2.01707e-08 4.53988e-08 8.48322e-08 1.34767e-07 1.87643e-07 2.38237e-07 2.91315e-07 3.30807e-07 3.34944e-07 3.24452e-07 3.07143e-07 2.98251e-07 2.95137e-07 2.98546e-07 2.97791e-07 2.98518e-07 2.99512e-07 3.01957e-07 5.4121e-07 1.73616e-06 1.46914e-06 4.50558e-07 7.24658e-07 1.60805e-05 0.000124469 0.00036283 0.000873192 0.000571887 0.00124685 0.0393675 0.0863321 0.167125 0.342997 0.52967 0.665161 0.74734 0.780813 1.47386e-28 4.28473e-24 3.6469e-21 6.75627e-19 4.93059e-17 1.86324e-15 4.24723e-14 6.41378e-13 6.82267e-12 5.3333e-11 3.15832e-10 1.45063e-09 5.26228e-09 1.52711e-08 3.59937e-08 7.01874e-08 1.15798e-07 1.66351e-07 2.15059e-07 2.61301e-07 3.00614e-07 3.14741e-07 3.11594e-07 2.99388e-07 2.91563e-07 2.88554e-07 3.95617e-07 2.89177e-07 2.9614e-07 2.94581e-07 2.98101e-07 3.05061e-07 3.09065e-07 3.3986e-07 3.28437e-06 1.78057e-05 2.94064e-05 0.00022399 0.000324884 0.0012596 0.0136901 0.166334 0.363443 0.644883 0.886662 0.993033 1 1 1 1 1.0236e-29 7.03361e-25 8.74266e-22 2.0483e-19 1.76603e-17 7.58617e-16 1.91862e-14 3.1628e-13 3.63152e-12 3.03954e-11 1.91609e-10 9.32722e-10 3.57195e-09 1.09176e-08 2.70485e-08 5.53133e-08 9.53902e-08 1.42488e-07 1.89735e-07 2.32819e-07 2.69068e-07 2.90639e-07 2.96412e-07 2.91042e-07 2.85598e-07 2.83306e-07 2.81562e-07 2.89868e-07 2.99593e-07 2.94479e-07 2.98325e-07 3.0618e-07 3.72203e-07 5.80804e-07 8.19774e-06 0.000112281 0.00041773 0.00047024 0.000649659 0.0163687 0.366809 0.655536 0.901643 0.999528 1.00001 1 1 1 1 1 6.13833e-31 1.02721e-25 1.8917e-22 5.65947e-20 5.80581e-18 2.84971e-16 8.02766e-15 1.44893e-13 1.79982e-12 1.61586e-11 1.0859e-10 5.60984e-10 2.27157e-09 7.32633e-09 1.9127e-08 4.11607e-08 7.45586e-08 1.1657e-07 1.61386e-07 2.03362e-07 2.39044e-07 2.64491e-07 2.77682e-07 2.77016e-07 2.77156e-07 2.77536e-07 2.78889e-07 2.87166e-07 3.08552e-07 2.9249e-07 2.93384e-07 3.0916e-07 4.34462e-06 1.11149e-05 3.3285e-05 0.000269457 0.00140688 0.000701385 0.0359953 0.464207 0.83349 0.979665 0.999914 0.999982 1 1 1 1 1 1 3.25799e-32 1.35162e-26 3.72376e-23 1.43253e-20 1.75765e-18 9.89541e-17 3.11345e-15 6.16494e-14 8.29578e-13 7.99605e-12 5.73155e-11 3.14349e-10 1.34668e-09 4.58669e-09 1.26343e-08 2.86707e-08 5.47273e-08 8.99951e-08 1.30505e-07 1.70955e-07 2.07116e-07 2.35751e-07 2.17951e-07 4.23984e-07 2.97572e-07 2.8219e-07 2.75277e-07 2.72252e-07 3.45799e-07 2.76682e-07 2.83278e-07 3.0192e-07 6.54957e-06 2.58963e-05 0.000147548 0.000286887 0.000589055 0.0139252 0.466317 0.921801 0.993937 0.999986 0.999997 0.999999 1 1 1 1 1 1 1.56159e-33 1.61916e-27 6.71098e-24 3.33424e-21 4.90861e-19 3.17685e-17 1.11805e-15 2.43072e-14 3.54455e-13 3.66794e-12 2.80347e-11 1.63154e-10 7.39278e-10 2.65878e-09 7.72987e-09 1.85159e-08 3.73156e-08 6.47464e-08 9.88665e-08 1.35796e-07 1.71445e-07 2.02438e-07 2.06629e-07 2.05878e-07 2.59532e-07 2.66831e-07 2.66465e-07 2.68076e-07 2.72205e-07 2.69979e-07 2.65227e-07 2.95061e-07 1.46154e-06 1.72466e-05 0.000192108 0.000443751 0.0142 0.354118 0.888002 0.999989 0.999996 0.999999 1 1 1 1 1 1 1 1 6.82687e-35 1.77178e-28 1.10772e-24 7.12391e-22 1.26033e-19 9.38524e-18 3.69585e-16 8.82107e-15 1.39332e-13 1.54687e-12 1.25957e-11 7.77053e-11 3.72125e-10 1.41243e-09 4.33317e-09 1.09594e-08 2.33415e-08 4.28151e-08 6.90813e-08 1.00069e-07 1.32737e-07 1.63978e-07 1.82364e-07 1.94962e-07 2.24296e-07 2.41553e-07 2.27327e-07 3.70209e-07 2.75676e-07 2.67265e-07 2.31495e-07 2.55289e-07 4.65425e-07 4.39585e-06 5.71925e-05 0.00416105 0.218661 0.722654 0.999883 0.999996 0.999999 1 1 1 1 1 1 1 1 1 2.70952e-36 1.7584e-29 1.66033e-25 1.3837e-22 2.94335e-20 2.52205e-18 1.11091e-16 2.90883e-15 4.97238e-14 5.91631e-13 5.12657e-12 3.34884e-11 1.69344e-10 6.77882e-10 2.19358e-09 5.85734e-09 1.31884e-08 2.56014e-08 4.37417e-08 6.70752e-08 9.40194e-08 1.22386e-07 1.46455e-07 1.66092e-07 1.89882e-07 2.10373e-07 2.12105e-07 2.15101e-07 2.37861e-07 2.31935e-07 2.25142e-07 2.26346e-07 2.95497e-07 6.58103e-07 3.15508e-06 0.0629598 0.465597 0.944775 0.999932 0.999997 1 1 1 1 1 1 1 1 1 1 9.575e-38 1.55415e-30 2.21901e-26 2.3985e-23 6.136e-21 6.04856e-19 2.9783e-17 8.54778e-16 1.57964e-14 2.01201e-13 1.85314e-12 1.28041e-11 6.83089e-11 2.88178e-10 9.83056e-10 2.7704e-09 6.59432e-09 1.35538e-08 2.45534e-08 3.99537e-08 5.9416e-08 8.19549e-08 1.04969e-07 1.26984e-07 1.49897e-07 1.7207e-07 1.86297e-07 1.92501e-07 2.0706e-07 2.0669e-07 2.18687e-07 2.15677e-07 3.85838e-08 1.30576e-07 3.72382e-06 0.158815 0.758615 0.999725 0.999989 1 1 1 1 1 1 1 1 1 1 1 2.92164e-39 1.18981e-31 2.57409e-27 3.61281e-24 1.11198e-21 1.26073e-19 6.93479e-18 2.17932e-16 4.34881e-15 5.92195e-14 5.79009e-13 4.22653e-12 2.37626e-11 1.05553e-10 3.79264e-10 1.12722e-09 2.835e-09 6.16921e-09 1.18561e-08 2.05024e-08 3.24381e-08 4.76205e-08 6.52738e-08 8.45235e-08 1.05345e-07 1.27159e-07 1.4705e-07 1.62174e-07 1.76757e-07 1.60907e-07 2.70297e-07 2.67799e-07 3.64047e-08 1.043e-08 -8.45603e-08 0.361122 0.950592 0.999921 0.999997 1 1 1 1 1 1 1 1 1 1 1 7.4043e-41 7.61097e-33 2.50237e-28 4.56751e-25 1.69213e-22 2.20579e-20 1.35405e-18 4.65256e-17 1.00075e-15 1.45413e-14 1.50624e-13 1.1593e-12 6.85551e-12 3.20032e-11 1.20897e-10 3.78283e-10 1.00369e-09 2.30978e-09 4.70685e-09 8.65379e-09 1.4593e-08 2.28813e-08 3.36484e-08 4.68549e-08 6.25319e-08 8.05646e-08 9.99544e-08 1.18808e-07 1.36361e-07 1.0887e-07 2.29712e-07 2.71e-07 9.74234e-08 1.05929e-08 -4.78527e-06 0.621036 0.999828 1 1 1 1 1 1 1 1 1 1 1 1 1 1.48535e-42 3.88489e-34 1.94824e-29 4.6321e-26 2.06581e-23 3.09289e-21 2.1145e-19 7.9218e-18 1.83057e-16 2.82749e-15 3.09021e-14 2.49709e-13 1.54615e-12 7.55061e-12 2.98485e-11 9.78656e-11 2.72718e-10 6.61093e-10 1.42411e-09 2.779e-09 4.99561e-09 8.38773e-09 1.32848e-08 2.00219e-08 2.89623e-08 4.04356e-08 5.44524e-08 7.03663e-08 8.69409e-08 9.53383e-08 7.14711e-08 8.7084e-08 7.28405e-08 1.08148e-08 0.0237349 0.834477 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2.20884e-44 1.48433e-35 1.14021e-30 3.53595e-27 1.89655e-24 3.25185e-22 2.46466e-20 1.00074e-18 2.46635e-17 4.01577e-16 4.58747e-15 3.85194e-14 2.46928e-13 1.2463e-12 5.08998e-12 1.72564e-11 4.98328e-11 1.25625e-10 2.82839e-10 5.80632e-10 1.10699e-09 1.99009e-09 3.41198e-09 5.62631e-09 8.97599e-09 1.38815e-08 2.07342e-08 2.96502e-08 4.0122e-08 4.969e-08 5.31786e-08 5.19622e-08 4.13952e-08 1.2357e-08 0.117798 0.922473 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2.20333e-46 3.85956e-37 4.58417e-32 1.86236e-28 1.20039e-25 2.34368e-23 1.94869e-21 8.44988e-20 2.17983e-18 3.65867e-17 4.25695e-16 3.61024e-15 2.33898e-14 1.19228e-13 4.92155e-13 1.721e-12 5.35157e-12 1.49684e-11 3.83264e-11 9.10701e-11 2.01102e-10 4.12594e-10 7.88886e-10 1.41181e-09 2.38875e-09 3.86615e-09 6.03499e-09 9.07137e-09 1.29243e-08 1.68379e-08 1.88693e-08 1.76153e-08 1.80446e-08 1.36352e-08 0.18431 0.957697 1 1 1 1 1 1 1 1 1 1 1 1 1 1 9.86697e-43 2.86105e-41 1.01921e-39 3.64385e-38 1.23283e-36 3.51533e-35 8.94768e-34 1.98581e-32 3.86505e-31 6.83048e-30 1.27768e-28 2.54367e-27 4.68435e-26 5.6021e-25 4.29085e-24 2.22598e-23 8.0156e-23 2.09553e-22 4.10055e-22 6.12955e-22 7.111e-22 6.47632e-22 4.65506e-22 2.63799e-22 1.17219e-22 4.04685e-23 1.07115e-23 2.1483e-24 3.23264e-25 3.59426e-26 2.91202e-27 1.71626e-28 7.43621e-30 2.2942e-31 5.26088e-33 1.00828e-34 1.59693e-36 2.22204e-38 2.70171e-40 2.73493e-42 2.25407e-44 1.47468e-46 7.42312e-49 2.77018e-51 7.21268e-54 1.19645e-56 1.11205e-59 4.60803e-61 2.84833e-63 1.72164e-66 2.81753e-38 1.00772e-36 3.74277e-35 1.16312e-33 2.85367e-32 6.19116e-31 1.21555e-29 1.99241e-28 2.84919e-27 3.80575e-26 5.12196e-25 6.64377e-24 7.84619e-23 6.35725e-22 3.61227e-21 1.47561e-20 4.41208e-20 9.9814e-20 1.75113e-19 2.42457e-19 2.68329e-19 2.3922e-19 1.72219e-19 9.98574e-20 4.62787e-20 1.69778e-20 4.87888e-21 1.08505e-21 1.85699e-22 2.42783e-23 2.40682e-24 1.80902e-25 1.05252e-26 4.7482e-28 1.7302e-29 5.64323e-31 1.62245e-32 4.01178e-34 8.4275e-36 1.48548e-37 2.15842e-39 2.52702e-41 2.31631e-43 1.60109e-45 7.93066e-48 2.61679e-50 5.13857e-53 5.31997e-56 5.43876e-59 2.1651e-62 3.23069e-33 7.72061e-32 1.42977e-30 2.15847e-29 2.78892e-28 3.28455e-27 3.7126e-26 3.91127e-25 3.78319e-24 3.53618e-23 3.31597e-22 3.04577e-21 2.51316e-20 1.52285e-19 6.83647e-19 2.30016e-18 5.89116e-18 1.18001e-17 1.88749e-17 2.44685e-17 2.59774e-17 2.27131e-17 1.63652e-17 9.67975e-18 4.65503e-18 1.80231e-18 5.55895e-19 1.3479e-19 2.56014e-20 3.7958e-21 4.37071e-22 3.91008e-23 2.75489e-24 1.55678e-25 7.29923e-27 3.08916e-28 1.1475e-29 3.66274e-31 9.96677e-33 2.28807e-34 4.36189e-36 6.75963e-38 8.2868e-40 7.76043e-42 5.30096e-44 2.47819e-46 7.22276e-49 1.13437e-51 7.84327e-55 1.52201e-58 2.20228e-29 3.72039e-28 4.94815e-27 5.40129e-26 4.99813e-25 4.04906e-24 2.99889e-23 2.13031e-22 1.46417e-21 9.94615e-21 6.8728e-20 4.76224e-19 2.95212e-18 1.4169e-17 5.2362e-17 1.4976e-16 3.36318e-16 6.06885e-16 8.9623e-16 1.09797e-15 1.12543e-15 9.68918e-16 7.00051e-16 4.22343e-16 2.10436e-16 8.58214e-17 2.82722e-17 7.40661e-18 1.53784e-18 2.53152e-19 3.28703e-20 3.36807e-21 2.74088e-22 1.80842e-23 9.98615e-25 4.9742e-26 2.16924e-27 8.13186e-29 2.60121e-30 7.03497e-32 1.58578e-33 2.92086e-35 4.2842e-37 4.84128e-39 4.03653e-41 2.34077e-43 8.66472e-46 1.79303e-48 1.62586e-51 3.87121e-55 2.2571e-26 2.97392e-25 3.11813e-24 2.70407e-23 1.99693e-22 1.28741e-21 7.45457e-21 4.04762e-20 2.16184e-19 1.14346e-18 6.19487e-18 3.41935e-17 1.68305e-16 6.65596e-16 2.08518e-15 5.18755e-15 1.0397e-14 1.71383e-14 2.36248e-14 2.75703e-14 2.74477e-14 2.33694e-14 1.69799e-14 1.04622e-14 5.40089e-15 2.31778e-15 8.14241e-16 2.29714e-16 5.17608e-17 9.35415e-18 1.34771e-18 1.54796e-19 1.42179e-20 1.06187e-21 6.64118e-23 3.73204e-24 1.83206e-25 7.72676e-27 2.78025e-28 8.46345e-30 2.15116e-31 4.48076e-33 7.4624e-35 9.62496e-37 9.22021e-39 6.1955e-41 2.69011e-43 6.64024e-46 7.36527e-49 2.09405e-52 6.65917e-24 7.26417e-23 6.34919e-22 4.61545e-21 2.87e-20 1.56212e-19 7.61899e-19 3.44232e-18 1.50688e-17 6.57646e-17 2.93596e-16 1.34141e-15 5.45674e-15 1.82929e-14 4.96539e-14 1.09355e-13 1.98366e-13 3.0212e-13 3.92365e-13 4.39425e-13 4.27266e-13 3.61319e-13 2.64837e-13 1.66999e-13 8.94275e-14 4.03875e-14 1.5119e-14 4.59232e-15 1.12108e-15 2.21523e-16 3.51541e-17 4.47776e-18 4.58637e-19 3.81981e-20 2.65889e-21 1.65564e-22 8.98018e-24 4.1779e-25 1.65626e-26 5.55188e-28 1.55437e-29 3.57058e-31 6.5713e-33 9.39299e-35 1.00086e-36 7.51443e-39 3.66648e-41 1.02275e-43 1.29178e-46 4.16905e-50 7.96849e-22 7.49531e-21 5.67021e-20 3.57993e-19 1.9395e-18 9.21984e-18 3.92755e-17 1.54087e-16 5.79498e-16 2.17062e-15 8.26961e-15 3.22073e-14 1.11362e-13 3.23142e-13 7.72735e-13 1.52755e-12 2.53687e-12 3.60469e-12 4.44651e-12 4.81118e-12 4.59347e-12 3.87423e-12 2.8738e-12 1.85904e-12 1.03485e-12 4.92484e-13 1.9645e-13 6.4283e-14 1.7033e-14 3.68119e-15 6.42547e-16 9.04422e-17 1.02714e-17 9.47932e-19 7.2961e-20 5.00524e-21 2.98204e-22 1.52064e-23 6.59507e-25 2.41499e-26 7.37957e-28 1.84974e-29 3.7159e-31 5.80238e-33 6.76195e-35 5.56163e-37 2.97902e-39 9.1408e-42 1.27228e-44 4.51244e-48 4.74929e-20 3.9692e-19 2.67045e-18 1.50181e-17 7.26091e-17 3.08543e-16 1.1755e-15 4.11272e-15 1.36989e-14 4.52482e-14 1.50993e-13 5.11523e-13 1.53406e-12 3.91372e-12 8.35272e-12 1.49884e-11 2.30125e-11 3.0766e-11 3.63107e-11 3.8193e-11 3.59885e-11 3.03934e-11 2.2889e-11 1.52258e-11 8.83817e-12 4.44062e-12 1.88943e-12 6.6638e-13 1.92406e-13 4.55946e-14 8.77128e-15 1.36566e-15 1.71939e-16 1.75769e-17 1.49619e-18 1.13145e-19 7.40715e-21 4.14132e-22 1.96546e-23 7.86202e-25 2.62022e-26 7.1536e-28 1.56367e-29 2.65502e-31 3.36326e-33 3.0071e-35 1.75099e-37 5.84069e-40 8.82733e-43 3.40655e-46 1.61139e-18 1.22537e-17 7.48748e-17 3.82327e-16 1.67925e-15 6.48803e-15 2.24829e-14 7.14358e-14 2.15056e-13 6.38515e-13 1.90495e-12 5.68297e-12 1.50024e-11 3.40499e-11 6.55321e-11 1.0776e-10 1.54262e-10 1.95525e-10 2.22264e-10 2.28568e-10 2.13585e-10 1.8131e-10 1.39046e-10 9.53342e-11 5.79423e-11 3.07832e-11 1.39926e-11 5.32801e-12 1.68352e-12 4.3895e-13 9.33877e-14 1.61368e-14 2.25923e-15 2.56741e-16 2.4303e-17 2.03587e-18 1.47132e-19 9.06024e-21 4.72672e-22 2.07443e-23 7.5707e-25 2.25905e-26 5.38718e-28 9.96314e-30 1.37284e-31 1.33388e-33 8.43138e-36 3.05045e-38 4.98927e-41 2.0892e-44 3.41587e-17 2.41129e-16 1.36106e-15 6.40583e-15 2.59127e-14 9.21995e-14 2.94216e-13 8.59909e-13 2.37262e-12 6.419e-12 1.74013e-11 4.60526e-11 1.08179e-10 2.20376e-10 3.85724e-10 5.86064e-10 7.8826e-10 9.53828e-10 1.05077e-09 1.06205e-09 9.88515e-10 8.46469e-10 6.62696e-10 4.70124e-10 3.00041e-10 1.68808e-10 8.21098e-11 3.38744e-11 1.17517e-11 3.38279e-12 7.99091e-13 1.53926e-13 2.40847e-14 3.06046e-15 3.25015e-16 3.04015e-17 2.44408e-18 1.67043e-19 9.65311e-21 4.68253e-22 1.88425e-23 6.18371e-25 1.61787e-26 3.27548e-28 4.93185e-30 5.22876e-32 3.6015e-34 1.41807e-36 2.52e-39 1.14341e-42 4.83011e-16 3.22092e-15 1.70323e-14 7.47858e-14 2.81655e-13 9.32177e-13 2.76565e-12 7.50819e-12 1.9184e-11 4.77549e-11 1.18587e-10 2.81008e-10 5.92112e-10 1.09025e-09 1.74793e-09 2.4724e-09 3.14669e-09 3.65872e-09 3.92833e-09 3.92131e-09 3.64936e-09 3.16186e-09 2.53385e-09 1.86877e-09 1.25345e-09 7.48037e-10 3.90202e-10 1.75234e-10 6.68313e-11 2.13024e-11 5.6096e-12 1.21071e-12 2.13022e-13 3.04909e-14 3.67166e-15 3.87203e-16 3.49507e-17 2.67534e-18 1.72751e-19 9.33889e-21 4.17582e-22 1.51826e-23 4.38866e-25 9.79319e-27 1.62223e-28 1.8894e-30 1.42815e-32 6.16396e-35 1.20079e-37 5.95032e-41 4.77955e-15 3.06135e-14 1.53565e-13 6.35515e-13 2.24831e-12 6.9781e-12 1.9399e-11 4.93096e-11 1.17691e-10 2.7182e-10 6.20487e-10 1.32318e-09 2.51619e-09 4.21317e-09 6.22805e-09 8.25941e-09 1.00146e-08 1.12576e-08 1.18424e-08 1.17246e-08 1.09441e-08 9.61922e-09 7.93151e-09 6.08477e-09 4.29446e-09 2.72319e-09 1.52852e-09 7.48922e-10 3.14223e-10 1.11197e-10 3.27679e-11 7.96669e-12 1.58632e-12 2.57739e-13 3.55878e-14 4.26696e-15 4.35887e-16 3.76594e-17 2.73823e-18 1.66234e-19 8.32237e-21 3.37798e-22 1.0872e-23 2.69549e-25 4.95303e-27 6.39164e-29 5.34944e-31 2.55513e-33 5.51541e-36 3.0332e-39 3.44061e-14 2.15205e-13 1.03565e-12 4.0744e-12 1.36356e-11 3.99269e-11 1.04558e-10 2.50076e-10 5.60391e-10 1.20695e-09 2.53817e-09 4.89579e-09 8.45025e-09 1.29485e-08 1.77674e-08 2.2245e-08 2.58649e-08 2.82736e-08 2.92772e-08 2.88534e-08 2.70854e-08 2.42727e-08 2.06138e-08 1.64487e-08 1.22314e-08 8.26045e-09 5.00301e-09 2.67057e-09 1.23375e-09 4.85842e-10 1.60825e-10 4.42625e-11 1.00296e-11 1.86219e-12 2.97191e-13 4.07756e-14 4.74315e-15 4.65584e-16 3.83887e-17 2.63647e-18 1.48903e-19 6.79921e-21 2.4558e-22 6.8198e-24 1.4017e-25 2.0213e-27 1.88953e-29 1.00818e-31 2.43359e-34 1.50587e-37 1.86334e-13 1.15766e-12 5.4001e-12 2.03436e-11 6.47691e-11 1.79742e-10 4.45041e-10 1.00453e-09 2.11913e-09 4.27406e-09 8.25673e-09 1.44784e-08 2.27948e-08 3.2169e-08 4.12615e-08 4.9111e-08 5.51072e-08 5.8897e-08 6.02687e-08 5.93529e-08 5.62731e-08 5.15094e-08 4.50888e-08 3.74204e-08 2.93307e-08 2.1142e-08 1.37877e-08 8.01116e-09 4.077e-09 1.78952e-09 6.67202e-10 2.08506e-10 5.39447e-11 1.1522e-11 2.13363e-12 3.36347e-13 4.47851e-14 5.0247e-15 4.72724e-16 3.69494e-17 2.36806e-18 1.22364e-19 4.99039e-21 1.56233e-22 3.61642e-24 5.86992e-26 6.175e-28 3.70967e-30 1.00881e-32 7.06789e-36 7.82812e-13 4.91863e-12 2.24456e-11 8.14336e-11 2.47625e-10 6.53219e-10 1.53267e-09 3.27033e-09 6.50359e-09 1.23163e-08 2.17752e-08 3.48334e-08 5.02137e-08 6.56529e-08 7.92998e-08 9.03526e-08 9.84171e-08 1.03341e-07 1.04861e-07 1.03763e-07 9.95857e-08 9.33201e-08 8.4347e-08 7.27672e-08 6.00037e-08 4.60316e-08 3.22701e-08 2.03792e-08 1.14163e-08 5.58446e-09 2.3455e-09 8.32618e-10 2.46182e-10 6.10147e-11 1.30742e-11 2.37487e-12 3.6386e-13 4.68958e-14 5.05421e-15 4.51081e-16 3.29105e-17 1.93144e-18 8.93253e-20 3.16852e-21 8.30712e-23 1.52728e-24 1.82048e-26 1.24038e-28 3.82955e-31 3.05198e-34 2.62553e-12 1.70159e-11 7.65792e-11 2.68635e-10 7.81914e-10 1.96321e-09 4.36866e-09 8.81733e-09 1.65329e-08 2.92251e-08 4.73877e-08 6.93171e-08 9.18515e-08 1.11978e-07 1.28383e-07 1.40941e-07 1.49726e-07 1.55105e-07 1.56726e-07 1.56574e-07 1.52593e-07 1.46857e-07 1.37651e-07 1.23105e-07 1.0607e-07 8.62559e-08 6.48145e-08 4.43607e-08 2.7264e-08 1.4815e-08 6.99017e-09 2.81343e-09 9.51164e-10 2.7491e-10 6.79405e-11 1.42107e-11 2.50763e-12 3.71774e-13 4.59674e-14 4.69242e-15 3.90608e-16 2.61114e-17 1.37425e-18 5.5453e-20 1.65375e-21 3.45925e-23 4.69347e-25 3.64298e-27 1.2832e-29 1.16776e-32 7.20306e-12 4.92622e-11 2.20214e-10 7.49025e-10 2.08933e-09 4.99573e-09 1.055e-08 2.01563e-08 3.55442e-08 5.83276e-08 8.63736e-08 1.15808e-07 1.4202e-07 1.62851e-07 1.7865e-07 1.90046e-07 1.97462e-07 2.03027e-07 2.04774e-07 2.07305e-07 2.06046e-07 2.04213e-07 1.9961e-07 1.84771e-07 1.64999e-07 1.41266e-07 1.13192e-07 8.35044e-08 5.59473e-08 3.3556e-08 1.76948e-08 8.04564e-09 3.10981e-09 1.04185e-09 2.96356e-10 7.12974e-11 1.44711e-11 2.46387e-12 3.48974e-13 4.07094e-14 3.86538e-15 2.94346e-16 1.76289e-17 8.08783e-19 2.74022e-20 6.50811e-22 1.00249e-23 8.83701e-26 3.54034e-28 3.67201e-31 1.64865e-11 1.22431e-10 5.46382e-10 1.80303e-09 4.81518e-09 1.09444e-08 2.18742e-08 3.94153e-08 6.52232e-08 9.84576e-08 1.3368e-07 1.65296e-07 1.89626e-07 2.06798e-07 2.19066e-07 2.26836e-07 2.31662e-07 2.37184e-07 2.39201e-07 2.45513e-07 2.49318e-07 2.53968e-07 2.57354e-07 2.49154e-07 2.30511e-07 2.06546e-07 1.74583e-07 1.37644e-07 9.97181e-08 6.54397e-08 3.82589e-08 1.95276e-08 8.65602e-09 3.31475e-09 1.08065e-09 2.98335e-10 6.93592e-11 1.34832e-11 2.17407e-12 2.88144e-13 3.10456e-14 2.68026e-15 1.81848e-16 9.44332e-18 3.6189e-19 9.71725e-21 1.69238e-22 1.68795e-24 7.66363e-27 9.03695e-30 3.24835e-11 2.68141e-10 1.19723e-09 3.82655e-09 9.75873e-09 2.1024e-08 3.96475e-08 6.7155e-08 1.03649e-07 1.43694e-07 1.79925e-07 2.07113e-07 2.24805e-07 2.36518e-07 2.44082e-07 2.47943e-07 2.49755e-07 2.54968e-07 2.57585e-07 2.67209e-07 2.75479e-07 2.8359e-07 2.68724e-07 2.94786e-07 2.9379e-07 2.80373e-07 2.44432e-07 2.00293e-07 1.56514e-07 1.11304e-07 7.13414e-08 4.05413e-08 2.03843e-08 8.82827e-09 3.26829e-09 1.02681e-09 2.7151e-10 5.99302e-11 1.09552e-11 1.6441e-12 2.00373e-13 1.95466e-14 1.4968e-15 8.76335e-17 3.78302e-18 1.14375e-19 2.24327e-21 2.522e-23 1.29291e-25 1.72697e-28 6.04661e-11 5.31532e-10 2.37057e-09 7.30786e-09 1.77231e-08 3.60538e-08 6.39348e-08 1.01444e-07 1.44967e-07 1.85009e-07 2.15719e-07 2.34583e-07 2.45362e-07 2.52186e-07 2.56528e-07 2.57111e-07 2.56795e-07 2.61541e-07 2.6503e-07 2.77822e-07 2.85441e-07 2.85593e-07 4.24652e-07 3.10634e-07 3.0166e-07 2.94268e-07 2.35156e-07 2.09396e-07 2.17123e-07 1.67983e-07 1.16484e-07 7.30906e-08 4.07804e-08 1.98089e-08 8.27117e-09 2.93466e-09 8.76057e-10 2.18213e-10 4.49981e-11 7.61379e-12 1.04521e-12 1.14703e-13 9.8679e-15 6.48273e-16 3.13748e-17 1.06314e-18 2.3377e-20 2.94988e-22 1.70098e-24 2.5643e-27 1.3e-10 9.788e-10 4.33328e-09 1.27998e-08 2.93628e-08 5.61662e-08 9.33261e-08 1.37832e-07 1.81091e-07 2.15515e-07 2.37433e-07 2.49192e-07 2.5535e-07 2.59568e-07 2.62372e-07 2.60488e-07 2.58429e-07 2.63967e-07 2.67151e-07 2.87546e-07 2.85971e-07 3.59131e-07 2.79286e-07 2.8354e-07 7.94318e-06 1.92121e-05 1.59308e-05 2.80068e-06 2.26121e-07 2.31541e-07 1.71013e-07 1.15907e-07 7.05873e-08 3.79494e-08 1.76831e-08 7.02988e-09 2.35589e-09 6.59285e-10 1.5272e-10 2.90008e-11 4.46164e-12 5.47826e-13 5.26493e-14 3.8591e-15 2.08225e-16 7.86518e-18 1.92914e-19 2.71993e-21 1.75771e-23 2.98422e-26 3.41166e-10 1.71627e-09 7.44759e-09 2.08909e-08 4.50291e-08 8.05111e-08 1.24456e-07 1.69386e-07 2.04587e-07 2.37413e-07 2.50688e-07 2.57012e-07 2.60677e-07 2.63837e-07 2.66322e-07 2.6151e-07 2.93158e-07 2.65737e-07 3.21795e-07 3.04123e-07 2.96552e-07 2.75039e-07 2.73017e-07 4.17011e-06 3.54607e-05 3.68428e-05 3.68489e-05 2.76409e-05 1.66801e-06 2.21927e-07 2.15919e-07 1.6182e-07 1.0748e-07 6.33867e-08 3.26341e-08 1.44111e-08 5.38305e-09 1.68179e-09 4.34953e-10 9.21221e-11 1.57821e-11 2.15419e-12 2.29795e-13 1.86755e-14 1.11683e-15 4.67807e-17 1.27455e-18 2.00221e-20 1.44846e-22 2.7727e-25 9.11348e-10 2.91755e-09 1.21439e-08 3.18875e-08 6.37571e-08 1.05213e-07 1.50027e-07 1.89801e-07 2.15881e-07 2.3819e-07 2.63275e-07 2.62946e-07 2.64753e-07 2.67437e-07 2.70197e-07 2.70455e-07 2.70784e-07 2.7594e-07 2.76216e-07 2.77033e-07 2.76012e-07 2.74068e-07 2.73013e-07 1.4e-05 3.68149e-05 3.68282e-05 3.68422e-05 3.68279e-05 1.09231e-05 2.50641e-07 2.82039e-07 2.08014e-07 1.47431e-07 9.42265e-08 5.30522e-08 2.5807e-08 1.0666e-08 3.69348e-09 1.05862e-09 2.4819e-10 4.69907e-11 7.07751e-12 8.32148e-13 7.45163e-14 4.91372e-15 2.27405e-16 6.86812e-18 1.20154e-19 9.73744e-22 2.10453e-24 2.16356e-09 4.87664e-09 1.90245e-08 4.63811e-08 8.61676e-08 1.33038e-07 1.79407e-07 2.15524e-07 2.26832e-07 4.83327e-07 2.66765e-07 2.66986e-07 2.68019e-07 2.70773e-07 2.74156e-07 2.73575e-07 2.73728e-07 2.79021e-07 2.78954e-07 2.78566e-07 2.77553e-07 2.75317e-07 2.73018e-07 5.67881e-06 3.61868e-05 3.68163e-05 3.68276e-05 3.68182e-05 1.11718e-05 3.00539e-07 2.94918e-07 2.47141e-07 1.86057e-07 1.276e-07 7.782e-08 4.13139e-08 1.8721e-08 7.12131e-09 2.24217e-09 5.76867e-10 1.19707e-10 1.97429e-11 2.5417e-12 2.49459e-13 1.80667e-14 9.21016e-16 3.07527e-17 5.97301e-19 5.40011e-21 1.31008e-23 4.41892e-09 8.06033e-09 2.88455e-08 6.48663e-08 1.11969e-07 1.62273e-07 2.07575e-07 2.37718e-07 2.51335e-07 2.51373e-07 2.59595e-07 2.66368e-07 2.69711e-07 2.741e-07 2.78235e-07 2.75003e-07 3.09116e-07 2.84993e-07 2.84408e-07 2.81853e-07 2.80388e-07 2.78275e-07 2.7485e-07 2.73685e-07 1.32675e-05 3.67395e-05 3.68178e-05 2.45332e-05 1.28847e-06 3.1391e-07 3.08292e-07 2.69033e-07 2.16988e-07 1.59439e-07 1.04785e-07 6.02452e-08 2.96596e-08 1.22745e-08 4.20464e-09 1.17626e-09 2.65297e-10 4.75678e-11 6.66415e-12 7.129e-13 5.63844e-14 3.14578e-15 1.15229e-16 2.46223e-18 2.45811e-20 6.61889e-23 7.85102e-09 1.31366e-08 4.24715e-08 8.7771e-08 1.40775e-07 1.9108e-07 2.2829e-07 2.48251e-07 2.5788e-07 2.57681e-07 2.62506e-07 2.68433e-07 2.71643e-07 2.7871e-07 2.82959e-07 2.83851e-07 2.84309e-07 2.88375e-07 3.00117e-07 2.90981e-07 2.84747e-07 2.82339e-07 2.80032e-07 2.77547e-07 2.77398e-07 4.51442e-06 6.9138e-06 2.8361e-06 3.77741e-07 3.94619e-07 3.01925e-07 2.85806e-07 2.41737e-07 1.88072e-07 1.31903e-07 8.13494e-08 4.30917e-08 1.92123e-08 7.09179e-09 2.13798e-09 5.19816e-10 1.00538e-10 1.52057e-11 1.75752e-12 1.50323e-13 9.08022e-15 3.60734e-16 8.38221e-18 9.13522e-20 2.69968e-22 1.23951e-08 2.0896e-08 6.05611e-08 1.14755e-07 1.70384e-07 2.14143e-07 2.34947e-07 2.47201e-07 2.56914e-07 2.56267e-07 2.63322e-07 2.69429e-07 2.7361e-07 2.86007e-07 2.89162e-07 2.8659e-07 2.87139e-07 3.01153e-07 3.1003e-07 3.17358e-07 2.95794e-07 2.87662e-07 2.85661e-07 2.85731e-07 2.92744e-07 2.94252e-07 2.98906e-07 3.01266e-07 3.25721e-07 3.26874e-07 3.12379e-07 2.90166e-07 2.56556e-07 2.10759e-07 1.56832e-07 1.02985e-07 5.8195e-08 2.76961e-08 1.09137e-08 3.51228e-09 9.11603e-10 1.88217e-10 3.039e-11 3.75066e-12 3.42755e-13 2.21484e-14 9.43233e-16 2.35649e-17 2.7719e-19 8.88377e-22 1.78002e-08 3.19673e-08 8.29295e-08 1.43527e-07 1.94774e-07 2.21754e-07 2.26486e-07 2.34528e-07 2.98666e-07 2.50755e-07 2.84386e-07 2.69173e-07 2.71381e-07 2.7935e-07 2.94596e-07 2.91667e-07 2.88837e-07 3.02894e-07 3.77105e-07 3.26874e-07 3.28211e-07 2.96196e-07 2.8983e-07 2.85825e-07 4.78158e-07 8.23103e-07 8.69615e-07 7.55035e-07 4.11313e-07 3.47917e-07 3.19011e-07 2.95287e-07 2.68037e-07 2.29362e-07 1.79138e-07 1.24039e-07 7.40696e-08 3.72606e-08 1.55078e-08 5.26598e-09 1.44098e-09 3.13548e-10 5.33605e-11 6.94583e-12 6.70237e-13 4.58036e-14 2.06671e-15 5.48062e-17 6.85345e-19 2.33747e-21 2.38751e-08 4.61736e-08 1.07149e-07 1.67643e-07 2.0477e-07 2.12834e-07 2.15043e-07 2.48881e-07 2.30057e-07 2.45597e-07 2.49275e-07 2.54633e-07 2.88477e-07 8.12696e-07 5.56301e-07 2.95778e-07 2.89052e-07 5.93715e-07 6.14637e-07 5.45626e-07 3.01133e-07 2.92862e-07 2.92809e-07 2.90081e-07 2.88365e-07 2.72959e-06 6.82236e-06 1.86635e-06 3.49712e-07 3.43472e-07 3.1933e-07 2.68509e-07 2.65104e-07 2.40602e-07 1.97446e-07 1.43413e-07 8.97784e-08 4.72418e-08 2.05056e-08 7.24499e-09 2.06089e-09 4.66348e-10 8.2638e-11 1.12182e-11 1.13049e-12 8.07453e-14 3.80703e-15 1.05328e-16 1.36981e-18 4.83303e-21 3.03427e-08 6.15125e-08 1.27806e-07 1.80389e-07 2.03443e-07 2.10315e-07 2.14398e-07 2.17427e-07 2.3091e-07 2.35295e-07 2.44951e-07 4.89911e-07 2.36813e-06 2.30116e-06 5.49935e-07 2.94176e-07 2.9025e-07 3.36661e-07 6.1406e-07 6.08261e-07 3.11799e-07 2.90724e-07 2.8995e-07 2.88877e-07 2.88358e-07 3.98914e-06 6.884e-06 5.37307e-06 5.50572e-07 3.22559e-07 3.18674e-07 4.44106e-07 2.57582e-07 2.50443e-07 2.12463e-07 1.59083e-07 1.03138e-07 5.61793e-08 2.51449e-08 9.1339e-09 2.66983e-09 6.2163e-10 1.13565e-10 1.59163e-11 1.65608e-12 1.21914e-13 5.90118e-15 1.66559e-16 2.19022e-18 7.71471e-21 3.60916e-08 7.16181e-08 1.25092e-07 1.31019e-07 1.37195e-07 2.0411e-07 2.20246e-07 2.25048e-07 2.40677e-07 2.45228e-07 3.76743e-07 5.59319e-06 3.83678e-06 6.89227e-07 3.00005e-07 2.95601e-07 2.94944e-07 2.94606e-07 2.94957e-07 3.00452e-07 3.23363e-07 3.12436e-07 2.97548e-07 2.90415e-07 2.88362e-07 5.18078e-06 6.90373e-06 6.89503e-06 1.63115e-06 3.33596e-07 4.27464e-07 3.41063e-07 2.98292e-07 2.64076e-07 2.18427e-07 1.64577e-07 1.0908e-07 6.10346e-08 2.80336e-08 1.04302e-08 3.12003e-09 7.43359e-10 1.38904e-10 1.9878e-11 2.10412e-12 1.56638e-13 7.60146e-15 2.12621e-16 2.72784e-18 9.16504e-21 4.00467e-08 7.34027e-08 9.71698e-08 1.39229e-07 7.68213e-07 2.31496e-07 2.45455e-07 2.53529e-07 2.54637e-07 1.04474e-06 1.54438e-05 6.64017e-06 3.7622e-07 3.02226e-07 2.97562e-07 2.96204e-07 2.95353e-07 2.94768e-07 3.02992e-07 3.08729e-07 3.37148e-07 3.37874e-07 2.98108e-07 2.90629e-07 2.88407e-07 4.22914e-06 6.88378e-06 6.56631e-06 8.71552e-07 3.47219e-07 3.43623e-07 4.71291e-07 2.83066e-07 2.33146e-07 1.94471e-07 1.54997e-07 1.08072e-07 6.27262e-08 2.97041e-08 1.13578e-08 3.47739e-09 8.43694e-10 1.59609e-10 2.29678e-11 2.42492e-12 1.78296e-13 8.4431e-15 2.26925e-16 2.73883e-18 8.37658e-21 4.21492e-08 7.37613e-08 1.34849e-07 2.25585e-06 2.23721e-06 1.35013e-06 5.50872e-07 5.12953e-07 2.89099e-07 3.7613e-05 2.94552e-05 1.07205e-06 3.40132e-07 3.13402e-07 3.03419e-07 2.99086e-07 2.96914e-07 2.9541e-07 2.95905e-07 7.47482e-06 2.01479e-05 1.33631e-05 1.39223e-06 2.97287e-07 2.89304e-07 1.13639e-06 5.11054e-06 2.61853e-06 3.64712e-07 3.53166e-07 3.33775e-07 3.39198e-07 2.40847e-07 1.68353e-07 1.49116e-07 1.32729e-07 1.04309e-07 6.46747e-08 3.18674e-08 1.25153e-08 3.88605e-09 9.43873e-10 1.76595e-10 2.48521e-11 2.53785e-12 1.783e-13 7.94695e-15 1.96887e-16 2.12212e-18 5.51137e-21 4.38583e-08 6.72789e-08 7.29785e-08 1.24443e-06 1.68265e-06 3.58548e-06 4.94237e-06 3.65792e-06 6.53217e-07 6.14749e-05 2.45852e-05 5.27172e-07 3.81176e-07 3.40343e-07 3.23508e-07 3.07541e-07 3.03568e-07 2.97533e-07 2.9602e-07 2.8675e-05 3.89298e-05 3.89752e-05 1.85113e-05 3.6898e-07 2.9814e-07 3.29365e-07 4.16041e-07 3.44236e-07 3.58206e-07 3.28919e-07 3.1918e-07 3.13702e-07 1.24992e-07 1.06436e-07 1.06221e-07 1.06194e-07 9.973e-08 6.98163e-08 3.63594e-08 1.44117e-08 4.39317e-09 1.02861e-09 1.83212e-10 2.43214e-11 2.3216e-12 1.50781e-13 6.11457e-15 1.34365e-16 1.22678e-18 2.43363e-21 2.56936e-08 2.79679e-08 3.27104e-08 4.4146e-08 1.25945e-07 2.30191e-07 4.95821e-05 2.45131e-05 3.57062e-05 4.90265e-05 1.57863e-05 2.78153e-06 5.26476e-07 2.50632e-06 1.12991e-06 3.59562e-07 3.36336e-07 4.00102e-07 2.96811e-07 3.17424e-05 3.8957e-05 3.89663e-05 3.66332e-05 3.36686e-06 3.26879e-07 3.38329e-07 3.32007e-07 3.34646e-07 3.33627e-07 3.60762e-07 2.99103e-07 2.6883e-07 1.17402e-07 3.93457e-05 6.87e-06 8.88038e-08 8.87851e-08 5.56843e-08 4.4488e-08 1.66682e-08 4.75686e-09 1.03375e-09 1.70195e-10 2.08058e-11 1.81852e-12 1.073e-13 3.88958e-15 7.41331e-17 5.51703e-19 7.61494e-22 2.56482e-08 2.56482e-08 2.56482e-08 2.73197e-08 6.00668e-08 -2.56468e-06 0.000461116 0.000506019 0.000229246 9.36616e-05 0.000218466 7.21238e-05 2.57884e-05 1.34391e-05 1.74079e-06 8.18139e-06 9.63633e-06 1.60262e-06 3.07283e-07 1.6663e-05 3.89548e-05 3.89559e-05 3.32526e-05 2.30481e-06 3.45551e-07 3.43717e-07 3.28855e-07 3.279e-07 3.18007e-07 3.12642e-07 3.08347e-07 3.30477e-06 6.56511e-05 8.2614e-05 7.63776e-05 1.47176e-05 8.79926e-08 1.59217e-07 4.76141e-08 1.72272e-08 4.51611e-09 9.0229e-10 1.36768e-10 1.53687e-11 1.22779e-12 6.53607e-14 2.08854e-15 3.3659e-17 1.94578e-19 1.65504e-22 0.767705 0.706237 0.602192 0.452993 0.27649 0.142562 0.0760229 0.0256337 0.00030281 0.000539219 0.000740323 0.000262522 0.000102244 1.79172e-05 2.83626e-05 5.43495e-05 2.02773e-05 3.71454e-07 3.59553e-07 3.47369e-07 1.79202e-05 3.26675e-05 1.31721e-05 4.49079e-07 3.35347e-07 3.31565e-07 3.23794e-07 3.20714e-07 3.14695e-07 3.1385e-07 3.15428e-07 1.14254e-05 8.2611e-05 8.26122e-05 8.26116e-05 2.94739e-05 8.79032e-08 1.16714e-07 4.58049e-08 1.47787e-08 3.60372e-09 6.70222e-10 9.43845e-11 9.80217e-12 7.17737e-13 3.44339e-14 9.64831e-16 1.29856e-17 5.67675e-20 2.74347e-23 1 1 1 1 0.964034 0.818632 0.571131 0.325774 0.157895 0.0165893 0.000845602 0.000776308 9.47645e-05 3.98306e-05 5.64564e-05 5.56851e-05 1.45349e-05 3.55457e-07 3.53377e-07 3.47138e-07 5.86606e-07 1.5992e-06 4.0322e-07 3.38131e-07 3.26536e-07 3.23819e-07 3.19324e-07 3.17558e-07 7.22649e-07 7.94115e-07 3.52754e-07 6.70227e-06 7.03327e-05 8.26092e-05 7.31056e-05 1.15347e-05 8.76854e-08 9.1538e-08 3.5449e-08 1.07427e-08 2.47127e-09 4.33188e-10 5.7214e-11 5.52651e-12 3.71992e-13 1.60927e-14 3.94611e-16 4.41009e-18 1.43939e-20 3.7617e-24 1 1 1 1 1 0.999772 0.99316 0.879446 0.64266 0.343247 0.00719943 0.000352493 0.000263381 0.000192372 2.38559e-05 2.42056e-05 9.3643e-06 3.50078e-07 3.45404e-07 3.41584e-07 3.43685e-07 3.32957e-07 3.26209e-07 3.24122e-07 3.21931e-07 3.19316e-07 3.16246e-07 3.22414e-07 8.75209e-07 8.752e-07 3.57789e-07 1.51358e-06 9.33287e-06 4.8522e-05 8.55124e-06 1.90392e-07 8.72455e-08 6.34379e-08 2.37449e-08 6.83773e-09 1.49658e-09 2.48986e-10 3.10016e-11 2.79434e-12 1.72992e-13 6.74022e-15 1.44112e-16 1.3277e-18 3.1869e-21 4.28238e-25 1 1 1 1 1 0.999996 0.999967 0.999928 0.982561 0.852657 0.498407 0.0467196 0.000352488 0.000450146 0.000419786 3.84283e-05 4.99875e-06 3.46506e-07 3.40768e-07 3.39066e-07 3.39289e-07 3.28632e-07 3.20078e-07 3.21045e-07 3.18732e-07 3.16466e-07 3.15221e-07 3.26946e-07 8.23285e-07 4.4659e-07 3.43113e-07 2.77501e-07 2.37572e-07 4.04063e-07 1.52195e-07 1.40946e-07 7.43451e-08 3.96414e-08 1.41855e-08 3.89006e-09 8.12305e-10 1.28496e-10 1.50951e-11 1.26929e-12 7.21272e-14 2.52218e-15 4.67409e-17 3.5153e-19 6.09346e-22 4.01469e-26 1 1 1 1 1 1 0.999999 0.999997 0.999989 0.994991 0.938885 0.525608 0.0304308 0.00235845 0.000638273 3.08857e-06 4.26757e-07 3.7612e-07 3.32935e-07 3.33418e-07 3.30307e-07 3.17295e-07 3.16685e-07 3.16556e-07 3.16246e-07 3.14673e-07 3.14156e-07 3.19687e-07 3.24477e-07 3.36775e-07 4.96242e-07 2.82773e-07 2.24035e-07 1.58717e-07 1.36269e-07 1.13475e-07 5.01187e-08 2.2684e-08 7.6678e-09 1.99701e-09 3.97189e-10 5.96337e-11 6.59626e-12 5.16115e-13 2.68271e-14 8.37907e-16 1.33656e-17 8.12079e-20 9.98989e-23 3.10641e-27 1 1 1 1 1 1 1 1 1 0.999997 0.999963 0.910072 0.461581 0.0215011 0.000200316 0.000143481 3.44217e-07 3.32005e-07 3.27688e-07 3.32161e-07 3.31488e-07 3.92363e-07 3.96629e-07 3.28168e-07 3.12738e-07 3.13431e-07 3.1331e-07 3.13546e-07 3.15219e-07 4.29607e-07 4.75619e-07 2.30513e-07 2.35335e-07 1.71881e-07 1.24562e-07 7.14573e-08 2.96777e-08 1.1924e-08 3.76914e-09 9.27555e-10 1.74981e-10 2.48438e-11 2.57878e-12 1.8709e-13 8.85985e-15 2.45903e-16 3.35297e-18 1.62987e-20 1.40171e-23 1.99779e-28 1 1 1 1 1 1 1 1 1 0.999999 0.999997 0.999914 0.772846 0.244582 0.000562608 8.96944e-05 1.76522e-06 3.27296e-07 3.18909e-07 3.0424e-07 4.04121e-07 3.98945e-07 4.02262e-07 3.38087e-07 3.06549e-07 3.12043e-07 3.1314e-07 3.19327e-07 2.3942e-06 2.40849e-06 1.35487e-07 1.91318e-07 1.86369e-07 1.31573e-07 8.18051e-08 4.08372e-08 1.58206e-08 5.73342e-09 1.68297e-09 3.89149e-10 6.92779e-11 9.26112e-12 8.98628e-13 6.02226e-14 2.58775e-15 6.35044e-17 7.35411e-19 2.83501e-21 1.68295e-24 1.07383e-29 1 1 1 1 1 1 1 1 1 1 0.999999 0.999965 0.975731 0.503573 0.0584172 -3.14415e-06 3.45925e-07 3.34009e-07 3.29585e-07 2.60866e-07 2.40447e-07 2.06233e-07 2.07017e-07 2.09864e-07 3.00912e-07 3.08877e-07 1.50554e-06 3.71688e-06 3.6654e-06 2.23241e-06 1.29801e-07 1.61635e-07 1.39305e-07 8.8448e-08 4.7887e-08 2.11223e-08 7.60948e-09 2.50219e-09 6.78944e-10 1.46745e-10 2.453e-11 3.07417e-12 2.77781e-13 1.71326e-14 6.65384e-16 1.43698e-17 1.40483e-19 4.26064e-22 1.72637e-25 4.83047e-31 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999882 0.816602 0.163171 -2.36131e-06 3.56877e-07 3.36319e-07 3.21584e-07 1.76717e-07 1.76043e-07 1.75801e-07 1.55535e-07 1.68441e-07 8.3179e-07 3.3426e-06 3.75483e-06 3.75351e-06 3.4646e-06 1.13208e-07 1.29428e-07 1.27022e-07 9.23693e-08 5.22997e-08 2.49564e-08 9.84098e-09 3.28004e-09 9.81016e-10 2.45291e-10 4.9339e-11 7.7096e-12 9.02168e-13 7.56425e-14 4.27875e-15 1.49642e-16 2.83137e-18 2.32356e-20 5.5026e-23 1.50599e-26 1.81147e-32 1 1 1 1 1 1 1 1 1 1 1 1 1 0.978759 0.359655 8.53754e-07 4.18795e-07 7.50157e-06 1.41417e-05 1.26192e-05 3.10559e-06 1.42164e-07 1.40497e-07 1.49596e-07 1.3852e-06 3.7332e-06 3.74283e-06 3.38909e-06 2.75713e-07 9.95285e-08 1.07713e-07 8.74517e-08 5.41011e-08 2.71784e-08 1.15092e-08 4.08647e-09 1.25238e-09 3.41026e-10 7.83968e-11 1.46226e-11 2.12772e-12 2.31663e-13 1.79647e-14 9.28982e-16 2.91556e-17 4.81266e-19 3.29714e-21 6.05215e-24 1.10724e-27 5.60956e-34 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.595792 1.39224e-06 5.57482e-07 1.60692e-05 1.63258e-05 1.63247e-05 1.62626e-05 4.24249e-06 1.36042e-07 1.32927e-07 4.18803e-07 1.30543e-06 1.41688e-06 3.76328e-07 9.0199e-08 9.29277e-08 7.56983e-08 5.13571e-08 2.75234e-08 1.22791e-08 4.63572e-09 1.48672e-09 4.16757e-10 1.03355e-10 2.18082e-11 3.76129e-12 5.0805e-13 5.13108e-14 3.66937e-15 1.72953e-16 4.85483e-18 6.96218e-20 3.95983e-22 5.5909e-25 6.76218e-29 1.41159e-35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.801163 0.00541808 2.8212e-08 8.72544e-06 1.63278e-05 1.31529e-05 1.51447e-06 1.12932e-06 3.17575e-07 1.19745e-07 1.24717e-07 1.12141e-07 9.89656e-08 7.85967e-08 8.55161e-08 6.5135e-08 4.39052e-08 2.52502e-08 1.18924e-08 4.72459e-09 1.59535e-09 4.62647e-10 1.18217e-10 2.67076e-11 5.16709e-12 8.22393e-13 1.02867e-13 9.61289e-15 6.32352e-16 2.70929e-17 6.77977e-19 8.41045e-21 3.94752e-23 4.25065e-26 3.35594e-30 2.81488e-37 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.890216 0.0726448 1.78669e-08 1.64941e-07 1.13857e-06 5.53849e-07 9.34645e-08 9.72223e-08 1.2843e-07 1.18864e-07 1.12842e-07 1.06464e-07 9.14027e-08 7.09497e-08 5.3078e-08 3.52259e-08 2.03543e-08 1.01107e-08 4.22367e-09 1.49812e-09 4.53657e-10 1.19065e-10 2.76989e-11 5.70569e-12 1.01211e-12 1.48521e-13 1.71785e-14 1.48284e-15 8.95471e-17 3.47878e-18 7.73471e-20 8.2602e-22 3.17686e-24 2.58166e-27 1.309e-31 4.38574e-39 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.946156 0.109802 1.56414e-08 3.65735e-08 4.50403e-08 6.585e-08 8.21138e-08 8.52857e-08 8.41712e-08 7.97424e-08 7.23419e-08 6.23943e-08 4.97279e-08 3.62556e-08 2.39813e-08 1.41125e-08 7.16306e-09 3.13069e-09 1.16768e-09 3.71031e-10 1.01128e-10 2.40846e-11 5.11053e-12 9.62595e-13 1.5688e-13 2.12484e-14 2.2733e-15 1.81188e-16 1.00334e-17 3.52666e-19 6.94125e-21 6.34341e-23 1.98023e-25 1.19605e-28 3.82333e-33 5.15289e-41 1.15296e-45 1.13918e-36 9.50884e-32 3.06995e-28 1.73324e-25 3.26112e-23 2.85313e-21 1.4225e-19 4.47938e-18 9.48107e-17 1.37145e-15 1.43304e-14 1.09796e-13 6.47286e-13 3.06542e-12 1.20559e-11 4.05877e-11 1.19803e-10 3.14385e-10 7.39551e-10 1.5694e-09 3.02099e-09 5.30361e-09 8.5357e-09 1.26399e-08 1.72563e-08 2.17468e-08 2.54965e-08 2.83201e-08 3.05587e-08 3.28817e-08 3.58431e-08 3.55502e-08 1.36352e-08 0.23633 0.969904 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2.53437e-43 1.56141e-34 1.10813e-29 3.27641e-26 1.71622e-23 2.90315e-21 2.18879e-19 8.71026e-18 2.04987e-16 3.12602e-15 3.3191e-14 2.59211e-13 1.55935e-12 7.49138e-12 2.96633e-11 9.96174e-11 2.92843e-10 7.6475e-10 1.79292e-09 3.79922e-09 7.31623e-09 1.2882e-08 2.08942e-08 3.14463e-08 4.40886e-08 5.77265e-08 6.95994e-08 7.77867e-08 8.55053e-08 9.07212e-08 9.20363e-08 7.68183e-08 7.09402e-08 1.49578e-08 0.236173 0.969595 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2.65197e-41 7.43647e-33 3.75759e-28 8.79672e-25 3.76967e-22 5.25118e-20 3.23459e-18 1.06192e-16 2.10662e-15 2.76582e-14 2.57132e-13 1.78346e-12 9.61758e-12 4.16603e-11 1.49316e-10 4.55178e-10 1.22514e-09 2.93216e-09 6.30088e-09 1.22355e-08 2.15908e-08 3.48695e-08 5.20381e-08 7.24177e-08 9.40696e-08 1.1442e-07 1.22308e-07 1.19814e-07 1.14966e-07 1.19451e-07 1.50295e-07 3.4842e-07 1.00228e-07 1.87812e-08 0.204779 0.962075 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.66655e-39 2.00495e-31 6.82225e-27 1.20631e-23 4.11885e-21 4.759e-19 2.50811e-17 7.21479e-16 1.27601e-14 1.51284e-13 1.28193e-12 8.15927e-12 4.05453e-11 1.62095e-10 5.36257e-10 1.50825e-09 3.7795e-09 8.38148e-09 1.66253e-08 2.97123e-08 4.8151e-08 7.1382e-08 9.80538e-08 1.26246e-07 1.51206e-07 1.68073e-07 1.36854e-07 1.23981e-07 1.6837e-07 3.51365e-07 3.53375e-07 3.28248e-07 7.89195e-08 2.66027e-08 0.133989 0.932512 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7.34326e-38 3.67501e-30 8.2021e-26 1.0937e-22 3.03161e-20 2.97739e-18 1.37506e-16 3.54136e-15 5.69473e-14 6.20629e-13 4.87032e-12 2.88517e-11 1.33776e-10 4.98956e-10 1.53763e-09 4.02188e-09 9.4821e-09 1.95566e-08 3.58252e-08 5.88894e-08 8.7628e-08 1.19287e-07 1.51199e-07 1.80998e-07 1.97857e-07 1.75659e-07 3.06693e-07 2.39629e-07 2.07254e-07 2.28341e-07 2.34066e-07 1.39064e-06 6.28594e-07 3.51487e-08 0.0469893 0.861772 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2.47899e-36 5.05349e-29 7.40398e-25 7.53767e-22 1.72077e-19 1.45626e-17 5.96864e-16 1.39245e-14 2.05795e-13 2.08188e-12 1.52642e-11 8.48322e-11 3.69627e-10 1.29406e-09 3.73484e-09 9.14011e-09 2.04375e-08 3.91713e-08 6.59718e-08 9.93296e-08 1.35738e-07 1.70112e-07 2.00326e-07 2.25267e-07 2.08934e-07 3.09946e-07 3.11079e-07 3.07705e-07 2.41333e-07 2.32354e-07 6.79872e-07 2.46095e-06 2.32784e-06 6.13099e-08 -1.15967e-05 0.689543 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6.90377e-35 5.60091e-28 5.43102e-24 4.26476e-21 8.09507e-19 5.95492e-17 2.18319e-15 4.64694e-14 6.35338e-13 6.00136e-12 4.13306e-11 2.16524e-10 8.9037e-10 2.93714e-09 7.97332e-09 1.84148e-08 3.92469e-08 6.95665e-08 1.0666e-07 1.45868e-07 1.83845e-07 2.13803e-07 2.37037e-07 2.54171e-07 2.49035e-07 3.09827e-07 2.50068e-07 2.47581e-07 2.5571e-07 2.50922e-07 8.90823e-07 1.9921e-06 1.99021e-06 1.76413e-07 1.49797e-05 0.441695 0.981113 0.999952 0.999999 1 1 1 1 1 1 1 1 1 1 1 1.76429e-33 5.31862e-27 3.42296e-23 2.08518e-20 3.30997e-18 2.1277e-16 7.0107e-15 1.36721e-13 1.73574e-12 1.53609e-11 9.96684e-11 4.93517e-10 1.91996e-09 5.98346e-09 1.53624e-08 3.40871e-08 6.90108e-08 1.11816e-07 1.54141e-07 1.88687e-07 2.22522e-07 2.44097e-07 2.59678e-07 2.69613e-07 2.70189e-07 2.52213e-07 2.51579e-07 2.55007e-07 2.62401e-07 2.66734e-07 2.76095e-07 2.8969e-07 6.58612e-07 1.86048e-06 2.08235e-05 0.222972 0.85334 0.999757 0.999989 1 1 1 1 1 1 1 1 1 1 1 4.8687e-32 4.61008e-26 1.94538e-22 9.18563e-20 1.22118e-17 6.87239e-16 2.03884e-14 3.64884e-13 4.3074e-12 3.57572e-11 2.18818e-10 1.02503e-09 3.77638e-09 1.11452e-08 2.73294e-08 6.04253e-08 1.13054e-07 1.61318e-07 2.02334e-07 2.16723e-07 2.46799e-07 2.61569e-07 2.71949e-07 2.76255e-07 2.70958e-07 2.6039e-07 2.55778e-07 2.59758e-07 2.64843e-07 2.75997e-07 2.83749e-07 3.24848e-07 2.63537e-06 1.08539e-05 2.38262e-05 0.0878287 0.572745 0.986229 0.999966 0.999998 1 1 1 1 1 1 1 1 1 1 1.63869e-30 3.94925e-25 1.05111e-21 3.80197e-19 4.21237e-17 2.06985e-15 5.51949e-14 9.05251e-13 9.92408e-12 7.71916e-11 4.45081e-10 1.97088e-09 6.87398e-09 1.92799e-08 4.59082e-08 1.0711e-07 1.70017e-07 1.71177e-07 2.48542e-07 2.226e-07 2.58766e-07 2.7132e-07 2.78185e-07 2.78762e-07 2.72323e-07 2.63391e-07 2.60096e-07 2.64328e-07 2.67333e-07 2.89441e-07 1.00565e-06 2.12008e-06 3.83975e-06 3.81897e-05 0.000332268 0.00836398 0.343083 0.832011 0.999878 0.999996 1 1 1 1 1 1 1 1 1 1 6.22418e-29 3.64139e-24 5.74238e-21 1.55018e-18 1.41168e-16 6.0032e-15 1.42971e-13 2.13777e-12 2.16669e-11 1.57279e-10 8.516e-10 3.55617e-09 1.1727e-08 3.14509e-08 7.39597e-08 1.90044e-07 1.82633e-07 1.46507e-06 2.81609e-07 3.76951e-07 2.63193e-07 2.77369e-07 2.81916e-07 2.81199e-07 2.75371e-07 2.68141e-07 2.6531e-07 2.676e-07 2.74063e-07 2.99134e-07 4.54106e-06 2.35359e-05 2.44651e-05 7.18527e-05 0.000880295 0.00187035 0.0322117 0.53759 0.976863 0.999991 0.999992 1 1 1 1 1 1 1 1 1 2.25721e-27 3.72859e-23 3.33598e-20 6.51053e-18 4.77278e-16 1.73087e-14 3.64074e-13 4.91767e-12 4.57173e-11 3.07474e-10 1.55416e-09 6.09801e-09 1.89875e-08 4.90545e-08 1.11245e-07 2.783e-07 2.36419e-06 5.9909e-06 2.48404e-06 2.66059e-07 2.74782e-07 2.82092e-07 2.85364e-07 2.84921e-07 2.81116e-07 2.76271e-07 2.707e-07 2.80258e-07 9.55151e-07 1.84781e-06 3.69566e-06 8.13712e-06 1.32704e-05 1.1006e-05 0.000389522 0.00099613 0.000909441 0.0545189 0.720473 0.99998 0.999995 0.999999 1 1 1 1 1 1 1 1 6.98101e-26 3.99248e-22 2.05911e-19 2.86297e-17 1.66177e-15 5.06479e-14 9.2922e-13 1.12151e-11 9.46893e-11 5.84378e-10 2.73314e-09 1.00143e-08 2.94598e-08 7.30303e-08 1.25543e-07 1.65612e-06 5.99479e-06 5.99478e-06 4.45757e-06 2.66095e-07 2.79298e-07 2.86372e-07 2.88753e-07 2.8893e-07 2.87595e-07 2.88093e-07 2.78924e-07 1.33006e-06 3.47337e-06 3.4807e-06 2.51609e-06 2.30985e-06 2.38253e-06 2.76741e-06 4.07633e-05 0.00049332 0.000886655 0.000887729 0.0970757 0.697443 0.97469 0.999967 0.999996 1 1 1 1 1 1 1 1.73868e-24 4.03531e-21 1.27079e-18 1.27684e-16 5.86222e-15 1.49169e-13 2.36662e-12 2.53135e-11 1.92514e-10 1.08038e-09 4.60267e-09 1.53029e-08 4.15136e-08 9.46123e-08 1.19629e-07 3.3512e-06 5.99507e-06 5.99843e-06 3.93538e-06 2.66219e-07 2.83621e-07 2.90294e-07 2.9197e-07 2.92951e-07 2.94285e-07 2.89948e-07 3.2718e-07 2.67862e-06 3.48137e-06 2.67401e-06 2.29355e-06 2.28931e-06 2.3008e-06 2.42151e-06 4.25914e-06 0.000273359 0.000844921 0.000848465 0.00094135 0.071574 0.562661 0.851089 0.986746 0.999987 0.99999 1 1 1 1 1 2.71375e-23 3.29106e-20 6.96244e-18 5.26297e-16 1.9372e-14 4.11353e-13 5.59367e-12 5.2202e-11 3.50831e-10 1.75855e-09 6.75932e-09 2.05311e-08 5.19455e-08 1.16152e-07 1.76291e-07 2.86816e-06 5.99781e-06 5.99905e-06 1.218e-06 2.68061e-07 2.86996e-07 2.90009e-07 2.94149e-07 2.95034e-07 3.00806e-07 2.94951e-07 4.74993e-07 2.38574e-06 1.9952e-06 3.91497e-07 5.69287e-06 8.24591e-06 7.17165e-06 6.47523e-06 1.1283e-05 0.000167516 0.000312256 0.000838197 0.000969736 0.00362319 0.0278713 0.313528 0.614327 0.85743 0.974207 1 1 1 1 1 2.25281e-22 1.7531e-19 2.72947e-17 1.63832e-15 5.01422e-14 9.12371e-13 1.08575e-11 9.00761e-11 5.44885e-10 2.48425e-09 8.76742e-09 2.46543e-08 5.84524e-08 1.33031e-07 3.27334e-07 6.7289e-07 5.66281e-06 4.34473e-06 2.6466e-07 2.75641e-07 2.78089e-07 3.23447e-07 2.98116e-07 3.27213e-07 3.02083e-07 3.05494e-07 5.22578e-07 5.08611e-07 3.29203e-07 3.34583e-07 4.42093e-07 5.62725e-06 9.81113e-06 1.06909e-05 4.05446e-05 8.96783e-05 0.000118033 0.000189112 0.00091424 0.0013487 0.00314553 0.0149216 0.103111 0.202217 0.42347 0.701764 0.8569 0.928956 0.967123 0.984241 1.1243e-21 6.31588e-19 7.78573e-17 3.89712e-15 1.02789e-13 1.649e-12 1.75963e-11 1.32652e-10 7.37254e-10 3.11773e-09 1.02817e-08 2.70021e-08 5.76759e-08 1.03191e-07 1.67457e-07 2.96287e-07 1.7376e-07 7.47106e-07 2.65518e-07 2.80805e-07 2.95998e-07 2.9866e-07 3.65278e-07 2.98645e-07 3.04736e-07 3.13621e-07 3.17352e-07 3.25316e-07 3.26417e-07 3.31367e-07 3.4968e-07 6.68518e-06 1.90429e-05 1.91096e-05 1.91216e-05 1.43528e-06 1.89911e-05 6.96891e-05 0.000162039 0.000933449 0.00172166 0.000863577 0.000259355 1.24685e-05 2.87439e-05 3.98984e-05 0.0598501 0.121709 0.180957 0.203884 3.69129e-21 1.6367e-18 1.68808e-16 7.32789e-15 1.71733e-13 2.49174e-12 2.43837e-11 1.70502e-10 8.87595e-10 3.54615e-09 1.11327e-08 2.80016e-08 5.73923e-08 9.72988e-08 1.41787e-07 2.05013e-07 1.72091e-07 1.88823e-07 2.68408e-07 2.88178e-07 3.17014e-07 3.47322e-07 2.98577e-07 2.9856e-07 3.02503e-07 3.10301e-07 3.20355e-07 3.27523e-07 3.24528e-07 3.29752e-07 4.38643e-07 4.267e-06 1.48919e-05 1.37702e-05 3.46642e-07 3.41016e-07 3.84796e-07 1.46553e-06 2.77503e-05 8.06816e-05 0.000221234 0.000178956 1.06246e-05 2.98648e-06 7.22081e-06 3.76784e-08 7.91307e-09 2.39052e-09 4.89611e-10 1.20745e-15 8.62979e-21 3.20986e-18 2.88699e-16 1.12142e-14 2.39586e-13 3.21452e-12 2.94281e-11 1.94403e-10 9.64272e-10 3.69794e-09 1.12124e-08 2.73659e-08 5.45867e-08 9.00088e-08 1.22888e-07 1.4292e-07 1.83187e-07 2.24306e-07 2.78073e-07 3.20303e-07 3.88303e-07 5.08539e-07 6.76686e-07 5.8882e-07 3.00346e-07 3.06376e-07 3.15704e-07 3.24191e-07 3.21363e-07 3.39738e-07 5.9158e-07 1.02715e-06 1.5747e-06 1.45659e-06 3.31466e-07 3.2304e-07 3.30876e-07 4.23379e-07 3.87901e-06 9.03138e-06 5.19119e-06 1.21547e-05 1.24015e-06 3.67282e-07 4.40252e-07 3.26844e-07 3.17404e-07 8.23098e-08 3.0109e-08 1.00787e-08 1.51206e-20 4.92814e-18 3.99387e-16 1.42509e-14 2.83805e-13 3.59126e-12 3.13143e-11 1.98723e-10 9.5405e-10 3.56446e-09 1.05865e-08 2.54202e-08 5.01237e-08 8.27229e-08 1.17748e-07 1.51494e-07 1.85913e-07 2.25885e-07 2.76851e-07 3.3127e-07 3.38711e-07 2.8621e-06 8.16675e-06 4.54323e-06 2.99539e-07 3.03313e-07 3.11055e-07 3.18853e-07 3.20275e-07 3.36186e-07 3.97369e-07 3.34878e-07 3.31145e-07 3.25327e-07 3.22954e-07 3.19571e-07 3.20241e-07 3.82786e-07 9.77617e-07 3.77464e-07 7.38128e-07 1.24828e-06 3.84676e-07 3.33567e-07 3.25552e-07 5.05492e-07 5.09893e-07 1.03218e-07 3.74737e-08 1.30776e-08 2.04629e-20 6.05076e-18 4.54162e-16 1.52326e-14 2.8849e-13 3.50571e-12 2.96055e-11 1.83358e-10 8.65159e-10 3.19789e-09 9.45737e-09 2.2768e-08 4.53845e-08 7.65635e-08 1.12898e-07 1.5169e-07 1.92617e-07 2.35651e-07 2.80542e-07 3.30732e-07 3.43529e-07 4.52987e-06 8.16461e-06 8.16778e-06 3.64128e-06 3.02031e-07 3.072e-07 3.18303e-07 3.26528e-07 3.28144e-07 3.29729e-07 3.22928e-07 3.20137e-07 3.18882e-07 3.17959e-07 3.18987e-07 3.17254e-07 3.21736e-07 3.22453e-07 3.26747e-07 3.35543e-07 3.61291e-07 3.21091e-07 3.1437e-07 3.18167e-07 5.08572e-07 2.90975e-07 5.25255e-08 3.72434e-08 1.32972e-08 2.1746e-20 6.01358e-18 4.28438e-16 1.37957e-14 2.53187e-13 3.00601e-12 2.49873e-11 1.5339e-10 7.2216e-10 2.68079e-09 8.01424e-09 1.96342e-08 4.01025e-08 6.97787e-08 1.06675e-07 1.48823e-07 1.94825e-07 2.40144e-07 2.78994e-07 3.11769e-07 3.18099e-07 1.907e-06 8.15988e-06 8.16461e-06 7.96641e-06 3.08903e-07 3.05036e-07 3.15247e-07 3.27916e-07 3.30419e-07 3.36372e-07 7.20955e-07 3.3584e-06 7.35162e-07 3.17037e-07 3.17034e-07 3.16517e-07 3.16636e-07 3.16654e-07 3.17643e-07 3.12606e-07 3.05682e-07 2.97238e-07 2.87944e-07 4.39111e-07 4.10452e-07 8.64118e-08 7.65121e-08 3.60213e-08 1.18225e-08 1.83142e-20 4.86826e-18 3.36918e-16 1.06295e-14 1.92576e-13 2.27278e-12 1.89045e-11 1.16875e-10 5.57708e-10 2.11179e-09 6.48055e-09 1.63951e-08 3.47415e-08 6.27971e-08 9.92676e-08 1.41824e-07 1.88615e-07 2.33665e-07 2.65176e-07 3.1308e-07 3.39388e-07 3.49516e-07 2.18431e-06 5.59816e-06 4.11354e-06 3.88e-07 3.05582e-07 3.25107e-07 3.34489e-07 3.35509e-07 7.86055e-07 1.26881e-05 2.37537e-05 2.24891e-05 7.82203e-06 3.16049e-07 3.16046e-07 3.16044e-07 3.15163e-07 3.1522e-07 3.0494e-07 2.95936e-07 2.9017e-07 2.83662e-07 4.45236e-07 4.46309e-07 1.01565e-07 7.10283e-08 2.99978e-08 9.38098e-09 1.22906e-20 3.223e-18 2.21666e-16 6.99325e-15 1.2745e-13 1.5218e-12 1.28797e-11 8.14852e-11 4.00176e-10 1.56818e-09 5.00574e-09 1.32228e-08 2.92752e-08 5.49716e-08 8.88128e-08 1.26306e-07 1.65392e-07 2.16228e-07 6.07189e-07 3.01801e-07 3.10312e-07 6.49835e-07 4.22582e-07 3.73259e-07 3.28727e-07 3.34064e-07 3.80348e-07 3.18842e-07 3.42112e-07 3.45919e-07 5.01027e-06 2.374e-05 2.37495e-05 2.37394e-05 2.37341e-05 1.68721e-05 2.23365e-06 3.14999e-07 3.66785e-07 3.14421e-07 3.01829e-07 2.90812e-07 2.81979e-07 2.82493e-07 4.50033e-07 4.50329e-07 1.06629e-07 6.17917e-08 2.28261e-08 6.8683e-09 6.61781e-21 1.7554e-18 1.22701e-16 3.95035e-15 7.37795e-14 9.06654e-13 7.9317e-12 5.21e-11 2.66855e-10 1.09572e-09 3.68209e-09 1.02855e-08 2.41652e-08 4.81793e-08 8.2149e-08 1.21195e-07 1.594e-07 2.00515e-07 2.59938e-07 3.17116e-07 3.51465e-07 3.57454e-07 8.31739e-07 3.15998e-06 3.12112e-07 3.11991e-07 3.09047e-07 3.18046e-07 3.28396e-07 3.33577e-07 2.54723e-06 2.22625e-05 2.37421e-05 2.37391e-05 2.37382e-05 2.37302e-05 8.04314e-06 3.1502e-07 3.32396e-07 3.0852e-07 2.93282e-07 2.82027e-07 2.82252e-07 3.23374e-07 4.55677e-07 2.5352e-07 5.9855e-08 4.51913e-08 1.55871e-08 4.68544e-09 2.88826e-21 7.92558e-19 5.74609e-17 1.92281e-15 3.74069e-14 4.79915e-13 4.39348e-12 3.02725e-11 1.63071e-10 7.06268e-10 2.51241e-09 7.46458e-09 1.87768e-08 4.04554e-08 7.54555e-08 1.23163e-07 1.78056e-07 2.31206e-07 2.78479e-07 3.23326e-07 3.30723e-07 3.14473e-06 1.19201e-05 1.2259e-05 7.15806e-06 3.06216e-07 3.06301e-07 3.10405e-07 3.17066e-07 3.25251e-07 3.61624e-07 5.58711e-06 2.37424e-05 2.37424e-05 2.37389e-05 1.86302e-05 3.64376e-06 3.23798e-07 3.19828e-07 2.97621e-07 2.83356e-07 2.79279e-07 3.057e-07 4.52792e-07 4.57199e-07 9.13025e-08 7.37578e-08 3.41915e-08 9.80469e-09 3.00444e-09 1.02341e-21 2.96144e-19 2.26629e-17 8.00921e-16 1.64536e-14 2.22952e-13 2.15628e-12 1.57015e-11 8.94239e-11 4.09714e-10 1.54295e-09 4.85705e-09 1.29541e-08 2.95993e-08 5.84925e-08 1.00871e-07 1.53447e-07 2.09904e-07 2.65486e-07 3.25362e-07 3.46917e-07 7.83363e-06 1.22602e-05 1.2258e-05 1.22569e-05 7.42492e-06 2.95645e-07 2.969e-07 3.06883e-07 3.1834e-07 3.2021e-07 3.28673e-07 3.92961e-06 9.49243e-06 8.8487e-06 1.86996e-06 3.32929e-07 3.2666e-07 2.99895e-07 2.82103e-07 2.78698e-07 2.90948e-07 3.52414e-07 4.53232e-07 3.44458e-07 7.92237e-08 5.46951e-08 2.16129e-08 5.38739e-09 1.80706e-09 2.95012e-22 9.15468e-20 7.50353e-18 2.83789e-16 6.22966e-15 9.00678e-14 9.28391e-13 7.19897e-12 4.36383e-11 2.12772e-10 8.52927e-10 2.85981e-09 8.13239e-09 1.98363e-08 4.18771e-08 7.70309e-08 1.24338e-07 1.79246e-07 2.34784e-07 2.89116e-07 3.02157e-07 5.82186e-06 1.22605e-05 1.22598e-05 1.22576e-05 1.2258e-05 3.52876e-06 2.89073e-07 2.98025e-07 3.04493e-07 3.12493e-07 3.16657e-07 3.25659e-07 3.18655e-07 3.24731e-07 3.11128e-07 3.0427e-07 2.91794e-07 2.78708e-07 2.72443e-07 2.72038e-07 4.29772e-07 4.34526e-07 2.84667e-07 1.17221e-07 8.0222e-08 3.55308e-08 1.17051e-08 2.53289e-09 1.01739e-09 6.92455e-23 2.33568e-20 2.07185e-18 8.46367e-17 2.00427e-15 3.11692e-14 3.44825e-13 2.8651e-12 1.8589e-11 9.6956e-11 4.15765e-10 1.49225e-09 4.5494e-09 1.19289e-08 2.71857e-08 5.43557e-08 9.67782e-08 1.54804e-07 2.23978e-07 2.9567e-07 3.22698e-07 8.30625e-07 9.12038e-06 1.22602e-05 1.22599e-05 1.03534e-05 2.01124e-06 2.89011e-07 2.9424e-07 2.96201e-07 2.97541e-07 4.25698e-07 3.26272e-07 3.05927e-07 3.19025e-07 3.08991e-07 4.14838e-07 2.80478e-07 2.77538e-07 2.8274e-07 2.78241e-07 4.78204e-07 2.4149e-07 1.67475e-07 9.18455e-08 4.34756e-08 1.72433e-08 5.19454e-09 9.97364e-10 5.37431e-10 1.3247e-23 4.89745e-21 4.73464e-19 2.09966e-17 5.3896e-16 9.07661e-15 1.08386e-13 9.69803e-13 6.76501e-12 3.78952e-11 1.74407e-10 6.71566e-10 2.19546e-09 6.16624e-09 1.50447e-08 3.24326e-08 6.26802e-08 1.0904e-07 1.72324e-07 2.49209e-07 3.29912e-07 3.39131e-07 1.3442e-06 7.53098e-06 7.99493e-06 1.48833e-06 3.16348e-07 3.03558e-07 2.96134e-07 2.93951e-07 2.91808e-07 2.86552e-07 2.9763e-07 2.99059e-07 2.813e-07 4.28118e-07 2.7118e-07 2.75773e-07 2.7549e-07 4.22189e-07 2.43697e-07 1.47174e-07 1.33999e-07 9.17894e-08 5.05553e-08 2.26222e-08 7.97837e-09 2.06114e-09 3.33399e-10 2.64223e-10 2.06633e-24 8.40545e-22 8.88688e-20 4.29137e-18 1.19497e-16 2.18146e-15 2.82578e-14 2.7362e-13 2.06063e-12 1.24422e-11 6.16444e-11 2.55139e-10 8.94979e-10 2.69838e-09 7.11848e-09 1.66827e-08 3.48523e-08 6.53851e-08 1.11218e-07 1.7308e-07 2.47174e-07 3.20611e-07 3.19604e-07 3.35369e-07 4.17248e-07 4.58541e-07 5.1355e-07 2.99199e-07 2.98727e-07 2.9253e-07 2.88572e-07 2.82608e-07 2.84391e-07 2.81815e-07 2.75061e-07 2.62782e-07 2.64055e-07 2.45156e-07 4.25894e-07 1.87472e-07 1.78274e-07 1.46095e-07 9.94244e-08 5.59183e-08 2.59557e-08 9.80447e-09 2.91015e-09 6.30949e-10 8.5759e-11 1.18312e-10 2.6314e-25 1.18151e-22 1.36359e-20 7.16738e-19 2.16771e-17 4.2884e-16 6.01051e-15 6.30645e-14 5.14757e-13 3.36326e-12 1.8003e-11 8.0518e-11 3.06249e-10 1.00852e-09 2.91436e-09 7.42217e-09 1.67377e-08 3.36888e-08 6.10718e-08 1.00736e-07 1.52255e-07 2.11273e-07 2.66364e-07 3.07857e-07 3.62858e-07 5.81183e-07 3.11963e-07 3.26832e-07 2.89743e-07 2.82768e-07 2.78968e-07 2.71839e-07 2.70836e-07 2.67807e-07 2.64544e-07 2.56769e-07 2.51833e-07 2.44129e-07 1.83105e-07 1.61154e-07 1.27859e-07 8.52058e-08 4.77315e-08 2.2533e-08 8.90238e-09 2.88641e-09 7.38378e-10 1.37812e-10 1.63389e-11 4.70504e-11 2.76112e-26 1.38323e-23 1.74869e-21 9.95893e-20 3.25068e-18 6.93557e-17 1.04943e-15 1.18997e-14 1.05183e-13 7.46128e-13 4.35248e-12 2.13093e-11 8.92156e-11 3.23614e-10 1.02464e-09 2.84612e-09 6.97394e-09 1.51489e-08 2.93843e-08 5.13065e-08 8.14357e-08 1.18622e-07 1.60127e-07 2.03298e-07 2.51259e-07 2.30468e-07 3.01135e-07 2.79794e-07 2.6314e-07 2.56629e-07 2.54491e-07 2.48391e-07 2.45567e-07 2.42001e-07 2.37578e-07 2.2813e-07 2.14664e-07 1.90026e-07 1.51421e-07 1.07876e-07 6.73915e-08 3.65324e-08 1.70704e-08 6.82404e-09 2.30481e-09 6.42884e-10 1.41973e-10 2.28327e-11 2.48e-12 1.61474e-11 2.43371e-27 1.38047e-24 1.92996e-22 1.19663e-20 4.21398e-19 9.65953e-18 1.57049e-16 1.91734e-15 1.83156e-14 1.41234e-13 9.00155e-13 4.83423e-12 2.22228e-11 8.83413e-11 3.06192e-10 9.30789e-10 2.49013e-09 5.88728e-09 1.23594e-08 2.31455e-08 3.90286e-08 5.99652e-08 8.53401e-08 1.14935e-07 1.49873e-07 1.76409e-07 2.09831e-07 2.13964e-07 2.10541e-07 2.10842e-07 2.11137e-07 2.06757e-07 2.02395e-07 1.96574e-07 1.87655e-07 1.72092e-07 1.47101e-07 1.12607e-07 7.66925e-08 4.62271e-08 2.43257e-08 1.11203e-08 4.40182e-09 1.50025e-09 4.3515e-10 1.04971e-10 2.01425e-11 2.8074e-12 3.21854e-13 4.62469e-12 1.83154e-28 1.18797e-25 1.85438e-23 1.2608e-21 4.81041e-20 1.18597e-18 2.06752e-17 2.71119e-16 2.79147e-15 2.32779e-14 1.61015e-13 9.41066e-13 4.7148e-12 2.04676e-11 7.75396e-11 2.57607e-10 7.53544e-10 1.94786e-09 4.46036e-09 9.06945e-09 1.65054e-08 2.71797e-08 4.11716e-08 5.85384e-08 7.95981e-08 1.01995e-07 1.24072e-07 1.37752e-07 1.45531e-07 1.50925e-07 1.52886e-07 1.49776e-07 1.44168e-07 1.3556e-07 1.22236e-07 1.01632e-07 7.47388e-08 4.78621e-08 2.75491e-08 1.39021e-08 6.12189e-09 2.35495e-09 7.91876e-10 2.31995e-10 5.85689e-11 1.24302e-11 2.10904e-12 2.57945e-13 4.12856e-14 1.07145e-12 1.19738e-29 8.98725e-27 1.57244e-24 1.17569e-22 4.86907e-21 1.29219e-19 2.41299e-18 3.38374e-17 3.73097e-16 3.34261e-15 2.49361e-14 1.57704e-13 8.56953e-13 4.04098e-12 1.6651e-11 6.02728e-11 1.92496e-10 5.4404e-10 1.36133e-09 3.02099e-09 5.98442e-09 1.06806e-08 1.74238e-08 2.64158e-08 3.77602e-08 5.09233e-08 6.45811e-08 7.63077e-08 8.5139e-08 9.08799e-08 9.26845e-08 8.99918e-08 8.38855e-08 7.43117e-08 6.02258e-08 4.2311e-08 2.57467e-08 1.38297e-08 6.62353e-09 2.77633e-09 1.02297e-09 3.33783e-10 9.68729e-11 2.49548e-11 5.63029e-12 1.07816e-12 1.64749e-13 1.77964e-14 5.4834e-15 1.95222e-13 6.89189e-31 6.05092e-28 1.19343e-25 9.79111e-24 4.38999e-22 1.25237e-20 2.50299e-19 3.74717e-18 4.40946e-17 4.22259e-16 3.37523e-15 2.29326e-14 1.34217e-13 6.83189e-13 3.04583e-12 1.19628e-11 4.15705e-11 1.28031e-10 3.49265e-10 8.45397e-10 1.82492e-09 3.54051e-09 6.24933e-09 1.01692e-08 1.54196e-08 2.18615e-08 2.89217e-08 3.56754e-08 4.12169e-08 4.46527e-08 4.52667e-08 4.27563e-08 3.75448e-08 2.9882e-08 2.01725e-08 1.16773e-08 5.74409e-09 2.58522e-09 1.02287e-09 3.58116e-10 1.12622e-10 3.21976e-11 8.40169e-12 1.98471e-12 4.14276e-13 7.30716e-14 1.01028e-14 9.54589e-16 6.66298e-16 2.73706e-14 3.54192e-32 3.67545e-29 8.20458e-27 7.38485e-25 3.57291e-23 1.09118e-21 2.32563e-20 3.70491e-19 4.63555e-18 4.72175e-17 4.01966e-16 2.91452e-15 1.82472e-14 9.96344e-14 4.78043e-13 2.02734e-12 7.62636e-12 2.54577e-11 7.53491e-11 1.98108e-10 4.64334e-10 9.76519e-10 1.86161e-09 3.25075e-09 5.23943e-09 7.81581e-09 1.07601e-08 1.36877e-08 1.60979e-08 1.7393e-08 1.71657e-08 1.52976e-08 1.20616e-08 7.90471e-09 4.35907e-09 2.02553e-09 8.26189e-10 3.06151e-10 1.01637e-10 3.08906e-11 8.75143e-12 2.32351e-12 5.72457e-13 1.27749e-13 2.48782e-14 4.00987e-15 4.9315e-16 3.99503e-17 6.48131e-17 2.90274e-15 1.64283e-33 2.03073e-30 5.15982e-28 5.10374e-26 2.65808e-24 8.65073e-23 1.95593e-21 3.29853e-20 4.36549e-19 4.70486e-18 4.24238e-17 3.26377e-16 2.17334e-15 1.26603e-14 6.50216e-14 2.96004e-13 1.19741e-12 4.30308e-12 1.37304e-11 3.89607e-11 9.85113e-11 2.23137e-10 4.56583e-10 8.50816e-10 1.45113e-09 2.2682e-09 3.23168e-09 4.19313e-09 4.93574e-09 5.20554e-09 4.85045e-09 3.8765e-09 2.49839e-09 1.33672e-09 5.96817e-10 2.16507e-10 7.50483e-11 2.38573e-11 7.1202e-12 2.02915e-12 5.51462e-13 1.40631e-13 3.28241e-14 6.80077e-15 1.20406e-15 1.72806e-16 1.84828e-17 1.26319e-18 4.72495e-18 2.29697e-16 6.931e-35 1.02573e-31 2.98749e-29 3.25871e-27 1.82574e-25 6.30947e-24 1.50593e-22 2.67398e-21 3.72259e-20 4.22148e-19 4.01018e-18 3.25615e-17 2.29404e-16 1.41788e-15 7.74764e-15 3.76011e-14 1.62352e-13 6.2343e-13 2.12871e-12 6.46754e-12 1.74952e-11 4.23081e-11 9.20641e-11 1.81331e-10 3.24092e-10 5.25485e-10 7.66972e-10 1.00036e-09 1.15357e-09 1.15175e-09 9.61636e-10 6.31928e-10 3.3665e-10 1.45828e-10 4.96479e-11 1.58817e-11 4.98617e-12 1.50425e-12 4.3708e-13 1.2103e-13 3.13682e-14 7.45619e-15 1.58981e-15 2.96094e-16 4.64765e-17 5.82852e-18 5.34145e-19 3.07153e-20 2.52201e-19 1.34234e-17 2.67097e-36 4.75777e-33 1.59959e-30 1.93314e-28 1.16624e-26 4.27063e-25 1.07175e-23 1.99418e-22 2.90545e-21 3.44876e-20 3.43337e-19 2.927e-18 2.17012e-17 1.41487e-16 8.17156e-16 4.1972e-15 1.91968e-14 7.81696e-14 2.83351e-13 9.13756e-13 2.61961e-12 6.69382e-12 1.5315e-11 3.14865e-11 5.81553e-11 9.62568e-11 1.41386e-10 1.81355e-10 1.9835e-10 1.77957e-10 1.24592e-10 6.84726e-11 2.98817e-11 1.0311e-11 3.11899e-12 1.00102e-12 3.07733e-13 8.98678e-14 2.47335e-14 6.34424e-15 1.49725e-15 3.20252e-16 6.09178e-17 1.00447e-17 1.38387e-18 1.50537e-19 1.17443e-20 5.77699e-22 9.70038e-21 5.76019e-19 9.4099e-38 2.03346e-34 7.94766e-32 1.06983e-29 6.96442e-28 2.69984e-26 7.10272e-25 1.37929e-23 2.09373e-22 2.58908e-21 2.68791e-20 2.39368e-19 1.85755e-18 1.26994e-17 7.70145e-17 4.15726e-16 1.99978e-15 8.57184e-15 3.27189e-14 1.10991e-13 3.33912e-13 8.91679e-13 2.11818e-12 4.4803e-12 8.40862e-12 1.39114e-11 2.00155e-11 2.43681e-11 2.41039e-11 1.85789e-11 1.1051e-11 5.28299e-12 1.97142e-12 6.19453e-13 2.02292e-13 6.26812e-14 1.79738e-14 4.78917e-15 1.18519e-15 2.7095e-16 5.66894e-17 1.07092e-17 1.79248e-18 2.58836e-19 3.10132e-20 2.90243e-21 1.91282e-22 8.30447e-24 2.62333e-22 1.77517e-20 3.04055e-39 8.04088e-36 3.67699e-33 5.54164e-31 3.90343e-29 1.60181e-27 4.40751e-26 8.90159e-25 1.4022e-23 1.79864e-22 1.93837e-21 1.79443e-20 1.44992e-19 1.03354e-18 6.54168e-18 3.68806e-17 1.85402e-16 8.30845e-16 3.31377e-15 1.17231e-14 3.66563e-14 1.01184e-13 2.4639e-13 5.28017e-13 9.88571e-13 1.59685e-12 2.18093e-12 2.42901e-12 2.12118e-12 1.43129e-12 7.81646e-13 3.43417e-13 1.22481e-13 4.0108e-14 1.24045e-14 3.45048e-15 8.80138e-16 2.07801e-16 4.5436e-17 9.15425e-18 1.68366e-18 2.78776e-19 4.0744e-20 5.11075e-21 5.27994e-22 4.21331e-23 2.32455e-24 9.19842e-26 4.88764e-24 3.81562e-22 9.14926e-41 2.96228e-37 1.59122e-34 2.69631e-32 2.06044e-30 8.95324e-29 2.57213e-27 5.38605e-26 8.77157e-25 1.16245e-23 1.29489e-22 1.24049e-21 1.03863e-20 7.6804e-20 5.04714e-19 2.95617e-18 1.54454e-17 7.19245e-17 2.97674e-16 1.08973e-15 3.51078e-15 9.91774e-15 2.44649e-14 5.23561e-14 9.60782e-14 1.4842e-13 1.8827e-13 1.90566e-13 1.49705e-13 9.62202e-14 5.14346e-14 2.21161e-14 7.51907e-15 2.37311e-15 6.46981e-16 1.573e-16 3.49898e-17 7.19497e-18 1.36901e-18 2.39842e-19 3.83162e-20 5.50067e-21 6.94941e-22 7.50013e-23 6.62009e-24 4.4654e-25 2.04596e-26 7.48905e-28 6.00426e-26 5.50899e-24 2.642e-42 1.02941e-38 6.48308e-36 1.23765e-33 1.02791e-31 4.73084e-30 1.41684e-28 3.06743e-27 5.14667e-26 7.01973e-25 8.04996e-24 7.94722e-23 6.86544e-22 5.24364e-21 3.5621e-20 2.15811e-19 1.16653e-18 5.61555e-18 2.39765e-17 9.02417e-17 2.97387e-16 8.52683e-16 2.11064e-15 4.46117e-15 7.92781e-15 1.15996e-14 1.37087e-14 1.28667e-14 9.73102e-15 6.32559e-15 3.36775e-15 1.35628e-15 4.35602e-16 1.19378e-16 2.78606e-17 5.79763e-18 1.10359e-18 1.94183e-19 3.16245e-20 4.74366e-21 6.48734e-22 7.96314e-23 8.57964e-24 7.8617e-25 5.85178e-26 3.29467e-27 1.23923e-28 4.07601e-30 4.52641e-28 5.03355e-26 7.60052e-44 3.43691e-40 2.50982e-37 5.38865e-35 4.86493e-33 2.37074e-31 7.39058e-30 1.64994e-28 2.84264e-27 3.97584e-26 4.67602e-25 4.73911e-24 4.20808e-23 3.30739e-22 2.31429e-21 1.44518e-20 8.05104e-20 3.98989e-19 1.7495e-18 6.73677e-18 2.25886e-17 6.53563e-17 1.61352e-16 3.34987e-16 5.74874e-16 8.02028e-16 9.04275e-16 8.1379e-16 6.31577e-16 4.18967e-16 2.11783e-16 7.48434e-17 2.18872e-17 5.053e-18 9.88312e-19 1.72513e-19 2.75652e-20 4.07244e-21 5.56843e-22 7.00899e-23 8.03281e-24 8.24339e-25 7.39799e-26 5.61753e-27 3.44097e-28 1.57909e-29 4.77067e-31 1.29953e-32 1.86603e-30 2.61813e-28 2.27785e-45 1.12879e-41 9.33915e-39 2.23903e-36 2.19277e-34 1.13011e-32 3.66115e-31 8.40804e-30 1.48293e-28 2.11959e-27 2.54762e-26 2.64132e-25 2.40246e-24 1.93688e-23 1.39184e-22 8.93215e-22 5.1132e-21 2.60045e-20 1.16728e-19 4.58412e-19 1.55915e-18 4.53963e-18 1.1158e-17 2.27799e-17 3.80456e-17 5.17156e-17 5.69903e-17 5.17733e-17 4.17833e-17 2.69305e-17 1.22318e-17 3.87655e-18 9.5749e-19 1.79991e-19 2.85405e-20 4.03933e-21 5.23851e-22 6.28833e-23 6.99032e-24 7.14993e-25 6.64654e-26 5.51422e-27 3.98215e-28 2.41884e-29 1.1767e-30 4.24997e-32 9.97791e-34 1.97326e-35 3.42078e-33 6.38649e-31 7.45495e-47 3.7415e-43 3.37962e-40 8.93194e-38 9.44854e-36 5.14003e-34 1.72746e-32 4.07185e-31 7.33085e-30 1.06735e-28 1.30668e-27 1.38126e-26 1.28291e-25 1.05788e-24 7.78638e-24 5.12262e-23 3.00611e-22 1.56547e-21 7.17968e-21 2.87148e-20 9.90021e-20 2.90242e-19 7.12424e-19 1.4417e-18 2.38401e-18 3.2401e-18 3.56458e-18 3.37429e-18 2.74446e-18 1.66553e-18 6.61239e-19 1.8718e-19 3.67087e-20 5.33033e-21 6.48968e-22 7.0521e-23 7.03532e-24 6.5079e-25 5.5763e-26 4.38813e-27 3.12586e-28 1.97604e-29 1.08e-30 4.92811e-32 1.78674e-33 4.76777e-35 8.18098e-37 9.80675e-39 1.79242e-36 4.84918e-34 2.76375e-48 1.2769e-44 1.20232e-41 3.44151e-39 3.9079e-37 2.23793e-35 7.78749e-34 1.8799e-32 3.44562e-31 5.09475e-30 6.3325e-29 6.80352e-28 6.43349e-27 5.41139e-26 4.06974e-25 2.73882e-24 1.64447e-23 8.75572e-23 4.09903e-22 1.66959e-21 5.84384e-21 1.7315e-20 4.27696e-20 8.69639e-20 1.45579e-19 2.01625e-19 2.25284e-19 2.21612e-19 1.77858e-19 9.9289e-20 3.42501e-20 8.32643e-21 1.214e-21 1.24593e-22 1.05748e-23 7.9941e-25 5.54996e-26 3.56623e-27 2.11065e-28 1.13699e-29 5.48512e-31 2.32222e-32 8.40961e-34 2.51754e-35 5.93369e-37 1.02019e-38 1.11675e-40 6.63407e-43 8.61457e-41 3.99424e-38 1.18078e-49 4.49864e-46 4.22414e-43 1.28616e-40 1.55714e-38 9.35914e-37 3.36514e-35 8.30164e-34 1.54517e-32 2.31371e-31 2.91118e-30 3.16949e-29 3.04268e-28 2.60371e-27 1.99602e-26 1.37115e-25 8.40904e-25 4.57221e-24 2.18412e-23 9.06862e-23 3.23191e-22 9.73625e-22 2.44554e-21 5.07424e-21 8.7698e-21 1.24733e-20 1.42856e-20 1.43577e-20 1.11749e-20 5.68124e-21 1.71897e-21 3.3966e-22 3.27228e-23 1.9119e-24 8.80297e-26 3.50486e-27 1.2387e-28 3.89857e-30 1.08863e-31 2.67816e-33 5.74288e-35 1.05681e-36 1.63219e-38 2.04902e-40 1.99325e-42 1.39155e-44 6.06116e-47 1.20102e-49 2.08963e-48 2.85196e-45 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.967532 0.13813 1.34118e-08 3.46551e-08 3.91794e-08 3.89374e-08 3.74959e-08 3.53933e-08 3.27162e-08 2.94427e-08 2.54909e-08 2.09053e-08 1.58939e-08 1.10581e-08 6.85882e-09 3.70172e-09 1.70383e-09 6.71351e-10 2.26368e-10 6.50412e-11 1.61007e-11 3.50912e-12 6.84666e-13 1.18881e-13 1.79251e-14 2.25322e-15 2.23859e-16 1.65131e-17 8.38978e-19 2.6637e-20 4.61952e-22 3.57848e-24 8.91554e-27 3.95684e-30 8.18228e-35 4.4384e-43 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.965083 0.136615 1.16601e-08 2.93891e-08 3.47036e-08 3.60351e-08 3.18498e-08 2.55909e-08 1.86302e-08 1.277e-08 8.41521e-09 5.35401e-09 3.26163e-09 1.88058e-09 1.00332e-09 4.81967e-10 2.03331e-10 7.43808e-11 2.32902e-11 6.26792e-12 1.46484e-12 3.0252e-13 5.59757e-14 9.20474e-15 1.31312e-15 1.55981e-16 1.45889e-17 1.00509e-18 4.7045e-20 1.34689e-21 2.03948e-23 1.3341e-25 2.71001e-28 8.98036e-32 1.27328e-36 3.04098e-45 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.942916 0.0993644 5.3989e-09 6.4309e-08 7.93473e-08 7.96909e-08 7.04667e-08 6.21656e-08 4.73393e-08 3.26833e-08 2.08609e-08 1.21324e-08 6.28177e-09 2.88261e-09 1.18659e-09 4.46373e-10 1.48899e-10 4.29623e-11 1.05199e-11 2.18532e-12 3.82624e-13 5.6391e-14 7.06939e-15 7.74826e-16 7.74737e-17 7.08088e-18 5.6188e-19 3.49513e-20 1.5113e-21 3.97953e-23 5.43608e-25 3.15298e-27 5.6116e-30 1.58212e-33 1.59481e-38 5.1806e-47 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.876884 0.0437723 2.57869e-14 1.02259e-07 1.29527e-07 1.31903e-07 1.02297e-07 1.12736e-07 9.94236e-08 7.70664e-08 5.65837e-08 3.82484e-08 2.31737e-08 1.23645e-08 5.8776e-09 2.57048e-09 1.00192e-09 3.37664e-10 9.54417e-11 2.24161e-11 4.33016e-12 6.82075e-13 8.64547e-14 8.68995e-15 6.79392e-16 4.01724e-17 1.74373e-18 5.42831e-20 1.17667e-21 1.69052e-23 1.48073e-25 6.87137e-28 1.33149e-30 7.25709e-34 4.53943e-38 8.54936e-45 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.752417 -7.0278e-06 -1.15277e-08 6.86848e-08 2.87956e-07 2.90684e-07 2.23578e-07 1.35592e-07 1.52696e-07 1.29919e-07 1.08523e-07 8.26292e-08 5.77426e-08 3.51879e-08 1.88007e-08 9.27691e-09 4.09475e-09 1.5657e-09 5.00587e-10 1.32313e-10 2.86314e-11 5.05375e-12 7.21715e-13 8.22638e-14 7.29289e-15 4.91397e-16 2.45292e-17 8.80973e-19 2.19683e-20 3.60992e-22 3.61933e-24 1.96961e-26 4.78241e-29 3.6216e-32 3.60249e-36 1.58076e-42 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999624 0.554692 -4.74702e-08 -3.28723e-09 1.39206e-08 1.66549e-07 2.91172e-07 2.0921e-07 2.04364e-07 1.9171e-07 1.74962e-07 1.694e-07 1.36283e-07 1.08838e-07 7.58215e-08 4.51101e-08 2.48088e-08 1.22392e-08 5.24917e-09 1.87951e-09 5.5315e-10 1.3238e-10 2.5759e-11 4.05791e-12 5.12717e-13 5.08442e-14 3.87904e-15 2.22418e-16 9.32235e-18 2.73876e-19 5.33873e-21 6.43766e-23 4.31651e-25 1.34897e-27 1.41345e-30 2.20072e-34 2.24972e-40 1 1 1 1 1 1 1 1 1 1 1 1 0.999983 0.94418 0.342886 3.15621e-06 9.2613e-09 2.61425e-08 1.95195e-07 2.33369e-07 2.27747e-07 2.15896e-07 2.15045e-07 2.03735e-07 2.45838e-07 1.87509e-07 1.63705e-07 1.31855e-07 8.74733e-08 5.34905e-08 2.93507e-08 1.40648e-08 5.63558e-09 1.84896e-09 4.90248e-10 1.05285e-10 1.82838e-11 2.54881e-12 2.80003e-13 2.38388e-14 1.543e-15 7.42038e-17 2.55129e-18 5.95578e-20 8.8051e-22 7.44485e-24 3.04558e-26 4.42536e-29 1.06728e-32 2.52543e-38 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999909 0.752986 0.17489 1.4987e-05 1.01773e-05 9.43596e-07 2.57918e-07 2.39375e-07 2.37873e-07 2.8128e-07 2.27469e-07 2.14823e-07 3.21259e-07 2.46775e-07 2.03167e-07 1.90873e-07 1.42095e-07 9.70418e-08 5.92191e-08 3.16595e-08 1.42181e-08 5.22477e-09 1.54504e-09 3.68712e-10 7.0993e-11 1.09604e-11 1.33666e-12 1.26975e-13 9.25388e-15 5.07903e-16 2.02875e-17 5.62338e-19 1.01315e-20 1.07638e-22 5.73771e-25 1.14224e-27 4.20199e-31 2.27775e-36 1 1 1 1 1 1 1 1 1 1 1 0.999995 0.951543 0.501233 0.0756328 0.000163821 7.0258e-06 2.15944e-06 4.92119e-07 2.61402e-07 2.43294e-07 2.37645e-07 2.3435e-07 2.22146e-07 2.23447e-07 3.18935e-07 2.22858e-07 2.35871e-07 1.96599e-07 1.51268e-07 1.0321e-07 6.15418e-08 3.10233e-08 1.28437e-08 4.275e-09 1.14477e-09 2.46341e-10 4.23993e-11 5.77555e-12 6.15127e-13 5.06079e-14 3.16612e-15 1.46265e-16 4.77662e-18 1.03577e-19 1.35902e-21 9.24781e-24 2.47003e-26 1.36328e-29 1.67569e-34 1 1 1 1 1 1 1 1 1 1 0.999999 0.99597 0.77154 0.289972 0.00704003 0.000145426 4.20352e-05 8.05756e-06 8.38266e-07 3.13337e-07 2.53155e-07 2.3552e-07 2.27026e-07 2.22118e-07 2.34631e-07 2.17268e-07 2.19986e-07 2.5726e-07 2.35013e-07 2.04074e-07 1.57584e-07 1.04957e-07 5.93976e-08 2.78596e-08 1.0538e-08 3.20121e-09 7.75827e-10 1.49827e-10 2.2948e-11 2.75639e-12 2.56795e-13 1.82804e-14 9.70952e-16 3.69967e-17 9.51856e-19 1.51382e-20 1.28763e-22 4.52436e-25 3.69353e-28 1.02389e-32 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.928727 0.478169 0.0237048 0.000513519 0.000646237 0.000172106 1.34975e-05 9.82501e-07 2.83704e-07 2.45628e-07 2.36274e-07 2.35814e-07 2.28697e-07 2.15691e-07 2.13041e-07 2.12834e-07 3.50918e-07 2.46597e-07 2.37407e-07 2.07829e-07 1.57199e-07 1.00714e-07 5.38915e-08 2.33397e-08 8.1098e-09 2.22868e-09 4.85774e-10 8.4029e-11 1.14321e-11 1.20758e-12 9.75214e-14 5.91594e-15 2.60489e-16 7.85093e-18 1.49081e-19 1.56061e-21 7.12207e-24 8.53199e-27 5.40884e-31 1 1 1 1 1 1 1 1 0.999998 0.999998 0.994143 0.63894 0.0464202 0.000418882 0.000333225 0.000365949 3.97662e-05 1.95656e-06 3.50956e-07 2.51519e-07 2.37721e-07 2.33904e-07 2.33017e-07 2.27973e-07 2.2038e-07 2.13996e-07 2.1414e-07 2.15079e-07 2.23032e-07 2.61009e-07 2.39131e-07 1.99276e-07 1.44981e-07 8.99046e-08 4.58545e-08 1.86128e-08 5.89472e-09 1.46447e-09 2.8644e-10 4.4118e-11 5.27027e-12 4.81474e-13 3.3176e-14 1.67518e-15 5.85931e-17 1.31565e-18 1.68106e-20 9.93964e-23 1.76499e-25 2.87847e-29 1 1 1 1 1 1 0.999998 0.999987 0.99993 0.969355 0.621447 0.0656983 0.000424581 0.000396627 0.000310648 9.98216e-05 7.25719e-06 2.94226e-07 2.53971e-07 2.40672e-07 2.3502e-07 2.33993e-07 2.31851e-07 2.27179e-07 2.21028e-07 2.16163e-07 2.15427e-07 2.22191e-07 2.24255e-07 3.96164e-07 2.65846e-07 2.24845e-07 1.79348e-07 1.24912e-07 7.30795e-08 3.47345e-08 1.31075e-08 3.87534e-09 8.90919e-10 1.58399e-10 2.16443e-11 2.25123e-12 1.76521e-13 1.01746e-14 4.10954e-16 1.08755e-17 1.69661e-19 1.30182e-21 3.43077e-24 1.23435e-27 1 1 1 1 1 0.999976 0.999918 0.97686 0.817022 0.481029 0.0383509 0.000453927 0.000373113 0.000339248 9.0892e-05 3.97419e-05 3.91438e-07 2.66632e-07 2.57879e-07 2.421e-07 2.3781e-07 2.34984e-07 2.31569e-07 2.26455e-07 2.20895e-07 2.16284e-07 2.13218e-07 3.31701e-07 2.30557e-07 2.35452e-07 2.38168e-07 2.28802e-07 2.0005e-07 1.53554e-07 9.99505e-08 5.35981e-08 2.31633e-08 7.93883e-09 2.13288e-09 4.45126e-10 7.15253e-11 8.75095e-12 8.02098e-13 5.37385e-14 2.53425e-15 7.93442e-17 1.50192e-18 1.46651e-20 5.44926e-23 3.66754e-26 1 1 1 1 1 0.956971 0.806688 0.536668 0.283854 0.0128804 0.000615373 0.00058615 0.000448846 6.18163e-05 3.62936e-05 3.32067e-05 1.85398e-05 7.36376e-06 2.58676e-07 2.45832e-07 2.42072e-07 2.36916e-07 2.32218e-07 2.26918e-07 2.21878e-07 2.17811e-07 2.1608e-07 2.17952e-07 2.2857e-07 2.43214e-07 2.46449e-07 2.47027e-07 2.23985e-07 1.79801e-07 1.24562e-07 7.25265e-08 3.46436e-08 1.33115e-08 4.05251e-09 9.65687e-10 1.78102e-10 2.50993e-11 2.65738e-12 2.06311e-13 1.13317e-14 4.16993e-16 9.43771e-18 1.13803e-19 5.57744e-22 5.81883e-25 0.980777 0.955179 0.898303 0.803111 0.60666 0.369222 0.16831 0.0624095 0.00535402 0.00138388 0.000896261 0.000184384 0.000120471 6.99974e-05 5.19203e-05 6.14255e-05 3.7746e-05 1.00658e-05 2.7817e-07 2.67922e-07 2.48972e-07 2.40342e-07 2.33348e-07 2.27356e-07 2.22335e-07 2.1845e-07 2.17116e-07 2.20867e-07 2.31537e-07 2.32092e-07 3.12305e-07 2.34154e-07 2.30163e-07 1.95974e-07 1.43289e-07 8.88616e-08 4.57539e-08 1.9167e-08 6.42509e-09 1.69988e-09 3.50437e-10 5.55085e-11 6.637e-12 5.8462e-13 3.66312e-14 1.5498e-15 4.08376e-17 5.8611e-19 3.56695e-21 5.05792e-24 0.205987 0.157368 0.0944642 0.0162619 -5.15436e-08 2.17614e-07 2.56086e-06 0.000105133 0.000749126 0.000421351 0.000229607 0.000103185 9.96621e-05 6.52055e-05 6.53875e-05 5.67949e-05 8.88257e-06 2.18554e-06 2.9772e-07 2.67537e-07 2.52376e-07 2.41808e-07 2.33924e-07 2.27848e-07 2.22898e-07 2.19285e-07 2.18452e-07 2.21209e-07 2.22627e-07 2.37479e-07 2.38582e-07 3.10878e-07 2.06648e-07 2.01938e-07 1.55991e-07 1.01323e-07 5.50458e-08 2.455e-08 8.83621e-09 2.52961e-09 5.68206e-10 9.86763e-11 1.30091e-11 1.27042e-12 8.87669e-14 4.21768e-15 1.2604e-16 2.08315e-18 1.49937e-20 2.64532e-23 -1.08626e-07 -2.42055e-08 1.32461e-14 5.33327e-09 1.55132e-08 2.41973e-08 7.30824e-07 3.03654e-06 9.33722e-05 0.000260012 0.000154222 8.07841e-05 4.55429e-05 5.23454e-05 4.54501e-05 1.03964e-05 5.22188e-06 2.88572e-07 2.70194e-07 2.64616e-07 2.52765e-07 2.30531e-07 2.29453e-07 2.25766e-07 2.21904e-07 2.19133e-07 2.18528e-07 2.18549e-07 2.57222e-07 2.40358e-07 3.17067e-07 2.44281e-07 2.41311e-07 2.11636e-07 1.63148e-07 1.08831e-07 6.13452e-08 2.8586e-08 1.08201e-08 3.27814e-09 7.84075e-10 1.45859e-10 2.0718e-11 2.19229e-12 1.66947e-13 8.70072e-15 2.87436e-16 5.3095e-18 4.34583e-20 8.98069e-23 -2.40279e-08 5.49113e-08 8.72505e-08 1.30778e-07 7.38124e-08 5.59133e-08 2.94871e-07 1.05865e-06 1.10742e-05 4.14733e-05 3.16425e-05 2.71759e-05 5.92085e-06 3.0289e-05 1.45721e-05 1.79887e-06 4.50868e-06 5.53043e-06 8.97772e-07 2.57655e-07 2.5228e-07 3.41112e-07 2.31312e-07 2.27012e-07 2.22454e-07 2.20281e-07 2.22105e-07 2.3072e-07 2.31522e-07 3.8387e-07 2.70758e-07 2.66396e-07 2.48628e-07 2.14074e-07 1.65584e-07 1.11878e-07 6.42907e-08 3.07257e-08 1.19951e-08 3.76931e-09 9.40479e-10 1.83553e-10 2.75061e-11 3.08726e-12 2.50706e-13 1.40103e-14 4.99407e-16 1.00337e-17 9.03671e-20 2.09136e-22 3.29538e-08 9.57486e-08 3.50276e-07 4.82342e-07 4.08445e-07 3.88511e-07 3.05055e-07 3.56027e-07 1.36152e-06 6.02664e-07 3.721e-07 3.48459e-07 3.36444e-07 9.99835e-07 1.72807e-06 1.79354e-06 5.03976e-07 5.53071e-06 5.42672e-06 1.29718e-06 2.73709e-07 2.57971e-07 2.44476e-07 2.3286e-07 2.26389e-07 2.25319e-07 2.30739e-07 2.44242e-07 2.58566e-07 2.68039e-07 2.76119e-07 2.687e-07 2.47953e-07 2.12065e-07 1.63395e-07 1.10232e-07 6.34858e-08 3.05584e-08 1.20905e-08 3.87371e-09 9.90849e-10 1.99258e-10 3.09178e-11 3.61052e-12 3.06504e-13 1.79916e-14 6.77065e-16 1.44464e-17 1.39216e-19 3.48344e-22 4.78999e-08 1.0082e-07 2.15697e-07 4.83305e-07 4.78346e-07 4.26033e-07 3.24447e-07 3.26324e-07 4.04746e-07 3.42805e-07 3.24419e-07 3.24039e-07 3.22715e-07 3.33492e-07 3.51829e-07 5.27521e-07 4.08896e-07 6.41034e-07 1.02361e-06 7.42011e-07 3.87792e-07 2.85578e-07 2.49892e-07 2.35471e-07 2.31153e-07 2.33875e-07 2.42886e-07 2.57004e-07 2.70439e-07 2.78355e-07 2.77959e-07 2.67572e-07 2.44515e-07 2.06836e-07 1.57335e-07 1.04696e-07 5.95462e-08 2.84195e-08 1.11928e-08 3.5905e-09 9.25372e-10 1.88567e-10 2.97953e-11 3.55878e-12 3.1027e-13 1.87788e-14 7.31536e-16 1.62241e-17 1.63282e-19 4.29146e-22 4.76089e-08 1.18844e-07 1.30478e-07 1.65706e-07 3.75737e-07 3.11629e-07 3.11722e-07 3.14624e-07 3.23791e-07 3.20303e-07 3.15241e-07 3.17535e-07 3.18911e-07 3.30516e-07 3.42616e-07 3.75177e-07 3.51056e-07 3.57437e-07 6.74409e-07 2.41287e-07 2.3841e-07 2.37997e-07 2.37517e-07 2.35367e-07 2.38014e-07 2.45402e-07 2.56248e-07 2.68345e-07 2.77742e-07 2.81476e-07 2.7786e-07 2.64672e-07 2.3863e-07 1.98321e-07 1.47669e-07 9.59806e-08 5.32942e-08 2.48534e-08 9.60922e-09 3.03714e-09 7.74547e-10 1.57134e-10 2.48642e-11 2.98902e-12 2.63343e-13 1.61594e-14 6.40032e-16 1.44708e-17 1.48867e-19 4.00921e-22 4.29508e-08 1.14832e-07 1.77168e-07 1.88017e-07 2.50399e-07 4.13719e-07 4.10853e-07 3.09658e-07 3.13519e-07 3.14024e-07 3.12841e-07 3.16011e-07 3.15754e-07 3.20344e-07 3.28181e-07 3.35294e-07 3.26635e-07 3.15527e-07 3.15597e-07 1.11706e-05 1.2411e-05 1.63996e-06 2.44248e-07 2.50995e-07 2.52583e-07 2.60194e-07 2.69606e-07 2.78095e-07 2.83244e-07 2.8331e-07 2.76468e-07 2.59681e-07 2.29671e-07 1.8617e-07 1.34574e-07 8.46667e-08 4.54527e-08 2.04987e-08 7.66961e-09 2.35655e-09 5.86933e-10 1.16619e-10 1.8161e-11 2.16041e-12 1.89239e-13 1.15859e-14 4.58949e-16 1.03938e-17 1.07191e-19 2.8932e-22 3.58126e-08 9.95475e-08 1.6375e-07 2.64173e-07 2.59514e-07 3.16499e-07 3.21739e-07 3.0903e-07 3.11164e-07 3.13304e-07 3.12373e-07 3.13434e-07 3.1324e-07 3.15279e-07 3.19472e-07 3.21041e-07 3.14758e-07 3.09944e-07 8.01796e-06 1.97859e-05 1.97904e-05 1.51176e-05 1.18971e-06 2.57152e-07 2.82789e-07 2.81047e-07 2.8331e-07 2.86721e-07 2.87691e-07 2.84037e-07 2.73215e-07 2.51716e-07 2.16903e-07 1.70183e-07 1.18467e-07 7.15437e-08 3.68118e-08 1.59108e-08 5.71044e-09 1.68416e-09 4.04087e-10 7.77663e-11 1.17512e-11 1.36029e-12 1.16416e-13 6.99042e-15 2.72317e-16 6.07121e-18 6.16096e-20 1.6323e-22 2.80615e-08 8.32344e-08 1.53492e-07 2.08109e-07 2.25143e-07 4.0597e-07 4.04835e-07 2.98516e-07 3.08516e-07 3.10093e-07 3.10135e-07 3.10953e-07 3.10901e-07 3.11997e-07 3.14104e-07 3.14e-07 3.08178e-07 3.12135e-07 1.8606e-05 1.9789e-05 1.97894e-05 1.97894e-05 6.01271e-06 2.74222e-07 3.09986e-07 2.97972e-07 2.95854e-07 2.95167e-07 2.91755e-07 2.83399e-07 2.672e-07 2.3977e-07 1.99756e-07 1.50516e-07 1.00115e-07 5.7587e-08 2.818e-08 1.15813e-08 3.95504e-09 1.11117e-09 2.5406e-10 4.66941e-11 6.77575e-12 7.53971e-13 6.20861e-14 3.59321e-15 1.35159e-16 2.91266e-18 2.85411e-20 7.27301e-23 2.06499e-08 6.52182e-08 1.30139e-07 1.98196e-07 2.52323e-07 2.73337e-07 3.21126e-07 2.97729e-07 3.02614e-07 3.05425e-07 3.06682e-07 3.0796e-07 3.08251e-07 3.08957e-07 3.09987e-07 3.09985e-07 3.07496e-07 3.08211e-07 1.85304e-05 1.9789e-05 1.97886e-05 1.97449e-05 3.06721e-06 3.10057e-07 3.18451e-07 3.18861e-07 3.1523e-07 3.06894e-07 2.95746e-07 2.80252e-07 2.56937e-07 2.22772e-07 1.78023e-07 1.27841e-07 8.06553e-08 4.38782e-08 2.02816e-08 7.87236e-09 2.54062e-09 6.75187e-10 1.46156e-10 2.54205e-11 3.49213e-12 3.6964e-13 2.89498e-14 1.5919e-15 5.68317e-17 1.16091e-18 1.0758e-20 2.57847e-23 1.42515e-08 4.83023e-08 1.0404e-07 1.69552e-07 2.27317e-07 2.65555e-07 2.84967e-07 2.95649e-07 2.97043e-07 3.0031e-07 3.02484e-07 3.04125e-07 3.04938e-07 3.05586e-07 3.06598e-07 3.08539e-07 3.30737e-07 3.18493e-07 5.37761e-06 1.92294e-05 1.74054e-05 5.14729e-06 3.69174e-07 3.57951e-07 3.90307e-07 3.74005e-07 3.43636e-07 3.18344e-07 2.96021e-07 2.71726e-07 2.40546e-07 2.00042e-07 1.5222e-07 1.03448e-07 6.14989e-08 3.1449e-08 1.36518e-08 4.97713e-09 1.50969e-09 3.77386e-10 7.68894e-11 1.25876e-11 1.62474e-12 1.61327e-13 1.18899e-14 6.13894e-16 2.05046e-17 3.90157e-19 3.34933e-21 7.37568e-24 9.15736e-09 3.35682e-08 7.889e-08 1.39987e-07 2.02876e-07 2.53881e-07 2.88519e-07 3.02779e-07 2.96179e-07 2.96922e-07 2.98218e-07 3.00003e-07 3.01271e-07 3.02354e-07 3.04387e-07 3.09908e-07 3.53812e-07 4.18479e-07 4.27294e-07 2.4808e-06 1.76877e-06 3.96206e-07 3.85429e-07 3.54835e-07 4.82156e-07 4.06288e-07 3.5787e-07 3.19149e-07 2.87418e-07 2.55122e-07 2.17002e-07 1.72001e-07 1.2381e-07 7.91324e-08 4.40778e-08 2.10804e-08 8.5546e-09 2.91683e-09 8.28089e-10 1.9388e-10 3.70085e-11 5.67475e-12 6.85149e-13 6.34008e-14 4.33904e-15 2.08233e-16 6.43156e-18 1.12358e-19 8.77936e-22 1.73831e-24 5.41023e-09 2.15565e-08 5.56475e-08 1.0853e-07 1.71795e-07 2.32298e-07 2.70716e-07 3.93177e-07 2.94897e-07 2.94901e-07 2.95149e-07 2.95944e-07 2.98013e-07 2.99939e-07 3.03929e-07 3.15598e-07 3.76823e-07 5.2636e-07 9.97952e-07 2.35695e-06 1.31198e-06 6.93883e-07 4.07784e-07 3.58767e-07 4.21564e-07 3.97026e-07 3.4804e-07 3.0547e-07 2.68187e-07 2.299e-07 1.86969e-07 1.40387e-07 9.50186e-08 5.68106e-08 2.95151e-08 1.3151e-08 4.97237e-09 1.58073e-09 4.18752e-10 9.15348e-11 1.6313e-11 2.33369e-12 2.62454e-13 2.25509e-14 1.42438e-15 6.27735e-17 1.77669e-18 2.8192e-20 1.9766e-22 3.45475e-25 2.89552e-09 1.25716e-08 3.58105e-08 7.75268e-08 1.36472e-07 2.02461e-07 2.58227e-07 2.85081e-07 3.07635e-07 2.93172e-07 2.91925e-07 2.92483e-07 2.95093e-07 2.97674e-07 3.02961e-07 3.19111e-07 3.88591e-07 5.3696e-07 2.15481e-06 2.24856e-06 2.18128e-06 5.68225e-07 3.68071e-07 3.46095e-07 3.49528e-07 3.64369e-07 3.24226e-07 2.8081e-07 2.39844e-07 1.97531e-07 1.52619e-07 1.07888e-07 6.82998e-08 3.80401e-08 1.83742e-08 7.6083e-09 2.67458e-09 7.91176e-10 1.95173e-10 3.97415e-11 6.5956e-12 8.77688e-13 9.16269e-14 7.28491e-15 4.2343e-16 1.70112e-17 4.36762e-19 6.23765e-21 3.88035e-23 5.89512e-26 1.37948e-09 6.53257e-09 2.05608e-08 4.95883e-08 9.81777e-08 1.65965e-07 2.45271e-07 3.22013e-07 3.79569e-07 3.81869e-07 3.05098e-07 2.90824e-07 2.92721e-07 2.94905e-07 2.95005e-07 3.03277e-07 3.35456e-07 4.18634e-07 1.04517e-06 8.93178e-07 9.01096e-07 4.29834e-07 3.3203e-07 3.16156e-07 6.14532e-07 3.38489e-07 2.95222e-07 2.48642e-07 2.04605e-07 1.60571e-07 1.17051e-07 7.74772e-08 4.5694e-08 2.36434e-08 1.05987e-08 4.07339e-09 1.33001e-09 3.65725e-10 8.39141e-11 1.58935e-11 2.45194e-12 3.02848e-13 2.92713e-14 2.14666e-15 1.14485e-16 4.18532e-18 9.64879e-20 1.22934e-21 6.71664e-24 8.75693e-27 5.7343e-10 2.95794e-09 1.02461e-08 2.72997e-08 5.98204e-08 1.11873e-07 1.82578e-07 2.72465e-07 4.42476e-07 1.53295e-06 1.53437e-06 1.16432e-06 3.53231e-07 3.57933e-07 8.61809e-07 6.69504e-07 3.29515e-07 3.29858e-07 5.40573e-07 7.07445e-07 3.15079e-07 3.11727e-07 3.11297e-07 3.0987e-07 2.95854e-07 3.19573e-07 2.61354e-07 2.10187e-07 1.64881e-07 1.22351e-07 8.36778e-08 5.16668e-08 2.83246e-08 1.36003e-08 5.6555e-09 2.01717e-09 6.11687e-10 1.5632e-10 3.33438e-11 5.86964e-12 8.40783e-13 9.62409e-14 8.59527e-15 5.79995e-16 2.82952e-17 9.38068e-19 1.9353e-20 2.1768e-22 1.03519e-24 1.14569e-27 2.04169e-10 1.1495e-09 4.38725e-09 1.29343e-08 3.1567e-08 6.67491e-08 1.26484e-07 2.2003e-07 3.55355e-07 5.28651e-07 7.98361e-07 8.44013e-07 6.20354e-07 5.16241e-07 8.07095e-07 2.86465e-06 5.26773e-06 6.80172e-06 6.62391e-06 6.78408e-06 4.83099e-06 3.50784e-06 9.39307e-07 9.10169e-07 2.48635e-07 2.96218e-07 2.21421e-07 1.67818e-07 1.24221e-07 8.66788e-08 5.54297e-08 3.18698e-08 1.62313e-08 7.23369e-09 2.79204e-09 9.24822e-10 2.6061e-10 6.19172e-11 1.22789e-11 2.00837e-12 2.66945e-13 2.82892e-14 2.33119e-15 1.44457e-16 6.42972e-18 1.92772e-19 3.54972e-21 3.4952e-23 1.43385e-25 1.33382e-28 6.07535e-11 3.7389e-10 1.56752e-09 5.05452e-09 1.33583e-08 3.01254e-08 5.97327e-08 1.06831e-07 1.76393e-07 2.73361e-07 3.98119e-07 5.25781e-07 5.35414e-07 5.03306e-07 6.48609e-07 1.21016e-06 4.69708e-06 7.26983e-06 7.27323e-06 7.27493e-06 7.27676e-06 7.27452e-06 7.02953e-06 1.04962e-06 2.15667e-07 2.55432e-07 1.76668e-07 1.25917e-07 8.72703e-08 5.68593e-08 3.39275e-08 1.81612e-08 8.59869e-09 3.56085e-09 1.27735e-09 3.93412e-10 1.03127e-10 2.2796e-11 4.2048e-12 6.39105e-13 7.88051e-14 7.72701e-15 5.86917e-16 3.33469e-17 1.35118e-18 3.65223e-20 5.98032e-22 5.13284e-24 1.80117e-26 1.39558e-29 1.48047e-11 1.00594e-10 4.68933e-10 1.68078e-09 4.9181e-09 1.21893e-08 2.62485e-08 5.00912e-08 8.62191e-08 1.36271e-07 2.01421e-07 2.79975e-07 3.40252e-07 3.60839e-07 4.04393e-07 5.03486e-07 5.51883e-07 4.97879e-06 7.27509e-06 7.27538e-06 7.27765e-06 7.2774e-06 4.68661e-06 4.98984e-07 2.01574e-07 2.0021e-07 1.30513e-07 8.79952e-08 5.7158e-08 3.46204e-08 1.9205e-08 9.57168e-09 4.21877e-09 1.62607e-09 5.4302e-10 1.55746e-10 3.80275e-11 7.82884e-12 1.34412e-12 1.89926e-13 2.17273e-14 1.97058e-15 1.37864e-16 7.17313e-18 2.64083e-19 6.41765e-21 9.31356e-23 6.9419e-25 2.06556e-27 1.32288e-30 2.87607e-12 2.17643e-11 1.13828e-10 4.58227e-10 1.50404e-09 4.16998e-09 9.99903e-09 2.10899e-08 3.96562e-08 6.7329e-08 1.04704e-07 1.51031e-07 2.0049e-07 2.34444e-07 2.5858e-07 2.79349e-07 2.81902e-07 3.17334e-07 2.28186e-06 4.07417e-06 4.27618e-06 2.63036e-06 2.98909e-07 3.25341e-07 1.73661e-07 1.4219e-07 8.87338e-08 5.68165e-08 3.47572e-08 1.96159e-08 1.01031e-08 4.67989e-09 1.92251e-09 6.90984e-10 2.15212e-10 5.75791e-11 1.31142e-11 2.51755e-12 4.02697e-13 5.29323e-14 5.61974e-15 4.71427e-16 3.03641e-17 1.44531e-18 4.82669e-20 1.05194e-21 1.34843e-23 8.6955e-26 2.17797e-28 1.14829e-31 4.35609e-13 3.69951e-12 2.18632e-11 9.95704e-11 3.69489e-10 1.15646e-09 3.1237e-09 7.39857e-09 1.55481e-08 2.92814e-08 4.99477e-08 7.81339e-08 1.12738e-07 1.44706e-07 1.69321e-07 1.87415e-07 1.97566e-07 2.09201e-07 1.68482e-07 1.75832e-07 1.72751e-07 1.69855e-07 1.8591e-07 1.87847e-07 1.29987e-07 9.18782e-08 5.55059e-08 3.38658e-08 1.95607e-08 1.03311e-08 4.95664e-09 2.13325e-09 8.1652e-10 2.74154e-10 7.9792e-11 1.99496e-11 4.24514e-12 7.60945e-13 1.13525e-13 1.38927e-14 1.36957e-15 1.06283e-16 6.30062e-18 2.74156e-19 8.29335e-21 1.61738e-22 1.82526e-24 1.01398e-26 2.12697e-29 9.17746e-33 5.05286e-14 4.85059e-13 3.26067e-12 1.69109e-11 7.14223e-11 2.54106e-10 7.78956e-10 2.08988e-09 4.96352e-09 1.05338e-08 2.01664e-08 3.51864e-08 5.61362e-08 7.98553e-08 1.0134e-07 1.18904e-07 1.31653e-07 1.41866e-07 1.57243e-07 1.61875e-07 1.58347e-07 1.58054e-07 1.20201e-07 1.11206e-07 8.45791e-08 5.43256e-08 3.1971e-08 1.86372e-08 1.01884e-08 5.05221e-09 2.26769e-09 9.10283e-10 3.24523e-10 1.01884e-10 2.77659e-11 6.49956e-12 1.29439e-12 2.16971e-13 3.02289e-14 3.44751e-15 3.15795e-16 2.2679e-17 1.23739e-18 4.91933e-20 1.34646e-21 2.34526e-23 2.32346e-25 1.10741e-27 1.93638e-30 6.80755e-34 4.42433e-15 4.83508e-14 3.72214e-13 2.21328e-12 1.07111e-11 4.36081e-11 1.52717e-10 4.67186e-10 1.26253e-09 3.04153e-09 6.59041e-09 1.29642e-08 2.32492e-08 3.74133e-08 5.24492e-08 6.60928e-08 7.71146e-08 8.54445e-08 9.37992e-08 1.00461e-07 9.8813e-08 9.45035e-08 7.40144e-08 6.37836e-08 4.85134e-08 2.95011e-08 1.69626e-08 9.46896e-09 4.91151e-09 2.29599e-09 9.66227e-10 3.64115e-10 1.21187e-10 3.55791e-11 9.09466e-12 1.99725e-12 3.72939e-13 5.85542e-14 7.62921e-15 8.11823e-16 6.91604e-17 4.59906e-18 2.30996e-19 8.38856e-21 2.07585e-22 3.22466e-24 2.79816e-26 1.14087e-28 1.6573e-31 4.73775e-35 2.89529e-16 3.62997e-15 3.22308e-14 2.2125e-13 1.23505e-12 5.79058e-12 2.33071e-11 8.17709e-11 2.52839e-10 6.95118e-10 1.71394e-09 3.82829e-09 7.82052e-09 1.45211e-08 2.29511e-08 3.15553e-08 3.92355e-08 4.53558e-08 5.01447e-08 5.41154e-08 5.36394e-08 4.98769e-08 4.10356e-08 3.37678e-08 2.49173e-08 1.47327e-08 8.28647e-09 4.44024e-09 2.19136e-09 9.69977e-10 3.83905e-10 1.36295e-10 4.26148e-11 1.17089e-11 2.81104e-12 5.80373e-13 1.01814e-13 1.50002e-14 1.83068e-15 1.82006e-16 1.44365e-17 8.89671e-19 4.11563e-20 1.36541e-21 3.05394e-23 4.2276e-25 3.20885e-27 1.11752e-29 1.3474e-32 3.13232e-36 1.40783e-17 2.04094e-16 2.10506e-15 1.67969e-14 1.08896e-13 5.92109e-13 2.75932e-12 1.11898e-11 3.99261e-11 1.26458e-10 3.58682e-10 9.20901e-10 2.16347e-09 4.61601e-09 8.38669e-09 1.28209e-08 1.72299e-08 2.1059e-08 2.403e-08 2.61791e-08 2.6177e-08 2.42004e-08 2.03522e-08 1.62615e-08 1.16031e-08 6.76651e-09 3.72525e-09 1.9214e-09 9.05171e-10 3.80974e-10 1.42424e-10 4.7752e-11 1.41097e-11 3.64083e-12 8.218e-13 1.59833e-13 2.63995e-14 3.65691e-15 4.18791e-16 3.89626e-17 2.88135e-18 1.64742e-19 7.02522e-21 2.13054e-22 4.30849e-24 5.31568e-26 3.52963e-28 1.0506e-30 1.05491e-33 2.00762e-37 4.97608e-19 8.4169e-18 1.01726e-16 9.51945e-16 7.2337e-15 4.6045e-14 2.50817e-13 1.18698e-12 4.93451e-12 1.81827e-11 5.99177e-11 1.78441e-10 4.84942e-10 1.19432e-09 2.53874e-09 4.40812e-09 6.50625e-09 8.51647e-09 1.01816e-08 1.13496e-08 1.15179e-08 1.07011e-08 9.07565e-09 7.11851e-09 4.93702e-09 2.85763e-09 1.54101e-09 7.67447e-10 3.46378e-10 1.39177e-10 4.93839e-11 1.56814e-11 4.39453e-12 1.07197e-12 2.27696e-13 4.17936e-14 6.51428e-15 8.50248e-16 9.15487e-17 7.98474e-18 5.51424e-19 2.92931e-20 1.15301e-21 3.20023e-23 5.85828e-25 6.451e-27 3.75566e-29 9.59577e-32 8.10009e-35 1.27982e-38 1.24611e-20 2.49034e-19 3.56952e-18 3.96442e-17 3.57294e-16 2.69351e-15 1.73436e-14 9.68143e-14 4.73683e-13 2.04964e-12 7.91275e-12 2.75238e-11 8.70576e-11 2.50052e-10 6.3313e-10 1.279e-09 2.11032e-09 2.99875e-09 3.80111e-09 4.38975e-09 4.55736e-09 4.28495e-09 3.65928e-09 2.83935e-09 1.92758e-09 1.10995e-09 5.86947e-10 2.83186e-10 1.22925e-10 4.73357e-11 1.60197e-11 4.8338e-12 1.28862e-12 2.98758e-13 5.99101e-14 1.03934e-14 1.5323e-15 1.88879e-16 1.91623e-17 1.56997e-18 1.01442e-19 5.01608e-21 1.8257e-22 4.6465e-24 7.7171e-26 7.60884e-28 3.90453e-30 8.64935e-33 6.25127e-36 8.43679e-40 2.13952e-22 5.13886e-21 8.87649e-20 1.18816e-18 1.28898e-17 1.16731e-16 9.00633e-16 6.00684e-15 3.50081e-14 1.79873e-13 8.21857e-13 3.37204e-12 1.25557e-11 4.27043e-11 1.3029e-10 3.13167e-10 5.88779e-10 9.21463e-10 1.25269e-09 1.51502e-09 1.62209e-09 1.55344e-09 1.33987e-09 1.03468e-09 6.92248e-10 3.9689e-10 2.06137e-10 9.668e-11 4.05186e-11 1.50097e-11 4.86743e-12 1.40061e-12 3.56289e-13 7.87785e-14 1.50047e-14 2.46195e-15 3.44069e-16 4.01512e-17 3.84708e-18 2.96743e-19 1.7979e-20 8.29354e-22 2.7979e-23 6.54752e-25 9.90185e-27 8.78937e-29 4.0131e-31 7.84518e-34 5.0077e-37 6.05176e-41 2.3858e-24 7.04198e-23 1.49658e-21 2.46272e-20 3.27833e-19 3.63364e-18 3.42077e-17 2.77425e-16 1.95875e-15 1.21463e-14 6.67558e-14 3.28864e-13 1.4722e-12 6.04803e-12 2.23031e-11 6.49013e-11 1.41876e-10 2.48248e-10 3.66102e-10 4.68245e-10 5.20954e-10 5.11304e-10 4.47236e-10 3.45448e-10 2.29116e-10 1.30873e-10 6.68949e-11 3.06002e-11 1.24286e-11 4.44515e-12 1.38716e-12 3.82042e-13 9.30281e-14 1.96722e-14 3.57717e-15 5.56674e-16 7.38446e-17 8.17858e-18 7.419e-19 5.4008e-20 3.07591e-21 1.32715e-22 4.16232e-24 8.98954e-26 1.24433e-27 1.00256e-29 4.13194e-32 7.32263e-35 4.33445e-38 5.00451e-42 1.56667e-26 5.85729e-25 1.57647e-23 3.28066e-22 5.51134e-21 7.6896e-20 9.08622e-19 9.21866e-18 8.11214e-17 6.24329e-16 4.23992e-15 2.5707e-14 1.41238e-13 7.10349e-13 3.19055e-12 1.14581e-11 2.97405e-11 5.90605e-11 9.55226e-11 1.30345e-10 1.51709e-10 1.53432e-10 1.3663e-10 1.06011e-10 7.0041e-11 3.98919e-11 2.01113e-11 9.00096e-12 3.55549e-12 1.232e-12 3.71387e-13 9.82545e-14 2.29734e-14 4.65904e-15 8.11505e-16 1.20456e-16 1.51669e-17 1.59823e-18 1.37612e-19 9.47897e-21 5.08854e-22 2.05977e-23 6.02714e-25 1.20699e-26 1.53966e-28 1.13855e-30 4.31971e-33 7.19068e-36 4.19559e-39 5.09485e-43 5.06517e-29 2.50992e-27 8.94096e-26 2.45794e-24 5.44277e-23 9.98491e-22 1.5469e-20 2.05067e-19 2.34778e-18 2.33812e-17 2.04073e-16 1.5774e-15 1.09509e-14 6.89731e-14 3.85578e-13 1.74288e-12 5.48484e-12 1.25361e-11 2.24501e-11 3.29221e-11 4.03057e-11 4.21888e-11 3.83702e-11 3.00115e-11 1.98297e-11 1.12724e-11 5.61774e-12 2.4671e-12 9.50874e-13 3.20243e-13 9.3574e-14 2.38651e-14 5.37407e-15 1.04809e-15 1.75326e-16 2.49325e-17 2.99132e-18 2.99963e-19 2.45797e-20 1.60641e-21 8.15218e-23 3.10616e-24 8.51472e-26 1.58985e-27 1.88456e-29 1.29671e-31 4.6383e-34 7.5502e-37 4.60822e-40 6.52977e-44 5.52743e-32 3.92354e-30 1.99646e-28 7.81877e-27 2.45984e-25 6.39304e-24 1.39855e-22 2.60738e-21 4.17571e-20 5.77442e-19 6.9274e-18 7.25907e-17 6.71361e-16 5.52795e-15 3.9881e-14 2.32755e-13 9.05185e-13 2.40725e-12 4.8055e-12 7.61075e-12 9.8371e-12 1.06889e-11 9.95194e-12 7.86853e-12 5.21497e-12 2.96207e-12 1.46241e-12 6.31843e-13 2.38318e-13 7.82447e-14 2.22283e-14 5.48394e-15 1.19268e-15 2.24282e-16 3.61229e-17 4.93614e-18 5.67019e-19 5.4208e-20 4.23249e-21 2.63185e-22 1.26645e-23 4.55822e-25 1.17575e-26 2.05938e-28 2.28943e-30 1.48802e-32 5.14568e-35 8.50849e-38 5.70117e-41 9.96283e-45 7.70461e-36 9.18918e-34 7.81619e-32 5.09412e-30 2.65597e-28 1.13926e-26 4.09539e-25 1.24823e-23 3.24592e-22 7.21725e-21 1.37164e-19 2.22594e-18 3.08334e-17 3.64204e-16 3.61916e-15 2.82186e-14 1.37174e-13 4.25899e-13 9.49059e-13 1.62558e-12 2.22138e-12 2.5093e-12 2.39497e-12 1.91799e-12 1.27795e-12 7.26056e-13 3.5583e-13 1.5161e-13 5.6112e-14 1.80087e-14 4.98757e-15 1.19429e-15 2.5151e-16 4.57193e-17 7.10685e-18 9.35611e-19 1.0327e-19 9.45182e-21 7.0401e-22 4.174e-23 1.91043e-24 6.51862e-26 1.58928e-27 2.62732e-29 2.76421e-31 1.72114e-33 5.87711e-36 1.01324e-38 7.79356e-42 1.78534e-45 1.60089e-42 5.49812e-40 1.33265e-37 2.44809e-35 3.5566e-33 4.20038e-31 4.1061e-29 3.35927e-27 2.31107e-25 1.33481e-23 6.4147e-22 2.52029e-20 7.86449e-19 1.85902e-17 3.08639e-16 3.3255e-15 1.9853e-14 7.09908e-14 1.75319e-13 3.23733e-13 4.67179e-13 5.48578e-13 5.3699e-13 4.36177e-13 2.92664e-13 1.66494e-13 8.11474e-14 3.41703e-14 1.24401e-14 3.91269e-15 1.05906e-15 2.46928e-16 5.04756e-17 8.89102e-18 1.33704e-18 1.69998e-19 1.80834e-20 1.58981e-21 1.13404e-22 6.42191e-24 2.80456e-25 9.10476e-27 2.10729e-28 3.30635e-30 3.31669e-32 1.99758e-34 6.80591e-37 1.23493e-39 1.0788e-42 3.30236e-46 ) ; boundaryField { leftWall { type zeroGradient; } rightWall { type zeroGradient; } lowerWall { type zeroGradient; } atmosphere { type inletOutlet; inletValue uniform 0; value nonuniform List<scalar> 100 ( 1.18078e-49 4.49864e-46 4.22414e-43 1.28616e-40 1.55714e-38 9.35914e-37 3.36514e-35 8.30164e-34 1.54517e-32 2.31371e-31 2.91118e-30 3.16949e-29 3.04268e-28 2.60371e-27 1.99602e-26 1.37115e-25 8.40904e-25 4.57221e-24 2.18412e-23 9.06862e-23 3.23191e-22 9.73625e-22 2.44554e-21 5.07424e-21 8.7698e-21 1.24733e-20 1.42856e-20 1.43577e-20 1.11749e-20 5.68124e-21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3.3255e-15 1.9853e-14 7.09908e-14 1.75319e-13 3.23733e-13 4.67179e-13 5.48578e-13 5.3699e-13 4.36177e-13 2.92664e-13 1.66494e-13 8.11474e-14 3.41703e-14 1.24401e-14 3.91269e-15 1.05906e-15 2.46928e-16 5.04756e-17 8.89102e-18 1.33704e-18 1.69998e-19 1.80834e-20 1.58981e-21 1.13404e-22 6.42191e-24 2.80456e-25 9.10476e-27 2.10729e-28 3.30635e-30 3.31669e-32 1.99758e-34 6.80591e-37 1.23493e-39 1.0788e-42 3.30236e-46 ) ; } defaultFaces { type empty; } } // ************************************************************************* //
f14bc85bb31c8dbc67d243d519c2380650bc7cae
90996ecd8493eaafd10360ae4e840861ca103282
/src/imagefilters/ImageProcessingBusiness.cpp
a9f26e499df0a03d958577bfd53926a21823db55
[]
no_license
jarey/cuda-border-processor
e5bfd0428af0fc0b631652f7f94129cffa89bb07
9e32a61035760abef20ecb0fe66ebbcc093dc432
refs/heads/master
2020-12-24T19:27:51.023174
2020-07-28T14:48:33
2020-07-28T14:48:33
30,494,286
2
0
null
null
null
null
UTF-8
C++
false
false
4,984
cpp
ImageProcessingBusiness.cpp
/* * ImageProcessingBusiness.cpp * * Creado: 24/03/2012 * Autor: jose * Descripciñon: clase encargada de orquestrar la ejecución de los algoritmos de forma automática. * Se hace uso del filtro concreto instanciado por pantalla y se asigna el evaluador de filtro * concreto, según el filtro haciendo uso de la factoría de evaluadores. */ #include "ImageProcessingBusiness.h" #include "./src/common/Controlador.h" #include "./src/common/Constants.h" #include <QString> #include <stdio.h> #include "./src/imagefilters/SobelImageFilter.h" #include "./src/filterexecutors/FilterExecutor.h" #include "./src/filterexecutors/FilterExecutorFactory.h" #include "./src/filterexecutors/SobelFilterExecutor.h" #include "./src/imagefilters/LaplacianOfGaussianImageFilter.h" #include <QDebug> #include <QTime> ImageProcessingBusiness::ImageProcessingBusiness() { // TODO Auto-generated constructor stub } ImageProcessingBusiness::~ImageProcessingBusiness() { // TODO Auto-generated destructor stub } void ImageProcessingBusiness::doProcess(ImageFilter &filter) { //Se obtienen los datos del controlador (modo de aplicación) Controlador *controlador = Controlador::Instance(); Constants *constants = Constants::Instance(); QString algorythmSelected = controlador->getAlgorythmSelected(); QString applicationMode = controlador->getApplicationMode(); FilterExecutorFactory *filterExecutorFactory = new FilterExecutorFactory(); FilterExecutor *filterExecutor = filterExecutorFactory->getExecutorInstance(filter); QImage returned; if (applicationMode == constants->getSimpleImageMode() || applicationMode == constants->getPlotMode() || applicationMode == constants->getFrameCaptureMode()) { if (controlador->getIsGpuMode() == 1) { returned = filterExecutor->executeFilterGPU( controlador->getMatrixListOrigin()->at(0), filter); } else if (controlador->getIsGpuMode() == 0) { returned = filterExecutor->executeFilterCPU( controlador->getMatrixListOrigin()->at(0), filter); } else if (controlador->getIsGpuMode() == 2) { //Modo comparación entre CPU y GPU returned = filterExecutor->executeFilterCPUvsGPU( controlador->getMatrixListOrigin()->at(0), filter); } controlador->getMatrixListDestiny()->clear(); controlador->getMatrixListDestiny()->append(returned); } else if (applicationMode == constants->getMultipleImageMode()) { for (int i = 0; i < controlador->getMatrixListOrigin()->size(); i++) { if (controlador->getIsGpuMode() == 1) { returned = filterExecutor->executeFilterGPU( controlador->getMatrixListOrigin()->at(i), filter); } else if (controlador->getIsGpuMode() == 0) { returned = filterExecutor->executeFilterCPU( controlador->getMatrixListOrigin()->at(i), filter); } else if (controlador->getIsGpuMode() == 2) { //modo comparación entre CPU y GPU returned = filterExecutor->executeFilterCPUvsGPU( controlador->getMatrixListOrigin()->at(i), filter); } if (!returned.isNull()) { controlador->getMatrixListDestiny()->append(returned); } } } else if (applicationMode == constants->getMultipleAlgorythmMode()) { } //Se realiza el borrado de todas las estructuras empleadas. free(filterExecutorFactory); free(filterExecutor); } void ImageProcessingBusiness::doProcess(QList<ImageFilter*> *filters) { //Se obtienen los datos del controlador (modo de aplicación) Controlador *controlador = Controlador::Instance(); Constants *constants = Constants::Instance(); QString algorythmSelected = controlador->getAlgorythmSelected(); QString applicationMode = controlador->getApplicationMode(); if (applicationMode == constants->getSimpleImageMode()) { //NO SE CONTEMPLA PERO EN CASO DE NECESITARSE IMPLEMENTACIÓN PARA ESTE MODO IRÍA AQUÍ } else if (applicationMode == constants->getMultipleImageMode()) { //NO SE CONTEMPLA PERO EN CASO DE NECESITARSE IMPLEMENTACIÓN PARA ESTE MODO IRÍA AQUÍ } else if (applicationMode == constants->getMultipleAlgorythmMode()) { //Se recorren los filtros del listado y para cada uno de ellos se realiza la ejecución del algoritmo correspondiente for (int i = 0; i < filters->size(); i++) { ImageFilter *filter = new ImageFilter; filter = filters->at(i); FilterExecutorFactory filterExecutorFactory = (FilterExecutorFactory) *new FilterExecutorFactory; FilterExecutor* filterExecutor = filterExecutorFactory.getExecutorInstance(*filter); QImage returned; if (controlador->getIsGpuMode() == 1) { returned = filterExecutor->executeFilterGPU( controlador->getMatrixListOrigin()->at(0), *filter); } else if (controlador->getIsGpuMode() == 0) { returned = filterExecutor->executeFilterCPU( controlador->getMatrixListOrigin()->at(0), *filter); } else if (controlador->getIsGpuMode() == 2) { //Modo comparación entre CPU y GPU } if (!returned.isNull()) { controlador->getMatrixListDestiny()->append(returned); } } } }
83ed5b38be675915370d6bcc08970f741180f0f5
ecea23de8a09bb9c88aa6835bc2e2e87cbd0633f
/UEDanalysis/studies/transientSignalPercentage.cpp
0fb99db0b7e565372d2e0b3c408bf8fb8e5c6092
[]
no_license
khegazy/UED_analysis
6451aab7aef67e04a4492617467da723e217e5d8
1327bb1b3bca31f583ed1dcd48685b3e2fd8780b
refs/heads/master
2021-04-15T04:27:09.212877
2021-02-19T00:14:38
2021-02-19T00:14:38
126,543,975
0
0
null
2019-06-15T18:50:37
2018-03-23T22:16:32
C++
UTF-8
C++
false
false
3,900
cpp
transientSignalPercentage.cpp
#include "../analysis.h" #include "/reg/neh/home/khegazy/baseTools/tools/parameters.h" int main(int argc, char* argv[]) { string runName(argv[1]); cout<<"RunName: "<<runName<<endl; /// Get Parameters /// parameterClass params(runName); int fitIndBegin = (int)(params.NradAzmBins*params.fitQbegin/params.maxQazm); int fitIndEnd = (int)(params.NradAzmBins*params.fitQend/params.maxQazm); /// Simulation/data data structs /// std::vector<double> atmDiff(params.NradAzmBins); std::vector<double> initStateMolDiff(params.NradAzmBins); std::vector<double> finalStateMolDiff(params.NradAzmBins); std::vector<double> dataFinalState(params.NradAzmBins); std::vector<double> dataReference(params.NradAzmBins); // Getting initial state simulation save::importDat<double> (atmDiff, params.simOutputDir + params.molName + "_atmDiffractionPatternLineOut_Qmax-" + to_string(params.maxQazm) + "_Ieb-" + to_string(params.Iebeam) + "_scrnD-" + to_string(params.screenDist) + "_elE-" + to_string(params.elEnergy) + "_Bins[" + to_string(params.NradAzmBins) + "].dat"); save::importDat<double> (initStateMolDiff, params.simOutputDir + params.molName + "_molDiffractionPatternLineOut_Qmax-" + to_string(params.maxQazm) + "_Ieb-" + to_string(params.Iebeam) + "_scrnD-" + to_string(params.screenDist) + "_elE-" + to_string(params.elEnergy) + "_Bins[" + to_string(params.NradAzmBins) + "].dat"); // Getting data save::importDat<double> (dataFinalState, params.mergeScansOutputDir + "data-" + runName + + "_diffFinalState[" + to_string(params.NradAzmBins) + "].dat"); save::importDat<double> (dataReference, params.mergeScansOutputDir + "data-" + runName + + "-referenceAzm[" + to_string(params.NradAzmBins) + "].dat"); /////////////////////////////////////// ///// Loop Through Final States ///// /////////////////////////////////////// for (int ifs=0; ifs<params.finalStates.size(); ifs++) { std::cout << "Starting Final State: " + params.finalStates[ifs] + "\n"; /// Get molecular diffraction of final state /// save::importDat<double> (finalStateMolDiff, params.simOutputDir + params.finalStates[ifs] + "_molDiffractionPatternLineOut_Qmax-" + to_string(params.maxQazm) + "_Ieb-" + to_string(params.Iebeam) + "_scrnD-" + to_string(params.screenDist) + "_elE-" + to_string(params.elEnergy) + "_Bins[" + to_string(params.NradAzmBins) + "].dat"); /// Calculate percentage of transient signal /// double atmDiffSum = 0; double initMolDiffSum = 0; double diffMolDiffSum = 0; double finalStateDiffSum = 0; double referenceDiffSum = 0; for (int iq=fitIndBegin; iq<fitIndEnd; iq++) { atmDiffSum += std::fabs(atmDiff[iq]); initMolDiffSum += std::fabs(initStateMolDiff[iq]); diffMolDiffSum += std::fabs(finalStateMolDiff[iq] - initStateMolDiff[iq]); finalStateDiffSum += std::fabs(dataFinalState[iq]); referenceDiffSum += std::fabs(dataReference[iq]); } std::cout << "\t Percent of initial state diffraction is molecular: " << 100*initMolDiffSum/(initMolDiffSum + atmDiffSum) << "% \n"; std::cout << "\t Percent of molecular signal that changes: " << 100*diffMolDiffSum/initMolDiffSum << "% \n"; std::cout << "\t Percent of total molecular signal that changes: " << 100*diffMolDiffSum/(initMolDiffSum + atmDiffSum) << "% \n"; std::cout << "\t Percent of total data that changes: " << 100*finalStateDiffSum/referenceDiffSum << "% \n"; std::cout << "\t Percent of molecules excited: " << 100*(finalStateDiffSum/referenceDiffSum) /(diffMolDiffSum/(initMolDiffSum + atmDiffSum)) << "% \n"; } return 0; }
495e4ffcc631d6d68d6fa470cdcfb0e48a55a6e2
ebf724b41d086d4a63cf712ad38cdd1b85531b8f
/obj_subject.h
54f2b9af98685090d6c0d409c362561d6e705823
[]
no_license
viaduct/telim_tmsd
361d7affe0f4bfb96dc8c68df4f44384b0cb75bf
d2618ecbdcbd7d94f70559a24761572497fbb54f
refs/heads/master
2020-04-26T15:53:28.259881
2019-03-04T02:31:59
2019-03-04T02:31:59
173,660,509
0
0
null
null
null
null
UTF-8
C++
false
false
564
h
obj_subject.h
#pragma once #include <functional> #include "member_id.h" #include "item_subject.h" namespace telimtmsd { class Obj; class ContEvent; class ObjSubject final : public ItemSubject { public: ObjSubject(Obj* obj); Item* item() const override; Obj* obj() const { return m_obj; } void listenCont(MemberId id, std::function<void (ContEvent const*)> callback); void stopListen(MemberId id); void freeThis() override; private: Obj* m_obj; }; template <typename T> inline ObjSubject* toObjSubject(T* subject) { return static_cast<ObjSubject*>(subject); } }
759e7830d398e0a9f61329678b3f8d3c6dbccb8d
dcafc53ed795fb295fe41dfbe426497ac1eee076
/archive/basics/code_struct_05_variables/exec.cpp
525b9b81ea7a244fdeb819cef5b066769cb03330
[]
no_license
hoodielive/cplusplus
18b68537c26bb12388075262e2db3e5654301dea
8592ed7190ca335fdf13739d4682be253a88a8b8
refs/heads/master
2020-03-21T18:07:03.423697
2020-01-29T03:48:24
2020-01-29T03:48:24
138,873,323
0
0
null
null
null
null
UTF-8
C++
false
false
326
cpp
exec.cpp
#include <iostream> // main (code section) /** stack [a,b,c] and heap [] */ using namespace std; int main() { int x; int x1; int _x; int X; int RollNo; int roll_no; int a = {10}; char A = 'A'; float f = 12.5f; cout << a << endl; cout << A << endl; cout << f << endl; return 0; }
baf24b14379ff50e6607d796ea67322eb6970c61
c90a56e7d7752b041fc5eb38257c5573cef346c6
/src-macOS/GC_tmpl.hxx
3afe3733da46ac2a0d3a2523a3e0c37eb2152db4
[]
no_license
random-builder/design_cadquery_ocp
a4c572a72699bad52ca5f43f30bb7c15d89072ff
2af799a9f1b2d81fd39e519b2f73e12b34a14c0a
refs/heads/master
2021-05-21T23:10:23.833461
2020-03-29T15:34:46
2020-03-29T15:34:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,094
hxx
GC_tmpl.hxx
#pragma once // pybind 11 related includes #include <pybind11/pybind11.h> #include <pybind11/stl.h> namespace py = pybind11; // Standard Handle #include <Standard_Handle.hxx> // includes to resolve forward declarations #include <StdFail_NotDone.hxx> #include <gp_Pnt.hxx> #include <StdFail_NotDone.hxx> #include <gp_Pln.hxx> #include <StdFail_NotDone.hxx> #include <gp_Pnt.hxx> #include <gp_Lin.hxx> #include <StdFail_NotDone.hxx> #include <gp_Elips.hxx> #include <StdFail_NotDone.hxx> #include <gp_Cone.hxx> #include <gp_Lin.hxx> #include <Geom_Transformation.hxx> #include <gp_Pnt.hxx> #include <StdFail_NotDone.hxx> #include <gp_Lin.hxx> #include <StdFail_NotDone.hxx> #include <gp_Circ.hxx> #include <StdFail_NotDone.hxx> #include <gp_Parab.hxx> #include <gp_Pnt.hxx> #include <StdFail_NotDone.hxx> #include <gp_Cylinder.hxx> #include <gp_Circ.hxx> #include <StdFail_NotDone.hxx> #include <gp_Hypr.hxx> #include <gp_Pnt.hxx> #include <StdFail_NotDone.hxx> #include <gp_Elips.hxx> #include <gp_Pnt.hxx> #include <StdFail_NotDone.hxx> #include <gp_Hypr.hxx> #include <StdFail_NotDone.hxx> #include <gp_Pnt.hxx> #include <gp_Circ.hxx> #include <gp_Ax1.hxx> #include <gp_Cylinder.hxx> #include <Geom_Transformation.hxx> #include <gp_Lin.hxx> #include <gp_Ax1.hxx> #include <gp_Pnt.hxx> #include <gp_Dir.hxx> #include <gp_Circ.hxx> #include <gp_Pnt.hxx> #include <gp_Vec.hxx> #include <Geom_Transformation.hxx> #include <gp_Vec.hxx> #include <gp_Pnt.hxx> #include <Geom_Transformation.hxx> #include <gp_Pnt.hxx> #include <gp_Ax1.hxx> #include <gp_Lin.hxx> #include <gp_Dir.hxx> #include <gp_Pln.hxx> #include <gp_Ax2.hxx> // module includes #include <GC_Root.hxx> #include <GC_MakeTrimmedCone.hxx> #include <GC_MakePlane.hxx> #include <GC_MakeSegment.hxx> #include <GC_MakeEllipse.hxx> #include <GC_MakeConicalSurface.hxx> #include <GC_MakeScale.hxx> #include <GC_MakeLine.hxx> #include <GC_MakeCircle.hxx> #include <GC_MakeArcOfParabola.hxx> #include <GC_MakeCylindricalSurface.hxx> #include <GC_MakeArcOfHyperbola.hxx> #include <GC_MakeArcOfEllipse.hxx> #include <GC_MakeHyperbola.hxx> #include <GC_MakeTrimmedCylinder.hxx> #include <GC_MakeRotation.hxx> #include <GC_MakeArcOfCircle.hxx> #include <GC_MakeTranslation.hxx> #include <GC_MakeMirror.hxx> // user-defined pre #include "OCP_specific.inc" // Class template handling functions // ./opencascade/GC_Root.hxx // ./opencascade/GC_MakeTrimmedCone.hxx // ./opencascade/GC_MakePlane.hxx // ./opencascade/GC_MakeSegment.hxx // ./opencascade/GC_MakeEllipse.hxx // ./opencascade/GC_MakeConicalSurface.hxx // ./opencascade/GC_MakeScale.hxx // ./opencascade/GC_MakeLine.hxx // ./opencascade/GC_MakeCircle.hxx // ./opencascade/GC_MakeArcOfParabola.hxx // ./opencascade/GC_MakeCylindricalSurface.hxx // ./opencascade/GC_MakeArcOfHyperbola.hxx // ./opencascade/GC_MakeArcOfEllipse.hxx // ./opencascade/GC_MakeHyperbola.hxx // ./opencascade/GC_MakeTrimmedCylinder.hxx // ./opencascade/GC_MakeRotation.hxx // ./opencascade/GC_MakeArcOfCircle.hxx // ./opencascade/GC_MakeTranslation.hxx // ./opencascade/GC_MakeMirror.hxx // user-defined post
6e9a74eb7d14fdcad2fe113b3a017aa128b9af48
5f44a9f45305522370b1fa1a970c1905415c5053
/SpiritTower/src/Criaturas.cpp
f2b2a9ca93a79d9698ce32d89b4273003928d87c
[]
no_license
MatRJ08/Spirit_Tower
ac094831e1613f19b7632190559c631c91cf0fb6
07ca46ae45b3b8e76f625db76409999c9bd90cfc
refs/heads/master
2022-11-26T03:29:40.549297
2020-07-29T01:04:46
2020-07-29T01:04:46
273,105,180
0
0
null
2020-07-29T01:04:47
2020-06-18T00:26:49
null
UTF-8
C++
false
false
276
cpp
Criaturas.cpp
// // Created by ashley on 14/7/20. // #include "Criaturas.h" Criaturas::Criaturas(Espectros est){ estud=est; cout << " Velocidad de ruta " <<estud.get_vel_ruta() << " Velocidad de pers " <<estud.get_vel_persecucion() << " Vision " <<estud.get_vision() << endl; }
f30fd077e636ce352a7f1212961b6469f830ded7
1c731129aabaf6b04fb40a3d3387e7a3f2de1fa4
/src/loaders/textureloader.hpp
d22d30f3b0960b2a5d3e6e91db7c474095af089a
[]
no_license
grz0zrg/Mammoth3D
1c757fac253fa402d9f57d4d488ffaacfa1daa88
3a5d952c866c09b4c5dc42b41f240ce0186f6d31
refs/heads/master
2021-01-10T20:00:48.396852
2015-08-22T21:55:37
2015-08-22T21:55:37
5,990,394
4
0
null
null
null
null
UTF-8
C++
false
false
1,433
hpp
textureloader.hpp
#ifndef MAMMOTH3D_TEXTURELOADER_HPP #define MAMMOTH3D_TEXTURELOADER_HPP #include <fstream> #include <iostream> #include <vector> #include <map> #include <GL/glew.h> #include "../core/math.hpp" #include "../core/texture.hpp" #include "../core/image.hpp" namespace loader { class TextureLoader { public: TextureLoader() { } ~TextureLoader() { for (unsigned int i = 0; i < _textures.size(); i++) { if (_textures[i]) { delete _textures[i]; } } } static TextureLoader *getInstance() { if (!_singleton) { _singleton = new TextureLoader; } return _singleton; } static void free() { if (_singleton) { delete _singleton; _singleton = 0; } } core::Texture *loadTexture(core::Image *image); core::Texture *createEmptyTexture(int width, int height, GLenum type); std::vector<core::Texture *> _textures; private: template <typename T> void log(const std::string &str, T param) { std::cout << "[TextureLoader ] " << str << param << std::endl; } void log(const char *str) { std::cout << "[TextureLoader ] " << str << std::endl; } TextureLoader(const TextureLoader&); void operator=(const TextureLoader&); static TextureLoader *_singleton; }; } #endif
97c29c1ef344d4fb14f0e2c6fabeed06ddf36b2c
78da2c3fc16fb25587576c406b101a7e07e35c6a
/src/upload_command.cc
a2280638358afefec9c79fd1d5681da3ad8e38d5
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
amoe/figshare-uploader
a0ff57710a2c4fce9efa46705b7aed01781e2118
6a2c32c8521891e7f5e37670e7adb37dafbda3da
refs/heads/master
2023-06-23T02:32:02.736670
2023-06-13T07:04:08
2023-06-13T07:04:08
113,032,906
7
1
Apache-2.0
2022-09-23T16:24:49
2017-12-04T11:13:08
C++
UTF-8
C++
false
false
263
cc
upload_command.cc
#include <string> #include <vector> #include <cstddef> #include "upload_command.hh" // Vector allocates all memory on the heap. std::string UploadCommand::getUrl() { return this->url; } std::vector<char> UploadCommand::getData() { return this->data; }
8a809b66d67b141a25d4c6a04c2c78ce75ee2008
91ae7276bca18a05ebeb0506e075e9a331bb5a33
/tcpserver/myserver.h
6522bbe3a1055575866256243c07c106e3ae04df
[]
no_license
love996/qt_discard
81dd7cdab32363f58a25162613e6f0c0401b50c9
603d8f7c62d6aa98291f9196e26514261bf3ae65
refs/heads/master
2022-11-08T19:53:05.241100
2020-06-29T08:05:24
2020-06-29T08:05:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
418
h
myserver.h
#ifndef MYSERVER_H #define MYSERVER_H #include <QTcpServer> #include <QMap> #include <QTcpSocket> // #include <QObject> class MyServer //: public QObject { //Q_OBJECT public: MyServer(QHostAddress address, quint16 port); ~MyServer(); private: QTcpServer _server; QMap<QTcpSocket*, QMetaObject::Connection> _clients; // QSet<QMetaObject::Connection> _client_conn_objs; }; #endif // MYSERVER_H
fe8207e6883ce6ca02c4d6ff56a4ca462bce39ce
f13fc9a720573afdcb84ea9ef684df046a459086
/src/apex/utils.hpp
3bc038cfba0770e71c32f260f120773bf99834f5
[ "LicenseRef-scancode-other-permissive" ]
permissive
jgphpc/xpress-apex
33b8ab1ca70409826ab23505759ba280eb368334
f73a18173bd7f34163b79d3963b057283f2c7aa4
refs/heads/master
2021-01-13T09:18:15.833712
2016-05-13T17:07:30
2016-05-13T17:07:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,211
hpp
utils.hpp
// Copyright (c) 2014 University of Oregon // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #pragma once #include <string> #include <chrono> #include <thread> #include <unistd.h> #include <algorithm> #include <iostream> #include <string> #include <vector> #if defined(__GNUC__) #include <cxxabi.h> #endif namespace apex { bool starts_with(const std::string& input, const std::string& match); std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems); // trim from left inline std::string& ltrim(std::string& s, const char* t = " \t\n\r\f\v") { s.erase(0, s.find_first_not_of(t)); return s; } // trim from right inline std::string& rtrim(std::string& s, const char* t = " \t\n\r\f\v") { s.erase(s.find_last_not_of(t) + 1); return s; } // trim from left & right inline std::string& trim(std::string& s, const char* t = " \t\n\r\f\v") { return ltrim(rtrim(s, t), t); } // copying versions inline std::string ltrim_copy(std::string s, const char* t = " \t\n\r\f\v") { return ltrim(s, t); } inline std::string rtrim_copy(std::string s, const char* t = " \t\n\r\f\v") { return rtrim(s, t); } inline std::string trim_copy(std::string s, const char* t = " \t\n\r\f\v") { return trim(s, t); } class simple_timer { const double nanoseconds = 1.0e9; public: std::chrono::high_resolution_clock::time_point start; simple_timer() : start(std::chrono::high_resolution_clock::now()) {} ~simple_timer() { std::chrono::duration<double> time_span = std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::high_resolution_clock::now() - start); std::cout << "simple time: " << time_span.count() * nanoseconds << "ns" << std::endl; } }; inline unsigned int my_hardware_concurrency() { return sysconf(_SC_NPROCESSORS_ONLN); } inline unsigned int hardware_concurrency() { unsigned int cores = std::thread::hardware_concurrency(); return cores ? cores : my_hardware_concurrency(); } std::string demangle(const std::string& timer_name); };
b2631abdcb927e881eb4d39bdd26b5e21728719d
c08a689127ab0d0c8a09fc1629526d1f92017c78
/[FINAL] Code windows + rapport projet/pyMarmoteMDP/header/Distribution/bernoulliDistribution.h
c2ddc640df40d9854beb13d5b8fad4826e7319f0
[]
no_license
alexandredupontbouillard/projet_androide
2fb120f04f063e259407b24ae8a06a677685b529
bfcbb9da7d506ca85728045c243cbad4b0a07359
refs/heads/master
2020-04-19T19:45:50.449343
2019-05-23T07:24:53
2019-05-23T07:24:53
168,397,270
1
0
null
2019-05-22T00:53:20
2019-01-30T18:56:38
C++
UTF-8
C++
false
false
3,147
h
bernoulliDistribution.h
/* Marmote is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Marmote is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Marmote. If not, see <http://www.gnu.org/licenses/>. Copyright 2015 Alain Jean-Marie, Jean-Michel Fourneau, Jean-Marc Vincent, Issam Rabhi */ #ifndef bernoulliDistribution_H #define bernoulliDistribution_H #include "discreteDistribution.h" /** * @brief The Bernoulli distribution with two values * */ class bernoulliDistribution : public virtual discreteDistribution { public: /** * @brief Unique onstructor for a Bernoulli distribution from the probability * that it is equal to 1. * @author Alain Jean-Marie * @param val the value P( X = 1 ) * @return an object of type bernoulliDistribution */ bernoulliDistribution( double ); // creation from a value private: // private variables specific to the distribution double _proba; /**< proba of the value 1 */ public: // accessors to specific variables /** * @brief Accessor to the parameter of the distribution. Redundant with the * standard accessor proba() but more explicit. * * @return the parameter */ double getParameter() { return _proba; } /** * @brief Accessor to the parameter of the distribution. Redundant with the * accessor getParameter() but conform to the coding standard. * * @return the parameter */ double proba() { return _proba; } public: // probabilistic member functions /** * @copydoc Distribution::mean() */ double mean(); /** * @copydoc Distribution::rate() */ double rate(); /** * @copydoc Distribution::moment(int) */ double moment( int order ); /** * @copydoc Distribution::laplace(double) */ double laplace( double s ); // Laplace transform at real points /** * @copydoc Distribution::dLaplace(double) */ double dLaplace( double s ); // derivative of the Laplace transform /** * @copydoc Distribution::cdf() */ double cdf( double x ); /** * @copydoc Distribution::hasMoment(int) */ bool hasMoment( int order ); /** * @brief Rescaling the distribution. Bernoulli distributions cannot be * rescaled. Ac copy is returned and an error message is issued if the * factor is not 1.0. * * @copydetails Distribution::rescale(double) */ bernoulliDistribution *rescale( double factor ); /** * @copydoc Distribution::copy() */ bernoulliDistribution *copy(); /** * @copydoc Distribution::sample() */ double sample(); public: /** * @copydoc Distribution::toString() */ std::string toString(); /** * @copydoc Distribution::write(FILE*,int) */ void write( FILE *out, int mode ); }; #endif // bernoulliDistribution_H
dd1305487dfe43129f2455e0dc7ec15ef4afcb31
16543458dfab649947f253db343fe57717ab0b86
/af_prepare.cxx
5868a126a7cc748f43ad0372d1738f9cba2b241a
[]
no_license
hnagata/af-performance
e2f9b922ed54a6c7137114207c6378f1930324b9
cd1c4c0a0be997d1066ee2191dad5d063477b483
refs/heads/master
2016-09-07T19:04:23.001269
2015-02-05T10:48:06
2015-02-05T10:48:06
30,145,687
0
0
null
null
null
null
UTF-8
C++
false
false
97
cxx
af_prepare.cxx
#include <arrayfire.h> #include "perform.h" bool prepare() { af::deviceset(0); return true; }
2d33e52c03c3d33c9195f9e51093d446e09b6693
bc683439667bf9daa87fe45faf79dd136a0d3247
/ch0105/ch0105_24.cpp
c23124c8a54bb45dceeb490a6c3ad8c72dec08b4
[ "MIT" ]
permissive
sun1218/openjudge
d5d0f5284f31f5c4799517fd88a3c1137e50df74
07e44235fc6ac68bf8e8125577dcd008b08d59ec
refs/heads/master
2020-03-31T03:05:33.254992
2018-12-31T05:26:50
2018-12-31T05:26:50
151,852,089
0
1
null
null
null
null
UTF-8
C++
false
false
248
cpp
ch0105_24.cpp
#include<iostream> using namespace std; int main(){ int n, a , b, s = 0, max = 0; cin >> n; for(int i = 0; i < n; i ++){ cin >> a >> b; if(a >= 90 && a <= 140 && b >= 60 && b <= 90){ s ++; if(s > max){ max = s; } }else{ s = 0; } } cout << max; }
af45f0edb099555ec9cbcdc4892ed74c02dec15a
28dba754ddf8211d754dd4a6b0704bbedb2bd373
/CodeTemplate/DataStucture/Two-dimensional-BIT.cpp
20ab9366a79b4de914844d9c92b6738503699797
[]
no_license
zjsxzy/algo
599354679bd72ef20c724bb50b42fce65ceab76f
a84494969952f981bfdc38003f7269e5c80a142e
refs/heads/master
2023-08-31T17:00:53.393421
2023-08-19T14:20:31
2023-08-19T14:20:31
10,140,040
0
1
null
null
null
null
UTF-8
C++
false
false
2,416
cpp
Two-dimensional-BIT.cpp
//更新区间查询区间 #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> typedef long long ll; const int N = 1001; int n,q; ll a[N][N],b[N][N],c[N][N],d[N][N]; inline int lowbit(int x) { return x&(-x); } void update(ll arr[N][N],int x,int y,ll v) { int yy; for(int i = x; i <= n; i += lowbit(i)) { for(int j = y ; j <= n; j += lowbit(j)) { arr[i][j] += v; } } } ll query(ll arr[N][N] , int x,int y) { ll ret = 0; for(int i = x; i ; i -= lowbit(i)) { for(int j = y ; j ; j -= lowbit(j)) { ret += arr[i][j]; } } return ret; } void sol() { scanf("%d%d",&n,&q); ll v; for(int i = 0 ,op , x1,y1,x2,y2; i < q; ++i) { scanf("%d%d%d%d%d",&op , &x1,&y1,&x2,&y2); if(op == 1) { scanf("%lld",&v); update(a , x1 , y1,v); update(a , x1 , y2 + 1,-v); update(a , x2 + 1 , y1, -v); update(a , x2 + 1, y2+1 , v); update(b , x1 , y1, v * y1); update(b , x1 , y2 + 1, -v*(y2+1)); update(b , x2 + 1, y1 , -v * y1); update(b , x2 +1 ,y2 + 1, v*(y2 + 1)); update(c , x1 , y1,v * x1); update(c , x1 , y2 + 1,-v * x1); update(c , x2 + 1 , y1, -v * (x2 +1) ); update(c , x2 + 1, y2+1 , v * (x2 + 1) ); update(d , x1 , y1, v * x1*y1); update(d , x1 , y2 + 1, -v*x1*(y2+1)); update(d , x2 + 1, y1 , -v*(x2 + 1) * y1); update(d , x2 +1 ,y2 + 1, v*(x2 + 1)*(y2 + 1)); } else { ll qa = query(a , x2 , y2) * (x2 + 1) * (y2 + 1) + query(a , x1 - 1, y1 - 1) * x1 * y1 - query(a , x1 - 1, y2) * x1 * (y2 + 1)- query(a , x2, y1 - 1) * (x2 + 1) *y1; ll qb = query(b ,x2 , y2) * (x2 + 1) + query(b , x1-1,y1-1) * x1 -query(b , x1 - 1, y2) * x1 - query(b ,x2 , y1 - 1) * (x2 + 1); ll qc = query(c, x2,y2) * (y2 + 1) + query(c , x1 - 1,y1 - 1) * y1 - query(c , x1 - 1, y2) * (y2 + 1) - query(c , x2 ,y1 -1) * y1; ll qd = query(d , x2 ,y2) + query(d , x1 - 1 ,y1 - 1) -query(d , x1 - 1 , y2) - query(d ,x2 ,y1-1); printf("%lld\n",qa - qb - qc + qd); } } } int main() { freopen("input.txt","r",stdin); sol(); return 0; }
d1f861cb4ce49a556278ad6ae146263d24ffa603
00593968dc871bdee2132ef612e387134992a363
/EventKeyboard.cpp
f54c74eedceca0f0949733290889c6be36c56d63
[]
no_license
Mistymush/The_Rock_Lives
7b5e0baa90a9b5536fd5e863c467532b7a9c000c
19d6377d21f253f1988de1089bf9adfa5adf6e37
refs/heads/master
2021-01-10T16:26:50.772278
2015-10-14T02:58:10
2015-10-14T02:58:10
43,724,039
1
0
null
2015-10-06T03:40:46
2015-10-06T01:32:19
HTML
UTF-8
C++
false
false
810
cpp
EventKeyboard.cpp
/* File which defines the eventKeyboard methods */ #include "EventKeyboard.h" using namespace df; //public constructor EventKeyboard::EventKeyboard(){ //our defined set of keys key_val = Keyboard::UNDEFINED_KEY; //catagory of keyboard event keyboard_action = UNDEFINED_KEYBOARD_ACTION; Event::setType(df::_KEYBOARD_EVENT); } //getters and setters void EventKeyboard::setKey(df::Keyboard::Key new_key){ key_val = new_key; } //Get key from event Keyboard::Key EventKeyboard::getKey() const{ return key_val; } //Get keyboard event action. To be used by the InputManager only! void EventKeyboard::setKeyboardAction(EventKeyboardAction new_action){ keyboard_action = new_action; } //Get keybaord event action EventKeyboardAction EventKeyboard::getKeyboardAction() const{ return keyboard_action; }
9929cfee722ef2c9c6f4dba33bba950231554560
9d942d8776ddba6c0d227ddb3dbce1167d81ea66
/native/src/common.cpp
13e971b376667d463ff2d52e99e86db3831de9fb
[]
no_license
magasol/OsmAnd-core-legacy
e56ab2fcaae36c8b879c6a5830ef09226a6774ea
551a4e10d193fe281e0c74f76fec5c388245f268
refs/heads/master
2023-04-03T19:01:12.811754
2021-04-01T11:46:09
2021-04-01T11:46:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
8,554
cpp
common.cpp
#include "CommonCollections.h" #include "Logging.h" #include "commonOsmAndCore.h" #if defined(_WIN32) //# include <windows.h> //# include <mmsystem.h> #define isnan _isnan #define isinf !_finite #elif defined(__APPLE__) #include <mach/mach_time.h> #else #include <time.h> #endif void deleteObjects(std::vector<FoundMapDataObject>& v) { for (size_t i = 0; i < v.size(); i++) { delete v[i].obj; } v.clear(); } double getPowZoom(float zoom) { if (zoom >= 0 && zoom - floor(zoom) < 0.05f) { return 1 << ((int)zoom); } else { return pow(2, zoom); } } static double getTileDistanceWidth(double zoom) { return getDistance(30, getLongitudeFromTile(zoom, 0), 30, getLongitudeFromTile(zoom, 1)); } double measuredDist31(int x1, int y1, int x2, int y2) { return getDistance(get31LatitudeY(y1), get31LongitudeX(x1), get31LatitudeY(y2), get31LongitudeX(x2)); } double dabs(double d) { if (d < 0) { return -d; } else { return d; } } const uint precisionPower = 10; const uint precisionDiv = 1 << (31 - precisionPower); double coefficientsY[1 << precisionPower]; bool initializeYArray = false; double convert31YToMeters(int y1, int y2, int x) { if (!initializeYArray) { coefficientsY[0] = 0; for (uint i = 0; i < (1 << precisionPower) - 1; i++) { coefficientsY[i + 1] = coefficientsY[i] + measuredDist31(0, i << (31 - precisionPower), 0, ((i + 1) << (31 - precisionPower))); } initializeYArray = true; } uint div1 = y1 / precisionDiv; uint mod1 = y1 % precisionDiv; uint div2 = y2 / precisionDiv; uint mod2 = y2 % precisionDiv; double h1 = coefficientsY[div1] + mod1 / ((double)precisionDiv) * (coefficientsY[div1 + 1] - coefficientsY[div1]); double h2 = coefficientsY[div2] + mod2 / ((double)precisionDiv) * (coefficientsY[div2 + 1] - coefficientsY[div2]); double res = h1 - h2; // OsmAnd::LogPrintf(OsmAnd::LogSeverityLevel::Debug, "ind %f != %f", res, measuredDist31(x, y1, x, y2)); return res; } double coefficientsX[1 << precisionPower]; bool initializeXArray = false; double convert31XToMeters(int x1, int x2, int y) { if (!initializeXArray) { for (uint i = 0; i < (1 << precisionPower); i++) { coefficientsX[i] = 0; } initializeXArray = true; } int ind = y / precisionDiv; if (coefficientsX[ind] == 0) { double md = measuredDist31(x1, y, x2, y); if (md < 10 || x1 == x2) { return md; } coefficientsX[ind] = md / dabs((double)x1 - (double)x2); } // translate into meters return ((double)x1 - x2) * coefficientsX[ind]; } std::pair<int, int> getProjectionPoint(int px, int py, int xA, int yA, int xB, int yB) { double mDist = squareRootDist31(xA, yA, xB, yB); int prx = xA; int pry = yA; double projection = calculateProjection31TileMetric(xA, yA, xB, yB, px, py); if (projection < 0) { prx = xA; pry = yA; } else if (projection >= mDist * mDist) { prx = xB; pry = yB; } else { double c = projection / (mDist * mDist); prx = (int)((double)xA + ((double)xB - xA) * c); pry = (int)((double)yA + ((double)yB - yA) * c); } return std::pair<int, int>(prx, pry); } double calculateProjection31TileMetric(int xA, int yA, int xB, int yB, int xC, int yC) { // Scalar multiplication between (AB, AC) double multiple = convert31XToMeters(xB, xA, yA) * convert31XToMeters(xC, xA, yA) + convert31YToMeters(yB, yA, xA) * convert31YToMeters(yC, yA, xA); return multiple; } double squareDist31TileMetric(int x1, int y1, int x2, int y2) { // translate into meters double dy = convert31YToMeters(y1, y2, x1); double dx = convert31XToMeters(x1, x2, y1); return dx * dx + dy * dy; } double squareRootDist31(int x1, int y1, int x2, int y2) { // translate into meters double dy = convert31YToMeters(y1, y2, x1); double dx = convert31XToMeters(x1, x2, y1); return sqrt(dx * dx + dy * dy); } double degreesDiff(const double a1, const double a2) { auto diff = a1 - a2; while (diff > 180.0) diff -= 360.0; while (diff <= -180.0) diff += 360.0; return diff; } double checkLongitude(double longitude) { while (longitude < -180 || longitude > 180) { if (longitude < 0) { longitude += 360; } else { longitude -= 360; } } return longitude; } double checkLatitude(double latitude) { while (latitude < -90 || latitude > 90) { if (latitude < 0) { latitude += 180; } else { latitude -= 180; } } if (latitude < -85.0511) { return -85.0511; } else if (latitude > 85.0511) { return 85.0511; } return latitude; } int get31TileNumberX(double longitude) { longitude = checkLongitude(longitude); int64_t l = 1; l <<= 31; return (int)((longitude + 180) / 360 * l); } int get31TileNumberY(double latitude) { latitude = checkLatitude(latitude); double eval = log(tan(toRadians(latitude)) + 1 / cos(toRadians(latitude))); int64_t l = 1; l <<= 31; if (eval > M_PI) { eval = M_PI; } return (int)((1 - eval / M_PI) / 2 * l); } double getLongitudeFromTile(float zoom, double x) { return x / getPowZoom(zoom) * 360.0 - 180.0; } double getLatitudeFromTile(float zoom, double y) { int sign = y < 0 ? -1 : 1; double result = atan(sign * sinh(M_PI * (1 - 2 * y / getPowZoom(zoom)))) * 180. / M_PI; return result; } double get31LongitudeX(int tileX) { return getLongitudeFromTile(21, tileX / 1024.); } double get31LatitudeY(int tileY) { return getLatitudeFromTile(21, tileY / 1024.); } double getTileNumberX(float zoom, double longitude) { if (longitude == 180.) { return getPowZoom(zoom) - 1; } longitude = checkLongitude(longitude); return (longitude + 180.) / 360. * getPowZoom(zoom); } double getTileNumberY(float zoom, double latitude) { latitude = checkLatitude(latitude); double eval = log(tan(toRadians(latitude)) + 1 / cos(toRadians(latitude))); if (isinf(eval) || isnan(eval)) { latitude = latitude < 0 ? -89.9 : 89.9; eval = log(tan(toRadians(latitude)) + 1 / cos(toRadians(latitude))); } double result = (1 - eval / M_PI) / 2 * getPowZoom(zoom); return result; } double getDistance(double lat1, double lon1, double lat2, double lon2) { double R = 6371; // km double dLat = toRadians(lat2 - lat1); double dLon = toRadians(lon2 - lon1); double a = sin(dLat / 2) * sin(dLat / 2) + cos(toRadians(lat1)) * cos(toRadians(lat2)) * sin(dLon / 2) * sin(dLon / 2); double c = 2 * atan2(sqrt(a), sqrt(1 - a)); return R * c * 1000; } double strtod_li(string s) { std::istringstream text( s ); text.imbue(std::locale::classic()); double result; text >> result; return result; } int findFirstNumberEndIndex(string value) { uint i = 0; bool valid = false; if (value.length() > 0 && value[0] == '-') { i++; } while (i < value.length() && ((value[i] >= '0' && value[i] <= '9') || value[i] == '.')) { i++; valid = true; } if (valid) { return i; } else { return -1; } } double parseSpeed(string v, double def) { if (v == "none") { return 40; // RouteDataObject::NONE_MAX_SPEED; } else { int i = findFirstNumberEndIndex(v); if (i > 0) { double f = strtod_li(v.substr(0, i)); f /= 3.6; // km/h -> m/s if (v.find("mph") != string::npos) { f *= 1.6; } return f; } } return def; } double alignAngleDifference(double diff) { while (diff > M_PI) { diff -= 2 * M_PI; } while (diff <= -M_PI) { diff += 2 * M_PI; } return diff; } std::string to_lowercase(const std::string& in) { std::string out(in); for (uint i = 0; i < in.length(); i++) { out[i] = std::tolower(in[i]); } return out; } std::vector<std::string> split_string(const std::string& str, const std::string& delimiters) { std::vector<std::string> tokens; std::string::size_type pos, lastPos = 0, length = str.length(); while (lastPos < length + 1) { pos = str.find(delimiters, lastPos); if (pos == std::string::npos) pos = length; if (pos != lastPos) tokens.push_back(str.substr(lastPos, pos - lastPos)); else tokens.push_back(""); lastPos = pos + delimiters.length(); } return tokens; } bool endsWith(const std::string& str, const std::string& suffix) { return str.size() >= suffix.size() && !str.compare(str.size() - suffix.size(), suffix.size(), suffix); } bool startsWith(const std::string& str, const std::string& prefix) { return str.size() >= prefix.size() && !str.compare(0, prefix.size(), prefix); } std::string rtrim(const std::string& in, const char* t) { string s(in); s.erase(s.find_last_not_of(t) + 1); return s; } std::string ltrim(const std::string& in, const char* t) { string s(in); s.erase(0, s.find_first_not_of(t)); return s; } std::string trim(const std::string& in, const char* t) { return ltrim(rtrim(in, t), t); }
6815b3dec4ee13c34ea58a9c8142f2341ffee883
c3591569e50db8d754cd719201bc0a314ec6a6b1
/src/ModelTreeStructure.h
201c7150a8792370922a5aef25d52d5e18e6d464
[]
no_license
yilunsun/IndividualDosing
fa340f73737ff04bf7091e16d089e4322b9acbe1
836e0aa86fb3ce584301a104fbf08d4486d8a53b
refs/heads/master
2022-09-18T11:16:14.714497
2020-06-03T16:48:14
2020-06-03T16:48:14
266,648,882
0
0
null
null
null
null
UTF-8
C++
false
false
753
h
ModelTreeStructure.h
#ifndef MODELTREESTRUCTURE_H #define MODELTREESTRUCTURE_H #ifndef _DIAGRAMS_MODELTREESTRUCTURE_H #define _DIAGRAMS_MODELTREESTRUCTURE_H #include "Model.h" class ModelTreeStructure : public Model { public: ModelTreeStructure(void); virtual ~ModelTreeStructure(void); virtual double Potential(const NodeTree &tree,Random &ran) const = 0; virtual double PotentialDifference(const NodeTree &oldTree, const Delta &newTree,Random &ran) const = 0; virtual NodeTree *Simulate(Random &ran, Observation *obs) const = 0; virtual Model *Copy(void) const = 0; private: }; inline ModelTreeStructure::ModelTreeStructure(void) : Model() { return; }; inline ModelTreeStructure::~ModelTreeStructure(void) { return; }; #endif #endif
b4d7d308ee4ba32de5ae4d56ed2b94b40643becc
19ed4c1bb2c4386eb98201e1b50ffc91549174dc
/Source/Core/GHI/GHIMemory.cpp
5cb2f9ee60db0073de62363703b618a570efed98
[]
no_license
mRooky/Rooky
81742fffd72700b3423802702ffc9e5658151f75
401bd515e42873b268395c1bc96fbb4982c83875
refs/heads/master
2020-04-19T11:43:43.985899
2019-08-27T06:27:46
2019-08-27T06:27:46
168,174,259
0
0
null
null
null
null
UTF-8
C++
false
false
233
cpp
GHIMemory.cpp
/* * RenderMemory.cpp * * Created on: Feb 26, 2019 * Author: rookyma */ #include "GHIMemory.h" namespace GHI { Memory::Memory(Device* device): Resource(device) { } Memory::~Memory(void) { } } /* namespace Render */
b2248fc392e96ed73083e11c888f22d50f30c2c0
605aef3c742fe6cb41795b38c73bdd1c99f5bfe3
/programmers/level1/두개뽑아서더하기/solution2.cpp
4ac5cdd98189e8b4ca801e64bab16dd2b309bff4
[]
no_license
janehub/Algorithm
c1c73537af68ead083fb043468104a5be66d3ee7
0781b902ec09ebe41b1b39e6d5d5cb0d4550f1c9
refs/heads/main
2023-04-09T17:00:06.362559
2021-04-20T13:23:22
2021-04-20T13:23:22
320,283,452
0
0
null
null
null
null
UTF-8
C++
false
false
614
cpp
solution2.cpp
/* *****set : 노드 기반 컨테이너, 균형이진트리 key(원소)집합 중복허용하지않음 삽입시 원소 자동정렬 (default : 오름차순) */ #include <string> #include <vector> #include <algorithm> #include <set> using namespace std; vector<int> solution(vector<int> numbers) { vector<int> answer; int sum=0; set<int> memo; for(int i=0;i<numbers.size()-1;i++){ for(int j=i+1;j<numbers.size();j++){ sum = numbers[i]+numbers[j]; memo.insert(sum); } } answer.assign(memo.begin(),memo.end()); return answer; }
504acb6b1deedb29f4c074d4c406f19b6e23c5aa
faacd0003e0c749daea18398b064e16363ea8340
/3rdparty/phonon/mediaobject.cpp
cc47a00e32aeeab342eb41293f94e1cd95fde860
[]
no_license
yjfcool/lyxcar
355f7a4df7e4f19fea733d2cd4fee968ffdf65af
750be6c984de694d7c60b5a515c4eb02c3e8c723
refs/heads/master
2016-09-10T10:18:56.638922
2009-09-29T06:03:19
2009-09-29T06:03:19
42,575,701
0
0
null
null
null
null
UTF-8
C++
false
false
17,775
cpp
mediaobject.cpp
/* This file is part of the KDE project Copyright (C) 2005-2007 Matthias Kretz <kretz@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), Trolltech ASA (or its successors, if any) and the KDE Free Qt Foundation, which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #include "mediaobject.h" #include "mediaobject_p.h" #include "factory_p.h" #include "mediaobjectinterface.h" #include "audiooutput.h" #include "phonondefs_p.h" #include "abstractmediastream.h" #include "abstractmediastream_p.h" #include "frontendinterface_p.h" #include <QtCore/QStringList> #include <QtCore/QUrl> #include <QtCore/QTimer> #include "phononnamespace_p.h" #include "platform_p.h" #define PHONON_CLASSNAME MediaObject #define PHONON_INTERFACENAME MediaObjectInterface QT_BEGIN_NAMESPACE namespace Phonon { PHONON_OBJECT_IMPL MediaObject::~MediaObject() { K_D(MediaObject); if (d->m_backendObject) { switch (state()) { case PlayingState: case BufferingState: case PausedState: stop(); break; case ErrorState: case StoppedState: case LoadingState: break; } } } Phonon::State MediaObject::state() const { K_D(const MediaObject); #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM if (d->errorOverride) { return d->state; } if (d->ignoreLoadingToBufferingStateChange) { return BufferingState; } if (d->ignoreErrorToLoadingStateChange) { return LoadingState; } #endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM if (!d->m_backendObject) { return d->state; } return INTERFACE_CALL(state()); } PHONON_INTERFACE_SETTER(setTickInterval, tickInterval, qint32) PHONON_INTERFACE_GETTER(qint32, tickInterval, d->tickInterval) PHONON_INTERFACE_GETTER(bool, hasVideo, false) PHONON_INTERFACE_GETTER(bool, isSeekable, false) PHONON_INTERFACE_GETTER(qint64, currentTime, d->currentTime) static inline bool isPlayable(const MediaSource::Type t) { return t != MediaSource::Invalid && t != MediaSource::Empty; } void MediaObject::play() { K_D(MediaObject); if (d->backendObject() && isPlayable(d->mediaSource.type())) { INTERFACE_CALL(play()); } } void MediaObject::pause() { K_D(MediaObject); if (d->backendObject() && isPlayable(d->mediaSource.type())) { INTERFACE_CALL(pause()); } } void MediaObject::stop() { K_D(MediaObject); if (d->backendObject() && isPlayable(d->mediaSource.type())) { INTERFACE_CALL(stop()); } } void MediaObject::seek(qint64 time) { K_D(MediaObject); if (d->backendObject() && isPlayable(d->mediaSource.type())) { INTERFACE_CALL(seek(time)); } } QString MediaObject::errorString() const { if (state() == Phonon::ErrorState) { K_D(const MediaObject); #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM if (d->errorOverride) { return d->errorString; } #endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM return INTERFACE_CALL(errorString()); } return QString(); } ErrorType MediaObject::errorType() const { if (state() == Phonon::ErrorState) { K_D(const MediaObject); #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM if (d->errorOverride) { return d->errorType; } #endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM return INTERFACE_CALL(errorType()); } return Phonon::NoError; } QStringList MediaObject::metaData(Phonon::MetaData f) const { switch (f) { case ArtistMetaData: return metaData(QLatin1String("ARTIST" )); case AlbumMetaData: return metaData(QLatin1String("ALBUM" )); case TitleMetaData: return metaData(QLatin1String("TITLE" )); case DateMetaData: return metaData(QLatin1String("DATE" )); case GenreMetaData: return metaData(QLatin1String("GENRE" )); case TracknumberMetaData: return metaData(QLatin1String("TRACKNUMBER")); case DescriptionMetaData: return metaData(QLatin1String("DESCRIPTION")); case MusicBrainzDiscIdMetaData: return metaData(QLatin1String("MUSICBRAINZ_DISCID")); } return QStringList(); } QStringList MediaObject::metaData(const QString &key) const { K_D(const MediaObject); return d->metaData.values(key); } QMultiMap<QString, QString> MediaObject::metaData() const { K_D(const MediaObject); return d->metaData; } PHONON_INTERFACE_GETTER(qint32, prefinishMark, d->prefinishMark) PHONON_INTERFACE_SETTER(setPrefinishMark, prefinishMark, qint32) PHONON_INTERFACE_GETTER(qint32, transitionTime, d->transitionTime) PHONON_INTERFACE_SETTER(setTransitionTime, transitionTime, qint32) qint64 MediaObject::totalTime() const { K_D(const MediaObject); if (!d->m_backendObject) { return -1; } return INTERFACE_CALL(totalTime()); } qint64 MediaObject::remainingTime() const { K_D(const MediaObject); if (!d->m_backendObject) { return -1; } qint64 ret = INTERFACE_CALL(remainingTime()); if (ret < 0) { return -1; } return ret; } MediaSource MediaObject::currentSource() const { K_D(const MediaObject); return d->mediaSource; } void MediaObject::setCurrentSource(const MediaSource &newSource) { K_D(MediaObject); if (!k_ptr->backendObject()) { d->mediaSource = newSource; return; } pDebug() << Q_FUNC_INFO << newSource.url(); stop(); // first call stop as that often is the expected state // for setting a new URL d->mediaSource = newSource; #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM d->kiofallback = 0; // kiofallback auto-deletes #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM //X if (url.scheme() == "http") { //X d->kiofallback = Platform::createMediaStream(url, this); //X if (d->kiofallback) { //X ... //X return; //X } //X } #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM if (d->mediaSource.type() == MediaSource::Stream) { Q_ASSERT(d->mediaSource.stream()); d->mediaSource.stream()->d_func()->setMediaObjectPrivate(d); } #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM INTERFACE_CALL(setSource(d->mediaSource)); } void MediaObject::clear() { K_D(MediaObject); d->sourceQueue.clear(); setCurrentSource(MediaSource()); } QList<MediaSource> MediaObject::queue() const { K_D(const MediaObject); return d->sourceQueue; } void MediaObject::setQueue(const QList<MediaSource> &sources) { K_D(MediaObject); d->sourceQueue.clear(); enqueue(sources); } void MediaObject::setQueue(const QList<QUrl> &urls) { K_D(MediaObject); d->sourceQueue.clear(); enqueue(urls); } void MediaObject::enqueue(const MediaSource &source) { K_D(MediaObject); if (!isPlayable(d->mediaSource.type())) { // the current source is nothing valid so this source needs to become the current one setCurrentSource(source); } else { d->sourceQueue << source; } } void MediaObject::enqueue(const QList<MediaSource> &sources) { foreach (const MediaSource &m, sources) { enqueue(m); } } void MediaObject::enqueue(const QList<QUrl> &urls) { foreach (const QUrl &url, urls) { enqueue(url); } } void MediaObject::clearQueue() { K_D(MediaObject); d->sourceQueue.clear(); } bool MediaObjectPrivate::aboutToDeleteBackendObject() { //pDebug() << Q_FUNC_INFO; prefinishMark = pINTERFACE_CALL(prefinishMark()); transitionTime = pINTERFACE_CALL(transitionTime()); //pDebug() << Q_FUNC_INFO; if (m_backendObject) { state = pINTERFACE_CALL(state()); currentTime = pINTERFACE_CALL(currentTime()); tickInterval = pINTERFACE_CALL(tickInterval()); } return true; } #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM void MediaObjectPrivate::streamError(Phonon::ErrorType type, const QString &text) { Q_Q(MediaObject); State lastState = q->state(); errorOverride = true; errorType = type; errorString = text; state = ErrorState; QMetaObject::invokeMethod(q, "stateChanged", Qt::QueuedConnection, Q_ARG(Phonon::State, Phonon::ErrorState), Q_ARG(Phonon::State, lastState)); //emit q->stateChanged(ErrorState, lastState); } void MediaObjectPrivate::_k_stateChanged(Phonon::State newstate, Phonon::State oldstate) { Q_Q(MediaObject); if (mediaSource.type() != MediaSource::Url) { // special handling only necessary for URLs because of the fallback emit q->stateChanged(newstate, oldstate); return; } if (errorOverride) { errorOverride = false; if (newstate == ErrorState) { return; } oldstate = ErrorState; } // backend MediaObject reached ErrorState, try a KioMediaSource if (newstate == Phonon::ErrorState && !kiofallback) { kiofallback = Platform::createMediaStream(mediaSource.url(), q); if (!kiofallback) { pDebug() << "backend MediaObject reached ErrorState, no KIO fallback available"; emit q->stateChanged(newstate, oldstate); return; } pDebug() << "backend MediaObject reached ErrorState, trying Platform::createMediaStream now"; ignoreLoadingToBufferingStateChange = false; ignoreErrorToLoadingStateChange = false; switch (oldstate) { case Phonon::BufferingState: // play() has already been called, we need to make sure it is called // on the backend with the KioMediaStream MediaSource now, too ignoreLoadingToBufferingStateChange = true; break; case Phonon::LoadingState: ignoreErrorToLoadingStateChange = true; // no extras break; default: pError() << "backend MediaObject reached ErrorState after " << oldstate << ". It seems a KioMediaStream will not help here, trying anyway."; emit q->stateChanged(Phonon::LoadingState, oldstate); break; } kiofallback->d_func()->setMediaObjectPrivate(this); MediaSource mediaSource(kiofallback); mediaSource.setAutoDelete(true); pINTERFACE_CALL(setSource(mediaSource)); if (oldstate == Phonon::BufferingState) { q->play(); } return; } else if (ignoreLoadingToBufferingStateChange && kiofallback && oldstate == Phonon::LoadingState) { if (newstate != Phonon::BufferingState) { emit q->stateChanged(newstate, Phonon::BufferingState); } return; } else if (ignoreErrorToLoadingStateChange && kiofallback && oldstate == ErrorState) { if (newstate != LoadingState) { emit q->stateChanged(newstate, Phonon::LoadingState); } return; } emit q->stateChanged(newstate, oldstate); } #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM void MediaObjectPrivate::_k_aboutToFinish() { Q_Q(MediaObject); pDebug() << Q_FUNC_INFO; #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM kiofallback = 0; // kiofallback auto-deletes #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM if (sourceQueue.isEmpty()) { emit q->aboutToFinish(); if (sourceQueue.isEmpty()) { return; } } mediaSource = sourceQueue.head(); pINTERFACE_CALL(setNextSource(mediaSource)); } void MediaObjectPrivate::_k_currentSourceChanged(const MediaSource &source) { Q_Q(MediaObject); pDebug() << Q_FUNC_INFO; if (!sourceQueue.isEmpty() && sourceQueue.head() == source) sourceQueue.dequeue(); emit q->currentSourceChanged(source); } void MediaObjectPrivate::setupBackendObject() { Q_Q(MediaObject); Q_ASSERT(m_backendObject); //pDebug() << Q_FUNC_INFO; #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), q, SLOT(_k_stateChanged(Phonon::State, Phonon::State))); #else QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), q, SIGNAL(stateChanged(Phonon::State, Phonon::State))); #endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM QObject::connect(m_backendObject, SIGNAL(tick(qint64)), q, SIGNAL(tick(qint64))); QObject::connect(m_backendObject, SIGNAL(seekableChanged(bool)), q, SIGNAL(seekableChanged(bool))); #ifndef QT_NO_PHONON_VIDEO QObject::connect(m_backendObject, SIGNAL(hasVideoChanged(bool)), q, SIGNAL(hasVideoChanged(bool))); #endif //QT_NO_PHONON_VIDEO QObject::connect(m_backendObject, SIGNAL(bufferStatus(int)), q, SIGNAL(bufferStatus(int))); QObject::connect(m_backendObject, SIGNAL(finished()), q, SIGNAL(finished())); QObject::connect(m_backendObject, SIGNAL(aboutToFinish()), q, SLOT(_k_aboutToFinish())); QObject::connect(m_backendObject, SIGNAL(prefinishMarkReached(qint32)), q, SIGNAL(prefinishMarkReached(qint32))); QObject::connect(m_backendObject, SIGNAL(totalTimeChanged(qint64)), q, SIGNAL(totalTimeChanged(qint64))); QObject::connect(m_backendObject, SIGNAL(metaDataChanged(const QMultiMap<QString, QString> &)), q, SLOT(_k_metaDataChanged(const QMultiMap<QString, QString> &))); QObject::connect(m_backendObject, SIGNAL(currentSourceChanged(const MediaSource&)), q, SLOT(_k_currentSourceChanged(const MediaSource&))); // set up attributes pINTERFACE_CALL(setTickInterval(tickInterval)); pINTERFACE_CALL(setPrefinishMark(prefinishMark)); pINTERFACE_CALL(setTransitionTime(transitionTime)); switch(state) { case LoadingState: case StoppedState: case ErrorState: break; case PlayingState: case BufferingState: QTimer::singleShot(0, q, SLOT(_k_resumePlay())); break; case PausedState: QTimer::singleShot(0, q, SLOT(_k_resumePause())); break; } const State backendState = pINTERFACE_CALL(state()); if (state != backendState && state != ErrorState) { // careful: if state is ErrorState we might be switching from a // MediaObject to a ByteStream for KIO fallback. In that case the state // change to ErrorState was already suppressed. pDebug() << "emitting a state change because the backend object has been replaced"; emit q->stateChanged(backendState, state); state = backendState; } #ifndef QT_NO_PHONON_MEDIACONTROLLER foreach (FrontendInterfacePrivate *f, interfaceList) { f->_backendObjectChanged(); } #endif //QT_NO_PHONON_MEDIACONTROLLER // set up attributes if (isPlayable(mediaSource.type())) { #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM if (mediaSource.type() == MediaSource::Stream) { Q_ASSERT(mediaSource.stream()); mediaSource.stream()->d_func()->setMediaObjectPrivate(this); } #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM pINTERFACE_CALL(setSource(mediaSource)); } } void MediaObjectPrivate::_k_resumePlay() { qobject_cast<MediaObjectInterface *>(m_backendObject)->play(); if (currentTime > 0) { qobject_cast<MediaObjectInterface *>(m_backendObject)->seek(currentTime); } } void MediaObjectPrivate::_k_resumePause() { pINTERFACE_CALL(pause()); if (currentTime > 0) { qobject_cast<MediaObjectInterface *>(m_backendObject)->seek(currentTime); } } void MediaObjectPrivate::_k_metaDataChanged(const QMultiMap<QString, QString> &newMetaData) { metaData = newMetaData; emit q_func()->metaDataChanged(); } void MediaObjectPrivate::phononObjectDestroyed(MediaNodePrivate *bp) { // this method is called from Phonon::Base::~Base(), meaning the AudioPath // dtor has already been called, also virtual functions don't work anymore // (therefore qobject_cast can only downcast from Base) Q_ASSERT(bp); Q_UNUSED(bp); } MediaObject *createPlayer(Phonon::Category category, const MediaSource &source) { MediaObject *mo = new MediaObject; AudioOutput *ao = new AudioOutput(category, mo); createPath(mo, ao); if (isPlayable(source.type())) { mo->setCurrentSource(source); } return mo; } } //namespace Phonon QT_END_NAMESPACE #include "moc_mediaobject.cpp" #undef PHONON_CLASSNAME #undef PHONON_INTERFACENAME // vim: sw=4 tw=100 et
2bb7d23f35fe556f845a34adb51394496ff44616
95003b1ef6dc0dd5d86bf6304a285d1092bf8eb5
/project1_heising/DNAanalyzer.cpp
45112a180ca2801640627654e6ed49dc6d7641b7
[]
no_license
erhe1689/CSCI1300
4e659f86321d458fa4e8a5f653978952d7ee6f48
b432a86112372007984a83008a7d880a2dd9722e
refs/heads/master
2023-01-04T21:35:31.447080
2020-11-03T04:56:16
2020-11-03T04:56:16
290,676,511
0
0
null
null
null
null
UTF-8
C++
false
false
4,535
cpp
DNAanalyzer.cpp
//CSCI1300 Fall 2020 //Author: Eric Heising //Recitation: 507-Chakraborty //Project 1 - Problem 7 #include <iostream> #include <string> #include <cmath> using namespace std; double calcSimScore(string sequence1, string sequence2){ double similarityScore; int hammingDistance = 0; if(sequence1.length() != sequence2.length()|| sequence1 == "" || sequence2 == ""){ similarityScore = 0.0; } else{ for(int i = 0; i < sequence1.length(); i++){ if(sequence1[i] != sequence2[i]){ hammingDistance++; } } similarityScore = (sequence1.length() - hammingDistance) / (double)sequence1.length(); } return similarityScore; } double findBestSimScore(string genome, string subSequence){ double highestSimScore = 0.0; double storedCalcSimScore = 0.0; if(genome.length() < subSequence.length() || genome == "" || subSequence == ""){ return 0; } else { for(int i = 0; i <= (genome.length() - subSequence.length()); i++){ storedCalcSimScore = calcSimScore(genome.substr(i,subSequence.length()), subSequence); highestSimScore = fmax(highestSimScore,storedCalcSimScore); } return highestSimScore; } } void findMatchedGenome(string genome1, string genome2, string genome3, string subSequence){ if(genome1 == ""|| genome2 == ""||genome3 == ""|| subSequence ==""){ cout << "Genomes or sequence is empty." << endl; } else if(genome1.length() != genome2.length() || genome1.length() != genome3.length()){ cout << "Lengths of genomes are different." << endl; } else{ double score1 = findBestSimScore(genome1,subSequence); double score2 = findBestSimScore(genome2,subSequence); double score3 = findBestSimScore(genome3,subSequence); if(score1 >= score2 && score1 >= score3){ cout <<"Genome 1 is the best match."<< endl; } if(score2 >= score3 && score2 >= score1){ cout <<"Genome 2 is the best match."<< endl; } if(score3 >= score2 && score3 >= score1){ cout <<"Genome 3 is the best match."<< endl; } } } int main(){ int menuChoice; do{ //menu that will be displayed to user. In do while loop so it iterates the first time no matter what cout << "Select a numerical option: " << endl; cout << "=== menu ===" << endl; cout << "1. Find similarity score" << endl; cout << "2. Find the best similarity score" << endl; cout << "3. Analyze the genome sequences" << endl; cout << "4. Quit"<< endl; cin >> menuChoice; switch(menuChoice){//switch statement accepting user mode chouice case 1:{// Find similarity score string sequence1; string sequence2; cout << "Enter sequence 1: " << endl; cin >> sequence1; cout << "Enter sequence 2: " << endl; cin >> sequence2; cout << "Similarity score: " << calcSimScore(sequence1,sequence2) << endl; break; } case 2:{// Find the best similarity score string genome; string subSequence; cout << "Enter genome:" << endl; cin >> genome; cout << "Enter sequence:" << endl; cin >> subSequence; cout << "Best similarity score: " << findBestSimScore(genome, subSequence) << endl; break; } case 3:{//Analyze the genome sequences string genome1; string genome2; string genome3; string subSequence; cout << "Enter genome 1:" << endl; cin >> genome1; cout << "Enter genome 2:" << endl; cin >> genome2; cout << "Enter genome 3:" << endl; cin >> genome3; cout << "Enter sequence:" << endl; cin >> subSequence; findMatchedGenome(genome1,genome2, genome3,subSequence); break; } case 4: {//Quit cout << "Good bye!"<< endl; break; } default: {//default error case cout << "Invalid option." << endl; break; } } } while(menuChoice != 4); }
260dab049671a0158e1a0c750f53e8c056d1aa23
c504f1c7b8cec66eb784afc3be048a5316dd2c14
/SourceCode/Windows/System/SystemTime.cpp
9c40b8e72d38d902397c19b1bbf5f2b867142be5
[]
no_license
ButlerZhang/Qing
9479235d660e3cb7cd6213f739234458c5bd6e0f
95e5549f5f8f83290ed76bf3981c90c1a679c12d
refs/heads/master
2023-06-22T20:48:58.039627
2022-11-23T15:01:04
2022-11-23T15:01:04
115,318,601
0
1
null
2023-06-14T22:43:38
2017-12-25T07:52:14
C++
GB18030
C++
false
false
2,779
cpp
SystemTime.cpp
#include "SystemTime.h" unsigned long TestTimeGetTime() { return timeGetTime(); } __int64 TimeGetTime() { //MSDN: //Note that the value returned by the timeGetTime function is a DWORD value. //The return value wraps around to 0 every 2 ^ 32 milliseconds, which is //about 49.71 days.This can cause problems in code that directly uses the //timeGetTime return value in computations, particularly where the value //is used to control code execution.You should always use the difference //between two timeGetTime return values in computations. static int WrapCount = 0; static unsigned long LastTimeStamp = 0; //lock const unsigned long CurrentTime = timeGetTime(); if (CurrentTime < LastTimeStamp) { WrapCount += 1; } LastTimeStamp = CurrentTime; const __int64 FinalTimeStamp = (__int64(WrapCount) << 32) | CurrentTime; //unlock return FinalTimeStamp; } void GetTickCount64_Example() { ULONGLONG StartTime = GetTickCount64(); //TODO ULONGLONG StopTime = GetTickCount64(); //通过GetTickCount64计算流逝时间需要一个前提: //即执行的代码不会被中断 ULONGLONG ElapsedTime = StopTime - StartTime; } void ReadTimeStampCounter_Example() { //跟GetTickCount64_Example存在问题,但是 //ReadTimeStampCounter比GetTickCount64更精确 ULONGLONG StartTime = ReadTimeStampCounter(); //TODO ULONGLONG StopTime = ReadTimeStampCounter(); ULONGLONG ElapsedTime = StopTime - StartTime; } __int64 FileTimeToQuadWord(PFILETIME pft) { return (Int64ShllMod32(pft->dwHighDateTime, 32) | pft->dwLowDateTime); } void PerformLongOperation_Example() { FILETIME ftDummy; //Get starting times. FILETIME ftKernelTimeStart, ftUserTimeStart; GetThreadTimes(GetCurrentThread(), &ftDummy, &ftDummy, &ftKernelTimeStart, &ftUserTimeStart); //Perform complex algorithm here. //Get ending times. FILETIME ftKernelTimeStop, ftUserTimeStop; GetThreadTimes(GetCurrentThread(), &ftDummy, &ftDummy, &ftKernelTimeStop, &ftUserTimeStop); //Get the elapsed kernel and user times by converting the start //and end times form FILETIMEs to quad words, and then subtract //the start times form the end times. __int64 qwKernelTimeElapsed = FileTimeToQuadWord(&ftKernelTimeStop) - FileTimeToQuadWord(&ftKernelTimeStart); __int64 qwUserTimeElapsed = FileTimeToQuadWord(&ftUserTimeStop) - FileTimeToQuadWord(&ftUserTimeStart); //Get total time duration by adding the kernel and user times. __int64 qwTotalTimeElapsed = qwKernelTimeElapsed + qwUserTimeElapsed; } void ElapsedTime_Example() { ElapsedTime stopWatch; //TODO __int64 qwElapsedTime = stopWatch.Now(); }
504ff5bc3432fc484634dff5d650d74fae12ab38
5e8d200078e64b97e3bbd1e61f83cb5bae99ab6e
/main/source/src/protocols/jumping/PairingLibrary.hh
8d63b9aa6e8385623ec38d11b9e09a7f752cc317
[]
no_license
MedicaicloudLink/Rosetta
3ee2d79d48b31bd8ca898036ad32fe910c9a7a28
01affdf77abb773ed375b83cdbbf58439edd8719
refs/heads/master
2020-12-07T17:52:01.350906
2020-01-10T08:24:09
2020-01-10T08:24:09
232,757,729
2
6
null
null
null
null
UTF-8
C++
false
false
5,273
hh
PairingLibrary.hh
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. // (c) For more information, see http://www.rosettacommons.org. Questions about this can be // (c) addressed to University of Washington CoMotion, email: license@uw.edu. /// @file src/protocols/jumping/PairingTemplate /// @brief header file for ClassicAbinitio protocol /// @details /// from converting jumping_pairings.cc of rosetta++ into mini /// /// /// /// @author Oliver Lange #ifndef INCLUDED_protocols_jumping_PairingLibrary_hh #define INCLUDED_protocols_jumping_PairingLibrary_hh // Unit Headers #include <protocols/jumping/PairingLibrary.fwd.hh> // Package Headers // Project Headers #include <core/pose/Pose.fwd.hh> #include <core/types.hh> #include <core/fragment/FragData.fwd.hh> #include <core/fragment/FragSet.fwd.hh> // ObjexxFCL Headers #include <ObjexxFCL/FArray1D.hh> // Utility headers #include <utility/SingletonBase.hh> #include <utility/pointer/ReferenceCount.hh> #include <core/kinematics/RT.hh> #include <core/kinematics/MoveMap.fwd.hh> //// C++ headers #include <cstdlib> #include <string> #include <map> #include <core/scoring/dssp/PairingsList.fwd.hh> #include <utility/vector1.hh> namespace protocols { namespace jumping { class PairingTemplate { typedef utility::vector1<std::string> AtomList; public: //create template with identical set of three upstream and downstream atoms to define their stubs PairingTemplate( std::string const& c, std::string const& s1, std::string const& s2, std::string const& s3); PairingTemplate( std::string const& s1, std::string const& s2, std::string const& s3); core::kinematics::RT rt_; ObjexxFCL::FArray1D_float phi; ObjexxFCL::FArray1D_float psi; ObjexxFCL::FArray1D_float omega; ObjexxFCL::FArray1D_char secstruct; AtomList atoms_downstream_; AtomList atoms_upstream_; }; /// @brief returns relative orientation of chains at res1 and res2 /// this is the inner product of the respective N-C vectors. //void compute_orientation_and_pleating( core::pose::Pose const&, core::Size res1, core::Size res2, core::Size &orientation, core::Size &pleating); class BasePairingLibrary : public utility::pointer::ReferenceCount { public: ~BasePairingLibrary() override; virtual void create_jump_fragments( int const orientation, int const pleating, bool bWithTorsion, core::fragment::FragDataOPs & ) const = 0; virtual void generate_jump_frags( core::scoring::dssp::PairingsList const& pairings, core::kinematics::MoveMap const& mm, bool bWithTorsion, core::fragment::FragSet& frags_accumulator ) = 0; }; class PairingLibrary : public BasePairingLibrary { public: typedef std::vector< PairingTemplate > PairingTemplateList; typedef std::map< std::pair< int, int >, PairingTemplateList > PairingTemplateMap; public: PairingLibrary() : num_of_pairings_(0) {} void read_from_file( std::string const& fn ); void read_from_file_no_filters( std::string const& fn ); /*Version which does not assume the jump is a beta sheet */ //void read_from_database(); /// @brief classic rosetta++ accessor core::kinematics::RT get_random_beta_sheet_jump( int const orientation, int const pleating ) const; /// @brief classic rosetta++ accessor core::kinematics::RT get_random_tmh_jump( int const orientation, int const pos1, int const pos2 ) const; void set_tmh_jump( core::pose::Pose pose, int const jump_number, int const orientation, int const pos1, int const pos2 ) const; /// @brief puts all jump-geometries that fit the orientation and pleating into /// list of FragData's. Try to reuse these FragData for different Frames that have same orientation and pleating /// This creates Fragments with single JumpSRFD --- PairingLibrary also stores phi/psi/omega of start and end residue /// use bWithTorsion = true to get FragData with BBTorsionSRFD and JumpSRFD /// length of single FragData is /// noTorsion 1 /// withTorsion 3 /// bWithTorsion = true length of single FragData is 3 start jump end void create_jump_fragments( int const orientation, int const pleating, bool bWithTorsion, core::fragment::FragDataOPs & ) const override; core::Size size() const { return num_of_pairings_; } void generate_jump_frags( core::scoring::dssp::PairingsList const & pairings, core::kinematics::MoveMap const & mm, bool bWithTorsion, core::fragment::FragSet & frags_accumulator ) override; private: PairingTemplateMap pairings_; core::Size num_of_pairings_; }; class SpecificGeometryLibrary : public PairingLibrary { public: private: }; /// @brief This class is thread-unsafe, though, if perhaps none of its non-const /// functions were accessible, then it wouldn't be. class StandardPairingLibrary : public PairingLibrary, public utility::SingletonBase< StandardPairingLibrary > { public: friend class utility::SingletonBase< StandardPairingLibrary >; private: StandardPairingLibrary(); }; } //protocols } //jumping #endif
2e355e7bfb762507debe38d18a65b7970f9b38a4
2a3067bc1f9baa295aa4905647c06569e5b0dc01
/IChannelCallBack.h
4d8f9b89b6d9b50c25e5e4b15b23fbc08dba3963
[]
no_license
shijiajia/TinyMudo
6934a49f5c3271a5f225a82dca5b9b53e5ee5c77
8c8c0ccfd91489f3eaf9eab6d2a2a7c9569cd22b
refs/heads/master
2021-01-21T12:53:11.979591
2016-07-23T00:00:03
2016-07-23T00:00:03
57,367,901
2
3
null
null
null
null
UTF-8
C++
false
false
156
h
IChannelCallBack.h
#ifndef ICHANNELCALLBACK_H #define ICHANNELCALLBACK_H namespace TinyMuduo { class IChannelCallBack { public: virtual void HandleEvent()=0; }; } #endif
2d1278fc5f7b1e41077ad7a987c70614b9caf90a
bcf138c82fcba9acc7d7ce4d3a92618b06ebe7c7
/gta5/0xE41CA53051197A27.cpp
dd1e07cec1d0809407cd1245f4d9a0a6a60c200e
[]
no_license
DeepWolf413/additional-native-data
aded47e042f0feb30057e753910e0884c44121a0
e015b2500b52065252ffbe3c53865fe3cdd3e06c
refs/heads/main
2023-07-10T00:19:54.416083
2021-08-12T16:00:12
2021-08-12T16:00:12
395,340,507
1
0
null
null
null
null
UTF-8
C++
false
false
346
cpp
0xE41CA53051197A27.cpp
// code_controller.ysc @ L36651 int func_410(int iParam0) { int iVar0; iVar0 = iParam0; if ((iVar0 < 0 || iVar0 >= 263) || iParam0 == 263) { return 0; } if (HUD::DOES_BLIP_EXIST(Global_31724[iVar0 /*23*/].f_19)) { if (HUD::IS_BLIP_ON_MINIMAP(Global_31724[iVar0 /*23*/].f_19)) { return 1; } } return 0; }
9770c42b6de96c3424047bbbcb5a70aa450fddfa
3bf94fd91a50b0c194fee4567c0f7e7c2acc765c
/autotests/server/notificationmanagertest.cpp
c244793d262b848e886e2115d131e6734ea3c73a
[ "BSD-3-Clause", "CC0-1.0" ]
permissive
KDE/akonadi
a1f29a137f6f35516a0ff1b41f85ffd77f695449
064b9f38dbfaf1127d12794cf295eb545c593978
refs/heads/master
2023-08-31T21:18:57.904918
2023-08-28T21:06:36
2023-08-28T21:06:36
42,715,907
25
7
null
null
null
null
UTF-8
C++
false
false
6,864
cpp
notificationmanagertest.cpp
/* SPDX-FileCopyrightText: 2019 David Faure <faure@kde.org> SPDX-License-Identifier: LGPL-2.0-or-later */ #include <aktest.h> #include "aggregatedfetchscope.h" #include "entities.h" #include "notificationmanager.h" #include "notificationsubscriber.h" #include <QObject> #include <QTest> using namespace Akonadi; using namespace Akonadi::Server; class TestableNotificationSubscriber : public NotificationSubscriber { public: explicit TestableNotificationSubscriber(NotificationManager *manager) : NotificationSubscriber(manager) { mSubscriber = "TestSubscriber"; } using NotificationSubscriber::disconnectSubscriber; using NotificationSubscriber::modifySubscription; using NotificationSubscriber::registerSubscriber; }; class NotificationManagerTest : public QObject { Q_OBJECT private Q_SLOTS: void testAggregatedFetchScope() { NotificationManager manager(AkThread::NoThread); QMetaObject::invokeMethod(&manager, "init", Qt::DirectConnection); // first subscriber, A TestableNotificationSubscriber subscriberA(&manager); Protocol::CreateSubscriptionCommand createCmd; createCmd.setSession("session1"); subscriberA.registerSubscriber(createCmd); QVERIFY(!manager.tagFetchScope()->fetchIdOnly()); QVERIFY(manager.tagFetchScope()->fetchAllAttributes()); // default is true QVERIFY(!manager.collectionFetchScope()->fetchIdOnly()); QVERIFY(!manager.collectionFetchScope()->fetchStatistics()); // set A's subscription settings Protocol::ModifySubscriptionCommand modifyCmd; { Protocol::TagFetchScope tagFetchScope; tagFetchScope.setFetchIdOnly(true); tagFetchScope.setFetchAllAttributes(false); modifyCmd.setTagFetchScope(tagFetchScope); Protocol::CollectionFetchScope collectionFetchScope; collectionFetchScope.setFetchIdOnly(true); collectionFetchScope.setIncludeStatistics(true); modifyCmd.setCollectionFetchScope(collectionFetchScope); Protocol::ItemFetchScope itemFetchScope; itemFetchScope.setFetch(Protocol::ItemFetchScope::FullPayload); itemFetchScope.setFetch(Protocol::ItemFetchScope::AllAttributes); itemFetchScope.setFetch(Protocol::ItemFetchScope::Size); itemFetchScope.setFetch(Protocol::ItemFetchScope::MTime); itemFetchScope.setFetch(Protocol::ItemFetchScope::RemoteRevision); itemFetchScope.setFetch(Protocol::ItemFetchScope::Flags); itemFetchScope.setFetch(Protocol::ItemFetchScope::RemoteID); itemFetchScope.setFetch(Protocol::ItemFetchScope::GID); itemFetchScope.setFetch(Protocol::ItemFetchScope::Tags); itemFetchScope.setFetch(Protocol::ItemFetchScope::Relations); itemFetchScope.setFetch(Protocol::ItemFetchScope::VirtReferences); modifyCmd.setItemFetchScope(itemFetchScope); } subscriberA.modifySubscription(modifyCmd); QVERIFY(manager.tagFetchScope()->fetchIdOnly()); QVERIFY(!manager.tagFetchScope()->fetchAllAttributes()); QVERIFY(manager.collectionFetchScope()->fetchIdOnly()); QVERIFY(manager.collectionFetchScope()->fetchStatistics()); QVERIFY(manager.itemFetchScope()->fullPayload()); QVERIFY(manager.itemFetchScope()->allAttributes()); // second subscriber, B TestableNotificationSubscriber subscriberB(&manager); subscriberB.registerSubscriber(createCmd); QVERIFY(!manager.tagFetchScope()->fetchIdOnly()); // A and B don't agree, so: false QVERIFY(manager.tagFetchScope()->fetchAllAttributes()); QVERIFY(!manager.collectionFetchScope()->fetchIdOnly()); QVERIFY(manager.collectionFetchScope()->fetchStatistics()); // at least one - so still true QVERIFY(manager.itemFetchScope()->fullPayload()); QVERIFY(manager.itemFetchScope()->allAttributes()); QVERIFY(manager.itemFetchScope()->fetchSize()); QVERIFY(manager.itemFetchScope()->fetchMTime()); QVERIFY(manager.itemFetchScope()->fetchRemoteRevision()); QVERIFY(manager.itemFetchScope()->fetchFlags()); QVERIFY(manager.itemFetchScope()->fetchRemoteId()); QVERIFY(manager.itemFetchScope()->fetchGID()); QVERIFY(manager.itemFetchScope()->fetchTags()); QVERIFY(manager.itemFetchScope()->fetchRelations()); QVERIFY(manager.itemFetchScope()->fetchVirtualReferences()); // give it the same settings subscriberB.modifySubscription(modifyCmd); QVERIFY(manager.tagFetchScope()->fetchIdOnly()); // now they agree QVERIFY(!manager.tagFetchScope()->fetchAllAttributes()); QVERIFY(manager.collectionFetchScope()->fetchIdOnly()); QVERIFY(manager.collectionFetchScope()->fetchStatistics()); // no change for the "at least one" settings // revert B's settings, so we can check what happens when disconnecting modifyCmd.setTagFetchScope(Protocol::TagFetchScope()); modifyCmd.setCollectionFetchScope(Protocol::CollectionFetchScope()); subscriberB.modifySubscription(modifyCmd); QVERIFY(!manager.tagFetchScope()->fetchIdOnly()); QVERIFY(manager.tagFetchScope()->fetchAllAttributes()); QVERIFY(!manager.collectionFetchScope()->fetchIdOnly()); QVERIFY(manager.collectionFetchScope()->fetchStatistics()); // B goes away subscriberB.disconnectSubscriber(); QVERIFY(manager.tagFetchScope()->fetchIdOnly()); // B cleaned up after itself, so A can have id-only again QVERIFY(!manager.tagFetchScope()->fetchAllAttributes()); QVERIFY(manager.collectionFetchScope()->fetchIdOnly()); QVERIFY(manager.collectionFetchScope()->fetchStatistics()); // A goes away subscriberA.disconnectSubscriber(); QVERIFY(!manager.collectionFetchScope()->fetchStatistics()); QVERIFY(!manager.itemFetchScope()->fullPayload()); QVERIFY(!manager.itemFetchScope()->allAttributes()); QVERIFY(!manager.itemFetchScope()->fetchSize()); QVERIFY(!manager.itemFetchScope()->fetchMTime()); QVERIFY(!manager.itemFetchScope()->fetchRemoteRevision()); QVERIFY(!manager.itemFetchScope()->fetchFlags()); QVERIFY(!manager.itemFetchScope()->fetchRemoteId()); QVERIFY(!manager.itemFetchScope()->fetchGID()); QVERIFY(!manager.itemFetchScope()->fetchTags()); QVERIFY(!manager.itemFetchScope()->fetchRelations()); QVERIFY(!manager.itemFetchScope()->fetchVirtualReferences()); QMetaObject::invokeMethod(&manager, "quit", Qt::DirectConnection); } }; AKTEST_MAIN(NotificationManagerTest) #include "notificationmanagertest.moc"
45b496a273997115fd0448461ebc9e50e1a414fd
83450868c0facabaec66c1fc897fc35f0c576426
/BOJ/Baekjoon/구현 (Implementation)/12778. CTP공국으로 이민 가자.cpp
8d3f772a3f50e8e15c515e62bff56620c997f381
[]
no_license
CPFrog/Problem_Solve
db84840d132a5986386847ae405cf6968f14a197
83adcc5a3e1deed85568f4b735e68cebdcf5c7b3
refs/heads/main
2023-03-07T06:12:58.654251
2021-02-19T02:58:47
2021-02-19T02:58:47
301,348,638
0
0
null
null
null
null
UTF-8
C++
false
false
364
cpp
12778. CTP공국으로 이민 가자.cpp
#include <iostream> using namespace std; int main() { cin.tie(NULL); ios_base::sync_with_stdio(0); int t, m, d; char cmd, c; cin >> t; while (t--) { cin >> m >> cmd; while (m--) { if (cmd == 'C') { cin >> c; cout << (int)c - 64 << " "; } else { cin >> d; cout << (char)(d + 64) << " "; } } cout << '\n'; } return 0; }
4dc56ec84223d534dafab73ee750d932b8bce812
6018e30ff90a8c65c5d6982a6b6bd6097c53288f
/madlib/madlib.cpp
07a752a32696e6f4f3a2b64243bccd6cc51a458a
[]
no_license
KnowsCount/restarting-cpp
7f57b1daf722064c762ba2ab615ab7710173114c
50c6d6fd927d39491c26c2fd6535bb6bb8d073c5
refs/heads/master
2023-09-03T13:09:55.848884
2021-11-02T05:51:26
2021-11-02T05:51:26
421,082,435
0
0
null
null
null
null
UTF-8
C++
false
false
473
cpp
madlib.cpp
#include <iostream> #include <cmath> #include <string> using namespace std; int main() { string color, noun, adjective; cout << "enter a color: "; getline(cin, color); cout << "enter a noun: "; getline(cin, noun); cout << "enter an adjective: "; getline(cin, adjective); cout << "Roses are " << color << endl; cout << noun << " are blue" << endl; cout << "Sugar is " << adjective << endl; cout << "And so are you" << endl; }
a302e2c1596a9a2778252396f25726e62e734e80
785ef143c9f5aaa77456fdbe180d11f5eabf995a
/1.剑指offer/ZJ54_二叉搜索树的第k大节点.cpp
e1c1c507982d30e3f39fc2211585ba41f52801e4
[]
no_license
Ronnie-Git/LeetCode
0fdd5c580e250c281cdf5a79d79bfe4bbfc51e7a
bf34b287f978ac4ba8d14a8e8087d71534bb9aa1
refs/heads/master
2022-12-18T03:47:07.259565
2020-09-24T05:44:05
2020-09-24T05:44:05
278,781,369
0
0
null
null
null
null
UTF-8
C++
false
false
627
cpp
ZJ54_二叉搜索树的第k大节点.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool inorder(TreeNode *root, int &k, int &res) { if (!root) return false; if (inorder(root->right, k, res)) return true; if (--k == 0) { res = root->val; return true; } if (inorder(root->left, k, res)) return true; return false; } int kthLargest(TreeNode* root, int k) { int res = 0; inorder(root, k, res); return res; } };
a5f134df0330480b1e683ce2f3649034718084c9
5bb05305968cb041848932199b8f6649db4920e7
/workspace/TESTAT1/main.cpp
d287db60d9e869b3331296326e03c12cbb543846
[]
no_license
cemildo/cplusplus
81dcf8185ff7268bcd9125a8d605ec02f6ea646d
3f3da37412ab364df97b74a322339bc193ec5f7c
refs/heads/master
2021-01-10T13:26:21.103234
2015-10-07T15:13:39
2015-10-07T15:13:39
43,824,576
0
0
null
null
null
null
UTF-8
C++
false
false
111
cpp
main.cpp
#include "pocketcalculator.h" #include <iostream> int main(){ pocketCalculator(std::cin,std::cout); }
3e05b0c4d6247234162f9f238a6e123f2b1aff1e
3d3c3e8b55052d016cd9cb8bd744ac279f3224a0
/Game/Client/src/mapData.cpp
8ee29f1c2df5b2c335f57018d7a6b51009d27032
[]
no_license
TrieBr/GrandTale
15dcef11a5811d7978f812881dba543673017e82
4ca6bd1335f6bc005f632a930719e038f71f828e
refs/heads/master
2020-04-05T23:23:38.737982
2018-11-04T07:06:14
2018-11-04T07:06:14
27,987,084
3
3
null
null
null
null
UTF-8
C++
false
false
2,761
cpp
mapData.cpp
#include "mapData.h" #include "collisionCheck.h" mapData::mapData() : mapCollisionData() { } mapData::~mapData(){ //Clean up tiles.. for (unsigned int i=0; i<this->tileLayers.size(); i++) { //For each layer for (unsigned int j=0; j<this->tileLayers[i]->layouts.size(); j++) { //For each layout for (unsigned int t=0; t<this->tileLayers[i]->layouts[j]->tilePositions.size(); t++) { //For each tile delete this->tileLayers[i]->layouts[j]->tilePositions[t]; //Delete tile data } delete this->tileLayers[i]->layouts[j]; //Delete layout data } delete this->tileLayers[i]; //Delete layer } } void mapData::loadMapData(ALLEGRO_FILE* fileStream) { //Load all the tiles, blocks, etc unsigned int offset_tile = 0; unsigned int offset_background = 0; al_fseek(fileStream,2*sizeof(int),ALLEGRO_SEEK_SET); al_fread(fileStream,&offset_tile,sizeof(int)); al_fread(fileStream,&offset_background,sizeof(int)); al_fseek(fileStream,offset_tile,ALLEGRO_SEEK_SET); int layerList; al_fread(fileStream,&layerList,sizeof(int)); //Read number of layers for (unsigned int i=0; i<layerList; i++) { tileLayer* newLayer = new tileLayer(); //Create the layer int layoutList; al_fread(fileStream,&layoutList,sizeof(int)); //Read number of layouts for (unsigned int j=0; j <layoutList; j++) { tileLayout* newLayout = new tileLayout(); short tileSetID; al_fread(fileStream,&tileSetID,sizeof(short)); //Read ID of tileset newLayout->tilesetData = tilesetManager::loadTileSet(tileSetID); //Load the tileset int tileList; al_fread(fileStream,&tileList,sizeof(int)); //Read number of tiles for (unsigned int c=0; c<tileList; c++) { tile* newTile = new tile(); al_fread(fileStream,&newTile->mapX,sizeof(int)); al_fread(fileStream,&newTile->mapY,sizeof(int)); al_fread(fileStream,&newTile->tileSetX,sizeof(short)); al_fread(fileStream,&newTile->tileSetY,sizeof(short)); newLayout->tilePositions.push_back(newTile); } newLayer->layouts.push_back(newLayout); } tileLayers.push_back(newLayer); } al_fseek(fileStream,offset_background,ALLEGRO_SEEK_SET); //Backgrounds int backgroundLayerCount = 0; al_fread(fileStream,&backgroundLayerCount,sizeof(int)); for (unsigned int i=0; i<backgroundLayerCount; i++) { mapBackground* newBg = new mapBackground; int BGID; al_fread(fileStream,&BGID,sizeof(int)); //Read end of line al_fread(fileStream,&newBg->xPos,sizeof(int)); //Read end of line al_fread(fileStream,&newBg->yPos,sizeof(int)); //Read end of line newBg->bgHandle = backgroundManager::loadBackground(BGID); backgroundLayers.push_back(newBg); } this->::mapCollisionData::loadMapData(fileStream); }
822457158bf430a9f1cd9148e78671ac5ee1ad8b
524430158ceb8f59e4c02697a66e807115d0d8fc
/Graphics Engine v0.1/Graphics Engine v0.1/main.cpp
679c5d31d59fd3a42df8745f608858763a9113d0
[]
no_license
SingularityTechnologies/OpenGL_Scheisse
b550cd92a1fd3cf667524098d0edc70495ac740c
5e79e2d9593c9a31b4afb09685528f7de5fce0cf
refs/heads/master
2020-06-04T10:27:56.625236
2015-04-04T00:47:40
2015-04-04T00:47:40
30,864,181
0
1
null
null
null
null
UTF-8
C++
false
false
1,066
cpp
main.cpp
#define GLFW_DLL #include <GL\glew.h> #include <GLFW\glfw3.h> #include <stdio.h> #include "AdditionalFunctions.h" //Closes GLFWwindow upon press of ESC static void KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } int main(){ //Initialize GLFW. Closes program upon failure. if (!glfwInit()) return 1; //GLFWwindow creation. Closes program upon failure. GLFWwindow *window = glfwCreateWindow(640, 480, "Rexy712", NULL, NULL); if (!window){ glfwTerminate(); return 1; } glfwMakeContextCurrent(window); glfwSetKeyCallback(window, KeyCallback); //Initialize GLEW glewExperimental = GL_TRUE; glewInit(); //Print OpenGL version to the console. printf("OpenGL Version: %.1f", GetGLVersion()); //Main loop. Swaps GLFWwindow buffer and polls events. while (!glfwWindowShouldClose(window)){ glfwSwapBuffers(window); glfwPollEvents(); } //Clean up GLFW. glfwDestroyWindow(window); glfwTerminate(); return 0; }
1a0d46afb83ddbbe71a2197b0fe1ada999607ce3
9735397c4f86a14694dece008024fceb81186d07
/ff/include/para/wait_impl.h
8855445f8ab59280e43970728b5a724bf98a9814
[ "MIT" ]
permissive
SkySlayer/functionflow
f36cfb33e63c327310ca33b1d943932ae20cd9a1
f15f78b30fa5dd2462ce76ce68cc63854eb165f4
refs/heads/master
2021-01-23T06:49:26.757259
2015-01-30T07:00:31
2015-01-30T07:00:31
30,061,023
1
1
null
null
null
null
UTF-8
C++
false
false
9,369
h
wait_impl.h
/*********************************************** The MIT License (MIT) Copyright (c) 2012 Athrun Arthur <athrunarthur@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *************************************************/ #ifndef FF_PARA_WAIT_IMPL_H_ #define FF_PARA_WAIT_IMPL_H_ #include "common/common.h" #include "common/tuple_type.h" #include "para/para.h" #include "para/bin_wait_func_deducer.h" #include "common/log.h" namespace ff { template<class RT> class para; namespace internal { template <class T1, class T2> class wait_and { public: typedef typename std::remove_reference<T1>::type T1_t; typedef typename std::remove_reference<T2>::type T2_t; typedef typename T1_t::ret_type RT1_t; typedef typename T2_t::ret_type RT2_t; typedef bin_wait_func_deducer<typename T1_t::ret_type, typename T2_t::ret_type> deduct_t; typedef typename deduct_t::and_type ret_type; public: wait_and(T1 && t1, T2 && t2) : m_1(t1) , m_2(t2) , m_iES(exe_state::exe_init) {} template<class FT> auto then(FT && f) -> typename std::enable_if< std::is_void<typename function_res_traits<FT>::ret_type>::value && is_compatible_then<FT, RT1_t, RT2_t>::is_cpt_with_and && !utils::function_args_traits<FT>::is_no_args, void>::type { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); deduct_t::void_func_and(std::forward<FT>(f), m_1, m_2); } template<class FT> auto then(FT && f ) -> typename std::enable_if< !std::is_void<typename function_res_traits<FT>::ret_type>::value && is_compatible_then<FT, RT1_t, RT2_t>::is_cpt_with_and && !utils::function_args_traits<FT>::is_no_args, typename std::remove_reference<typename function_res_traits<FT>::ret_type>::type >::type { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); return deduct_t::ret_func_and(std::forward<FT>(f), m_1, m_2); } template<class FT> auto then(FT && f) -> typename std::enable_if<std::is_void<typename function_res_traits<FT>::ret_type>::value && utils::function_args_traits<FT>::is_no_args, void>::type { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); f(); } template<class FT> auto then(FT && f ) -> typename std::enable_if< !std::is_void<typename function_res_traits<FT>::ret_type>::value && utils::function_args_traits<FT>::is_no_args, typename std::remove_reference<typename function_res_traits<FT>::ret_type>::type >::type { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); return f(); } template<class FT> auto then(FT && f) -> typename std::enable_if< !utils::function_args_traits<FT>::is_no_args && !is_compatible_then<FT, RT1_t, RT2_t>::is_cpt_with_and, typename std::remove_reference<typename function_res_traits<FT>::ret_type>::type > :: type { static_assert(Please_Check_The_Assert_Msg<FT>::value, FF_EM_THEN_FUNC_TYPE_MISMATCH); } auto get() -> typename deduct_t::and_type { return deduct_t::wrap_ret_for_and(m_1, m_2); } exe_state get_state() { if(m_iES != exe_state::exe_over) m_iES = (m_1.get_state() && m_2.get_state()); return m_iES; } bool check_if_over() { if(m_iES == exe_state::exe_over) return true; m_iES = ( m_1.get_state() && m_2.get_state()); if(m_iES == exe_state::exe_over) return true; return false; } protected: T1_t& m_1; T2_t& m_2; exe_state m_iES; };//end class wait_and template <class T1, class T2> class wait_or { public: typedef typename std::remove_reference<T1>::type T1_t; typedef typename std::remove_reference<T2>::type T2_t; typedef typename T1_t::ret_type RT1_t; typedef typename T2_t::ret_type RT2_t; typedef bin_wait_func_deducer<typename T1_t::ret_type, typename T2_t::ret_type> deduct_t; typedef typename deduct_t::or_type ret_type; public: wait_or(T1 && t1, T2 && t2) : m_1(t1) , m_2(t2) , m_iES(exe_state::exe_init) {} template<class FT> auto then(FT && f) -> typename std::enable_if< std::is_void<typename function_res_traits<FT>::ret_type>::value && is_compatible_then<FT, RT1_t, RT2_t>::is_cpt_with_or && !utils::function_args_traits<FT>::is_no_args , void>::type { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); deduct_t::void_func_or(std::forward<FT>(f), m_1, m_2); } template<class FT> auto then(FT && f ) -> typename std::enable_if< !std::is_void<typename function_res_traits<FT>::ret_type>::value && is_compatible_then<FT, RT1_t, RT2_t>::is_cpt_with_or && !utils::function_args_traits<FT>::is_no_args, typename std::remove_reference<typename function_res_traits<FT>::ret_type>::type >::type { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); return deduct_t::ret_func_or(std::forward<FT>(f), m_1, m_2); } template<class FT> auto then(FT && f) -> typename std::enable_if<std::is_void<typename function_res_traits<FT>::ret_type>::value && utils::function_args_traits<FT>::is_no_args, void>::type { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); f(); } template<class FT> auto then(FT && f ) -> typename std::enable_if< !std::is_void<typename function_res_traits<FT>::ret_type>::value && utils::function_args_traits<FT>::is_no_args, typename std::remove_reference<typename function_res_traits<FT>::ret_type>::type >::type { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); return f(); } template<class FT> auto then(FT && f) -> typename std::enable_if< !utils::is_no_args_function<FT>::value && !is_compatible_then<FT, RT1_t, RT2_t>::is_cpt_with_or, typename std::remove_reference<typename function_res_traits<FT>::ret_type>::type > :: type { static_assert(Please_Check_The_Assert_Msg<FT>::value, FF_EM_THEN_FUNC_TYPE_MISMATCH); } auto get() -> typename deduct_t::or_type { return deduct_t::wrap_ret_for_or(m_1, m_2); } exe_state get_state() { if(m_iES != exe_state::exe_over) m_iES = ( m_1.get_state() || m_2.get_state() ); return m_iES; } bool check_if_over() { if(m_iES == exe_state::exe_over) return true; m_iES = ( m_1.get_state() || m_2.get_state() ); if(m_iES == exe_state::exe_over) return true; return false; } protected: T1_t & m_1; T2_t & m_2; exe_state m_iES; };//end class wait_or class wait_all { public: typedef void ret_type; wait_all(std::shared_ptr<internal::paras_with_lock > ps); template<class FT> auto then(FT && f ) -> void { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); f(); } exe_state get_state(); bool check_if_over(); protected: std::shared_ptr<internal::paras_with_lock > all_ps; exe_state m_iES; };//end class wait_all class wait_any { public: typedef void ret_type; wait_any(std::shared_ptr<internal::paras_with_lock > ps); template<class FT> auto then(FT && f ) -> void { if(!check_if_over()) ::ff::rt::yield_and_ret_until([this]() { return check_if_over(); }); f(); } exe_state get_state(); bool check_if_over(); protected: std::shared_ptr<internal::paras_with_lock > all_ps; exe_state m_iES; };//end class wait_any }//end namespace internal }//end namespace ff #endif
ab494d61f5ebe59d36fcc113b17da7912cbaefc4
95364e84a88f899ca316509f77e08855df6b2a02
/OGL Engine/Engine/Core/Headers/GfxFramework.h
39a82b4998f3d755c41b5e6770ca1dfeb266e227
[]
no_license
DimaPetrinko/OGL-Engine
3f4d0fb92d9a9c64b1916dc8148734a3a76e091a
e55d3952921f14bc4a08d710a66c1ce88210a21f
refs/heads/master
2021-01-10T18:04:01.591385
2016-04-03T19:07:16
2016-04-03T19:07:16
50,105,126
0
0
null
null
null
null
UTF-8
C++
false
false
677
h
GfxFramework.h
#pragma once #include "Transform.h" static class GfxFramework { public: GfxFramework(); ~GfxFramework(); static int InitWindow(const char *_title, Maths::Vector2 _resolution, bool _fullscreen); static void DrawGizmos(Maths::Vector3 position, Maths::Quaternion rotation, Maths::Vector3 scale); static void DrawCube(Maths::Vector3 color, Maths::Vector3 position, Maths::Quaternion rotation, Maths::Vector3 scale); static void DrawSphere(Maths::Vector3 color, Maths::Vector3 position, Maths::Quaternion rotation, Maths::Vector3 scale, bool lit); static void Show(Maths::Vector3 position, Maths::Quaternion rotation); static void SetViewport(int w, int h, int fov); };
d4c05a25887be246d78b7db879cb95d45fe988ab
09cf13de96d0323235d62111eced8ab51904c5f6
/leetcode832/leetcode832.cpp
1181c30dd35916a3af4badd06dd01799ebf04e83
[]
no_license
lovesunmoonlight/leetcode-solutions
4c8e6ce83c9282d2298ed14582c59572af6e224a
9e490fd6b5215ed6bb02e481020ee2056db3705c
refs/heads/master
2021-01-21T18:28:10.461560
2018-07-16T04:31:19
2018-07-16T04:31:19
92,048,152
1
0
null
null
null
null
GB18030
C++
false
false
1,039
cpp
leetcode832.cpp
// leetcode832.cpp : 定义控制台应用程序的入口点。 // 给定一个二进制矩阵 // 反转每一行,再将整个矩阵取反 #include "stdafx.h" #include <iostream> #include <vector> #include <algorithm> using std::cin; using std::cout; using std::endl; using std::cerr; using std::vector; class Solution { public: vector<vector<int>> flipAndInvertImage(vector<vector<int>>& A) { if (A.size() == 0 || A[0].size() == 0) return vector<vector<int>>(); auto ans = A; for (auto &i : ans) { std::reverse(i.begin(), i.end()); for (auto &j : i) j = !j; } return ans; } }; int main() { vector<vector<int>> v1 = { {1,1,0},{1,0,1},{0,0,0} }; vector<vector<int>> v2 = { {1,1,0,0},{1,0,0,1},{0,1,1,1},{1,0,1,0} }; Solution S; auto ans = S.flipAndInvertImage(v1); for (auto i : ans) { for (auto j : i) cout << j << " "; cout << endl; } ans = S.flipAndInvertImage(v2); for (auto i : ans) { for (auto j : i) cout << j << " "; cout << endl; } system("pause"); return 0; }
11543a346e6147a492332255b05bd1054d10f757
f5357857b93554f3cb6a5d578a942b2a31fa4f56
/4.27/ExampleProject/Plugins/PlayFab/Source/PlayFabCpp/Public/PlayFab.h
78630a9579920ec77c8053c0332536062e458f98
[ "Apache-2.0" ]
permissive
PlayFab/UnrealMarketplacePlugin
41d029f408f21b27f896b60dbbc4f206d6d0b217
0463de84670e78d230593ba4650f6c0273a4d5b9
refs/heads/master
2023-08-31T05:17:24.090241
2023-08-21T19:29:57
2023-08-21T19:29:57
144,331,377
128
62
Apache-2.0
2023-07-03T18:49:42
2018-08-10T20:55:29
C++
UTF-8
C++
false
false
4,308
h
PlayFab.h
////////////////////////////////////////////////////// // Copyright (C) Microsoft. 2018. All rights reserved. ////////////////////////////////////////////////////// #pragma once #include "CoreMinimal.h" #include "Modules/ModuleManager.h" #include "UObject/StrongObjectPtr.h" DECLARE_LOG_CATEGORY_EXTERN(LogPlayFabCpp, Log, All); // forward declaration of classes namespace PlayFab { template<typename T> TSharedPtr<T> MakeSharedUObject() { TSharedRef< TStrongObjectPtr<T> > SharedRefToStrongObjPtr = MakeShared< TStrongObjectPtr<T> >(NewObject<T>()); return TSharedPtr<T>(SharedRefToStrongObjPtr, SharedRefToStrongObjPtr->Get()); } class UPlayFabAdminAPI; class UPlayFabClientAPI; class UPlayFabMatchmakerAPI; class UPlayFabServerAPI; class UPlayFabAuthenticationAPI; class UPlayFabCloudScriptAPI; class UPlayFabDataAPI; class UPlayFabEconomyAPI; class UPlayFabEventsAPI; class UPlayFabExperimentationAPI; class UPlayFabInsightsAPI; class UPlayFabGroupsAPI; class UPlayFabLocalizationAPI; class UPlayFabMultiplayerAPI; class UPlayFabProfilesAPI; } typedef TSharedPtr<class PlayFab::UPlayFabAdminAPI> PlayFabAdminPtr; typedef TSharedPtr<class PlayFab::UPlayFabClientAPI> PlayFabClientPtr; typedef TSharedPtr<class PlayFab::UPlayFabMatchmakerAPI> PlayFabMatchmakerPtr; typedef TSharedPtr<class PlayFab::UPlayFabServerAPI> PlayFabServerPtr; typedef TSharedPtr<class PlayFab::UPlayFabAuthenticationAPI> PlayFabAuthenticationPtr; typedef TSharedPtr<class PlayFab::UPlayFabCloudScriptAPI> PlayFabCloudScriptPtr; typedef TSharedPtr<class PlayFab::UPlayFabDataAPI> PlayFabDataPtr; typedef TSharedPtr<class PlayFab::UPlayFabEconomyAPI> PlayFabEconomyPtr; typedef TSharedPtr<class PlayFab::UPlayFabEventsAPI> PlayFabEventsPtr; typedef TSharedPtr<class PlayFab::UPlayFabExperimentationAPI> PlayFabExperimentationPtr; typedef TSharedPtr<class PlayFab::UPlayFabInsightsAPI> PlayFabInsightsPtr; typedef TSharedPtr<class PlayFab::UPlayFabGroupsAPI> PlayFabGroupsPtr; typedef TSharedPtr<class PlayFab::UPlayFabLocalizationAPI> PlayFabLocalizationPtr; typedef TSharedPtr<class PlayFab::UPlayFabMultiplayerAPI> PlayFabMultiplayerPtr; typedef TSharedPtr<class PlayFab::UPlayFabProfilesAPI> PlayFabProfilesPtr; /** * The public interface to this module. In most cases, this interface is only public to sibling modules * within this plugin. */ class IPlayFabModuleInterface : public IModuleInterface { public: /** * Singleton-like access to this module's interface. This is just for convenience! * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. * * @return Returns singleton instance, loading the module on demand if needed */ static inline IPlayFabModuleInterface& Get() { if (IsAvailable()) { return FModuleManager::GetModuleChecked< IPlayFabModuleInterface >("PlayFabCpp"); } return FModuleManager::LoadModuleChecked< IPlayFabModuleInterface >("PlayFabCpp"); } /** * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. * * @return True if the module is loaded and ready to use */ static inline bool IsAvailable() { return FModuleManager::Get().IsModuleLoaded("PlayFabCpp"); } virtual PlayFabAdminPtr GetAdminAPI() const = 0; virtual PlayFabClientPtr GetClientAPI() const = 0; virtual PlayFabMatchmakerPtr GetMatchmakerAPI() const = 0; virtual PlayFabServerPtr GetServerAPI() const = 0; virtual PlayFabAuthenticationPtr GetAuthenticationAPI() const = 0; virtual PlayFabCloudScriptPtr GetCloudScriptAPI() const = 0; virtual PlayFabDataPtr GetDataAPI() const = 0; virtual PlayFabEconomyPtr GetEconomyAPI() const = 0; virtual PlayFabEventsPtr GetEventsAPI() const = 0; virtual PlayFabExperimentationPtr GetExperimentationAPI() const = 0; virtual PlayFabInsightsPtr GetInsightsAPI() const = 0; virtual PlayFabGroupsPtr GetGroupsAPI() const = 0; virtual PlayFabLocalizationPtr GetLocalizationAPI() const = 0; virtual PlayFabMultiplayerPtr GetMultiplayerAPI() const = 0; virtual PlayFabProfilesPtr GetProfilesAPI() const = 0; };
e84eeab193eb6c82d913e4ac6170c2eaa4fb10f7
877fff5bb313ccd23d1d01bf23b1e1f2b13bb85a
/app/src/main/cpp/dir35435/dir35536/dir35859/dir36113/dir36589/file36656.cpp
9f39979885800c5b44dbdb7ee96d93ce8b0e4900
[]
no_license
tgeng/HugeProject
829c3bdfb7cbaf57727c41263212d4a67e3eb93d
4488d3b765e8827636ce5e878baacdf388710ef2
refs/heads/master
2022-08-21T16:58:54.161627
2020-05-28T01:54:03
2020-05-28T01:54:03
267,468,475
0
0
null
null
null
null
UTF-8
C++
false
false
115
cpp
file36656.cpp
#ifndef file36656 #error "macro file36656 must be defined" #endif static const char* file36656String = "file36656";
9d7929da266a3ab0d1f3b9442150881254c5115c
afb4cf30e328c78efc7adad573a4e4a1870754b6
/College/Matthew C++ Classes/Matthew Project/Cs 2/Lab 3/RAFile_Backup.h
1286732a6417de819abd70b916ecf6e0129d1f5f
[ "Apache-2.0" ]
permissive
mmcclain117/School-Code
5c404aaa9b95df136ba382dff79cb7d44e56b4bc
aa9c501d42fc51fa9a66f53c65b875408a40ea0c
refs/heads/main
2023-01-21T00:27:18.669866
2020-11-29T21:32:52
2020-11-29T21:32:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,263
h
RAFile_Backup.h
#ifndef RA_FILE_H #define RA_FILE_H #include <fstream> using namespace std; #include "WCS_Pointer.h" #include "WCS_UB_Array.h" typedef unsigned long UINT; class RAFile { private: struct RecInfo { streamoff Offset; UINT Length; }; RAFile(const RAFile &); RAFile & operator = (const RAFile &); UINT NumRecords; streamoff EndOfDataRecords; WCS_UB_Array <RecInfo, UINT> RecInfoArray; fstream File; public: enum Exceptions { OK, FileOpenFailure, FileAlreadyOpen, FileNotOpen, RecordDoesNotExist }; RAFile() { NumRecords = 0; } ~RAFile() { //Close();// write RecInfoArray following the Records in the file } Exceptions Close() { // do normal checking to make sure file is open // write NumRecords back to file // goto EndOfDataRecords and write RecInfoArray back to file starting at that point // close the file if (!File.is_open()) return FileNotOpen; else { cout << "Writing Database To File..." << endl; File.seekp(0);//Set file write pointer to beginning of file File.write((const char *)&NumRecords, sizeof(NumRecords)); File.seekp(EndOfDataRecords);//Set file write pointer to end of file for (UINT i = 0; i < NumRecords; i++)//Writes contents of RecInfoArray to file File.write((char *)&RecInfoArray[i], sizeof(RecInfo)); File.close(); return OK; } } Exceptions Get(UINT Index, string & Data) { if (File.is_open()) if (Index < NumRecords) { cout << "Retrieving Data..." << endl; if (RecInfoArray[Index].Length > 0) { char * pChar; pChar = new char[RecInfoArray[Index].Length + 1]; // the data in each record does not include the end-of-string mark, only the acutal characters File.seekg(RecInfoArray[Index].Offset); File.read(pChar, RecInfoArray[Index].Length); pChar[RecInfoArray[Index].Length] = '\0'; // add end-of-string mark to the end of the characters Data = pChar; delete[] pChar; } else Data = "No Data In This Record."; return OK; } else { Data = "Record Does Not Exist."; return RecordDoesNotExist; } else return FileNotOpen; } Exceptions Insert(UINT Index, const string & Data) { UINT i; if (!File.is_open()) return FileNotOpen; else { if (Index >= NumRecords) { return Replace(Index, Data); } else { //There is a bug in this function that causes the record at Index and Index + 1 to be replaced with Data. //for (i = NumRecords; i >= Index + 1; i--)//For some reason the program freezes if Index is 0. This indicates an infinite loop. //RecInfoArray [i] = RecInfoArray [i - 1];//Fixed the problem by doing some mathematical manipulation. for (i = NumRecords - 1; i >= Index; i--) RecInfoArray [i + 1] = RecInfoArray [i]; if (Data.length() > RecInfoArray[Index].Length) // is there enough space where the record is now { NumRecords++; return AddRecord(Index, Data); // no, need to add it somewhere else } else { // yes, just overwrite the record File.seekp(RecInfoArray[Index].Offset); File.write((const char *)Data.c_str(), Data.length()); RecInfoArray[Index].Length = Data.length(); NumRecords++; return OK; } } } // do normal checking about file open, etc // if user wants to insert a new index past NumRecords // call Replace // else // generally, we are going to write a loop where // for (i = NumRecords - 1; i >= Index; i--) // RecInfoArray [i + 1] = RecInfoArray [i]; // write the Data to the file // put the offset and length of the data just written into RecInfoArray [Index] // make sure to update NumRecords } Exceptions AddRecord(UINT Index, const string & Data) { File.seekp(EndOfDataRecords); RecInfoArray[Index].Offset = EndOfDataRecords; RecInfoArray[Index].Length = Data.length(); File.write((const char *)Data.c_str(), Data.length()); EndOfDataRecords = File.tellp(); return OK; } Exceptions Open(const string & FileName) { if (File.is_open()) return FileAlreadyOpen; else { File.open((const char *)FileName.c_str(), ios_base::in | ios_base::out | ios_base::binary); if (!File.is_open()) // did the open fail? { // yes File.clear(); // clear error flags File.open((const char *)FileName.c_str(), ios_base::out | ios_base::binary); // this will cause the file to be created if (!File.is_open()) // did the open fail? { File.clear(); return FileOpenFailure; // yes, return error code } else { NumRecords = 0; File.write((const char *)&NumRecords, sizeof(NumRecords)); File.close(); File.open((const char *)FileName.c_str(), ios_base::in | ios_base::out | ios_base::binary); if (!File.is_open()) { File.clear(); return FileOpenFailure; } else; } } else; } File.seekg(0); // make sure we are at the beginning of the file File.read((char *)&NumRecords, sizeof(NumRecords)); if (NumRecords > 0) { File.seekg(-((long)(NumRecords * sizeof(RecInfo))), ios_base::end); EndOfDataRecords = File.tellg(); for (UINT i = 0; i < NumRecords; i++) File.read((char *)&RecInfoArray[i], sizeof(RecInfo)); } else EndOfDataRecords = File.tellg(); return OK; } Exceptions Replace(UINT Index, const string & Data) { UINT i; if (File.is_open()) if (Index >= NumRecords) { // need to add empty records to the data base to fill it out to the needed size for (i = NumRecords; i < Index; i++) { RecInfoArray[i].Offset = 0; RecInfoArray[i].Length = 0; } NumRecords = Index + 1; return AddRecord(Index, Data); } else { // replace a record if (Data.length() > RecInfoArray[Index].Length) // is there enough space where the record is now return AddRecord(Index, Data); // no, need to add it somewhere else else { // yes, just overwrite the record File.seekp(RecInfoArray[Index].Offset); File.write((const char *)Data.c_str(), Data.length()); RecInfoArray[Index].Length = Data.length(); return OK; } } else return FileNotOpen; } bool IsOpen() const { return File.is_open(); } int Size() { return NumRecords; } }; #endif
1d602ea5c55bddc80379873b8485ea5aeaeebbd3
6e9c9734d5deca4aa7022c310e9cd0226ab8e7ee
/DeleteMeSFML/Input.h
a805c822bbeb9463095837b612ec1604e1c64b87
[]
no_license
Gerahn/DeleteMeSFML_Iter
aba56e3f174292d434ae0acbdfd5d01592b6cc16
335394fece80509528cac52ebd8f05fc8b2bb449
refs/heads/master
2020-12-25T05:07:56.993387
2016-05-05T07:35:35
2016-05-05T07:35:35
58,102,091
0
0
null
null
null
null
UTF-8
C++
false
false
265
h
Input.h
#ifndef _INPUT_H_ #define _INPUT_H_ // forward declarations // Hint to compiler that this is defined elsewhere class Tank; class Input { public: Input(); ~Input(); void Update(float dt); void AttachTank(Tank* tank); private: Tank* m_attachTank; }; #endif
9558f2e7417db9749c566bb7e287307399609d13
8d031bca7874cba7d4211dd5206c9f813e4f6b36
/Code/WorkspaceB/C++_Files/CF/479_V/C.cpp
946db18263b195f0b7af595ee8456258d286c0bd
[]
no_license
tushitgarg/algorithmic-programming
529a3d6679b5e5e8e906f61298630efc583d4ff5
a5482cca93f79ec8495256fa1a08525e61bfb899
refs/heads/master
2021-09-27T12:31:47.378541
2018-11-08T13:41:31
2018-11-08T13:41:31
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,022
cpp
C.cpp
/*input 3 6 1 5 2 4 3 */ #include <bits/stdc++.h> using namespace std; #define readFile freopen("E:/Shreyans/Documents/Coding Workspace/STDINPUT.txt","r",stdin); #define boostIO ios_base::sync_with_stdio(false) #define ld long double #define ll long long int #define CLR(s) memset(&s, 0, sizeof(s)) #define scani(s) scanf("%d",&s) #define scanl(s) scanf("%lld",&s) #define hashset unordered_set //JAVA feels :') #define hashmap unordered_map #define pll pair<ll,ll> #define pii pair<int,int> #define pb push_back #define mp make_pair #define F first #define S second #define endl '\n' int main() { //readFile; boostIO; int n; cin>>n; ll x,y; pll a[n]; for(int i=0;i<n;i++) { cin>>x>>y; a[i]=mp(x,y); } sort(a,a+n); set<ll> s; s.insert(min(a[0].F,a[0].S)); for(int i=1;i<n;i++) { ll mx=max(a[i].F,a[i].S); ll mn=min(a[i].F,a[i].S); ll last=*s.rbegin(); if(mn>=last) s.insert(mn); else s.insert(mx); } cout<<*s.rbegin(); return 0; }
511e3579d3c8b28a0d2b8b96b5b93eeaee87dcde
ed9af5bc096dcd397996a36aa9efd677a330a31f
/cpp_module/01/ex07/replace.cpp
14c44697d3b71b945dd8c6ec2266f41c0622c5be
[]
no_license
hypernomadd/42cursus
b4af9b6b7a9f2aa3f8d9aaba4a8ff78efe65847c
4603ed9b355408d9de1c2277710444cabf162dd9
refs/heads/master
2023-04-11T13:27:13.332874
2021-04-14T10:47:03
2021-04-14T10:47:03
260,924,341
0
0
null
null
null
null
UTF-8
C++
false
false
1,243
cpp
replace.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> int cpyAndReplace(std::string filename, std::string str1, std::string str2) { size_t pos; std::ifstream input(filename); std::ofstream output; std::string buffer; std::ostringstream ss; if (!input) { std::cerr << "Error: Can't open filename" << std::endl; return (1); } output.open(filename + ".replace"); if (!output) { std::cerr << "Error: Can't open filename.replace" << std::endl; return (1); } ss << input.rdbuf(); buffer = ss.str(); pos = buffer.find(str1); while (pos != std::string::npos) { buffer.replace(pos, str1.length(), str2); pos = buffer.find(str1, pos + str2.length()); } output << buffer; output.close(); input.close(); return (0); } int main(int argc, char *argv[]) { std::string str1; std::string str2; std::string filename; if (argc != 4) { std::cerr << "usage: " << argv[0] << " filename str1 str2" << std::endl; return (1); } str1 = std::string(argv[2]); str2 = std::string(argv[3]); if (!str1.length() || !str2.length()) { std::cerr << "Error: Empty string" << std::endl; return (1); } filename = std::string(argv[1]); return (cpyAndReplace(filename, str1, str2)); }
76c2b6bbcfead01d9bf6c1173e7e0f6e5ec4b8bb
15b612209b47e9588e60e3a1d5a91597eedf20ca
/team_fake/team_fake/AL3後期配布2/DirectXGame/Input.cpp
fd5d0d6d95eb46d2e943526b595350aae11e53bb
[]
no_license
cthugha171/team2
c3827962790e71b6a3526d88b5738d5decd41437
506bb49f974bcddacdf9eb807afdc7e7f2cb25d0
refs/heads/master
2023-03-04T21:34:42.717246
2021-02-17T05:56:22
2021-02-17T05:56:22
320,567,923
1
0
null
null
null
null
SHIFT_JIS
C++
false
false
1,715
cpp
Input.cpp
#include "Input.h" Input::Input(): m_pDinput(nullptr), m_pDevkeyborad(nullptr), mCurKey(), mPreKey(), mResult(NULL) { } Input::~Input() { } void Input::initialize(WinApp* winapp) { //DirectInputオブジェクトの生成 mResult = DirectInput8Create(winapp->GetInstance(), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&m_pDinput, nullptr); //キーボードデバイスの生成 mResult = m_pDinput->CreateDevice(GUID_SysKeyboard, &m_pDevkeyborad, NULL); //データ入力の型式のセット m_pDevkeyborad->SetDataFormat(&c_dfDIKeyboard); //標準形式 //排他的制御のレベルセット //フラグについて DISCL_FOREGROUND:画面が手前にある場合のみ入力を受け付ける DISCL_NONEXCLUSIVE:デバイスをこのアプリだけで専有しない DISCL_NOWINKEY:Windowsキーを無効にする m_pDevkeyborad->SetCooperativeLevel(winapp->GetHwnd(), DISCL_FOREGROUND | DISCL_NONEXCLUSIVE | DISCL_NOWINKEY); } void Input::update() { //1フレーム前のキーを更新 for (int i = 0; i < 256; i++) { mPreKey[i] = mCurKey[i]; } //すべての仮想キーの状態を保持する 256 バイトの配列へのポインタを指定する。 mResult = m_pDevkeyborad->Acquire(); mResult = m_pDevkeyborad->GetDeviceState(sizeof(mCurKey), mCurKey); } //キーが押された瞬間 bool Input::isKeyDown(int key) { return (mCurKey[key] & mInputNum) && !(mPreKey[key] & mInputNum); } //キーが押されている間 bool Input::isKeyState(int key) { return (mCurKey[key] & mInputNum) && (mPreKey[key] & mInputNum); } //キーが離された瞬間 bool Input::isKeyUp(int key) { return !(mCurKey[key] & mInputNum) && (mPreKey[key] & mInputNum); }
8f341ef9c8875916afe16d677abb1a027ac92f21
eb6742f8ee754c5b280cd0902b5331a91d2c8e92
/test/unittests/graphics/surface_test.cpp
384228a273a0b8951fd2e42aa66efdf2afbadabe
[ "MIT" ]
permissive
rodrigosetti/centurion
5e12a7bdf21df68b456c70230d2f2d300308a771
cb6960abeb735a1715352f514e8cf91b68ebc431
refs/heads/main
2023-03-31T15:33:10.046108
2021-03-16T22:55:58
2021-03-16T22:55:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,546
cpp
surface_test.cpp
#include "surface.hpp" #include <SDL_image.h> #include <gtest/gtest.h> #include <iostream> // cout #include <memory> // unique_ptr #include <type_traits> #include <utility> // move #include "colors.hpp" #include "exception.hpp" #include "log.hpp" static_assert(std::is_copy_constructible_v<cen::surface>); static_assert(std::is_copy_assignable_v<cen::surface>); static_assert(std::is_nothrow_move_constructible_v<cen::surface>); static_assert(std::is_nothrow_move_assignable_v<cen::surface>); static_assert(std::is_copy_constructible_v<cen::surface_handle>); static_assert(std::is_copy_assignable_v<cen::surface_handle>); static_assert(std::is_nothrow_move_constructible_v<cen::surface_handle>); static_assert(std::is_nothrow_move_assignable_v<cen::surface_handle>); class SurfaceTest : public testing::Test { protected: static void SetUpTestSuite() { m_surface = std::make_unique<cen::surface>(m_path); } static void TearDownTestSuite() { m_surface.reset(); } inline constexpr static auto m_path = "resources/panda.png"; inline static std::unique_ptr<cen::surface> m_surface; }; TEST_F(SurfaceTest, PathConstructor) { using namespace std::string_literals; EXPECT_THROW(cen::surface(""), cen::exception); EXPECT_THROW(cen::surface(""s), cen::exception); EXPECT_NO_THROW(cen::surface{m_path}); } TEST_F(SurfaceTest, FromSDLSurfaceConstructor) { EXPECT_NO_THROW(cen::surface(IMG_Load(m_path))); SDL_Surface* ptr{}; EXPECT_THROW(cen::surface{ptr}, cen::exception); } TEST_F(SurfaceTest, SizePixelFormatConstructor) { EXPECT_THROW(cen::surface({-1, -1}, cen::pixel_format::rgba8888), cen::sdl_error); cen::surface surface{{10, 10}, cen::pixel_format::rgba8888}; EXPECT_EQ(10, surface.width()); EXPECT_EQ(10, surface.height()); EXPECT_EQ(cen::pixel_format::rgba8888, surface.format_info().format()); } TEST_F(SurfaceTest, CopyConstructor) { const cen::surface copy{*m_surface}; EXPECT_NE(m_surface->get(), copy.get()); EXPECT_TRUE(m_surface->get()); EXPECT_TRUE(copy.get()); } TEST_F(SurfaceTest, MoveConstructor) { cen::surface surface{*m_surface}; const cen::surface other{std::move(surface)}; EXPECT_FALSE(surface.get()); EXPECT_TRUE(other.get()); } TEST_F(SurfaceTest, CopyAssignment) { cen::surface destination = *m_surface; EXPECT_NE(m_surface->get(), destination.get()); EXPECT_TRUE(m_surface->get()); EXPECT_TRUE(destination.get()); } TEST_F(SurfaceTest, MoveSelfAssignment) { *m_surface = std::move(*m_surface); EXPECT_TRUE(m_surface->get()); } TEST_F(SurfaceTest, MoveAssignment) { cen::surface source{*m_surface}; cen::surface destination = std::move(source); EXPECT_FALSE(source.get()); EXPECT_TRUE(destination.get()); } TEST_F(SurfaceTest, SetPixel) { constexpr auto color = cen::colors::red; EXPECT_NO_THROW(m_surface->set_pixel({-1, 0}, color)); EXPECT_NO_THROW(m_surface->set_pixel({0, -1}, color)); EXPECT_NO_THROW(m_surface->set_pixel({m_surface->width(), 0}, color)); EXPECT_NO_THROW(m_surface->set_pixel({0, m_surface->height()}, color)); EXPECT_NO_THROW(m_surface->set_pixel({43, 12}, color)); } TEST_F(SurfaceTest, SetAlpha) { const auto previous = m_surface->alpha(); constexpr auto alpha = 0xCF; m_surface->set_alpha(alpha); EXPECT_EQ(alpha, m_surface->alpha()); m_surface->set_alpha(previous); } TEST_F(SurfaceTest, SetColorMod) { const auto previous = m_surface->color_mod(); constexpr auto color = cen::colors::hot_pink; m_surface->set_color_mod(color); EXPECT_EQ(color, m_surface->color_mod()); m_surface->set_color_mod(previous); } TEST_F(SurfaceTest, SetBlendMode) { const auto previous = m_surface->get_blend_mode(); constexpr auto mode = cen::blend_mode::mod; m_surface->set_blend_mode(mode); EXPECT_EQ(mode, m_surface->get_blend_mode()); m_surface->set_blend_mode(previous); } TEST_F(SurfaceTest, Width) { EXPECT_EQ(200, m_surface->width()); } TEST_F(SurfaceTest, Height) { EXPECT_EQ(150, m_surface->height()); } TEST_F(SurfaceTest, Size) { const auto size = m_surface->size(); EXPECT_EQ(200, size.width); EXPECT_EQ(150, size.height); } TEST_F(SurfaceTest, Pitch) { EXPECT_EQ(4 * m_surface->width(), m_surface->pitch()); } TEST_F(SurfaceTest, Clip) { constexpr cen::irect rect{{48, 29}, {34, 89}}; m_surface->get()->clip_rect = rect.get(); EXPECT_EQ(rect, m_surface->clip()); } TEST_F(SurfaceTest, Pixels) { EXPECT_TRUE(m_surface->pixels()); const auto& cSurface = *m_surface; EXPECT_TRUE(cSurface.pixels()); } TEST_F(SurfaceTest, Data) { EXPECT_TRUE(m_surface->data()); const auto& cSurface = *m_surface; EXPECT_TRUE(cSurface.data()); } TEST_F(SurfaceTest, Convert) { cen::surface source{m_path}; source.set_blend_mode(cen::blend_mode::blend); source.set_alpha(0xAE); source.set_color_mod(cen::colors::red); const auto pixelFormat = cen::pixel_format::rgba8888; const cen::surface converted = source.convert(pixelFormat); EXPECT_EQ(source.get_blend_mode(), converted.get_blend_mode()); EXPECT_EQ(source.alpha(), converted.alpha()); EXPECT_EQ(source.color_mod(), converted.color_mod()); } TEST_F(SurfaceTest, Get) { EXPECT_TRUE(m_surface->get()); } TEST_F(SurfaceTest, ConvertToPointer) { EXPECT_TRUE(m_surface->operator SDL_Surface*()); EXPECT_TRUE(m_surface->operator const SDL_Surface*()); } TEST_F(SurfaceTest, ToString) { cen::log::put(cen::to_string(*m_surface)); } TEST_F(SurfaceTest, StreamOperator) { std::cout << "COUT: " << *m_surface << '\n'; }
fdda350ee7e1ae8525596c5e7f85fbcacf13c91c
9a896df889577375c00e98db293cbb60e3688b2d
/arreglo/src/Arreglo.cpp
1e4361062f9c2fca7e4b6ea27ae89e22abbd1e9e
[]
no_license
alexa1999/2018-trabajo-1
0061a9cbd98a6a26d5ed9a481d79e2e5dea19955
d10a92e42a841e786f5997762ae3ec1c72856691
refs/heads/master
2020-03-08T02:13:55.849270
2018-10-02T14:50:02
2018-10-02T14:50:02
127,853,387
0
1
null
null
null
null
UTF-8
C++
false
false
3,967
cpp
Arreglo.cpp
#include "Arreglo.h" #include <iostream> using namespace std; Arreglo::Arreglo(int tam,int arr[]) { this->tam=tam; this->data=new int[tam]; for(int i=0;i<=tam;i++) { data[i]=arr[i]; } } int Arreglo::imprimir(){ for(int i=0;i<tam;i++){ cout<<data[i]<<" "; } } void Arreglo:: insertarAtras(int elem){ int *nuevo= new int [tam+1]; tam++; for(int i=0;i<tam-1;i++){ nuevo[i]=data[i]; } nuevo[tam-1]=elem; delete [] data; data=nuevo; //this->insertar(size,elem); } void Arreglo ::insertar(int pos,int elem) { int *nuevo= new int [tam+1]; tam++; for(int i=0;i<pos;i++){ nuevo[i]=data[i]; } nuevo[pos]=elem; for(int i=pos;i<tam;i++) { nuevo[i+1]=data[i]; } delete[]data; data=nuevo; } void Arreglo:: eliminar(int pos) { int *nuevo= new int [tam-1]; tam--; for(int i=0;i<pos;i++){ nuevo[i]=data[i]; } for(int i=pos;i<tam;i++) { nuevo[i]=data[i+1]; } delete[]data; data=nuevo; } void Arreglo::menor() { int menor=data[0]; for (int i=0; i<tam; i++){ if (data[i]< menor){ menor=data[i]; } } cout<<menor; } void Arreglo::mayor() { int mayor=data[0]; for (int i=0; i<tam; i++){ if (data[i]> mayor){ mayor=data[i]; } } cout<<mayor; } void Arreglo::promedio() { int suma=0; for(int i=0;i<tam;i++) { suma=suma+data[i]; } cout<<"el promedio es:"<<suma/2<<endl; } void Arreglo::ascendente() { int i, j; for (i = tam - 1; i > 0; i--){ for (j = 0; j < i; j++){ if(data[j]> data[j+1]){ data[tam]=data[j]; data[j]=data[j+1]; data[j+1]=data[tam]; } } } } void Arreglo::descendiente() { int i, j; for (i = tam - 1; i > 0; i--){ for (j = 0; j < i; j++){ if(data[j]< data[j+1]){ data[tam]=data[j]; data[j]=data[j+1]; data[j+1]=data[tam]; } } } } void Arreglo::siPrimo(int pos) { int x=0; for(int i=1;i<data[pos]+1;i++){ if(data[pos]%i==0){ x++; } } if(x!=2){ cout<<"no es primo"; }else cout<<"es primo"; } void Arreglo::ePrimos() { for(int j=0;j<tam;j++) { int x=0; for(int i=1;i<data[j]+1;i++){ if(data[j]%i==0){ x++; } } if(x!=2){ cout<<" "; }else cout<<data[j]; } } void Arreglo::menorPrimo() { int *nuevo= new int [tam]; for(int j=0;j<tam;j++) { int x=0; for(int i=1;i<data[j]+1;i++){ if(data[j]%i==0){ x++; } } if(x!=2){ cout<<" "; }else nuevo[j]=data[j]; } int menor=nuevo[0]; for (int i=0; i<tam; i++){ if (nuevo[i]< menor){ menor=nuevo[i]; } } delete[]data; cout<<menor; } void Arreglo::mayorPrimo() { int *nuevoi= new int [tam]; for(int j=0;j<tam;j++) { int x=0; for(int i=1;i<data[j]+1;i++){ if(data[j]%i==0){ x++; } } if(x!=2){ cout<<" "; }else nuevoi[j]=data[j]; } int mayor=nuevoi[0]; for (int i=0; i<tam; i++){ if (nuevoi[i]> mayor){ mayor=nuevoi[i]; } } delete[]data; cout<<mayor; } void Arreglo::vaciar() { int *nuevo= new int[0]; delete [] data; data=nuevo; tam=0; } Arreglo::~Arreglo(){ delete []data; }
6412fb07abf7722c9517d8dd364a6466cc2ab918
1d098de1f31df58cac43bb83c1d5c683aaf4b7a6
/base64.cpp
15c4fa4e4b0d7c9dfc7b23bf48834a06a810a291
[]
no_license
brzeszczot/Neurocalc
d14c25e0600c42c3ceda71ade2ced3a221ba9be5
3330d4d1dfaabb41330c7e17c7070d370eee472d
refs/heads/master
2021-01-01T06:50:38.359605
2014-01-04T19:34:05
2014-01-04T19:34:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,693
cpp
base64.cpp
#include "Base64.hpp" #include <iostream> /*! @file * @brief Describes base64 namespace, which holds some functions for encoding and decoding base64 data * C_Base64 - a simple base64 encoder and decoder. * * Copyright (c) 1999, Bob Withers - bwit@pobox.com * * This code may be freely used for any purpose, either personal * or commercial, provided the authors copyright notice remains * intact. * * Enhancements by Stanley Yamane: * - reverse lookup table for the decode function * - reserve string buffer space in advance * * Modified by Ethan Tira-Thompson: * - changed Base64 class to base64 namespace * - modified functions to work on char[] instead of strings * - added doxygen commenting * * @author Bob Withers - bwit@pobox.com (Creator) * * $Author: ejt $ * $Name: $ * $Revision: 1.3 $ * $State: Exp $ * $Date: 2005/08/07 04:11:03 $ */ using namespace std; namespace base64 { static const char fillchar = '='; //!< used to mark partial words at the end static const string::size_type np = string::npos; //!< shorthand for the "no position" return code from string //! this lookup table defines the base64 encoding const string Base64Table("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); //! Decode Table gives the index of any valid base64 character in the Base64 table] /*! 65 == A, 97 == a, 48 == 0, 43 == +, 47 == / */ const string::size_type DecodeTable[] = { np,np,np,np,np,np,np,np,np,np, // 0 - 9 np,np,np,np,np,np,np,np,np,np, //10 -19 np,np,np,np,np,np,np,np,np,np, //20 -29 np,np,np,np,np,np,np,np,np,np, //30 -39 np,np,np,62,np,np,np,63,52,53, //40 -49 54,55,56,57,58,59,60,61,np,np, //50 -59 np,np,np,np,np, 0, 1, 2, 3, 4, //60 -69 5, 6, 7, 8, 9,10,11,12,13,14, //70 -79 15,16,17,18,19,20,21,22,23,24, //80 -89 25,np,np,np,np,np,np,26,27,28, //90 -99 29,30,31,32,33,34,35,36,37,38, //100 -109 39,40,41,42,43,44,45,46,47,48, //110 -119 49,50,51,np,np,np,np,np,np,np, //120 -129 np,np,np,np,np,np,np,np,np,np, //130 -139 np,np,np,np,np,np,np,np,np,np, //140 -149 np,np,np,np,np,np,np,np,np,np, //150 -159 np,np,np,np,np,np,np,np,np,np, //160 -169 np,np,np,np,np,np,np,np,np,np, //170 -179 np,np,np,np,np,np,np,np,np,np, //180 -189 np,np,np,np,np,np,np,np,np,np, //190 -199 np,np,np,np,np,np,np,np,np,np, //200 -209 np,np,np,np,np,np,np,np,np,np, //210 -219 np,np,np,np,np,np,np,np,np,np, //220 -229 np,np,np,np,np,np,np,np,np,np, //230 -239 np,np,np,np,np,np,np,np,np,np, //240 -249 np,np,np,np,np,np //250 -256 }; string encode(char buf[], unsigned int len) { string ret; if(len==0) return ""; ret.reserve((len-1)/3*4 + 4 + 1); for (string::size_type i = 0; i < len; ++i) { char c; c = (buf[i] >> 2) & 0x3f; ret.append(1, Base64Table[c]); c = (buf[i] << 4) & 0x3f; if (++i < len) c |= (buf[i] >> 4) & 0x0f; ret.append(1, Base64Table[c]); if (i < len) { c = (buf[i] << 2) & 0x3f; if (++i < len) c |= (buf[i] >> 6) & 0x03; ret.append(1, Base64Table[c]); } else { ++i; ret.append(1, fillchar); } if (i < len) { c = buf[i] & 0x3f; ret.append(1, Base64Table[c]); } else { ret.append(1, fillchar); } } return(ret); } unsigned int decodeSize(const std::string& data) { unsigned int fills=0; unsigned int size=data.size(); //skip any extra characters at the end (e.g. newlines or spaces) while(size>0 && DecodeTable[(unsigned char)data[size-1]]==np && data[size-1]!=fillchar) size--; if((size/4) * 4 != size) { cerr << "base 64 decodeSize error: data size is not multiple of 4" << endl; return size/4*3 + 3; } //count fill characters ('=') while(fills<size && data[size-fills-1]==fillchar) fills++; if(fills>2) { cerr << "base 64 decodeSize error: too many fill characters"; size-=(fills/3) * 3; fills=fills%3; } //cout << "Size is " << size/4*3-fills << " with " << fills << " fills and " << data.size()-size << " extra" << endl; return size/4*3-fills; } char* decode(const std::string& data) { unsigned int len=decodeSize(data); char * buf = new char[len]; if(!decode(data,buf,len)) { delete [] buf; return NULL; } return buf; } bool decode(const std::string& data, char buf[], unsigned int len) { const string::size_type size = data.length(); string::size_type i = 0, p=0; while(true) { bool retry=false; string::size_type d=np; do { d=DecodeTable[(unsigned char)data[i++]]; retry=false; if(d==np) { if(fillchar == data[i-1]) { cerr << "base64 decode error: unexpected fill char -- offset read?" << endl; return false; } if(!isspace(data[i-1])) { cerr << "base 64 decode error: illegal character '" << data[i-1] << '\'' << endl; return false; } retry=true; } } while(retry); char c = (char) d; do { d=DecodeTable[(unsigned char)data[i++]]; retry=false; if(d==np) { if(fillchar == data[i-1]) { cerr << "base64 decode error: unexpected fill char -- offset read?" << endl; return false; } if(!isspace(data[i-1])) { cerr << "base 64 decode error: illegal character '" << data[i-1] << '\'' << endl; return false; } retry=true; } } while(retry); if(p>=len) return false; char c1 = (char) d; c = (c << 2) | ((c1 >> 4) & 0x3); buf[p++]=c; if(i>=size) { cerr << "base64 decode error: Truncated data" << endl; return false; } do { d=DecodeTable[(unsigned char)data[i++]]; retry=false; if(d==np) { if(fillchar == data[i-1]) { return true; } if(!isspace(data[i-1])) { cerr << "base 64 decode error: illegal character '" << data[i-1] << '\'' << endl; return false; } retry=true; } } while(retry); if(p>=len) return false; c = (char) d; c1 = ((c1 << 4) & 0xf0) | ((c >> 2) & 0xf); buf[p++]=c1; if(i>=size) { cerr << "base64 decode error: Truncated data" << endl; return false; } do { d=DecodeTable[(unsigned char)data[i++]]; retry=false; if(d==np) { if(fillchar == data[i-1]) { return true; } if(!isspace(data[i-1])) { cerr << "base 64 decode error: illegal character '" << data[i-1] << '\'' << endl; return false; } retry=true; } } while(retry); if(p>=len) return false; c1 = (char) d; c = ((c << 6) & 0xc0) | c1; buf[p++]=c; if(i==size) return true; } //cerr << "base64 decode error: unexpected break" << endl; //return false; } }
3398170df81580d817d85e2853298b03c22213f4
2c371dd63b5d075ef3b7b820955fb9888be02b54
/background.cpp
19dc822247a1ebffa16d51a05090959063e2d55d
[]
no_license
Himani-Bhardwaj/POSIX-SHELL
e026a663ab863d2cc5cf9b4a7575cc647cfaddff
84d20bd7a9c1c4a932d344d4338323b7d1979ed9
refs/heads/master
2020-07-16T16:50:19.801980
2020-01-10T09:19:06
2020-01-10T09:19:06
205,827,516
0
0
null
null
null
null
UTF-8
C++
false
false
1,209
cpp
background.cpp
#include<iostream> #include<string.h> #include<stdlib.h> #include<unistd.h> #include<sys/types.h> #include<sys/wait.h> #include<fcntl.h> #include<vector> #include<bits/stdc++.h> #include<signal.h> #include "background.h" #include "commonFunctionalities.h" #define Max 4096 using namespace std; bool checkBackground(vector<string> tokens){ if(tokens[tokens.size() - 1] == "&") return true; else return false; } vector<int> handleChildBackground(vector<string> tokens,char *temp[Max],vector<int> bgProcessId,int pId){ //cout<<"closing file descriprors"<<endl; bgProcessId.push_back(pId); //bg = setsid(); string fileName = "/dev/null"; int fd = open(fileName.c_str(),O_RDONLY | O_CREAT|O_APPEND|O_WRONLY); //dup2(fd,STDIN_FILENO); dup2(fd,STDOUT_FILENO); temp[tokens.size()-1] = NULL; executeCommand(temp); close(fd); return bgProcessId; //setpgid(pId, pId); //tcsetpgrp(0, pId); //signal(SIGTTOU, childSignalHandler); } void handleParentBackground(int pId){ cout<<"starting background job"<<pId<<endl; //setpgid(0, 0); // Put in its own process group //tcsetpgrp(0, getpgrp()); /*childpids [nChildren] = pId; nChildren++;*/ //executeCommand(temp); //continue; }
de66f6ebcee620f82fcc841a2bfb0c6e336244f0
5aa1bbd6972fc348398c0b5cb79e10d32a2a5af6
/gfg-leetcode-solutions/Trees/MinimumDepthOfBinaryTree.cpp
4de8c2910a90c2ee457a119ae84c2ed943a49b71
[]
no_license
adityakumarsinha03/code-solutions
d7c82e5a33ec0bc771e03349d4e1a2b9a88c6d6b
0513ed37d4d5439dae687a231a0668e7bc709de7
refs/heads/master
2023-08-21T22:28:18.034759
2021-10-03T09:04:30
2021-10-03T09:04:30
413,026,475
0
0
null
2021-10-03T09:04:31
2021-10-03T09:01:59
null
UTF-8
C++
false
false
468
cpp
MinimumDepthOfBinaryTree.cpp
// https://leetcode.com/problems/minimum-depth-of-binary-tree/ class Solution { public: int minDepth(TreeNode* root) { if(root==NULL){ return 0; } else { int lh=minDepth(root->left); int rh=minDepth(root->right); if(rh==0){ return lh +1; } if(lh==0){ return rh +1; } return min(lh,rh)+1; } } };